:root {
  color-scheme: light;
  --navy: #102746;
  --navy-2: #173b5d;
  --ink: #102746;
  --blue-gray: #7899a9;
  --aqua: #67cdd1;
  --aqua-soft: #e4f5f3;
  --cream: #f7f4ee;
  --white: #fffefd;
  --line: #d6e2e2;
  --danger: #a7473e;
  --shadow: 0 22px 60px rgba(16, 39, 70, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--cream); }
body { min-height: 100vh; margin: 0; color: var(--ink); background: radial-gradient(circle at 92% 5%, rgba(103, 205, 209, 0.18), transparent 27rem), var(--cream); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(103, 205, 209, 0.45); outline-offset: 2px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 17.5rem minmax(0, 1fr); }
.side-rail { position: sticky; top: 0; height: 100vh; padding: 2rem 1.35rem 1.5rem; display: flex; flex-direction: column; border-right: 1px solid rgba(16, 39, 70, 0.1); background: rgba(235, 245, 244, 0.82); backdrop-filter: blur(18px); z-index: 5; }
.brand, .mobile-brand { color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 0.8rem; }
.brand img { width: 3.25rem; height: 3.25rem; border-radius: 1rem; }
.brand strong { display: block; font-size: 1.25rem; letter-spacing: -0.03em; }
.brand small { display: block; margin-top: 0.2rem; color: #48758a; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.1em; }
.rail-nav { margin-top: 3.1rem; display: grid; gap: 0.45rem; }
.rail-nav button, .bottom-nav button { border: 0; color: #315a70; background: transparent; }
.rail-nav button { min-height: 3.65rem; padding: 0 1rem; border-radius: 1.2rem; display: flex; align-items: center; gap: 0.9rem; text-align: left; font-weight: 750; }
.rail-nav button i { width: 1.3rem; color: #3c8792; font-style: normal; text-align: center; }
.rail-nav button.active { color: white; background: linear-gradient(115deg, #285b78, #173d5d); box-shadow: 0 12px 30px rgba(23, 61, 93, 0.18); }
.rail-nav button.active i { color: var(--aqua); }
.rail-promise { margin-top: auto; padding: 1.15rem; border-radius: 1.4rem; background: rgba(103, 205, 209, 0.13); border: 1px solid rgba(103, 205, 209, 0.2); }
.rail-promise strong { display: block; margin: 0.65rem 0 0.35rem; font-size: 0.92rem; }
.rail-promise p { margin: 0; color: #577489; font-size: 0.82rem; line-height: 1.45; }
.pulse-dot { display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--aqua); box-shadow: 0 0 0 0.35rem rgba(103, 205, 209, 0.16); }

.main-surface { min-width: 0; }
.topbar { height: 5rem; padding: 0 3rem; display: flex; justify-content: flex-end; align-items: center; gap: 1rem; border-bottom: 1px solid rgba(16, 39, 70, 0.08); background: rgba(247, 244, 238, 0.7); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 4; }
.mobile-brand { display: none; margin-right: auto; }
.network-state { display: flex; align-items: center; gap: 0.65rem; padding: 0.65rem 1rem; border-radius: 999px; color: #397281; background: var(--aqua-soft); font-size: 0.83rem; font-weight: 760; }
.install-app-button { min-height: 2.9rem; padding: .25rem 1rem .25rem .35rem; display: flex; align-items: center; gap: .55rem; border: 0; border-radius: 999px; color: white; background: var(--navy); box-shadow: 0 10px 24px rgba(16,39,70,.15); font-weight: 800; }
.install-app-button span { width: 2.15rem; height: 2.15rem; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: var(--aqua); font-size: 1.1rem; }
.install-app-button:hover { background: #173b5d; transform: translateY(-1px); }
.account-shortcut { min-height: 2.9rem; border: 1px solid rgba(16, 39, 70, 0.1); border-radius: 999px; padding: 0.25rem 0.9rem 0.25rem 0.3rem; display: flex; align-items: center; gap: 0.55rem; color: var(--ink); background: rgba(255, 255, 255, 0.72); }
.account-shortcut span { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; color: white; border-radius: 50%; background: var(--navy); font-weight: 800; }
.account-shortcut span.has-photo { overflow: hidden; padding: 0; }
.account-shortcut span img { width: 100%; height: 100%; display: block; object-fit: cover; }
.account-shortcut b { font-size: 0.82rem; }

.view { min-height: calc(100vh - 5rem); padding: 2rem clamp(1.4rem, 4vw, 4.5rem) 4rem; }
.live-stage { position: relative; min-height: calc(100vh - 9rem); overflow: hidden; border: 1px solid rgba(16, 39, 70, 0.1); border-radius: 2.35rem; padding: clamp(2rem, 4vw, 4.3rem); background: rgba(255, 254, 253, 0.83); box-shadow: var(--shadow); }
.world-art { position: absolute; inset: -7% -4% auto; width: 108%; height: 78%; object-fit: cover; opacity: 0.2; pointer-events: none; mask-image: linear-gradient(to bottom, black 55%, transparent 100%); }
.stage-copy { position: relative; max-width: 58rem; margin: 0 auto 2.4rem; text-align: center; }
.eyebrow { margin: 0 0 0.75rem; color: #408995; font-size: 0.76rem; font-weight: 850; letter-spacing: 0.17em; }
.stage-copy h1, .view-heading h1, .global-stage h1, .profile-intro h1 { margin: 0; font-size: clamp(2.5rem, 5.6vw, 5rem); line-height: 0.98; letter-spacing: -0.065em; }
.stage-copy h1 span, .profile-intro h1 span { color: #7899a9; font-weight: 480; }
.stage-copy > p:last-child { max-width: 44rem; margin: 1.3rem auto 0; color: #58758a; font-size: 1.06rem; line-height: 1.6; }
.windows-install-card { position: relative; z-index: 1; max-width: 70rem; margin: 0 auto 1.1rem; padding: 1rem 1.1rem; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 1rem; border: 1px solid rgba(103,205,209,.34); border-radius: 1.5rem; background: linear-gradient(110deg, rgba(228,245,243,.98), rgba(255,255,255,.94)); box-shadow: 0 12px 30px rgba(16,39,70,.08); }
.windows-install-card > img { width: 3.4rem; height: 3.4rem; border-radius: 1rem; }
.windows-install-card p { margin: 0 0 .2rem; color: #408995; font-size: .69rem; font-weight: 850; letter-spacing: .14em; }
.windows-install-card h2 { margin: 0 0 .2rem; font-size: 1.2rem; letter-spacing: -.025em; }
.windows-install-card div > span { color: #58758a; font-size: .88rem; line-height: 1.4; }
.windows-install-card > button { min-height: 3.25rem; padding: 0 1.15rem; border: 0; border-radius: 1rem; color: white; background: var(--navy); font-weight: 830; box-shadow: 0 10px 24px rgba(16,39,70,.16); }
.windows-install-card > button span { margin-left: .55rem; color: var(--aqua); font-size: 1.1rem; }
.windows-install-card > button:hover { background: #173b5d; transform: translateY(-1px); }

.session-actions { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; max-width: 70rem; margin: 0 auto; }
.session-card { position: relative; min-width: 0; padding: 1.6rem; border: 1px solid rgba(16, 39, 70, 0.11); border-radius: 1.75rem; background: rgba(255, 255, 255, 0.92); box-shadow: 0 14px 35px rgba(16, 39, 70, 0.08); }
.primary-card { color: white; background: linear-gradient(135deg, #102746 0%, #173f5d 72%, #1c586b 100%); }
.step { float: right; width: 2.55rem; height: 2.55rem; display: grid; place-items: center; border-radius: 50%; color: #2d7781; background: var(--aqua-soft); font-size: 0.75rem; font-weight: 850; }
.primary-card .step { color: var(--aqua); background: rgba(103, 205, 209, 0.15); }
.session-card > div:first-of-type p { margin: 0; color: #4a8c97; font-size: 0.69rem; font-weight: 850; letter-spacing: 0.14em; }
.primary-card > div:first-of-type p { color: var(--aqua); }
.session-card h2 { margin: 0.32rem 0 1.45rem; font-size: clamp(1.4rem, 2.5vw, 2rem); letter-spacing: -0.035em; }
.session-card label, .account-panel label { display: grid; gap: 0.45rem; font-size: 0.82rem; font-weight: 760; }
input, select, textarea { width: 100%; border: 1px solid #ccdddd; border-radius: 1rem; padding: 0.9rem 1rem; color: var(--ink); background: rgba(250, 253, 252, 0.94); transition: border-color 160ms ease, box-shadow 160ms ease; }
input:hover, select:hover, textarea:hover { border-color: #91c4c7; }
textarea { resize: vertical; }
.primary-card input { color: white; border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.08); }
.primary-card input::placeholder { color: rgba(255,255,255,.6); }
.room-code-control { display: grid; grid-template-columns: 1fr auto; gap: 0.5rem; margin-top: 0.45rem; }
.room-code-control input { text-transform: uppercase; font-size: 1.18rem; font-weight: 850; letter-spacing: 0.18em; }
.room-code-control button, .wide-action, .protected-feature button, .room-result button { border: 0; border-radius: 1rem; padding: 0.9rem 1.15rem; color: var(--navy); background: var(--aqua); font-weight: 850; }
.compact-row, .editor-grid { display: grid; grid-template-columns: 1fr 0.68fr; gap: 0.55rem; margin-top: 0.65rem; }
.wide-action { width: 100%; margin-top: 0.75rem; display: flex; justify-content: space-between; color: white; background: var(--navy); }
.form-status { min-height: 1.2rem; margin: 0.7rem 0 0; color: #648092; font-size: 0.78rem; line-height: 1.45; }
.primary-card .form-status { color: rgba(255,255,255,.7); }
.form-status.error { color: var(--danger); }
.primary-card .form-status.error { color: #ffd0ca; }

.room-result { position: relative; max-width: 70rem; margin: 1rem auto 0; padding: 1rem 1.2rem; border-radius: 1.35rem; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; border: 1px solid #bee4e2; background: #eaf8f6; }
.room-result div span { display: block; color: #4c8791; font-size: 0.65rem; font-weight: 850; letter-spacing: 0.14em; }
.room-result div strong { font-size: 1.5rem; letter-spacing: 0.16em; }
.room-result-copy strong { display: block; overflow: hidden; font-size: 1rem !important; letter-spacing: -0.01em !important; text-overflow: ellipsis; white-space: nowrap; }
.room-result-copy span { margin-top: .25rem; letter-spacing: 0 !important; font-weight: 500 !important; }
.room-qr { width: 5.25rem; height: 5.25rem; overflow: hidden; display: grid; place-items: center; padding: .35rem; border-radius: .85rem; background: white; }
.room-qr svg { width: 100%; height: 100%; display: block; }

.media-console { position: relative; max-width: 70rem; margin: 1rem auto 0; overflow: hidden; border-radius: 2rem; color: white; background: linear-gradient(135deg, #0a203c 0%, #113757 62%, #18546a 100%); box-shadow: 0 25px 60px rgba(16,39,70,.22); }
.media-console::before { content: ""; position: absolute; width: 28rem; height: 28rem; right: -12rem; top: -18rem; border: 1px solid rgba(103,205,209,.18); border-radius: 50%; box-shadow: 0 0 0 4rem rgba(103,205,209,.035), 0 0 0 8rem rgba(103,205,209,.025); pointer-events: none; }
.media-console-header { position: relative; padding: 1.35rem 1.5rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid rgba(255,255,255,.09); }
.media-console-header .eyebrow { margin-bottom: .25rem; color: var(--aqua); }
.media-console-header h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.media-console-facts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .55rem; }
.media-console-facts > span { min-height: 2.25rem; padding: .55rem .75rem; display: flex; align-items: center; gap: .38rem; border-radius: 999px; color: #bdd5dd; background: rgba(255,255,255,.07); font-size: .75rem; }
.media-console-facts b { color: white; }
.media-console-facts i { width: .5rem; height: .5rem; border-radius: 50%; background: #94a7b1; }
.media-console-facts .is-live i { background: var(--aqua); box-shadow: 0 0 0 .3rem rgba(103,205,209,.12); }
.media-console-grid { position: relative; padding: 1.35rem; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(17rem, .72fr); gap: 1.2rem; }
.media-stage { position: relative; min-height: 25rem; overflow: hidden; border: 1px solid rgba(103,205,209,.2); border-radius: 1.5rem; background: #061a31; }
.media-stage video { width: 100%; height: 100%; min-height: 25rem; display: block; object-fit: cover; background: #061a31; }
.media-fallback { min-height: 25rem; padding: 3rem 1rem; display: grid; place-items: center; align-content: center; text-align: center; }
.media-fallback > strong { margin-top: 1.5rem; font-size: 1.3rem; }
.media-fallback > span { margin-top: .45rem; color: #9fbdc8; font-size: .9rem; }
.signal-orbit { position: relative; width: 7.5rem; height: 7.5rem; display: grid; place-items: center; border: 1px solid rgba(103,205,209,.34); border-radius: 50%; }
.signal-orbit::before, .signal-orbit::after, .signal-orbit > span { content: ""; position: absolute; inset: -1.15rem; border: 1px solid rgba(103,205,209,.16); border-radius: 50%; }
.signal-orbit::after { inset: -2.3rem; opacity: .55; }
.signal-orbit > span:nth-child(2) { inset: -3.4rem; opacity: .25; }
.signal-orbit img { width: 4.2rem; height: 4.2rem; object-fit: contain; }
.media-stage-topline { position: absolute; z-index: 2; top: .85rem; left: .85rem; right: .85rem; display: flex; justify-content: space-between; gap: .6rem; pointer-events: none; }
.media-stage-topline span { padding: .48rem .65rem; border-radius: 999px; color: white; background: rgba(6,26,49,.72); backdrop-filter: blur(10px); font-size: .68rem; font-weight: 800; letter-spacing: .06em; }
.media-stage-topline span:first-child { color: var(--aqua); }
.media-fullscreen { position: absolute; z-index: 3; right: .85rem; bottom: .85rem; width: 2.55rem; height: 2.55rem; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: white; background: rgba(6,26,49,.72); backdrop-filter: blur(10px); font-size: 1.25rem; }
.media-controls { min-width: 0; padding: 1.25rem; border-radius: 1.4rem; background: rgba(255,255,255,.075); }
.media-controls h3 { margin: .25rem 0 .85rem; font-size: 1.4rem; letter-spacing: -.035em; }
.media-controls label { display: block; margin: 0 0 .45rem; color: #c3d7df; font-size: .8rem; font-weight: 750; }
.media-controls select { color: var(--ink); background: white; }
.capture-help { margin: .55rem 0 0; color: #b9d0d9; font-size: .76rem; line-height: 1.45; }
.capture-help b { color: white; }
.listener-room-check { margin: .75rem 0; padding: .85rem; border: 1px solid rgba(103,205,209,.24); border-radius: 1rem; background: rgba(6,26,49,.28); }
.listener-room-check span, .listener-room-check small { display: block; color: #a9cbd3; font-size: .7rem; line-height: 1.4; }
.listener-room-check span { font-weight: 850; letter-spacing: .12em; }
.listener-room-check strong { display: block; margin: .18rem 0; color: white; font-size: 1.45rem; letter-spacing: .16em; }
.control-kicker { margin: 0; color: var(--aqua); font-size: .68rem; font-weight: 850; letter-spacing: .14em; }
.media-controls button { width: 100%; min-height: 3rem; border: 1px solid rgba(255,255,255,.14); border-radius: 1rem; color: white; background: rgba(255,255,255,.08); font-weight: 800; }
.media-controls button:disabled { cursor: default; opacity: .42; }
.media-controls .control-primary { margin-top: .75rem; color: var(--navy); border-color: transparent; background: var(--aqua); }
.media-controls .control-danger { margin-top: .65rem; color: #ffd3cd; border-color: rgba(255,170,159,.2); background: rgba(167,71,62,.18); }
#changeBroadcastSource { margin-top: .65rem; }
.control-pair { margin-top: .65rem; display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.audio-meter { margin: 1rem 0; display: grid; gap: .5rem; }
.audio-meter > div { display: grid; grid-template-columns: 1rem 1fr; align-items: center; gap: .55rem; color: #a9c5ce; font-size: .72rem; }
.audio-meter i { height: .48rem; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.1); }
.audio-meter b { width: 2%; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--aqua), #a7eef0); transition: width 100ms linear; }
.media-status { min-height: 2.5rem; margin: .8rem 0 0; padding-top: .75rem; border-top: 1px solid rgba(255,255,255,.1); color: #b9d0d9; font-size: .78rem; line-height: 1.45; }
.media-status.error { color: #ffd0ca; }
.social-video-area { margin-top: .8rem; padding: .85rem; border-radius: 1.2rem; background: rgba(255,255,255,.06); }
.social-video-area > div:first-child { display: flex; justify-content: space-between; gap: .5rem; margin-bottom: .65rem; }
.social-video-area > div:first-child span { color: #9dbbc6; font-size: .75rem; }
.social-video-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr)); gap: .6rem; }
.social-video-tile { position: relative; min-height: 7rem; overflow: hidden; border-radius: 1rem; background: #071b31; }
.social-video-tile video { width: 100%; height: 7rem; display: block; object-fit: cover; }
.social-video-tile span { position: absolute; left: .45rem; bottom: .4rem; max-width: calc(100% - .9rem); overflow: hidden; padding: .25rem .4rem; border-radius: .45rem; color: white; background: rgba(6,26,49,.72); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }

.view-heading { max-width: 56rem; margin: 1.6rem auto 2.6rem; text-align: center; }
.view-heading h1, .global-stage h1, .profile-intro h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.view-heading > p:last-child { color: #607c8e; font-size: 1rem; line-height: 1.6; }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.person-card { overflow: hidden; min-height: 18rem; border: 1px solid var(--line); border-radius: 1.7rem; background: var(--white); box-shadow: 0 14px 32px rgba(16,39,70,.07); }
.person-card img { width: 100%; height: 12rem; object-fit: cover; display: block; }
.person-card .person-placeholder { height: 12rem; display: grid; place-items: center; color: white; font-size: 3rem; font-weight: 850; background: var(--navy); }
.person-card div:last-child { padding: 1rem 1.1rem; }
.person-card strong { display: block; font-size: 1.05rem; }
.person-card span { color: #628094; font-size: 0.8rem; }
.empty-state { grid-column: 1 / -1; min-height: 24rem; display: grid; place-items: center; align-content: center; gap: 0.7rem; border: 1px dashed #bfd1d3; border-radius: 2rem; color: #678292; text-align: center; background: rgba(255,255,255,.55); }
.empty-state img { width: 5rem; height: 5rem; object-fit: contain; }
.empty-state strong { color: var(--ink); font-size: 1.1rem; }

.protected-feature { max-width: 55rem; min-height: 24rem; margin: 2rem auto; padding: 2rem; border-radius: 2.2rem; display: flex; align-items: center; justify-content: center; gap: 2rem; color: white; background: var(--navy); box-shadow: var(--shadow); }
.feature-orbit { width: 9rem; height: 9rem; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(103,205,209,.4); border-radius: 50%; box-shadow: 0 0 0 1.3rem rgba(103,205,209,.06), 0 0 0 2.6rem rgba(103,205,209,.035); }
.feature-orbit img { width: 5.2rem; height: 5.2rem; object-fit: contain; }
.protected-feature strong { font-size: 1.5rem; }
.protected-feature p { max-width: 31rem; color: #b7d0d8; line-height: 1.6; }
.permission-feature .feature-orbit > span { width: 4.5rem; height: 4.5rem; display: grid; place-items: center; border-radius: 1.35rem; color: var(--navy); background: var(--aqua); font-size: 1.6rem; font-weight: 850; }
.permission-feature .feature-orbit > span.has-photo { overflow: hidden; padding: 0; }
.permission-feature .feature-orbit > span img { width: 100%; height: 100%; display: block; object-fit: cover; }
.chat-gate-status { min-height: 1.2rem; margin: .7rem 0 0 !important; color: #b7d0d8 !important; font-size: .875rem; }
.chat-gate-status.error { color: #ffd0ca !important; }

.chat-heading { margin-bottom: 1.6rem; }
.chat-shell { max-width: 72rem; min-height: 34rem; margin: 0 auto; overflow: hidden; display: grid; grid-template-columns: minmax(18rem, .72fr) minmax(0, 1.28fr); border: 1px solid rgba(16,39,70,.11); border-radius: 2.2rem; background: rgba(255,255,255,.92); box-shadow: var(--shadow); }
.chat-sidebar { padding: 1.6rem; color: white; background: linear-gradient(145deg, #102746 0%, #173f5d 70%, #1c586b 100%); }
.chat-identity { display: flex; align-items: center; gap: .8rem; padding-bottom: 1.35rem; border-bottom: 1px solid rgba(255,255,255,.13); }
.chat-identity > span { width: 3.35rem; height: 3.35rem; flex: 0 0 auto; display: grid; place-items: center; border-radius: 1.05rem; color: var(--navy); background: var(--aqua); font-size: 1.25rem; font-weight: 850; }
.chat-identity > span.has-photo { overflow: hidden; padding: 0; }
.chat-identity > span img { width: 100%; height: 100%; display: block; object-fit: cover; }
.chat-identity small { display: block; color: var(--aqua); font-size: .75rem; font-weight: 850; letter-spacing: .13em; }
.chat-identity strong { display: block; margin-top: .18rem; font-size: 1.05rem; }
.chat-identity p { margin: .22rem 0 0; color: #b9d0d9; font-size: .875rem; line-height: 1.45; }
.chat-room-picker { margin-top: 2rem; }
.chat-room-picker .eyebrow { color: var(--aqua); }
.chat-room-picker h2 { margin: 0; font-size: 1.55rem; letter-spacing: -.035em; }
.chat-room-picker > p { margin: .65rem 0 1rem; color: #bed1d9; font-size: .9rem; line-height: 1.5; }
.chat-room-picker form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.chat-room-picker input { min-width: 0; color: white; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.09); text-transform: uppercase; font-weight: 850; letter-spacing: .14em; }
.chat-room-picker input::placeholder { color: rgba(255,255,255,.52); }
.chat-room-picker button { border: 0; border-radius: 1rem; padding: .8rem 1rem; color: var(--navy); background: var(--aqua); font-size: .875rem; font-weight: 850; }
.chat-room-picker .form-status { color: #b9d0d9; }
.chat-room-picker .form-status.error { color: #ffd0ca; }

.chat-conversation { min-width: 0; min-height: 34rem; display: flex; background: linear-gradient(180deg, #fffefd, #f7fbfa); }
.chat-empty { width: 100%; padding: 2rem; display: grid; place-items: center; align-content: center; gap: .65rem; color: #6c8795; text-align: center; }
.chat-empty img { width: 5rem; height: 5rem; object-fit: contain; }
.chat-empty strong { color: var(--navy); font-size: 1.2rem; }
.chat-empty span { max-width: 26rem; font-size: .95rem; line-height: 1.55; }
.chat-conversation-active { width: 100%; min-width: 0; padding: 1.45rem; display: grid; grid-template-rows: auto minmax(16rem, 1fr) auto auto auto auto; }
.chat-conversation-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid #e0e9e8; }
.chat-conversation-header span { color: #4b858f; font-size: .76rem; font-weight: 850; letter-spacing: .12em; }
.chat-conversation-header span i { width: .45rem; height: .45rem; margin-right: .2rem; }
.chat-conversation-header h2 { margin: .28rem 0 0; font-size: 1.45rem; letter-spacing: -.035em; }
.chat-conversation-header button { width: 2.65rem; height: 2.65rem; border: 0; border-radius: 50%; color: #326879; background: var(--aqua-soft); font-size: 1.15rem; }
.chat-messages { min-width: 0; max-height: 24rem; overflow-y: auto; padding: 1rem .2rem; display: flex; flex-direction: column; gap: .65rem; scrollbar-color: #b8d9d8 transparent; }
.chat-message-empty { margin: auto; color: #718997; font-size: .95rem; text-align: center; }
.chat-message { max-width: min(80%, 31rem); align-self: flex-start; padding: .72rem .9rem; border: 1px solid #dbe7e6; border-radius: 1rem 1rem 1rem .3rem; background: white; box-shadow: 0 6px 15px rgba(16,39,70,.05); }
.chat-message.own { align-self: flex-end; border-color: #bee6e3; border-radius: 1rem 1rem .3rem 1rem; background: var(--aqua-soft); }
.chat-message.reaction { padding: .55rem .78rem; font-size: 1.4rem; }
.chat-message header { display: flex; align-items: baseline; justify-content: space-between; gap: .8rem; margin-bottom: .25rem; }
.chat-message-author { min-width: 0; display: flex; align-items: center; gap: .45rem; }
.chat-message-avatar { width: 1.65rem; height: 1.65rem; flex: 0 0 auto; overflow: hidden; display: grid; place-items: center; border-radius: 50%; color: white; background: #315e73; font-size: .7rem; font-weight: 850; }
.chat-message.own .chat-message-avatar { color: var(--navy); background: var(--aqua); }
.chat-message-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.chat-message strong { min-width: 0; overflow: hidden; color: #315e73; font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.chat-message time { color: #879ba5; font-size: .72rem; white-space: nowrap; }
.chat-message p { margin: 0; overflow-wrap: anywhere; color: var(--ink); font-size: .95rem; line-height: 1.45; white-space: pre-wrap; }
.chat-reactions { display: flex; gap: .4rem; padding-top: .6rem; }
.chat-reactions button { width: 2.55rem; height: 2.55rem; border: 1px solid #d5e5e4; border-radius: 50%; background: white; font-size: 1.05rem; }
.chat-reactions button:hover { border-color: var(--aqua); background: var(--aqua-soft); }
.chat-composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; margin-top: .6rem; }
.chat-composer button { border: 0; border-radius: 1rem; padding: .8rem 1.25rem; color: white; background: var(--navy); font-weight: 850; }
.chat-conversation-active > .form-status { margin-top: .45rem; }
.chat-safety { margin: .35rem 0 0; color: #7b909b; font-size: .78rem; line-height: 1.45; }

.global-stage { position: relative; overflow: hidden; min-height: calc(100vh - 10rem); border-radius: 2.4rem; display: grid; place-items: center; padding: 3rem; color: white; text-align: center; background: var(--navy); box-shadow: var(--shadow); }
.global-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .2; filter: brightness(1.6); }
.global-stage > div { position: relative; max-width: 54rem; }
.global-stage > div > p:not(.eyebrow) { max-width: 43rem; margin: 1.4rem auto; color: #bad0d8; line-height: 1.65; }
.global-metrics { display: flex; justify-content: center; gap: 0.8rem; margin-top: 2rem; }
.global-metrics span { min-width: 11rem; padding: 1rem; border: 1px solid rgba(103,205,209,.25); border-radius: 1.25rem; background: rgba(103,205,209,.08); }
.global-metrics strong { display: block; color: var(--aqua); font-size: 1.6rem; }

.profile-layout { max-width: 72rem; margin: 1rem auto; display: grid; grid-template-columns: minmax(17rem, .75fr) minmax(28rem, 1.25fr); gap: 1.4rem; align-items: start; }
.profile-intro { position: sticky; top: 7rem; padding: 2rem; }
.profile-intro > p:nth-of-type(2) { color: #5d7a8c; line-height: 1.65; }
.profile-intro ol { padding: 0; margin: 2rem 0 0; list-style: none; display: grid; gap: 1rem; }
.profile-intro li { display: flex; align-items: center; gap: 0.8rem; color: #536f81; }
.profile-intro li span { width: 2rem; height: 2rem; display: grid; place-items: center; border: 1px solid #b9dbda; border-radius: 50%; color: #3b878f; font-size: 0.68rem; font-weight: 850; }
.account-panel { padding: clamp(1.3rem, 3vw, 2.2rem); border: 1px solid rgba(16,39,70,.11); border-radius: 2rem; background: rgba(255,255,255,.9); box-shadow: var(--shadow); }
.auth-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .32rem; margin-bottom: 1.35rem; border-radius: 1.15rem; background: #edf5f4; }
.auth-switch button { border: 0; border-radius: .9rem; padding: .8rem; color: #648091; background: transparent; font-weight: 800; }
.auth-switch button.active { color: white; background: var(--navy); box-shadow: 0 8px 20px rgba(16,39,70,.14); }
.account-panel form, #accountForm { display: grid; gap: 1rem; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { margin-bottom: .5rem; font-size: .82rem; font-weight: 760; }
.role-choice { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.role-choice label { position: relative; }
.role-choice input { position: absolute; opacity: 0; pointer-events: none; }
.role-choice span { min-height: 4.6rem; padding: .85rem; border: 1px solid var(--line); border-radius: 1rem; display: grid; align-content: center; background: #fbfdfc; }
.role-choice input:checked + span { border-color: var(--aqua); box-shadow: inset 0 0 0 1px var(--aqua); background: var(--aqua-soft); }
.role-choice b, .role-choice small { display: block; }
.role-choice small { margin-top: .18rem; color: #6a8392; font-size: .72rem; }
.profile-editor-heading { margin-bottom: 1.4rem; display: flex; align-items: center; gap: .8rem; }
.profile-editor-heading .avatar { width: 3.6rem; height: 3.6rem; overflow: hidden; display: grid; place-items: center; border-radius: 1.15rem; color: white; background: var(--navy); font-size: 1.4rem; font-weight: 850; }
.profile-editor-heading .avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.profile-editor-heading p, .gallery-editor p { margin: 0; color: #55828d; font-size: .68rem; font-weight: 850; letter-spacing: .12em; }
.profile-editor-heading h2 { margin: .15rem 0 0; }
.profile-editor-heading button { margin-left: auto; border: 0; padding: .7rem .9rem; border-radius: 999px; color: #795752; background: #f8e9e6; font-weight: 780; }
.privacy-stack { margin: .2rem 0; border-top: 1px solid #e1eaea; }
.privacy-stack label { min-height: 3.7rem; border-bottom: 1px solid #e1eaea; display: flex; flex-direction: row; align-items: center; justify-content: space-between; }
.privacy-stack b, .privacy-stack small { display: block; }
.privacy-stack small { margin-top: .15rem; color: #718795; font-weight: 500; }
.privacy-stack input { width: 2.8rem; height: 1.55rem; accent-color: var(--navy); }
.gallery-editor { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .75rem; margin-top: .7rem; }
.gallery-editor h3 { margin: 0 0 .25rem; }
.gallery-editor p { max-width: 23rem; letter-spacing: 0; line-height: 1.4; font-weight: 500; }
.upload-button { display: block !important; border-radius: 999px; padding: .75rem 1rem; color: var(--navy); background: var(--aqua-soft); font-weight: 800; cursor: pointer; }
#photoCount { color: #5d7889; font-size: .85rem; font-weight: 800; }
.profile-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.gallery-item { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 1rem; background: #edf4f3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item button { position: absolute; top: .4rem; right: .4rem; width: 1.8rem; height: 1.8rem; border: 0; border-radius: 50%; color: white; background: rgba(16,39,70,.82); }

.bottom-nav { display: none; }
.toast { position: fixed; right: 1rem; bottom: 1rem; z-index: 20; max-width: 24rem; padding: .9rem 1rem; border-radius: 1rem; color: white; background: var(--navy); box-shadow: var(--shadow); }
.install-dialog { width: min(32rem, calc(100% - 2rem)); padding: 0; border: 1px solid rgba(103,205,209,.32); border-radius: 2rem; color: var(--ink); background: var(--white); box-shadow: 0 34px 90px rgba(5,25,48,.3); }
.install-dialog::backdrop { background: rgba(6,24,45,.62); backdrop-filter: blur(6px); }
.install-dialog form { position: relative; padding: 2rem; }
.install-dialog img { width: 4.25rem; height: 4.25rem; margin-bottom: 1.25rem; border-radius: 1.3rem; box-shadow: 0 12px 28px rgba(16,39,70,.16); }
.install-dialog h2 { margin: .25rem 2.5rem .75rem 0; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1; letter-spacing: -.045em; }
.install-dialog > form > p:not(.eyebrow) { margin: 0; color: #58758a; line-height: 1.6; }
.install-dialog ol { margin: 1.4rem 0; padding: 0; display: grid; gap: .75rem; list-style: none; }
.install-dialog li { display: grid; grid-template-columns: 2rem 1fr; gap: .75rem; align-items: start; }
.install-dialog li > span { width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; color: #2d7781; background: var(--aqua-soft); font-size: .76rem; font-weight: 850; }
.install-dialog li p { margin: .28rem 0 0; color: #365e73; line-height: 1.45; }
.install-dialog-close { position: absolute; top: 1rem; right: 1rem; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; color: var(--ink); background: var(--aqua-soft); font-size: 1.6rem; line-height: 1; }

@media (max-width: 980px) {
  .app-shell { display: block; }
  .side-rail { display: none; }
  .topbar { height: 4.4rem; padding: 0 1rem; justify-content: flex-end; }
  .mobile-brand { display: flex; }
  .mobile-brand img { width: 2.7rem; height: 2.7rem; border-radius: .8rem; }
  .network-state span:last-child { display: none; }
  .network-state { padding: .65rem; }
  .view { min-height: calc(100vh - 8.8rem); padding: 1rem 1rem 6.5rem; }
  .live-stage { min-height: auto; border-radius: 1.8rem; padding: 2rem 1rem 1rem; }
  .world-art { width: 135%; left: -18%; }
  .windows-install-card { grid-template-columns: auto 1fr; }
  .windows-install-card > button { grid-column: 1 / -1; width: 100%; }
  .session-actions, .profile-layout { grid-template-columns: 1fr; }
  .profile-intro { position: static; padding: 1.2rem .5rem; }
  .bottom-nav { position: fixed; z-index: 8; left: .7rem; right: .7rem; bottom: max(.7rem, env(safe-area-inset-bottom)); height: 4.35rem; padding: .35rem; display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid rgba(16,39,70,.12); border-radius: 1.4rem; background: rgba(255,255,255,.92); box-shadow: 0 14px 45px rgba(16,39,70,.2); backdrop-filter: blur(18px); }
  .bottom-nav button { border-radius: 1.05rem; display: grid; place-items: center; align-content: center; gap: .1rem; font-size: .66rem; font-weight: 780; }
  .bottom-nav button i { color: #4b9097; font-style: normal; font-size: .75rem; }
  .bottom-nav button.active { color: white; background: var(--navy); }
  .room-result { grid-template-columns: 1fr auto auto; }
  .room-result-copy { grid-column: 1 / -1; grid-row: 2; }
  .media-console-grid { grid-template-columns: 1fr; }
  .chat-shell { grid-template-columns: 1fr; }
  .chat-conversation { min-height: 31rem; }
}

@media (max-width: 620px) {
  .install-app-button { padding-right: .35rem; }
  .install-app-button b { display: none; }
  .account-shortcut b { display: none; }
  .account-shortcut { padding-right: .3rem; }
  .stage-copy h1 { font-size: 2.65rem; }
  .stage-copy > p:last-child { font-size: .92rem; }
  .windows-install-card { padding: 1rem; border-radius: 1.3rem; }
  .windows-install-card div > span { font-size: .82rem; }
  .session-card { padding: 1.25rem; border-radius: 1.45rem; }
  .room-result { grid-template-columns: 1fr auto; }
  .room-qr { grid-column: 1; grid-row: 3; width: 7.25rem; height: 7.25rem; }
  .room-result > button { grid-column: 2; grid-row: 3; }
  .media-console-header { align-items: flex-start; flex-direction: column; }
  .media-console-facts { justify-content: flex-start; }
  .media-console-grid { padding: .75rem; }
  .media-stage, .media-stage video, .media-fallback { min-height: 18rem; }
  .media-stage-topline span:last-child { display: none; }
  .compact-row, .editor-grid, .role-choice { grid-template-columns: 1fr; }
  .protected-feature { min-height: 28rem; flex-direction: column; text-align: center; }
  .feature-orbit { width: 7rem; height: 7rem; }
  .chat-heading h1 { font-size: 2.6rem; }
  .chat-shell { border-radius: 1.7rem; }
  .chat-sidebar, .chat-conversation-active { padding: 1.15rem; }
  .chat-room-picker form { grid-template-columns: 1fr; }
  .chat-room-picker button { min-height: 3rem; }
  .chat-message { max-width: 90%; }
  .chat-composer button { padding-inline: 1rem; }
  .global-stage { min-height: 35rem; padding: 1.4rem; }
  .global-metrics { display: grid; }
  .gallery-editor { grid-template-columns: 1fr auto; }
  .gallery-editor > div { grid-column: 1 / -1; }
  .profile-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: no-preference) {
  .pulse-dot { animation: pulse 2.2s ease-out infinite; }
  .view.active { animation: reveal .28s ease-out both; }
  .media-stage:not(.is-idle) .signal-orbit::before { animation: signal-wave 2.4s ease-out infinite; }
  .media-stage:not(.is-idle) .signal-orbit::after { animation: signal-wave 2.4s .65s ease-out infinite; }
  .media-stage:not(.is-idle) .signal-orbit > span:nth-child(2) { animation: signal-wave 2.4s 1.3s ease-out infinite; }
  @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(103,205,209,.35); } 75%,100% { box-shadow: 0 0 0 .55rem rgba(103,205,209,0); } }
  @keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
  @keyframes signal-wave { from { opacity: .45; transform: scale(.78); } to { opacity: 0; transform: scale(1.15); } }
}
