:root {
  color-scheme: light;
  --bg: #e9f3f0;
  --bg-deep: #dcebe7;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #f8fcfb;
  --surface-soft: #dcebe7;
  --ink: #102a2e;
  --muted: #597074;
  --line: rgba(16, 42, 46, .12);
  --accent: #236b69;
  --accent-strong: #164e50;
  --accent-soft: #bfe1d8;
  --night: #123b3e;
  --warning: #b8603d;
  --danger: #a74444;
  --shadow: 0 18px 55px rgba(24, 68, 68, .11);
  --radius: 24px;
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  font-family: Inter, ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d2528;
  --bg-deep: #091d20;
  --surface: rgba(23, 55, 57, .82);
  --surface-solid: #173739;
  --surface-soft: #1d484a;
  --ink: #eef8f5;
  --muted: #a9bfbd;
  --line: rgba(225, 245, 239, .12);
  --accent: #7bc5b7;
  --accent-strong: #a7ddd2;
  --accent-soft: #214f4e;
  --night: #071b1e;
  --warning: #e49771;
  --danger: #ec9696;
  --shadow: 0 18px 55px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% -10%, color-mix(in srgb, var(--accent-soft) 74%, transparent) 0, transparent 34rem),
    linear-gradient(160deg, var(--bg), var(--bg-deep));
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: var(--accent-strong); }
svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .75rem; font-size: clamp(2rem, 6vw, 3.8rem); line-height: 1.07; letter-spacing: -.045em; font-weight: 650; }
h2 { margin-bottom: .5rem; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.15; letter-spacing: -.025em; }
h3 { margin-bottom: .3rem; font-size: 1.05rem; }

.app-shell { width: min(100%, 1120px); min-height: 100vh; margin: 0 auto; padding: 0 24px 120px; }
.topbar { height: 86px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px); background: linear-gradient(var(--bg) 65%, transparent); }
.brand { display: flex; gap: 10px; align-items: center; border: 0; padding: 0; background: transparent; font-size: 1.05rem; font-weight: 700; cursor: pointer; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 18px; background: var(--night); box-shadow: 0 12px 28px rgba(10, 49, 52, .22); }
.brand-mark::before, .brand-mark::after, .brand-mark span { content: ""; position: absolute; border-radius: 999px; border: 2px solid #a9d9cf; }
.brand-mark { position: relative; }
.brand-mark::before { width: 30px; height: 30px; opacity: .45; }
.brand-mark::after { width: 19px; height: 19px; opacity: .8; }
.brand-mark span { width: 8px; height: 8px; background: #edf9f5; border-color: #edf9f5; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 13px; box-shadow: none; }
.brand-mark.small::before { width: 22px; height: 22px; }
.brand-mark.small::after { width: 13px; height: 13px; }
.brand-mark.small span { width: 5px; height: 5px; }

.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .avatar-button { border: 1px solid var(--line); background: var(--surface); width: 43px; height: 43px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.avatar-button { background: var(--accent-strong); color: var(--surface-solid); font-weight: 700; border: 0; }
.icon-button:hover, .avatar-button:hover { transform: translateY(-1px); }
.icon-button.inverse { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.15); color: white; font-size: 1.8rem; }

.view { display: none; animation: view-in .35s ease both; }
.view.active { display: block; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }

.welcome-row { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: 54px 0 26px; }
.welcome-row h1 { max-width: 720px; margin-bottom: 0; }
.eyebrow { margin-bottom: .5rem; color: var(--accent); font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.streak-pill { flex: none; display: flex; gap: 7px; align-items: center; padding: 11px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.streak-pill span { color: var(--accent); font-size: 1.3rem; }
.streak-pill strong { color: var(--ink); }

.theme-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.theme-card { min-height: 146px; padding: 21px; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; box-shadow: 0 8px 30px rgba(24,68,68,.04); transition: .25s ease; }
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.theme-card .symbol { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 22px; border-radius: 15px; color: var(--accent-strong); background: var(--accent-soft); font-size: 1.35rem; }
.theme-card strong, .theme-card small { display: block; }
.theme-card strong { font-size: 1.05rem; }
.theme-card small { margin-top: 3px; color: var(--muted); font-size: .85rem; }
.theme-card.advanced { background: color-mix(in srgb, var(--warning) 7%, var(--surface)); }
.theme-card.advanced .symbol { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }

.quick-card { margin: 28px 0 46px; min-height: 310px; display: grid; grid-template-columns: .85fr 1.15fr; overflow: hidden; border-radius: 32px; color: #f2fbf8; background: var(--night); box-shadow: var(--shadow); }
.quick-visual { position: relative; min-height: 290px; display: grid; place-items: center; overflow: hidden; }
.quick-visual::before { content: ""; width: 220px; height: 220px; border: 1px solid rgba(183,230,219,.33); border-radius: 50%; box-shadow: 0 0 0 32px rgba(118,190,176,.07), 0 0 0 68px rgba(118,190,176,.04); animation: breathe 10s ease-in-out infinite; }
.quick-visual span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #c9eee5; box-shadow: 0 0 18px rgba(201,238,229,.75); }
.quick-visual span:nth-child(1) { transform: translate(-70px,-32px); opacity: .4; }
.quick-visual span:nth-child(2) { transform: translate(62px,45px); opacity: .7; }
.quick-visual span:nth-child(3) { width: 74px; height: 74px; background: radial-gradient(circle, rgba(218,247,240,.75), rgba(74,139,134,.18) 65%, transparent 70%); box-shadow: none; }
@keyframes breathe { 0%,100% { transform: scale(.78); opacity: .65; } 50% { transform: scale(1.08); opacity: 1; } }
.quick-content { align-self: center; padding: 42px 44px 42px 12px; }
.quick-content .eyebrow { color: #8dd1c3; }
.quick-content h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
.quick-content p:not(.eyebrow) { max-width: 34rem; color: #b9ceca; }

.button { min-height: 46px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 11px 18px; border-radius: 14px; border: 1px solid transparent; font-weight: 750; text-decoration: none; cursor: pointer; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent-strong); color: #fff; }
.button.secondary { background: var(--accent-soft); color: var(--ink); }
.button.light { margin-top: 12px; background: #e9f7f3; color: #143d40; }
.button.ghost { border-color: var(--line); background: transparent; color: var(--ink); }
.button.warning { background: var(--warning); color: #fff; }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.wide { width: 100%; }
.small-button { min-height: 38px; padding: 8px 12px; font-size: .82rem; }
.text-button { border: 0; background: transparent; color: var(--accent); font-weight: 700; cursor: pointer; }
.text-button.danger { color: var(--danger); }

.section-block { margin: 42px 0; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.week-progress-card { padding: 26px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.progress-ring { --progress: 0deg; width: 102px; height: 102px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 50%; background: radial-gradient(circle at center, var(--surface-solid) 0 62%, transparent 64%), conic-gradient(var(--accent) var(--progress), var(--surface-soft) 0); }
.progress-ring span { font-size: 1.7rem; line-height: 1; font-weight: 750; }
.progress-ring small { color: var(--muted); font-size: .7rem; }
.week-progress-card p { margin-bottom: 10px; color: var(--muted); }
.mini-progress { height: 7px; border-radius: 99px; overflow: hidden; background: var(--surface-soft); }
.mini-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .5s ease; }

.page-heading { max-width: 660px; padding: 58px 0 28px; }
.page-heading > p:last-child { color: var(--muted); font-size: 1.05rem; }
.filter-row { display: flex; gap: 8px; padding: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip { flex: none; padding: 9px 15px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); cursor: pointer; }
.filter-chip.active { border-color: var(--accent); background: var(--accent-strong); color: #fff; }
.exercise-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.exercise-card { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; min-height: 170px; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.exercise-card::after { content: ""; position: absolute; right: -52px; bottom: -72px; width: 150px; height: 150px; border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent); border-radius: 50%; }
.exercise-card h2 { font-size: 1.25rem; }
.exercise-card p { max-width: 31rem; margin-bottom: 13px; color: var(--muted); font-size: .92rem; }
.meta-row { display: flex; flex-wrap: wrap; gap: 7px; }
.meta-row span, .evidence-line span { padding: 5px 8px; border-radius: 8px; background: var(--surface-soft); color: var(--muted); font-size: .72rem; font-weight: 650; }
.round-start { position: relative; z-index: 1; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--accent-strong); cursor: pointer; font-size: 1.25rem; }
.exercise-card.advanced { border-color: color-mix(in srgb, var(--warning) 35%, var(--line)); }
.exercise-card.advanced .round-start { background: var(--warning); }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-card { min-height: 158px; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat-card > span { margin-bottom: auto; color: var(--muted); font-size: .85rem; }
.stat-card strong { font-size: 2.1rem; line-height: 1; }
.stat-card small { margin-top: 6px; color: var(--muted); }
.badge-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.badge { min-height: 122px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 20px; background: var(--accent-soft); }
.badge span { font-size: 1.45rem; color: var(--accent-strong); }
.badge.empty { color: var(--muted); background: var(--surface); border: 1px dashed var(--line); }
.history-list, .reminder-list { display: grid; gap: 9px; }
.history-item, .reminder-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.history-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); }
.history-item strong, .history-item small, .reminder-item strong, .reminder-item small { display: block; }
.history-item small, .reminder-item small { color: var(--muted); }
.history-time { color: var(--muted); font-size: .88rem; }
.empty-state { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

.settings-card { margin-bottom: 14px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.setting-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-bottom: 20px; }
.setting-heading h2, .setting-heading p { margin-bottom: 0; }
.setting-heading p { color: var(--muted); font-size: .9rem; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; padding: 5px; border-radius: 14px; background: var(--surface-soft); }
.segmented.compact { margin: -3px 0 12px 46px; grid-template-columns: repeat(2, minmax(0, 180px)); background: transparent; padding: 0; }
.segmented button { min-height: 40px; padding: 6px 10px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; cursor: pointer; }
.segmented button.active { color: var(--ink); background: var(--surface-solid); box-shadow: 0 4px 14px rgba(0,0,0,.06); }
.switch-row { min-height: 65px; display: flex; justify-content: space-between; align-items: center; gap: 20px; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row span strong, .switch-row span small { display: block; }
.switch-row span small { color: var(--muted); font-size: .8rem; }
.switch-row input { position: absolute; opacity: 0; }
.switch-row i { width: 48px; height: 28px; flex: none; position: relative; border-radius: 99px; background: var(--surface-soft); transition: .2s; }
.switch-row i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-solid); box-shadow: 0 2px 7px rgba(0,0,0,.18); transition: .2s; }
.switch-row input:checked + i { background: var(--accent); }
.switch-row input:checked + i::after { transform: translateX(20px); }
.range-row { display: grid; grid-template-columns: 120px 1fr; gap: 22px; align-items: center; }
.range-row span strong, .range-row span small { display: block; }
.range-row span small { color: var(--muted); }
.range-row input { accent-color: var(--accent); width: 100%; }
.account-card { display: flex; justify-content: space-between; align-items: center; }
.account-card h2, .account-card p { margin-bottom: 0; }
.account-card p { color: var(--muted); font-size: .85rem; }
.reminder-item button { border: 0; background: transparent; color: var(--danger); cursor: pointer; font-size: 1.2rem; }

.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 28px), 610px); height: 72px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 7px; border: 1px solid var(--line); border-radius: 24px; background: color-mix(in srgb, var(--surface-solid) 87%, transparent); box-shadow: 0 20px 55px rgba(5,35,38,.22); backdrop-filter: blur(22px); }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; border-radius: 17px; background: transparent; color: var(--muted); cursor: pointer; font-size: .68rem; }
.bottom-nav svg { width: 1.25rem; height: 1.25rem; }
.bottom-nav button.active { color: var(--ink); background: var(--accent-soft); }

dialog { max-width: none; max-height: none; border: 0; padding: 0; color: var(--ink); background: transparent; }
dialog::backdrop { background: rgba(3,22,24,.62); backdrop-filter: blur(8px); }
.sheet-dialog { width: 100%; height: 100%; }
.sheet { width: min(100% - 18px, 620px); max-height: calc(100vh - 24px); position: absolute; right: 9px; bottom: 9px; overflow-y: auto; padding: 30px; border-radius: 28px; background: var(--surface-solid); box-shadow: var(--shadow); animation: sheet-in .28s ease both; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
.close-button { position: absolute; top: 17px; right: 17px; width: 39px; height: 39px; border: 0; border-radius: 50%; color: var(--muted); background: var(--surface-soft); cursor: pointer; font-size: 1.5rem; }
.sheet > p:not(.eyebrow), .dialog-card > p:not(.eyebrow) { color: var(--muted); }
.evidence-line { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0 22px; }
fieldset { margin: 18px 0; padding: 0; border: 0; }
legend { margin-bottom: 9px; font-weight: 750; }
legend small { color: var(--muted); font-weight: 500; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.preset-button { padding: 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; }
.preset-button strong, .preset-button small { display: block; }
.preset-button small { color: var(--muted); }
.preset-button.active { border-color: var(--accent); background: var(--accent-soft); }
.custom-duration { margin-top: 9px; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--muted); }
.custom-duration input { width: 65px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); }
.custom-details { margin: 18px 0; padding: 13px 0; border-block: 1px solid var(--line); }
.custom-details summary { cursor: pointer; font-weight: 700; }
.custom-details > p { margin: 8px 0 0; color: var(--muted); font-size: .78rem; }
.phase-control { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: 12px; margin-top: 10px; }
.phase-control input { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--surface); }
.mood-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.mood-button { min-height: 47px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; font-size: 1.25rem; }
.mood-button.active { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-2px); }
.exercise-tip { padding: 12px 14px; border-radius: 13px; color: var(--muted); background: var(--surface-soft); font-size: .82rem; }
.source-link { display: block; margin-top: 13px; text-align: center; color: var(--muted); font-size: .78rem; }

.center-dialog { width: 100%; height: 100%; }
.dialog-card { width: min(calc(100% - 28px), 520px); max-height: calc(100vh - 30px); position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); overflow-y: auto; padding: 30px; border-radius: 28px; background: var(--surface-solid); box-shadow: var(--shadow); }
.warning-symbol, .completion-mark { width: 60px; height: 60px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 20px; color: var(--warning); background: color-mix(in srgb, var(--warning) 15%, transparent); font-size: 1.8rem; }
.warning-card ul { padding-left: 21px; color: var(--muted); }
.warning-card li { margin-bottom: 6px; }
.confirm-check { display: flex; align-items: start; gap: 10px; padding: 13px; border-radius: 13px; background: var(--surface-soft); cursor: pointer; }
.confirm-check input { margin-top: 5px; accent-color: var(--warning); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 19px; }
.completion-mark { margin-inline: auto; color: var(--accent-strong); background: var(--accent-soft); }
.complete-card { text-align: center; }

.player-dialog { width: 100%; height: 100%; background: var(--night); }
.player { --phase-duration: 4s; min-height: 100vh; padding: max(20px, env(safe-area-inset-top)) 24px var(--safe-bottom); display: grid; grid-template-rows: auto 1fr auto; color: #edf8f5; background: radial-gradient(circle at 50% 42%, rgba(76,145,139,.42), transparent 29%), linear-gradient(160deg,#153f42,#081e22); }
.player-top { width: min(100%, 820px); margin: 0 auto; display: grid; grid-template-columns: 44px 1fr 44px; gap: 12px; align-items: center; text-align: center; }
.player-top > span { font-weight: 700; }
.player-center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 480px; }
.player-center > p:first-child { margin-bottom: 32px; color: #b9d3cd; font-size: 1rem; letter-spacing: .05em; }
.breath-orb { width: min(62vw, 330px); aspect-ratio: 1; display: grid; place-items: center; position: relative; border-radius: 50%; background: radial-gradient(circle, rgba(207,245,236,.22), rgba(93,171,160,.15) 55%, transparent 57%); }
.breath-orb::before, .breath-orb::after { content: ""; position: absolute; inset: 5%; border: 1px solid rgba(190,231,222,.34); border-radius: 50%; transition: transform var(--phase-duration) ease-in-out, opacity .4s; }
.breath-orb::after { inset: -12%; opacity: .24; }
.breath-orb.phase-inhale::before, .breath-orb.phase-topup::before { transform: scale(1.18); opacity: 1; }
.breath-orb.phase-inhale::after, .breath-orb.phase-topup::after { transform: scale(1.1); opacity: .38; }
.breath-orb.phase-exhale::before { transform: scale(.72); opacity: .55; }
.breath-orb.phase-exhale::after { transform: scale(.84); opacity: .15; }
.breath-orb > div { text-align: center; }
.breath-orb strong, .breath-orb small { display: block; }
.breath-orb strong { font-size: clamp(3rem, 12vw, 5.4rem); line-height: 1; font-weight: 350; font-variant-numeric: tabular-nums; }
.breath-orb small { margin-top: 7px; color: #aec8c3; }
.player-tip { max-width: 430px; min-height: 48px; margin: 35px auto 0; text-align: center; color: #a9c0bd; font-size: .86rem; }
.player-bottom { width: min(100%, 720px); margin: 0 auto; }
.session-progress { height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.14); }
.session-progress span { display: block; width: 0; height: 100%; background: #b9e7dc; }
.player-time { display: flex; justify-content: space-between; margin-top: 7px; color: #9db5b2; font-size: .76rem; font-variant-numeric: tabular-nums; }
.pause-button { margin: 18px auto 0; display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: transparent; color: white; cursor: pointer; }
.pause-button span { width: 52px; height: 52px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(255,255,255,.08); font-weight: 700; }
.pause-button em { color: #9db5b2; font-style: normal; font-size: .72rem; }

.field-label { display: grid; gap: 6px; margin: 14px 0; font-weight: 700; }
.field-label input, .field-label select { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface); }
.day-picker { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day-picker button { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; text-transform: capitalize; }
.day-picker button.active { color: white; background: var(--accent-strong); }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 104px; transform: translate(-50%, 18px); max-width: calc(100% - 30px); padding: 11px 16px; border-radius: 13px; color: #fff; background: #102f31; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.login-page, .offline-page { display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 50% 22%, #22575a, #0a2225 55%, #07191c); color: #eef8f5; }
.login-card, .offline-shell { width: min(100%, 570px); text-align: center; }
.login-card .brand-mark, .offline-shell .brand-mark { margin: 0 auto 26px; }
.login-card h1, .offline-shell h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); }
.login-copy, .offline-shell > p:not(.eyebrow) { max-width: 470px; margin: 0 auto 28px; color: #aec5c1; }
.login-card .eyebrow, .offline-shell .eyebrow { color: #8bd0c1; }
.login-card .button { max-width: 420px; margin: 24px auto 0; background: #eaf7f3; color: #173e40; }
.login-card .button svg { stroke: none; }
.privacy-note { margin: 18px auto 0; color: #88a5a1; font-size: .76rem; }
.notice { padding: 12px 14px; border-radius: 12px; color: #d6e8e4; background: rgba(255,255,255,.08); }
.notice.error { color: #ffd3ca; background: rgba(203,89,66,.2); }
.offline-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 26px 0 34px; }
.offline-choice { min-height: 80px; padding: 12px; border: 1px solid rgba(255,255,255,.13); border-radius: 16px; color: #d7e8e4; background: rgba(255,255,255,.06); cursor: pointer; }
.offline-choice small { display: block; margin-top: 4px; color: #8ba6a2; }
.offline-choice.active { border-color: #8bd0c1; background: rgba(117,195,179,.18); }
.offline-orb { margin: 10px auto 36px; }
.offline-page .button { max-width: 380px; margin: 0 auto; background: #a4ded1; color: #102f31; }

@media (max-width: 760px) {
  .app-shell { padding-inline: 16px; }
  .topbar { height: 72px; }
  .brand > span:last-child { display: none; }
  .welcome-row { align-items: start; padding-top: 38px; }
  .welcome-row h1 { font-size: 2.35rem; }
  .streak-pill { padding: 9px 12px; font-size: .78rem; }
  .theme-grid { grid-template-columns: repeat(2, 1fr); }
  .theme-card { min-height: 130px; padding: 17px; }
  .theme-card .symbol { margin-bottom: 14px; }
  .quick-card { grid-template-columns: 1fr; }
  .quick-visual { min-height: 240px; }
  .quick-content { padding: 12px 25px 30px; }
  .exercise-list { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .badge-row { grid-template-columns: repeat(2, 1fr); }
  .page-heading { padding-top: 38px; }
  .sheet { width: calc(100% - 12px); right: 6px; bottom: 6px; padding: 25px 20px; }
}

@media (max-width: 460px) {
  .week-progress-card { grid-template-columns: 1fr; }
  .progress-ring { width: 88px; height: 88px; }
  .segmented.compact { margin-left: 0; grid-template-columns: 1fr 1fr; }
  .setting-heading { align-items: start; flex-direction: column; }
  .range-row { grid-template-columns: 1fr; }
  .offline-controls { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
