:root {
  color-scheme: dark;
  --bg: #18201b;
  --surface: #202722;
  --raised: #29322b;
  --line: #3b463d;
  --ink: #f0f4ed;
  --muted: #adb9ad;
  --faint: #849286;
  --accent: #ffa36b;
  --accent-ink: #2e2119;
  --green: #a1d0a2;
  --error: #ffc1b6;
  --radius: 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { touch-action: manipulation; }
button, a { -webkit-user-select: none; user-select: none; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
button, input, select, textarea { border-radius: 12px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:active:not(:disabled) { transform: translateY(1px); }
a { color: var(--accent); }
[hidden] { display: none !important; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.8px; font-weight: 600; }
h2 { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -.25px; }
h3 { font-size: 16px; font-weight: 600; }
p, h1, h2, h3, span, dd, dt { overflow-wrap: anywhere; }
.app-shell { width: 100%; max-width: 560px; min-height: 100dvh; margin: 0 auto; padding: 0 20px; padding-top: max(12px, env(safe-area-inset-top)); }
.app-header { height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wordmark { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 11px; font-weight: 650; letter-spacing: 1.8px; min-height: 44px; }
.brand-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 2px; box-shadow: 0 0 16px #ffa36b22; }
.icon-button { flex-shrink: 0; display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 10px; border: 1px solid var(--line); background: transparent; color: var(--muted); }
.icon-button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon-button[aria-current="page"] { border-color: var(--accent); color: var(--accent); }
#content { padding: 18px 0 calc(110px + env(safe-area-inset-bottom)); outline: none; }
.page { animation: enter .2s ease-out; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.eyebrow { font-size: 10px; font-weight: 650; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.subtitle { color: var(--muted); font-size: 13px; margin-top: 9px; line-height: 1.6; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 14px; min-width: 0; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.accent { color: var(--accent); }
.text-button { background: transparent; border: 0; color: var(--accent); min-height: 44px; padding: 8px 0; font-size: 13px; text-align: left; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 13px 18px; min-height: 48px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; text-align: center; line-height: 1.4; overflow-wrap: anywhere; max-width: 100%; }
.button.secondary { background: var(--raised); border-color: var(--line); color: var(--ink); }
.button.quiet { background: transparent; border-color: var(--line); color: var(--muted); }
.button.danger { background: #593a31; color: var(--error); border-color: #7a5144; }
.button.full { width: 100%; }
.button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.button-row { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.button-row .button { flex: 1 1 130px; }
.hero { position: relative; padding: 27px 24px 24px; border-color: #485044; background: radial-gradient(ellipse at 93% 5%, #64402b30 0, transparent 55%), var(--surface); }
.hero-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hero-top .eyebrow { margin: 0; }
.level-label { color: var(--accent); border: 1px solid #73513b; background: #68412720; padding: 4px 9px; border-radius: 20px; font-size: 10px; font-weight: 550; }
.count-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 0 0; }
.hero-count { font-size: clamp(64px, 22vw, 102px); font-weight: 500; line-height: 1.04; letter-spacing: -5px; font-variant-numeric: tabular-nums; }
.hero-count.long { font-size: clamp(50px, 16vw, 78px); letter-spacing: -3px; }
.badge { width: 96px; height: 104px; flex-shrink: 0; filter: drop-shadow(0 8px 20px #ffa36b15); }
.count-label { font-size: 13px; color: var(--muted); margin-top: 9px; }
.hero-divider { height: 1px; background: var(--line); margin: 25px 0 20px; }
.hero-details { display: grid; grid-template-columns: 1.3fr 1fr; gap: 12px; align-items: start; }
.duration { font-size: 22px; font-weight: 500; letter-spacing: -.4px; }
.club-total { text-align: right; align-self: center; font-size: 12px; color: var(--muted); }
.club-total strong { display: block; font-size: 15px; font-weight: 500; color: var(--ink); }
.mascot-row { display: flex; align-items: center; gap: 16px; border-top: 1px solid var(--line); margin-top: 20px; padding-top: 16px; min-width: 0; }
.mascot-art { display: block; width: 92px; height: 100px; flex: 0 0 92px; object-fit: contain; object-position: center bottom; filter: drop-shadow(0 6px 12px #0b120c30); }
.mascot-speech { min-width: 0; flex: 1; }
.mascot-name { color: var(--accent); font-size: 10px; font-weight: 650; letter-spacing: 1.1px; margin-bottom: 6px; }
.mascot-caption { color: var(--ink); font-size: 13px; line-height: 1.6; white-space: pre-wrap; }
.week-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.week-value { color: var(--accent); font-size: 15px; font-weight: 600; }
.week-tracks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 17px 0 13px; }
.week-tracks span { height: 6px; background: var(--line); border-radius: 5px; }
.week-tracks .done { background: var(--green); }
.week-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.week-caption span:last-child { text-align: right; }
.quick-link { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: left; gap: 14px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 17px 19px; min-height: 74px; margin-bottom: 12px; }
.quick-link .quick-icon { display: grid; place-items: center; border-radius: 12px; width: 40px; height: 40px; background: var(--raised); color: var(--accent); flex-shrink: 0; }
.quick-link svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.quick-link .quick-text { flex: 1; }
.quick-link strong { display: block; font-size: 14px; font-weight: 500; }
.quick-link small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.chevron { color: var(--faint); font-size: 20px; }
.verified { display: flex; justify-content: center; align-items: center; gap: 7px; flex-wrap: wrap; color: var(--faint); font-size: 10px; margin: 22px 6px 0; text-align: center; line-height: 1.7; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.verified.stale .status-dot { background: var(--accent); }
.notice, .connection-banner { padding: 13px 15px; background: #3c392b; border: 1px solid #655841; color: #e2d2b4; border-radius: 14px; font-size: 12px; line-height: 1.6; margin-bottom: 15px; white-space: pre-wrap; }
.notice.error { color: var(--error); background: #3c2b27; border-color: #67443a; }
.notice.success { color: #c3ddbc; background: #2b3829; border-color: #4b6145; }
.connection-banner { margin-top: 5px; }
.demo-label { color: var(--accent); font-size: 10px; text-align: center; margin: 0 0 15px; letter-spacing: .5px; }
.bottom-nav { position: fixed; z-index: 5; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 560px); display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; padding: 10px 14px max(12px, env(safe-area-inset-bottom)); background: #202722f5; border-top: 1px solid var(--line); backdrop-filter: blur(16px); }
.bottom-nav[data-triel="false"] { grid-template-columns: repeat(3, minmax(0,1fr)); }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; border: none; color: var(--faint); background: transparent; min-height: 52px; padding: 6px 2px; font-size: 10px; }
.bottom-nav button[aria-current="page"] { color: var(--accent); background: #ffa36b0b; }
.bottom-nav svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.loading-state, .empty-state { padding: 60px 15px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; color: var(--muted); }
.empty-state { padding: 34px 14px; }
.empty-state h2 { color: var(--ink); }
.empty-state p { max-width: 330px; font-size: 13px; line-height: 1.7; }
.empty-icon { width: 58px; height: 58px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--raised); border-radius: 19px; color: var(--accent); margin-bottom: 5px; }
.empty-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.loading-ring { display: block; width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
.year-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.year-tab { text-align: left; padding: 12px 13px; min-height: 70px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.year-tab strong { display: block; font-size: 15px; font-weight: 550; }
.year-tab span { font-size: 11px; }
.year-tab[aria-pressed="true"] { color: var(--accent); border-color: #b07a51; background: #493527; }
.stat-total { font-size: 37px; line-height: 1.15; letter-spacing: -1px; font-weight: 500; margin: 10px 0 6px; }
.chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 5px; margin: 26px -4px 6px; min-height: 180px; }
.chart-column { display: grid; grid-template-rows: 20px 135px 25px; align-items: end; min-width: 0; text-align: center; }
.chart-count { color: var(--muted); font-size: 9px; align-self: center; }
.chart-track { background: #2a332c; height: 135px; border-radius: 5px 5px 0 0; display: flex; align-items: end; overflow: hidden; }
.chart-bar { display: block; width: 100%; background: #bd8359; border-radius: 4px 4px 0 0; }
.chart-column.peak .chart-bar { background: var(--accent); }
.chart-label { font-size: 9px; color: var(--faint); align-self: center; }
.chart-legend { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.summary-number { font-size: 32px; line-height: 1.2; font-weight: 500; letter-spacing: -1px; }
.summary-number span { font-size: 16px; color: var(--faint); letter-spacing: 0; }
.progress-track { height: 5px; border-radius: 8px; background: var(--line); margin-top: 19px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); border-radius: inherit; }
.section-title { display: flex; justify-content: space-between; gap: 12px; margin: 26px 2px 13px; }
.section-title h2 { font-size: 15px; }
.period { display: flex; flex-direction: column; gap: 10px; padding: 17px 0; border-top: 1px solid var(--line); }
.period:first-child { border-top: 0; padding-top: 0; }
.period:last-child { padding-bottom: 0; }
.period-top { display: flex; justify-content: space-between; gap: 10px; }
.period-dates { font-size: 14px; font-weight: 500; }
.tag { width: fit-content; font-size: 10px; color: var(--muted); padding: 3px 8px; border: 1px solid var(--line); border-radius: 10px; white-space: nowrap; align-self: flex-start; }
.tag.active { color: var(--green); border-color: #506a4e; }
.period .text-button { align-self: flex-start; min-height: 36px; font-size: 12px; }
.workout-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.workout-row:first-child { padding-top: 0; border: 0; }
.workout-row:last-child { padding-bottom: 0; }
.workout-row strong { font-size: 13px; font-weight: 500; }
.workout-row p { color: var(--muted); font-size: 11px; margin-top: 2px; }
.workout-duration { font-size: 13px; color: var(--accent); white-space: nowrap; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.setting-row:first-child { padding-top: 0; border-top: 0; }
.setting-row:last-child { padding-bottom: 0; }
.setting-row strong { font-size: 14px; font-weight: 500; }
.setting-row p { color: var(--muted); font-size: 11px; margin-top: 5px; line-height: 1.65; }
.club-connections .quick-link { margin-top: 10px; }
.club-link { display: flex; margin-bottom: 12px; }
.club-link + .fitbase-form, .fitbase-form .button + .button { margin-top: 12px; }
.switch { display: inline-flex; align-items: center; min-width: 48px; min-height: 44px; padding: 0; border: none; background: transparent; flex-shrink: 0; }
.switch-track { width: 46px; height: 26px; border-radius: 20px; background: #4a554a; padding: 3px; transition: background .15s; }
.switch-track::after { content: ""; display: block; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.switch[aria-checked="true"] .switch-track { background: #b87c51; }
.switch[aria-checked="true"] .switch-track::after { transform: translateX(20px); }
.protection { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; margin-top: 20px; }
.protection summary { cursor: pointer; padding: 20px; color: var(--muted); min-height: 60px; font-size: 13px; }
.protection-body { padding: 0 20px 20px; }
.protection-value { font-size: 26px; font-weight: 500; margin: 2px 0 8px; }
.version { text-align: center; margin-top: 30px; font-size: 10px; color: var(--faint); letter-spacing: 1px; }
.cabinet-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin: -5px 0 22px; }
.cabinet-tab { background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 11px; padding: 10px 12px; min-height: 40px; border-radius: 20px; }
.cabinet-tab[aria-pressed="true"] { background: #493527; color: var(--accent); border-color: #9a704f; }
.cabinet-card h3 { font-size: 16px; }
.cabinet-subtitle { color: var(--muted); font-size: 12px; margin-top: 7px; white-space: pre-wrap; }
.values { margin: 17px 0 0; }
.value-row { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.2fr); gap: 15px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.value-row dt { color: var(--muted); }
.value-row dd { margin: 0; text-align: right; white-space: pre-wrap; }
.cabinet-card .button-row .button { font-size: 12px; }
.sheet { width: min(100% - 20px, 500px); max-height: calc(100dvh - 24px - env(safe-area-inset-top)); background: var(--surface); border: 1px solid var(--line); color: var(--ink); border-radius: 26px; padding: 12px 22px calc(24px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.sheet::backdrop { background: #090e0bb8; backdrop-filter: blur(5px); }
.sheet-handle { width: 34px; height: 4px; border-radius: 5px; background: var(--line); margin: 0 auto 10px; }
.sheet-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 6px 0 15px; }
.sheet-heading h2 { font-size: 21px; }
.sheet-heading .icon-button { border: 0; }
.sheet-description { color: var(--muted); font-size: 12px; white-space: pre-wrap; line-height: 1.7; margin-bottom: 20px; }
.confirmation-summary { white-space: pre-wrap; font-size: 13px; line-height: 1.75; margin-bottom: 20px; }
.form-field { margin: 16px 0; min-width: 0; }
.form-field label, .field-label { display: block; margin: 0 0 7px; color: var(--muted); font-size: 12px; }
.form-field input:not([type="checkbox"]), .form-field select, .form-field textarea { display: block; width: 100%; max-width: 100%; min-width: 0; padding: 12px; min-height: 48px; border: 1px solid #4b584d; background: #19211c; color: var(--ink); font-size: 16px; }
.form-field input:read-only, .form-field select:disabled { color: var(--muted); background: var(--raised); }
.form-field input[type="date"], .form-field input[type="time"] { -webkit-appearance: none; appearance: none; }
.form-field textarea { min-height: 100px; resize: vertical; }
.form-field .hint { color: var(--faint); font-size: 11px; margin-top: 7px; }
.form-field fieldset { min-width: 0; padding: 0; margin: 0; border: none; }
.form-field legend { padding: 0; }
.form-field .check-option { display: flex; align-items: center; gap: 12px; color: var(--ink); padding: 11px 0; margin: 0; min-height: 44px; font-size: 13px; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.form-status { font-size: 12px; color: var(--error); margin-top: 14px; line-height: 1.65; }
.readonly-value { padding: 12px; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; white-space: pre-wrap; }
.clipboard-value { width: 100%; resize: vertical; min-height: 80px; background: var(--bg); color: var(--ink); padding: 12px; border: 1px solid var(--line); margin-bottom: 12px; }
.toast { position: fixed; z-index: 20; bottom: calc(98px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 40px); color: var(--ink); background: #3b483d; border: 1px solid #63725f; box-shadow: 0 8px 28px #0004; padding: 12px 18px; border-radius: 13px; text-align: center; font-size: 12px; }
.noscript { max-width: 460px; padding: 20px; margin: auto; color: var(--error); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@media (min-width: 600px) { body { background: radial-gradient(ellipse at 50% 0, #33413155, transparent 70%), var(--bg); } .app-shell { border-left: 1px solid #313c32; border-right: 1px solid #313c32; padding-left: 28px; padding-right: 28px; } }
@media (max-width: 350px) { .app-shell { padding-left: 14px; padding-right: 14px; } .card { padding: 19px; border-radius: 20px; } .hero { padding: 22px 19px; } .badge { width: 76px; height: 88px; } .hero-count { letter-spacing: -4px; } .duration { font-size: 19px; } .mascot-row { gap: 12px; } .mascot-art { width: 84px; height: 94px; flex-basis: 84px; } .mascot-caption { font-size: 12px; } .sheet { padding-left: 17px; padding-right: 17px; } .year-tabs { grid-template-columns: repeat(2, minmax(0,1fr)); } .chart { gap: 4px; } .form-grid { grid-template-columns: 1fr; gap: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; } }
