:root {
  color-scheme: light;
  --canvas: #edf1f6;
  --surface: #ffffff;
  --ink: #172b42;
  --muted: #52647a;
  --line: #dce4ec;
  --orbit: #122e46;
  --primary: #205c58;
  --mint: #9ce3cf;
  --gold: #f0ca83;
  --soft-blue: #eaf1fa;
  --soft-mint: #e6f4f0;
  --soft-gold: #fbf1dc;
  --danger: #933c39;
  --soft-danger: #f9eeed;
  --control-radius: .75rem;
  --panel-radius: 1rem;
  --section-gap: 1rem;
  --page-max: 90rem;
  --display: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --numeric: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --scroll-thumb: #8397a9;
  --scroll-track: #e7edf3;
  --scroll-hover: #5a7389;
  --scroll-active: #455e74;
  background: var(--canvas);
  color: var(--ink);
  font: 15px/1.55 var(--body);
}
*, *::before, *::after { box-sizing: border-box; }
* { scrollbar-width: auto; scrollbar-color: var(--scroll-thumb) var(--scroll-track); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--scroll-track); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border: 2px solid var(--scroll-track); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-hover); }
::-webkit-scrollbar-thumb:active { background: var(--scroll-active); }
@media (forced-colors: active) { * { scrollbar-color: auto; } }

body { margin: 0; min-width: 300px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; padding: 12px 16px calc(86px + env(safe-area-inset-bottom)); font-size: .8rem; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-underline-offset: 4px; }
.site-footer a:hover, .site-footer a:active { color: var(--primary); }
.policy-page { max-width: 780px; margin: 24px auto; padding: clamp(20px, 5vw, 40px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--panel-radius); }
.policy-page h1 { margin: 16px 0; font-size: 1.8rem; }
.policy-page h2 { margin: 24px 0 8px; font-size: 1.2rem; }
.policy-page p { margin: 10px 0; line-height: 1.9; color: var(--ink); }
.policy-page a { color: var(--primary); overflow-wrap: anywhere; text-underline-offset: 4px; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
button[aria-busy="true"] { cursor: wait; }
:focus-visible { outline: 3px solid #347c86; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--display); }
p { color: var(--muted); }
button svg, a svg { flex: none; }
.number { font-family: var(--numeric); font-variant-numeric: tabular-nums; }
.eyebrow { display: block; font-size: .75rem; font-weight: 750; letter-spacing: .09em; color: var(--muted); }
.loading { min-height: 80svh; display: grid; align-content: center; justify-items: center; gap: 16px; padding: 24px; text-align: center; }
.loading::before { content: ""; width: 28px; height: 28px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
.loading:has(button)::before { animation: none; border-color: var(--danger); }
@keyframes spin { to { transform: rotate(1turn); } }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand img { display: block; flex: none; }
.brand strong, .brand span { display: block; }
.brand strong { font-family: var(--display); font-size: 1.17rem; font-weight: 800; letter-spacing: .045em; line-height: 1.25; white-space: nowrap; }
.brand span { margin-top: 3px; color: var(--muted); font-family: var(--numeric); font-size: .62rem; font-weight: 750; letter-spacing: .12em; white-space: nowrap; }

.welcome { display: grid; grid-template-columns: 1.17fr 1fr; width: min(1100px, calc(100% - 48px)); min-height: 632px; margin: max(24px, calc((100svh - 666px) / 2)) auto 24px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: 0 22px 65px #122e4614; }
.welcome-art { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: clamp(26px, 4vw, 46px); overflow: hidden; background-color: var(--orbit); background-image: linear-gradient(#aecfe010 1px, transparent 1px), linear-gradient(90deg, #aecfe010 1px, transparent 1px); background-size: 32px 32px; color: white; }
.welcome-art .brand img { border: 1px solid #86b9bc64; border-radius: 12px; }
.welcome-art .brand span { color: #a8c4d6; }
.welcome-copy { margin-bottom: 160px; }
.welcome-copy h1 { margin: 13px 0 15px; font-size: clamp(34px, 4.1vw, 58px); font-weight: 780; line-height: 1.14; letter-spacing: -.048em; }
.welcome-copy .eyebrow { color: var(--mint); letter-spacing: .06em; }
.orbit-art { position: absolute; width: min(95%, 520px); right: -58px; bottom: 16px; color: var(--mint); z-index: -1; opacity: .76; }
.orbit-gold { fill: var(--gold); }
.welcome-login { display: grid; place-items: center; padding: 38px 32px; }
.login-body { width: min(100%, 345px); }
.login-mark { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; color: var(--primary); background: var(--soft-mint); }
.login-body h2 { margin: 13px 0 16px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
.login-options { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; margin-top: 8px; }
.login-options .text { padding-inline: 0; }
.email-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.email-row .button { min-width: 108px; min-height: 44px; margin-top: calc(.86rem * 1.5 + 4px); }
.email-status { margin-block: 0; }
.email-status:empty { display: none; }
.item-row.observed-child { display: block; }
.observed-records { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.observed-records li { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.observed-records li span { min-width: 0; overflow-wrap: anywhere; }
.observed-records time { flex: none; color: var(--muted); font-size: .85rem; }
.login-body .button.full { margin-top: 3px; }

.shell { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100dvh; padding: 25px 14px 15px; border-right: 1px solid var(--line); background: var(--surface); }
.sidebar .brand { padding: 0 9px; }
.nav-label { margin: 36px 10px 9px; color: var(--muted); font-size: .75rem; font-weight: 750; letter-spacing: .08em; }
.sidebar nav { display: grid; gap: 5px; }
.nav-button { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 9px 11px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; font-size: .92rem; font-weight: 680; }
.nav-button:hover { color: var(--ink); background: var(--soft-blue); }
.nav-button:active { background: #dde9f2; }
.nav-button.active { border-color: #d4e6e2; background: var(--soft-mint); color: var(--primary); font-weight: 800; }
.nav-button.active::before { position: absolute; inset: 11px auto 11px -1px; width: 3px; border-radius: 2px; background: var(--primary); content: ""; }
.nav-button small { margin-left: auto; padding: 0 6px; border-radius: 10px; background: var(--soft-gold); color: #674713; }
.sidebar-footer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-top: auto; padding: 13px 2px 1px; border-top: 1px solid var(--line); }
.sidebar-footer strong, .sidebar-footer small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer strong { font-size: .88rem; }
.sidebar-footer small { color: var(--muted); font-size: .74rem; }
.avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 11px; color: var(--primary); background: var(--soft-mint); font-size: .95rem; font-weight: 800; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; }
.icon-button:hover, .icon-button:active { background: var(--soft-blue); color: var(--ink); }
.mobile-brand { display: none; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 10; padding: 10px 15px; border-radius: 8px; background: var(--surface); color: var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 62px; max-width: var(--page-max); margin: auto; padding: 0 clamp(16px, 2.2vw, 32px); }
.breadcrumb { font-size: .81rem; color: var(--muted); font-weight: 650; }
.breadcrumb span { margin: 0 8px; color: #6d7e91; }
.date-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: .8rem; font-weight: 690; white-space: nowrap; }
.main-content { display: grid; align-content: start; gap: var(--section-gap); max-width: var(--page-max); margin: auto; padding: 1px clamp(16px, 2.2vw, 32px) 40px; scroll-margin: 12px; }
.main-content:focus:not(:focus-visible) { outline: none; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 1px 0 3px; }
.section-head > div { min-width: 0; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.section-head h1 { font-size: clamp(27px, 3.2vw, 39px); font-weight: 800; line-height: 1.14; letter-spacing: -.043em; }
.section-head p { margin-top: 5px; font-size: .92rem; }

.metrics, .today-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.today-summary { grid-template-columns: minmax(0, 1.45fr) repeat(2, minmax(0, 1fr)); }
.metric { display: grid; align-content: center; gap: 5px; min-width: 0; min-height: 115px; padding: 13px 18px; border: 1px solid var(--line); border-radius: var(--panel-radius); background: var(--surface); }
.metric-label { display: flex; align-items: center; gap: 7px; font-size: .87rem; font-weight: 750; }
.metric-label svg { color: var(--primary); }
.metric.blue .metric-label svg { color: #365886; }
.metric.gold .metric-label svg { color: #755115; }
.metric-value { font-size: clamp(20px, 3vw, 32px); font-weight: 780; line-height: 1.15; letter-spacing: -.04em; overflow-wrap: anywhere; }
.metric-value small { margin-left: 5px; color: var(--muted); font: 700 .73rem var(--body); }
.metric p { font-size: .77rem; }
.today-orbit { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; min-height: 115px; padding: 10px 18px; border-radius: var(--panel-radius); background-color: var(--orbit); background-image: linear-gradient(#aecfe00d 1px, transparent 1px), linear-gradient(90deg, #aecfe00d 1px, transparent 1px); background-size: 20px 20px; color: white; }
.orbit-label { display: flex; align-items: center; gap: 6px; color: var(--mint); font-size: .83rem; font-weight: 750; }
.orbit-fraction { margin: 2px 0 0; color: white; font-size: clamp(24px, 3.2vw, 35px); font-weight: 760; letter-spacing: -.075em; line-height: 1.24; }
.orbit-fraction span { color: #cfe2ed; font-size: .49em; font-weight: 550; letter-spacing: 0; }
.orbit-note { color: #c6dbe6; font-size: .73rem; }
.orbit-meter { position: relative; display: grid; place-items: center; width: 90px; aspect-ratio: 1; }
.orbit-meter svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; }
.orbit-ticks { stroke: #8fb2c0; stroke-dasharray: 1 5; }
.orbit-track { stroke: #456478; stroke-width: 7; }
.orbit-value { stroke: var(--mint); stroke-width: 7; stroke-linecap: round; }
.orbit-meter span { font-size: 1.2rem; font-weight: 750; }
.orbit-meter small { margin-left: 1px; font-size: .64em; }

.content-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(246px, 1fr); align-items: start; gap: var(--section-gap); }
.parent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; border: 1px solid var(--line); border-radius: var(--panel-radius); background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 13px 16px 10px; }
.panel-heading h2 { font-size: 1.16rem; font-weight: 790; letter-spacing: -.025em; }
.panel-heading p { margin-top: 1px; font-size: .78rem; }
.recovery-panel .panel-heading p { overflow-wrap: anywhere; }
.items { padding: 0 16px 5px; }
.item-row { display: flex; align-items: center; gap: 10px; min-height: 61px; padding: 8px 0; border-top: 1px solid var(--line); }
.item-main { flex: 1; min-width: 0; }
.item-main h3 { color: var(--ink); font-size: .96rem; font-weight: 770; line-height: 1.4; }
.item-main p { margin-top: 3px; font-size: .79rem; white-space: pre-line; }
.task-row { min-height: 63px; }
.task-row .item-main h3 { font-size: 1.01rem; }
.task-row .task-note { margin-top: 2px; }
.task-icon, .empty-icon, .companion-icon { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 10px; color: #425c75; background: var(--soft-blue); }
.tone-0 { color: #345583; background: #eaf0fc; }
.tone-1 { color: #724b17; background: var(--soft-gold); }
.tone-2 { color: var(--primary); background: var(--soft-mint); }
.tone-3 { color: #664d7d; background: #f1ebf7; }
.task-details { display: flex; flex-wrap: wrap; align-items: center; gap: 1px 9px; margin-top: 2px; color: var(--muted); font-size: .77rem; }
.task-category { font-weight: 650; }
.task-details .deadline, .open-link { display: inline-flex; align-items: center; gap: 3px; }
.task-details .deadline { color: #795517; font-weight: 740; white-space: nowrap; }
.open-link { min-height: 25px; color: var(--primary); font-weight: 740; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.open-link:hover, .open-link:active { color: var(--ink); }
.task-status { display: flex; justify-content: flex-end; flex: none; min-width: 86px; }
.points { flex: none; color: var(--primary); font: 750 .9rem var(--numeric); white-space: nowrap; }
.points small { font: 700 .76rem var(--body); }
.done-label { display: flex; align-items: center; gap: 4px; color: var(--primary); font-size: .77rem; font-weight: 780; white-space: nowrap; }
.completed .points { color: var(--muted); }
.task-filters { display: flex; flex-wrap: wrap; gap: 5px; padding: 0 16px 9px; }
.filter { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; padding: 5px 9px; border: 1px solid transparent; border-radius: 8px; color: var(--muted); background: transparent; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.filter span { font: 720 .74rem var(--numeric); }
.filter:hover, .filter:active { background: var(--soft-blue); color: var(--ink); }
.filter[aria-pressed="true"] { border-color: #d6e4ed; background: #eaf1f8; color: #264761; }
.badge { display: inline-flex; align-items: center; flex: none; padding: 4px 8px; border-radius: 999px; background: var(--soft-blue); color: #3f5670; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.badge.approved { background: var(--soft-mint); color: var(--primary); }
.badge.pending, .badge.expired { background: var(--soft-gold); color: #765015; }
.badge.rejected { background: var(--soft-danger); color: var(--danger); }
.badge.current-title { flex: 0 1 auto; gap: 5px; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.current-title svg { flex: none; }
.current-title span { min-width: 0; }
.empty { display: flex; align-items: flex-start; gap: 10px; padding: 17px 0 19px; border-top: 1px solid var(--line); }
.empty h3 { font-size: .94rem; }
.empty p { margin-top: 3px; font-size: .82rem; }
.companion-icon.gold { color: #755115; background: var(--soft-gold); }
.companion-body { display: grid; gap: 4px; padding: 0 16px 12px; font-size: .82rem; }
.companion-body h3 { font-size: 1rem; line-height: 1.4; }
.companion-body > .button { justify-self: start; padding-inline: 0; }
.reward-numbers { margin-top: 3px; }
.reward-numbers strong { color: var(--primary); }
.activity .item-row { min-height: 52px; }
.activity .task-icon { width: 30px; height: 30px; border-radius: 8px; }
.activity .task-icon svg { width: 16px; }
.activity .item-main h3 { font-size: .87rem; }
.activity .item-main p, .activity .points { font-size: .75rem; }
.row-actions { display: flex; justify-content: flex-end; flex: none; gap: 3px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; padding: 8px 0 4px; border-top: 1px solid var(--line); }
.pagination > span { margin-right: auto; color: var(--muted); font-size: .78rem; }

.button { position: relative; display: inline-flex; flex: none; align-items: center; justify-content: center; gap: 6px; min-height: 41px; padding: 7px 12px; border: 1px solid transparent; border-radius: var(--control-radius); background: transparent; color: var(--ink); font-size: .86rem; font-weight: 750; white-space: nowrap; transition: background-color 130ms, color 130ms, border-color 130ms; }
.button.primary { background: var(--primary); color: white; }
.button.primary:hover, .button.primary:active { background: #184b48; }
.button.full { justify-content: space-between; width: 100%; min-height: 46px; padding-inline: 13px; }
.button.secondary { border-color: var(--line); background: var(--surface); }
.button.secondary:hover, .button.secondary:active { border-color: #bbcddc; background: var(--soft-blue); }
.button.checkin { min-width: 82px; min-height: 44px; border-color: #c8e5db; background: var(--soft-mint); color: var(--primary); }
.button.checkin:hover, .button.checkin:active { background: #d3eee5; }
.button.text { color: var(--primary); }
.button.text:hover, .button.text:active, .button.danger-text:hover, .button.danger-text:active { text-decoration: underline; text-underline-offset: 3px; }
.button.danger { background: var(--danger); color: white; }
.button.danger:hover, .button.danger:active { background: #7d312e; }
.button.danger-text { margin-right: auto; padding-inline: 3px; color: var(--danger); }
.button[aria-busy="true"] { color: transparent; }
.button[aria-busy="true"]::after { position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-bottom-color: transparent; border-radius: 50%; color: var(--primary); animation: spin .65s linear infinite; content: ""; }
.button.primary[aria-busy="true"]::after, .button.danger[aria-busy="true"]::after { color: white; }
.form { display: grid; gap: 12px; }
.form label, .field { display: grid; min-width: 0; gap: 4px; color: var(--ink); font-size: .86rem; font-weight: 690; }
.form input:not([type="checkbox"]), .form select, .form textarea { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #cbd6e1; border-radius: 9px; background: #fbfcfe; color: var(--ink); font-size: 16px; font-weight: 450; }
.form .consent { display: flex; align-items: flex-start; gap: 9px; padding-block: 6px; cursor: pointer; }
.consent input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--primary); }
.form textarea { resize: none; min-height: 70px; field-sizing: content; max-height: 190px; }
.form input::placeholder { color: #5c6e83; font-size: .82rem; }
.form [aria-invalid="true"] { border-color: var(--danger); }
.form input:disabled, .form select:disabled { opacity: .7; }
.secret { position: relative; }
.secret input { padding-right: 49px; }
.secret .icon-button { position: absolute; inset: 1px 1px 1px auto; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field-help { font-size: .79rem; }
.form-error, .field-error { color: var(--danger); font-size: .8rem; }
.form-error { padding: 8px 10px; border-radius: 8px; background: var(--soft-danger); }
.dialog-confirmation { display: grid; gap: 12px; padding: 16px; }
.dialog-confirmation .dialog-actions { margin: 0; padding-inline: 0; }
.form[hidden], .dialog-confirmation[hidden], .button[hidden] { display: none; }
dialog { width: min(560px, calc(100% - 22px)); max-height: min(89dvh, 800px); padding: 0; border: 1px solid var(--line); border-radius: var(--panel-radius); background: var(--surface); color: var(--ink); box-shadow: 0 25px 90px #122e464a; scrollbar-gutter: stable; }
dialog::backdrop { background: #142b41a8; }
.dialog-head { position: sticky; z-index: 1; top: 0; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 13px 16px 10px; border-bottom: 1px solid var(--line); background: var(--surface); }
.dialog-head h2 { font-size: 1.22rem; }
.dialog-head p { font-size: .82rem; }
.dialog-form { padding: 13px 16px 0; }
.dialog-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; margin: 0 -16px; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--surface); }
.toast { position: fixed; z-index: 6; right: 20px; bottom: 20px; max-width: calc(100% - 40px); padding: 11px 15px; border-radius: 10px; background: var(--orbit); color: white; box-shadow: 0 8px 30px #122e4645; font-size: .9rem; font-weight: 700; }
.toast.error { background: var(--danger); }

@media (max-width: 1100px) {
  .shell { grid-template-columns: 184px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .content-grid { grid-template-columns: minmax(0, 1.9fr) minmax(218px, 1fr); }
  .parent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .content-grid, .parent-grid { grid-template-columns: minmax(0, 1fr); }
  .welcome-art { padding: 26px; }
  .orbit-art { right: -35px; }
  .metric { padding-inline: 12px; }
  .today-orbit { padding-inline: 12px; }
  .orbit-meter { width: 70px; }
}
@media (max-width: 680px) {
  .welcome { grid-template-columns: 1fr; width: calc(100% - 22px); min-height: 0; margin: 11px auto; border-radius: 18px; }
  .welcome-art { min-height: 238px; justify-content: flex-start; gap: 19px; padding: 17px; }
  .welcome-copy { margin: 0; }
  .welcome-copy h1 { margin-block: 5px 8px; font-size: clamp(24px, 7.1vw, 38px); }
  .orbit-art { width: 58%; bottom: -4px; right: -21px; opacity: .59; }
  .welcome-login { padding: 23px 17px 24px; }
  .login-mark { width: 36px; height: 36px; }
  .login-body h2 { margin-block: 8px 12px; }
  .shell { display: block; }
  .sidebar { display: contents; }
  .sidebar > .brand, .nav-label, .sidebar-footer > .avatar, .sidebar-footer > div:nth-child(2), .breadcrumb { display: none; }
  .sidebar nav { position: fixed; z-index: 3; inset: auto 0 0; display: flex; gap: 3px; padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
  .nav-button { flex: 1; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; min-height: 49px; padding: 4px 2px; text-align: center; font-size: .69rem; }
  .nav-button.active::before { display: none; }
  .nav-button small { position: absolute; top: 0; right: 4px; padding: 0 4px; font-size: .62rem; }
  .sidebar-footer { position: absolute; top: 7px; right: 8px; display: block; padding: 0; border: 0; }
  .mobile-brand { display: block; }
  .mobile-brand img { width: 34px; height: 34px; }
  .mobile-brand .brand strong { font-size: .98rem; }
  .mobile-brand .brand span { font-size: .55rem; }
  .topbar { min-height: 55px; padding: 0 51px 0 12px; }
  .date-pill { padding: 4px 6px; font-size: .71rem; }
  .date-pill svg { width: 13px; }
  .main-content { gap: 12px; padding: 3px 11px calc(77px + env(safe-area-inset-bottom)); }
  .section-head { align-items: flex-start; gap: 8px; }
  .section-head h1 { font-size: 1.7rem; }
  .section-head p { margin-top: 3px; font-size: .8rem; }
  .metrics, .today-summary { gap: 6px; }
  .today-summary { grid-template-columns: minmax(0, 1.38fr) repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 82px; padding: 6px 7px; border-radius: 11px; gap: 3px; }
  .metric-label { gap: 4px; font-size: .72rem; }
  .metric-label svg { width: 13px; }
  .metric-value { font-size: clamp(15px, 4.7vw, 22px); }
  .metric p { font-size: .66rem; }
  .today-summary .metric p { display: none; }
  .today-orbit { min-height: 82px; padding: 6px 7px; border-radius: 11px; gap: 3px; }
  .orbit-meter { width: clamp(34px, 10vw, 58px); }
  .orbit-meter span { font-size: .68rem; }
  .orbit-label { gap: 3px; font-size: .71rem; }
  .orbit-label svg { width: 12px; }
  .orbit-fraction { font-size: 1.28rem; }
  .orbit-fraction span { font-size: .56em; }
  .orbit-note { display: none; }
  .panel { border-radius: 12px; }
  .panel-heading { min-height: 49px; padding: 9px 10px 7px; }
  .panel-heading h2 { font-size: 1.03rem; }
  .items { padding-inline: 10px; }
  .task-filters { gap: 1px; padding: 0 6px 6px; }
  .filter { min-height: 37px; padding-inline: 5px; font-size: .75rem; }
  .filter span { font-size: .66rem; }
  .item-row { min-height: 56px; gap: 6px; }
  .task-row { min-height: 60px; }
  .task-icon, .avatar { width: 31px; height: 31px; border-radius: 8px; }
  .task-icon svg { width: 16px; }
  .item-main h3, .task-row .item-main h3 { font-size: .88rem; }
  .item-main p, .task-details { font-size: .72rem; }
  .task-details { gap: 1px 5px; }
  .points { font-size: .77rem; }
  .points small { font-size: .68rem; }
  .task-status { min-width: 64px; }
  .done-label { font-size: .67rem; }
  .done-label svg { display: none; }
  .button { min-height: 38px; padding-inline: 8px; font-size: .76rem; }
  .button.checkin { min-width: 61px; min-height: 44px; }
  .button.checkin svg { width: 13px; }
  .badge { font-size: .68rem; }
  .child-row .row-actions { flex-direction: column; align-items: stretch; }
  .child-row .row-actions .button { min-height: 34px; }
  .toast { right: 11px; bottom: calc(68px + env(safe-area-inset-bottom)); }
}
@media (max-width: 360px) {
  .orbit-meter { display: none; }
  .today-orbit { grid-template-columns: 1fr; }
  .date-pill svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms; animation-iteration-count: 1; transition-duration: .01ms; }
}
