@layer reset, base, layout, components, responsive;
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  body, h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
  ol, ul { padding: 0; list-style: none; }
  button, input, select, textarea { font: inherit; color: inherit; }
  button { border: 0; background: none; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  button:disabled { cursor: default; opacity: .5; }
  svg { flex-shrink: 0; }
  img { max-width: 100%; display: block; }
  button svg { pointer-events: none; }
  fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
  legend { padding: 0; }
}
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("./fonts/inter.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url("./fonts/manrope.woff2") format("woff2"); }
@layer base {
  :root {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    --display: Manrope, Inter, system-ui, sans-serif;
    font-size: 17px;
    color-scheme: light;
    --bg: #FAF8F5; --surface: #FFFFFF; --surface-2: #F3EFE9; --text: #1F1B17; --muted: #6E665E; --line: #E6E0D8; --hairline: rgba(31,27,23,.08);
    --accent: #6B5E52; --accent-ink: #FFFFFF; --accent-soft: #EFE9E1;
    --danger: #A83A3A; --danger-soft: #F8E7E7; --ok: #3D7A55;
    --shadow: 0 10px 30px rgba(31,27,23,.10); --marble-shadow: 0 10px 26px rgba(31,27,23,.14), inset 0 -6px 14px rgba(31,27,23,.06);
    --radius: 18px; --radius-s: 12px;
    --tone: #8A7A66; --tone-soft: #F1EBE2; --tone-ink: #4E4236; --tone-ring: #C9BBA9;
    --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
    background: var(--bg); color: var(--text);
  }
  :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #14120F; --surface: #1D1A16; --surface-2: #26221D; --text: #F1ECE5; --muted: #A79E93; --line: #332E28; --hairline: rgba(241,236,229,.08);
    --accent: #D9CFC2; --accent-ink: #1F1B17; --accent-soft: #2C2721;
    --danger: #E38B8B; --danger-soft: #3A2222; --ok: #8CC9A3;
    --shadow: 0 10px 30px rgba(0,0,0,.45); --marble-shadow: 0 10px 26px rgba(0,0,0,.5), inset 0 -6px 14px rgba(0,0,0,.25);
    --tone: #A3917C; --tone-soft: #2B2620; --tone-ink: #E7DCCF; --tone-ring: #6F6152;
  }
  .tone-rose { --tone: #C2708A; --tone-soft: #F8E7EC; --tone-ink: #7A3E52; --tone-ring: #E7B9C8; }
  .tone-sage { --tone: #6E9A7C; --tone-soft: #E6F0E8; --tone-ink: #35573F; --tone-ring: #B9D4C1; }
  .tone-neutral { --tone: #8A7A66; --tone-soft: #F1EBE2; --tone-ink: #4E4236; --tone-ring: #C9BBA9; }
  .tone-sky { --tone: #6E8FB3; --tone-soft: #E7EEF6; --tone-ink: #35526F; --tone-ring: #B8CBE0; }
  .tone-honey { --tone: #C2955A; --tone-soft: #F8EFE1; --tone-ink: #6E4F22; --tone-ring: #E8CFA8; }
  :root[data-theme="dark"] .tone-rose { --tone: #D48AA3; --tone-soft: #33232A; --tone-ink: #F2CCD8; --tone-ring: #7A4A5A; }
  :root[data-theme="dark"] .tone-sage { --tone: #8BB899; --tone-soft: #1F2C23; --tone-ink: #CFE6D5; --tone-ring: #46664F; }
  :root[data-theme="dark"] .tone-neutral { --tone: #A3917C; --tone-soft: #2B2620; --tone-ink: #E7DCCF; --tone-ring: #6F6152; }
  :root[data-theme="dark"] .tone-sky { --tone: #8FAFD1; --tone-soft: #1F2733; --tone-ink: #CFDDEE; --tone-ring: #456079; }
  :root[data-theme="dark"] .tone-honey { --tone: #D6AE78; --tone-soft: #32291D; --tone-ink: #F1DDBF; --tone-ring: #7A5F3A; }
  :root[data-text="large"] { font-size: 20px; }
  :root[data-motion="reduced"] * { transition: none !important; animation: none !important; }
  body { min-width: 320px; line-height: 1.45; font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
  h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
  h1 { font-size: 1.35rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1rem; font-weight: 600; }
  .small { font-size: .88rem; } .tiny { font-size: .78rem; } .muted { color: var(--muted); } .center { text-align: center; } .mono { font-variant-numeric: tabular-nums; }
  .eyebrow { text-transform: uppercase; font-size: .72rem; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
  .skip-link { position: fixed; top: -80px; left: 16px; z-index: 1000; background: var(--accent); color: var(--accent-ink); padding: 12px; border-radius: 10px; }
  .skip-link:focus { top: 12px; }
  input, textarea, select { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-s); min-height: 56px; padding: 12px 14px; width: 100%; outline: none; font-size: 1.05rem; }
  textarea { resize: vertical; min-height: 96px; line-height: 1.4; }
  input:focus, select:focus, textarea:focus { border-color: var(--tone); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tone) 18%, transparent); }
  input[type="checkbox"], input[type="radio"] { width: 24px; min-height: 24px; height: 24px; accent-color: var(--tone); margin: 0; padding: 0; }
  button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--tone); outline-offset: 3px; border-radius: 8px; }
  .boot { min-height: 100dvh; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 24px; text-align: center; }
  .error-message { background: var(--danger-soft); color: var(--danger); padding: 12px 14px; border-radius: var(--radius-s); font-size: .95rem; margin-bottom: 8px; }
  .spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .brand { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: 1.25rem; }
}
@layer layout {
  #app { min-height: 100dvh; }
  .screen { min-height: 100dvh; max-width: 620px; margin: 0 auto; padding: calc(12px + var(--safe-t)) 18px calc(28px + var(--safe-b)); display: flex; flex-direction: column; gap: 14px; }
  .screen.has-nav, .screen.quick, .screen.today, .screen.report, .screen.settings.tone-rose, .screen.settings.tone-sage, .screen.settings.tone-neutral, .screen.settings.tone-sky, .screen.settings.tone-honey { padding-bottom: calc(96px + var(--safe-b)); }
  .topbar { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; min-height: 56px; gap: 6px; }
  .topbar.plain { grid-template-columns: 1fr auto 1fr; }
  .topbar.plain .brand { text-align: center; }
  .topbar-title { text-align: center; min-width: 0; }
  .topbar-title h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-title p { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { display: flex; justify-content: flex-end; }
  .topbar-spacer { display: flex; align-items: center; }
  .icon-btn { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; color: var(--text); }
  .icon-btn:active { background: var(--surface-2); }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--hairline); padding: 6px 8px calc(6px + var(--safe-b)); z-index: 30; }
  .nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 58px; justify-content: center; border-radius: 14px; color: var(--muted); font-size: .74rem; font-weight: 500; }
  .nav-item.active { color: var(--tone-ink); background: var(--tone-soft); }
  .sticky-action { position: sticky; bottom: calc(12px + var(--safe-b)); margin-top: auto; padding-top: 10px; background: linear-gradient(to top, var(--bg) 70%, transparent); z-index: 5; }
  .quick .sticky-action, .today .sticky-action, .report .sticky-action { bottom: calc(86px + var(--safe-b)); }
  .stack { display: flex; flex-direction: column; gap: 14px; }
  .row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .row.center { justify-content: center; } .gap-s { gap: 8px; }
  .pad { padding: 8px 0; }
  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .group { display: flex; flex-direction: column; gap: 8px; }
  .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
}
@layer components {
  /* buttons */
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 20px; border-radius: 16px; font-weight: 600; font-size: 1.02rem; background: var(--surface-2); color: var(--text); transition: transform .08s ease, background .15s ease; }
  .btn:active { transform: scale(.98); }
  .btn.primary { background: var(--tone, var(--accent)); color: #fff; }
  :root[data-theme="dark"] .btn.primary { color: #14120F; }
  .btn.ghost { background: transparent; border: 1.5px solid var(--line); }
  .btn.danger { color: var(--danger); } .btn.danger.primary { background: var(--danger); color: #fff; }
  .btn.small { min-height: 44px; padding: 0 14px; font-size: .92rem; border-radius: 12px; }
  .btn.xl { min-height: 64px; width: 100%; font-size: 1.1rem; border-radius: 20px; }
  .btn.wide { width: 100%; justify-content: flex-start; }
  /* sync chip */
  .sync-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 999px; font-size: .74rem; color: var(--muted); background: var(--surface-2); max-width: 46vw; }
  .sync-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sync-chip.paused { color: var(--danger); background: var(--danger-soft); }
  /* home */
  .home { justify-content: flex-start; }
  .marbles { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; flex: 1; padding: 20px 0 32px; }
  .marbles.many { flex-direction: row; flex-wrap: wrap; gap: 26px 20px; align-content: center; }
  .marble { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 12px 10px; border-radius: 28px; color: var(--text); max-width: 100%; }
  .marble:active .marble-ring { transform: scale(.97); }
  .marble-ring { width: 176px; height: 176px; border-radius: 50%; padding: 7px; background: var(--tone-ring); background: conic-gradient(from 210deg, var(--tone-ring), color-mix(in srgb, var(--tone) 55%, white), var(--tone-ring)); box-shadow: var(--marble-shadow); transition: transform .12s ease; display: block; }
  :root[data-theme="dark"] .marble-ring { background: conic-gradient(from 210deg, var(--tone-ring), var(--tone), var(--tone-ring)); }
  .marbles.many .marble-ring { width: 136px; height: 136px; }
  .marble-ring-inner { display: block; width: 100%; height: 100%; border-radius: 50%; padding: 5px; background: var(--bg); }
  .marble-photo { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; background: var(--tone-soft); color: var(--tone-ink); font-family: var(--display); font-weight: 700; }
  .marble-photo img { width: 100%; height: 100%; object-fit: cover; }
  .marble-initial { font-size: 3.4rem; line-height: 1; }
  .marble-photo.md { width: 72px; height: 72px; border: 3px solid var(--tone-ring); } .marble-photo.md .marble-initial { font-size: 1.8rem; }
  .marble-photo.sm { width: 44px; height: 44px; } .marble-photo.sm .marble-initial { font-size: 1.15rem; }
  .marble-name { font-family: var(--display); font-weight: 700; font-size: 1.5rem; letter-spacing: -.02em; margin-top: 8px; }
  .marble-age { color: var(--muted); font-size: 1rem; margin-top: -4px; }
  .marble-status { font-size: .84rem; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 0 10px; border-radius: 999px; }
  .marble-status.timer { background: var(--tone-soft); color: var(--tone-ink); }
  .home-foot { display: flex; justify-content: center; gap: 8px; padding-bottom: 8px; }
  .welcome { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 16px; padding: 24px 8px; }
  .welcome h1 { font-size: 1.7rem; } .welcome p { color: var(--muted); max-width: 30ch; font-size: 1.05rem; }
  .welcome .btn { max-width: 340px; margin-top: 8px; }
  .welcome-mark { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone-ink); box-shadow: var(--marble-shadow); margin-bottom: 8px; }
  .privacy-line { max-width: 36ch; }
  /* forms */
  .field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .95rem; }
  .field > span:first-child, .field legend { color: var(--muted); font-size: .85rem; font-weight: 600; }
  .readonly { min-height: 56px; display: flex; align-items: center; padding: 12px 14px; border-radius: var(--radius-s); background: var(--surface-2); color: var(--muted); font-weight: 500; }
  .seg { display: flex; gap: 8px; flex-wrap: wrap; }
  .seg-item { flex: 1 1 auto; position: relative; }
  .seg-item input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; }
  .seg-item span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; }
  .seg-item input:checked + span { background: var(--tone-soft); border-color: var(--tone); color: var(--tone-ink); }
  .seg-item input:focus-visible + span { outline: 3px solid var(--tone); outline-offset: 2px; }
  .tone-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--tone); display: inline-block; }
  .more { border: 1.5px solid var(--line); border-radius: var(--radius); padding: 0 16px; background: var(--surface); }
  .more summary { min-height: 56px; display: flex; align-items: center; font-weight: 600; cursor: pointer; list-style: none; }
  .more summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; color: var(--muted); }
  .more[open] summary::after { content: "–"; }
  .more .stack { padding: 4px 0 18px; }
  .photo-picker { display: flex; flex-direction: column; align-items: center; gap: 12px; }
  .photo-circle { width: 132px; height: 132px; border-radius: 50%; overflow: hidden; background: var(--tone-soft); color: var(--tone-ink); display: grid; place-items: center; border: 4px solid var(--tone-ring); }
  .photo-circle img { width: 100%; height: 100%; object-fit: cover; }
  .photo-placeholder { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .85rem; font-weight: 600; }
  .pick-group { display: flex; flex-direction: column; gap: 10px; }
  .pick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pick { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; cursor: pointer; }
  .pick input { flex-shrink: 0; }
  .pick.on { background: var(--tone-soft); border-color: var(--tone); color: var(--tone-ink); }
  .pick:has(input:checked) { background: var(--tone-soft); border-color: var(--tone); color: var(--tone-ink); }
  .pick:not(:has(input:checked)) { background: var(--surface); border-color: var(--line); color: var(--text); }
  .icon-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
  .icon-choice { position: relative; display: grid; place-items: center; min-height: 56px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); }
  .icon-choice input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; }
  .icon-choice:has(input:checked) { background: var(--tone-soft); border-color: var(--tone); color: var(--tone-ink); }
  .reorder { display: flex; flex-direction: column; gap: 8px; }
  .reorder-item { display: flex; align-items: center; justify-content: space-between; min-height: 60px; padding: 0 6px 0 16px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; }
  .reorder-label { display: flex; align-items: center; gap: 12px; }
  .reorder-controls { display: flex; }
  /* quick tiles */
  .tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 112px; padding: 14px 10px; border-radius: 22px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: 0 2px 0 var(--hairline); color: var(--text); transition: transform .08s ease, background .12s ease; }
  .tile:active { transform: scale(.96); background: var(--tone-soft); border-color: var(--tone); }
  .tile.wide { grid-column: 1 / -1; min-height: 72px; flex-direction: row; }
  .tile-icon { color: var(--tone-ink); display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--tone-soft); }
  .tile.wide .tile-icon { width: 40px; height: 40px; }
  .tile-label { font-weight: 600; font-size: 1.05rem; text-align: center; }
  .tile.running { background: var(--tone-soft); border-color: var(--tone); }
  .tile-running { font-size: .8rem; color: var(--tone-ink); text-align: center; line-height: 1.3; } .tile-running em { font-style: normal; color: var(--muted); }
  .suggest { background: var(--tone-soft); color: var(--tone-ink); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
  .suggest p { font-size: .95rem; }
  /* saved */
  .saved-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 22px 0 8px; }
  .saved-check { width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: var(--tone-soft); color: var(--tone-ink); border: 3px solid var(--tone); animation: pop .32s ease-out; }
  @keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
  .saved-hero h2 { font-size: 1.55rem; margin-top: 6px; }
  .saved-time { color: var(--muted); font-size: 1.05rem; }
  .saved-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 80px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; font-size: .95rem; color: var(--text); }
  .action:active { background: var(--tone-soft); }
  .detail-block { display: flex; flex-direction: column; gap: 8px; }
  .chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 56px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 600; font-size: .95rem; color: var(--text); position: relative; cursor: pointer; }
  .chip input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; }
  .chip.on, .chip:has(input:checked) { background: var(--tone-soft); border-color: var(--tone); color: var(--tone-ink); }
  .glyph { font-size: 1.25rem; line-height: 1; }
  .all-set { text-align: center; color: var(--muted); padding: 6px 0; }
  .photo-strip { display: flex; gap: 8px; flex-wrap: wrap; }
  .thumb { width: 88px; height: 88px; border-radius: 12px; overflow: hidden; background: var(--surface-2); position: relative; display: block; }
  .thumb.sm { width: 56px; height: 56px; border-radius: 8px; }
  .thumb img { width: 100%; height: 100%; object-fit: cover; }
  .thumb-remove { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
  .asset-missing { opacity: .4; }
  .note-preview { color: var(--text); background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-s); padding: 12px 14px; }
  /* sheets */
  #sheet { border: 0; padding: 0; margin: 0; max-width: 100vw; max-height: 100dvh; width: 100%; height: 100dvh; background: transparent; }
  #sheet::backdrop { background: rgba(20,18,15,.45); }
  .sheet-inner { position: absolute; left: 0; right: 0; bottom: 0; max-height: 92dvh; overflow: auto; background: var(--bg); color: var(--text); border-radius: 24px 24px 0 0; padding: 8px 18px calc(20px + var(--safe-b)); box-shadow: var(--shadow); max-width: 620px; margin: 0 auto; animation: rise .22s ease-out; }
  @keyframes rise { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
  .sheet-head { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
  .sheet-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
  .sheet-foot { display: flex; gap: 10px; justify-content: flex-end; padding-top: 10px; }
  .sheet-foot .btn { flex: 1; }
  .confirm-text { font-size: 1.02rem; }
  .sheet-question { font-family: var(--display); font-weight: 700; font-size: 1.35rem; text-align: center; padding: 6px 0; }
  .rating-list { display: flex; flex-direction: column; gap: 10px; }
  .rating-option { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 0 18px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; font-size: 1.1rem; color: var(--text); }
  .rating-option:active { background: var(--tone-soft); border-color: var(--tone); }
  .rating-option .glyph { font-size: 1.6rem; }
  .big-input .input-row { display: flex; align-items: center; gap: 10px; }
  .big-input input { font-size: 2rem; min-height: 76px; text-align: center; font-weight: 600; }
  .input-row { display: flex; align-items: center; gap: 10px; } .input-row .unit { color: var(--muted); font-weight: 600; min-width: 36px; }
  .menu-list { display: flex; flex-direction: column; gap: 8px; }
  /* today */
  .day-nav { display: grid; grid-template-columns: 56px 1fr 56px; align-items: center; }
  .day-label { display: flex; flex-direction: column; align-items: center; font-family: var(--display); font-weight: 700; font-size: 1.15rem; min-height: 56px; justify-content: center; border-radius: 14px; color: var(--text); }
  .summary dl, .summary-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
  .summary dl div, .summary-list div { display: flex; justify-content: space-between; gap: 8px; font-size: .95rem; min-height: 26px; align-items: center; }
  .summary dt, .summary-list dt { color: var(--muted); } .summary dd, .summary-list dd { font-weight: 600; text-align: right; white-space: nowrap; }
  .timeline { display: flex; flex-direction: column; }
  .tl-row { display: flex; align-items: stretch; border-bottom: 1px solid var(--hairline); }
  .tl-main { flex: 1; display: grid; grid-template-columns: 52px 36px 1fr; gap: 8px; align-items: start; text-align: left; padding: 14px 0; min-height: 64px; color: var(--text); }
  .tl-time { font-weight: 600; font-variant-numeric: tabular-nums; padding-top: 2px; }
  .tl-icon { color: var(--tone-ink); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--tone-soft); }
  .tl-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .tl-label { font-weight: 600; } .tl-live { font-style: normal; color: var(--tone-ink); font-size: .8rem; background: var(--tone-soft); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
  .tl-detail { color: var(--muted); font-size: .92rem; } .tl-note { font-size: .92rem; } .tl-photos { display: flex; gap: 6px; margin-top: 4px; }
  .tl-row .icon-btn { align-self: center; }
  .empty { text-align: center; color: var(--muted); padding: 40px 12px; }
  /* report */
  .report-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
  .report-head { display: flex; align-items: center; gap: 14px; padding: 4px 0 8px; border-bottom: 2px solid var(--tone-ring); }
  .report-head h2 { font-size: 1.4rem; }
  .mini-timeline { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
  .mini-timeline li { display: grid; grid-template-columns: 48px 1fr; gap: 8px; align-items: baseline; }
  .mini-timeline .mono { font-weight: 600; }
  /* settings */
  .list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .list-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px; text-align: left; color: var(--text); border-bottom: 1px solid var(--hairline); width: 100%; }
  .list-row:last-child { border-bottom: 0; }
  .list-row.static { cursor: default; }
  .list-row.danger { color: var(--danger); }
  .list-main { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; font-weight: 500; }
  .list-main .small { font-weight: 400; }
  .list-row select { width: auto; min-width: 120px; min-height: 48px; padding: 6px 10px; }
  .baby-head { display: flex; justify-content: center; }
  /* toast */
  #toast-region { position: fixed; left: 0; right: 0; bottom: calc(92px + var(--safe-b)); display: flex; justify-content: center; z-index: 100; pointer-events: none; padding: 0 16px; }
  .toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--bg); padding: 10px 8px 10px 18px; border-radius: 16px; box-shadow: var(--shadow); max-width: 560px; width: 100%; font-weight: 500; animation: rise .2s ease-out; }
  .toast > span { flex: 1; }
  .toast button { min-height: 48px; padding: 0 14px; border-radius: 10px; font-weight: 700; color: var(--bg); background: rgba(255,255,255,.12); }
  .toast .toast-close { padding: 0; width: 48px; display: grid; place-items: center; background: none; }
}
@layer responsive {
  @media (min-width: 720px) {
    .screen { padding-left: 24px; padding-right: 24px; }
    .tiles { grid-template-columns: repeat(3, 1fr); }
    .marbles { flex-direction: row; flex-wrap: wrap; gap: 40px; }
    .bottom-nav { max-width: 620px; margin: 0 auto; border: 1px solid var(--hairline); border-bottom: 0; border-radius: 20px 20px 0 0; }
    .sheet-inner { border-radius: 24px; bottom: 6vh; }
  }
  @media (hover: hover) {
    .tile:hover, .action:hover, .rating-option:hover, .chip:hover { border-color: var(--tone); }
    .btn.ghost:hover, .list-row:hover { background: var(--surface-2); }
  }
}
