/* ECOTRIP – gaya visual.
   Arah: desa kartun hangat mengikuti art klien (kayu, kertas krem, daun hijau, merah Zara).
   Panggung tetap 1600x900, diskalakan ke layar. Zona tata letak:
   atas 0-112 (tombol Kembali, judul, HUD) · isi 120-770 · bawah 780-890 (gelembung petunjuk). */
:root {
  --paper: #fffaf0;
  --paper-2: #f7ecd6;
  --paper-3: #efdcb8;
  --ink: #4a2c12;
  --ink-soft: #7b5a3a;
  --head: #7a3b12;
  --wood: #8b5a2b;
  --wood-l: #b07a43;
  --wood-d: #5e3a17;
  --line: #e2a35a;
  --leaf: #4f9d2c;
  --leaf-d: #2f6b1a;
  --sun: #f7c63c;
  --sun-d: #c48b10;
  --berry: #c8323a;
  --ok: #3f9c35;
  --ok-bg: #e4f5dc;
  --warn: #e0a320;
  --warn-bg: #fff3cf;
  --bad: #d9473f;
  --bad-bg: #fde4e0;
  --lift: 0 8px 0 rgba(94, 58, 23, .55), 0 18px 36px rgba(40, 20, 0, .28);
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --i-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round'/%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.5' fill='white'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1d1a14; overflow: hidden; }
body { font-family: "Nunito", system-ui, sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible { outline: 5px solid var(--sun); outline-offset: 4px; }
img { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
body { touch-action: manipulation; }
.ico { display: inline-flex; width: 1em; height: 1em; flex: none; }
.ico svg { width: 100%; height: 100%; }

#wrap { position: fixed; inset: 0; display: grid; place-items: center; }
#stage { position: absolute; left: 50%; top: 50%; width: 1600px; height: 900px; transform-origin: 0 0; overflow: hidden; background: #2a3a1c; user-select: none; }
#scene, #overlay { position: absolute; inset: 0; }
#overlay { pointer-events: none; }
#overlay > * { pointer-events: auto; }

.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.abs { position: absolute; }
.fade-in { animation: fadeIn .45s ease both; }
.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes fadeIn { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: scale(.7) } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) } }
@keyframes bob { 50% { transform: translateY(-10px) } }
@keyframes shake { 20%, 60% { transform: translateX(-12px) } 40%, 80% { transform: translateX(12px) } }
.shake { animation: shake .4s; }
@keyframes pulse { 50% { transform: scale(1.05); filter: brightness(1.1) drop-shadow(0 0 14px rgba(255, 220, 90, .9)) } }
.pulse { animation: pulse 1.3s ease-in-out infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: translateX(0) } 80% { transform: translateX(6px) } 90% { transform: translateX(-2px) } }

/* ---------- HUD ---------- */
#hud { position: absolute; top: 18px; right: 22px; display: flex; gap: 12px; z-index: 40; }
.hud-btn { display: flex; align-items: center; gap: 10px; height: 66px; padding: 0 24px 0 18px; border-radius: 22px; background: var(--paper); border: 4px solid var(--wood); color: var(--wood-d); font: 600 25px Fredoka; box-shadow: 0 5px 0 var(--wood-d), 0 10px 20px rgba(0, 0, 0, .25); transition: transform .12s; }
.hud-btn .ico { font-size: 32px; color: var(--berry); }
.hud-btn.round { width: 66px; padding: 0; justify-content: center; border-radius: 50%; }
.hud-btn.round .ico { color: var(--wood-d); font-size: 34px; }
.hud-btn:hover { transform: translateY(-2px); }
.hud-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--wood-d), 0 6px 12px rgba(0, 0, 0, .25); }
.hud-btn[hidden] { display: none; }
.hud-btn.glow { background: #fff1b8; animation: pulse 1.1s ease-in-out infinite; }
.new-dot { width: 16px; height: 16px; border-radius: 50%; background: var(--berry); border: 3px solid #fff; margin-left: 2px; }

/* ---------- Gelembung dialog ---------- */
#dialog { position: absolute; left: 0; right: 0; bottom: 30px; z-index: 30; display: flex; justify-content: center; pointer-events: none; }
#dialog[hidden] { display: none; }
#dialog .bubble { pointer-events: auto; }
.bubble { position: relative; width: 1080px; min-height: 170px; margin-left: 330px; padding: 48px 46px 34px; background: var(--paper); border: 6px solid var(--line); border-radius: 34px; box-shadow: 0 8px 0 rgba(176, 110, 40, .45), 0 18px 40px rgba(0, 0, 0, .3); animation: rise .35s cubic-bezier(.2, 1.2, .4, 1) both; }
.bubble .tag { position: absolute; top: -30px; left: 38px; padding: 5px 28px 7px; border-radius: 20px; background: var(--berry); color: #fff; font: 600 30px Fredoka; box-shadow: inset 0 -4px rgba(0, 0, 0, .18), 0 4px 0 rgba(0, 0, 0, .15); }
.bubble .txt { margin: 0; font: 800 29px/1.48 Nunito; color: var(--ink); min-height: 84px; }
.bubble .txt .rest { opacity: 0; }
.bubble .ava { display: none; }
/* ekor gelembung: ke kiri (Zara di kiri) */
.bubble::before, .bubble::after { content: ""; position: absolute; width: 0; height: 0; border-style: solid; border-color: transparent; }
.bubble::before { left: -40px; top: 42px; border-width: 22px 40px 22px 0; border-right-color: var(--line); }
.bubble::after { left: -28px; top: 48px; border-width: 16px 30px 16px 0; border-right-color: var(--paper); }
/* tokoh warga: kartu di kanan atas, ekor ke atas-kanan */
.bubble.npc { margin-left: 0; margin-right: 400px; }
.bubble.npc::before { left: auto; right: 70px; top: -42px; border-width: 0 22px 42px 22px; border-color: transparent transparent var(--line); }
.bubble.npc::after { left: auto; right: 76px; top: -30px; border-width: 0 16px 32px 16px; border-color: transparent transparent var(--paper); }
.bubble.wide { margin-left: 0; margin-right: 0; }
.bubble.wide::before, .bubble.wide::after { display: none; }
/* Zara berbicara tapi tidak ada di layar: wajahnya tampil di pojok gelembung */
.bubble.has-ava { margin-left: 70px; padding-left: 96px; }
.bubble.has-ava::before, .bubble.has-ava::after { display: none; }
.bubble.has-ava .ava { display: block; position: absolute; left: -64px; top: -46px; width: 136px; height: 136px; border-radius: 50%; border: 6px solid #fff; box-shadow: 0 0 0 5px var(--line), 0 10px 20px rgba(0, 0, 0, .3); background: #ffecc8; }
.bubble.has-ava .tag { left: 92px; }
/* gelembung petunjuk (tidak perlu diklik, hilang sendiri) */
.bubble.toast { width: auto; max-width: 1100px; min-width: 520px; min-height: 0; padding: 32px 34px 20px; border-width: 5px; }
.bubble.toast .tag { top: -24px; font-size: 23px; padding: 2px 20px 4px; }
.bubble.toast .txt { font-size: 24px; min-height: 0; }
.bubble.toast.has-ava { padding-left: 74px; margin-left: 60px; }
.bubble.toast.has-ava .ava { width: 100px; height: 100px; left: -50px; top: -30px; border-width: 5px; box-shadow: 0 0 0 4px var(--line), 0 8px 16px rgba(0, 0, 0, .3); }
.bubble.toast.has-ava .tag { left: 66px; }
.bubble.toast::before { top: 26px; border-width: 16px 30px 16px 0; left: -30px; }
.bubble.toast::after { top: 31px; border-width: 11px 22px 11px 0; left: -20px; }
.bubble.toast.npc::before, .bubble.toast.npc::after, .bubble.toast.wide::before, .bubble.toast.wide::after, .bubble.toast.has-ava::before, .bubble.toast.has-ava::after { display: none; }
#dialog.low { bottom: 14px; }
/* petunjuk saat Zara ada di layar: menempel di samping Zara */
.bubble.toast:not(.has-ava):not(.npc):not(.wide) { margin-left: 425px; margin-right: auto; }
.bubble .next { position: absolute; right: 28px; bottom: -30px; display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 22px 0 28px; border-radius: 20px; background: linear-gradient(#69b93f, #3f8a26); color: #fff; font: 600 26px Fredoka; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); box-shadow: 0 5px 0 var(--leaf-d), 0 10px 18px rgba(0, 0, 0, .25); border: 4px solid #fff; opacity: 0; transform: scale(.8); transition: opacity .2s, transform .2s; pointer-events: none; }
.bubble .next .ico { font-size: 24px; }
.bubble.done .next { opacity: 1; transform: none; pointer-events: auto; }
.bubble.done .next .ico { animation: nudge 1.8s 1s ease-in-out infinite; }
.bubble .next:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--leaf-d); }

/* ---------- Tokoh ---------- */
.zara { position: absolute; transform-origin: 50% 100%; pointer-events: none; filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .25)); }
.zara img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.zara.talking { animation: talkbob .5s ease-in-out infinite; }
@keyframes talkbob { 50% { transform: translateY(-4px) rotate(-.6deg) } }
.npc-talk { animation: talkbob .5s ease-in-out infinite; transform-origin: 50% 100%; }

/* ---------- Tombol gambar (aset klien) ---------- */
.imgbtn { position: absolute; transition: transform .15s, filter .15s; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }
.imgbtn img { width: 100%; display: block; }
.imgbtn:hover { transform: scale(1.05); filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35)) brightness(1.06); }
.imgbtn:active { transform: scale(.97); }
.imgbtn.locked { cursor: not-allowed; }
.imgbtn.locked img { filter: grayscale(.9) brightness(.8); }
.imgbtn.locked:hover { transform: none; }
.imgbtn.done::after, .imgbtn.locked::after, .badge { content: ""; position: absolute; right: -14px; top: -16px; width: 56px; height: 56px; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); background: var(--ok) var(--i-check) center / 64% no-repeat; }
.imgbtn.locked::after { background-color: var(--wood-d); background-image: var(--i-lock); background-size: 56%; }
.imgbtn.hint { animation: pulse 1.3s ease-in-out infinite; }

/* ---------- Tombol teks ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 76px; padding: 0 36px; border-radius: 22px; background: linear-gradient(#6cbf3f, #3f8a26); color: #fff; font: 600 30px Fredoka; border: 4px solid #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); box-shadow: 0 6px 0 var(--leaf-d), 0 12px 22px rgba(0, 0, 0, .28); transition: transform .12s, box-shadow .12s, filter .12s; white-space: nowrap; }
.btn .ico { font-size: 30px; }
.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.06); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 2px 0 var(--leaf-d), 0 6px 12px rgba(0, 0, 0, .25); }
.btn:disabled { background: #d7cbb4; color: #fffaf0; text-shadow: none; box-shadow: 0 6px 0 #a99a7e; cursor: not-allowed; }
.btn.alt { background: linear-gradient(#ffd85c, #f0b323); color: var(--ink); text-shadow: none; box-shadow: 0 6px 0 var(--sun-d), 0 12px 22px rgba(0, 0, 0, .28); }
.btn.alt:active:not(:disabled) { box-shadow: 0 2px 0 var(--sun-d); }
.btn.red { background: linear-gradient(#e2584f, #b8322b); box-shadow: 0 6px 0 #7d1a1f, 0 12px 22px rgba(0, 0, 0, .28); }
.btn.red .ico { color: var(--sun); }
.btn.sm { height: 58px; padding: 0 24px; font-size: 23px; border-width: 3px; }
.btn.sm .ico { font-size: 24px; }
.btn.wrap { white-space: normal; height: auto; min-height: 76px; padding: 12px 36px; line-height: 1.2; text-align: center; }

/* ---------- Papan & panel ---------- */
.board { position: relative; background: var(--paper); border: 16px solid var(--wood); border-radius: 22px; box-shadow: inset 0 0 0 4px #d6a76d, inset 0 0 0 10px var(--paper), inset 0 0 0 12px #efd9b2, 0 10px 0 rgba(60, 30, 5, .45), 0 22px 44px rgba(0, 0, 0, .32); padding: 64px 60px 44px; }
.board .title { position: absolute; top: -42px; left: 50%; transform: translateX(-50%); padding: 6px 44px 10px; white-space: nowrap; background: linear-gradient(#73b148, #3f8a26); color: #fff; font: 600 38px Fredoka; text-shadow: 0 3px 0 rgba(0, 0, 0, .22); border-radius: 16px; border: 4px solid #fff; box-shadow: 0 0 0 4px var(--leaf-d), 0 8px 0 rgba(0, 0, 0, .2); }
.board p { font: 800 29px/1.55 Nunito; margin: 0 0 18px; }
.board p:last-of-type { margin-bottom: 0; }
.board p b { color: var(--head); }
.board .foot { display: flex; justify-content: center; margin-top: 30px; }
.center-box { position: absolute; display: flex; align-items: center; justify-content: center; }
.center-box > * { width: 100%; }

.panel { position: absolute; background: var(--paper); border: 6px solid #c98d4e; border-radius: 30px; box-shadow: inset 0 0 0 4px #fff3dc, var(--lift); padding: 30px 40px 34px; }
.panel h2 { margin: 0 0 16px; font: 600 38px/1.2 Fredoka; color: var(--head); }
.panel h3 { margin: 0 0 10px; font: 600 28px Fredoka; color: var(--head); }
.panel-head { display: flex; align-items: center; gap: 20px; margin-bottom: 16px; }
.panel-head > div:first-child { flex: 1; min-width: 0; }
.panel-head h2 { margin: 0; }
.panel-foot { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin-top: 24px; }
.stage-tag { display: inline-flex; align-items: center; gap: 10px; padding: 5px 18px 6px; border-radius: 14px; background: var(--wood); color: #fff; font: 800 20px Nunito; margin-bottom: 10px; }
.stage-tag i { font-style: normal; opacity: .75; }
.ok-msg { display: flex; align-items: center; gap: 12px; color: var(--ok); font: 600 32px Fredoka; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.ok-msg .ico { width: 44px; height: 44px; padding: 8px; border-radius: 50%; background: var(--ok); color: #fff; }

.signboard { position: absolute; left: 50%; transform: translateX(-50%); top: 16px; padding: 6px 64px 12px; background: radial-gradient(circle at 22px 50%, #4b2c10 0 5px, transparent 6px), radial-gradient(circle at calc(100% - 22px) 50%, #4b2c10 0 5px, transparent 6px), repeating-linear-gradient(180deg, rgba(255, 255, 255, .07) 0 3px, transparent 3px 11px), linear-gradient(#a8733d, #7d4c1f); border: 5px solid var(--wood-d); border-radius: 18px; color: #fff; font: 600 54px Fredoka; text-shadow: 0 4px 0 rgba(0, 0, 0, .28); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .2), 0 8px 0 rgba(0, 0, 0, .25), 0 14px 26px rgba(0, 0, 0, .25); white-space: nowrap; }
.signboard.sm { font-size: 40px; padding: 4px 56px 9px; }
.instr { position: absolute; left: 50%; transform: translateX(-50%); padding: 16px 40px 18px; background: var(--paper); border: 5px solid #d9b07a; border-radius: 24px; font: 800 27px/1.4 Nunito; text-align: center; box-shadow: 0 6px 0 rgba(150, 100, 45, .45), 0 14px 26px rgba(0, 0, 0, .22); }
.instr b { color: var(--berry); }
.instr.pop, .signboard.pop { animation: popx .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes popx { from { opacity: 0; transform: translateX(-50%) scale(.7) } }
.instr.point { left: auto; right: 30px; transform: none; text-align: left; }
.instr.point::before { content: ""; position: absolute; top: -30px; right: 150px; border: solid transparent; border-width: 0 18px 28px; border-bottom-color: #d9b07a; }
.instr.point.pop { animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }

/* ---------- Kartu tokoh ---------- */
.card { position: absolute; width: 330px; transition: transform .2s; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .32)); }
.card img { width: 100%; display: block; border-radius: 22px; }
.card:hover { transform: translateY(-10px) scale(1.03); }
.card .badge { right: -16px; top: -16px; width: 62px; height: 62px; }
.card .label, .npc-card .label { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 10px 16px; border-radius: 0 0 22px 22px; background: linear-gradient(#a26d38, #7a4a1e); color: #fff; text-align: center; border-top: 4px solid var(--wood-d); }
.card .label b, .npc-card .label b { display: block; font: 600 32px Fredoka; }
.card .label span, .npc-card .label span { display: block; font: 800 20px Nunito; }
.card .label i, .npc-card .label i { display: block; font: 700 16px Nunito; font-style: normal; opacity: .9; }
.card.unseen::before { content: "Klik aku!"; position: absolute; left: 50%; top: -24px; transform: translateX(-50%); z-index: 2; padding: 4px 18px 6px; border-radius: 14px; background: var(--sun); color: var(--ink); font: 600 22px Fredoka; border: 3px solid #fff; box-shadow: 0 4px 0 var(--sun-d); white-space: nowrap; }
.npc-card { position: absolute; width: 340px; transform: rotate(3deg); pointer-events: none; filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .35)); }
.npc-card img { width: 100%; display: block; border-radius: 22px; }
.masalah-tag { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 22px; padding: 22px 56px 24px 40px; background: linear-gradient(#e0473f, #b8292f); color: #fff; font: 600 54px Fredoka; text-shadow: 0 4px 0 rgba(0, 0, 0, .25); border-radius: 28px; border: 6px solid #fff; box-shadow: 0 10px 0 #7d1a1f, 0 24px 50px rgba(0, 0, 0, .4); z-index: 20; animation: pop .4s cubic-bezier(.2, 1.4, .4, 1) both; white-space: nowrap; }
.masalah-tag .ico { font-size: 66px; color: var(--sun); }
.masalah-tag small { display: block; font: 800 24px Nunito; text-shadow: none; opacity: .9; }

/* ---------- Tahap 1: isian ---------- */
.fill { font: 800 30px/2.15 Nunito; }
.slot { display: inline-block; min-width: 240px; height: 58px; vertical-align: middle; margin: 0 6px; border: 4px dashed #c99a62; border-radius: 16px; background: #fffdf6; line-height: 50px; padding: 0 16px; text-align: center; color: var(--ink-soft); transition: background .15s, border-color .15s; }
.slot.hover { background: var(--warn-bg); border-color: var(--warn); border-style: solid; }
.slot.ok { border-style: solid; border-color: var(--ok); background: var(--ok-bg); color: var(--ink); animation: pop .35s both; }
.chip-tray { margin-top: 30px; padding: 22px 24px 26px; border-radius: 22px; background: var(--paper-2); }
.chip-tray h3 { margin: 0 0 16px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.chip { padding: 14px 26px; border-radius: 18px; background: #fff; border: 4px solid #d6b483; font: 800 27px Nunito; box-shadow: 0 6px 0 #c9a46d; cursor: grab; touch-action: none; position: relative; z-index: 2; transition: box-shadow .12s; }
.chip:hover { border-color: var(--warn); }
.chip.dragging { cursor: grabbing; z-index: 50; box-shadow: 0 16px 26px rgba(0, 0, 0, .28); transition: none; }
.chip.gone { visibility: hidden; }
.tray-tip { margin: 14px 0 0; text-align: center; font: 700 19px Nunito; color: var(--ink-soft); }
/* klik-taruh */
.picked { border-color: var(--sun) !important; background: #fffbe6 !important; box-shadow: 0 0 0 5px rgba(247, 198, 60, .65), 0 6px 0 #c9a46d !important; transform: translateY(-5px); z-index: 5; }
.can-drop { border-color: var(--warn) !important; border-style: solid !important; background: var(--warn-bg) !important; cursor: pointer; }
.board.skippable { cursor: pointer; }

/* ---------- Pilihan ganda ---------- */
.choice { display: flex; align-items: center; gap: 20px; width: 100%; text-align: left; padding: 16px 24px 16px 16px; margin: 14px 0 0; border-radius: 22px; background: #fff; border: 4px solid #d6b483; font: 800 27px/1.35 Nunito; box-shadow: 0 6px 0 #c9a46d; transition: transform .15s, background .15s, border-color .15s; }
.choice .key { flex: none; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--paper-3); color: var(--head); font: 600 30px Fredoka; }
.choice:hover:not(:disabled) { background: #fff6dc; border-color: var(--warn); transform: translateY(-2px); }
.choice.ok { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 6px 0 #8cc57d; }
.choice.ok .key { background: var(--ok); color: #fff; }
.choice.bad { border-color: var(--bad); background: var(--bad-bg); }
.choice.bad .key { background: var(--bad); color: #fff; }
.choice:disabled { cursor: default; }
.choice:disabled:not(.ok) { opacity: .55; }

/* ---------- Tahap 2: rencana & koin ---------- */
.coins { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 26px 0 10px; background: var(--paper-2); border: 4px solid var(--sun-d); border-radius: 40px; font: 600 30px Fredoka; color: var(--ink); white-space: nowrap; transition: background .3s; }
.coins.low { background: var(--bad-bg); border-color: var(--bad); }
.coin { width: 48px; height: 48px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6b8, #f7c63c 45%, #c88a12); border: 3px solid #a86d0b; display: grid; place-items: center; font: 600 24px Fredoka; color: #6e4300; flex: none; }
.coin.sm { width: 40px; height: 40px; font-size: 21px; }
.plan-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-col { background: #fff; border-radius: 22px; border: 4px solid #e2c99b; padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 9px; }
.plan-col h3 { margin: 0 0 2px; font-size: 25px; }
.plan-col .m, .grade { font: 700 17px/1.4 Nunito; border-radius: 14px; padding: 9px 13px; min-height: 112px; }
.plan-col .m { background: var(--paper-2); color: var(--ink-soft); }
.grade b { display: flex; align-items: center; gap: 8px; font: 600 22px Fredoka; margin-bottom: 2px; }
.grade.sangat { background: var(--ok-bg); border: 3px solid var(--ok); }
.grade.sangat b { color: #2c6e23; }
.grade.kurang { background: var(--warn-bg); border: 3px solid var(--warn); }
.grade.kurang b { color: #8a5d00; }
.grade.tidak { background: var(--bad-bg); border: 3px solid var(--bad); }
.grade.tidak b { color: #a12b25; }
.opt { text-align: left; padding: 9px 12px; border-radius: 16px; background: #fffdf8; border: 4px solid #e2c99b; font: 800 19px/1.28 Nunito; display: flex; gap: 12px; align-items: center; min-height: 74px; transition: background .15s, border-color .15s, opacity .15s; }
.opt:hover:not(:disabled) { background: #fff6dc; border-color: var(--warn); }
.opt.sel { border-color: var(--leaf); background: #e7f5df; box-shadow: 0 0 0 4px #b9e0a5; }
.opt:disabled:not(.sel), .opt.cant { opacity: .45; cursor: not-allowed; }
.opt:disabled { cursor: default; }
.coins.warn { background: var(--bad-bg); border-color: var(--bad); animation: shake .4s; }

/* ---------- Tahap 3: susun langkah ---------- */
.note { display: inline-flex; align-items: center; gap: 10px; padding: 9px 20px; background: var(--warn-bg); border: 3px dashed var(--warn); border-radius: 14px; font: 800 23px Nunito; margin-bottom: 18px; }
.note b { color: #8a5d00; }
.steps { display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; align-items: center; gap: 18px; padding: 14px 16px 14px 18px; background: #fff; border: 4px solid #d6b483; border-radius: 20px; font: 800 24px/1.35 Nunito; box-shadow: 0 6px 0 #c9a46d; touch-action: none; cursor: grab; position: relative; }
.step .n { flex: none; width: 50px; height: 50px; border-radius: 50%; background: var(--wood); color: #fff; display: grid; place-items: center; font: 600 28px Fredoka; }
.step .arr { margin-left: auto; display: flex; flex-direction: column; gap: 6px; flex: none; }
.step .arr button { width: 52px; height: 36px; border-radius: 10px; background: var(--paper-2); border: 3px solid #d6b483; color: var(--wood-d); display: grid; place-items: center; }
.step .arr button .ico { font-size: 22px; }
.step .arr button:hover:not(:disabled) { background: var(--warn-bg); border-color: var(--warn); }
.step .arr button:disabled { opacity: .3; cursor: default; }
.step.hover { border-color: var(--warn); background: var(--warn-bg); }
.step.dragging { z-index: 20; box-shadow: 0 16px 30px rgba(0, 0, 0, .28); cursor: grabbing; }
.step.ok { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 6px 0 #8cc57d; }
.step.ok .n { background: var(--ok); }

/* animasi langkah */
.stepshow { position: absolute; left: 50%; top: 130px; width: 1100px; transform: translateX(-50%); display: flex; align-items: center; gap: 26px; padding: 22px 34px 22px 22px; background: var(--paper); border: 6px solid var(--line); border-radius: 30px; box-shadow: 0 8px 0 rgba(176, 110, 40, .45), 0 18px 40px rgba(0, 0, 0, .3); animation: rise .4s both; }
.stepshow .fx { flex: none; width: 120px; height: 120px; border-radius: 50%; background: var(--paper-2); display: grid; place-items: center; font-size: 66px; line-height: 1; }
.stepshow .n { font: 600 22px Fredoka; color: var(--ink-soft); display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.stepshow .dots { display: flex; gap: 6px; }
.stepshow .dots i { width: 34px; height: 8px; border-radius: 4px; background: var(--paper-3); }
.stepshow .dots i.on { background: var(--leaf); }
.stepshow p { margin: 0; font: 800 29px/1.4 Nunito; }
.daytag { position: absolute; top: 30px; left: 50%; transform: translateX(-50%); padding: 12px 40px; background: rgba(47, 42, 34, .92); color: #fff; border-radius: 40px; font: 600 34px Fredoka; animation: pop .4s both; }
.caption { position: absolute; left: 50%; top: 130px; transform: translateX(-50%); width: 1100px; padding: 26px 40px; background: var(--ok-bg); border: 6px solid var(--ok); border-radius: 30px; font: 600 36px/1.3 Fredoka; color: #2c6e23; text-align: center; box-shadow: 0 8px 0 rgba(47, 107, 26, .45), 0 18px 40px rgba(0, 0, 0, .3); animation: rise .4s both; }

/* ---------- Tahap 4: simulasi ---------- */
.zones { position: absolute; left: 40px; right: 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.zone { position: relative; border-radius: 24px; overflow: hidden; border: 6px solid #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); background: #ccc; }
.zone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 1s; }
.zone .nm { position: absolute; left: 14px; top: 12px; padding: 6px 18px 8px; background: rgba(255, 250, 240, .95); border-radius: 14px; font: 600 24px Fredoka; color: var(--head); }
.days { position: absolute; top: 108px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; }
.days span { padding: 6px 18px 8px; border-radius: 14px; background: rgba(59, 51, 40, .88); color: #fff; font: 600 22px Fredoka; transition: background .3s, transform .3s, color .3s; }
.days span.on { background: var(--sun); color: var(--ink); transform: scale(1.14); }
.days span.past { background: rgba(63, 156, 53, .9); }
.meters { position: absolute; left: 40px; right: 40px; background: var(--paper); border-radius: 26px; border: 6px solid #c98d4e; box-shadow: inset 0 0 0 4px #fff3dc, var(--lift); padding: 20px 30px; display: grid; grid-template-columns: 1fr 320px; gap: 30px; align-items: center; }
.meter { display: grid; grid-template-columns: 240px 1fr 330px; align-items: center; gap: 18px; margin-bottom: 12px; font: 800 23px Nunito; }
.bar { height: 30px; background: var(--paper-3); border-radius: 16px; overflow: hidden; box-shadow: inset 0 3px 0 rgba(0, 0, 0, .08); }
.bar i { display: block; height: 100%; border-radius: 16px; transition: width .8s, background .8s; }
.meter .ket { font: 700 20px/1.25 Nunito; color: var(--ink-soft); }
.legend { display: flex; gap: 24px; font: 700 19px Nunito; color: var(--ink-soft); margin-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 18px; height: 18px; border-radius: 50%; }
.ctrl { display: flex; flex-direction: column; gap: 18px; }

.ba { position: absolute; left: 60px; right: 60px; border-radius: 26px; overflow: hidden; border: 6px solid #fff; box-shadow: 0 14px 30px rgba(0, 0, 0, .35); touch-action: none; cursor: ew-resize; }
.ba .layer { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
.ba .layer img { width: 100%; height: 100%; object-fit: cover; }
.ba .after { clip-path: inset(0 0 0 50%); }
.ba .handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 8px; margin-left: -4px; background: #fff; box-shadow: 0 0 12px rgba(0, 0, 0, .4); }
.ba .knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--wood-d); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.ba .knob .ico { font-size: 54px; }
.ba .lbl { position: absolute; top: 16px; padding: 6px 22px 8px; border-radius: 14px; font: 600 26px Fredoka; }
.ba .lbl.l { left: 16px; background: var(--bad-bg); color: #a12b25; }
.ba .lbl.r { right: 16px; background: var(--ok-bg); color: #2c6e23; }
.ba-bar { position: absolute; left: 60px; right: 60px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.ticks { display: flex; align-items: center; gap: 22px; padding: 14px 28px; background: var(--paper); border: 5px solid #d9b07a; border-radius: 22px; font: 800 24px Nunito; box-shadow: 0 6px 0 rgba(150, 100, 45, .45); }
.tick { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 6px; border-radius: 14px; background: var(--paper-2); color: var(--ink-soft); }
.tick .ico { width: 34px; height: 34px; padding: 6px; border-radius: 50%; background: #d7cbb4; color: #fff; }
.tick.on { background: var(--ok-bg); color: #2c6e23; }
.tick.on .ico { background: var(--ok); }

/* ---------- Tahap 4: kartu bukti ---------- */
.minimap { position: absolute; left: 30px; width: 330px; display: flex; flex-direction: column; gap: 16px; padding: 22px 18px; background: rgba(255, 250, 240, .94); border: 6px solid #c98d4e; border-radius: 28px; box-shadow: inset 0 0 0 4px #fff3dc, var(--lift); }
.minimap h3 { margin: 0 0 2px; text-align: center; font: 600 28px Fredoka; color: var(--head); }
.loc { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: 20px; background: #fff; border: 4px solid #d6b483; font: 600 23px/1.15 Fredoka; color: var(--ink); box-shadow: 0 5px 0 #c9a46d; text-align: left; transition: transform .12s; }
.loc:hover { transform: translateY(-2px); }
.loc .em { flex: none; width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-2); font-size: 28px; }
.loc small { display: block; font: 800 17px Nunito; color: var(--ink-soft); margin-top: 2px; }
.loc.active { background: var(--warn-bg); border-color: var(--warn); box-shadow: 0 5px 0 var(--sun-d); }
.loc.done { background: var(--ok-bg); border-color: var(--ok); box-shadow: 0 5px 0 #8cc57d; }
.loc.done small { color: #2c6e23; }
.empty-hint { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; font: 800 30px Nunito; color: var(--ink-soft); }
.empty-hint .ico { font-size: 80px; color: var(--wood-l); }
.evslot { min-height: 116px; border: 5px dashed #c99a62; border-radius: 22px; display: grid; place-items: center; font: 800 25px Nunito; color: #a78559; padding: 14px; text-align: center; background: #fffdf6; transition: background .15s, border-color .15s; }
.evslot.hover { background: var(--warn-bg); border-color: var(--warn); border-style: solid; }
.evslot.ok { border-style: solid; border-color: var(--ok); background: var(--ok-bg); color: #2c6e23; animation: pop .35s both; }
.evcards { display: flex; gap: 20px; justify-content: center; }
.evcard { width: 310px; padding: 22px 18px; background: #fff; border: 4px solid #d6b483; border-radius: 20px; font: 800 23px/1.35 Nunito; text-align: center; box-shadow: 0 6px 0 #c9a46d; cursor: grab; touch-action: none; position: relative; }
.evcard:hover { border-color: var(--warn); }
.evcard.dragging { z-index: 50; cursor: grabbing; box-shadow: 0 16px 26px rgba(0, 0, 0, .28); }

/* ---------- Buku Informasi ---------- */
.modal-bg { position: absolute; inset: 0; background: rgba(20, 14, 5, .62); z-index: 60; display: grid; place-items: center; animation: fadeIn .25s both; }
.book { width: 1340px; height: 790px; display: grid; grid-template-columns: 430px 1fr; background: #f7ecd4; border: 16px solid #7a4a1e; border-radius: 28px; box-shadow: inset 0 0 0 4px #c99a62, 0 12px 0 #4b2c10, 0 30px 70px rgba(0, 0, 0, .5); position: relative; animation: pop .35s both; }
.book .pg { padding: 40px 40px; overflow: auto; }
.book .pg + .pg { border-left: 4px dashed #c99a62; background: #fbf3e2; border-radius: 0 12px 12px 0; padding: 44px 50px; }
.book h2 { display: flex; align-items: center; gap: 12px; font: 600 40px Fredoka; color: var(--head); margin: 0 0 4px; }
.book h2 .ico { color: var(--berry); }
.book .sub { font: 700 21px Nunito; color: var(--ink-soft); margin: 0 0 20px; }
.book h3 { font: 600 28px Fredoka; color: var(--head); margin: 26px 0 10px; }
.book p { font: 700 23px/1.5 Nunito; margin: 0 0 10px; }
.book .entry { background: #fff; border-radius: 18px; padding: 16px 22px 18px; margin-bottom: 16px; border: 3px solid #ecd6ae; font: 700 22px/1.5 Nunito; }
.book .entry b { display: block; font: 600 25px Fredoka; color: var(--head); margin-bottom: 4px; }
.book .lockd { font: 800 24px/1.5 Nunito; color: var(--ink-soft); padding: 12px 0; }
.book .x { position: absolute; top: -32px; right: -32px; width: 74px; height: 74px; border-radius: 50%; background: var(--berry); color: #fff; display: grid; place-items: center; border: 6px solid #fff; box-shadow: 0 6px 0 #7d1a1f, 0 10px 20px rgba(0, 0, 0, .35); }
.book .x .ico { font-size: 34px; }
.book .toc button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 14px 18px; margin: 0 0 12px; border-radius: 16px; background: #fffaf0; border: 4px solid #e2c99b; font: 800 23px/1.25 Nunito; color: var(--ink); transition: background .12s, border-color .12s; }
.book .toc button .ico { font-size: 22px; color: var(--ink-soft); }
.book .toc button:hover:not(:disabled) { border-color: var(--warn); }
.book .toc button.on { background: var(--warn-bg); border-color: var(--warn); }
.book .toc button.read::after { content: ""; margin-left: auto; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--ok) var(--i-check) center / 66% no-repeat; }
.book .toc button:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Layar selesai ---------- */
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 25; }
.confetti i { position: absolute; top: -40px; width: 16px; height: 26px; border-radius: 4px; animation: fall 3.2s cubic-bezier(.3, .6, .6, 1) forwards; }
@keyframes fall { to { transform: translateY(1000px) rotate(720deg); opacity: .9 } }
.medal { width: 150px; height: 150px; margin: -12px auto 18px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff6b8, #f7c63c 50%, #c88a12); border: 8px solid #fff; box-shadow: 0 0 0 6px var(--sun-d), 0 10px 20px rgba(0, 0, 0, .25); color: #fff; }
.medal .ico { font-size: 84px; filter: drop-shadow(0 3px 0 rgba(130, 80, 0, .6)); }

/* ---------- Layar putar ---------- */
#rotate { display: none; }
@media (orientation: portrait) and (max-width: 900px) {
  #rotate { display: grid; place-items: center; position: fixed; inset: 0; background: #1d1a14; color: #fff; font: 800 22px Nunito; z-index: 999; text-align: center; padding: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
