/* Live class: the Live panel beside the class board (/pizarra?vivo=…), «Play live» in the
   class action bar and in Today's classes, and the student picker. Fresco tokens, flat
   colours (styles/no-gradients.css forbids background images). */

.live-dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #55dfff;
}
.live-dot.is-joined { background: var(--fresco-success); }
.live-dot.is-left { background: #d99a00; }
.live-dot.is-ended,
.live-dot.is-failed,
.live-dot.is-starting { background: var(--fresco-line-strong); }

/* The board makes room: the desk covers the window except the panel's column. */
body.has-live-panel .bd { right: 360px; }

.live-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 210;
  width: 360px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  overflow: auto;
  background: var(--fresco-surface);
  border-left: 1px solid var(--fresco-line);
  color: var(--fresco-ink);
  font: 400 15px/1.4 var(--fresco-font);
}
.live-panel * { box-sizing: border-box; }

.live-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.live-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font: 600 18px/1.2 var(--fresco-display);
  color: var(--fresco-ink);
}

.live-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--fresco-line-strong);
  border-radius: var(--fresco-radius-sm, 10px);
  background: var(--fresco-surface);
  color: var(--fresco-ink);
  font: 600 14px/1.2 var(--fresco-font);
  cursor: pointer;
}
.live-button:hover:not(:disabled) { border-color: var(--fresco-primary); color: var(--fresco-primary); }
.live-button:disabled { opacity: 0.55; cursor: default; }
.live-button.is-primary { border-color: var(--fresco-primary); background: var(--fresco-primary); color: #fff; }
.live-button.is-primary:hover:not(:disabled) { background: var(--fresco-primary-hover); color: #fff; }
.live-button:focus-visible { outline: 3px solid var(--fresco-accent); outline-offset: 2px; }

/* What the teacher looks at while talking on Zoom. */
.live-chip {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--fresco-accent-soft);
  color: var(--fresco-accent-ink);
}
.live-chip strong { font-size: 16px; font-weight: 600; }
.live-chip span { font-size: 13px; }
.live-chip.is-joined { background: var(--fresco-success-soft); color: var(--fresco-success); }
.live-chip.is-left { background: var(--fresco-warning-soft); color: var(--fresco-warning-ink); }
.live-chip.is-ended,
.live-chip.is-starting { background: var(--fresco-ground); color: var(--fresco-muted); }
.live-chip.is-failed { background: var(--fresco-danger-soft); color: var(--fresco-danger); }

/* Join with the code (no app signed in on the phone): big enough to scan from a Zoom-shared
   screen, so the QR takes the panel's whole width. */
.live-join { display: grid; justify-items: center; gap: 8px; padding: 14px; border: 1px solid var(--fresco-line); border-radius: 12px; background: #fff; text-align: center; }
.live-join h3 { margin: 0; justify-self: start; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--fresco-muted); }
.live-join-qr-box { width: 100%; max-width: 300px; aspect-ratio: 1; }
.live-join-qr { display: block; width: 100%; height: 100%; }
.live-join-qr-wait { display: block; width: 100%; height: 100%; border-radius: 8px; background: var(--fresco-ground); }
.live-join-code { margin: 0; font: 700 44px/1.1 var(--fresco-display); letter-spacing: 0.06em; color: var(--fresco-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.live-join-hint { margin: 0; color: var(--fresco-muted); font-size: 13px; }
.live-join-small { margin: -8px 0 0; padding: 0 2px; color: var(--fresco-muted); font-size: 13px; }
.live-join-small strong { color: var(--fresco-ink); font-size: 15px; letter-spacing: 0.04em; font-variant-numeric: tabular-nums; }

.live-stars { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px; color: var(--fresco-muted); font-weight: 500; }
.live-stars-row { display: inline-flex; align-items: center; gap: 2px; font-size: 20px; color: var(--fresco-line-strong); }
.live-stars-row .is-on { color: #d99a00; }
.live-stars-row b { margin-left: 6px; font-size: 15px; color: var(--fresco-ink); }

.live-activities { display: grid; gap: 8px; }
.live-activities h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fresco-muted);
}
.live-empty {
  margin: 0;
  padding: 12px 14px;
  border: 1px dashed var(--fresco-line-strong);
  border-radius: 12px;
  color: var(--fresco-muted);
  font-size: 14px;
}

/* «From this class · Live»: one button per game. */
.live-game {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--fresco-line);
  border-radius: 10px;
  background: var(--fresco-surface);
  color: var(--fresco-ink);
  font: 600 15px/1.2 var(--fresco-font);
  text-align: left;
  cursor: pointer;
}
.live-game small { font-size: 12px; font-weight: 500; color: var(--fresco-muted); }
.live-game:hover:not(:disabled) { border-color: var(--fresco-primary); }
.live-game:disabled { cursor: default; }
.live-game:disabled:not(.is-playing) { opacity: 0.6; }
.live-game.is-playing { border-color: var(--fresco-primary); background: var(--fresco-primary-soft, #eeeaff); }
.live-game.is-playing small { color: var(--fresco-primary); font-weight: 600; }
.live-game:focus-visible,
.live-round button:focus-visible { outline: 3px solid var(--fresco-accent); outline-offset: 2px; }

/* A game waiting on the stage while the teacher is back on the board (session 4). */
.live-round { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--fresco-primary); border-radius: 12px; background: var(--fresco-primary-soft); }
.live-round strong { font-weight: 700; }
.live-round > span { color: var(--fresco-muted); font-size: 14px; }
.live-round-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.live-round-error { margin: 0; color: var(--fresco-danger); font-size: 13px; font-weight: 600; }

/* ----- Stage mode (session 4): the game at TV size over the board, which stays as it was. -----
   The strip on top is the Live panel collapsed; the bar under the round holds the teacher's
   controls; the inset on the right shows the child's phone. No gradients (styles/no-gradients.css). */
body.live-staged .live-panel { display: none; }
.live-stage {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--fresco-ground);
  color: var(--fresco-ink);
  font: 400 16px/1.4 var(--fresco-font);
}
.live-stage[hidden] { display: none; }
.live-stage * { box-sizing: border-box; }

.live-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; min-height: 60px; padding: 8px 20px; border-bottom: 1px solid var(--fresco-line); background: var(--fresco-surface); }
.live-strip-title { display: inline-flex; align-items: center; gap: 8px; font: 600 18px/1.2 var(--fresco-display); }
.live-strip-chip { padding: 6px 12px; border-radius: 999px; background: var(--fresco-accent-soft); color: var(--fresco-accent-ink); font-weight: 600; font-size: 15px; }
.live-strip-chip.is-joined { background: var(--fresco-success-soft); color: var(--fresco-success); }
.live-strip-chip.is-left { background: var(--fresco-warning-soft); color: var(--fresco-warning-ink); }
.live-strip-code { color: var(--fresco-muted); font-size: 15px; }
.live-strip-code strong { color: var(--fresco-ink); font-size: 18px; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.live-strip-stars { font-weight: 700; font-size: 18px; }
.live-strip-stars span { color: #d99a00; }
.live-strip-actions { display: flex; gap: 8px; margin-left: auto; }

.live-stage-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--fresco-line-strong);
  border-radius: var(--fresco-radius-sm, 10px);
  background: var(--fresco-surface);
  color: var(--fresco-ink);
  font: 600 16px/1.2 var(--fresco-font);
  cursor: pointer;
}
.live-stage-button:hover:not(:disabled) { border-color: var(--fresco-primary); color: var(--fresco-primary); }
.live-stage-button:focus-visible, .live-pq-say:focus-visible { outline: 3px solid var(--fresco-accent); outline-offset: 2px; }
.live-stage-button.is-primary { border-color: var(--fresco-primary); background: var(--fresco-primary); color: #fff; }
.live-stage-button.is-primary:hover { background: var(--fresco-primary-hover); color: #fff; }

.live-stage-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 20px; min-height: 0; padding: 20px 24px; }
.live-stage-play { display: grid; place-items: center; min-height: 0; }
.live-stage-wait { color: var(--fresco-muted); font-size: 20px; }

/* Picture quiz on the stage: the word huge, four big pictures, the touch ringed, the verdict's colours. */
.live-pq { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 18px; width: 100%; height: 100%; max-width: 1180px; }
.live-pq-ask { display: grid; justify-items: center; gap: 4px; text-align: center; }
.live-pq-count { margin: 0; color: var(--fresco-muted); font-weight: 600; font-size: 16px; }
.live-pq-word-row { display: flex; align-items: center; gap: 18px; }
.live-pq-word { margin: 0; font: 700 clamp(44px, 7.5vw, 96px)/1.05 var(--fresco-display); color: var(--fresco-ink); }
.live-pq-say { display: grid; place-items: center; width: 60px; height: 60px; padding: 0; border: 0; border-radius: 50%; background: var(--fresco-primary-soft); color: var(--fresco-primary); cursor: pointer; }
.live-pq-say:hover { background: var(--fresco-primary); color: #fff; }
.live-pq-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; min-height: 0; margin: 0; padding: 0; list-style: none; }
.live-pq-tile { position: relative; display: grid; place-items: center; min-height: 0; padding: 14px 14px 46px; border: 4px solid var(--fresco-line); border-radius: 22px; background: var(--fresco-surface); transition: border-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease; }
.live-pq-tile img { width: 100%; height: 100%; max-height: 42vh; object-fit: contain; }
.live-pq-letter { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); font: 700 22px/1 var(--fresco-display); color: var(--fresco-muted); }
.live-pq-tag { position: absolute; top: 12px; right: 12px; max-width: calc(100% - 24px); padding: 6px 14px; border-radius: 999px; background: var(--fresco-primary); color: #fff; font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-pq-tile.is-chosen { border: 8px solid var(--fresco-primary); box-shadow: 0 0 0 6px var(--fresco-primary-soft); }
.live-pq-tile.is-ok { border: 8px solid var(--fresco-success); box-shadow: 0 0 0 6px var(--fresco-success-soft); }
.live-pq-tile.is-ok .live-pq-tag { background: var(--fresco-success); }
.live-pq-tile.is-ok .live-pq-letter, .live-pq-tile.is-right .live-pq-letter { color: var(--fresco-success); }
.live-pq-tile.is-right { border: 8px solid var(--fresco-success); box-shadow: 0 0 0 6px var(--fresco-success-soft); }
.live-pq-tile.is-dim { opacity: 0.4; }

.live-stage-over { display: grid; justify-items: center; gap: 10px; text-align: center; }
.live-stage-over-title { margin: 0; font: 700 56px/1.1 var(--fresco-display); }
.live-stage-over-stars { margin: 0; padding: 8px 26px; border-radius: 999px; background: var(--fresco-surface); font-size: 36px; font-weight: 700; }
.live-stage-over-stars span { color: #d99a00; }

/* The teacher's controls under the stage. */
.live-stage-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 14px 24px 18px; border-top: 1px solid var(--fresco-line); background: var(--fresco-surface); }
.live-stage-bar:empty { display: none; }
.live-stage-hint { margin: 0; color: var(--fresco-muted); font-size: 16px; }
.live-stage-hint strong { color: var(--fresco-ink); }
.live-stage-hint.is-correct strong { color: var(--fresco-success); }
.live-stage-hint.is-wrong strong { color: var(--fresco-warning-ink); }
.live-stage-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-left: auto; }
.live-stage-controls .live-stage-button { min-height: 52px; min-width: 120px; font-size: 17px; }
.live-stage-button.is-yes[aria-pressed="true"] { border-color: var(--fresco-success); background: var(--fresco-success); color: #fff; }
.live-stage-button.is-no[aria-pressed="true"] { border-color: var(--fresco-ink); background: var(--fresco-ink); color: #fff; }
.live-stage-button.is-star { border-color: #f3e2b8; background: #fdf3dc; color: #7a4b00; }
.live-stage-button.is-star[aria-pressed="true"] { border-color: #d99a00; background: #d99a00; color: #fff; cursor: default; }
.live-stage-button.is-next { border-color: var(--fresco-primary); background: var(--fresco-primary); color: #fff; min-width: 200px; }
.live-stage-button.is-next:hover { background: var(--fresco-primary-hover); color: #fff; }
.live-stage-error { width: 100%; margin: 0; color: var(--fresco-danger); font-weight: 600; }

/* The phone inset: what the child's screen shows now (read-only). The app's own colours. */
.live-stage-phone { display: grid; align-content: start; justify-items: center; gap: 8px; }
.live-phone-label { margin: 0; color: var(--fresco-muted); font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.live-phone { width: 210px; height: 400px; padding: 10px; border-radius: 34px; background: #102754; box-shadow: var(--fresco-shadow); }
.live-phone-screen { display: grid; height: 100%; overflow: hidden; border-radius: 26px; background: #e4faff; color: #102754; font-family: "Nunito", var(--fresco-font); }
.live-phone-note { margin: auto; padding: 12px; font-weight: 800; text-align: center; }
.live-phone-quiz { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 4px; padding: 12px 10px; }
.live-phone-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.live-phone-word { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.1; overflow-wrap: anywhere; }
.live-phone-head span { color: #647087; font-size: 11px; font-weight: 800; }
.live-phone-hint { margin: 0; color: #647087; font-size: 11px; font-weight: 800; }
.live-phone-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; min-height: 0; }
.live-phone-tile { display: grid; place-items: center; min-height: 0; padding: 3px; border: 2px solid #dce4ef; border-radius: 12px; background: #fff; }
.live-phone-tile img { width: 100%; height: 100%; object-fit: contain; }
.live-phone-tile.is-chosen { border: 3px solid #102754; box-shadow: 0 0 0 2px #ffdb4d; }
.live-phone-tile.is-ok { border: 3px solid #176342; }
.live-phone-tile.is-right { border: 3px solid #55dfff; }
.live-phone-tile.is-dim { opacity: 0.45; }
.live-phone-band { min-height: 30px; margin: 0; padding: 4px 6px; border-radius: 10px; background: #fff; font-size: 10px; font-weight: 900; text-align: center; }
.live-phone-band:empty { background: transparent; }
.live-phone-band.is-ok { background: #e9f6ef; color: #176342; }

/* Word wheel (session 5): the wheel on the left, the word it lands on on the right. The phone's spin
   arrives as a move; the wheel here turns for the same time (--ww-ms) to the same wedge (--ww-to)
   with the phone's easing, and the word appears as it stops. Still when motion is reduced. */
.live-ww { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; width: 100%; height: 100%; max-width: 1240px; }
.live-ww > .live-pq-count { text-align: center; }
.live-ww-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 32px; min-height: 0; }
.live-ww-wheel-box { position: relative; justify-self: center; width: min(100%, 60vh, 560px); aspect-ratio: 1; }
.live-ww-wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 10px 30px #12142b24; }
.live-ww-wheel svg { display: block; width: 100%; height: 100%; }
.live-ww.is-spinning .live-ww-wheel { animation: live-ww-spin var(--ww-ms) var(--ww-easing) both; }
.live-ww-pointer { position: absolute; top: -10px; left: 50%; z-index: 1; width: 0; height: 0; transform: translateX(-50%); border-left: 22px solid transparent; border-right: 22px solid transparent; border-top: 40px solid #102754; }
.live-ww-card { display: grid; justify-items: center; align-content: center; gap: 18px; min-height: 0; text-align: center; }
.live-ww-card.is-coming { animation: live-ww-show 0.35s ease-out var(--ww-ms) both; }
.live-ww-card.is-waiting { align-self: stretch; border: 3px dashed var(--fresco-line-strong); border-radius: 28px; }
.live-ww-mystery { font: 800 clamp(90px, 14vw, 180px)/1 var(--fresco-display); color: var(--fresco-line-strong); }
.live-ww-note { margin: 0; color: var(--fresco-muted); font-size: 20px; font-weight: 600; }
.live-ww-picture { width: auto; max-width: 100%; height: min(34vh, 320px); object-fit: contain; padding: 12px; border: 4px solid var(--fresco-line); border-radius: 26px; background: var(--fresco-surface); }
.live-ww-word { font-size: clamp(48px, 6.5vw, 96px); }
.live-ww-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; width: 100%; margin: 0; padding: 0; list-style: none; }
.live-ww-tile { padding: 10px; aspect-ratio: 1; }
.live-ww-tile img { max-height: 24vh; }
.live-ww-said { margin: 0; padding: 12px 26px; border: 3px dashed var(--fresco-line-strong); border-radius: 999px; color: var(--fresco-muted); font-size: 22px; font-weight: 700; }
.live-ww-said.is-said { border: 4px solid var(--fresco-primary); background: var(--fresco-primary-soft); color: var(--fresco-primary); }
.live-ww-said.is-ok { border-color: var(--fresco-success); background: var(--fresco-success-soft); color: var(--fresco-success); }
@keyframes live-ww-spin { from { transform: rotate(var(--ww-from)); } to { transform: rotate(var(--ww-to)); } }
@keyframes live-ww-show { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: scale(1); } }

/* True or false (session 5): the card big, the word under it, the streak of small stars, and the two
   answers — green-ish for true, the portal's purple for false; never red. */
.live-tf { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; justify-items: center; gap: 14px; width: 100%; height: 100%; max-width: 1100px; }
.live-tf-top { display: flex; align-items: center; justify-content: center; gap: 18px; min-height: 30px; }
.live-tf-streak { display: inline-flex; min-height: 28px; margin: 0; color: #d99a00; font-size: 26px; letter-spacing: 2px; }
.live-tf-card { display: grid; justify-items: center; align-content: center; gap: 12px; min-height: 0; }
.live-tf-picture { width: auto; max-width: 100%; height: min(42vh, 420px); object-fit: contain; padding: 14px; border: 4px solid var(--fresco-line); border-radius: 28px; background: var(--fresco-surface); }
.live-tf-sentence { max-width: 900px; margin: 0; padding: 28px 36px; border: 4px solid var(--fresco-line); border-radius: 28px; background: var(--fresco-surface); font: 700 clamp(34px, 4.6vw, 64px)/1.15 var(--fresco-display); text-align: center; }
.live-tf-label { font-size: clamp(44px, 6vw, 88px); }
.live-tf.is-sentence .live-tf-label { color: var(--fresco-muted); font-size: clamp(30px, 3.8vw, 52px); font-weight: 600; }
.live-tf-answers { display: grid; grid-template-columns: repeat(2, minmax(0, 260px)); gap: 22px; margin: 0; padding: 0; list-style: none; }
.live-tf-answer { position: relative; display: grid; place-items: center; min-height: 86px; padding: 10px 18px; border: 4px solid transparent; border-radius: 22px; font: 800 30px/1.1 var(--fresco-display); color: #fff; transition: opacity 0.2s ease, box-shadow 0.2s ease; }
.live-tf-answer.is-true { background: #1e8a5f; }
.live-tf-answer.is-false { background: var(--fresco-primary); }
.live-tf-answer .live-pq-tag { top: -16px; right: -10px; background: #102754; font-size: 15px; }
.live-tf-answer.is-chosen { border-color: #102754; box-shadow: 0 0 0 6px #ffdb4d; }
.live-tf-answer.is-ok { border-color: #102754; box-shadow: 0 0 0 6px var(--fresco-success-soft); }
.live-tf-answer.is-right { border-color: #55dfff; box-shadow: 0 0 0 6px #e4faff; }
.live-tf-answer.is-dim { opacity: 0.4; }
.live-tf-truth { margin: 0; color: var(--fresco-muted); font-size: 20px; }
.live-tf-truth strong { color: var(--fresco-ink); }

/* The two games in the phone inset. */
.live-phone-wheel { position: relative; align-self: center; justify-self: center; width: 170px; aspect-ratio: 1; }
.live-phone-wheel svg { display: block; width: 100%; height: 100%; }
.live-phone-wheel .live-ww-pointer { top: -6px; border-left-width: 9px; border-right-width: 9px; border-top-width: 16px; }
.live-phone-ww { position: relative; }
.live-phone-ww-cover { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 4px; padding: 30px 10px 12px; background: #e4faff; animation: live-ww-lift 0.3s ease-in var(--ww-ms) forwards; }
.live-phone-ww-disc { width: 100%; height: 100%; animation: live-ww-spin var(--ww-ms) var(--ww-easing) both; }
@keyframes live-ww-lift { to { opacity: 0; visibility: hidden; } }
.live-phone-said { display: grid; place-items: center; min-height: 0; }
.live-phone-said-button { padding: 14px 16px; border-radius: 16px; background: #102754; color: #fff; font-size: 14px; font-weight: 900; }
.live-phone-said-button.is-chosen { box-shadow: 0 0 0 3px #ffdb4d; }
.live-phone-tf { grid-template-rows: auto minmax(0, 1fr) auto auto auto; }
.live-phone-streak { color: #d99a00; font-size: 11px; letter-spacing: 1px; }
.live-phone-tf-card { display: grid; place-items: center; min-height: 0; padding: 4px; border-radius: 12px; background: #fff; }
.live-phone-tf-card img { width: 100%; height: 100%; object-fit: contain; }
.live-phone-tf-card.is-text { padding: 8px; font-size: 13px; font-weight: 900; text-align: center; }
.live-phone-tf-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.live-phone-tf-button { display: grid; place-items: center; min-height: 34px; border-radius: 10px; color: #fff; font-size: 12px; font-weight: 900; }
.live-phone-tf-button.is-true { background: #1e8a5f; }
.live-phone-tf-button.is-false { background: #4326c9; }
.live-phone-tf-button.is-chosen { box-shadow: 0 0 0 2px #ffdb4d; }
.live-phone-tf-button.is-right { box-shadow: 0 0 0 2px #55dfff; }
.live-phone-tf-button.is-dim { opacity: 0.45; }

/* The silent celebration card (src/live/celebrate.js): the phone's card, without its sound. */
.live-stage-cheer { position: absolute; inset: 0; pointer-events: none; }
.live-cheer { position: absolute; inset: 0; display: grid; place-items: center; background: #12142b33; animation: live-cheer-in 0.18s ease-out both; }
.live-cheer-card { display: grid; justify-items: center; gap: 4px; width: min(560px, 90vw); padding: 24px 28px 30px; border-radius: 32px; background: #ffdb4d; color: #102754; text-align: center; box-shadow: var(--fresco-shadow-dialog); animation: live-cheer-pop 0.42s cubic-bezier(.2, 1.4, .4, 1) both; }
.live-cheer.is-almost .live-cheer-card { background: #e4faff; border: 4px solid #55dfff; }
.live-cheer.is-end .live-cheer-card { background: #fff6cc; border: 4px solid #ffdb4d; }
.live-cheer-mascot { width: auto; height: min(270px, 30vh); object-fit: contain; }
.live-cheer-es { margin: 6px 0 0; font: 800 clamp(34px, 4.6vw, 54px)/1.08 var(--fresco-display); }
.live-cheer-pl { margin: 0; font-size: 20px; font-weight: 600; color: #3a4a6b; }
.live-cheer-stars { margin: 8px 0 0; padding: 6px 20px; border-radius: 999px; background: #fff; font-size: 26px; font-weight: 700; }
.live-cheer-stars span { color: #d99a00; }
@keyframes live-cheer-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes live-cheer-pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .live-cheer, .live-cheer-card { animation: none; }
  .live-pq-tile { transition: none; }
  .live-ww.is-spinning .live-ww-wheel, .live-ww-card.is-coming, .live-phone-ww-disc { animation: none; }
  .live-phone-ww-cover { animation-duration: 0.01s; }
  .live-tf-answer { transition: none; }
}

/* A narrow window: no phone inset, the pictures two by two. */
@media (max-width: 900px) {
  .live-stage-main { grid-template-columns: minmax(0, 1fr); padding: 14px; }
  .live-stage-phone { display: none; }
  .live-pq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .live-pq-tile img { max-height: 22vh; }
  .live-ww-body { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .live-ww-wheel-box { width: min(100%, 38vh); }
  .live-strip-actions { margin-left: 0; }
}

/* A phone or a narrow window: the panel becomes a sheet under the board. */
@media (max-width: 760px) {
  body.has-live-panel .bd { right: 0; bottom: 42vh; }
  .live-panel { top: auto; left: 0; width: auto; height: 42vh; border-left: 0; border-top: 1px solid var(--fresco-line); }
  .live-join-qr-box { max-width: 200px; }
}

/* «Play live» in the class action bar. */
.class-actions .class-actions-live { display: inline-flex; align-items: center; gap: 8px; }

/* «Play live» beside Join in Today's classes. */
.today-classes-actions { display: inline-flex; align-items: center; gap: 6px; }
.today-classes-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--fresco-primary);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.today-classes-live:hover,
.today-classes-live:focus-visible { background: var(--fresco-primary-hover); outline: 3px solid var(--fresco-accent); outline-offset: 1px; }

/* The student picker on a class page. */
.live-start-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 16px;
  background: #12142b59;
}
.live-start {
  width: min(600px, 100%);
  /* Eight games since sala S14: the dialog scrolls instead of running off a laptop screen. */
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 16px;
  background: var(--fresco-surface);
  color: var(--fresco-ink);
  font: 400 15px/1.4 var(--fresco-font);
  box-shadow: 0 18px 44px #12142b2e;
}
.live-start h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 20px/1.2 var(--fresco-display); }
.live-start-hint,
.live-start-note { margin: 0; color: var(--fresco-muted); font-size: 14px; }
.live-start-field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.live-start-field select {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--fresco-line-strong);
  border-radius: var(--fresco-radius-sm, 10px);
  background: var(--fresco-surface);
  color: var(--fresco-ink);
  font: 400 15px/1.2 var(--fresco-font);
}
.live-start-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* Session 6: «Play Relámpago» is the big choice in Play live; the board is the small one. */
.live-start-game { display: grid; gap: 4px; width: 100%; padding: 16px 18px; border: 0; border-radius: 16px; background: #14215c; color: #fff7e0; text-align: left; cursor: pointer; font: inherit; }
.live-start-game:hover:not(:disabled) { background: #1f2f7d; }
.live-start-game:disabled { opacity: 0.55; cursor: default; }
.live-start-game:focus-visible { outline: 3px solid var(--fresco-accent); outline-offset: 2px; }
.live-start-game-name { font: 800 22px/1.15 var(--fresco-display); color: #ffc93c; }
.live-start-game-hint { font-size: 14px; }

/* Session 7: two room games in Play live, and the board's way to the game room. */
.live-start-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
/* Sala S15: ten games, each a tile with its picture, its name and what the hands do. */
.live-start-game.is-tile { display: grid; grid-template-columns: 56px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 10px 12px; background: #14215c; }
.live-start-game.is-tile:hover:not(:disabled) { background: #1f2f7d; }
.live-start-game-icon { grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 14px; }
.live-start-games .live-start-game-name { font-size: 18px; }
.live-start-games .live-start-game-hint { font-size: 13px; opacity: 0.9; }
@media (max-width: 560px) { .live-start-game.is-tile { grid-template-columns: 44px 1fr; padding: 8px 10px; } .live-start-game-icon { width: 44px; height: 44px; } }
.live-start-game.is-rain { background: #2a3a8f; }
.live-start-game.is-rain:hover:not(:disabled) { background: #3547a8; }
.live-start-game.is-fish { background: #1d6f8f; }
.live-start-game.is-fish:hover:not(:disabled) { background: #2381a6; }
.live-start-game.is-board { background: #0b5563; }
.live-start-game.is-board:hover:not(:disabled) { background: #0f6a7a; }
/* Sala S9: the two arcade games. */
.live-start-game.is-arcade { background: #1f6b3e; }
.live-start-game.is-arcade:hover:not(:disabled) { background: #26804b; }
.live-start-game.is-race { background: #5b3fa8; }
.live-start-game.is-race:hover:not(:disabled) { background: #6a4cc0; }
.live-room { display: grid; gap: 2px; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: #14215c; color: #fff7e0; text-align: left; cursor: pointer; font: inherit; }
.live-room strong { color: #ffc93c; font-size: 16px; }
.live-room span { font-size: 13px; }
.live-room:focus-visible { outline: 3px solid var(--fresco-accent); outline-offset: 2px; }
.live-room-note { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--fresco-accent-soft); color: var(--fresco-accent-ink); font-size: 14px; }
