:root {
  color-scheme: light dark;
  --bg: #f5f5ef;
  --paper: #fffefa;
  --fg: #182b29;
  --muted: #50615b;
  --line: #ccd4c7;
  --accent: #035949;
  --soft: #dfebe1;
  --on: #fff;
  --stage: #113f37;
  --lime: #d9f778;
  font:
    clamp(15px, 0.92vw, 30px) / 1.48 system-ui,
    sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111b19;
    --paper: #192622;
    --fg: #edf4e9;
    --muted: #b4c4bb;
    --line: #384b42;
    --accent: #caed87;
    --soft: #2b3d32;
    --on: #17221c;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
button,
input,
select {
  font: inherit;
}
button,
.brand {
  touch-action: manipulation;
}
button {
  background: var(--paper);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  padding: 0.6rem 1rem;
  font-weight: 620;
  cursor: pointer;
}
button:hover {
  filter: brightness(0.93);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #4999ed;
  outline-offset: 3px;
}
header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem clamp(1rem, 5vw, 7rem);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  color: var(--fg);
  font-weight: 720;
  letter-spacing: -0.065em;
  font-size: 1.55rem;
  text-decoration: none;
}
.brandmark {
  width: 1.56em;
  height: 1.56em;
  background: var(--stage);
  color: var(--lime);
  border-radius: 33%;
  display: grid;
  place-content: center;
  font-size: 1.2em;
}
.brandmark::first-letter {
  font-weight: 900;
}
#connection {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.85rem;
}
i {
  background: #6bb789;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 100%;
}
main {
  width: min(80rem, 100%);
  margin: auto;
  padding: clamp(1rem, 4vw, 4rem);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: clamp(2.4rem, 5.5vw, 5.4rem);
  font-weight: 540;
  letter-spacing: -0.071em;
  line-height: 1.07;
}
.intro p,
.meetinghead p {
  color: var(--muted);
  margin: 0.75rem 0 1.8rem;
}
.setup {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: clamp(1rem, 3vw, 3rem);
  align-items: stretch;
}
.preview,
.tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--stage);
  border-radius: 1.1rem;
  color: white;
  display: grid;
  place-items: center;
  min-height: 14rem;
}
.scope {
  position: absolute;
  inset: 0;
  opacity: 0.65;
  background: repeating-radial-gradient(
    ellipse at 50% 60%,
    transparent 0 1.34rem,
    #40745c 1.38rem,
    transparent 1.43rem 2.8rem
  );
  transform: rotate(-18deg) scale(1.6);
}
.monogram,
.avatar {
  border: 1px solid #85ae83;
  border-radius: 50%;
  background: #1c5448;
  color: var(--lime);
  font-size: 3rem;
  letter-spacing: -0.05em;
  display: grid;
  place-content: center;
  width: 5.6rem;
  height: 5.6rem;
  z-index: 1;
}
.tilelabel,
.videoState,
.caption {
  position: absolute;
  z-index: 3;
  bottom: 0.85rem;
  background: #102a25dc;
  border-radius: 0.52rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.85rem;
}
.tilelabel,
.caption {
  left: 0.85rem;
}
.videoState {
  right: 0.85rem;
}
.preview video,
.tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  background: #102923;
}
.preview video {
  transform: scaleX(-1);
}
#joinForm,
dialog {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.5rem;
  border-radius: 1rem;
}
label,
legend {
  font-weight: 600;
  font-size: 0.92rem;
}
input:not([type="checkbox"]),
select {
  width: 100%;
  padding: 0.68rem 0.8rem;
  border: 1px solid var(--line);
  color: var(--fg);
  background: var(--bg);
  border-radius: 0.55rem;
  margin: 0.4rem 0 0.9rem;
}
input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}
.check,
.checks label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.check label,
.checks label {
  font-weight: 450;
}
fieldset {
  padding: 0;
  border: 0;
  margin: 1.2rem 0;
}
legend {
  margin-bottom: 0.5rem;
}
.actions,
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.primary {
  color: var(--on);
  background: var(--accent);
  border: 0;
  width: 100%;
  padding: 0.85rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.textbtn {
  display: block;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.87rem;
  margin: 0.5rem auto 0;
}
.meetinghead,
.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}
.meetinghead h1 {
  font-size: 2.6rem;
}
.meetinghead p {
  margin: 0.15rem 0 0;
}
#meeting {
  width: 100%;
  flex: 1;
}
#tiles {
  margin: 1.25rem 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 0.7rem;
}
.tile {
  aspect-ratio: 16/10;
  min-height: 0;
}
.tile.screen {
  grid-column: 1/-1;
  aspect-ratio: 16/9;
  background: #101814;
}
.screen video {
  object-fit: contain;
}
.avatar {
  font-size: 2rem;
  width: 4rem;
  height: 4rem;
}
nav {
  position: sticky;
  bottom: 0.5rem;
  justify-content: center;
  width: fit-content;
  margin: auto;
  padding: 0.6rem;
  background: var(--soft);
  border-radius: 1rem;
  border: 1px solid var(--line);
  z-index: 5;
}
#leave {
  color: #932e29;
  background: #ffe1da;
}
.on {
  background: var(--soft);
  border-color: var(--accent);
}
dialog {
  max-height: 90svh;
  width: min(28rem, 94%);
  color: var(--fg);
}
dialog::backdrop {
  background: #08161199;
}
.dialoghead,
.checks {
  margin-bottom: 1rem;
}
.checks {
  display: grid;
  gap: 0.45rem;
  margin-top: 1rem;
}
dialog small {
  display: block;
  color: var(--muted);
}
#notice:not(:empty) {
  position: fixed;
  z-index: 20;
  bottom: 5.5rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.65rem 1rem;
  background: #1c322e;
  color: #fff;
  border-radius: 0.6rem;
  width: max-content;
  max-width: 92vw;
}
footer {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  .setup {
    grid-template-columns: 1fr;
  }
  .preview {
    min-height: 10rem;
    aspect-ratio: 16/8;
  }
  .intro p {
    margin-bottom: 1rem;
  }
  #joinForm {
    padding: 1rem;
  }
  header,
  footer {
    padding: 0.8rem 1rem;
  }
  .meetinghead {
    flex-wrap: wrap;
  }
  .meetinghead h1 {
    font-size: 2rem;
  }
  nav button {
    font-size: 0.84rem;
    padding: 0.55rem;
  }
  .tile {
    max-height: 50svh;
  }
}
#tiles {
  grid-template-columns: repeat(
    auto-fit,
    minmax(min(100%, max(17rem, 23%)), 1fr)
  );
}
#tiles > .tile:only-child {
  max-height: 65svh;
  aspect-ratio: auto;
  height: clamp(12rem, 52vh, 38rem);
}
@media (min-width: 2200px) {
  :root {
    font-size: clamp(22px, 1.1vw, 100px);
  }
}
@media (max-width: 360px) {
  .brand {
    font-size: 1.25rem;
  }
  #connection {
    font-size: 0.75rem;
  }
  .meetinghead button {
    font-size: 0.8rem;
  }
  main {
    padding: 0.7rem;
  }
}
.preview,
#joinForm,
.setup > * {
  min-width: 0;
}
.preview {
  width: 100%;
}
@media (max-width: 360px) {
  .preview {
    min-height: 8rem;
  }
}
.sr,
.skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip:focus {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 30;
  padding: 0.75rem;
  background: var(--paper);
  color: var(--fg);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
#grantPanel,
#guestControls {
  padding: 1rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
}
#grantPanel button,
#guestControls button {
  margin: 0.25rem;
}
@media (forced-colors: active) {
  button[aria-pressed="true"] {
    border: 3px double Highlight;
  }
}
