@font-face {
  font-family: Geologica;
  src: url("/assets/GeologicaRemeet-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Geologica;
  src: url("/assets/GeologicaRemeet-Medium.ttf") format("truetype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: Geologica;
  src: url("/assets/GeologicaRemeet-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600 850;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f4f2ed;
  --surface: #fffdf9;
  --surface-alt: #f7f3ee;
  --ink: #342e2a;
  --muted: #675f58;
  --border: #ded8cf;
  --brand: #a03f21;
  --brand-hover: #843419;
  --peach: #f1ded1;
  --sage: #486341;
  --sage-soft: #e7eddf;
  --danger: #932f24;
  --night: #262b29;
  --shadow: 0 18px 54px rgb(63 44 27 / 8%);
  --radius: 22px;
  --gap: clamp(14px, 2vw, 28px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  font-family: Geologica, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 100%;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; min-height: 100vh; min-height: 100svh; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; }
img, video, canvas, svg { max-width: 100%; }
img, video { display: block; }
svg { flex: 0 0 auto; }
a { color: var(--brand); text-underline-offset: .17em; }
h1, h2, h3, h4, p { margin: 0; overflow-wrap: anywhere; }
h1, h2, h3, h4, strong { font-weight: 600; }
h1 { font-size: clamp(2rem, 4vw, 3.55rem); line-height: 1.07; letter-spacing: -.045em; }
h2 { font-size: clamp(1.3rem, 2.6vw, 2.125rem); line-height: 1.15; letter-spacing: -.028em; }
h3 { font-size: 1.125rem; line-height: 1.25; letter-spacing: -.015em; }
small, .muted { color: var(--muted); }
small { font-size: .84rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
[hidden], .hide { display: none !important; }

.shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100vh; min-height: 100svh; }
.rail {
  position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; gap: 36px;
  min-width: 0; height: 100vh; height: 100dvh; overflow-y: auto; padding: max(29px, var(--safe-top)) 16px max(22px, var(--safe-bottom));
  border-inline-end: 1px solid var(--border); background: var(--surface);
}
.brand {
  display: inline-flex; align-items: center; align-self: flex-start; gap: 10px; min-height: 44px;
  color: var(--ink); text-decoration: none; font-size: 1.26rem; font-weight: 600; letter-spacing: -.035em;
}
.brand img { width: 37px; height: 37px; flex: 0 0 auto; border-radius: 11px; }
.brand small { display: block; font-size: .72rem; font-weight: 400; letter-spacing: .015em; }
.nav { display: grid; gap: 5px; }
.nav a, .nav button, .phone-nav a, .phone-nav button {
  display: flex; align-items: center; gap: 9px; min-width: 0; min-height: 44px; padding: 9px 12px;
  border: 0; border-radius: 13px; background: transparent; color: var(--muted); text-decoration: none;
  font-size: .93rem; line-height: 1.3; font-weight: 500; text-align: start; overflow-wrap: anywhere;
}
.nav .active, .nav [aria-current="page"], .phone-nav .active, .phone-nav [aria-current="page"] {
  color: var(--brand); background: var(--peach);
}
.main { width: 100%; max-width: 1540px; min-width: 0; margin: 0 auto; padding: clamp(24px, 3.5vw, 54px) clamp(18px, 3.2vw, 54px) max(44px, var(--safe-bottom)); }
.top, .row, .actions, .live-state { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; min-width: 0; }
.top { justify-content: space-between; align-items: flex-end; gap: var(--gap); margin-bottom: var(--gap); }
.top > *, .row > *, .actions > * { min-width: 0; }
.eyebrow { color: var(--brand); font-weight: 500; font-size: .82rem; letter-spacing: .04em; }
.eyebrow + :is(h1, h2, h3) { margin-top: .42rem; }
.stack { display: grid; gap: 14px; min-width: 0; align-content: start; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 255px), 1fr)); gap: var(--gap); }
.cards > .card + .card { margin-block-start: 0; }
.card, .side, .dialog, .welcome {
  min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
}
.card, .welcome { padding: clamp(18px, 2.4vw, 32px); }
.card > :is(p, h2, h3) + :is(p, .row, .actions, .list, .form),
.welcome > :is(p, h1, h2, h3) + :is(p, .row, .actions, .form) { margin-top: 12px; }
.card > :is(.row, .list) + .actions, .hero > .actions { margin-top: 18px; }
.hero {
  position: relative; isolation: isolate; overflow: hidden; padding: clamp(26px, 4.5vw, 72px);
  border: 1px solid #e5cdbd; border-radius: calc(var(--radius) + 5px); background: #f2dfcd;
}
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; top: -42%; right: -15%;
  width: 51%; height: 148%; border: 1px solid rgb(160 63 33 / 19%); border-radius: 50%; transform: rotate(28deg);
}
.hero::after { right: -12%; transform: rotate(38deg); }
.hero h1, .hero h2, .hero p { max-width: 40rem; }
.hero > p { margin-top: 10px; }
.hero + :is(.cards, .card, .room-grid), .cards + :is(.card, .cards, .room-grid), .card + .card { margin-top: var(--gap); }

.form, .field { display: grid; gap: 7px; min-width: 0; }
.form { gap: 16px; align-content: start; }
.field { color: var(--ink); font-size: .93rem; }
.field > label, label.field { font-weight: 500; }
.field small { font-weight: 400; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
select, textarea {
  display: block; width: 100%; min-width: 0; min-height: 46px; padding: 10px 13px; border: 1px solid #cfc6bb;
  border-radius: 13px; color: var(--ink); background: #fffefa; font-size: 1rem; font-weight: 400; line-height: 1.4;
}
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #766d65; opacity: 1; }
input[type="checkbox"], input[type="radio"], input[type="range"] { accent-color: var(--brand); }
input[type="checkbox"], input[type="radio"] { width: 1.15em; height: 1.15em; vertical-align: -.18em; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--danger); }
.actions { gap: 9px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; max-width: 100%;
  padding: 10px 17px; border: 1px solid transparent; border-radius: 14px;
  background: var(--brand); color: #fffdf9; font-size: .96rem; line-height: 1.32; font-weight: 500; text-decoration: none;
  text-align: center; overflow-wrap: anywhere; transition: background-color 150ms ease, border-color 150ms ease, transform 140ms ease;
}
.btn.secondary { background: var(--peach); color: var(--brand-hover); }
.btn.ghost { background: transparent; color: var(--brand); border-color: var(--border); }
.btn.danger { background: #f6e4df; color: var(--danger); border-color: #dfb4aa; }
.btn.small { min-height: 44px; padding: 7px 12px; font-size: .86rem; }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn:disabled, .btn[aria-disabled="true"] { color: #69635d; background: #e8e2dc; border-color: #ddd6cd; box-shadow: none; }
.chip, .live-state {
  display: inline-flex; flex-wrap: nowrap; align-items: center; gap: 6px; width: fit-content; max-width: 100%; padding: 4px 10px;
  border-radius: 99px; background: var(--peach); color: var(--brand-hover); font-size: .8rem; line-height: 1.45; font-weight: 500;
}
.chip.ok, .live-state.ok { color: #3e5637; background: var(--sage-soft); }
.chip.warn, .live-state.warn { color: #724e1d; background: #f5e9cf; }
.alert { min-width: 0; padding: 12px 14px; border: 1px solid #e1c7b7; border-radius: 13px; background: #f7e9df; color: #733c25; overflow-wrap: anywhere; }
.alert:empty { display: none; }

.room-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(255px, .85fr); align-items: start; gap: var(--gap); }
.room-grid > * { min-width: 0; }
.stage {
  position: relative; isolation: isolate; display: grid; place-items: center; align-content: center; width: 100%; min-width: 0;
  aspect-ratio: 16/9; border: 1px solid #474944; border-radius: var(--radius); overflow: hidden;
  background: var(--night); color: #f8f4ed;
}
.screen { display: grid; place-items: center; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; }
.stage > .screen { position: absolute; inset: 0; }
.screen video, video.screen, .stage > video:not(.hostcam):not(.speaker-cam) { width: 100%; height: 100%; object-fit: contain; }
.stage > video:not(.hostcam):not(.speaker-cam) { position: absolute; inset: 0; }
.hostcam, .speaker-cam {
  position: absolute; z-index: 2; bottom: 12px; width: clamp(56px, 19%, 170px); aspect-ratio: 16/10;
  display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 42%); border-radius: 12px;
  overflow: hidden; background: #373c37; color: white; object-fit: cover;
}
.hostcam { right: 12px; }
.speaker-cam { left: 12px; }
.hostcam video, .speaker-cam video { width: 100%; height: 100%; object-fit: cover; }
:is(div, span).hostcam:empty, :is(div, span).speaker-cam:empty { display: none; }
.poster { display: grid; align-content: center; justify-items: center; gap: 8px; padding: 18px; min-width: 0; max-width: 100%; text-align: center; }
.stage .poster { position: relative; z-index: 0; color: #f5efe6; pointer-events: none; }
.stage .poster small, .stage .poster .muted { color: #d3cfc6; }
.stage[data-has-screen="true"] .poster, .stage[data-has-host-camera="true"] .poster,
.stage[data-has-speaker-camera="true"] .poster { display: none; }
.stage[data-has-host-camera="true"]:not([data-has-screen="true"]) .hostcam,
.stage[data-has-speaker-camera="true"]:not([data-has-screen="true"]):not([data-has-host-camera="true"]) .speaker-cam {
  inset: 0; width: 100%; height: 100%; aspect-ratio: auto; border: 0; border-radius: 0; background: transparent;
}
.stage[data-has-host-camera="true"]:not([data-has-screen="true"]) .hostcam video,
.stage[data-has-speaker-camera="true"]:not([data-has-screen="true"]):not([data-has-host-camera="true"]) .speaker-cam video { object-fit: contain; }
.stage .other-audio { position: absolute; width: 0; height: 0; overflow: hidden; }
.poster img { width: min(64px, 18%); border-radius: 16px; }
.avbar, .recbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.avbar { padding: 11px 0; }
.recbar { border: 1px solid var(--border); border-radius: 15px; padding: 10px 12px; background: var(--surface-alt); }
.recbar select, .recbar .field { width: auto; max-width: 100%; }
.side { display: flex; flex-direction: column; gap: 12px; padding: clamp(14px, 1.8vw, 22px); }
.room-grid .side { container: side-panel / inline-size; }
.tabs { display: flex; align-items: stretch; gap: 3px; min-width: 0; padding: 3px; border-radius: 14px; background: var(--surface-alt); }
.tab {
  display: inline-flex; align-items: center; justify-content: center; flex: 1 1 0; min-width: 0; min-height: 44px; padding: 7px 8px;
  border: 0; border-radius: 11px; background: transparent; color: var(--muted); line-height: 1.22; font-size: .9rem;
  font-weight: 500; text-decoration: none; text-align: center; overflow-wrap: anywhere;
}
.tab.active, .tab[aria-selected="true"] { color: var(--brand-hover); background: var(--peach); }
@container side-panel (max-width: 410px) {
  .tabs:has(> :nth-child(4)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (hover: hover) {
  .tabs .btn.tab:hover:not(:disabled) { color: var(--brand-hover); background: #ead8c9; }
}
.list { display: grid; align-content: start; min-width: 0; }
.side .list { max-height: 48vh; max-height: 48svh; overflow-y: auto; scrollbar-gutter: stable; }
.entry, .msg { min-width: 0; padding: 12px 0; overflow-wrap: anywhere; }
.entry { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.entry + .entry, .msg + .msg { border-top: 1px solid var(--border); }
.entry > :not(.avatar, .btn) { min-width: 0; }
.entry .btn { margin-inline-start: auto; }
.avatar {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 12px;
  background: var(--peach); color: var(--brand-hover); font-size: .88rem; font-weight: 600; object-fit: cover;
}
.msg p { margin-top: 3px; white-space: pre-wrap; }
.composer { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; min-width: 0; }
.composer textarea, .composer input, .composer .field { flex: 1 1 8rem; min-width: 0; }
.composer textarea { max-height: 8rem; min-height: 46px; }
.composer .btn { flex: 0 1 auto; }
.guest { width: 100%; max-width: 1380px; min-width: 0; margin: 0 auto; padding: max(22px, var(--safe-top)) clamp(14px, 3.5vw, 54px) max(30px, var(--safe-bottom)); }
.guest > .brand { margin-bottom: var(--gap); }
.welcome { width: min(100%, 620px); margin-inline: auto; box-shadow: var(--shadow); }
.welcome:has(> .poster) {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); width: min(100%, 940px);
  overflow: hidden; padding: 0; align-items: stretch;
}
.welcome > .poster {
  position: relative; isolation: isolate; overflow: hidden; gap: 18px;
  padding: clamp(25px, 4.2vw, 55px); background: #f2e3d6; color: #4f3429;
}
.welcome > .poster::before, .welcome > .poster::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none; width: 134%; height: 66%;
  border: 1px solid rgb(141 73 45 / 17%); border-radius: 50%; transform: rotate(-25deg);
}
.welcome > .poster::after { transform: rotate(-32deg); width: 130%; }
.welcome > .entry-card, .welcome > .welcome-body {
  align-self: center; margin: 0; border: none; border-radius: 0; padding: clamp(23px, 4.4vw, 48px); background: var(--surface);
}
.welcome > .poster :is(h1, h2) { font-size: clamp(1.55rem, 3.6vw, 2.6rem); }
.welcome > .entry-card :is(h1, h2) { font-size: clamp(1.45rem, 3.6vw, 2.25rem); }
.welcome > .entry-card.stack > * { margin-block-start: 0; }
.entry-card h2[tabindex="-1"]:focus { outline: none; }
.optional-contact > summary {
  display: flex; align-items: center; gap: 9px; min-height: 44px; width: fit-content; max-width: 100%;
  color: var(--brand); font-size: .92rem; font-weight: 500; cursor: pointer; list-style: none;
}
.optional-contact > summary::-webkit-details-marker { display: none; }
.optional-contact > summary::before {
  content: ""; width: .5rem; height: .5rem; flex: 0 0 auto; margin-inline: 3px 2px; border-right: 2px solid;
  border-bottom: 2px solid; transform: rotate(-45deg); transition: transform 160ms ease;
}
.optional-contact[open] > summary::before { transform: rotate(45deg); }
.optional-contact[open] > .field { margin-top: 4px; }
.welcome > .entry-card .actions .btn:only-child { width: 100%; }
.overlay { position: fixed; z-index: 20; inset: 0; display: grid; align-items: safe center; justify-items: center; padding: max(16px, var(--safe-top)) 14px max(16px, var(--safe-bottom)); overflow: auto; background: rgb(37 31 27 / 36%); }
.dialog { width: min(100%, 520px); max-height: calc(100vh - 32px); max-height: calc(100dvh - max(16px, var(--safe-top)) - max(16px, var(--safe-bottom))); overflow-y: auto; padding: clamp(20px, 3vw, 32px); color: var(--ink); box-shadow: var(--shadow); }
dialog.dialog { margin: auto; }
dialog.dialog::backdrop { background: rgb(37 31 27 / 36%); }
.dialog > :is(h2, h3, p) + :is(p, .form, .actions, .stack, .list) { margin-top: 14px; }
.phone-nav { display: none; }

@media (min-width: 761px) and (min-height: 541px) {
  .guest:has(> .welcome) { display: grid; align-content: center; min-height: 100vh; min-height: 100svh; }
}
@media (hover: hover) {
  .btn:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--brand-hover); }
  .btn.secondary:hover:not(:disabled) { background: #e9cdbb; }
  .btn.ghost:hover:not(:disabled), .nav :is(a, button):hover { background: var(--surface-alt); }
  .btn.danger:hover:not(:disabled) { background: #efd2ca; }
}
@media (max-width: 1160px) {
  .shell { grid-template-columns: 169px minmax(0, 1fr); }
  .main { padding-inline: clamp(17px, 2.2vw, 30px); }
}
@media (max-width: 920px) {
  .shell { display: block; }
  .rail { position: static; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; width: 100%; height: auto; padding: max(9px, var(--safe-top)) max(16px, env(safe-area-inset-right)) 9px max(16px, env(safe-area-inset-left)); border-inline-end: 0; border-bottom: 1px solid var(--border); }
  .nav { display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .rail .brand { align-self: center; }
}
@media (max-width: 760px) {
  :root { --gap: 15px; --radius: 18px; }
  .main, .guest { padding-inline: max(14px, env(safe-area-inset-left)) max(14px, env(safe-area-inset-right)); }
  .main { padding-block-start: 19px; }
  .room-grid { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 23px; }
  .phone-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding-block: 4px; }
  .rail { flex-wrap: wrap; }
  .rail:has(.phone-nav) .nav, .shell:has(.phone-nav) .rail .nav { display: none; }
  .shell > .phone-nav { padding-inline: 12px; }
  .nav { justify-content: flex-start; gap: 2px; }
  .nav :is(a, button), .phone-nav :is(a, button) { padding-inline: 9px; }
  .top { align-items: flex-start; gap: 12px; }
  .side .list { max-height: 45vh; max-height: 45svh; }
  .stage { border-radius: 16px; }
  .avbar { padding: 8px 0; }
  .hostcam, .speaker-cam { bottom: 7px; border-radius: 8px; }
  .hostcam { right: 7px; }
  .speaker-cam { left: 7px; }
  .guest > .brand { margin-bottom: 14px; }
  .welcome:has(> .poster) { max-width: 620px; grid-template-columns: minmax(0, 1fr); }
  .welcome > .poster { gap: 9px; padding: 18px; }
  .welcome > .entry-card, .welcome > .welcome-body { padding: 20px; }
}
@media (max-width: 440px) {
  .card, .welcome, .side { padding: 15px; }
  .rail .brand { gap: 7px; font-size: 1.1rem; }
  .rail .brand img { width: 32px; height: 32px; border-radius: 9px; }
  .avbar, .actions, .recbar { gap: 6px; }
  .avbar .btn, .actions .btn, .recbar .btn { padding-inline: 11px; }
  .composer .btn { padding-inline: 10px; }
  .tab { padding-inline: 5px; font-size: .85rem; }
}
@media (orientation: landscape) and (max-height: 540px) {
  .rail { position: static; height: auto; }
  .stage { max-height: 75vh; max-height: 75svh; }
  .side .list { max-height: 54vh; max-height: 54svh; }
  .overlay { align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .btn:active:not(:disabled) { transform: none; }
}
@media (forced-colors: active) {
  .btn, .tab, .chip, .avatar { border: 1px solid ButtonText; }
  :focus-visible { outline: 3px solid Highlight; }
}
#feedback { position:fixed; z-index:30; bottom:max(1rem, env(safe-area-inset-bottom)); left:50%; transform:translateX(-50%); width:max-content; max-width:min(38rem,92vw); background:#322b26; color:white; border-radius:1rem; padding:.8rem 1.15rem; box-shadow:0 5px 24px #2b211333; }
dialog.live-dialog { width:min(34rem,94vw); max-height:90dvh; padding:clamp(1rem,4vw,2rem); border:0; border-radius:1.4rem; background:#fcfaf7; overflow:auto; color:#302b27; }
dialog.live-dialog::backdrop {background:#2f261e6b}
.live-dialog h2 {margin:0 0 1rem} .live-dialog .actions {margin-top:1rem}
.live-dialog .qr-image {display:block; width:min(100%,275px); margin:12px auto; image-rendering:pixelated}
.room-rail {margin-block:8px 16px} .room-title {overflow-wrap:anywhere}
.room-grid .side .list {overflow-y:auto; overscroll-behavior:contain; max-height:min(52vh,32rem)}
.side .scroll-list {min-height:4rem} .room-room .recbar {margin-block:8px}
.entry .align {margin-inline-start:auto} .msg div {white-space:pre-wrap;overflow-wrap:anywhere}
.studio-link {color:#8d371c;text-decoration:underline} .avatar-tiny {width:34px;height:34px}
.side .composer textarea {width:100%;min-height:44px;resize:vertical}
[hidden]{display:none!important}
