/* The shell stays readable inside a narrow Canvas iframe. All assets ship locally:
   the practice installation can run offline, without contacting a font/CDN service. */
@font-face {
  font-family: Lato;
  src: url("/fonts/Lato-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Lato;
  src: url("/fonts/Lato-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  --ink: #24273a;
  --dim: #5e6579;
  --line: #dce0e8;
  --paper: #fff;
  --bg: #f6f7fb;
  --accent: #5946c6;
  --accent-dark: #4433a5;
  --tint: #efedff;
  --good: #17694f;
  color: var(--ink);
  background: var(--bg);
  font-size: 100%;
  line-height: 1.5;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
body {
  font-family: var(--classroom-font, Lato, "Helvetica Neue", Arial, sans-serif);
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(120deg, #f9f8fd 0, transparent 52%), var(--bg);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
  opacity: 0.52;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute;
  z-index: 9;
  top: 0.5rem;
  left: 0.5rem;
  background: white;
  padding: 0.75rem;
}
svg.icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
  pointer-events: none;
}
.masthead {
  display: flex;
  align-items: center;
  gap: 19px;
  padding: 0 clamp(20px, 5.5vw, 92px);
  height: 76px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 23px;
  letter-spacing: -1.1px;
  font-weight: 700;
}
.emblem {
  background: #393066;
  color: white;
  border-radius: 10px;
  width: 40px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -2px;
  transform: rotate(-3deg);
}
.emblem span {
  font-size: 12px;
  letter-spacing: -1px;
  margin: 0 1px 0 2px;
  align-self: flex-start;
  padding-top: 7px;
  color: #d9ceff;
}
.brand-divider {
  height: 22px;
  width: 1px;
  background: var(--line);
}
.app-name {
  font-size: 14px;
  font-weight: 580;
  color: #55576b;
}
.top-meta {
  margin-left: auto;
  font-size: 12px;
  color: var(--dim);
  font-weight: 600;
}
.screen {
  max-width: 1450px;
  margin: auto;
  padding: clamp(25px, 4.4vw, 67px) clamp(20px, 5.5vw, 86px) 50px;
}
.lobby {
  max-width: 1270px;
  padding-top: clamp(38px, 6.5vw, 96px);
}
.page-heading,
.heading-actions,
.studio-head,
.studio-tools,
.panel-heading,
.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.page-heading {
  margin-bottom: 27px;
}
.page-heading h1 {
  font-size: 1.8rem;
  line-height: 1.25;
  margin: 6px 0 11px;
  font-weight: 400;
  overflow-wrap: anywhere;
}
p {
  margin: 0.65rem 0;
}
h2,
h3 {
  margin: 0;
  letter-spacing: -0.5px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
.page-heading p:not(.eyebrow),
.subtle,
.join-details,
.preview-note,
.empty-copy {
  color: var(--dim);
}
.eyebrow {
  margin: 0;
  color: #6253a9;
  font-size: 11px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 730;
}
.lobby-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.9fr);
  gap: 24px;
  align-items: start;
}
.card,
.studio {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 18px;
  box-shadow: 0 5px 20px #282b4c05;
}
.stage-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse at 58% 27%, #54427d 0, transparent 48%),
    radial-gradient(ellipse at 12% 100%, #424262 0, transparent 43%),
    linear-gradient(135deg, #292640, #38304f 55%, #242637);
}
.preview {
  min-height: 375px;
  aspect-ratio: 1.62;
  border-radius: 18px;
  display: grid;
  place-items: center;
}
.preview::before,
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(#e5e3ff24 0.8px, transparent 0.9px);
  background-size: 17px 17px;
  mask-image: linear-gradient(135deg, #000, transparent 80%);
}
.preview-rings,
.stage-rings {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: repeating-radial-gradient(
    ellipse at 50% 50%,
    transparent 0,
    transparent 48px,
    #daceff13 49px,
    transparent 50px
  );
}
.preview-rings {
  transform: rotate(-14deg) scale(1.6, 0.96);
}
.preview-caption {
  position: absolute;
  inset: 20px 20px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  gap: 12px;
}
.light-label,
.glass-chip {
  color: #f0ecf9;
  font-size: 12px;
  font-weight: 550;
}
.glass-chip,
.stage-label {
  background: #232234ba;
  border: 1px solid #ffffff32;
  border-radius: 20px;
  padding: 5px 10px;
}
.light-label {
  background: #29253b80;
  border-radius: 8px;
  padding: 5px 9px;
}
.preview-avatar,
.stage-monogram {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border-radius: 32px;
  background: linear-gradient(140deg, #ece4ff, #c4b9f9);
  box-shadow: 0 10px 40px #09061e36;
  color: #433366;
  font-size: 38px;
  font-weight: 550;
  letter-spacing: -2px;
  position: relative;
}
.preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}
.preview-tools {
  position: absolute;
  bottom: 20px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}
.glass-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 10px;
  border: 1px solid #ffffff45;
  background: #202031c9;
  color: #fff;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 550;
}
.glass-btn[aria-pressed="true"] {
  background: #ede8ff;
  color: #322755;
  border-color: #ede8ff;
}
.preview-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
}
.preview-note {
  font-size: 13px;
}
.join-card {
  padding: clamp(21px, 2.5vw, 33px);
}
.section-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 21px;
}
.small-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--tint);
  color: var(--accent);
}
label:not(.switch-label),
legend,
.field-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  margin: 0 0 7px;
}
.roles {
  margin: 16px 0;
  border: 0;
  padding: 0;
}
.roles legend {
  padding: 0;
}
.segmented {
  display: flex;
  background: #f1f1f8;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}
.segmented label {
  margin: 0;
  flex: 1;
  position: relative;
  color: var(--dim);
  text-align: center;
}
.segmented input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  cursor: pointer;
}
.segmented span {
  display: block;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 7px 6px;
}
.segmented input:checked + span {
  font-weight: 700;
  background: white;
  color: #433580;
  box-shadow: 0 1px 4px #27263c13;
  border-color: #dedbe8;
}
.segmented input:focus-visible + span {
  outline: 2px solid var(--accent);
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  border: 1px solid #cdd1dd;
  background: white;
  border-radius: 9px;
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
}
input::placeholder,
textarea::placeholder {
  color: #767c8f;
  font-weight: 400;
}
.join-details,
.feedback,
.subtle,
.empty-copy {
  font-size: 13px;
  line-height: 1.5;
}
.join-details {
  margin: 15px 0;
}
.feedback {
  margin: 10px 0 0;
  color: #94402c;
}
.feedback:empty {
  display: none;
}
.btn-primary,
.btn-secondary,
.btn-plain,
.icon-btn,
.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.3;
}
.btn-primary,
.btn-secondary {
  padding: 11px 16px;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-dark);
}
.btn-secondary {
  border-color: var(--line);
  background: #fff;
}
.btn-secondary:hover,
.btn-plain:hover,
.icon-btn:hover:not(:disabled) {
  background: #f2f1f8;
}
.join-button {
  width: 100%;
  justify-content: space-between;
}
.btn-plain,
.text-btn,
.icon-btn {
  border: 0;
  background: transparent;
}
.btn-plain,
.text-btn {
  padding: 7px 9px;
}
.text-btn {
  color: var(--accent);
  text-align: left;
}
.icon-btn {
  width: 34px;
  height: 34px;
  padding: 6px;
}
.btn-primary.icon-btn:hover:not(:disabled) {
  background: var(--accent-dark);
}
.btn-primary.icon-btn {
  color: white;
  background: var(--accent);
}
.room-heading {
  margin-bottom: 22px;
}
.heading-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}
.session-badge,
.count {
  border-radius: 25px;
  font-size: 12px;
  font-weight: 650;
  padding: 5px 10px;
  background: #eeedf5;
  color: #524d67;
  white-space: nowrap;
}
.recording-indicator,
.stage-recording {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
}
.recording-indicator {
  padding: 6px 12px;
  min-height: 30px;
  border: 1px solid var(--line);
  color: var(--dim);
  background: var(--paper);
}
.recording-indicator:hover {
  border-color: currentColor;
}
.recording-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.recording-indicator[data-state="recording"],
.stage-recording {
  color: #8b1731;
  background: #fff1f3;
  border: 1px solid #e8a3ae;
}
.recording-indicator[data-state="recording"] .recording-dot,
.stage-recording .recording-dot {
  background: currentColor;
  box-shadow:
    0 0 0 3px rgb(185 31 63 / 18%),
    0 0 8px rgb(185 31 63 / 40%);
}
.stage-recording {
  display: none;
}
.stage:fullscreen .stage-recording {
  display: inline-flex;
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  padding: 6px 12px;
  pointer-events: none;
}
.session-badge.live {
  color: #126145;
  background: #ddf4e9;
}
.session-badge.live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: currentColor;
  margin-right: 6px;
}
.session-badge.ended {
  color: #66454e;
  background: #f5e9ed;
}
.room-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(296px, 0.91fr);
  gap: 18px;
  align-items: start;
}
.studio {
  min-width: 0;
  padding: 16px;
}
.studio-head {
  margin-bottom: 13px;
  min-height: 34px;
}
.studio-head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
}
.signal-mark {
  width: 14px;
  height: 16px;
  background: linear-gradient(
    to right,
    var(--accent) 0 3px,
    transparent 3px 5px,
    var(--accent) 5px 8px,
    transparent 8px 10px,
    var(--accent) 10px 13px
  );
  clip-path: polygon(
    0 38%,
    25% 38%,
    25% 0,
    58% 0,
    58% 22%,
    100% 22%,
    100% 85%,
    62% 85%,
    62% 100%,
    32% 100%,
    32% 72%,
    0 72%
  );
}
.studio-tools {
  gap: 2px;
  color: #575d73;
}
.studio-tools .btn-plain[aria-pressed="true"] {
  color: var(--accent);
  background: var(--tint);
  box-shadow: inset 0 0 0 1px currentColor;
}
@media (forced-colors: active) {
  .studio-tools .btn-plain[aria-pressed="true"],
  .device-btn[aria-pressed="true"] > span:last-child {
    text-decoration: underline;
  }
}
.stage {
  width: 100%;
  border-radius: 12px;
  aspect-ratio: 16/10;
  min-height: 265px;
  display: grid;
  place-items: center;
}
.stage:fullscreen {
  width: 100vw;
  height: 100vh;
  aspect-ratio: auto;
  border-radius: 0;
}
.stage-placeholder {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 20px;
  text-align: center;
}
.stage-monogram {
  width: 70px;
  height: 70px;
  border-radius: 23px;
  font-size: 25px;
  margin-bottom: 7px;
}
.stage-placeholder strong {
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 580;
  letter-spacing: -0.7px;
}
.stage-placeholder > span:last-child {
  font-size: 13px;
  color: #e1ddeb;
}
.stage-media,
.stage-media video {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.stage-media video {
  object-fit: contain;
}
.stage-label {
  position: absolute;
  left: 12px;
  bottom: 11px;
  font-size: 12px;
}
.stage-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  color: var(--dim);
  font-size: 12px;
}
.gallery-pager {
  display: flex;
  align-items: center;
  gap: 4px;
}
.gallery-pager .icon-btn {
  width: 28px;
  height: 28px;
}
.gallery {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 6px;
  padding: 8px;
  background: #282534;
  align-content: stretch;
  grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
}
.tile {
  background: #494158;
  border: 1px solid #716777;
  position: relative;
  color: #fff;
  border-radius: 8px;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 0;
}
.tile video {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}
.tile-name {
  position: absolute;
  bottom: 2px;
  left: 4px;
  max-width: 95%;
  background: #272232cc;
  border-radius: 4px;
  padding: 2px 5px;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tile-initial {
  font-size: clamp(12px, 2vw, 28px);
  color: #ece5ff;
}
.control-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, 1.4vw, 18px);
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.device-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #555b6b;
  font-size: 0.8125rem;
  font-weight: 400;
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 43px;
  padding: 0 2px;
  border-radius: 9px;
}
.device-icon {
  background: #f1f2f7;
  background: light-dark(#f1f2f7, #343744);
  color: #494c62;
  color: light-dark(#494c62, var(--ink));
  border-radius: 12px;
  min-width: 44px;
  height: 37px;
  display: grid;
  place-content: center;
}
.device-btn[aria-pressed="true"] .device-icon {
  background: var(--tint);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px currentColor;
}
@media (hover: hover) and (pointer: fine) {
  .device-btn:enabled:hover .device-icon {
    box-shadow: inset 0 0 0 1px currentColor;
  }
}
.device-btn:enabled:active .device-icon {
  box-shadow: inset 0 0 0 2px currentColor;
}
.leave-btn {
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding-left: clamp(10px, 2vw, 22px);
  color: #a43b42;
}
.leave-btn .device-icon {
  background: #fbe9e9;
  background: light-dark(#fbe9e9, #472d37);
  color: #ae343e;
  color: light-dark(#ae343e, #ffadac);
}
.side-panel {
  overflow: hidden;
}
.panel-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 5px 7px 0;
  border-bottom: 1px solid var(--line);
}
.panel-tabs button {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  padding: 10px 1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: white;
  color: #60657a;
  font-size: 0.875rem;
  font-weight: 400;
}
.panel-tabs button[aria-selected="true"] {
  font-weight: 700;
  color: var(--accent);
  border-color: var(--accent);
}
.panel-tabs button:hover {
  background: #f7f6fc;
}
.panel-tabs button svg {
  width: 17px;
  height: 17px;
}
[role="tabpanel"] {
  padding: 17px 17px 18px;
  min-width: 0;
}
.panel-heading {
  margin-bottom: 15px;
}
.panel-heading h2 {
  font-size: 18px;
}
.count {
  font-size: 11px;
  padding: 2px 8px;
  background: #f0f0f6;
}
.person {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 0;
  border-top: 1px solid #eeeef4;
}
.mini-avatar {
  width: 33px;
  height: 33px;
  flex-shrink: 0;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #e6e4f4;
  color: #514778;
  font-weight: 700;
  font-size: 12px;
}
.mini-avatar.teacher {
  background: #e4f2ed;
  color: #2e6652;
}
.person-info {
  min-width: 0;
  flex: 1;
}
.person-info strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.person-info small {
  display: block;
  color: var(--dim);
  font-size: 11px;
}
.person-icon {
  color: var(--dim);
}
.person-icon svg {
  width: 16px;
  height: 16px;
}
.status-raised {
  color: #855208;
}
.helper-settings,
.activity + .activity {
  border-top: 1px solid var(--line);
  margin-top: 14px;
  padding-top: 15px;
}
.switch-label {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 13px;
}
.switch-label small {
  display: block;
  color: var(--dim);
  font-size: 12px;
  margin-top: 3px;
}
.switch-label input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.helper-settings > .subtle {
  display: block;
  margin-top: 7px;
}
.messages {
  overflow: auto;
  max-height: 330px;
  min-height: 110px;
}
.message {
  padding: 9px 0;
  border-bottom: 1px solid #f1f0f4;
}
.message-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12px;
}
.message time {
  color: var(--dim);
  font-size: 10px;
}
.message p {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 14px;
  margin: 3px 0;
}
.chat-compose {
  display: flex;
  margin-top: 13px;
  align-items: center;
  gap: 7px;
}
.activity h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
}
.activity h3 svg {
  width: 17px;
  color: var(--accent);
}
.activity .btn-secondary,
.activity .text-btn {
  font-size: 12px;
  padding: 8px 10px;
}
.choice-list {
  border: 0;
  padding: 0;
  margin: 8px 0;
}
.choice-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  margin: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.choice-list input {
  accent-color: var(--accent);
}
.group-row,
.attendance-row,
.poll-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-top: 1px solid #eeeef4;
  font-size: 13px;
}
.group-row span,
.attendance-row span,
.poll-row span {
  overflow-wrap: anywhere;
}
.panel-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
}
.mode-badge {
  margin: 8px 0 13px;
}
.notice {
  border: 1px solid #ddc99a;
  border-radius: 9px;
  padding: 10px 14px;
  background: #fff7e8;
  color: #6b5328;
  margin-bottom: 12px;
  font-size: 13px;
}
.routing-notice {
  border-color: #d7cfec;
  background: #f1edfb;
  color: #514372;
}
.toast {
  position: fixed;
  z-index: 8;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(90vw, 660px);
  overflow-wrap: anywhere;
  padding: 12px 18px;
  border-radius: 10px;
  background: #28253e;
  color: #fff;
  box-shadow: 0 5px 25px #19192c30;
  font-size: 14px;
}
dialog {
  border: 1px solid var(--line);
  width: min(420px, 92vw);
  max-height: 90vh;
  padding: 22px;
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 18px 65px #1916263a;
}
dialog::backdrop {
  background: #24223866;
}
.dialog-heading {
  margin-bottom: 16px;
}
.dialog-actions {
  justify-content: flex-end;
  margin-top: 17px;
}
dialog label {
  margin-top: 9px !important;
}
dialog h2 {
  font-size: 20px;
}
#enable-audio {
  margin-top: 12px;
}
@media (min-width: 1450px) {
  .room-grid {
    grid-template-columns: minmax(0, 2.25fr) minmax(330px, 0.95fr);
  }
}
@media (max-width: 950px) {
  .screen {
    padding-left: 24px;
    padding-right: 24px;
  }
  .masthead {
    padding: 0 24px;
  }
  .room-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(285px, 1fr);
  }
  .room .stage {
    min-height: 255px;
  }
  .studio {
    padding: 11px;
  }
  .lobby-grid {
    gap: 14px;
  }
  .preview {
    min-height: 340px;
  }
}
@media (max-width: 730px) {
  .masthead {
    height: 60px;
    gap: 12px;
  }
  .brand {
    font-size: 20px;
    gap: 7px;
  }
  .emblem {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }
  .emblem span {
    font-size: 10px;
  }
  .top-meta {
    font-size: 11px;
  }
  .lobby-grid,
  .room-grid {
    grid-template-columns: 1fr;
  }
  .lobby .page-heading {
    margin-bottom: 18px;
  }
  .lobby {
    padding-top: 31px;
  }
  .preview {
    aspect-ratio: 1.9;
    min-height: 220px;
  }
  .screen {
    padding-left: 16px;
    padding-right: 16px;
  }
  .preview-avatar {
    width: 68px;
    height: 68px;
    font-size: 26px;
    border-radius: 22px;
  }
  .preview-tools {
    bottom: 12px;
  }
  .preview-caption {
    inset: 12px 12px auto;
  }
  .lobby-grid {
    gap: 7px;
  }
  .room-grid {
    gap: 12px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .room .page-heading {
    align-items: center;
  }
  .room .stage {
    min-height: 190px;
  }
  .panel-tabs {
    grid-template-columns: repeat(4, 1fr);
  }
  .join-card {
    padding: 20px;
  }
  .section-heading {
    margin-bottom: 12px;
  }
  .heading-actions {
    gap: 6px;
  }
  .heading-actions .btn-primary {
    padding: 9px;
  }
  .app-name {
    font-size: 12px;
  }
}
@media (max-width: 540px) {
  .studio-head,
  .studio-tools {
    flex-wrap: wrap;
  }
  .room .room-heading {
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .room-heading .heading-actions {
    justify-content: flex-start;
  }
  .control-bar {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px 2px;
  }
  .control-bar .device-btn {
    min-width: 0;
  }
  .control-bar .leave-btn {
    border: 0;
    padding: 0 2px;
  }
}
@media (max-width: 370px) {
  .control-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 380px) {
  .brand-divider {
    display: none;
  }
  .masthead {
    padding: 0 12px;
    gap: 8px;
  }
  .stage {
    aspect-ratio: 1.45;
  }
  .glass-btn {
    padding: 7px;
    font-size: 12px;
  }
  .top-meta {
    max-width: 75px;
    text-align: right;
  }
  .page-heading h1 {
    letter-spacing: -1.3px;
  }
}
/* Move only the pictogram. Labels, focus rings and hit targets stay in place. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  button:enabled:hover .icon {
    transform: translateY(-2px) scale(1.06);
  }
}
@media (prefers-reduced-motion: no-preference) {
  button:enabled .icon {
    transition: transform 140ms ease-out;
  }
  button:enabled:active .icon {
    transform: scale(0.92);
    transition-duration: 75ms;
  }
  button {
    transition:
      background-color 0.15s,
      box-shadow 0.15s;
  }
  .room .notice {
    animation: appear 0.18s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}
.lobby-grid > *,
.room-grid > * {
  min-width: 0;
}
.lobby-grid .preview {
  width: 100%;
  min-width: 0;
}
/* Keep frequent media controls within a laptop viewport. In fullscreen the
   stage intentionally uses the entire screen; phones get the natural ratio. */
@media (min-width: 731px) {
  .room .stage:not(:fullscreen) {
    width: 100%;
    max-height: max(245px, calc(100svh - 455px));
  }
}
.window-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  text-underline-offset: 3px;
}
@media (max-width: 730px) {
  .screen .lobby-grid,
  .screen .room-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.whiteboard {
  width: 100%;
  max-height: 24rem;
  border: 1px solid #68768b;
  touch-action: none;
  border-radius: 0.5rem;
}
.whiteboard:focus-visible {
  outline: 3px solid #7c3aed;
  outline-offset: 3px;
}
.announcement {
  padding: 0.6rem;
  border-inline-start: 3px solid #7c3aed;
  overflow-wrap: anywhere;
}
.teaching-material {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
  border: 0;
}

/* Course navigation, deep-link selection and launch feedback are rendered on
   the server before the room UI loads. Share its typography and theme tokens. */
.launch-page {
  max-width: 76rem;
  margin-inline: auto;
  padding: clamp(16px, 4vw, 54px);
  overflow-wrap: anywhere;
}
.launch-page h1 {
  font-size: 1.8rem;
  line-height: 1.25;
  font-weight: 400;
  margin: 0 0 16px;
}
.launch-page a {
  color: var(--accent);
  text-underline-offset: 3px;
}
.launch-page ul {
  padding-inline-start: 1.3em;
}
.launch-page li + li {
  margin-top: 0.4em;
}
.launch-page form {
  display: grid;
  justify-items: start;
  gap: 14px;
  max-width: 32rem;
}
.launch-page form label {
  width: 100%;
}
.course-agenda {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 14px;
}
.course-agenda .card {
  padding: 18px;
}
.course-agenda .card > :last-child {
  margin-bottom: 0;
}
.live-caption {
  font-size: 1.15rem;
  background: #142338;
  color: white;
}
.captions-off #live-caption {
  display: none;
}

.presenter-cameras {
  position: absolute;
  right: 0.6rem;
  top: 0.6rem;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
  max-width: 65%;
  pointer-events: none;
}
.presenter-cameras[hidden] {
  display: none;
}
.presenter-cameras figure {
  position: relative;
  margin: 0;
  min-width: 0;
  width: clamp(3rem, 9vw, 7rem);
  background: #152237;
  border-radius: 0.4rem;
  overflow: hidden;
}
.presenter-cameras video {
  display: block;
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}
.presenter-cameras figcaption {
  background: #142338;
  color: white;
  font-size: 0.75rem;
  padding: 0.1rem 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
