/* ==========================================================================
   Christmas Escape Room — Themes & Interactive Components
   ========================================================================== */

:root {
  --bg-grad: radial-gradient(circle at 20% 15%, #0e2a47 0%, #071322 55%, #030811 100%);
  --panel-bg: rgba(12, 26, 46, 0.82);
  --panel-border: rgba(100, 210, 255, 0.25);
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.35);
  --success: #22c55e;
  --danger: #f43f5e;
  --warning: #f59e0b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body.theme-a {
  --bg-grad: radial-gradient(circle at 18% 15%, #0c2b48 0%, #071526 55%, #020812 100%);
  --panel-bg: rgba(10, 25, 47, 0.85);
  --panel-border: rgba(56, 189, 248, 0.3);
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-glow: rgba(56, 189, 248, 0.4);
  --font-display: 'Orbitron', sans-serif;
}

body.theme-b {
  --bg-grad: radial-gradient(circle at 20% 15%, #2d1018 0%, #17090f 55%, #0a0407 100%);
  --panel-bg: rgba(30, 14, 20, 0.88);
  --panel-border: rgba(212, 175, 55, 0.35);
  --accent: #eab308;
  --accent-strong: #ca8a04;
  --accent-glow: rgba(234, 179, 8, 0.35);
  --font-display: 'Cinzel', serif;
}

body.theme-c {
  --bg-grad: radial-gradient(circle at 20% 15%, #123524 0%, #0b2017 55%, #05110b 100%);
  --panel-bg: rgba(16, 40, 28, 0.86);
  --panel-border: rgba(251, 191, 36, 0.35);
  --accent: #fbbf24;
  --accent-strong: #d97706;
  --accent-glow: rgba(251, 191, 36, 0.38);
  --font-display: 'Cinzel', serif;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-grad);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Snowfall Layer */
#snow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.snowflake {
  position: absolute;
  top: -12px;
  color: rgba(255, 255, 255, 0.65);
  user-select: none;
  animation: fall linear infinite;
}

@keyframes fall {
  0% { transform: translateY(-10px) translateX(0); opacity: 0.8; }
  100% { transform: translateY(105vh) translateX(25px); opacity: 0.15; }
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.glass-panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.08);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #06121f;
  font-weight: 700;
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-lg {
  width: 100%;
  padding: 14px 24px;
  font-size: 1.05rem;
  margin-top: 16px;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
}

.btn-unlock {
  background: rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.3);
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-unlock.unlocked {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #052e16;
  font-weight: 800;
  border-color: #4ade80;
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.45);
  animation: pulseUnlock 1.6s infinite;
}

@keyframes pulseUnlock {
  0%, 100% { box-shadow: 0 0 18px rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 30px rgba(34, 197, 94, 0.75); }
}

/* ==================== REGISTRATION ==================== */
.reg-card {
  max-width: 720px;
  margin: 24px auto;
  padding: 32px 28px;
}

.reg-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.reg-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: 0.02em;
}

.reg-subtitle {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form-group label, .picker-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #e2e8f0;
}

.req {
  color: var(--danger);
}

.form-group input,
.form-group select {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(4, 11, 22, 0.75);
  color: var(--text-main);
  font-size: 0.96rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
}

.field-error {
  font-size: 0.8rem;
  color: var(--danger);
  min-height: 1.1em;
}

.storyline-picker {
  margin-top: 18px;
}

.storyline-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.story-card {
  text-align: left;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.2s;
}

.story-card:hover {
  background: rgba(255, 255, 255, 0.1);
}

.story-card.selected {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.14);
  box-shadow: 0 0 18px var(--accent-glow);
}

.story-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 700;
}

.story-card strong {
  font-size: 0.92rem;
  line-height: 1.3;
}

.story-card small {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==================== HUD & STAGE ==================== */
.hud-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 20px;
  margin-bottom: 14px;
}

.hud-story-badge {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--accent);
}

.hud-player {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.hud-stages {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-pip {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
}

.stage-pip.active {
  background: var(--accent);
  color: #06121f;
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.stage-pip.done {
  background: var(--success);
  color: #052e16;
  border-color: #4ade80;
}

.stage-line {
  width: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.18);
}

.hud-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.metric-pill {
  padding: 6px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 72px;
}

.metric-label {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
}

.motivation-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  margin-bottom: 14px;
  border-left: 4px solid var(--accent);
}

.motivation-banner p {
  margin: 0;
  font-size: 0.92rem;
  color: #e2e8f0;
  font-style: italic;
}

.stage-card {
  padding: 24px;
}

.stage-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.stage-kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 4px;
}

.stage-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
}

.stage-prompt {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.96rem;
  color: #f8fafc;
}

.hint-box {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.45);
  color: #fde68a;
  font-size: 0.92rem;
}

.stage-feedback {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.94rem;
}

.stage-feedback.error {
  background: rgba(244, 63, 94, 0.16);
  border: 1px solid rgba(244, 63, 94, 0.5);
  color: #fecdd3;
  animation: shake 0.4s ease;
}

.stage-feedback.success {
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #bbf7d0;
}

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

.hidden {
  display: none !important;
}

.puzzle-mount {
  min-height: 320px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stage-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lock-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.lock-status.unlocked {
  color: #86efac;
  font-weight: 600;
}

/* ==================== PUZZLE-SPECIFIC STYLES ==================== */
/* 3x3 Sliding Puzzle */
.sliding-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.sliding-grid {
  display: grid;
  grid-template-columns: repeat(3, 100px);
  grid-template-rows: repeat(3, 100px);
  gap: 6px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid var(--panel-border);
}

.slide-tile {
  width: 100px;
  height: 100px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.07);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.14s ease, box-shadow 0.2s;
  padding: 0;
}

.slide-tile:hover:not(.empty) {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.slide-tile.empty {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(255, 255, 255, 0.15);
  cursor: default;
}

.slide-tile .tile-num {
  position: absolute;
  top: 4px;
  left: 6px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(0, 0, 0, 0.45);
  padding: 1px 5px;
  border-radius: 4px;
  pointer-events: none;
}

/* River Crossing / Moat / Ferry */
.river-arena {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 12px;
  align-items: stretch;
}

.bank-box {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bank-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-align: center;
}

.river-water {
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.35), rgba(8, 47, 73, 0.6));
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}

.boat-box {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(120, 53, 15, 0.45);
  border: 2px solid #d97706;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: transform 0.35s ease;
}

.boat-box.pos-left {
  transform: translateX(-14px);
}

.boat-box.pos-right {
  transform: translateX(14px);
}

.char-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.char-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-main);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}

.char-chip:hover {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.18);
}

/* Logic Gates (A3) */
.logic-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
  align-items: start;
}

.logic-clues {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 14px;
  font-size: 0.9rem;
}

.logic-clues ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.logic-clues li {
  margin-bottom: 6px;
}

.switch-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.switch-btn {
  padding: 14px 8px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.switch-btn.on {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.18);
  box-shadow: 0 0 16px rgba(34, 197, 94, 0.3);
}

.tree-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Balance Scale (A4) */
.scale-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.scale-beam-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px 8px;
}

.scale-needle {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1rem;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  margin-bottom: 10px;
}

.scale-bays {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  width: 100%;
  transition: transform 0.35s ease;
}

.cargo-bay {
  min-height: 120px;
  padding: 12px;
  border-radius: 12px;
  border: 2px dashed rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cargo-bay.drag-over {
  border-color: var(--accent);
  background: rgba(56, 189, 248, 0.12);
}

.sack-chip {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: grab;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  user-select: none;
}

/* Jigsaw (B1) */
.jigsaw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-width: 580px;
  margin: 0 auto;
}

.jigsaw-piece {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  border: 2px solid rgba(212, 175, 55, 0.35);
  background: #f5ebd6;
  color: #3b1d0e;
  cursor: grab;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px;
  text-align: center;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.78rem;
  position: relative;
  user-select: none;
  transition: transform 0.25s ease, box-shadow 0.2s;
}

.jigsaw-piece.correct-pos {
  border-color: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.jigsaw-piece.drag-over {
  outline: 3px solid var(--accent);
}

/* Cryptex (B2) */
.cryptex-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.cryptex-rings {
  display: flex;
  gap: 14px;
  padding: 18px 24px;
  border-radius: 16px;
  background: linear-gradient(180deg, #3b2a14, #1e1408);
  border: 2px solid #d4af37;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.6);
}

.cryptex-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.ring-letter {
  width: 62px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(180deg, #d4af37, #9a7418, #d4af37);
  color: #1c1205;
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  font-weight: 800;
  border: 2px solid #fef08a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* Timeline (B4) */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.time-slot {
  min-height: 150px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 2px dashed rgba(212, 175, 55, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.time-slot.drag-over {
  border-color: var(--accent);
  background: rgba(234, 179, 8, 0.12);
}

.suspect-card {
  width: 100%;
  padding: 10px 8px;
  border-radius: 10px;
  background: rgba(45, 16, 24, 0.9);
  border: 1px solid rgba(212, 175, 55, 0.45);
  cursor: grab;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: center;
}

/* Water Jug (C2) */
.jug-arena {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 28px;
  padding: 16px 0;
}

.jug-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.jug-vessel {
  width: 110px;
  border: 3px solid #fbbf24;
  border-top: none;
  border-radius: 0 0 18px 18px;
  background: rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.jug-liquid {
  width: 100%;
  background: linear-gradient(180deg, #92400e, #451a03);
  transition: height 0.35s ease;
  border-top: 3px solid #d97706;
}

.jug-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Bells (C4) */
.bells-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 16px 0;
}

.bell-btn {
  width: 82px;
  height: 104px;
  border-radius: 40px 40px 14px 14px;
  border: 2px solid #fbbf24;
  background: linear-gradient(180deg, #fde68a, #d97706);
  color: #451a03;
  font-family: 'Cinzel', serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 0 6px 18px rgba(251, 191, 36, 0.28);
  transition: transform 0.12s, box-shadow 0.15s;
}

.bell-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(251, 191, 36, 0.5);
}

.bell-btn.ringing {
  transform: scale(0.94);
  filter: brightness(1.25);
}

/* ==================== CERTIFICATE ==================== */
.cert-card {
  max-width: 720px;
  margin: 24px auto;
  padding: 36px 28px;
  text-align: center;
}

.cert-seal {
  font-size: 3.4rem;
  margin-bottom: 6px;
}

.cert-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 8px;
}

.cert-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.cert-subtitle {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.cert-item {
  padding: 14px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cert-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cert-value {
  font-size: 1.05rem;
  font-family: var(--font-mono);
}

.raffle-box {
  padding: 20px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.12);
  border: 2px dashed rgba(74, 222, 128, 0.5);
  margin-bottom: 20px;
}

.raffle-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #86efac;
  margin-bottom: 6px;
}

.raffle-code {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #ffffff;
}

.submit-status {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .form-grid,
  .storyline-cards,
  .river-arena,
  .logic-layout,
  .timeline-grid,
  .cert-grid {
    grid-template-columns: 1fr;
  }
  .jigsaw-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .sliding-grid {
    grid-template-columns: repeat(3, 86px);
    grid-template-rows: repeat(3, 86px);
  }
  .slide-tile {
    width: 86px;
    height: 86px;
  }
}
