/* ==========================================================================
   Guess the Job — Grade 7 (A2) Classroom Game
   Storybook Watercolor Stylesheet (Sister game to Job Fair series)
   ========================================================================== */

:root {
  --paper: #FBF8F1;
  --paper-deep: #F3ECE0;
  --paper-card: #FFFDF8;
  --cream-mat: #F7F0E3;
  --ink: #3B3732;
  --ink-soft: #665E54;
  --border-ink: #4A443D;

  --navy: #2D4A65;
  --navy-dark: #21374C;
  --navy-soft: #E8EFF5;

  --dusty-red: #C45746;
  --dusty-red-dark: #A54334;
  --dusty-red-soft: #FBE9E5;

  --teal: #497D75;
  --teal-dark: #38655E;
  --teal-soft: #E4F1EE;

  --ochre: #D6942A;
  --ochre-deep: #A66D14;
  --ochre-soft: #FDF2DA;

  --sage-ok: #4A8258;
  --sage-soft: #E4F2E6;

  --font-display: "Baloo 2", "Nunito", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;

  --radius-hand: 22px 17px 24px 16px / 17px 23px 16px 22px;
  --radius-pill: 24px 18px 22px 20px / 19px 22px 18px 23px;
  --shadow-paper: 0 6px 18px rgba(59, 55, 50, 0.11), 2px 3px 0 rgba(74, 68, 61, 0.14);
  --shadow-card: 0 5px 14px rgba(59, 55, 50, 0.13), 1.5px 2.5px 0 rgba(74, 68, 61, 0.16);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

/* Soft watercolor paper wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 14% 18%, rgba(214, 148, 42, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 86% 24%, rgba(73, 125, 117, 0.05) 0%, transparent 42%),
    radial-gradient(circle at 50% 88%, rgba(196, 87, 70, 0.04) 0%, transparent 48%);
  z-index: 0;
}

.hidden {
  display: none !important;
}

/* ==========================================================================
   APP SHELL & TOP HEADER
   ========================================================================== */

.app-shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}

.top-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 18px;
  background: rgba(255, 253, 248, 0.94);
  border-bottom: 2px solid rgba(74, 68, 61, 0.25);
  box-shadow: 0 2px 10px rgba(59, 55, 50, 0.06);
  z-index: 30;
}

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

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  font-size: 22px;
  background: var(--ochre-soft);
  border: 2px solid var(--border-ink);
  border-radius: 52% 48% 46% 54% / 48% 54% 46% 52%;
  box-shadow: 1.5px 2px 0 rgba(74, 68, 61, 0.16);
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.01em;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: 2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  box-shadow: 1.5px 2px 0 rgba(74, 68, 61, 0.14);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.counter-pill--rounds {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.counter-pill--stars {
  background: var(--ochre-soft);
  color: var(--ochre-deep);
}

.counter-star {
  color: var(--ochre);
  font-size: 22px;
  line-height: 1;
}

.counter-pill.is-bump {
  transform: scale(1.16);
  background: #FFE8A3;
}

/* Shared storybook buttons */
.icon-btn, .pill-btn, .ctrl-btn, .primary-btn {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  background: var(--paper-card);
  border: 2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 1.5px 2.5px 0 rgba(74, 68, 61, 0.16);
  transition: transform 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.icon-btn:hover:not(:disabled),
.pill-btn:hover:not(:disabled),
.ctrl-btn:hover:not(:disabled),
.primary-btn:hover:not(:disabled) {
  transform: translateY(-1.5px);
  box-shadow: 2px 4px 0 rgba(74, 68, 61, 0.2);
}

.icon-btn:active:not(:disabled),
.pill-btn:active:not(:disabled),
.ctrl-btn:active:not(:disabled),
.primary-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0.5px 1px 0 rgba(74, 68, 61, 0.16);
}

.icon-btn:disabled,
.pill-btn:disabled,
.ctrl-btn:disabled,
.primary-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.icon-btn {
  padding: 6px 12px;
  font-size: 16px;
}

.icon-btn .btn-emoji {
  font-size: 18px;
  line-height: 1;
}

.icon-btn.is-active {
  background: var(--navy);
  color: #FFFDF8;
}

.icon-btn.is-muted {
  background: var(--dusty-red-soft);
  color: var(--dusty-red);
}

.icon-btn--warn:hover:not(:disabled) {
  background: var(--dusty-red-soft);
}

.primary-btn {
  padding: 10px 24px;
  font-size: 20px;
  background: var(--navy);
  color: #FFFDF8;
}

.primary-btn:hover:not(:disabled) {
  background: var(--navy-dark);
}

.primary-btn--lg {
  padding: 12px 32px;
  font-size: clamp(22px, 1.9vw, 27px);
}

.primary-btn--danger {
  background: var(--dusty-red);
}

.primary-btn--danger:hover:not(:disabled) {
  background: var(--dusty-red-dark);
}

.pill-btn {
  padding: 7px 18px;
  font-size: 18px;
}

.pill-btn--lg {
  padding: 12px 26px;
  font-size: clamp(20px, 1.7vw, 24px);
}

.ctrl-btn {
  padding: 7px 16px;
  font-size: 18px;
}

.ctrl-btn--guess {
  background: var(--ochre);
  color: #FFFDF8;
}

.ctrl-btn--guess:hover:not(:disabled) {
  background: var(--ochre-deep);
}

.ctrl-btn--own {
  background: var(--ochre-soft);
  color: var(--ink);
  font-size: clamp(16px, 1.2vw, 20px);
  padding: 5px 14px;
}

.ctrl-btn--own:hover:not(:disabled) {
  background: #F9E2AE;
}

.ctrl-btn--audio {
  background: var(--ochre-soft);
  color: var(--ink);
  padding: 10px 20px;
  font-size: clamp(18px, 1.5vw, 22px);
}

.ctrl-btn--audio:hover:not(:disabled) {
  background: #F9E2AE;
}

.hand-box {
  background: var(--paper-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-hand);
  box-shadow: var(--shadow-paper);
}

/* Soft placeholder card when an image file is missing */
.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  text-align: center;
  background: linear-gradient(145deg, #F8F2E6 0%, #EFE6D5 100%);
  border: 2.5px dashed rgba(74, 68, 61, 0.45);
  border-radius: 16px;
  color: var(--ink-soft);
}

.img-placeholder-icon {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1;
  opacity: 0.75;
}

.img-placeholder-name {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 700;
  color: var(--navy);
  background: rgba(255, 253, 248, 0.85);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1.5px solid rgba(74, 68, 61, 0.28);
  word-break: break-all;
}

.img-placeholder-sub {
  font-size: 13px;
  color: var(--ink-soft);
}

.img-placeholder--compact {
  min-height: 52px;
  padding: 6px;
  gap: 2px;
}

.img-placeholder--compact .img-placeholder-icon {
  font-size: 20px;
}

.img-placeholder--compact .img-placeholder-name {
  font-size: 10px;
  padding: 1px 6px;
}

.img-placeholder--compact .img-placeholder-sub {
  display: none;
}

/* 3:2 paper-blended images */
.img-blend-32 {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  display: block;
}

.img-char {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(59, 55, 50, 0.14));
}

/* ==========================================================================
   MAIN STAGE & SCREENS
   ========================================================================== */

.main-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.screen {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.screen.is-active {
  display: flex;
}

/* ==========================================================================
   A. INTRO / RULES SCREEN
   ========================================================================== */

.screen--intro {
  position: relative;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(12px, 1.8vw, 24px) clamp(16px, 2.5vw, 36px);
  overflow-y: auto;
}

.intro-bunting {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 16px;
  pointer-events: none;
  opacity: 0.72;
}

.intro-bunting span {
  width: 34px;
  height: 22px;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  background: var(--ochre);
}

.intro-bunting span:nth-child(3n + 1) { background: var(--dusty-red); }
.intro-bunting span:nth-child(3n + 2) { background: var(--teal); }
.intro-bunting span:nth-child(3n) { background: var(--ochre); }

.intro-layout {
  width: 100%;
  max-width: 1640px;
  display: grid;
  grid-template-columns: minmax(300px, 0.96fr) minmax(420px, 1.24fr);
  gap: clamp(18px, 2.4vw, 34px);
  align-items: center;
  z-index: 2;
}

.intro-art-col {
  display: flex;
  align-items: center;
  justify-content: center;
}

.intro-art-frame {
  width: 100%;
  aspect-ratio: 3 / 2;
  padding: 6px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-content-col {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.5vh, 20px);
  min-width: 0;
}

.teacher-bubble {
  position: relative;
  padding: clamp(18px, 2vw, 28px) clamp(22px, 2.4vw, 32px);
  background: #FFFDF8;
}

.teacher-bubble::before {
  content: "";
  position: absolute;
  left: -15px;
  top: 38px;
  width: 24px;
  height: 24px;
  background: #FFFDF8;
  border-left: 2.5px solid var(--border-ink);
  border-bottom: 2.5px solid var(--border-ink);
  transform: rotate(45deg);
}

.teacher-bubble-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 14px;
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  background: var(--ochre-soft);
  border: 2px solid var(--border-ink);
  border-radius: 999px;
}

.teacher-bubble-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(20px, 1.75vw, 30px);
  font-weight: 700;
  line-height: 1.42;
  color: var(--ink);
}

.intro-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.icq-btn {
  background: var(--ochre-soft);
  color: var(--navy);
}

.icq-btn:hover:not(:disabled) {
  background: #F9E0A8;
}

/* 3 ICQ flip cards */
.icq-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  min-height: 132px;
}

.icq-card-wrap {
  perspective: 900px;
  height: clamp(130px, 15vh, 175px);
  opacity: 0;
  transform: translateY(14px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.icq-card-wrap.is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.icq-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.22, 0.88, 0.36, 1.05);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
}

.icq-card.is-flipped {
  transform: rotateY(180deg);
}

.icq-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 14px;
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-hand);
  box-shadow: var(--shadow-card);
}

.icq-face--front {
  background: #FFFDF8;
}

.icq-face--back {
  background: var(--teal-soft);
  transform: rotateY(180deg);
}

.icq-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  border: 1.5px solid var(--border-ink);
}

.icq-face--front .icq-badge {
  background: var(--navy-soft);
  color: var(--navy);
}

.icq-face--back .icq-badge {
  background: var(--teal);
  color: #FFFDF8;
}

.icq-q-text {
  font-family: var(--font-body);
  font-size: clamp(16px, 1.25vw, 22px);
  font-weight: 800;
  line-height: 1.28;
  color: var(--ink);
}

.icq-a-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 800;
  line-height: 1.1;
  color: var(--teal-dark);
  text-align: center;
  margin: auto 0;
}

.icq-tap-hint {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  text-align: right;
}

/* ==========================================================================
   B. ROUND BOARD SCREEN
   ========================================================================== */

.screen--board {
  flex-direction: column;
  padding: clamp(12px, 1.8vw, 24px) clamp(18px, 2.5vw, 36px);
  gap: clamp(12px, 1.8vh, 22px);
}

.board-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.board-prompt-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  background: var(--paper-card);
  border: 2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 26px);
  font-weight: 700;
  color: var(--navy);
  box-shadow: 1.5px 2px 0 rgba(74, 68, 61, 0.14);
}

.board-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.board-cards-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.board-cards {
  width: 100%;
  max-width: 1680px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 28px);
  align-items: stretch;
}

.student-card-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.student-card-btn:hover {
  transform: translateY(-8px) rotate(-0.8deg);
}

.student-card-btn:active {
  transform: translateY(-2px);
}

.student-card-btn.is-shuffling {
  animation: cardShuffleWiggle 0.42s ease;
}

@keyframes cardShuffleWiggle {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-6deg) scale(0.96); }
  60% { transform: rotate(5deg) scale(1.03); }
  100% { transform: rotate(0deg) scale(1); }
}

.student-card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: 56vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-hand);
  box-shadow: none;
  overflow: visible;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.student-card-btn:not(.is-played-correct):not(.is-played-wrong) .student-card-visual img {
  filter: drop-shadow(0 8px 14px rgba(59, 55, 50, 0.16));
}

.student-card-btn:hover:not(.is-played-correct):not(.is-played-wrong) .student-card-visual img {
  filter: drop-shadow(0 14px 20px rgba(45, 74, 101, 0.24));
}

.student-card-btn.is-played-correct .student-card-visual {
  padding: 14px;
  background: linear-gradient(180deg, #F6FCF7 0%, #E7F5EA 100%);
  border: 3px solid var(--sage-ok);
  box-shadow: var(--shadow-paper);
  overflow: hidden;
}

.student-card-btn.is-played-wrong .student-card-visual {
  padding: 14px;
  background: linear-gradient(180deg, #FFFBF7 0%, #F8ECE6 100%);
  border: 3px solid var(--dusty-red);
  box-shadow: var(--shadow-paper);
  overflow: hidden;
}

.student-card-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.student-card-btn.is-played-correct .student-card-img-wrap,
.student-card-btn.is-played-wrong .student-card-img-wrap {
  height: 76%;
}

.student-card-status {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 2px solid var(--border-ink);
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
}

.student-card-status--ok {
  background: var(--sage-ok);
  color: #FFFDF8;
  font-size: clamp(20px, 1.8vw, 28px);
  padding: 3px 18px;
}

.student-card-status--name {
  background: var(--dusty-red-soft);
  color: var(--dusty-red-dark);
  font-size: clamp(16px, 1.3vw, 22px);
}

.student-card-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 22px;
  background: var(--navy);
  color: #FFFDF8;
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 28px);
  font-weight: 800;
  box-shadow: 1.5px 2.5px 0 rgba(74, 68, 61, 0.18);
}

.student-card-btn.is-played-correct .student-card-label {
  background: var(--sage-ok);
}

.student-card-btn.is-played-wrong .student-card-label {
  background: var(--ink-soft);
}

/* ==========================================================================
   C. ROUND SCREEN
   ========================================================================== */

.screen--round {
  flex-direction: column;
  padding: 10px 18px 14px;
  gap: 10px;
}

.round-topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.round-topbar-left,
.round-topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.round-badge-title {
  padding: 6px 20px;
  background: var(--navy);
  color: #FFFDF8;
  border: 2px solid var(--border-ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 25px);
  font-weight: 800;
  box-shadow: 1.5px 2px 0 rgba(74, 68, 61, 0.16);
}

.round-workspace {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(460px, 1.22fr);
  gap: clamp(14px, 1.6vw, 24px);
  align-items: stretch;
}

/* LEFT HALF: HUGE JOB PICTURE (NEVER COVERED) */
.round-left {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 4px;
}

.job-card-stage {
  width: 100%;
  height: 100%;
  max-height: 100%;
  perspective: 1400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 680px;
  transform-style: preserve-3d;
  transition: transform 0.72s cubic-bezier(0.22, 0.88, 0.32, 1.05);
}

.flip-card.is-flipped {
  transform: rotateY(180deg);
}

.flip-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(14px, 1.8vw, 24px);
  overflow: hidden;
}

.flip-card-face--front {
  background: linear-gradient(155deg, #FFFDF8 0%, #F4ECDD 100%);
}

.flip-card-face--back {
  background: radial-gradient(circle at 50% 45%, #FFFDF8 0%, #FBF5E8 75%, #F2E7D2 100%);
  transform: rotateY(180deg);
}

.flip-card-art {
  width: 100%;
  height: 86%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flip-card-art--job {
  height: 100%;
}

.flip-card-art--job img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(59, 55, 50, 0.16));
}

.flip-card-caption {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: clamp(22px, 1.8vw, 30px);
  font-weight: 800;
  color: var(--navy);
}

/* RIGHT HALF: QUESTIONING / GUESS / REVEAL */
.round-right {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* PHASE 1: QUESTION PANEL */
.question-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  min-height: 0;
}

.slots-list {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.q-slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  min-height: 62px;
  background: rgba(255, 253, 248, 0.72);
  border: 2.5px dashed rgba(74, 68, 61, 0.35);
  border-radius: var(--radius-hand);
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.q-slot.is-next {
  border-color: var(--ochre);
  background: #FFFBF0;
}

.q-slot.is-filled {
  border-style: solid;
  border-color: var(--border-ink);
  background: #FFFDF8;
  box-shadow: 1.5px 2.5px 0 rgba(74, 68, 61, 0.14);
}

.q-slot-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.q-slot-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 11px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  background: var(--paper-deep);
  color: var(--navy);
  border: 1.5px solid var(--border-ink);
}

.q-slot.is-filled .q-slot-num {
  background: var(--navy);
  color: #FFFDF8;
}

.q-slot-text {
  font-family: var(--font-body);
  font-size: clamp(20px, 1.55vw, 28px);
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.q-slot:not(.is-filled) .q-slot-text {
  color: var(--ink-soft);
  font-weight: 700;
  opacity: 0.75;
}

.q-slot-replay {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--border-ink);
  background: var(--ochre-soft);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.q-slot-replay:hover {
  background: #F9E0A8;
}

.q-slot-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ans-btn {
  padding: 7px 18px;
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.4vw, 24px);
  font-weight: 800;
  color: #FFFDF8;
  cursor: pointer;
  box-shadow: 1.5px 2px 0 rgba(74, 68, 61, 0.2);
  transition: transform 0.14s ease, filter 0.14s ease;
}

.ans-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.ans-btn:active {
  transform: translateY(1px);
}

.ans-btn--yes {
  background: var(--teal);
}

.ans-btn--no {
  background: var(--dusty-red);
}

.ans-stamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 16px;
  border-radius: var(--radius-pill);
  border: 2.5px solid var(--border-ink);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.45vw, 24px);
  font-weight: 800;
  cursor: pointer;
  animation: stampPop 0.26s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.ans-stamp--yes {
  background: var(--teal-soft);
  color: var(--teal-dark);
  border-color: var(--teal-dark);
}

.ans-stamp--no {
  background: var(--dusty-red-soft);
  color: var(--dusty-red-dark);
  border-color: var(--dusty-red-dark);
}

@keyframes stampPop {
  0% { transform: scale(1.45) rotate(-8deg); opacity: 0.3; }
  70% { transform: scale(0.94) rotate(2deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Clue Questions Bank */
.clue-bank-box {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 10px 14px 12px;
  gap: 8px;
  overflow: hidden;
}

.clue-bank-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.clue-bank-title {
  font-family: var(--font-display);
  font-size: clamp(19px, 1.4vw, 24px);
  font-weight: 800;
  color: var(--navy);
}

.clue-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  overflow-y: auto;
  padding-right: 4px;
  align-content: start;
}

.clue-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 7px 12px;
  text-align: left;
  font-family: var(--font-body);
  font-size: clamp(18px, 1.28vw, 24px);
  font-weight: 800;
  line-height: 1.22;
  color: var(--ink);
  border: 2px solid var(--border-ink);
  border-radius: 15px 12px 16px 13px / 13px 16px 12px 15px;
  cursor: pointer;
  box-shadow: 1px 2px 0 rgba(74, 68, 61, 0.14);
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.14s ease;
}

/* Projector guarantee: >= 24px clue buttons and >= 28px bubbles on >= 1600px screens */
@media (min-width: 1600px) {
  .clue-btn {
    font-size: 24px;
  }
  .q-slot-text,
  .teacher-bubble-text,
  .guess-banner-line,
  .reveal-sentence-text {
    font-size: 28px;
  }
}

.clue-btn:hover:not(:disabled) {
  transform: translateY(-1.5px);
  box-shadow: 2px 3.5px 0 rgba(74, 68, 61, 0.2);
}

.clue-btn:active:not(:disabled) {
  transform: translateY(1px);
}

/* 4 unlabelled colour bands: fire -> stage/music -> army -> buildings */
.clue-btn--band-1 {
  background: #FCECE7;
  border-color: #B45C4E;
}

.clue-btn--band-2 {
  background: #FDF2DB;
  border-color: #BF882B;
}

.clue-btn--band-3 {
  background: #E5F2EE;
  border-color: #467971;
}

.clue-btn--band-4 {
  background: #E8EFF6;
  border-color: #3B5B78;
}

.clue-btn.is-used {
  opacity: 0.62;
  box-shadow: none;
}

.clue-btn-text {
  flex: 1 1 auto;
  min-width: 0;
}

.clue-hint-badge {
  flex-shrink: 0;
  display: none;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  border: 1.5px solid var(--border-ink);
  line-height: 1.1;
}

body.teacher-hints-on .clue-hint-badge {
  display: inline-flex;
  align-items: center;
}

.clue-hint-badge--yes {
  background: var(--teal);
  color: #FFFDF8;
}

.clue-hint-badge--no {
  background: var(--dusty-red);
  color: #FFFDF8;
}

/* PHASE 2: GUESS PANEL */
.guess-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 2px;
}

.mini-slots-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-slot-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--paper-card);
  border: 2px solid var(--border-ink);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.mini-slot-pill--yes {
  background: var(--teal-soft);
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}

.mini-slot-pill--no {
  background: var(--dusty-red-soft);
  border-color: var(--dusty-red-dark);
  color: var(--dusty-red-dark);
}

.guess-banner {
  padding: clamp(16px, 2vw, 24px) clamp(20px, 2.2vw, 28px);
  background: var(--ochre-soft);
}

.guess-banner-tag {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  color: var(--ochre-deep);
  margin-bottom: 4px;
}

.guess-banner-line {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.1vw, 34px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

.guess-choices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.guess-choice-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 16px;
  background: var(--paper-card);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-hand);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.guess-choice-btn:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 52%;
  width: 100%;
  justify-self: center;
}

.guess-choice-btn:hover {
  transform: translateY(-3px);
  background: #FFFBF0;
  border-color: var(--navy);
}

.guess-choice-btn:active {
  transform: translateY(1px);
}

.guess-choice-key {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy-soft);
  color: var(--navy);
  border: 2px solid var(--border-ink);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.guess-choice-thumb {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border-radius: 14px;
  padding: 4px;
  overflow: hidden;
}

.guess-choice-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guess-choice-label {
  font-family: var(--font-display);
  font-size: clamp(22px, 1.8vw, 28px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}

.guess-footer-row {
  display: flex;
  justify-content: flex-start;
}

/* PHASE 3: REVEAL PANEL */
.reveal-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(14px, 2vh, 22px);
  padding: clamp(20px, 2.4vw, 34px);
  height: 100%;
  overflow-y: auto;
  background: #FFFDF8;
}

.reveal-status-pill {
  align-self: flex-start;
  padding: 6px 20px;
  border-radius: 999px;
  border: 2.5px solid var(--border-ink);
  font-family: var(--font-display);
  font-size: clamp(22px, 1.9vw, 30px);
  font-weight: 800;
  box-shadow: 1.5px 2px 0 rgba(74, 68, 61, 0.16);
}

.reveal-status-pill--correct {
  background: var(--sage-soft);
  color: var(--sage-ok);
  border-color: var(--sage-ok);
}

.reveal-status-pill--wrong {
  background: var(--dusty-red-soft);
  color: var(--dusty-red-dark);
  border-color: var(--dusty-red-dark);
}

.reveal-vocab-card {
  padding: clamp(14px, 1.8vw, 24px) 22px;
  background: var(--paper);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-hand);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
}

.reveal-word {
  font-family: var(--font-display);
  font-size: clamp(34px, 3.2vw, 54px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.reveal-word .stress {
  color: var(--dusty-red);
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 5px;
}

.reveal-ipa {
  font-family: "Segoe UI", "Noto Sans", system-ui, sans-serif;
  font-size: clamp(22px, 1.9vw, 32px);
  font-weight: 700;
  color: var(--teal-dark);
}

.reveal-sentence-bubble {
  padding: clamp(16px, 2vw, 24px);
  background: var(--ochre-soft);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-hand);
}

.reveal-sentence-tag {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--ochre-deep);
  margin-bottom: 4px;
}

.reveal-sentence-text {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(22px, 1.8vw, 30px);
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}

.reveal-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.reveal-actions .primary-btn {
  margin-left: auto;
  padding: 12px 28px;
  font-size: clamp(20px, 1.7vw, 26px);
}

/* GET READY 3-2-1 OVERLAY */
.ready-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(251, 248, 241, 0.92);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.ready-card {
  width: min(760px, 94%);
  padding: clamp(24px, 3vw, 42px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: #FFFDF8;
}

.ready-student-tag {
  padding: 5px 22px;
  background: var(--navy);
  color: #FFFDF8;
  border: 2px solid var(--border-ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}

.ready-prompt {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 2.8vw, 42px);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
}

.ready-countdown {
  width: clamp(110px, 12vw, 150px);
  height: clamp(110px, 12vw, 150px);
  border-radius: 50%;
  background: var(--ochre-soft);
  border: 4px solid var(--border-ink);
  color: var(--dusty-red);
  font-family: var(--font-display);
  font-size: clamp(64px, 6.5vw, 96px);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-paper);
  animation: countPulse 0.78s ease;
}

@keyframes countPulse {
  0% { transform: scale(0.65); opacity: 0.35; }
  45% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.ready-skip-btn {
  margin-top: 4px;
}

/* ==========================================================================
   D. FINAL SCREEN
   ========================================================================== */

.screen--final {
  align-items: center;
  justify-content: center;
  padding: clamp(10px, 1.5vw, 20px) clamp(16px, 2vw, 30px);
  overflow-y: auto;
}

.final-stage {
  width: 100%;
  max-width: 1460px;
  height: 100%;
  max-height: 100%;
  padding: clamp(12px, 1.5vw, 20px);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.3vh, 16px);
  background: var(--paper-card);
  overflow: hidden;
}

.final-hero {
  position: relative;
  flex: 1 1 auto;
  min-height: 220px;
  aspect-ratio: 3 / 2;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.final-bg-slot {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.final-bg-slot .img-blend-32 {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.final-top-band {
  position: absolute;
  top: 2%;
  left: 12%;
  right: 12%;
  padding: clamp(4px, 0.8vh, 10px) 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  pointer-events: none;
  background: transparent;
}

.final-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.7vw, 44px);
  font-weight: 800;
  color: var(--navy);
  text-shadow: 0 2px 0 rgba(255, 253, 248, 0.95);
  text-align: center;
}

.final-score-pill {
  padding: 5px 20px;
  background: var(--ochre-soft);
  color: var(--ochre-deep);
  border: 2.5px solid var(--border-ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 32px);
  font-weight: 800;
  box-shadow: 1.5px 2.5px 0 rgba(74, 68, 61, 0.18);
}

.final-jobs-row {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.final-job-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 10px;
  background: var(--paper);
  border: 2.5px solid var(--border-ink);
  border-radius: var(--radius-hand);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.final-job-chip:hover {
  transform: translateY(-3px);
  background: #FFFBF0;
}

.final-job-chip.is-bouncing {
  background: var(--ochre-soft);
  border-color: var(--ochre-deep);
  box-shadow: 0 0 0 4px rgba(214, 148, 42, 0.35), var(--shadow-card);
  animation: charGentleBounce 0.65s ease-in-out infinite;
}

@keyframes charGentleBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-10px) scale(1.05); }
}

.final-job-thumb {
  width: clamp(56px, 6vw, 84px);
  height: clamp(56px, 6vw, 84px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.final-job-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.final-job-word {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.35vw, 22px);
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  line-height: 1.15;
}

.final-job-word .stress {
  color: var(--dusty-red);
}

.final-job-mark {
  font-size: 14px;
  font-weight: 800;
  color: var(--sage-ok);
}

.final-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ==========================================================================
   TEACHER NOTES SIDE DRAWER (LEFT SIDE)
   ========================================================================== */

.teacher-panel {
  position: fixed;
  top: 62px;
  left: 0;
  bottom: 0;
  width: min(370px, 90vw);
  background: #FFFDF8;
  border-right: 3px solid var(--border-ink);
  box-shadow: 8px 0 28px rgba(59, 55, 50, 0.18);
  z-index: 45;
  display: flex;
  flex-direction: column;
  transform: translateX(-105%);
  transition: transform 0.26s ease;
}

.teacher-panel.is-open {
  transform: translateX(0);
}

.teacher-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--navy);
  color: #FFFDF8;
  border-bottom: 2px solid var(--border-ink);
}

.teacher-panel-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
}

.teacher-panel-head-btns {
  display: flex;
  gap: 6px;
}

.close-x-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #FFFDF8;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFDF8;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.close-x-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.teacher-panel-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.notes-section {
  background: var(--paper);
  border: 2px solid rgba(74, 68, 61, 0.35);
  border-radius: 14px;
  padding: 12px 14px;
}

.notes-section h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}

.script-item {
  padding: 8px 10px;
  margin-bottom: 7px;
  background: #FFFDF8;
  border: 1.5px solid rgba(74, 68, 61, 0.28);
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.38;
}

.script-item:last-child {
  margin-bottom: 0;
}

.script-item.is-current {
  background: var(--ochre-soft);
  border-color: var(--ochre-deep);
  box-shadow: 0 0 0 2px rgba(214, 148, 42, 0.22);
}

.script-item-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 2px;
}

.kbd-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  font-size: 13px;
}

.kbd-list kbd {
  display: inline-block;
  padding: 1px 6px;
  margin-right: 4px;
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 800;
  background: #FFFDF8;
  border: 1.5px solid var(--border-ink);
  border-radius: 6px;
  color: var(--navy);
}

.notes-mini-pill {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 44;
  padding: 8px 16px;
  background: var(--navy);
  color: #FFFDF8;
  border: 2px solid var(--border-ink);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-card);
}

/* ==========================================================================
   MODAL & CONFETTI
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(59, 55, 50, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  width: min(460px, 92vw);
  padding: 24px 26px;
  text-align: center;
}

.modal-box h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--navy);
}

.modal-box p {
  margin: 0 0 20px;
  font-size: 18px;
  color: var(--ink-soft);
  line-height: 1.4;
}

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 70;
}

.confetti-piece {
  position: absolute;
  top: -16px;
  width: 12px;
  height: 16px;
  border-radius: 3px;
  opacity: 0.95;
  animation: confettiFall linear forwards;
}

@keyframes confettiFall {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
    opacity: 1;
  }
  85% {
    opacity: 1;
  }
  100% {
    transform: translate3d(var(--drift, 40px), 105vh, 0) rotate(var(--spin, 540deg));
    opacity: 0;
  }
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS (LAPTOP & TABLET)
   ========================================================================== */

@media (max-width: 1120px) {
  .icon-btn .btn-label {
    display: none;
  }

  .intro-layout {
    grid-template-columns: 1fr;
    max-width: 820px;
  }

  .intro-art-frame {
    max-width: 460px;
    margin: 0 auto;
  }

  .teacher-bubble::before {
    display: none;
  }

  .board-cards {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }

  .round-workspace {
    grid-template-columns: minmax(240px, 0.72fr) minmax(380px, 1.28fr);
    gap: 12px;
  }

  .clue-btn {
    font-size: 16px;
    padding: 6px 10px;
  }
}

@media (max-width: 820px) {
  html, body {
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: visible;
  }

  .board-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .icq-grid {
    grid-template-columns: 1fr;
  }

  .round-workspace {
    grid-template-columns: 1fr;
  }

  .job-card-stage {
    height: 320px;
  }

  .clue-grid {
    grid-template-columns: 1fr;
  }

  .guess-choices-grid {
    grid-template-columns: 1fr;
  }

  .guess-choice-btn:last-child:nth-child(odd) {
    max-width: 100%;
  }

  .final-jobs-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
