/* Thinh Gymer · brand v6 (12-11-2026): paper #F2F2F2, charcoal #2F2F2F, blue #3458F7, yellow #F6D050 (one accent per screen). Barlow 400–700. */
@font-face{font-family:Barlow;font-weight:400;font-display:swap;src:url(/fonts/barlow-vietnamese-400-normal.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:Barlow;font-weight:400;font-display:swap;src:url(/fonts/barlow-latin-400-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Barlow;font-weight:500;font-display:swap;src:url(/fonts/barlow-vietnamese-500-normal.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:Barlow;font-weight:500;font-display:swap;src:url(/fonts/barlow-latin-500-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Barlow;font-weight:600;font-display:swap;src:url(/fonts/barlow-vietnamese-600-normal.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:Barlow;font-weight:600;font-display:swap;src:url(/fonts/barlow-latin-600-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:Barlow;font-weight:700;font-display:swap;src:url(/fonts/barlow-vietnamese-700-normal.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}
@font-face{font-family:Barlow;font-weight:700;font-display:swap;src:url(/fonts/barlow-latin-700-normal.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  --paper: #F2F2F2; --card: #FFFFFF; --ink: #2F2F2F; --ink-2: #474747; --muted: #666666; --faint: #9A9A9A;
  --line: #E4E4E4; --line-2: #EDEDED; --field: #F5F6FA;
  --blue: #3458F7; --blue-600: #2643D9; --blue-50: #EEF1FE; --blue-100: #DCE3FE;
  --yellow: #F6D050; --yellow-50: #FDF6DA;
  --ok: #12804C; --ok-50: #E3F3EA; --warn: #9A5300; --warn-50: #FCF0DE; --bad: #BF3526; --bad-50: #FBE8E6;
  --mp: #3458F7; --mc: #2F2F2F; --mf: #9AA1B4;
  --r-xl: 24px; --r: 20px; --r-sm: 14px; --r-xs: 11px;
  --sh: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px -14px rgba(20,20,20,.14);
  --sh-lift: 0 2px 4px rgba(20,20,20,.05), 0 18px 40px -18px rgba(20,20,20,.28);
  --ease: cubic-bezier(.2,.8,.2,1);
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.45 Barlow, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.005em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--blue-100); }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.center { text-align: center; }
.muted { color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; }
.row > .btn { flex: 1 1 0; min-width: 0; white-space: normal; text-align: center; line-height: 1.15; padding-top: 6px; padding-bottom: 6px; }
.row.wrap { flex-wrap: wrap; }
.row.wrap > .btn { flex: none; white-space: nowrap; }

/* ---------- layout ---------- */
.view { max-width: 560px; margin: 0 auto; padding: max(14px, env(safe-area-inset-top)) 18px calc(var(--nav-h) + 48px + var(--safe-b)); min-height: 100vh; }
.view.enter { animation: enter .32s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }
.view > * + * { margin-top: 14px; }

/* page header */
.ph { display: flex; align-items: flex-end; gap: 12px; padding: 18px 2px 6px; }
.ph-t { flex: 1; min-width: 0; }
.ph-t small { display: block; font-size: 15px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.ph h1 { font-size: 32px; line-height: 1.08; }
.ph-sub { align-items: center; padding-top: 6px; }
.ph-sub h1 { font-size: 26px; }
.ph-back { margin-left: -8px; }
.ph-home h1 { font-size: 30px; }
.week-badge { display: grid; place-items: center; min-width: 64px; padding: 8px 10px; border-radius: 18px; background: var(--yellow); color: var(--ink); line-height: 1; text-align: center; }
.week-badge small { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.week-badge b { font-size: 28px; margin: 2px 0; }

/* ---------- cards ---------- */
.card { background: var(--card); border-radius: var(--r); padding: 18px; box-shadow: var(--sh); border: 1px solid rgba(47,47,47,.04); position: relative; }
.card-k { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.card-k .ic { color: var(--blue); width: 17px; height: 17px; }
.card-go { margin-left: auto; color: var(--faint); display: flex; }
.card-h { font-size: 19px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card-h small { font-size: 13px; font-weight: 500; color: var(--muted); }
[data-href], [data-act].card { cursor: pointer; transition: transform .16s var(--ease), box-shadow .16s var(--ease); }
[data-href]:active, [data-act].card:active { transform: scale(.985); }
@media (hover: hover) { [data-href]:hover, [data-act].card:hover { box-shadow: var(--sh-lift); } }
.card-note { display: flex; gap: 12px; background: transparent; box-shadow: none; border: 1px dashed var(--line); padding: 14px 16px; }
.card-note .ic { color: var(--blue); margin-top: 2px; }
.card-note p { font-size: 15px; color: var(--ink-2); }
.card-center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 18px; }

.num-xl { font-size: 48px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.num-lg { font-size: 32px; font-weight: 700; line-height: 1.05; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.num-xl u, .num-lg u { text-decoration: none; font-size: .42em; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.num-lg.muted { color: var(--faint); font-size: 26px; }
.meta { font-size: 15px; color: var(--muted); margin-top: 4px; }
.meta.strong { color: var(--ink-2); font-weight: 600; }
.meta.warn { color: var(--warn); font-weight: 600; }
.meta .ic { width: 15px; height: 15px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 10px; display: flex; gap: 6px; align-items: flex-start; }
.fine .ic { width: 15px; height: 15px; margin-top: 2px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .02em; padding: 3px 8px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); text-transform: none; white-space: nowrap; }
.tag-now { background: var(--yellow); color: var(--ink); }
.tag-warn { background: var(--warn-50); color: var(--warn); }
.tag-deload { background: var(--blue-50); color: var(--blue); }
.tag-time { padding: 6px 12px; font-size: 13px; }
.tag-time .ic { width: 14px; height: 14px; }

/* ---------- dashboard ---------- */
.dash { display: grid; gap: 12px; }
.dash-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 369px) { .dash-2 { grid-template-columns: 1fr; } }
.card-hero { padding: 20px; border-radius: var(--r-xl); }
.hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.hero-spark { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.spark { width: 120px; height: 40px; }
.spark polyline { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.delta { font-size: 15px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.delta small { font-weight: 500; color: var(--muted); }
.hero-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 15px; color: var(--muted); }
.hero-foot b { color: var(--ink); }
.card-tile { display: flex; flex-direction: column; min-height: 168px; padding: 16px; }
.card-tile .card-k { font-size: 12px; margin-bottom: 8px; }
.tile-empty { color: var(--muted); font-size: 15px; }
.pcf { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 10px; font-size: 14px; color: var(--muted); }
.pcf span { display: inline-flex; align-items: center; gap: 4px; }
.pcf b { color: var(--ink); }
.dot-p, .dot-c, .dot-f { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.dot-p { background: var(--mp); } .dot-c { background: var(--mc); } .dot-f { background: var(--mf); }
.goal-row { display: flex; align-items: center; gap: 10px; }
.goal-left { display: grid; line-height: 1.05; }
.goal-left b { font-size: 24px; font-variant-numeric: tabular-nums; } .goal-left small { font-size: 13px; color: var(--muted); }
.goal-path { display: flex; align-items: center; gap: 3px; margin-top: 10px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.goal-path b { color: var(--ink); } .goal-path .ic { width: 12px; height: 12px; color: var(--faint); }
.goal-dl { margin: 0; display: grid; gap: 2px; font-size: 13px; }
.goal-dl div { display: flex; justify-content: space-between; gap: 8px; }
.goal-dl dt { color: var(--muted); } .goal-dl dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.goal-dl-lg { width: 100%; max-width: 320px; font-size: 16px; gap: 6px; }
.goal-nd { display: flex; align-items: center; gap: 10px; }
.goal-nd p { font-weight: 600; font-size: 15px; } .goal-nd small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.goal-m { display: grid; gap: 6px; }
.ring { position: relative; flex: none; }
.ring svg { width: 100%; height: 100%; }
.ring-track { fill: none; stroke: var(--line-2); }
.ring-val { fill: none; stroke: var(--blue); stroke-linecap: round; transition: stroke-dashoffset .8s var(--ease); }
.ring-in { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.ring-in b { font-size: 22px; font-variant-numeric: tabular-nums; }
.card-center .ring-in b { font-size: 36px; }
.ring-in small { font-size: 12px; color: var(--muted); margin-top: 4px; }
.bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: var(--blue); border-radius: inherit; transition: width .6s var(--ease); }

/* ---------- banners, chips ---------- */
.banner { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 16px; border-radius: var(--r-sm); font-size: 15px; line-height: 1.4; }
.banner > .ic:first-child { width: 22px; height: 22px; }
.banner span { flex: 1; }
.banner-blue { background: var(--blue-50); color: #1F2F86; }
.banner-blue > .ic { color: var(--blue); }
.banner-warn { background: var(--warn-50); color: #5F3600; }
.banner-warn > .ic { color: var(--warn); }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px 5px 8px; border-radius: 999px; font-size: 14px; font-weight: 600; line-height: 1.1; white-space: nowrap; width: fit-content; }
.chip .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.chip-ok { background: var(--ok-50); color: var(--ok); }
.chip-warn { background: var(--warn-50); color: var(--warn); }
.chip-bad { background: var(--bad-50); color: var(--bad); }
.chip-blue { background: var(--blue-50); color: var(--blue); }
.chip-muted { background: var(--line-2); color: var(--ink-2); }
.chip-lg { font-size: 17px; padding: 8px 14px; }
.planbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 12px 14px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--blue); color: #fff; font-size: 15px; }
.planbar b { display: block; }
.planbar span { flex: 1; }
.planbar .icon-btn { color: #fff; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r-sm); font-weight: 700; font-size: 16px; letter-spacing: .005em; transition: transform .12s var(--ease), background .15s, box-shadow .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn .ic { width: 18px; height: 18px; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -10px rgba(52,88,247,.7); }
.btn-primary:hover { background: var(--blue-600); }
.btn-soft { background: var(--blue-50); color: var(--blue); }
.btn-ghost { background: transparent; color: var(--ink-2); border: 1.5px solid var(--line); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn-lg { min-height: 56px; font-size: 18px; border-radius: 16px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: var(--ink); flex: none; }
.icon-btn:hover { background: rgba(47,47,47,.06); }
.icon-btn:disabled { opacity: .3; }
.icon-btn .ic { width: 22px; height: 22px; }
.link-btn { display: inline-flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 600; font-size: 15px; min-height: 40px; }
.link-btn.sm { font-size: 14px; color: var(--muted); min-height: 36px; }
.link-btn .ic { width: 16px; height: 16px; }

.seg { display: flex; gap: 4px; padding: 4px; background: var(--paper); border-radius: var(--r-sm); }
.seg > button, .seg > label { flex: 1; min-height: 44px; border-radius: var(--r-xs); font-weight: 600; font-size: 15px; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 0 6px; transition: background .15s, color .15s, box-shadow .15s; }
.seg > .on { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 2px 8px -2px rgba(0,0,0,.08); }
.seg > button:disabled { opacity: .4; }
.seg-sm > button { min-height: 38px; font-size: 14px; }
.seg-dates .seg-date { position: relative; cursor: pointer; }
.seg-date input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.seg-date .ic { width: 16px; height: 16px; }
.seg-tabs { margin-bottom: 14px; }
.seg-status > button { font-size: 14px; padding: 0 2px; }
.seg-status > .on-on { background: var(--ok); color: #fff; }
.seg-status > .on-near { background: var(--warn); color: #fff; }
.seg-status > .on-off, .seg-status > .on-skip { background: var(--bad); color: #fff; }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.field small { font-weight: 400; color: var(--muted); }
input[type=text], input:not([type]), input[inputmode], input[type=date], select, textarea { width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--card); font-size: 17px; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.4; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-50); }
input.invalid, input[aria-invalid=true] { border-color: var(--bad) !important; background: var(--bad-50) !important; }
.input-unit { display: flex; align-items: center; position: relative; }
.input-unit em { position: absolute; right: 14px; font-style: normal; color: var(--muted); font-weight: 600; pointer-events: none; }
.input-unit input { padding-right: 56px; }
.big-field { display: grid; gap: 4px; }
.big-label { font-size: 15px; font-weight: 600; color: var(--muted); }
.big-input { display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--line); padding-bottom: 4px; transition: border-color .15s; }
.big-input:focus-within { border-color: var(--blue); }
.big-input input { border: 0; padding: 0; min-height: 0; font-size: 52px; font-weight: 700; letter-spacing: -.02em; background: transparent; box-shadow: none !important; font-variant-numeric: tabular-nums; }
.big-input input::placeholder { color: #CFCFCF; }
.big-input em { font-style: normal; font-size: 22px; font-weight: 600; color: var(--muted); }
.help { font-size: 15px; color: var(--muted); }
.field-err { display: flex; gap: 8px; align-items: flex-start; color: var(--bad); font-weight: 600; font-size: 15px; }
.field-err .ic { margin-top: 2px; }
.q { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.q legend { font-weight: 600; font-size: 16px; padding: 0; margin-bottom: 8px; color: var(--ink-2); }
.q legend small { font-weight: 400; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scale5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale5 button { display: grid; gap: 2px; place-items: center; min-height: 68px; border-radius: var(--r-sm); background: var(--paper); transition: background .15s, color .15s, transform .12s; padding: 6px 2px; }
.scale5 button:active { transform: scale(.95); }
.scale5 b { font-size: 22px; } .scale5 small { font-size: 11.5px; line-height: 1.1; color: var(--muted); font-weight: 500; }
.scale5 .fill { background: var(--blue-50); color: var(--blue); }
.scale5 .on { background: var(--blue); color: #fff; }
.scale5 .on small { color: rgba(255,255,255,.85); }
.scale5-sm button { min-height: 60px; }
.toggle { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); cursor: pointer; }
.toggle:first-of-type { border-top: 0; }
.toggle > span { flex: 1; display: grid; }
.toggle small { color: var(--muted); font-size: 14px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle i { width: 50px; height: 30px; border-radius: 99px; background: #D5D5D5; position: relative; transition: background .2s; flex: none; }
.toggle i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s var(--ease); }
.toggle input:checked + i { background: var(--blue); }
.toggle input:checked + i::after { transform: translateX(20px); }
.toggle input:focus-visible + i { outline: 3px solid var(--blue); outline-offset: 2px; }

/* ---------- lists ---------- */
.list { display: grid; }
.li { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--line-2); width: 100%; text-align: left; min-height: 56px; }
.li:first-child { border-top: 0; }
.li-main { flex: 1; min-width: 0; display: grid; }
.li-main b { font-weight: 600; font-size: 16px; }
.li-main small { color: var(--muted); font-size: 14px; }
.li-num { font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.li-num small { font-size: 13px; color: var(--muted); font-weight: 600; }
.li-ic { color: var(--faint); width: 18px; height: 18px; }
details.hist summary, details.guide summary { list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; min-height: 28px; }
details summary::-webkit-details-marker { display: none; }
details.hist[open] summary, details.guide[open] summary { margin-bottom: 8px; }

/* ---------- charts ---------- */
.chart { width: 100%; height: auto; display: block; margin-top: 12px; overflow: visible; }
.c-grid { stroke: var(--line-2); stroke-width: 1; }
.c-lbl { font-size: 11px; fill: var(--muted); font-family: Barlow, sans-serif; font-weight: 500; }
.c-lbl.c-on { fill: var(--ink); font-weight: 700; }
.c-scale { fill: none; stroke: #C8C8C8; stroke-width: 1.2; }
.c-dot { fill: #fff; stroke: #9A9A9A; stroke-width: 1.4; }
.c-trend { fill: none; stroke: var(--blue); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.c-end { fill: var(--blue); stroke: #fff; stroke-width: 2.5; }
.c-band { fill: var(--ok-50); }
.c-bar { fill: #CFD6F7; } .c-hit { fill: var(--blue); } .c-none { fill: none; stroke: #C8C8C8; stroke-dasharray: 2 2; }
.c-goal { stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 4 4; opacity: .5; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lg-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #9A9A9A; background: #fff; }
.lg-line { width: 18px; height: 3px; border-radius: 2px; background: var(--blue); }
.lg-band { width: 14px; height: 10px; background: var(--ok-50); border-radius: 2px; }
.empty-chart { display: grid; place-items: center; gap: 6px; padding: 28px 0; color: var(--muted); text-align: center; }
.mini-chart .label { font-size: 13px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

/* ---------- empty / fatal / skeleton ---------- */
.empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 34px 16px; }
.empty-ic { width: 44px; height: 44px; color: var(--blue); padding: 10px; background: var(--blue-50); border-radius: 16px; box-sizing: content-box; }
.empty h3 { font-size: 20px; } .empty p { color: var(--muted); max-width: 34ch; }
.empty .btn { margin-top: 8px; }
.empty-sm { padding: 18px 8px; } .empty-sm .empty-ic { width: 26px; height: 26px; }
.fatal { min-height: 80vh; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 24px; }
.fatal h1 { font-size: 26px; } .fatal p { color: var(--muted); max-width: 32ch; }
.tag-line { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
body.is-fatal .nav { display: none; }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: .06em; font-size: 20px; }
.logo-ic { width: 40px; height: 40px; color: var(--blue); }
.skel { display: grid; gap: 12px; padding-top: 24px; }
.sk { background: linear-gradient(90deg, #e9e9e9 0%, #f6f6f6 50%, #e9e9e9 100%); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: var(--r); }
.sk-h { height: 64px; width: 70%; } .sk-hero { height: 170px; } .sk-tile { height: 150px; }
.sk-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- bottom nav + FAB ---------- */
.nav { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: calc(10px + var(--safe-b)); width: min(calc(100% - 20px), 520px); height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 0 6px;
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid rgba(47,47,47,.06); border-radius: 26px; box-shadow: 0 12px 34px -14px rgba(20,20,20,.3); }
.nav a { display: grid; justify-items: center; gap: 3px; color: var(--muted); font-size: 11.5px; font-weight: 600; padding: 6px 0; min-height: 52px; align-content: center; position: relative; transition: color .15s; }
.nav a .ic { width: 24px; height: 24px; padding: 3px 12px; box-sizing: content-box; border-radius: 14px; transition: background .2s var(--ease), color .2s; }
.nav a.on { color: var(--blue); }
.nav a.on .ic { background: var(--blue-50); }
.fab { justify-self: center; width: 60px; height: 60px; margin-top: -26px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center;
  box-shadow: 0 0 0 5px var(--paper), 0 12px 24px -8px rgba(52,88,247,.75); transition: transform .25s var(--ease), background .15s; }
.fab svg { width: 28px; height: 28px; transition: transform .28s var(--ease); }
.fab:active { transform: scale(.94); }
body.sheet-open .fab svg { transform: rotate(45deg); }
body.sheet-open .fab { background: var(--ink); }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(18,18,22,.38); opacity: 0; transition: opacity .25s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.scrim.show { opacity: 1; }
.sheet { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px; max-height: 90vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 28px 28px 0 0; padding: 6px 18px calc(22px + var(--safe-b)); transform: translateY(100%); transition: transform .3s var(--ease); box-shadow: 0 -10px 40px -20px rgba(0,0,0,.4); }
.sheet.show { transform: none; }
.grabber { width: 40px; height: 5px; border-radius: 3px; background: #DADADA; margin: 4px auto 6px; }
.sh-head { display: flex; align-items: center; gap: 6px; margin: 0 -8px 12px; position: sticky; top: -6px; background: var(--card); z-index: 2; padding: 4px 0; }
.sh-title { flex: 1; text-align: center; min-width: 0; }
.sh-title h2 { font-size: 20px; } .sh-title small { color: var(--muted); font-size: 14px; }
.sh-spacer { width: 44px; }
.sheet-scroll { display: grid; gap: 14px; }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 6px; }
.tool { display: grid; justify-items: start; gap: 4px; padding: 18px 16px; border-radius: var(--r); background: var(--paper); text-align: left; transition: transform .14s var(--ease), background .15s; min-height: 132px; }
.tool:hover { background: #ECECEC; }
.tool:active { transform: scale(.96); }
.tool-ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: var(--blue); color: #fff; margin-bottom: 8px; }
.tool-ic .ic { width: 24px; height: 24px; }
.tool b { font-size: 19px; } .tool small { color: var(--muted); font-size: 14px; line-height: 1.25; }
.leave-bar { position: sticky; bottom: calc(-22px - var(--safe-b)); margin: 14px -18px calc(-22px - var(--safe-b)); padding: 16px 18px calc(16px + var(--safe-b)); background: var(--ink); color: #fff; display: grid; gap: 10px; animation: enter .2s var(--ease); }
.leave-bar .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); }
.leave-bar .btn-soft { background: #fff; color: var(--ink); }

/* ---------- toast / sync / rest ---------- */
.toast { position: fixed; z-index: 80; left: 50%; top: calc(12px + env(safe-area-inset-top)); transform: translate(-50%, -20px); opacity: 0; transition: transform .25s var(--ease), opacity .2s;
  display: flex; align-items: center; gap: 10px; max-width: min(92vw, 460px); padding: 12px 16px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; box-shadow: var(--sh-lift); }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast .ic { width: 20px; height: 20px; }
.toast-ok .ic { color: #7EE2AE; } .toast-err { background: var(--bad); } .toast-info .ic { color: #A8B8FF; }
.sync { position: fixed; z-index: 45; right: 12px; top: calc(10px + env(safe-area-inset-top)); display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px;
  background: rgba(255,255,255,.95); box-shadow: var(--sh); font-size: 13px; font-weight: 600; color: var(--muted); opacity: 0; transform: translateY(-6px); transition: opacity .2s, transform .2s; pointer-events: none; }
.sync.show { opacity: 1; transform: none; }
.sync .ic { width: 15px; height: 15px; }
.sync-ok { color: var(--ok); } .sync-warn { color: var(--warn); }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--blue); animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rest { position: fixed; z-index: 42; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + 22px + var(--safe-b)); display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 10px; border-radius: 99px; background: var(--ink); color: #fff; box-shadow: var(--sh-lift); animation: enter .25s var(--ease); }
.rest-ring { width: 36px; height: 36px; border-radius: 50%; background: conic-gradient(var(--blue) var(--p), rgba(255,255,255,.15) 0); mask: radial-gradient(circle, transparent 11px, #000 12px); -webkit-mask: radial-gradient(circle, transparent 11px, #000 12px); }
.rest-t { display: grid; line-height: 1; padding-right: 4px; }
.rest-t small { font-size: 11px; opacity: .7; text-transform: uppercase; letter-spacing: .06em; }
.rest-t b { font-size: 22px; font-variant-numeric: tabular-nums; }
.rest .btn-ghost { color: #fff; border-color: rgba(255,255,255,.25); min-height: 36px; padding: 0 12px; }

/* ---------- mealplan ---------- */
.daystrip { display: flex; align-items: center; gap: 2px; margin: 6px -8px 0; }
.daystrip .icon-btn { width: 36px; }
.ds { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 8px 0 6px; border-radius: 16px; min-height: 72px; transition: background .15s; position: relative; }
.ds small { font-size: 12px; font-weight: 600; color: var(--muted); }
.ds b { font-size: 19px; font-variant-numeric: tabular-nums; }
.ds i { height: 16px; display: grid; place-items: center; }
.ds i .ic { width: 14px; height: 14px; stroke-width: 3; }
.ds-on i { color: var(--ok); } .ds-near i { color: var(--warn); } .ds-off i { color: var(--bad); } .ds-incomplete i { color: var(--faint); }
.ds.today::after { content: ''; position: absolute; bottom: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.ds.on { background: var(--ink); color: #fff; }
.ds.on small { color: rgba(255,255,255,.7); }
.ds.on i { color: #fff; }
.ds.on.today::after { background: #fff; }
.macro-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.macro-eaten { text-align: right; display: grid; }
.macro-eaten b { font-size: 24px; font-variant-numeric: tabular-nums; }
.macro-eaten small { font-size: 13px; color: var(--muted); max-width: 12ch; line-height: 1.2; }
.mbars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.mbar-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 600; color: var(--muted); }
.mbar-top b { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.mbar-top b small { font-size: 12px; color: var(--muted); }
.mbar-track { height: 8px; border-radius: 99px; background: var(--line-2); margin-top: 6px; overflow: hidden; }
.mbar-track i { display: block; height: 100%; border-radius: inherit; transition: width .6s var(--ease); }
.mbar.p i { background: var(--mp); } .mbar.c i { background: var(--mc); } .mbar.f i { background: var(--mf); }
.mbar-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.day-card { display: grid; gap: 12px; }
.day-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.day-row .meta { margin: 0; }
.timeline { list-style: none; margin: 18px 0 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 20px; bottom: 20px; width: 2px; background: var(--line); border-radius: 1px; }
.tl { position: relative; padding-left: 32px; }
.tl + .tl { margin-top: 12px; }
.tl-dot { position: absolute; left: 2px; top: 22px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 3px solid var(--faint); }
.tl-on .tl-dot { border-color: var(--ok); background: var(--ok); } .tl-near .tl-dot { border-color: var(--warn); background: var(--warn); }
.tl-off .tl-dot, .tl-skip .tl-dot { border-color: var(--bad); background: var(--bad); }
.tl-now .tl-dot { border-color: var(--ink); background: var(--yellow); box-shadow: 0 0 0 4px rgba(246,208,80,.35); }
.tl-card { padding: 16px; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head h3 { font-size: 19px; flex: 1; min-width: 0; }
.tl-time { font-weight: 700; font-size: 14px; color: var(--blue); background: var(--blue-50); padding: 3px 8px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.tl-macro { font-size: 14px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.items { list-style: none; margin: 12px 0 6px; padding: 0; display: grid; gap: 4px; }
.it { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 8px; margin: 0 -8px; border-radius: 14px; min-height: 60px; transition: background .15s; }
.it:hover, .it:active { background: var(--paper); }
.thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; flex: none; background: var(--paper); }
.thumb-ph { display: grid; place-items: center; color: #BDBDBD; }
.thumb-ph .ic { width: 20px; height: 20px; }
.it-main { flex: 1; min-width: 0; display: grid; }
.it-main b { font-weight: 600; font-size: 16px; }
.it-main small { font-size: 14px; color: var(--muted); }
.it-swap { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; color: var(--blue); background: var(--blue-50); padding: 7px 10px; border-radius: 10px; }
.it-swap .ic { width: 15px; height: 15px; }
.it-go { color: var(--faint); width: 18px; height: 18px; }
.tl-card .seg-status { margin-top: 10px; }
.note { margin-top: 10px; font-size: 15px; min-height: 44px; }
.week-sum .ws-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; margin: 6px 0 4px; }
.ws-grid div { background: var(--paper); border-radius: 14px; padding: 10px 4px; display: grid; }
.ws-grid b { font-size: 26px; line-height: 1.1; }
.ws-grid small { font-size: 12px; color: var(--muted); }
.week-sum .row { margin-top: 10px; }
.hero-img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--r); background: var(--paper); }
.hero-ph { display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--faint); font-size: 14px; }
.hero-ph .ic { width: 30px; height: 30px; }
.dish { font-size: 22px; }
.macro-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.macro-chips span { background: var(--paper); padding: 6px 10px; border-radius: 10px; font-size: 14px; color: var(--muted); }
.macro-chips b { color: var(--ink); }
.times { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.times span { display: inline-flex; gap: 5px; align-items: center; }
.sheet h4, .sub-h { font-size: 16px; margin-top: 4px; }
.steps { padding-left: 20px; margin: 0; display: grid; gap: 8px; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; border: 1.5px solid var(--line); text-align: left; transition: border-color .15s, background .15s; }
.opt.on { border-color: var(--blue); background: var(--blue-50); }
.opt-main { flex: 1; display: grid; gap: 1px; }
.opt-main b { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.opt-main small { font-size: 13.5px; color: var(--muted); }
.delta-line { color: var(--ink-2) !important; font-weight: 600; }
.radio { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.opt.on .radio { background: var(--blue); border-color: var(--blue); color: #fff; }
.radio .ic { width: 14px; height: 14px; stroke-width: 3; }
.preview { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: var(--ink); color: #fff; border-radius: var(--r); padding: 14px; }
.preview div { display: grid; gap: 2px; }
.preview small { font-size: 13px; opacity: .72; }
.preview b { font-size: 22px; font-variant-numeric: tabular-nums; }
.confirm-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.confirm-list li { padding: 12px; border-radius: 16px; background: var(--paper); display: grid; gap: 8px; }
.confirm-list li.missing { box-shadow: inset 0 0 0 1.5px var(--warn); }
.confirm-list .seg { background: var(--card); }
.cl-head { display: flex; align-items: center; gap: 8px; }
.cl-head b { flex: 1; }

/* ---------- workout ---------- */
.plan-card .card-k .ic { color: var(--blue); }
.plan-name { font-size: 22px; }
.plan-prog { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.plan-prog .bar { flex: 1; margin: 0; }
.plan-prog span { font-size: 14px; color: var(--muted); white-space: nowrap; }
.plan-prog b { color: var(--ink); font-size: 17px; }
.weekbar { display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); }
.wb-t { flex: 1; display: grid; text-align: center; line-height: 1.15; }
.wb-t b { font-size: 20px; } .wb-t b small { font-size: 14px; color: var(--muted); }
.wb-t span { font-size: 14px; color: var(--muted); }
.sess-list { display: grid; gap: 10px; }
.sess { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 12px; }
.sess-date { display: grid; place-items: center; width: 52px; height: 60px; border-radius: 14px; background: var(--paper); line-height: 1; flex: none; }
.sess-date small { font-size: 12px; font-weight: 600; color: var(--muted); }
.sess-date b { font-size: 22px; margin-top: 2px; }
.sess-todo .sess-date, .sess-progress .sess-date { background: var(--blue); color: #fff; }
.sess-todo .sess-date small, .sess-progress .sess-date small { color: rgba(255,255,255,.8); }
.sess-done .sess-date { background: var(--ok-50); color: var(--ok); }
.sess-main { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.sess-main h3 { font-size: 19px; }
.sess-main .meta { margin: 0; font-size: 14px; }
.sess-go { color: var(--faint); }
.rest-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; font-size: 14px; color: var(--muted); font-weight: 600; }
.rest-row.today { color: var(--ink); }
.rest-card { display: flex; gap: 14px; align-items: flex-start; }
.rest-ic { width: 40px; height: 40px; padding: 9px; box-sizing: content-box; background: var(--blue-50); color: var(--blue); border-radius: 16px; }
.rest-card h3 { font-size: 19px; }
.rest-card a { color: var(--blue); font-weight: 600; }
.sess-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sess-bar .meta { margin: 0; }
.ex-preview { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ex-preview li { display: flex; gap: 12px; align-items: center; padding: 14px; }
.ex-preview div { display: grid; } .ex-preview small { color: var(--muted); font-size: 14px; }
.ex-n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.ex { padding: 16px 14px; }
.ex-head { display: flex; align-items: flex-start; gap: 12px; }
.ex-t { flex: 1; min-width: 0; }
.ex-t h3 { font-size: 20px; line-height: 1.2; }
.ex-t small { font-size: 14px; color: var(--muted); }
.ex-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ex-chips span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--paper); padding: 5px 9px; border-radius: 9px; }
.ex-chips .ic { width: 14px; height: 14px; color: var(--blue); }
.hint { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.hint .ic { margin-top: 2px; }
.hint-up { background: var(--ok-50); color: var(--ok); }
.hint-hold { background: var(--blue-50); color: #23339A; }
.last { display: flex; gap: 6px; align-items: center; font-size: 14px; color: var(--muted); margin-top: 10px; font-variant-numeric: tabular-nums; }
.last .ic { width: 15px; height: 15px; }
.sets { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin-top: 6px; table-layout: fixed; }
.sets th { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 2px; text-align: center; }
.sets th:nth-child(1) { width: 30px; } .sets th:nth-child(2) { width: 58px; } .sets th:nth-child(5) { width: 54px; } .sets th:nth-child(6) { width: 48px; }
.sets td { padding: 0 2px; text-align: center; vertical-align: middle; }
.c-n { font-weight: 700; color: var(--muted); }
.c-t { font-size: 14px; font-weight: 700; line-height: 1.1; }
.c-t small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.sets input { min-height: 48px; padding: 6px 2px; text-align: center; font-size: 20px; font-weight: 700; border: 1.5px solid transparent; background: var(--field); border-radius: 12px; font-variant-numeric: tabular-nums; }
.sets input::placeholder { color: #B9BDC9; font-weight: 600; }
.sets input:disabled { background: transparent; }
.sets tr.beat input { background: var(--ok-50); color: var(--ok); }
.sets tr.skip { opacity: .4; }
.tick { width: 44px; height: 44px; border-radius: 12px; border: 1.5px solid var(--line); display: grid; place-items: center; color: var(--faint); transition: background .15s, color .15s, border-color .15s, transform .12s; }
.tick .ic { width: 20px; height: 20px; stroke-width: 3; }
.tick:active { transform: scale(.92); }
.tick[aria-pressed=true] { background: var(--blue); border-color: var(--blue); color: #fff; }
.sets tr.done .c-n { color: var(--blue); }
.alt-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.alt-row span { display: inline-flex; gap: 5px; align-items: center; white-space: nowrap; }
.alt-row select { min-height: 42px; font-size: 15px; padding: 8px 10px; }
.cue { margin-top: 8px; }
.cue summary { font-size: 14px; font-weight: 600; color: var(--blue); cursor: pointer; list-style: none; min-height: 36px; display: flex; align-items: center; gap: 6px; }
.cue p { font-size: 15px; color: var(--ink-2); padding: 0 0 6px; }
.cue textarea { font-size: 15px; }
.ex .note { min-height: 44px; }
.done-card { display: flex; gap: 14px; align-items: center; background: var(--ok-50); border-color: transparent; box-shadow: none; }
.done-ic { width: 26px; height: 26px; padding: 10px; box-sizing: content-box; border-radius: 50%; background: var(--ok); color: #fff; stroke-width: 3; }
.done-card h3 { font-size: 18px; color: #0B5A35; }
.safety { display: flex; gap: 10px; font-size: 14px; color: var(--muted); padding: 6px 4px; }
.safety .ic { color: var(--warn); margin-top: 2px; }
.fin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.fin-stats div { background: var(--paper); border-radius: 16px; padding: 14px 4px; display: grid; }
.fin-stats b { font-size: 28px; } .fin-stats small { font-size: 12.5px; color: var(--muted); }

/* ---------- check-in ---------- */
.sum { display: grid; }
.sum-row { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.sum-row:first-child { border-top: 0; padding-top: 4px; }
.sum-ic { width: 36px; height: 36px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; }
.sum-ic .ic { width: 19px; height: 19px; }
.sum-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sum-k { font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sum-v b { font-size: 18px; } .sum-v small { display: block; font-size: 14px; color: var(--ink-2); }
.sum-sub { font-size: 14px; color: var(--muted); }
.sum-main .row { margin-top: 8px; }
.nd { font-weight: 600; color: var(--faint); }
.reply { display: flex; gap: 14px; background: var(--ink); color: #fff; border: 0; }
.reply .card-k { color: rgba(255,255,255,.7); }
.reply-ic { width: 24px; height: 24px; padding: 9px; box-sizing: content-box; border-radius: 14px; background: var(--blue); flex: none; }
.reply h4 { font-size: 15px; margin-top: 10px; color: var(--yellow); }
.reply p { font-size: 16px; line-height: 1.5; }
.answers { margin: 0; display: grid; gap: 10px; }
.answers div { background: var(--paper); border-radius: 12px; padding: 10px 12px; }
.answers dt { font-size: 13px; color: var(--muted); font-weight: 600; }
.answers dd { margin: 2px 0 0; white-space: pre-wrap; }

/* ---------- setting ---------- */
.profile { display: flex; align-items: center; gap: 14px; }
.avatar { width: 58px; height: 58px; border-radius: 20px; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 22px; flex: none; }
.pf-main { flex: 1; min-width: 0; display: grid; }
.pf-name { border: 0 !important; padding: 0 !important; min-height: 0 !important; font-size: 22px !important; font-weight: 700; background: transparent !important; box-shadow: none !important; }
.pf-main small { color: var(--muted); font-size: 14px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-weight: 600; }
.set-row:first-of-type { border-top: 0; }
.set-row > span { display: inline-flex; gap: 6px; align-items: center; }
.set-row .seg { min-width: 150px; }
.set-row select { width: auto; max-width: 60%; min-height: 42px; font-size: 15px; }
.info-dl { margin: 0; display: grid; }
.info-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); }
.info-dl div:first-child { border-top: 0; }
.info-dl dt { color: var(--muted); } .info-dl dd { margin: 0; font-weight: 600; text-align: right; }
.guide-body h4 { font-size: 16px; margin: 14px 0 6px; color: var(--blue); }
.guide-body ul { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.guide-body p, .guide-body li { font-size: 15.5px; color: var(--ink-2); }
.safety-card { display: flex; gap: 12px; background: var(--warn-50); box-shadow: none; border: 0; }
.safety-card > .ic { color: var(--warn); width: 22px; height: 22px; margin-top: 2px; }
.safety-card h3 { font-size: 17px; color: #5F3600; }
.safety-card p { font-size: 15px; color: #5F3600; }
.foot { text-align: center; font-size: 12px; letter-spacing: .1em; color: var(--faint); font-weight: 600; text-transform: uppercase; padding: 10px 0; }
.foot .ic { color: var(--blue); }

/* ---------- larger screens: same order, wider grid ---------- */
@media (min-width: 760px) {
  .view { max-width: 760px; padding-left: 28px; padding-right: 28px; }
  .ph h1 { font-size: 38px; }
  .dash { grid-template-columns: 1fr 1fr; }
  .card-hero { grid-column: 1 / -1; }
  .dash-2 { display: contents; }
  .sess-list { grid-template-columns: 1fr 1fr; }
  .rest-row { grid-column: span 1; }
}
@media (min-width: 1100px) {
  .view { max-width: 1100px; }
  .dash { grid-template-columns: 1.5fr 1fr 1fr; grid-auto-rows: minmax(180px, auto); }
  .card-hero { grid-column: 1; grid-row: span 2; display: flex; flex-direction: column; justify-content: space-between; }
  .card-hero .num-xl { font-size: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* progress photos */
.photo-pick, .photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.photo { position: relative; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden; background: var(--field); display: grid; place-items: center; text-decoration: none; color: var(--ink); }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo small { position: absolute; left: 8px; bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: .02em; background: rgba(255,255,255,.92); padding: 2px 8px; border-radius: 99px; }
.photo-add { border: 1.5px dashed var(--line); cursor: pointer; color: var(--blue); transition: border-color .15s var(--ease), background .15s var(--ease); }
.photo-add:hover, .photo-add:focus-within { border-color: var(--blue); background: var(--blue-50); }
.photo-add .ic { width: 26px; height: 26px; }
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-add.busy { cursor: progress; } .photo-add.busy .spin { width: 22px; height: 22px; }
.photo-x { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(47,47,47,.72); color: #fff; cursor: pointer; }
.photo-x .ic { width: 16px; height: 16px; }
.food-photo { display: flex; gap: 12px; align-items: center; }
.food-photo img { width: 64px; height: 64px; border-radius: var(--r-xs); object-fit: cover; background: var(--field); }
