/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0d14; }

/* ===== GAME WRAP ===== */
#game-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  cursor: pointer;
}

/* ===== HUD ===== */
#hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(to bottom, rgba(10,13,20,.92), transparent);
  pointer-events: none;
  z-index: 10;
  flex-wrap: wrap;
}

#hud-title { display: flex; align-items: center; gap: 10px; }
#hud-logo { font-size: 1.6rem; filter: drop-shadow(0 0 8px rgba(91,141,238,.6)); }

#hud-title strong {
  display: block;
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 1rem; font-weight: 700; color: #e4e6f0; letter-spacing: .02em;
}
#hud-hint { display: block; font-family: 'Segoe UI', system-ui, sans-serif; font-size: .72rem; color: #6a7499; }

#hud-progress { display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none; }

.hud-badge {
  font-family: 'Segoe UI', system-ui, sans-serif; font-size: .7rem; font-weight: 600;
  padding: 3px 9px; border-radius: 99px; border: 1.5px solid #2a3047;
  color: #4a5270; background: rgba(10,13,20,.7); transition: border-color .3s, color .3s;
}
.hud-badge.done   { border-color: #4ade80; color: #4ade80; }
.hud-badge.active { border-color: #5b8dee; color: #5b8dee; }

/* ===== ENTER PROMPT ===== */
#enter-prompt {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  background: rgba(10,13,20,.92); border: 1.5px solid #5b8dee; border-radius: 12px;
  padding: 10px 20px; font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: .95rem; color: #e4e6f0; z-index: 20;
  animation: prompt-pop .3s cubic-bezier(.34,1.56,.64,1); cursor: pointer; pointer-events: all;
}
#enter-prompt:hover { background: rgba(91,141,238,.2); }
#enter-icon { font-size: 1.4rem; }
#enter-name { font-weight: 700; }
#enter-prompt kbd {
  background: #5b8dee; color: #fff; border: none; border-radius: 6px;
  padding: 3px 10px; font-family: inherit; font-size: .78rem; font-weight: 600;
}
@keyframes prompt-pop {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(.95); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0)   scale(1); }
}
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════════════════
   BUILDING PANEL — style jeu mobile
═══════════════════════════════════════════════════════════════ */
#building-panel {
  position: fixed; inset: 0; z-index: 100;
  background: #f5f0e8;
  transform: translateY(100%);
  transition: transform .42s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column; overflow-y: auto;
  font-family: 'Segoe UI', system-ui, sans-serif;
}
#building-panel.open { transform: translateY(0); }

/* ── Header ── */
.p-header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(135deg, #ff9f43, #ee5a24);
  padding: 14px 18px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 16px rgba(238,90,36,.35);
}
.p-back {
  flex-shrink: 0; background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.45);
  border-radius: 10px; padding: 7px 13px; color: #fff; font-size: .85rem; font-weight: 700;
  cursor: pointer; transition: background .2s; font-family: inherit;
}
.p-back:hover { background: rgba(255,255,255,.4); }
.p-bld-icon { font-size: 2.2rem; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,.25)); }
.p-bld-name { font-weight: 800; font-size: 1.1rem; color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.2); }
.p-bld-desc { font-size: .78rem; color: rgba(255,255,255,.85); margin-top: 2px; }

/* ── Progress bar ── */
.p-prog-bar {
  height: 8px; background: rgba(0,0,0,.1);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.15);
}
.p-prog-fill {
  height: 100%; background: linear-gradient(90deg, #ffd32a, #ffdd59);
  transition: width .5s ease; box-shadow: 0 0 8px rgba(255,211,42,.6);
}

/* ── Panel body ── */
.p-body {
  max-width: 680px; width: 100%; margin: 0 auto;
  padding: 22px 16px 60px;
  display: flex; flex-direction: column; gap: 14px;
}

/* ── Step index ── */
.si-header {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 8px; padding: 10px 0 4px;
}
.si-icon { font-size: 3.5rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,.15)); }
.si-title { font-size: 1.4rem; font-weight: 800; color: #2d1e0f; }
.si-desc  { color: #7a5c3a; font-size: .9rem; max-width: 360px; line-height: 1.5; }

.steps-list { display: flex; flex-direction: column; gap: 10px; }

.step-row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 2.5px solid #e8dfd0;
  border-radius: 16px; padding: 14px 16px; cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .2s;
  width: 100%; text-align: left;
  box-shadow: 0 3px 10px rgba(0,0,0,.06);
}
.step-row:hover:not([disabled]) {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.step-row.s-done    { border-color: #a8e6cf; background: linear-gradient(135deg, #f0fff6, #e0f7ec); }
.step-row.s-current { border-color: #ffd32a; background: linear-gradient(135deg, #fffdf0, #fff8d6); }
.step-row[disabled] { opacity: .45; cursor: default; transform: none !important; box-shadow: none; }

.step-num {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  border: 2.5px solid #e8dfd0; background: #f5f0e8;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; color: #b09070;
}
.step-row.s-done    .step-num { border-color: #4ade80; background: #4ade80; color: #fff; font-size: 1rem; }
.step-row.s-current .step-num { border-color: #ffd32a; background: #ffd32a; color: #7a4f00; font-size: 1rem; }

.step-text { flex: 1; }
.step-name { font-weight: 700; font-size: .9rem; color: #2d1e0f; display: block; }
.step-tag  { font-size: .72rem; color: #b09070; font-weight: 600; margin-top: 2px; display: block; }

.step-arr { color: #c9b89a; font-size: 1.1rem; font-weight: 700; }
.step-row.s-done .step-arr { color: #4ade80; }
.step-row.s-current .step-arr { color: #ffd32a; }

/* ── Step content ── */
.sc-num   {
  font-size: .68rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: #b09070;
}
.sc-title {
  font-size: 1.3rem; font-weight: 800; color: #2d1e0f;
  display: flex; align-items: center; gap: 8px;
}
.sc-desc  { color: #6b4f35; font-size: .9rem; line-height: 1.65; }

/* ── All done ── */
.alldone {
  text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 16px; padding: 20px;
}
.alldone-icon  { font-size: 4rem; animation: bounce 1s ease infinite alternate; }
.alldone-title { font-size: 1.5rem; font-weight: 800; color: #27ae60; }
.alldone-desc  { color: #7a5c3a; max-width: 400px; font-size: .92rem; line-height: 1.6; }

@keyframes bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}

/* ── Tip ── */
.tip {
  background: #fff9e6; border: 2px solid #ffd32a;
  border-radius: 12px; padding: 11px 14px;
  font-size: .84rem; color: #7a5000; line-height: 1.55;
  box-shadow: 0 2px 8px rgba(255,211,42,.2);
}

/* ── Completion ── */
.comp-msg {
  background: linear-gradient(135deg, #e8fff2, #d0f5e0);
  border: 2.5px solid #4ade80; border-radius: 16px;
  padding: 20px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  animation: popin .4s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 4px 16px rgba(74,222,128,.25);
}
.comp-icon { font-size: 2.8rem; }
.comp-text { font-size: .95rem; color: #187a40; font-weight: 700; }

/* ── Footer ── */
.p-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 10px; border-top: 2px dashed #e8dfd0; flex-wrap: wrap;
}
.p-counter { font-size: .78rem; color: #b09070; font-weight: 700; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 24px; border-radius: 12px; border: none;
  font-size: .95rem; font-weight: 800; cursor: pointer; font-family: inherit;
  transition: transform .12s, box-shadow .12s; white-space: nowrap; line-height: 1;
  letter-spacing: .01em;
}
.btn:active { transform: scale(.95) !important; }
.btn:focus-visible { outline: 3px solid #ffd32a; outline-offset: 3px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.btn-primary {
  background: linear-gradient(135deg, #5b8dee, #7c6bef);
  color: #fff; box-shadow: 0 4px 0 #3a6bc0, 0 6px 16px rgba(91,141,238,.4);
}
.btn-primary:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #3a6bc0, 0 10px 20px rgba(91,141,238,.4);
}

.btn-success {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  color: #fff; box-shadow: 0 4px 0 #16a34a, 0 6px 16px rgba(74,222,128,.4);
}
.btn-success:hover:not([disabled]) {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 #16a34a, 0 10px 20px rgba(74,222,128,.4);
}

.btn-ghost {
  background: rgba(255,255,255,.25); border: 2px solid rgba(255,255,255,.45); color: #fff;
}
.btn-ghost:hover:not([disabled]) { background: rgba(255,255,255,.4); }

/* ═══════════════════════════════════════════════════════════════
   MINI-JEUX
═══════════════════════════════════════════════════════════════ */

/* ── TRUE / FALSE ── */
.tf-list { display: flex; flex-direction: column; gap: 10px; }

.tf-card {
  background: #fff; border: 2.5px solid #e8dfd0; border-radius: 14px;
  padding: 16px; box-shadow: 0 3px 10px rgba(0,0,0,.06);
  transition: border-color .2s;
}
.tf-card.tf-right { border-color: #4ade80; background: linear-gradient(135deg, #f0fff6, #e6faf0); }
.tf-card.tf-wrong { border-color: #ff6b6b; background: linear-gradient(135deg, #fff5f5, #ffe8e8); }

.tf-text { font-size: .9rem; font-weight: 700; color: #2d1e0f; margin-bottom: 10px; line-height: 1.45; }
.tf-expl {
  font-size: .82rem; color: #5a3e28; margin-bottom: 10px; line-height: 1.5;
  padding: 8px 10px; background: rgba(0,0,0,.04); border-radius: 8px;
  animation: fadein .3s ease;
}
.tf-btns { display: flex; gap: 8px; }
.tf-btn {
  flex: 1; padding: 10px 14px; border-radius: 10px; border: 2px solid #e8dfd0;
  cursor: pointer; font-size: .9rem; font-weight: 800; transition: all .15s;
  font-family: inherit; background: #f5f0e8; color: #7a5c3a;
}
.tf-btn:hover { transform: scale(1.03); }
.tf-btn.tf-v:hover { background: #e8fff0; border-color: #4ade80; }
.tf-btn.tf-f:hover { background: #fff0f0; border-color: #ff6b6b; }
.tf-btn.tf-active.tf-v { background: #4ade80; border-color: #4ade80; color: #fff; box-shadow: 0 3px 0 #16a34a; }
.tf-btn.tf-active.tf-f { background: #ff6b6b; border-color: #ff6b6b; color: #fff; box-shadow: 0 3px 0 #c0392b; }

.tf-score {
  text-align: center; padding: 14px;
  background: linear-gradient(135deg, #fff9e6, #fff3d0);
  border: 2.5px solid #ffd32a; border-radius: 14px;
  font-size: .95rem; color: #7a5000; font-weight: 700;
  box-shadow: 0 3px 10px rgba(255,211,42,.2); animation: popin .3s ease;
}

/* ── ORDER ── */
.ord-list { display: flex; flex-direction: column; gap: 8px; }

.ord-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 2.5px solid #e8dfd0; border-radius: 12px;
  padding: 12px 14px; cursor: pointer; width: 100%; text-align: left;
  transition: all .15s; font-family: inherit;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.ord-item:hover:not([disabled]) { transform: translateX(4px); box-shadow: 0 4px 12px rgba(0,0,0,.1); border-color: #ffd32a; }
.ord-item.ord-picked { border-color: #5b8dee; background: linear-gradient(135deg, #f0f5ff, #e8eeff); }
.ord-item.ord-right  { border-color: #4ade80; background: linear-gradient(135deg, #f0fff6, #e6faf0); }
.ord-item.ord-wrong  { border-color: #ff6b6b; background: linear-gradient(135deg, #fff5f5, #ffe8e8); }
.ord-item[disabled]  { cursor: default; transform: none !important; }

.ord-num {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 2.5px solid #e8dfd0; background: #f5f0e8;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; font-weight: 800; color: #b09070;
}
.ord-picked .ord-num { border-color: #5b8dee; background: #5b8dee; color: #fff; }
.ord-right  .ord-num { border-color: #4ade80; background: #4ade80; color: #fff; }
.ord-wrong  .ord-num { border-color: #ff6b6b; background: #ff6b6b; color: #fff; }

.ord-label { flex: 1; font-size: .88rem; color: #2d1e0f; font-weight: 600; }
.ord-badge { font-size: .75rem; font-weight: 800; }
.ord-right .ord-badge { color: #16a34a; }
.ord-wrong .ord-badge { color: #c0392b; }
.ord-undo  {
  flex-shrink: 0; font-size: .75rem; color: #ff6b6b; font-weight: 800;
  background: #fff0f0; border-radius: 50%; width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center; border: 1.5px solid #ffb3b3;
}
.ord-hint {
  text-align: center; font-size: .78rem; color: #b09070;
  padding: 6px; font-style: italic;
}

/* ── MATCHING ── */
.match-grid { display: flex; gap: 10px; }
.match-col  { flex: 1; display: flex; flex-direction: column; gap: 8px; }

.match-left, .match-right {
  padding: 11px 13px; border-radius: 12px; border: 2.5px solid #e8dfd0;
  background: #fff; cursor: pointer; font-size: .84rem; color: #2d1e0f; font-weight: 600;
  text-align: center; transition: all .15s; font-family: inherit; width: 100%;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.match-left:hover:not([disabled]), .match-right:hover:not([disabled]) {
  transform: scale(1.03); border-color: #ffd32a;
}
.match-sel  { border-color: #5b8dee !important; background: linear-gradient(135deg, #f0f5ff, #e8eeff) !important; box-shadow: 0 0 0 3px rgba(91,141,238,.2); }
.match-ok   { border-color: #4ade80 !important; background: linear-gradient(135deg, #f0fff6, #e6faf0) !important; color: #187a40; }
.match-err  { border-color: #ff6b6b !important; background: linear-gradient(135deg, #fff5f5, #ffe8e8) !important; color: #c0392b; }
.match-right[disabled] { cursor: default; transform: none; }

/* ── SORT ── */
.sort-list { display: flex; flex-direction: column; gap: 10px; }

.sort-item {
  background: #fff; border: 2.5px solid #e8dfd0; border-radius: 14px;
  padding: 13px 14px; transition: border-color .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.sort-right { border-color: #4ade80; background: linear-gradient(135deg, #f0fff6, #e6faf0); }
.sort-wrong { border-color: #ff6b6b; background: linear-gradient(135deg, #fff5f5, #ffe8e8); }

.sort-label { font-size: .9rem; font-weight: 700; color: #2d1e0f; margin-bottom: 9px; }
.sort-btns  { display: flex; flex-wrap: wrap; gap: 7px; }

.sort-btn {
  padding: 7px 13px; border-radius: 8px; border: 2px solid #e8dfd0;
  background: #f5f0e8; color: #7a5c3a; font-size: .8rem; font-weight: 700;
  cursor: pointer; transition: all .15s; font-family: inherit;
}
.sort-btn:hover { transform: scale(1.05); border-color: #ffd32a; background: #fff9e6; }
.sort-btn-ok  { border-color: #4ade80; background: #4ade80; color: #fff; box-shadow: 0 2px 0 #16a34a; }
.sort-btn-err { border-color: #ff6b6b; background: #ff6b6b; color: #fff; box-shadow: 0 2px 0 #c0392b; }
.sort-correction { font-size: .75rem; color: #e07b5a; margin-top: 6px; font-weight: 600; animation: fadein .3s; }

/* ── SCENARIO ── */
.sc-choices { display: flex; flex-direction: column; gap: 10px; }

.sc-choice {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2.5px solid #e8dfd0; border-radius: 14px;
  padding: 14px 16px; cursor: pointer; width: 100%; text-align: left;
  font-size: .9rem; color: #2d1e0f; font-weight: 600;
  transition: all .15s; font-family: inherit; line-height: 1.5;
  box-shadow: 0 3px 8px rgba(0,0,0,.06);
}
.sc-choice:hover:not([disabled]) {
  transform: translateY(-2px); border-color: #ffd32a;
  box-shadow: 0 6px 16px rgba(0,0,0,.1);
}
.sc-choice[disabled] { cursor: default; opacity: .7; transform: none; }
.sc-good { border-color: #4ade80 !important; background: linear-gradient(135deg, #f0fff6, #e6faf0) !important; color: #187a40 !important; box-shadow: 0 4px 12px rgba(74,222,128,.25) !important; }
.sc-bad  { border-color: #ff6b6b !important; background: linear-gradient(135deg, #fff5f5, #ffe8e8) !important; color: #c0392b !important; box-shadow: 0 4px 12px rgba(255,107,107,.2) !important; }

.sc-outcome {
  border-radius: 14px; padding: 15px 17px; font-size: .9rem; line-height: 1.6; font-weight: 600;
  animation: popin .35s cubic-bezier(.34,1.56,.64,1);
}
.sc-outcome-good {
  background: linear-gradient(135deg, #e8fff2, #d0f5e0);
  border: 2.5px solid #4ade80; color: #187a40;
  box-shadow: 0 4px 16px rgba(74,222,128,.2);
}
.sc-outcome-bad  {
  background: linear-gradient(135deg, #fff5f5, #ffe8e8);
  border: 2.5px solid #ff6b6b; color: #c0392b;
  box-shadow: 0 4px 16px rgba(255,107,107,.15);
}

/* ── BUDGET ── */
.bgt-counter {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: linear-gradient(135deg, #fff9e6, #fff3d0);
  border: 2.5px solid #ffd32a; border-radius: 14px;
  padding: 13px 16px; font-size: .92rem; color: #7a5000; font-weight: 800;
  box-shadow: 0 3px 10px rgba(255,211,42,.2); transition: all .2s;
}
.bgt-counter strong { color: #f0a500; font-size: 1.05rem; }
.bgt-over { border-color: #ff6b6b !important; background: linear-gradient(135deg, #fff5f5, #ffe8e8) !important; }
.bgt-over strong { color: #c0392b !important; }

.bgt-goal { font-size: .82rem; color: #7a5c3a; font-style: italic; padding: 0 2px; }
.bgt-list { display: flex; flex-direction: column; gap: 7px; }

.bgt-item {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2.5px solid #e8dfd0; border-radius: 12px;
  padding: 11px 14px; cursor: pointer; width: 100%; text-align: left;
  transition: all .15s; font-family: inherit;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.bgt-item:hover { transform: translateX(3px); border-color: #ffd32a; }
.bgt-sel { border-color: #5b8dee; background: linear-gradient(135deg, #f0f5ff, #e8eeff); }
.bgt-item-emoji { flex-shrink: 0; font-size: 1.2rem; }
.bgt-item-label { flex: 1; font-size: .88rem; color: #2d1e0f; font-weight: 600; }
.bgt-item-tag   {
  font-size: .7rem; color: #7a5c3a; background: #f5f0e8;
  border-radius: 6px; padding: 3px 8px; font-weight: 700; border: 1px solid #e8dfd0;
}
.bgt-item-price { font-size: .9rem; font-weight: 800; color: #f0a500; flex-shrink: 0; }
.bgt-sel .bgt-item-price { color: #5b8dee; }

/* ── SLIDER ── */
.sld-income {
  background: linear-gradient(135deg, #e8fff2, #d0f5e0);
  border: 2.5px solid #4ade80; border-radius: 12px;
  padding: 12px 16px; font-size: .9rem; color: #187a40; text-align: center; font-weight: 700;
  box-shadow: 0 2px 8px rgba(74,222,128,.15);
}
.sld-income strong { font-size: 1.15rem; }

.sld-total-bar {
  background: #fff; border: 2px solid #e8dfd0; border-radius: 12px; padding: 13px 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.sld-total-label {
  display: flex; justify-content: space-between; font-size: .84rem;
  margin-bottom: 9px; color: #7a5c3a; font-weight: 700;
}
.sld-ok   { color: #16a34a; }
.sld-over { color: #c0392b; }
.sld-bar-wrap { background: #f5f0e8; border-radius: 99px; height: 10px; overflow: hidden; }
.sld-bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transition: width .3s ease; box-shadow: 0 0 8px rgba(74,222,128,.4);
}
.sld-bar-fill.sld-bar-over { background: linear-gradient(90deg, #fb923c, #ff6b6b); box-shadow: 0 0 8px rgba(255,107,107,.4); }

.sld-list { display: flex; flex-direction: column; gap: 10px; }

.sld-row {
  background: #fff; border: 2px solid #e8dfd0; border-radius: 12px;
  padding: 13px 15px; box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.sld-label { font-size: .88rem; font-weight: 700; color: #2d1e0f; margin-bottom: 9px; }
.sld-input {
  width: 100%; height: 6px; border-radius: 3px; cursor: pointer;
  -webkit-appearance: none; appearance: none; background: #e8dfd0;
  outline: none; border: none;
}
.sld-input::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%;
  background: currentColor; border: 3px solid #fff; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.sld-val {
  font-size: .82rem; font-weight: 800; color: #f0a500;
  display: block; text-align: right; margin-top: 6px;
}

/* ── Checklist (legacy) ── */
.chk-list { display: flex; flex-direction: column; gap: 7px; }
.chk-item {
  display: flex; align-items: flex-start; gap: 11px;
  background: #fff; border: 2px solid #e8dfd0; border-radius: 10px;
  padding: 11px 13px; cursor: pointer; transition: all .18s; width: 100%; text-align: left;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.chk-item:hover { border-color: #ffd32a; }
.chk-item.checked { border-color: #4ade80; background: linear-gradient(135deg, #f0fff6, #e6faf0); }
.chk-box {
  flex-shrink: 0; margin-top: 1px; width: 22px; height: 22px;
  border-radius: 6px; border: 2.5px solid #e8dfd0;
  display: flex; align-items: center; justify-content: center;
  font-size: .82rem; transition: all .18s; background: #f5f0e8;
}
.chk-item.checked .chk-box { background: #4ade80; border-color: #4ade80; color: #fff; }
.chk-lbl { font-size: .88rem; color: #2d1e0f; line-height: 1.45; font-weight: 600; }
.chk-item.checked .chk-lbl { color: #7a5c3a; text-decoration: line-through; }

/* ── Info (legacy) ── */
.info-cards { display: flex; flex-direction: column; gap: 7px; }
.info-card {
  background: #fff; border: 2px solid #e8dfd0; border-radius: 10px;
  padding: 12px 15px; font-size: .88rem; color: #2d1e0f; line-height: 1.55; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}

/* ── Quiz (legacy) ── */
.quiz-q {
  background: #fff; border: 2px solid #e8dfd0; border-radius: 12px;
  padding: 15px 16px; font-size: .95rem; font-weight: 700; color: #2d1e0f; line-height: 1.5;
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.quiz-choices { display: flex; flex-direction: column; gap: 7px; }
.quiz-btn {
  background: #fff; border: 2px solid #e8dfd0; border-radius: 10px; padding: 12px 15px;
  cursor: pointer; font-size: .88rem; color: #2d1e0f; text-align: left; width: 100%;
  display: flex; align-items: center; gap: 10px; transition: all .15s; font-family: inherit; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.quiz-btn:hover:not([disabled]) { border-color: #ffd32a; transform: translateX(3px); }
.quiz-btn.correct { border-color: #4ade80; background: linear-gradient(135deg, #f0fff6, #e6faf0); color: #187a40; }
.quiz-btn.wrong   { border-color: #ff6b6b; background: linear-gradient(135deg, #fff5f5, #ffe8e8); color: #c0392b; }
.quiz-btn[disabled] { cursor: default; }
.quiz-letter {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid currentColor; display: flex; align-items: center;
  justify-content: center; font-size: .75rem; font-weight: 800;
}
.quiz-expl {
  background: #f5f0e8; border-left: 4px solid #4ade80;
  border-radius: 0 10px 10px 0; padding: 13px 15px;
  font-size: .88rem; color: #5a3e28; line-height: 1.6; font-weight: 600;
  animation: fadein .3s ease;
}
.quiz-expl.wrong { border-left-color: #ff6b6b; }

/* ── Animations ── */
@keyframes fadein {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popin {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
