:root {
  --demo-bg: #f5f3ed;
  --demo-paper: #fff;
  --demo-ink: #203d31;
  --demo-muted: #6f746f;
  --demo-green: #4f7564;
  --demo-green-dark: #345847;
  --demo-soft: #dfe8e2;
  --demo-amber: #e89c2a;
  --demo-amber-soft: #f8e7c8;
  --demo-line: #dde2dd;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--demo-bg); color: var(--demo-ink); font-family: "DM Sans", system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
.demo-shell { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.demo-topbar { position: sticky; top: 0; z-index: 20; background: rgba(250,250,248,.94); backdrop-filter: blur(16px); border-bottom: 1px solid var(--demo-line); }
.demo-topbar-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.demo-brand { display: flex; align-items: baseline; gap: 9px; font-weight: 800; font-size: 1.35rem; }
.demo-brand span { color: var(--demo-amber); }
.demo-brand small { color: var(--demo-green); padding-left: 9px; border-left: 1px solid var(--demo-line); font-size: .78rem; }
.demo-disclosure { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--demo-soft); border-radius: 999px; color: var(--demo-green-dark); font-size: .76rem; font-weight: 800; }
.demo-disclosure i { width: 7px; height: 7px; border-radius: 50%; background: var(--demo-green); }
.demo-hero { padding: 72px 0 42px; text-align: center; }
.demo-eyebrow { color: var(--demo-green); font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.demo-hero h1 { max-width: 850px; margin: 12px auto 18px; font: 800 clamp(2.6rem, 6vw, 5rem)/1.02 "Manrope", system-ui, sans-serif; letter-spacing: -.055em; }
.demo-hero > p { max-width: 680px; margin: auto; color: var(--demo-muted); font-size: 1.03rem; line-height: 1.7; }
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 28px 0 80px; }
.week-heading { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-top: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--demo-line); }
.week-heading h2 { margin: 0; font: 800 2rem "Manrope", system-ui, sans-serif; letter-spacing: -.04em; }
.week-heading p { margin: 0; color: var(--demo-muted); }
.class-card { display: flex; flex-direction: column; min-height: 300px; padding: 27px; background: var(--demo-paper); border: 1px solid var(--demo-line); border-radius: 27px; box-shadow: 0 14px 38px rgba(32,61,49,.06); transition: transform .2s, box-shadow .2s; }
.class-card:hover { transform: translateY(-4px); box-shadow: 0 22px 50px rgba(32,61,49,.1); }
.class-number { color: var(--demo-amber); font-size: .73rem; font-weight: 800; letter-spacing: .1em; }
.class-card h3 { margin: auto 0 13px; font: 800 1.6rem/1.08 "Manrope", system-ui, sans-serif; letter-spacing: -.04em; }
.class-card p { margin: 0 0 24px; color: var(--demo-muted); line-height: 1.55; }
.class-card button { width: 100%; min-height: 48px; border: 0; border-radius: 999px; background: var(--demo-green); color: white; font-weight: 800; cursor: pointer; }
.class-card button:hover { background: var(--demo-green-dark); }
.name-panel { display: none; position: fixed; inset: 0; z-index: 50; place-items: center; padding: 20px; background: rgba(22,35,29,.64); }
.name-panel.is-open { display: grid; }
.name-card { width: min(480px, 100%); padding: 34px; background: white; border-radius: 28px; box-shadow: 0 30px 90px rgba(0,0,0,.22); }
.name-card h2 { margin: 0 0 10px; font: 800 2rem "Manrope", system-ui, sans-serif; letter-spacing: -.04em; }
.name-card p { color: var(--demo-muted); }
.name-card input { width: 100%; height: 54px; margin: 20px 0 12px; padding: 0 17px; border: 1px solid var(--demo-line); border-radius: 15px; outline: none; }
.name-card input:focus { border-color: var(--demo-green); box-shadow: 0 0 0 4px rgba(79,117,100,.12); }
.name-actions { display: flex; gap: 10px; }
.name-actions button { min-height: 48px; padding: 0 20px; border: 0; border-radius: 999px; font-weight: 800; cursor: pointer; }
.name-submit { flex: 1; color: white; background: var(--demo-green); }
.name-cancel { background: #eff1ed; }
.form-error { min-height: 22px; color: #a84034; font-size: .84rem; }


/* --------------------------------------------------------------------------
   Simulated live-video classroom
   -------------------------------------------------------------------------- */

:root {
  --room-deep: #142a22;
  --room-deeper: #0c1d17;
  --room-panel: #1d372d;
  --room-surface: #f7f8f5;
  --room-border: rgba(255,255,255,.12);
  --room-shadow: 0 28px 80px rgba(12,29,23,.24);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] { display: none !important; }

.classroom-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% 8%, rgba(232,156,42,.13), transparent 30rem),
    radial-gradient(circle at 90% 20%, rgba(79,117,100,.16), transparent 33rem),
    #e9ece7;
}

.classroom-topbar {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 26px;
  color: white;
  background: rgba(20,42,34,.96);
  border-bottom: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
}

.classroom-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-word {
  color: var(--demo-amber);
  font: 800 1.34rem "Manrope", sans-serif;
  letter-spacing: -.04em;
}

.brand-divider { width: 1px; height: 22px; background: rgba(255,255,255,.22); }
.brand-room { color: rgba(255,255,255,.74); font-size: .78rem; font-weight: 700; }

.classroom-disclosure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  color: #e8f1ec;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
}

.classroom-disclosure i {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #82c69c;
  box-shadow: 0 0 0 5px rgba(130,198,156,.12);
}

.video-classroom {
  width: min(1540px, calc(100% - 28px));
  margin: 18px auto 26px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.video-classroom.transcript-open {
  grid-template-columns: minmax(0, 1fr) 340px;
}

.room-frame {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 28px;
  color: white;
  background: var(--room-deep);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: var(--room-shadow);
}

.room-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 17px 22px 15px;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
}

.room-kicker {
  display: block;
  margin-bottom: 4px;
  color: #b4cabf;
  font-size: .66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .13em;
}

.room-heading h1 {
  margin: 0;
  font: 800 clamp(1.2rem, 2vw, 1.65rem)/1.08 "Manrope", sans-serif;
  letter-spacing: -.035em;
}

.room-heading p { margin: 4px 0 0; color: rgba(255,255,255,.54); font-size: .76rem; }
.room-status-group { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  color: #e8f6ed;
  background: rgba(73,145,99,.18);
  border: 1px solid rgba(130,198,156,.17);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
}

.live-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #69c18a;
  box-shadow: 0 0 0 5px rgba(105,193,138,.12);
  animation: livePulse 2s infinite;
}

.room-clock {
  min-width: 48px;
  color: rgba(255,255,255,.62);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  font-weight: 700;
}

.room-progress { height: 3px; background: rgba(255,255,255,.07); }
.room-progress span { display: block; width: 0; height: 100%; background: var(--demo-amber); transition: width .45s ease; }

.room-body {
  min-height: 570px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 282px;
  gap: 14px;
  padding: 14px;
  background: var(--room-deeper);
}

.video-stage { min-width: 0; }

.video-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(225px, 1fr));
  gap: 10px;
}

.participant-tile {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 18px;
  background: #294238;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
  transition: transform .32s ease, border-color .22s ease, box-shadow .22s ease, opacity .22s ease;
}

.participant-tile.mentor-tile {
  grid-column: span 2;
}

.participant-tile.is-active {
  z-index: 2;
  border-color: #f1b454;
  box-shadow: 0 0 0 3px rgba(232,156,42,.16), 0 16px 35px rgba(0,0,0,.25);
  transform: translateY(-2px) scale(1.007);
}

.participant-tile.is-focused::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 35%, transparent 40%, rgba(8,20,16,.14));
}

.participant-media {
  position: absolute;
  inset: 0 0 48px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 30%, rgba(255,255,255,.12), transparent 48%),
    linear-gradient(145deg, color-mix(in srgb, var(--tile-accent) 72%, #ffffff 28%), var(--tile-accent));
}

.participant-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .3s ease, transform 4s ease;
}

.participant-tile.portrait-loaded .participant-media img { opacity: 1; }
.participant-tile[data-state="speaking"] .participant-media img,
.participant-tile[data-state="welcoming"] .participant-media img,
.participant-tile[data-state="encouraging"] .participant-media img { transform: scale(1.055); }
.participant-tile[data-state="smiling"] .participant-media img { transform: scale(1.035) translateY(-1px); }
.participant-tile[data-state="laughing"] .participant-media img { animation: friendlyLaugh .85s ease-in-out infinite alternate; }
.participant-tile[data-state="thinking"] .participant-media img { transform: scale(1.025) translateX(-2px); }

.portrait-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.92);
  font: 800 clamp(2.1rem, 6vw, 4rem) "Manrope", sans-serif;
  letter-spacing: -.05em;
}

.participant-tile.portrait-loaded .portrait-fallback { opacity: 0; }
.media-wash { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(7,18,14,.4)); pointer-events: none; }

.participant-footer {
  position: absolute;
  inset: auto 0 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px 7px 12px;
  background: rgba(15,33,26,.9);
  border-top: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(12px);
}

.participant-footer > span:first-child { min-width: 0; }
.participant-footer strong { display: block; overflow: hidden; color: white; font-size: .74rem; text-overflow: ellipsis; white-space: nowrap; }
.participant-footer strong em { color: rgba(255,255,255,.55); font-style: normal; font-weight: 600; }
.participant-footer small { display: block; overflow: hidden; margin-top: 1px; color: rgba(255,255,255,.47); font-size: .57rem; text-overflow: ellipsis; white-space: nowrap; }

.audio-status {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(91,174,120,.15);
}
.audio-status i { width: 4px; height: 10px; border-radius: 4px; background: #79c795; box-shadow: -4px 4px 0 -1px #79c795, 4px 4px 0 -1px #79c795; }
.audio-status.muted { background: rgba(255,255,255,.08); }
.audio-status.muted::before { content: "×"; color: rgba(255,255,255,.5); font-size: .8rem; }

.participant-state {
  position: absolute;
  left: 9px;
  top: 9px;
  z-index: 2;
  padding: 5px 8px;
  color: rgba(255,255,255,.83);
  background: rgba(8,21,16,.52);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  backdrop-filter: blur(7px);
  font-size: .56rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.speaking-wave {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 3;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 0 8px;
  opacity: 0;
  background: rgba(13,31,24,.62);
  border-radius: 999px;
  transition: opacity .2s;
}

.speaking-wave i { width: 3px; height: 8px; border-radius: 3px; background: #f6c776; animation: speakingBar .7s ease-in-out infinite alternate; }
.speaking-wave i:nth-child(2) { height: 14px; animation-delay: -.25s; }
.speaking-wave i:nth-child(3) { height: 11px; animation-delay: -.45s; }
.speaking-wave i:nth-child(4) { height: 17px; animation-delay: -.1s; }
.participant-tile.is-active .speaking-wave { opacity: 1; }

.participant-reaction {
  position: absolute;
  left: 50%;
  bottom: 14px;
  z-index: 5;
  min-width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: translate(-50%, 18px) scale(.45);
  border-radius: 50%;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 32px rgba(0,0,0,.2);
  font-size: 1.55rem;
}

.participant-reaction.is-visible { animation: reactionFloat 1.8s ease both; }

.visitor-media {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.11), transparent 36%),
    linear-gradient(150deg, #31594a, #1b332a);
}

.visitor-avatar {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: white;
  background: rgba(255,255,255,.1);
  box-shadow: 0 18px 38px rgba(0,0,0,.2);
  font: 800 1.7rem "Manrope", sans-serif;
}

.activity-rail { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.activity-card,
.join-sooner {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  background: rgba(255,255,255,.055);
}

.activity-card { padding: 18px; }
.activity-label { color: #efb758; font-size: .61rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.activity-card h2 { margin: 8px 0 8px; font: 800 1.2rem/1.1 "Manrope", sans-serif; letter-spacing: -.03em; }
.activity-card p { margin: 0; color: rgba(255,255,255,.59); font-size: .75rem; line-height: 1.52; }
.current-activity { flex: 1; min-height: 220px; }

.activity-stage {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  padding: 10px 11px;
  color: #dce9e1;
  background: rgba(97,166,121,.12);
  border-radius: 12px;
  font-size: .68rem;
  font-weight: 800;
}
.activity-stage i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #73be8e; box-shadow: 0 0 0 5px rgba(115,190,142,.1); }
.room-note { background: rgba(232,156,42,.08); border-color: rgba(232,156,42,.15); }

.join-sooner {
  width: 100%;
  display: block;
  padding: 14px 16px;
  color: #163126;
  background: #f1b455;
  border-color: transparent;
  text-align: left;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.join-sooner:hover { transform: translateY(-1px); background: #f6c572; }
.join-sooner span { display: block; font-weight: 800; }
.join-sooner small { display: block; margin-top: 2px; color: rgba(22,49,38,.65); font-size: .65rem; }
.join-sooner.is-joining { background: #dfe8e2; }

.caption-bar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  background: #f4f5f2;
  border-top: 1px solid rgba(255,255,255,.07);
  color: var(--demo-ink);
  transition: opacity .2s, min-height .2s, padding .2s;
}
.caption-bar.is-hidden { min-height: 0; height: 0; overflow: hidden; padding-block: 0; opacity: 0; }
.caption-speaker { color: var(--demo-green-dark); font-size: .72rem; font-weight: 800; }
.caption-bar p { margin: 0; font-size: clamp(.86rem, 1.3vw, 1rem); line-height: 1.45; }
.caption-bar.is-speaking { box-shadow: inset 4px 0 0 var(--demo-amber); }

.prompt-drawer {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) minmax(0, 1.6fr);
  gap: 20px;
  align-items: center;
  padding: 20px 22px;
  color: var(--demo-ink);
  background: #fffaf0;
  border-top: 1px solid #ead6b1;
  animation: promptRise .35s ease both;
}
.prompt-copy > span { color: var(--demo-amber); font-size: .64rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
.prompt-copy h2 { margin: 5px 0 0; font: 800 1.05rem/1.3 "Manrope", sans-serif; letter-spacing: -.02em; }
.prompt-row { display: flex; gap: 9px; align-items: stretch; }
.prompt-row textarea {
  min-width: 0;
  flex: 1;
  min-height: 58px;
  max-height: 132px;
  padding: 14px 15px;
  resize: vertical;
  color: var(--demo-ink);
  background: white;
  border: 1px solid #d8dcd7;
  border-radius: 14px;
  outline: none;
}
.prompt-row textarea:focus { border-color: var(--demo-green); box-shadow: 0 0 0 4px rgba(79,117,100,.11); }
.prompt-row button,
.choice-button {
  min-height: 54px;
  padding: 0 18px;
  color: white;
  background: var(--demo-green);
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  cursor: pointer;
}
.prompt-row button:hover { background: var(--demo-green-dark); }
.prompt-row button:disabled { cursor: wait; opacity: .6; }
.choice-list { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice-button { padding: 12px; color: var(--demo-green-dark); background: white; border: 1px solid #d8dcd7; }
.choice-button:hover { background: var(--demo-soft); border-color: #b9c9c0; }

.complete-card {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 20;
  width: min(520px, calc(100% - 30px));
  padding: 34px;
  opacity: 0;
  transform: translate(-50%, -44%) scale(.96);
  color: var(--demo-ink);
  background: #fffdf8;
  border: 1px solid #ead6b1;
  border-radius: 24px;
  box-shadow: 0 32px 90px rgba(0,0,0,.4);
  text-align: center;
  transition: opacity .3s ease, transform .3s ease;
}
.complete-card.is-visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.complete-card::before { content: ""; position: fixed; inset: 0; z-index: -1; background: rgba(5,16,12,.65); backdrop-filter: blur(6px); }
.complete-bell { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 15px; color: #8b5b11; background: var(--demo-amber-soft); border-radius: 50%; font-size: 1.4rem; }
.complete-card h2 { margin: 8px 0 8px; font: 800 2rem/1.05 "Manrope", sans-serif; letter-spacing: -.04em; }
.complete-card p { margin: 0; color: var(--demo-muted); }
.complete-actions { display: flex; justify-content: center; gap: 9px; margin-top: 22px; }
.complete-actions a { padding: 12px 17px; color: white; background: var(--demo-green); border-radius: 999px; font-size: .78rem; font-weight: 800; }
.complete-actions a.secondary { color: var(--demo-green-dark); background: var(--demo-soft); }

.class-controls {
  position: relative;
  min-height: 78px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 100px;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  background: #172f26;
  border-top: 1px solid rgba(255,255,255,.07);
}

.leave-class {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 11px;
  color: #ffd8d2;
  background: rgba(196,76,61,.14);
  border-radius: 10px;
  font-size: .7rem;
  font-weight: 800;
}
.leave-class span { font-size: 1rem; line-height: 1; }

.control-cluster { display: flex; justify-content: center; gap: 8px; }
.room-control {
  min-width: 68px;
  min-height: 52px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: rgba(255,255,255,.75);
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  cursor: pointer;
  transition: transform .18s, background .18s;
}
.room-control:hover { transform: translateY(-1px); background: rgba(255,255,255,.12); }
.room-control.is-off { color: #ffd7d1; background: rgba(196,76,61,.15); }
.room-control.is-on { color: #dff2e6; background: rgba(91,174,120,.16); }
.control-icon { font-size: .9rem; font-weight: 800; line-height: 1; }
.room-control small { font-size: .56rem; font-weight: 700; }

.reaction-menu {
  position: absolute;
  right: 130px;
  bottom: 68px;
  z-index: 25;
  display: flex;
  gap: 6px;
  padding: 8px;
  background: white;
  border: 1px solid var(--demo-line);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.26);
}
.reaction-menu button { width: 43px; height: 43px; border: 0; border-radius: 12px; background: #f3f5f2; cursor: pointer; font-size: 1.35rem; }
.reaction-menu button:hover { background: var(--demo-amber-soft); transform: translateY(-2px); }

.transcript-drawer {
  min-width: 0;
  height: calc(100vh - 110px);
  position: sticky;
  top: 18px;
  overflow: hidden;
  color: var(--demo-ink);
  background: white;
  border: 1px solid var(--demo-line);
  border-radius: 24px;
  box-shadow: 0 20px 55px rgba(32,61,49,.12);
}
.transcript-drawer header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px; border-bottom: 1px solid var(--demo-line); }
.transcript-drawer h2 { margin: 4px 0 0; font: 800 1.2rem "Manrope", sans-serif; letter-spacing: -.03em; }
.transcript-drawer header button { width: 35px; height: 35px; border: 0; border-radius: 50%; background: #eef1ed; cursor: pointer; font-size: 1.25rem; }
.transcript-list { height: calc(100% - 82px); overflow-y: auto; padding: 14px 17px 22px; }
.transcript-entry { padding: 12px 0; border-bottom: 1px solid #edf0eb; }
.transcript-entry strong { color: var(--demo-green-dark); font-size: .72rem; }
.transcript-entry p { margin: 4px 0 0; color: #555850; font-size: .78rem; line-height: 1.45; }
.transcript-entry.announcement { margin: 10px 0; padding: 13px; background: var(--demo-amber-soft); border: 0; border-radius: 13px; }

.shifi-takeover {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  opacity: 0;
  background: rgba(8,25,18,.72);
  backdrop-filter: blur(12px);
  transition: opacity .3s ease;
}
.shifi-takeover.is-visible { opacity: 1; }
.shifi-card {
  width: min(720px, 100%);
  padding: clamp(30px, 6vw, 58px);
  color: #213d31;
  background:
    radial-gradient(circle at 50% 0, rgba(232,156,42,.24), transparent 45%),
    #fffdf8;
  border: 1px solid #efd7aa;
  border-radius: 30px;
  box-shadow: 0 35px 100px rgba(0,0,0,.35);
  text-align: center;
  transform: translateY(18px) scale(.97);
  transition: transform .35s ease;
}
.shifi-takeover.is-visible .shifi-card { transform: translateY(0) scale(1); }
.shifi-card img { width: 82px; height: 82px; margin-bottom: 16px; }
.shifi-card > span { display: block; color: #9a671c; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; }
.shifi-card blockquote { max-width: 610px; margin: 18px auto; font: 600 clamp(1.35rem, 3vw, 2.15rem)/1.35 Georgia, serif; }
.shifi-card small { color: #748077; font-weight: 700; }

.classroom-toast {
  position: fixed;
  left: 50%;
  bottom: 94px;
  z-index: 120;
  max-width: min(420px, calc(100% - 28px));
  padding: 12px 16px;
  opacity: 0;
  transform: translate(-50%, 12px);
  color: white;
  background: #203d31;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  box-shadow: 0 18px 48px rgba(0,0,0,.25);
  font-size: .76rem;
  font-weight: 700;
  text-align: center;
  transition: opacity .18s, transform .18s;
}
.classroom-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes livePulse { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
@keyframes speakingBar { from { transform: scaleY(.5); } to { transform: scaleY(1.1); } }
@keyframes reactionFloat {
  0% { opacity: 0; transform: translate(-50%, 18px) scale(.45); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1.12); }
  62% { opacity: 1; transform: translate(-50%, -18px) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -52px) scale(.8); }
}
@keyframes friendlyLaugh { from { transform: scale(1.035) rotate(-.4deg); } to { transform: scale(1.055) rotate(.4deg); } }
@keyframes promptRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1220px) {
  .video-classroom.transcript-open { grid-template-columns: minmax(0, 1fr); }
  .transcript-drawer { position: fixed; right: 16px; top: 82px; z-index: 80; width: min(360px, calc(100% - 32px)); height: calc(100vh - 100px); }
  .room-body { grid-template-columns: minmax(0, 1fr) 240px; }
  .participant-footer small { max-width: 170px; }
}

@media (max-width: 960px) {
  .room-body { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(190px, 1fr)); }
  .participant-tile.mentor-tile { grid-column: span 2; }
  .activity-rail { display: grid; grid-template-columns: 1.2fr .8fr .8fr; }
  .current-activity { min-height: 0; }
  .caption-bar { grid-template-columns: 110px minmax(0, 1fr); }
  .class-controls { grid-template-columns: 90px minmax(0, 1fr) 40px; }
  .room-control { min-width: 60px; }
  .reaction-menu { right: 90px; }
}

@media (max-width: 700px) {
  .classroom-topbar { min-height: 60px; padding: 0 14px; }
  .brand-room, .brand-divider { display: none; }
  .classroom-disclosure { max-width: 210px; padding: 7px 9px; border-radius: 10px; line-height: 1.2; }
  .video-classroom { width: 100%; margin: 0; }
  .room-frame { border-radius: 0; border-inline: 0; }
  .room-header { min-height: 74px; padding: 13px 14px; }
  .room-heading p, .room-clock { display: none; }
  .room-status-group { gap: 6px; }
  .live-pill { padding: 7px 9px; }
  .room-body { min-height: 0; padding: 8px; gap: 8px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: 175px; gap: 7px; }
  .participant-tile.mentor-tile { grid-column: span 2; grid-row: span 1; }
  .participant-media { bottom: 43px; }
  .participant-footer { min-height: 43px; padding: 6px 8px; }
  .participant-footer strong { font-size: .68rem; }
  .participant-footer small { display: none; }
  .participant-state { padding: 4px 6px; font-size: .5rem; }
  .activity-rail { grid-template-columns: 1fr; }
  .room-note { display: none; }
  .activity-card { padding: 14px; }
  .current-activity { min-height: 0; }
  .join-sooner { padding: 12px 14px; }
  .caption-bar { min-height: 82px; grid-template-columns: 1fr; gap: 4px; padding: 12px 14px; }
  .prompt-drawer { grid-template-columns: 1fr; gap: 13px; padding: 16px 14px; }
  .choice-list { grid-column: auto; grid-template-columns: 1fr; }
  .prompt-row { display: grid; }
  .prompt-row button { min-height: 50px; }
  .class-controls { min-height: 72px; grid-template-columns: 65px minmax(0, 1fr); padding: 8px; }
  .control-cluster { justify-content: flex-end; gap: 5px; overflow-x: auto; scrollbar-width: none; }
  .control-cluster::-webkit-scrollbar { display: none; }
  .room-control { min-width: 51px; min-height: 50px; padding: 0 4px; border-radius: 11px; }
  .room-control small { font-size: .49rem; }
  .leave-class { padding: 8px; }
  .reaction-menu { right: 12px; bottom: 66px; }
  .complete-card { padding: 28px 20px; }
  .complete-card h2 { font-size: 1.6rem; }
  .complete-actions { display: grid; }
}

@media (max-width: 430px) {
  .classroom-disclosure span { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .video-grid { grid-auto-rows: 155px; }
  .visitor-avatar { width: 75px; height: 75px; font-size: 1.3rem; }
  .audio-status { width: 22px; height: 22px; }
  .room-control:nth-child(1), .room-control:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
