/* Asas bersama. Setiap dunia menetapkan token di worlds.css. */
:root {
  --font: ui-rounded, "SF Pro Rounded", "Lexend", "Atkinson Hyperlegible", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--font);
  --bg: #f4f7ff; --bg-art: none; --ink: #14213d; --muted: #3d4a66;
  --card: #ffffff; --card-ink: #14213d; --line: #c9d3ea;
  --accent: #1d4ed8; --accent-ink: #ffffff; --accent2: #f59e0b;
  --opt-bg: #ffffff; --opt-ink: #14213d; --opt-line: #9fb0d8; --opt-sel: #dbe6ff;
  --ok: #157f3b; --ok-bg: #e3f6e9; --hint: #8a5a00; --hint-bg: #fff4d6; --learn-bg: #eaf1ff;
  --radius: 18px; --shadow: 0 6px 20px rgba(20, 33, 61, .12);
  --viz-ink: #1b2440; --viz-paper: #ffffff; --viz-grid: #c7cfe2; --viz-fill: #4f7cff; --viz-accent: #e4572e; --viz-soft: #fff1cc;
  --viz-c1: #6aa7ff; --viz-c2: #ffb347; --viz-c3: #7ed6a5; --viz-c4: #f08bb8; --viz-c5: #b79cff; --viz-c6: #ffd84d;
  --viz-hour: #1b2440; --viz-minute: #e4572e; --viz-ruler: #ffe7a3; --viz-liquid: #5ab4ff;
  --tok-bg: #fff; --tok-ink: #14213d; --slot-bg: rgba(255, 255, 255, .7);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.q-card, .intro, .results, .t-sec, .hello, .map, .act-card, .gate-card, .side .feedback { --muted: var(--card-muted, #3d4a66); }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 19px; line-height: 1.5; color: var(--ink);
  background: var(--bg); background-image: var(--bg-art); background-attachment: fixed; min-height: 100vh; overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--font-head); line-height: 1.25; }
a { color: inherit; }
button { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 4px solid var(--focus, #ffb000); outline-offset: 3px; }
noscript { display: block; padding: 24px; font-size: 20px; }

/* ---------- butang */
.btn-main, .btn-ghost, .btn-danger, .icon-btn, .back-btn, .btn-adult, .key, .opt, .tok, .chip-add, .chip-in, .ware {
  min-height: 56px; min-width: 56px; border-radius: 14px; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.btn-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border: 0;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 20px; text-decoration: none; box-shadow: 0 4px 0 rgba(0, 0, 0, .25);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn-main:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.btn-main:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 18px; border: 2px solid var(--opt-line);
  background: var(--card); color: var(--card-ink); font-weight: 700; text-decoration: none;
}
.btn-danger { padding: 12px 22px; border: 0; background: #9b1c1c; color: #fff; font-weight: 800; }
.icon-btn { display: inline-grid; place-items: center; border: 2px solid var(--opt-line); background: var(--card); color: var(--card-ink); font-size: 24px; padding: 0 8px; }
.back-btn { display: inline-flex; align-items: center; padding: 0 16px; font-weight: 800; text-decoration: none; background: var(--card); color: var(--card-ink); border: 2px solid var(--opt-line); }
.link-btn { background: none; border: 0; padding: 8px 0; min-height: 44px; text-decoration: underline; cursor: pointer; font-weight: 700; color: inherit; }

/* ---------- pil status */
.net-pill { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border-radius: 999px; font-size: 15px; font-weight: 700; background: #e6f6ea; color: #0f5e2c; border: 2px solid #9bd3ad; }
.net-pill.off { background: #fff3db; color: #7a4a00; border-color: #e7c27a; }

/* ---------- aktiviti: rangka */
.act-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--top-bg, var(--card)); color: var(--top-ink, var(--card-ink)); box-shadow: 0 2px 10px rgba(0, 0, 0, .12); }
.act-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-weight: 800; font-family: var(--font-head); font-size: 18px; }
.act-title span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-emoji { font-size: 28px; }
.top-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.act-main { max-width: 1100px; margin: 0 auto; padding: 14px 16px 40px; position: relative; }
.act-foot { text-align: center; padding: 8px 16px 24px; }

/* intro */
.intro { display: grid; gap: 16px; background: var(--card); color: var(--card-ink); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-top: 10px; }
.intro-mascot { font-size: 84px; line-height: 1; text-align: center; animation: bob 3s ease-in-out infinite; }
.intro h1 { margin: 4px 0 8px; font-size: clamp(26px, 6vw, 38px); }
.intro-who { margin: 0; font-weight: 700; color: var(--muted); }
.intro-desc { margin: 0 0 10px; font-size: 20px; }
.codes { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.code { display: inline-block; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 16px; background: var(--opt-sel); color: var(--card-ink); border: 2px solid var(--opt-line); }
.code.sk { background: var(--card-ink); color: var(--card); border-color: var(--card-ink); }
.intro-more { margin: 6px 0; } .intro-more summary { cursor: pointer; font-weight: 800; min-height: 44px; display: flex; align-items: center; }
.sp-list { padding-left: 20px; margin: 6px 0; } .sp-list li { margin: 4px 0; }
.howto { padding: 12px 14px; border-radius: 14px; background: var(--hint-bg); color: #3b2a00; margin: 8px 0; }
.intro-meta { color: var(--muted); font-weight: 700; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; align-items: center; }
@media (min-width: 760px) { .intro { grid-template-columns: 140px 1fr; align-items: start; padding: 30px; } .intro-mascot { font-size: 110px; } }

/* paparan kemajuan */
.progress { margin: 4px 0 12px; display: grid; gap: 4px; }
.pg-label { font-weight: 800; font-size: 17px; color: var(--pg-label, var(--ink)); }

/* pentas soalan */
.stage { display: grid; gap: 14px; }
.q-card { background: var(--card); color: var(--card-ink); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.q-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: 15px; font-weight: 800; }
.q-meta span { padding: 3px 10px; border-radius: 999px; background: var(--opt-sel); border: 1.5px solid var(--opt-line); }
.q-head { display: flex; gap: 10px; align-items: flex-start; }
.q-prompt { margin: 0 0 10px; font-size: clamp(20px, 4.6vw, 25px); font-weight: 700; flex: 1; outline: none; }
.speak-btn { flex: none; min-width: 56px; min-height: 56px; border-radius: 50%; border: 2px solid var(--opt-line); background: var(--card); font-size: 22px; cursor: pointer; }
.q-visual { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; padding: 10px; border-radius: 14px; background: var(--viz-bg, transparent); overflow-x: auto; }
.q-visual > svg, .q-visual .viz { max-height: 340px; }
.viz { display: block; width: 100%; height: auto; max-width: 560px; }
.viz-clock, .viz-frac, .viz-scale, .viz-hundred, .viz-circle { max-width: 230px; }
.viz-cyl { max-width: 190px; } .viz-angle { max-width: 260px; } .viz-solid { max-width: 300px; } .viz-shape { max-width: 330px; max-height: 260px; }
.viz-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; align-items: center; }
.viz-row .viz { width: auto; max-width: 160px; flex: 1 1 110px; }
.viz-frac .part { fill: var(--viz-paper); stroke: var(--viz-ink); stroke-width: 3; }
.viz-frac .part.on { fill: var(--viz-fill); }
.viz-big { font-size: clamp(26px, 7vw, 40px); font-weight: 800; text-align: center; padding: 10px 16px; letter-spacing: .5px; }
.viz-money { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }
.viz-money .note { width: 110px; } .viz-money .coin { width: 54px; }
.viz-groups { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.viz-groups .grp { border: 2px dashed var(--opt-line); border-radius: 14px; padding: 6px 10px; font-size: 26px; max-width: 220px; text-align: center; }
.viz-groups small { display: block; font-size: 15px; font-weight: 700; }
.viz-ratio .rrow { display: flex; gap: 8px; align-items: center; font-size: 28px; flex-wrap: wrap; }
.viz-ratio .rlab { font-size: 17px; font-weight: 800; min-width: 80px; }
.viz-picto table, .viz-table table { border-collapse: collapse; background: var(--viz-paper); color: var(--viz-ink); font-size: 18px; }
.viz-picto th, .viz-picto td, .viz-table th, .viz-table td { border: 2px solid var(--viz-grid); padding: 6px 10px; text-align: left; }
@media (max-width: 480px) { .viz-table table, .viz-picto table { font-size: 16px; } .viz-table th, .viz-table td { padding: 5px 6px; } }
.viz-table td { text-align: center; }
.viz-picto caption, .viz-table caption { font-weight: 800; padding: 4px; }
.picto-icons { font-size: 26px; letter-spacing: 2px; white-space: nowrap; }
.half-icon { display: inline-block; width: .5em; overflow: hidden; vertical-align: bottom; }
.viz-picto figcaption { font-weight: 700; margin-top: 6px; }
figure { margin: 0; }
.viz-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.viz-pie .viz { max-width: 240px; }
.legend { list-style: none; padding: 0; margin: 0; font-size: 17px; }
.legend li { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.legend .sw { width: 22px; height: 22px; border-radius: 5px; border: 2px solid var(--viz-ink); }
.fr { display: inline-flex; align-items: center; gap: 4px; vertical-align: middle; margin: 0 2px; }
.fr-s { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.05; font-size: .9em; }
.fr-n { border-bottom: 2.5px solid currentColor; padding: 0 3px; }
.fr-d { padding: 0 3px; }

.side { display: grid; gap: 12px; align-content: start; }
.mascot-box { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.m-emo { font-size: 44px; }
.feedback { border-radius: 16px; padding: 0; outline: none; }
.feedback:empty { display: none; }
.feedback.good, .feedback.hint, .feedback.learn, .feedback.soft { padding: 14px 16px; border: 3px solid; }
.feedback.good { background: var(--ok-bg); border-color: var(--ok); color: #0b3d1d; }
.feedback.hint, .feedback.soft { background: var(--hint-bg); border-color: #d9a43a; color: #3b2a00; }
.feedback.learn { background: var(--learn-bg); border-color: #6b8ad6; color: #14213d; }
.fb-title { margin: 0 0 6px; font-weight: 800; font-size: 20px; }
.fb-note { margin: 0 0 6px; font-size: 16px; }
.fb-explain, .fb-hint { font-size: 18px; }
.q-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.q-actions .btn-main { flex: 1 1 200px; min-height: 64px; font-size: 21px; }
@media (min-width: 900px) {
  .stage { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .side { position: sticky; top: 90px; }
}

/* ---------- pilihan */
.opts { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 520px) { .opts-2, .opts-4 { grid-template-columns: 1fr 1fr; } .opts-3 { grid-template-columns: repeat(3, 1fr); } }
.opt {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; min-height: 64px; width: 100%;
  background: var(--opt-bg); color: var(--opt-ink); border: 3px solid var(--opt-line); font-size: 20px; font-weight: 700;
  transition: transform .12s ease, background .12s ease;
}
.opt:hover { transform: translateY(-2px); }
.opt[aria-checked="true"] { background: var(--opt-sel); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent) inset; }
.opt-key { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--card-ink); color: var(--card); font-size: 17px; font-weight: 800; }
.opt-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.opt-body .viz { max-width: 180px; max-height: 150px; }
.opt.is-answer { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 0 0 3px var(--ok) inset; }
.opt.is-wrong { border-style: dashed; opacity: .75; }
.locked .opt { cursor: default; }

/* ---------- input & papan kekunci */
.inp { display: grid; gap: 14px; }
.fields { display: grid; gap: 10px; margin: 0; padding: 0; list-style-position: inside; }
.inp-steps .fields { padding-left: 0; counter-reset: st; list-style: none; }
.inp-steps .field { counter-increment: st; }
.inp-steps .field::before { content: "Langkah " counter(st); font-weight: 800; font-size: 15px; color: var(--muted); width: 100%; }
.inp-steps .field.final::before { content: "Jawapan akhir"; color: var(--accent); }
.field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 8px 10px; border-radius: 14px; background: var(--slot-bg); border: 2px solid transparent; }
.field.waiting { opacity: .55; }
.field.f-ok { border-color: var(--ok); } .field.f-no { border-color: #c98a00; border-style: dashed; }
.f-label { font-weight: 700; font-size: 19px; }
.f-wrap { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.f-fix { font-weight: 800; font-size: 20px; }
.f-box { min-width: 110px; min-height: 56px; padding: 6px 12px; border-radius: 12px; border: 3px solid var(--opt-line); background: #fff; color: #111; font-size: 24px; font-weight: 800; text-align: center; cursor: text; letter-spacing: 1px; }
.f-box:empty::after { content: "＿"; color: #8a94ad; }
.f-box.focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(29, 78, 216, .25); }
.f-num, .f-den { min-width: 70px; min-height: 52px; }
.f-whole { min-width: 64px; }
.f-frac { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
.f-bar { width: 80px; height: 4px; background: currentColor; border-radius: 2px; }
.f-mark { font-size: 22px; }
.field.f-ok .f-mark::after { content: "✓"; color: var(--ok); font-weight: 900; }
.f-reveal { font-weight: 800; color: var(--ok); padding: 4px 10px; border-radius: 10px; background: var(--ok-bg); }
.keypad { display: grid; grid-template-columns: repeat(3, minmax(56px, 1fr)); gap: 8px; max-width: 360px; }
.key { border: 0; background: var(--key-bg, #eef2fb); color: var(--key-ink, #14213d); font-size: 26px; font-weight: 800; box-shadow: 0 3px 0 rgba(0, 0, 0, .18); min-height: 60px; }
.key:active { transform: translateY(2px); box-shadow: none; }
.key-del { background: var(--key-del, #ffe1d6); }
.key-next { grid-column: 1 / -1; font-size: 19px; background: var(--key-next, #dfe8ff); }
@media (min-width: 900px) { .inp { grid-template-columns: 1fr auto; align-items: start; } }
.locked .key, .locked .f-box { opacity: .6; cursor: default; }

/* ---------- papan slot: seret & lepas */
.board { display: grid; gap: 14px; }
.slots { display: grid; gap: 10px; }
.slots-pv { grid-template-columns: repeat(auto-fit, minmax(62px, 1fr)); }
.slots-sort { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.slots-match { grid-template-columns: 1fr; }
.slots-order { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.slots-cmp { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.cmp-side { font-size: clamp(24px, 6vw, 34px); font-weight: 800; padding: 10px 16px; border-radius: 14px; background: var(--slot-bg); }
.slot-wrap { display: flex; flex-direction: column; gap: 4px; }
.slots-match .slot-wrap { flex-direction: row; align-items: center; gap: 10px; }
.slots-match .slot-label { flex: 1; font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.slots-match .slot-label .viz { max-width: 110px; }
.slot-label { font-weight: 800; font-size: 15px; text-align: center; }
.slot { min-height: 70px; min-width: 70px; border: 3px dashed var(--opt-line); border-radius: 14px; background: var(--slot-bg); padding: 6px; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.slots-sort .slot { min-height: 130px; align-items: flex-start; }
.slot-hold { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; width: 100%; }
.has-sel .slot, .slot.over { background: var(--opt-sel); border-color: var(--accent); }
.pool-wrap { display: grid; gap: 6px; }
.pool-hint { font-size: 16px; color: var(--muted); font-weight: 600; }
.pool { display: flex; flex-wrap: wrap; gap: 10px; min-height: 76px; padding: 8px; border-radius: 14px; border: 2px solid var(--line); background: rgba(255, 255, 255, .35); }
.tok {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border: 3px solid var(--opt-line); background: var(--tok-bg); color: var(--tok-ink);
  font-size: 22px; font-weight: 800; touch-action: none; user-select: none; -webkit-user-select: none; box-shadow: 0 3px 0 rgba(0, 0, 0, .15);
}
.tok .viz { max-width: 90px; max-height: 80px; }
.tok.sel { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent); transform: translateY(-2px); }
.tok.dragging { opacity: .35; }
.tok.is-answer { border-color: var(--ok); background: var(--ok-bg); }
.tok.is-wrong { border-style: dashed; border-color: #c98a00; }
.ghost { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; opacity: .92; box-shadow: 0 12px 24px rgba(0, 0, 0, .3); margin: 0; }
.order-sep { font-weight: 900; font-size: 20px; color: var(--muted); }
.slots-order .slot { min-width: 96px; }
.slots-cmp .slot { min-width: 90px; min-height: 90px; }

/* cip & wang */
.chips { display: grid; gap: 10px; }
.chip-label { font-weight: 700; font-size: 17px; }
.chip-pal, .chip-tray { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-tray { min-height: 90px; padding: 10px; border-radius: 16px; border: 3px dashed var(--opt-line); background: var(--slot-bg); }
.chip-add, .chip-in { border: 0; background: transparent; padding: 2px; display: inline-grid; place-items: center; }
.chips-money .chip-add .note, .chips-money .chip-in .note { width: 96px; }
.chips-money .chip-add .coin, .chips-money .chip-in .coin { width: 56px; }
.pv-chip { display: inline-grid; place-items: center; min-width: 56px; min-height: 56px; padding: 0 10px; border-radius: 50%; font-weight: 900; font-size: 16px; color: #111; border: 3px solid rgba(0, 0, 0, .35); }
.pv-5 { background: #ffd166; border-radius: 14px; } .pv-4 { background: #9ad1ff; border-radius: 14px; } .pv-3 { background: #b9f6ca; } .pv-2 { background: #ffc4dd; } .pv-1 { background: #e2d4ff; }
.chip-total { font-weight: 800; font-size: 19px; }
.tray-empty { color: var(--muted); font-size: 16px; }

/* garis nombor, jam, grid */
.nline-svg { overflow-x: auto; }
.nl-interactive { touch-action: none; cursor: pointer; max-width: 100%; }
.nudge .nl-read { order: 3; flex-basis: 100%; }
.nudge, .clock-ctrls, .grid-ctrls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin-top: 8px; }
.nl-read, .clock-read, .grid-read, .shade-count, .gshade-info { font-weight: 800; text-align: center; padding: 4px 10px; }
.clockw { display: grid; justify-items: center; }
.clock-svg .viz-clock { max-width: 280px; width: 70vw; }
.clock-live { touch-action: none; cursor: grab; }
.clock-live .hand line { pointer-events: stroke; stroke-width: 14; }
.clock-live .hand.minute line { stroke-width: 10; }
.grid-svg .viz { max-width: 440px; margin: 0 auto; }
.grid-live { cursor: crosshair; touch-action: manipulation; }
.shade { display: grid; justify-items: center; gap: 8px; }
.shade-svg .viz { max-width: 230px; width: 42vw; min-width: 140px; }
.shade-rect { width: 100%; } .shade-rect .viz { max-width: 520px; width: 100%; }
.shade-target .part { cursor: pointer; fill: var(--viz-paper); transition: fill .15s; }
.shade-target .part.on { fill: var(--viz-fill); }
.shade-target .part.is-answer { stroke: var(--ok); stroke-width: 5; }
.gshade { display: grid; gap: 8px; justify-items: center; }
.gshade-grid { display: grid; gap: 0; width: min(100%, 420px); border: 3px solid var(--viz-ink); background: var(--viz-paper); }
.gcell { aspect-ratio: 1; min-width: 0; min-height: 0; border: 1px solid var(--viz-grid); background: var(--viz-paper); cursor: pointer; padding: 0; }
.gcell.on { background: var(--viz-fill); }
.gcell.is-answer { box-shadow: inset 0 0 0 4px var(--ok); }
.barb-ctrls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.barb-ctrl { display: flex; align-items: center; gap: 6px; font-weight: 800; padding: 4px 8px; border-radius: 12px; background: var(--slot-bg); }
.barb-svg svg { touch-action: none; max-width: 520px; margin: 0 auto; }
.bb-hit { cursor: ns-resize; }

/* kedai */
.shop { display: grid; gap: 12px; }
@media (min-width: 760px) { .shop { grid-template-columns: 1.4fr 1fr; } }
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.ware { display: grid; justify-items: center; gap: 2px; padding: 10px 6px; border: 3px solid var(--opt-line); background: var(--opt-bg); color: var(--opt-ink); }
.ware-emo { font-size: 34px; } .ware-name { font-weight: 700; font-size: 17px; text-align: center; }
.ware-tag { font-weight: 900; background: var(--accent2); color: #1d1300; border-radius: 8px; padding: 0 8px; }
.basket { border: 3px dashed var(--opt-line); border-radius: 16px; padding: 10px; background: var(--slot-bg); display: grid; gap: 6px; align-content: start; }
.basket-title { font-weight: 900; }
.bask-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-weight: 700; }

/* fx */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; overflow: hidden; }
.fx { position: absolute; bottom: 20%; font-size: 46px; }
.fx-rise { animation: fx-rise 1.3s ease-out forwards; }
.fx-spin { animation: fx-spin 1.2s ease-out forwards; }
.fx-pop { animation: fx-pop 1.1s ease-out forwards; }
.fx-fall { top: 0; bottom: auto; animation: fx-fall 1.4s ease-in forwards; }
.fx-glow { animation: fx-glow 1.3s ease-out forwards; }
.fx-dash { animation: fx-dash 1.2s ease-in-out forwards; }
.fx-bounce { animation: fx-bounce 1.2s ease-out forwards; }
.fx-sparkle { animation: fx-sparkle 1.3s ease-out forwards; }
.fx-stamp { animation: fx-stamp 1.2s ease-out forwards; }
.fx-zoom { animation: fx-zoom 1.2s ease-out forwards; }
.fx-grow { animation: fx-grow 1.3s ease-out forwards; }
.fx-drop { top: 0; bottom: auto; animation: fx-drop 1.2s cubic-bezier(.3, 1.4, .6, 1) forwards; }
@keyframes fx-rise { from { transform: translateY(0); opacity: 1; } to { transform: translateY(-60vh); opacity: 0; } }
@keyframes fx-spin { from { transform: rotate(0) scale(.6); opacity: 1; } to { transform: rotate(360deg) scale(1.3) translateY(-30vh); opacity: 0; } }
@keyframes fx-pop { 0% { transform: scale(.2); opacity: 0; } 40% { transform: scale(1.3) translateY(-20vh); opacity: 1; } 100% { transform: scale(1.6) translateY(-40vh); opacity: 0; } }
@keyframes fx-fall { from { transform: translateY(-10vh) rotate(0); opacity: 1; } to { transform: translateY(80vh) rotate(200deg); opacity: 0; } }
@keyframes fx-glow { 0% { transform: scale(.5); opacity: 0; filter: drop-shadow(0 0 0 gold); } 50% { opacity: 1; filter: drop-shadow(0 0 18px gold); transform: translateY(-20vh) scale(1.2); } 100% { opacity: 0; transform: translateY(-35vh); } }
@keyframes fx-dash { from { transform: translateX(-60vw); opacity: 1; } to { transform: translateX(80vw); opacity: 0; } }
@keyframes fx-bounce { 0% { transform: translateY(0); } 30% { transform: translateY(-25vh); } 60% { transform: translateY(-5vh); } 100% { transform: translateY(-30vh); opacity: 0; } }
@keyframes fx-sparkle { 0% { transform: scale(0) rotate(0); opacity: 0; } 50% { transform: scale(1.4) rotate(90deg) translateY(-20vh); opacity: 1; } 100% { transform: scale(.4) rotate(180deg) translateY(-40vh); opacity: 0; } }
@keyframes fx-stamp { 0% { transform: scale(3); opacity: 0; } 30% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10vh); } }
@keyframes fx-zoom { 0% { transform: scale(.2) translateY(0); opacity: 0; } 40% { opacity: 1; } 100% { transform: scale(1.8) translateY(-40vh); opacity: 0; } }
@keyframes fx-grow { 0% { transform: scale(0); transform-origin: bottom; } 60% { transform: scale(1.4); } 100% { transform: scale(1.2) translateY(-20vh); opacity: 0; } }
@keyframes fx-drop { from { transform: translateY(-20vh); opacity: 1; } 70% { transform: translateY(55vh); opacity: 1; } to { transform: translateY(55vh); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* keputusan */
.results { background: var(--card); color: var(--card-ink); border-radius: var(--radius); padding: 24px 18px; box-shadow: var(--shadow); text-align: center; display: grid; gap: 10px; justify-items: center; margin-top: 10px; }
.res-mascot { font-size: 80px; animation: bob 3s ease-in-out infinite; }
.results h1 { margin: 0; font-size: clamp(26px, 6vw, 36px); outline: none; }
.score-big { font-size: 30px; font-weight: 800; } .score-big b { font-size: 76px; line-height: 1; color: var(--accent-strong, var(--accent)); }
.res-count { margin: 0; font-weight: 800; font-size: 20px; }
.res-stars { font-size: 46px; color: #e0a100; letter-spacing: 6px; }
.badge { display: inline-flex; flex-direction: column; align-items: center; padding: 14px 22px; border-radius: 50% / 40%; background: radial-gradient(circle, #fff 30%, #dfe7ff); border: 5px solid #8aa2e6; }
.badge span { font-size: 48px; } .badge small { font-weight: 800; font-size: 15px; max-width: 160px; }
.badge.gold { background: radial-gradient(circle, #fffbe0 30%, #ffe28a); border-color: #d9a400; }
.res-grid { display: grid; gap: 12px; width: 100%; text-align: left; }
@media (min-width: 700px) { .res-grid { grid-template-columns: 1fr 1fr; } }
.res-box { border-radius: 16px; padding: 12px 16px; border: 3px solid; }
.res-box h2 { margin: 0 0 6px; font-size: 20px; } .res-box ul { margin: 0; padding-left: 20px; }
.res-box.ok { border-color: var(--ok); background: var(--ok-bg); color: #0b3d1d; }
.res-box.rev { border-color: #d9a43a; background: var(--hint-bg); color: #3b2a00; }
.res-review { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; justify-content: center; }
.res-review li { min-width: 56px; padding: 6px 8px; border-radius: 10px; font-weight: 800; display: flex; gap: 4px; justify-content: center; }
.res-review .ok { background: var(--ok-bg); color: #0b3d1d; } .res-review .rev { background: var(--hint-bg); color: #3b2a00; }

/* papan conteng, toast, gerbang */
.scratch { position: fixed; inset: 0; z-index: 200; background: rgba(255, 255, 250, .96); display: flex; flex-direction: column; }
.scratch-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px 12px; background: #fff; border-bottom: 2px solid #ccd; color: #14213d; }
.scratch-bar b { flex: 1; }
.scratch-cv { flex: 1; width: 100%; touch-action: none; background-image: linear-gradient(#e6ebf5 1px, transparent 1px), linear-gradient(90deg, #e6ebf5 1px, transparent 1px); background-size: 28px 28px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 150%); background: #14213d; color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; z-index: 300; max-width: calc(100vw - 32px); transition: transform .3s; }
.toast.show { transform: translate(-50%, 0); }
.gate { position: fixed; inset: 0; z-index: 250; background: rgba(10, 16, 32, .6); display: grid; place-items: center; padding: 16px; }
.gate-card { background: #fff; color: #14213d; border-radius: 20px; padding: 24px; max-width: 440px; width: 100%; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.gate-card h2 { margin-top: 0; }
.gate-q { font-size: 24px; font-weight: 800; margin: 8px 0 0; }
.gate-small { margin: 0 0 10px; color: #444; font-size: 16px; }
.gate-input { font: inherit; font-size: 26px; padding: 10px 14px; border-radius: 12px; border: 3px solid #9fb0d8; width: 100%; min-height: 56px; }
.gate-msg { color: #7a4a00; font-weight: 700; min-height: 1.5em; }

/* ---------- papan pemuka */
.home-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 14px 16px; max-width: 1180px; margin: 0 auto; }
.brand { display: flex; gap: 12px; align-items: center; min-width: 0; }
.brand-logo { font-size: 50px; line-height: 1; }
.brand h1 { margin: 0; font-size: clamp(24px, 6vw, 36px); }
.kssr { margin: 0; font-weight: 800; font-size: 15px; display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--card); color: var(--card-ink); }
.btn-adult { padding: 0 14px; border: 2px solid var(--opt-line); background: var(--card); color: var(--card-ink); font-weight: 800; }
#main { max-width: 1180px; margin: 0 auto; padding: 0 16px 30px; }
.hello { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; background: var(--card); color: var(--card-ink); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.avatar { font-size: 56px; width: 80px; height: 80px; display: grid; place-items: center; border-radius: 50%; background: var(--opt-sel); }
.hello-hi { margin: 0; font-size: 22px; } .hello-sub { margin: 0; color: var(--muted); }
.stats { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.stat { display: grid; justify-items: center; padding: 8px 14px; border-radius: 14px; background: var(--opt-sel); min-width: 110px; }
.stat b { font-size: 26px; } .stat small { font-weight: 700; }
.suggest { display: flex; align-items: center; gap: 12px; margin: 14px 0; padding: 14px 16px; border-radius: var(--radius); text-decoration: none; background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); min-height: 72px; }
.suggest small { display: block; font-weight: 700; opacity: .95; } .suggest b { font-size: 21px; }
.sg-emo { font-size: 40px; } .sg-go { margin-left: auto; font-size: 30px; font-weight: 900; }
.map { background: var(--card); color: var(--card-ink); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); margin-bottom: 16px; }
.map h2, .cards h2 { margin: 4px 0 10px; font-size: 24px; }
.map-svg svg { width: 100%; height: auto; display: block; }
.map-path { fill: none; stroke: var(--map-path, #8a6d3b); stroke-width: 6; stroke-dasharray: 2 12; stroke-linecap: round; }
.map-node circle { fill: var(--map-todo, #fff); stroke: var(--map-ink, #333); stroke-width: 4; }
.map-node text { fill: var(--map-ink, #222); }
.map-node.done circle { fill: var(--map-done, #9be3b4); }
.map-node.gold circle { fill: #ffd54a; }
.map-stars { fill: #b07a00 !important; }
.card-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.act-card { position: relative; display: grid; grid-template-columns: 56px 1fr; grid-template-areas: "emo body" "emo status"; gap: 4px 12px; padding: 14px; min-height: 120px; border-radius: var(--radius); text-decoration: none; background: var(--card); color: var(--card-ink); box-shadow: var(--shadow); border: 3px solid var(--opt-line); transition: transform .15s; }
.act-card:hover { transform: translateY(-3px); }
.ac-num { position: absolute; top: 8px; right: 10px; font-weight: 900; font-size: 15px; opacity: .8; }
.ac-emo { grid-area: emo; font-size: 46px; align-self: center; }
.ac-body { grid-area: body; display: grid; gap: 2px; padding-right: 22px; }
.ac-title { font-size: 19px; } .ac-desc { font-size: 16px; } .ac-codes { font-size: 14px; font-weight: 800; opacity: .9; }
.ac-status { grid-area: status; font-weight: 800; font-size: 15px; }
.home-foot { text-align: center; padding: 10px 16px 30px; font-size: 16px; }

/* ---------- Zon Guru & seni bina */
.teacher { color: var(--ink); }
.t-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding: 14px 0; }
.t-head h1 { flex: 1; margin: 0; font-size: clamp(22px, 5vw, 32px); }
.t-sec { background: var(--card); color: var(--card-ink); border-radius: var(--radius); padding: 16px; margin: 0 0 16px; box-shadow: var(--shadow); }
.t-sec h2 { margin-top: 0; }
.t-sec h3 { margin: 18px 0 6px; }
.t-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.t-kpi { padding: 10px 12px; border-radius: 12px; background: var(--opt-sel); display: grid; }
.t-kpi small { font-weight: 700; } .t-kpi b { font-size: 21px; }
.t-note { color: var(--muted); font-size: 16px; }
.t-table-wrap { overflow-x: auto; max-width: 100%; }
.t-table { border-collapse: collapse; width: 100%; font-size: 16px; min-width: 560px; }
.t-table th, .t-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.t-table thead th { background: var(--opt-sel); position: sticky; top: 0; }
.t-toggle { display: flex; align-items: center; gap: 10px; min-height: 56px; font-weight: 700; }
.t-toggle input { width: 28px; height: 28px; }
.t-follow li { margin: 6px 0; }
.arch pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 12px; overflow-x: auto; font-size: 14px; line-height: 1.45; max-width: 100%; }
.arch code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.arch .diagram svg { width: 100%; height: auto; max-width: 900px; }
.wire-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.wire-grid figure { text-align: center; } .wire-grid svg { width: 100%; max-width: 240px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { padding: 8px 12px; border-radius: 999px; background: var(--opt-sel); font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
@media print { .no-print, .act-top, .net-pill { display: none !important; } body { background: #fff; } .t-sec { box-shadow: none; border: 1px solid #ccc; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .fx-layer { display: none; }
}
