:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --surface: #17171a;
  --raised: #232327;
  --raised-hover: #2f2f35;
  --raised-2: #3a3a41;
  --ink: #f2f2f3;
  --muted: #a6a6ad;
  --line: #2e2e33;
  --accent: #6f5ee8;
  --accent-ink: #fff;
  --tint: #29254a;
  --live: #ef4438;
  --live-fill: #d92d20;
  --live-fill-hover: #b42318;
  --accent-hover: #5f4fd6;
  --warn-bg: #3a2f10;
  --warn-ink: #ffdf8f;
  --sp-1: #3ecf9f;
  --sp-2: #ff9a66;
  --sp-3: #7fb0ff;
  --sp-4: #dc98ea;
  --av-1: #3ecf9f;
  --av-2: #ff9a66;
  --av-3: #7fb0ff;
  --av-4: #dc98ea;
  --av-ink: #101012;
  --radius: 12px;
  --tap: 44px;

  --i-mic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z'/%3E%3Cpath d='M19 10v2a7 7 0 0 1-14 0v-2'/%3E%3Cline x1='12' x2='12' y1='19' y2='22'/%3E%3C/svg%3E");
  --i-cam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m22 8-6 4 6 4V8Z'/%3E%3Crect x='2' y='6' width='14' height='12' rx='2'/%3E%3C/svg%3E");
  --i-rec: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3C/svg%3E");
  --i-stop: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='6' y='6' width='12' height='12' rx='2'/%3E%3C/svg%3E");
  --i-leave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4'/%3E%3Cpath d='m16 17 5-5-5-5'/%3E%3Cline x1='21' x2='9' y1='12' y2='12'/%3E%3C/svg%3E");
  --i-link: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E");
  --i-hand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 11V6a2 2 0 0 0-4 0v5'/%3E%3Cpath d='M14 10V4a2 2 0 0 0-4 0v2'/%3E%3Cpath d='M10 10.5V6a2 2 0 0 0-4 0v8'/%3E%3Cpath d='M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'/%3E%3C/svg%3E");
  --i-mic-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='2' x2='22' y1='2' y2='22'/%3E%3Cpath d='M18.89 13.23A7.12 7.12 0 0 0 19 12v-2'/%3E%3Cpath d='M5 10v2a7 7 0 0 0 12 5'/%3E%3Cpath d='M15 9.34V5a3 3 0 0 0-5.68-1.33'/%3E%3Cpath d='M9 9v3a3 3 0 0 0 5.12 2.12'/%3E%3Cline x1='12' x2='12' y1='19' y2='22'/%3E%3C/svg%3E");
  --i-cam-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.66 6H14a2 2 0 0 1 2 2v2.5l5.248-3.062A.5.5 0 0 1 22 7.87v8.196'/%3E%3Cpath d='M16 16a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h2'/%3E%3Cline x1='2' x2='22' y1='2' y2='22'/%3E%3C/svg%3E");
  --i-people: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E");
  --i-sun: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Cpath d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/%3E%3C/svg%3E");
  --i-moon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z'/%3E%3C/svg%3E");
  --i-monitor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='3' width='20' height='14' rx='2'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f6f6f8;
    --surface: #ffffff;
    --raised: #ececf0;
    --raised-hover: #dfdfe5;
    --raised-2: #d9d9e0;
    --ink: #18181b;
    --muted: #5a5a64;
    --line: #d6d6dc;
    --accent: #5b4bd6;
    --accent-ink: #fff;
    --tint: #e5e2fb;
    --live: #c9281c;
    --live-fill: #c4271b;
    --live-fill-hover: #a11f15;
    --accent-hover: #4a3bc0;
    --warn-bg: #fdf0c8;
    --warn-ink: #5c4400;
    --sp-1: #0a7a58;
    --sp-2: #b2470f;
    --sp-3: #1f5fc4;
    --sp-4: #9335a8;
    --av-1: #3ecf9f;
    --av-2: #ff9a66;
    --av-3: #7fb0ff;
    --av-4: #dc98ea;
    --av-ink: #101012;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f6f8;
  --surface: #ffffff;
  --raised: #ececf0;
  --raised-hover: #dfdfe5;
  --raised-2: #d9d9e0;
  --ink: #18181b;
  --muted: #5a5a64;
  --line: #d6d6dc;
  --accent: #5b4bd6;
  --accent-ink: #fff;
  --tint: #e5e2fb;
  --live: #c9281c;
  --live-fill: #c4271b;
  --live-fill-hover: #a11f15;
  --accent-hover: #4a3bc0;
  --warn-bg: #fdf0c8;
  --warn-ink: #5c4400;
  --sp-1: #0a7a58;
  --sp-2: #b2470f;
  --sp-3: #1f5fc4;
  --sp-4: #9335a8;
  --av-1: #3ecf9f;
  --av-2: #ff9a66;
  --av-3: #7fb0ff;
  --av-4: #dc98ea;
  --av-ink: #101012;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
h1 { font-size: 1.5rem; line-height: 1.2; }
h2 { font-size: 1rem; }
a { color: inherit; }

.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.label { font-size: .8125rem; font-weight: 600; color: var(--muted); }


.anchor, .state { display: none; }
.states:not(:has(> .state:target)) > .state:first-child,
.state:target { display: flex; flex-direction: column; gap: 16px; flex: 1; min-height: 0; }
.states { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.icon { display: inline-block; flex: none; width: 20px; height: 20px; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.i-mic { --icon: var(--i-mic); }
.i-cam { --icon: var(--i-cam); }
.i-rec { --icon: var(--i-rec); }
.i-stop { --icon: var(--i-stop); }
.i-leave { --icon: var(--i-leave); }
.i-link { --icon: var(--i-link); }
.i-hand { --icon: var(--i-hand); }
.i-mic-off { --icon: var(--i-mic-off); }
.i-cam-off { --icon: var(--i-cam-off); }
.i-people { --icon: var(--i-people); }
.i-sun { --icon: var(--i-sun); }
.i-moon { --icon: var(--i-moon); }
.i-monitor { --icon: var(--i-monitor); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 8px 14px;
  border: 0;
  border-radius: var(--radius);
  background: var(--raised);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { background: var(--raised-hover); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .theme-opt:focus-visible, .link-button:focus-visible, .ctl:focus-visible, .seg:focus-visible, .tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-danger { background: var(--live-fill); color: #fff; }
.btn-danger:hover { background: var(--live-fill-hover); }
.btn-block { width: 100%; }
.btn-big { min-height: 54px; font-size: 1.0625rem; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--raised); font-size: .75rem; font-weight: 600; white-space: nowrap; }
.tag-live { background: var(--live-fill); color: #fff; }

.avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--av-ink); font-weight: 700; }
.avatar-sm { width: 32px; height: 32px; font-size: .875rem; }
.av-1 { background: var(--av-1); }
.av-2 { background: var(--av-2); }
.av-3 { background: var(--av-3); }
.av-4 { background: var(--av-4); }
.sp-1 { color: var(--sp-1); }
.sp-2 { color: var(--sp-2); }
.sp-3 { color: var(--sp-3); }
.sp-4 { color: var(--sp-4); }

#flash:empty { display: none; }
.notice { padding: 10px 12px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-ink); font-size: .875rem; }

.scene { background: #1b1a20 url(host.svg) center / cover no-repeat; }

.topbar { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px 12px; }
.logo { display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap); font-weight: 700; text-decoration: none; }
.logo::before { content: "a"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: #fff; }
.logo-short { font-size: 0; }
.logo-short::before { font-size: 15px; }
.crumb { flex: 1; min-width: 0; line-height: 1.25; }
.crumb strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .875rem; }
.user a { display: inline-flex; align-items: center; min-height: var(--tap); }
.topbar:has(.theme-switch) { flex-wrap: wrap; }
.user form:not(.theme-switch) { display: contents; }
.link-button { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); padding: 0; border: 0; background: none; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; }
.theme-switch { display: inline-flex; gap: 2px; padding: 2px; border-radius: var(--radius); background: var(--surface); }
.theme-opt { display: grid; place-items: center; width: var(--tap); height: var(--tap); padding: 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.theme-opt:hover { background: var(--raised-hover); color: var(--ink); }
.theme-opt[aria-pressed="true"] { background: var(--raised); color: var(--ink); }

.login { flex: 1; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 420px; padding: 24px 20px; display: flex; flex-direction: column; gap: 14px; }
.login-card .logo { align-self: flex-start; }
.login-card .notice a { font-weight: 600; }

.page { width: 100%; max-width: 860px; margin: 0 auto; padding: 16px 16px 40px; display: flex; flex-direction: column; gap: 24px; flex: 1; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.site-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; padding: 4px 16px; }
.site-footer a, .legal-link { display: inline-flex; align-items: center; min-height: var(--tap); }
.legal { max-width: 680px; }
.legal ul { list-style: disc; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.legal section { display: flex; flex-direction: column; gap: 10px; }
.section { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--surface); border-radius: var(--radius); }
.rows { display: flex; flex-direction: column; gap: 8px; }
.rows > li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; padding: 12px; background: var(--surface); border-radius: var(--radius); }
.row-main { flex: 1 1 150px; min-width: 0; }
.row-main a { font-weight: 600; text-decoration: none; }
.row-actions { display: flex; gap: 8px; }
.thumb { flex: none; position: relative; width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; display: block; }
.thumb-wait { background: var(--raised); }
.thumb-time { position: absolute; right: 4px; bottom: 4px; padding: 0 4px; border-radius: 4px; background: rgb(0 0 0 / .7); color: #fff; font-size: .6875rem; font-weight: 600; }
.empty { padding: 20px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.map { display: flex; flex-direction: column; gap: 8px; }
.map a { display: flex; align-items: center; min-height: var(--tap); padding: 8px 12px; background: var(--surface); border-radius: var(--radius); text-decoration: none; font-weight: 600; }

.scrim { position: fixed; inset: 0; z-index: 20; padding: 16px; background: rgb(0 0 0 / .7); }
.scrim.state:target { display: grid; place-items: center; }
.scrim-full { background: var(--bg); }
.modal { position: static; width: 100%; max-width: 420px; padding: 20px; border: 0; border-radius: 16px; background: var(--surface); color: var(--ink); display: flex; flex-direction: column; gap: 14px; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; }
.ending { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; font-weight: 600; }
.input, select { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raised); color: var(--ink); font: inherit; font-weight: 400; }
.input::placeholder { color: var(--muted); }

.video { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--radius); }
.video-top { position: absolute; top: 8px; left: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 8px; background: rgb(0 0 0 / .65); color: #fff; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pill-live { background: var(--live-fill); }
.pill-rec::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--live); }
.pill-rec.rec-on::before { animation: pulse 1.6s ease-in-out infinite; }
.pill-mute { color: var(--warn-ink); }
@keyframes pulse { 50% { opacity: .25; } }

.level { display: inline-flex; align-items: flex-end; gap: 2px; width: 16px; height: 16px; flex: none; }
.level i { flex: 1; border-radius: 1px; background: var(--sp-1); animation: level 1s ease-in-out infinite; height: 40%; }
.level i:nth-child(2) { animation-delay: .2s; height: 100%; }
.level i:nth-child(3) { animation-delay: .4s; height: 65%; }
@keyframes level { 50% { transform: scaleY(.35); } }
.level, .level i { transform-origin: bottom; }
.person .icon.i-mic-off { color: var(--muted); }
@media (prefers-reduced-motion: reduce) {
  .pill-rec.rec-on::before, .level i { animation: none; }
}
.video-name { position: absolute; left: 12px; bottom: 10px; color: #fff; line-height: 1.2; text-shadow: 0 1px 3px rgb(0 0 0 / .8); }
.video-name strong { display: block; }
.video-name span { font-size: .75rem; }
.overlay { position: absolute; inset: 0; padding: 16px; background: rgb(0 0 0 / .75); color: #fff; text-align: center; }
.state.overlay:target { display: grid; place-items: center; }
.countdown { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.lobby { width: 100%; max-width: 960px; margin: 0 auto; padding: 8px 16px 32px; flex: 1; }
.lobby-grid { display: flex; flex-direction: column; gap: 16px; }
.lobby-side { display: flex; flex-direction: column; gap: 14px; }
.lobby-narrow { width: 100%; max-width: 440px; margin: 0 auto; padding-top: 12px; display: flex; flex-direction: column; gap: 16px; }
.lobby-toggles { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 8px; }
.round { display: grid; place-items: center; width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: rgb(0 0 0 / .65); color: #fff; cursor: pointer; }
.meter { display: flex; align-items: center; gap: 10px; font-size: .875rem; }
.bars { display: flex; gap: 3px; flex: 1; }
.bars i { flex: 1; height: 8px; border-radius: 2px; background: var(--raised); }
.bars i.on { background: var(--sp-1); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.steps { list-style: decimal; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }

.room { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 0 8px 8px; min-height: 0; }
.room > .topbar { padding: 6px 4px; }
.strip { padding: 6px 12px; border-radius: 8px; background: var(--warn-bg); color: var(--warn-ink); font-size: .8125rem; text-align: center; }
.state.strip:target { display: block; flex: none; }
body:has(> .room) { height: 100dvh; }
.panel { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 12px; background: var(--surface); border-radius: var(--radius); }
.panel > .states { flex: 1 0 auto; }
.panel-group { display: flex; flex-direction: column; gap: 8px; }
.person { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--raised); }
.person-info { flex: 1; min-width: 0; line-height: 1.25; }
.person-info strong { display: block; }
.person .btn, .person .btn:hover { background: var(--raised-2); }
.person-you { outline: 2px solid var(--accent); outline-offset: -2px; }
.people { display: flex; flex-direction: column; gap: 6px; }
.people-empty { padding: 10px; border-radius: 10px; background: var(--raised); color: var(--muted); text-align: center; }
.me { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me-text { text-align: center; }
.on-air { display: inline-flex; align-items: center; gap: 8px; font-size: 1.0625rem; font-weight: 700; }
.on-air::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--live); }
.controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px 4px 4px; }
.ctl { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; min-height: var(--tap); padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: .75rem; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.ctl-icon { display: grid; place-items: center; width: 100%; max-width: 72px; height: var(--tap); border-radius: var(--radius); background: var(--raised); }
.ctl:hover .ctl-icon { background: var(--raised-hover); }
.ctl:disabled { opacity: .55; cursor: not-allowed; }
.ctl-rec .ctl-icon, .ctl-rec:hover .ctl-icon { background: var(--live-fill); color: #fff; }
.ctl-timer { gap: 6px; grid-auto-flow: column; font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.ctl-timer::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: pulse 1.6s ease-in-out infinite; }
.ctl-end .ctl-icon { color: var(--live); }
.ctl-off .ctl-icon, .ctl-off:hover .ctl-icon { background: var(--warn-bg); color: var(--warn-ink); }

.roster { border-top: 1px solid var(--line); padding-top: 8px; }
.roster summary { display: flex; align-items: center; gap: 8px; min-height: var(--tap); cursor: pointer; font-size: .8125rem; font-weight: 600; color: var(--muted); list-style: none; }
.roster summary::-webkit-details-marker { display: none; }
.roster summary::after { content: "▾"; margin-left: auto; }
.roster[open] summary::after { content: "▴"; }
.roster .people { padding-top: 4px; }
.roster .person { background: none; padding: 6px 4px; }
.roster .person .icon { color: var(--muted); }

.rec-page { flex: 1; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.player { position: sticky; top: 0; z-index: 10; background: #000; }
.player video { display: block; width: 100%; aspect-ratio: 16 / 9; }
.player-msg { aspect-ratio: 16 / 9; place-items: center; padding: 16px; color: #d6d8db; text-align: center; }
.rec-info { padding: 8px 16px; display: flex; flex-direction: column; gap: 10px; }
.partial { margin: 8px 16px 0; }
.resume { padding: 0 12px; background: var(--surface); border-radius: var(--radius); }
.resume summary { font-weight: 600; min-height: var(--tap); display: flex; align-items: center; justify-content: space-between; cursor: pointer; }
.resume summary::after { content: "▾"; color: var(--muted); }
.resume[open] summary::after { content: "▴"; }
.resume p { padding-bottom: 12px; }
.rec-side { margin: 0 8px 8px; padding: 4px 12px 12px; display: flex; flex-direction: column; flex: 1; background: var(--surface); border-radius: var(--radius); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tab { min-height: var(--tap); padding: 10px 12px; display: inline-flex; align-items: center; text-decoration: none; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; }
.tab[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.seg { display: grid; grid-template-columns: 48px 1fr; gap: 0 8px; width: 100%; min-height: var(--tap); padding: 10px 8px; border: 0; border-radius: 10px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.seg:hover { background: var(--raised); }
.seg-current { background: var(--tint); }
.seg-time { grid-row: span 2; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; padding-top: 1px; }
.seg-who { font-weight: 600; font-size: .8125rem; }
.chapter-preview { display: block; color: var(--muted); font-size: .875rem; }
mark { background: var(--tint); color: var(--ink); font-weight: 600; }
.placeholder { padding: 24px 8px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.back-current { display: none; }

@media (min-width: 900px) {
  .logo-short { font-size: inherit; }

  .room {
    display: grid;
    grid-template: "top top" auto "video panel" 1fr "controls panel" auto / 1fr 340px;
    height: calc(100dvh - 36px);
  }
  .room > .topbar { grid-area: top; }
  .room > .strip { grid-area: top; align-self: center; justify-self: center; z-index: 5; }
  .room > .video { grid-area: video; aspect-ratio: auto; min-height: 0; }
  .room > .controls { grid-area: controls; grid-template-columns: repeat(4, 96px); justify-content: center; }
  .room > .panel { grid-area: panel; overflow-y: auto; }

  .lobby { padding-top: 32px; }
  .lobby-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }

  .rec-page { display: grid; grid-template-columns: 1fr 400px; gap: 8px; padding: 0 8px 8px; height: calc(100dvh - 92px); }
  .rec-main { overflow-y: auto; }
  .player { position: static; border-radius: var(--radius); overflow: hidden; }
  .partial { margin: 0 0 8px; }
  .rec-info { padding: 12px 4px; }
  .rec-side { margin: 0; overflow: hidden; }
  .rec-list { overflow-y: auto; flex: 1; min-height: 0; }
  .resume summary { pointer-events: none; }
  .resume summary::after { display: none; }
  .resume::details-content { content-visibility: visible; height: auto; }
  :root:has(#rolou:target) .back-current { display: inline-flex; }
}

:root .rec-off, :root .rec-start, :root .when-host-fora { display: none; }
:root:has(#sem-gravacao:target) .rec-on, :root:has(#iniciando:target) .rec-on { display: none; }
:root:has(#sem-gravacao:target) .ctl.rec-off, :root:has(#iniciando:target) .ctl.rec-start { display: flex; }
:root:has(#iniciando:target) .pill.rec-start { display: inline-flex; }
:root .mic-off, :root .when-mic-off { display: none; }
:root:has(#mic-off:target) .ctl.mic-on { display: none; }
:root:has(#mic-off:target) .ctl.mic-off { display: flex; }
:root:has(#mic-off:target) .when-mic-off { display: inline-flex; }
:root:has(#host-fora:target) .when-host-fora { display: grid; place-items: center; }
:root:has(#processando:target) .player-ok, :root:has(#processando:target) .resume { display: none; }
:root .player-wait, :root .when-processando { display: none; }
:root:has(#processando:target) .rec-side .states { display: none; }
:root:has(#processando:target) .when-processando { display: flex; }
:root:has(#processando:target) .player-wait { display: grid; }
:root:has(#transcrevendo:target) .resume, :root:has(#falhou-texto:target) .resume { display: none; }
:root .resume-wait, :root .partial { display: none; }
:root:has(#gerando-resumo:target) .resume { display: none; }
:root:has(#gerando-resumo:target) .resume-wait { display: block; }
:root:has(#parcial:target) .partial { display: block; }
