:root {
  --ink-strong: #0b1f33;
  --ink: #172b42;
  --muted: #66758a;
  --line: #dce3eb;
  --line-strong: #c9d3df;
  --surface: #ffffff;
  --soft: #f4f7fa;
  --brand: #12395b;
  --brand-dark: #0a2944;
  --brand-soft: #edf3f8;
  --signal: #138675;
  --signal-soft: #e8f5f2;
  --accent: #b88435;
  --danger: #b8323f;
  --danger-soft: #fff0f1;
  --shadow: 0 18px 45px rgba(13, 35, 58, .10);
  --shadow-soft: 0 8px 24px rgba(13, 35, 58, .06);
  color: var(--ink);
  background: #f2f5f8;
  font-family: Inter, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #f2f5f8; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: linear-gradient(180deg, #fafbfd 0, #f3f6f9 52%, #eef2f6 100%); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid rgba(24, 100, 156, .20); outline-offset: 2px; }
.hidden { display: none !important; }

.site-header { position: relative; z-index: 40; min-height: 76px; padding: 16px clamp(24px, 4vw, 64px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(220, 227, 235, .95); background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink-strong); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 42px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 7px; color: white; background: linear-gradient(145deg, #194d78, var(--brand-dark)); box-shadow: 0 7px 18px rgba(10, 41, 68, .18); font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .08em; }
.brand small { margin-top: 3px; color: var(--muted); font-size: 10px; letter-spacing: .03em; }
.privacy-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.privacy-note i, .meeting-readiness i { width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(19, 134, 117, .09); }

.landing { width: min(1240px, 100%); margin: 0 auto; padding: 68px 32px 92px; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .72fr); gap: clamp(54px, 7vw, 96px); align-items: center; }
.hero { padding: 22px 0 44px; }
.eyebrow, .panel-kicker { margin: 0; color: var(--signal); font-size: 11px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.hero h1 { max-width: 720px; margin: 17px 0 0; color: var(--ink-strong); font-size: clamp(44px, 5.4vw, 68px); font-weight: 680; line-height: 1.12; letter-spacing: -.045em; }
.hero-copy { max-width: 625px; margin: 28px 0 30px; color: var(--muted); font-size: 17px; line-height: 1.9; }
.feature-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 230px)); gap: 10px 28px; }
.feature-strip span { display: flex; align-items: center; gap: 10px; min-height: 38px; color: var(--ink); font-size: 13px; }
.feature-strip b { color: #92a0b1; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.hero-footnote { margin: 30px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: #8794a5; font-family: Georgia, "Times New Roman", serif; font-size: 13px; font-style: italic; }

.create-card { position: relative; padding: 32px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(255, 255, 255, .96); box-shadow: var(--shadow); }
.create-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--brand), #276994 72%, var(--signal)); }
.section-heading, .panel-heading, .room-title-line, .room-meta, .topbar-actions { display: flex; align-items: center; }
.section-heading { justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2, .dialog-heading h2 { margin: 0; color: var(--ink-strong); font-size: 23px; font-weight: 680; letter-spacing: -.025em; }
.step-chip, .badge { display: inline-flex; align-items: center; justify-content: center; min-height: 26px; padding: 5px 9px; border: 1px solid #d5e0ea; border-radius: 6px; color: var(--brand); background: var(--brand-soft); font-size: 10px; font-weight: 750; letter-spacing: .06em; }
.form-stack { display: grid; gap: 17px; }
.mode-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.mode-picker legend { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.mode-option { position: relative; display: flex; align-items: center; gap: 11px; min-height: 78px; padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); cursor: pointer; transition: border-color .18s, background .18s, box-shadow .18s; }
.mode-option:hover { border-color: #b4c4d3; box-shadow: var(--shadow-soft); }
.mode-option.selected { border-color: #7393af; background: #f2f6fa; box-shadow: inset 3px 0 var(--brand); }
.mode-option input { position: absolute; opacity: 0; pointer-events: none; }
.mode-option strong, .mode-option small { display: block; }
.mode-option strong { margin-bottom: 5px; color: var(--ink-strong); font-size: 13px; }
.mode-option small { color: var(--muted); font-size: 10px; line-height: 1.45; }
.mode-icon { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 36px; border-radius: 6px; color: var(--brand); background: var(--brand-soft); font-size: 9px; font-weight: 800; letter-spacing: .05em; }
.selected .mode-icon { color: white; background: var(--brand); }
.field { display: grid; gap: 7px; color: #526276; font-size: 12px; font-weight: 600; }
.field input, .field select, .language-control select { width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--ink); background: white; transition: border-color .15s, box-shadow .15s; }
.field input::placeholder { color: #9aa6b5; }
.field input:focus, .field select:focus, .language-control select:focus { border-color: #6386a5; box-shadow: 0 0 0 3px rgba(35, 93, 140, .08); }
.inline-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.advanced-settings { border-top: 1px solid var(--line); padding-top: 14px; }
.advanced-settings summary { color: var(--brand); font-size: 12px; font-weight: 650; cursor: pointer; }
.advanced-settings[open] summary { margin-bottom: 14px; }
.language-guidance { margin: 11px 0 0; color: var(--muted); font-size: 10px; font-weight: 400; line-height: 1.65; }
.meeting-readiness { display: flex; flex-wrap: wrap; gap: 18px; color: var(--muted); font-size: 11px; }
.meeting-readiness span { display: inline-flex; align-items: center; gap: 8px; }
.meeting-readiness i { width: 6px; height: 6px; box-shadow: none; }
.audio-readiness { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; padding: 11px 12px; border: 1px solid #d8e4e1; border-radius: 7px; color: #49606d; background: #f5faf9; }
.audio-readiness strong { color: var(--signal); font-size: 10px; letter-spacing: .03em; }
.audio-readiness span { justify-self: end; color: #456376; font-size: 10px; }
.audio-readiness small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; line-height: 1.55; }
.primary-button, .secondary-button, .icon-button, .control-button { border-radius: 7px; font-weight: 680; }
.primary-button { min-height: 50px; padding: 13px 18px; border: 1px solid var(--brand); color: white; background: linear-gradient(180deg, #19486f, var(--brand)); box-shadow: 0 8px 18px rgba(18, 57, 91, .16); }
.primary-button:hover { background: var(--brand-dark); }
.primary-button:disabled { opacity: .55; cursor: wait; }
.secondary-button { min-height: 42px; padding: 10px 15px; border: 1px solid var(--line-strong); color: var(--ink); background: white; white-space: nowrap; }
.secondary-button:hover { border-color: #b6c2cf; background: var(--soft); }
.secondary-button:disabled { opacity: .55; cursor: wait; }
.full-width { width: 100%; }
.form-error { min-height: 18px; margin: -8px 0; color: var(--danger); font-size: 12px; }
.text-button { padding: 7px 0; border: 0; color: var(--brand); background: transparent; font-size: 11px; font-weight: 680; }
.text-button:hover { color: var(--brand-dark); text-decoration: underline; }
.danger-button { min-height: 44px; padding: 10px 15px; border: 1px solid var(--danger); border-radius: 7px; color: white; background: var(--danger); font-weight: 680; }
.danger-button:hover { background: #952632; }
.text-link { color: var(--brand); text-align: center; text-decoration: none; font-size: 12px; }

.room-shell { width: min(1500px, 100%); margin: 0 auto; padding: 20px 32px 112px; }
.room-topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 0 24px; border-bottom: 1px solid var(--line); }
.room-kicker { display: flex; gap: 10px; margin-bottom: 7px; color: #8391a2; font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.room-kicker span:first-child { color: var(--signal); }
.room-title-line { gap: 10px; }
.room-title-line h1 { margin: 0; color: var(--ink-strong); font-size: 25px; font-weight: 680; letter-spacing: -.025em; }
.room-meta { gap: 15px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.status { display: inline-flex; align-items: center; gap: 7px; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.status.connected i { background: var(--signal); box-shadow: 0 0 0 4px rgba(19, 134, 117, .09); }
.status.disconnected i { background: var(--danger); }
.media-status.connected { color: var(--signal); }
.media-status.connecting { color: #8a692d; }
.media-status.disconnected { color: var(--danger); }
.topbar-actions { position: relative; gap: 8px; }
.mobile-button-label { display: none; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.menu { position: absolute; z-index: 20; top: 48px; right: 0; width: 180px; padding: 7px; border: 1px solid var(--line); border-radius: 9px; background: white; box-shadow: var(--shadow); }
.menu button { width: 100%; padding: 10px; border: 0; border-radius: 6px; color: var(--ink); background: transparent; text-align: left; font-size: 12px; }
.menu button:hover { background: var(--soft); }
.danger-text { color: var(--danger) !important; }
.notice, .connection-banner { margin: 16px 0; padding: 11px 14px; border-radius: 7px; font-size: 12px; }
.notice { border: 1px solid #ebd8a9; color: #795719; background: #fff9ea; }
.connection-banner { border: 1px solid #c9ded9; color: #166659; background: var(--signal-soft); }
.summary-shell { width: min(1180px, 100%); margin: 0 auto; padding: 48px 32px 88px; }
.summary-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.summary-hero h1 { margin: 9px 0 0; color: var(--ink-strong); font-size: clamp(30px, 4vw, 44px); letter-spacing: -.035em; }
.summary-meta { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.summary-home-link { display: inline-flex; align-items: center; text-decoration: none; }
.meeting-materials { padding: 28px; border: 1px solid #cbd9e5; border-radius: 12px; background: linear-gradient(145deg, #fff, #f4f8fb); box-shadow: var(--shadow); }
.materials-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.materials-heading h2 { margin: 5px 0 0; color: var(--ink-strong); font-size: 20px; }
.materials-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.materials-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.materials-actions .primary-button { min-height: 42px; padding: 10px 15px; }
.summary-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.summary-facts div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .75); }
.summary-facts span, .summary-facts strong { display: block; }
.summary-facts span { color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.summary-facts strong { margin-top: 6px; color: var(--ink-strong); font-size: 12px; }
.summary-participants { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.summary-participants span { padding: 6px 9px; border-radius: 999px; color: #43546a; background: var(--brand-soft); font-size: 10px; }
.materials-note { margin: 13px 0 0; color: #8491a1; font-size: 10px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 20px; }
.summary-grid article { padding: 19px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.summary-grid article > span { color: var(--signal); font-size: 9px; font-weight: 750; letter-spacing: .12em; }
.summary-grid h3 { margin: 6px 0 12px; color: var(--ink-strong); font-size: 14px; }
.summary-grid p { margin: 0; color: #34495e; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.summary-grid .text-button { margin-top: 14px; }
.room-content { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; padding-top: 20px; }
.conversation-column { display: grid; gap: 18px; }
.conversation-column > section, .member-panel { padding: 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-soft); }
.panel-heading { justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.panel-heading h2 { margin: 4px 0 0; color: var(--ink-strong); font-size: 15px; font-weight: 680; }
.panel-heading > span, .panel-heading > div > span { color: var(--muted); font-size: 11px; }
.panel-kicker { color: #8a98a9; font-size: 8px; letter-spacing: .14em; }
.participant-stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; min-height: 188px; }
.participant-stage.duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.participant-card { position: relative; display: grid; place-items: center; align-content: center; gap: 10px; min-height: 188px; padding: 20px; overflow: hidden; border: 1px solid #e2e8ef; border-radius: 8px; background: linear-gradient(160deg, #f8fafc, #eef3f7); }
.participant-card.active { border-color: #9fc3ba; background: linear-gradient(160deg, #f5faf9, #eaf5f2); box-shadow: inset 0 0 0 1px rgba(19, 134, 117, .08); }
.participant-card.disconnected { opacity: .58; }
.participant-placeholder { border-style: dashed; background: #fbfcfd; }
.participant-visual { display: grid; place-items: center; width: 100%; min-height: 70px; }
.participant-video { position: absolute; z-index: 0; inset: 0; overflow: hidden; background: #071522; }
.participant-video > *, .participant-video video, .participant-video canvas { width: 100% !important; height: 100% !important; object-fit: cover !important; }
.participant-video video.local-video { transform: scaleX(-1); }
.participant-card.has-video { align-content: end; justify-items: start; min-height: 240px; padding: 18px; border-color: #314a5f; background: #071522; }
.participant-card.has-video::after { content: ""; position: absolute; z-index: 1; inset: 42% 0 0; pointer-events: none; background: linear-gradient(180deg, transparent, rgba(4, 16, 27, .82)); }
.participant-card.has-video > strong, .participant-card.has-video > .participant-state, .participant-card.has-video > .speaking-bars { position: relative; z-index: 2; }
.participant-card.has-video > strong { color: white; text-align: left; text-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.participant-card.has-video > .participant-state { color: #d8e2ea; }
.placeholder-avatar { border: 1px solid #d6e0e9; color: #7890a4; background: white; box-shadow: none; font-weight: 500; }
.avatar { display: grid; place-items: center; width: 64px; height: 64px; border: 2px solid white; border-radius: 50%; color: white; background: linear-gradient(145deg, #2d608a, var(--brand)); box-shadow: 0 5px 14px rgba(18, 57, 91, .16); font-size: 19px; font-weight: 700; }
.participant-card strong { max-width: 100%; overflow: hidden; color: var(--ink-strong); line-height: 1.3; overflow-wrap: anywhere; text-align: center; }
.participant-state { display: flex; gap: 7px; color: var(--muted); font-size: 10px; }
.speaking-bars { position: absolute; inset: auto 0 0; height: 3px; background: transparent; }
.active .speaking-bars { background: linear-gradient(90deg, var(--signal), #45b6a3, var(--signal)); background-size: 200% 100%; animation: speaking 2s linear infinite; }
@keyframes speaking { to { background-position: -200% 0; } }

.caption-panel { min-height: 330px; }
.switch-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.caption-list { max-height: 430px; overflow-y: auto; padding-right: 5px; scroll-behavior: smooth; }
.caption-item { padding: 16px 0 17px 13px; border-top: 1px solid var(--line); border-left: 2px solid transparent; }
.caption-item:first-child { border-top: 0; }
.caption-item.interim { border-left-color: var(--signal); }
.caption-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--muted); font-size: 10px; }
.caption-meta strong { color: #43546a; }
.caption-original { margin: 0 0 6px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.caption-target { margin: 0; color: var(--ink-strong); font-size: 19px; font-weight: 520; line-height: 1.6; letter-spacing: -.01em; }
.caption-item.interim .caption-target::after { content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 8px; border-radius: 50%; background: var(--signal); animation: pulse 1s infinite alternate; }
@keyframes pulse { to { opacity: .25; } }
.empty-state { min-height: 226px; display: grid; place-items: center; align-content: center; color: var(--muted); text-align: center; }
.empty-state span { display: grid; place-items: center; width: 46px; height: 30px; border: 1px solid #cad6e1; border-radius: 6px; color: #73879b; background: var(--brand-soft); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.empty-state p { margin: 14px 0 0; font-size: 12px; }

.member-list { display: grid; gap: 5px; max-height: 640px; overflow-y: auto; }
.member-row { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 7px; border-bottom: 1px solid #edf1f5; }
.member-row:last-child { border-bottom: 0; }
.member-row:hover { background: var(--soft); }
.member-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 7px; color: var(--brand); background: var(--brand-soft); font-size: 11px; font-weight: 750; }
.member-copy { min-width: 0; }
.member-copy strong, .member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-copy strong { color: var(--ink-strong); font-size: 12px; }
.member-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.45; white-space: normal; }
.member-actions { display: flex; gap: 3px; }
.member-actions button { padding: 5px 6px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 10px; }
.member-actions button:hover { color: var(--ink); background: white; box-shadow: 0 1px 5px rgba(13, 35, 58, .10); }
.hand-raised { color: #a46712; }

.call-controls { position: fixed; z-index: 30; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; align-items: center; gap: 7px; max-width: calc(100% - 20px); padding: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255, 255, 255, .96); box-shadow: 0 16px 40px rgba(13, 35, 58, .16); backdrop-filter: blur(18px); }
.control-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 9px; min-height: 45px; padding: 9px 14px; border: 1px solid transparent; color: var(--ink); background: var(--soft); white-space: nowrap; }
.control-button:hover { border-color: #cbd6e0; background: var(--brand-soft); }
.control-button.muted { color: white; background: var(--brand); }
.control-button:disabled { opacity: .5; cursor: wait; }
.control-button.leave { color: var(--danger); background: var(--danger-soft); }
.control-icon { display: inline-grid; place-items: center; min-width: 26px; color: inherit; font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.language-control { display: flex; flex: 0 1 auto; align-items: center; gap: 7px; min-width: 0; padding-left: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.language-control select { min-height: 39px; width: 142px; min-width: 0; }
.language-select-stack { display: grid; min-width: 0; }
.language-select-stack small { max-width: 160px; margin: 2px 3px 0; overflow: hidden; color: var(--signal); font-size: 8px; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }

dialog { width: min(450px, calc(100% - 32px)); padding: 30px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: white; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(7, 24, 40, .55); backdrop-filter: blur(4px); }
.dialog-heading { margin-bottom: 22px; }
.dialog-heading .eyebrow { margin-bottom: 8px; }
.dialog-heading p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.dialog-actions { display: grid; gap: 10px; }
.dialog-actions .text-button { justify-self: center; }
.copy-field { display: grid; grid-template-columns: 1fr auto; }
.copy-field input { border-radius: 7px 0 0 7px; }
.copy-field button { padding: 0 15px; border: 0; border-radius: 0 7px 7px 0; color: white; background: var(--brand); }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 12px 15px; border-radius: 7px; color: white; background: var(--ink-strong); box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { background: var(--danger); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } }

@media (max-width: 940px) {
  .landing { grid-template-columns: 1fr; gap: 32px; padding-top: 44px; }
  .hero { padding-bottom: 0; }
  .hero h1 { max-width: 760px; }
  .create-card { max-width: 620px; }
  .room-content { grid-template-columns: 1fr; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .member-panel { order: 2; }
  .participant-stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .call-controls { width: calc(100% - 20px); display: grid; grid-template-columns: auto auto minmax(105px, 1fr) minmax(105px, 1fr) auto; }
  .control-button > span:last-child { display: none; }
  .language-control { display: grid; align-items: stretch; gap: 3px; padding-left: 0; }
  .control-label { display: block; padding-left: 3px; overflow: hidden; font-size: 8px; font-weight: 700; letter-spacing: .05em; line-height: 1; text-overflow: ellipsis; text-transform: uppercase; }
  .language-control select { width: 100%; }
}

@media (max-width: 640px) {
  .site-header { min-height: 66px; padding: 12px 18px; }
  .brand small, .privacy-note { display: none; }
  .landing { padding: 36px 18px 64px; }
  .hero h1 { font-size: 40px; }
  .hero-copy { font-size: 15px; }
  .feature-strip { grid-template-columns: 1fr 1fr; gap: 6px 12px; }
  .create-card { padding: 25px 18px; }
  .mode-picker, .inline-fields { grid-template-columns: 1fr; }
  .summary-shell { padding: 30px 18px 64px; }
  .summary-hero { display: grid; }
  .summary-home-link { width: max-content; }
  .room-shell { padding: 10px 14px 118px; }
  .room-topbar { align-items: flex-start; }
  .room-title-line h1 { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .room-meta #translationStatus, .room-kicker span:last-child { display: none; }
  .room-meta #audioQualityStatus { display: none; }
  .topbar-actions .secondary-button { padding: 9px 11px; }
  .conversation-column > section, .member-panel { padding: 15px; }
  .meeting-materials { padding: 17px; }
  .materials-heading { display: grid; gap: 15px; }
  .materials-actions { display: grid; justify-content: stretch; }
  .materials-actions button { width: 100%; }
  .participant-stage.duo, .participant-stage { grid-template-columns: 1fr 1fr; min-height: 150px; }
  .participant-card { min-height: 150px; padding: 12px; }
  .avatar { width: 52px; height: 52px; }
  .caption-target { font-size: 17px; }
  .call-controls { bottom: max(10px, env(safe-area-inset-bottom)); }
  .control-button { padding: 8px 9px; }
  .language-select-stack small { max-width: none; }
}

@media (max-width: 420px) {
  .call-controls { gap: 4px; padding: 6px; grid-template-columns: 42px 42px minmax(78px, 1fr) minmax(76px, 1fr) 42px; }
  .control-button { min-width: 42px; justify-content: center; padding: 7px 5px; }
  .control-icon { min-width: 22px; }
  .language-control select { padding-left: 8px; padding-right: 22px; font-size: 11px; }
  #shareButton { width: 64px; padding-inline: 8px; }
  #shareButton .desktop-button-label { display: none; }
  #shareButton .mobile-button-label { display: inline; }
}

/* Viewport meeting workspace */
.room-shell {
  width: min(1600px, 100%);
  height: calc(100dvh - 76px);
  min-height: 560px;
  padding: 12px clamp(16px, 2.2vw, 32px) max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
}
.room-topbar { min-height: 70px; padding: 8px 0 12px; }
.room-topbar, .room-topbar > div:first-child, .room-content, .call-controls { min-width: 0; }
.room-title-line h1 { font-size: clamp(19px, 2vw, 24px); }
.room-meta { margin-top: 5px; gap: 11px; }
.notice, .connection-banner { margin: 0; }
.room-notices { display: grid; gap: 6px; min-height: 0; }
.room-content {
  position: relative;
  min-height: 0;
  padding-top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px);
  gap: 12px;
  overflow: hidden;
}
.conversation-column {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(330px, .82fr);
  gap: 12px;
}
.conversation-column > section, .member-panel {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel-heading { flex: 0 0 auto; margin-bottom: 10px; }
.panel-heading-actions { display: flex; align-items: center; gap: 6px; }
.panel-close-button {
  display: none;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: var(--soft);
  font-size: 20px;
  line-height: 1;
}
.participant-stage {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
}
.participant-stage:not(.duo) > .participant-card:only-child {
  width: min(74%, 620px);
  justify-self: center;
}
.participant-card, .participant-card.has-video {
  min-height: 0;
  padding: 12px;
}
.participant-card.has-video {
  align-content: stretch;
  justify-items: stretch;
}
.participant-card.has-video::after { display: none; }
.participant-card.has-video > strong,
.participant-card.has-video > .participant-state { position: static; }
.participant-card.has-video > .participant-state { display: none; }
.participant-name-tag {
  position: absolute !important;
  z-index: 3 !important;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 58px) !important;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 6px;
  overflow: hidden !important;
  color: white !important;
  background: rgba(5, 19, 31, .72);
  backdrop-filter: blur(8px);
  font-size: 12px;
  line-height: 1.15 !important;
  text-align: left !important;
  text-overflow: ellipsis;
  text-shadow: none !important;
  white-space: nowrap;
}
.participant-role-badge {
  margin-left: 5px;
  color: #bde7df;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.participant-status-badges {
  position: absolute;
  z-index: 3;
  top: 8px;
  right: 8px;
  display: flex;
  gap: 4px;
}
.participant-status-badges span {
  min-width: 27px;
  padding: 5px 6px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 6px;
  color: white;
  background: rgba(5, 19, 31, .68);
  backdrop-filter: blur(8px);
  font-size: 8px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}
.participant-status-badges .warning { color: #ffe2a5; background: rgba(96, 55, 7, .78); }
.participant-card:not(.has-video) .participant-name-tag {
  position: static !important;
  max-width: 100% !important;
  padding: 0;
  border: 0;
  color: var(--ink-strong) !important;
  background: transparent;
  backdrop-filter: none;
  font-size: 13px;
  text-align: center !important;
}
.participant-card:not(.has-video) .participant-role-badge { color: var(--signal); }
.participant-card:not(.has-video) .participant-status-badges { display: none; }
.caption-panel { min-height: 0; }
.caption-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overscroll-behavior: contain;
}
.caption-item { padding: 11px 0 12px 10px; }
.caption-meta { margin-bottom: 4px; }
.caption-original { margin-bottom: 3px; font-size: 12px; line-height: 1.5; }
.caption-target { font-size: clamp(15px, 1.3vw, 18px); line-height: 1.5; }
.caption-original, .caption-target { overflow-wrap: anywhere; }
.empty-state { min-height: 100%; }
.member-panel { height: 100%; }
.member-list { flex: 1 1 auto; min-height: 0; max-height: none; }
.call-controls {
  position: static;
  z-index: 30;
  transform: none;
  justify-self: center;
  max-width: 100%;
  min-height: 62px;
  padding: 7px;
  box-shadow: 0 10px 28px rgba(13, 35, 58, .12);
}
.compact-control { display: none; }
#membersButton { display: inline-flex; }
.room-shell.members-collapsed .room-content { grid-template-columns: minmax(0, 1fr); }
.room-shell.members-collapsed .member-panel { display: none; }
.drawer-backdrop {
  position: fixed;
  z-index: 44;
  inset: 0;
  border: 0;
  background: rgba(7, 24, 40, .4);
}
.language-sheet { width: min(430px, calc(100% - 24px)); }
.language-sheet-status { margin: -5px 0 0; color: var(--signal); font-size: 11px; }

@media (max-width: 1100px) {
  .room-content { grid-template-columns: minmax(0, 1fr); }
  .conversation-column { grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); }
  .member-panel {
    position: fixed;
    z-index: 45;
    top: 76px;
    right: 0;
    bottom: 0;
    width: min(360px, 88vw);
    height: auto;
    border-radius: 12px 0 0 12px;
    box-shadow: -18px 0 45px rgba(7, 24, 40, .18);
    transform: translateX(102%);
    transition: transform .2s ease;
  }
  .room-shell.members-open .member-panel { transform: translateX(0); }
  .room-shell.members-open .drawer-backdrop { display: block !important; }
  .panel-close-button { display: inline-grid; place-items: center; }
  .room-shell.members-collapsed .member-panel { display: flex; }
}

@media (max-width: 700px) {
  .site-header { min-height: 58px; padding: 8px 12px; }
  .brand-mark { width: 39px; height: 36px; }
  .room-shell {
    height: calc(100dvh - 58px);
    min-height: 480px;
    padding: 6px 8px max(6px, env(safe-area-inset-bottom));
    gap: 6px;
  }
  .room-topbar { min-height: 53px; padding: 3px 2px 6px; }
  .room-kicker { display: none; }
  .room-title-line h1 { max-width: 48vw; font-size: 17px; }
  .room-meta { margin-top: 4px; gap: 7px; font-size: 9px; }
  .room-meta #mediaStatus, .room-meta #roomCount { display: inline; }
  .room-meta #translationStatus, .room-meta #audioQualityStatus { display: none; }
  .topbar-actions { gap: 4px; }
  .topbar-actions .secondary-button, .icon-button { min-height: 36px; height: 36px; }
  .conversation-column {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(132px, 40fr) minmax(150px, 60fr);
    gap: 6px;
  }
  .conversation-column > section { padding: 8px; border-radius: 8px; }
  .panel-heading { margin-bottom: 5px; }
  .panel-heading h2 { margin-top: 1px; font-size: 12px; }
  .panel-kicker, .panel-heading > span { display: none; }
  .switch-label { font-size: 9px; }
  .participant-stage { gap: 5px; }
  .participant-stage:not(.duo) > .participant-card:only-child { width: min(78%, 360px); }
  .participant-card, .participant-card.has-video { min-height: 0; padding: 7px; border-radius: 6px; }
  .avatar { width: 42px; height: 42px; font-size: 14px; }
  .participant-card:not(.has-video) .participant-name-tag { font-size: 10px; }
  .participant-card:not(.has-video) .participant-state { font-size: 8px; }
  .participant-name-tag { left: 5px; bottom: 5px; max-width: calc(100% - 42px) !important; padding: 4px 6px; font-size: 10px; }
  .participant-role-badge { font-size: 7px; }
  .participant-status-badges { top: 5px; right: 5px; }
  .participant-status-badges span { min-width: 22px; padding: 4px; font-size: 7px; }
  .caption-item { padding: 8px 0 8px 8px; }
  .caption-meta { font-size: 8px; }
  .caption-original { font-size: 10px; line-height: 1.35; }
  .caption-target { font-size: 14px; line-height: 1.4; }
  .empty-state span { width: 38px; height: 25px; }
  .empty-state p { margin-top: 8px; font-size: 10px; }
  .member-panel { top: 58px; }
  .call-controls {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
    min-height: 54px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 5px;
    border-radius: 8px;
  }
  .call-controls .language-control { display: none; }
  .compact-control, #membersButton { display: inline-flex; }
  .control-button {
    min-width: 0;
    min-height: 42px;
    justify-content: center;
    padding: 5px 3px;
    gap: 2px;
  }
  .control-button > span:last-child { display: block; font-size: 8px; }
  .control-icon { min-width: 20px; font-size: 7px; }
  #raiseHandButton:not(.hidden) ~ #languageSheetButton { display: inline-flex; }
  .toast-region { right: 10px; bottom: calc(64px + env(safe-area-inset-bottom)); left: 10px; }
  .toast { max-width: none; }
  .language-sheet {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    padding: 22px 18px max(20px, env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }
}

@media (max-width: 700px) and (orientation: landscape) {
  .room-shell { min-height: 360px; }
  .room-topbar { min-height: 42px; }
  .room-meta { display: none; }
  .conversation-column {
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, .92fr);
    grid-template-rows: minmax(0, 1fr);
  }
  .call-controls { width: min(620px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
