:root { color-scheme: light; font: 17px/1.5 system-ui, sans-serif; color: #25312e; background: #f6f5ef; }
* { box-sizing: border-box; }
body { margin: 0; }
header { max-width: 1200px; margin: auto; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { font-size: 32px; font-weight: 850; letter-spacing: -2px; text-decoration: none; }
.brand span { font-size: 15px; color: #de7856; margin-left: 3px; }
nav, .toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
nav { font-size: 14px; }
nav .avatar { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #dce6de; color: #355f4d; font-size: 13px; font-weight: 650; }
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
a { color: inherit; text-underline-offset: 4px; }
main { max-width: 1144px; margin: 30px auto; padding: 0 28px 40px; }
h1 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -2px; line-height: 1.1; margin-bottom: 20px; }
h2 { font-size: 21px; margin-top: 28px; }
.muted { color: #64706a; }
button, input { font: inherit; border-radius: 12px; padding: 11px 17px; }
button { cursor: pointer; border: 1px solid #cbd2c9; background: #fff; color: inherit; }
button:hover { background: #e9ede5; }
button:disabled { opacity: .5; cursor: wait; }
button.primary { color: white; background: #355f4d; border-color: #355f4d; }
button.danger { color: #963c31; }
button.device-button { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0; flex-shrink: 0; }
.device-button::before { content: ''; display: block; flex: 0 0 22px; width: 22px; height: 22px; background: currentColor; -webkit-mask: var(--device-icon) center / contain no-repeat; mask: var(--device-icon) center / contain no-repeat; }
.microphone-button { --device-icon: url('/icons/microphone.svg'); }
.camera-button { --device-icon: url('/icons/camera.svg'); }
.microphone-button[aria-pressed=true] { --device-icon: url('/icons/microphone-off.svg'); }
.camera-button[aria-pressed=true] { --device-icon: url('/icons/camera-off.svg'); }
.device-button[aria-pressed=true] { color: #963c31; background: #fff0ec; }
input { border: 1px solid #cbd2c9; background: white; min-width: 0; }
:focus-visible { outline: 3px solid #de7856; outline-offset: 3px; }
body.home header { position: absolute; top: 0; left: 0; right: 0; }
body.home main { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; max-width: none; margin: 0; padding: 100px 24px; }
body.home #error { position: fixed; bottom: 16px; left: 0; right: 0; }
.prejoin { text-align: center; }
.prejoin h1 { font-size: 28px; letter-spacing: -0.5px; }
.prejoin .toolbar { justify-content: center; }
.preview { width: min(100%, 640px); margin: 24px auto 16px; }
.preview video, video.self-video { transform: scaleX(-1); }
.camera-off { display: grid; place-items: center; aspect-ratio: 4/3; color: #dce6de; }
.mic-level { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 16px 0; font-size: 14px; }
.mic-level meter { width: 120px; }
.videos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.tile { position: relative; border-radius: 18px; overflow: hidden; background: #25312e; min-height: 160px; }
video { display: block; width: 100%; max-height: 55vh; aspect-ratio: 4/3; object-fit: contain; }
.tile span { position: absolute; left: 12px; bottom: 12px; color: white; background: #0008; padding: 3px 10px; border-radius: 7px; }
.tile button { position: absolute; top: 12px; left: 12px; }
.invite-box:not(:empty) { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.invite-box label { width: 100%; }
.invite-box input { flex: 1; }
.call { border-top: 1px solid #cbd2c9; padding: 12px 0; overflow-wrap: anywhere; }
#error { position: sticky; bottom: 16px; margin: 16px 28px; padding: 16px; background: #ffe3d5; color: #742c20; border-radius: 12px; }
/* Edge-to-edge call stage; the pre-join screen keeps its normal layout. */
body.in-call { background: #17201c; overflow: hidden; }
body.in-call > header { display: none; }
main.in-call { margin: 0; padding: 0; max-width: none; }
main.in-call > .muted:not([role=status]) { display: none; }
main.in-call > .room-title { position: fixed; z-index: 2; top: 12px; left: 12px; max-width: calc(100% - 24px); margin: 0; padding: 6px 10px; border-radius: 8px; color: #fff; background: #17201ca8; font-size: 18px; line-height: 1.3; letter-spacing: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.in-call > [role=status] { position: fixed; z-index: 2; top: 54px; left: 12px; max-width: calc(100% - 24px); margin: 0; padding: 5px 10px; border-radius: 8px; color: #fff; background: #17201ca8; font-size: 13px; pointer-events: none; }
.in-call .videos { position: fixed; inset: 0; height: 100vh; height: 100dvh; padding: 0; gap: 4px; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); grid-auto-rows: minmax(0, 1fr); overflow: auto; }
.in-call .tile { border-radius: 0; min-height: 0; }
.in-call .tile video { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: contain; }
.in-call .camera-off { height: 100%; aspect-ratio: auto; }
.in-call .tile > span { bottom: 88px; }
.in-call .toolbar { position: fixed; z-index: 3; bottom: max(20px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 24px); justify-content: center; gap: 8px; padding: 10px; border-radius: 18px; background: #17201ce8; box-shadow: 0 4px 24px #0004; }
.in-call .toolbar button { padding: 9px 13px; }
.in-call .toolbar button.device-button { padding: 0; }
.in-call .invite-box:not(:empty) { position: fixed; z-index: 5; top: 16px; left: 50%; transform: translateX(-50%); width: min(620px, calc(100% - 32px)); padding: 16px; margin: 0; border-radius: 16px; background: #f6f5eff5; box-shadow: 0 4px 24px #0004; }
body.in-call #error { position: fixed; z-index: 6; bottom: 100px; }
[hidden] { display: none !important; }
@media (max-width: 600px) { nav { justify-content: flex-end; } nav .account-name { display: none; } main { margin-top: 10px; } .in-call .tile > span { bottom: 140px; } }
