:root {
  --bg: #0f1a17;
  --bg2: #16241f;
  --card: #1c2d27;
  --line: #2b413a;
  --ink: #eef4f1;
  --muted: #9bb2a9;
  --accent: #f2b544;
  --go: #2fbf71;
  --stop: #e5484d;
  --rec: #ff5a5f;
  font-family: ui-rounded, 'SF Pro Rounded', -apple-system, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box }
html, body { margin: 0; min-height: 100dvh; background: var(--bg) }
body { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) }
button, input { font: inherit; color: inherit }
a { color: var(--accent) }
[hidden] { display: none !important }

.top { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; max-width: 760px; margin: 0 auto }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 22px; letter-spacing: -.4px; color: var(--ink); text-decoration: none }
.brand .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(242,181,68,.18) }
.me { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px }
.me button { background: none; border: 0; color: var(--muted); text-decoration: underline; padding: 4px; cursor: pointer }

main { max-width: 760px; margin: 0 auto; padding: 4px 18px 120px }
h1 { font-size: 28px; letter-spacing: -.6px; margin: 18px 0 6px }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 1.2px; color: var(--muted); margin: 30px 0 10px; font-weight: 700 }
p.lead { color: var(--muted); margin: 0 0 18px; line-height: 1.5 }
.muted { color: var(--muted) }
.small { font-size: 13px }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: 16px;
  padding: 15px 22px; font-weight: 700; font-size: 17px; cursor: pointer; background: var(--card); color: var(--ink); text-decoration: none }
.btn.primary { background: var(--accent); color: #1a1405 }
.btn.go { background: var(--go); color: #04170c }
.btn.wide { width: 100% }
.btn:disabled { opacity: .5 }
.btn.ghost { background: transparent; border: 1px solid var(--line) }
.btn.small { padding: 9px 14px; font-size: 14px; border-radius: 12px }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px }
.list { display: grid; gap: 10px }
.row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 12px 14px; color: var(--ink); text-decoration: none }
.row .grow { flex: 1; min-width: 0 }
.row .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.row .sub { color: var(--muted); font-size: 13px; margin-top: 2px }
.chip { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--bg2); color: var(--muted); white-space: nowrap }
.chip.live { background: rgba(47,191,113,.16); color: var(--go) }
.chip.done { background: rgba(242,181,68,.15); color: var(--accent) }
.chip.err { background: rgba(229,72,77,.15); color: var(--stop) }

.avatar { width: 42px; height: 42px; border-radius: 50%; background: #2c463d center/cover; display: grid; place-items: center;
  font-weight: 800; color: var(--ink); flex: none; font-size: 16px }
.avatar.big { width: 96px; height: 96px; font-size: 36px }
.online-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--go); display: inline-block; margin-right: 6px }

.signin { text-align: center; padding-top: 12vh }
.signin .btn { margin-top: 20px; background: #fff; color: #222 }
.signin .g { width: 20px; height: 20px }

/* ── call ── */
.callbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 18px }
.rec { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; color: var(--rec); font-size: 14px }
.rec::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--rec); animation: blink 1.4s infinite }
@keyframes blink { 50% { opacity: .25 } }
.timer { font-variant-numeric: tabular-nums; color: var(--muted) }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px }
.tile { background: var(--card); border: 2px solid var(--line); border-radius: 22px; padding: 22px 12px 16px; text-align: center;
  transition: border-color .12s, box-shadow .12s; position: relative }
.tile .avatar { margin: 0 auto 10px; width: 72px; height: 72px; font-size: 28px }
.tile .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.tile .state { font-size: 12px; color: var(--muted); margin-top: 3px; min-height: 16px }
.tile.speaking { border-color: var(--go); box-shadow: 0 0 0 4px rgba(47,191,113,.18) }
.tile .mute { position: absolute; top: 10px; right: 12px; font-size: 14px; color: var(--stop) }
.controls { position: fixed; left: 0; right: 0; bottom: 0; padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 35%); display: flex; justify-content: center; gap: 18px }
.round { width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 26px; cursor: pointer; background: var(--card); color: var(--ink);
  display: grid; place-items: center }
.round.on { background: var(--ink); color: var(--bg) }
.round.hang { background: var(--stop); color: #fff }
.round.hang svg { transform: rotate(135deg) }
.round.accept { background: var(--go); color: #04170c }
.round.decline { background: var(--stop); color: #fff }
.round small { display: block }

.sheet { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: flex-end; z-index: 20 }
.sheet > div { background: var(--bg2); width: 100%; max-width: 760px; margin: 0 auto; border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(24px + env(safe-area-inset-bottom)); max-height: 80dvh; overflow: auto }

.ring { position: fixed; inset: 0; background: rgba(8,14,12,.92); z-index: 30; display: grid; place-items: center; text-align: center }
.ring-who { font-size: 26px; font-weight: 800; margin-top: 18px }
.ring-sub { color: var(--muted); margin-top: 4px }
.ring-actions { display: flex; gap: 60px; justify-content: center; margin-top: 40px }
.ring-actions .round { width: 76px; height: 76px; font-size: 30px }
.pulse { margin: 0 auto; animation: pulse 1.6s infinite }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(47,191,113,.5) } 100% { box-shadow: 0 0 0 28px rgba(47,191,113,0) } }

/* ── recording page ── */
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 14px }
audio { width: 100%; margin: 6px 0 }
.seg { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line) }
.seg .t { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 3px; cursor: pointer }
.seg .who { font-weight: 700; font-size: 13px; color: var(--accent); margin-bottom: 2px }
.seg .txt { line-height: 1.5 }
input.text { width: 100%; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px }
.inline { display: flex; gap: 8px }

.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: var(--ink); color: var(--bg);
  padding: 11px 18px; border-radius: 12px; font-weight: 600; z-index: 40; max-width: 90vw; text-align: center }
