/* English For Welders — app shell styles.
 *
 * Component shapes are carried over from Bark Bus (brand-colour header, pill
 * tabs on the brand ground, white-on-brand login, 14px cards, 11px/800
 * uppercase labels, system font). The brand hue is steel blue with an amber
 * "spark" accent; change --brand / --brand-dark / --brand-pale to re-skin. */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:      #1d4f7c;
  --brand-dark: #143a5c;
  --brand-pale: #e6eff7;
  --spark:      #f59e0b;
  --green:      #2D7A44;
  --green-pale: #e8f5ec;
  --red:        #c0392b;
  --red-pale:   #fbeceb;
  --grey-100:   #f5f5f5;
  --grey-200:   #e0e0e0;
  --grey-500:   #8a949e;
  --grey-600:   #55616d;
  --grey-800:   #2b333c;
  --white:      #ffffff;
  --safe-top:   env(safe-area-inset-top, 0px);
  --safe-bot:   env(safe-area-inset-bottom, 0px);
  --header-h:   56px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  background: var(--grey-100);
  color: var(--grey-800);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  /* Screens are position:fixed and manage their own scrollports. */
  overflow: hidden;
}
button { font: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--spark); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ── Screens ──────────────────────────────────────────────────────────────── */
.screen { position: fixed; inset: 0; overflow: hidden; display: none; }
.screen.active { display: flex; flex-direction: column; }
/* On a desktop browser keep the phone proportions instead of stretching. */
@media (min-width: 640px) {
  body { background: #dfe6ee; }
  .screen { left: 50%; right: auto; width: 440px; transform: translateX(-50%); box-shadow: 0 0 60px rgba(10, 20, 35, .18); background: var(--grey-100); }
}

/* ── Login ────────────────────────────────────────────────────────────────── */
.login-wrap {
  flex: 1; background: var(--brand); color: var(--white); overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(var(--safe-top) + 24px) 24px calc(var(--safe-bot) + 24px);
}
/* Unmistakable "DEV" marker — only shown when the backend is not production. */
.dev-env-badge {
  margin-bottom: 20px; padding: 6px 15px; border-radius: 999px;
  background: var(--spark); color: #1f2937; font-size: 12px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; border: 2px solid var(--white);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28); white-space: nowrap;
}
.logo-mark {
  width: 104px; height: 104px; border-radius: 24px; background: var(--brand-dark);
  display: grid; place-items: center; box-shadow: 0 18px 44px rgba(0, 0, 0, .22);
}
.logo-name { font-size: 22px; font-weight: 800; margin-top: 16px; letter-spacing: -.01em; }
.logo-sub { font-size: 12.5px; opacity: .85; letter-spacing: .08em; margin: 4px 0 26px; text-transform: uppercase; text-align: center; }
.login-form { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 12px; }
.login-form input {
  width: 100%; padding: 14px 16px; border: none; border-radius: 10px;
  font-size: 16px; background: rgba(255, 255, 255, .95); color: #222;
}
.login-form input:focus { outline: 3px solid rgba(255, 255, 255, .6); }
.login-error { background: rgba(192, 57, 43, .92); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.login-info { background: rgba(255, 255, 255, .16); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.link-btn.light { color: rgba(255, 255, 255, .85); font-weight: 600; padding: 6px; }
.btn-primary {
  width: 100%; padding: 14px; background: var(--white); color: var(--brand-dark);
  border: none; border-radius: 10px; font-size: 17px; font-weight: 700;
}
.btn-primary:disabled { opacity: .6; }
.btn-secondary {
  width: 100%; padding: 12px; background: transparent; color: var(--white);
  border: 2px solid rgba(255, 255, 255, .5); border-radius: 10px; font-size: 15px; font-weight: 600;
}
.btn-secondary:active { background: rgba(255, 255, 255, .1); }
.login-version {
  margin-top: 26px; font-size: 11px; color: rgba(255, 255, 255, .5);
  border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 10px;
  width: 100%; max-width: 320px; text-align: center;
}

/* ── Loading feedback ─────────────────────────────────────────────────────── */
/* A button that is working: spinner + verb, so a tap never feels ignored. */
.is-busy { position: relative; pointer-events: none; opacity: .92; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.btn-primary.is-busy, .btn-secondary.is-busy { display: flex; }
/* Working is not the same as unavailable: keep the busy button at full strength. */
.btn-primary.is-busy:disabled, .footbar button.is-busy:disabled, .btn-go.is-busy:disabled, .seg-btn.is-busy:disabled { opacity: 1; }
.is-busy::before {
  content: ''; width: 16px; height: 16px; border-radius: 999px; flex-shrink: 0;
  border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.login-form.is-working input, .login-form.is-working .btn-secondary, .login-form.is-working .link-btn, .login-form.is-working ~ .lang-pick { opacity: .6; pointer-events: none; }
.net-bar { position: fixed; top: var(--safe-top); left: 0; right: 0; height: 3px; z-index: 60; overflow: hidden; background: rgba(245, 158, 11, .25); }
.net-bar i { position: absolute; top: 0; bottom: 0; width: 40%; background: var(--spark); animation: net-slide 1.1s ease-in-out infinite; }
@keyframes net-slide { 0% { left: -40%; } 100% { left: 100%; } }
@media (min-width: 640px) { .net-bar { left: 50%; right: auto; width: 440px; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .net-bar i { animation-duration: 3s; } .is-busy::before { animation-duration: 2s; } }

.boot-spinner { width: 26px; height: 26px; margin-top: 26px; border-radius: 999px; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--white); animation: spin .8s linear infinite; }
button.card.is-busy, button.row.is-busy { display: flex; opacity: .7; }
button.card.is-busy::before, button.row.is-busy::before { position: absolute; right: 14px; top: 14px; }

/* ── Header + tabs ────────────────────────────────────────────────────────── */
.app-header {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: calc(var(--safe-top) + 8px) 12px 8px;
  background: var(--brand); color: var(--white);
  min-height: calc(var(--header-h) + var(--safe-top));
}
.app-header .ttl { flex: 1; min-width: 0; }
.header-title { margin: 0; outline: none; font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-title-sub { font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-icon {
  background: rgba(255, 255, 255, .12); border: none; color: var(--white);
  min-width: 44px; height: 44px; border-radius: 999px; font-size: 13px; font-weight: 700; padding: 0 10px;
}
.btn-icon.on { background: var(--white); color: var(--brand-dark); }
.btn-icon.back { font-size: 22px; line-height: 1; padding-bottom: 3px; }
.tabs { display: flex; gap: 6px; background: var(--brand); padding: 0 10px 8px; flex-shrink: 0; }
.tab {
  flex: 1; min-height: 44px; padding: 7px 10px; background: rgba(255, 255, 255, .06); border: none;
  color: rgba(255, 255, 255, .7); font-size: 13px; font-weight: 600; border-radius: 999px;
  transition: background .15s, color .15s;
}
.tab.active { color: var(--white); background: rgba(255, 255, 255, .2); }

.steps { display: flex; background: var(--brand); padding: 0 10px 8px; gap: 4px; flex-shrink: 0; }
.steps span {
  flex: 1; text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: rgba(255, 255, 255, .5); padding: 4px 0;
}
.steps span.cur { color: var(--white); }
.steps span.past { color: rgba(255, 255, 255, .8); }
.prog-strip { height: 5px; background: var(--brand-dark); flex-shrink: 0; }
.progress-bar { display: block; height: 100%; background: var(--white); transition: width .35s ease; }

/* ── Content ──────────────────────────────────────────────────────────────── */
.content {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 12px calc(var(--safe-bot) + 16px);
  display: flex; flex-direction: column; gap: 10px;
}
.label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.card {
  background: var(--white); border: 1px solid rgba(29, 79, 124, .13); border-radius: 14px;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
}
button.card { text-align: left; width: 100%; color: inherit; }
button.card:active { background: var(--brand-pale); }
.card.hero { background: linear-gradient(180deg, #215a8c 0%, #17456e 100%); color: var(--white); border: none; }
.card.hero:active { background: var(--brand-dark); }
.card.hero .label { color: rgba(255, 255, 255, .78); }
.card h3 { font-size: 16px; font-weight: 700; line-height: 1.25; }
.card p { font-size: 13px; color: var(--grey-600); }
.card.hero p { color: rgba(255, 255, 255, .85); }
.card.row-card { flex-direction: row; align-items: center; gap: 10px; }
.btn-go {
  align-self: flex-start; margin-top: 4px; background: var(--white); color: var(--brand-dark);
  border: none; border-radius: 10px; padding: 9px 16px; font-weight: 700; font-size: 14px;
}
.btn-go.pale { background: var(--brand-pale); color: var(--brand); align-self: center; }
.mod-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.count { font-size: 12px; font-weight: 700; color: var(--grey-500); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar { display: block; height: 6px; border-radius: 3px; background: var(--grey-200); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }

.rows { background: var(--white); border: 1px solid rgba(29, 79, 124, .13); border-radius: 14px; overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px;
  background: none; border: none; border-bottom: 1px solid #edf0f3; text-align: left; color: inherit;
}
.row:last-child { border-bottom: none; }
button.row:active { background: var(--brand-pale); }
.row .num {
  width: 26px; height: 26px; flex-shrink: 0; border-radius: 999px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--brand-pale); color: var(--brand); font-variant-numeric: tabular-nums;
}
.row .num.done { background: var(--green); color: var(--white); }
.mid { flex: 1; min-width: 0; }
.row .t { font-weight: 600; font-size: 14px; line-height: 1.3; display: block; }
.row .s { font-size: 12px; color: var(--grey-500); display: block; }
.row .chev { color: #b5bec7; font-size: 18px; }
.say {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 999px; border: none;
  background: var(--brand-pale); color: var(--brand); display: grid; place-items: center;
}
.say:active { background: var(--brand); color: var(--white); }
.phrase { font-weight: 600; font-size: 15px; display: block; }
.ru { font-size: 12.5px; color: var(--grey-500); display: block; }
.hide-ru .ru { display: none; }
.chip {
  display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 2px 9px; background: rgba(245, 158, 11, .16); color: #8a5200;
}

.bubble { max-width: 86%; padding: 9px 12px; border-radius: 14px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.bubble .who { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; opacity: .7; }
.bubble.them { background: var(--white); border: 1px solid #e1e6eb; align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { background: var(--brand); color: var(--white); align-self: flex-end; border-bottom-right-radius: 4px; }
.bubble.me .ru { color: rgba(255, 255, 255, .7); }

/* ── Speech player ────────────────────────────────────────────────────────── */
.w { border-radius: 3px; padding: 0 1px; }
.w.on { background: #fde68a; color: #1f2937; }
.bubble.me .w.on { background: var(--spark); color: #1f2937; }
.bubble.speaking { box-shadow: 0 0 0 2px var(--spark); }
.say.playing { background: var(--brand); color: var(--white); }
.btn-go.playing { background: var(--brand); color: var(--white); }
.fixed .w.on { background: var(--spark); }
.player { display: flex; gap: 8px; justify-content: center; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.player .btn-go { margin-top: 0; }
.player-note { font-size: 12.5px; color: var(--grey-500); text-align: center; }

/* ── Recorder ─────────────────────────────────────────────────────────────── */
.rec { align-items: center; text-align: center; gap: 10px; padding: 18px 14px; }
.rec-btn {
  width: 74px; height: 74px; border-radius: 999px; border: 4px solid var(--white);
  background: var(--red); box-shadow: 0 0 0 2px var(--red);
}
.rec-btn.live { border-radius: 22px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(192, 57, 43, .22); } }
.rec-time { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.rec audio { width: 100%; }
.note-bad { background: var(--red-pale); border-radius: 8px; padding: 8px 10px; font-size: 13px; color: #8b2a20; }

/* ── Footer action bar ────────────────────────────────────────────────────── */
.footbar {
  flex-shrink: 0; padding: 10px 12px calc(var(--safe-bot) + 12px);
  background: var(--white); border-top: 1px solid #e3e8ed; display: flex; gap: 8px;
}
.footbar button {
  flex: 1; padding: 13px; border-radius: 10px; font-size: 16px; font-weight: 700;
  border: none; background: var(--brand); color: var(--white);
}
.footbar button.ghost { flex: 0 0 auto; background: var(--white); color: var(--brand); border: 2px solid var(--brand-pale); padding-inline: 16px; }
.footbar button:disabled { opacity: .4; cursor: default; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--white); border: 1px solid rgba(29, 79, 124, .13); border-radius: 14px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--brand-dark); }
.stat span { font-size: 11px; color: var(--grey-500); font-weight: 600; }
.link-btn { background: none; border: none; color: var(--brand); font-weight: 700; font-size: 14px; min-height: 44px; padding: 10px 14px; align-self: center; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-bot) + 84px); transform: translateX(-50%);
  background: #1f2937; color: var(--white); padding: 10px 16px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; z-index: 50; max-width: 90vw; text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .rec-btn.live { animation: none; }
  .progress-bar, .tab { transition: none; }
}

/* ── AI feedback ──────────────────────────────────────────────────────────── */
.btn-go.solid { background: var(--brand); color: var(--white); align-self: stretch; text-align: center; padding: 12px 16px; font-size: 15px; }
.working { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--brand) !important; }
.spinner { width: 18px; height: 18px; border-radius: 999px; border: 3px solid var(--brand-pale); border-top-color: var(--brand); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.fb-summary { font-size: 15px !important; color: var(--grey-800) !important; font-weight: 600; }
.fix-block { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid #edf0f3; }
.fix-block:first-of-type { border-top: none; padding-top: 0; }
.fix { background: var(--red-pale); border-radius: 8px; padding: 7px 10px; font-size: 13.5px; color: #8b2a20; text-decoration: line-through; }
.fixed { background: var(--green-pale); border-radius: 8px; padding: 5px 5px 5px 10px; font-size: 14px; color: #1f5730; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.fixed span { flex: 1; }
.fixed .say { width: 44px; height: 44px; background: rgba(255, 255, 255, .7); color: #1f5730; }
/* The reason for a correction is the one place Russian always shows: a learner
   who has hidden translations still needs to understand WHY. */
.hide-ru .ru.always { display: block; }
.improved { font-size: 15px !important; color: var(--grey-800) !important; line-height: 1.5; }
.heard summary { font-size: 12px; font-weight: 700; color: var(--grey-500); cursor: pointer; }
.heard p { margin-top: 6px; font-style: italic; }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ── Language picker, glossary, small controls ───────────────────────────── */
.lang-pick { width: 100%; max-width: 320px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.lang-legend { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.lang-btn {
  width: 100%; text-align: left; padding: 11px 14px; border-radius: 10px; font-size: 14px; font-weight: 600;
  background: rgba(255, 255, 255, .1); color: var(--white); border: 2px solid rgba(255, 255, 255, .35);
}
.lang-btn.on { background: var(--white); color: var(--brand-dark); border-color: var(--white); }
.def { font-size: 12.5px; color: var(--grey-500); display: block; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pill { border: 1.5px solid var(--brand-pale); background: var(--white); color: var(--brand); border-radius: 999px; min-height: 44px; padding: 3px 16px; font-size: 13px; font-weight: 700; }
.pill.on { background: var(--brand); color: var(--white); border-color: var(--brand); }
.bubble { position: relative; padding-right: 48px; }
.say.inline { position: absolute; right: 2px; top: 2px; width: 44px; height: 44px; background: transparent; }
.bubble.them .say.inline { color: var(--brand); }
.bubble.me .say.inline { background: rgba(255, 255, 255, .18); color: var(--white); }
.search { width: 100%; padding: 11px 12px; border: 1px solid var(--grey-200); border-radius: 10px; font-size: 16px; background: var(--grey-100); margin-top: 4px; }
.card.muted { opacity: .7; }
.hint { font-size: 12.5px !important; color: var(--grey-500) !important; }
.why { font-size: 13px !important; color: var(--grey-600) !important; }
.seg { display: flex; gap: 6px; }
.seg-btn { flex: 1; padding: 9px; border-radius: 10px; border: 1.5px solid var(--brand-pale); background: var(--white); color: var(--brand); font-weight: 700; font-size: 14px; }
.seg-btn.on { background: var(--brand); color: var(--white); border-color: var(--brand); }

/* ── Sign-in: what this is, and the legal links ── */
.landing { list-style: none; width: 100%; max-width: 320px; margin: -12px 0 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .9); }
.landing li { padding-left: 18px; position: relative; }
.landing li::before { content: ''; position: absolute; left: 2px; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--spark); }
.login-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 4px; margin-top: 10px; max-width: 320px; }
.login-links .agree { flex-basis: 100%; font-size: 11.5px; line-height: 1.35; text-align: center; color: rgba(255, 255, 255, .75); margin-bottom: 2px; }
.link-btn.small { font-size: 12.5px; padding: 10px 8px; text-decoration: none; display: inline-flex; align-items: center; }

/* ── Course map: streak and review ── */
.chip-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.streak { font-size: 12px; font-weight: 800; color: #8a5a00; background: #fdf1d8; border-radius: 999px; padding: 5px 12px; }
.streak.today { background: var(--green-pale); color: #1f5730; }
.chip-row .hint { flex: 1; min-width: 160px; }

/* ── Questions: the quick check and the word review ── */
.q-word { flex-direction: row; align-items: center; gap: 10px; padding: 18px 14px; }
.q-word .phrase { font-size: 20px; flex: 1; }
.opts { display: flex; flex-direction: column; gap: 8px; }
.opt { text-align: left; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid rgba(29, 79, 124, .18); background: var(--white); font-size: 14.5px; line-height: 1.3; color: var(--grey-800); }
.opt:active { background: var(--brand-pale); }
.opt.right { background: var(--green-pale); border-color: var(--green); color: #1f5730; font-weight: 700; }
.opt.wrong { background: var(--red-pale); border-color: var(--red); color: #8b2a20; }
.opt.dim { opacity: .55; }

/* ── Role-play ── */
.bubble.your-turn { box-shadow: 0 0 0 3px var(--spark); }
.label-row .pills { display: flex; gap: 6px; }

/* ── Consent, danger zone, legal text ── */
.card.consent { border-color: var(--spark); }
.card.danger { border-color: var(--red); }
.btn-go.danger { background: var(--red); color: var(--white); }
.card .link-btn { align-self: flex-start; padding-left: 0; }
.prose h3 { margin-top: 10px; font-size: 14.5px; }
.prose p { font-size: 13.5px; line-height: 1.5; color: var(--grey-800); }
.settings-links { display: flex; flex-wrap: wrap; gap: 0 14px; }

/* ── Attempt history ── */
.attempt { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid #edf0f3; }
.attempt:first-of-type { border-top: none; }
.attempt .mid { flex: 1; min-width: 0; }
.attempt .t { font-size: 13px; font-weight: 600; display: block; }
.attempt .s { font-size: 12px; color: var(--grey-500); display: block; }
.attempt audio { width: 170px; height: 36px; }

/* ── Toolkit materials ── */
details.kit summary { cursor: pointer; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-height: 28px; list-style: none; }
details.kit summary::-webkit-details-marker { display: none; }
details.kit summary h3::before { content: '\203A'; display: inline-block; margin-right: 8px; color: var(--grey-500); transition: transform .15s; }
details.kit[open] summary h3::before { transform: rotate(90deg); }
details.kit[open] summary { margin-bottom: 4px; }
.qa { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid #edf0f3; }
.qa-q { font-weight: 700 !important; color: var(--grey-800) !important; font-size: 14px !important; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ── Admin ── */
.lesson-bars { display: grid; grid-template-columns: 22px 1fr 28px; gap: 4px 8px; align-items: center; font-size: 11.5px; color: var(--grey-600); font-variant-numeric: tabular-nums; }
.admin-form { display: flex; gap: 8px; }
.admin-form .search { margin-top: 0; flex: 1; min-width: 0; }
.admin-form .btn-go { margin-top: 0; }
.learner { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-top: 1px solid #edf0f3; }
.learner .t { font-weight: 700; font-size: 14px; word-break: break-all; }
.learner .s { font-size: 12px; color: var(--grey-500); }
.learner .player { justify-content: flex-start; }

/* ── Fixes from the screenshot tour ── */
/* The sign-in screen can be taller than the phone: centre it when it fits, scroll from the top when it does not. */
.login-wrap { justify-content: flex-start; overflow-y: auto; }
.login-wrap::before, .login-wrap::after { content: ''; flex: 1 0 0px; }
@media (max-height: 800px) {
  .logo-mark { width: 72px; height: 72px; border-radius: 18px; }
  .logo-mark svg { width: 44px; height: 44px; }
  .logo-name { margin-top: 10px; }
  .logo-sub { margin-bottom: 20px; }
}
/* A <details> that is a flex container does not open reliably; the body inside it does the layout. */
details.kit { display: block; }
details.kit summary { min-height: 44px; align-items: center; }
details.kit summary h3 { flex: 1; }
.kit-body { display: flex; flex-direction: column; gap: 6px; }
.btn-go { min-height: 44px; }
span.btn-go { display: inline-flex; align-items: center; }
/* The line being spoken: its speaker is a pause button, in the same amber as the highlighted word. */
.bubble .say.inline.playing { background: var(--spark); color: #1f2937; }
/* "What we heard" is tapped with a thumb like everything else. */
.heard summary { min-height: 44px; padding: 13px 0; margin: -12px 0; }
