/* Tiếng Việt — Daily Flashcards. Mobile-first, dark-mode default. */
:root {
  color-scheme: dark;
  --bg: #0f1420;
  --surface: #1a2130;
  --surface2: #232c40;
  --text: #e8ecf4;
  --muted: #8b95a8;
  --accent: #e8443a;      /* Vietnam red */
  --accent2: #ffd54a;     /* star yellow */
  --good: #4ade80;
  --bad: #f87171;
  --radius: 16px;
}
body.light {
  color-scheme: light;
  --bg: #f5f2ec;
  --surface: #ffffff;
  --surface2: #ece7dd;
  --text: #1c2230;
  --muted: #6b7280;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  transition: background .25s, color .25s;
}
#app { max-width: 520px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); min-height: 100vh; display: flex; flex-direction: column; }

.view { display: none; flex-direction: column; gap: 16px; flex: 1; }
.view.active { display: flex; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; }
.topbar h1 { font-size: 1.35rem; }
.icon-btn {
  background: var(--surface); border: none; color: var(--text);
  font-size: 1.15rem; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
}

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 18px 8px; text-align: center; display: flex; flex-direction: column; gap: 6px;
}
.stat-num { font-size: 2rem; font-weight: 700; color: var(--accent2); }
.stat-label { font-size: .78rem; color: var(--muted); }

.btn-primary {
  background: var(--accent); color: #fff; border: none;
  font-size: 1.15rem; font-weight: 700; padding: 20px;
  border-radius: var(--radius); cursor: pointer; min-height: 64px;
  transition: transform .08s, filter .15s;
}
.btn-primary:active { transform: scale(.97); }
.btn-primary:disabled { filter: grayscale(.6); opacity: .6; }
.btn-secondary {
  background: var(--surface); color: var(--text); border: none;
  font-size: 1.05rem; font-weight: 600; padding: 16px;
  border-radius: var(--radius); cursor: pointer; min-height: 56px;
}
.sync-status { text-align: center; font-size: .8rem; color: var(--muted); min-height: 1.2em; }

/* Quiz */
.quiz-top { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.quiz-progress { flex: 1; height: 8px; background: var(--surface2); border-radius: 4px; overflow: hidden; }
#quiz-bar { height: 100%; width: 0%; background: var(--accent); border-radius: 4px; transition: width .3s; }
.quiz-count { font-size: .85rem; color: var(--muted); min-width: 44px; text-align: right; }
.quiz-prompt { text-align: center; padding: 28px 8px 8px; }
.quiz-direction { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.quiz-front { font-size: 2rem; font-weight: 700; line-height: 1.25; overflow-wrap: break-word; white-space: pre-line; }
.quiz-deck { font-size: .75rem; color: var(--muted); margin-top: 12px; }
.choices { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.choice-btn {
  background: var(--surface); color: var(--text); border: 2px solid transparent;
  font-size: 1.2rem; padding: 18px 14px; min-height: 60px;
  border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background .15s, transform .08s;
  line-height: 1.3; overflow-wrap: break-word;
}
.choice-btn:active { transform: scale(.98); }
.choice-btn.correct { border-color: var(--good); background: color-mix(in srgb, var(--good) 18%, var(--surface)); }
.choice-btn.wrong { border-color: var(--bad); background: color-mix(in srgb, var(--bad) 18%, var(--surface)); }
.choice-btn.dimmed { opacity: .45; }
.quiz-back { text-align: center; font-size: 1.9rem; font-weight: 700; color: var(--good); padding: 8px; overflow-wrap: break-word; white-space: pre-line; }
.reveal-row { display: flex; align-items: center; justify-content: center; gap: 10px; }
.reveal-row .quiz-back { flex: 1; }
.speak-btn { width: 52px; height: 52px; font-size: 1.4rem; flex: 0 0 auto; }
.speak-mini { background: var(--surface); border: none; color: var(--text); border-radius: 10px; width: 34px; height: 34px; margin-left: 8px; font-size: .95rem; cursor: pointer; vertical-align: middle; }
.selfgrade { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.selfgrade-label { font-size: .85rem; color: var(--muted); }
.btn-grade { flex: 1; min-height: 60px; font-size: 1.05rem; font-weight: 700; border: none; border-radius: var(--radius); cursor: pointer; }
.btn-grade.correct { background: color-mix(in srgb, var(--good) 25%, var(--surface)); color: var(--good); }
.btn-grade.wrong { background: color-mix(in srgb, var(--bad) 25%, var(--surface)); color: var(--bad); }
.feedback { text-align: center; min-height: 1.4em; font-size: .95rem; color: var(--muted); }
.hidden { display: none !important; }

/* Summary */
.summary-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 32px 20px; text-align: center; display: flex; flex-direction: column; gap: 18px; margin-top: 10vh;
}
.summary-emoji { font-size: 3rem; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sum-num { font-size: 1.5rem; font-weight: 700; color: var(--accent2); }
.sum-label { font-size: .78rem; color: var(--muted); }
.sum-streak { font-size: 1rem; color: var(--text); }

/* Progress */
.panel { background: var(--surface); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.panel h3 { font-size: 1rem; color: var(--muted); font-weight: 600; }
.bar-wrap { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: var(--surface2); }
.bar.matured { background: var(--good); }
.bar.young { background: var(--accent2); }
.bar-legend { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.bar-legend b { color: var(--text); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.dot.matured { background: var(--good); }
.dot.young { background: var(--accent2); }
.dot.new { background: var(--surface2); border: 1px solid var(--muted); }
.baseline-note { font-size: .8rem; color: var(--muted); line-height: 1.5; }
.week-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; }
.week-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week-bar { width: 100%; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 3px; transition: height .3s; }
.week-bar.empty { background: var(--surface2); }
.week-label { font-size: .68rem; color: var(--muted); }
.week-val { font-size: .68rem; color: var(--text); }

@media (min-width: 700px) {
  #app { max-width: 640px; }
  .quiz-front { font-size: 2.6rem; }
  .choices { display: grid; grid-template-columns: 1fr 1fr; }
}

/* ============ Duolingo mode ============ */
:root {
  --duo-green: #58cc02;
  --duo-green-shade: #46a302;
  --duo-gold: #f5c518;
  --duo-gold-shade: #b98d0a;
  --duo-orange: #ff9600;
  --duo-orange-shade: #c26f00;
  --duo-purple: #ce82ff;
  --duo-purple-shade: #a05fd0;
  --path-line: #3a465e;
}
body.light { --path-line: #d8d2c6; }

/* app padding clears the fixed tab bar */
#app { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---- tab bar ---- */
#tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 520px;
  display: flex; gap: 4px;
  background: var(--surface); border-top: 1px solid var(--surface2);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  z-index: 50;
}
#tabbar.hidden { display: none !important; }
#tabbar .tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; color: var(--muted);
  font-size: .66rem; font-weight: 700; padding: 6px 0;
  border-radius: 12px; cursor: pointer;
}
#tabbar .tab .tab-ico { display: flex; }
#tabbar .tab svg { width: 24px; height: 24px; }
#tabbar .tab.active { color: var(--duo-green); background: color-mix(in srgb, var(--duo-green) 12%, transparent); }

/* ---- path top chips ---- */
.duo-top { display: flex; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 2px 0; flex-wrap: wrap; }
.chip {
  display: flex; align-items: center; gap: 6px;
  font-size: .95rem; font-weight: 800;
  background: var(--surface); border-radius: 999px; padding: 7px 12px;
}
.chip b { font-weight: 800; }
.chip-sub { font-size: .68rem; color: var(--muted); font-weight: 600; }
.goal-ring { width: 26px; height: 26px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--surface2); stroke-width: 5; }
.ring-fg { fill: none; stroke: var(--duo-green); stroke-width: 5; stroke-linecap: round; transition: stroke-dasharray .4s; }
.ring-txt { font-size: .72rem; color: var(--muted); font-weight: 700; }

.curriculum-note {
  background: color-mix(in srgb, var(--accent2) 14%, var(--surface));
  border: 1px solid var(--accent2);
  color: var(--text); font-size: .85rem;
  border-radius: 12px; padding: 10px 12px; margin-top: 12px;
}

/* ---- winding path ---- */
.path-wrap { position: relative; padding: 8px 0 40px; }
#path-svg { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 0; }
#path-nodes { position: relative; z-index: 1; display: flex; flex-direction: column; }
.unit-header {
  display: flex; gap: 12px; align-items: center;
  margin: 26px 0 18px; padding: 10px 2px;
  background: var(--bg); position: relative; z-index: 1;
}
.unit-header h2 { font-size: 1.12rem; }
.unit-header p { font-size: .82rem; color: var(--muted); }
.unit-bar { width: 6px; align-self: stretch; border-radius: 3px; background: var(--uc, var(--duo-green)); }
.path-row { position: relative; height: 88px; display: flex; justify-content: center; align-items: center; }
.path-node {
  position: relative;
  width: 66px; height: 66px; border-radius: 50%; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: #fff;
  transform: translateX(var(--off, 0));
  transition: filter .15s;
}
.path-node svg { width: 30px; height: 30px; }
.st-available { background: var(--uc, var(--duo-green)); box-shadow: 0 6px 0 var(--duo-green-shade); }
.st-available:active { transform: translateX(var(--off, 0)) translateY(4px); box-shadow: 0 2px 0 var(--duo-green-shade); }
.st-locked { background: var(--surface2); color: var(--muted); box-shadow: 0 6px 0 rgba(0,0,0,.3); }
.st-done { background: var(--uc, var(--duo-green)); opacity: .92; box-shadow: 0 6px 0 var(--duo-green-shade); }
.st-golden { background: var(--duo-gold); color: #7a5b00; box-shadow: 0 6px 0 var(--duo-gold-shade); }
.st-review { background: var(--duo-orange); box-shadow: 0 6px 0 var(--duo-orange-shade); }
.st-review:active { transform: translateX(var(--off, 0)) translateY(4px); box-shadow: 0 2px 0 var(--duo-orange-shade); }
.st-checkpoint { background: var(--duo-purple); box-shadow: 0 6px 0 var(--duo-purple-shade); }
.node-badge {
  position: absolute; top: -6px; right: -8px;
  background: var(--bad); color: #fff;
  font-size: .75rem; font-weight: 800;
  min-width: 24px; height: 24px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
}
.start-tip {
  position: absolute; top: 6px; left: 50%;
  transform: translateX(calc(-50% + var(--tip-off, 0px))) translateY(-135%);
  background: #fff; color: var(--duo-green);
  border: 2px solid var(--duo-green);
  font-size: .7rem; font-weight: 800; letter-spacing: .1em;
  padding: 3px 10px; border-radius: 10px;
  white-space: nowrap;
  animation: bob 1.6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bob { 0%, 100% { margin-top: 0; } 50% { margin-top: 5px; } }
.review-row { flex-direction: column; gap: 6px; height: auto; margin: 26px 0 10px; }
.review-row-label { font-size: .8rem; color: var(--muted); font-weight: 600; }
@keyframes deny {
  0%, 100% { transform: translateX(var(--off, 0)); }
  25% { transform: translateX(calc(var(--off, 0px) - 7px)); }
  75% { transform: translateX(calc(var(--off, 0px) + 7px)); }
}
.path-node.deny { animation: deny .4s; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}
.shake { animation: shake .4s; }

/* ---- lesson runner ---- */
.lesson-top { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.lesson-progress { flex: 1; height: 14px; background: var(--surface2); border-radius: 7px; overflow: hidden; }
#lesson-bar { height: 100%; width: 0%; background: var(--duo-green); border-radius: 7px; transition: width .3s; }
.lesson-hearts { font-size: 1.05rem; min-width: 56px; text-align: right; }
.lesson-hearts.hurt { animation: pop .4s; }
.lesson-body { flex: 1; padding: 14px 0 20px; }
#view-lesson .lesson-footer {
  margin-top: auto;
  position: sticky; bottom: 0;
  background: var(--bg);
  padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 10px;
}
.lesson-check:disabled, .lesson-continue:disabled { filter: grayscale(.7); opacity: .45; }
.feedback-banner {
  border-radius: var(--radius); padding: 16px;
  font-size: 1.02rem; font-weight: 600; line-height: 1.4;
}
.feedback-banner.good {
  background: color-mix(in srgb, var(--duo-green) 16%, var(--surface));
  border: 2px solid var(--duo-green); color: var(--duo-green);
}
.feedback-banner.bad {
  background: color-mix(in srgb, var(--bad) 14%, var(--surface));
  border: 2px solid var(--bad); color: var(--bad);
  overflow-wrap: break-word;
}

.ex-wrap { display: flex; flex-direction: column; gap: 14px; }
.ex-kicker { font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.ex-prompt-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ex-prompt { font-size: 1.7rem; font-weight: 700; line-height: 1.3; text-align: center; overflow-wrap: break-word; }
.ex-sub { text-align: center; font-size: .95rem; color: var(--muted); }
.fill-sent { line-height: 1.6; }
.fill-sent .blank { color: var(--accent2); letter-spacing: .05em; }
.speak-inline {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--surface); color: var(--text);
  border: 2px solid var(--surface2); font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.speak-inline svg { width: 20px; height: 20px; }

.listen-center { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 2px; }
.listen-btn {
  width: 96px; height: 96px; border-radius: 26px; border: none;
  background: var(--duo-green); color: #fff;
  box-shadow: 0 6px 0 var(--duo-green-shade);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.listen-btn svg { width: 44px; height: 44px; }
.listen-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--duo-green-shade); }
.listen-note { font-size: 1.2rem; font-weight: 700; text-align: center; }

.choice-btn.sel { border-color: var(--accent2); background: color-mix(in srgb, var(--accent2) 10%, var(--surface)); }

/* translate tiles */
.ans-row {
  min-height: 58px;
  border-bottom: 2px dashed var(--muted);
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 8px 2px;
}
.tile-bank { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tile {
  background: var(--surface); border: 2px solid var(--surface2);
  color: var(--text); font-weight: 600; font-size: 1rem;
  padding: 10px 14px; border-radius: 12px; cursor: pointer;
  box-shadow: 0 3px 0 var(--surface2);
}
.tile:active { transform: translateY(2px); box-shadow: none; }
.tile.used { opacity: .3; pointer-events: none; box-shadow: none; }
.ans-token { border-color: var(--duo-green); box-shadow: 0 3px 0 var(--duo-green-shade); }
.ex-input {
  width: 100%; background: var(--surface);
  border: 2px solid var(--surface2); color: var(--text);
  font-size: 1.2rem; padding: 14px; border-radius: 12px;
  margin-top: 6px;
}
.ex-input:focus { outline: none; border-color: var(--duo-green); }

/* match pairs */
.match-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-col { display: flex; flex-direction: column; gap: 10px; }
.match-item {
  background: var(--surface); border: 2px solid var(--surface2);
  color: var(--text); border-radius: 12px;
  padding: 14px 10px; font-size: .98rem; font-weight: 600;
  min-height: 52px; cursor: pointer; line-height: 1.3;
  overflow-wrap: break-word;
}
.match-item.sel { border-color: var(--accent2); }
.match-item.matched { border-color: var(--duo-green); color: var(--duo-green); opacity: .55; pointer-events: none; }
.match-item.wrong { border-color: var(--bad); animation: shake .4s; }

/* lesson complete */
.done-card {
  background: var(--surface); border-radius: 20px;
  padding: 30px 20px; text-align: center;
  display: flex; flex-direction: column; gap: 16px;
  margin-top: 6vh;
}
.done-emoji { font-size: 3.4rem; animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
.done-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.done-num { font-size: 1.6rem; font-weight: 800; color: var(--accent2); }
.done-num.golden { color: var(--duo-gold); }
.done-label { font-size: .75rem; color: var(--muted); }
.done-streak { font-size: .98rem; }
.done-extra { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--duo-green); font-weight: 600; }

/* ---- review tab / profile ---- */
.review-hero { align-items: center; text-align: center; gap: 10px; }
.review-big { font-size: 3rem; font-weight: 800; color: var(--duo-green); }
.prof-line { font-size: 1.05rem; font-weight: 700; }
.goal-opts { display: flex; flex-direction: column; gap: 10px; }
.goal-opt {
  text-align: left; background: var(--surface2);
  border: 2px solid transparent; color: var(--text);
  border-radius: 14px; padding: 14px;
  font-weight: 600; font-size: 1rem; cursor: pointer;
}
.goal-opt.active { border-color: var(--duo-green); color: var(--duo-green); }
.shop-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: .95rem; }
.btn-buy {
  background: var(--accent2); color: #5c4400; border: none;
  border-radius: 12px; padding: 10px 16px;
  font-weight: 800; cursor: pointer;
}
.btn-buy:disabled { opacity: .4; cursor: not-allowed; }
.btn-danger {
  background: color-mix(in srgb, var(--bad) 16%, var(--surface));
  color: var(--bad); border: 2px solid var(--bad);
  border-radius: 14px; padding: 14px;
  font-weight: 700; width: 100%; cursor: pointer;
}

/* cards browse */
.cards-list { display: flex; flex-direction: column; gap: 8px; }
.card-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface); border-radius: 12px; padding: 12px 14px;
}
.card-front { font-weight: 700; }
.card-deck { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.card-back { color: var(--good); font-weight: 600; text-align: right; overflow-wrap: break-word; }

/* modal */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-card {
  background: var(--surface); border-radius: 20px;
  padding: 22px; width: 100%; max-width: 380px;
  display: flex; flex-direction: column; gap: 14px; text-align: center;
}
.modal-card h3 { font-size: 1.2rem; }
.modal-body { font-size: .95rem; color: var(--muted); line-height: 1.5; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }
.btn-modal {
  border: none; border-radius: 14px; padding: 14px;
  font-size: 1rem; font-weight: 700; cursor: pointer;
  background: var(--surface2); color: var(--text);
}
.btn-modal.primary { background: var(--duo-green); color: #fff; box-shadow: 0 4px 0 var(--duo-green-shade); }
.btn-modal.danger { background: var(--bad); color: #fff; }

/* toast */
#toast {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%) translateY(16px);
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 12px;
  font-size: .9rem; font-weight: 600;
  opacity: 0; transition: opacity .25s, transform .25s;
  z-index: 90; pointer-events: none;
  max-width: 85%; text-align: center;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- access gate ---------- */
#gate-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.gate-card {
  width: min(320px, 88vw);
  background: var(--surface);
  border: 1px solid var(--surface2);
  border-radius: 20px;
  padding: 28px 22px;
  text-align: center;
}
.gate-card.shake { animation: gate-shake .4s; }
@keyframes gate-shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-8px)} 40%{transform:translateX(8px)} 60%{transform:translateX(-5px)} 80%{transform:translateX(5px)} }
.gate-flag { font-size: 40px; }
.gate-title { font-size: 22px; font-weight: 700; margin-top: 6px; color: var(--text); }
.gate-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.gate-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0 6px; }
.gate-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); display: inline-block; }
.gate-dot.on { background: #58cc90; border-color: #58cc90; }
.gate-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.gate-key {
  height: 56px; border-radius: 14px; border: 1px solid var(--surface2);
  background: var(--surface2); color: var(--text);
  font-size: 22px; font-weight: 600; cursor: pointer;
}
.gate-key:active { background: var(--surface); }
.gate-key:disabled { opacity: 0; pointer-events: none; }
.gate-msg { min-height: 20px; margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- language tabs ---------- */
.lang-tabs{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;padding:10px 16px 2px}
.lang-tab{display:flex;align-items:center;gap:6px;border:2px solid var(--surface2);background:var(--surface);color:var(--muted);border-radius:14px;padding:7px 12px;font-weight:700;font-size:14px;font-family:inherit;cursor:pointer}
.lang-tab.active{border-color:var(--duo-green);color:var(--text);background:var(--surface2)}
.lang-tab .lt-prog{font-size:11px;opacity:.65;font-weight:800}
