@font-face {
  font-family: Rubik; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/assets/fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: Rubik; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/assets/fonts/rubik-cyrillic.woff2") format("woff2");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Rubik; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("/assets/fonts/rubik-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
}
:root {
  color-scheme: dark;
  --bg: #131615; --surface: #1d211f; --raised: #282d29; --well: #111412;
  --line: #383f39; --ink: #f3f5ef; --muted: #afb7b0; --accent: #c2fb72;
  --active: #2e422e; --danger: #ff837e; --radius: 22px;
  font: 400 16px/1.5 Rubik, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--ink);
}
* { box-sizing: border-box; }
body, figure, h1, h2, p { margin: 0; }
body { min-width: 290px; }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
::selection { color: #172011; background: var(--accent); }
.muted, small { color: var(--muted); }
.icon { flex: 0 0 auto; display: inline-block; vertical-align: middle; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.page { width: min(1192px, 100%); margin: 0 auto; padding: 0 clamp(20px,4vw,54px) 48px; }
.site-nav, .call-header { display: flex; align-items: center; gap: 20px; }
.site-nav { min-height: 84px; border-bottom: 1px solid var(--line); margin-bottom: clamp(32px,6vh,66px); justify-content: space-between; }
.wordmark { color: var(--ink); text-decoration: none; display: inline-flex; gap: 10px; align-items: center; font-weight: 650; font-size: 25px; letter-spacing: -.075em; line-height: 1; }
.wordmark img { display: block; }
.site-links { display: flex; align-items: center; gap: 20px; }
.language-switch { display: inline-flex; flex: 0 0 auto; gap: 2px; padding: 3px; background: var(--well); border: 1px solid var(--line); border-radius: 100px; }
.language-switch button { background: transparent; color: var(--muted); font-size: 12px; letter-spacing: .025em; font-weight: 600; line-height: 1; padding: 7px 10px; min-height: 29px; border: 0; border-radius: 100px; }
.language-switch button[aria-pressed=true] { color: var(--ink); background: #394039; }
.nav-owner { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 14px; }
.nav-owner .icon { width: 19px; }
.btn { min-height: 42px; display: inline-flex; gap: 8px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 12px; background: var(--raised); color: var(--ink); padding: 8px 16px; text-decoration: none; font-weight: 500; line-height: 1.2; transition: background .15s, border-color .15s; }
.btn:hover:not(:disabled), .organizer-entry:hover { background-color: #363e36; border-color: #5a6858; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #1b2816; }
.btn.primary:hover:not(:disabled) { background: #d3ff9b; border-color: #d3ff9b; }
.btn.large { min-height: 52px; padding: 12px 22px; }
.btn.small { min-height: 32px; font-size: 13px; padding: 6px 12px; }
.btn.danger { color: var(--danger); }
.btn.toggle.is-off { color: #bcc3ba; background: #222723; }
.btn.toggle.is-off:has(.icon) { border-color: #414841; }
.toggle.is-off .icon { opacity: .72; }
.field { display: grid; align-content: start; gap: 6px; font-size: 14px; font-weight: 500; }
input:not([type=checkbox]), select { width: 100%; min-width: 0; min-height: 45px; border: 1px solid var(--line); background: var(--well); color: var(--ink); padding: 9px 13px; border-radius: 10px; }
input::placeholder { color: #8e9890; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); }
.field-error { color: var(--danger); font-size: 14px; }
.page-title, .section-title, h2 { font-weight: 550; letter-spacing: -.04em; line-height: 1.14; }
.page-title { font-size: clamp(28px,4vw,44px); overflow-wrap: anywhere; }
.section-title, h2 { font-size: 23px; }
.card, .panel, .prejoin-panel { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: clamp(20px,3vw,34px); }
.banner { border: 1px solid #73564d; background: #302622; padding: 18px; border-radius: 14px; margin: 16px 0; }
.banner-title, .overlay-title { font-weight: 600; }
.banner-detail, .overlay-detail { margin-top: 5px; font-size: 14px; color: var(--muted); }
.banner-actions { margin-top: 12px; }
.chip, .e2ee-indicator, .recording-indicator, .on-air { display: inline-flex; align-items: center; gap: 6px; width: fit-content; border-radius: 99px; padding: 4px 10px; color: var(--muted); background: var(--raised); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip-open, .chip-e2ee, .chip-verified, .e2ee-indicator, .on-air { color: var(--accent); background: var(--active); }
.chip-cancelled, .recording-indicator { color: #ffaba2; background: #482b2c; }
.recording-dot, .on-air-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Join by link. The illustration is served by the same origin as the room. */
.lobby { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border-radius: 28px; border: 1px solid var(--line); background: var(--surface); }
.lobby-copy { align-self: center; padding: clamp(30px,5vw,70px) clamp(26px,4vw,56px); }
.lobby h1 { margin: 0; max-width: 9em; font-size: clamp(42px,5.6vw,76px); font-weight: 550; line-height: .99; letter-spacing: -.065em; text-wrap: balance; }
.lobby-lede { margin: 22px 0 26px; max-width: 34ch; color: var(--muted); }
.lobby-form { display: grid; gap: 10px; }
.lobby-form label { font-size: 13px; font-weight: 550; }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; color: var(--muted); }
.input-icon input { min-height: 51px; padding-left: 44px; }
.lobby-form .btn { margin-top: 3px; justify-content: space-between; }
.lobby-art { min-height: 390px; position: relative; background: #102316; }
.lobby-art img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; }
.organizer-entry { display: flex; gap: 16px; align-items: center; padding: 17px 22px; margin-top: 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 17px; background: var(--surface); text-decoration: none; }
.entry-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #d1d9cb; background: var(--raised); }
.organizer-entry strong, .organizer-entry small { display: block; }
.organizer-entry strong { font-weight: 550; }
.organizer-entry small { margin-top: 2px; }
.organizer-entry > .icon { margin-left: auto; color: var(--muted); }
.auth-card, .end-card, .center-card { width: min(100%,560px); margin: 0 auto; display: grid; gap: 18px; }
.auth-card form { display: grid; gap: 16px; }
.profile-fields { display: grid; gap: 20px; }
.auth-card summary { cursor: pointer; font-weight: 500; }
.auth-card details > form, .auth-card details > p { margin-top: 16px; }
.account-profile details { padding-block: 16px; border-block: 1px solid var(--line); }
.dashboard-heading { margin-bottom: 24px; }
.dashboard .panel { margin: 18px 0; }
.panel h2 { margin-bottom: 18px; }
.create-form { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(204px,100%),1fr)); gap: 16px; align-items: end; }
.meeting-list, .side ul { list-style: none; margin: 0; padding: 0; }
.meeting-row { display: flex; align-items: flex-start; gap: 13px; flex-wrap: wrap; padding: 17px 0; border-top: 1px solid var(--line); }
.meeting-row-main { flex: 1 1 230px; min-width: 0; overflow-wrap: anywhere; }
.meeting-when, .meeting-code-line, .meeting-repeat, .occurrence-list { color: var(--muted); font-size: 13px; }
.meeting-row-actions, .meeting-row-passcode, .end-actions, .verify-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.meeting-row-passcode input { width: 140px; min-height: 33px; }

/* Pre-call device check. */
.prejoin { display: grid; grid-template-columns: minmax(0,1.58fr) minmax(260px,1fr); align-items: start; gap: clamp(20px,3vw,40px); }
.prejoin-media, .prejoin-panel { min-width: 0; }
.schedule-hint { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin: 8px 0 17px; }
.preview-frame { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--well); border: 1px solid var(--line); border-radius: var(--radius); }
#preview { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.preview-overlay { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 20px; text-align: center; background: #171d19; }
.prejoin-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin: 13px 0; }
.prejoin-toggles .btn { font-size: 13px; padding: 8px 13px; }
.prejoin-panel { display: grid; gap: 14px; }
.prejoin-panel h2 { margin: 0 0 4px; }
.audio-settings { display: grid; gap: 6px; }
.audio-setting { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.prejoin-panel .join { min-height: 47px; }

/* Meeting stage and independent screen shares. */
.call { height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 12px; padding: 0 18px 12px; }
.call-header { min-width: 0; min-height: 64px; gap: 12px; border-bottom: 1px solid var(--line); }
.call-header .wordmark { font-size: 21px; }
.call-header .wordmark img { width: 28px; height: 28px; }
.call-header .language-switch { margin-left: auto; order: 4; }
.call-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-header [role=status]:not(.recording-indicator):not(.e2ee-indicator) { font-size: 12px; color: var(--muted); }
.call-body { display: grid; grid-template-columns: minmax(0,1fr); min-height: 0; position: relative; }
.call-body.with-side { grid-template-columns: minmax(0,1fr) clamp(240px,22vw,320px); gap: 12px; }
.stage { display: flex; position: relative; min-height: 0; min-width: 0; overflow: auto; }
.tiles { flex: 1; min-height: 0; display: grid; gap: 9px; grid-template-columns: repeat(var(--cols,2),minmax(0,1fr)); grid-auto-rows: minmax(128px,1fr); }
.tiles.has-screen { grid-template-columns: repeat(calc(2 * var(--cols,2)),minmax(0,1fr)); grid-template-rows: minmax(180px,1fr); grid-auto-rows: clamp(85px,14vh,130px); }
.tiles.has-screen .tile:not(.screen) { grid-column: span 2; }
.tiles.has-screen .screen { grid-column: 1/-1; grid-row: 1; }
.tiles.has-screen:has(.screen ~ .screen) .screen { grid-column: span var(--cols,2); grid-row: auto; order: -1; }
.tile { margin: 0; min-width: 0; min-height: 0; position: relative; overflow: hidden; background: var(--well); border-radius: 15px; }
.tile-media { width: 100%; height: 100%; overflow: auto; }
.tile video { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile.screen video { object-fit: contain; }
.tile.speaking, .tile.focused { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile:not(.screen) { cursor: pointer; }
.tile.focused { grid-column: span 2; grid-row: span 2; }
.tiles.has-screen .tile.focused { grid-column: span 2; grid-row: auto; }
.tile figcaption, .screen-audio-badge { border-radius: 9px; padding: 4px 10px; background: #101511d9; color: white; font-size: 13px; }
.tile figcaption { position: absolute; left: 9px; bottom: 9px; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; }
.tile > .screen-audio-badge { position: absolute; left: 9px; top: 9px; }
.screen-tools { position: absolute; top: 8px; right: 8px; display: flex; background: #18201cde; padding: 2px; border-radius: 9px; }
.screen-tools button { min-width: 32px; min-height: 32px; border: 0; border-radius: 6px; background: transparent; color: #fff; font-size: 18px; }
.screen-tools button:hover { background: #394139; }
.screen-tools .icon { width: 16px; }
.tile:fullscreen { border-radius: 0; background: #101311; }
.share-pip { position: absolute; right: 12px; bottom: 12px; width: clamp(140px,18vw,220px); border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.share-pip video { width: 100%; max-height: 14vh; object-fit: contain; display: block; }
.share-pip figcaption { padding: 5px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; font-size: 11px; }
.share-pip .btn { min-height: 26px; padding: 4px 7px; font-size: 11px; }
.side { display: flex; flex-direction: column; min-height: 0; overflow: auto; padding: 17px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.side h2 { font-size: 18px; margin-bottom: 12px; }
.roster-block { max-height: 50%; flex: 0 1 auto; overflow: auto; }
.roster-block li { padding: 6px 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.chat { flex: 1; display: flex; min-height: 110px; flex-direction: column; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.chat ul { flex: 1; overflow: auto; font-size: 14px; overflow-wrap: anywhere; }
.chat li { padding: 3px 0; }
.chat li.system { color: var(--muted); }
.chat-composer { display: flex; gap: 5px; }
.chat-composer input { flex: 1; min-height: 36px; font-size: 13px; }
.chat-composer button { font-size: 13px; min-height: 36px; padding: 5px 10px; }
.call-controls { display: flex; align-items: stretch; justify-content: center; gap: 7px; padding-top: 2px; }
.call-controls > .btn, .control-settings > .btn { min-height: 56px; padding: 7px 14px; flex-direction: column; gap: 5px; font-size: 12px; }
.call-controls .danger { color: #fff; background: #aa393a; border-color: #b84243; }
.call-controls .danger:hover:not(:disabled) { background: #c04342; }
.control-settings { position: relative; display: flex; }
.settings-popover, .verify-dialog { background: var(--raised); border: 1px solid var(--line); border-radius: 13px; padding: 14px; }
.settings-popover { position: absolute; bottom: calc(100% + 10px); right: 0; z-index: 4; min-width: 180px; box-shadow: 0 12px 35px #0006; }
.verify-dialog { margin: 10px 0; }
.verify-title, .safety-number { font-weight: 600; }
.safety-number { font: 14px monospace; overflow-wrap: anywhere; margin: 8px 0; }
.verify-actions { margin-top: 10px; }
.end-info { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.end-info dt { color: var(--muted); }
.end-info dd { margin: 0; overflow-wrap: anywhere; }
.end-card.disconnected { border-color: #795044; }

@media (max-width: 760px) {
  .site-nav { min-height: 68px; margin-bottom: 24px; }
  .site-links { gap: 11px; }
  .page { padding: 0 16px 28px; }
  .lobby { grid-template-columns: 1fr; }
  .lobby-copy { padding: 27px 23px; }
  .lobby h1 { max-width: 12ch; font-size: clamp(39px,8vw,60px); }
  .lobby-lede { margin: 14px 0 18px; }
  .lobby-art { min-height: 0; height: clamp(140px,35vw,230px); }
  .lobby-art img { object-position: 50% 49%; }
  .organizer-entry { padding: 14px; gap: 11px; }
  .prejoin { grid-template-columns: 1fr; gap: 12px; }
  .prejoin-panel { padding: 18px; }
  .call { padding: 0 7px max(6px,env(safe-area-inset-bottom)); gap: 6px; }
  .call-header { min-height: 47px; gap: 6px; }
  .call-header .wordmark { font-size: 0; gap: 0; }
  .call-header .on-air { padding: 4px 7px; }
  .call-header [data-testid=call-status] { max-width: 18ch; }
  .call-body.with-side { grid-template-columns: minmax(0,1fr); }
  .side { position: absolute; top: 0; right: 0; bottom: 0; width: min(88%,320px); z-index: 2; box-shadow: -10px 0 28px #0006; }
  .tiles { gap: 5px; grid-auto-rows: minmax(80px,1fr); }
  .tiles:not(.has-screen) { grid-template-columns: repeat(min(var(--cols,2),2),minmax(0,1fr)); }
  .tiles.has-screen:has(.screen ~ .screen) { grid-template-rows: repeat(2,minmax(95px,1fr)); grid-auto-rows: 76px; }
  .tiles.has-screen:has(.screen ~ .screen) .screen { grid-column: 1/-1; }
  .call-controls { gap: 4px; flex-wrap: wrap; }
  .call-controls > .btn, .control-settings > .btn { padding: 5px 7px; min-height: 43px; font-size: 10px; gap: 2px; }
  .call-controls .icon { width: 17px; height: 17px; }
}
@media (max-width: 400px) {
  .nav-owner .icon { display: none; }
  .wordmark { font-size: 22px; gap: 6px; }
  .wordmark img { width: 29px; height: 29px; }
  .nav-owner { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
