/* Coding Foundations · Option B "Umaga": daylight frosted glass over blurred navy + gold light.
   Mono (JetBrains Mono) is only for tokens, counters and small labels. */
:root {
  --navy: #0A1A2F; --gold: #DFA92E; --gold-ink: #7A5810; --ink-2: #33415A; --muted: #556072;
  --ok: #1F7A4D; --prog: #2F5E9E;
  --bg: #E6EBF1;
  --glass: rgba(255,255,255,.55); --glass-strong: rgba(255,255,255,.7); --glass-solid: rgba(255,255,255,.9);
  --sheen: linear-gradient(115deg, rgba(255,255,255,.6) 0%, rgba(255,255,255,0) 40%);
  --edge: inset 0 1px 0 rgba(255,255,255,.95), inset 0 0 0 1px rgba(255,255,255,.55);
  --lift: 0 1px 2px rgba(10,26,47,.06), 0 16px 36px -16px rgba(10,26,47,.28);
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); background: var(--bg); color: var(--navy); margin: 0; min-height: 100vh; overflow-x: hidden; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: rgba(230,235,241,.9); z-index: 40; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip:focus { top: calc(10px + env(safe-area-inset-top, 0px)); }
[hidden] { display: none !important; }

/* the light behind the glass + a very faint dot grid (opacity well under 6%) */
.light { position: fixed; border-radius: 50%; filter: blur(80px); z-index: -2; pointer-events: none; }
.light.l1 { width: 46vmax; height: 46vmax; background: var(--navy); opacity: .32; top: -18vmax; left: -14vmax; }
.light.l2 { width: 38vmax; height: 38vmax; background: var(--gold); opacity: .5; bottom: -14vmax; right: -10vmax; }
.light.l3 { width: 30vmax; height: 30vmax; background: #7FA6D6; opacity: .45; top: 38%; right: 22%; }
.dots { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: radial-gradient(var(--navy) 1px, transparent 1.2px); background-size: 22px 22px; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; padding: 8px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); }
.topbar-in { max-width: 980px; margin: 0 auto; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: 18px;
  background: var(--sheen), var(--glass-strong); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); box-shadow: var(--edge), var(--lift); }
.brand { display: flex; align-items: center; gap: 8px; color: var(--navy); text-decoration: none; min-height: 44px; min-width: 0; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 600; flex: none; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topnav { display: none; }
.bits-chip { margin-left: auto; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 12px 4px 4px; border-radius: 999px; text-decoration: none; color: var(--navy);
  background: rgba(255,255,255,.7); box-shadow: inset 0 0 0 1px rgba(10,26,47,.1); font-size: 12.5px; white-space: nowrap; flex: none; }
.bits-chip b { font-weight: 600; display: inline-block; min-width: 2ch; text-align: right; }
.mini-av { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; flex: none; display: block; }
.mini-av svg { width: 100%; height: 100%; display: block; }
@media (max-width: 420px) { .brand-name { display: none; } }
@media (min-width: 860px) {
  .topnav { display: flex; gap: 2px; margin-left: 8px; }
  .topnav a { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; }
  .topnav a .ic { width: 18px; height: 18px; }
  .topnav a:hover { background: rgba(255,255,255,.6); }
  .topnav a[aria-current="page"] { background: rgba(255,255,255,.85); color: var(--navy); box-shadow: inset 0 0 0 1px rgba(10,26,47,.08); }
}
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- bottom tab bar (mobile) ---------- */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + var(--safe-b)) max(8px, env(safe-area-inset-left, 0px));
  background: var(--sheen), var(--glass-strong); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 -10px 30px -18px rgba(10,26,47,.35); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; border-radius: 14px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 600; }
.tabbar a[aria-current="page"] { color: var(--navy); background: rgba(255,255,255,.75); }
.tabbar a[aria-current="page"] .ic { stroke: var(--gold-ink); }
@media (min-width: 860px) { .tabbar { display: none; } }

/* ---------- layout ---------- */
main { max-width: 880px; margin: 0 auto; padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(var(--tabbar-h) + 96px + var(--safe-b)) max(16px, env(safe-area-inset-left, 0px)); }
@media (min-width: 860px) { main { padding-bottom: 96px; } }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.08; margin: 4px 0 10px; }
h2 { font-size: 24px; margin: 44px 0 14px; }
p { line-height: 1.6; color: var(--ink-2); }
a { color: var(--navy); }
.kicker { color: var(--gold-ink); font-size: 14px; font-weight: 600; margin: 0; }
.kicker.prompt { font-family: var(--mono); font-size: 13px; font-weight: 400; }
.kicker.prompt::before { content: "> "; }
.kicker.prompt::after { content: ""; display: inline-block; width: .55em; height: 1.05em; margin-left: 3px; vertical-align: -.15em; background: var(--gold-ink); animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.page-head { margin-bottom: 18px; }
.page-head p { margin: 0; max-width: 60ch; }
.back { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--gold-ink); }
section.cat h2::before { content: attr(data-n); font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--muted); opacity: .8; display: block; margin-bottom: 2px; letter-spacing: 0; }

/* ---------- glass surfaces ---------- */
.glass, .bot, .decoder, .card, .continue, .level, .panel, .premium-card, .shop-item, .otto, .sheet, .tour-card, .toast {
  background: var(--sheen), var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: var(--edge), var(--lift); border: 0;
}
.bot, .decoder, .continue, .panel { border-radius: 20px; padding: 20px; margin-top: 18px; }
.decoder, .continue { background: var(--sheen), var(--glass-strong); }
.decoder h2 { margin-top: 0; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
input[type="text"] { width: 100%; min-height: 46px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--navy); background: rgba(255,255,255,.8); border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(10,26,47,.12); transition: box-shadow .15s ease-out; }
input[type="text"]:focus { outline: none; box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 4px rgba(223,169,46,.2); }
.term-row { display: flex; gap: 8px; }
.term-row input { flex: 1; min-width: 0; }
button { font: inherit; }
.go, .ghost, .install-btn { min-height: 46px; border: 0; border-radius: 12px; padding: 0 20px; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .12s ease-out, filter .15s ease-out, background .15s ease-out; }
.go, .install-btn { background: var(--gold); color: var(--navy); }
.go:hover, .install-btn:hover { filter: brightness(1.05); }
.go:disabled { background: rgba(10,26,47,.1); color: var(--muted); cursor: not-allowed; filter: none; }
.ghost { background: rgba(255,255,255,.7); color: var(--navy); box-shadow: inset 0 0 0 1px rgba(10,26,47,.12); }
.go:active, .ghost:active, .chip:active, .mark:active, .install-btn:active { transform: scale(.97); }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.install-row { margin-top: 12px; }
#decoder-result { display: none; margin-top: 16px; padding-top: 12px; box-shadow: inset 0 1px 0 rgba(10,26,47,.08); }
.lbl { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gold-ink); margin: 14px 0 4px; }
.sents { margin: 6px 0; padding-left: 20px; line-height: 1.6; color: var(--ink-2); }
.area { color: var(--muted); font-size: 13px; margin-top: -6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; border: 0; background: rgba(255,255,255,.75); color: var(--navy); box-shadow: inset 0 0 0 1px rgba(10,26,47,.14); border-radius: 999px; padding: 0 14px; font-size: 13.5px; cursor: pointer; transition: transform .12s ease-out, background .15s ease-out; text-align: left; }
.chip:hover { background: #fff; }

/* ---------- topic cards ---------- */
.grid { display: grid; gap: 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: 1fr 1fr; } }
.card { position: relative; border-radius: 18px; padding: 18px; min-width: 0; display: flex; flex-direction: column;
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%); transition: box-shadow .2s ease-out; }
.card:hover, .card:focus-within { box-shadow: var(--edge), inset 3px 0 0 var(--gold), var(--lift); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card h3 { margin: 0; font-size: 19px; }
.card p { font-size: 14.5px; }
.pill { font-size: 11px; background: rgba(10,26,47,.07); color: var(--navy); border-radius: 999px; padding: 4px 9px; white-space: nowrap; }
.pill[data-status="in_progress"] { background: rgba(47,94,158,.12); color: var(--prog); }
.pill[data-status="completed"] { background: rgba(31,122,77,.13); color: var(--ok); }
.conn { color: var(--ink-2); font-size: 14px; }
.card-actions { position: relative; margin-top: auto; padding-top: 10px; display: flex; align-items: center; gap: 10px; }
.mark { min-height: 44px; padding: 0 14px; border-radius: 12px; border: 0; cursor: pointer; font-family: var(--mono); font-size: 13px;
  background: rgba(255,255,255,.75); color: var(--navy); box-shadow: inset 0 0 0 1px rgba(10,26,47,.16); transition: transform .12s ease-out, background .15s ease-out; }
.mark:hover { background: #fff; }
.mark.done { background: rgba(31,122,77,.1); color: var(--ok); box-shadow: inset 0 0 0 1px rgba(31,122,77,.25); cursor: default; }
.held { font-size: 12px; color: var(--muted); }
.float { position: absolute; left: 14px; top: -6px; font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--gold-ink); pointer-events: none; animation: floatUp .25s ease-out forwards, fadeOut .25s ease-out .9s forwards; }
@keyframes floatUp { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(-14px); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.flash { box-shadow: var(--edge), inset 3px 0 0 var(--gold), 0 0 0 3px rgba(223,169,46,.55), var(--lift) !important; }
footer { color: var(--muted); font-size: 13px; margin-top: 48px; text-align: center; }

/* ---------- continue card ---------- */
.continue { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.continue .ct { flex: 1 1 220px; min-width: 0; }
.continue .ct p { margin: 0; }
.continue .ct .meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.continue .ct strong { font-family: var(--display); font-size: 20px; display: block; margin: 2px 0; }

/* ---------- roadmap (commit graph) ---------- */
.roadmap { list-style: none; margin: 0; padding: 0 0 0 30px; position: relative; display: flex; flex-direction: column; gap: 14px; }
.roadmap::before { content: ""; position: absolute; left: 10px; top: 18px; bottom: 18px; width: 2px; background: rgba(10,26,47,.14); border-radius: 2px; }
.level { position: relative; border-radius: 18px; }
.level::before { content: ""; position: absolute; left: -26px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px var(--navy); }
.level.done::before { background: var(--gold); box-shadow: 0 0 0 2px var(--gold-ink); }
.level.locked { opacity: .72; }
.level.locked::before { box-shadow: 0 0 0 2px rgba(10,26,47,.3); }
.level > details > summary { list-style: none; cursor: pointer; padding: 16px 18px; display: grid; gap: 4px; border-radius: 18px; }
.level > details > summary::-webkit-details-marker { display: none; }
.lv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lv-num { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.lv-title { font-family: var(--display); font-size: 20px; font-weight: 700; margin: 0; }
.lv-why { margin: 0; font-size: 14px; }
.lv-meta { display: flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.bar { flex: 1; height: 6px; border-radius: 6px; background: rgba(10,26,47,.1); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 6px; transition: width .25s ease-out; }
.token { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 999px; background: rgba(10,26,47,.07); white-space: nowrap; }
.token.lock { color: var(--muted); }
.steps { list-style: none; margin: 0; padding: 0 12px 12px; display: grid; gap: 4px; }
.steps button { width: 100%; min-height: 44px; display: flex; align-items: center; gap: 10px; text-align: left; padding: 6px 10px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; color: var(--navy); }
.steps button:hover { background: rgba(255,255,255,.65); }
.steps .sn { font-family: var(--mono); font-size: 12px; color: var(--muted); width: 54px; flex: none; }
.steps .st { flex: 1; min-width: 0; font-weight: 600; font-size: 14.5px; }
.steps .pill { flex: none; }

/* ---------- avatar shop ---------- */
.shop-top { display: grid; gap: 16px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 640px) { .shop-top { grid-template-columns: 220px 1fr; } }
.av-big { width: 100%; max-width: 220px; aspect-ratio: 1; margin: 0 auto; }
.av-big svg { width: 100%; height: 100%; display: block; }
.shop-info h2 { margin: 0 0 4px; font-family: var(--mono); font-size: 18px; font-weight: 600; }
.shop-info p { margin: 0 0 12px; }
.shop-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.short { font-size: 13.5px; color: #8A2E1E; margin: 8px 0 0; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 8px; margin: 18px 0 6px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer; background: rgba(255,255,255,.6); color: var(--ink-2); font-weight: 600; font-size: 13.5px; box-shadow: inset 0 0 0 1px rgba(10,26,47,.1); }
.cats button[aria-pressed="true"] { background: var(--navy); color: #fff; box-shadow: none; }
.items { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(102px, 1fr)); }
.shop-item { border-radius: 16px; padding: 8px 8px 10px; cursor: pointer; text-align: center; display: grid; gap: 4px; color: var(--navy); min-width: 0; }
.shop-item svg { width: 100%; aspect-ratio: 1; display: block; border-radius: 50%; }
.shop-item .nm { font-family: var(--mono); font-size: 11.5px; overflow-wrap: anywhere; line-height: 1.3; }
.shop-item .pr { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.shop-item[aria-pressed="true"] { box-shadow: var(--edge), inset 0 0 0 2px var(--gold), var(--lift); }
.shop-item .pr.rare { color: var(--gold-ink); }
.premium-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 18px; padding: 16px 18px; border-radius: 18px; text-decoration: none; }
.premium-link strong { font-family: var(--display); font-size: 18px; }
.premium-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.premium-card { border-radius: 20px; padding: 16px; display: grid; gap: 8px; align-content: start; }
.premium-card .av-big { max-width: 160px; }
.premium-card h2 { margin: 0; font-size: 20px; }
.premium-card p { margin: 0; font-size: 14px; }
.premium-card.is-locked .av-big { filter: saturate(.55); opacity: .85; }

/* ---------- profile ---------- */
.prof-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.prof-top .av-big { max-width: 120px; margin: 0; }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { border-radius: 16px; padding: 14px; background: rgba(255,255,255,.55); box-shadow: inset 0 0 0 1px rgba(255,255,255,.7); }
.stat b { display: block; font-family: var(--mono); font-size: 22px; font-weight: 600; }
.stat span { font-size: 12.5px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { font-family: var(--mono); font-size: 12px; padding: 7px 11px; border-radius: 999px; background: rgba(223,169,46,.18); color: var(--gold-ink); }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.confirm-inline { margin-top: 12px; padding: 14px; border-radius: 14px; background: rgba(138,46,30,.07); }
.confirm-inline p { margin: 0 0 10px; color: #6E2618; }
.danger { background: #8A2E1E; color: #fff; }

/* ---------- Otto ---------- */
.otto-fab { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(var(--tabbar-h) + 16px + var(--safe-b)); z-index: 35; width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--sheen), var(--glass-strong); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); box-shadow: var(--edge), var(--lift); color: var(--navy); font-size: 14px; font-weight: 600; transition: transform .12s ease-out; }
.otto-fab span { display: grid; place-items: center; width: 40px; height: 40px; margin: auto; border-radius: 50%; background: var(--gold); }
.otto-fab:active { transform: scale(.95); }
@media (min-width: 860px) { .otto-fab { bottom: 24px; } }
.otto-face { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: 12px; font-weight: 600; flex: none; }
dialog.otto { padding: 0; width: min(420px, calc(100vw - 24px)); max-height: min(640px, calc(100dvh - 120px)); border-radius: 22px; color: var(--navy);
  background: var(--sheen), var(--glass-solid); margin: auto max(12px, env(safe-area-inset-right, 0px)) calc(var(--tabbar-h) + 84px + var(--safe-b)) auto; flex-direction: column; overflow: hidden; }
dialog.otto[open] { display: flex; animation: pop .2s ease-out; transform-origin: bottom right; }
@media (min-width: 860px) { dialog.otto { margin-bottom: 92px; } }
dialog.otto::backdrop { background: rgba(10,26,47,.25); }
@keyframes pop { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: none; } }
.otto-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px 16px; box-shadow: inset 0 -1px 0 rgba(10,26,47,.06); }
.otto-head h2 { margin: 0; font-size: 18px; }
.otto-head p { margin: 0; font-size: 12.5px; color: var(--muted); }
.icon-btn { margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(10,26,47,.06); cursor: pointer; font-size: 16px; color: var(--navy); }
.otto-log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.msg { max-width: 88%; padding: 10px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.msg p { margin: 0; color: inherit; }
.msg ol, .msg ul { margin: 6px 0 0; padding-left: 20px; }
.msg.bot { background: rgba(255,255,255,.95); box-shadow: inset 0 0 0 1px rgba(10,26,47,.07); border-bottom-left-radius: 6px; }
.msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 6px; }
.msg .go, .msg .ghost { margin-top: 8px; min-height: 44px; font-size: 14px; }
.otto-chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 14px; scrollbar-width: none; }
.otto-chips::-webkit-scrollbar { display: none; }
.otto-chips .chip { flex: none; }
.otto-form { display: flex; gap: 8px; padding: 8px 12px 12px; }
.otto-form input { flex: 1; min-width: 0; }

/* ---------- sheet, tour, toasts ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; display: grid; align-items: end; justify-items: center; background: rgba(10,26,47,.3); padding: 12px max(12px, env(safe-area-inset-right, 0px)) calc(12px + var(--safe-b)) max(12px, env(safe-area-inset-left, 0px)); }
@media (min-width: 640px) { .sheet-wrap { align-items: center; } }
.sheet { width: min(420px, 100%); border-radius: 22px; padding: 20px; background: var(--sheen), var(--glass-solid); animation: pop .2s ease-out; }
.sheet h2, .tour-card h2 { margin: 0 0 6px; font-size: 21px; }
.sheet p, .tour-card p { margin: 0 0 14px; }
.sheet-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.tour { position: fixed; inset: 0; z-index: 70; }
.spot { position: fixed; border-radius: 16px; box-shadow: 0 0 0 9999px rgba(10,26,47,.45); transition: all .25s ease-out; pointer-events: none; }
.tour-card { position: fixed; left: 50%; transform: translateX(-50%); width: min(380px, calc(100vw - 24px)); border-radius: 22px; padding: 18px; background: var(--sheen), var(--glass-solid); }
.tour-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.tour-top p { margin: 0; font-size: 12px; color: var(--muted); }
.toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 84px + var(--safe-b)); z-index: 80; display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
@media (min-width: 860px) { .toasts { bottom: 24px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 14px; border-radius: 16px; background: var(--sheen), rgba(255,255,255,.96); font-size: 14px; animation: pop .2s ease-out; }
.toast p { margin: 0; flex: 1; color: var(--navy); }
.toast .ghost { min-height: 40px; padding: 0 12px; font-size: 13px; }
.tick { color: var(--ok); font-weight: 700; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bot, .decoder, .card, .continue, .level, .panel, .premium-card, .shop-item, .topbar-in, .tabbar, .otto-fab { background: var(--sheen), rgba(255,255,255,.9); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Situation / error / troubleshoot box (added 2026-11-18) */
.sit { margin: 14px 0 2px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.6); box-shadow: inset 3px 0 0 var(--prog), inset 0 0 0 1px rgba(10,26,47,.08); }
.sit[data-kind="error"] { box-shadow: inset 3px 0 0 #B5534A, inset 0 0 0 1px rgba(10,26,47,.08); }
.sit[data-kind="troubleshoot"] { box-shadow: inset 3px 0 0 var(--gold), inset 0 0 0 1px rgba(10,26,47,.08); }
.sit .lbl { margin-top: 2px; }
.sit .lbl + p { margin-top: 0; }
.sit p { margin: 6px 0; }
.sit[data-kind="error"] > .lbl:first-child { color: #9A3F37; }
.sit[data-kind="situation"] > .lbl:first-child { color: var(--prog); }
.err { margin: 8px 0; padding: 9px 11px; border-radius: 10px; background: var(--navy); color: #F2D48A; font-size: 12.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
.err code { font: inherit; }
.do { margin: 4px 0 2px; padding-left: 20px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.do li { margin: 3px 0; }
.do li.warn { color: #8A3A33; }
.do li.warn b { letter-spacing: .03em; }
