:root {
  color-scheme: light;
  --blue: #1a73e8;
  --blue-dark: #1558b0;
  --text: #202124;
  --muted: #5f6368;
  --line: #dadce0;
  --surface: #fff;
  --soft: #f8f9fa;
  --meeting: #202124;
  --meeting-soft: #303134;
  --danger: #d93025;
  --success: #137333;
  font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { color: var(--text); background: var(--surface); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid rgba(26, 115, 232, .28);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px; color: #3c4043;
  text-decoration: none; font-size: 20px; font-weight: 600; letter-spacing: -.02em;
}
.brand-mark {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  color: #fff; background: linear-gradient(145deg, #1a73e8, #7c4dff); font-weight: 800;
  box-shadow: 0 5px 16px rgba(26, 115, 232, .22);
}
.text-link { color: var(--muted); text-decoration: none; font-size: 14px; }
.text-link:hover { color: var(--blue); }

.landing { min-height: 100vh; background: #fff; }
.landing-nav {
  min-height: 72px; display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 4vw, 64px); border-bottom: 1px solid #f1f3f4;
}
.landing-card {
  width: min(680px, calc(100% - 40px)); min-height: calc(100vh - 73px);
  margin: 0 auto; display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center; padding: 48px 0 96px;
}
.landing-icon {
  display: grid; place-items: center; width: 80px; height: 80px; border-radius: 24px;
  color: var(--blue); background: #e8f0fe; margin-bottom: 26px;
}
.landing-icon svg { width: 42px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.landing-card h1 { margin: 0; font-size: clamp(36px, 6vw, 56px); line-height: 1.08; letter-spacing: -.045em; font-weight: 500; }
.landing-card > p { color: var(--muted); margin: 18px 0 34px; font-size: 18px; }
.start-actions { display: flex; align-items: stretch; justify-content: center; gap: 14px; width: 100%; }
.button {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; border: 1px solid transparent; padding: 0 20px; font-weight: 600;
  transition: background .16s, border-color .16s, box-shadow .16s, transform .16s;
}
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { color: #fff; background: var(--blue); }
.button-primary:hover:not(:disabled) { background: var(--blue-dark); box-shadow: 0 4px 12px rgba(26,115,232,.2); }
.button-secondary { color: var(--blue); background: #fff; border-color: var(--line); }
.button-secondary:hover { background: #f8fbff; border-color: #a8c7fa; }
.button-text { color: var(--blue); background: transparent; padding: 0 12px; }
.button-text:hover:not(:disabled) { background: #f4f8ff; }
.button-danger-outline { color: var(--danger); background: #fff; border-color: #f2b8b5; width: 100%; }
.code-form {
  height: 48px; min-width: 300px; display: flex; align-items: center;
  border: 1px solid var(--line); border-radius: 8px; padding: 0 4px 0 14px;
}
.code-form:focus-within { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.code-form input { min-width: 0; flex: 1; border: 0; outline: 0; font-size: 16px; background: transparent; }
.landing-divider { width: min(460px, 100%); border-top: 1px solid var(--line); margin: 34px 0 18px; }
.contact-action {
  display: flex; align-items: center; gap: 10px; border: 0; background: transparent;
  color: #3c4043; padding: 10px 14px; border-radius: 20px; font-weight: 600;
}
.contact-action:hover { background: var(--soft); color: var(--blue); }
.presence-dot { width: 9px; height: 9px; border-radius: 50%; background: #34a853; box-shadow: 0 0 0 4px #e6f4ea; }
.status-message { min-height: 22px; color: var(--muted); font-size: 14px; margin: 14px 0 0 !important; }
.status-message.error { color: var(--danger); }

.simple-header {
  height: 72px; padding: 16px clamp(20px, 4vw, 56px); display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid #f1f3f4;
}
.room-code-label { color: var(--muted); font-size: 14px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.prejoin { min-height: 100vh; background: #fff; }
.prejoin-layout {
  min-height: calc(100vh - 72px); max-width: 1180px; margin: 0 auto; padding: 44px 30px 72px;
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(330px, .75fr); align-items: center; gap: 56px;
}
.preview-wrap {
  position: relative; min-height: 420px; aspect-ratio: 16/9; max-height: 68vh;
  overflow: hidden; border-radius: 16px; background: #202124; box-shadow: 0 12px 38px rgba(32,33,36,.18);
}
.preview-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-avatar {
  position: absolute; inset: 0; display: none; place-items: center; color: #fff; font-size: 42px;
  font-weight: 700; background: radial-gradient(circle at 40% 30%, #5f6368, #292a2d 70%);
}
.preview-wrap.camera-off .preview-avatar { display: grid; }
.preview-wrap.camera-off video { opacity: 0; }
.preview-message {
  position: absolute; left: 18px; right: 18px; top: 18px; padding: 12px 14px; border-radius: 8px;
  color: #fff; background: rgba(32,33,36,.86); font-size: 14px; text-align: center;
}
.preview-controls { position: absolute; bottom: 22px; left: 50%; display: flex; gap: 12px; transform: translateX(-50%); }
.round-control, .meet-control, .icon-control {
  display: inline-grid; place-items: center; border: 0; color: #fff; background: rgba(60,64,67,.88);
}
.round-control { width: 52px; height: 52px; border-radius: 50%; }
.round-control.off, .meet-control.off { background: var(--danger); }
.round-control svg, .meet-control svg, .icon-control svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.audio-meter { position: absolute; left: 20px; bottom: 22px; width: 74px; height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.25); }
.audio-meter span { display: block; width: 4%; height: 100%; border-radius: inherit; background: #8ab4f8; transition: width 80ms linear; }
.join-panel { max-width: 430px; text-align: center; }
.join-panel h1 { font-size: 32px; line-height: 1.2; letter-spacing: -.03em; font-weight: 500; margin: 0 0 8px; }
.join-panel > p:not(.notice):not(.status-message) { color: var(--muted); margin: 0 0 28px; }
.field { display: grid; gap: 7px; text-align: left; margin-bottom: 14px; }
.field > span { color: #3c4043; font-size: 13px; font-weight: 600; }
.field input, .field select {
  width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--text); padding: 0 13px; outline: 0;
}
.field input:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.device-grid { display: grid; grid-template-columns: 1fr; }
.join-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.text-button { border: 0; color: var(--blue); background: transparent; padding: 12px; margin-top: 8px; font-weight: 600; }
.notice { margin: 0 0 20px; padding: 12px 14px; border-radius: 8px; text-align: left; font-size: 14px; line-height: 1.45; }
.notice-success { color: #0d652d; background: #e6f4ea; border: 1px solid #ceead6; }

.meeting { position: fixed; inset: 0; overflow: hidden; color: #fff; background: var(--meeting); }
.meeting-stage { position: absolute; inset: 0 0 80px; padding: 14px; }
.participant-grid {
  width: 100%; height: 100%; display: grid; grid-template-columns: repeat(var(--grid-columns, 1), minmax(0, 1fr));
  grid-template-rows: repeat(var(--grid-rows, 1), minmax(0, 1fr)); gap: 12px; place-content: center;
}
.tile {
  position: relative; min-width: 0; min-height: 0; overflow: hidden; border-radius: 12px;
  cursor: zoom-in; background: #3c4043; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.tile video { width: 100%; height: 100%; object-fit: cover; background: #202124; }
.tile--screen video { object-fit: contain; }
.tile--screen { background: #17181a; box-shadow: inset 0 0 0 2px rgba(138,180,248,.5); }
.tile--self video { transform: scaleX(-1); }
.tile .avatar { position: absolute; inset: 0; display: none; place-items: center; background: #3c4043; }
.tile .avatar__circle, .empty-avatar {
  display: grid; place-items: center; width: clamp(70px, 11vw, 118px); height: clamp(70px, 11vw, 118px);
  border-radius: 50%; color: #fff; background: #5f6368; font-size: clamp(24px, 4vw, 42px); font-weight: 600;
}
.tile--audio-only .avatar { display: grid; }
.tile__name { position: absolute; left: 12px; bottom: 11px; font-size: 14px; font-weight: 600; text-shadow: 0 1px 3px #000; }
.tile__badges { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; }
.badge-pill { padding: 5px 8px; border-radius: 99px; color: #fff; background: rgba(32,33,36,.82); font-size: 11px; }
.tile__pin { display: none; position: absolute; left: 10px; top: 10px; padding: 5px 8px; border-radius: 99px; background: rgba(26,115,232,.9); font-size: 11px; }
.tile.pinned .tile__pin, .tile--focused .tile__pin { display: block; }
.tile__focus {
  position: absolute; z-index: 4; right: 10px; bottom: 10px; width: 36px; height: 36px;
  display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff;
  background: rgba(32,33,36,.78); opacity: 0; transition: opacity .15s, background .15s;
}
.tile__focus::before { content: ""; width: 14px; height: 10px; border: 2px solid currentColor; border-radius: 2px; }
.tile:hover .tile__focus, .tile:focus-within .tile__focus, .tile--focused .tile__focus { opacity: 1; }
.tile__focus:hover, .tile__focus:focus-visible { background: #1a73e8; }
.meeting.focus-mode .empty-room { display: none; }
.meeting.focus-mode .tile:not(.tile--focused) { visibility: hidden; pointer-events: none; }
.meeting .tile.tile--focused {
  position: fixed; z-index: 7; inset: 14px 14px calc(94px + env(safe-area-inset-bottom));
  width: auto !important; height: auto !important; aspect-ratio: auto; cursor: zoom-out; border-radius: 14px;
  background: #17181a; box-shadow: 0 10px 35px rgba(0,0,0,.42);
}
.tile.tile--focused video { object-fit: contain; }
.tile.speaking { box-shadow: inset 0 0 0 3px #8ab4f8; }
.tile.reconnecting::after {
  content: "Reconnecting…"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; background: rgba(32,33,36,.62); font-weight: 600;
}
.tile__playback {
  position: absolute; z-index: 5; left: 50%; top: 50%; transform: translate(-50%, -50%);
  min-height: 42px; padding: 0 16px; border: 1px solid rgba(255,255,255,.35); border-radius: 22px;
  color: #fff; background: rgba(32,33,36,.9); font-size: 13px; font-weight: 700;
}
.tile__playback:hover, .tile__playback:focus-visible { background: #1a73e8; }
.tile.video-unavailable video { opacity: .35; }
.hand-badge { position: absolute; left: 10px; top: 10px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fdd663; color: #202124; }
.self-view { position: absolute; right: 24px; bottom: 24px; width: min(230px, 25vw); aspect-ratio: 16/9; z-index: 3; }
.self-view .tile { width: 100%; height: 100%; box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.self-view .avatar__circle { width: 62px; height: 62px; font-size: 22px; }
.self-view .tile__name { font-size: 12px; }
.empty-room { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.empty-room h2 { margin: 22px 0 7px; font-size: 22px; font-weight: 500; }
.empty-room p { margin: 0 0 22px; color: #bdc1c6; }
.empty-room .button { color: #8ab4f8; border-color: #5f6368; background: transparent; }

.caption-overlay {
  position: absolute; z-index: 8; left: 50%; bottom: 18px; transform: translateX(-50%);
  width: min(820px, calc(100% - 280px)); max-height: 32%; overflow: hidden;
  padding: 9px 46px 9px 13px; border-radius: 9px; color: #fff;
  background: rgba(15, 16, 18, .88); box-shadow: 0 4px 18px rgba(0,0,0,.28);
  font-size: clamp(15px, 1.6vw, 20px); line-height: 1.42;
}
.caption-history { display: grid; gap: 4px; }
.caption-placeholder { color: #bdc1c6; font-size: .78em; }
.caption-line { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 9px; overflow-wrap: anywhere; }
.caption-line strong { color: #a8c7fa; font-size: .78em; padding-top: .2em; white-space: nowrap; }
.caption-live { margin-top: 3px; color: #e8eaed; font-style: italic; overflow-wrap: anywhere; }
.caption-settings-button {
  position: absolute; right: 7px; top: 7px; width: 34px; height: 34px; overflow: hidden;
  border: 0; border-radius: 50%; color: transparent; background: transparent;
}
.caption-settings-button::before { content: "⚙"; color: #bdc1c6; font-size: 17px; }
.caption-settings-button:hover, .caption-settings-button:focus-visible { background: rgba(255,255,255,.12); }

.meeting-controls {
  position: absolute; z-index: 10; left: 0; right: 0; bottom: 0; height: calc(80px + env(safe-area-inset-bottom));
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr); align-items: center; background: var(--meeting);
}
.control-left, .control-center, .control-right { display: flex; align-items: center; }
.control-left { gap: 10px; font-size: 14px; }
.control-divider { color: #5f6368; }
.room-code-button { border: 0; color: #fff; background: transparent; padding: 8px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.room-code-button:hover { background: var(--meeting-soft); }
.control-center { justify-content: center; gap: 10px; }
.control-right { justify-content: flex-end; gap: 8px; }
.meet-control { min-width: 52px; height: 52px; border-radius: 50%; position: relative; }
.meet-control > span { position: absolute; top: calc(100% + 5px); left: 50%; transform: translateX(-50%); font-size: 10px; color: #bdc1c6; white-space: nowrap; opacity: 0; pointer-events: none; }
.meet-control:hover > span, .meet-control:focus-visible > span { opacity: 1; }
.meet-control.active { color: #202124; background: #8ab4f8; }
.meet-control-danger { width: 68px; border-radius: 26px; background: var(--danger); margin-left: 4px; }
.meet-control-danger:hover { background: #b3261e; }
.icon-control { width: 42px; height: 42px; border-radius: 50%; position: relative; background: transparent; }
.icon-control:hover, .icon-control.active { background: #3c4043; }
.icon-control-light { color: #3c4043; font-size: 26px; }
.icon-control-light:hover { background: #f1f3f4; }
.cc-icon { font-size: 12px; font-weight: 800; letter-spacing: -.03em; }
.icon-control.transcribing .cc-icon { color: #8ab4f8; }
.control-badge { position: absolute; right: 0; top: 0; min-width: 18px; height: 18px; padding: 0 4px; display: grid; place-items: center; border-radius: 10px; color: #202124; background: #8ab4f8; font-size: 10px; font-weight: 700; }
.quality { width: 25px; height: 24px; display: flex; align-items: flex-end; gap: 2px; padding: 3px; }
.quality i { display: block; width: 4px; background: #9aa0a6; border-radius: 2px; }
.quality i:nth-child(1) { height: 6px; } .quality i:nth-child(2) { height: 11px; } .quality i:nth-child(3) { height: 16px; }
.quality[data-quality="good"] i { background: #81c995; }
.quality[data-quality="fair"] i:nth-child(-n+2) { background: #fdd663; }
.quality[data-quality="poor"] i:first-child { background: #f28b82; }

.network-banner {
  position: absolute; z-index: 20; left: 50%; top: 18px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 30px); padding: 10px 14px;
  border-radius: 8px; color: #202124; background: #fdd663; box-shadow: 0 8px 24px rgba(0,0,0,.28); font-size: 14px;
}
.network-banner button { border: 0; color: #174ea6; background: transparent; font-weight: 700; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(32,33,36,.25); border-top-color: #202124; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.side-panel {
  position: absolute; z-index: 30; right: 12px; top: 12px; bottom: 92px; width: min(380px, calc(100vw - 24px));
  overflow: hidden; display: grid; grid-template-rows: auto 1fr; color: var(--text); background: #fff;
  border-radius: 14px; box-shadow: 0 10px 35px rgba(0,0,0,.35);
}
.side-panel-header { height: 68px; padding: 0 12px 0 22px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #f1f3f4; }
.side-panel-header h2 { margin: 0; font-size: 20px; font-weight: 500; }
.panel-content { overflow-y: auto; padding: 20px 22px; }
.panel-content h3 { margin: 0 0 10px; font-size: 14px; }
.panel-muted { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.meeting-link { overflow-wrap: anywhere; color: var(--muted); font-size: 14px; line-height: 1.5; }
.host-controls { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.people-list { display: grid; gap: 8px; }
.person-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 8px 0; }
.person-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #5f6368; font-size: 12px; font-weight: 700; }
.person-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.person-meta { color: var(--muted); font-size: 11px; }
.person-actions { display: flex; gap: 3px; }
.person-actions button { border: 0; color: var(--muted); background: transparent; border-radius: 50%; width: 34px; height: 34px; }
.person-actions button:hover { color: var(--text); background: #f1f3f4; }
.chat-panel { min-height: 0; display: grid; grid-template-rows: auto 1fr auto; padding: 16px 18px; }
.chat-messages { min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 13px; padding: 4px 2px 14px; }
.chat-line { color: #3c4043; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-from { display: block; color: var(--text); font-weight: 700; font-size: 12px; }
.chat-time { margin-left: 7px; color: #9aa0a6; font-weight: 400; }
.chat-form { display: flex; align-items: center; gap: 6px; border-radius: 24px; background: #f1f3f4; padding: 4px 5px 4px 14px; }
.chat-form input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.chat-form button { width: 36px; height: 36px; border: 0; border-radius: 50%; color: var(--blue); background: transparent; }
.chat-form button:hover { background: #e8f0fe; }
.transcript-panel { min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.transcript-settings { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.transcript-toggle { display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; }
.transcript-toggle span { display: grid; gap: 2px; }
.transcript-toggle strong { font-size: 14px; }
.transcript-toggle small { color: var(--muted); font-size: 11px; }
.transcript-toggle input { width: 42px; height: 24px; flex: 0 0 auto; appearance: none; border-radius: 20px; background: #bdc1c6; position: relative; transition: background .16s; }
.transcript-toggle input::after { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.28); transition: transform .16s; }
.transcript-toggle input:checked { background: var(--blue); }
.transcript-toggle input:checked::after { transform: translateX(18px); }
.transcript-toggle input:disabled { opacity: .5; cursor: not-allowed; }
.transcript-language-field { margin: 16px 0 0; }
.transcript-language-field select { height: 40px; font-size: 13px; }
.transcript-disclosure { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.transcript-status { min-height: 18px; margin: 10px 0 0; color: #3c4043; font-size: 12px; font-weight: 600; }
.transcript-status.error { color: var(--danger); }
.transcript-status.listening { color: var(--success); }
.transcript-scroll { min-height: 0; overflow-y: auto; padding: 14px 20px; }
.transcript-empty { margin: 8px 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.transcript-messages { display: grid; gap: 13px; }
.transcript-line { color: #3c4043; font-size: 14px; line-height: 1.48; overflow-wrap: anywhere; }
.transcript-line-header { display: flex; align-items: baseline; gap: 7px; margin-bottom: 2px; }
.transcript-speaker { color: var(--text); font-size: 12px; font-weight: 700; }
.transcript-time, .transcript-language { color: #9aa0a6; font-size: 10px; }
.transcript-text { display: block; white-space: pre-wrap; }
.transcript-interim { margin: 13px 0 0; padding-left: 10px; border-left: 2px solid #a8c7fa; color: var(--muted); font-size: 13px; font-style: italic; line-height: 1.45; }
.transcript-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.transcript-actions .button { min-height: 40px; padding-inline: 14px; font-size: 13px; }
.transcript-actions > span { color: var(--muted); font-size: 11px; }
.toast { position: absolute; z-index: 50; left: 22px; bottom: 96px; max-width: min(460px, calc(100% - 44px)); padding: 12px 16px; border-radius: 6px; color: #fff; background: #3c4043; box-shadow: 0 6px 20px rgba(0,0,0,.32); font-size: 14px; }
.native-share-dialog { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(15,16,18,.72); }
.native-share-dialog[hidden] { display: none; }
.native-share-card { width: min(430px, 100%); padding: 24px; border-radius: 14px; color: var(--text); background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.38); }
.native-share-card h2 { margin: 0 0 10px; font-size: 22px; }
.native-share-card p { margin: 0 0 12px; line-height: 1.5; }
.native-share-actions { display: flex; gap: 10px; margin-top: 20px; }
.native-share-actions .button { flex: 1; text-align: center; text-decoration: none; }

@media (max-width: 900px) {
  .prejoin-layout { grid-template-columns: 1fr; gap: 34px; padding-top: 26px; }
  .preview-wrap { min-height: 0; width: min(100%, 700px); margin: auto; }
  .join-panel { margin: auto; width: min(100%, 480px); }
  .control-left { display: none; }
  .meeting-controls { grid-template-columns: 1fr auto; padding-left: 10px; padding-right: 10px; }
  .control-center { justify-content: flex-start; }
  .self-view { width: min(190px, 32vw); }
  .caption-overlay { width: min(680px, calc(100% - 38px)); }
}

@media (max-width: 640px) {
  .landing-nav { min-height: 64px; padding: 13px 18px; }
  .landing-nav .text-link { display: none; }
  .landing-card { min-height: calc(100vh - 64px); padding: 32px 0 70px; }
  .landing-card h1 { font-size: 38px; }
  .landing-card > p { font-size: 16px; }
  .start-actions { flex-direction: column; }
  .code-form { min-width: 0; width: 100%; }
  .simple-header { height: 64px; padding: 13px 18px; }
  .room-code-label { display: none; }
  .prejoin-layout { min-height: calc(100vh - 64px); padding: 18px 16px 40px; }
  .preview-wrap { border-radius: 12px; }
  .join-buttons { grid-template-columns: 1fr; }
  .meeting-stage { bottom: 72px; padding: 8px; }
  .participant-grid { gap: 7px; }
  .tile { border-radius: 9px; }
  .tile__focus { right: 7px; bottom: 7px; width: 34px; height: 34px; opacity: .88; }
  .meeting .tile.tile--focused { inset: 8px 8px calc(80px + env(safe-area-inset-bottom)); border-radius: 10px; }
  .self-view { right: 14px; bottom: 14px; width: 126px; }
  .meeting-controls { height: calc(72px + env(safe-area-inset-bottom)); grid-template-columns: 1fr auto; gap: 4px; }
  .control-center { gap: 6px; }
  .meet-control { min-width: 40px; width: 40px; height: 40px; }
  .meet-control svg { width: 20px; }
  .meet-control-danger { width: 52px; }
  .control-right { gap: 0; }
  #details-button, .quality { display: none; }
  .icon-control { width: 36px; height: 36px; }
  .side-panel { right: 0; top: 0; bottom: calc(72px + env(safe-area-inset-bottom)); width: 100%; border-radius: 0; }
  .toast { left: 14px; bottom: 86px; }
  .caption-overlay { bottom: 12px; width: calc(100% - 20px); max-height: 38%; font-size: 15px; }
}

@media (hover: none) {
  .tile__focus { opacity: .88; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation-duration: .001ms !important; }
}
