/* Lundo review site. Phone first (375 px), calm and friendly, in Lundo's colours.
   Green means done, amber means flagged or changed. System fonts only. */
:root {
  --ink: #183247;
  --muted: #526b7c;
  --paper: #f6f8f4;
  --white: #ffffff;
  --blue: #1265cf;
  --blue-dark: #084c9f;
  --sky: #e7f2ff;
  --line: #d8e4ec;
  --line-strong: #c4d7e5;
  --green: #2e9e5b;
  --green-dark: #1d7442;
  --green-bg: #e8f6ee;
  --green-line: #9fd9b4;
  --amber: #e59a1c;
  --amber-dark: #8a5600;
  --amber-bg: #fff5df;
  --amber-line: #f2c66d;
  --violet: #6b4fbb;
  --violet-bg: #f0ebfd;
  --coral: #c2412b;
  --coral-bg: #fdebe7;
  --slate-bg: #edf1f5;
  --focus: #b34324;
  --radius: 18px;
  --shadow: 0 4px 0 var(--line);
  font-family: ui-rounded, "Avenir Next", Nunito, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 90px; }
body { margin: 0; min-height: 100vh; }
img { max-width: 100%; }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 26px; font-weight: 850; letter-spacing: -.3px; }
h2 { font-size: 20px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 800; }
h4 { font-size: 15px; font-weight: 800; margin-top: .9em; }
p { margin: 0 0 .6em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.amber { color: var(--amber-dark); }
.ok-text { color: var(--green-dark); font-weight: 700; }
.error-text { color: var(--coral); font-weight: 700; }
.center { text-align: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; align-items: center; justify-content: center; }
.ico svg { width: 100%; height: 100%; }
.loading { color: var(--muted); padding: 30px 4px; text-align: center; }

/* ---- Shell ------------------------------------------------------------------- */
.mockbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px;
  background: var(--amber-bg); border-bottom: 2px solid var(--amber-line);
  padding: 6px 14px; font-size: 13px; color: var(--amber-dark);
}
.mock-toggle { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.mock-toggle input { width: 18px; height: 18px; margin: 0; accent-color: var(--amber); }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  max-width: 1000px; margin: 0 auto;
}
.skip { position: absolute; left: -999px; top: 6px; background: var(--white); padding: 8px 12px; border-radius: 10px; z-index: 100; }
.skip:focus { left: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { display: flex; width: 40px; height: 40px; flex: none; }
.brand-logo svg { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand-text b { font-size: 21px; font-weight: 900; letter-spacing: -.5px; }
.brand-text small { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: 8px; flex: none; }
.lang { display: inline-flex; border: 2px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: var(--white); }
.lang button { border: 0; background: none; min-height: 40px; min-width: 44px; padding: 6px 10px; font-weight: 800; font-size: 14px; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--white); }
.lang .long { display: none; }
.menu { position: relative; }
.menu summary {
  list-style: none; width: 44px; height: 44px; border-radius: 50%; background: var(--sky); border: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 900; color: var(--blue-dark); position: relative;
}
.menu summary::-webkit-details-marker { display: none; }
.menu .dot { position: absolute; top: 1px; right: 1px; width: 11px; height: 11px; border-radius: 50%; background: var(--amber); border: 2px solid var(--white); }
.menu-pop {
  position: absolute; right: 0; top: 52px; z-index: 50; min-width: 220px;
  background: var(--white); border: 2px solid var(--line); border-radius: 16px; box-shadow: 0 12px 30px rgba(24, 50, 71, .16);
  padding: 8px; display: grid; gap: 2px;
}
.menu-pop a, .menu-pop button {
  display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 10px; border-radius: 10px;
  text-decoration: none; color: var(--ink); background: none; border: 0; text-align: left; font-weight: 700;
}
.menu-pop a:hover, .menu-pop button:hover { background: var(--slate-bg); }
.menu-name { padding: 6px 10px 8px; margin: 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
.menu-name small { color: var(--muted); }
.main { max-width: 780px; margin: 0 auto; padding: 4px 12px 60px; outline: none; }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 90;
  background: var(--ink); color: var(--white); padding: 12px 16px; border-radius: 14px; font-weight: 700; max-width: min(92vw, 520px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.toast[data-kind="error"] { background: var(--coral); }
.toast[data-kind="ok"] { background: var(--green-dark); }

/* ---- Common pieces ------------------------------------------------------------ */
.card { background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin: 0 0 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px;
  border: 2px solid var(--line-strong); border-radius: 14px; background: var(--white); color: var(--ink);
  font-weight: 800; text-decoration: none; line-height: 1.15;
}
.btn .ico, .btn > svg { width: 20px; height: 20px; }
.btn:hover { border-color: #9fbbd0; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: var(--white); box-shadow: 0 4px 0 var(--blue-dark); }
.btn-primary:hover { background: #0e5bbd; border-color: #0e5bbd; }
.btn-small { min-height: 40px; padding: 7px 12px; font-size: 15px; border-radius: 12px; }
.btn-quiet { border-color: transparent; background: transparent; color: var(--muted); box-shadow: none; }
.btn-quiet:hover { background: var(--slate-bg); }
.link-btn { border: 0; background: none; padding: 6px 4px; color: var(--blue); font-weight: 700; text-decoration: underline; min-height: 36px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: none; color: var(--ink); flex: none; }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn.small { width: 36px; height: 36px; }
.icon-btn.small svg { width: 18px; height: 18px; }
.icon-btn:hover { background: var(--slate-bg); }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-weight: 800; margin-bottom: 6px; }
.field small { display: block; color: var(--muted); font-size: 14px; margin-top: 6px; }
input[type="text"], input[type="email"], textarea {
  width: 100%; border: 2px solid var(--line-strong); border-radius: 12px; padding: 11px 12px; font-size: 17px; background: #fbfdff; line-height: 1.35;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(18, 101, 207, .18); }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.form-row .field { flex: 1 1 200px; margin: 0; }
.form-status { margin: 10px 0 0; min-height: 1.2em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.bar { height: 10px; border-radius: 99px; background: #e3ebf0; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 99px; transition: width .4s ease; min-width: 0; }
.bar-big { height: 18px; margin: 8px 0 10px; }
.bar-thin { height: 7px; }
.bar-done i { background: var(--green); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; border-radius: 99px; padding: 3px 10px; white-space: nowrap; background: var(--slate-bg); color: var(--muted); }
.badge svg { width: 14px; height: 14px; }
.badge-in_progress { background: var(--sky); color: var(--blue-dark); }
.badge-done { background: var(--green-bg); color: var(--green-dark); }
.badge-audio { background: var(--violet-bg); color: var(--violet); }
.badge-locked { background: #e6ebef; color: var(--ink); }
.badge-pending { background: var(--amber-bg); color: var(--amber-dark); }
.badge-approved { background: var(--green-bg); color: var(--green-dark); }
.badge-removed { background: var(--coral-bg); color: var(--coral); }
.badge-admin { background: var(--sky); color: var(--blue-dark); }

.chips-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips-row::-webkit-scrollbar { display: none; }
.fchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px;
  border: 2px solid var(--line-strong); border-radius: 99px; background: var(--white); font-weight: 750; font-size: 15px; white-space: nowrap;
}
.fchip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.fchip .count { background: var(--slate-bg); color: var(--ink); border-radius: 99px; padding: 0 7px; font-size: 13px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: #e6edf1; border-radius: 14px; padding: 4px; gap: 4px; margin: 4px 0 12px; }
.seg button { border: 0; background: none; border-radius: 10px; min-height: 44px; font-weight: 800; font-size: 15px; color: var(--muted); padding: 6px 8px; }
.seg button.on { background: var(--white); color: var(--ink); box-shadow: 0 2px 0 var(--line); }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; border-radius: 8px; padding: 2px 8px; background: var(--slate-bg); color: var(--muted); }
.tag svg { width: 13px; height: 13px; }
.tag-changed { background: var(--amber-bg); color: var(--amber-dark); }
.tag-disputed { background: var(--coral-bg); color: var(--coral); }
.tag-q { background: var(--violet-bg); color: var(--violet); }
.tag-lock { background: #e6ebef; color: var(--ink); }
.tag-new { background: var(--green-bg); color: var(--green-dark); }
.tag-pending { background: var(--slate-bg); color: var(--muted); }
.tag-old { background: var(--slate-bg); color: var(--muted); }
.tag-excluded { background: var(--coral-bg); color: var(--coral); }

/* ---- Welcome ------------------------------------------------------------------- */
.welcome { max-width: 560px; margin: 0 auto; }
.hero { text-align: center; padding: 18px 6px 8px; }
.hero-art { width: 84px; height: 84px; margin: 0 auto 8px; }
.hero-art svg { width: 84px; height: 84px; }
.hero h1 { font-size: 27px; }
.hero p { color: var(--muted); font-size: 17px; }
.form .btn { width: 100%; margin-top: 4px; }
.notice { background: var(--amber-bg); border-color: var(--amber-line); box-shadow: 0 4px 0 var(--amber-line); }
.mock-panel { border-style: dashed; border-color: var(--amber-line); box-shadow: none; background: #fffcf4; }
.mock-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.mock-inbox h3 { margin-top: 10px; }
.mail { border-top: 1px solid var(--line); padding: 8px 0; }
.mail p { margin: 0 0 6px; }

/* ---- Home --------------------------------------------------------------------- */
.hello { margin: 10px 0 12px; }
.overall h2 { margin-bottom: 4px; }
.overall-line { font-size: 18px; margin: 0; }
.overall-line .pct { color: var(--green-dark); font-weight: 900; }
.overall-sub { margin: 0 0 6px; }
.team-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; margin: 6px 0 0; }
.team-line .ico { color: var(--muted); }
.pending-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: var(--amber-bg); border-color: var(--amber-line); box-shadow: 0 4px 0 var(--amber-line); color: var(--amber-dark); font-weight: 700; }
.view-intro { color: var(--muted); }
.chunk-list { display: grid; gap: 12px; }
.chunk-card {
  display: block; text-decoration: none; color: var(--ink); background: var(--white); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 14px 14px 12px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease;
}
.chunk-card:hover { border-color: #b7cddc; transform: translateY(-1px); }
.chunk-card.b-done { border-color: var(--green-line); box-shadow: 0 4px 0 var(--green-line); }
.chunk-card.b-locked { background: #f7f9fa; }
.cc-top { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.cc-kind { width: 38px; height: 38px; border-radius: 12px; background: var(--sky); color: var(--blue-dark); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.cc-kind svg { width: 22px; height: 22px; }
.b-done .cc-kind { background: var(--green-bg); color: var(--green-dark); }
.cc-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cc-title { font-size: 17px; line-height: 1.25; }
.cc-sub { font-size: 14px; color: var(--muted); }
.cc-meta { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.cc-extra { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.chip-changed { background: var(--amber-bg); color: var(--amber-dark); border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 800; }
.chip-audio { display: inline-flex; align-items: center; gap: 4px; background: var(--violet-bg); color: var(--violet); border-radius: 8px; padding: 2px 8px; font-size: 13px; font-weight: 800; }
.chip-audio svg { width: 14px; height: 14px; }
.cc-active { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.group { margin: 0 0 14px; }
.group > summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow);
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary .bar { grid-column: 1 / -1; }
.g-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }
.g-title::before { content: "›"; font-weight: 900; color: var(--muted); transition: transform .15s; display: inline-block; }
.group[open] .g-title::before { transform: rotate(90deg); }
.g-count { font-size: 14px; color: var(--muted); font-weight: 700; }
.g-intro { color: var(--muted); margin: 10px 4px; font-size: 15px; }
.group .chunk-list { margin: 10px 0 0 8px; }
.empty { padding: 20px 4px; text-align: center; }
.error-card { border-color: #f1b8ab; }

/* ---- Chunk -------------------------------------------------------------------- */
.chunk-page { padding-bottom: 100px; }
.chunk-sticky {
  position: sticky; top: 0; z-index: 30; margin: 0 -12px 12px; padding: 6px 12px 8px;
  background: rgba(246, 248, 244, .96); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.sticky-row { display: flex; align-items: center; gap: 6px; }
.sticky-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.sticky-title b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 16px; }
.where-text { font-size: 13px; color: var(--muted); }
.bar-you { margin: 6px 0 4px; height: 9px; }
.sticky-counts { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); font-weight: 700; }
.you-text { color: var(--green-dark); }
.kind-line { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; font-weight: 800; color: var(--blue-dark); margin: 0 0 6px; }
.intro-text { font-size: 16px; }
.lock-banner, .lock-note { display: flex; gap: 8px; align-items: flex-start; background: #eef2f5; border-radius: 12px; padding: 10px 12px; font-weight: 700; }
.lock-banner svg, .lock-note svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.kbd-hint { display: none; font-size: 13px; color: var(--muted); margin: 6px 0 0; }
@media (hover: hover) and (pointer: fine) { .kbd-hint { display: block; } }
.chunk-intro .chips-row { margin: 10px 0 0; }
.chunk-done { display: flex; align-items: center; gap: 10px; background: var(--green-bg); color: var(--green-dark); border: 2px solid var(--green-line); border-radius: var(--radius); padding: 14px 16px; font-weight: 800; }
.chunk-done svg { width: 24px; height: 24px; flex: none; }
.empty-filter { text-align: center; padding: 20px; }
.chunk-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px;
  padding: 8px 10px; padding-bottom: max(8px, env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97);
  border-top: 2px solid var(--line); max-width: 780px; margin: 0 auto;
}
.nav-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 54px; padding: 4px;
  border: 2px solid var(--line-strong); border-radius: 14px; background: var(--white); font-weight: 800; font-size: 13.5px; line-height: 1.15;
}
.nav-btn .ico { width: 22px; height: 22px; }
.nav-btn.primary { background: var(--blue); border-color: var(--blue); color: var(--white); box-shadow: 0 3px 0 var(--blue-dark); }

/* Steps and screens */
.steps { display: grid; gap: 30px; }
.step-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0 0 4px; }
.step-count { background: var(--sky); color: var(--blue-dark); font-weight: 850; font-size: 13px; border-radius: 99px; padding: 3px 10px; }
.step-title { margin: 0; font-size: 18px; }
.step-what { color: var(--muted); font-size: 15px; margin: 0 0 10px; }
.screen {
  background: var(--white); border: 2px solid var(--line); border-radius: 26px; padding: 12px 10px 14px;
  box-shadow: 0 6px 0 var(--line); position: relative;
}
.screen-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; color: #9aaebb; }
.screen-x { width: 22px; height: 22px; display: inline-flex; }
.screen-x svg { width: 22px; height: 22px; }
.screen-progress { flex: 1; height: 12px; border-radius: 99px; background: #e6edf1; overflow: hidden; }
.screen-progress i { display: block; height: 100%; background: #58c47c; border-radius: 99px; }
.scr-prompt { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; margin: 0 0 12px; }
.scr-prompt .ico { color: var(--blue); width: 24px; height: 24px; }
.scr-label { font-size: 12.5px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: 0 0 4px; }
.scr-title { font-size: 19px; }
.scr-body { color: var(--ink); font-size: 16px; }
.scr-when { font-size: 14px; color: var(--muted); background: var(--slate-bg); border-radius: 10px; padding: 6px 10px; }
.scr-pic { text-align: center; margin: 0 0 8px; }
.scr-pic img, .card-pic img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 18px; background: #f3f6f2; }
.scr-pic.emoji, .card-pic.emoji { font-size: 64px; line-height: 1.1; text-align: center; }
.card-pic { margin: 0 0 8px; }
.ln { margin: 0 0 6px; }
.ln-is { font-size: 24px; font-weight: 750; line-height: 1.3; margin: 0; overflow-wrap: anywhere; }
.ln-en { font-size: 15px; color: var(--muted); margin: 2px 0 0; }
.ln-word { text-align: center; padding: 4px 0 6px; }
.ln-word .ln-is { font-size: 36px; font-weight: 850; }
.ln-word .ln-en { font-size: 17px; }
.center { text-align: center; }
.scr-examples { border-top: 2px dashed var(--line); margin-top: 10px; padding-top: 10px; display: grid; gap: 4px; }
.ln-example .ln-is { font-size: 21px; }
.ln-story .ln-is { font-size: 21px; font-weight: 650; }
.ln-answer, .ln-typed, .ln-speak { background: #f4f8fb; border: 2px dashed #b9cfdd; border-radius: 16px; padding: 10px 12px; }
.ln-hl { background: var(--amber-bg); border-radius: 14px; box-shadow: inset 4px 0 0 var(--amber); padding: 8px 10px 8px 14px; }
.ln-answer.ln-hl, .ln-typed.ln-hl, .ln-speak.ln-hl { border-color: var(--amber-line); }
mark.chg { background: #ffe2a8; color: inherit; border-radius: 4px; padding: 0 2px; box-shadow: 0 2px 0 var(--amber); }
.scr-sentence { font-size: 21px; font-weight: 700; margin: 0 0 10px; }
.blank { display: inline-block; min-width: 3em; padding: 0 6px; border-bottom: 3px solid var(--green); color: var(--green-dark); text-align: center; }
.scr-tiles-wrap { margin-top: 12px; }
.scr-tiles { display: flex; flex-wrap: wrap; gap: 6px; }
.tile { display: inline-block; border: 2px solid #cfdbe4; border-bottom-width: 4px; border-radius: 12px; padding: 5px 10px; background: var(--white); font-size: 17px; font-weight: 650; }
.tile.right { border-color: var(--green-line); background: var(--green-bg); }
.scr-options { display: grid; gap: 8px; }
.scr-options.pics { grid-template-columns: 1fr 1fr; }
.scr-option { border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; padding: 12px 14px; font-size: 19px; font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.scr-option img { border-radius: 10px; }
.scr-option.right { border-color: var(--green-line); background: var(--green-bg); }
.right-mark { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--green-dark); font-weight: 800; }
.right-mark .ico { width: 16px; height: 16px; }
.opt-en { font-size: 14px; color: var(--muted); font-weight: 500; }
.scr-pairs { display: grid; gap: 8px; }
.pair { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.pair .tile { text-align: center; }
.pair-link { color: var(--muted); font-weight: 800; }
.pair.ln-hl { padding: 6px; }
.mic-btn { width: 60px; height: 60px; margin: 14px auto 0; border-radius: 50%; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 0 var(--blue-dark); }
.mic-btn svg { width: 28px; height: 28px; }
.story-title { font-size: 24px; text-align: center; }
.story-pic img { width: 100%; border-radius: 18px; max-height: 260px; object-fit: cover; }
.story-lines { display: grid; gap: 4px; margin-top: 10px; }
.chat, .lundo-say { display: grid; gap: 8px; }
.turn { display: flex; align-items: flex-end; gap: 8px; }
.turn.right { justify-content: flex-end; }
.turn .avatar { width: 38px; height: 38px; flex: none; }
.turn .avatar svg { width: 38px; height: 38px; }
.bubble { max-width: 88%; background: #f0f4f7; border-radius: 18px 18px 18px 6px; padding: 8px 12px 10px; }
.turn.right .bubble { background: var(--sky); border-radius: 18px 18px 6px 18px; }
.turn.blank .bubble { border: 2px dashed var(--blue); background: var(--white); }
.turn.ln-hl { background: none; box-shadow: none; padding: 0; }
.turn.ln-hl .bubble { background: var(--amber-bg); box-shadow: inset 0 0 0 2px var(--amber-line); }
.speaker { display: block; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.bubble .ln-is { font-size: 20px; }
.blank-note { display: block; font-size: 12.5px; color: var(--blue-dark); font-weight: 700; margin-top: 4px; }
.elsewhere { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); margin: 0 0 8px; }
.elsewhere .ico { width: 16px; height: 16px; }
.step-extra { margin-top: 12px; }
.respell { font-size: 14px; color: var(--muted); margin: 2px 0 0; }
.ln-word .play { vertical-align: middle; margin-bottom: 6px; }
.scr-note { font-size: 14px; color: var(--muted); margin: 8px 0 0; }
.scr-accepted { margin-top: 10px; font-size: 14px; color: var(--muted); }
.scr-accepted summary { cursor: pointer; font-weight: 700; }
.scr-accepted ul { margin: 6px 0 0; padding-left: 18px; }
.scr-quiz { margin-top: 12px; border-top: 2px dashed var(--line); padding-top: 10px; }
.story-pics { display: grid; gap: 8px; margin: 0 0 8px; }
.story-pics.many { grid-auto-flow: column; grid-auto-columns: 85%; overflow-x: auto; scroll-snap-type: x mandatory; }
.story-pics figure { margin: 0; scroll-snap-align: start; }
.story-pics img { width: 100%; border-radius: 16px; max-height: 240px; object-fit: cover; display: block; }
.story-pics figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.story-en { margin-top: 12px; font-size: 15px; }
.story-en summary { cursor: pointer; font-weight: 800; color: var(--blue); min-height: 36px; display: flex; align-items: center; }
.ln-said { font-size: 16px; margin: 2px 0 0; color: var(--ink); }
.lundo-turn.said .bubble { background: #f6f7f9; border: 1.5px dashed #c9d5de; }
.scr-prompt .play.small { width: 40px; height: 40px; }
.plain-items { display: grid; gap: 14px; }
.plain-item { padding: 12px; }

/* ---- Review block (under each line) --------------------------------------------- */
.rv {
  margin: 8px 0 16px; padding: 12px 10px; border-radius: 16px; background: #f5f9fc; border: 2px solid #dbe8f2;
  transition: background .2s, border-color .2s; outline: none;
}
.plain-item .rv { margin: 0; }
.rv.current { box-shadow: 0 0 0 3px rgba(18, 101, 207, .22); }
.rv.is-correct { background: var(--green-bg); border-color: var(--green-line); }
.rv.is-flagged { background: var(--amber-bg); border-color: var(--amber-line); }
.rv.is-unsure, .rv.is-noted { background: var(--slate-bg); border-color: #cbd6df; }
.rv.is-locked { background: #f1f4f6; border-color: #d3dce3; }
.rv-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 6px; }
.rv-where { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.rv-line { font-size: 24px; font-weight: 750; line-height: 1.3; margin: 2px 0; overflow-wrap: anywhere; }
.rv-en { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
.rv-was { color: var(--muted); font-size: 15px; margin: 0 0 6px; }
.rv-was s { text-decoration-thickness: 2px; }
.rv-question { display: flex; gap: 8px; background: var(--violet-bg); color: #3e2c80; border-radius: 12px; padding: 9px 11px; font-weight: 700; font-size: 15.5px; }
.rv-question svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.rv-ctx { font-size: 14.5px; }
.rv-ctx p { margin: 0 0 4px; }
.rv-check b { color: var(--ink); }
.rv-more summary { cursor: pointer; color: var(--blue); font-weight: 700; font-size: 14px; padding: 4px 0; min-height: 32px; display: inline-flex; align-items: center; }
.rv-more p { margin: 4px 0; }
.rv-around { border-left: 3px solid var(--line); padding-left: 8px; }
.rv-audio { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.rv-audio-text { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 14px; }
.rv-voice { color: var(--muted); }
.rv-audio-note { display: block; width: 100%; color: var(--muted); font-size: 13px; }
.play {
  width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--blue); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center; flex: none; box-shadow: 0 3px 0 var(--blue-dark);
}
.play svg { width: 22px; height: 22px; }
.play.small { width: 38px; height: 38px; }
.play.small svg { width: 18px; height: 18px; }
.play[data-state="playing"] { background: var(--green); box-shadow: 0 3px 0 var(--green-dark); animation: pulse 1.2s ease-in-out infinite; }
.play[data-state="loading"] { opacity: .75; }
.st-rerecord_pending .play { background: #8aa1b1; box-shadow: 0 3px 0 #66808f; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.rv-stale { background: var(--amber-bg); border: 2px solid var(--amber-line); border-radius: 12px; padding: 8px 10px; font-weight: 700; color: var(--amber-dark); font-size: 15px; }
.rv-locked .lock-final { margin: 8px 0 0; font-size: 16px; }
.rv-locked .lock-final .is-text { font-weight: 750; font-size: 19px; }

.rv-actions { margin-top: 10px; display: grid; gap: 8px; }
.options { display: grid; gap: 8px; }
.option {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 58px; text-align: left; padding: 10px 12px;
  border: 2px solid var(--line-strong); border-bottom-width: 4px; border-radius: 16px; background: var(--white);
}
.option.on { border-color: var(--blue); background: var(--sky); }
.opt-label { min-width: 34px; padding: 0 6px; height: 34px; border-radius: 10px; background: var(--slate-bg); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 13px; flex: none; }
.option.on .opt-label { background: var(--blue); color: var(--white); }
.opt-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.opt-is { font-size: 19px; font-weight: 750; line-height: 1.3; overflow-wrap: anywhere; }
.opt-tick { width: 24px; height: 24px; color: var(--blue); flex: none; }
.opt-tick svg { width: 24px; height: 24px; }
.act-main { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.options + .act-main { grid-template-columns: 1fr; }
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 52px; padding: 8px 10px;
  border: 2px solid var(--line-strong); border-bottom-width: 4px; border-radius: 14px; background: var(--white); font-weight: 850; font-size: 16px; white-space: nowrap;
}
.act .ico { width: 22px; height: 22px; }
.act-correct { color: var(--green-dark); border-color: var(--green-line); }
.act-correct.on { background: var(--green); border-color: var(--green-dark); color: var(--white); }
.act-unsure.on { background: #5d7383; border-color: #45596a; color: var(--white); }
.act-sound-ok { width: 100%; margin-top: 10px; color: var(--green-dark); border-color: var(--green-line); }
.act-sound-ok.on { background: var(--green); border-color: var(--green-dark); color: var(--white); }
/* Phones: the four tools as a 2 x 2 grid with icon and label side by side; wider screens: one row. */
.act-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tool {
  position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 6px 8px;
  border: 2px solid var(--line); border-radius: 14px; background: var(--white); font-size: 14px; font-weight: 800; color: var(--ink);
}
.tool .ico { width: 22px; height: 22px; color: var(--blue); }
.tool.open { border-color: var(--blue); background: var(--sky); }
.tool.has { border-color: var(--amber-line); }
.tool-label { line-height: 1.1; text-align: center; min-width: 0; }
.tool .count { position: absolute; top: 3px; right: 5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--amber); color: var(--white); font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.panel { margin-top: 10px; background: var(--white); border: 2px solid var(--line); border-radius: 14px; padding: 12px; }
.panel-help { display: block; font-size: 14.5px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
.sound-top { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.sound-top .panel-help { margin: 0; }
.rewrite { font-size: 20px; font-weight: 650; }
.note { margin-top: 10px; }
.note label { display: block; font-size: 14px; font-weight: 800; margin: 0 0 4px; }

/* Word chips: one per word, punctuation on its own */
.chips { display: flex; flex-wrap: wrap; gap: 8px 6px; }
.chip {
  min-height: 46px; min-width: 46px; padding: 6px 12px; border: 2px solid #c9d8e3; border-bottom-width: 4px; border-radius: 12px;
  background: var(--white); font-size: 21px; font-weight: 700; line-height: 1.1;
}
.chip.punct { min-width: 40px; padding: 6px 8px; background: #f3f6f8; color: var(--muted); }
.chip.attach { margin-left: -2px; }
.tone-fix .chip.on { background: var(--amber-bg); border-color: var(--amber); color: var(--amber-dark); text-decoration: line-through; text-decoration-thickness: 2px; }
.tone-audio .chip.on { background: var(--violet-bg); border-color: var(--violet); color: var(--violet); }
.fix-rows { display: grid; gap: 10px; margin-top: 12px; }
.fix-row { display: flex; flex-direction: column; gap: 8px; border: 2px solid var(--amber-line); border-radius: 14px; padding: 10px; background: #fffbf2; }
.fix-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fix-label { display: flex; align-items: baseline; gap: 6px; font-size: 15px; color: var(--muted); font-weight: 700; }
.fix-word { font-size: 19px; color: var(--amber-dark); text-decoration: line-through; font-weight: 800; }
.fix-input { font-size: 19px !important; font-weight: 700; }
.type-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.type-seg button { min-height: 42px; border: 2px solid var(--line-strong); border-radius: 10px; background: var(--white); font-weight: 750; font-size: 14px; padding: 4px 6px; }
.type-seg button.on { background: var(--ink); border-color: var(--ink); color: var(--white); }
.fix-why-input { order: 3; font-size: 15px !important; padding: 8px 10px !important; }

.rv-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin-top: 8px; font-size: 13.5px; }
.rv-foot:empty { display: none; }
.rv-summary { color: var(--ink); }
.save { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; margin-left: auto; }
.save .ico { width: 16px; height: 16px; }
.st-saving { color: var(--muted); }
.st-saved { color: var(--green-dark); }
.st-queued { color: var(--amber-dark); }
.st-error { color: var(--coral); }
.rv-others { margin-top: 8px; }
.others-gate { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin: 0; }
.others-gate .ico { width: 18px; height: 18px; }
.others-row {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 8px 10px; text-align: left;
  background: var(--white); border: 2px solid var(--line); border-radius: 12px; font-weight: 750; font-size: 14.5px;
}
.others-row .others-text { flex: 1; font-weight: 600; }
.others-row .others-text b { font-weight: 850; margin-right: 4px; }
.others-row .ico { width: 20px; height: 20px; color: var(--blue); }
.others-panel { background: var(--white); border: 2px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; margin-top: -6px; padding: 12px; }
.resp-list, .thread, .resp-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.resp { border: 2px solid var(--line); border-left-width: 5px; border-radius: 12px; padding: 8px 10px; background: #fbfcfd; font-size: 14.5px; }
.resp.v-correct { border-left-color: var(--green); }
.resp.v-fix, .resp.v-choose { border-left-color: var(--amber); }
.resp.v-unsure { border-left-color: #8aa1b1; }
.resp p { margin: 4px 0 0; }
.resp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.resp-head time { color: var(--muted); font-size: 12.5px; }
.vchip { font-size: 12px; font-weight: 800; border-radius: 99px; padding: 1px 8px; background: var(--slate-bg); }
.vchip.v-correct { background: var(--green-bg); color: var(--green-dark); }
.vchip.v-fix, .vchip.v-choose { background: var(--amber-bg); color: var(--amber-dark); }
.resp-fixes { margin: 4px 0 0; padding-left: 18px; }
.fix-why { display: block; color: var(--muted); font-size: 13px; }
.resp-applied .is-text, .resp-suggest .is-text, .resp-choice span { font-weight: 700; font-size: 16px; }
.resp-audio .ico { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.resp-audio.a-needs_fix { color: var(--violet); font-weight: 700; }
.resp-comment { white-space: pre-wrap; background: var(--slate-bg); border-radius: 10px; padding: 6px 8px; }
.comment { background: #f4f7f9; border-radius: 12px; padding: 8px 10px; font-size: 14.5px; }
.comment p { margin: 2px 0 0; white-space: pre-wrap; }
.comment-head { display: flex; gap: 8px; align-items: baseline; }
.comment-head time { font-size: 12.5px; color: var(--muted); }
.reply { display: grid; gap: 6px; margin-top: 10px; }
.reply label { font-size: 14px; font-weight: 800; }
.reply .btn { justify-self: end; }

/* ---- Admin -------------------------------------------------------------------- */
.admin { max-width: 100%; }
.tabs { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 14px; padding-bottom: 4px; }
.tab { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 2px solid var(--line-strong); background: var(--white); text-decoration: none; color: var(--ink); font-weight: 800; font-size: 15px; }
.tab.on { background: var(--ink); color: var(--white); border-color: var(--ink); }
.tab .ico { width: 18px; height: 18px; }
.people { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.person { margin: 0; }
.person.excluded { border-color: #f1b8ab; }
.person-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }
.person-email { margin: 4px 0; overflow-wrap: anywhere; color: var(--muted); }
.person-note { background: var(--slate-bg); border-radius: 10px; padding: 8px 10px; white-space: pre-wrap; font-size: 14.5px; }
.person-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; font-weight: 700; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 46px; height: 28px; border-radius: 99px; background: #cfdae2; position: relative; flex: none; transition: background .15s; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--coral); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--focus); outline-offset: 2px; }
.link-box { background: var(--sky); border-color: #b5d3f3; }
.link-box input { font-size: 14px; flex: 1 1 200px; }
.queue { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.qcard, .admin-body, .resp-grid { min-width: 0; }
.qcard .q-line { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 750; margin: 4px 0; }
.q-options { margin: 6px 0; padding-left: 18px; }
.resp-grid { grid-auto-flow: column; grid-auto-columns: minmax(250px, 85%); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.resp-grid > li { scroll-snap-align: start; }
.resolution { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; background: var(--green-bg); border: 2px solid var(--green-line); border-radius: 12px; padding: 8px 10px; margin: 10px 0 0; }
.resolution.old { background: var(--amber-bg); border-color: var(--amber-line); }
.resolution .ico { width: 18px; height: 18px; color: var(--green-dark); }
.res-note { display: block; width: 100%; color: var(--muted); font-size: 14px; }
.resolve { display: grid; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 2px dashed var(--line); }
.resolve-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.resolve .custom { display: grid; gap: 6px; }
.locks .lock-row, .lock-group > summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.lock-group > summary { cursor: pointer; list-style: none; }
.lock-group > summary::-webkit-details-marker { display: none; }
.lock-group .lock-row { padding-left: 14px; }
.lock-btns { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lock-btns .btn svg { width: 16px; height: 16px; }

/* ---- Bigger screens ----------------------------------------------------------- */
@media (min-width: 480px) {
  .lang .long { display: inline; }
  .lang .short { display: none; }
  .type-seg { grid-template-columns: repeat(4, 1fr); }
  .act-tools { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .tool { flex-direction: column; gap: 2px; min-height: 56px; font-size: 13px; padding: 6px 4px; }
}
@media (min-width: 720px) {
  .main { padding: 8px 24px 60px; }
  .chunk-sticky { margin: 0 -24px 14px; padding: 8px 24px 10px; }
  h1 { font-size: 30px; }
  .home .chunk-list { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .screen { padding: 18px 22px 20px; }
  .rv { padding: 14px 16px; }
  .chunk-nav { bottom: 12px; border: 2px solid var(--line); border-radius: 18px; left: 24px; right: 24px; box-shadow: 0 8px 24px rgba(24, 50, 71, .12); }
  .nav-btn { flex-direction: row; gap: 6px; font-size: 15px; }
  .admin-body .resp-grid { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); overflow: visible; }
  .main:has(.admin) { max-width: 1000px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
