:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --border: #e3e6ef;
  --text: #1a1d29;
  --muted: #6b7280;
  --brand: #4f46e5;
  --brand-2: #7c3aed;
  --brand-soft: #eef0ff;
  --good: #16a34a;
  --bad: #dc2626;
  --warn: #d97706;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(20,20,50,.06), 0 8px 24px rgba(20,20,50,.06);
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1016;
    --surface: #171a22;
    --surface-2: #1e2230;
    --border: #2a2f3d;
    --text: #e8eaf1;
    --muted: #9aa1b2;
    --brand: #7c82ff;
    --brand-2: #a78bfa;
    --brand-soft: #1e2140;
    --shadow: 0 1px 3px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1 { font-size: 1.35rem; margin: 0 0 2px; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.hidden { display: none !important; }

.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; min-height: 100dvh; }

/* Sidebar */
.nav {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 18px; position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; padding: 4px 8px; }
.logo { font-size: 1.4rem; }
.tabs { display: flex; flex-direction: column; gap: 4px; }
.tab {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: none; background: none;
  color: var(--text); font-size: .98rem; border-radius: 12px; cursor: pointer; text-align: left; transition: background .15s;
}
.tab span { font-size: 1.15rem; width: 22px; text-align: center; }
.tab:hover { background: var(--surface-2); }
.tab.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.nav-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 8px; }
.streak { font-weight: 700; }

/* Main */
.main { padding: 26px 30px 40px; max-width: 920px; width: 100%; }
.view { display: none; }
.view.active { display: block; animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.vhead { margin-bottom: 18px; }
.vhead p { margin: 0; }

/* Fields */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-weight: 600; font-size: .9rem; }
input[type=text], textarea, select {
  width: 100%; padding: 11px 13px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); font-size: .98rem; font-family: inherit;
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
textarea { resize: vertical; }
.big-text { min-height: 150px; }

/* Buttons */
button { font-family: inherit; }
.primary, .send {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: none;
  padding: 11px 20px; border-radius: 12px; font-weight: 600; cursor: pointer; font-size: .96rem;
}
.primary:hover, .send:hover { filter: brightness(1.05); }
.primary:disabled, .send:disabled { opacity: .55; cursor: default; }
.ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 9px 16px; border-radius: 12px; cursor: pointer; font-weight: 500; }
.ghost:hover { background: var(--surface-2); }
.danger { background: var(--surface); border: 1px solid var(--bad); color: var(--bad); padding: 9px 16px; border-radius: 12px; cursor: pointer; font-weight: 500; }
.danger:hover { background: var(--bad); color: #fff; }
.icon-btn { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer; flex: none; }
.icon-btn.rec { background: var(--bad); color: #fff; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(220,38,38,.5);} 50% { box-shadow: 0 0 0 8px rgba(220,38,38,0);} }
.row-actions { display: flex; align-items: center; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Chat */
.chat-setup { margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 13px; font-size: .85rem; cursor: pointer; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chat-log { display: flex; flex-direction: column; gap: 12px; min-height: 220px; padding: 8px 0 14px; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 16px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.msg .tip { display: block; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); color: var(--warn); font-size: .9rem; }
.msg-tools { display: flex; gap: 10px; margin-top: 6px; }
.msg-tools button { background: none; border: none; cursor: pointer; font-size: .8rem; color: var(--muted); padding: 0; }
.msg-tools button:hover { color: var(--brand); }
.composer { display: flex; gap: 10px; align-items: flex-end; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 8px; box-shadow: var(--shadow); }
.composer textarea { border: none; background: none; padding: 10px; max-height: 140px; }
.composer textarea:focus { outline: none; }

/* Results */
.result { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 10px; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.score-ring { display: flex; align-items: center; gap: 16px; }
.ring { --p: 0; width: 72px; height: 72px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--surface-2) 0);
  display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.ring::before { content: ""; position: absolute; width: 54px; height: 54px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; }
.err { border-left: 3px solid var(--bad); padding: 8px 12px; margin-bottom: 8px; background: var(--surface-2); border-radius: 8px; }
.err .o { color: var(--bad); text-decoration: line-through; }
.err .f { color: var(--good); font-weight: 600; }
.err .t { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-left: 6px; }
.err .e { display: block; margin-top: 4px; color: var(--muted); font-size: .9rem; }
.natural { line-height: 1.6; }
ins { background: rgba(22,163,74,.18); text-decoration: none; border-radius: 3px; padding: 0 2px; }
del { background: rgba(220,38,38,.14); border-radius: 3px; padding: 0 2px; }

/* Flashcards */
.vocab-maker { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.vocab-maker input { flex: 1; min-width: 200px; }
.decks { display: flex; flex-direction: column; gap: 12px; }
.deck { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.deck .meta { flex: 1; min-width: 160px; }
.deck .meta b { font-size: 1.02rem; }
.deck .due { background: var(--brand-soft); color: var(--brand); border-radius: 999px; padding: 3px 11px; font-size: .8rem; font-weight: 700; }
.flashcard { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 34px 24px; text-align: center; min-height: 240px; display: flex; flex-direction: column; justify-content: center; gap: 10px; cursor: pointer; user-select: none; }
.flashcard .word { font-size: 2rem; font-weight: 800; }
.flashcard .ipa { font-family: var(--mono); color: var(--brand); font-size: 1.05rem; }
.flashcard .pos { color: var(--muted); font-size: .85rem; }
.flashcard .back { border-top: 1px dashed var(--border); margin-top: 8px; padding-top: 14px; }
.flashcard .mean { font-size: 1.3rem; font-weight: 700; }
.flashcard .ex { color: var(--muted); margin-top: 8px; line-height: 1.5; }
.study-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.grade-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 14px; }
.grade-row button { padding: 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; font-weight: 600; }
.grade-row .g0 { color: var(--bad); border-color: var(--bad); }
.grade-row .g1 { color: var(--warn); border-color: var(--warn); }
.grade-row .g2 { color: var(--good); border-color: var(--good); }
.progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--brand); }

/* Speak */
.speak-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.speak-sentence { font-size: 1.5rem; font-weight: 700; line-height: 1.4; text-align: center; margin-bottom: 18px; }
.speak-sentence w { padding: 0 2px; border-radius: 4px; }
.speak-sentence w.ok { color: var(--good); }
.speak-sentence w.no { color: var(--bad); background: rgba(220,38,38,.12); }
.speak-vi { text-align: center; color: var(--muted); font-size: 1rem; margin: -6px 0 14px; line-height: 1.5; }
.speak-controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 14px; }
.heard { margin-top: 14px; padding: 12px 16px; background: var(--surface-2); border-radius: 12px; }
.heard b { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.wordtip { display: inline-block; margin: 3px; padding: 4px 9px; border-radius: 8px; font-size: .85rem; background: rgba(220,38,38,.12); color: var(--bad); }
.revise { display: flex; flex-wrap: wrap; gap: 10px; }
.reviseword { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--bad); color: var(--bad); border-radius: 12px; padding: 9px 13px; cursor: pointer; font-weight: 700; }
.reviseword:hover { background: rgba(220,38,38,.1); }
.reviseword span { color: var(--muted); font-weight: 400; font-size: .82rem; }

/* Plan / Home */
.hero { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.hero h2 { margin: 0 0 6px; font-size: 1.3rem; }
.hero p { margin: 0; opacity: .92; }
.lvl-badges { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.lvl-badge { background: rgba(255,255,255,.18); border-radius: 12px; padding: 8px 14px; font-size: .85rem; }
.lvl-badge b { display: block; font-size: 1.2rem; }
.plan-today { margin-top: 18px; }
.plan-today h3 { font-size: 1.05rem; margin: 0 0 4px; }
.task { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-top: 10px; box-shadow: var(--shadow); }
.task.done { opacity: .6; }
.task .tick { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); flex: none; display: grid; place-items: center; cursor: pointer; font-size: .9rem; }
.task.done .tick { background: var(--good); border-color: var(--good); color: #fff; }
.task .icon { font-size: 1.5rem; flex: none; }
.task .body { flex: 1; min-width: 0; }
.task .body b { display: block; }
.task .body span { color: var(--muted); font-size: .85rem; }
.task .go { flex: none; }
.setup-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.topic-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.topic-pick .chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.steps { display: flex; gap: 8px; margin-bottom: 18px; }
.steps .dot { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-2); }
.steps .dot.on { background: var(--brand); }
.tprog { height: 5px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-top: 7px; }
.tprog > i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.goal-card h3 { margin-bottom: 8px; }
.week-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; text-align: center; }
.week-stats b { display: block; font-size: 1.45rem; color: var(--brand); }
.week-stats span { color: var(--muted); font-size: .8rem; }
.goal-grid { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.goal-grid select { flex: 1; min-width: 86px; width: auto; }
.goal-grid #goalWeeks { flex-basis: 100%; flex-grow: 0; }
.goal-arrow { color: var(--muted); font-weight: 700; }
.goal-out { margin: 12px 0; }
.warn-txt { color: var(--warn); font-size: .85rem; line-height: 1.5; }
.coach-advice { margin-top: 12px; }
.coach-advice p { margin: 6px 0; line-height: 1.55; }
.coach-advice ul { margin: 8px 0; padding-left: 20px; }
.coach-advice li { margin: 5px 0; line-height: 1.5; }

/* Listen */
.listen-maker { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.ls-transcript { margin-top: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; line-height: 1.75; }
.ls-diff { line-height: 1.75; font-size: 1.05rem; }
.opt.correct { border-color: var(--good); background: rgba(22,163,74,.12); color: var(--good); font-weight: 600; }
.opt.wrong { border-color: var(--bad); background: rgba(220,38,38,.1); color: var(--bad); }
.primary.rec, .send.rec { background: var(--bad); animation: pulse 1s infinite; }

/* Placement test */
.q { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.q .stem { font-weight: 600; margin-bottom: 10px; }
.q .stem i { color: var(--muted); font-weight: 400; font-size: .8rem; margin-left: 6px; text-transform: uppercase; letter-spacing: .04em; }
.opts { display: grid; gap: 8px; }
.opt { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.opt:hover { border-color: var(--brand); }
.opt.sel { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.opt input { width: auto; }

/* Tappable words */
.tok { cursor: pointer; border-radius: 3px; transition: background .12s; }
.tok:hover { background: var(--brand-soft); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 2px; }
.speak-sentence w { cursor: pointer; }

/* Word sheet (bottom sheet) */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet.hidden { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.42); animation: fade .18s ease; }
.sheet-card { position: relative; background: var(--surface); width: 100%; max-width: 520px; border-radius: 22px 22px 0 0; padding: 20px 22px calc(22px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 44px rgba(0,0,0,.32); animation: sheetup .22s ease; max-height: 82vh; overflow: auto; }
@keyframes sheetup { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grab { width: 42px; height: 5px; border-radius: 999px; background: var(--border); margin: -6px auto 14px; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.sheet-head .sw { font-size: 1.6rem; font-weight: 800; line-height: 1.1; }
.sheet-head .sipa { color: var(--brand); font-family: var(--mono); font-size: .95rem; margin-top: 2px; }
.sheet-head .sipa b { color: var(--muted); font-family: inherit; font-weight: 500; }
.sheet-head .sp { margin-left: auto; display: flex; gap: 8px; flex: none; }
.sbtn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); font-size: 1.2rem; cursor: pointer; flex: none; }
.sbtn.play { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: none; }
.smean { font-size: 1.15rem; font-weight: 600; margin: 16px 0 4px; }
.sforms { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.sform { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 7px 11px; font-size: .88rem; }
.sform b { color: var(--brand); }
.sform .lbl { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.sex { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; line-height: 1.55; margin-top: 6px; }
.sex .en { font-weight: 500; }
.sex .vi { color: var(--muted); }
.ssave { margin-top: 16px; width: 100%; }

/* Loading */
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: rot .7s linear infinite; vertical-align: -3px; }
@keyframes rot { to { transform: rotate(360deg); } }
.typing { color: var(--muted); font-style: italic; }

/* Toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--text); color: var(--bg); padding: 11px 20px; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; font-size: .9rem; max-width: 90vw; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.mobile-tabs { display: none; }

/* Auth gates */
.gate { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: flex; align-items: center; justify-content: center; padding: 24px; }
.gate.hidden { display: none; }
.gate-spin { width: 42px; height: 42px; border: 3px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: rot .8s linear infinite; }
.login-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 38px 30px; box-shadow: var(--shadow); text-align: center; max-width: 360px; width: 100%; }
.login-logo { font-size: 3rem; }
.login-card h1 { margin: 10px 0 4px; }
.gbtn-wrap { display: flex; justify-content: center; margin: 22px 0 8px; min-height: 44px; }
#loginMsg { color: var(--warn); min-height: 1em; }

/* Account + admin */
.account { display: flex; align-items: center; gap: 12px; background: var(--surface-2); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; object-fit: cover; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 1.2rem; }
.account-info { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }
.account-info b, .account-info span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account .danger { padding: 7px 12px; flex: none; }
.allow-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.allow-row { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); border-radius: 8px; padding: 7px 12px; }
.allow-row button { background: none; border: none; color: var(--bad); cursor: pointer; font-size: 1rem; }

/* Responsive */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .nav { display: none; }
  .main { padding: 14px 15px calc(66px + env(safe-area-inset-bottom)); max-width: 100%; }

  h1 { font-size: 1.2rem; }
  .vhead { margin-bottom: 14px; }
  .vhead p { font-size: .88rem; }

  /* Prevent iOS zoom-on-focus: form fields must render at >=16px */
  input[type=text], textarea, select { font-size: 16px; }

  /* Bottom tab bar */
  .mobile-tabs {
    display: grid; grid-template-columns: repeat(6,1fr); position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 5px 2px calc(4px + env(safe-area-inset-bottom)); z-index: 40;
  }
  .mtab { background: none; border: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .62rem; line-height: 1; padding: 5px 0; cursor: pointer; white-space: nowrap; border-radius: 10px; }
  .mtab span { font-size: 1.3rem; }
  .mtab.active { color: var(--brand); }

  /* Chat becomes an app-like column: header fixed, log scrolls, composer pinned at the bottom */
  #view-chat.active { display: flex; flex-direction: column; height: calc(100dvh - 80px - env(safe-area-inset-bottom)); }
  #view-chat .vhead { margin-bottom: 8px; }
  #view-chat .vhead, #view-chat .chat-setup, #view-chat .composer, #view-chat .row-actions { flex: none; }
  #view-chat .chat-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 0; }
  #view-chat .composer { box-shadow: 0 -4px 20px rgba(0,0,0,.1); }
  #view-chat .row-actions { margin-top: 8px; }
  .msg { max-width: 88%; }

  /* Home / plan */
  .hero { padding: 18px; }
  .hero h2 { font-size: 1.15rem; }
  .lvl-badge { padding: 7px 12px; }
  .task { flex-wrap: wrap; }
  .task .body { flex: 1 1 60%; min-width: 0; }
  .task .go { flex: 0 0 auto; margin-left: auto; }
  .setup-card { padding: 18px; }

  /* Activities */
  .speak-sentence { font-size: 1.2rem; overflow-wrap: break-word; }
  .flashcard { padding: 28px 18px; min-height: 210px; }
  .flashcard .word { font-size: 1.7rem; }
  .grade-row { gap: 8px; }
  .grade-row button { padding: 12px 4px; font-size: .9rem; }
  .vocab-maker { gap: 8px; }
  .vocab-maker input, .vocab-maker select, .vocab-maker button { min-width: 100%; }

  /* Keep toast above the tab bar */
  .toast { bottom: calc(72px + env(safe-area-inset-bottom)); }
}

@supports (backdrop-filter: blur(6px)) {
  @media (max-width: 760px) {
    .mobile-tabs { background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); }
  }
}
