/* live.ngunza.com. Tokens from the TSS brand v2 guide (~/tss-logo/DESIGN.md). */
:root {
  --ink: #0A0A0F; --navy: #0F1C2E; --panel: #161B26; --panel-2: #1D2431;
  --gold: #C9A84C; --signal: #F2B632; --on-gold: #16120A; --gold-text: #7D5A00;
  --rose: #6E1F2F; --petal: #F3E5E1;
  --ground: #F5F4F0; --surface: #FFFFFF; --text: #12161F; --text-2: #3B4353; --muted: #5F6878; --line: #E5E3DD;
  --on-dark: #F4F4F0; --on-dark-muted: #B9C1CF; --success: #15803D; --error: #B42318;
  --radius: 14px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); font-size: 17px; line-height: 1.55; color: var(--text); background: var(--ground); -webkit-font-smoothing: antialiased; }
[data-theme="dark"] body { background: var(--ink); color: var(--on-dark); }
a { color: var(--rose); }
[data-theme="dark"] a { color: var(--gold); }
h1, h2 { font-family: var(--serif); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-size: 1.35rem; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
[data-theme="dark"] .muted { color: var(--on-dark-muted); }
.small { font-size: .9rem; } .tiny { font-size: .78rem; }
.eyebrow { font-weight: 800; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rose); margin: 0 0 .8rem; }
[data-theme="dark"] .eyebrow { color: var(--gold); }
.lede { font-size: 1.15rem; color: var(--text-2); }
[data-theme="dark"] .lede { color: var(--on-dark-muted); }
.top { padding: 18px 24px; }
.brand img { display: block; }
.spacer { flex: 1; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font: inherit; font-weight: 800; border: 0; border-radius: 12px; padding: 16px 26px; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s; }
.btn--go { background: var(--signal); color: var(--on-gold); box-shadow: 0 8px 24px rgba(242,182,50,.35); width: 100%; font-size: 1.1rem; }
[data-theme] a.btn--go, [data-theme] a.btn--small { color: var(--on-gold); }
.btn--go:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(242,182,50,.45); }
.btn--go:disabled { opacity: .6; cursor: progress; transform: none; }
.btn--ghost { background: transparent; color: inherit; border: 1px solid currentColor; padding: 10px 16px; font-weight: 600; }
.btn--small { padding: 10px 16px; font-size: .95rem; width: auto; background: var(--signal); color: var(--on-gold); }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* cards + forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: 0 10px 40px rgba(18,22,31,.06); }
.card--dark { background: var(--panel); border-color: #232B3A; color: var(--on-dark); box-shadow: none; }
.center { text-align: center; }
label { display: block; font-weight: 600; font-size: .95rem; margin: 14px 0 0; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; font: inherit; padding: 13px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); }
[data-theme="dark"] input, [data-theme="dark"] select { background: var(--panel-2); border-color: #2A3342; color: var(--on-dark); }
input:focus, select:focus, textarea:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(201,168,76,.25); }
.ts { display: flex; justify-content: center; margin-top: 14px; }
.ts:empty { margin: 0; }
.hp { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; }
.err { color: var(--error); min-height: 1.2em; font-weight: 600; margin: 10px 0 0; }
.fine { font-size: .8rem; color: var(--muted); margin: 12px 0 0; }
form .btn--go { margin-top: 20px; }

/* registration */
.reg { max-width: 1160px; margin: 0 auto; padding: 8px 24px 48px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
.reg__hero h1 em { font-style: normal; color: var(--rose); }
.learn { list-style: none; padding: 0; margin: 26px 0; display: grid; gap: 12px; }
.learn li { position: relative; padding-left: 34px; color: var(--text-2); }
.learn li::before { content: ''; position: absolute; left: 0; top: .2em; width: 22px; height: 22px; border-radius: 50%; background: var(--petal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%236E1F2F' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.host { display: flex; gap: 14px; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); }
.host img { border-radius: 50%; object-fit: cover; }
.host p { margin: 0; font-size: .95rem; color: var(--text-2); }
.reg__card { position: sticky; top: 18px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; margin: 16px 0 6px; }
.slot { position: relative; font: inherit; text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; cursor: pointer; color: var(--text); }
.slot.is-on { border-color: var(--rose); box-shadow: 0 0 0 3px rgba(110,31,47,.14); background: #FFFCFB; }
.slot__top { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; }
.slot__time { display: block; font-size: 1.2rem; font-weight: 800; }
.slot__tag { position: absolute; top: -9px; right: 10px; background: var(--rose); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; }
.foot { text-align: center; font-size: .8rem; color: var(--muted); padding: 24px; border-top: 1px solid var(--line); line-height: 1.7; }
.foot a { color: inherit; }
@media (max-width: 900px) {
  .reg { grid-template-columns: 1fr; gap: 24px; }
  .reg__card { position: static; }
}

/* confirmation / late */
.narrow { max-width: 620px; margin: 0 auto; padding: 24px 20px 60px; }
.check { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--success); color: #fff; font-size: 34px; font-weight: 800; }
.countdown { display: flex; justify-content: center; gap: 12px; margin: 20px 0 24px; font-variant-numeric: tabular-nums; }
.countdown span { min-width: 84px; background: var(--navy); color: var(--on-dark); border-radius: 12px; padding: 12px 10px; }
.countdown b { display: block; font-size: 2.1rem; line-height: 1; font-weight: 800; }
.countdown i { font-style: normal; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.countdown--big span { background: var(--panel); border: 1px solid #2A3342; min-width: 96px; }
.countdown--big b { font-size: 2.8rem; }
.cal { display: flex; gap: 18px; justify-content: center; margin-top: 12px; font-size: .95rem; flex-wrap: wrap; }
.rebook .slots { margin-bottom: 4px; }

/* waiting room */
.wait { min-height: 100vh; background: radial-gradient(1200px 600px at 20% -10%, #1B2A44 0%, var(--ink) 60%); }
.wait__grid { max-width: 1160px; margin: 0 auto; padding: 24px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; min-height: calc(100vh - 80px); }
.wait__main .countdown { justify-content: flex-start; }
.device h2 { margin-bottom: 12px; }
.preview { position: relative; aspect-ratio: 16/9; background: #0B0F16; border-radius: 12px; overflow: hidden; }
.preview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview__off { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; color: var(--on-dark-muted); }
.toggles { display: flex; gap: 10px; margin: 14px 0 4px; }
.tog { flex: 1; font: inherit; font-weight: 700; padding: 10px; border-radius: 10px; border: 1px solid #2A3342; background: var(--panel-2); color: var(--on-dark); cursor: pointer; }
.tog[aria-pressed="true"] { background: var(--success); border-color: var(--success); }
@media (max-width: 900px) { .wait__grid { grid-template-columns: 1fr; min-height: 0; } }

/* avatars */
.avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--rose); color: #fff; font-weight: 800; font-size: .8rem; flex: none; text-transform: uppercase; }
.avatar--lg { width: 52px; height: 52px; font-size: 1.3rem; }

/* room */
.room { display: grid; grid-template-columns: 1fr 380px; grid-template-rows: auto 1fr; height: 100vh; height: 100dvh; background: var(--ink); }
.room__bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-bottom: 1px solid #1C2330; }
.room__title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--on-dark); }
.pill { background: var(--rose); color: #fff; font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; letter-spacing: .04em; white-space: nowrap; }
.pill--live { background: #D92D20; display: inline-flex; align-items: center; gap: 6px; letter-spacing: .08em; }
.pill--live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.pill--ghost { background: transparent; border: 1px solid #2A3342; color: var(--on-dark-muted); }
.room__stage { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.player { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 12px; overflow: hidden; max-height: calc(100dvh - 240px); width: 100%; margin: 0 auto; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.player:fullscreen { max-height: none; border-radius: 0; }
.join { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(10,10,15,.55); color: #fff; border: 0; font: inherit; font-weight: 800; font-size: 1.2rem; cursor: pointer; }
.join__play { width: 84px; height: 84px; border-radius: 50%; background: var(--signal); color: var(--on-gold); display: grid; place-items: center; font-size: 2rem; padding-left: 6px; box-shadow: 0 10px 40px rgba(242,182,50,.45); }
.join--unmute { inset: auto auto 58px 16px; display: flex; gap: 10px; background: var(--signal); color: var(--on-gold); padding: 10px 16px; border-radius: 99px; font-size: 1rem; }
.join--unmute .join__play { width: auto; height: auto; background: none; box-shadow: none; font-size: 1rem; padding: 0; }
.join--unmute .join__play::before { content: '🔇'; } .join--unmute .join__play { font-size: 0; } .join--unmute .join__play::before { font-size: 1rem; }
.buffer { position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,.6); color: #fff; font-size: .85rem; padding: 6px 12px; border-radius: 99px; }
.ctrls { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transition: opacity .2s; }
.player:hover .ctrls, .player:focus-within .ctrls { opacity: 1; }
.ctrls input[type=range] { width: 110px; margin: 0; padding: 0; accent-color: var(--signal); background: transparent; border: 0; }
.ic { background: none; border: 0; color: #fff; font-size: 1.2rem; cursor: pointer; padding: 4px 6px; }
.ic--text { font-size: .8rem; font-weight: 800; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 2px 6px; }
.endcard { position: absolute; inset: 0; background: rgba(10,10,15,.92); display: grid; place-content: center; text-align: center; padding: 24px; gap: 8px; color: var(--on-dark); }
.endcard .btn { max-width: 420px; margin: 8px auto 0; }

.poll { position: absolute; right: 16px; bottom: 60px; width: min(360px, calc(100% - 32px)); background: rgba(22,27,38,.97); border: 1px solid #2A3342; border-radius: 14px; padding: 16px; color: var(--on-dark); box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: rise .35s ease-out; }
.poll__q { font-weight: 800; margin: 0 0 10px; }
.poll__opt { position: relative; display: flex; justify-content: space-between; width: 100%; text-align: left; font: inherit; margin: 0 0 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid #2A3342; background: var(--panel-2); color: var(--on-dark); cursor: pointer; overflow: hidden; }
.poll__opt.is-on { border-color: var(--gold); }
.poll__bar { position: absolute; inset: 0 auto 0 0; background: rgba(201,168,76,.22); transition: width .5s; }
.poll__label, .poll__pct { position: relative; }
.poll__pct { font-weight: 800; color: var(--gold); }
.poll__foot { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 0; font-size: .8rem; color: var(--on-dark-muted); }
.poll__x { background: none; border: 0; color: var(--on-dark-muted); font-size: 1.3rem; cursor: pointer; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.offer { display: flex; align-items: center; gap: 18px; padding: 16px 18px; border-radius: 14px; background: linear-gradient(90deg, var(--rose), #4A1420); color: #fff; }
.offer--in { animation: rise .5s ease-out; }
.offer strong { display: block; font-family: var(--serif); font-size: 1.25rem; }
.offer span { color: var(--petal); font-size: .95rem; }
.offer .btn { width: auto; flex: none; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 8px 24px rgba(242,182,50,.35); } 50% { box-shadow: 0 8px 36px rgba(242,182,50,.7); } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 4/3; border-radius: 10px; background: var(--panel); border: 1px solid #1F2735; display: grid; place-items: center; overflow: hidden; }
.tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.tile__name { position: absolute; left: 8px; bottom: 6px; font-size: .75rem; font-weight: 700; background: rgba(0,0,0,.55); padding: 2px 7px; border-radius: 6px; color: #fff; }
.tile__cam { position: absolute; right: 6px; top: 4px; font-size: .75rem; }
.tile--me { border-color: var(--gold); }

.room__side { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid #1C2330; background: #0D1119; }
.tabs { display: flex; border-bottom: 1px solid #1C2330; }
.tab { flex: 1; font: inherit; font-weight: 700; padding: 12px; background: none; border: 0; color: var(--on-dark-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tab.is-on { color: var(--on-dark); border-color: var(--gold); }
.pane { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.chat { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.msg p { margin: 4px 0 0 34px; color: var(--on-dark); font-size: .95rem; word-wrap: break-word; }
.msg__head { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.msg__head time { margin-left: auto; color: #5F6878; font-size: .72rem; font-variant-numeric: tabular-nums; }
.msg--agent .avatar { background: var(--gold); color: var(--on-gold); }
.msg--host .avatar { background: var(--success); }
.msg--mine .msg__head strong { color: var(--gold); }
.badge { font-size: .65rem; font-weight: 800; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: var(--success); color: #fff; }
.badge--ai { background: var(--gold); color: var(--on-gold); }
.typing { padding: 4px 14px; font-size: .8rem; color: var(--on-dark-muted); font-style: italic; }
.chat__form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #1C2330; }
.chat__form input { margin: 0; }
.chat__note { padding: 0 14px 10px; margin: 0; }
.people { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 10px; overflow-y: auto; }
.people li { display: flex; align-items: center; gap: 10px; }

@media (max-width: 960px) {
  .room { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; height: auto; min-height: 100dvh; }
  .room__stage { padding: 0; gap: 0; overflow: visible; }
  .player { border-radius: 0; max-height: none; }
  .offer { border-radius: 0; flex-direction: column; align-items: stretch; text-align: center; }
  .offer .btn { width: 100%; }
  .tiles { display: none; }
  .room__side { border-left: 0; height: 60dvh; }
  .room__title { display: none; }
  .poll { bottom: 12px; right: 12px; }
}

/* admin */
.admin { max-width: 1280px; margin: 0 auto; padding: 20px; }
.admin__top { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.admin__top h1 { font-size: 1.5rem; margin: 0; }
.admin__top select { width: auto; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi span { display: block; font-size: .8rem; color: var(--muted); font-weight: 600; }
.kpi strong { font-size: 1.6rem; }
.admin__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin__grid .card { padding: 20px; min-width: 0; }
.span2 { grid-column: 1 / -1; }
@media (max-width: 900px) { .admin__grid { grid-template-columns: 1fr; } }
.bars__row { display: grid; grid-template-columns: 130px 1fr 60px; gap: 10px; align-items: center; margin: 6px 0; font-size: .9rem; }
.bars__track { height: 12px; background: var(--ground); border-radius: 6px; overflow: hidden; }
.bars__track span { display: block; height: 100%; background: var(--rose); border-radius: 6px; }
.bars__v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.ret { width: 100%; height: auto; }
.ret__area { fill: rgba(110,31,47,.12); } .ret__line { fill: none; stroke: var(--rose); stroke-width: 2.5; }
.ret__offer { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 5 4; }
.tick { font-size: 12px; fill: var(--muted); } .tick--gold { fill: var(--gold-text); font-weight: 700; }
.tbl { width: 100%; border-collapse: collapse; font-size: .85rem; }
.tbl th, .tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin .card { overflow-x: auto; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.host-form { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.host-form select { width: auto; } .host-form input { flex: 1; min-width: 180px; }
.host-form select, .host-form input { margin: 0; }
#cfg { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; min-height: 420px; }
.row { display: flex; gap: 12px; align-items: center; margin-top: 10px; }
.linkbtn { background: none; border: 0; color: var(--error); cursor: pointer; font: inherit; }
