/* ─────────────────────────────────────────────────────────
   Febe ClassMaster — Playful Cloud-Glass Theme
   Vibrant, Cheerful & Playful Light Theme for Kids & Teachers
   ───────────────────────────────────────────────────────── */

:root {
  /* Cheerful Child-Friendly Pastel Colors */
  --bg-space: #f3f6ff; /* Soft pastel morning blue background */
  --bg-surface: rgba(255, 255, 255, 0.75); /* Soft white glass clouds */
  --bg-surface-hover: rgba(255, 255, 255, 0.9);
  --border: rgba(255, 255, 255, 0.6); /* Soft glass boundary */
  --border-neon: rgba(99, 102, 241, 0.15); /* Soft Indigo border */
  --border-neon-hover: rgba(99, 102, 241, 0.35);
  --primary-neon: #6366f1; /* Cheerful Indigo Violet */
  --primary-neon-hover: #8b5cf6; /* Candy Purple */
  --secondary-neon: #10b981; /* Mint Green */
  --accent-neon: #fbbf24; /* Sun Gold */
  
  --text-main: #1e293b; /* Readable Slate Grey */
  --text-muted: #64748b; /* Soft Muted Slate */
  
  /* Playful System Sizing */
  --sidebar-width: 280px;
  --radius-lg: 24px; /* Playful large round corner */
  --radius-md: 16px; /* Playful medium round corner */
  --radius-sm: 10px; /* Playful small round corner */
  --transition-elastic: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-smooth: all 0.25s ease;
  
  /* Fluffy Soft Drop Shadows & Glows */
  --glow-primary: 0 8px 22px rgba(99, 102, 241, 0.2);
  --glow-secondary: 0 8px 22px rgba(16, 185, 129, 0.2);
  --shadow-dark: 0 10px 30px rgba(99, 102, 241, 0.05), 0 2px 4px rgba(99, 102, 241, 0.02);
  --shadow-paper: 0 20px 50px rgba(99, 102, 241, 0.08);
}

/* ─── BASE RESET ─────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  background-color: var(--bg-space);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(244, 63, 94, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.06) 0px, transparent 50%);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

#app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* ─── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  padding: 32px 0 24px;
  z-index: 100;
  position: relative;
  flex-shrink: 0;
}

.brand {
  display: flex;
  padding: 0 28px;
  margin-bottom: 36px;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  font-size: 26px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-neon-hover) 100%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  box-shadow: var(--glow-primary);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 900;
  font-size: 20px;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.brand-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--primary-neon-hover);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 1px;
}

.nav-menu {
  flex: 1;
  padding: 0 16px;
  overflow-y: auto;
}

.nav-menu::-webkit-scrollbar {
  width: 4px;
}
.nav-menu::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-elastic);
  margin: 8px 8px;
  color: var(--text-muted);
  position: relative;
  border: 1px solid transparent;
  font-weight: 700;
}

.nav-item:hover {
  background-color: rgba(99, 102, 241, 0.05);
  color: var(--primary-neon);
  transform: translateX(6px);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-neon-hover) 100%);
  color: white;
  box-shadow: var(--glow-primary);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 25%;
  height: 50%;
  width: 4px;
  background: white;
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  font-size: 18px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.06);
}

.nav-item.active .nav-icon {
  background: rgba(255, 255, 255, 0.2);
}

.nav-text {
  font-size: 14px;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(99, 102, 241, 0.08);
}

.user-profile {
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-neon-hover) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 850;
  font-size: 18px;
  box-shadow: var(--glow-primary);
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.user-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: var(--primary-neon);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logout-btn {
  width: 100%;
  padding: 12px;
  background: rgba(239, 68, 68, 0.06);
  border: 1px solid rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-elastic);
}

.logout-btn:hover {
  background: #ef4444;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(239, 68, 68, 0.18);
}

/* ─── MAIN CONTENT ───────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.header {
  height: 80px;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  flex-shrink: 0;
  z-index: 50;
}

.header-title-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header h1 {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.org-selector {
  padding: 10px 18px;
  border-radius: 14px;
  border: 1px solid rgba(99, 102, 241, 0.15);
  background-color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  outline: none;
  min-width: 190px;
  transition: var(--transition-smooth);
}

.org-selector:hover {
  border-color: var(--primary-neon);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.1);
}

.org-selector:focus {
  border-color: var(--primary-neon);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* ─── APP WORKSPACE GRID LAYOUT ───────────────────────── */
.app-workspace {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  height: calc(100vh - 80px); /* Subtract header height */
  padding: 0 40px 24px 40px;
  overflow: hidden;
}

.app-workspace.full-width-workspace {
  grid-template-columns: 1fr;
}

.app-workspace.full-width-workspace .app-controls {
  display: none;
}

.app-controls {
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  overflow-y: auto;
  padding-right: 6px;
  padding-top: 10px;
}

.app-display {
  height: 100%;
  overflow-y: auto;
  padding-right: 6px;
  padding-top: 10px;
}

/* Sleek custom scrollbars */
.app-controls::-webkit-scrollbar,
.app-display::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.app-controls::-webkit-scrollbar-track,
.app-display::-webkit-scrollbar-track {
  background: transparent;
}

.app-controls::-webkit-scrollbar-thumb,
.app-display::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.15);
  border-radius: 3px;
}

.app-controls::-webkit-scrollbar-thumb:hover,
.app-display::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.3);
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ─── CARDS & SECTIONS ────────────────────────────────── */
.card {
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-dark);
  transition: var(--transition-elastic);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-neon-hover);
  transform: translateY(-4px);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.08), 0 2px 5px rgba(0, 0, 0, 0.02);
}

.card-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.08);
  padding-bottom: 12px;
}

.card-title span {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ─── FORM ELEMENTS ──────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 950;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.form-select, .form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.15);
  background-color: rgba(255, 255, 255, 0.8);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
}

.form-select:hover, .form-input:hover {
  border-color: rgba(99, 102, 241, 0.3);
  background-color: #ffffff;
}

.form-select:focus, .form-input:focus {
  border-color: var(--primary-neon);
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Chips selection grid */
.chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding: 14px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  border: 1px dashed rgba(99, 102, 241, 0.18);
}

.chip {
  padding: 10px 16px;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-elastic);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chip:hover {
  border-color: var(--primary-neon);
  color: var(--primary-neon);
  transform: translateY(-2px) scale(1.02);
}

.chip.active {
  background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-neon-hover) 100%) !important;
  border-color: transparent !important;
  color: #fff !important;
  box-shadow: var(--glow-primary);
}

/* Accordion for advanced parameters */
.accordion {
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.accordion-header {
  width: 100%;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  font-size: 12.5px;
  font-weight: 900;
  color: var(--primary-neon);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.accordion-header:hover {
  background: rgba(255, 255, 255, 0.8);
}

.accordion-body {
  padding: 20px;
  background: rgba(255, 255, 255, 0.2);
  border-top: 1px solid rgba(99, 102, 241, 0.08);
  display: none;
}

.accordion.active .accordion-body {
  display: block;
}

/* ─── PREVIEW & ACTION CARD (STEP 3) ─────────────────── */
.preview-action-card {
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.6));
  box-shadow: 0 20px 50px rgba(99, 102, 241, 0.05);
}

.preview-container {
  min-height: 280px;
  background: #f8faff; /* Bright visual board background */
  border: 1px dashed rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  overflow: auto;
  max-height: 400px;
  box-shadow: inset 0 2px 8px rgba(99, 102, 241, 0.03);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.preview-container:has(.empty-preview) {
  align-items: center;
}

.empty-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: inherit;
  text-align: center;
}

.empty-preview i {
  font-size: 38px;
  margin-bottom: 14px;
  color: var(--primary-neon);
  filter: drop-shadow(0 4px 10px rgba(99, 102, 241, 0.2));
}

.btn-primary {
  width: 100%;
  height: 52px;
  background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-neon-hover) 100%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  font-weight: 900;
  font-size: 15.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-elastic);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.35);
  border-color: rgba(255, 255, 255, 0.4);
}

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

.btn-secondary {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.15);
  color: var(--text-main);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-elastic);
  margin-top: 12px;
}

.btn-secondary:hover {
  border-color: var(--primary-neon);
  color: var(--primary-neon);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(99, 102, 241, 0.08);
}

/* ─── REALISTIC PHYSICAL PAPER VIEW ──────────────────── */
.print-page-container, #printable-area {
  background: #ffffff !important;
  color: #000000 !important;
  margin: 10px auto !important;
  box-shadow: var(--shadow-paper) !important;
  border-radius: 8px;
  transform-origin: top center;
  border: 1px solid rgba(99, 102, 241, 0.08);
}

/* A4 scaling is handled by JS zoomPreview() on #paper-a4-scaling-wrapper */
#paper-a4-scaling-wrapper {
  transform-origin: top center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

#paper-preview {
  display: inline-block;
  background: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

/* ─── CLASSROOM PRESENTATION OVERLAY ─────────────────── */
.classroom-overlay {
  position: fixed;
  inset: 0;
  background: #FFF9E6; /* Eden Sunny Background */
  background-image: radial-gradient(rgba(224, 208, 176, 0.3) 2px, transparent 2px);
  background-size: 30px 30px;
  z-index: 1000;
  display: none;
  flex-direction: column;
  color: var(--text-main);
  user-select: none;
  padding: 40px;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.classroom-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 850;
  color: var(--text-muted);
  border-bottom: 2px solid var(--v2-border-main, #E0D0B0);
  padding-bottom: 20px;
}

.classroom-close-btn {
  background: white;
  border: 3px solid #E0D0B0;
  color: #FF8A00;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 0 #E0D0B0;
  transition: all 0.1s;
}

.classroom-close-btn:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #E0D0B0;
}

.classroom-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.classroom-number-display {
  font-size: 180px;
  font-weight: 900;
  font-family: 'Outfit', 'Fredoka One', 'Noto Sans SC', sans-serif;
  color: var(--text-main);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: transform 0.1s ease-out;
}

/* EdenAbacus Look Mode Styles (Vertical List) */
.v2-look-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  min-width: 260px;
  background: white;
  border-radius: 24px;
  border: 4px solid #E0D0B0;
  box-shadow: 0 10px 0 #E0D0B0;
  margin: 20px 0;
}

.v2-look-item {
  font-size: 64px;
  font-weight: 900;
  font-family: 'Outfit', sans-serif;
  line-height: 1.1;
  display: grid;
  grid-template-columns: 0.5fr 1.5fr;
  align-items: center;
  width: 100%;
  font-variant-numeric: tabular-nums;
}

.v2-look-item.pos { color: #2196F3; }
.v2-look-item.neg { color: #FF5252; }

.v2-look-item .symbol {
  text-align: left;
  opacity: 0.8;
  padding-left: 10px;
}

.v2-look-item .val {
  text-align: right;
  padding-right: 10px;
}

.v2-look-divider {
  width: 100%;
  height: 4px;
  background: #4A4A4A;
  margin: 15px 0;
  border-radius: 2px;
}

@keyframes v2PulseQuick {
  0% { transform: scale(0.8); opacity: 0.6; }
  100% { transform: scale(1); opacity: 1; }
}

/* Circular glowing ring countdown wrapper */
.classroom-progress-bar-container {
  width: 60%;
  height: 20px;
  background: white;
  border-radius: 20px;
  margin-top: 50px;
  overflow: hidden;
  border: 3px solid #E0D0B0;
  box-shadow: 0 4px 0 #E0D0B0;
}

.classroom-progress-bar {
  height: 100%;
  width: 0%;
  background: #FF8A00;
  border-radius: 20px;
  transition: width 0.1s linear;
}

.classroom-footer {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.btn-control {
  background: white;
  border: 3px solid #E0D0B0;
  color: #FF8A00;
  padding: 14px 28px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.1s ease;
  box-shadow: 0 6px 0 #E0D0B0;
}

.btn-control:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #E0D0B0;
}

.btn-control.active-play {
  background: #FF8A00;
  border-color: #E67E00;
  color: white;
  box-shadow: 0 6px 0 #E67E00;
}

.btn-control.active-play:active {
  box-shadow: 0 3px 0 #E67E00;
}

/* Sound Wave/Speaker Indicator */
.sound-indicator {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 100px;
  margin-top: 40px;
  opacity: 0.3;
  transition: var(--transition-smooth);
}

.sound-indicator.animating {
  opacity: 1;
}

.sound-bar {
  width: 14px;
  height: 20px;
  background: linear-gradient(to top, #34d399, #fbbf24);
  border-radius: 8px;
  transition: height 0.15s ease;
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.3);
}

.sound-indicator.animating .sound-bar:nth-child(1) { animation: soundWave 0.8s infinite ease-in-out alternate; }
.sound-indicator.animating .sound-bar:nth-child(2) { animation: soundWave 0.8s infinite ease-in-out alternate 0.2s; }
.sound-indicator.animating .sound-bar:nth-child(3) { animation: soundWave 0.8s infinite ease-in-out alternate 0.4s; }
.sound-indicator.animating .sound-bar:nth-child(4) { animation: soundWave 0.8s infinite ease-in-out alternate 0.1s; }

/* Grid answers layout for review */
.classroom-review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  width: 100%;
  max-height: 70vh;
  overflow-y: auto;
  padding: 10px;
}

.review-item {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition-elastic);
  color: white;
}

.review-item:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

.review-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 750;
}

.review-nums {
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0.5px;
  color: #fff;
  word-wrap: break-word;
}

.review-ans {
  font-size: 24px;
  font-weight: 900;
  color: #fef08a; /* Sunny Yellow */
  text-align: right;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 8px;
  text-shadow: 0 0 10px rgba(254, 240, 138, 0.4);
}

/* ─── ANIMATIONS ─────────────────────────────────────── */
@keyframes numPop {
  0% { transform: scale(0.7); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes soundWave {
  0% { height: 10px; }
  100% { height: 90px; }
}

/* ─── CUSTOM RULES MATRIX STYLING (JONAS STYLE) ───────── */
.rules-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  background: rgba(255, 255, 255, 0.4);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.rule-card {
  padding: 14px 10px;
  background: #ffffff;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-elastic);
  color: var(--text-main);
}

.rule-card:hover {
  border-color: var(--primary-neon);
  background-color: rgba(99, 102, 241, 0.02);
  transform: translateY(-2px);
  color: var(--primary-neon);
}

.rule-card.active {
  background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-neon-hover) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: var(--glow-primary);
}

.rule-card-title {
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 6px;
}

.rule-card-desc {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 700;
}

.rule-card.active .rule-card-desc {
  color: rgba(255, 255, 255, 0.85);
}

/* Rule chips grid inside sub-options */
.rule-chip {
  padding: 8px 12px;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  text-align: center;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-main);
  font-weight: 700;
  transition: all 0.15s ease;
  user-select: none;
}

.rule-chip:hover {
  border-color: var(--primary-neon);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
}

.rule-chip.selected {
  background: var(--primary-neon) !important;
  border-color: var(--primary-neon) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

/* ─── TOAST NOTIFICATION ────────────────────────────── */
#toast-container {
  position: fixed;
  top: 30px;
  right: 30px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: var(--text-main);
  padding: 14px 28px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(99, 102, 241, 0.12);
  animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.success {
  border-left: 5px solid var(--secondary-neon);
}

.toast.error {
  border-left: 5px solid #ef4444;
}

@keyframes toastIn {
  from { transform: translateY(-20px) scale(0.9); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ─── PRINT OVERLAY & HIDES ─────────────────────────── */
@media print {
  body {
    background-color: white !important;
    background-image: none !important;
    overflow: visible !important;
    height: auto !important;
  }
  #app-container, .sidebar, .header, .classroom-overlay, #toast-container, #global-question-config {
    display: none !important;
  }
  .print-page-container, #printable-area {
    display: block !important;
    transform: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: auto !important;
  }
}

/* ─── MODAL OVERLAYS ─────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border-neon);
  border-radius: var(--radius-lg);
  padding: 36px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.12);
  position: relative;
  overflow: hidden;
  animation: modalIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
  pointer-events: none;
}

@keyframes modalIn {
  from { transform: translateY(30px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.abacus-container {
  background: #fdf6e3;
  border: 8px solid #8b5e3c;
  border-radius: 20px;
  padding: 20px 30px;
  display: inline-flex;
  gap: 32px;
  box-shadow: 0 10px 0 #5d3a24, inset 0 2px 10px rgba(0,0,0,0.1);
  position: relative;
  margin-top: 20px;
  touch-action: none;
}
.abacus-rod {
  width: 64px; height: 300px;
  position: relative;
  display: flex; flex-direction: column; align-items: center;
}
.abacus-rod::before {
  content: "";
  position: absolute; top: 0; bottom: 0;
  width: 4px;
  background: #d4a574;
  border-radius: 2px;
  box-shadow: inset 1px 0 2px rgba(0,0,0,0.2);
}
.abacus-divider-bar {
  position: absolute;
  top: 85px; left: -15px; right: -15px;
  height: 12px;
  background: #8b5e3c;
  z-index: 10;
  border-radius: 6px;
}
.abacus-divider-bar.has-dot::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
}
.bead {
  width: 76px; height: 44px;
  border-radius: 22px;
  position: absolute;
  z-index: 5;
  transition: all 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  cursor: pointer;
  pointer-events: all;
  touch-action: none;
  user-select: none;
}
.bead:active { filter: brightness(1.3); transform: scale(1.05); }
.bead-up  { background: linear-gradient(to bottom,#ffcc33,#e6b800); box-shadow: 0 4px 0 #b38f00, inset 0 2px 4px rgba(255,255,255,0.6); top: 5px; }
.bead-up.active { top: 38px; }
.bead-down { background: linear-gradient(to bottom,#a0522d,#8b4513); box-shadow: 0 4px 0 #5d2e0a, inset 0 2px 4px rgba(255,255,255,0.3); }
.bead-down-1 { bottom:145px; } .bead-down-2 { bottom:98px; }
.bead-down-3 { bottom:51px;  } .bead-down-4 { bottom:4px;  }
.bead-down-1.active { bottom:162px; } .bead-down-2.active { bottom:115px; }
.bead-down-3.active { bottom:68px;  } .bead-down-4.active { bottom:21px;  }
.abacus-label {
  position: absolute; bottom: -30px;
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #8b5e3c;
}

/* ─── CLASSROOM PRESENTATION DASHBOARD ENHANCEMENTS ─── */
.mode-chips-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 15px;
}

.launch-big-btn {
  background: linear-gradient(135deg, var(--primary-neon) 0%, #4f46e5 100%) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  padding: 14px 20px !important;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
  border-radius: var(--radius-md) !important;
}
.launch-big-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 30px rgba(99, 102, 241, 0.4) !important;
}

/* Live Question Sample Stream */
.live-sample-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.sample-problem-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.sample-problem-card:hover {
  border-color: var(--primary-neon);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
}

.sample-badge {
  font-size: 11px;
  font-weight: 900;
  color: var(--primary-neon);
  background: rgba(99, 102, 241, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
  align-self: flex-start;
  font-family: 'JetBrains Mono', monospace;
}

.sample-formula {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.5px;
}

.sample-answer {
  display: none;
  align-items: center;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(99, 102, 241, 0.15);
  font-size: 13px;
  font-weight: 800;
}
.sample-answer.visible {
  display: flex;
}
.sample-ans-label {
  color: var(--text-muted);
}
.sample-ans-val {
  color: #10b981;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
}

/* Projection Hub Banner */
.projection-hub-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  color: white;
  display: flex;
  align-items: center;
  gap: 20px;
  cursor: pointer;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.2);
  transition: var(--transition-elastic);
  position: relative;
  overflow: hidden;
}
.projection-hub-banner::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.projection-hub-banner:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 20px 40px rgba(99, 102, 241, 0.3);
  border-color: var(--primary-neon-hover);
}

.hub-icon-glow {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(99, 102, 241, 0.25);
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #a5b4fc;
  flex-shrink: 0;
}

.hub-info {
  flex: 1;
}
.hub-info h3 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
}
.hub-info p {
  font-size: 12.5px;
  color: #94a3b8;
  line-height: 1.4;
}

.hub-action-badge {
  background: var(--primary-neon);
  color: white;
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--glow-primary);
  flex-shrink: 0;
}

/* Shortcuts Guide Panel */
.shortcuts-guide-panel {
  background: rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shortcuts-title {
  font-size: 12px;
  font-weight: 900;
  color: var(--primary-neon-hover);
  display: flex;
  align-items: center;
  gap: 6px;
}
.shortcuts-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.shortcut-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}
kbd {
  background: white;
  border: 1px solid #cbd5e1;
  box-shadow: 0 2px 0 #94a3b8;
  border-radius: 6px;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 800;
  color: #0f172a;
}

/* ─── INTERACTIVE ABACUS SANDBOX (TAB 2) ─── */
.sandbox-rods-group {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.8);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(99, 102, 241, 0.15);
}
.sandbox-rod-chip {
  padding: 4px 12px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}
.sandbox-rod-chip.active {
  background: var(--primary-neon);
  color: white;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.sandbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: var(--radius-md);
  padding: 12px 20px;
}

.sandbox-readout-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.readout-label {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
}
.readout-number {
  font-size: 32px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary-neon-hover);
  min-width: 60px;
}

.btn-icon {
  background: rgba(99, 102, 241, 0.1);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--primary-neon);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}
.btn-icon:hover {
  background: var(--primary-neon);
  color: white;
}

.sandbox-setter-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sandbox-abacus-viewport {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

/* ─── DUAL-TRACK CURRICULUM SWITCHER ─── */
.curriculum-switcher-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.curriculum-tab-btn {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-elastic);
}
.curriculum-tab-btn:hover {
  color: var(--primary-neon);
  border-color: var(--primary-neon);
  background: white;
}
.curriculum-tab-btn.active {
  background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-neon-hover) 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3);
}

.sample-topic-tag {
  font-size: 10px;
  font-weight: 800;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ─── INTERACTIVE MATH TOOLKITS (TAB 3) ─── */
.math-tool-tabs-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.math-tool-tab {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(99, 102, 241, 0.15);
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}
.math-tool-tab:hover {
  color: var(--primary-neon);
  background: white;
}
.math-tool-tab.active {
  background: #059669;
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.math-tool-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.math-tool-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.math-tool-header h3 {
  font-size: 18px;
  font-weight: 900;
  color: var(--text-main);
}
.math-tool-tag {
  font-size: 11px;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary-neon-hover);
  padding: 4px 10px;
  border-radius: 6px;
}

.tool-controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(241, 245, 249, 0.6);
  padding: 12px 18px;
  border-radius: var(--radius-md);
}

/* Number Line Stage */
.number-line-stage {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 20px 10px;
}
.nl-equation-banner {
  font-size: 32px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-main);
  text-align: center;
}
.nl-target-val {
  color: #10b981;
  border-bottom: 4px solid #10b981;
  padding: 0 8px;
}

.nl-track-container {
  position: relative;
  height: 140px;
  width: 100%;
}
.nl-svg-arc {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100px;
  overflow: visible;
}
@keyframes pulseArc {
  0% { stroke: #6366f1; stroke-width: 4; }
  100% { stroke: #ec4899; stroke-width: 6; }
}
.nl-line-axis {
  position: absolute;
  bottom: 30px;
  left: 3%;
  right: 3%;
  height: 4px;
  background: #334155;
  border-radius: 2px;
}
.nl-tick {
  position: absolute;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.nl-mark {
  width: 2px;
  height: 20px;
  background: #64748b;
  border-radius: 1px;
}
.nl-num {
  font-size: 13px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: #475569;
  margin-top: 6px;
}
.nl-tick.start-tick .nl-mark {
  background: #6366f1;
  width: 4px;
  height: 26px;
}
.nl-tick.start-tick .nl-num {
  color: #6366f1;
  font-size: 15px;
  font-weight: 900;
}
.nl-tick.end-tick .nl-mark {
  background: #10b981;
  width: 4px;
  height: 26px;
}
.nl-tick.end-tick .nl-num {
  color: #10b981;
  font-size: 16px;
  font-weight: 900;
}

/* Column Math Stage */
.column-stage-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  padding: 20px 0;
}
.column-math-display {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: var(--radius-lg);
  padding: 24px 36px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  min-width: 180px;
  font-family: 'JetBrains Mono', monospace;
}
.col-row {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: 4px;
}
.col-op-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  justify-content: space-between;
}
.col-op {
  color: var(--primary-neon-hover);
  font-size: 32px;
}
.col-divider {
  width: 100%;
  height: 4px;
  background: var(--text-main);
  margin: 8px 0;
  border-radius: 2px;
}
.col-ans {
  color: #10b981;
  font-size: 44px;
}
.column-explanation-card {
  background: rgba(99, 102, 241, 0.05);
  border: 1px dashed rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  max-width: 380px;
}
.column-explanation-card h4 {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-neon-hover);
  margin-bottom: 10px;
}
.column-explanation-card ul {
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--text-main);
}

/* Fraction Models */
.fraction-result-badge {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-neon-hover);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-left: auto;
}
.fraction-models-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.fraction-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(0,0,0,0.06);
}
.fraction-card h4 {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-muted);
}
.fraction-bar-container {
  display: flex;
  height: 50px;
  width: 100%;
  max-width: 320px;
  border: 2px solid #64748b;
  border-radius: 8px;
  overflow: hidden;
}
.fraction-bar-seg {
  height: 100%;
  border-right: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: white;
  background: #f1f5f9;
}
.fraction-bar-seg.active {
  background: linear-gradient(135deg, var(--primary-neon) 0%, var(--primary-neon-hover) 100%);
}
.fraction-pie {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid white;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}
.pie-center-label {
  background: white;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 14px;
  color: var(--primary-neon-hover);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Utilities Grid */
.utilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.utility-subcard {
  background: white;
  border: 1px solid rgba(99, 102, 241, 0.12);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}
.subcard-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary-neon-hover);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.picker-display {
  font-size: 26px;
  font-weight: 900;
  color: var(--text-main);
  padding: 16px 24px;
  background: rgba(99, 102, 241, 0.05);
  border: 2px dashed rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  width: 80%;
  text-align: center;
}
/* ══════════════════════════════════════════════════════════════
   🎮 ARCADE GAME HALL & LOBBY STYLES (PRO WHITEBOARD EDITION)
══════════════════════════════════════════════════════════════ */
.btn-lobby-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: white;
  border: 2px solid #cbd5e1;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-lobby-back:hover {
  background: #f8fafc;
  border-color: #f59e0b;
  color: #d97706;
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
}

.arcade-lobby-wrapper {
  background: linear-gradient(180deg, #f8fafc 0%, #edf2f7 100%);
  border: 2px solid #e2e8f0;
  border-radius: 24px;
  padding: 24px 28px 36px 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.arcade-lobby-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid #e2e8f0;
}

.arcade-lobby-title-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.arcade-neon-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

.arcade-main-title {
  font-size: 24px;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.arcade-sub-title {
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  font-family: 'JetBrains Mono', monospace;
}

.arcade-desc {
  font-size: 13.5px;
  color: #475569;
  margin: 0;
}

.btn-arcade-fullscreen {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid #cbd5e1;
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-arcade-fullscreen:hover {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.2);
}

/* Cabinet Showcase Grid */
.arcade-cabinet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 22px;
}

.arcade-cabinet-card {
  background: white;
  border: 2.5px solid #cbd5e1;
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.arcade-cabinet-card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: #f59e0b;
  box-shadow: 0 16px 36px var(--cabinet-glow, rgba(245, 158, 11, 0.25));
}

.cabinet-top-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid rgba(0, 0, 0, 0.04);
}

.cabinet-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.cabinet-tag-pill {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
}

.cabinet-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cabinet-title {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  margin: 0;
  line-height: 1.35;
}

.cabinet-subtitle {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  font-family: 'JetBrains Mono', monospace;
  margin-top: -4px;
}

.cabinet-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
  margin: 2px 0 6px 0;
  flex: 1;
}

.cabinet-skills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cabinet-skill-badge {
  background: #f1f5f9;
  color: #475569;
  font-size: 11.5px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.cabinet-footer {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1.5px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.cabinet-diff-info {
  font-size: 12px;
  font-weight: 800;
  color: #059669;
}

.btn-cabinet-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border: none;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.5px;
  padding: 8px 18px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35), 0 2px 0 #b45309;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-cabinet-start:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5), 0 3px 0 #92400e;
}
.btn-cabinet-start:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
}

/* ══════════════════════════════════════════════════════════════
   CLASSROOM INTERACTIVE MINI-GAMES STYLING
══════════════════════════════════════════════════════════════ */
.timer-display {
  font-size: 38px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: #e11d48;
  letter-spacing: 2px;
}
.scoreboard-container {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.score-box {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.team-red { background: #ffe4e6; color: #be123c; }
.team-blue { background: #e0e7ff; color: #3730a3; }
.team-name { font-size: 12px; font-weight: 800; }
.team-score { font-size: 30px; font-weight: 900; font-family: 'JetBrains Mono', monospace; }
.score-btns { display: flex; gap: 6px; }
.score-btns button {
  border: none;
  background: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.score-vs {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-muted);
}

/* ══════════════════════════════════════════════════════════════
   🧮 3. DIAMOND BEAD RUSH STYLES (PRO WHITEBOARD EDITION)
══════════════════════════════════════════════════════════════ */
.treasure-theme {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 16px 20px;
}
.treasure-rush-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 4px 10px;
}
.treasure-abacus-card {
  background: white;
  border: 3px solid #cbd5e1;
  border-radius: 20px;
  padding: 12px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  min-width: 440px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.treasure-abacus-card.interactive-active {
  border-color: #38bdf8;
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.18), inset 0 0 12px rgba(56, 189, 248, 0.05);
}
.treasure-abacus-card.bead-success-pulse {
  border-color: #10b981;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.4), inset 0 0 20px rgba(16, 185, 129, 0.15);
  transform: scale(1.02);
}

.bead-target-glow {
  display: inline-block;
  padding: 2px 14px;
  margin: 0 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.35);
  animation: targetGlowPulse 2s infinite ease-in-out;
}
@keyframes targetGlowPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.4)); }
  50% { transform: scale(1.06); filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.7)); }
}

/* Flash Mode Countdown Progress Bar */
.bead-flash-timer-track {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: #f1f5f9;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  overflow: hidden;
}
.bead-flash-timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  border-radius: 3px;
  transform-origin: left;
}

/* Flash Mode Vault Curtain */
.rush-flash-curtain {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  transition: opacity 0.25s ease-out;
}
.rush-flash-curtain.active {
  opacity: 1;
}
.curtain-vault-door {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: linear-gradient(145deg, #1e293b, #0f172a);
  border: 3px solid #f59e0b;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5), inset 0 0 20px rgba(245, 158, 11, 0.2);
}
.vault-lock-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fbbf24, #b45309);
  border: 3px solid #fef3c7;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
  position: relative;
}
.vault-lock-icon {
  font-size: 24px;
  color: #78350f;
}
.vault-question-mark {
  position: absolute;
  right: -6px;
  top: -6px;
  background: #ef4444;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 900;
  border: 2px solid white;
  animation: bounce 1.2s infinite;
}
.vault-prompt-label {
  font-size: 15px;
  font-weight: 900;
  color: #fef3c7;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.rush-abacus-wrapper {
  min-height: 260px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: visible;
  width: 100%;
  padding: 4px 0 14px 0;
}
#game-rush-abacus {
  display: flex;
  justify-content: center;
  align-items: center;
  transform: scale(0.65);
  transform-origin: top center;
}
#game-rush-abacus .abacus-container {
  margin-top: 0;
}

.treasure-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 680px;
}
.treasure-chest-btn {
  background: white;
  border: 3px solid #f59e0b;
  border-radius: 20px;
  height: 72px;
  padding: 8px 16px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.15), 0 3px 0 #d97706;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}
.treasure-chest-btn:hover {
  transform: translateY(-4px) scale(1.04);
  border-color: #d97706;
  background: #fffbeb;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.25), 0 4px 0 #b45309;
}
.treasure-chest-btn:active {
  transform: translateY(2px) scale(0.98);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
}
.treasure-chest-btn.correct-burst {
  background: #ecfdf5 !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.4), 0 4px 0 #059669 !important;
  transform: scale(1.08);
}
.treasure-chest-btn.correct-burst .chest-icon {
  animation: chestSpinBurst 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes chestSpinBurst {
  0% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.5) rotate(20deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.chest-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}
.chest-val {
  font-size: 32px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: #1e293b;
}

.treasure-interactive-footer {
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 680px;
}

/* Bead Rush — classroom game console */
.game-stage-card.treasure-theme {
  --rush-ink: #10213f;
  --rush-blue: #1d4ed8;
  --rush-sky: #38bdf8;
  --rush-gold: #fbbf24;
  --rush-paper: #fffaf0;
  position: relative;
  min-height: 760px;
  overflow: hidden;
  padding: 18px 22px 22px;
  gap: 18px;
  border: 1px solid rgba(29, 78, 216, .14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 8% 12%, rgba(56,189,248,.17), transparent 24%),
    radial-gradient(circle at 92% 88%, rgba(251,191,36,.14), transparent 28%),
    linear-gradient(145deg, #f8fbff 0%, #eef4ff 46%, #fffaf0 100%);
  box-shadow: 0 24px 60px rgba(23, 48, 93, .10);
}
.game-stage-card.treasure-theme::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .26;
  background-image: radial-gradient(rgba(29,78,216,.22) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, black, transparent 48%);
}
.bead-rush-header {
  position: relative;
  z-index: 2;
  align-items: stretch;
  padding: 0;
  gap: 12px 20px;
}
.bead-rush-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}
.bead-rush-title {
  display: grid;
  gap: 1px;
  margin: 0;
  color: var(--rush-ink);
  font-family: "Noto Sans SC", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.15;
}
.bead-rush-kicker {
  color: var(--rush-blue);
  font-family: "JetBrains Mono", monospace;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .24em;
}
.treasure-theme .btn-lobby-back {
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 14px;
  background: var(--rush-ink);
  color: #fff;
  box-shadow: 0 5px 0 #07142a;
}
.bead-rush-controls {
  flex: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
}
.treasure-theme .game-mode-toggle {
  padding: 4px;
  gap: 2px;
  border: 1px solid #dbe6f5;
  border-radius: 14px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 5px 14px rgba(16,33,63,.05);
}
.treasure-theme .g-mode-btn {
  min-height: 34px;
  padding: 6px 12px;
  color: #60708b;
  border-radius: 10px;
}
.treasure-theme .g-mode-btn:hover { color: var(--rush-blue); background: #edf5ff; }
.treasure-theme .g-mode-btn.active {
  color: #fff;
  background: var(--rush-blue);
  box-shadow: 0 4px 10px rgba(29,78,216,.25);
}
.treasure-theme .arcade-fever-gauge {
  border: 1px solid rgba(251,191,36,.4);
  border-radius: 14px;
  background: #fff9df;
}
.treasure-theme .game-score-badge {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 5px 14px;
  border: 0;
  border-radius: 14px;
  background: var(--rush-ink);
  color: #bfcee4;
}
.treasure-theme .game-score-badge strong { color: var(--rush-gold); }
.treasure-rush-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(560px, 1.25fr) minmax(370px, .75fr);
  grid-template-rows: auto 1fr;
  align-items: stretch;
  gap: 14px 18px;
  padding: 0;
  flex: 1;
}
.bead-rush-brief {
  grid-column: 1 / -1;
  justify-self: stretch;
  display: flex;
  justify-content: center;
  min-height: 50px;
  margin: 0;
  padding: 10px 18px;
  border: 1px solid rgba(29,78,216,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
  color: #30415d;
  box-shadow: 0 8px 22px rgba(16,33,63,.05);
}
.bead-rush-brief .brief-label {
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--rush-gold);
  color: #4b3200;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
}
.treasure-theme .treasure-abacus-card {
  grid-column: 1;
  min-width: 0;
  min-height: 560px;
  justify-content: center;
  padding: 28px;
  border: 0;
  border-radius: 24px;
  background: var(--rush-ink);
  box-shadow: 0 18px 0 #07142a, 0 28px 45px rgba(16,33,63,.22);
}
.treasure-theme .rush-abacus-wrapper {
  min-height: 410px;
  align-items: center;
  padding: 0;
}
.treasure-theme #game-rush-abacus {
  transform: scale(.96);
  transform-origin: center;
}
.treasure-theme #game-rush-abacus .abacus-container {
  border-color: #c78039;
  background: #fff5d8;
  box-shadow: 0 12px 0 #72411f, 0 22px 34px rgba(0,0,0,.26), inset 0 2px 10px rgba(100,61,23,.12);
}
.treasure-theme .treasure-options-grid {
  grid-column: 2;
  grid-template-columns: 1fr 1fr;
  align-content: center;
  gap: 14px;
  max-width: none;
}
.treasure-theme .treasure-chest-btn {
  height: 132px;
  flex-direction: column;
  gap: 5px;
  border: 2px solid rgba(29,78,216,.16);
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 9px 0 #d6e2f2, 0 15px 24px rgba(16,33,63,.08);
}
.treasure-theme .treasure-chest-btn:nth-child(2),
.treasure-theme .treasure-chest-btn:nth-child(3) { background: #fff9df; }
.treasure-theme .treasure-chest-btn:hover {
  z-index: 2;
  border-color: var(--rush-blue);
  background: #fff;
  transform: translateY(-6px) rotate(-1deg);
  box-shadow: 0 12px 0 #aac7ef, 0 22px 34px rgba(29,78,216,.16);
}
.treasure-theme .chest-icon { font-size: 24px; }
.treasure-theme .chest-val {
  color: var(--rush-ink);
  font-size: 42px;
  line-height: 1;
}
.treasure-theme .treasure-interactive-footer {
  grid-column: 2;
  align-self: center;
}

@media (max-width: 1180px) {
  .game-stage-card.treasure-theme { min-height: auto; }
  .treasure-rush-stage { grid-template-columns: 1fr; }
  .treasure-theme .treasure-abacus-card,
  .treasure-theme .treasure-options-grid,
  .treasure-theme .treasure-interactive-footer { grid-column: 1; }
  .treasure-theme .treasure-abacus-card { min-height: 470px; }
  .treasure-theme .treasure-options-grid { grid-template-columns: repeat(4, 1fr); }
  .treasure-theme .treasure-chest-btn { height: 96px; }
}

@media (max-width: 720px) {
  .game-stage-card.treasure-theme { padding: 12px; border-radius: 18px; }
  .bead-rush-identity { min-width: 0; }
  .bead-rush-title { font-size: 16px; }
  .bead-rush-controls { justify-content: flex-start; }
  .bead-rush-brief { overflow-x: auto; justify-content: flex-start; white-space: nowrap; }
  .treasure-theme .treasure-abacus-card { min-height: 370px; padding: 12px; }
  .treasure-theme .rush-abacus-wrapper { min-height: 320px; }
  .treasure-theme #game-rush-abacus { transform: scale(.72); }
  .treasure-theme .treasure-options-grid { grid-template-columns: 1fr 1fr; }
}

/* New classroom games: bowling, race and monster feeding */
.arcade-game-identity{display:flex;align-items:center;gap:12px}.arcade-game-identity h3{margin:0;font-size:22px;font-weight:900}
.bowling-theme,.race-theme,.monster-theme{min-height:calc(100vh - 104px);overflow:hidden}
.bowling-theme{background:linear-gradient(145deg,#eaf5ff,#cbe7ff);border-color:#60a5fa}.bowling-mission,.monster-mission{text-align:center}.bowling-mission span,.monster-mission>span{font-size:12px;font-weight:900;letter-spacing:.18em;color:#64748b}.bowling-mission div,.monster-mission div{font-size:36px;font-weight:900;color:#10213f}.bowling-mission strong,.monster-mission strong{font-size:52px;color:#2563eb}.bowling-mission small,.monster-mission small{font-size:18px;font-weight:800;color:#64748b}.bowling-lane{position:relative;flex:1;min-height:580px;border-radius:28px;background:repeating-linear-gradient(90deg,rgba(255,255,255,.12) 0 80px,rgba(30,64,175,.05) 80px 83px),linear-gradient(#f8d58a,#c98a3d);box-shadow:inset 0 0 0 8px #8b5a2b,inset 0 0 45px rgba(91,48,12,.22)}.bowling-pins{display:grid;grid-template-columns:repeat(3,150px);justify-content:center;gap:22px 38px;padding-top:75px}.bowling-pin{height:190px;border:0;background:linear-gradient(90deg,#dbeafe,#fff 45%,#bfdbfe);clip-path:polygon(34% 0,66% 0,72% 22%,64% 37%,84% 86%,75% 100%,25% 100%,16% 86%,36% 37%,28% 22%);font:900 48px 'JetBrains Mono';color:#1e3a8a;cursor:pointer;filter:drop-shadow(0 10px 7px rgba(30,58,138,.25));transition:.35s}.bowling-pin span{display:block;margin-top:72px}.bowling-pin::before{content:"";display:block;height:18px;background:#ef4444;margin-top:42px}.bowling-pin.knocked{transform:translateY(100px) rotate(75deg);opacity:.25}.bowling-pin.wrong-pin{animation:missionAnswerShake .4s;background:#fecaca}.bowling-ball{position:absolute;bottom:26px;left:50%;font-size:78px;transform:translateX(-50%)}.bowling-ball.rolling{animation:bowlingRoll .65s ease-in forwards}@keyframes bowlingRoll{to{transform:translate(-50%,-410px) rotate(720deg) scale(.72)}}.bowling-foul-line{position:absolute;left:10%;right:10%;bottom:125px;height:8px;background:#7c2d12}
.race-theme{background:linear-gradient(#dff4ff 0 38%,#95d36b 38%);border-color:#38bdf8}.race-reset{padding:10px 16px;border:0;border-radius:12px;background:#10213f;color:#fff;font-weight:900}.race-score-strip{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:20px}.race-team{padding:13px 20px;border-radius:16px;color:#fff;font-size:18px;font-weight:900;opacity:.55}.race-team.active{opacity:1;box-shadow:0 0 0 5px rgba(255,255,255,.65)}.race-team.red{background:#dc2626}.race-team.blue{background:#2563eb;text-align:right}.race-round-title{font-size:25px;font-weight:900;color:#10213f}.race-tracks{display:grid;gap:20px}.race-track{position:relative;height:82px;border:8px solid #fff;background:repeating-linear-gradient(90deg,#374151 0 80px,#4b5563 80px 160px);border-radius:18px;box-shadow:0 8px 0 #166534}.race-track::after{content:"";position:absolute;left:0;right:0;top:50%;border-top:4px dashed #facc15}.race-track i{position:absolute;right:8px;top:9px;font-size:42px}.race-car{position:absolute;z-index:2;top:3px;font-size:50px;transition:left .7s cubic-bezier(.2,.9,.3,1.2)}.blue-car{filter:hue-rotate(190deg)}.race-question-zone{display:grid;grid-template-columns:1.25fr .75fr;gap:24px;min-height:0;flex:1}.race-abacus-card{display:grid;place-items:center;border-radius:24px;background:#10213f;overflow:hidden}.race-abacus-card #race-abacus{transform:scale(.75)}.race-options{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-content:center}.race-options button{height:110px;border:3px solid #2563eb;border-radius:20px;background:#fff;color:#10213f;font:900 40px 'JetBrains Mono';box-shadow:0 8px 0 #93c5fd;cursor:pointer}.race-options button.race-correct{background:#dcfce7;border-color:#16a34a}.race-options button.race-wrong{animation:missionAnswerShake .4s;background:#fee2e2}
.monster-theme{background:radial-gradient(circle at 50% 42%,#fce7f3,#fae8ff 48%,#ede9fe);border-color:#e879f9}.monster-mission em{display:inline-grid;place-items:center;width:68px;height:62px;border:3px dashed #db2777;border-radius:16px;color:#db2777;font-style:normal}.monster-playground{display:grid;grid-template-columns:.8fr 1.2fr;gap:35px;align-items:center;min-height:0;flex:1}.monster-character{position:relative;width:390px;height:430px;margin:auto;border:8px solid #701a75;border-radius:46% 46% 38% 38%;background:linear-gradient(145deg,#f0abfc,#a855f7);box-shadow:0 22px 0 #581c87,0 30px 40px rgba(88,28,135,.25);text-align:center;color:#581c87}.monster-horns{position:absolute;top:-55px;left:0;right:0;font-size:75px;color:#f97316}.monster-eyes{margin-top:90px;font-size:58px;color:#fff;text-shadow:0 0 0 #111}.monster-mouth{width:180px;height:100px;margin:30px auto 0;border:8px solid #581c87;border-radius:20px 20px 60px 60px;background:#3b0764}.monster-mouth span{display:block;width:120px;height:28px;margin:50px auto 0;border-radius:50%;background:#f472b6}.monster-belly{position:absolute;right:28px;bottom:26px;width:78px;height:78px;border-radius:50%;background:#fff;color:#7e22ce;font:900 42px 'JetBrains Mono';display:grid;place-items:center}.monster-character.monster-happy{animation:monsterHappy .45s infinite alternate}@keyframes monsterHappy{to{transform:translateY(-14px) rotate(2deg)}}.monster-foods{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.monster-foods button{height:180px;border:3px solid #e879f9;border-radius:24px;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;box-shadow:0 10px 0 #e9d5ff}.monster-foods span{font-size:64px}.monster-foods strong{font:900 42px 'JetBrains Mono';color:#581c87}.monster-foods button.food-flying{animation:foodFly .75s ease-in forwards}@keyframes foodFly{to{transform:translate(-430px,0) scale(.2) rotate(360deg);opacity:0}}.monster-foods button.food-wrong{animation:missionAnswerShake .4s;background:#fee2e2}
@media(max-width:900px){.bowling-pins{grid-template-columns:repeat(3,100px)}.race-question-zone,.monster-playground{grid-template-columns:1fr}.monster-character{transform:scale(.75)}.monster-foods button{height:130px}}

/* Classroom projection — teacher console and big-screen stage */
#classroom-projection-settings,#classroom-projection-display{--studio-ink:#10213f;--studio-blue:#1d4ed8;--studio-cyan:#38bdf8;--studio-gold:#fbbf24}
#classroom-projection-settings{gap:14px;padding:12px 8px 24px 0}
#classroom-projection-settings>.card{position:relative;margin:0!important;padding:18px;border:1px solid #dbe6f5;border-radius:20px;background:rgba(255,255,255,.9);box-shadow:0 8px 24px rgba(16,33,63,.06)}
#classroom-projection-settings>.card::before{display:grid;place-items:center;position:absolute;top:15px;right:16px;width:28px;height:28px;border-radius:9px;background:#eaf2ff;color:var(--studio-blue);font:900 12px 'JetBrains Mono'}
#classroom-projection-settings>.card:nth-child(1)::before{content:'01'}#classroom-projection-settings>.card:nth-child(2)::before{content:'02'}#classroom-projection-settings>.card:nth-child(3)::before{content:'03'}
#classroom-projection-settings .card-title{padding-right:34px;color:var(--studio-ink);font-size:15px}
#classroom-projection-settings .curriculum-switcher-grid{gap:8px}
#classroom-projection-settings .curriculum-switcher-grid{grid-template-columns:1fr}
#classroom-projection-settings .curriculum-tab-btn{min-height:58px;border-radius:14px}
#classroom-projection-settings .form-select{height:46px;border-radius:13px;background:#f8fbff;font-weight:800}
#classroom-projection-settings .mode-chips-grid{grid-template-columns:1fr 1fr;gap:8px}
#classroom-projection-settings .chip{min-height:44px;justify-content:center;border-radius:13px}
#classroom-projection-settings .launch-big-btn{height:64px!important;margin-top:8px!important;border-radius:17px!important;background:linear-gradient(135deg,#1d4ed8,#123a85)!important;box-shadow:0 8px 0 #09265d,0 18px 30px rgba(29,78,216,.24)!important;font-size:15px!important}
#classroom-projection-display{display:flex;flex-direction:column;gap:16px;padding:12px 8px 24px 0}
#classroom-projection-display>.card{margin:0;border:1px solid #dbe6f5;border-radius:22px;background:rgba(255,255,255,.9);box-shadow:0 12px 30px rgba(16,33,63,.07)}
#classroom-projection-display>.card:first-child{padding:20px}
#classroom-projection-display .live-sample-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
#classroom-projection-display .sample-problem-card{min-height:116px;justify-content:space-between;border:1px solid #dbe6f5;border-radius:16px;background:#f8fbff;box-shadow:none}
#classroom-projection-display .sample-formula{font-size:21px;color:var(--studio-ink)}
#classroom-projection-display .preview-action-card{padding:22px;background:linear-gradient(145deg,#10213f,#07142b);border-color:#244b84;color:#fff;overflow:hidden}
#classroom-projection-display .preview-action-card>.card-title{color:#8fb8f1}
#classroom-projection-display .projection-hub-banner{min-height:190px;padding:30px;border:1px solid rgba(56,189,248,.35);border-radius:24px;background:radial-gradient(circle at 80% 20%,rgba(56,189,248,.22),transparent 28%),linear-gradient(135deg,#16386f,#0b1d3e);box-shadow:0 18px 40px rgba(0,0,0,.25)}
#classroom-projection-display .hub-icon-glow{width:82px;height:82px;border-radius:24px;background:#fbbf24;border:0;color:#10213f;font-size:34px;box-shadow:0 8px 0 #b77908,0 0 30px rgba(251,191,36,.25)}
#classroom-projection-display .hub-info h3{font-size:26px;margin-bottom:10px}
#classroom-projection-display .hub-info p{max-width:650px;color:#a9bfdc;font-size:13px;line-height:1.65}
#classroom-projection-display .hub-action-badge{padding:14px 22px;border-radius:14px;background:#38bdf8;color:#07142b;box-shadow:0 6px 0 #087da8;font-size:14px}
#classroom-projection-display .shortcuts-guide-panel{border-color:rgba(143,184,241,.2);background:rgba(255,255,255,.06)}
#classroom-projection-display .shortcuts-title{color:#8fb8f1}
#classroom-projection-display .shortcut-item{color:#dbeafe}
#classroom-projection-display kbd{background:#1b3761;border-color:#31598c;box-shadow:0 2px 0 #07142b;color:#fbbf24}

.classroom-overlay{padding:26px 34px;background:radial-gradient(circle at 50% 42%,rgba(29,78,216,.18),transparent 30%),radial-gradient(circle at 10% 10%,rgba(56,189,248,.1),transparent 24%),#07142b;background-image:radial-gradient(rgba(143,184,241,.16) 1px,transparent 1px);background-size:30px 30px;color:#f8fbff}
.classroom-header{min-height:66px;padding:0 4px 18px;border-bottom:1px solid rgba(143,184,241,.2);color:#a9bfdc}
#class-overlay-badge{padding:7px 13px!important;border-radius:10px!important;background:#fbbf24!important;color:#10213f!important;letter-spacing:.05em}
#class-overlay-title{color:#fff;font-size:18px!important}
#class-overlay-progress-num{padding:7px 12px;border-radius:10px;background:rgba(255,255,255,.07);color:#8fb8f1!important;font-family:'JetBrains Mono'}
.classroom-close-btn{width:48px;height:48px;border:1px solid #31598c;border-radius:14px;background:#102b56;color:#fff;box-shadow:0 5px 0 #030b19}
.classroom-content::before{content:'FEBE CLASSROOM LIVE';position:absolute;top:28px;color:#31598c;font:900 11px 'JetBrains Mono';letter-spacing:.3em}
.classroom-number-display{position:relative;padding:40px 70px;border:1px solid rgba(56,189,248,.24);border-radius:36px;background:rgba(8,30,67,.74);color:#fff;font-family:'JetBrains Mono','Noto Sans SC',sans-serif;font-size:clamp(130px,14vw,230px);line-height:1;letter-spacing:-.06em;text-shadow:0 0 35px rgba(56,189,248,.28);box-shadow:inset 0 0 50px rgba(56,189,248,.05),0 30px 70px rgba(0,0,0,.25)}
.classroom-progress-bar-container{width:min(720px,64%);height:14px;margin-top:44px;border:1px solid #31598c;border-radius:99px;background:#102b56;box-shadow:none}
.classroom-progress-bar{background:linear-gradient(90deg,#38bdf8,#fbbf24);box-shadow:0 0 18px rgba(56,189,248,.5)}
.classroom-footer{gap:12px;margin-top:20px;padding-top:18px;border-top:1px solid rgba(143,184,241,.18)}
.btn-control{min-width:150px;justify-content:center;padding:13px 22px;border:1px solid #31598c;border-radius:14px;background:#102b56;color:#dbeafe;box-shadow:0 5px 0 #030b19}
.btn-control.active-play{min-width:180px;background:#fbbf24;border-color:#fbbf24;color:#10213f;box-shadow:0 5px 0 #a66b04}
.v2-look-list{min-width:360px;padding:38px 46px;border:1px solid #31598c;border-radius:28px;background:#0d2348;box-shadow:0 12px 0 #030b19}
.v2-look-item{font-size:76px}.v2-look-divider{background:#8fb8f1}
@media(max-width:1200px){#classroom-projection-display .live-sample-grid{grid-template-columns:repeat(3,1fr)}#classroom-projection-display .projection-hub-banner{align-items:flex-start;flex-wrap:wrap}}

/* Classroom studio v2 — structural overhaul */
body:has(#classroom-projection-settings.active){background:#efe9dc}
.app-workspace:has(#classroom-projection-settings.active){grid-template-columns:430px minmax(0,1fr);gap:0;padding:16px 30px 26px;height:calc(100vh - 80px);background:linear-gradient(135deg,#efe9dc,#e7dfcf)}
#classroom-projection-settings{gap:0;padding:0;overflow-y:auto;border:1px solid #cfc3ae;border-radius:28px 0 0 28px;background:#fbf7ee;box-shadow:0 18px 50px rgba(62,48,30,.12)}
#classroom-projection-settings>.card{margin:0!important;padding:20px 22px;border:0;border-bottom:1px solid #ded4c3;border-radius:0;background:transparent;box-shadow:none}
#classroom-projection-settings>.card:first-child{padding-top:22px;border-radius:28px 0 0 0}
#classroom-projection-settings>.card:last-child{border-bottom:0;border-radius:0 0 0 28px}
#classroom-projection-settings>.card::before{top:18px;right:20px;background:#173f35;color:#f5e9c8;border-radius:50%;box-shadow:none}
#classroom-projection-settings .card-title{border-bottom:0;margin-bottom:12px;color:#173f35;font-size:15px}
#classroom-projection-settings .form-label{color:#776b59!important;font-size:11px!important;letter-spacing:.09em;text-transform:uppercase}
#classroom-projection-settings .curriculum-tab-btn{border:1px solid #d7ccba;background:#fffaf0;color:#635846}
#classroom-projection-settings .curriculum-tab-btn.active,#classroom-projection-settings .chip.active{border-color:#173f35;background:#173f35!important;color:#fff9e9!important;box-shadow:0 5px 0 #0b2922!important}
#classroom-projection-settings .form-select{border:1px solid #cfc3ae!important;background:#fffdf8;color:#2c2923}
#classroom-projection-settings #global-sub-options{border-color:#d7ccba!important;background:#f5efe3!important}
#classroom-projection-settings .chip{border:1px solid #d7ccba;background:#fffdf8;color:#635846}
#classroom-projection-settings .puzzle-voice-btn,#classroom-projection-settings .btn-secondary{border-color:#d7ccba}
#classroom-projection-settings .launch-big-btn{height:62px!important;border:0!important;background:#ef5b3f!important;color:#fff!important;box-shadow:0 7px 0 #a93220,0 15px 25px rgba(190,57,34,.22)!important}
#classroom-projection-display{display:grid;grid-template-rows:minmax(0,1fr) auto;gap:0;padding:0;overflow:hidden;border:1px solid #173f35;border-left:0;border-radius:0 28px 28px 0;background:#173f35;box-shadow:0 18px 50px rgba(23,63,53,.18)}
#classroom-projection-display>.card{border:0;border-radius:0;box-shadow:none}
#classroom-projection-display>.card:first-child{display:flex!important;min-height:0;padding:28px 30px;background:#173f35;color:#f7efd9}
#classroom-projection-display>.card:first-child .card-title{flex:0 0 auto;margin-bottom:8px;padding-bottom:16px;border-bottom:1px solid rgba(247,239,217,.18);color:#f7efd9;font-size:17px}
#classroom-projection-display>.card:first-child .card-title label{color:#b9cbbf!important}
#classroom-projection-display>.card:first-child .btn-secondary{border-color:rgba(247,239,217,.25);background:transparent;color:#f7efd9}
#classroom-projection-display .live-sample-grid{grid-template-columns:repeat(2,1fr);grid-template-rows:repeat(2,minmax(0,1fr));flex:1;min-height:0;gap:16px;padding-top:8px}
#classroom-projection-display .sample-problem-card{min-height:0;padding:22px 24px;border:1px solid rgba(247,239,217,.18);border-radius:18px;background:#f8f1df;box-shadow:0 8px 0 #0c2e27}
#classroom-projection-display .sample-badge{background:#e4d7b9;color:#6a5937}
#classroom-projection-display .sample-formula{margin:auto 0;font-size:clamp(28px,2.4vw,42px);color:#173f35;letter-spacing:-.04em}
#classroom-projection-display .sample-answer{border-color:#d4c6a7}
#classroom-projection-display .preview-action-card{display:grid!important;grid-template-columns:1fr auto;align-items:center;gap:16px;flex:none!important;padding:18px 24px!important;border-top:1px solid #cfc3ae;background:#fbf7ee;color:#173f35;overflow:visible}
#classroom-projection-display .preview-action-card>.card-title{display:none}
#classroom-projection-display .projection-hub-banner{grid-column:1;min-height:96px;padding:14px 18px;border:0;border-radius:18px;background:#ede3cf;box-shadow:none;color:#173f35}
#classroom-projection-display .projection-hub-banner::after{display:none}
#classroom-projection-display .hub-icon-glow{width:58px;height:58px;border-radius:17px;background:#ef5b3f;color:#fff;box-shadow:0 5px 0 #a93220;font-size:25px}
#classroom-projection-display .hub-info h3{margin:0 0 3px;font-size:19px;color:#173f35}
#classroom-projection-display .hub-info p{max-width:600px;color:#776b59;font-size:11px;line-height:1.4}
#classroom-projection-display .hub-action-badge{padding:12px 18px;border-radius:12px;background:#173f35;color:#fff9e9;box-shadow:0 5px 0 #0b2922}
#classroom-projection-display .shortcuts-guide-panel{grid-column:2;min-width:220px;padding:12px 14px;border:1px solid #d7ccba;background:#fffdf8}
#classroom-projection-display .shortcuts-title{color:#776b59}
#classroom-projection-display .shortcuts-grid{display:grid;grid-template-columns:1fr 1fr;gap:7px}
#classroom-projection-display .shortcut-item{font-size:10px;color:#635846}
#classroom-projection-display kbd{background:#173f35;border:0;box-shadow:none;color:#f5d36b}
@media(max-width:1250px){.app-workspace:has(#classroom-projection-settings.active){grid-template-columns:370px minmax(0,1fr)}#classroom-projection-display .preview-action-card{grid-template-columns:1fr}#classroom-projection-display .shortcuts-guide-panel{display:none}}

/* Projection page without question preview */
#classroom-projection-display:has(>.preview-action-card:only-child){display:flex;align-items:stretch;justify-content:stretch;padding:0;background:#173f35}
#classroom-projection-display:has(>.preview-action-card:only-child) .preview-action-card{display:flex!important;flex:1!important;flex-direction:column;align-items:stretch;justify-content:center;gap:24px;padding:clamp(30px,5vw,76px)!important;background:radial-gradient(circle at 50% 36%,rgba(245,211,107,.10),transparent 26%),#173f35}
#classroom-projection-display:has(>.preview-action-card:only-child) .projection-hub-banner{display:grid;grid-template-columns:auto 1fr auto;min-height:230px;padding:34px 38px;border:1px solid rgba(247,239,217,.22);background:#f4ead5;box-shadow:0 12px 0 #0b2922;color:#173f35}
#classroom-projection-display:has(>.preview-action-card:only-child) .hub-icon-glow{width:92px;height:92px;border-radius:26px;font-size:38px}
#classroom-projection-display:has(>.preview-action-card:only-child) .hub-info h3{font-size:30px}
#classroom-projection-display:has(>.preview-action-card:only-child) .hub-info p{font-size:14px;line-height:1.7}
#classroom-projection-display:has(>.preview-action-card:only-child) .hub-action-badge{padding:16px 24px;font-size:16px}
#classroom-projection-display:has(>.preview-action-card:only-child) .shortcuts-guide-panel{width:100%;padding:18px 22px;border-color:rgba(247,239,217,.2);background:rgba(255,255,255,.06)}
#classroom-projection-display:has(>.preview-action-card:only-child) .shortcuts-title{color:#b9cbbf}
#classroom-projection-display:has(>.preview-action-card:only-child) .shortcuts-grid{display:flex;justify-content:center;gap:18px}
#classroom-projection-display:has(>.preview-action-card:only-child) .shortcut-item{color:#f7efd9;font-size:12px}
#classroom-projection-display:not(.active){display:none!important}

/* Interactive abacus teaching lab */
.app-workspace.full-width-workspace:has(#interactive-abacus-display.active){padding:14px 30px 26px;background:linear-gradient(145deg,#e8edf5,#f5efe2)}
#interactive-abacus-display.active{height:100%;padding:0}
.abacus-lab{--lab-ink:#0b1c36;--lab-blue:#1e4f91;--lab-cyan:#38bdf8;display:flex!important;flex-direction:column;gap:16px;height:100%;min-height:0!important;padding:18px 20px 22px;border:1px solid #244b7e;border-radius:28px;background:radial-gradient(circle at 50% 48%,rgba(35,99,170,.25),transparent 35%),linear-gradient(145deg,#102a4c,#08182f);box-shadow:0 22px 55px rgba(11,28,54,.24);overflow:hidden}
.abacus-lab .abacus-lab-header{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;margin:0;padding:0 2px 16px;border-bottom:1px solid rgba(143,184,241,.2);color:#fff}
.abacus-lab-identity{display:flex;align-items:center;gap:10px}
.abacus-lab-identity>span:first-child{font-size:21px!important;color:#fff}
.abacus-lab-identity>span:last-child{border:1px solid rgba(56,189,248,.28);background:rgba(56,189,248,.1)!important;color:#7dd3fc!important;letter-spacing:.08em}
.abacus-lab-rods{display:flex;align-items:center;gap:10px;color:#9eb4d2}
.abacus-lab-rods>span{color:#9eb4d2!important}
.abacus-lab .sandbox-rods-group{padding:5px;border:1px solid #31598c;border-radius:14px;background:#07142b}
.abacus-lab .sandbox-rod-chip{min-width:56px;padding:8px 12px;border-radius:10px;color:#8fa8ca;text-align:center}
.abacus-lab .sandbox-rod-chip.active{background:#38bdf8;color:#07142b;box-shadow:0 4px 0 #087da8}
.abacus-lab .sandbox-toolbar{display:grid;grid-template-columns:minmax(260px,.6fr) minmax(560px,1.4fr);gap:18px;padding:0;border:0;background:transparent}
.abacus-lab .sandbox-readout-card{position:relative;display:flex;align-items:center;justify-content:space-between;min-height:92px;padding:15px 22px;border:1px solid rgba(56,189,248,.3);border-radius:20px;background:linear-gradient(135deg,#133a70,#0d2850);box-shadow:inset 0 0 24px rgba(56,189,248,.07)}
.abacus-lab .readout-label{max-width:95px;color:#9eb4d2;font-size:12px;line-height:1.4}
.abacus-lab .readout-number{color:#fbbf24;font-size:54px;text-align:right;text-shadow:0 0 22px rgba(251,191,36,.22)}
.abacus-lab .sandbox-setter-card{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:10px;min-height:92px;padding:15px;border:1px solid rgba(143,184,241,.2);border-radius:20px;background:rgba(255,255,255,.06)}
.abacus-lab #sandbox-direct-input{width:100%!important;height:58px!important;border:1px solid #31598c;background:#07142b;color:#fff;font-size:17px}
.abacus-lab #sandbox-direct-input::placeholder{color:#7187a6}
.abacus-lab .sandbox-setter-card .btn-primary,.abacus-lab .sandbox-setter-card .btn-secondary{height:58px!important;border-radius:14px!important;padding:0 20px!important;font-weight:900}
.abacus-lab .sandbox-setter-card .btn-primary{border:0;background:#fbbf24;color:#10213f;box-shadow:0 5px 0 #a66b04}
.abacus-lab .sandbox-setter-card .btn-secondary{border:1px solid #31598c;background:#102b56;color:#dbeafe;box-shadow:0 5px 0 #030b19}
.abacus-lab .sandbox-abacus-viewport{position:relative;flex:1;min-height:0;padding:28px;border:1px solid rgba(143,184,241,.18);border-radius:24px;background:radial-gradient(circle at 50% 45%,rgba(255,255,255,.08),transparent 35%),rgba(3,11,27,.4);overflow:auto}
.abacus-lab .sandbox-abacus-viewport::before{content:'TOUCH · DRAG · DEMONSTRATE';position:absolute;top:17px;left:22px;color:#41638f;font:900 9px 'JetBrains Mono';letter-spacing:.25em}
.abacus-lab #sandbox-abacus-container{display:flex;align-items:center;justify-content:center;min-width:max-content;transform:scale(1.04);transform-origin:center}
.abacus-lab #sandbox-abacus-container .abacus-container{margin-top:10px;border-color:#bd7a39;background:#fff5d8;box-shadow:0 14px 0 #6e3f20,0 28px 45px rgba(0,0,0,.35),inset 0 2px 10px rgba(100,61,23,.12)}
@media(max-width:1050px){.abacus-lab .sandbox-toolbar{grid-template-columns:1fr}.abacus-lab .sandbox-setter-card{grid-template-columns:1fr 1fr}.abacus-lab #sandbox-direct-input{grid-column:1/-1}.abacus-lab #sandbox-abacus-container{transform:scale(.84)}}
.interactive-hint-pill {
  background: #f0fdf4;
  border: 2px solid #bbf7d0;
  color: #166534;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(22, 101, 52, 0.06);
}

/* ══════════════════════════════════════════════════════════════
   CLASSROOM INTERACTIVE MINI-GAMES STYLING
══════════════════════════════════════════════════════════════ */
.game-nav-tabs-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.game-nav-tab {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}
.game-nav-tab:hover {
  color: #d97706;
  border-color: #f59e0b;
  background: white;
}
.game-nav-tab.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3);
}

.game-stage-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.game-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}
.game-actions-bar {
  display: flex;
  align-items: center;
  gap: 15px;
}

.game-mode-toggle {
  display: flex;
  background: rgba(241, 245, 249, 0.8);
  border-radius: 10px;
  padding: 3px;
  gap: 4px;
}
.g-mode-btn {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}
.g-mode-btn.active {
  background: white;
  color: var(--primary-neon-hover);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.game-score-badge {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #b45309;
  padding: 6px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 900;
}
.game-score-badge strong {
  font-size: 18px;
  font-family: 'JetBrains Mono', monospace;
  color: #d97706;
}

.friends-rhyme-bar {
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.25);
  color: var(--primary-neon-hover);
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 800;
  text-align: center;
}

/* 💎 Ten Friends Match Board (4x3 Grid) */
.ten-friends-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 720px;
  margin: 10px auto;
  width: 100%;
}
.friend-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  aspect-ratio: 1.2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}
.friend-card:hover {
  transform: translateY(-4px) scale(1.03);
  border-color: #6366f1;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.15);
}
.friend-card.selected {
  border-color: #f59e0b;
  background: #fffbeb;
  transform: scale(1.06);
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2), 0 12px 24px rgba(245, 158, 11, 0.2);
}
.friend-card.matched {
  background: #ecfdf5;
  border-color: #10b981;
  opacity: 0.25;
  pointer-events: none;
  transform: scale(0.92);
}
.friend-card.shake {
  animation: shakeCard 0.4s ease-in-out;
  border-color: #ef4444;
  background: #fef2f2;
}
@keyframes shakeCard {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}
.card-num {
  font-size: 42px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-main);
}
.card-hint {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
}

/* ⚡ Flash Quiz Cards */
.quiz-hero-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 30px 10px;
}
.quiz-question-prompt {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 28px;
  font-weight: 900;
  color: var(--text-main);
}
.quiz-giant-number {
  font-size: 64px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: white;
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  width: 96px;
  height: 96px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35);
  animation: float 2.5s ease-in-out infinite;
}
.quiz-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 600px;
}
.quiz-option-btn {
  background: white;
  border: 2px solid #cbd5e1;
  border-radius: 18px;
  height: 84px;
  font-size: 38px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.quiz-option-btn:hover {
  border-color: #6366f1;
  color: #6366f1;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 12px 24px rgba(99, 102, 241, 0.2);
}
.quiz-option-btn:active {
  transform: scale(0.96);
}

/* 🧮 Bead Master Stages */
.bead-game-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 10px;
}
.bead-display-frame {
  background: rgba(248, 250, 252, 0.9);
  border: 2px dashed rgba(99, 102, 241, 0.25);
  border-radius: 20px;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}
.bead-options-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}
.bead-prompt-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--text-main);
}

/* Bead Dial Stage */
.bead-dial-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
  padding: 20px 0;
}
.dial-target-card {
  background: white;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-radius: 24px;
  padding: 24px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.1);
}
.dial-giant-target {
  font-size: 72px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: #d97706;
}
.dial-abacus-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.dial-actions-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ══════════════════════════════════════════════════════════════
   CARTOON SVG MASCOT & RICH ANIMATIONS
══════════════════════════════════════════════════════════════ */
.game-tag-cartoon {
  font-size: 11px;
  font-weight: 900;
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  padding: 3px 8px;
  border-radius: 8px;
}

.game-companion-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) {
  .game-companion-layout {
    grid-template-columns: 1fr;
  }
}

.mascot-companion-card {
  background: white;
  border: 2px solid rgba(245, 158, 11, 0.25);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.08);
  position: relative;
}

.mascot-svg-wrapper {
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cartoon-bead-mascot {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Mascot SVG Animation Keyframes */
.float-anim {
  animation: mascotFloat 3s ease-in-out infinite;
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

.cheer-anim {
  animation: mascotCheer 0.6s ease-in-out infinite alternate;
}
@keyframes mascotCheer {
  0% { transform: translateY(0) scale(1) rotate(-3deg); }
  100% { transform: translateY(-16px) scale(1.08) rotate(3deg); }
}

.crown-jump {
  animation: crownBounce 0.5s ease-in-out infinite alternate;
  transform-origin: center;
}
@keyframes crownBounce {
  0% { transform: translateY(0); }
  100% { transform: translateY(-6px) scale(1.15); }
}

.shadow-pulse {
  animation: shadowScale 3s ease-in-out infinite;
  transform-origin: center;
}
@keyframes shadowScale {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(0.75); opacity: 0.4; }
}

.mascot-eye {
  animation: eyeBlink 3.5s infinite;
  transform-origin: center;
}
@keyframes eyeBlink {
  0%, 90%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

.star-sparkle-1 {
  animation: orbitSpin 4s linear infinite;
  transform-origin: 30px 41px;
}
.star-sparkle-2 {
  animation: orbitSpin 3s linear infinite reverse;
  transform-origin: 130px 44px;
}
@keyframes orbitSpin {
  0% { transform: rotate(0deg) scale(0.8); opacity: 0.4; }
  50% { transform: rotate(180deg) scale(1.3); opacity: 1; }
  100% { transform: rotate(360deg) scale(0.8); opacity: 0.4; }
}

.blush-cheek {
  animation: blushGlow 2s ease-in-out infinite alternate;
}
@keyframes blushGlow {
  0% { fill: rgba(239, 68, 68, 0.35); }
  100% { fill: rgba(239, 68, 68, 0.65); }
}

.hand-wave-left {
  animation: waveLeft 0.5s ease-in-out infinite alternate;
  transform-origin: 20px 86px;
}
@keyframes waveLeft {
  0% { transform: rotate(-15deg) translateY(0); }
  100% { transform: rotate(20deg) translateY(-8px); }
}
.hand-wave-right {
  animation: waveRight 0.5s ease-in-out infinite alternate;
  transform-origin: 140px 86px;
}
@keyframes waveRight {
  0% { transform: rotate(15deg) translateY(0); }
  100% { transform: rotate(-20deg) translateY(-8px); }
}

/* Mascot Speech Bubble */
.mascot-speech-bubble {
  background: rgba(255, 251, 235, 0.95);
  border: 2px solid #f59e0b;
  border-radius: 14px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  color: #92400e;
  text-align: center;
  position: relative;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  width: 100%;
}
.mascot-speech-bubble::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 8px solid #f59e0b;
}

/* Cartoon Bead Rule Pill */
.cartoon-bead-rule-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: white;
  border: 2px dashed rgba(99, 102, 241, 0.3);
  border-radius: 30px;
  padding: 8px 24px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.pill-divider {
  color: #cbd5e1;
}

/* Cartoon Pop Buttons & Jelly Cards */
.jelly-card {
  position: relative;
  overflow: hidden;
}
.card-bubble-bg {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.05);
  pointer-events: none;
}
.sparkle-pop {
  animation: popOut 0.4s ease-out forwards;
}
@keyframes popOut {
  0% { transform: scale(1.1); filter: brightness(1.3); }
  50% { transform: scale(1.2) rotate(4deg); }
  100% { transform: scale(0.92); opacity: 0.25; }
}

.cartoon-pop-btn {
  position: relative;
  overflow: hidden;
}
.cartoon-pop-btn:hover {
  background: #fdf4ff;
  border-color: #ec4899;
  color: #ec4899;
}

.cartoon-pulse-box {
  animation: cartoonPulse 2s ease-in-out infinite;
}
@keyframes cartoonPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 25px rgba(99, 102, 241, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 15px 35px rgba(236, 72, 153, 0.45); }
}

.svg-sparkle-icon {
  animation: sparkleTwinkle 1.5s ease-in-out infinite alternate;
}
@keyframes sparkleTwinkle {
  0% { transform: scale(0.9) rotate(0deg); opacity: 0.7; }
  100% { transform: scale(1.25) rotate(45deg); opacity: 1; }
}

/* SVG Confetti Burst Overlay */
.confetti-svg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 100;
}
.confetti-piece {
  position: absolute;
  top: 60%;
  animation: confettiBlast 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  opacity: 0;
  user-select: none;
}
@keyframes confettiBlast {
  0% { transform: translateY(0) scale(0.5) rotate(0deg); opacity: 1; }
  40% { transform: translateY(-180px) scale(1.3) rotate(180deg); opacity: 1; }
  100% { transform: translateY(120px) scale(0.8) rotate(360deg); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   ARCADE FEVER GAUGE & POWER-UP MODES
══════════════════════════════════════════════════════════════ */
.arcade-fever-gauge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 20px;
  padding: 4px 12px;
}
.fever-track {
  width: 90px;
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.fever-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #ef4444, #ec4899);
  transition: width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.game-stage-card.fever-active {
  animation: feverPulseGlow 1s infinite alternate;
}
@keyframes feverPulseGlow {
  0% { box-shadow: 0 0 25px rgba(239, 68, 68, 0.4), inset 0 0 20px rgba(245, 158, 11, 0.2); }
  100% { box-shadow: 0 0 45px rgba(236, 72, 153, 0.6), inset 0 0 35px rgba(239, 68, 68, 0.3); }
}

/* ══════════════════════════════════════════════════════════════
   🐹 1. WHACK-A-MOLE 10-FRIENDS STYLES
══════════════════════════════════════════════════════════════ */
.mole-theme {
  background: linear-gradient(180deg, #fef9c3 0%, #fef08a 100%);
  border-color: #fde047;
  padding: 16px 20px;
  min-height: calc(100vh - 104px);
  overflow: hidden;
}
.mole-target-banner {
  background: white;
  border: 2.5px solid #f59e0b;
  border-radius: 18px;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.12);
}
.target-title {
  font-size: 15px;
  font-weight: 900;
  color: #b45309;
}
.target-huge-number {
  font-size: 46px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: #ea580c;
  background: #ffedd5;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.18);
}
.target-sub-desc {
  font-size: 16px;
  font-weight: 900;
  color: #78350f;
}
.target-sub-desc strong {
  font-size: 24px;
  color: #dc2626;
  font-family: 'JetBrains Mono', monospace;
}

.mole-meadow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, minmax(210px, 1fr));
  gap: 18px clamp(28px, 5vw, 80px);
  max-width: 1180px;
  min-height: 0;
  flex: 1;
  align-items: center;
  margin: 4px auto 0;
  width: 100%;
}
.mole-hole-container {
  position: relative;
  height: clamp(190px, 27vh, 250px);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
  border-radius: 0 0 40px 40px;
}
.mole-burrow-svg {
  position: absolute;
  bottom: 0;
  left: 5%;
  width: 90%;
  height: 54px;
  background: #713f12;
  border-radius: 50%;
  border: 3.5px solid #451a03;
  box-shadow: inset 0 8px 14px rgba(0,0,0,0.6);
}
.mole-creature {
  position: absolute;
  bottom: 23px;
  left: 50%;
  transform: translateX(-50%) translateY(125px);
  width: 142px;
  height: 158px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.mole-creature.popped-up {
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.mole-creature.hit-dizzy {
  animation: dizzyHit 0.6s ease-out forwards;
}
@keyframes dizzyHit {
  0% { transform: translateX(-50%) translateY(0) scale(1.1); filter: brightness(1.4); }
  50% { transform: translateX(-50%) translateY(15px) rotate(15deg) scale(0.9); }
  100% { transform: translateX(-50%) translateY(125px); }
}

.svg-mole-body {
  width: 126px;
  height: 120px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}
.mole-sign-badge {
  position: absolute;
  bottom: -2px;
  display: grid;
  place-items: center;
  min-width: 72px;
  height: 58px;
  background: #fef08a;
  border: 4px solid #b45309;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 42px;
  line-height: 1;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: #78350f;
  text-shadow: 0 2px 0 rgba(255,255,255,.7);
  box-shadow: 0 5px 0 #92400e, 0 8px 14px rgba(69,26,3,.2);
}
.mole-round-timer-track {
  width: 100%;
  max-width: 240px;
  height: 7px;
  background: #fef08a;
  border-radius: 4px;
  overflow: hidden;
  margin-left: auto;
}
.mole-round-timer-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #f59e0b, #ef4444);
  width: 100%;
  border-radius: 4px;
}

.mole-creature.hit-wrong {
  animation: moleDodgeWrong 0.4s ease-out forwards;
}
@keyframes moleDodgeWrong {
  0% { transform: translateX(-50%) translateY(0) scale(1); filter: drop-shadow(0 0 10px #ef4444); }
  50% { transform: translateX(-50%) translateY(30px) scale(0.9) rotate(-10deg); }
  100% { transform: translateX(-50%) translateY(125px); opacity: 0; }
}

.burrow-front-mound {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 34px;
  background: #ca8a04;
  border-radius: 50% 50% 0 0;
  pointer-events: none;
}
.mole-hit-popup {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 18px;
  font-weight: 900;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
  animation: floatFadeUp 0.8s ease-out forwards;
  pointer-events: none;
  z-index: 10;
}
@keyframes floatFadeUp {
  0% { transform: translateX(-50%) translateY(0) scale(0.8); opacity: 0; }
  20% { transform: translateX(-50%) translateY(-20px) scale(1.2); opacity: 1; }
  100% { transform: translateX(-50%) translateY(-60px) scale(1); opacity: 0; }
}

.cartoon-mallet-strike {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 52px;
  pointer-events: none;
  z-index: 50;
  animation: hammerSmash 0.35s ease-out forwards;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.35));
}
@keyframes hammerSmash {
  0% { transform: translateX(-50%) translateY(-50px) rotate(-45deg) scale(1.3); opacity: 0; }
  40% { transform: translateX(-50%) translateY(-10px) rotate(15deg) scale(1.1); opacity: 1; }
  70% { transform: translateX(-50%) translateY(0px) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translateX(-50%) translateY(20px) rotate(-10deg) scale(0.8); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   🚀 2. COSMIC BUBBLE BLAST 10-FRIENDS STYLES
══════════════════════════════════════════════════════════════ */
.cosmic-theme {
  --space-cyan: #58e6ff;
  --space-yellow: #ffd84d;
  position: relative;
  min-height: calc(100vh - 104px);
  overflow: hidden;
  padding: 16px 20px 18px;
  border: 1px solid #1e55a7;
  background: radial-gradient(circle at 18% 22%, rgba(39,126,255,.28), transparent 24%), radial-gradient(circle at 82% 72%, rgba(26,210,214,.16), transparent 26%), linear-gradient(145deg, #0a1b42, #07132f 55%, #041024);
  box-shadow: inset 0 0 80px rgba(50,142,255,.12), 0 24px 50px rgba(7,19,47,.2);
}
.cosmic-theme::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .7;
  background-image: radial-gradient(circle, #fff 0 1px, transparent 1.7px), radial-gradient(circle, #58e6ff 0 1px, transparent 1.6px);
  background-position: 0 0, 38px 57px;
  background-size: 94px 94px, 137px 137px;
}
.cosmic-header, .cosmic-mission-panel, .cosmic-bubble-field, .cosmic-cannon-launcher { position: relative; z-index: 2; }
.cosmic-identity { display: flex; align-items: center; gap: 12px; }
.cosmic-title { display: grid; gap: 2px; margin: 0; color: #f4f8ff; font-family: 'Noto Sans SC', sans-serif; font-size: 20px; font-weight: 900; line-height: 1.1; }
.cosmic-kicker { color: var(--space-cyan); font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .25em; }
.cosmic-theme .btn-lobby-back { height: 44px; padding: 0 16px; border: 1px solid rgba(88,230,255,.4); border-radius: 13px; background: rgba(4,16,36,.8); color: #fff; box-shadow: 0 5px 0 #020919; }
.cosmic-scoreboard { gap: 10px; }
.cosmic-mission-panel {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  min-height: 112px;
  padding: 14px 26px;
  border: 1px solid rgba(88,230,255,.35);
  border-radius: 22px;
  background: linear-gradient(90deg, rgba(12,40,88,.94), rgba(7,25,60,.84));
  box-shadow: inset 0 0 24px rgba(88,230,255,.07), 0 12px 28px rgba(0,0,0,.22);
}
.loaded-energy-orb { width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #38bdf8, #0284c7); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 16px #38bdf8; }
.mission-orb.loaded-energy-orb { width: 78px; height: 78px; border: 4px solid rgba(255,255,255,.78); box-shadow: 0 0 0 7px rgba(88,230,255,.12), 0 0 30px rgba(88,230,255,.65); }
.orb-val { color: #fff; font: 900 28px 'JetBrains Mono', monospace; }
.mission-orb .orb-val { font-size: 42px; }
.mission-copy { display: grid; gap: 3px; }
.mission-label { color: #8da8d7; font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.mission-equation { display: flex; align-items: center; gap: 15px; color: #dbeafe; font: 900 32px 'JetBrains Mono', monospace; }
.mission-equation strong { color: #fff; font-size: 44px; }
.mission-equation em { display: inline-grid; place-items: center; width: 58px; height: 52px; border: 2px dashed var(--space-yellow); border-radius: 14px; color: var(--space-yellow); font-style: normal; }
.mission-equation em.answer-correct {
  border-style: solid;
  border-color: #4ade80;
  background: rgba(34,197,94,.2);
  color: #86efac;
  box-shadow: 0 0 22px rgba(74,222,128,.38);
  animation: missionAnswerPop .4s cubic-bezier(.2,.9,.25,1.35);
}
.mission-equation em.answer-wrong {
  border-style: solid;
  border-color: #fb7185;
  background: rgba(244,63,94,.18);
  color: #fda4af;
  animation: missionAnswerShake .4s ease-out;
}
@keyframes missionAnswerPop { from { transform: scale(.45) rotate(-8deg); } }
@keyframes missionAnswerShake { 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.mission-command { padding-left: 22px; border-left: 1px solid rgba(141,168,215,.3); color: #8da8d7; font-size: 12px; font-weight: 800; text-align: right; }
.mission-command strong { color: var(--space-yellow); font-size: 18px; }
.cosmic-bubble-field { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(2, minmax(190px, 1fr)); align-items: center; justify-items: center; gap: 14px clamp(28px, 5vw, 76px); width: min(1120px, 94%); min-height: 0; flex: 1; margin: 0 auto; padding: 12px 10px; }
.cosmic-planet-bubble {
  position: relative;
  width: clamp(142px, 11.8vw, 184px);
  aspect-ratio: 1;
  padding: 0;
  border: 3px solid rgba(255,255,255,.58);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, hsl(var(--planet-hue), 90%, 65%), hsl(var(--planet-hue), 80%, 35%));
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 30px hsla(var(--planet-hue),90%,50%,.42), inset -10px -12px 20px rgba(0,0,0,.38), inset 8px 8px 14px rgba(255,255,255,.24);
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
  animation: bubbleArrive .55s var(--bubble-delay) both cubic-bezier(.2,.9,.25,1.25), bubbleFloat 3s calc(var(--bubble-delay) + .55s) ease-in-out infinite alternate;
}
@keyframes bubbleArrive { from { opacity: 0; transform: translateY(35px) scale(.55); } }
@keyframes bubbleFloat { from { transform: translateY(0); } to { transform: translateY(-10px); } }
.cosmic-planet-bubble:hover { border-color: #fff; transform: scale(1.1) translateY(-5px); box-shadow: 0 0 0 8px rgba(88,230,255,.12), 0 0 36px hsla(var(--planet-hue),100%,65%,.86); }
.planet-val { position: relative; z-index: 2; color: #fff; font: 900 clamp(48px,4vw,66px) 'JetBrains Mono', monospace; text-shadow: 0 3px 10px rgba(0,0,0,.65); }
.planet-ring { position: absolute; inset: 43% -18%; height: 22%; border: 5px solid rgba(255,255,255,.52); border-radius: 50%; transform: rotate(-13deg); box-shadow: 0 0 12px rgba(255,255,255,.25); pointer-events: none; }
.planet-destroyed { animation: explodePlanet .55s ease-out forwards; pointer-events: none; }
@keyframes explodePlanet { 0% { transform: scale(1.3); filter: brightness(2); } 45% { transform: scale(1.5); } 100% { transform: scale(0); opacity: 0; } }
.cosmic-cannon-launcher { display: flex; justify-content: center; margin-top: 0; }
.cannon-tube-graphic { display: flex; align-items: center; gap: 14px; padding: 8px 22px; border: 1px solid rgba(88,230,255,.34); border-radius: 999px; background: rgba(4,16,36,.82); box-shadow: 0 8px 24px rgba(0,0,0,.24); }
.launcher-icon { font-size: 24px; filter: drop-shadow(0 0 8px #58e6ff); }
.cannon-crosshair-hint { color: #c7d2fe; font-size: 14px; font-weight: 800; }
.cannon-crosshair-hint strong { color: var(--space-cyan); font: 900 20px 'JetBrains Mono', monospace; }
.orb-reload-anim { animation: orbPop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes orbPop { from { transform: scale(.2); } to { transform: scale(1); } }
@media (max-height: 800px) {
  .cosmic-theme { min-height: calc(100vh - 92px); }
  .cosmic-mission-panel { min-height: 88px; padding-block: 9px; }
  .mission-orb.loaded-energy-orb { width: 64px; height: 64px; }
  .mission-orb .orb-val { font-size: 34px; }
  .cosmic-bubble-field { grid-template-rows: repeat(2, minmax(145px, 1fr)); }
  .cosmic-planet-bubble { width: clamp(116px, 10vw, 145px); }
}
@media (max-width: 820px) {
  .cosmic-theme { min-height: auto; overflow: visible; }
  .cosmic-mission-panel { grid-template-columns: auto 1fr; }
  .mission-command { display: none; }
  .cosmic-bubble-field { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, 170px); }
  .cosmic-planet-bubble { width: 138px; }
}



/* Fullscreen support */
#classroom-games-display:fullscreen {
  padding: 24px 40px;
  background: #f8fafc;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ══════════════════════════════════════════════════════════════
   ⚔️ 4. WHITEBOARD DUAL PK STYLES
══════════════════════════════════════════════════════════════ */
.pk-theme {
  background: #f8fafc;
}
.pk-round-badge {
  background: #0f172a;
  color: #f8fafc;
  padding: 6px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
}
.pk-center-target-banner {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 24px;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-size: 24px;
  font-weight: 900;
  color: #1e293b;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
}
.pk-target-ball {
  font-size: 48px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  color: white;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.pk-split-arena {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 16px;
  align-items: stretch;
  margin-top: 10px;
}
.pk-team-panel {
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.red-panel {
  background: #fff1f2;
  border: 3px solid #fda4af;
}
.blue-panel {
  background: #eff6ff;
  border: 3px solid #93c5fd;
}
.pk-team-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pk-team-title {
  font-size: 20px;
  font-weight: 900;
}
.red-panel .pk-team-title { color: #e11d48; }
.blue-panel .pk-team-title { color: #2563eb; }
.pk-score-counter {
  font-size: 42px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
}
.red-panel .pk-score-counter { color: #e11d48; }
.blue-panel .pk-score-counter { color: #2563eb; }

.pk-tap-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.pk-option-card {
  height: 80px;
  border-radius: 18px;
  font-size: 38px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.red-btn {
  background: white;
  border: 3px solid #f43f5e;
  color: #e11d48;
}
.red-btn:active {
  background: #e11d48;
  color: white;
  transform: scale(0.94);
}
.blue-btn {
  background: white;
  border: 3px solid #3b82f6;
  color: #2563eb;
}
.blue-btn:active {
  background: #2563eb;
  color: white;
  transform: scale(0.94);
}

.pk-vs-divider {
  display: flex;
  align-items: center;
  justify-content: center;
}
.vs-glow-badge {
  background: #0f172a;
  color: #fbbf24;
  font-size: 18px;
  font-weight: 900;
  padding: 10px 8px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

/* ══════════════════════════════════════════════════════════════
   🧩 5. 认识十朋友·木质拼插积木游戏 (WOODEN BLOCK PUZZLE)
══════════════════════════════════════════════════════════════ */
.puzzle-theme {
  background: radial-gradient(circle at 50% 20%, #fffdfa 0%, #fef3c7 45%, #fffbeb 100%);
  border: 2px solid #fde68a;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.puzzle-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 900;
  color: #78350f;
  margin: 0;
}

.puzzle-voice-btn {
  background: #fff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  border-radius: 10px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.puzzle-voice-btn.active {
  background: #fef08a;
  border-color: #eab308;
  color: #854d0e;
  box-shadow: 0 2px 8px rgba(234, 179, 8, 0.25);
}

/* Workbench Stage & Shelf */
.puzzle-stage-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.puzzle-assembly-workbench {
  background: linear-gradient(180deg, #fef9c3 0%, #fef08a 60%, #fde047 100%);
  border: 3px solid #ca8a04;
  border-radius: 24px;
  padding: 20px 24px;
  box-shadow: inset 0 3px 8px rgba(255,255,255,0.8), 0 8px 24px rgba(180, 83, 9, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  position: relative;
}

.puzzle-stand-shelf {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 16px;
  min-height: 230px;
  width: 100%;
  padding: 10px 0 16px 0;
  border-bottom: 8px solid #a16207;
  border-radius: 0 0 12px 12px;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, rgba(254,240,138,0.2) 100%);
}

.puzzle-stand-shelf::after {
  content: '';
  position: absolute;
  bottom: -14px;
  left: 5%;
  right: 5%;
  height: 6px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 50%;
  filter: blur(3px);
}

/* Single Column Bay / Pair Container */
.puzzle-column-bay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  width: 84px;
  min-height: 215px;
  position: relative;
  transition: transform 0.2s ease;
}

.puzzle-column-bay.target-active {
  transform: scale(1.04);
}

.puzzle-bay-pedestal {
  width: 80px;
  height: 12px;
  background: #854d0e;
  border-radius: 6px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.15);
  margin-top: 4px;
}

.puzzle-bay-label {
  font-size: 11px;
  font-weight: 900;
  color: #854d0e;
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Drop Target Zones */
.puzzle-drop-target {
  width: 76px;
  min-height: 40px;
  border: 2.5px dashed rgba(161, 98, 7, 0.45);
  border-radius: 12px;
  background: rgba(254, 243, 199, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: relative;
}

.puzzle-drop-target.snap-hover {
  border-color: #16a34a;
  background: rgba(187, 247, 208, 0.85);
  box-shadow: 0 0 20px rgba(34, 197, 94, 0.6);
  transform: scale(1.06);
}

.puzzle-drop-target.target-empty::before {
  content: '⬇️ 拖到这';
  font-size: 11px;
  font-weight: 900;
  color: #b45309;
  animation: bounceHint 1.4s infinite;
}

@keyframes bounceHint {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Draggable & Locked Blocks */
.puzzle-block-node {
  touch-action: none;
  cursor: grab;
  position: relative;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.15s;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

.puzzle-block-node:hover:not(.locked) {
  transform: translateY(-5px) scale(1.03);
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.18));
}

.puzzle-block-node:active:not(.locked) {
  cursor: grabbing;
}

.puzzle-block-node.is-dragging {
  cursor: grabbing !important;
  z-index: 10000 !important;
  position: fixed !important;
  pointer-events: none !important;
  transform: scale(1.1) rotate(2.5deg) !important;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.35)) !important;
  transition: none !important;
}

.puzzle-block-node.is-selected {
  outline: 3.5px solid #f59e0b;
  outline-offset: 4px;
  border-radius: 8px;
  animation: puzzlePulseGlow 1.2s infinite;
}

@keyframes puzzlePulseGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 24px rgba(245, 158, 11, 0.9); }
}

.puzzle-block-node.locked {
  cursor: default;
  pointer-events: none;
}

.puzzle-block-svg {
  width: 76px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

.puzzle-block-node.locked .puzzle-block-svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Snap Success Pop Animation */
.snap-success-pop {
  animation: blockSnapSuccess 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes blockSnapSuccess {
  0% { transform: scale(1.18); filter: drop-shadow(0 0 20px #facc15); }
  50% { transform: scale(0.96); }
  100% { transform: scale(1); filter: drop-shadow(0 4px 8px rgba(0,0,0,0.12)); }
}

/* Error Shake */
.snap-error-shake {
  animation: blockSnapShake 0.4s ease forwards;
}

@keyframes blockSnapShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

/* Lower Pieces Drawer / Tray */
.puzzle-drawer-tray {
  background: #ffffff;
  border: 2px solid #fed7aa;
  border-radius: 20px;
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.puzzle-tray-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.puzzle-tray-title {
  font-size: 13px;
  font-weight: 900;
  color: #9a3412;
  display: flex;
  align-items: center;
  gap: 6px;
}

.puzzle-tray-pieces-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  min-height: 80px;
  padding: 8px;
  background: #fffbeb;
  border-radius: 14px;
  border: 1.5px dashed #fde68a;
}

/* Formula Celebration Ribbon */
.puzzle-formula-banner {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  border-radius: 16px;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
  animation: bannerSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bannerSlideUp {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.puzzle-formula-math {
  font-size: 22px;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
}

.puzzle-formula-mnemonic {
  font-size: 13px;
  font-weight: 800;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px 12px;
  border-radius: 8px;
}

.puzzle-next-btn {
  background: #f59e0b;
  color: white;
  border: none;
  border-radius: 12px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: all 0.15s ease;
}
.puzzle-next-btn:hover {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

/* Speed Mode Header / Stopwatch */
.puzzle-stopwatch-badge {
  background: #0f172a;
  color: #38bdf8;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 900;
  padding: 6px 16px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Cheatsheet Ribbon at Bottom */
.puzzle-rhyme-ribbon-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  background: rgba(254, 243, 199, 0.7);
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: 8px 14px;
}
.puzzle-pair-pill {
  background: white;
  border: 1px solid #fed7aa;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #78350f;
  cursor: pointer;
  transition: all 0.15s ease;
}
.puzzle-pair-pill:hover {
  background: #fef08a;
  border-color: #eab308;
  transform: translateY(-2px);
}

/* Puzzle practice — big-screen assembly table */
.puzzle-theme.puzzle-practice-theme {
  min-height: calc(100vh - 104px);
  padding: 16px 20px 18px;
  gap: 16px;
  background:
    radial-gradient(circle at 12% 15%, rgba(255,255,255,.92), transparent 24%),
    linear-gradient(145deg, #fff8df 0%, #ffeec0 55%, #f9dda0 100%);
  border: 1px solid #e9b949;
}
.puzzle-practice-theme .puzzle-stage-wrapper { display: flex; flex: 1; min-height: 0; }
.puzzle-practice-theme .puzzle-rhyme-ribbon-bar { display: none; }
.puzzle-practice-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  gap: 14px;
}
.puzzle-practice-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 12px 18px 12px 22px;
  border: 1px solid #e5b550;
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 7px 18px rgba(120,53,15,.08);
}
.puzzle-question-kicker,
.puzzle-panel-label {
  display: block;
  color: #a16207;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .2em;
}
#practice-prompt-bar {
  margin-top: 3px;
  color: #522412;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 28px;
  font-weight: 900;
}
#practice-prompt-bar strong { color: #ea580c; font-size: 36px; }
.puzzle-refresh-btn {
  height: 44px;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  background: #522412;
  color: #fff8df;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 5px 0 #2f1308;
}
.puzzle-practice-main {
  display: grid;
  grid-template-columns: minmax(260px, .72fr) minmax(290px, .82fr) minmax(500px, 1.46fr);
  gap: 16px;
  min-height: 0;
  flex: 1;
}
.puzzle-mission-card,
.puzzle-practice-theme .puzzle-assembly-workbench,
.puzzle-practice-theme .puzzle-drawer-tray {
  min-height: 0;
  border: 1px solid rgba(139,83,20,.22);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 28px rgba(120,53,15,.08);
}
.puzzle-mission-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.puzzle-big-equation {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 28px 0 18px;
  color: #7c3f14;
  font-family: 'JetBrains Mono', monospace;
  font-size: 30px;
  font-weight: 900;
}
.puzzle-big-equation strong,
.puzzle-big-equation em {
  display: grid;
  place-items: center;
  min-width: 70px;
  height: 72px;
  border-radius: 18px;
  font-size: 42px;
  font-style: normal;
}
.puzzle-big-equation strong { background: #522412; color: #fff3c4; box-shadow: 0 7px 0 #2f1308; }
.puzzle-big-equation em { border: 3px dashed #f59e0b; background: #fff7dc; color: #f59e0b; }
.puzzle-mission-card p { margin: 10px 0 0; color: #9a6129; font-size: 14px; font-weight: 800; }
.puzzle-practice-theme .puzzle-assembly-workbench {
  justify-content: flex-start;
  padding: 18px;
  gap: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,243,196,.82));
}
.puzzle-practice-theme .puzzle-stand-shelf {
  min-height: 0 !important;
  flex: 1;
  padding: 20px 0 32px;
  border-bottom-width: 12px;
  background: transparent;
}
.puzzle-practice-theme .puzzle-column-bay {
  width: 132px;
  min-height: 390px;
  justify-content: center;
}
.puzzle-practice-theme .puzzle-column-bay.target-active { transform: none; }
.puzzle-practice-theme .puzzle-drop-target { width: 124px; min-height: 72px; border-width: 3px; }
.puzzle-practice-theme .puzzle-drop-target.target-empty::before { content: '拖到这里'; font-size: 14px; }
.puzzle-practice-theme #practice-base-block-slot .puzzle-block-svg,
.puzzle-practice-theme #practice-drop-target .puzzle-block-svg { width: 124px; max-height: 290px; }
.puzzle-practice-theme .puzzle-bay-pedestal { width: 142px; height: 18px; }
.puzzle-practice-theme .puzzle-bay-label { margin-top: 9px; font-size: 15px; }
.puzzle-practice-theme .puzzle-drawer-tray {
  padding: 18px;
  gap: 14px;
}
.puzzle-practice-theme .puzzle-tray-header { align-items: flex-start; gap: 8px; }
.puzzle-practice-theme .puzzle-tray-title { color: #522412; font-size: 16px; }
.puzzle-practice-theme .puzzle-tray-header > span { max-width: 240px; color: #9a6129; font-size: 11px; font-weight: 800; text-align: right; }
.puzzle-practice-theme .puzzle-tray-pieces-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  grid-auto-rows: minmax(165px, 1fr);
  align-items: stretch;
  gap: 12px;
  min-height: 0;
  flex: 1;
  padding: 0;
  border: 0;
  background: transparent;
}
.puzzle-practice-theme #practice-pieces-tray .puzzle-block-node {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border: 2px solid rgba(139,83,20,.14);
  border-radius: 18px;
  background: #fffdf6;
  box-shadow: 0 7px 0 #ead7af;
  overflow: hidden;
}
.puzzle-practice-theme #practice-pieces-tray .puzzle-block-node:hover:not(.locked) {
  border-color: #f59e0b;
  background: #fff8dc;
  transform: translateY(-5px);
}
.puzzle-choice-number {
  position: absolute;
  top: 9px;
  left: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #522412;
  color: #fff3c4;
  font: 900 23px 'JetBrains Mono', monospace;
}
.puzzle-choice-shape { display: grid; place-items: center; width: 100%; height: 100%; }
.puzzle-practice-theme #practice-pieces-tray .puzzle-block-svg { width: 100px; max-height: 128px; }
.puzzle-practice-result {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 0;
}
.puzzle-practice-result:not(:empty) { min-height: 72px; }
.puzzle-practice-result .puzzle-formula-banner { width: min(900px, 100%); }

@media (max-height: 820px) {
  .puzzle-theme.puzzle-practice-theme { min-height: calc(100vh - 92px); }
  .puzzle-practice-question { min-height: 64px; }
  .puzzle-practice-theme .puzzle-column-bay { min-height: 310px; }
  .puzzle-practice-theme .puzzle-tray-pieces-grid { grid-auto-rows: minmax(130px, 1fr); }
  .puzzle-practice-theme #practice-pieces-tray .puzzle-block-svg { max-height: 100px; }
}
@media (max-width: 1180px) {
  .puzzle-practice-main { grid-template-columns: 1fr 1fr; }
  .puzzle-practice-theme .puzzle-drawer-tray { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .puzzle-theme.puzzle-practice-theme { min-height: auto; overflow: visible; }
  .puzzle-practice-main { grid-template-columns: 1fr; }
  .puzzle-practice-theme .puzzle-drawer-tray { grid-column: auto; }
  .puzzle-practice-theme .puzzle-tray-pieces-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Victory Dialog Overlay */
.puzzle-victory-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeInModal 0.3s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.puzzle-victory-card {
  background: white;
  border-radius: 28px;
  padding: 32px;
  width: 90%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

@media (max-height: 760px) {
  .mole-theme { min-height: calc(100vh - 92px); }
  .mole-meadow-grid { grid-template-rows: repeat(2, minmax(145px, 1fr)); }
  .mole-hole-container { height: clamp(145px, 24vh, 185px); }
  .mole-creature { width: 112px; height: 124px; bottom: 18px; }
  .svg-mole-body { width: 100px; height: 94px; }
  .mole-sign-badge { min-width: 58px; height: 46px; font-size: 32px; border-width: 3px; }
}

@media (max-width: 760px) {
  .mole-theme { min-height: auto; overflow: visible; }
  .mole-meadow-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 170px);
    gap: 12px;
  }
  .mole-hole-container { height: 170px; }
  .mole-sign-badge { min-width: 52px; height: 42px; padding: 0 10px; font-size: 28px; }
}
.mole-question {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: #7c2d12;
  font-size: clamp(22px, 2vw, 34px);
  font-weight: 900;
  letter-spacing: -.03em;
}
.mole-question strong {
  display: inline-grid;
  place-items: center;
  min-width: 68px;
  height: 68px;
  padding: 0 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff7ed, #ffedd5);
  color: #ea580c;
  font-family: 'JetBrains Mono', monospace;
  font-size: 48px;
  box-shadow: 0 8px 18px rgba(234, 88, 12, .14), inset 0 0 0 2px rgba(251,146,60,.22);
}
.mole-action-hint {
  padding: 7px 12px;
  border-radius: 999px;
  background: #7c2d12;
  color: #fff7ed;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
