:root {
  --bg: #f6f3ff;
  --card: #ffffff;
  --ink: #2b2548;
  --muted: #7b7596;
  --line: #e6e1f5;
  --primary: #6c4cf1;
  --primary-dark: #5235c9;
  --good: #2bb673;
  --good-dark: #1f8f59;
  --good-bg: #dcf7e9;
  --bad: #ef4f5f;
  --bad-dark: #c73544;
  --bad-bg: #ffe3e6;
  --gold: #ffc83d;
  --gold-dark: #e0a410;
  --fire: #ff7a1a;
  --locked: #d9d5e6;
  --radius: 18px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.4;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.hidden { display: none !important; }

#app { max-width: 720px; margin: 0 auto; min-height: 100%; padding: 16px 16px 110px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 16px; padding: 14px 22px;
  font-weight: 800; letter-spacing: .04em; text-transform: uppercase; font-size: 16px;
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 0 var(--primary-dark);
  transition: transform .06s, box-shadow .06s, filter .15s;
  touch-action: manipulation;
}
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 0 0 transparent; }
.btn:disabled { background: var(--locked); box-shadow: 0 4px 0 #c3bdd6; color: #fff; cursor: default; }
.btn.good { background: var(--good); box-shadow: 0 4px 0 var(--good-dark); }
.btn.bad { background: var(--bad); box-shadow: 0 4px 0 var(--bad-dark); }
.btn.gold { background: var(--gold); box-shadow: 0 4px 0 var(--gold-dark); color: #4a3500; }
.btn.ghost { background: #fff; color: var(--primary); box-shadow: 0 4px 0 var(--line); border: 2px solid var(--line); }
.btn.small { padding: 8px 14px; font-size: 13px; border-radius: 12px; }
.btn.block { width: 100%; }
.icon-btn {
  border: 0; background: transparent; font-size: 26px; padding: 6px 10px; border-radius: 12px; line-height: 1;
}
.icon-btn:hover { background: rgba(0,0,0,.05); }

/* ---------- profile picker ---------- */
.welcome { text-align: center; padding-top: 24px; }
.welcome .logo { font-size: 64px; }
.welcome h1 { font-size: 34px; color: var(--primary); margin: 6px 0 4px; }
.welcome p { color: var(--muted); margin: 0 0 28px; }
.profiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.profile-card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 20px 12px; text-align: center; box-shadow: 0 4px 0 var(--line);
}
.profile-card:active { transform: translateY(3px); box-shadow: none; }
.profile-card .av { font-size: 56px; display: block; }
.profile-card .nm { font-weight: 800; font-size: 20px; margin-top: 6px; display: block; }
.profile-card .st { color: var(--muted); font-size: 14px; }
.profile-card.add { border-style: dashed; color: var(--primary); }
.parent-link { margin-top: 36px; text-align: center; }
.parent-link button { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 15px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5; background: var(--bg);
  display: flex; align-items: center; gap: 10px; padding: 8px 0 12px; margin-bottom: 4px;
}
.who { display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 4px; font-weight: 800; font-size: 18px; }
.who .av { font-size: 32px; }
.stats { margin-left: auto; display: flex; gap: 6px; }
.stat { display: flex; align-items: center; gap: 4px; font-weight: 800; padding: 6px 10px; border-radius: 12px; background: #fff; border: 2px solid var(--line); font-size: 16px; }
.stat.fire { color: var(--fire); }
.stat.fire.off { color: var(--muted); filter: grayscale(1); }
.stat.xp { color: var(--gold-dark); }

/* ---------- home ---------- */
.today-card {
  background: var(--card); border-radius: var(--radius); border: 2px solid var(--line);
  padding: 14px 16px; display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.ring { width: 64px; height: 64px; flex: none; position: relative; }
.ring svg { transform: rotate(-90deg); }
.ring .lbl { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; }
.today-card h3 { font-size: 18px; }
.today-card p { margin: 2px 0 8px; color: var(--muted); font-size: 14px; }
.week { display: flex; gap: 6px; }
.week .d { width: 28px; text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; }
.week .d i { display: block; width: 24px; height: 24px; margin: 2px auto 0; border-radius: 50%; background: var(--locked); font-style: normal; line-height: 24px; font-size: 13px; }
.week .d.on i { background: var(--fire); color: #fff; }
.week .d.today { color: var(--ink); }

.unit { margin-bottom: 28px; }
.unit-head {
  color: #fff; border-radius: var(--radius); padding: 16px 18px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 0 rgba(0,0,0,.18);
}
.unit-head .em { font-size: 34px; }
.unit-head h2 { font-size: 22px; }
.unit-head p { margin: 2px 0 0; opacity: .9; font-size: 14px; font-weight: 700; }
.unit-head .btn { margin-left: auto; background: rgba(255,255,255,.22); box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.path { position: relative; padding: 52px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 44px; }
.node-wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.node {
  width: 78px; height: 72px; border-radius: 50%; border: 0; font-size: 30px; color: #fff;
  background: var(--c, var(--primary)); box-shadow: 0 7px 0 rgba(0,0,0,.22);
  transition: transform .08s;
}
.node:active { transform: translateY(5px); box-shadow: 0 2px 0 rgba(0,0,0,.22); }
.node.locked { background: var(--locked); box-shadow: 0 7px 0 #bdb7cf; color: #fff; }
.node.done { background: var(--gold); box-shadow: 0 7px 0 var(--gold-dark); }
.node.current { animation: bob 1.6s ease-in-out infinite; outline: 6px solid color-mix(in srgb, var(--c) 25%, transparent); outline-offset: 4px; }
.node-stars { font-size: 13px; margin-top: 8px; letter-spacing: 1px; height: 16px; }
.node-label { font-size: 13px; font-weight: 800; color: var(--muted); }
.start-bubble {
  position: absolute; top: -40px; background: #fff; color: var(--c); border: 2px solid var(--line);
  font-weight: 900; font-size: 14px; padding: 4px 12px; border-radius: 12px; letter-spacing: .06em; white-space: nowrap;
  animation: bob 1.6s ease-in-out infinite;
}
.crown { font-size: 22px; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- bottom nav ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 2px solid var(--line);
  display: flex; justify-content: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
}
.nav button {
  flex: 1; max-width: 160px; background: none; border: 2px solid transparent; border-radius: 14px;
  padding: 6px; font-size: 26px; display: flex; flex-direction: column; align-items: center; gap: 0;
}
.nav button span { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.nav button.on { background: #efeaff; border-color: #d9cffd; }
.nav button.on span { color: var(--primary); }

/* ---------- lesson ---------- */
.lesson { display: flex; flex-direction: column; min-height: calc(100vh - 32px); min-height: calc(100dvh - 32px); padding-bottom: 150px; }
.lesson-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.bar { flex: 1; height: 18px; background: var(--locked); border-radius: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--good); border-radius: 10px; transition: width .35s ease; box-shadow: inset 0 -5px 0 rgba(0,0,0,.08); }
.ex-title { font-size: 24px; font-weight: 900; margin: 6px 0 18px; }
.ex-sub { color: var(--muted); font-weight: 700; margin: -10px 0 18px; font-size: 16px; }
.context { color: var(--muted); font-size: 18px; margin-bottom: 8px; font-style: italic; }
.context::before { content: "… "; }
.say {
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 18px;
  font-size: 26px; font-weight: 800; line-height: 1.45; display: flex; gap: 12px; align-items: flex-start;
}
.speak { flex: none; width: 52px; height: 52px; border-radius: 14px; border: 0; background: #2f9bff; color: #fff; font-size: 24px; box-shadow: 0 4px 0 #1b76cc; }
.speak:active { transform: translateY(4px); box-shadow: none; }
.speak.big { width: 110px; height: 110px; font-size: 52px; border-radius: 26px; box-shadow: 0 6px 0 #1b76cc; margin: 10px auto 26px; display: block; }
.dove { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 18px; }
.dove .m { font-size: 54px; line-height: 1; }
.dove .bubble { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 10px 14px; font-weight: 700; position: relative; }

.gap-line { font-size: 26px; font-weight: 800; line-height: 1.8; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.gap { display: inline-block; min-width: 90px; border-bottom: 4px solid var(--primary); text-align: center; color: var(--primary); padding: 0 6px; line-height: 1.2; }
.gap input {
  width: 150px; border: 0; border-bottom: 4px solid var(--primary); background: #f3efff; border-radius: 8px 8px 0 0;
  font-size: 24px; font-weight: 800; text-align: center; padding: 2px 6px; outline: none;
}

.options { display: grid; gap: 12px; margin-top: 20px; }
.options.words { grid-template-columns: 1fr 1fr; }
.opt {
  background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 16px; text-align: left;
  font-size: 20px; font-weight: 700; box-shadow: 0 4px 0 var(--line); transition: transform .05s;
}
.options.words .opt { text-align: center; font-size: 22px; }
.opt:active { transform: translateY(3px); box-shadow: none; }
.opt.sel { border-color: #9f8bff; background: #efeaff; box-shadow: 0 4px 0 #cfc3ff; color: var(--primary-dark); }
.opt.right { border-color: var(--good); background: var(--good-bg); box-shadow: 0 4px 0 #a6e6c6; }
.opt.wrong { border-color: var(--bad); background: var(--bad-bg); box-shadow: 0 4px 0 #f7b6bd; }

.answer-area {
  min-height: 70px; border-bottom: 2px solid var(--line); border-top: 2px solid var(--line);
  padding: 10px 0; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; margin-bottom: 22px;
}
.given { color: var(--muted); font-weight: 800; font-size: 20px; padding: 8px 2px; }
.bank { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tile {
  background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px 14px; font-size: 20px; font-weight: 800;
  box-shadow: 0 4px 0 var(--line);
}
.tile.used { visibility: hidden; }
.tile.ph { background: var(--line); color: transparent; box-shadow: none; }

.order-list { display: grid; gap: 10px; margin-bottom: 22px; min-height: 40px; }
.order-list .opt { display: flex; gap: 10px; align-items: center; }
.order-list .num { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 16px; display: grid; place-items: center; }
.slot { border: 2px dashed var(--line); border-radius: 16px; padding: 14px; color: var(--muted); font-weight: 700; text-align: center; }

/* feedback footer */
.footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: #fff; border-top: 2px solid var(--line);
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
.footer .in { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.footer.good { background: var(--good-bg); border-color: transparent; }
.footer.bad { background: var(--bad-bg); border-color: transparent; }
.fb-head { font-size: 24px; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.footer.good .fb-head { color: var(--good-dark); }
.footer.bad .fb-head { color: var(--bad-dark); }
.fb-body { font-weight: 700; color: var(--ink); }
.fb-body b { color: var(--bad-dark); }
.footer.good .fb-body b { color: var(--good-dark); }
.footer .row { display: flex; gap: 12px; }
.footer .row .btn { flex: 1; }

/* results */
.results { text-align: center; padding-top: 40px; }
.results .big { font-size: 90px; line-height: 1; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
.results h1 { font-size: 34px; color: var(--gold-dark); margin: 14px 0 6px; }
.results p { color: var(--muted); font-weight: 700; margin: 0 0 20px; }
.result-stars { font-size: 54px; letter-spacing: 6px; margin: 10px 0 20px; }
.result-stars .off { filter: grayscale(1) opacity(.35); }
.result-stars span { display: inline-block; animation: pop .45s cubic-bezier(.2,1.6,.4,1) both; }
.result-stars span:nth-child(2) { animation-delay: .15s; }
.result-stars span:nth-child(3) { animation-delay: .3s; }
.tiles3 { display: flex; gap: 12px; justify-content: center; margin: 0 0 30px; flex-wrap: wrap; }
.tiles3 .t { border: 2px solid var(--line); border-radius: 16px; overflow: hidden; min-width: 110px; background: #fff; }
.tiles3 .t b { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #fff; padding: 4px; }
.tiles3 .t span { display: block; font-size: 24px; font-weight: 900; padding: 8px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* ---------- read & listen ---------- */
.reader h1 { font-size: 28px; }
.reader .lines { background: #fff; border-radius: var(--radius); border: 2px solid var(--line); padding: 14px 18px; margin: 16px 0; }
.reader .ln { font-size: 22px; font-weight: 700; padding: 6px 8px; border-radius: 10px; transition: background .2s, color .2s; }
.reader .ln.now { background: #fff3c4; color: #6a4b00; }
.reader .ln.hide { color: transparent; background: repeating-linear-gradient(90deg, var(--line) 0 10px, transparent 10px 14px); background-size: 100% 6px; background-repeat: no-repeat; background-position: 0 60%; }
.reader .controls { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- badges ---------- */
.section-title { font-size: 22px; font-weight: 900; margin: 8px 0 12px; }
.big-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 24px; }
.big-stats div { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.big-stats b { display: block; font-size: 26px; }
.big-stats span { color: var(--muted); font-weight: 700; font-size: 14px; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.badge { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: 14px 10px; text-align: center; }
.badge .i { font-size: 44px; }
.badge b { display: block; font-size: 15px; margin-top: 4px; }
.badge small { color: var(--muted); font-size: 13px; }
.badge.off .i { filter: grayscale(1) opacity(.35); }
.badge.off b { color: var(--muted); }

/* ---------- parent ---------- */
.parent h1 { font-size: 28px; margin-bottom: 4px; }
.panel { background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; }
.panel h2 { font-size: 20px; margin-bottom: 10px; }
.panel p.help { color: var(--muted); font-size: 15px; margin: 0 0 12px; }
.prow { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.prow:first-of-type { border-top: 0; }
.prow .em { font-size: 26px; }
.prow .t { flex: 1; min-width: 0; }
.prow .t b { display: block; }
.prow .t small { color: var(--muted); }
.prow .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.mini { border: 2px solid var(--line); background: #fff; border-radius: 10px; padding: 4px 9px; font-size: 14px; font-weight: 800; }
.mini.danger { color: var(--bad-dark); }
.mini:disabled { opacity: .35; }
label.f { display: block; font-weight: 800; font-size: 15px; margin: 12px 0 6px; }
.input, textarea.input, select.input {
  width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 17px; background: #fbfaff; outline: none;
}
.input:focus { border-color: #9f8bff; }
textarea.input { min-height: 220px; line-height: 1.5; resize: vertical; font-family: inherit; }
.row2 { display: grid; grid-template-columns: 100px 1fr; gap: 12px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); }
.swatch.on { box-shadow: 0 0 0 3px var(--ink); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.note { font-size: 14px; color: var(--muted); margin-top: 8px; }
.err { color: var(--bad-dark); font-weight: 700; font-size: 15px; margin-top: 8px; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(35, 25, 70, .45); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 22px; padding: 22px; width: 100%; max-width: 420px; max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 22px; margin-bottom: 12px; }
.avatars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 8px; }
.avatars button { font-size: 30px; background: #fbfaff; border: 2px solid var(--line); border-radius: 12px; padding: 4px 0; }
.avatars button.on { border-color: var(--primary); background: #efeaff; }
#toast {
  position: fixed; left: 50%; bottom: 100px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 14px; font-weight: 700; transition: all .25s; max-width: 90vw; text-align: center;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

@media (max-width: 420px) {
  body { font-size: 17px; }
  .say, .gap-line { font-size: 22px; }
  .unit-head h2 { font-size: 19px; }
  .stat { padding: 5px 7px; font-size: 15px; }
  .who .nm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- accounts, parent gate, kid PIN pad ---------- */
.auth { max-width: 440px; margin: 0 auto; }
.auth .btn-row { margin-top: 18px; }
.auth-links { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; }
.link { background: none; border: 0; color: var(--primary); font-weight: 700; font-size: 15px; text-decoration: underline; padding: 2px; }
.muted { color: var(--muted); font-weight: 600; }
.banner { background: #fff6d8; border: 2px solid var(--gold); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 18px; font-weight: 700; font-size: 15px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.danger-zone { border-color: var(--bad-bg); }
.profile-card .lock { font-size: 14px; vertical-align: middle; }
.pinpad-head { text-align: center; }
.pinpad-head .av { font-size: 56px; display: block; }
.pinpad-head p { color: var(--muted); margin: 4px 0 0; }
.pin-dots { display: flex; justify-content: center; gap: 12px; margin: 18px 0 6px; min-height: 22px; }
.pin-dots i { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--primary); display: block; }
.pin-dots i.on { background: var(--primary); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.pinpad button { font-size: 28px; font-weight: 900; padding: 14px 0; border-radius: 16px; border: 2px solid var(--line); background: #fbfaff; box-shadow: 0 4px 0 var(--line); }
.pinpad button:active { transform: translateY(3px); box-shadow: none; }
.pinpad button.go { background: var(--good); border-color: var(--good); color: #fff; box-shadow: 0 4px 0 var(--good-dark); }
.pin-input { font-size: 24px; letter-spacing: 8px; text-align: center; max-width: 220px; }
.prow.kid { flex-wrap: wrap; }
.prow.kid .acts { flex-basis: 100%; justify-content: flex-start; padding-left: 36px; }

/* ---------- library, tracks, Latin ---------- */
.lang-tag { display: inline-block; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.25); border-radius: 8px; padding: 1px 7px; margin-right: 6px; }
.prow .lang-tag { background: #efeaff; color: var(--primary-dark); }
.gloss { color: var(--muted); font-size: 16px; font-style: italic; font-weight: 600; margin-top: 4px; }
.gloss.hint { margin: 0 0 10px; }
.gloss.hint::before { content: "🇬🇧 "; font-style: normal; }
.reader .lines.duo .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 2px 0; }
.reader .lines.duo .gloss { margin: 0; font-size: 17px; }
@media (max-width: 560px) { .reader .lines.duo .pair { grid-template-columns: 1fr; gap: 0; padding-bottom: 6px; } }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; margin: 4px 0 8px; flex-wrap: wrap; }
.seg button { border: 0; background: #fff; padding: 8px 14px; font-weight: 800; font-size: 15px; }
.seg button.on { background: var(--primary); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 14px; }
.chip.on { border-color: var(--primary); color: var(--primary); background: #efeaff; }
label.inline { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-top: 4px; color: var(--ink); }
.mini.add { color: var(--good-dark); }
.badge-s { font-size: 11px; font-weight: 800; border-radius: 6px; padding: 1px 6px; vertical-align: middle; margin-left: 4px; }
.badge-s.published { background: var(--good-bg); color: var(--good-dark); }
.badge-s.draft { background: #fff3c4; color: #6a4b00; }
.admin-panel { border-color: #d9d0ff; background: #faf8ff; }
.admin-editor .grid4 { display: grid; grid-template-columns: 90px 90px 1fr 1fr; gap: 10px; }
.admin-editor .duo-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-editor .lines-edit { font-size: 15px; line-height: 1.6; min-height: 240px; }
.admin-editor .preview { margin-top: 8px; }
.admin-editor .preview .mini { display: block; text-align: left; margin: 4px 0; width: 100%; font-weight: 600; }
@media (max-width: 640px) {
  .admin-editor .grid4 { grid-template-columns: 1fr 1fr; }
  .admin-editor .duo-edit { grid-template-columns: 1fr; }
}
.admin-editor input[type="color"].input { height: 48px; padding: 4px; cursor: pointer; }
.admin-editor #so { min-height: 0; }
/* One prayer line per row, so English and Latin line up side by side. */
.admin-editor .lines-edit { white-space: pre; overflow-x: auto; overflow-wrap: normal; }

/* ---------- say it out loud ---------- */
.mic-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 26px 0 8px; }
.mic { width: 96px; height: 96px; border-radius: 50%; border: 0; font-size: 44px; background: var(--primary); color: #fff; box-shadow: 0 6px 0 var(--primary-dark); }
.mic:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--primary-dark); }
.mic:disabled { opacity: .6; }
.mic.rec { background: var(--bad); box-shadow: 0 6px 0 var(--bad-dark); animation: micpulse 1.1s infinite; }
@keyframes micpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .mic.rec { animation: none; } }
.mic-note { color: var(--muted); font-weight: 700; text-align: center; max-width: 360px; }
.say.veiled .words { filter: blur(7px); user-select: none; }
.heard { font-size: 20px; font-weight: 800; line-height: 1.6; margin-bottom: 4px; }
.heard .w.said { color: var(--good-dark); }
.heard .w.close { color: var(--gold-dark); }
.heard .w.missed { color: var(--bad-dark); text-decoration: underline wavy; }
