/* Pintu Stiker — permainan berlevel Rumah Lam */
:root {
  --paper: #f8f3e9;
  --card: #fffdf8;
  --ink: #2f271d;
  --muted: #756b5d;
  --line: #e4dccd;
  --coklat: #b57810;
  --ungu: #e1bee7;
  --kuning: #ffe600;
  --hijau: #03ff13;
  --merah: #ff5252;
  --akcent: #8c4a12;
  --gelap: #241b14;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font: 16px/1.6 "Segoe UI", Inter, system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 230, 0, .16), transparent 26rem),
    radial-gradient(circle at 88% 4%, rgba(225, 190, 231, .28), transparent 24rem),
    var(--paper);
}
button { font: inherit; cursor: pointer; }
a { color: var(--akcent); text-underline-offset: 3px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--akcent); outline-offset: 3px; border-radius: 8px; }
.wrap { width: min(1080px, calc(100% - 32px)); margin-inline: auto; }

.top {
  background: linear-gradient(180deg, #33261a, var(--gelap));
  color: #fff8ec;
  border-bottom: 3px solid var(--coklat);
  padding: 16px 0 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 8px 24px rgba(36, 27, 20, .18);
}
.top-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.mark {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px;
  background: var(--coklat); border: 2px solid #f0c86a; font-size: 25px;
  font-family: "Noto Naskh Arabic", Amiri, "Times New Roman", serif;
}
.brand b { display: block; font-size: 1.05rem; letter-spacing: .01em; }
.brand small { display: block; color: #d8c9b4; font-size: .78rem; }
.top-stats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stat {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px; padding: 6px 12px; font-size: .84rem; font-weight: 700;
}
.stat.xp { background: var(--kuning); color: #2b210f; border-color: var(--kuning); }
.kembali {
  background: transparent; color: #fff8ec; border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; padding: 6px 12px; font-size: .82rem; text-decoration: none;
}
.kembali:hover { background: rgba(255,255,255,.12); color: #fff; }

.level-track { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; align-items: center; }
.level-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid rgba(255,255,255,.3); background: transparent; color: #fff8ec;
  font-size: .8rem; font-weight: 800;
}
.level-dot.selesai { background: var(--hijau); color: #062106; border-color: var(--hijau); }
.level-dot.aktif { background: var(--kuning); color: #2b210f; border-color: var(--kuning); box-shadow: 0 0 0 4px rgba(255,230,0,.18); }
.level-label { color: #d8c9b4; font-size: .8rem; margin-left: 6px; }
.progress { height: 7px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--kuning), var(--hijau)); transition: width .3s ease; }

main { padding: 26px 0 48px; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: 24px; box-shadow: 0 12px 32px rgba(70, 45, 15, .08);
}
.kicker {
  display: inline-block; font-size: .76rem; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--akcent); border-bottom: 3px solid var(--kuning);
  margin-bottom: 12px;
}
h1 { font-size: clamp(1.6rem, 3.4vw, 2.35rem); line-height: 1.2; margin: 0 0 8px; }
h2 { font-size: 1.3rem; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.arab { font-family: "Noto Naskh Arabic", Amiri, "Times New Roman", serif; direction: rtl; unicode-bidi: isolate; }

.soal-grid { display: grid; grid-template-columns: minmax(280px, .95fr) minmax(300px, 1.05fr); gap: 22px; margin-top: 18px; align-items: stretch; }
.soal-grid.mode-pasangan { grid-template-columns: 1fr; }
.soal-grid.mode-pasangan .panggung { min-height: auto; }
.panggung {
  border-radius: 16px; border: 1px solid var(--line); background: #fffdf6;
  padding: 20px; display: grid; place-content: center; text-align: center; min-height: 280px;
}
.panggung .petunjuk-kecil { color: var(--muted); font-size: .82rem; margin-bottom: 14px; }
.stiker {
  --warna-teks: #111;
  display: inline-grid; place-items: center; gap: 4px;
  width: min(100%, 320px); min-height: 150px; padding: 18px;
  border-radius: 18px; border: 3px solid rgba(0,0,0,.12);
  box-shadow: 0 10px 0 rgba(0,0,0,.08), 0 16px 28px rgba(0,0,0,.12);
  color: var(--warna-teks);
  transform: rotate(-1deg);
}
.stiker .kata-ar { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; line-height: 1.35; }
.stiker .arti { font-size: .9rem; font-weight: 700; }
.bg-coklat { background: var(--coklat); color: #fff; --warna-teks: #fff; }
.bg-abu { background: #d8d2c8; --warna-teks: #2f271d; }
.bg-ungu { background: var(--ungu); --warna-teks: #2f271d; }
.bg-putih { background: #fff; --warna-teks: #2f271d; }

.token-demo {
  display: inline-grid; place-items: center; min-height: 130px; padding: 18px 26px;
  border-radius: 16px; border: 3px solid rgba(0,0,0,.12); background: #fffdf6;
  box-shadow: 0 10px 0 rgba(0,0,0,.07);
}
.token-demo .kata-ar { font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 700; }
.w-hitam { color: #000; }
.w-hijau { color: #0b7a15; }
.w-kuning { color: #8a6a00; }
.w-merah { color: #b32020; }
.pill-demo { background: var(--kuning); border-radius: 12px; padding: 6px 16px; }

.lingkaran-demo {
  width: 130px; height: 130px; border-radius: 50%; display: grid; place-items: center;
  margin: 0 auto 12px; border: 4px solid rgba(0,0,0,.18); font-weight: 800; font-size: .8rem;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.lingkaran-demo.hijau { background: var(--hijau); }
.lingkaran-demo.kuning { background: var(--kuning); }
.lingkaran-demo.merah { background: var(--merah); color: #fff; }

.kode-demo {
  display: inline-block; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.1rem, 3vw, 1.7rem); font-weight: 800;
  background: #2b2114; color: #ffe98a; padding: 12px 18px; border-radius: 12px;
  border: 2px solid var(--coklat);
}

.pilihan { display: grid; gap: 10px; align-content: start; }
.opsi {
  text-align: left; border: 2px solid var(--line); background: #fff;
  border-radius: 12px; padding: 13px 16px; font-weight: 700; color: var(--ink);
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.opsi:hover { transform: translateY(-2px); border-color: var(--coklat); background: #fffaf0; }
.opsi.benar { border-color: #0b7a15; background: #eaffea; color: #062106; }
.opsi.salah { border-color: var(--merah); background: #ffeaea; color: #7a1010; }
.opsi:disabled { cursor: default; transform: none; opacity: .9; }
.umpan {
  margin-top: 14px; border-radius: 12px; padding: 12px 14px; font-size: .92rem;
  background: #f4ecdc; color: #4a3a24;
}
.umpan.benar { background: #eaffea; color: #062106; }
.umpan.salah { background: #ffeaea; color: #7a1010; }
.lanjut { margin-top: 14px; }
.btn {
  display: inline-block; border: 2px solid var(--akcent); border-radius: 10px;
  padding: 10px 16px; font-weight: 800; text-decoration: none; cursor: pointer;
  background: var(--akcent); color: #fff;
}
.btn:hover { background: #5d300b; color: #fff; border-color: #5d300b; }
.btn.sec { background: transparent; color: var(--akcent); }
.btn.sec:hover { background: #f4ecdc; color: #5d300b; }

.pasangan { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.pasang-kolom { display: grid; gap: 10px; }
.pasang {
  border: 2px solid var(--line); background: #fff; border-radius: 12px;
  padding: 12px 14px; font-weight: 700; color: var(--ink); text-align: center;
}
.pasang:hover { border-color: var(--coklat); }
.pasang.pilih { border-color: var(--kuning); background: #fffbe0; box-shadow: 0 0 0 3px rgba(255,230,0,.25); }
.pasang.jodoh { border-color: #0b7a15; background: #eaffea; color: #062106; opacity: 1; }
.pasang .kata-ar { font-size: 1.5rem; }

.selesai { text-align: center; padding: 34px 20px; }
.selesai .medali { font-size: 3rem; }
.ringkasan { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0; }
.ringkasan span { background: #f4ecdc; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: .9rem; }

@media (max-width: 780px) {
  .wrap { width: min(100% - 20px, 1080px); }
  .top { position: static; }
  .panel { padding: 18px; }
  .soal-grid, .pasangan { grid-template-columns: 1fr; }
  .panggung { min-height: 220px; }
  .level-label { width: 100%; margin: 6px 0 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .opsi { transition: none; } }
