/* live.theaihub.vip — brand kit v1 tokens (agents/brand/BRAND-KIT.md) */
:root {
  --ah-bg: #070B16; --ah-bg2: #0C1224; --ah-panel: #101831; --ah-line: rgba(255,255,255,.08);
  --ah-text: #F4F1EA; --ah-soft: #C3C8D4; --ah-mute: #9AA3B5; --ah-gold: #F7C02A; --ah-gold2: #FFD45C;
  --ah-goldline: rgba(247,192,42,.38); --ah-ink: #0A0E1A; --ah-pearl: #FDF6E7;
  --ah-red: #FF7A6B; --ah-green: #6BE3A4;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--ah-bg); color: var(--ah-text); }
body { font: 400 18px/1.55 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* lockup */
.ah-lockup { display: inline-flex; align-items: center; gap: 12px; color: var(--ah-text); text-decoration: none; }
.ah-lockup svg { width: 44px; height: 44px; flex: none; }
.ah-word { display: flex; flex-direction: column; line-height: 1; }
.ah-name { font: 800 19px/1 "Inter Tight", Inter, sans-serif; letter-spacing: .01em; }
.ah-tag { font: 700 10.5px/1 Inter, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: var(--ah-gold); margin-top: 6px; }
.ah-lockup--lg svg { width: 84px; height: 84px; }
.ah-lockup--lg .ah-name { font-size: 32px; }
.ah-lockup--lg .ah-tag { font-size: 15px; letter-spacing: .2em; margin-top: 9px; }
@media (min-width: 760px) { .ah-header .ah-lockup svg { width: 52px; height: 52px; } .ah-header .ah-name { font-size: 21px; } .ah-header .ah-tag { font-size: 12px; } }

/* ------------------------------------------------------------------ presenter page */
.ah-header { position: sticky; top: 0; z-index: 5; height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; background: rgba(7,11,22,.82); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ah-line); }
@media (min-width: 420px) { .ah-header { padding: 0 24px; } }
.ah-switch { display: inline-flex; background: var(--ah-bg2); border: 1px solid var(--ah-line); border-radius: 999px; padding: 4px; }
.ah-switch button { min-width: 48px; min-height: 40px; border: 0; background: none; border-radius: 999px; font-weight: 700; font-size: 15px; color: var(--ah-soft); cursor: pointer; }
.ah-switch button[aria-pressed="true"] { background: var(--ah-gold); color: var(--ah-ink); }
.wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 88px; }
.over { font: 700 15px/1.2 Inter; letter-spacing: .12em; text-transform: uppercase; color: var(--ah-gold); margin: 0 0 10px; }
h1 { font: 800 clamp(34px, 8.6vw, 52px)/1.06 "Inter Tight", Inter, sans-serif; letter-spacing: -.02em; margin: 0 0 12px; }
.lede { color: var(--ah-soft); font-size: clamp(18px, 4.6vw, 21px); margin: 0 0 26px; max-width: 40ch; }
.card { background: var(--ah-panel); border: 1px solid var(--ah-line); border-radius: 22px; padding: 22px; margin: 0 0 18px; }
.card h2 { font: 800 22px/1.2 "Inter Tight", Inter, sans-serif; margin: 0 0 14px; }
.field { display: block; margin: 0 0 18px; }
.field > span { display: block; font-weight: 600; font-size: 16px; color: var(--ah-soft); margin-bottom: 8px; }
.field input, .field select { width: 100%; min-height: 52px; border-radius: 14px; border: 1px solid var(--ah-line); background: var(--ah-bg2);
  padding: 12px 14px; font-size: 18px; color: var(--ah-text); }
.field input:focus, .field select:focus { outline: 2px solid var(--ah-goldline); outline-offset: 1px; }
.hint { color: var(--ah-mute); font-size: 15px; margin: 6px 0 0; }
.ah-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 30px; border-radius: 999px;
  border: 0; background: var(--ah-gold); color: var(--ah-ink); font-weight: 800; font-size: 18px; cursor: pointer; text-decoration: none; }
.ah-btn:disabled { opacity: .45; cursor: default; }
.ah-btn--ghost { background: transparent; color: var(--ah-gold); border: 1.5px solid var(--ah-goldline); }
.ah-btn--wide { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ah-chip { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ah-line); background: var(--ah-bg2); color: var(--ah-soft);
  font-weight: 700; font-size: 16px; cursor: pointer; }
.ah-chip[aria-pressed="true"] { background: var(--ah-gold); color: var(--ah-ink); border-color: var(--ah-gold); }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--ah-bg2); border: 1px solid var(--ah-goldline); border-radius: 14px; padding: 10px 12px; }
.linkbox a { color: var(--ah-gold); font-weight: 700; word-break: break-all; flex: 1; text-decoration: none; font-size: 17px; }
.mini { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ah-goldline); background: none; color: var(--ah-gold); font-weight: 700; font-size: 15px; cursor: pointer; }
.meter { height: 12px; border-radius: 999px; background: var(--ah-bg2); overflow: hidden; border: 1px solid var(--ah-line); }
.meter i { display: block; height: 100%; width: 0; background: var(--ah-gold); transition: width .08s linear; }
.status { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; margin: 0 0 14px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--ah-mute); flex: none; }
.dot.live { background: var(--ah-red); box-shadow: 0 0 0 6px rgba(255,122,107,.18); animation: pulse 1.6s infinite; }
.dot.ok { background: var(--ah-green); }
.dot.warn { background: var(--ah-gold); }
@keyframes pulse { 50% { box-shadow: 0 0 0 2px rgba(255,122,107,.1); } }
.big-time { font: 800 clamp(44px, 12vw, 64px)/1 "Inter Tight", Inter; color: var(--ah-gold); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.msg { border-left: 3px solid var(--ah-gold); padding: 6px 0 6px 14px; color: var(--ah-text); margin: 0 0 16px; }
.msg.err { border-color: var(--ah-red); }
.preview { background: #000; border-radius: 18px; padding: 16px 18px; min-height: 120px; --cap: 22px; --lines: 3; --lh: 1.25; }
.preview .lane .lab { font-size: 12px; }
.preview .lane + .lane { margin-top: 10px; }
details.ah-details { border-top: 1px solid var(--ah-line); padding-top: 12px; margin-top: 10px; }
details.ah-details summary { cursor: pointer; color: var(--ah-gold); font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.foot { text-align: center; padding: 40px 0 0; }

/* ------------------------------------------------------------------ lanes (screen + preview) */
.lane .lab { font: 700 calc(var(--cap) * .3)/1.2 Inter, sans-serif; letter-spacing: .14em; color: var(--ah-gold); opacity: .8; margin: 0 0 .5em; min-height: 1.2em; }
.lane .box { height: calc(var(--cap) * var(--lh) * var(--lines)); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 calc(var(--cap) * .7)); mask-image: linear-gradient(to bottom, transparent 0, #000 calc(var(--cap) * .7)); }
.lane .txt { margin: 0; font: 600 var(--cap)/var(--lh) Inter, sans-serif; color: var(--ah-text); overflow-wrap: break-word; }
.lane[data-kind="translation"] .txt { color: var(--ah-gold); }
.lane .p { opacity: .7; }

/* ------------------------------------------------------------------ caption screen */
body.screen { overflow: hidden; height: 100vh; height: 100dvh; cursor: default; }
body.screen.bg-black, body.screen.bg-black .stage { background: #000; }
body.screen.hide-cursor { cursor: none; }
.stage { position: fixed; inset: 0; display: flex; flex-direction: column; padding: 2.4vh 4vw 4.5vh; background: var(--ah-bg); --lh: 1.2; --lines: 3; --size: 1;
  --cap: calc(max(20px, min(6.4vh, 4.1vw)) * var(--size)); }
.stage.single { --cap: calc(max(24px, min(9.6vh, 6vw)) * var(--size)); }
@media (max-aspect-ratio: 1/1) { .stage { --cap: calc(max(20px, 6.2vw) * var(--size)); } .stage.single { --cap: calc(max(24px, 8.4vw) * var(--size)); } }
.stage .top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; }
.stage .top .ah-lockup { opacity: .92; }
.stage .meta { display: flex; align-items: center; gap: 12px; color: var(--ah-mute); font-weight: 600; font-size: clamp(15px, 1.6vh, 20px); text-align: right; }
.stage .lanes { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: calc(var(--cap) * .7); }
.idle { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 28px; padding: 24px;
  background: radial-gradient(1200px 600px at 50% 40%, rgba(247,192,42,.07), transparent 70%), var(--ah-bg); transition: opacity .5s; }
body.bg-black .idle { background: #000; }
.idle h1 { font-size: clamp(36px, 6vw, 84px); margin: 0; }
.idle .sub { font: 600 clamp(20px, 2.6vw, 34px)/1.35 Inter; color: var(--ah-soft); margin: 0; }
.idle .sub b { color: var(--ah-gold); font-weight: 700; }
.idle .ah-lockup svg { width: clamp(70px, 9vh, 110px); height: clamp(70px, 9vh, 110px); }
.idle .ah-lockup .ah-name { font-size: clamp(30px, 4vh, 44px); }
.idle .ah-lockup .ah-tag { font-size: clamp(14px, 1.7vh, 19px); letter-spacing: .2em; }
.controls { position: fixed; right: 2vw; bottom: 2vh; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; z-index: 9; transition: opacity .3s; max-width: 96vw; }
.controls button { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ah-goldline); background: rgba(12,18,36,.92);
  color: var(--ah-text); font-weight: 700; font-size: 15px; cursor: pointer; }
.controls .keys { align-self: center; color: var(--ah-mute); font-size: 15px; margin-right: 6px; }
body.quiet .controls { opacity: 0; pointer-events: none; }
.conn { width: 10px; height: 10px; border-radius: 50%; background: var(--ah-green); }
.conn.bad { background: var(--ah-red); }
