/* ============================================
   RED DE RESTJES - IVVO Quiz
   4 brand colors: pink, orange, green, yellow
   ============================================ */

@font-face {
  font-family: 'Yumelo';
  src: url('Yumelo.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('Figtree-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --pink: #CF277B;
  --orange: #E95118;
  --green: #9ACFB4;
  --yellow: #FFEF2C;
  --bg: #F5D4A8;
  --bg-card: #FFFFFF;
  --text-dark: #2A1A10;
  --text-muted: #6A5A4A;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(42,26,16,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Figtree', sans-serif;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% 85%, rgba(207,39,123,0.12) 0%, transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(233,81,24,0.12) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(154,207,180,0.10) 0%, transparent 50%);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---- Progress bar ---- */
#progress-bar {
  position: fixed; top: 0; left: 0; right: 0;
  height: 14px;
  background: rgba(255,255,255,0.4);
  z-index: 100;
}
#progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--green));
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  width: 0%;
  clip-path: polygon(0 0, calc(100% - 4px) 0, 100% 40%, calc(100% - 2px) 100%, 0 100%);
}
#progress-text {
  position: absolute; right: 12px; top: 18px;
  font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
}

/* ---- Floating mascots ---- */
.mascot-float {
  position: fixed; width: 200px; height: auto;
  opacity: 0.08; z-index: 0; pointer-events: none;
  animation: float 6s ease-in-out infinite;
}
.mascot-float img { width: 100%; height: auto; }
#mascot-stijn { top: 3%; left: 5%; animation-delay: 0s; }
#mascot-appel { top: 8%; left: 65%; animation-delay: 1s; }
#mascot-youssef { top: 25%; left: 35%; animation-delay: 2s; }
#mascot-patatje { top: 22%; left: 80%; animation-delay: 0.5s; }
#mascot-avocado { top: 45%; left: 10%; animation-delay: 3s; }
#mascot-banaan { top: 50%; left: 70%; animation-delay: 5s; }
#mascot-wendy { top: 70%; left: 25%; animation-delay: 4s; }
#mascot-pasta { top: 75%; left: 85%; animation-delay: 3.5s; }

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
}

/* ---- Screens ---- */
#app { position: relative; z-index: 1; }
.screen {
  display: none; min-height: 100vh;
  padding: 24px 16px; align-items: center; justify-content: center;
}
.screen.active { display: flex; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border-radius: 0;
  box-shadow: var(--shadow);
  padding: 48px 44px;
  max-width: 600px; width: 100%; margin: 0 auto;
  position: relative; overflow: visible;
  clip-path: polygon(0.5% 1.2%, 99.5% 0%, 100% 98.5%, 0% 99.5%);
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px;
  background: linear-gradient(90deg, var(--orange), var(--pink), var(--yellow));
}

/* ---- Welcome ---- */
.welcome-card { text-align: center; padding-top: 48px; }
.mascots-row {
  display: flex; justify-content: center; gap: 24px; margin-bottom: 24px;
}
.mascot-char { text-align: center; }
.mascot-emoji {
  width: 140px; height: 140px;
  animation: bounce 2s ease-in-out infinite; cursor: default;
}
.mascot-emoji img { width: 100%; height: 100%; object-fit: contain; }
.mascot-char:nth-child(2) .mascot-emoji { animation-delay: 0.3s; }
.mascot-char:nth-child(3) .mascot-emoji { animation-delay: 0.6s; }
.mascot-name {
  font-size: 0.8rem; font-weight: 700;
  color: var(--text-muted); margin-top: 4px;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

h1 {
  font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em;
  font-size: 3.4rem; color: var(--orange);
  margin-bottom: 8px; line-height: 1.2;
}
.subtitle { color: var(--text-muted); font-size: 1.1rem; margin-bottom: 28px; }

/* ---- Input ---- */
.input-group { margin-bottom: 24px; }
.input-group label {
  display: block; font-weight: 700; font-size: 1rem;
  margin-bottom: 8px; color: var(--text-dark);
}
.input-group input[type="text"] {
  width: 100%; padding: 14px 18px; font-size: 1.1rem;
  font-family: inherit; border: 3px solid var(--green);
  border-radius: var(--radius-sm); outline: none;
  transition: border-color 0.2s; text-align: center;
}
.input-group input[type="text"]:focus { border-color: var(--orange); }

/* ---- Buttons — subtly wonky shapes ---- */
.btn {
  display: inline-block; padding: 12px 28px;
  border: none; font-family: inherit; font-weight: 700;
  font-size: 1rem; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
  border-radius: 0;
  clip-path: polygon(1% 4%, 99% 0%, 100% 94%, 0% 100%);
}
.btn:active { transform: scale(0.96); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--orange); color: white;
  box-shadow: 0 4px 16px rgba(233,81,24,0.3);
}
.btn-primary:hover:not(:disabled) {
  background: var(--pink);
  box-shadow: 0 6px 20px rgba(207,39,123,0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--green); color: var(--text-dark);
  clip-path: polygon(0% 2%, 100% 5%, 99% 96%, 1% 100%);
}
.btn-text {
  background: none; color: var(--text-muted);
  font-size: 0.9rem; padding: 8px 16px; clip-path: none;
}
.btn-text:hover { color: var(--text-dark); }
.btn-large {
  padding: 16px 36px; font-size: 1.15rem;
  clip-path: polygon(0.5% 6%, 99.5% 0%, 100% 92%, 0% 100%);
}
.btn-small {
  padding: 8px 16px; font-size: 0.85rem;
  clip-path: polygon(0% 3%, 100% 0%, 99% 97%, 1% 100%);
}
.btn-check {
  margin-top: 20px; width: 100%;
  clip-path: polygon(0% 5%, 100% 0%, 99.5% 95%, 0.5% 100%);
}

/* ---- Question header ---- */
.question-header {
  /* display: flex; */
  display: none;
  justify-content: space-between;
  align-items: center; margin-bottom: 20px;
}
.question-number {
  background: var(--yellow); color: var(--text-dark);
  font-weight: 800; font-size: 0.85rem;
  padding: 6px 14px; border-radius: 50px;
}
.question-score { font-size: 0.9rem; color: var(--text-muted); }

.question-title {
  font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em; font-size: 1.8rem;
  color: var(--text-dark); margin-bottom: 10px; line-height: 1.3;
}
.question-subtitle {
  font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px;
}

/* Mascot hint */
.question-mascot-hint {
  display: block;
  font-size: 0.85rem; color: var(--text-muted);
  margin: 40px 0 24px; background: var(--bg);
  padding: 14px 16px 14px 100px; border-radius: var(--radius-sm);
  overflow: visible; position: relative;
  min-height: 60px;
}
.question-mascot-hint .mascot-icon {
  position: absolute; left: -16px; top: 50%;
  width: 100px; height: 100px;
  margin-top: -50px;
}
.question-mascot-hint .mascot-icon img {
  width: 100%; height: 100%; object-fit: contain;
}

/* ---- SLIDER ---- */
.slider-container { margin: 20px 0; }
.slider-track { position: relative; padding: 0 10px; }
.slider-input {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, var(--pink) 0%, var(--green) 60%);
  outline: none; cursor: pointer;
}
.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--orange); border: 4px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); cursor: grab;
}
.slider-input::-moz-range-thumb {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--orange); border: 4px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); cursor: grab;
}
.slider-value {
  text-align: center; font-size: 2rem; font-weight: 800;
  color: var(--orange); margin: 12px 0 4px;
  font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em;
}
.slider-labels {
  display: flex; justify-content: space-between;
  font-size: 0.75rem; color: var(--text-muted); margin-top: 4px;
}

/* Slider reference markers */
.slider-markers {
  position: relative; height: 64px; margin-top: 8px; pointer-events: none;
}
.slider-marker {
  position: absolute; transform: translateX(-50%);
  text-align: center; display: flex; flex-direction: column; align-items: center;
}
.slider-marker::before {
  content: ''; display: block;
  width: 2px; height: 14px; background: var(--text-muted);
  opacity: 0.3; margin-bottom: 2px;
}
.slider-marker .marker-emoji { font-size: 1.3rem; line-height: 1; }
.slider-marker .marker-label {
  font-size: 0.65rem; font-weight: 700; color: var(--text-muted); white-space: nowrap;
}
.slider-marker.marker-pop {
  animation: markerPop 0.4s ease-out;
}
@keyframes markerPop {
  0% { transform: translateX(-50%) scale(1); }
  40% { transform: translateX(-50%) scale(1.5); }
  100% { transform: translateX(-50%) scale(1); }
}

/* Visual emoji counter */
.slider-visual-emojis {
  margin-top: 12px; font-size: 1.2rem; line-height: 1.8;
  text-align: center; word-wrap: break-word; overflow-wrap: break-word;
  max-height: 160px; overflow-y: auto; transition: all 0.15s;
  padding: 8px; background: rgba(255,255,255,0.5); border-radius: 8px;
}
.slider-visual-emojis.viz-large {
  font-size: 2.5rem; line-height: 1.2; max-height: none;
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  overflow: hidden; padding: 12px 0;
}
.slider-visual-emojis.viz-medium {
  font-size: 1.6rem; line-height: 1.3; max-height: none;
  display: flex; justify-content: center; gap: 4px; flex-wrap: wrap;
  overflow: hidden; padding: 8px 0;
}
.viz-item {
  display: inline-block;
}
.viz-pop-in {
  animation: vizPopIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.viz-pop-out {
  animation: vizPopOut 0.25s ease-in forwards;
}
@keyframes vizPopIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes vizPopOut {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0); opacity: 0; }
}
.slider-visual-emojis .viz-extra {
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
}

/* ---- DRAG AND DROP ---- */
.drag-zone {
  display: flex; gap: 16px; margin-top: 48px; margin-bottom: 20px;
  justify-content: center; flex-wrap: wrap;
}
.drag-item {
  background: var(--bg); border: 3px solid transparent;
  border-radius: var(--radius-sm); padding: 12px 16px;
  font-weight: 700; font-size: 0.95rem; cursor: grab;
  transition: all 0.2s; user-select: none; touch-action: none;
  display: flex; align-items: center; gap: 8px;
}
.drag-item:active { cursor: grabbing; }
.drag-item.dragging { opacity: 0.5; transform: scale(0.95); }
.drag-item .item-emoji { font-size: 1.4rem; }

.drop-zones { display: flex; gap: 16px; margin-top: 16px; }
.drop-zone {
  flex: 1; min-height: 160px;
  border: 3px dashed var(--green); border-radius: var(--radius-sm);
  padding: 12px; text-align: center; transition: all 0.2s; position: relative;
}
.drop-zone.drag-over {
  border-color: var(--orange);
  background: rgba(233,81,24,0.06); transform: scale(1.02);
}
.drop-zone-label {
  font-weight: 800; font-size: 1rem; margin-bottom: 8px;
  padding: 6px 12px; border-radius: 8px; display: inline-block;
}
.drop-zone-label.gft { background: var(--green); color: var(--text-dark); }
.drop-zone-label.rest { background: var(--pink); color: white; }
.drop-zone .dropped-items {
  display: flex; flex-direction: column; gap: 6px; margin-top: 8px;
}
.drop-zone .drag-item { font-size: 0.85rem; padding: 8px 12px; }

/* ---- MULTIPLE CHOICE ---- */
.choices { display: flex; flex-direction: column; gap: 10px; margin-top: 48px; }
.choice-btn {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border: 3px solid #E0D0C0;
  border-radius: var(--radius-sm); background: white;
  cursor: pointer; font-family: inherit; font-size: 1rem;
  font-weight: 600; color: var(--text-dark);
  transition: all 0.2s; text-align: left; width: 100%;
}
.choice-btn:hover { border-color: var(--green); background: var(--bg); }
.choice-btn.selected { border-color: var(--orange); background: rgba(233,81,24,0.08); }
.choice-btn .choice-letter {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg); display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 0.85rem; flex-shrink: 0;
}
.choice-btn.selected .choice-letter { background: var(--orange); color: white; }

/* Multi-select */
.choices.multi-select .choice-btn.selected {
  border-color: var(--pink); background: rgba(207,39,123,0.08);
}
.choices.multi-select .choice-btn.selected .choice-letter {
  background: var(--pink); color: white;
}

/* ---- SHELF PICKER ---- */
.shelf-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin-top: 16px;
}
.shelf-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 10px; border: 3px solid #E0D0C0;
  border-radius: var(--radius-sm); background: white;
  cursor: pointer; transition: all 0.2s;
  font-size: 0.85rem; font-weight: 600; text-align: center;
}
.shelf-item:hover { border-color: var(--green); }
.shelf-item.selected { border-color: var(--pink); background: rgba(207,39,123,0.08); }
.shelf-item .shelf-emoji { font-size: 2rem; }

/* ---- Answer screen ---- */
.answer-card { text-align: center; }
.answer-mascot { width: 160px; height: 160px; margin: 0 auto 12px; }
.answer-mascot img { width: 100%; height: 100%; object-fit: contain; }
.answer-result {
  /* display: inline-block; */
  display: none;
  padding: 6px 20px;
  border-radius: 50px; font-weight: 800; font-size: 1rem; margin-bottom: 12px;
}
.answer-result.correct { background: var(--green); color: var(--text-dark); }
.answer-result.wrong { background: var(--pink); color: white; }
.answer-result.partial { background: var(--yellow); color: var(--text-dark); }
.answer-card h2 { font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em; font-size: 1.5rem; margin-bottom: 12px; }
.answer-card p { color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }

/* ---- Correct answer display ---- */
#answer-extra { margin-bottom: 24px; }
#answer-extra:empty { margin-bottom: 0; }
.answer-correct-label {
  font-size: 0.8rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px;
}
.answer-correct-value {
  font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em;
  font-size: 2rem; color: var(--orange); margin-bottom: 24px;
}
.answer-correct-choice {
  display: inline-block; padding: 8px 14px; margin: 4px;
  background: var(--green); color: var(--text-dark);
  border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  margin-bottom: 24px;
}
.answer-correct-choices {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  margin-bottom: 24px;
}
.answer-bins {
  display: flex; gap: 16px; margin-bottom: 24px; width: 100%;
}
.answer-bin { flex: 1; text-align: center; }
.answer-bin-label {
  font-weight: 800; font-size: 0.85rem; padding: 4px 10px;
  border-radius: 6px; display: inline-block; margin-bottom: 6px;
}
.answer-bin-label.gft { background: var(--green); color: var(--text-dark); }
.answer-bin-label.rest { background: var(--pink); color: white; }
.answer-bin-items { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.answer-bin-item {
  font-size: 0.8rem; font-weight: 600; padding: 4px 10px;
  background: rgba(0,0,0,0.04); border-radius: 6px;
}

/* Cost comparison bar chart (Q9) — horizontal */
.cost-comparison {
  display: flex; flex-direction: column;
  gap: 12px; margin: 20px 0 8px;
}
.cost-bar-wrap {
  display: flex; align-items: center; gap: 12px;
}
.cost-bar {
  height: 36px; border-radius: 0 8px 8px 0;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  width: 0;
}
.cost-bar.rest { background: linear-gradient(to right, #555, #888); }
.cost-bar.gft { background: linear-gradient(to right, var(--green), #c8e6c9); }
.cost-label { font-weight: 700; font-size: 0.9rem; min-width: 80px; text-align: right; }
.cost-factor {
  font-size: 1.4rem; font-weight: 800; color: var(--pink);
  margin-bottom: 24px;
}

/* ---- Upload screen ---- */
.upload-card { text-align: center; }
.upload-card h2 { font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em; margin-bottom: 8px; }
.upload-card > p { color: var(--text-muted); margin-bottom: 20px; }
.upload-zone {
  border: 3px dashed var(--green); border-radius: var(--radius-sm);
  padding: 32px 20px; cursor: pointer; transition: all 0.2s; margin-bottom: 20px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--orange); background: rgba(233,81,24,0.05);
}
.upload-icon { font-size: 3rem; margin-bottom: 8px; }
.upload-zone p { color: var(--text-muted); font-weight: 600; }
#upload-preview {
  margin-bottom: 20px; text-align: center;
}
#upload-preview img {
  max-width: 100%; max-height: 200px;
  border-radius: var(--radius-sm); margin: 0 auto 12px; display: block;
}

/* ---- Results screen ---- */
.results-card { text-align: center; overflow: visible; }
.results-card h1 { font-size: 1.8rem; margin-bottom: 16px; }

.score-circle { position: relative; width: 160px; height: 160px; margin: 0 auto 20px; }
.score-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-bg { fill: none; stroke: var(--green); stroke-width: 10; }
.score-fill {
  fill: none; stroke: var(--orange); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 339.292; stroke-dashoffset: 339.292;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.4,0,0.2,1);
}
.score-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em; font-size: 2.5rem;
  font-weight: 800; color: var(--orange);
}

.results-card > p {
  color: var(--text-muted); font-size: 1.05rem;
  line-height: 1.6; margin-bottom: 24px;
}

.results-stats {
  display: flex; gap: 12px; justify-content: center;
  margin-bottom: 24px; flex-wrap: wrap;
}
.stat-box {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 12px 16px; text-align: center; min-width: 80px;
}
.stat-box .stat-value {
  font-size: 1.5rem; font-weight: 800;
  color: var(--orange); font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em;
}
.stat-box .stat-label {
  font-size: 0.75rem; color: var(--text-muted); font-weight: 600;
}
.results-card .btn { margin-bottom: 10px; display: block; width: 100%; }

/* ---- Certificate ---- */
#certificate {
  position: absolute; left: -9999px; top: 0;
  width: 800px; height: 566px;
  background: white; font-family: 'Figtree', sans-serif;
}
#certificate .cert-inner {
  width: 800px; height: 566px; position: relative;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 48px 64px;
  border-top: 8px solid var(--orange);
  border-bottom: 8px solid var(--pink);
}
#certificate .cert-inner::after {
  content: ''; position: absolute;
  top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1.5px solid var(--orange);
  pointer-events: none;
}
/* Mascots positioned */
#certificate .cert-mascot-tl {
  position: absolute; left: 20px; top: 16px;
}
#certificate .cert-mascot-tr {
  position: absolute; right: 20px; top: 16px;
}
#certificate .cert-mascot-bl {
  position: absolute; left: 20px; bottom: 16px;
}
#certificate .cert-mascot-tl img,
#certificate .cert-mascot-tr img,
#certificate .cert-mascot-bl img {
  height: 140px; width: auto; object-fit: contain;
}
#certificate .cert-title {
  font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em; font-size: 2.8rem;
  color: var(--orange); line-height: 1.1; margin-bottom: 4px;
}
#certificate .cert-subtitle {
  font-size: 1.05rem; color: var(--orange); font-weight: 800;
  margin-bottom: 12px; letter-spacing: 2px; text-transform: uppercase;
}
#certificate .cert-name {
  font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em; font-size: 3rem;
  color: var(--pink); margin-bottom: 8px; line-height: 1.1;
}
#certificate .cert-message {
  font-size: 1rem; color: var(--text-muted);
  max-width: 440px; line-height: 1.5; margin-bottom: 14px;
}
/* Score circle on certificate */
#certificate .cert-score-circle {
  position: relative; width: 100px; height: 100px;
}
#certificate .cert-score-circle svg {
  width: 100%; height: 100%; transform: rotate(-90deg);
}
#certificate .cert-score-circle .ring-bg {
  fill: none; stroke: var(--green); stroke-width: 8;
}
#certificate .cert-score-circle .ring-fill {
  fill: none; stroke: var(--orange); stroke-width: 8; stroke-linecap: round;
}
#certificate .cert-score-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: 'Yumelo', sans-serif; letter-spacing: 0;
  font-size: 1.7rem; color: var(--orange);
  line-height: 1; text-align: center;
}
/* Score + photo row */
#certificate .cert-score-row {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-bottom: 10px;
}
#certificate .cert-photo img {
  width: 100px; height: 100px; border-radius: 8px;
  border: 3px solid var(--green); object-fit: cover;
}
#certificate .cert-footer {
  position: absolute; bottom: 20px; right: 30px;
  text-align: right; z-index: 1;
}
#certificate .cert-logo-img { height: 100px; width: auto; margin-bottom: 6px; }
#certificate .cert-brand {
  font-family: 'Yumelo', sans-serif; letter-spacing: 0.04em;
  font-size: 0.85rem; color: var(--orange); margin-bottom: 2px;
}
#certificate .cert-date { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 6px; }

/* ---- Debug TOC (hidden for production) ---- */
/*
#debug-toc {
  position: fixed; left: 0; top: 50%; transform: translateY(-50%);
  z-index: 999; background: rgba(0,0,0,0.75); border-radius: 0 8px 8px 0;
  padding: 8px 6px; display: flex; flex-direction: column; gap: 4px;
  font-size: 0.65rem; font-family: monospace;
}
#debug-toc a {
  color: white; text-decoration: none; padding: 4px 8px;
  border-radius: 4px; white-space: nowrap; display: block;
}
#debug-toc a:hover { background: rgba(255,255,255,0.2); }
#debug-toc a.active { background: var(--orange); }
*/

/* ---- Confetti ---- */
.confetti-piece {
  position: absolute; width: 10px; height: 10px;
  border-radius: 2px; animation: confetti-fall 3s ease-out forwards;
}
@keyframes confetti-fall {
  0% { opacity: 1; transform: translateY(-20px) rotate(0deg); }
  100% { opacity: 0; transform: translateY(400px) rotate(720deg); }
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .card { padding: 24px 16px; border-radius: 16px; }
  h1 { font-size: 1.7rem; }
  .question-title { font-size: 1.2rem; }
  .mascots-row { gap: 16px; }
  .mascot-emoji { width: 100px; height: 100px; }
  .drop-zones { flex-direction: column; }
  .drop-zone { min-height: 120px; }
  .shelf-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
  .btn-large { padding: 14px 24px; font-size: 1rem; }
  .score-circle { width: 130px; height: 130px; }
  .score-text { font-size: 2rem; }
}

/* ---- Animations ---- */
.screen.active { animation: fadeIn 0.4s ease-out; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.shake { animation: shake 0.4s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-8px); }
  75% { transform: translateX(8px); }
}
.pop { animation: pop 0.3s ease-out; }
@keyframes pop {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}
