/* Franklin — design system
   Minimal, established, detail-oriented. One accent (a deep currency green),
   gold reserved for value, warm neutrals, real card artwork, no decorative noise. */

:root {
  --bg: #F7F2E6;
  --surface: #ffffff;
  --surface-2: #EFEAD9;
  --ink: #1C1C19;
  --ink-2: #3f463c;
  --muted: #6B6B62;
  --line: #E2DCCB;
  --accent: #2E6B52;
  --accent-ink: #1f5a42;
  --accent-soft: #E4EFE8;
  --good: #2E6B52;
  --good-soft: #E4EFE8;
  --warn: #b5541f; --gold: #C8A24A; --gold-soft: #F3E7C8; --gold-ink: #8A6A1F;
  --shadow-sm: 0 1px 2px rgba(15, 21, 28, .05);
  --shadow-md: 0 8px 24px -12px rgba(15, 21, 28, .18);
  --shadow-lg: 0 24px 48px -20px rgba(15, 21, 28, .28);
  --r-sm: 10px; --r-md: 14px; --r-lg: 20px;
  --maxw: 560px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14352A; --surface: #1B4034; --surface-2: #20493A; --ink: #EDE7D6;
    --ink-2: #c9d3c6; --muted: #9DB3A6; --line: #2B5344; --accent: #4FA07C;
    --accent-ink: #BFE6D3; --accent-soft: #173F30; --good: #4FA07C; --good-soft: #173F30;
    --warn: #e0864f; --gold: #E8C86A; --gold-soft: #2B3A22; --gold-ink: #E8C86A;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px -12px rgba(0,0,0,.6);
    --shadow-lg: 0 24px 48px -20px rgba(0,0,0,.7);
  }
}
:root[data-theme="light"] {
  --bg: #F7F2E6; --surface: #ffffff; --surface-2: #EFEAD9; --ink: #1C1C19; --ink-2: #3f463c;
  --muted: #6B6B62; --line: #E2DCCB; --accent: #2E6B52; --accent-ink: #1f5a42;
  --accent-soft: #E4EFE8; --good: #2E6B52; --good-soft: #E4EFE8; --warn: #b5541f; --gold: #C8A24A; --gold-soft: #F3E7C8; --gold-ink: #8A6A1F;
  --shadow-sm: 0 1px 2px rgba(15,21,28,.05); --shadow-md: 0 8px 24px -12px rgba(15,21,28,.18);
  --shadow-lg: 0 24px 48px -20px rgba(15,21,28,.28);
}
:root[data-theme="dark"] {
  --bg: #14352A; --surface: #1B4034; --surface-2: #20493A; --ink: #EDE7D6; --ink-2: #c9d3c6;
  --muted: #9DB3A6; --line: #2B5344; --accent: #4FA07C; --accent-ink: #BFE6D3;
  --accent-soft: #173F30; --good: #4FA07C; --good-soft: #173F30; --warn: #e0864f; --gold: #E8C86A; --gold-soft: #2B3A22; --gold-ink: #E8C86A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow-md: 0 8px 24px -12px rgba(0,0,0,.6);
  --shadow-lg: 0 24px 48px -20px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  /* App-shell layout: body is a full-height column, NOT the scroller. Only
     #app scrolls internally. This is deliberate — a bottom nav with
     `position: fixed` visually floats/jumps on iOS Safari as its dynamic
     toolbar collapses (fixed is anchored to the layout viewport, which shifts
     independently of what you actually see). Here the tab bar is never
     `fixed`; it's a normal flex item that just sits at the bottom of a
     `100dvh` column, so there's no viewport mismatch to jump against. */
  height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
}
h1, h2, h3 { letter-spacing: -0.02em; }
.num { font-variant-numeric: tabular-nums; }
svg { display: block; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Top bar ---- */
.topbar { flex: none; z-index: 30; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(1.5) blur(12px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: var(--maxw); margin: 0 auto; height: 56px; padding: 0 18px; display: flex; align-items: center; gap: 10px; }
.wordmark { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em; flex: 1; }
.wordmark .kmark { width: 17px; height: 27px; display: block; }
.icon-btn { border: 1px solid var(--line); background: var(--surface); color: var(--muted); width: 36px; height: 36px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { color: var(--ink); border-color: var(--accent); }

/* ---- Views ---- */
main { max-width: var(--maxw); margin: 0 auto; padding: 20px 18px 20px; width: 100%; flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.view.hidden { display: none; }
.lede-block { margin-bottom: 16px; }
.kicker { font-family: var(--mono); text-transform: uppercase; letter-spacing: .16em; font-size: 11px; color: var(--accent); font-weight: 600; margin: 0 0 6px; }
.lede-h { font-family: var(--display); font-size: 27px; margin: 0; }
.lede-sub { color: var(--muted); font-size: 14px; margin: 8px 0 0; max-width: 44ch; }
.view-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.view-title { font-family: var(--display); font-size: 23px; margin: 0; }
.view-sub { color: var(--muted); font-size: 13px; margin: 6px 0 0; max-width: 42ch; }
.view-sub em { font-style: normal; color: var(--ink-2); font-weight: 600; }

/* ---- Chips ---- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 9px 14px 9px 11px; font-size: 13.5px; font-weight: 550; cursor: pointer; transition: border-color .12s, background .12s, transform .12s; }
.chip .icon { width: 17px; height: 17px; color: var(--muted); }
.chip:hover { border-color: var(--accent); transform: translateY(-1px); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.chip[aria-pressed="true"] .icon { color: var(--accent); }

/* ---- Fields & buttons ---- */
.field { display: flex; gap: 8px; margin-top: 4px; }
.field input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14.5px; background: var(--surface); color: var(--ink); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn { border: 0; border-radius: var(--r-md); padding: 12px 16px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-solid { background: var(--accent); color: #fff; }
.btn-solid:hover { background: var(--accent-ink); }
.btn-outline { background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 9px 14px; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-quiet { background: transparent; color: var(--muted); border: 1px dashed var(--line); width: 100%; margin-top: 9px; }
.btn-quiet:hover { color: var(--ink); border-color: var(--accent); }
.btn-quiet .icon { width: 17px; height: 17px; }
.btn-block { width: 100%; }

/* ---- Profile / account sheet ---- */
.auth-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.auth-form .field { margin-top: 0; }
.auth-error { color: var(--warn); font-size: 13px; line-height: 1.4; }
.profile-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.profile-avatar { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); flex: 0 0 auto; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.icon-btn.signed-in { position: relative; }
.icon-btn.signed-in::after { content: ""; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--good); border: 1.5px solid var(--surface); }

/* ---- Card face (real artwork) ---- */
.face { position: relative; aspect-ratio: 1.586; border-radius: 12px; color: #fff; padding: 13px 15px; overflow: hidden;
  background: linear-gradient(140deg, color-mix(in srgb, var(--c) 96%, #fff 4%), color-mix(in srgb, var(--c) 58%, #000 42%));
  box-shadow: var(--shadow-md), inset 0 0 0 1px rgba(255,255,255,.10); display: flex; flex-direction: column; justify-content: space-between; }
.face::before { content:""; position:absolute; inset:0; background: radial-gradient(120% 80% at 85% -10%, rgba(255,255,255,.22), transparent 55%); pointer-events:none; }
.face .f-top { display: flex; align-items: flex-start; justify-content: space-between; }
.face .f-issuer { font-size: 12px; font-weight: 600; letter-spacing: .01em; text-shadow: 0 1px 1px rgba(0,0,0,.18); }
.face .f-chip { width: 30px; height: 22px; border-radius: 5px; background: linear-gradient(135deg, #f4dfa0, #c9a24a); box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); position: relative; }
.face .f-chip::after { content:""; position:absolute; inset: 4px 6px; border: 1px solid rgba(0,0,0,.22); border-radius: 2px; }
.face .f-num { font-family: var(--mono); font-size: 12.5px; letter-spacing: .12em; opacity: .92; text-shadow: 0 1px 1px rgba(0,0,0,.2); }
.face .f-bot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.face .f-name { font-size: 12.5px; font-weight: 650; line-height: 1.15; max-width: 62%; text-shadow: 0 1px 1px rgba(0,0,0,.2); }
.face .f-net { font-size: 12px; font-weight: 800; letter-spacing: .06em; opacity: .95; }
/* Licensed card art (optional): covers the stylized face when present. */
.face .f-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; z-index: 2; }
.face.sm { padding: 10px 12px; border-radius: 10px; }
.face.sm .f-num { display: none; }
.face.sm .f-issuer, .face.sm .f-name { font-size: 11.5px; }
.face.lg .f-num { font-size: 14px; }

/* wallet stack */
.wallet-stack { display: flex; flex-direction: column; gap: 12px; }
.wallet-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; cursor: pointer; transition: border-color .12s, transform .12s; }
.wallet-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.wallet-row .wr-name { font-weight: 650; font-size: 15px; }
.wallet-row .wr-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.wallet-row .chev { color: var(--muted); }
.select-cat { margin-top: 8px; }
.select-cat select { font: inherit; font-size: 12.5px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); max-width: 100%; }

/* ---- Pay result ---- */
.pay-result { margin-top: 16px; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.rc-context { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.rc-context .icon { width: 16px; height: 16px; color: var(--accent); }
.rc-body { padding: 16px; display: grid; grid-template-columns: 108px 1fr; gap: 16px; align-items: center; }
.rc-label { font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; font-size: 10px; color: var(--muted); }
.rc-name { font-size: 20px; font-weight: 750; margin: 3px 0 4px; line-height: 1.1; }
.rc-reason { font-size: 14px; color: var(--ink-2); }
.rc-value { display: inline-flex; align-items: baseline; gap: 5px; margin-top: 8px; background: var(--gold-soft); color: var(--gold-ink); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; }
.rc-value b { font-size: 14px; }
.rc-runners { border-top: 1px dashed var(--line); padding: 12px 16px; display: flex; flex-direction: column; gap: 6px; }
.rc-runners .rr { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.rc-runners .rr b { color: var(--ink-2); font-weight: 600; }
.rc-offers { border-top: 1px solid var(--line); padding: 12px 16px 16px; }
.rc-offers .oh { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--good); font-weight: 650; margin-bottom: 10px; }

.offer-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.offer-row:first-of-type { border-top: 0; }
.offer-row .o-text { flex: 1; font-size: 13px; }
.offer-row .o-text b { font-weight: 650; }
.offer-row .o-merch { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.act { border: 0; background: var(--good); color: #fff; font-weight: 600; font-size: 12.5px; padding: 8px 13px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.act:hover { filter: brightness(1.06); }
.act.done { background: var(--muted); cursor: default; }
.empty { color: var(--muted); font-size: 13.5px; text-align: center; padding: 24px 12px; }

/* ---- Discover ---- */
.discover-list { display: flex; flex-direction: column; gap: 12px; }
.market-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; cursor: pointer; transition: border-color .12s, transform .12s; }
.market-row:hover { border-color: var(--accent); transform: translateY(-1px); }
.mr-name { font-weight: 650; font-size: 15px; }
.mr-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.mr-reason { color: var(--ink-2); font-size: 12.5px; margin-top: 4px; }
.market-row .chev { color: var(--muted); }
.disc-reason { margin-top: 12px; font-size: 13.5px; color: var(--ink-2); background: var(--accent-soft); border-radius: var(--r-sm); padding: 11px 13px; }
.disc-improves { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.disc-tag { font-size: 11.5px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.disc-tag b { color: var(--gold-ink); font-weight: 650; }
.disclosure { color: var(--muted); font-size: 11.5px; margin: 18px 2px 4px; line-height: 1.5; }

/* leave dialog */
.leave-modal { position: fixed; inset: 0; z-index: 60; background: rgba(6,10,14,.5); display: grid; place-items: center; padding: 24px; animation: fade .16s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.leave-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; max-width: 380px; width: 100%; box-shadow: var(--shadow-lg); }
.leave-card h4 { margin: 0 0 8px; font-size: 18px; }
.leave-card p { margin: 0 0 18px; font-size: 14px; color: var(--ink-2); }
.leave-actions { display: flex; gap: 10px; }
.leave-actions .btn { flex: 1; }

/* ---- Tab bar ---- */
.tabbar { flex: none; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.5) blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar-in { max-width: var(--maxw); margin: 0 auto; display: flex; }
.tab { flex: 1; background: none; border: 0; cursor: pointer; padding: 10px 0 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; font-weight: 550; font-family: inherit; }
.tab .icon { width: 22px; height: 22px; }
.tab[aria-selected="true"] { color: var(--accent); }

/* ---- Sheet ---- */
.sheet { position: fixed; inset: 0; z-index: 40; background: rgba(6, 10, 14, .5); display: flex; align-items: flex-end; }
.sheet.hidden { display: none; }
.sheet-panel { background: var(--surface); width: 100%; max-width: var(--maxw); margin: 0 auto; border-radius: 22px 22px 0 0; padding: 8px 18px calc(24px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.sheet-grip { width: 40px; height: 4px; border-radius: 999px; background: var(--line); margin: 8px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { margin: 0; font-size: 18px; }
.detail-face { max-width: 300px; margin: 4px auto 18px; }
.detail-section-h { font-family: var(--mono); text-transform: uppercase; letter-spacing: .13em; font-size: 10.5px; color: var(--muted); margin: 18px 0 8px; }
.rate-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.rate-row:first-of-type { border-top: 0; }
.rate-row .icon { color: var(--muted); width: 18px; height: 18px; flex: 0 0 auto; }
.rate-row .rr-cat { flex: 1; font-size: 14px; }
.rate-row .rr-note { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.rate-row .rr-rate { font-weight: 700; font-size: 14px; }
.rate-row .rr-rate span { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.add-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.add-row:first-of-type { border-top: 0; }
.add-row .ar-face { width: 64px; flex: 0 0 auto; }
.add-row .ar-name { font-weight: 600; font-size: 14px; }
.add-row .ar-sub { color: var(--muted); font-size: 12px; }
.added-pill { font-size: 11px; color: var(--good); font-weight: 600; background: var(--good-soft); padding: 4px 9px; border-radius: 999px; }
.remove-link { display: block; width: 100%; text-align: center; margin-top: 18px; background: none; border: 0; color: var(--warn); font-size: 13px; font-weight: 600; cursor: pointer; padding: 8px; }

.reveal { animation: rise .28s cubic-bezier(.2,.7,.2,1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

/* --------------------------------------------------------------- LEARN ----- */
.frankie-hero { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.frankie-hero-img { width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--gold); background: var(--accent-soft); flex: 0 0 auto; object-fit: cover; }
.frankie { border-radius: 50%; object-fit: cover; background: var(--accent-soft); display: block; }
.frankie.sm { width: 44px; height: 44px; }
.frankie.lg { width: 96px; height: 96px; border: 2px solid var(--gold); }
.learn-section-h { font-family: var(--mono); text-transform: uppercase; letter-spacing: .13em; font-size: 10.5px; color: var(--muted); margin: 22px 0 10px; }

.milestone-grid { display: grid; gap: 10px; }
.milestone { display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; background: var(--surface); transition: border-color .12s; }
.milestone.done { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.milestone.locked { opacity: .82; }
.milestone-face { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; }
.milestone.locked .milestone-face { border-radius: 50%; background: var(--surface-2); border: 1px dashed var(--line); }
.lock-ic { width: 20px; height: 20px; color: var(--muted); }
.milestone-title { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 14.5px; }
.milestone-title .ms-check { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--good); color: #fff; }
.milestone-title .ms-check .icon { width: 12px; height: 12px; stroke-width: 3; }
.milestone-text { color: var(--muted); font-size: 12.5px; margin-top: 3px; line-height: 1.4; }

.lesson-list { display: grid; gap: 8px; }
.lesson-row { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: var(--r-md); padding: 11px 13px; background: var(--surface); color: var(--ink); cursor: pointer; font-family: inherit; transition: border-color .12s, transform .12s; }
.lesson-row:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); transform: translateY(-1px); }
.lesson-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lesson-title { font-weight: 650; font-size: 14.5px; }
.lesson-teaser { color: var(--muted); font-size: 12.5px; }
.lesson-chev { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }

.lesson-detail { padding-top: 4px; }
.lesson-hero { display: flex; justify-content: center; margin: 6px 0 16px; }
.lesson-prose p { font-size: 14.5px; line-height: 1.6; color: var(--ink-2); margin: 0 0 13px; }
.lesson-prose p:last-child { margin-bottom: 0; }

/* ---- Learn: Card Confidence + progress ---- */
.confidence { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; background: var(--surface); margin-bottom: 8px; }
.conf-top { display: flex; align-items: center; gap: 14px; }
.conf-score { display: flex; align-items: baseline; gap: 2px; }
.conf-num { font-family: var(--display); font-size: 34px; line-height: 1; color: var(--accent); }
.conf-den { color: var(--muted); font-size: 14px; font-weight: 600; }
.conf-title { font-weight: 700; font-size: 15px; }
.conf-sub { color: var(--muted); font-size: 12px; margin-top: 2px; max-width: 34ch; }
.conf-tracks { display: grid; gap: 10px; margin: 15px 0 4px; }
.conf-track-h { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); font-weight: 600; margin-bottom: 5px; }
.conf-max { color: var(--muted); font-weight: 500; }
.conf-bar { height: 7px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.conf-bar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width .5s cubic-bezier(.2,.7,.2,1); }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.badge.on { color: var(--gold-ink); background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.badge .icon { width: 12px; height: 12px; stroke-width: 3; }

.lesson-row.read .lesson-title { color: var(--muted); }
.read-tick { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--good); color: #fff; margin-left: 6px; vertical-align: middle; }
.read-tick .icon { width: 11px; height: 11px; stroke-width: 3.2; }
.lesson-cta { margin-top: 20px; }
.lesson-done-note { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--good); font-weight: 600; font-size: 13.5px; }
.lesson-done-note .icon { width: 16px; height: 16px; stroke-width: 2.5; }

.toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 10px; max-width: min(92vw, 420px);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 999px; padding: 8px 16px 8px 8px;
  font-size: 13.5px; font-weight: 600; color: var(--ink); transition: opacity .4s; }
.toast .frankie.sm { width: 34px; height: 34px; }
