:root {
  --hue: 262;
  --bg: oklch(0.972 0.003 var(--hue));
  --surface: oklch(0.995 0.001 var(--hue));
  --surface-2: oklch(0.958 0.004 var(--hue));
  --surface-3: oklch(0.935 0.005 var(--hue));
  --tile: oklch(0.928 0.006 var(--hue));
  --line: oklch(0.9 0.006 var(--hue));
  --line-soft: oklch(0.93 0.004 var(--hue));
  --text: oklch(0.24 0.012 var(--hue));
  --text-2: oklch(0.46 0.012 var(--hue));
  --text-3: oklch(0.6 0.01 var(--hue));
  --accent: oklch(0.56 0.15 var(--hue));
  --accent-hover: oklch(0.51 0.15 var(--hue));
  --accent-soft: oklch(0.948 0.026 var(--hue));
  --accent-ink: oklch(0.42 0.13 var(--hue));
  --danger: oklch(0.6 0.19 24);
  --danger-hover: oklch(0.55 0.19 24);
  --danger-soft: oklch(0.955 0.025 24);
  --danger-ink: oklch(0.52 0.18 24);
  --speak: oklch(0.7 0.15 158);
  --warn: oklch(0.8 0.13 80);
  --warn-soft: oklch(0.96 0.04 85);

  --shadow-color: 260 30% 20%;
  --shadow-xs: 0 1px 2px oklch(0.25 0.02 var(--hue) / 0.06);
  --shadow-sm: 0 1px 2px oklch(0.25 0.02 var(--hue) / 0.05), 0 2px 6px oklch(0.25 0.02 var(--hue) / 0.05);
  --shadow-md: 0 1px 3px oklch(0.25 0.02 var(--hue) / 0.05), 0 6px 16px oklch(0.25 0.02 var(--hue) / 0.06);
  --shadow-lg: 0 2px 6px oklch(0.25 0.02 var(--hue) / 0.04), 0 16px 40px oklch(0.25 0.02 var(--hue) / 0.09);
  --shadow-xl: 0 4px 10px oklch(0.25 0.02 var(--hue) / 0.04), 0 28px 70px oklch(0.25 0.02 var(--hue) / 0.12);

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.icon {
  display: block;
  flex: none;
}

[hidden] {
  display: none !important;
}

.screen {
  min-height: 100dvh;
}

/* ---------- Shared controls ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font-weight: 560;
  font-size: 14px;
  letter-spacing: -0.005em;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 160ms var(--ease), box-shadow 160ms var(--ease), transform 120ms var(--ease),
    color 160ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible,
.ctrl:focus-visible,
.icon-btn:focus-visible,
.input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px oklch(0.56 0.15 var(--hue) / 0.25);
}

.btn-primary {
  background: var(--accent);
  color: oklch(0.99 0.005 var(--hue));
  box-shadow: 0 1px 2px oklch(0.4 0.12 var(--hue) / 0.25), inset 0 1px 0 oklch(1 0 0 / 0.14);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line);
}

.btn-secondary:hover {
  background: var(--surface-2);
}

.btn-ghost {
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--surface-3);
  color: var(--text);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--text-2);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.icon-btn:hover {
  background: var(--surface-3);
  color: var(--text);
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 0;
  background: var(--surface);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line);
  transition: box-shadow 160ms var(--ease);
}

.input::placeholder {
  color: var(--text-3);
}

.input:focus {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--accent), 0 0 0 3px oklch(0.56 0.15 var(--hue) / 0.16);
}

.field-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 560;
  color: var(--text-2);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  padding-right: 34px;
  text-overflow: ellipsis;
  cursor: pointer;
}

.select-wrap .icon {
  position: absolute;
  right: 12px;
  top: 50%;
  translate: 0 -50%;
  color: var(--text-3);
  pointer-events: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 680;
  font-size: 17px;
  letter-spacing: -0.035em;
  color: var(--text);
  text-decoration: none;
}

/* A pat of butter: the top face over a slightly darker front edge. */
.brand-mark,
.home-pat {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg stroke-linejoin='round' stroke-width='5'%3E%3Cpath d='M8 30 32 41v10L8 40z' fill='%23eab53a' stroke='%23eab53a'/%3E%3Cpath d='M32 41 56 30v10L32 51z' fill='%23d99d22' stroke='%23d99d22'/%3E%3Cpath d='M8 30 32 19l24 11-24 11z' fill='%23fcdc72' stroke='%23fcdc72'/%3E%3C/g%3E%3Cpath d='M20 29.5 31 24.5' stroke='%23fff' stroke-opacity='.6' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.brand-mark {
  width: 28px;
  height: 28px;
}

/* ---------- Home ---------- */

.home {
  --butter: oklch(0.9 0.13 92);
  --butter-deep: oklch(0.8 0.14 82);
  --ink: oklch(0.22 0.01 80);
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  padding: 28px 40px;
  background:
    radial-gradient(60% 45% at 50% 38%, oklch(0.97 0.045 95 / 0.9), transparent 70%),
    oklch(0.988 0.006 95);
  color: var(--ink);
}

.home .brand {
  color: var(--ink);
}

.home-hero {
  align-self: center;
  justify-self: center;
  width: min(560px, 100%);
  padding: 24px 0 72px;
  text-align: center;
}

.home-pat {
  width: 112px;
  height: 112px;
  margin: 0 auto 28px;
  filter: drop-shadow(0 14px 14px oklch(0.55 0.1 75 / 0.16));
  animation: pat-in 700ms var(--ease-out) both;
}

@keyframes pat-in {
  from {
    opacity: 0;
    translate: 0 -10px;
  }
}

.home-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(38px, 5.6vw, 60px);
  line-height: 1.02;
  font-weight: 640;
  letter-spacing: -0.032em;
  text-wrap: balance;
}

.home-hero p {
  margin: 0 auto 36px;
  color: oklch(0.47 0.012 80);
  font-size: 17px;
  line-height: 1.55;
}

.home-new {
  height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  background: var(--ink);
  color: oklch(0.99 0.01 95);
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 1px 2px oklch(0.2 0.01 80 / 0.2), 0 8px 24px oklch(0.2 0.01 80 / 0.14);
}

.home-new:hover {
  background: oklch(0.3 0.012 80);
}

.home-new .icon {
  transition: translate 200ms var(--ease);
}

.home-new:hover .icon {
  translate: 3px 0;
}

.home-new:focus-visible {
  box-shadow: 0 0 0 3px oklch(0.988 0.006 95), 0 0 0 5px var(--butter-deep);
}

.home-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 14px;
  color: oklch(0.52 0.012 80);
}

.home-join input {
  width: 132px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: oklch(1 0 0 / 0.7);
  box-shadow: inset 0 0 0 1px oklch(0.9 0.012 85);
  font-size: 14px;
  transition: box-shadow 160ms var(--ease), width 220ms var(--ease);
}

.home-join input::placeholder {
  color: oklch(0.68 0.01 80);
}

.home-join input:focus {
  outline: none;
  width: 170px;
  box-shadow: inset 0 0 0 1px var(--butter-deep), 0 0 0 3px oklch(0.9 0.13 92 / 0.45);
}

.home-join button {
  height: 34px;
  padding: 0 4px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: oklch(0.8 0.14 82);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.home-join button:hover {
  text-decoration-color: currentColor;
}

.home-error {
  margin-top: 12px;
  min-height: 20px;
  color: var(--danger-ink);
  font-size: 13px;
}

.home-foot {
  justify-self: center;
  color: oklch(0.6 0.01 80);
  font-size: 13px;
}

/* ---------- Pre-join ---------- */

.prejoin {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100dvh;
  padding: 24px 32px;
}

.prejoin-body {
  align-self: center;
  justify-self: center;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 48px;
  align-items: center;
  width: min(1080px, 100%);
  padding-bottom: 48px;
}

.preview {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--tile);
  box-shadow: var(--shadow-xl);
}

.preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
  opacity: 0;
  transition: opacity 400ms var(--ease);
}

.preview.has-video video {
  opacity: 1;
}

.preview-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--text-2);
  font-size: 14px;
}

.preview-avatar {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background: oklch(0.85 0.06 var(--h, 262));
  color: oklch(0.38 0.09 var(--h, 262));
  font-size: 36px;
  font-weight: 620;
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px oklch(0.4 0.05 var(--h, 262) / 0.15), 0 10px 30px oklch(0.4 0.06 var(--h, 262) / 0.14);
  transition: background-color 300ms var(--ease), color 300ms var(--ease);
}

.preview-avatar:empty {
  display: none;
}

.preview.has-video .preview-empty {
  display: none;
}

.preview-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  display: flex;
  gap: 10px;
}

.preview-meter {
  position: absolute;
  left: 18px;
  bottom: 22px;
  display: flex;
  gap: 3px;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  background: oklch(0.99 0 0 / 0.78);
  backdrop-filter: blur(12px);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}

.preview-meter span {
  width: 4px;
  height: 6px;
  border-radius: 2px;
  background: var(--line);
  transition: height 80ms linear, background-color 80ms linear;
}

.preview-meter span.on {
  background: var(--speak);
}

.prejoin-side h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 660;
  letter-spacing: -0.03em;
}

.prejoin-side .sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 28px;
  color: var(--text-2);
}

.room-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 6px 0 10px;
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px var(--line);
  font-variant-numeric: tabular-nums;
  font-weight: 540;
  color: var(--text);
  letter-spacing: 0.01em;
}

.room-chip button {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  color: var(--text-3);
}

.room-chip button:hover {
  background: var(--surface-3);
  color: var(--text);
}

.pre-here {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 28px;
  margin: -14px 0 24px;
  color: var(--text-2);
  font-size: 13px;
}

.pre-here .faces {
  display: flex;
}

.pre-here .faces span {
  position: relative;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  margin-left: -7px;
  border-radius: 50%;
  background: oklch(0.86 0.055 var(--h));
  color: oklch(0.38 0.09 var(--h));
  font-size: 10px;
  font-weight: 650;
  box-shadow: 0 0 0 2px var(--bg);
}

.pre-here .faces span:first-child {
  margin-left: 0;
}

.prejoin-form {
  display: grid;
  gap: 16px;
}

.prejoin-devices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.prejoin-devices .input {
  height: 40px;
  font-size: 13px;
}

.prejoin-join {
  height: 50px;
  margin-top: 8px;
  font-size: 15px;
}

.prejoin-note {
  min-height: 20px;
  color: var(--text-3);
  font-size: 12.5px;
}

.prejoin-note.error {
  color: var(--danger-ink);
}

/* Round media toggles used in pre-join and the call bar */
.ctrl {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--line-soft);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease),
    transform 120ms var(--ease);
}

.ctrl:hover {
  background: var(--surface-2);
}

.ctrl:active {
  transform: scale(0.95);
}

.ctrl.off {
  background: var(--danger-soft);
  color: var(--danger-ink);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px oklch(0.88 0.05 24);
}

.ctrl.off:hover {
  background: oklch(0.93 0.035 24);
}

.ctrl.active {
  background: var(--accent-soft);
  color: var(--accent-ink);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px oklch(0.86 0.06 var(--hue));
}

.ctrl.hand-up {
  background: var(--warn-soft);
  color: oklch(0.5 0.12 70);
  box-shadow: var(--shadow-xs), inset 0 0 0 1px oklch(0.86 0.08 80);
}

.ctrl .dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--surface);
  transform: scale(0);
  transition: transform 200ms var(--ease-out);
}

.ctrl .dot.show {
  transform: scale(1);
}

.ctrl .count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--surface-3);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px var(--bg);
}

/* Tooltips */
[data-tip] {
  position: relative;
}

[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  translate: -50% 4px;
  padding: 6px 9px;
  border-radius: 8px;
  background: oklch(0.26 0.012 var(--hue));
  color: oklch(0.97 0.004 var(--hue));
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms var(--ease), translate 120ms var(--ease);
  z-index: 50;
}

[data-tip]:hover::after {
  opacity: 1;
  translate: -50% 0;
  transition-delay: 450ms;
}

[data-tip-pos='below']::after {
  bottom: auto;
  top: calc(100% + 10px);
  translate: -50% -4px;
}

/* ---------- Meeting ---------- */

.meeting {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: minmax(0, 1fr) 84px;
  height: 100dvh;
  overflow: hidden;
}

.stage-wrap {
  position: relative;
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  padding: 16px 16px 0;
}

.stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.tile {
  position: absolute;
  left: 0;
  top: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--tile);
  box-shadow: var(--shadow-sm);
  transition: transform 380ms var(--ease-out), width 380ms var(--ease-out), height 380ms var(--ease-out),
    box-shadow 200ms var(--ease), opacity 260ms var(--ease);
  will-change: transform;
  contain: layout paint;
}

.tile.entering {
  opacity: 0;
}

.tile.no-anim {
  transition: none;
}

.tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 260ms var(--ease);
  background: var(--tile);
}

.tile.fit video {
  object-fit: contain;
}

.tile.live video {
  opacity: 1;
}

.tile.self video {
  transform: scaleX(-1);
}

.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 0 transparent;
  transition: box-shadow 180ms var(--ease);
}

.tile.speaking::after {
  box-shadow: inset 0 0 0 2.5px var(--speak), inset 0 0 0 5px oklch(0.7 0.15 158 / 0.22);
}

.tile.speaking {
  box-shadow: var(--shadow-sm), 0 0 0 1px oklch(0.7 0.15 158 / 0.1), 0 6px 22px oklch(0.7 0.15 158 / 0.18);
}

.avatar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(120% 120% at 50% 30%, oklch(0.95 0.02 var(--h)), oklch(0.9 0.035 var(--h)));
  transition: opacity 260ms var(--ease);
}

.tile.live .avatar {
  opacity: 0;
}

.avatar span {
  display: grid;
  place-items: center;
  width: clamp(36px, 28%, 104px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: oklch(0.82 0.07 var(--h));
  color: oklch(0.36 0.09 var(--h));
  font-weight: 620;
  font-size: clamp(13px, 2.2vw, 34px);
  letter-spacing: -0.01em;
  box-shadow: 0 1px 2px oklch(0.4 0.05 var(--h) / 0.15), 0 8px 24px oklch(0.4 0.06 var(--h) / 0.12);
}

.tile.small .avatar span {
  width: 40%;
  font-size: 13px;
}

.tile.speaking .avatar span {
  animation: breathe 1.4s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    box-shadow: 0 0 0 0 oklch(0.7 0.15 158 / 0.35), 0 8px 24px oklch(0.4 0.06 var(--h) / 0.12);
  }
  50% {
    box-shadow: 0 0 0 10px oklch(0.7 0.15 158 / 0), 0 8px 24px oklch(0.4 0.06 var(--h) / 0.12);
  }
}

.nameplate {
  position: absolute;
  left: 10px;
  bottom: 10px;
  max-width: calc(100% - 20px);
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 9px;
  background: oklch(0.99 0.002 var(--hue) / 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: var(--shadow-xs);
  font-size: 12.5px;
  font-weight: 560;
  color: var(--text);
}

.nameplate .name {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.nameplate .mic {
  display: grid;
  place-items: center;
  color: var(--text-3);
}

.nameplate .mic.muted {
  color: var(--danger-ink);
}

.nameplate .mic.live {
  color: var(--speak);
}

.tile.small .nameplate {
  left: 6px;
  bottom: 6px;
  height: 24px;
  padding: 0 8px 0 6px;
  font-size: 11.5px;
}

.tile-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 9px;
  background: var(--warn-soft);
  color: oklch(0.45 0.11 70);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  animation: pop 320ms var(--ease-out);
}

.tile.small .tile-badge {
  top: 6px;
  left: 6px;
  height: 24px;
  padding: 0 6px;
}

.tile.small .tile-badge b {
  display: none;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(-4px);
  }
}

.tile-pin {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: oklch(0.99 0.002 var(--hue) / 0.82);
  backdrop-filter: blur(14px);
  color: var(--text-2);
  box-shadow: var(--shadow-xs);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease), color 160ms var(--ease);
}

.tile:hover .tile-pin,
.tile.pinned .tile-pin {
  opacity: 1;
  transform: none;
}

.tile.pinned .tile-pin {
  color: var(--accent);
}

.tile.small .tile-pin {
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
}

.tile-paused {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px 0 8px;
  border-radius: 9px;
  background: color-mix(in oklch, var(--surface) 88%, transparent);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  animation: pop 320ms var(--ease-out);
}

.tile.small .tile-paused {
  right: 6px;
  bottom: 6px;
  height: 24px;
  padding: 0 6px;
}

.tile.small .tile-paused b {
  display: none;
}

.tile-connecting {
  position: absolute;
  inset: auto 10px 10px auto;
  display: flex;
  gap: 3px;
}

.tile-connecting i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-3);
  animation: blink 1.2s infinite ease-in-out;
}

.tile-connecting i:nth-child(2) {
  animation-delay: 0.15s;
}

.tile-connecting i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes blink {
  0%,
  80%,
  100% {
    opacity: 0.25;
  }
  40% {
    opacity: 1;
  }
}

.screen-tile {
  background: oklch(0.955 0.004 var(--hue));
}

.screen-tile video {
  background: oklch(0.955 0.004 var(--hue));
}

.screen-tile .avatar {
  background: oklch(0.955 0.004 var(--hue));
}

.screen-tile .avatar span {
  display: none;
}

.screen-tile .nameplate .mic {
  color: var(--accent);
}

.tile.presenting .avatar,
.tile.presenting video {
  display: none;
}

.presenting-note {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 20px;
  text-align: center;
  color: var(--text-2);
  background: radial-gradient(120% 100% at 50% 0%, var(--accent-soft), var(--surface-2));
}

.presenting-note .icon {
  margin-bottom: 8px;
  color: var(--accent);
}

.presenting-note strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 640;
  letter-spacing: -0.015em;
}

.presenting-note .btn {
  margin-top: 14px;
  height: 38px;
}

.tile.small .presenting-note {
  gap: 2px;
  font-size: 11px;
}

.tile.small .presenting-note .icon,
.tile.small .presenting-note span,
.tile.small .presenting-note .btn {
  display: none;
}

.tile.small .presenting-note strong {
  font-size: 12px;
}

.more-tile {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
}

.more-tile strong {
  font-size: 22px;
  font-weight: 640;
  color: var(--text);
  letter-spacing: -0.02em;
}

.more-tile:hover {
  background: var(--surface-3);
}

.pager {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line-soft);
  transition: opacity 200ms var(--ease), transform 160ms var(--ease), background-color 160ms var(--ease);
}

.pager:hover {
  background: var(--surface-2);
}

.pager:active {
  transform: scale(0.94);
}

.pager.prev {
  left: 26px;
}

.pager.next {
  right: 26px;
}

.pager:disabled {
  opacity: 0;
  pointer-events: none;
}

.page-dots {
  position: absolute;
  left: 50%;
  bottom: 0;
  translate: -50% 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px;
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 11.5px;
  font-weight: 560;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.page-dots i {
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  transition: width 220ms var(--ease-out), background-color 220ms var(--ease);
}

.page-dots i.on {
  width: 16px;
  background: var(--accent);
}

/* Bottom bar */

.bar {
  min-width: 0;
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
}

.bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--text-2);
  font-size: 13.5px;
}

.bar-left .time {
  font-weight: 560;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.bar-left .sep {
  width: 1px;
  height: 16px;
  background: var(--line);
}

.bar-left .code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.net-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 13px;
  background: var(--warn-soft);
  color: oklch(0.46 0.1 70);
  font-size: 12px;
  font-weight: 560;
}

.bar-center {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line-soft);
}

.bar-right {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.bar .divider {
  width: 1px;
  height: 24px;
  margin: 0 6px;
  background: var(--line);
}

.leave {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 18px 0 16px;
  border-radius: 15px;
  background: var(--danger);
  color: oklch(0.99 0.005 24);
  font-weight: 600;
  box-shadow: 0 1px 2px oklch(0.45 0.15 24 / 0.3), inset 0 1px 0 oklch(1 0 0 / 0.14);
}

.leave:hover {
  background: var(--danger-hover);
}

/* Call bar: the center controls sit flat inside one toolbar, the right ones are ghost buttons */
.bar .ctrl {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
}

.bar .ctrl:hover {
  background: var(--surface-3);
}

.bar .ctrl.off {
  background: var(--danger-soft);
}

.bar .ctrl.off:hover {
  background: oklch(0.93 0.035 24);
}

.bar .ctrl.active {
  background: var(--accent-soft);
}

.bar .ctrl.hand-up {
  background: var(--warn-soft);
}

.bar .ctrl .dot {
  box-shadow: 0 0 0 2px var(--bg);
}

.bar .leave {
  height: 44px;
  border-radius: 13px;
}

/* Reactions: the menu above the toolbar button, and the layer the emoji fly on */
.react-wrap,
.tools-wrap {
  position: relative;
  display: flex;
}

.react-menu,
.tools-menu {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  display: flex;
  gap: 2px;
  padding: 5px;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-soft);
  transform-origin: 50% 100%;
  transform: translate(-50%, 6px) scale(0.96);
  opacity: 0;
  visibility: hidden;
  z-index: 40;
  transition: opacity 120ms var(--ease), transform 120ms var(--ease), visibility 0s linear 120ms;
}

.react-menu.open,
.tools-menu.open {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), visibility 0s;
}

.react-menu.instant,
.tools-menu.instant {
  transition: none;
}

/* The menu replaces the button's tooltip while open. */
#c-react[aria-expanded='true']::after,
#c-tools[aria-expanded='true']::after {
  display: none;
}

.react-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 24px;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  transition: background-color 160ms var(--ease), translate 160ms var(--ease-out);
}

.react-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px oklch(0.56 0.15 var(--hue) / 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .react-btn:hover {
    background: var(--surface-3);
    translate: 0 -2px;
  }
}

.reactions {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  z-index: 60;
}

/* Each particle is a zero-size point at (x, y) moved by its transform; content is
   centered on that point so scale and rotation pivot on the emoji itself. */
.rx {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
}

.rx-body {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rx-e {
  display: block;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  font-size: 34px;
  line-height: 1;
  white-space: nowrap;
}

.rx > .rx-e {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
}

.rx-big > .rx-e {
  font-size: 56px;
}

.rx-ring::before {
  content: '';
  position: absolute;
  left: -40px;
  top: -40px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--warn);
}

.rx-name {
  max-width: 160px;
  padding: 2px 8px;
  border-radius: 999px;
  background: oklch(0.26 0.012 var(--hue) / 0.82);
  color: oklch(0.97 0.004 var(--hue));
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Side panel */

.panel {
  grid-column: 2;
  grid-row: 1;
  width: 0;
  min-height: 0;
  padding: 16px 16px 0 0;
  overflow: hidden;
}

.panel.open {
  width: 376px;
}

.panel-card {
  display: flex;
  flex-direction: column;
  width: 360px;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line-soft);
  overflow: hidden;
  animation: panel-in 320ms var(--ease-out);
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateX(16px);
  }
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 12px 0 20px;
  flex: none;
}

.panel-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.panel-head h3 span {
  margin-left: 6px;
  color: var(--text-3);
  font-weight: 500;
}

.panel-tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-2);
}

.panel-tabs button {
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 560;
  color: var(--text-2);
  transition: background-color 160ms var(--ease), color 160ms var(--ease), box-shadow 160ms var(--ease);
}

.panel-tabs button.on {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.panel-search {
  position: relative;
  padding: 0 16px 10px;
}

.panel-search .icon {
  position: absolute;
  left: 28px;
  top: 12px;
  color: var(--text-3);
}

.panel-search .input {
  height: 40px;
  padding-left: 38px;
  background: var(--surface-2);
  box-shadow: none;
}

.panel-search .input:focus {
  background: var(--surface);
}

.people-section {
  padding: 8px 20px 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 20px;
  transition: background-color 120ms var(--ease);
}

.person:hover {
  background: var(--surface-2);
}

.person .pav {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: oklch(0.88 0.05 var(--h));
  color: oklch(0.38 0.09 var(--h));
  font-size: 12.5px;
  font-weight: 620;
  position: relative;
}

.person.speaking .pav {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--speak);
}

.person .pname {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 520;
}

.person .pname small {
  margin-left: 6px;
  color: var(--text-3);
  font-weight: 450;
  font-size: 12.5px;
}

.person .pstate {
  display: flex;
  gap: 8px;
  color: var(--text-3);
}

.person .pstate .muted {
  color: var(--danger-ink);
}

.person .pstate .hand {
  color: oklch(0.6 0.13 70);
}

.empty-note {
  padding: 40px 28px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  line-height: 1.6;
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 16px 16px;
}

.msg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  animation: msg-in 260ms var(--ease-out);
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.msg-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin: 12px 4px 4px;
  font-size: 12px;
}

.msg-meta b {
  font-weight: 600;
  color: var(--text);
}

.msg-meta time {
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.msg-text {
  max-width: 92%;
  padding: 8px 12px;
  border-radius: 4px 14px 14px 14px;
  background: var(--surface-2);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.msg.mine {
  align-items: flex-end;
}

.msg.mine .msg-text {
  border-radius: 14px 4px 14px 14px;
  background: var(--accent-soft);
  color: oklch(0.3 0.06 var(--hue));
}

.msg.cont .msg-meta {
  display: none;
}

.msg.cont {
  margin-top: 2px;
}

.chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line-soft);
  flex: none;
}

.chat-form .input {
  height: 42px;
  background: var(--surface-2);
  box-shadow: none;
}

.chat-form .input:focus {
  background: var(--surface);
}

.chat-form .btn {
  width: 42px;
  height: 42px;
  padding: 0;
}

/* Toasts */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 100px;
  translate: -50% 0;
  z-index: 100;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 16px 0 12px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-soft);
  font-size: 13px;
  font-weight: 520;
  color: var(--text);
  animation: toast-in 380ms var(--ease-out);
  transition: opacity 240ms var(--ease), transform 240ms var(--ease);
}

.toast .icon {
  color: var(--text-3);
}

.toast.out {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
}

/* Ended */

.ended {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px;
  text-align: center;
}

.ended-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line-soft);
}

.ended h2 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 660;
  letter-spacing: -0.03em;
}

.ended p {
  margin: 0 0 28px;
  color: var(--text-2);
}

.ended .actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* Responsive */

/* Toolbox: a popover above its toolbar button, listing tools or showing one */
.tools-menu {
  display: block;
  padding: 0;
  overflow: hidden;
}

.tools-page {
  display: flex;
  flex-direction: column;
  padding: 6px;
}

.tools-list {
  width: 264px;
}

.tool-timer {
  width: 288px;
}

/* The page being morphed away from, pinned in place while the menu resizes. */
.tools-page.leaving {
  position: absolute;
  pointer-events: none;
}

.tools-head {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  padding: 0 8px;
  font-size: 13px;
  color: var(--text-2);
}

.tools-head b {
  font-weight: 600;
}

.tools-back {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -6px;
  border-radius: 8px;
  color: var(--text-2);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}

.tools-back:hover {
  background: var(--surface-3);
  color: var(--text);
}

.tool-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  text-align: left;
  color: var(--text-3);
  transition: background-color 160ms var(--ease);
}

.tool-item:hover,
.tool-item:focus-visible {
  outline: none;
  background: var(--surface-3);
}

.tool-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.tool-text {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
  font-size: 12.5px;
}

.tool-text b {
  font-size: 14px;
  font-weight: 560;
  color: var(--text);
}

.tool-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 8px 8px;
}

/* The timer view: a dial with the time, steppers either side */
.timer-dial {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px 0 4px;
}

.timer-face {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  height: 96px;
}

.timer-face.live {
  min-width: 0;
  width: 132px;
  height: 132px;
}

.timer-dial-ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  fill: none;
  stroke-width: 7;
}

.timer-dial-ring circle:first-child {
  stroke: var(--surface-3);
}

.timer-dial-arc {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 420ms var(--ease-out), stroke 200ms var(--ease);
}

.timer-dial-arc.ending {
  stroke: oklch(0.7 0.15 70);
}

.timer-face-time {
  font-size: 52px;
  font-weight: 640;
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer-face-time.long {
  font-size: 40px;
}

.live .timer-face-time {
  font-size: 32px;
  letter-spacing: -0.03em;
}

.live .timer-face-time.long {
  font-size: 25px;
}

.timer-face-by {
  max-width: 92px;
  margin-top: 6px;
  overflow: hidden;
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.timer-step {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: var(--text-2);
  touch-action: manipulation;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease),
    opacity 160ms var(--ease);
}

.timer-step:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}

.timer-step:active:not(:disabled) {
  transform: scale(0.92);
}

.timer-step:disabled {
  opacity: 0.35;
  cursor: default;
}

/* Presets: a segmented control whose thumb slides to the picked one. */
.timer-chips {
  --i: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  padding: 3px;
  border-radius: 12px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line-soft);
}

.timer-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: calc(3px + var(--i) * (100% - 6px) / 6);
  width: calc((100% - 6px) / 6);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--line-soft);
  transition: left 260ms var(--ease-out), opacity 160ms var(--ease);
}

.timer-thumb.off {
  opacity: 0;
}

.timer-chip {
  position: relative;
  height: 32px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 560;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
  transition: color 160ms var(--ease);
}

.timer-chip small {
  margin-left: 1px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
}

.timer-chip:hover,
.timer-chip[aria-checked='true'] {
  color: var(--text);
}

.timer-chip:focus-visible,
.timer-step:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px oklch(0.56 0.15 var(--hue) / 0.25);
}

.timer-start,
.timer-stop {
  width: 100%;
  height: 42px;
  font-variant-numeric: tabular-nums;
}

.timer-stop {
  background: var(--danger-soft);
  color: oklch(0.5 0.17 24);
}

.timer-stop:hover {
  background: oklch(0.93 0.035 24);
}

.timer-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
  color: var(--text-3);
}

/* The running timer: a pill floating over the top of the stage. Click to open it, or
   to dismiss once done. */
.timer-pill {
  position: absolute;
  top: 28px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: oklch(0.99 0.002 var(--hue) / 0.82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line-soft);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  z-index: 15;
  transform-origin: 50% 0;
  transform: translate(-50%, -10px) scale(0.9);
  opacity: 0;
  visibility: hidden;
  transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s linear 160ms,
    background-color 200ms var(--ease), color 200ms var(--ease);
}

.timer-pill.show {
  transform: translate(-50%, 0) scale(1);
  opacity: 1;
  visibility: visible;
  transition: opacity 260ms var(--ease-out), transform 420ms cubic-bezier(0.34, 1.4, 0.64, 1), visibility 0s,
    background-color 200ms var(--ease), color 200ms var(--ease);
}

.timer-pill:active {
  transform: translate(-50%, 0) scale(0.97);
}

.timer-pill:focus-visible {
  outline: none;
  box-shadow: var(--shadow-md), 0 0 0 3px oklch(0.56 0.15 var(--hue) / 0.25);
}

.timer-ring {
  flex: none;
  transform: rotate(-90deg);
  fill: none;
  stroke-width: 2.25;
}

.timer-ring circle:first-child {
  stroke: var(--line);
}

/* What is left of the time, draining clockwise. */
.timer-ring-left {
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-dasharray: 100;
  transition: stroke-dashoffset 250ms linear, stroke 200ms var(--ease);
}

.timer-pill.ending .timer-ring-left {
  stroke: oklch(0.7 0.15 70);
}

.timer-pill.done {
  background: var(--warn-soft);
  color: oklch(0.42 0.1 70);
  animation: timer-done 900ms var(--ease) 3;
}

@keyframes timer-done {
  50% {
    background: var(--warn);
  }
}

/* Knock banners make room for the timer. */
.meeting:has(.timer-pill.show) .knocks {
  top: 72px;
}

@media (max-width: 900px) {
  .prejoin-body {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .bar {
    grid-template-columns: auto 1fr auto;
    padding: 0 12px;
  }
  .bar-left .code,
  .bar-left .sep {
    display: none;
  }
  .bar-center {
    justify-content: center;
    gap: 8px;
  }
  .panel.open {
    position: fixed;
    inset: 0 0 84px 0;
    width: auto;
    padding: 12px;
    z-index: 20;
  }
  .panel-card {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .bar-left,
  .bar .layout-btn,
  .bar .divider,
  #c-link {
    display: none;
  }
  .bar {
    grid-template-columns: auto auto;
    justify-content: center;
    gap: 6px;
    padding: 0 8px;
  }
  .bar-center,
  .bar-right {
    gap: 6px;
  }
  [data-tip]::after {
    display: none;
  }
  .ctrl,
  .leave {
    width: 44px;
    height: 44px;
    border-radius: 13px;
  }
  .bar .ctrl,
  .bar .leave {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .bar-center {
    gap: 2px;
    padding: 4px;
  }
  .leave span {
    display: none;
  }
  .leave {
    padding: 0;
    display: grid;
    place-items: center;
  }
  .home,
  .prejoin {
    padding: 20px;
  }
  .home-hero p br {
    display: none;
  }
  .home-hero p {
    font-size: 16px;
    max-width: 320px;
  }
  .home-pat {
    width: 88px;
    height: 88px;
    margin-bottom: 20px;
  }
  .home-join {
    flex-wrap: wrap;
  }
  .stage-wrap {
    padding: 8px 8px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* Host banner: people waiting to be let in. */
.knocks {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 30;
}
.knock {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--panel, #fff);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  font-size: 14px;
}
.knock .knock-text {
  margin-right: 6px;
}
.knock .btn {
  padding: 6px 12px;
  font-size: 13px;
}
.locked-chip {
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.08);
}
