:root {
  color-scheme: dark;
  font-family: Tahoma, 'Segoe UI', system-ui, sans-serif;
  color: #f1f5ee;
  background: #101a17;
  --bg: #101a17;
  --surface: #182722;
  --panel: #1d3128;
  --line: #3b5147;
  --text: #f1f5ee;
  --muted: #b4c5ba;
  --gold: #ebd9a0;
  --mint: #a7e7c1;
  --danger: #ffc3ba;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
button, input, select { font: inherit; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(1.7rem, 4.6vw, 3.15rem); line-height: 1.3; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; line-height: 1.5; overflow-wrap: anywhere; }
p { line-height: 1.75; color: var(--muted); }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }
:is(button, input, a, select):focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.button { min-height: 2.85rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: .65rem; color: var(--text); background: #253b31; font-weight: 700; text-align: center; }
.button:hover { background: #304c3d; }
.primary { background: var(--gold); border-color: var(--gold); color: #1d3026; }
.primary:hover { background: #f7eac0; }
.quiet { background: transparent; }
.danger { color: var(--danger); }
.topbar { border-bottom: 1px solid var(--line); background: #101a17; }
.topbar-inner { min-height: 4.55rem; max-width: 76rem; margin-inline: auto; padding: .65rem clamp(.8rem, 4vw, 2rem); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.45rem; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 750; }
.brand-icon { display: grid; place-items: center; color: #263629; background: var(--gold); width: 2rem; height: 2rem; border-radius: .62rem; font-size: 1.15rem; flex: none; }
.site-nav { display: flex; gap: .25rem; align-items: center; }
.site-nav a { padding: .55rem .7rem; border-radius: .6rem; color: var(--muted); font-size: .92rem; white-space: nowrap; }
.site-nav a[aria-current='page'], .site-nav a:hover { background: var(--panel); color: var(--text); }
.account { margin-inline-start: auto; min-height: 2.45rem; font-size: .88rem; }
.shell { width: min(100% - 2rem, 70rem); margin-inline: auto; padding: clamp(1.2rem, 4vw, 3rem) 0 3rem; }
.shell.narrow { max-width: 34rem; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: .9rem; margin-bottom: 1rem; }
.section-head p { margin-top: .4rem; }
.layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: .95rem; align-items: start; }
.stack { display: grid; gap: 1rem; }
.panel { padding: clamp(1rem, 3vw, 1.6rem); border: 1px solid var(--line); border-radius: .95rem; background: var(--surface); min-width: 0; }
.panel > p, .panel form > p { margin-top: .35rem; }
.panel h2 + .form { margin-top: .85rem; }
.form { display: grid; gap: .8rem; }
.form label { display: block; font-weight: 700; margin-bottom: .38rem; }
.form input, .form select, .share-input { width: 100%; padding: .62rem .7rem; min-height: 2.85rem; border: 1px solid var(--line); border-radius: .65rem; color: var(--text); background: #101e18; }
.form small { display: block; color: var(--muted); margin-top: .4rem; }
.actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.actions .button { flex: 0 1 auto; }
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(10rem, .65fr); align-items: center; gap: 1rem; min-height: 18rem; padding: clamp(1.2rem, 5vw, 3rem); border-radius: 1.25rem; border: 1px solid #4c6859; background: linear-gradient(128deg, #233d32, #172d24 70%); }
.hero p { max-width: 33rem; margin-top: .65rem; }
.hero .actions { margin-top: 1.15rem; }
.wave { justify-self: stretch; display: flex; align-items: center; justify-content: center; gap: clamp(.2rem, .7vw, .55rem); min-height: 8rem; direction: ltr; }
.wave b { height: var(--length); width: clamp(.16rem, .6vw, .38rem); border-radius: 1rem; background: linear-gradient(#8bc6a2, #bd9f60); opacity: .8; }
.wave b { --length: 2rem; }
.wave b:nth-child(3n) { --length: 4.2rem; }
.wave b:nth-child(4n) { --length: 6.4rem; }
.wave b:nth-child(5n) { --length: 3.2rem; }
.wave b:nth-child(8) { --length: 7.5rem; }
.wave b:nth-child(2n) { opacity: .45; }
.hero + section { margin-top: 1.5rem; }
.tiles { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .7rem; margin: 0; }
.tile { min-width: 0; }
.tile a { min-height: 7.75rem; display: grid; gap: .5rem; align-content: start; }
.tile a:hover { background: var(--panel); }
.tile h2, .tile h3 { overflow-wrap: anywhere; margin: 0; }
.badge { width: fit-content; border-radius: 2rem; padding: .26rem .55rem; background: #213b30; color: var(--mint); font-size: .84rem; white-space: nowrap; }
.badge.inactive { background: #303a35; color: var(--muted); }
.muted { color: var(--muted); }
.page-title { margin-bottom: 1.2rem; }
.page-title p { margin-top: .4rem; }
.share-input { font-family: ui-monospace, Consolas, monospace; font-size: .87rem; }
.invite-panel .actions { margin-top: .7rem; }
.invite-panel .share-input { margin: .7rem 0 0; }
.pretitle { margin-bottom: .65rem; }
.status { margin-top: .8rem; color: var(--mint); }
.status.error { color: var(--danger); }
.lobby { margin: clamp(.5rem, 3vw, 2rem) auto; }
.lobby .page-title { margin-bottom: 0; }
.lobby .panel { margin-top: .85rem; }
.lobby .button { width: 100%; }
.lobby .badge { margin-bottom: .8rem; }
.live { width: min(100% - 2rem, 85rem); }
.live .layout { grid-template-columns: minmax(0, 2fr) minmax(13rem, 1fr); }
.stage { min-height: min(48vh, 25rem); display: grid; place-items: center; text-align: center; background: radial-gradient(ellipse at 50% 50%, #243e33, #142720 69%); }
.stage-focus { display: grid; justify-items: center; gap: .55rem; max-width: 100%; }
.stage-focus h2 { overflow-wrap: anywhere; }
.avatar { display: grid; place-items: center; background: #39594a; color: #d5eedc; border-radius: 50%; width: 2.1rem; aspect-ratio: 1; flex: none; font-weight: 700; }
.stage .avatar { width: clamp(4rem, 16vw, 6.5rem); font-size: 2.25rem; border: 1px solid #658675; }
.stage.speaking .avatar { border-color: var(--mint); box-shadow: 0 0 0 .38rem #284a3b; }
.roster-head, .participant-row { display: flex; align-items: center; justify-content: space-between; gap: .55rem; }
.roster { list-style: none; padding: 0; display: grid; gap: .45rem; margin: .7rem 0 0; }
.participant-row { border-radius: .55rem; background: #112019; padding: .5rem; }
.person-label { display: flex; align-items: center; gap: .52rem; min-width: 0; }
.person-label bdi { overflow-wrap: anywhere; min-width: 0; }
.person-state { font-size: .82rem; color: var(--muted); flex: none; }
.person-state.speaking { color: var(--mint); }
.controls { position: sticky; bottom: .4rem; z-index: 1; margin-top: .8rem; padding: .65rem; border: 1px solid var(--line); background: #101f19; border-radius: .8rem; display: flex; justify-content: center; gap: .55rem; flex-wrap: wrap; }
.controls button { min-width: 8.25rem; }
.foot-note { margin-top: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 680px) {
  .layout, .live .layout { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .wave { min-height: 5.3rem; }
  .wave b { height: calc(var(--length) * .62); }
  .shell, .live { width: calc(100% - 1.2rem); }
  .stage { min-height: 15rem; }
}
@media (max-width: 460px) {
  .topbar-inner { column-gap: .55rem; }
  .site-nav { order: 3; width: 100%; }
  .controls button { min-width: 0; flex: 1 1 auto; }
  .section-head .button { width: 100%; }
}
