:root {
  color-scheme: dark;
  --background: #0d0f10;
  --surface: #16191b;
  --inset: #101214;
  --stroke: #30383b;
  --text: #eef4f4;
  --muted: #aab7b8;
  --accent: #94d7cd;
  --warning: #efc385;
  font-family: "Segoe UI", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--text); }
a { color: var(--accent); text-underline-offset: 4px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.wrap { width: min(100%, 1120px); margin: 0 auto; padding: 0 28px 34px; }
.audience { width: min(100%, 840px); }
.topbar {
  min-height: 76px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--stroke);
}
.brand { display: inline-flex; align-items: baseline; gap: 10px; font-size: 14px; color: var(--muted); }
.brand strong { color: var(--text); font-size: 20px; font-weight: 750; letter-spacing: .11em; }
.brand .separator { color: #728586; }
.status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.dot { flex: 0 0 7px; height: 7px; border-radius: 100%; background: #788385; }
.online .dot { background: var(--accent); box-shadow: 0 0 10px #94d7cd45; }
.status.demo-mode, .demo { color: var(--warning); }
.demo-mode .dot { background: var(--warning); box-shadow: none; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 30px 0 18px; }
h1, h2, p { margin-block-start: 0; }
h1 { font-size: clamp(29px, 5vw, 47px); letter-spacing: -.035em; line-height: 1.07; font-weight: 650; margin-bottom: 7px; }
h2 { font-size: 16px; font-weight: 650; margin-bottom: 12px; }
.kicker, .langlabel { color: var(--accent); font-size: 12px; font-weight: 650; margin-bottom: 16px; }
.sub, .tip, .chip { color: var(--muted); font-size: 13px; line-height: 1.5; }
.sub { margin: 0; }
.chip { border: 1px solid var(--stroke); border-radius: 6px; padding: 6px 8px; white-space: nowrap; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel, .display, .entry { background: var(--surface); border: 1px solid var(--stroke); border-radius: 13px; }
.panel { min-width: 0; padding: 22px; }
.group { margin-bottom: 13px; }
.group label { display: block; margin-bottom: 5px; font-size: 13px; color: var(--muted); }
.row, .langtabs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row + .tip { margin: 14px 0 0; }
input, select, button {
  min-height: 40px; color: var(--text); background: var(--inset); border: 1px solid #3b4447;
  border-radius: 6px; padding: 8px 12px;
}
input, select { width: 100%; }
button { font-weight: 600; }
button:hover { background: #263033; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
button:disabled { opacity: .45; cursor: default; }
button.primary, .langtabs .active { color: #0c211e; background: var(--accent); border-color: var(--accent); }
button.danger { color: #f0baa5; }
.langtabs { margin-bottom: 15px; }
.langtabs button { flex: 1 1 86px; min-height: 47px; }
.display { padding: clamp(18px, 4vw, 30px); display: flex; flex-direction: column; min-height: 210px; gap: 12px; }
.display.demo-caption { border-color: #6a5034; }
.display .langlabel { margin: 0; }
.big, .translated { overflow-wrap: anywhere; }
.big { font-size: clamp(24px, 4.7vw, 41px); line-height: 1.24; letter-spacing: -.025em; font-weight: 580; }
.original, .source { color: var(--muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.display .original { margin-top: auto; }
.transcript { display: flex; flex-direction: column; gap: 8px; }
.caption-region { position: relative; }
.scroll-feed { min-height: 205px; max-height: min(59dvh, 580px); overflow-y: auto; overflow-anchor: none; scrollbar-gutter: stable; padding: 2px 2px 44px; }
.scroll-feed:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.latest-button { position: sticky; bottom: 10px; display: block; margin: -43px 16px 3px auto; color: var(--accent); background: #19302e; }
.latest-button[hidden], .empty-feed[hidden], .entry .original:empty { display: none; }
.empty-feed { padding: 18px; }
.entry { flex: 0 0 auto; padding: 15px 18px; }
.entry .meta { color: var(--muted); font-size: 12px; }
.entry .translated { font-size: clamp(20px, 3vw, 32px); line-height: 1.28; margin: 8px 0 0; }
.entry .original { margin-top: 7px; }
.entry.partial { border-style: dashed; border-color: #52736e; }
.entry.partial .meta { color: var(--accent); }
.foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 24px;
  padding-top: 15px; border-top: 1px solid var(--stroke); font-size: 12px; color: var(--muted);
}
.qrimage { display: block; width: 140px; max-width: 100%; height: auto; border-radius: 7px; }
.legacy-meter { width: min(100%, 240px); height: 8px; display: block; margin-top: 12px; accent-color: var(--accent); }
.screen { min-height: 100vh; display: flex; flex-direction: column; padding: 0 5vw 26px; }
.screen-content { flex: 1; display: flex; justify-content: flex-end; flex-direction: column; padding: 18px 0; }
.screen .entry { padding: clamp(9px, 1.45vh, 22px) 2vw; animation: caption-enter 170ms ease-out; }
.screen .entry .translated { font-size: clamp(22px, min(3.1vw, 5.6vh), 54px); font-weight: 600; line-height: 1.17; }
.screen .entry:not(:last-child) .translated { color: #c4d2d3; font-size: clamp(20px, min(2.65vw, 4.8vh), 45px); }
.screen .entry .original { display: none; }
@keyframes caption-enter { from { opacity: .72; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .screen .entry { animation: none; } }
.screen nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.screen nav select { width: auto; }
@media (max-width: 650px) {
  .wrap { padding-inline: 16px; }
  .topbar { min-height: 64px; flex-wrap: wrap; }
  .brand { gap: 6px; }
  .brand strong { font-size: 17px; }
  .hero { align-items: start; flex-direction: column; gap: 6px; margin-top: 24px; }
  .grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; }
}

