:root {
  color-scheme: dark;
  --forest: #285337;
  --lime: #b4e33f;
  --ash: #d9d9d9;
  --night: #121613;
  --bg: var(--night);
  --app-header-bg: var(--night);
  --surface: color-mix(in srgb, var(--night), var(--forest) 14%);
  /* night + 6% ash, kept as a literal so sheets and tests read a stable rgb() */
  --surface-raised: #1e221f;
  --surface-hover: color-mix(in srgb, var(--night), var(--forest) 40%);
  --text: var(--ash);
  --muted: color-mix(in srgb, var(--ash), var(--night) 28%);
  --quiet: color-mix(in srgb, var(--ash), var(--night) 42%);
  --line: rgba(217,217,217,.14);
  --accent: var(--lime);
  --accent-ink: var(--night);
  --accent-edge: color-mix(in srgb, var(--lime), var(--night) 35%);
  --carbon: #343434;
  --brand-secondary: color-mix(in srgb, var(--lime), var(--ash) 40%);
  --red: #ff8982;
  --button-radius: 8px;
}

/* Görüşme geri bildirimi: aynı Seslenio renkleri ve yükseltilmiş düğme dili. */
.app-page .participant-pill.is-speaking,
.app-page.is-in-call .participant-pill.is-speaking {
  border-color: rgba(180,227,63,.8);
  background: radial-gradient(ellipse at 50% 0, rgba(180,227,63,.25), transparent 72%), linear-gradient(155deg,var(--surface),var(--surface));
  box-shadow: 0 0 0 2px rgba(180,227,63,.12), 0 0 32px rgba(180,227,63,.18), inset 0 1px 0 rgba(217,217,217,.09);
  color: var(--text);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.app-page .participant-pill.is-speaking .participant-state { color: var(--accent); }
.participant-wave { display: none; }
.participant-pill.is-speaking .participant-wave { position: absolute; top: 16px; right: 16px; display: flex; height: 17px; align-items: center; gap: 2px; }
.participant-wave i { width: 2px; height: 5px; border-radius: 3px; background: var(--accent); animation: participant-wave .7s ease-in-out infinite alternate; }
.participant-wave i:nth-child(2), .participant-wave i:nth-child(4) { animation-delay: .2s; }
.participant-wave i:nth-child(3) { animation-delay: .4s; }
.app-page.is-in-call .participant-pill { position: relative; }
@keyframes participant-wave { to { height: 16px; } }
/* Other people's cards open a local menu; local mute/level state is shown on the card. */
.participant-pill[role="button"] { cursor: pointer; }
.participant-pill[role="button"]:hover { border-color: rgba(217,217,217,.3); }
.participant-pill[role="button"]:focus-visible { outline: 2px solid var(--brand-secondary); outline-offset: 3px; }
.participant-pill.is-locally-muted .user-avatar { opacity: .55; }
.participant-audio-badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 20px; padding: 2px 7px; border: 1px solid rgba(180,227,63,.35); border-radius: 99px; background: rgba(180,227,63,.1); color: var(--lime); font-family: "DM Mono", ui-monospace, monospace; font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap; }
.participant-audio-badge[data-kind="muted"] { border-color: rgba(255,137,130,.45); background: rgba(255,137,130,.14); color: var(--red); }
.participant-audio-icon, .participant-audio-icon svg { display: block; width: 14px; height: 14px; }
.app-page.is-in-call .participant-pill .participant-audio-badge { position: absolute; top: 10px; left: 10px; }
.audio-help-button { width: fit-content; margin: 0 auto 12px; }

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 18% 7%, rgba(180,227,63,.11), transparent 36%),
    radial-gradient(ellipse at 88% 24%, rgba(180,227,63,.09), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
/* Same type as the landing site: headings in bold Space Grotesk with a hair of same-colour stroke. */
h1, h2, h3 { font-weight: 700; -webkit-text-stroke: .02em currentColor; }
input, select { font: inherit; }
select { cursor: pointer; }
a { color: inherit; }
:where(a, input):focus-visible { outline: 2px solid var(--brand-secondary); outline-offset: 3px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.shell { width: min(calc(100% - 56px), 1120px); min-height: 100vh; margin: auto; display: flex; flex-direction: column; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(217,217,217,.07); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 22px; font-weight: 800; letter-spacing: -1px; }
.brand-wordmark { color: var(--text); }
.brand-io { color: var(--brand-secondary); }
.brand-mark { position: relative; display: grid; width: 36px; height: 36px; flex: 0 0 auto; place-items: center; }
.brand-mark-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.brand-mark-bubble { fill: none; stroke: var(--brand-secondary); stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }
.brand-mark-wave { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.user-avatar { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(217,217,217,.35); border-radius: 50%; background: var(--avatar-color, var(--brand-secondary)); color: var(--night); font-family: system-ui, sans-serif; font-size: 17px; line-height: 1; box-shadow: inset 0 1px 0 rgba(217,217,217,.28); }

.eyebrow, .section-overline { display: inline-flex; align-items: center; gap: 9px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; }
.live-dot, .status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px rgba(180,227,63,.6); }
h1 { margin: 19px 0 13px; font-size: clamp(48px, 7vw, 73px); line-height: .99; letter-spacing: -5px; }

.card:where(:not(.uses-bottom-sheet .card)) { border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, rgba(18,22,19,.96), rgba(18,22,19,.98)); box-shadow: 0 20px 65px rgba(0,0,0,.2); }
.profile-dialog:not(.uses-bottom-sheet) { width: min(calc(100% - 32px), 470px); max-width: none; max-height: calc(100% - 32px); padding: 0; overflow: visible; border: 0; background: transparent; color: var(--text); }
.profile-dialog:not(.uses-bottom-sheet)::backdrop { background: rgba(18,22,19,.78); backdrop-filter: blur(9px); }
.app-page .profile-dialog:not(.uses-bottom-sheet) { max-height: calc(100dvh - 32px); overflow-y: auto; border-radius: 20px; }
dialog:not(.uses-bottom-sheet) .identity-card { position: relative; display: grid; gap: 20px; padding: 32px; border-radius: 24px; background: radial-gradient(ellipse at 14% 5%, rgba(180,227,63,.12), transparent 44%), linear-gradient(145deg, rgba(18,22,19,.99), rgba(18,22,19,.99)); box-shadow: 0 28px 90px rgba(0,0,0,.48), 0 0 0 1px rgba(217,217,217,.025); }
.dialog-close-button { position: absolute; top: 18px; right: 18px; }
.dialog-close-button[hidden] { display: none; }
.identity-copy h2 { max-width: 360px; margin: 8px 0; font-size: clamp(22px, 5vw, 27px); letter-spacing: -.8px; line-height: 1.15; }
.identity-copy p { max-width: 355px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.profile-form { display: grid; gap: 8px; }
.profile-form > label { color: var(--text); font-size: 12px; font-weight: 700; }
input[type="text"], select { min-width: 0; height: 46px; padding: 0 13px; outline: none; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); color: var(--text); transition: border-color .15s, background .15s; }
input[type="text"]:focus, select:focus { border-color: rgba(180,227,63,.66); background: var(--surface); }
.app-page :is(input, select, textarea):focus-visible { outline: 2px solid var(--brand-secondary); outline-offset: 3px; }
input[type="text"]::placeholder { color: var(--quiet); }
.profile-form input { width: 100%; }
.profile-form .button { width: 100%; }
.form-error { min-height: 16px; margin: 0; color: var(--red); font-size: 12px; }
.profile-form .profile-error { min-height: 0; margin: -2px 0 0; }
body:has(.profile-dialog[open]), body:has(.create-room-dialog[open]), body:has(.switch-room-dialog[open]) { overflow: hidden; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-heading h2 { margin: 6px 0 4px; font-size: 25px; letter-spacing: -.8px; }
.rooms-title-row { display: flex; align-items: center; gap: 10px; }
.rooms-title-row h2 { margin: 0; }
.room-heading-actions { display: flex; align-items: center; gap: 8px; }
.room-count { display: inline-flex; align-items: center; min-height: 27px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--text); font-size: 11px; }
.create-room-dialog:not(.uses-bottom-sheet) { width: min(calc(100% - 32px), 490px); max-width: none; max-height: calc(100% - 32px); padding: 0; overflow: auto; border: 0; background: transparent; color: var(--text); }
.create-room-dialog:not(.uses-bottom-sheet)::backdrop { background: rgba(18,22,19,.78); backdrop-filter: blur(9px); }
dialog:not(.uses-bottom-sheet) .create-room-modal { position: relative; display: grid; gap: 22px; padding: 30px; border-radius: 24px; background: radial-gradient(ellipse at 14% 5%, rgba(180,227,63,.12), transparent 44%), linear-gradient(145deg, rgba(18,22,19,.99), rgba(18,22,19,.99)); box-shadow: 0 28px 90px rgba(0,0,0,.48), 0 0 0 1px rgba(217,217,217,.025); }
.create-room-modal-heading { display: grid; gap: 8px; padding-right: 25px; }
.create-room-modal-copy { display: grid; gap: 6px; padding-top: 2px; }
.create-room-modal-copy h2 { margin: 0; font-size: 23px; letter-spacing: -.6px; }
.create-room-modal-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.create-room-form { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.create-room-form > label, .create-room-field-label { color: var(--text); font-size: 12px; font-weight: 700; }
.create-room-form > input { width: 100%; }
.create-room-error { min-height: 16px; margin: -2px 0 0; }
.create-room-form .button { width: 100%; }
.directory-error { min-height: 18px; padding: 4px 2px 0; }
.room-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.room-tile { --tile-accent: var(--brand-secondary); --tile-tint: rgba(180,227,63,.08); --tile-line: rgba(180,227,63,.22); --tile-glow: rgba(180,227,63,.1); position: relative; display: grid; min-height: 112px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; overflow: hidden; padding: 18px 22px; border: 1px solid rgba(180,227,63,.16); border-radius: 18px; background: linear-gradient(125deg, rgba(40,83,55,.96), rgba(18,22,19,.98)); text-decoration: none; transition: border-color .18s, transform .18s, background .18s; }
.room-tile::before { position: absolute; inset: 16px auto 16px 0; width: 3px; border-radius: 0 4px 4px 0; background: var(--tile-accent); box-shadow: 0 0 16px var(--tile-glow); content: ""; }
.room-tile::after { position: absolute; top: -48px; right: -38px; width: 128px; height: 128px; border-radius: 50%; background: var(--tile-glow); filter: blur(4px); content: ""; transition: background .18s; }
.room-tile:hover { border-color: var(--tile-line); transform: translateY(-2px); }
.room-tile:hover::after { background: var(--tile-tint); }
.tile-copy, .tile-aside { position: relative; z-index: 1; }
.tile-copy { display: grid; min-width: 0; gap: 8px; }
.tile-aside { display: grid; justify-items: end; gap: 9px; }
.room-tile .online-badge { display: flex; align-items: baseline; gap: 3px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.online-count { font-size: 25px; font-weight: 800; letter-spacing: -.8px; line-height: 1; }
.online-capacity { color: var(--text); font-size: 14px; font-weight: 650; }
.online-unit { padding-left: 3px; color: var(--muted); font-size: 10px; }
.room-tile h3 { overflow: hidden; margin: 0; font-size: 19px; letter-spacing: -.45px; text-overflow: ellipsis; white-space: nowrap; }
.room-tile p { margin: 0; color: var(--muted); font-size: 12px; }
.empty-state { display: grid; min-height: 210px; justify-items: center; align-content: center; gap: 10px; border-style: dashed; background: rgba(18,22,19,.56); box-shadow: none; text-align: center; }
.empty-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; background: rgba(180,227,63,.09); color: var(--accent); font-size: 25px; }
.empty-state strong { font-size: 18px; }
.empty-state span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.empty-state .button { margin-top: 6px; }

.room-view { width: min(100%, 790px); margin: auto; padding: 38px 0 55px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; padding: 7px 0; border: 0; background: transparent; color: var(--text); font-size: 12px; font-weight: 700; }
.back-link:hover { color: var(--accent); }
.back-link span { color: var(--accent); font-size: 16px; }
.room-view-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 27px 0 21px; }
.room-view-heading h1 { margin: 8px 0 8px; font-size: clamp(38px, 6vw, 55px); letter-spacing: -2.8px; overflow-wrap: anywhere; }
.room-view-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.room-detail-card { padding: 24px; }
.room-detail-main { display: flex; align-items: center; gap: 16px; }
.room-detail-icon { display: grid; width: 58px; height: 58px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(180,227,63,.23); border-radius: 19px; background: linear-gradient(145deg, rgba(180,227,63,.18), rgba(180,227,63,.1)); color: var(--accent); font-size: 28px; }
.room-presence { font-size: 14px; font-weight: 750; }
.room-description { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.room-stats { display: flex; align-items: center; gap: 27px; margin: 25px 0 22px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat-block { display: grid; gap: 4px; }
.stat-block strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.stat-block span { color: var(--muted); font-size: 11px; }
.stat-divider { width: 1px; height: 35px; background: var(--line); }
.room-invite-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 0 21px; }
.invite-copy { min-width: 0; display: grid; gap: 6px; }
.invite-copy a { overflow: hidden; color: var(--accent); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.copy-button { flex: 0 0 auto; }
.room-detail-card > .form-error { padding-top: 9px; }

.call-card { width: min(100%, 790px); margin: auto; padding: 25px; }
.call-heading { display: flex; align-items: center; gap: 13px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.call-avatar { display: grid; width: 48px; height: 48px; flex: 0 0 auto; place-items: center; border-radius: 16px; background: rgba(180,227,63,.12); color: var(--accent); font-size: 23px; }
.call-heading-copy { min-width: 0; }
.call-room { overflow: hidden; margin-bottom: 5px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.call-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.call-status.connected { color: var(--accent); }
.call-status.connected .status-dot { animation: pulse 1.5s infinite; }
.call-heading-actions { display: flex; align-items: center; gap: 17px; margin-left: auto; }
.connection-ping { position: relative; flex: 0 0 auto; }
.connection-ping > summary::-webkit-details-marker { display: none; }
.ping-icon { display: inline-flex; width: 15px; height: 15px; align-items: center; justify-content: center; }
.ping-icon svg { width: 15px; height: 15px; }
.connection-metrics-popover:not(.sheet-metrics-content) { position: absolute; z-index: 20; top: calc(100% + 9px); right: 0; display: none; width: min(390px, calc(100vw - 40px)); padding: 15px 16px 12px; border: 1px solid rgba(180,227,63,.24); border-radius: 15px; background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,.48); color: var(--text); }
.connection-ping[open] .connection-metrics-popover:not(.sheet-metrics-content) { display: block; }
.connection-metrics-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.connection-metrics-heading h2 { margin: 0; font-size: 12px; }
.connection-metrics-heading span { color: var(--quiet); font-size: 10px; }
.connection-metrics-popover > p { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid var(--line); color: var(--quiet); font-size: 10px; line-height: 1.5; }
.call-invite-row { margin-top: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.participant-section { padding: 20px 0 22px; }
.participant-list { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; }
.participant-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 99px; background: rgba(18,22,19,.5); color: var(--text); font-size: 11px; }
.participant-pill .user-avatar { width: 23px; height: 23px; font-size: 13px; }
.app-page .participant-pill .participant-state { padding-left: 8px; border-left: 1px solid rgba(217,217,217,.1); }
.remote-audios { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@keyframes pulse { 50% { opacity: .4; box-shadow: 0 0 3px rgba(180,227,63,.3); } }
.control-row { display: flex; align-items: center; justify-content: space-between; gap: 11px; padding-top: 20px; border-top: 1px solid var(--line); }
.toggle { position: relative; width: 31px; height: 18px; border-radius: 10px; background: var(--line); transition: background .2s; }
.toggle::after { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: white; content: ""; transition: transform .2s; }
.audio-note { margin: 13px 0 0; color: var(--quiet); font-size: 10px; line-height: 1.5; }
.call-report-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 13px; }
.call-report-row .audio-note { flex: 1; margin: 0; }

.footer { display: flex; justify-content: space-between; gap: 15px; margin-top: auto; padding: 18px 0 22px; border-top: 1px solid rgba(217,217,217,.07); color: var(--quiet); font-size: 10px; }
.footer > span:first-child { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 700; }
.footer-mark { width: 18px; height: 18px; }

@media (max-width: 620px) {
  .shell { width: min(calc(100% - 32px), 480px); }
  .topbar { height: 70px; }
  .user-avatar { width: 27px; height: 27px; }
  h1 { margin: 17px 0 12px; font-size: clamp(48px, 14vw, 64px); letter-spacing: -3.8px; }
  dialog:not(.uses-bottom-sheet) .identity-card { gap: 17px; padding: 25px 21px 21px; border-radius: 20px; }
  .profile-form .button { width: 100%; }
  .section-heading { align-items: center; flex-wrap: wrap; }
  .section-heading h2 { font-size: 22px; }
  .room-heading-actions { flex-direction: row; align-items: center; gap: 8px; margin-left: auto; }
  .room-grid { grid-template-columns: 1fr; gap: 10px; }
  .room-tile { min-height: 108px; gap: 12px; padding: 15px 16px; }
  .online-count { font-size: 23px; }
  .room-view { padding: 24px 0 40px; }
  .room-view-heading { align-items: start; margin: 23px 0 17px; }
  .room-view-heading h1 { font-size: 41px; letter-spacing: -2.4px; }
  .room-detail-card, .call-card { padding: 18px; border-radius: 17px; }
  .room-detail-main { align-items: flex-start; gap: 12px; }
  .room-detail-icon { width: 48px; height: 48px; border-radius: 15px; font-size: 23px; }
  .room-stats { gap: 19px; }
  .room-invite-row { gap: 8px; }
  .invite-copy a { max-width: 230px; font-size: 11px; }
  .call-heading { flex-wrap: wrap; gap: 10px; }
  .call-heading-actions { width: 100%; justify-content: space-between; margin-left: 58px; }
  .connection-metrics-popover:not(.sheet-metrics-content) { left: 50%; right: auto; width: min(390px, calc(100vw - 48px)); transform: translateX(-50%); }
  .control-row { flex-wrap: wrap; justify-content: center; }
  .call-report-row { align-items: stretch; flex-direction: column; }
  .diagnostics-copy-button { width: 100%; }
  .footer { flex-direction: column; gap: 8px; font-size: 9px; }
}

@media (max-width: 420px) {
}

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

.landing-shell { width: min(calc(100% - 72px), 1160px); }
.landing-topbar { flex: 0 0 auto; }
.landing-topbar-cta { min-height: 40px; padding: 0 16px; border-radius: var(--button-radius); font-size: 13px; text-decoration: none; }
.landing-hero { display: grid; flex: 1; min-height: 510px; align-items: center; justify-items: center; }
.landing-copy { max-width: 590px; padding: 60px 0 68px; text-align: center; }
.landing-badge { gap: 8px; padding: 8px 12px; border: 1px solid rgba(180,227,63,.24); border-radius: 999px; background: rgba(180,227,63,.08); box-shadow: inset 0 1px 0 rgba(217,217,217,.06); }
.landing-copy h1 { margin: 21px 0 18px; font-size: clamp(56px, 7.3vw, 86px); letter-spacing: -6.3px; }
.landing-copy h1 > span { color: var(--text); }
.landing-title-highlight { position: relative; isolation: isolate; display: inline-block; white-space: nowrap; }
.landing-title-highlight-text { position: relative; z-index: 1; color: var(--accent); }
.landing-title-highlight::after { position: absolute; z-index: 0; right: -.04em; bottom: .06em; left: -.04em; height: .25em; border-radius: 0; background: var(--brand-secondary); content: ""; opacity: .82; transform: rotate(-1.2deg); }
.landing-intro { max-width: 460px; margin: 0 auto; color: var(--muted); font-size: 17px; line-height: 1.72; }
.landing-cta { min-height: 54px; margin-top: 29px; padding: 0 23px; border-radius: var(--button-radius); font-size: 14px; text-decoration: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition-duration: .07s; }
.landing-cta:focus-visible { outline: 2px solid var(--brand-secondary); outline-offset: 3px; }
.landing-cta:active { transform: translateY(1px) scale(.99); filter: brightness(.9); box-shadow: inset 0 2px 5px rgba(35,51,17,.24), 0 1px 0 var(--accent-edge); }
.landing-details { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(217,217,217,.08); }
.landing-detail { display: flex; gap: 18px; padding: 30px 24px 32px 0; }
.landing-detail + .landing-detail { padding-left: 26px; border-left: 1px solid rgba(217,217,217,.08); }
.landing-detail-icon { display: grid; width: 58px; height: 58px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 0; background: transparent; font-size: 38px; }
.landing-detail:nth-child(1) .landing-detail-icon { color: var(--brand-secondary); }
.landing-detail:nth-child(2) .landing-detail-icon { color: var(--accent); }
.landing-detail:nth-child(3) .landing-detail-icon { color: var(--lime); }
.landing-detail h2 { margin: 1px 0 6px; font-size: 18px; letter-spacing: -.25px; }
.landing-detail p { max-width: 330px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.7; }
.landing-footer { margin-top: 0; padding: 22px 0 26px; color: var(--muted); font-size: 15px; line-height: 1.45; }
.landing-footer > span:first-child { font-size: 15px; }
.landing-footer .footer-mark { width: 28px; height: 28px; }

/* App workspace */
.app-page,
.app-page * {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.app-page {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  background: var(--app-header-bg);
}
.app-page .app-shell {
  display: grid;
  width: min(100%, 1760px);
  height: min(100%, 980px);
  min-height: 0;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(217,217,217,.09);
  border-radius: 12px;
  background: var(--bg);
  box-shadow: 0 18px 64px rgba(0,0,0,.28);
}
.channel-sidebar {
  display: flex;
  grid-column: 1;
  grid-row: 1 / 3;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 18px 12px 12px;
  border-right: 1px solid rgba(217,217,217,.07);
  background: var(--surface);
}
.channel-sidebar-header { display: grid; gap: 15px; padding: 1px 4px 12px; }
.channel-sidebar-title { display: flex; align-items: center; gap: 9px; }
.channel-sidebar-title h1 { margin: 0; color: var(--text); font-size: 24px; font-weight: 700; letter-spacing: -.45px; line-height: 1.2; }
.room-count { min-height: 21px; padding: 0 7px; border-color: rgba(217,217,217,.1); border-radius: 5px; background: rgba(217,217,217,.035); color: var(--muted); font-size: 10px; }
.channel-sidebar-actions { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 7px; }
.channel-sidebar-actions .create-room-open-button { width: 100%; min-width: 0; }
.directory-error { min-height: 0; padding: 0 6px; }
.channel-list { display: grid; min-height: 0; align-content: start; gap: 3px; overflow-x: hidden; overflow-y: auto; padding: 1px 0 8px; }
/* Channel cards match the mobile list: round badge, name + detail, 2×4 occupancy grid, chevron. */
.app-page .room-tile {
  display: grid;
  min-width: 0;
  min-height: 58px;
  grid-template-columns: 36px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 11px;
  overflow: hidden;
  border: 1px solid rgba(217,217,217,.1);
  border-radius: 16px;
  background: rgba(217,217,217,.05);
  color: var(--text);
  text-decoration: none;
  transition: background .14s, border-color .14s;
}
.app-page .room-tile:hover { background: rgba(217,217,217,.1); color: var(--text); transform: none; }
.app-page .room-tile.is-active,
.app-page .room-tile.is-connected { border-color: rgba(180,227,63,.55); background: rgba(40,83,55,.35); color: var(--text); transform: none; }
.channel-tile-icon { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: var(--carbon); color: var(--ash); }
.channel-tile-icon svg { width: 18px; height: 18px; stroke-width: 2; }
.app-page .room-tile.is-live .channel-tile-icon { background: var(--forest); color: var(--lime); }
.channel-tile-copy { display: grid; min-width: 0; gap: 1px; overflow: hidden; }
.channel-tile-name { display: block; overflow: hidden; color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.channel-tile-detail { display: block; overflow: hidden; color: var(--muted); font-size: 11.5px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.channel-tile-occupancy { display: grid; grid-template-columns: repeat(4, 7px); grid-auto-rows: 7px; gap: 3px; }
.channel-tile-occupancy > span { border-radius: 2px; background: rgba(217,217,217,.14); }
.channel-tile-occupancy > .is-filled { background: var(--lime); }
.channel-tile-chevron { display: grid; place-items: center; color: var(--quiet); }
.channel-tile-chevron svg { width: 14px; height: 14px; stroke-width: 2.2; }
.channel-empty { min-height: 0; justify-items: start; align-content: start; gap: 4px; padding: 8px 7px; border: 0; background: transparent; color: var(--muted); text-align: left; }
.channel-empty strong { font-size: 12px; font-weight: 600; }
.channel-empty span { font-size: 11px; }
.sidebar-profile { display: flex; grid-column: 1; grid-row: 2; min-width: 0; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 10px; border-top: 1px solid rgba(217,217,217,.07); border-right: 1px solid rgba(217,217,217,.07); background: var(--surface); }
.sidebar-profile-row { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 6px; }
.participant-state { color: var(--muted); font-size: 10px; font-weight: 500; white-space: nowrap; }
.participant-capture { color: var(--brand-secondary); font-size: 11px; font-weight: 400; white-space: nowrap; }
.participant-state[data-state="connected"] { color: var(--accent); }
.participant-state[data-state="connecting"] { color: var(--lime); }
.participant-state[data-state="unreachable"] { color: #ffaaa4; }
.app-page .app-profile-button { position: static; flex: 1 1 auto; width: 100%; min-width: 0; }
.app-page .app-profile-button > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.app-page:not(.app-ready) .app-profile-button { visibility: hidden; }
.workspace { position: relative; display: flex; grid-column: 2; grid-row: 1 / 3; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg); }
.workspace-empty { display: grid; flex: 1; align-content: center; justify-items: center; gap: 10px; padding: 24px; color: var(--muted); text-align: center; }
.workspace-empty-mark { display: grid; width: 54px; height: 54px; place-items: center; margin-bottom: 4px; border: 1px solid rgba(217,217,217,.09); border-radius: 12px; background: var(--surface-raised); color: var(--muted); }
.workspace-empty-mark svg { width: 25px; height: 25px; }
.workspace-empty strong { color: var(--text); font-size: 17px; font-weight: 600; }
.workspace-empty > span { max-width: 320px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.app-page .room-view {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 1060px;
  min-height: 100%;
  flex: 1;
  flex-direction: column;
  gap: 18px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 52px) 32px;
}
.app-page .room-view.hidden { display: none !important; }
.room-view-heading { min-height: 50px; align-items: center; gap: 14px; margin: 0; padding-bottom: 15px; border-bottom: 1px solid rgba(217,217,217,.07); }
.room-heading-main { display: flex; min-width: 0; align-items: center; gap: 12px; }
.room-title-copy { min-width: 0; }
.room-title-copy h1 { max-width: min(60vw, 720px); overflow: hidden; margin: 0; color: var(--text); font-size: clamp(20px, 2.3vw, 27px); font-weight: 650; letter-spacing: -.55px; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.room-title-copy p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.connection-metrics-popover .diagnostics-copy-button { width: 100%; margin-top: 12px; }
.room-error { min-height: 0; }
.room-detail-card {
  display: flex;
  min-height: 250px;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}
.room-detail-main { display: grid; justify-items: center; gap: 8px; }
.room-detail-main .room-presence { color: var(--text); font-size: 14px; }
.room-detail-main .room-description { margin: 0; color: var(--quiet); font-size: 12px; }
.app-page .call-card {
  width: min(100%, 790px);
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.app-page .call-card.hidden { display: none !important; }
.call-heading { gap: 12px; padding: 0 0 15px; border-bottom: 1px solid rgba(217,217,217,.07); }
.call-avatar { width: 38px; height: 38px; border: 1px solid rgba(217,217,217,.08); border-radius: 8px; background: var(--surface-raised); color: var(--muted); }
.call-avatar svg { width: 19px; height: 19px; }
.call-room { color: var(--text); font-size: 13px; }
.call-status { font-size: 11px; }
.participant-section { padding: 19px 0 22px; }
.participant-section > .section-overline { color: var(--quiet); font-size: 9px; letter-spacing: 1.1px; }
.participant-list { gap: 7px; padding-top: 11px; }
.participant-pill { border-color: rgba(217,217,217,.09); border-radius: 6px; background: var(--surface); color: var(--text); }
.connection-metrics-popover:not(.sheet-metrics-content) { border-color: rgba(217,217,217,.12); border-radius: 8px; background: var(--surface-raised); }
.call-controls { display: flex; min-width: 0; flex: 0 0 auto; flex-direction: row; align-items: center; justify-content: flex-end; gap: 4px; padding: 0; border: 0; background: transparent; }
.call-controls .hidden { display: none !important; }
.app-page .profile-dialog:not(.uses-bottom-sheet),
.app-page .create-room-dialog:not(.uses-bottom-sheet),
.app-page .switch-room-dialog:not(.uses-bottom-sheet) { z-index: 20; }
.app-page .switch-room-dialog:not(.uses-bottom-sheet) { width: min(calc(100% - 32px), 470px); max-width: none; max-height: calc(100% - 32px); margin: auto; padding: 0; overflow: visible; border: 0; background: transparent; color: var(--text); }
.app-page .switch-room-dialog:not(.uses-bottom-sheet)::backdrop { background: rgba(18,22,19,.78); backdrop-filter: blur(9px); }
.app-page dialog:not(.uses-bottom-sheet) .switch-room-sheet { position: relative; display: grid; gap: 22px; padding: 30px; border-radius: 20px; background: radial-gradient(ellipse at 14% 5%, rgba(180,227,63,.1), transparent 44%), linear-gradient(145deg, var(--surface), var(--surface)); }
.app-page .switch-room-copy { display: grid; gap: 9px; padding-right: 8px; }
.app-page .switch-room-copy .section-overline { color: var(--muted); }
.app-page .switch-room-copy h2 { margin: 0; font-size: 22px; letter-spacing: -.5px; }
.app-page .switch-room-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.app-page .switch-room-copy strong { color: var(--text); }
.app-page .switch-room-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.app-page dialog:not(.uses-bottom-sheet) .identity-card { background: var(--surface-raised); }
.app-page .identity-copy { display: grid; gap: 6px; padding: 0 25px 0 0; }
.app-page .identity-copy .section-overline { color: var(--muted); }
.app-page .identity-copy h2 { margin: 0; font-size: 23px; letter-spacing: -.6px; }
.app-page .identity-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.app-page .profile-form { gap: 9px; }
.app-page .profile-form > label { color: var(--text); }
.app-page .profile-form .button { width: 100%; }
.app-page .profile-form .profile-error { min-height: 0; margin: -2px 0 0; }
.app-page dialog:not(.uses-bottom-sheet) .create-room-modal { background: var(--surface-raised); }
.app-page .create-room-modal-copy { padding: 0 25px 0 0; }
.app-page .create-room-modal-copy .section-overline { color: var(--muted); }
.app-page .create-room-form { gap: 9px; }
.app-page .create-room-form > label { color: var(--text); }
.app-page .create-room-form .button { width: 100%; }
.app-page .room-tile:focus-visible { outline-color: var(--text); }

@media (max-width: 1100px) {
  .app-page { padding: 0; }
  .app-page .app-shell {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-height: 700px) {
  .app-page { padding-block: 0; }
  .app-page .app-shell { height: 100%; border-top: 0; border-bottom: 0; border-radius: 0; }
}

@media (max-width: 760px) {
  .app-page { padding: 0; }
  .app-page .app-shell {
    width: 100%;
    height: 100%;
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .channel-sidebar { padding: 13px 9px 10px; }
  .app-page .room-view { padding: 18px 20px 24px; }
}

@media (max-width: 560px) {
  .app-page .app-shell { grid-template-columns: minmax(142px, 42vw) minmax(0, 1fr); }
  .channel-sidebar { padding: 12px 7px 9px; }
  .channel-sidebar-header { gap: 11px; padding-inline: 2px; }
  .channel-sidebar-title { gap: 6px; }
  .channel-sidebar-title h1 { font-size: 18px; }
  .channel-sidebar-actions { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .app-page .room-tile { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 7px; padding: 8px 7px; }
  .app-page .room-tile .channel-tile-chevron { display: none; }
  .channel-tile-icon { width: 28px; height: 28px; }
  .channel-tile-icon svg { width: 15px; height: 15px; }
  .channel-tile-name { font-size: 12px; }
  .channel-tile-detail { font-size: 10px; }
  .channel-tile-occupancy { grid-template-columns: repeat(4, 5px); grid-auto-rows: 5px; gap: 2px; }
  .app-page .room-view { padding: 15px 13px 20px; }
  .sidebar-profile { gap: 3px; padding: 9px 4px 8px; }
  .call-controls { gap: 2px; }
  .room-view-heading { align-items: center; gap: 7px; padding-bottom: 12px; }
  .room-heading-main { gap: 7px; }
  .room-title-copy h1 { max-width: 40vw; font-size: 18px; }
  .room-title-copy p { font-size: 9px; }
  .room-detail-card { min-height: 200px; padding: 18px 8px; }
}

@media (max-width: 760px) {
  .app-page .app-shell {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  .app-page .channel-sidebar {
    grid-column: 1;
    grid-row: 1;
    max-height: min(32dvh, 260px);
    padding: 12px 14px 10px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid rgba(217,217,217,.08);
  }
  .app-page .channel-sidebar-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 0 0 8px;
  }
  .app-page .channel-sidebar-title { min-width: min(100%, 170px); flex: 1 1 170px; gap: 7px; }
  .app-page .channel-sidebar-title h1 { font-size: 18px; }
  .app-page .channel-sidebar-actions { display: flex; flex: 0 0 auto; gap: 6px; }
  .app-page .channel-sidebar-actions .create-room-open-button { width: auto; }
  .app-page .channel-list { max-height: min(18dvh, 150px); flex: 1 1 auto; }
  .app-page #rooms-list:empty { flex: 0 0 auto; }
  .app-page .channel-empty { padding: 6px 0; }
  .app-page .workspace { grid-column: 1; grid-row: 2; }
  .app-page .room-view { padding: 18px 20px calc(82px + env(safe-area-inset-bottom)); }
  .app-page .sidebar-profile {
    position: fixed;
    z-index: 10;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 0;
    align-items: stretch;
    justify-content: flex-start;
    gap: 6px;
    padding: 9px max(12px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    border-top: 1px solid rgba(217,217,217,.1);
    border-right: 0;
    background: var(--app-header-bg);
    box-shadow: 0 -12px 35px rgba(0,0,0,.24);
    backdrop-filter: blur(14px);
  }
  .app-page .app-profile-button { width: auto; max-width: 116px; flex: 0 1 auto; }
  .app-page .sidebar-profile-row { justify-content: space-between; gap: 8px; }
  .app-page .call-controls { min-width: 0; flex: 0 0 auto; gap: 5px; }

  .app-page.is-in-call .app-shell { grid-template-rows: minmax(0, 1fr); }
  .app-page.is-in-call .channel-sidebar { display: none; }
  .app-page.is-in-call .workspace { grid-column: 1; grid-row: 1; }
  .app-page.is-in-call .room-view { padding: 15px 17px calc(82px + env(safe-area-inset-bottom)); }
  .app-page.is-in-call .room-view-heading { flex: 0 0 auto; }
  .app-page.is-in-call .room-title-copy h1 { max-width: 100%; }
  .app-page.is-in-call .call-card {
    display: flex;
    width: 100%;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    padding: 8px 0;
  }
  .app-page.is-in-call .call-heading {
    align-self: center;
    justify-content: center;
    padding: 0;
    border: 0;
  }
  .app-page.is-in-call .call-avatar { display: none; }
  .app-page.is-in-call .call-status {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    border: 1px solid rgba(180,227,63,.13);
    border-radius: 99px;
    background: rgba(180,227,63,.045);
    color: var(--muted);
    font-size: 11px;
  }
  .app-page.is-in-call .participant-section {
    display: flex;
    width: 100%;
    flex: 0 1 auto;
    flex-direction: column;
    align-items: center;
    padding: 22px 0 0;
  }
  .app-page.is-in-call .participant-section > .section-overline { color: var(--muted); }
  .app-page.is-in-call .participant-list {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 220px));
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    padding-top: 14px;
  }
  .app-page.is-in-call .participant-pill {
    display: flex;
    min-width: 0;
    min-height: 178px;
    flex-direction: column;
    justify-content: center;
    gap: 16px;
    padding: 17px 12px;
    border: 1px solid rgba(217,217,217,.13);
    border-radius: 16px;
    background: radial-gradient(ellipse at 50% 0, rgba(180,227,63,.09), transparent 68%), linear-gradient(155deg, var(--surface), var(--surface));
    box-shadow: inset 0 1px 0 rgba(217,217,217,.045), 0 12px 28px rgba(0,0,0,.16);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
  }
  .app-page.is-in-call .participant-pill .participant-state { padding: 0; border: 0; }
  .app-page.is-in-call .participant-pill .user-avatar {
    width: 68px;
    height: 68px;
    border: 2px solid rgba(217,217,217,.28);
    font-size: 34px;
    box-shadow: inset 0 2px 5px rgba(217,217,217,.2), 0 7px 20px rgba(0,0,0,.28);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-page *, .app-page *::before, .app-page *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 760px) {
  .landing-shell { width: min(calc(100% - 42px), 560px); }
  .landing-hero { min-height: 0; }
  .landing-copy { padding: 57px 0 37px; }
  .landing-copy h1 { font-size: clamp(54px, 12vw, 76px); letter-spacing: -5px; }
  .landing-intro { max-width: 430px; font-size: 15px; }
  .landing-details { grid-template-columns: 1fr; }
  .landing-detail { padding: 22px 0; }
  .landing-detail + .landing-detail { padding-left: 0; border-left: 0; border-top: 1px solid rgba(217,217,217,.07); }
  .landing-detail p { max-width: 410px; }
  .landing-footer { padding: 18px 0 22px; font-size: 14px; }
  .landing-footer > span:first-child { font-size: 14px; }
  .landing-footer .footer-mark { width: 25px; height: 25px; }
}

@media (max-width: 420px) {
  .landing-shell { width: min(calc(100% - 32px), 390px); }
  .landing-copy { padding-top: 45px; }
  .landing-copy h1 { font-size: clamp(48px, 13.4vw, 60px); letter-spacing: -3.8px; }
  .landing-intro { max-width: 330px; font-size: 13px; }
  .landing-cta { width: 100%; }
}

.app-page { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
.app-shell { min-height: 100vh; min-height: 100dvh; }
.app-page .topbar { flex: 0 0 auto; }
.app-page:not(.app-ready) .topbar-user { visibility: hidden; }

@media (max-width: 620px) {
  .topbar-user > span:last-child { max-width: 125px; overflow: hidden; text-overflow: ellipsis; }
  .app-page .shell { width: min(calc(100% - 32px), 480px); }
  .app-page .footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

@media (hover: none) and (pointer: coarse) {
  body, body * { -webkit-tap-highlight-color: transparent; }
  .app-page, .app-page .app-shell { min-height: 100vh; min-height: 100svh; }
}

@media (max-width: 620px) {
  .profile-dialog:not(.uses-bottom-sheet),
  .create-room-dialog:not(.uses-bottom-sheet),
  .app-page .switch-room-dialog:not(.uses-bottom-sheet) {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 88vh;
    max-height: min(88dvh, 620px);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 22px 22px 0 0;
  }
  dialog:not(.uses-bottom-sheet) .identity-card,
  dialog:not(.uses-bottom-sheet) .create-room-modal,
  .app-page dialog:not(.uses-bottom-sheet) .switch-room-sheet {
    gap: 18px;
    padding: 34px 22px max(24px, calc(env(safe-area-inset-bottom) + 16px));
    border-radius: 22px 22px 0 0;
  }
  dialog:not(.uses-bottom-sheet) .identity-card::before,
  dialog:not(.uses-bottom-sheet) .create-room-modal::before,
  .app-page dialog:not(.uses-bottom-sheet) .switch-room-sheet::before {
    position: absolute;
    top: 11px;
    left: calc(50% - 20px);
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: rgba(217,217,217,.3);
    content: "";
  }
  .identity-card .dialog-close-button,
  .create-room-modal .dialog-close-button { top: 14px; right: 15px; }
  .app-page dialog:not(.uses-bottom-sheet) .switch-room-sheet { gap: 18px; padding: 34px 22px max(24px, calc(env(safe-area-inset-bottom) + 16px)); }
  .app-page .switch-room-copy { padding-right: 0; }
  .app-page .switch-room-actions { grid-template-columns: 1fr; }
}

/* Mobile channel directory */
.app-page .channel-home-link { color: inherit; text-decoration: none; }
.app-page .channel-home-link:hover h1 { color: var(--text); }
.app-page .room-tile::before,
.app-page .room-tile::after { content: none; }
.app-page .lobby-view,
.app-page .lobby-view.hidden { display: none !important; }
.room-join-actions > .app-button { width: 100%; }
.room-join-actions { display: grid; width: min(100%, 230px); gap: 9px; }

@media (max-width: 760px) {
  .app-page .app-shell { grid-template-rows: auto minmax(0, 1fr); }
  .app-page .channel-sidebar {
    max-height: none;
    padding: 0 14px;
    overflow: hidden;
    border: 0;
    background: var(--app-header-bg);
  }
  .app-page .channel-sidebar-header {
    --header-inset: 14px;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .app-page .channel-sidebar-title { min-width: 0; flex: 0 1 auto; gap: 6px; }
  .app-page .channel-sidebar-title h1 { font-size: 18px; }
  .app-page .channel-sidebar-actions { flex: 0 0 auto; }
  .app-page .channel-sidebar-actions .create-room-open-button { width: auto; }
  .app-page #rooms-list,
  .app-page #rooms-empty { display: none !important; }
  .app-page .directory-error { padding: 0; }
  .app-page .workspace { grid-column: 1; grid-row: 2; overflow: hidden; }
  .app-page .lobby-view:not(.hidden) {
    display: flex !important;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 12px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 15px 14px calc(78px + env(safe-area-inset-bottom));
    background: var(--bg);
  }
  .app-page .lobby-room-list { display: grid; align-content: start; gap: 10px; }
  /* Full-width list on phones: the same sizes as the native app's channel cards. */
  .app-page .lobby-room-list .room-tile {
    min-height: 72px;
    grid-template-columns: 44px minmax(0, 1fr) auto 16px;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 20px;
  }
  .app-page .lobby-room-list .channel-tile-icon { width: 44px; height: 44px; }
  .app-page .lobby-room-list .channel-tile-icon svg { width: 20px; height: 20px; }
  .app-page .lobby-room-list .channel-tile-name { font-size: 17px; }
  .app-page .lobby-room-list .channel-tile-detail { font-size: 13px; }
  .app-page .lobby-room-list .channel-tile-occupancy { grid-template-columns: repeat(4, 8px); grid-auto-rows: 8px; }
  .app-page .lobby-room-list .channel-tile-chevron { display: grid; }
  .app-page .lobby-room-list .channel-tile-chevron svg { width: 16px; height: 16px; }
  .app-page .lobby-empty {
    min-height: 110px;
    justify-items: start;
    align-content: center;
    gap: 5px;
    padding: 16px;
    border: 1px solid rgba(217,217,217,.08);
    border-radius: 12px;
    background: var(--surface);
    text-align: left;
  }
  .app-page .lobby-empty strong { font-size: 13px; }
  .app-page .lobby-empty span { font-size: 11px; }
  .app-page .sidebar-profile { min-height: 54px; }
  .app-page .call-controls { gap: 4px; }
  .app-page.is-in-room .app-shell,
  .app-page.is-in-call .app-shell { grid-template-rows: minmax(0, 1fr); }
  .app-page.is-in-room .channel-sidebar { display: none; }
  .app-page.is-in-room .workspace,
  .app-page.is-in-call .workspace { grid-row: 1; }
  .app-page.is-in-room .room-view { padding: 15px 17px calc(112px + env(safe-area-inset-bottom)); }
}

@media (max-width: 360px) {
  .app-page .app-profile-button { max-width: 100px; }
  .app-page .call-controls { gap: 2px; }
}

/* Kanal listesi: masaüstünde boş çalışma alanı yerine başlangıç daveti. */
@media (min-width: 761px) {
  .app-page .lobby-view:not(.hidden) { display: grid !important; flex: 1; place-items: center; padding: 44px; }
  .app-page .lobby-intro { width: min(100%, 640px); display: flex; flex-direction: column; align-items: center; text-align: center; }
  .app-page .lobby-intro-mark { display: grid; width: 74px; height: 74px; place-items: center; margin-bottom: 27px; border: 1px solid rgba(180,227,63,.3); border-radius: 20px; background: radial-gradient(circle at 30% 20%,rgba(180,227,63,.23),rgba(180,227,63,.06)); box-shadow: 0 12px 0 rgba(0,0,0,.2), 0 18px 45px rgba(180,227,63,.08); color: var(--accent); font-size: 37px; }
  .app-page .lobby-intro .section-overline { color: var(--accent); letter-spacing: .17em; }
  .app-page .lobby-intro h2 { margin: 12px 0 9px; color: var(--text); font-size: clamp(36px,4vw,55px); line-height: 1.06; letter-spacing: -.06em; }
  .app-page .lobby-intro p { max-width: 410px; margin: 0 0 25px; color: var(--muted); font-size: 15px; line-height: 1.6; }
  .app-page .lobby-intro-steps { display: flex; gap: 22px; margin-top: 38px; padding-top: 20px; border-top: 1px solid rgba(217,217,217,.09); color: var(--quiet); font-size: 11px; }
  .app-page .lobby-room-list, .app-page .lobby-empty { display: none !important; }
}
@media (max-width: 760px) { .app-page .lobby-intro { display: none; } }

/* Keep the original workspace and give its participant cards the preview's shape. */
@media (min-width: 761px) {
  .app-page .room-view { overflow-y: auto; }
  .app-page .call-card {
    display: flex;
    width: 100%;
    min-height: 360px;
    flex: 1;
    flex-direction: column;
    margin: 0 auto;
  }
  .app-page .participant-section {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 18px 0;
  }
  .app-page .participant-section > .section-overline { display: none; }
  .app-page .participant-list {
    display: grid;
    width: min(100%, 720px);
    grid-template-columns: repeat(auto-fit, minmax(150px, 180px));
    justify-content: center;
    gap: 14px;
    padding: 0;
  }
  .app-page .participant-pill {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    border: 1px solid rgba(217,217,217,.11);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
  }
  .app-page .participant-pill .user-avatar {
    width: 70px;
    height: 70px;
    margin-bottom: 3px;
    border: 2px solid rgba(217,217,217,.3);
    color: var(--text);
    font-size: 31px;
    font-weight: 700;
    box-shadow: inset 0 2px 5px rgba(217,217,217,.16), 0 7px 20px rgba(0,0,0,.24);
  }
  .app-page .participant-pill .participant-state { padding: 0; border: 0; color: var(--brand-secondary); font-size: 11px; font-weight: 400; }
  .app-page .room-control-dock { display: flex; min-height: 68px; align-items: center; justify-content: center; margin-top: auto; padding: 8px 0 18px; }
  .app-page .room-control-dock .call-controls { gap: 9px; }
  .app-page .audio-help-button { margin: 0 auto; }
}

/* Keep call indicators static on touch devices to avoid continuous repainting. */
@media (hover: none) and (pointer: coarse) {
  .participant-wave i, .call-status.connected .status-dot { animation: none; }
  .participant-wave i:nth-child(2), .participant-wave i:nth-child(4) { height: 10px; }
  .participant-wave i:nth-child(3) { height: 16px; }
}

.connection-metrics { width: 100%; border-collapse: collapse; font-size: 11px; font-variant-numeric: tabular-nums; }
.connection-metrics th, .connection-metrics td { padding: 8px 4px; border-bottom: 1px solid var(--line); text-align: right; }
.connection-metrics th:first-child { text-align: left; }
.connection-metrics thead th { color: var(--quiet); font-size: 10px; font-weight: 500; }
.connection-metrics tbody th { color: var(--muted); font-weight: 500; }

/* Kanal başlığı ve mobil görüşme alanı. */
.app-page .room-title-copy h1 { color: var(--accent); }
.metrics-close-button { display: none; }

@media (max-width: 760px) {
  .app-page.is-in-room .room-view,
  .app-page.is-in-call .room-view {
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }
  .app-page .room-view-heading {
    --header-inset: 17px;
    flex: 0 0 auto;
    margin-top: -15px;
  }
  .app-page .room-heading-main { flex: 1; }
  .app-page .room-heading-actions { flex: 0 0 auto; }
  .app-page .room-title-copy h1 { max-width: 100%; }
  .app-page.is-in-call .call-card {
    min-height: 0;
    justify-content: flex-start;
  }
  .app-page.is-in-call .call-heading { flex: 0 0 auto; }
  .app-page.is-in-call .participant-section {
    min-height: 0;
    flex: 1;
    padding: 16px 0 12px;
  }
  .app-page.is-in-call .participant-section > .section-overline { flex: 0 0 auto; }
  .app-page.is-in-call .participant-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 10px;
    padding: 14px 3px 12px;
    scrollbar-width: thin;
  }
  .app-page.is-in-call .participant-pill {
    min-height: 150px;
    gap: 12px;
    padding: 16px 8px;
  }
  .app-page.is-in-call .participant-pill .user-avatar { width: 56px; height: 56px; font-size: 28px; }
  .app-page.is-in-call .participant-name { max-width: 100%; overflow-wrap: anywhere; }
  .app-page.is-in-call .audio-help-button { flex: 0 0 auto; }

  .connection-metrics-dialog:not(.uses-bottom-sheet) {
    position: fixed;
    inset: auto 0 0;
    width: 100%;
    max-width: none;
    max-height: 88dvh;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    background: var(--surface-raised);
    color: var(--text);
  }
  .connection-metrics-dialog:not(.uses-bottom-sheet)::backdrop { background: rgba(18,22,19,.78); backdrop-filter: blur(6px); }
  .connection-metrics-dialog:not(.uses-bottom-sheet) .connection-metrics-popover:not(.sheet-metrics-content) {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    padding: 48px 18px max(24px, calc(env(safe-area-inset-bottom) + 16px));
    transform: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .connection-metrics-dialog:not(.uses-bottom-sheet) .connection-metrics-popover::before {
    position: absolute;
    top: 11px;
    left: calc(50% - 20px);
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: rgba(217,217,217,.3);
    content: "";
  }
  .connection-metrics-dialog .metrics-close-button { display: grid; top: 10px; right: 14px; }
  .connection-metrics-dialog .connection-metrics-heading { flex-wrap: wrap; }
  .connection-metrics-dialog .connection-metrics td { white-space: nowrap; }
}

@media (max-width: 760px) {
  .app-page .channel-sidebar-header { gap: 8px; align-items: center; }
  .app-page .channel-sidebar-title { flex: 0 1 auto; }
  .app-page .channel-sidebar-actions { display: flex; align-items: center; gap: 8px; }
}

.create-room-form select { width: 100%; color: inherit; background: var(--bg); border: 1px solid rgba(217,217,217,.12); border-radius: 10px; padding: 12px; font: inherit; }
.create-room-field { display: grid; gap: 8px; }
.create-room-field[hidden] { display: none; }
.create-room-field p { margin: 0; }

/* Temporary channels and private memberships. */
.channel-list-heading { margin: 10px 0 3px; padding: 0 8px; color: var(--quiet); font-size: 10px; font-weight: 700; letter-spacing: 1.1px; text-transform: uppercase; }
.channel-list-heading:first-child { margin-top: 2px; }
.room-temporary-note { margin: 0; color: var(--muted); font-size: 12px; }
.room-temporary-note[hidden] { display: none; }

/* Content layout is independent of the dialog presentation. */
.identity-card, .create-room-modal, .switch-room-sheet { position: relative; display: grid; gap: 20px; }
.sheet-metrics-content { display: block; position: relative; }


.call-indicators { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 7px; padding: 6px 7px; border: 1px solid rgba(217,217,217,.075); border-radius: 7px; background: rgba(18,22,19,.5); }
.call-indicator-copy { display: grid; min-width: 0; gap: 4px; }
.call-indicator { display: flex; min-width: 0; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; line-height: 1.25; }
.call-indicator > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.call-indicator .status-dot { width: 6px; height: 6px; background: var(--quiet); box-shadow: none; }
.call-indicator[data-state="connected"] { color: var(--accent); }
.call-indicator[data-state="connected"] .status-dot { background: var(--accent); box-shadow: 0 0 8px rgba(180,227,63,.45); }
.call-indicator[data-state="connecting"] { color: var(--lime); }
.call-indicator[data-state="connecting"] .status-dot { background: var(--lime); box-shadow: 0 0 8px rgba(180,227,63,.32); }
.call-indicator[data-state="unreachable"] { color: #ffaaa4; }
.call-indicator[data-state="unreachable"] .status-dot { background: var(--red); box-shadow: 0 0 8px rgba(255,137,130,.32); }
