:root {
  --blue: #1C3F94;
  --blue-deep: #102866;
  --blue-soft: #E4EAF8;
  --saffron: #F5B700;
  --saffron-soft: #FFF2C7;
  --ink: #12172B;
  --muted: #586079;
  --paper: #F2F4F9;
  --surface: #FFFFFF;
  --line: #D3D9E8;
  --red: #C8243A;
  --green: #1E7F52;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}
button, input, textarea, select { font: inherit; color: inherit; }
button, label.ghost { cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
button:active:not(:disabled) { transform: scale(0.97); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Header with tabs (one row) ---------- */
.top {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--safe-t) 4px 0 12px;
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(4px, env(safe-area-inset-right));
  background: var(--blue);
  color: #fff;
  flex: none;
}
.logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 9px;
  background: var(--saffron);
  color: var(--blue-deep);
  font-weight: 800;
  font-size: 19px;
}
.brand-name { font-weight: 800; font-size: 22px; margin-right: 8px; }
.tabs { flex: 1; display: flex; justify-content: center; min-width: 0; }
.tab {
  flex: 1;
  max-width: 170px;
  height: 54px;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-weight: 700;
  font-size: 16px;
  padding: 4px 4px 0;
  border-bottom: 4px solid transparent;
  white-space: nowrap;
}
.tab[aria-selected="true"] { color: #fff; border-bottom-color: var(--saffron); }
.tab:active { transform: none; background: rgba(255, 255, 255, .08); }
.icon-btn {
  flex: none;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: transparent; color: #fff;
}
.icon-btn svg { width: 24px; height: 24px; }
@media (max-width: 559px) { .brand-name { display: none; } }

main {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 16px calc(24px + var(--safe-b));
}
#panel-talk { display: flex; flex-direction: column; padding: 0; overflow: hidden; }

/* ---------- Talk: conversation ---------- */
.log {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.empty { margin: auto 0; }
.empty-big { font-size: 28px; font-weight: 800; line-height: 1.1; margin: 0 0 8px; letter-spacing: -0.01em; }
.empty-copy { color: var(--muted); margin: 0; max-width: 32em; }

.bubble {
  max-width: 92%;
  border-radius: var(--radius-lg);
  padding: 12px 14px;
}
.bubble.new { animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.bubble.me {
  align-self: flex-end;
  background: var(--blue);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.bubble.them {
  align-self: flex-start;
  background: var(--saffron-soft);
  border: 2px solid var(--saffron);
  border-bottom-left-radius: 6px;
}
.b-orig { font-size: 14px; opacity: .8; margin: 0 0 6px; }
.bubble.them .b-orig { margin: 6px 0 0; }
.b-main { font-size: 24px; font-weight: 700; line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.b-pron { font-size: 14px; opacity: .85; margin: 4px 0 0; }
.b-second { font-size: 17px; margin: 8px 0 0; }
.b-note {
  font-size: 14px;
  margin: 10px 0 0;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .14);
}
.bubble.them .b-note { background: rgba(255, 255, 255, .7); }
.b-lang { font-size: 13px; color: var(--muted); margin: 0 0 2px; }
.b-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.b-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid rgba(255, 255, 255, .45);
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 15px;
  font-weight: 700;
}
.b-btn svg { width: 18px; height: 18px; }
.bubble.me .b-btn.primary { background: var(--saffron); border-color: var(--saffron); color: var(--blue-deep); padding: 0 20px; }
.bubble.pending .b-main { opacity: .65; font-weight: 500; font-size: 18px; }
.bubble.error { background: #fff; color: var(--ink); border: 2px solid var(--red); }
.bubble.error .b-btn { border-color: var(--red); color: var(--red); }
.dots::after { content: ""; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* ---------- Talk: composer ---------- */
.composer {
  flex: none;
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 12px 16px calc(10px + var(--safe-b));
  transition: background-color .25s ease;
}
.composer[data-who="them"] { background: var(--saffron); border-top-color: var(--saffron); }

.who {
  display: flex;
  gap: 3px;
  padding: 3px;
  border-radius: 12px;
  background: var(--blue-soft);
  margin-bottom: 12px;
}
.composer[data-who="them"] .who { background: rgba(255, 255, 255, .45); }
.who-btn {
  flex: 1;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.who-btn small { font-size: 13px; opacity: .75; margin-left: 2px; }
.who-btn:active { transform: none; }
.who-btn[data-who="me"][aria-checked="true"] { background: var(--blue); color: #fff; }
.who-btn[data-who="them"][aria-checked="true"] { background: var(--ink); color: var(--saffron); }
.who-btn[data-who="them"][aria-checked="true"] small { color: #fff; opacity: .85; }

.quick {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scroll-padding-inline: 16px;
  margin: 0 -16px 10px;
  padding: 0 16px 2px;
  scrollbar-width: none;
}
.quick::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  scroll-snap-align: start;
  min-height: 52px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 4px 14px;
  text-align: left;
  line-height: 1.15;
}
.chip b { display: block; font-size: 18px; }
.chip small { display: block; font-size: 13px; color: var(--muted); }

.compose-row { display: flex; gap: 10px; align-items: flex-end; }
.compose-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  border: 2px solid var(--line);
  border-radius: 28px;
  background: #fff;
  padding: 4px 4px 4px 18px;
  transition: border-color .15s ease;
}
.compose-field:focus-within { border-color: var(--blue); }
.composer[data-who="them"] .compose-field { border-color: var(--ink); }
#input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 34vh;
  resize: none;
  border: 0;
  padding: 10px 0;
  font-size: 18px;
  line-height: 1.3;
  background: transparent;
  outline: none;
}
.mic {
  flex: none;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: var(--blue-soft);
  display: grid; place-items: center;
  color: var(--blue-deep);
  transition: background-color .15s ease;
}
.composer[data-who="them"] .mic { background: var(--saffron-soft); color: var(--ink); }
.mic svg { width: 22px; height: 22px; }
.mic.listening { background: var(--red); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(200, 36, 58, .25); } }
.send-round {
  flex: none;
  width: 56px; height: 56px;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(28, 63, 148, .3);
}
.send-round svg { width: 24px; height: 24px; }
.composer[data-who="them"] .send-round { background: var(--ink); color: var(--saffron); box-shadow: 0 4px 14px rgba(18, 23, 43, .25); }
.send-round:disabled { opacity: .5; cursor: default; }
.compose-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--muted);
  min-height: 32px;
}
.composer[data-who="them"] .compose-foot { color: var(--ink); }
.link-btn {
  border: 0;
  background: none;
  padding: 6px 0 6px 8px;
  color: inherit;
  text-decoration: underline;
  font-size: 13px;
  white-space: nowrap;
}

/* ---------- Phrases & My questions ---------- */
.search-row {
  position: sticky;
  top: -16px;
  z-index: 2;
  margin: -16px -16px 12px;
  padding: 12px 16px;
  background: var(--paper);
}
input[type="search"], .add-box textarea, dialog input, dialog textarea, dialog select {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  background: #fff;
  font-size: 17px;
}
input[type="search"]:focus, .add-box textarea:focus, dialog input:focus, dialog textarea:focus, dialog select:focus { border-color: var(--blue); outline: none; }
.group { margin-bottom: 24px; }
.group h2 { font-size: 20px; margin: 0 0 8px; line-height: 1.2; }
.group-note { font-size: 14px; color: var(--muted); margin: -2px 0 10px; }
.phrase {
  display: flex;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  overflow: hidden;
}
.phrase-main {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  padding: 12px 4px 12px 14px;
  text-align: left;
}
.phrase-main:active { transform: none; background: var(--blue-soft); }
.p-en { font-size: 14px; color: var(--muted); display: block; }
.p-wo { font-size: 21px; font-weight: 700; display: block; line-height: 1.2; color: var(--blue-deep); overflow-wrap: anywhere; }
.p-pron { font-size: 13px; color: var(--muted); display: block; }
.p-fr { font-size: 15px; display: block; margin-top: 2px; }
.p-tools { display: flex; flex-direction: column; padding: 4px; }
.tool {
  width: 44px; height: 44px;
  border: 0; border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  display: grid; place-items: center;
}
.tool svg { width: 20px; height: 20px; }
.tool:active { background: var(--blue-soft); color: var(--blue); }
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 6px;
  background: var(--blue-soft);
  color: var(--blue-deep);
}
.badge.ok { background: #DDF1E6; color: var(--green); }

.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.num {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 10px;
  min-height: 72px;
  text-align: left;
}
.num b { display: block; font-size: 24px; line-height: 1; }
.num span { display: block; font-size: 16px; font-weight: 700; color: var(--blue-deep); margin-top: 6px; }

.pron-guide { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 0 14px; margin: 8px 0 12px; }
.pron-guide summary { font-weight: 700; cursor: pointer; padding: 14px 0; }
.pron-guide dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 14px; }
.pron-guide dt { font-weight: 800; font-size: 20px; color: var(--blue-deep); }
.pron-guide dd { margin: 0; align-self: center; }
.fineprint { font-size: 14px; color: var(--muted); }

.add-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; margin-bottom: 18px; }
.add-box label { font-weight: 700; display: block; margin-bottom: 8px; font-size: 18px; }
.add-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; flex-wrap: wrap; }
.add-actions .send { height: 48px; }
.status { font-size: 14px; color: var(--muted); }
.data-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.ghost {
  min-height: 44px;
  border: 2px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 700;
  font-size: 15px;
}
.file-ghost { display: inline-flex; align-items: center; }
.mine-empty { color: var(--muted); }

/* ---------- Show (full screen) ---------- */
.show {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  background: var(--saffron);
  color: var(--ink);
  padding: calc(16px + var(--safe-t)) 20px 0;
  outline: none;
}
.show-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  transition: transform .4s cubic-bezier(.3, .7, .2, 1);
}
.show-body.flipped { transform: rotate(180deg); }
.show-wo {
  margin: 0;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.015em;
  font-size: 64px;
  overflow-wrap: normal;
  hyphens: none;
}
.show-fr { font-size: clamp(19px, 5.4vw, 32px); line-height: 1.25; margin: .7em 0 0; font-weight: 500; }
.show-bar {
  flex: none;
  border-top: 2px solid rgba(18, 23, 43, .14);
  padding: 12px 0 calc(14px + var(--safe-b));
}
.show-pron { font-size: 15px; margin: 0 0 10px; }
.show-pron:empty { display: none; }
.show-actions { display: flex; gap: 8px; }
.show-btn {
  flex: 1 1 0;
  min-width: 0;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  background: transparent;
  font-weight: 800;
  font-size: 17px;
}
.show-btn svg { width: 22px; height: 22px; flex: none; }
.show-btn[aria-pressed="true"] { background: rgba(18, 23, 43, .12); }
.show-btn.close { flex-grow: 1.4; background: var(--ink); color: var(--saffron); }

/* ---------- Dialogs (bottom sheets on phones) & toast ---------- */
dialog {
  border: 0;
  border-radius: var(--radius-lg);
  padding: 18px;
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  color: var(--ink);
}
dialog::backdrop { background: rgba(16, 40, 102, .45); }
dialog h2 { margin: 0 0 12px; font-size: 22px; }
dialog label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
dialog label input, dialog label textarea { margin-top: 4px; font-weight: 400; }
.voice-pick { margin-bottom: 12px; }
.voice-pick label { margin-bottom: 4px; }
.voice-row { display: flex; gap: 8px; }
.voice-row select { flex: 1; min-width: 0; color: inherit; }
.voice-row button { flex: none; }
.check-row { display: flex !important; align-items: center; gap: 10px; min-height: 44px; }
.check-row input { width: 24px; height: 24px; margin: 0; flex: none; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.dlg-actions .send { height: 48px; }
#editReset { margin-right: auto; }
.grabber { display: none; }

@media (max-width: 600px) {
  dialog {
    margin: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
    padding: 8px 16px calc(16px + var(--safe-b));
  }
  dialog[open] { animation: sheet .26s cubic-bezier(.3, .7, .2, 1); }
  .grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 12px; }
  .dlg-actions .ghost, .dlg-actions .send { flex: 1; }
  #editReset { flex-basis: 100%; margin-right: 0; }
}
@keyframes sheet { from { transform: translateY(40%); opacity: .4; } }

.toast {
  position: fixed;
  left: 50%;
  top: calc(66px + var(--safe-t));
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  text-align: center;
  box-shadow: 0 6px 20px rgba(16, 40, 102, .25);
}

/* ---------- Listening (full screen while the mic is on) ---------- */
.listen {
  --lvl: 0; /* live voice level 0..1, set from app.js */
  position: fixed;
  inset: 0;
  z-index: 55; /* under the toast */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(18px + var(--safe-t)) 20px calc(18px + var(--safe-b));
  background: radial-gradient(120% 75% at 50% 38%, #24479d 0%, var(--blue-deep) 55%, #091842 100%);
  color: #fff;
  overflow: hidden;
  animation: listen-in .3s cubic-bezier(.2, .8, .2, 1);
}
.listen[data-who="them"] { background: radial-gradient(120% 75% at 50% 38%, #2c3149 0%, var(--ink) 58%, #06080f 100%); }
@keyframes listen-in { from { opacity: 0; transform: scale(1.04); } }
.listen-top { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; }
.listen-label { display: inline-flex; align-items: center; gap: 9px; }
.listen-label::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--red);
  animation: rec-dot 1.4s ease-out infinite;
}
@keyframes rec-dot { 0% { box-shadow: 0 0 0 0 rgba(200, 36, 58, .7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(200, 36, 58, 0); } }
.listen-time { font-variant-numeric: tabular-nums; opacity: .7; }
.listen-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 4vh, 34px);
}
.listen-orb { position: relative; width: min(44vw, 30vh, 200px); aspect-ratio: 1; flex: none; animation: orb-breathe 3.4s ease-in-out infinite; }
@keyframes orb-breathe { 50% { transform: scale(1.05); } }
.listen-orb span { position: absolute; inset: 0; border-radius: 50%; will-change: transform; }
.listen-orb span:nth-child(1) {
  z-index: 2;
  background: radial-gradient(circle at 34% 28%, #fff6d6 0%, var(--saffron) 42%, #d68a00 100%);
  box-shadow: 0 0 calc(40px + var(--lvl) * 70px) rgba(245, 183, 0, calc(.35 + var(--lvl) * .4));
  transform: scale(calc(.74 + var(--lvl) * .2));
}
.listen-orb span:nth-child(2) { border: 2px solid rgba(245, 183, 0, .5); transform: scale(calc(.9 + var(--lvl) * .45)); opacity: calc(.35 + var(--lvl) * .5); }
.listen-orb span:nth-child(3) { border: 2px solid rgba(245, 183, 0, .3); transform: scale(calc(1 + var(--lvl) * .8)); opacity: calc(.18 + var(--lvl) * .4); }
.listen-wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 56px; width: min(100%, 320px); flex: none; }
.listen-wave i {
  flex: 1;
  max-width: 6px;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, var(--saffron));
  transform: scaleY(.07);
  will-change: transform;
}
.listen-text {
  margin: 0;
  width: 100%;
  max-width: 34rem;
  min-height: 2.5em;
  text-align: center;
  font-size: clamp(22px, 6vw, 34px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}
.listen-text .interim { opacity: .55; }
.listen-text .prompt { font-weight: 500; opacity: .7; }
.listen.busy .listen-text .prompt::after { content: ""; animation: dots 1.2s steps(4) infinite; }
.listen-stop {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 calc(6px + var(--lvl) * 16px) rgba(255, 255, 255, .13), 0 10px 30px rgba(0, 0, 0, .35);
  transition: transform .15s ease;
}
.listen-stop:active { transform: scale(.94); }
.listen-stop-icon { width: 30px; height: 30px; border-radius: 7px; background: var(--red); }
.listen-stop-label { margin-top: 10px; font-size: 14px; font-weight: 700; opacity: .75; }
.listen-cancel { margin-top: 6px; border: 0; background: none; color: inherit; opacity: .6; font: inherit; font-size: 15px; padding: 10px 18px; }
.listen.busy .listen-stop { opacity: .5; pointer-events: none; }
.listen.busy .listen-label::before { animation: none; background: rgba(255, 255, 255, .5); }

@media (min-width: 700px) {
  .bubble { max-width: 80%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Audio ---------- */
.ghost.wide { width: 100%; margin: 4px 0 8px; }
.show-btn.play { background: #fff; }
.show-btn.close { flex-grow: 1.15; }
@media (max-width: 400px) {
  .show-actions { gap: 6px; }
  .show-btn { font-size: 15px; gap: 4px; }
  .show-btn svg { width: 19px; height: 19px; }
}
.b-btn.loading, .tool.loading, .show-btn.loading { opacity: .6; pointer-events: none; }
.b-btn.playing, .show-btn.playing { animation: pulse-soft 1s ease-in-out infinite; }
@keyframes pulse-soft { 50% { opacity: .65; } }
.tool.wolof { color: var(--blue-deep); background: var(--saffron-soft); }
.tool.wolof.playing { background: var(--saffron); }
.mic.busy { opacity: .6; pointer-events: none; }
.mic.busy svg { animation: pulse-soft .8s ease-in-out infinite; }
.bubble.them .b-lang .spoken { font-weight: 700; }

.rec-open { width: 100%; margin: 4px 0 4px; }
.rec-wrap { display: flex; flex-direction: column; }
.rec-count { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
.rec-en { font-size: 15px; color: var(--muted); margin: 0; }
.rec-wo { font-size: 28px; font-weight: 800; line-height: 1.15; margin: 4px 0 16px; color: var(--blue-deep); overflow-wrap: anywhere; }
.rec-controls { display: flex; align-items: center; gap: 16px; padding: 12px; border-radius: var(--radius-md); background: var(--paper); }
.rec-big {
  flex: none;
  width: 76px; height: 76px;
  border-radius: 50%;
  border: 4px solid var(--red);
  background: #fff;
  display: grid; place-items: center;
}
.rec-icon { width: 34px; height: 34px; border-radius: 50%; background: var(--red); transition: border-radius .15s, width .15s, height .15s; }
.rec-big.on { animation: pulse 1.2s ease-in-out infinite; }
.rec-big.on .rec-icon { width: 26px; height: 26px; border-radius: 6px; }
.rec-side { flex: 1; min-width: 0; }
.rec-state { margin: 0 0 8px; font-size: 15px; font-weight: 600; }
.rec-state.ok { color: var(--green); }
.rec-small { display: flex; gap: 8px; flex-wrap: wrap; }
.ghost:disabled { opacity: .4; cursor: default; }
#hint { flex: 1; min-width: 0; line-height: 1.3; }
.composer[data-who="them"] #clearTalk { display: none; }
@media (max-width: 400px) {
  #showFlip { flex: 0 0 52px; }
  #showFlip span { display: none; }
}
.tool.labeled { width: 54px; height: 50px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.tool.labeled small { font-size: 11px; font-weight: 700; line-height: 1; }
.p-tools { gap: 4px; align-items: center; }
