/* Wealth Wiser — YT Doctor Finance brand. Dark navy UI, Archivo + IBM Plex Mono (self-hosted). */
@font-face { font-family: 'Archivo'; font-weight: 400; font-display: swap; src: url(../fonts/archivo-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 500; font-display: swap; src: url(../fonts/archivo-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 600; font-display: swap; src: url(../fonts/archivo-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 700; font-display: swap; src: url(../fonts/archivo-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 800; font-display: swap; src: url(../fonts/archivo-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Archivo'; font-weight: 900; font-display: swap; src: url(../fonts/archivo-latin-900-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 600; font-display: swap; src: url(../fonts/ibm-plex-mono-latin-600-normal.woff2) format('woff2'); }

:root {
  --navy: #111C2E;
  --navy-2: #22324D;
  --deep: #0B1424;
  --tile: #1A2740;
  --slate: #2E3B52;
  --line: #34486B;
  --line-2: #4A5C7E;
  --dot: #5C6E8F;
  --cream: #F2EDE3;
  --cream-2: #DCD5C7;
  --cream-line: #C8C0B2;
  --white: #FFFFFF;
  --muted: #AEB8C9;
  --muted-2: #8C98AD;
  --soft: #C9D1DE;
  --ink-2: #4A5672;
  --red: #D8383A;
  --red-btn: #BF2E30;
  --red-ink: #B42A2C;
  --red-bar: #E5484D;
  --red-soft: #FF8A8A;
  --red-bg: #3A2230;
  --green: #1F8A55;
  --green-ink: #17683F;
  --green-bright: #4CC98A;
  --green-soft: #6FD9A2;
  --green-bg: #173A2C;
  --amber: #F2B65A;
  --amber-bar: #E8A33D;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; background: var(--navy); color: var(--cream); font-family: var(--sans); }
body { min-height: 100dvh; -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cream); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.muted2 { color: var(--muted-2); }
.soft { color: var(--soft); }
.green { color: var(--green-soft); }
.red { color: var(--red-soft); }
.amber { color: var(--amber); }
.b { font-weight: 800; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex-shrink: 0; display: block; }

#app { max-width: 480px; margin: 0 auto; min-height: 100dvh; position: relative; }
.screen { padding: calc(20px + var(--safe-t)) 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.screen.with-nav { padding-bottom: calc(110px + var(--safe-b)); }
.screen.with-foot { padding-bottom: calc(150px + var(--safe-b)); }
.fade-in { animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- headings & labels */
.h1 { margin: 0; font-size: 26px; line-height: 30px; font-weight: 900; letter-spacing: -0.5px; }
.h1.lg { font-size: 27px; line-height: 32px; font-weight: 800; }
.lede { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.eyebrow { font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.eyebrow.red { color: var(--red-soft); }
.eyebrow.amber { color: var(--amber); }
.label { font-size: 13px; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted-2); line-height: 16px; }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.between.c { align-items: center; }
.col { display: flex; flex-direction: column; gap: 8px; }
.col.g4 { gap: 4px; } .col.g12 { gap: 12px; } .col.g6 { gap: 6px; } .col.g2 { gap: 2px; }
.grow { flex-grow: 1; min-width: 0; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; }

/* ---------- top bars */
.topbar { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.topbar .title { display: flex; align-items: center; gap: 8px; }
.iconbtn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line); background: var(--navy-2); display: inline-flex; align-items: center; justify-content: center; position: relative; color: var(--cream); padding: 0; text-decoration: none; }
.iconbtn.plain { border: 0; background: transparent; width: 36px; justify-content: flex-start; }
.badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); border: 2px solid var(--navy); color: #fff; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.brand { display: flex; flex-direction: column; }
.brand b { font-size: 20px; font-weight: 900; letter-spacing: -0.4px; }
.brand span { font-size: 12px; color: var(--muted); }

/* ---------- cards */
.card { padding: 16px 18px; border-radius: 18px; background: var(--navy-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--cream); }
.card.tight { padding: 14px; border-radius: 14px; gap: 10px; }
.card.between { flex-direction: row; }
input[type=number] { -moz-appearance: textfield; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.card.flat { border: 0; }
.card.cream { background: var(--cream); color: var(--navy); border: 0; }
.card.outline { background: transparent; }
.card.red-edge { border-color: var(--red); }
.card.amber-edge { border-color: var(--amber); }
.card.green-bg { background: var(--green-bg); border: 0; }
.card.dim { background: var(--tile); border: 0; }
.card-title { font-size: 16px; font-weight: 800; }
.white-tile { padding: 12px; border-radius: 12px; background: #fff; color: var(--navy); display: flex; flex-direction: column; gap: 4px; }
.cream .muted, .cream .label { color: var(--ink-2); }

/* ---------- buttons */
.btn { height: 52px; border: 0; border-radius: 14px; background: var(--red-btn); color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 700; text-decoration: none; width: 100%; }
.btn:disabled { opacity: .45; }
.btn.secondary { background: transparent; border: 1px solid var(--line-2); color: var(--cream); height: 44px; font-size: 14px; }
.btn.cream { background: var(--cream); color: var(--navy); }
.btn.sm { height: 40px; font-size: 13px; border-radius: 10px; }
.btn.danger { background: transparent; border: 1px solid var(--red); color: var(--red-soft); height: 44px; font-size: 14px; }
.mini { height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--cream); color: var(--navy); font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; text-decoration: none; }
.mini.ghost { background: transparent; border: 1px solid var(--line-2); color: var(--cream); font-weight: 700; }
.link { background: none; border: 0; padding: 0; color: var(--cream); font-size: 13px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--line); background: transparent; color: var(--cream); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.chip.on { background: var(--cream); color: var(--navy); border-color: var(--cream); font-weight: 800; }
.chip.sm { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 15px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; margin: 0 -20px; padding-left: 20px; padding-right: 20px; }
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.seg { height: 40px; padding: 3px; border-radius: 12px; background: var(--navy-2); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; }
.seg button, .seg a { border: 0; border-radius: 9px; background: transparent; color: var(--soft); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.seg .on { background: var(--cream); color: var(--navy); font-weight: 800; }
.seg.lg { font-size: 14px; }
.seg.lg button, .seg.lg a { font-size: 14px; }
.yesno { display: flex; gap: 4px; }
.yesno button { height: 30px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line-2); background: transparent; color: var(--soft); font-size: 12px; font-weight: 600; }
.yesno button.on { background: var(--cream); color: var(--navy); border-color: var(--cream); font-weight: 800; }
.toggle { width: 48px; height: 28px; padding: 3px; border: 0; border-radius: 14px; background: var(--line-2); display: flex; justify-content: flex-start; flex-shrink: 0; transition: background .15s; }
.toggle span { width: 22px; height: 22px; border-radius: 11px; background: #fff; }
.toggle.on { background: var(--green); justify-content: flex-end; }

/* ---------- inputs */
.field { display: flex; flex-direction: column; gap: 6px; }
.input { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--navy-2); color: var(--cream); font-size: 16px; width: 100%; outline: none; }
.input:focus { border-color: var(--cream); }
.input.money { font-family: var(--mono); font-size: 18px; font-weight: 600; }
.input.sm { height: 40px; font-size: 15px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23AEB8C9' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.searchbox { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--navy-2); border: 1px solid var(--line); }
.searchbox input { flex-grow: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--cream); font-size: 15px; }
.inline-money { width: 120px; text-align: right; border: 0; outline: 0; background: transparent; color: var(--cream); font-family: var(--mono); font-size: 15px; font-weight: 600; padding: 6px 0; }
.inline-money:focus { border-bottom: 1px solid var(--cream); }
input::placeholder { color: var(--muted-2); }

/* ---------- list rows */
.list { border-radius: 14px; background: var(--navy-2); display: flex; flex-direction: column; overflow: hidden; }
.list > * + * { border-top: 1px solid var(--line); }
.li { min-height: 48px; padding: 10px 14px; border: 0; background: transparent; color: var(--cream); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; text-align: left; width: 100%; text-decoration: none; }
.li .sub { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.acct-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 12px; border-radius: 12px; background: var(--navy-2); border: 1px solid transparent; }
.acct-row.safety { border-color: var(--red); }
.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--cream); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; flex-shrink: 0; letter-spacing: -.2px; }
.logo.red { background: var(--red); color: var(--cream); }
.logo.dark { background: var(--slate); color: var(--cream); }

/* ---------- bars */
.bar { position: relative; height: 6px; border-radius: 3px; background: var(--navy); display: flex; }
.bar.on-card { background: var(--navy); }
.bar.on-navy { background: var(--navy-2); }
.bar .fill { height: 6px; border-radius: 3px; }
.bar .fill.l { border-radius: 3px 0 0 3px; }
.bar .fill.r { border-radius: 0 3px 3px 0; }
.bar .tick { position: absolute; top: -3px; width: 2px; height: 12px; background: var(--cream); border-radius: 1px; }
.bar .limit { position: absolute; top: -4px; width: 2px; height: 14px; background: #fff; }
.bigbar { height: 8px; border-radius: 4px; background: var(--navy); display: flex; overflow: hidden; }
.bigbar span { border-radius: 4px; }
.split { height: 12px; border-radius: 6px; overflow: hidden; display: flex; gap: 2px; }
.cat-line { display: flex; flex-direction: column; gap: 5px; }
.cat-line .between { font-size: 14px; }
.cat-line .name { font-weight: 700; }
.cat-line .amt { font-family: var(--mono); font-size: 13px; }
.status { font-size: 12px; font-weight: 700; }

/* ---------- bottom nav */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--deep); border-top: 1px solid var(--navy-2); padding-bottom: var(--safe-b); }
.nav-in { max-width: 480px; margin: 0 auto; height: 72px; padding: 0 12px 6px; display: flex; align-items: center; justify-content: space-around; }
.nav a { width: 60px; height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; color: var(--muted-2); text-decoration: none; }
.nav a.on { color: var(--cream); font-weight: 700; }
.nav a.fab { width: 56px; height: 56px; margin-top: -26px; border-radius: 28px; background: var(--red-btn); border: 4px solid var(--navy); color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.footbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--deep); border-top: 1px solid var(--navy-2); }
.footbar-in { max-width: 480px; margin: 0 auto; padding: 14px 20px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px; }

/* ---------- setup */
.progress { height: 4px; border-radius: 2px; background: var(--navy-2); display: flex; }
.progress span { border-radius: 2px; background: var(--red); }
.radio-card { min-height: 64px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line); background: transparent; color: var(--cream); display: flex; align-items: center; gap: 14px; text-align: left; width: 100%; }
.radio-card.on { border: 2px solid var(--cream); background: var(--navy-2); }
.radio-card .dot { width: 22px; height: 22px; border-radius: 11px; border: 2px solid var(--dot); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.radio-card.on .dot { background: var(--cream); border-color: var(--cream); color: var(--navy); }
.radio-card b { font-size: 16px; display: block; }
.radio-card small { font-size: 13px; color: var(--muted); display: block; margin-top: 2px; }
.levels3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.levels3 > div { padding: 8px; border-radius: 10px; background: #fff; display: flex; flex-direction: column; gap: 2px; }
.levels3 small { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.levels3 b { font-family: var(--mono); font-size: 14px; font-weight: 600; }
.sub-card { padding: 12px; border-radius: 10px; background: var(--navy); display: flex; flex-direction: column; gap: 8px; }
.mini-stat { padding: 6px 8px; border-radius: 8px; background: var(--navy-2); display: flex; flex-direction: column; gap: 2px; }
.mini-stat small { font-size: 10px; font-weight: 700; color: var(--muted); }
.mini-stat input, .mini-stat select { border: 0; background: transparent; outline: 0; font-family: var(--mono); font-size: 13px; font-weight: 600; padding: 0; width: 100%; color: var(--cream); }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }

/* ---------- home */
.wealth { position: relative; overflow: hidden; }
.wealth .pulse { position: absolute; right: 14px; top: 14px; opacity: .8; }
.wealth .big { font-size: 36px; line-height: 40px; font-weight: 900; letter-spacing: -1px; }
.ring-wrap { position: relative; width: 100%; max-width: 314px; margin: 0 auto; aspect-ratio: 1 / 1; }
.ring-wrap svg { display: block; width: 100%; height: 100%; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; pointer-events: none; text-align: center; }
.ring-center .sts { font-size: 44px; line-height: 50px; font-weight: 900; letter-spacing: -1px; color: var(--green-bright); }
.ring-center .sts.neg { color: var(--red-soft); }
.legend { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; color: var(--soft); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 10px; height: 10px; border-radius: 5px; display: inline-block; }
.due-row { display: flex; align-items: center; gap: 10px; }
.due-ic { width: 30px; height: 30px; border-radius: 15px; border: 2px solid var(--amber); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--amber); }
.due-ic.paid { border: 0; background: var(--green); color: #fff; }
.due-row .nm { flex-grow: 1; font-size: 14px; font-weight: 700; }
.due-row .nm small { font-size: 12px; font-weight: 400; color: var(--muted); }
.due-row .amt { font-family: var(--mono); font-size: 13px; }
.banner { padding: 12px 14px; border-radius: 14px; display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--cream); background: var(--navy-2); border: 1px solid var(--line); }
.banner.red { border-color: var(--red); }
.banner.amber { border-color: var(--amber); }
.banner.sample { background: var(--tile); border-style: dashed; }
.banner .t { font-size: 14px; font-weight: 800; }
.banner .s { font-size: 12px; color: var(--muted); }

/* ---------- quick add */
.qa { gap: 12px; padding-top: calc(14px + var(--safe-t)); }
.amount { min-height: 64px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.amount .cur { font-size: 22px; font-weight: 700; color: var(--muted); }
.amount .val { font-size: 52px; line-height: 56px; font-weight: 900; letter-spacing: -1.5px; }
.amount .val.zero { color: var(--line-2); }
.amount .caret { width: 3px; height: 40px; background: var(--red); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.type-badge { height: 22px; padding: 0 8px; border-radius: 11px; display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; }
.type-badge.want { background: var(--red-bg); color: var(--red-soft); }
.type-badge.need { background: var(--slate); color: var(--soft); }
.type-badge.saving { background: var(--green-bg); color: var(--green-soft); }
.type-badge.giving { background: #3A3322; color: var(--amber); }
.catgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cat { height: 60px; border-radius: 12px; border: 1px solid var(--line); background: var(--navy-2); color: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 0 2px; text-align: center; line-height: 12px; overflow: hidden; }
.cat.on { border: 2px solid var(--cream); background: var(--cream); color: var(--navy); font-weight: 800; }
.numpad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.numpad button { height: 46px; border: 0; border-radius: 10px; background: var(--tile); color: var(--cream); font-family: var(--mono); font-size: 20px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.numpad button:active { background: var(--line); }
.note { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: var(--navy-2); }
.note input { flex-grow: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--cream); font-size: 14px; }
.datebtn { background: none; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; color: var(--cream); }
.datebtn b { font-size: 17px; font-weight: 800; }
.datebtn span { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }

/* ---------- history / inbox */
.day-head { display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; }
.day-head b { font-size: 13px; font-weight: 800; }
.day-head span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.entry-wrap { position: relative; border-radius: 12px; overflow: hidden; }
.entry-del { position: absolute; inset: 0; background: var(--red-btn); display: flex; align-items: center; justify-content: flex-end; padding-right: 18px; color: #fff; font-weight: 800; font-size: 13px; border: 0; width: 100%; }
.entry { position: relative; min-height: 60px; padding: 8px 12px; border: 0; border-radius: 12px; background: var(--navy-2); color: var(--cream); display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; touch-action: pan-y; transition: transform .2s; }
.entry.transfer { background: var(--tile); border: 1px dashed var(--line); }
.entry .tile { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--slate); display: flex; align-items: center; justify-content: center; color: var(--soft); }
.entry .tile.want { background: var(--red-bg); color: var(--red-soft); }
.entry .tile.income { background: var(--green-bg); color: var(--green-soft); }
.entry .tile.saving { background: var(--green-bg); color: var(--green-soft); }
.entry .tile.giving { background: #3A3322; color: var(--amber); }
.entry .nm { flex-grow: 1; min-width: 0; font-size: 14px; font-weight: 700; }
.entry .nm small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry .amt { font-family: var(--mono); font-size: 14px; font-weight: 600; white-space: nowrap; }
.msg { position: relative; padding: 14px 14px 14px 16px; border-radius: 14px; background: var(--tile); display: flex; flex-direction: column; gap: 8px; touch-action: pan-y; transition: transform .2s, opacity .2s; }
.msg.new { background: var(--navy-2); border: 1px solid var(--line); }
.msg.new.red { border-color: var(--red-bar); }
.msg.new.amber { border-color: var(--amber); }
.msg.new.green { border-color: var(--green); }
.msg .x { position: absolute; right: 6px; top: 6px; width: 32px; height: 32px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; color: var(--muted-2); }
.msg .t { font-size: 15px; font-weight: 800; padding-right: 28px; }
.msg:not(.new) .t { font-size: 14px; }
.msg .b { font-size: 13px; line-height: 18px; color: var(--soft); font-weight: 400; }
.msg:not(.new) .b { color: var(--muted); }
.msg .acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msg .when { font-size: 11px; color: var(--muted-2); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; line-height: 20px; border: 1px dashed var(--line); border-radius: 14px; }

/* ---------- safety */
.lvl-stack { width: 104px; flex-shrink: 0; display: flex; flex-direction: column; gap: 9px; }
.lvl { height: 104px; border-radius: 12px; border: 2px dashed var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--muted-2); position: relative; overflow: hidden; }
.lvl.active, .lvl.done { border: 2px solid var(--red); flex-direction: column; justify-content: flex-end; color: var(--cream); }
.lvl.done { background: var(--red); }
.lvl .fill { width: 100%; background: var(--red); }
.lvl .top { position: absolute; left: 0; right: 0; top: 10px; text-align: center; }
.lvl .pc { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 22px; font-weight: 900; color: #fff; }
.lvl-info { height: 104px; display: flex; flex-direction: column; justify-content: center; gap: 2px; }
.lvl-info b { font-size: 15px; font-weight: 800; }
.lvl-info .mono { font-size: 13px; color: var(--soft); }
.ratio-chip { padding: 6px 4px; border-radius: 8px; background: #fff; display: flex; flex-direction: column; align-items: center; }
.ratio-chip small { font-size: 10px; font-weight: 700; color: var(--ink-2); }
.ratio-chip b { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.ratio-chip.on { background: var(--navy); color: var(--cream); }
.ratio-chip.on small { color: var(--cream); }

/* ---------- report */
.grade { width: 72px; height: 72px; border-radius: 36px; background: var(--navy); color: var(--cream); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.grade b { font-size: 26px; line-height: 28px; font-weight: 900; }
.grade small { font-size: 10px; font-weight: 700; color: var(--muted); }
.cmp { display: grid; grid-template-columns: 64px minmax(0, 1fr) 96px; align-items: center; gap: 8px; font-size: 13px; }
.cmp .bars { display: flex; flex-direction: column; gap: 3px; }
.cmp .p { height: 5px; border-radius: 3px; background: #A9A296; }
.cmp .a { height: 7px; border-radius: 3px; }

/* ---------- sheets, toasts, lock */
.scrim { position: fixed; inset: 0; background: rgba(5, 10, 20, .6); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 480px; max-height: 88dvh; overflow-y: auto; background: var(--navy); border-top: 1px solid var(--line); border-radius: 22px 22px 0 0; padding: 10px 20px calc(22px + var(--safe-b)); display: flex; flex-direction: column; gap: 12px; animation: up .2s ease-out; }
@keyframes up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.grabber { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 0 auto 4px; }
.sheet h2 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: -.3px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); z-index: 60; background: var(--cream); color: var(--navy); padding: 12px 16px; border-radius: 12px; font-size: 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-width: calc(100% - 40px); animation: fade .2s; display: flex; gap: 12px; align-items: center; }
.toast button { background: none; border: 0; color: var(--red-btn); font-weight: 800; padding: 0; }
.pin-dots { display: flex; gap: 14px; justify-content: center; padding: 12px 0; }
.pin-dots i { width: 14px; height: 14px; border-radius: 7px; border: 2px solid var(--line-2); }
.pin-dots i.on { background: var(--cream); border-color: var(--cream); }
.lock-screen { min-height: 100dvh; justify-content: center; }
.disclaimer { text-align: center; font-size: 11px; line-height: 16px; color: var(--muted-2); }
.logo-mark { width: 88px; height: 88px; border-radius: 22px; background: var(--navy-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.heat { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.heat div { aspect-ratio: 1 / 1; border-radius: 6px; background: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 10px; font-family: var(--mono); color: var(--muted-2); position: relative; }
.heat div.out { background: transparent; }
.heat div.today { outline: 2px solid var(--cream); outline-offset: -2px; }
.heat div.ns::after { content: ''; position: absolute; right: 3px; top: 3px; width: 5px; height: 5px; border-radius: 3px; background: var(--green-bright); }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted); }
.heat-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

@media (min-width: 520px) {
  body { background: #0B1424; }
  #app { background: var(--navy); box-shadow: 0 0 0 1px var(--navy-2); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
