/* Life Savings — un instrument calme, lisible, et familier au quotidien. */
@font-face { font-family: Manrope; font-style: normal; font-weight: 400 800; font-display: swap; src: url('/fonts/manrope-latin.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/instrument-serif-latin.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/instrument-serif-italic-latin.woff2') format('woff2'); }

:root {
  --font-sans: Manrope, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --text-body: 14px;
  --text-caption: 12px;
  --sidebar-width: 248px;
  --radius: 20px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --panel-shadow: 0 4px 24px color-mix(in srgb, var(--ink) 3%, transparent);
  --shadow: 0 24px 80px color-mix(in srgb, var(--ink) 14%, transparent);
}
:root:not([data-palette]), :root[data-palette='porcelain'] {
  --paper: #f5f4ee; --paper-deep: #e8ebe3; --sidebar: #eeeee6;
  --surface: #eef0e8; --surface-solid: #fdfdf8; --ink: #22372f;
  --muted: #606d64; --line: #dce1d6; --accent: #2f5c48;
  --accent-soft: #e2eadd; --on-accent: #ffffff; --green-bright: #3b9166;
}
:root[data-palette='sage'] { --muted: #5f6c63; }
:root[data-palette='ocean'] { --muted: #5c697c; }
:root[data-palette='clay'] { --muted: #726358; }
:root[data-palette='plum'] { --muted: #6f6176; }
html { scroll-padding-top: 100px; }
body { font-family: var(--font-sans); font-size: var(--text-body); line-height: 1.5; background: var(--paper); }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) .6px, transparent .6px); background-size: 6px 6px; opacity: .2; }
.ambient { display: none; }
::selection { color: var(--ink); background: var(--accent-soft); }
:is(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
button { touch-action: manipulation; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .12em; }
.brand-wordmark { font-size: 13px; font-weight: 650; letter-spacing: .065em; }
.brand-mark { color: var(--accent); }

/* Commands have weight and a small, physical response. */
.button { min-height: 44px; padding: 11px 19px; border-radius: 12px; font-size: 13px; font-weight: 700; transition: background .2s, border-color .2s, box-shadow .2s, transform .2s var(--ease-out); }
.button-small { min-height: 44px; padding: 10px 15px; font-size: 12px; border-radius: 11px; }
.button-primary, .button-dark { box-shadow: 0 3px 9px color-mix(in srgb, var(--accent) 15%, transparent); }
.button-light { background: var(--surface-solid); }
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0) scale(.98); }
.button:disabled { cursor: not-allowed; }
.icon-button { width: 44px; height: 44px; min-height: 44px; border-radius: 12px; }
.icon-button svg { width: 19px; height: 19px; }

/* The main navigation stays available; the drawer contains secondary tools. */
.app-view { padding-bottom: calc(130px + env(safe-area-inset-bottom, 0px)); }
.dashboard { max-width: 1380px; padding-inline: clamp(22px, 4vw, 68px); }
.workspace-toolbar { grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr); gap: 16px; min-height: 88px; padding-top: env(safe-area-inset-top, 0px); }
.workspace-toolbar::before { content: ''; position: absolute; inset: 0 -16px; z-index: -1; border-bottom: 1px solid transparent; border-radius: 0 0 20px 20px; transition: background .25s, border-color .25s; pointer-events: none; }
.workspace-toolbar.is-scrolled::before { background: color-mix(in srgb, var(--paper) 93%, transparent); border-color: var(--line); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.navigation-toggle { min-height: 44px; padding: 0 12px; gap: 11px; color: var(--ink); font-size: 12px; font-weight: 650; border-radius: 12px; }
.navigation-toggle svg { width: 19px; height: 19px; }
.navigation-toggle #workspaceLabel { display: none; }
.toolbar-wordmark { font-family: var(--font-display); font-size: 23px; font-weight: 400; letter-spacing: -.02em; }
.primary-navigation { grid-column: 2; grid-row: 1; display: flex; gap: 3px; padding: 5px; border: 1px solid var(--line); border-radius: 18px; background: color-mix(in srgb, var(--surface-solid) 85%, transparent); box-shadow: var(--panel-shadow); }
.primary-navigation button { display: flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 44px; padding: 0 13px; border: 0; border-radius: 13px; color: var(--muted); background: transparent; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; transition: background .2s, color .2s, transform .2s var(--ease-out); }
.primary-navigation button svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.primary-navigation button:hover { color: var(--ink); background: var(--surface); }
.primary-navigation button[aria-pressed='true'] { color: var(--on-accent); background: var(--accent); box-shadow: 0 2px 6px color-mix(in srgb, var(--accent) 12%, transparent); }
.toolbar-profile { min-height: 44px; padding: 5px 8px; border-radius: 12px; }
.toolbar-profile .avatar { width: 35px; height: 35px; border-radius: 50%; font-size: 12px; }
.toolbar-profile .profile-button-copy { max-width: 90px; }
.toolbar-profile .profile-button-copy strong { font-size: 12px; }
.workspace-toolbar.is-scrolled > :is(.navigation-toggle, .toolbar-profile) { background: transparent; }
.app-header { width: min(310px, calc(100vw - 24px)); padding: calc(72px + env(safe-area-inset-top, 0px)) 20px max(24px, env(safe-area-inset-bottom, 0px)); background: var(--surface-solid); border-right: 1px solid var(--line); box-shadow: 12px 0 50px color-mix(in srgb, var(--ink) 6%, transparent); }
.app-header .brand { margin-bottom: 38px; }
.app-header .brand-mark { width: 42px; height: 42px; }
.navigation-close { top: calc(16px + env(safe-area-inset-top, 0px)); right: 16px; }
.navigation-label { font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 12px; }
.mode-switch { gap: 7px; }
.mode-switch button, .header-actions .stats-button { min-height: 48px; height: auto; padding: 13px 14px; border-radius: 12px; font-size: 13px; gap: 13px; }
.mode-switch button.is-active { color: var(--on-accent); background: var(--accent); }
.header-actions { padding-top: 35px; }
.navigation-pin { min-height: 44px; border-radius: 12px; }
.app-header .profile-button { padding-top: 20px; margin-top: 30px; }
.navigation-backdrop { background: color-mix(in srgb, var(--ink) 26%, transparent); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }

/* A heading and period control read as one place. */
.dashboard-heading { gap: 14px 20px; margin: 34px 0 30px; }
.dashboard-heading h1 { margin: 0; font-family: var(--font-display); font-size: clamp(43px, 4.6vw, 62px); font-weight: 400; line-height: 1.05; letter-spacing: -.025em; }
.dashboard-heading > p:last-child { font-size: 13px; line-height: 1.7; }
.dashboard-heading > .day-nav { margin: 0; grid-template-columns: 44px minmax(115px, auto) 44px; gap: 0; border: 1px solid var(--line); padding: 3px; border-radius: 15px; background: var(--surface-solid); }
.day-nav .icon-button { width: 44px; height: 44px; }
.date-button { min-height: 44px; padding-inline: 10px; border-radius: 10px; }
.date-button span { font-size: 11px; font-weight: 750; }
.date-button small { font-size: 10px; }
.app-view[data-view='sport'] .day-nav { display: none; }

/* Time is the signature space. Geometry is decorative; hit zones stay intact. */
.time-workspace { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px 30px; align-items: start; min-height: 0; }
.day-summary { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; padding: 8px 0 26px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.day-summary > div { display: grid; gap: 5px; padding-inline: 28px; border-left: 1px solid var(--line); }
.day-summary > div:first-child { padding-left: 0; border-left: 0; }
.day-summary > div:last-child { padding-right: 0; }
.day-summary span { color: var(--muted); font-size: 12px; font-weight: 650; }
.day-summary strong { color: var(--ink); font-family: var(--font-display); font-size: 38px; font-weight: 400; letter-spacing: -.015em; line-height: 1.1; }
.day-summary > div:first-child strong { color: var(--accent); }
.day-summary small { color: var(--muted); font-size: 12px; line-height: 1.6; }
.day-summary :is([data-day-goal], [data-day-tracked]) { white-space:normal; overflow-wrap:anywhere; }
.time-grouping-controls { gap: 12px; padding-block: 3px; }
.time-grouping-choice { padding: 4px; border-radius: 13px; background: var(--surface-solid); }
.time-grouping-choice button { min-height: 40px; padding-inline: 15px; border-radius: 9px; font-size: 11px; font-weight: 650; }
.time-grouping-choice button[aria-pressed='true'] { color: var(--accent); background: var(--accent-soft); }
.project-list-toggle { padding-inline: 12px; border-radius: 10px; font-size: 11px; }
.project-list-toggle:hover { background: var(--surface); }
.ring-stage { position: relative; padding: 35px 18px 20px; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: radial-gradient(ellipse at 50% 50%, var(--surface-solid) 0, var(--surface) 75%); box-shadow: var(--panel-shadow); }
.ring-stage::before { content: ''; position: absolute; inset: 50px; border: 1px dashed color-mix(in srgb, var(--accent) 13%, transparent); border-radius: 50%; pointer-events: none; }
.ring-stage-caption { position: absolute; top: 21px; left: 26px; right: 26px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .12em; pointer-events: none; }
.ring-stage-caption i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.rings-orbit { width: min(100%, 535px); margin: 0 auto; }
.ring-stage-note { position: relative; margin: 6px 0 0; color: var(--muted); text-align: center; font-family: var(--font-display); font-size: 20px; font-style: italic; }
.ring-stage:has(.empty-state:not(.hidden))::before { display: none; }
.ring-stage:has(.empty-state:not(.hidden)) .ring-stage-note { display: none; }
.rings-core { width: 238px; padding: 14px; }
.core-idle { gap: 10px; }
.core-idle strong { font-family: var(--font-display); font-size: 39px; font-weight: 400; line-height: 1.1; }
.core-idle small { max-width: 170px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.core-idle-mark { display: block; width: 35px; height: 35px; margin-bottom: 3px; }
.core-idle-mark span { border-width: 1.5px; border-color: var(--accent); }
.core-idle-mark span:nth-child(2) { inset: 6px; }
.core-idle-mark span:nth-child(3) { inset: 12px; }
.core-project-label { color: var(--muted); font-size: 8px; letter-spacing: .07em; }
.core-project-title { font-size: 17px; font-weight: 650; line-height: 1.2; }
.core-project-title.is-long { font-size: 14px; line-height: 1.15; }
.core-project-title.is-very-long { font-size: 12px; line-height: 1.15; }
.core-percent { margin-top: 7px; font-family: var(--font-display); font-size: 52px; font-weight: 400; }
.core-time { margin-block: 7px 12px; font-size: 11px; }
.core-actions.core-primary-action .play-button { min-height: 44px; border-radius: 13px; font-size: 11px; box-shadow: 0 3px 12px color-mix(in srgb, var(--selected-color) 18%, transparent); }
.core-tools { margin-top: 3px; }
.core-tools [data-ring-actions] { min-height: 44px; min-width: 80px; }
.core-book-status { min-height: 44px; }
.core-anki-info { max-width: 100%; }
.core-anki-info small { overflow-wrap: anywhere; }
.project-index { align-self: stretch; padding: 16px 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.project-index-heading { margin-inline: 2px; margin-bottom: 18px; }
.project-index-heading h2 { font-size: 14px; font-weight: 750; }
.project-index-heading > span { min-width: 24px; padding: 2px 7px; border-radius: 7px; text-align: center; background: var(--surface); }
.project-index-list { grid-template-columns: 1fr; gap: 8px; }
.project-index-item { padding: 16px 12px; gap: 9px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); transition: background .2s, border-color .2s, transform .2s var(--ease-out); }
.project-index-item:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--project-color) 40%, var(--line)); }
.project-index-item[aria-pressed='true'] { background: color-mix(in srgb, var(--project-color) 8%, var(--surface-solid)); border-color: color-mix(in srgb, var(--project-color) 45%, var(--line)); }
.project-index-item > i { width: 8px; height: 8px; }
.project-index-item strong { font-size: 13px; font-weight: 650; line-height: 1.5; }
.project-index-item small { font-size: 12px; line-height: 1.5; }
.project-index-item > b { font-size: 11px; font-weight: 750; color: var(--ink); }
.project-index-track { height: 4px; margin-top: 5px; background: color-mix(in srgb, var(--project-color) 10%, var(--paper-deep)); }
.project-index-track > i { border-radius: inherit; transition: width .45s var(--ease-out); }
.project-index-summary { margin: 23px 9px 0; padding-top: 18px; font-size: 11px; align-items: center; }
.project-index-summary strong { font-size: 16px; }
.project-index-hint { margin-inline: 9px; }
.ring-learning-links { padding-inline: 12px; margin-top: -3px; }
.ring-learning-links button { min-height: 44px; }
.empty-state { border: 0; padding: 45px 24px; }
.empty-state h2 { font-family: var(--font-display); font-size: 34px; font-weight: 400; }
.empty-ring { border-width: 2px; border-color: var(--accent); background: var(--accent-soft); }

/* The timer floats above the mobile dock and never covers its destinations. */
.timer-dock { bottom: calc(24px + env(safe-area-inset-bottom, 0px)); padding: 14px 16px 14px 22px; gap: 20px; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 20px; background: var(--surface-solid); box-shadow: 0 12px 45px color-mix(in srgb, var(--ink) 18%, transparent); }
.timer-dock time { font-size: 25px; letter-spacing: -.04em; }
.timer-dock .button-light { border-radius: 12px; }
.timer-project strong { font-size: 12px; }
.timer-project small { font-size: 9px; }

/* Forms and sheets share one visual language. */
.modal { border-radius: 26px; box-shadow: var(--shadow); max-height: calc(100dvh - 40px); }
.modal::backdrop { background: color-mix(in srgb, var(--ink) 32%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal[open] { animation: sheet-arrival .32s var(--ease-out) both; }
.modal h2 { font-family: var(--font-display); font-size: 34px; font-weight: 400; line-height: 1.15; }
.modal-header { align-items: flex-start; gap: 14px; margin-bottom: 27px; }
.modal-header .icon-button { flex-shrink: 0; }
input[type='text'], input[type='email'], input[type='password'], input[type='number'], input[type='date'], input[type='search'], select, textarea { min-height: 48px; padding-inline: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 13px; }
textarea { padding-block: 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* Keep units outside the entered value after the shared padding is applied. */
:root .input-with-suffix input { padding-inline-end: 100px; }
.input-with-suffix :is(#budgetPercent, #budgetEntryAmount, #treasuryManualBalance, #treasurySafetyBuffer, #cashflowAmount, #budgetSalary) { padding-inline-end: 38px; }
.input-with-suffix > span:not(.sr-only) { top: 50%; transform: translateY(-50%); pointer-events: none; }
:is(input, select, textarea)::placeholder { color: var(--muted); opacity: 1; }
:root body :is(input, select, textarea):is([aria-invalid='true'], :user-invalid) { border-color: var(--danger); }
:root body :is(input, select, textarea):is([aria-invalid='true'], :user-invalid):focus { outline-color: var(--danger); box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent); }
.form-stack { gap: 20px; }
.form-stack label > span:first-child { font-size: 12px; }
.field-note { font-size: 12px; line-height: 1.7; }
.avatar-picker, .security-note, .book-project-fields, .specialized-category, .capture-onboarding, .ios-renewal-card { border-radius: 15px; }
.appearance-section h3 { font-size: 13px; }
.palette-card, .ring-style-card { border-radius: 14px; }
.stats-summary > div, .stats-chart-card, .stats-list-card, .capture-section, .capture-summary > div, .reading-projection, .reading-library { border-radius: 20px; box-shadow: var(--panel-shadow); }
.toast { border-radius: 14px; box-shadow: var(--shadow); }

/* An opening scene made of the same geometry as the product. */
.auth-view { padding: 18px; grid-template-columns: minmax(0, 1.08fr) minmax(400px, .92fr); gap: 20px; }
.auth-intro { min-height: calc(100dvh - 36px); padding: 40px clamp(28px, 4.2vw, 70px); border: 1px solid var(--line); border-radius: 26px; color: var(--ink); background: var(--surface); }
.auth-intro::after { display: none; }
.auth-intro .brand { position: relative; z-index: 1; }
.auth-message { margin: 65px 0 auto; max-width: 580px; }
.auth-message .eyebrow { color: var(--accent); }
.auth-message h1 { margin: 18px 0 22px; font-family: var(--font-display); font-size: clamp(60px, 6vw, 98px); font-weight: 400; line-height: .97; letter-spacing: -.025em; }
.auth-message h1 em { color: var(--accent); font-weight: 400; }
.auth-message > p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.8; max-width: 360px; }
.auth-product-map { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.auth-product-map > span { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: color-mix(in srgb, var(--surface-solid) 65%, transparent); font-size: 11px; font-weight: 550; }
.auth-orbit-art { position: relative; align-self: center; width: min(100%, 360px); aspect-ratio: 1; margin: 14px 0; }
.auth-orbit-art svg { width: 100%; height: 100%; overflow: visible; }
.auth-orbit-track { stroke: var(--line); stroke-width: 2; }
.auth-orbit-line { stroke-width: 11; animation: orbit-draw 1.8s var(--ease-out) both; }
.auth-orbit-one { stroke: #71816f; }
.auth-orbit-two { stroke: #c27963; animation-delay: .16s; }
.auth-orbit-three { stroke: #aca085; animation-delay: .32s; }
.auth-orbit-art > span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 11px; color: var(--muted); line-height: 1.8; }
.auth-orbit-art em { font-family: var(--font-display); font-size: 24px; color: var(--ink); }
.auth-intro-footer { margin: 15px 0 0; color: var(--muted); font-size: 8px; font-weight: 650; letter-spacing: .18em; }
.auth-panel-wrap { padding: 40px clamp(25px, 5vw, 80px); }
.auth-panel { width: min(100%, 370px); }
.auth-tabs { display: flex; width: fit-content; padding: 5px; margin-bottom: 50px; border-radius: 14px; background: var(--surface); }
.auth-tab { min-height: 44px; border-radius: 10px; padding: 10px 16px; font-size: 11px; }
.auth-heading h2 { font-family: var(--font-display); font-size: 43px; font-weight: 400; line-height: 1.08; letter-spacing: -.02em; }
.auth-heading { margin-bottom: 33px; }
.auth-recovery-button { min-height: 44px; font-size: 11px; }
.auth-panel .local-note { margin-top: 25px; font-size: 10px; color: var(--muted); }
.startup-view { background: var(--paper); }
.startup-view strong { font-family: var(--font-display); font-size: 32px; font-weight: 400; }

@keyframes sheet-arrival { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes orbit-draw { from { stroke-dashoffset: 1600; opacity: 0; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes workspace-arrival { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.app-view:not([data-view='time']) :is(#financeOverview, #learningOverview, #tasksOverview, #sportOverview):not(.hidden) { animation: workspace-arrival .35s var(--ease-out) both; }

@media (min-width: 761px) and (max-width: 1120px) {
  .primary-navigation button { padding-inline: 10px; }
  .primary-navigation button svg { display: none; }
  .toolbar-profile .profile-button-copy { display: none; }
  .workspace-toolbar { grid-template-columns: minmax(90px, 1fr) auto minmax(44px, 1fr); }
  .time-workspace { grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; }
  .app-view[data-navigation='pinned'] .time-workspace { grid-template-columns: 1fr; }
  .app-view[data-navigation='pinned'] .workspace-toolbar { grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 6px; }
  .app-view[data-navigation='pinned'] .navigation-toggle > span { display: none; }
  .app-view[data-navigation='pinned'] .primary-navigation button { padding-inline: 6px; font-size: 10px; }
  .app-view[data-navigation='pinned'] .dashboard-heading .day-nav { order: 3; }
}
@media (max-width: 980px) {
  .time-workspace { grid-template-columns: 1fr; }
  .project-index-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-index-list:has(.ring-learning-links) { grid-template-columns: 1fr; }
  .project-index { padding: 14px 0; }
  .auth-view { grid-template-columns: minmax(0, 1fr) minmax(350px, 1fr); }
  .auth-intro { padding: 30px; }
  .auth-message h1 { font-size: 65px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 80px; }
  .app-view, .app-view[data-navigation='pinned'] { margin-left: 0; padding-bottom: calc(220px + env(safe-area-inset-bottom, 0px)); }
  .dashboard { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  .workspace-toolbar { min-height: calc(72px + env(safe-area-inset-top, 0px)); grid-template-columns: 1fr auto; gap: 12px; }
  .workspace-toolbar::before { inset-inline: -10px; }
  .toolbar-profile { grid-column: 2; }
  .toolbar-profile .avatar { width: 35px; height: 35px; }
  .navigation-toggle { padding-inline: 6px; font-size: 12px; }
  #navigationToggle .toolbar-wordmark { display: inline; font-size: 23px; }
  .primary-navigation { position: fixed; z-index: 35; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; padding: 6px; border-radius: 22px; background: color-mix(in srgb, var(--surface-solid) 96%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 8px 35px color-mix(in srgb, var(--ink) 15%, transparent); }
  .primary-navigation button { min-height: 54px; flex-direction: column; gap: 4px; padding: 7px 2px; border-radius: 16px; font-size: 10px; letter-spacing: -.015em; }
  .primary-navigation button svg { width: 20px; height: 20px; }
  .primary-navigation button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .dashboard-heading { gap: 15px 12px; margin: 25px 0 24px; }
  .dashboard-heading h1 { font-size: 43px; flex-basis: calc(100% - 140px); }
  .dashboard-heading > .button { padding-inline: 12px; }
  .dashboard-heading > .day-nav { order: 3; width: 100%; grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 2px 5px; border-radius: 14px; }
  .dashboard-heading > p:last-child { order: 4; }
  .date-button { display: flex; align-items: baseline; justify-content: center; gap: 7px; }
  .day-summary { padding: 5px 0 22px; border-radius: 0; }
  .day-summary > div { padding-inline: 12px; gap: 6px; }
  .day-summary span { font-size: 11px; line-height: 1.5; }
  .day-summary strong { font-size: 29px; white-space: nowrap; }
  .day-summary small { font-size: 10px; line-height: 1.5; }
  .time-workspace { gap: 17px; }
  .time-grouping-controls { gap: 8px; }
  .time-grouping-choice button { padding-inline: 11px; min-height: 40px; font-size: 10px; }
  .project-list-toggle { padding-inline: 5px; font-size: 10px; }
  .ring-stage { padding: 35px 0 17px; margin-inline: -2px; border-radius: 24px; }
  .ring-stage::before { inset: 42px 25px; }
  .ring-stage-caption { top: 18px; left: 22px; right: 22px; font-size: 9px; }
  .rings-orbit { width: min(100%, 470px); }
  .rings-core { width: 178px; padding: 9px; }
  .core-detail { width: 160px; }
  .core-project-title { width: 155px; font-size: 13px; }
  .core-project-title.is-long { font-size: 11px; }
  .core-project-title.is-very-long { font-size: 10px; }
  .core-percent { font-size: 40px; margin-top: 4px; }
  .core-idle strong { font-size: 34px; }
  .core-idle small { max-width: 135px; font-size: 10px; }
  .core-time { font-size: 10px; margin-block: 5px 8px; }
  .core-project-label { font-size: 7px; }
  .core-actions.core-primary-action .play-button { min-height: 44px; font-size: 10px; }
  .core-anki-info small { font-size: 8px; }
  .ring-stage-note { font-size: 18px; margin-top: 12px; }
  .project-index { padding: 14px 0; border-radius: 0; }
  .project-index-list { grid-template-columns: 1fr; }
  .project-index-item { min-height: 82px; padding: 15px 13px; }
  .project-index-item strong { font-size: 13px; }
  .timer-dock, .app-view[data-navigation='pinned'] .timer-dock { left: 50%; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); max-width: 620px; grid-template-columns: 1fr auto; gap: 10px 14px; padding: 14px 16px; border-radius: 18px; }
  .timer-actions { grid-column: 1 / -1; width: 100%; justify-content: flex-end; }
  .timer-actions .button { min-height: 44px; }
  .timer-project { gap: 10px; }
  .timer-dock time { font-size: 22px; }
  .modal { width: calc(100% - 20px); max-height: calc(100dvh - max(12px, env(safe-area-inset-top, 0px)) - max(12px, env(safe-area-inset-bottom, 0px))); border-radius: 24px; }
  .modal h2 { font-size: 30px; }
  input[type='text'], input[type='email'], input[type='password'], input[type='number'], input[type='date'], input[type='search'], select, textarea { font-size: 16px; }
  .toast { top: auto; bottom: calc(94px + env(safe-area-inset-bottom, 0px)); }
  .auth-view { display: block; padding: calc(14px + env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) calc(14px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px)); }
  .auth-intro { min-height: 0; padding: 27px 26px 25px; border-radius: 23px; }
  .auth-intro .brand-mark { width: 30px; height: 30px; }
  .auth-intro .brand-wordmark { font-size: 11px; }
  .auth-message { margin: 35px 0 0; }
  .auth-message h1 { font-size: clamp(48px, 10.5vw, 70px); margin: 13px 0 16px; }
  .auth-message > p:not(.eyebrow) { max-width: 330px; font-size: 13px; line-height: 1.7; }
  .auth-product-map { gap: 6px; margin-top: 18px; }
  .auth-orbit-art, .auth-intro-footer { display: none; }
  .auth-panel-wrap { padding: 35px 16px 24px; }
  .auth-tabs { margin-bottom: 28px; }
  .auth-heading h2 { font-size: 36px; }
  .auth-heading { margin-bottom: 25px; }
}
@media (max-width: 360px) {
  .dashboard { padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); }
  #navigationToggle .toolbar-wordmark { font-size: 21px; }
  .dashboard-heading h1 { font-size: 39px; }
  .day-summary { padding-inline: 0; }
  .day-summary > div { padding-inline: 8px; }
  .day-summary strong { font-size: 25px; }
  .day-summary small { font-size: 10px; }
  .rings-core { width: 158px; padding: 6px; }
  .core-detail { width: 144px; }
  .core-project-title { width: 138px; }
  .core-percent { font-size: 34px; }
  .core-time { margin-block: 3px 5px; font-size: 9px; }
  .core-anki-info small { font-size: 7px; }
  .core-anki-info { margin-block: 3px; }
  .core-anki-info + .core-primary-action { margin-top: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Enlarge the existing composition on roomy desktop windows, independently of
   screen pixel density. Keep the wallpaper/3D canvas at its native viewport size. */
:root { --interface-scale: 1; }
@media (min-width: 1680px) and (min-height: 900px) {
  :root { --interface-scale: 1.04; }
  body > :is(.app-view, .auth-view, .startup-view, dialog, .toast, .offline-notice, .skip-link) {
    zoom: var(--interface-scale);
  }

  /* Viewport units themselves are not reduced by CSS zoom. Keep full-height
     panels and scrollable dialogs inside the physical browser viewport. */
  .app-view, .auth-view, .startup-view { min-height: calc(100dvh / var(--interface-scale)); }
  .auth-intro { min-height: calc(100dvh / var(--interface-scale) - 36px); }
  .app-header, .sport-fullscreen .sport-workspace { height: calc(100dvh / var(--interface-scale)); }
  .modal { max-height: calc(100dvh / var(--interface-scale) - 40px); }
  .learning-dialog { max-height: calc(90dvh / var(--interface-scale)); }
  .assistant-dialog { max-height: calc(100dvh / var(--interface-scale) - 24px); }
  .assistant-dialog[open] { height: min(780px, calc(100dvh / var(--interface-scale) - 24px)); }
}
@media (min-width: 1920px) and (min-height: 900px) {
  :root { --interface-scale: 1.08; }
}
@media (min-width: 2240px) and (min-height: 900px) {
  :root { --interface-scale: 1.14; }
}
@media (min-width: 2560px) and (min-height: 900px) {
  :root { --interface-scale: 1.2; }
}
