/* ===== Big-screen mode (#board): full bleed, animated background, type scales with the screen ===== */
html.kiosk {
  font-size: clamp(16px, 1.05vw, 40px);
}
body.kiosk {
  background: #000;
  overflow: hidden;
}
.kiosk .topbar,
.kiosk .progress {
  display: none;
}
.kiosk .shell {
  position: relative;
  z-index: 1;
  max-width: none;
  height: 100vh;
  min-height: 0;
  padding: 3.2vh 3.2vw;
}
.kiosk main {
  min-height: 0;
}
.kiosk .card {
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.kiosk h2 {
  color: #fff;
  font-size: 2.7rem;
  letter-spacing: -0.02em;
}
.kiosk .lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.5rem;
  margin-top: 0.5rem;
  max-width: none;
}
.kiosk .note {
  color: rgba(255, 255, 255, 0.75);
}
.kiosk .demo {
  background: #fff6d1;
  color: #12123a;
}
.khead {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}
.kbrand {
  color: var(--gold);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.kjoin {
  flex: none;
  display: flex;
  align-items: center;
  gap: 1.3rem;
  text-align: right;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 1.2rem;
  padding: 0.8rem 0.8rem 0.8rem 1.6rem;
  color: #fff;
}
.kjoin span {
  display: block;
  font-size: 1.1rem;
  opacity: 0.9;
}
.kjoin b {
  display: block;
  font-size: 1.9rem;
  line-height: 1.1;
  color: var(--gold);
  margin-bottom: 0.25rem;
}
.kjoin .note {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
}
.kqr {
  display: block;
  flex: none;
  width: 9.5rem;
  height: 9.5rem;
  border-radius: 0.8rem;
  background: #fff;
}
/* TV cards are the same as the student cards: height follows the text, nothing is cut off.
   JS picks the fewest columns that still fit every card on screen and sets --cw (column
   width); text and icons scale with it. */
.kiosk .board {
  display: block;
  column-count: 4;
  column-width: auto;
  column-gap: var(--gap, 14px);
  column-fill: auto;
  overflow: hidden;
  margin: 1.2rem -0.7rem 0;
  padding: 0.7rem;
}
.kiosk .pnote {
  margin: 0 0 var(--gap, 14px);
  border: 0;
  border-radius: calc(var(--cw, 300px) * 0.06);
  box-shadow: 0 0.35rem 1.2rem rgba(0, 0, 20, 0.45);
  font-size: calc(var(--cw, 300px) * 0.065);
}
.kiosk .board.measuring .pnote {
  translate: none !important;
  scale: none !important;
  transform: none !important;
}
.kiosk .pnote header {
  padding: 0.6em 0.75em;
  gap: 0.6em;
  font-size: 1em;
}
.kiosk .pn-ic {
  width: 2.3em;
  height: 2.3em;
  font-size: 1.1em;
}
.kiosk .pn-t small {
  font-size: 0.8em;
}
.kiosk .pnote p {
  padding: 0.7em 0.8em 0.5em;
  font-size: 1em;
  line-height: 1.35;
}
.kiosk .pn-v {
  margin: 0 0.8em 0.75em;
  padding: 0.15em 0.8em;
  font-size: 0.85em;
}
.kiosk .pn-vl {
  display: none;
}
.kiosk .empty {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 2rem;
  padding: 4rem 2rem;
  border-radius: 1.5rem;
}
.kfs {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 5;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 99px;
  padding: 0.6em 1.3em;
  cursor: pointer;
  transition: opacity 0.4s;
}
.kfs:hover {
  background: rgba(255, 255, 255, 0.2);
}
.kclear {
  position: fixed;
  left: 1.2rem;
  bottom: 1.2rem;
  z-index: 5;
  font: inherit;
  font-size: 1rem;
  font-weight: 900;
  color: #fff;
  background: rgba(176, 6, 19, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 99px;
  padding: 0.6em 1.3em;
  cursor: pointer;
}
.kclear:hover {
  background: #b00613;
}
.kclear:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}
.kfs:focus-visible {
  outline: 4px solid var(--gold);
  outline-offset: 3px;
}
.kfs[hidden] {
  display: none;
}
.kiosk.idle .kfs {
  opacity: 0;
  pointer-events: none;
}
.kiosk.idle,
.kiosk.idle * {
  cursor: none;
}
@keyframes glow {
  0% {
    box-shadow: 0 0 0 0 rgba(250, 200, 0, 0.95);
  }
  100% {
    box-shadow: 0 0 0 1.8rem rgba(250, 200, 0, 0);
  }
}
.kiosk .pnote.fresh {
  animation:
    floatIn 1.2s cubic-bezier(0.22, 1.25, 0.36, 1) backwards,
    glow 1.8s ease-out 1.1s,
    bob 7s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 120ms), calc(var(--i, 0) * 120ms + 1.1s), var(--b, 0s);
}

/* moving background: a slow flight through a starfield tunnel (drawn on a canvas by startStarfield) */
.kbg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #000;
}
.kbg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.kbg::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0) 45%,
    rgba(0, 0, 0, 0.55) 100%
  );
}
.save-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.finish {
  text-align: left;
}
.finish .big {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 12px;
}
.finish .big img {
  width: 110px;
  height: 110px;
  padding: 6px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  object-fit: contain;
  display: inline-block;
}
.opt .letter img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
