:root {
  --brand: #e8542f;
  --ink: #16181d;
  --ink-2: #5b616e;
  --line: #e6e7ea;
  --bg: #f7f6f3;
  --card: #ffffff;
  --good: #1f9d55;
  --warn: #d98a00;
  --bad: #d4351c;
  --radius: 16px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
button, select, input { font: inherit; }
.hidden { display: none !important; }

/* ---------- header / footer ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark img { height: 32px; width: auto; }
.wordmark .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: -0.02em; }
.wordmark .name { font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; font-size: 14px; }
.powered { text-align: center; font-size: 11px; color: #a3a7b0; padding: 18px 0 22px; letter-spacing: 0.02em; }
.powered a { color: inherit; text-decoration: none; }
.powered a:hover { text-decoration: underline; }

/* ---------- listener ---------- */
.listen { flex: 1; width: 100%; max-width: 460px; margin: 0 auto; padding: 8px 22px 0; display: flex; flex-direction: column; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--brand); margin: 10px 0 6px; }
.listen h1 { font-size: 30px; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 8px; }
.listen .sub { color: var(--ink-2); margin: 0 0 22px; line-height: 1.45; }

.langs { display: grid; gap: 10px; margin-bottom: 26px; }
.lang { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; cursor: pointer; text-align: left; }
.lang .native { font-weight: 650; font-size: 17px; }
.lang .english { color: var(--ink-2); font-size: 13px; }
.lang .dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.lang[aria-checked="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 15%, transparent); }
.lang[aria-checked="true"] .dot { border-color: var(--brand); background: radial-gradient(circle, var(--brand) 0 5px, transparent 6px); }

.player { background: var(--card); border-radius: 24px; border: 1px solid var(--line); padding: 26px 20px 22px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.play { width: 112px; height: 112px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 35%, transparent); transition: transform .12s ease; }
.play:active { transform: scale(.96); }
.play:disabled { background: #c9ccd2; box-shadow: none; cursor: default; }
.play svg { width: 44px; height: 44px; }
.status { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.status .pip { width: 9px; height: 9px; border-radius: 50%; background: #b9bcc4; }
.status.live .pip { background: var(--bad); animation: pulse 1.6s infinite; }
.status.playing .pip { background: var(--good); animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(212,53,28,.45); } 70% { box-shadow: 0 0 0 9px rgba(212,53,28,0); } 100% { box-shadow: 0 0 0 0 rgba(212,53,28,0); } }
.hint { color: var(--ink-2); font-size: 13px; text-align: center; line-height: 1.4; margin: 0; }

.toggle { display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; margin-top: 4px; cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--brand); width: 18px; height: 18px; }
.captions { width: 100%; min-height: 84px; max-height: 160px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; font-size: 17px; line-height: 1.45; color: var(--ink); padding: 12px 14px; background: var(--bg); border-radius: 12px; }

/* embed mode for in-app web views */
body.embed .topbar { display: none; }
body.embed .listen { padding-top: 18px; }

/* ---------- booth ---------- */
body.booth { background: #101216; color: #e9eaee; --line: #2a2e37; --card: #171a20; --ink-2: #9aa0ad; }
.booth .wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 22px 10px; }
.booth .wordmark { color: #e9eaee; }
.booth .tag { font-size: 12px; color: var(--ink-2); border: 1px solid var(--line); padding: 4px 9px; border-radius: 999px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }
.panel h2 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 14px; font-weight: 700; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 13px; color: var(--ink-2); }
.booth select, .booth input[type=password], .booth input[type=text] { background: #0d0f13; color: #e9eaee; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; width: 100%; }
.meter { height: 14px; background: #0d0f13; border-radius: 7px; overflow: hidden; border: 1px solid var(--line); position: relative; }
.meter .fill { height: 100%; width: 0; background: linear-gradient(90deg, #1f9d55 0 65%, #d98a00 65% 85%, #d4351c 85%); clip-path: inset(0 100% 0 0); transition: clip-path 60ms linear; width: 100%; }
.meter-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin-top: 5px; }
.btn { border: 0; border-radius: 12px; padding: 13px 18px; font-weight: 700; cursor: pointer; background: #2a2e37; color: #e9eaee; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.danger { background: var(--bad); color: #fff; }
.btn:disabled { opacity: .45; cursor: default; }
.bigbtn { width: 100%; padding: 20px; font-size: 18px; border-radius: 14px; }
.onair { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.onair .badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .08em; font-size: 14px; padding: 8px 12px; border-radius: 10px; background: #2a2e37; color: var(--ink-2); }
.onair .badge.on { background: var(--bad); color: #fff; }
.onair .badge.on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
.onair .clock { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { background: #0d0f13; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat .k { font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .08em; }
.stat .v { font-size: 16px; font-weight: 700; margin-top: 3px; display: flex; align-items: center; gap: 7px; }
.light { width: 9px; height: 9px; border-radius: 50%; background: #4a4f5b; }
.light.good { background: var(--good); } .light.warn { background: var(--warn); } .light.bad { background: var(--bad); }
.transcript { height: 150px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; background: #0d0f13; border: 1px solid var(--line); border-radius: 12px; padding: 12px; font-size: 15px; line-height: 1.45; }
.transcript.es { color: #fff; }
.transcript.en { color: var(--ink-2); }
.tlabel { font-size: 12px; color: var(--ink-2); margin: 12px 0 6px; display: flex; justify-content: space-between; }
.msg { font-size: 13px; color: var(--warn); min-height: 18px; margin-top: 10px; }
.pin { max-width: 380px; margin: 8vh auto 0; }
.row { display: flex; gap: 10px; align-items: center; }
.row > * { flex: 1; }
.small { font-size: 12px; color: var(--ink-2); }
