/* =========================================================
   EDUPLAY - gaya tampilan utama
   Palet: navy, edu blue, teal mint, gold, latar lembut
   Huruf: Plus Jakarta Sans (UI), Scheherazade New (Arab)
   ========================================================= */

:root {
  --navy: #1A365D;
  --navy-900: #122744;
  --blue: #2B6CB0;
  --mint: #319795;
  --mint-50: #E6F6F5;
  --gold: #D69E2E;
  --gold-50: #FBF3E1;
  --soft: #F7FAFC;
  --ink: #1F2937;
  --muted: #5B6779;
  --line: #D9E2EC;
  --white: #FFFFFF;
  --red: #C53030;
  --red-50: #FDECEC;

  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-arab: "Scheherazade New", "Amiri", "Traditional Arabic", serif;

  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --tap: 48px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--soft);
}
img { max-width: 100%; display: block; }
a { color: var(--blue); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

.arab {
  font-family: var(--font-arab);
  direction: rtl;
  line-height: 2.1;
}

.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--tap); padding: 0 1.4rem;
  font: 700 1rem var(--font); text-decoration: none;
  border: 2px solid transparent; border-radius: var(--r-sm);
  cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--navy); color: var(--white); }
.btn-primary:hover { background: var(--navy-900); }
.btn-gold { background: var(--gold); color: var(--navy-900); }
.btn-gold:hover { background: #C38B1F; }
.btn-line { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-line:hover { background: var(--navy); color: var(--white); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* ---------- Header publik ---------- */
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.logo { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.35rem; color: var(--navy); text-decoration: none; letter-spacing: -.01em; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--navy);
  display: grid; place-items: center; color: var(--gold); font-weight: 800; font-size: 1.1rem;
}
.topbar nav { display: flex; gap: .6rem; align-items: center; }
.topbar nav .btn { min-height: 42px; padding: 0 1rem; font-size: .95rem; }

/* ---------- Hero beranda ---------- */
.hero { background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
.hero::after {
  /* pola kotak-kotak halus seperti papan permainan */
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; pointer-events: none;
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center;
  padding-block: 4.5rem 5rem;
}
.hero h1 { color: var(--white); font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; letter-spacing: -.02em; max-width: 14ch; }
.hero .lead { font-size: 1.15rem; color: #D6E2F0; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }
.hero-actions .btn-line { color: var(--white); border-color: rgba(255,255,255,.6); }
.hero-actions .btn-line:hover { background: var(--white); color: var(--navy); }

/* Kartu PIN: elemen utama yang paling diingat */
.pin-card {
  background: var(--white); color: var(--ink);
  border-radius: var(--r-lg); padding: 2rem 1.75rem 1.75rem;
  box-shadow: 0 24px 48px -18px rgba(5, 18, 38, .55);
  border-top: 8px solid var(--gold);
}
.pin-card h2 { font-size: 1.4rem; margin-bottom: .25rem; }
.pin-card p { color: var(--muted); font-size: .95rem; }
.pin-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; margin: 1.25rem 0 1rem; }
.pin-boxes input {
  width: 100%; aspect-ratio: 1 / 1.15; min-height: 52px;
  text-align: center; font: 800 1.6rem var(--font); color: var(--navy);
  border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--soft);
}
.pin-boxes input:focus { border-color: var(--blue); background: var(--white); outline: none; box-shadow: 0 0 0 3px rgba(43,108,176,.25); }
.pin-note { font-size: .85rem; color: var(--muted); margin: .75rem 0 0; text-align: center; }

/* ---------- Bagian beranda ---------- */
.section { padding-block: 4rem; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -.01em; }
.section .intro { color: var(--muted); max-width: 60ch; }

.game-strip { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .55rem 1rem; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line); font-weight: 600; color: var(--navy);
}
.chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); }
.chip.soon { color: var(--muted); border-style: dashed; }
.chip.soon .dot { background: var(--line); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 2rem; counter-reset: langkah; }
.step { border-left: 4px solid var(--mint); padding-left: 1.1rem; }
.step h3 { font-size: 1.1rem; }
.step h3::before { counter-increment: langkah; content: counter(langkah) ". "; color: var(--mint); }
.step p { color: var(--muted); margin: 0; }

.band { background: var(--white); border-block: 1px solid var(--line); }
.verse { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: center; }
.verse .arab { font-size: 2.6rem; color: var(--navy); }
.verse p { color: var(--muted); max-width: 56ch; margin: 0; }

.footer { padding-block: 2rem; color: var(--muted); font-size: .9rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }

/* ---------- Halaman formulir (masuk/daftar) ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--navy); color: var(--white); padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 44px 44px; pointer-events: none;
}
.auth-side > * { position: relative; z-index: 1; }
.auth-side .logo { color: var(--white); }
.auth-side h2 { color: var(--white); font-size: 2rem; max-width: 16ch; }
.auth-side p { color: #D6E2F0; max-width: 40ch; }
.auth-main { display: grid; place-items: center; padding: 2.5rem 1.25rem; background: var(--soft); }
.auth-box { width: min(420px, 100%); }
.auth-box h1 { font-size: 1.8rem; }
.auth-box .sub { color: var(--muted); margin-bottom: 1.5rem; }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-weight: 700; margin-bottom: .35rem; color: var(--navy); }
.field input, .field select {
  width: 100%; min-height: var(--tap); padding: 0 .9rem;
  font: 1rem var(--font); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--white);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,108,176,.2); }
.field .hint { font-size: .85rem; color: var(--muted); margin-top: .3rem; }

.role-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.role-pick input { position: absolute; opacity: 0; pointer-events: none; }
.role-pick label {
  display: block; margin: 0; padding: .9rem 1rem; cursor: pointer;
  border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--white);
  font-weight: 700; color: var(--navy);
}
.role-pick label span { display: block; font-weight: 500; font-size: .85rem; color: var(--muted); }
.role-pick input:checked + label { border-color: var(--navy); background: #EDF2F9; }
.role-pick input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 2px; }

.alert { padding: .85rem 1rem; border-radius: var(--r-sm); margin-bottom: 1rem; font-size: .95rem; display: none; }
.alert.show { display: block; }
.alert.error { background: var(--red-50); color: var(--red); border: 1px solid #F5C2C2; }
.alert.ok { background: var(--mint-50); color: #1D6A68; border: 1px solid #B4E0DE; }
.alert.info { background: var(--gold-50); color: #7A5512; border: 1px solid #EED9A8; }

.switch-link { margin-top: 1.25rem; text-align: center; color: var(--muted); }

/* ---------- Dasbor (guru & siswa) ---------- */
.app { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { background: var(--navy); color: var(--white); padding: 1.5rem 1rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { color: var(--white); padding-inline: .5rem; }
.menu { list-style: none; padding: 0; margin: 0; display: grid; gap: .25rem; }
.menu a {
  display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: 0 .75rem;
  color: #D6E2F0; text-decoration: none; border-radius: var(--r-sm); font-weight: 600;
}
.menu a:hover { background: rgba(255,255,255,.08); color: var(--white); }
.menu a[aria-current="page"] { background: var(--white); color: var(--navy); }
.menu svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar .bottom { margin-top: auto; }

.main { padding: 2rem clamp(1.25rem, 3vw, 2.5rem) 6rem; }
.main-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.main-head h1 { font-size: 1.75rem; margin: 0; }
.main-head .who { color: var(--muted); margin: .2rem 0 0; }
.user-pill { display: inline-flex; align-items: center; gap: .6rem; background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .4rem .3rem 1rem; font-weight: 600; }
.user-pill .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gold); color: var(--navy-900); display: grid; place-items: center; font-weight: 800; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.1rem 1.2rem; }
.stat .num { font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: .9rem; }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; margin-bottom: 1.5rem; }
.panel h2 { font-size: 1.2rem; }
.create-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.create-opt { border: 2px solid var(--line); border-radius: var(--r-md); padding: 1.25rem; background: var(--soft); }
.create-opt h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.create-opt p { color: var(--muted); font-size: .92rem; }
.badge-soon { display: inline-block; font-size: .78rem; font-weight: 700; color: #7A5512; background: var(--gold-50); border: 1px solid #EED9A8; border-radius: 999px; padding: .1rem .6rem; }

.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty h3 { color: var(--navy); }

.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

/* Menu bawah untuk HP */
.bottom-nav { display: none; }

/* ---------- Halaman ruang bermain ---------- */
.play-shell { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: var(--navy); }
.play-card { background: var(--white); border-radius: var(--r-lg); padding: 2rem; width: min(480px, 100%); text-align: center; border-top: 8px solid var(--gold); }
.play-card .pin-big { font-size: 2.6rem; font-weight: 800; letter-spacing: .2em; color: var(--navy); margin: .5rem 0 1rem; }

/* ---------- Responsif ---------- */
@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-block: 3rem 3.5rem; gap: 2rem; }
  .steps { grid-template-columns: 1fr; gap: 1.25rem; }
  .verse { grid-template-columns: 1fr; gap: .5rem; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .create-row { grid-template-columns: 1fr; }

  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .bottom-nav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--white); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    min-height: 60px; font-size: .72rem; font-weight: 600; color: var(--muted); text-decoration: none;
  }
  .bottom-nav a[aria-current="page"] { color: var(--navy); }
  .bottom-nav svg { width: 22px; height: 22px; }
}
@media (max-width: 520px) {
  .topbar nav .btn-line { display: none; }
  .pin-boxes { gap: .35rem; }
  .pin-boxes input { font-size: 1.3rem; }
  .main-head .user-pill span.name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Teks khusus pembaca layar */
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Logo di latar navy memakai kotak emas */
.sidebar .logo-mark, .auth-side .logo-mark { background: var(--gold); color: var(--navy-900); }

/* Di HP, kartu PIN tampil lebih dulu karena paling sering dipakai siswa */
@media (max-width: 900px) {
  .hero .pin-card { order: -1; }
}

/* =========================================================
   Ver 1.2 - Editor, daftar permainan, ruang bermain
   ========================================================= */

/* Teks Arab di dalam soal memakai huruf Scheherazade */
.soal-teks, .opsi, .field textarea, .field input[dir="auto"] {
  font-family: "Plus Jakarta Sans", "Scheherazade New", system-ui, sans-serif;
}

.menu-soon { margin-left: auto; font-size: .68rem; font-weight: 700; color: var(--gold); }

.field textarea {
  width: 100%; min-height: 90px; padding: .7rem .9rem; resize: vertical;
  font-size: 1rem; line-height: 1.7; color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--white);
}
.field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43,108,176,.2); }

.btn-sm { min-height: 38px; padding: 0 .9rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); }
.btn-danger { background: transparent; color: var(--red); border-color: #F0C4C4; }
.btn-danger:hover { background: var(--red-50); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 150%);
  background: var(--navy-900); color: var(--white); padding: .8rem 1.2rem; border-radius: var(--r-sm);
  font-weight: 600; z-index: 100; transition: transform .25s; max-width: calc(100% - 2rem);
}
.toast.show { transform: translate(-50%, 0); }
.toast[data-jenis="error"] { background: var(--red); }
.toast[data-jenis="info"] { background: #7A5512; }
@media (max-width: 900px) { .toast { bottom: 5rem; } }

/* Pilihan jenis permainan */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.type-card {
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: var(--white); border: 2px solid var(--line); border-radius: var(--r-md); padding: 1.25rem;
}
.type-card:hover:not([disabled]) { border-color: var(--navy); }
.type-card h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.type-card p { color: var(--muted); font-size: .9rem; margin: 0; }
.type-card .contoh { display: block; margin-top: .7rem; font-size: .82rem; color: var(--mint); font-weight: 600; }
.type-card[disabled] { cursor: not-allowed; opacity: .55; }

/* Tabel */
.tabel-wrap { overflow-x: auto; }
.tabel { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tabel th { text-align: left; font-size: .82rem; color: var(--muted); font-weight: 700; padding: .6rem .75rem; border-bottom: 2px solid var(--line); white-space: nowrap; }
.tabel td { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabel tr:last-child td { border-bottom: 0; }
.tabel .judul { font-weight: 700; color: var(--navy); }
.tabel .aksi { display: flex; gap: .4rem; flex-wrap: wrap; }
.status { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .6rem; border-radius: 999px; white-space: nowrap; }
.status.draft { background: #EDF2F7; color: var(--muted); }
.status.terbit { background: var(--mint-50); color: #1D6A68; }
.pin-kecil { font-weight: 800; letter-spacing: .12em; color: var(--navy); }

/* Editor */
.editor-bar {
  position: sticky; top: 0; z-index: 10; background: var(--soft);
  display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; justify-content: space-between;
  padding: .75rem 0; margin-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.editor-bar .kiri { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.editor-bar .kanan { display: flex; gap: .5rem; flex-wrap: wrap; }
.simpan-status { font-size: .88rem; color: var(--muted); }
.simpan-status.belum { color: #7A5512; font-weight: 600; }

.editor-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.5rem; align-items: start; }
.soal-kartu { background: var(--white); border: 1px solid var(--line); border-left: 5px solid var(--navy); border-radius: var(--r-md); padding: 1.25rem; margin-bottom: 1rem; }
.soal-kartu.galat { border-left-color: var(--red); }
.soal-kepala { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.soal-kepala h3 { font-size: 1rem; margin: 0; }
.soal-kepala .tombol { display: flex; gap: .3rem; }
.ikon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--navy);
}
.ikon-btn:hover { border-color: var(--navy); }
.ikon-btn.hapus:hover { border-color: var(--red); color: var(--red); }
.ikon-btn svg { width: 18px; height: 18px; }
.ikon-btn[disabled] { opacity: .35; cursor: default; }

.opsi-baris { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.opsi-baris input[type="radio"] { width: 22px; height: 22px; accent-color: var(--mint); }
.opsi-baris input[type="text"] { min-height: 44px; padding: 0 .8rem; font-size: 1rem; border: 2px solid var(--line); border-radius: var(--r-sm); width: 100%; }
.opsi-baris input[type="text"]:focus { outline: none; border-color: var(--blue); }
.opsi-baris.benar input[type="text"] { border-color: var(--mint); background: var(--mint-50); }
.bs-pilih { display: flex; gap: .6rem; }
.bs-pilih label { flex: 1; display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; border: 2px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-weight: 700; }
.bs-pilih input { accent-color: var(--mint); width: 18px; height: 18px; }
.bs-pilih label:has(input:checked) { border-color: var(--mint); background: var(--mint-50); color: #1D6A68; }
.galat-teks { color: var(--red); font-size: .88rem; font-weight: 600; margin: .4rem 0 0; }
.cek-baris { display: flex; align-items: flex-start; gap: .6rem; margin-bottom: .8rem; }
.cek-baris input { width: 20px; height: 20px; margin-top: .15rem; accent-color: var(--navy); }

/* Modal bagikan */
.modal-latar { position: fixed; inset: 0; background: rgba(10, 22, 40, .6); display: grid; place-items: center; padding: 1rem; z-index: 50; }
.modal { background: var(--white); border-radius: var(--r-lg); padding: 1.75rem; width: min(440px, 100%); text-align: center; border-top: 8px solid var(--gold); max-height: 92vh; overflow-y: auto; }
.modal .pin-besar { font-size: 2.8rem; font-weight: 800; letter-spacing: .18em; color: var(--navy); margin: .25rem 0 1rem; }
.modal canvas, .modal img.qr { margin: 0 auto 1rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.salin-baris { display: flex; gap: .4rem; margin-bottom: 1rem; }
.salin-baris input { flex: 1; min-width: 0; min-height: 44px; padding: 0 .7rem; border: 2px solid var(--line); border-radius: var(--r-sm); font-size: .88rem; }
.modal .aksi { display: grid; gap: .5rem; }

/* Ruang bermain */
.main-layar { min-height: 100vh; background: var(--navy); color: var(--white); display: flex; flex-direction: column; }
.main-atas { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1.25rem; }
.main-atas .logo { color: var(--white); font-size: 1.1rem; }
.main-atas .logo-mark { background: var(--gold); color: var(--navy-900); width: 30px; height: 30px; }
.main-info { font-weight: 700; display: flex; gap: 1rem; font-size: .95rem; }
.main-isi { flex: 1; display: grid; place-items: center; padding: 1rem 1.25rem 2rem; }
.main-kartu { background: var(--white); color: var(--ink); border-radius: var(--r-lg); padding: 1.75rem; width: min(720px, 100%); }
.main-kartu h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.progres { height: 8px; background: rgba(255,255,255,.18); border-radius: 999px; overflow: hidden; margin: 0 1.25rem; }
.progres span { display: block; height: 100%; background: var(--gold); width: 0; transition: width .3s; }
.waktu-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; }
.waktu-bar span { display: block; height: 100%; background: var(--mint); width: 100%; transition: width 1s linear; }
.waktu-bar.kritis span { background: var(--red); }
.soal-teks { font-size: clamp(1.2rem, 3.2vw, 1.6rem); font-weight: 700; color: var(--navy); line-height: 1.6; margin-bottom: 1.25rem; white-space: pre-wrap; }
.opsi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.opsi {
  display: flex; align-items: center; gap: .75rem; text-align: left; cursor: pointer;
  min-height: 64px; padding: .75rem 1rem; font-size: 1.05rem; font-weight: 600; line-height: 1.5;
  color: var(--ink); background: var(--soft); border: 3px solid var(--line); border-radius: var(--r-md);
}
.opsi:hover:not([disabled]) { border-color: var(--blue); background: var(--white); }
.opsi .huruf { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--white); font-weight: 800; }
.opsi[disabled] { cursor: default; }
.opsi.benar { border-color: var(--mint); background: var(--mint-50); }
.opsi.benar .huruf { background: var(--mint); }
.opsi.salah { border-color: var(--red); background: var(--red-50); }
.opsi.salah .huruf { background: var(--red); }
.opsi.redup { opacity: .55; }
.opsi-bs { grid-template-columns: 1fr 1fr; }
.opsi-bs .opsi { justify-content: center; font-size: 1.25rem; min-height: 88px; }
.umpan { margin-top: 1.25rem; padding: 1rem 1.1rem; border-radius: var(--r-md); }
.umpan.benar { background: var(--mint-50); border: 1px solid #B4E0DE; }
.umpan.salah { background: var(--red-50); border: 1px solid #F5C2C2; }
.umpan strong { display: block; font-size: 1.1rem; margin-bottom: .25rem; }
.umpan.benar strong { color: #1D6A68; }
.umpan.salah strong { color: var(--red); }
.umpan p { margin: 0; white-space: pre-wrap; }
.skor-besar { font-size: clamp(3.5rem, 12vw, 5.5rem); font-weight: 800; color: var(--navy); line-height: 1; }
.ulasan { margin-top: 1.5rem; display: grid; gap: .75rem; text-align: left; }
.ulasan-item { border: 1px solid var(--line); border-left: 5px solid var(--mint); border-radius: var(--r-sm); padding: .8rem 1rem; }
.ulasan-item.salah { border-left-color: var(--red); }
.ulasan-item p { margin: .2rem 0 0; font-size: .92rem; color: var(--muted); white-space: pre-wrap; }

.bar-mini { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; min-width: 80px; }
.bar-mini span { display: block; height: 100%; background: var(--mint); }
.bar-mini.rendah span { background: var(--red); }

@media (max-width: 900px) {
  .type-grid { grid-template-columns: 1fr; }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-grid aside { order: -1; }
  .editor-bar { top: 0; }
}
@media (max-width: 560px) {
  .opsi-grid { grid-template-columns: 1fr; }
  .opsi-bs { grid-template-columns: 1fr 1fr; }
  .main-kartu { padding: 1.25rem; }
}

/* =========================================================
   Ver 1.3 - Pasangkan, Isian rumpang, Urutkan, Memori
   ========================================================= */
.lbl-blok { display: block; font-weight: 700; color: var(--navy); margin-bottom: .35rem; }

/* Editor: pasangan dan langkah */
.pasang-kepala, .pasang-baris { display: grid; grid-template-columns: 1fr 1fr 36px; gap: .5rem; align-items: center; }
.pasang-kepala { font-size: .82rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; }
.pasang-baris { margin-bottom: .5rem; }
.pasang-baris input, .langkah-baris input {
  min-height: 44px; padding: 0 .8rem; font-size: 1rem; width: 100%;
  font-family: "Plus Jakarta Sans", "Scheherazade New", system-ui, sans-serif;
  border: 2px solid var(--line); border-radius: var(--r-sm);
}
.pasang-baris input:focus, .langkah-baris input:focus { outline: none; border-color: var(--blue); }
.langkah-baris { display: grid; grid-template-columns: 32px 1fr 36px 36px; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.langkah-no {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: var(--navy); color: var(--white); font-weight: 800; font-size: .85rem;
}
.pratinjau-rumpang { font-size: .92rem; color: var(--muted); background: var(--soft); border: 1px dashed var(--line); border-radius: var(--r-sm); padding: .6rem .8rem; margin: -.4rem 0 .9rem; }
.rumpang-kotak { display: inline-block; min-width: 3em; border-bottom: 2px solid var(--gold); color: transparent; }

/* Pemain: Pasangkan */
.cocok-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.cocok-kolom { display: grid; gap: .6rem; align-content: start; }
.cocok-kartu {
  position: relative; display: flex; align-items: center; gap: .6rem; text-align: left; cursor: pointer;
  min-height: 56px; padding: .6rem .8rem; font: 600 1rem "Plus Jakarta Sans", "Scheherazade New", sans-serif; line-height: 1.5;
  color: var(--ink); background: var(--soft); border: 3px solid var(--line); border-radius: var(--r-md);
}
.cocok-kartu:hover:not([disabled]) { border-color: var(--blue); }
.cocok-kartu.aktif { border-color: var(--gold); background: var(--gold-50); }
.cocok-no { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; color: var(--white); font-size: .8rem; font-weight: 800; }
.cocok-kartu.terhubung { background: var(--white); }
.w0 .cocok-no { background: #2B6CB0; } .w0.terhubung { border-color: #2B6CB0; }
.w1 .cocok-no { background: #805AD5; } .w1.terhubung { border-color: #805AD5; }
.w2 .cocok-no { background: #DD6B20; } .w2.terhubung { border-color: #DD6B20; }
.w3 .cocok-no { background: #319795; } .w3.terhubung { border-color: #319795; }
.w4 .cocok-no { background: #D53F8C; } .w4.terhubung { border-color: #D53F8C; }
.w5 .cocok-no { background: #1A365D; } .w5.terhubung { border-color: #1A365D; }
.w6 .cocok-no { background: #B7791F; } .w6.terhubung { border-color: #B7791F; }
.w7 .cocok-no { background: #38A169; } .w7.terhubung { border-color: #38A169; }
.cocok-kartu.benar { border-color: var(--mint) !important; background: var(--mint-50); }
.cocok-kartu.salah { border-color: var(--red) !important; background: var(--red-50); }

/* Pemain: Urutkan */
.urut-daftar { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.urut-item {
  display: grid; grid-template-columns: 32px 1fr 40px 40px; gap: .5rem; align-items: center;
  padding: .5rem .6rem; background: var(--soft); border: 3px solid var(--line); border-radius: var(--r-md);
}
.urut-teks { font-weight: 600; line-height: 1.5; font-family: "Plus Jakarta Sans", "Scheherazade New", sans-serif; }
.urut-item .ikon-btn { width: 40px; height: 40px; }
.urut-item.benar { border-color: var(--mint); background: var(--mint-50); }
.urut-item.salah { border-color: var(--red); background: var(--red-50); }

/* Pemain: Isian rumpang */
.rumpang-teks { font-size: clamp(1.1rem, 3vw, 1.35rem); line-height: 2.4; color: var(--navy); font-weight: 600; font-family: "Plus Jakarta Sans", "Scheherazade New", sans-serif; white-space: pre-wrap; }
.rumpang-isi {
  display: inline-block; min-width: 7em; max-width: 100%; min-height: 44px; margin: 0 .2rem; padding: 0 .5rem;
  font: 700 1.05rem "Plus Jakarta Sans", "Scheherazade New", sans-serif; color: var(--blue);
  border: 0; border-bottom: 3px solid var(--gold); background: var(--gold-50); border-radius: 6px 6px 0 0; vertical-align: middle;
}
.rumpang-isi:focus { outline: none; background: #F6E7C1; }
.rumpang-isi.benar { border-bottom-color: var(--mint); background: var(--mint-50); color: #1D6A68; }
.rumpang-isi.salah { border-bottom-color: var(--red); background: var(--red-50); color: var(--red); }

/* Pemain: Memori */
.memori-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.memori-grid.padat { grid-template-columns: repeat(5, 1fr); }
.memori-kartu {
  aspect-ratio: 3 / 4; min-height: 80px; padding: .4rem; cursor: pointer;
  display: grid; place-items: center; text-align: center;
  font: 700 .95rem "Plus Jakarta Sans", "Scheherazade New", sans-serif; line-height: 1.35;
  color: transparent; background: var(--navy); border: 3px solid var(--navy); border-radius: var(--r-md);
  background-image: linear-gradient(135deg, rgba(214,158,46,.35) 25%, transparent 25%, transparent 50%, rgba(214,158,46,.35) 50%, rgba(214,158,46,.35) 75%, transparent 75%);
  background-size: 18px 18px; transition: background-color .2s, color .2s;
}
.memori-kartu span { overflow-wrap: anywhere; }
.memori-kartu.terbuka { color: var(--navy); background: var(--white); background-image: none; border-color: var(--blue); }
.memori-kartu.cocok { color: #1D6A68; background: var(--mint-50); background-image: none; border-color: var(--mint); }

@media (max-width: 560px) {
  .cocok-grid { gap: .5rem; }
  .cocok-kartu { font-size: .92rem; padding: .5rem .6rem; }
  .memori-grid, .memori-grid.padat { grid-template-columns: repeat(3, 1fr); }
  .memori-kartu { font-size: .85rem; }
  .pasang-kepala, .pasang-baris { grid-template-columns: 1fr 1fr 32px; gap: .35rem; }
}

/* =========================================================
   Ver 1.4 - Kelas dan Tugas
   ========================================================= */
.baris-form { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.baris-form .field { flex: 1; min-width: 180px; margin: 0; }
.baris-form .btn { flex-shrink: 0; }

.kelas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.kelas-kartu {
  display: block; text-decoration: none; color: inherit;
  background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--navy);
  border-radius: var(--r-md); padding: 1.25rem;
}
.kelas-kartu:hover { border-color: var(--navy); }
.kelas-nama { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.2; }
.kelas-tahun { color: var(--muted); font-size: .9rem; margin-bottom: .9rem; }
.kelas-kode { display: flex; justify-content: space-between; align-items: center; background: var(--gold-50); border: 1px dashed #E5C77F; border-radius: var(--r-sm); padding: .5rem .75rem; }
.kelas-kode span { font-size: .8rem; color: #7A5512; font-weight: 600; }
.kelas-kode b { font-size: 1.15rem; letter-spacing: .15em; color: var(--navy); }
.kelas-angka { display: flex; gap: 1rem; margin-top: .8rem; color: var(--muted); font-size: .9rem; font-weight: 600; }

.kode-panel { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; border-top: 6px solid var(--gold); }
.kode-besar { font-size: clamp(2.2rem, 7vw, 3rem); font-weight: 800; letter-spacing: .2em; color: var(--navy); line-height: 1.2; }
.kode-aksi { display: flex; gap: .5rem; flex-wrap: wrap; }

.tugas-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.tugas-form .field:first-child { grid-column: 1 / -1; max-width: 560px; }
.tugas-form .field select, .tugas-form .field input { min-height: 46px; }

.tugas-kartu {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1rem; border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--r-sm); margin-bottom: .75rem;
}
.tugas-kartu.penting { border-left-color: var(--gold); background: #FFFCF4; }
.tugas-judul { font-weight: 800; color: var(--navy); font-size: 1.05rem; }
.tugas-meta { color: var(--muted); font-size: .88rem; margin-bottom: .2rem; }
.tugas-info .status { margin-top: .35rem; }
.status.belum { background: var(--gold-50); color: #7A5512; }
.status.kurang { background: var(--red-50); color: var(--red); }

.kelas-chip { display: flex; flex-wrap: wrap; gap: .5rem; }

.tabel.rekap th, .tabel.rekap td { text-align: center; }
.tabel.rekap th:first-child, .tabel.rekap td:first-child { text-align: left; }
.sel-tuntas { background: var(--mint-50); color: #1D6A68; font-weight: 800; }
.sel-belum { background: var(--red-50); color: var(--red); font-weight: 800; }
.sel-kosong { color: var(--muted); }

@media (max-width: 900px) {
  .tugas-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .tugas-kartu { flex-direction: column; align-items: stretch; }
  .tugas-kartu .btn { width: 100%; }
}

/* =========================================================
   Ver 1.5 - Generator AI
   ========================================================= */
.ai-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.ai-ajak {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
  text-decoration: none; color: inherit; border: 2px solid var(--gold); background: var(--gold-50);
}
.ai-ajak:hover { background: #F8EDD3; }
.ai-kartu {
  display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; cursor: pointer;
  padding: 1rem; margin-top: .75rem; border: 1px solid var(--line); border-left: 5px solid var(--mint); border-radius: var(--r-sm);
}
.ai-kartu.bermasalah { border-left-color: var(--red); }
.ai-kartu input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--navy); }
.ai-kartu p { margin: .3rem 0 0; }
.ai-no { display: block; font-size: .78rem; font-weight: 800; color: var(--muted); margin-bottom: .2rem; }
.ai-opsi { margin: .4rem 0 0; padding-left: 1.4rem; }
.ai-opsi li { margin-bottom: .15rem; }
.ai-opsi li.kunci { color: #1D6A68; font-weight: 800; }
.ai-opsi li.kunci::after { content: "  (kunci)"; font-weight: 600; font-size: .85em; }
.kunci-rumpang { color: #1D6A68; background: var(--mint-50); padding: 0 .25rem; border-radius: 4px; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .ai-grid { grid-template-columns: 1fr; } }

/* =========================================================
   Ver 1.6 - Aksesibilitas
   ========================================================= */
@font-face {
  font-family: "OpenDyslexic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/opendyslexic@5.3.0/latin-400-normal.woff2) format("woff2"),
       url(https://cdn.jsdelivr.net/fontsource/fonts/opendyslexic@5.3.0/latin-400-normal.woff) format("woff");
}
@font-face {
  font-family: "OpenDyslexic"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/opendyslexic@5.3.0/latin-700-normal.woff2) format("woff2"),
       url(https://cdn.jsdelivr.net/fontsource/fonts/opendyslexic@5.3.0/latin-700-normal.woff) format("woff");
}

/* Tombol pengaturan tampilan */
.a11y-tombol {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  min-height: 40px; padding: 0 .85rem; font: 700 .85rem var(--font);
  border-radius: 999px; border: 2px solid var(--line); background: var(--white); color: var(--navy);
}
.a11y-tombol svg { width: 20px; height: 20px; }
.a11y-tombol.mengambang { position: fixed; right: 1rem; bottom: 1rem; z-index: 30; box-shadow: 0 6px 18px -6px rgba(10,22,40,.35); }
.a11y-tombol.sebaris { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); margin-left: auto; margin-right: .75rem; }
.main-atas { flex-wrap: wrap; }
@media (max-width: 900px) { .a11y-tombol.mengambang { bottom: 5rem; } }
@media (max-width: 560px) { .a11y-tombol span { display: none; } .a11y-tombol { padding: 0 .6rem; } }

.a11y-panel { text-align: left; }
.a11y-baris { margin: 1rem 0; }
.a11y-pilih { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.a11y-pilih button {
  min-height: 52px; cursor: pointer; font-weight: 800; color: var(--navy);
  background: var(--soft); border: 2px solid var(--line); border-radius: var(--r-sm);
}
.a11y-pilih button[aria-pressed="true"] { border-color: var(--navy); background: #EDF2F9; }
.a11y-saklar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; cursor: pointer;
  padding: .8rem 0; border-top: 1px solid var(--line);
}
.a11y-saklar small { color: var(--muted); }
.a11y-saklar input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--navy); }

/* Tombol dengarkan soal */
.dengar-baris { display: flex; justify-content: flex-end; margin-bottom: .5rem; }
.tombol-dengar { gap: .4rem; }

/* Huruf ramah disleksia (huruf Arab tetap memakai Scheherazade) */
html[data-huruf="disleksia"] body,
html[data-huruf="disleksia"] input,
html[data-huruf="disleksia"] textarea,
html[data-huruf="disleksia"] select,
html[data-huruf="disleksia"] button,
html[data-huruf="disleksia"] .soal-teks,
html[data-huruf="disleksia"] .opsi,
html[data-huruf="disleksia"] .cocok-kartu,
html[data-huruf="disleksia"] .urut-teks,
html[data-huruf="disleksia"] .rumpang-teks,
html[data-huruf="disleksia"] .rumpang-isi,
html[data-huruf="disleksia"] .memori-kartu {
  font-family: "OpenDyslexic", "Scheherazade New", system-ui, sans-serif !important;
  letter-spacing: .02em; word-spacing: .12em;
}
html[data-huruf="disleksia"] body { line-height: 1.8; }
html[data-huruf="disleksia"] .arab { font-family: var(--font-arab) !important; }

/* Kontras tinggi */
html[data-kontras="1"] {
  --ink: #000000; --muted: #1A1A1A; --line: #1A1A1A; --soft: #FFFFFF;
  --navy: #0B1F3A; --blue: #0B4A8F; --mint: #0B6B66; --red: #A30000;
}
html[data-kontras="1"] body { background: #FFFFFF; }
html[data-kontras="1"] .hint, html[data-kontras="1"] .who, html[data-kontras="1"] small { color: #1A1A1A !important; }
html[data-kontras="1"] .panel, html[data-kontras="1"] .stat, html[data-kontras="1"] .soal-kartu,
html[data-kontras="1"] .opsi, html[data-kontras="1"] .cocok-kartu, html[data-kontras="1"] .urut-item,
html[data-kontras="1"] .tabel td, html[data-kontras="1"] .field input, html[data-kontras="1"] .field textarea,
html[data-kontras="1"] .field select { border-width: 2px; border-color: #000000; }
html[data-kontras="1"] a:not(.btn):not(.logo):not(.bottom-nav a):not(.menu a):not(.kelas-kartu):not(.ai-ajak):not(.create-opt) { text-decoration: underline; }
html[data-kontras="1"] .opsi.benar, html[data-kontras="1"] .cocok-kartu.benar, html[data-kontras="1"] .urut-item.benar { outline: 4px solid var(--mint); }
html[data-kontras="1"] .opsi.salah, html[data-kontras="1"] .cocok-kartu.salah, html[data-kontras="1"] .urut-item.salah { outline: 4px dashed var(--red); }
html[data-kontras="1"] .memori-kartu { background-image: none; }

/* =========================================================
   Ver 1.7 - Sesi Live
   ========================================================= */
.live-host { background: var(--navy); color: var(--white); min-height: 100vh; }
.live-atas { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.5rem; }
.live-atas .logo { color: var(--white); }
.live-atas .logo-mark { background: var(--gold); color: var(--navy-900); }
.live-info { margin-left: auto; font-size: 1.1rem; }
.live-info b { letter-spacing: .12em; color: var(--gold); }
.live-layar { color: var(--white); border-color: rgba(255,255,255,.4); }
.live-isi { padding: 1rem 1.5rem 2rem; display: grid; place-items: center; min-height: calc(100vh - 70px); }
.live-kartu { background: var(--white); color: var(--ink); border-radius: var(--r-lg); padding: 1.75rem; width: 100%; }
.live-kecil { color: var(--muted); font-size: .95rem; margin: 0 0 .5rem; }
.live-tunggu { font-size: 1.2rem; }

.live-lobi { display: grid; grid-template-columns: 1fr 1.3fr; gap: 1.25rem; width: min(1200px, 100%); align-items: start; }
.live-gabung { text-align: center; }
.live-pin { font-size: clamp(3.5rem, 9vw, 6.5rem); font-weight: 800; letter-spacing: .15em; color: var(--navy); line-height: 1.1; margin: .25rem 0 .75rem; }
.live-gabung canvas { margin: 0 auto .5rem; border: 1px solid var(--line); border-radius: var(--r-sm); }
.live-nama-wadah { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; max-height: 46vh; overflow-y: auto; }
.live-nama { background: var(--soft); border: 2px solid var(--line); border-radius: 999px; padding: .35rem .9rem; font-weight: 700; color: var(--navy); animation: muncul .35s ease; }
@keyframes muncul { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.live-tayang { width: min(1200px, 100%); }
.live-waktu { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 1rem; }
.live-waktu span { display: block; height: 100%; background: var(--gold); transition: width 1s linear; }
.live-baris-atas { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.live-hitung { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; background: var(--navy); color: var(--white); font-size: 2.4rem; font-weight: 800; }
.live-hitung.kecil { width: 48px; height: 48px; font-size: 1.3rem; }
.live-soal { font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 800; color: var(--navy); line-height: 1.4; text-align: center; margin: 1rem 0 1.5rem; white-space: pre-wrap; font-family: "Plus Jakarta Sans", "Scheherazade New", sans-serif; }
.live-soal.kecil { font-size: clamp(1.2rem, 2.4vw, 1.6rem); text-align: left; margin: .5rem 0 1rem; }
.live-opsi { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem; }
.live-opsi-item {
  display: flex; align-items: center; gap: .9rem; padding: 1rem 1.25rem; min-height: 86px; border-radius: var(--r-md);
  color: var(--white); font-size: clamp(1.1rem, 2.2vw, 1.6rem); font-weight: 800; line-height: 1.35;
  font-family: "Plus Jakarta Sans", "Scheherazade New", sans-serif;
}
.live-opsi.dua .live-opsi-item { justify-content: center; font-size: 2rem; }
.live-opsi-item .huruf { flex-shrink: 0; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.25); display: grid; place-items: center; }
.live-opsi-item.w0 { background: #2B6CB0; } .live-opsi-item.w1 { background: #C05621; }
.live-opsi-item.w2 { background: #6B46C1; } .live-opsi-item.w3 { background: #2C7A7B; }
.live-opsi-item.w4 { background: #C53030; } .live-opsi-item.w5 { background: #975A16; }

.live-hasil { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.25rem; width: min(1200px, 100%); align-items: start; }
.live-sebaran { display: flex; justify-content: center; align-items: flex-end; gap: 1.25rem; margin: 1rem 0; min-height: 190px; }
.sebaran-kolom { display: flex; flex-direction: column; align-items: center; gap: .35rem; font-weight: 700; color: var(--muted); }
.sebaran-kolom .batang { width: 64px; background: #CBD5E0; border-radius: 8px 8px 0 0; }
.sebaran-kolom b { font-size: 1.4rem; color: var(--navy); }
.sebaran-kolom.benar { color: #1D6A68; }
.sebaran-kolom.benar .batang { background: var(--mint); }

.live-papan { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .5rem; }
.live-papan li { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: .75rem; padding: .7rem 1rem; background: var(--soft); border-radius: var(--r-sm); font-size: 1.15rem; animation: muncul .35s ease; }
.live-papan .no { font-weight: 800; color: var(--muted); }
.live-papan .nama { font-weight: 700; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-papan b { color: var(--navy); }
.live-papan .juara-1 { background: #FBF0D5; border: 2px solid var(--gold); }
.live-papan .juara-2 { background: #EDF2F7; border: 2px solid #A0AEC0; }
.live-papan .juara-3 { background: #F7E6DA; border: 2px solid #C08457; }
.live-papan.terang li { font-size: 1rem; }

.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 1rem; margin: 1.5rem auto 0; max-width: 640px; }
.podium-kolom { display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.podium-nama { font-weight: 800; color: var(--navy); font-size: 1.2rem; text-align: center; overflow-wrap: anywhere; }
.podium-skor { color: var(--muted); font-weight: 700; }
.podium-balok { width: 100%; display: grid; place-items: center; color: var(--white); font-size: 2.6rem; font-weight: 800; border-radius: 10px 10px 0 0; }
.p1 .podium-balok { height: 190px; background: var(--gold); }
.p2 .podium-balok { height: 140px; background: #718096; }
.p3 .podium-balok { height: 105px; background: #A0623A; }

/* Sisi siswa */
.live-namaku { font-size: 1.8rem; font-weight: 800; color: var(--navy); margin: .25rem 0; }
.live-titik { display: flex; justify-content: center; gap: .5rem; margin: 1rem 0; }
.live-titik span { width: 12px; height: 12px; border-radius: 50%; background: var(--gold); animation: denyut 1.2s infinite ease-in-out; }
.live-titik span:nth-child(2) { animation-delay: .2s; } .live-titik span:nth-child(3) { animation-delay: .4s; }
@keyframes denyut { 0%, 80%, 100% { transform: scale(.5); opacity: .4; } 40% { transform: scale(1); opacity: 1; } }
.live-hasil-ikon { font-size: 2rem; font-weight: 800; padding: 1rem; border-radius: var(--r-md); }
.live-hasil-ikon.benar { background: var(--mint-50); color: #1D6A68; }
.live-hasil-ikon.sebagian { background: var(--gold-50); color: #7A5512; }
.live-hasil-ikon.salah { background: var(--red-50); color: var(--red); }
.live-poin { font-size: 2.4rem; font-weight: 800; color: var(--navy); margin: .5rem 0 0; }

@media (max-width: 900px) {
  .live-lobi, .live-hasil { grid-template-columns: 1fr; }
  .live-opsi { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .live-nama, .live-papan li, .live-titik span { animation: none; } }

/* =========================================================
   Ver 1.8 - Laporan nilai
   ========================================================= */
.laporan-filter { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.grafik-tugas { display: grid; gap: .6rem; }
.grafik-baris { display: grid; grid-template-columns: minmax(0, 2fr) 3fr auto; gap: .75rem; align-items: center; }
.grafik-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.grafik-batang { position: relative; height: 18px; background: var(--line); border-radius: 999px; overflow: hidden; }
.grafik-batang span { display: block; height: 100%; background: var(--mint); border-radius: 999px; }
.grafik-batang span.rendah { background: var(--red); }
.grafik-batang i { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--navy); }
.grafik-nilai { font-weight: 800; color: var(--navy); min-width: 80px; text-align: right; }
.grafik-nilai small { font-weight: 500; color: var(--muted); }
.remedial-item { display: inline-block; margin: .15rem .25rem .15rem 0; padding: .15rem .55rem; border-radius: 999px; font-size: .82rem; background: var(--red-50); color: var(--red); }
.remedial-item.kosong { background: var(--gold-50); color: #7A5512; }
.print-only { display: none; }

@media (max-width: 900px) {
  .laporan-filter { grid-template-columns: 1fr 1fr; }
  .grafik-baris { grid-template-columns: 1fr auto; }
  .grafik-batang { grid-column: 1 / -1; grid-row: 2; }
}

@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 10.5pt; }
  .sidebar, .bottom-nav, .no-print, .a11y-tombol, .toast, .user-pill, .main-head { display: none !important; }
  .print-only { display: block; }
  .app { display: block; }
  .main { padding: 0; }
  .panel, .stat { border: 1px solid #999; break-inside: avoid; box-shadow: none; }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .tabel th, .tabel td { padding: .3rem .4rem; }
  .tabel-wrap { overflow: visible; }
  .sel-tuntas, .sel-belum, .status, .grafik-batang span, .remedial-item { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; text-decoration: none; }
}

/* =========================================================
   Ver 1.9 - Panel admin dan impor siswa
   ========================================================= */
.admin-cari { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.admin-cari input { flex: 1; min-width: 200px; min-height: 42px; padding: 0 .8rem; border: 2px solid var(--line); border-radius: var(--r-sm); font: 1rem var(--font); }
.tab-peran { display: inline-flex; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; }
.tab-peran button { border: 0; background: var(--white); padding: .45rem .9rem; font: 700 .88rem var(--font); color: var(--muted); cursor: pointer; }
.tab-peran button[aria-pressed="true"] { background: var(--navy); color: var(--white); }
.tabel select { min-height: 36px; border: 1px solid var(--line); border-radius: 6px; font: .9rem var(--font); padding: 0 .4rem; }

/* =========================================================
   Ver 2.0 - Impor soal
   ========================================================= */
.tambah-baris { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.impor-modal { text-align: left; width: min(760px, 100%); }
.impor-modal textarea { width: 100%; min-height: 260px; padding: .75rem; font: .92rem/1.6 ui-monospace, Consolas, monospace; border: 2px solid var(--line); border-radius: var(--r-sm); margin: .75rem 0 .5rem; }
.impor-modal textarea:focus { outline: none; border-color: var(--blue); }
.impor-contoh { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .5rem .8rem; }
.impor-contoh summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.impor-contoh pre { white-space: pre-wrap; font: .85rem/1.5 ui-monospace, Consolas, monospace; margin: .5rem 0; }
.impor-mode { margin: .5rem 0 1rem; }
@media (max-width: 560px) { .tambah-baris { grid-template-columns: 1fr; } }

/* =========================================================
   Ver 2.1 - Aplikasi terpasang dan profil
   ========================================================= */
.pil-tautan { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; }
a.user-pill:hover, .user-pill a:hover { box-shadow: 0 0 0 3px rgba(43,108,176,.25); border-radius: 999px; }
.ajak-pasang {
  position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: .75rem; width: min(520px, calc(100% - 1.5rem));
  padding: .75rem .9rem; background: var(--white); border: 2px solid var(--gold); border-radius: var(--r-md);
  box-shadow: 0 12px 32px -10px rgba(10,22,40,.4);
}
.ajak-pasang img { border-radius: 10px; flex-shrink: 0; }
.ajak-teks { flex: 1; display: grid; font-size: .88rem; color: var(--muted); line-height: 1.4; }
.ajak-teks b { color: var(--navy); font-size: .98rem; }
.ajak-tutup { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--muted); cursor: pointer; padding: .25rem .4rem; }
@media (max-width: 900px) { .ajak-pasang { bottom: 5rem; } }

.profil-kepala { display: flex; align-items: center; gap: 1rem; margin: 1rem 0; }
.avatar.besar { width: 64px; height: 64px; font-size: 1.4rem; }
.profil-nama { font-size: 1.3rem; font-weight: 800; color: var(--navy); margin-bottom: .25rem; }
.profil-info { display: grid; gap: .4rem; background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: .75rem 1rem; margin-bottom: 1rem; }
.profil-info div { display: flex; justify-content: space-between; gap: 1rem; }
.profil-info span { color: var(--muted); }
.profil-sub { font-size: 1.1rem; margin: 1.5rem 0 .75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.profil-bawah { display: flex; justify-content: space-between; gap: .5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* =========================================================
   Ver 2.2 - Galeri guru
   ========================================================= */
.galeri-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.galeri-kartu { display: flex; flex-direction: column; gap: .35rem; background: var(--white); border: 1px solid var(--line); border-top: 5px solid var(--teal, #319795); border-radius: var(--r-md); padding: 1.1rem; }
.galeri-kartu h3 { margin: .2rem 0; font-size: 1.12rem; color: var(--navy); }
.galeri-kartu .aksi { margin-top: auto; padding-top: .6rem; }
.galeri-jenis { align-self: flex-start; font-size: .75rem; font-weight: 800; color: #1D6A68; background: var(--mint-50); padding: .15rem .55rem; border-radius: 999px; }
.galeri-desk { margin: 0; color: var(--ink); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.galeri-meta { margin: 0; color: var(--muted); font-size: .85rem; }
.galeri-ajak { border-color: #319795; background: var(--mint-50); }
.status.galeri { background: var(--mint-50); color: #1D6A68; }
.pratinjau-daftar { max-height: 55vh; overflow-y: auto; padding-left: 1.4rem; margin: .5rem 0 1rem; }
.pratinjau-daftar > li { margin-bottom: .9rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }

/* =========================================================
   Ver 2.3 - Susun ayat
   ========================================================= */
.badge-khas { display: inline-block; margin-left: .35rem; padding: .1rem .5rem; font-size: .7rem; font-weight: 800; color: #7A5512; background: var(--gold-50); border: 1px solid #E5C77F; border-radius: 999px; vertical-align: middle; }
.type-khas { border-color: var(--gold); }
.arab-isian { font-family: "Scheherazade New", serif !important; font-size: 1.7rem; line-height: 2.2; min-height: 120px; }
.ayat-terjemah { background: var(--soft); border-left: 4px solid var(--teal, #319795); padding: .6rem .9rem; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-style: italic; color: var(--ink); }
.ayat-susun, .ayat-bank { display: flex; flex-wrap: wrap; gap: .5rem; align-content: flex-start; }
.ayat-susun { min-height: 92px; padding: .75rem; margin: .5rem 0 1rem; background: var(--gold-50); border: 2px dashed var(--gold); border-radius: var(--r-md); }
.ayat-kosong { font-family: var(--font); font-size: .9rem; color: #7A5512; align-self: center; margin: 0 auto; }
.kata-ayat {
  font-family: "Scheherazade New", serif !important; font-size: 1.8rem; line-height: 1.6;
  min-height: 56px; padding: .1rem .8rem; cursor: pointer; color: var(--navy);
  background: var(--white); border: 2px solid var(--line); border-radius: var(--r-sm);
}
.kata-ayat:hover:not([disabled]) { border-color: var(--blue); }
.kata-ayat.terpilih { border-color: var(--gold); }
.kata-ayat.benar { border-color: var(--mint) !important; background: var(--mint-50); }
.kata-ayat.salah { border-color: var(--red) !important; background: var(--red-50); }
@media (max-width: 560px) { .kata-ayat { font-size: 1.5rem; padding: .1rem .6rem; } }

/* =========================================================
   Ver 2.4 - Tebak tajwid
   ========================================================= */
.tajwid-ayat, .tajwid-pratinjau {
  font-family: "Scheherazade New", serif; font-size: 2rem; line-height: 2.3; text-align: center;
  color: var(--navy); background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: .6rem 1rem; margin: .25rem 0 1rem;
}
.tajwid-pratinjau { font-size: 1.6rem; margin-top: .5rem; }
.tajwid-ayat.besar { font-size: clamp(2.2rem, 4.5vw, 3.4rem); background: var(--white); border: 0; }
.lafaz-tanda { background: #FBE7A8; color: var(--navy); padding: 0 .3rem; border-radius: 8px; box-shadow: inset 0 -4px 0 var(--gold); }

/* =========================================================
   Ver 2.5 - Kelompokkan, Susun kalimat, Roda kata A-Z
   ========================================================= */
/* Editor */
.kelompok-editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; margin-bottom: .6rem; }
.kelompok-ed { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem; background: var(--soft); }
.kelompok-ed-atas { display: grid; grid-template-columns: 1fr 36px; gap: .4rem; margin-bottom: .4rem; }
.kelompok-ed input, .kelompok-ed textarea, .roda-ed-baris input, .roda-ed-baris select {
  width: 100%; min-height: 40px; padding: .4rem .6rem; font: .95rem var(--font); border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--white);
}
.kelompok-ed input { font-weight: 700; }
.roda-ed-kepala, .roda-ed-baris { display: grid; grid-template-columns: 52px 120px 2fr 1fr 36px; gap: .4rem; align-items: center; }
.roda-ed-kepala { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; }
.roda-ed-baris { margin-bottom: .4rem; }
@media (max-width: 700px) {
  .roda-ed-kepala { display: none; }
  .roda-ed-baris { grid-template-columns: 52px 1fr 36px; padding-bottom: .5rem; border-bottom: 1px dashed var(--line); }
  .roda-ed-baris [data-rpetunjuk], .roda-ed-baris [data-rjawab] { grid-column: 1 / -1; }
}

/* Pemain: Kelompokkan */
.kelompok-bank { display: flex; flex-wrap: wrap; gap: .5rem; min-height: 52px; margin-bottom: .9rem; }
.kelompok-kartu {
  padding: .55rem .8rem; min-height: 44px; cursor: pointer; text-align: left; line-height: 1.4;
  font: 600 .95rem "Plus Jakarta Sans", "Scheherazade New", sans-serif; color: var(--ink);
  background: var(--white); border: 2px solid var(--line); border-radius: var(--r-sm);
}
.kelompok-kartu.aktif { border-color: var(--gold); background: var(--gold-50); box-shadow: 0 0 0 3px rgba(214,158,46,.25); }
.kelompok-kartu.terpasang { width: 100%; font-size: .9rem; }
.kelompok-kartu.benar { border-color: var(--mint) !important; background: var(--mint-50); }
.kelompok-kartu.salah { border-color: var(--red) !important; background: var(--red-50); }
.kelompok-kolom-wadah { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: .6rem; }
.kelompok-kolom { display: flex; flex-direction: column; gap: .4rem; min-height: 130px; padding: .5rem; border: 2px dashed var(--line); border-radius: var(--r-md); background: var(--soft); cursor: pointer; }
.kelompok-kolom.siap { border-color: var(--blue); background: #EBF4FF; }
.kelompok-judul { font-weight: 800; color: var(--navy); text-align: center; padding-bottom: .3rem; border-bottom: 2px solid var(--line); }
@media (max-width: 560px) { .kelompok-kolom-wadah { grid-template-columns: repeat(min(var(--n), 2), minmax(0, 1fr)); } }

/* Pemain: Susun kalimat (memakai gaya kepingan ayat, huruf latin) */
.ayat-susun.latin { background: #EBF4FF; border-color: var(--blue); }
.kata-ayat.latin { font-family: "Plus Jakarta Sans", sans-serif !important; font-size: 1.05rem; font-weight: 700; min-height: 46px; padding: .3rem .8rem; }

/* Pemain: Roda kata */
.roda-lingkar { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-bottom: 1rem; }
.roda-huruf { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--navy); background: var(--soft); border: 2px solid var(--line); }
.roda-huruf.kini { background: var(--gold); border-color: var(--gold); color: var(--navy-900, #0F2541); transform: scale(1.12); }
.roda-huruf.terjawab { background: var(--navy); border-color: var(--navy); color: var(--white); }
.roda-huruf.lewat { background: #E2E8F0; border-style: dashed; color: var(--muted); }
.roda-huruf.benar { background: var(--mint); border-color: var(--mint); color: var(--white); }
.roda-huruf.salah { background: var(--red); border-color: var(--red); color: var(--white); }
.roda-aturan { display: inline-block; font-size: .85rem; font-weight: 700; color: #7A5512; background: var(--gold-50); padding: .2rem .7rem; border-radius: 999px; margin-bottom: .5rem; }
.roda-isi { width: 100%; min-height: 52px; padding: 0 .9rem; font: 700 1.15rem var(--font); border: 2px solid var(--line); border-radius: var(--r-sm); margin-bottom: .6rem; }
.roda-isi:focus { outline: none; border-color: var(--blue); }
.roda-tombol { display: grid; grid-template-columns: 2fr 1fr; gap: .5rem; }

/* =========================================================
   Ver 2.6 - Cari kata dan Teka-teki silang
   ========================================================= */
.tts-ed-kepala, .tts-ed-baris { display: grid; grid-template-columns: 2fr 1fr 36px; gap: .4rem; align-items: center; }
.tts-ed-kepala { font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: .3rem; }
.tts-ed-baris { margin-bottom: .4rem; }
.tts-ed-baris input { width: 100%; min-height: 40px; padding: .4rem .6rem; font: .95rem var(--font); border: 2px solid var(--line); border-radius: var(--r-sm); }

/* Cari kata */
.ck-kisi { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 2px; max-width: 520px; margin: 0 auto .75rem; user-select: none; }
.ck-sel {
  aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; cursor: pointer;
  font: 800 clamp(.72rem, 3.2vw, 1.05rem) var(--font); color: var(--navy); background: var(--soft);
}
.ck-sel.pilih { background: var(--gold); color: var(--white); }
.ck-sel.temu { color: var(--white); }
.ck-sel.temu.w0 { background: #2B6CB0; } .ck-sel.temu.w1 { background: #805AD5; } .ck-sel.temu.w2 { background: #DD6B20; }
.ck-sel.temu.w3 { background: #319795; } .ck-sel.temu.w4 { background: #D53F8C; } .ck-sel.temu.w5 { background: #1A365D; }
.ck-sel.temu.w6 { background: #B7791F; } .ck-sel.temu.w7 { background: #38A169; }
.ck-daftar { list-style: none; padding: 0; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; }
.ck-daftar li { padding: .25rem .7rem; border-radius: 999px; background: var(--white); border: 2px solid var(--line); font-weight: 700; font-size: .9rem; color: var(--navy); }
.ck-daftar li.temu { text-decoration: line-through; color: #1D6A68; border-color: var(--mint); background: var(--mint-50); }
.ck-daftar li.terlewat { color: var(--red); border-color: var(--red); background: var(--red-50); }

/* Teka-teki silang */
.tts-gulir { display: flex; overflow-x: auto; padding-bottom: .25rem; max-width: 100%; }
/* Ukuran kotak menyesuaikan lebar layar: maksimal 38px, minimal 22px (bila tetap tidak muat, kisi bisa digeser) */
.tts-kisi {
  --sel: clamp(20px, calc((min(100vw, 760px) - 5.5rem) / var(--lebar) - 2px), 38px);
  display: grid; grid-template-columns: repeat(var(--lebar), var(--sel)); gap: 2px; width: max-content;
  margin: 0 auto;   /* di dalam flex: tengah bila muat, mulai dari kiri bila lebih lebar (tidak terpotong) */
}
.tts-sel input { font-size: calc(var(--sel) * .5); }
#area, .main-kartu { min-width: 0; }
.tts-sel, .tts-kosong { aspect-ratio: 1; position: relative; }
.tts-sel { background: var(--white); border: 2px solid var(--navy); border-radius: 4px; }
.tts-sel.aktif { background: var(--gold-50); border-color: var(--gold); }
.tts-sel.benar { background: var(--mint-50); border-color: var(--mint); }
.tts-sel.salah { background: var(--red-50); border-color: var(--red); }
.tts-sel input { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; text-align: center; font: 800 1.05rem var(--font); color: var(--navy); text-transform: uppercase; padding: 8px 0 0; }
.tts-sel input:focus { outline: 2px solid var(--blue); outline-offset: -2px; }
.tts-no { position: absolute; top: 1px; left: 3px; font-size: .58rem; font-weight: 800; color: var(--muted); pointer-events: none; }
.tts-aktif { margin: .75rem 0; padding: .5rem .75rem; background: var(--gold-50); border-radius: var(--r-sm); font-size: .95rem; min-height: 2.4em; }
.tts-petunjuk { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tts-petunjuk h4 { margin: 0 0 .3rem; color: var(--navy); }
.tts-petunjuk ol { list-style: none; padding: 0; margin: 0; }
.tts-petunjuk li { padding: .35rem .5rem; border-radius: 6px; cursor: pointer; font-size: .92rem; line-height: 1.45; }
.tts-petunjuk li.aktif { background: var(--gold-50); }
@media (max-width: 560px) { .tts-petunjuk { grid-template-columns: 1fr; } }

/* =========================================================
   Ver 2.7 - Gambar pada soal dan Label gambar
   ========================================================= */
.gambar-ed { display: grid; gap: .5rem; }
.gambar-ed img { max-width: 100%; max-height: 260px; object-fit: contain; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--soft); justify-self: start; }
.soal-gambar { display: block; max-width: 100%; max-height: 42vh; margin: 0 auto 1rem; object-fit: contain; border-radius: var(--r-md); background: var(--soft); }
.live-gambar { display: block; max-width: 100%; max-height: 34vh; margin: 0 auto .5rem; object-fit: contain; border-radius: var(--r-md); }

.label-gambar { position: relative; display: block; width: fit-content; max-width: 100%; margin: 0 auto 1rem; line-height: 0; }
.label-gambar.ed { cursor: crosshair; }
.label-gambar img { display: block; max-width: 100%; max-height: 60vh; border-radius: var(--r-md); border: 1px solid var(--line); }
.label-titik {
  position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; line-height: 1;
  font: 800 .9rem var(--font); color: var(--white); background: var(--navy); border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,.35); cursor: pointer;
}
.label-titik.statis { position: static; transform: none; flex-shrink: 0; cursor: default; box-shadow: none; border-color: var(--navy); }
.label-titik.terisi { background: var(--blue); }
.label-titik.benar { background: var(--mint); }
.label-titik.salah { background: var(--red); }
.titik-baris { display: flex; align-items: center; gap: .5rem; margin-bottom: .45rem; }
.titik-baris input, .titik-baris select { flex: 1; min-height: 44px; padding: 0 .7rem; font: 1rem var(--font); border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.titik-baris select.benar { border-color: var(--mint); background: var(--mint-50); }
.titik-baris select.salah { border-color: var(--red); background: var(--red-50); }

/* =========================================================
   Ver 2.8 - Kuis arkade, Slide, Simak audio, Kuis video, Dialog
   ========================================================= */
/* Kuis arkade */
.arkade-jalur { position: relative; height: 14px; background: var(--line); border-radius: 999px; margin-bottom: 1.6rem; overflow: visible; }
.arkade-maju { display: block; height: 100%; background: linear-gradient(90deg, var(--mint), var(--gold)); border-radius: 999px; transition: width .6s ease; }
.arkade-bendera { position: absolute; right: 0; top: 18px; font-size: .75rem; font-weight: 800; color: var(--navy); }
.arkade-panggung { position: relative; height: 230px; margin: .5rem 0; background: linear-gradient(#EBF4FF, #F7FAFC 70%); border-radius: var(--r-md); overflow: hidden; }
.arkade-tokoh { position: absolute; top: 18px; width: 44px; height: 52px; transform: translateX(-50%); transition: left .45s ease, top .45s ease, transform .45s ease; z-index: 2; }
.arkade-tokoh svg { width: 100%; height: 100%; }
.arkade-tokoh.lompat { top: 70px; transform: translateX(-50%) scale(1.08); }
.arkade-tokoh.mendarat { top: 96px; }
.arkade-tokoh.jatuh { top: 260px; transform: translateX(-50%) rotate(35deg); transition-duration: .7s; }
.arkade-pijakan { position: absolute; left: 0; right: 0; bottom: 14px; display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: .5rem; padding: 0 .5rem; }
.pijakan {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; min-height: 92px; padding: .4rem;
  font: 700 .95rem "Plus Jakarta Sans", "Scheherazade New", sans-serif; line-height: 1.3; color: var(--white); text-align: center;
  border: 0; border-top: 8px solid rgba(0,0,0,.18); border-radius: 10px 10px 4px 4px; cursor: pointer;
}
.pijakan .huruf { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.25); font-size: .8rem; }
.pijakan.p0 { background: #2B6CB0; } .pijakan.p1 { background: #C05621; } .pijakan.p2 { background: #6B46C1; } .pijakan.p3 { background: #2C7A7B; }
.pijakan.benar { outline: 4px solid var(--mint); background: var(--mint) !important; }
.pijakan.salah { opacity: .55; }
.pijakan.redup { opacity: .45; }

/* Tayangan slide */
.slide-kartu { background: var(--white); border: 1px solid var(--line); border-top: 6px solid var(--gold); border-radius: var(--r-md); padding: 1.1rem; margin-bottom: 1rem; }
.slide-kartu h2 { font-size: 1.35rem; margin: 0 0 .75rem; }
.slide-teks { white-space: pre-wrap; line-height: 1.75; font-size: 1.05rem; font-family: "Plus Jakarta Sans", "Scheherazade New", sans-serif; }
.slide-tanya { border-top: 2px dashed var(--line); padding-top: 1rem; }

/* Simak audio */
.audio-kotak { background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-md); padding: .9rem; margin-bottom: 1rem; text-align: center; }
.audio-kotak audio { width: 100%; }
.benar-isi { border-color: var(--mint) !important; background: var(--mint-50); }
.salah-isi { border-color: var(--red) !important; background: var(--red-50); }
.rekam-lampu { width: 64px; height: 64px; border-radius: 50%; margin: .5rem auto; background: var(--line); }
.rekam-lampu.nyala { background: var(--red); animation: denyut 1.2s infinite ease-in-out; }
.rekam-waktu { text-align: center; font-size: 1.5rem; font-weight: 800; color: var(--navy); margin: .25rem 0; }

/* Kuis video */
.video-bingkai { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--r-md); overflow: hidden; margin-bottom: .6rem; }
.video-bingkai iframe, .video-bingkai [data-yt] { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-tanya { position: absolute; inset: 0; z-index: 3; overflow-y: auto; background: rgba(15,37,65,.94); padding: .9rem; color: var(--white); }
.video-tanya .soal-teks { color: var(--white); }
.video-tanya .opsi { background: var(--white); }
.video-titik { border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem; margin-bottom: .6rem; background: var(--soft); }
.video-titik-atas { display: grid; grid-template-columns: 80px 1fr 36px; gap: .4rem; margin-bottom: .4rem; }
.video-titik input, .video-titik textarea { width: 100%; min-height: 40px; padding: .4rem .6rem; font: .95rem var(--font); border: 2px solid var(--line); border-radius: var(--r-sm); background: var(--white); }
.video-hasil { padding-left: 1.2rem; margin: .5rem 0; }
.video-hasil li { margin-bottom: .5rem; padding: .4rem .6rem; border-radius: var(--r-sm); }
.video-hasil li.benar { background: var(--mint-50); } .video-hasil li.salah { background: var(--red-50); }
@media (max-width: 560px) { .video-tanya .opsi { min-height: 46px; padding: .4rem .7rem; } }

/* Dialog */
.dialog-situasi { font-style: italic; color: var(--muted); background: var(--soft); border-radius: var(--r-sm); padding: .6rem .8rem; }
.dialog-obrolan { display: flex; flex-direction: column; gap: .6rem; }
.gelembung { max-width: 85%; padding: .7rem .9rem; border-radius: 16px; line-height: 1.55; font-size: 1.02rem; }
.gelembung.tokoh { align-self: flex-start; background: var(--white); border: 2px solid var(--line); border-bottom-left-radius: 4px; }
.gelembung.saya { align-self: flex-end; background: var(--navy); color: var(--white); border-bottom-right-radius: 4px; }
.gelembung.tokoh.baik { border-color: var(--mint); background: var(--mint-50); }
.gelembung.tokoh.kurang { border-color: var(--gold); background: var(--gold-50); }
.gelembung-nama { display: block; font-size: .78rem; font-weight: 800; color: var(--blue); margin-bottom: .15rem; }
.dialog-pilihan { display: grid; gap: .5rem; }

/* =========================================================
   Ver 2.9 - Pencapaian siswa
   ========================================================= */
.level-kartu { display: flex; gap: 1rem; align-items: center; padding: 1rem; border-radius: var(--r-md); background: linear-gradient(135deg, #1A365D, #2B6CB0); color: var(--white); }
.level-lencana { flex-shrink: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: var(--gold); color: var(--navy); box-shadow: 0 0 0 5px rgba(255,255,255,.25); }
.level-lencana span { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.level-lencana b { font-size: 1.9rem; line-height: 1; }
.level-isi { flex: 1; min-width: 0; }
.level-gelar { font-size: 1.25rem; font-weight: 800; }
.level-bar { height: 12px; background: rgba(255,255,255,.25); border-radius: 999px; overflow: hidden; margin: .4rem 0; }
.level-bar span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .8s ease; }
.level-ket { font-size: .88rem; opacity: .95; }
.lencana-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; }
.lencana { text-align: center; padding: .8rem .6rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--soft); }
.lencana.diraih { background: var(--white); border-color: var(--gold); box-shadow: 0 4px 14px -8px rgba(214,158,46,.8); }
.lencana-ikon { width: 52px; height: 52px; display: block; margin: 0 auto .4rem; }
.lencana-nama { font-weight: 800; color: var(--navy); font-size: .95rem; }
.lencana-syarat { font-size: .78rem; color: var(--muted); line-height: 1.35; margin: .2rem 0 .4rem; min-height: 2.1em; }
.lencana-maju { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.lencana-maju span { display: block; height: 100%; background: var(--blue); }
.lencana-status { font-size: .75rem; font-weight: 700; color: var(--muted); margin-top: .25rem; }
.lencana.diraih .lencana-status { color: #7A5512; }
.peringkat-minggu li.saya { outline: 3px solid var(--blue); }
.xp-hasil { display: grid; justify-items: center; gap: .15rem; margin: .25rem 0 .75rem; }
.xp-hasil b { font-size: 1.4rem; color: #7A5512; background: var(--gold-50); padding: .15rem .9rem; border-radius: 999px; }
.xp-hasil span { font-size: .88rem; color: var(--muted); }
.lencana-baru { display: grid; gap: .5rem; margin-bottom: 1rem; }
.lencana-baru > div { display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: .75rem; align-items: center; padding: .6rem .8rem; border: 2px solid var(--gold); border-radius: var(--r-md); background: var(--gold-50); animation: muncul .5s ease; }
.lencana-baru .lencana-ikon { grid-row: span 2; width: 48px; height: 48px; margin: 0; }
.lencana-baru span { font-size: .85rem; color: var(--muted); }
@media (max-width: 560px) { .lencana-grid { grid-template-columns: repeat(2, 1fr); } }

/* =========================================================
   Ver 3.0 - Generator AI lengkap
   ========================================================= */
.sumber-baris { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.sumber-pdf { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .5rem; font-size: .92rem; }
.sumber-pdf input { width: 80px; min-height: 38px; padding: 0 .5rem; border: 2px solid var(--line); border-radius: var(--r-sm); font: 1rem var(--font); }
.rek-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.rek-kartu { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1rem 1rem 3.2rem; border: 2px solid var(--gold); border-radius: var(--r-md); background: var(--gold-50); }
.rek-kartu h3 { margin: 0; color: var(--navy); font-size: 1.05rem; }
.rek-kartu p { margin: 0; font-size: .92rem; flex: 1; }
.rek-kartu .btn { align-self: flex-start; margin-top: .3rem; }
.rek-no { position: absolute; left: .9rem; top: .9rem; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--white); font-weight: 800; }

/* =========================================================
   Ver 3.0.3 - Satu sekolah: semua mapel, data sekolah, bank soal,
   pengumuman, LKPD, mode tim, latihan ulang, liga kelas
   ========================================================= */
.buat-kepala { display: grid; grid-template-columns: 2fr 1.2fr .8fr; gap: .9rem; align-items: start; }
.buat-kepala .field { margin: 0; }
.mapel-baris { display: grid; grid-template-columns: 1.5fr 1fr; gap: .75rem; }
.mapel-baris .field { margin-bottom: .6rem; }
.alat-editor { display: flex; flex-wrap: wrap; gap: .5rem; }
.label-mapel { display: inline-block; font-size: .75rem; font-weight: 700; color: var(--blue); background: #EBF4FF; padding: .12rem .5rem; border-radius: 999px; margin: .2rem .25rem 0 0; }
.pilih-kecil, .bank-saring select, .bank-saring input, .atur-sekolah select, .rombel-form select {
  min-height: 42px; border: 2px solid var(--line); border-radius: var(--r-sm); padding: 0 .6rem; font: 1rem var(--font); background: var(--white); color: var(--ink); }

/* Bank soal */
.bank-saring { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 1.5fr; gap: .5rem; }
.bank-saring input { width: 100%; }
.bank-aksi { display: grid; gap: .75rem; }
.bank-tombol { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.bank-acak { display: inline-flex; gap: .4rem; align-items: center; }
.bank-acak input { width: 80px; min-height: 42px; border: 2px solid var(--line); border-radius: var(--r-sm); padding: 0 .5rem; font: 1rem var(--font); }
.bank-bab { margin-top: 1rem; }
.bank-bab h3 { font-size: 1rem; margin: 0 0 .5rem; color: var(--navy); }
.bank-bab h3 small { font-weight: 600; color: var(--muted); }
.bank-baris { display: grid; grid-template-columns: auto 1fr auto; gap: .75rem; align-items: start; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--r-sm); margin-bottom: .45rem; background: var(--white); }
.bank-baris.pilih { border-color: var(--navy); background: #F2F6FB; }
.bank-cek input { width: 20px; height: 20px; accent-color: var(--navy); margin-top: .1rem; }
.bank-isi > div:first-child { font-weight: 600; color: var(--ink); word-break: break-word; }
.bank-label { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .3rem; }
.bank-label .galeri-jenis, .bank-label .label-mapel { margin: 0; }
.bank-pilih { max-height: 55vh; overflow: auto; display: grid; gap: .35rem; margin-top: .5rem; }
.bank-pilih .bank-item { padding: .55rem .7rem; border: 1px solid var(--line); border-radius: var(--r-sm); margin: 0; }
.bank-pilih .bank-item small { color: var(--muted); }

/* Pengumuman */
.umum-kartu { border-left: 4px solid var(--gold); background: var(--gold-50); border-radius: var(--r-sm); padding: .7rem .9rem; margin-bottom: .55rem; }
.umum-isi { margin: 0; white-space: pre-wrap; color: var(--ink); word-break: break-word; }
.umum-kaki { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; align-items: center; margin-top: .35rem; font-size: .82rem; color: var(--muted); }

/* Data sekolah (admin) */
.atur-sekolah { display: grid; gap: .5rem; max-width: 640px; }
.rombel-form { display: grid; grid-template-columns: 1.2fr .8fr 1fr auto; gap: .6rem; align-items: end; }
.rombel-form .field { margin: 0; }
.rombel-detail { margin-top: 1rem; }
.liga-kelas li.saya { outline: 3px solid var(--blue); }
.liga-kelas .nama small { font-weight: 500; color: var(--muted); margin-left: .35rem; }

/* Mode tim (live) */
.pilih-tim-baris { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .75rem; }
.pilih-tim-baris #pilih-tim { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.tim-kolom-wadah { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; width: 100%; }
.tim-kolom { border-radius: var(--r-sm); padding: .5rem; border-top: 5px solid var(--warna-tim, var(--navy)); background: var(--soft); display: flex; flex-wrap: wrap; gap: .3rem; align-content: flex-start; }
.tim-kolom > b { flex-basis: 100%; color: var(--warna-tim, var(--navy)); }
.tim-1 { --warna-tim: #C53030; } .tim-2 { --warna-tim: #2B6CB0; } .tim-3 { --warna-tim: #2F855A; } .tim-4 { --warna-tim: #B7791F; }
.papan-tim li { border-left: 8px solid var(--warna-tim, var(--navy)); }
.papan-tim li.saya { outline: 3px solid var(--warna-tim, var(--blue)); }
.papan-tim .nama small { font-weight: 500; color: var(--muted); margin-left: .35rem; }
.papan-tim b small { font-weight: 500; color: var(--muted); font-size: .75em; }
.tim-lencana { display: inline-block; background: var(--warna-tim, var(--navy)); color: #fff; font-weight: 800; font-size: .85rem; padding: .15rem .65rem; border-radius: 999px; vertical-align: middle; }
.tim-juara { background: var(--warna-tim, var(--gold)); color: #fff; font-weight: 800; font-size: 1.15rem; padding: .6rem 1rem; border-radius: var(--r-sm); margin: .75rem auto 1rem; max-width: 520px; text-align: center; }

@media (max-width: 900px) {
  .buat-kepala, .rombel-form { grid-template-columns: 1fr 1fr; }
  .buat-kepala .field:first-child { grid-column: 1 / -1; }
  .bank-saring { grid-template-columns: 1fr 1fr; }
  .bank-saring input { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .mapel-baris, .rombel-form { grid-template-columns: 1fr; }
  .bank-baris { grid-template-columns: auto 1fr; }
  .bank-baris > .aksi { grid-column: 1 / -1; }
}

/* LKPD siap cetak */
.halaman-cetak { background: #EEF2F6; }
.cetak-alat { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; padding: .75rem 1rem; background: var(--white); border-bottom: 1px solid var(--line); }
.cetak-alat .cek-baris { margin: 0; align-items: center; }
.lk { max-width: 210mm; margin: 1rem auto 2rem; padding: 0 16px; color: #000; font-size: 11.5pt; line-height: 1.5; }
.lk-halaman { background: #fff; padding: 14mm 15mm; box-shadow: 0 2px 10px rgba(0,0,0,.08); margin-bottom: 1rem; }
.lk-kepala { border-bottom: 3px double #000; padding-bottom: .4rem; margin-bottom: .75rem; text-align: center; }
.lk-sekolah { font-weight: 800; font-size: 13pt; letter-spacing: .03em; text-transform: uppercase; }
.lk-kepala h1 { font-size: 15pt; margin: .1rem 0 0; color: #000; }
.lk-sub-judul { font-weight: 700; margin-bottom: .4rem; }
.lk-identitas { width: 100%; border-collapse: collapse; text-align: left; font-size: 10.5pt; }
.lk-identitas td { padding: .1rem .25rem; vertical-align: top; }
.lk-identitas td:nth-child(odd) { white-space: nowrap; width: 1%; }
.lk-petunjuk { font-style: italic; margin: .3rem 0; }
.lk-soal { padding-left: 1.4rem; margin: .5rem 0 0; }
.lk-soal > li { margin-bottom: .9rem; break-inside: avoid; page-break-inside: avoid; }
.lk-tanya { margin: 0 0 .3rem; white-space: pre-wrap; }
.lk-opsi { margin: .2rem 0 0; padding-left: 1.4rem; columns: 2; column-gap: 1.5rem; }
.lk-opsi li { break-inside: avoid; }
.lk-gambar { display: block; max-width: 70%; max-height: 60mm; margin: .3rem 0; }
.lk-arab, .lk-ayat { font-family: "Scheherazade New", serif; font-size: 18pt; line-height: 2; }
.lk-ayat { text-align: right; margin: .2rem 0; }
.lk-bs span { display: inline-block; border: 1.5px solid #000; border-radius: 50%; width: 1.7em; height: 1.7em; line-height: 1.6em; text-align: center; font-weight: 700; }
.lk-garis { border-bottom: 1px dotted #000; height: 1.7em; }
.lk-pasang { width: 100%; border-collapse: collapse; }
.lk-pasang td { vertical-align: top; width: 50%; padding: 0 .5rem 0 0; }
.lk-pasang ol { margin: 0; padding-left: 1.4rem; }
.lk-isi { color: #444; white-space: nowrap; }
.lk-urut { list-style: none; padding: 0; margin: .2rem 0 0; }
.lk-urut li { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .2rem; }
.lk-kotak { flex: none; width: 1.6em; height: 1.4em; border: 1.5px solid #000; display: inline-block; }
.lk-rumpang { white-space: pre-wrap; line-height: 2; }
.lk-rumpang-isi { white-space: nowrap; }
.lk-bank { border: 1px dashed #555; padding: .3rem .6rem; margin: .3rem 0; font-size: 10.5pt; }
.lk-keping { display: flex; flex-wrap: wrap; gap: .35rem; margin: .3rem 0; }
.lk-keping span { border: 1px solid #000; padding: .05rem .5rem; border-radius: 4px; }
.lk-kelompok, .lk-tabel { width: 100%; border-collapse: collapse; margin-top: .3rem; }
.lk-kelompok th, .lk-kelompok td, .lk-tabel td { border: 1px solid #000; padding: .25rem .4rem; vertical-align: top; }
.lk-kelompok td { height: 30mm; }
.lk-huruf { width: 2em; text-align: center; font-weight: 800; }
.lk-jawab { width: 35%; }
.lk-ck { border-collapse: collapse; margin: .3rem 0; font-family: "Courier New", monospace; font-weight: 700; }
.lk-ck td { border: 1px solid #999; width: 6.5mm; height: 6.5mm; text-align: center; padding: 0; font-size: 10.5pt; }
.lk-tts { border-collapse: collapse; margin: .3rem 0; }
.lk-tts td { width: 7mm; height: 7mm; padding: 0; text-align: center; vertical-align: middle; position: relative; font-weight: 700; }
.lk-tts td.isi { border: 1px solid #000; }
.lk-tts td sup { position: absolute; top: 0; left: 1px; font-size: 6pt; line-height: 1; font-weight: 400; }
.lk-tts-petunjuk { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; font-size: 10.5pt; }
.lk-tts-petunjuk ol { margin: .2rem 0 0; padding-left: 1.6rem; }
.lk-label { position: relative; display: inline-block; max-width: 80%; margin: .3rem 0; }
.lk-label img { display: block; max-width: 100%; max-height: 90mm; }
.lk-label span { position: absolute; transform: translate(-50%, -50%); background: #fff; border: 2px solid #000; border-radius: 50%; width: 1.6em; height: 1.6em; line-height: 1.45em; text-align: center; font-weight: 800; font-size: 9pt; }
.lk-isian { columns: 2; margin: .2rem 0 0; }
.lk-catatan { font-size: 10pt; font-style: italic; color: #333; margin: 0 0 .2rem; }
.lk-bacaan { border: 1px solid #999; padding: .4rem .6rem; margin-bottom: .3rem; }
.lk-bacaan p { white-space: pre-wrap; margin: .2rem 0 0; }
.lk-sub { margin-top: .3rem; }
.lk-sub p { margin: 0; }
.lk-nilai { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; max-width: 90mm; margin-left: auto; }
.lk-nilai div { border: 1px solid #000; height: 22mm; padding: .2rem .4rem; font-size: 9.5pt; }
.lk-kunci .lk-soal > li { margin-bottom: .45rem; }
.lk-bahas { margin: .15rem 0 0; font-size: 10pt; color: #333; font-style: italic; }
@media print {
  .halaman-cetak { background: #fff; }
  .cetak-alat { display: none !important; }
  .lk { max-width: none; margin: 0; padding: 0; }
  .lk-halaman { box-shadow: none; padding: 0; margin: 0; }
  .lk-halaman + .lk-halaman { break-before: page; page-break-before: always; }
}

/* Ikon ilustrasi jenis permainan (Ver 3.0.3) */
.type-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.type-ikon { display: block; width: 104px; height: 104px; margin: .1rem auto .75rem; transition: transform .2s ease; }
.type-ikon svg, .galeri-ikon svg, .ikon-kecil svg { display: block; width: 100%; height: 100%; }
.type-card:hover:not([disabled]) .type-ikon { transform: translateY(-3px) scale(1.04); }
.type-card h3 { color: var(--navy); }
.type-card .badge-khas { display: inline-block; margin-top: .2rem; }
.galeri-ikon { width: 64px; height: 64px; }
.judul-ikon { display: flex; align-items: center; gap: .65rem; }
.ikon-kecil { flex: none; width: 40px; height: 40px; }
@media (max-width: 900px) {
  .type-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .type-card { padding: 1rem .75rem; }
  .type-ikon { width: 84px; height: 84px; }
  .type-card h3 { font-size: 1rem; }
  .type-card p { font-size: .82rem; }
  .type-card .contoh { display: none; }
}
@media (prefers-reduced-motion: reduce) { .type-ikon { transition: none; } }
@media (max-width: 900px) {
  .type-card p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
}
.galeri-kartu .label-mapel { align-self: flex-start; }

/* Halaman utama: kartu jenis permainan (Ver 3.0.3) */
.beranda-jenis h2, .beranda-jenis .intro { text-align: center; margin-left: auto; margin-right: auto; }
.jenis-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; margin-top: 2rem; }
.jenis-kartu { position: relative; display: flex; flex-direction: column; align-items: center; gap: .45rem; text-align: center;
  padding: 1.5rem .75rem 1.25rem; background: var(--white); border: 2px solid var(--line); border-radius: 22px;
  color: inherit; text-decoration: none; transition: border-color .2s, transform .2s, box-shadow .2s; }
.jenis-kartu:hover, .jenis-kartu:focus-visible { border-color: var(--navy); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(26,54,93,.10); outline: none; }
.jenis-ikon { width: 92px; height: 92px; display: block; }
.jenis-ikon svg { width: 100%; height: 100%; display: block; }
.jenis-nama { font-size: 1.1rem; font-weight: 800; color: var(--navy); line-height: 1.25; margin-top: .4rem; }
.jenis-khas { font-size: .72rem; font-weight: 800; color: #276749; background: #DFF5EC; padding: .1rem .55rem; border-radius: 999px; }
.jenis-jumlah { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; color: var(--ink); background: var(--soft); border: 1px solid var(--line); padding: .2rem .65rem; border-radius: 999px; }
.jenis-desk { font-size: .82rem; color: var(--muted); line-height: 1.4; max-height: 0; overflow: hidden; opacity: 0; transition: max-height .25s, opacity .25s; }
.jenis-kartu:hover .jenis-desk, .jenis-kartu:focus-visible .jenis-desk { max-height: 5em; opacity: 1; }
@media (max-width: 1100px) { .jenis-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { .jenis-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; } }
@media (max-width: 560px) {
  .jenis-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .jenis-kartu { padding: 1.1rem .5rem 1rem; border-radius: 18px; }
  .jenis-ikon { width: 76px; height: 76px; }
  .jenis-nama { font-size: 1rem; }
}
@media (hover: none) { .jenis-desk { display: none; } }
@media (prefers-reduced-motion: reduce) { .jenis-kartu, .jenis-desk { transition: none; } }
.jenis-kartu.jenis-ai { border-color: var(--gold); background: var(--gold-50); }

/* Ver 3.0.5 - Acak huruf dan Tebak teka-teki */
.badge-baru { display: inline-block; margin-left: .35rem; padding: .1rem .5rem; font-size: .7rem; font-weight: 800; color: #fff; background: var(--blue); border-radius: 999px; vertical-align: middle; }
.ah-kotak { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 1rem 0; }
.ah-slot { width: 44px; height: 52px; border: 2.5px dashed var(--line); border-radius: 10px; background: var(--white); font: 800 1.4rem var(--font); color: var(--navy); cursor: pointer; }
.ah-slot.isi { border-style: solid; border-color: var(--navy); background: #F2F6FB; }
.ah-slot.benar { border-color: var(--mint); background: var(--mint-50); color: #1D6A68; }
.ah-slot.salah { border-color: var(--red); background: var(--red-50); color: var(--red); }
.ah-bank { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: .5rem; }
.ah-huruf { width: 48px; height: 48px; border: 0; border-radius: 12px; background: var(--gold); color: #fff; font: 800 1.4rem var(--font); cursor: pointer; box-shadow: 0 3px 0 #B7791F; transition: transform .1s; }
.ah-huruf:active:not([disabled]) { transform: translateY(2px); box-shadow: 0 1px 0 #B7791F; }
.ah-huruf[disabled] { opacity: .2; cursor: default; box-shadow: none; }
@media (max-width: 420px) { .ah-slot { width: 36px; height: 44px; font-size: 1.15rem; } .ah-huruf { width: 42px; height: 42px; font-size: 1.2rem; } }
.tebak-petunjuk { margin: 0 0 .75rem; padding-left: 1.5rem; display: grid; gap: .45rem; }
.tebak-petunjuk li { background: #F3E8FF; border-radius: 10px; padding: .55rem .8rem; font-size: 1.05rem; color: var(--ink); }
.tebak-petunjuk li.baru { animation: muncul .35s ease; }
.tebak-catatan { font-weight: 700; color: #6B46C1; margin: 0 0 .5rem; }
@media (prefers-reduced-motion: reduce) { .tebak-petunjuk li.baru { animation: none; } }
.lk-kotak-huruf { display: flex; flex-wrap: wrap; gap: 2mm; margin: .3rem 0; }
.lk-kotak-huruf span { width: 8mm; height: 9mm; border: 1.5px solid #000; display: inline-block; }

/* Ver 3.0.5 - Bagikan ke Google Classroom dan sematkan */
.btn-classroom { background: #1E8E3E; color: #fff; border-color: #1E8E3E; }
.btn-classroom:hover { background: #18773A; }
.semat-blok { text-align: left; margin-top: .75rem; border: 1px solid var(--line); border-radius: var(--r-sm); padding: .6rem .8rem; }
.semat-blok summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.semat-blok textarea { width: 100%; font: .78rem/1.4 monospace; border: 2px solid var(--line); border-radius: var(--r-sm); padding: .5rem; margin: .4rem 0; resize: vertical; }
.semat-url { word-break: break-all; }
html.sematkan .main-atas { padding-top: .4rem; padding-bottom: .4rem; }
html.sematkan .main-atas .logo { font-size: .95rem; }
html.sematkan .a11y-tombol { display: none; }

/* Ver 3.0.5 - Halaman coba (tanpa login) */
.coba-pilih { display: flex; gap: .5rem; overflow-x: auto; padding: .25rem 1.25rem .9rem; scrollbar-width: thin; }
.coba-chip { flex: none; display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem .35rem .35rem; border-radius: 999px;
  background: rgba(255,255,255,.1); color: var(--white); text-decoration: none; font-weight: 700; font-size: .88rem; border: 2px solid transparent; }
.coba-chip:hover { background: rgba(255,255,255,.18); }
.coba-chip.aktif { background: var(--white); color: var(--navy); border-color: var(--gold); }
.coba-chip-ikon { width: 30px; height: 30px; display: block; }
.coba-chip-ikon svg, .coba-sampul svg { width: 100%; height: 100%; display: block; }
.coba-sampul { width: 110px; height: 110px; margin: 0 auto .75rem; }
.coba-cta { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.coba-cta.kecil { margin-top: .6rem; }

/* =========================================================
   Ver 3.0.6 - Kancil Melompat (Kuis arkade)
   ========================================================= */
.kj-atas { display: flex; align-items: center; gap: .75rem; margin-bottom: .9rem; }
.kj-label { flex: none; font-size: .8rem; font-weight: 800; color: var(--navy); background: var(--gold-50); border: 1px solid #EED9A8; padding: .2rem .65rem; border-radius: 999px; }
.kj-batu-baris { flex: 1; display: flex; gap: 4px; align-items: center; min-width: 0; }
.kj-batu { flex: 1; height: 8px; border-radius: 4px; background: #DCE3EC; max-width: 34px; }
.kj-batu.lewat { background: #2F855A; }
.kj-batu.kini { background: var(--gold); box-shadow: 0 0 0 3px rgba(214,158,46,.25); }
.kj-soal { font-size: clamp(1.1rem, 2.6vw, 1.35rem); margin-bottom: .9rem; }
.kj-sungai { position: relative; height: 380px; border-radius: 20px; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(ellipse 60px 8px at 20% 58%, rgba(255,255,255,.18), transparent 70%),
    radial-gradient(ellipse 80px 9px at 75% 66%, rgba(255,255,255,.14), transparent 70%),
    radial-gradient(ellipse 50px 7px at 45% 30%, rgba(255,255,255,.16), transparent 70%),
    linear-gradient(180deg, #2B8FC1 0%, #1F74A6 55%, #185E8A 100%);
  box-shadow: inset 0 0 0 1px rgba(10,40,70,.25); }
.kj-ombak { position: absolute; inset: 0; z-index: 0; opacity: .16; background-size: 120px 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='24'%3E%3Cpath d='M0 12 q10 -8 20 0 t20 0 t20 0 t20 0' fill='none' stroke='%23ffffff' stroke-width='1.5'/%3E%3C/svg%3E");
  animation: kj-arus 9s linear infinite; }
@keyframes kj-arus { to { background-position: 120px 0; } }
.kj-tepi-jauh { position: absolute; left: 0; right: 0; top: 0; height: 25%; z-index: 1;
  background: linear-gradient(180deg, #4E9A45 0%, #3F8538 80%, #357030 100%);
  border-bottom: 6px solid #C9A86A; border-radius: 0 0 50% 50% / 0 0 18px 18px; }
.kj-bendera { position: absolute; right: 16px; top: 10px; font-size: .75rem; font-weight: 800; color: #fff; background: #C53030; padding: .15rem .6rem .15rem .5rem; border-radius: 3px 10px 10px 3px; }
.kj-bendera::before { content: ""; position: absolute; left: -4px; top: -4px; width: 3px; height: 34px; background: #5A3A1A; border-radius: 2px; }
.kj-tepi-dekat { position: absolute; left: 0; right: 0; bottom: 0; height: 19%; z-index: 1;
  background: linear-gradient(180deg, #E2C690 0%, #D2B173 60%, #B9965A 100%);
  border-top: 5px solid #F0DCAE; border-radius: 50% 50% 0 0 / 18px 18px 0 0; }
.kj-buaya-baris { position: absolute; left: 0; right: 0; top: 41%; z-index: 2; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: .6rem; padding: 0 .8rem; }
.kj-buaya { position: relative; display: flex; flex-direction: column; align-items: center; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit; animation: kj-apung 3.2s ease-in-out infinite; }
.kj-buaya:nth-child(2) { animation-delay: -.8s; } .kj-buaya:nth-child(3) { animation-delay: -1.6s; } .kj-buaya:nth-child(4) { animation-delay: -2.4s; }
@keyframes kj-apung { 50% { transform: translateY(5px); } }
.kj-papan { position: relative; z-index: 1; display: flex; align-items: center; gap: .45rem; min-height: 54px; padding: .45rem .6rem;
  background: #fff; border-radius: 12px; box-shadow: 0 4px 0 rgba(0,0,0,.15), 0 8px 18px rgba(8,40,70,.25);
  font-weight: 700; font-size: .95rem; line-height: 1.25; color: var(--ink); text-align: left; margin-bottom: -16px; width: 86%; transition: box-shadow .2s, transform .2s; }
.kj-papan .huruf { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: .85rem; font-weight: 800; }
.kj-teks { min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.buaya-badan { display: block; width: 112%; margin: 0 -6%; height: 64px; filter: drop-shadow(0 6px 4px rgba(0,30,60,.25)); }
.kj-buaya:hover:not([disabled]) .kj-papan { transform: translateY(-3px); box-shadow: 0 6px 0 rgba(0,0,0,.15), 0 12px 22px rgba(8,40,70,.3); }
.kj-buaya:focus-visible { outline: none; }
.kj-buaya:focus-visible .kj-papan { box-shadow: 0 0 0 4px var(--gold), 0 8px 18px rgba(8,40,70,.25); }
.kj-buaya[disabled] { cursor: default; }
.kj-buaya.benar .kj-papan { background: #E6F6EE; box-shadow: 0 0 0 4px #38A169, 0 8px 18px rgba(8,40,70,.25); }
.kj-buaya.benar .huruf { background: #2F855A; }
.kj-buaya.salah .kj-papan { background: #FDECEC; box-shadow: 0 0 0 4px var(--red), 0 8px 18px rgba(8,40,70,.25); }
.kj-buaya.redup { opacity: .6; }
.kj-buaya.menyelam { animation: kj-selam 1.2s ease forwards; }
@keyframes kj-selam { to { transform: translateY(26px); opacity: .45; } }
.kj-kancil { position: absolute; z-index: 3; left: 50%; top: 88%; width: 96px; transform: translate(-50%, -88%); pointer-events: none;
  transition: left .7s cubic-bezier(.3,.7,.4,1), top .7s cubic-bezier(.3,.7,.4,1); }
.kj-tubuh svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.kj-kancil.lompat .kj-tubuh { animation: kj-loncat .7s cubic-bezier(.3,.7,.4,1); }
@keyframes kj-loncat { 0% { transform: translateY(0) scale(1, .92); } 45% { transform: translateY(-70px) rotate(-8deg); } 100% { transform: translateY(0); } }
.kj-kancil.di-buaya { width: 84px; }
.kj-kancil.menang .kj-tubuh { animation: kj-girang .5s ease 2; }
@keyframes kj-girang { 50% { transform: translateY(-16px); } }
.kj-kancil.tenggelam .kj-tubuh { animation: kj-tenggelam 1.3s ease-in forwards; }
@keyframes kj-tenggelam { 20% { transform: translateY(-14px) rotate(-6deg); } 100% { transform: translateY(70px) rotate(18deg); opacity: 0; } }
.kj-cipratan { position: absolute; left: 50%; bottom: 0; width: 20px; height: 8px; border: 3px solid rgba(255,255,255,.9); border-radius: 50%; transform: translateX(-50%) scale(0); opacity: 0; }
.kj-kancil.tenggelam .kj-cipratan { animation: kj-riak 1.1s ease-out .45s forwards; }
@keyframes kj-riak { 0% { transform: translateX(-50%) scale(.4); opacity: 1; } 100% { transform: translateX(-50%) scale(5); opacity: 0; } }
@media (max-width: 560px) {
  .kj-sungai { height: 360px; }
  .kj-buaya-baris { gap: .35rem; padding: 0 .4rem; }
  .kj-papan { flex-direction: column; align-items: center; text-align: center; font-size: .76rem; min-height: 72px; padding: .4rem .35rem; }
  .kj-kancil { width: 78px; } .kj-kancil.di-buaya { width: 64px; }
  .buaya-badan { height: 46px; }
  .kj-papan { width: 96%; }
}
@media (prefers-reduced-motion: reduce) {
  .kj-ombak, .kj-buaya, .kj-kancil.menang .kj-tubuh { animation: none; }
  .kj-kancil { transition-duration: .01s; }
  .kj-kancil.lompat .kj-tubuh { animation: none; }
}

/* =====================================================================
   Ver 3.0.6 - TAMPILAN PREMIUM
   Arah: identitas Nusantara yang tenang. Nila (indigo) tua dan emas,
   motif kawung (batik klasik) sebagai satu-satunya ornamen, dipakai
   di hero, sidebar, dan layar bermain. Selebihnya bersih dan tegas.
   ===================================================================== */
:root {
  --navy: #15294D;
  --navy-900: #0E1D39;
  --nila-700: #1E3A6B;
  --blue: #2A5FA8;
  --gold: #CF9A2E;
  --gold-50: #FBF4E3;
  --soft: #F4F6FA;
  --ink: #172033;
  --muted: #5D6A7E;
  --line: #E2E8F0;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --bayang-1: 0 1px 2px rgba(16, 32, 64, .05), 0 1px 1px rgba(16, 32, 64, .03);
  --bayang-2: 0 1px 2px rgba(16, 32, 64, .06), 0 10px 28px -14px rgba(16, 32, 64, .22);
  --bayang-3: 0 2px 4px rgba(16, 32, 64, .08), 0 24px 48px -20px rgba(10, 24, 50, .45);
  --kawung: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23E2B65A' stroke-width='1.1'%3E%3Cellipse cx='14' cy='14' rx='10.5' ry='5.6' transform='rotate(45 14 14)'/%3E%3Cellipse cx='42' cy='14' rx='10.5' ry='5.6' transform='rotate(-45 42 14)'/%3E%3Cellipse cx='14' cy='42' rx='10.5' ry='5.6' transform='rotate(-45 14 42)'/%3E%3Cellipse cx='42' cy='42' rx='10.5' ry='5.6' transform='rotate(45 42 42)'/%3E%3Ccircle cx='28' cy='28' r='1.8'/%3E%3Ccircle cx='0' cy='0' r='1.8'/%3E%3Ccircle cx='56' cy='0' r='1.8'/%3E%3Ccircle cx='0' cy='56' r='1.8'/%3E%3Ccircle cx='56' cy='56' r='1.8'/%3E%3C/g%3E%3C/svg%3E");
}
body { background: var(--soft); font-feature-settings: "ss01", "cv11"; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3 { letter-spacing: -.015em; }
:focus-visible { outline: 3px solid rgba(207, 154, 46, .75); outline-offset: 2px; }
::selection { background: #F3DDA6; color: var(--navy-900); }

/* Tombol */
.btn { border-radius: 12px; border-width: 1.5px; letter-spacing: -.005em; transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .1s; }
.btn:active:not([disabled]) { transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, #1E3A6B 0%, var(--navy) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 2px rgba(14,29,57,.3); }
.btn-primary:hover { background: linear-gradient(180deg, #23447C 0%, #1A3260 100%); }
.btn-gold { background: linear-gradient(180deg, #DDAA42 0%, var(--gold) 100%); color: var(--navy-900); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 2px rgba(120,80,10,.35); }
.btn-gold:hover { background: linear-gradient(180deg, #E3B44F 0%, #C8922A 100%); }
.btn-ghost { background: var(--white); border-color: #D5DDE8; box-shadow: var(--bayang-1); }
.btn-ghost:hover { border-color: #AFC0D6; background: #FBFCFE; }
.btn-line { border-width: 1.5px; }
.btn-danger { background: var(--white); }

/* Logo */
.logo { letter-spacing: -.02em; }
.logo-mark { border-radius: 10px; background: linear-gradient(145deg, #23447C, var(--navy-900)); color: #F0C35C; box-shadow: inset 0 0 0 1px rgba(240,195,92,.35), 0 2px 6px rgba(14,29,57,.25); }
.sidebar .logo-mark, .auth-side .logo-mark, .main-atas .logo-mark { background: linear-gradient(145deg, #E5B651, #C38B22); color: var(--navy-900); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }

/* Bilah atas beranda */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid rgba(21,41,77,.08); }

/* Hero dengan motif kawung */
.hero { background: radial-gradient(1200px 520px at 85% -10%, #2A4C86 0%, transparent 60%), radial-gradient(900px 500px at -10% 110%, #1B3563 0%, transparent 55%), var(--navy-900); }
.hero::after { background-image: var(--kawung); background-size: 56px 56px; opacity: .09; -webkit-mask-image: linear-gradient(100deg, transparent 20%, #000 75%); mask-image: linear-gradient(100deg, transparent 20%, #000 75%); }
.hero .wrap { padding-block: 5.5rem 6rem; }
.hero h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); letter-spacing: -.035em; line-height: 1.04; max-width: 13ch; text-wrap: balance; }
.hero .lead { color: #C9D6EA; font-size: 1.15rem; line-height: 1.65; }
.hero-actions .btn { min-height: 52px; padding: 0 1.6rem; font-size: 1.02rem; }
.hero-actions .btn-gold { min-width: 150px; }
.hero-actions .btn-line { border-color: rgba(255,255,255,.35); }
.hero-actions .btn-line:hover { background: rgba(255,255,255,.08); color: var(--white); border-color: rgba(255,255,255,.7); }
.hero-coba { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.25rem; color: #F0C35C; font-weight: 700; text-decoration: none; }
.hero-coba:hover { text-decoration: underline; text-underline-offset: 4px; }
.pin-card { border-radius: 24px; border: 1px solid rgba(255,255,255,.6); border-top: 0; box-shadow: var(--bayang-3); position: relative; overflow: hidden; }
.pin-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: linear-gradient(90deg, #C38B22, #F0C35C, #C38B22); }
.pin-boxes input { border-radius: 12px; border-width: 1.5px; background: #F7F9FC; font-variant-numeric: tabular-nums; }

/* Bagian beranda */
.section { padding-block: 5rem; }
.section h2 { letter-spacing: -.025em; text-wrap: balance; }
.band { background: var(--white); }
.step { border-left: 3px solid var(--gold); }
.step h3::before { color: var(--gold); }
.verse .arab { color: var(--navy); }
.footer { border-top: 1px solid var(--line); background: var(--white); }

/* Kartu jenis permainan di beranda */
.jenis-kartu { border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--bayang-1); }
.jenis-kartu:hover, .jenis-kartu:focus-visible { border-color: #C9D5E6; box-shadow: var(--bayang-2); }
.jenis-ikon { filter: drop-shadow(0 6px 10px rgba(16,32,64,.10)); }
.jenis-jumlah { background: #F4F6FA; border-color: transparent; color: var(--muted); font-variant-numeric: tabular-nums; }
.jenis-kartu.jenis-ai { background: linear-gradient(160deg, #FFF8E8, #FBF0D6); border-color: #EBCF8C; }

/* Formulir */
.field label { font-size: .92rem; letter-spacing: -.005em; }
.field input, .field select, .field textarea { border-width: 1.5px; border-color: #D5DDE8; border-radius: 12px; background: var(--white); transition: border-color .15s, box-shadow .15s; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #B9C6D8; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--nila-700); box-shadow: 0 0 0 4px rgba(42,95,168,.14); }

/* Kerangka dasbor */
.sidebar { background:
    linear-gradient(180deg, rgba(14,29,57,0) 55%, rgba(14,29,57,.85) 100%),
    var(--kawung) 0 100% / 56px 56px repeat-x,
    linear-gradient(180deg, #172D55 0%, var(--navy-900) 100%);
  background-blend-mode: normal; border-right: 1px solid rgba(255,255,255,.04); }
.sidebar::before { content: none; }
.menu a { color: #B9C7DD; border-radius: 10px; position: relative; font-weight: 600; }
.menu a:hover { background: rgba(255,255,255,.06); color: var(--white); }
.menu a[aria-current="page"] { background: rgba(255,255,255,.1); color: var(--white); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.menu a[aria-current="page"]::before { content: ""; position: absolute; left: -1rem; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: #F0C35C; }
.menu a[aria-current="page"] svg { color: #F0C35C; }
.main-head h1 { font-size: clamp(1.5rem, 2.4vw, 1.9rem); letter-spacing: -.025em; }
.user-pill { border-color: var(--line); box-shadow: var(--bayang-1); }
.stat { border-radius: var(--r-md); box-shadow: var(--bayang-1); position: relative; overflow: hidden; }
.stat .num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .lbl { font-size: .85rem; }
.panel { border-radius: 20px; border-color: var(--line); box-shadow: var(--bayang-2); padding: 1.6rem 1.7rem; }
.panel h2 { letter-spacing: -.02em; }
.tabel th { font-size: .78rem; letter-spacing: .01em; background: #F7F9FC; border-bottom: 1px solid var(--line); }
.tabel th:first-child { border-radius: 10px 0 0 10px; } .tabel th:last-child { border-radius: 0 10px 10px 0; }
.tabel tbody tr { transition: background-color .12s; }
.tabel tbody tr:hover { background: #FAFBFD; }
.status { border-radius: 999px; }
.type-card { border-width: 1px; border-radius: 20px; box-shadow: var(--bayang-1); }
.type-card:hover:not([disabled]) { border-color: #C9D5E6; box-shadow: var(--bayang-2); }
.modal { border-radius: 24px; border-top-width: 5px; box-shadow: var(--bayang-3); }
.modal-latar { backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.toast { border-radius: 12px; box-shadow: var(--bayang-3); }

/* Halaman masuk/daftar */
.auth-side { background: radial-gradient(800px 480px at 100% 0%, #2A4C86 0%, transparent 60%), var(--navy-900); }
.auth-side::after { background-image: var(--kawung) !important; background-size: 56px 56px !important; opacity: .08; }

/* Layar bermain siswa dan halaman coba */
.main-layar { background:
    radial-gradient(900px 500px at 90% -10%, rgba(42,76,134,.9) 0%, transparent 60%),
    var(--kawung) center / 56px 56px,
    var(--navy-900);
  background-blend-mode: normal, soft-light, normal; }
.main-kartu { border-radius: 26px; box-shadow: var(--bayang-3); }
.opsi { border-radius: 14px; }

/* Menu bawah HP */
@media (max-width: 900px) {
  .bottom-nav { background: rgba(255,255,255,.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -16px rgba(16,32,64,.25); }
  .panel { padding: 1.25rem; border-radius: 18px; }
  .hero .wrap { padding-block: 3.5rem 4rem; }
}
@media (prefers-reduced-motion: reduce) { .btn, .jenis-kartu, .type-card { transition: none; } }

textarea { font: inherit; }

/* Perbaikan: isi dasbor tidak melebar melebihi layar HP (tabel bergulir di dalam .tabel-wrap) */
.app > .main { min-width: 0; }
.bank-saring > * { min-width: 0; width: 100%; }

/* Ver 3.0.7 - Kancil melompat: hitung mundur, Kancil di atas buaya, daratan di soal terakhir */
.kj-sungai { height: 440px; }
.kj-tanya { position: absolute; z-index: 2; left: 50%; top: 14px; transform: translateX(-50%); width: min(92%, 620px); margin: 0;
  background: #fff; border-radius: 16px; padding: .75rem 1rem; text-align: center; font-size: clamp(1.02rem, 2.4vw, 1.25rem); line-height: 1.35;
  box-shadow: 0 4px 0 rgba(0,0,0,.12), 0 10px 24px rgba(8,40,70,.28); }
.kj-tanya::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 18px; height: 18px; background: #fff; transform: translateX(-50%) rotate(45deg); border-radius: 3px; }
.kj-sungai.ada-daratan .kj-tanya { top: 23%; }
.kj-buaya-baris { top: 37%; opacity: 0; transform: translateY(-24px); }
.kj-sungai.ada-daratan .kj-buaya-baris { top: 52%; }
.kj-buaya-baris.muncul { animation: kj-muncul .6s cubic-bezier(.2,.8,.3,1) forwards; }
@keyframes kj-muncul { to { opacity: 1; transform: none; } }
.kj-daratan { position: absolute; left: 0; right: 0; top: 0; height: 19%; z-index: 1;
  background: linear-gradient(180deg, #4E9A45 0%, #3F8538 80%, #357030 100%);
  border-bottom: 6px solid #C9A86A; border-radius: 0 0 50% 50% / 0 0 18px 18px; }
.kj-daratan .kj-bendera { font-size: .85rem; }
.kj-pijakan { position: absolute; z-index: 2; left: 50%; bottom: 12px; width: 230px; transform: translateX(-50%); }
.kj-pijakan .buaya-badan { width: 100%; margin: 0; height: 60px; }
.kj-kancil { top: calc(100% - 46px); }
.kj-kancil.di-darat { width: 84px; }
.kj-hitung { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(9, 25, 50, .55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.kj-hitung span { display: grid; place-items: center; min-width: 140px; height: 140px; padding: 0 1.4rem; border-radius: 999px; background: #fff; color: var(--navy);
  font-size: 4.2rem; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 10px rgba(240,195,92,.45), 0 20px 40px rgba(0,0,0,.35); animation: kj-detak 1s ease; }
@keyframes kj-detak { 0% { transform: scale(.6); opacity: 0; } 25% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
@media (max-width: 560px) {
  .kj-sungai { height: 430px; }
  .kj-buaya-baris { top: 36%; }
  .kj-sungai.ada-daratan .kj-buaya-baris { top: 51%; }
  .kj-pijakan { width: 180px; }
  .kj-kancil { top: calc(100% - 40px); }
  .kj-hitung span { min-width: 110px; height: 110px; font-size: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .kj-buaya-baris, .kj-buaya-baris.muncul { animation: none; opacity: 1; transform: none; }
  .kj-hitung span { animation: none; }
}

/* =========================================================
   Ver 3.0.8 - Petualangan Kancil: rute puncak gunung -> muara
   ========================================================= */
.kj-peta { position: relative; height: 84px; border-radius: 16px; overflow: hidden; margin-bottom: .8rem; box-shadow: inset 0 0 0 1px rgba(21,41,77,.12); }
.kj-peta-latar { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.kj-pos { position: absolute; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 1; }
.kj-pos i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-style: normal; font-weight: 800; font-size: .75rem;
  background: #fff; color: var(--navy); border: 2.5px solid #A9B5C2; box-shadow: 0 2px 4px rgba(0,0,0,.15); }
.kj-pos em { font-style: normal; font-size: .66rem; font-weight: 800; color: var(--navy); background: rgba(255,255,255,.85); padding: 0 .35rem; border-radius: 6px; white-space: nowrap; }
.kj-pos.lewat i { border-color: var(--gold); background: #FFF3D4; }
.kj-pos.kini i { background: var(--gold); color: #fff; border-color: #fff; box-shadow: 0 0 0 3px rgba(207,154,46,.45); }
.kj-pos-finis { position: absolute; top: 50%; transform: translate(-50%, -50%); z-index: 1; font-size: 1.1rem; color: #C53030; text-shadow: 0 1px 0 #fff; }
.kj-peta-kancil { position: absolute; left: var(--x); top: 2px; width: 40px; transform: translateX(-50%); z-index: 2; transition: left 1s cubic-bezier(.3,.7,.4,1); }
.kj-peta-kancil span { display: block; background: #fff; border-radius: 50%; padding: 3px 4px 1px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.kj-peta-kancil svg { display: block; width: 100%; height: auto; }
.kj-peta-label { position: absolute; right: 8px; bottom: 6px; z-index: 1; font-size: .7rem; font-weight: 800; color: #fff; background: rgba(21,41,77,.75); padding: .05rem .5rem; border-radius: 999px; }

/* Tepian sungai bergambar sesuai wilayah */
.kj-tebing { position: absolute; top: 0; bottom: 0; width: 11%; z-index: 1; background-size: 100% auto; background-repeat: repeat-y; }
.kj-tebing.kiri { left: 0; border-right: 4px solid rgba(255,255,255,.35); border-radius: 0 40% 40% 0 / 0 8% 8% 0; }
.kj-tebing.kanan { right: 0; transform: scaleX(-1); border-right: 4px solid rgba(255,255,255,.35); border-radius: 0 40% 40% 0 / 0 8% 8% 0; }
.kj-buaya-baris { padding: 0 calc(11% + .6rem); }
.kj-tanya { width: min(74%, 600px); }
/* Warna air per wilayah: jernih di puncak, hijau di hutan, biru di lembah, dalam di hilir */
.kj-sungai.kj-puncak { background-color: #3FA6D3; background-image: radial-gradient(ellipse 50px 7px at 45% 30%, rgba(255,255,255,.25), transparent 70%), linear-gradient(180deg, #5BBDE2 0%, #3B9DCB 55%, #2C86B5 100%); }
.kj-sungai.kj-hutan { background-image: radial-gradient(ellipse 60px 8px at 30% 60%, rgba(255,255,255,.14), transparent 70%), linear-gradient(180deg, #2E8C86 0%, #22736E 55%, #1A5E5A 100%); }
.kj-sungai.kj-lembah { background-image: radial-gradient(ellipse 80px 9px at 70% 64%, rgba(255,255,255,.16), transparent 70%), linear-gradient(180deg, #2B8FC1 0%, #1F74A6 55%, #185E8A 100%); }
.kj-sungai.kj-hilir { background-image: radial-gradient(ellipse 90px 9px at 35% 70%, rgba(255,255,255,.14), transparent 70%), linear-gradient(180deg, #2378AA 0%, #1A5E8C 55%, #134B73 100%); }
.kj-sungai.kj-hilir .kj-daratan { background: linear-gradient(180deg, #F0DCAE 0%, #E2C690 70%, #D2B173 100%); border-bottom-color: #F6EBCF; }

/* Kartu sambutan pos persinggahan */
.kj-hitung { flex-direction: column; gap: 1rem; display: flex; align-items: center; justify-content: center; }
.kj-sambut { max-width: min(420px, 86%); text-align: center; background: rgba(255,255,255,.96); color: var(--ink); border-radius: 18px; padding: .9rem 1.1rem; box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.kj-sambut small { display: block; font-weight: 700; color: var(--muted); font-size: .78rem; }
.kj-sambut b { display: block; font-size: 1.15rem; color: var(--navy); margin-bottom: .2rem; }
.kj-sambut p { margin: 0; font-size: .92rem; line-height: 1.45; color: var(--muted); }
.kj-tiba .kj-sambut { animation: kj-tiba .5s cubic-bezier(.2,.8,.3,1); border-top: 5px solid var(--gold); }
.kj-tiba.pergi { opacity: 0; transition: opacity .35s; }
@keyframes kj-tiba { from { transform: translateY(16px) scale(.96); opacity: 0; } }
.kj-hitung span[data-angka] { min-width: 110px; height: 110px; font-size: 3.4rem; }

@media (max-width: 560px) {
  .kj-peta { height: 72px; }
  .kj-pos em { display: none; }
  .kj-tebing { width: 7%; }
  .kj-buaya-baris { padding: 0 calc(7% + .25rem); gap: .3rem; }
  .kj-tanya { width: 82%; font-size: .98rem; }
  .kj-peta-kancil { width: 34px; }
}
@media (prefers-reduced-motion: reduce) { .kj-peta-kancil { transition: none; } .kj-tiba .kj-sambut { animation: none; } }

/* Papan jawaban: huruf di atas, teks di bawah agar kata panjang tidak terpotong */
.kj-papan { flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding: .45rem .4rem; }
.kj-teks { overflow-wrap: normal; word-break: normal; hyphens: manual; font-size: .92rem; }
.kj-buaya-baris { gap: .45rem; }
@media (max-width: 560px) { .kj-teks { font-size: .72rem; overflow-wrap: break-word; } .kj-papan { padding: .4rem .25rem; } }

/* =========================================================
   Ver 3.0.9 - Seri Petualangan Dongeng Nusantara
   Kancil dan Harimau (Benar atau salah), Timun Mas (Urutkan, Susun kalimat),
   Malin Kundang di Pelabuhan (Pasangkan)
   ========================================================= */
.pt-panggung { position: relative; overflow: hidden; border-radius: 18px; margin-bottom: .9rem; isolation: isolate;
  box-shadow: inset 0 0 0 1px rgba(21,41,77,.14), 0 8px 22px rgba(21,41,77,.12); }
.pt-harimau { height: 400px; }
.pt-timun, .pt-malin { height: 250px; }
.pt-latar { position: absolute; inset: 0; z-index: 0; }
.pt-latar > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pt-isi { min-width: 0; }
.pt-isi[inert] { opacity: .55; transition: opacity .3s; }
.pt-judul-adegan { position: absolute; z-index: 3; left: 50%; top: 10px; transform: translateX(-50%); width: max-content; max-width: 92%;
  background: rgba(255,255,255,.94); color: var(--ink); border-radius: 999px; padding: .3rem .9rem; font-size: .85rem; text-align: center;
  box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.pt-judul-adegan b { color: var(--navy); }
.pt-rumah { position: absolute; z-index: 1; display: flex; align-items: center; gap: .4rem; font-size: 2rem; line-height: 1; }
.pt-rumah b { font-size: .72rem; font-weight: 800; color: #fff; background: rgba(21,41,77,.8); padding: .15rem .5rem; border-radius: 999px; }

/* ---- Kancil dan Harimau ---- */
.pt-hutan-0 { background: radial-gradient(circle at 8% 22%, #3E7F3A 0 34px, transparent 35px), radial-gradient(circle at 92% 30%, #3E7F3A 0 40px, transparent 41px),
  radial-gradient(circle at 18% 70%, #4C8F45 0 30px, transparent 31px), radial-gradient(circle at 86% 78%, #4C8F45 0 34px, transparent 35px),
  linear-gradient(180deg, #CFE9F2 0%, #DDEFC6 22%, #9BCB7F 23%, #7DB863 100%); }
.pt-hutan-1 { background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(54,110,46,.55) 22px 30px, transparent 30px 58px),
  linear-gradient(180deg, #CDE8C3 0%, #A8D48F 30%, #78B25E 100%); }
.pt-hutan-2 { background: linear-gradient(180deg, transparent 0 62%, #4FA8C9 62% 72%, transparent 72%),
  radial-gradient(circle at 10% 30%, #3E7F3A 0 32px, transparent 33px), radial-gradient(circle at 90% 26%, #3E7F3A 0 36px, transparent 37px),
  linear-gradient(180deg, #D3ECF4 0%, #BFE1B0 24%, #8CC173 100%); }
.pt-hutan-3 { background: radial-gradient(circle at 10% 76%, #C9A86A 0 26px, transparent 27px), radial-gradient(circle at 90% 70%, #4C8F45 0 30px, transparent 31px),
  linear-gradient(180deg, #FCE6C2 0%, #F3E0B2 24%, #C9DC9A 25%, #A7C77A 100%); }
.pt-papan { background: #FBF3DF; border: 3px solid #8B5E3C; color: #3B2410; font-weight: 700; }
.pt-papan::after { background: #FBF3DF; border-right: 3px solid #8B5E3C; border-bottom: 3px solid #8B5E3C; bottom: -11px; }
.pt-semak { position: absolute; z-index: 1; left: 50%; top: 44%; width: 170px; transform: translate(-50%, -50%); }
.pt-semak::before { content: ""; position: absolute; left: -8%; right: -8%; bottom: -10%; height: 42%; z-index: 1; border-radius: 60px 60px 14px 14px;
  background: #3E8A3A; box-shadow: -34px 8px 0 -6px #4A9A43, 34px 8px 0 -6px #4A9A43, 0 -10px 0 -4px #4A9A43; }
.pt-macan { position: relative; z-index: 0; }
.pt-macan svg { display: block; width: 100%; height: auto; }
.pt-harimau .mata-bangun { display: none; }
.pt-harimau .bangun .mata-bangun { display: inline; }
.pt-harimau .bangun .mata-tidur { display: none; }
.pt-harimau [data-harimau] { position: relative; }
.pt-harimau [data-harimau].bangun svg { animation: pt-gertak .35s ease 3; }
@keyframes pt-gertak { 50% { transform: translateY(-10px) scale(1.06); } }
.pt-zzz { position: absolute; right: -6px; top: -6px; font-weight: 800; font-size: .9rem; color: #2B4C7E; letter-spacing: .1em; animation: pt-zzz 2.4s ease-in-out infinite; }
@keyframes pt-zzz { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-8px); opacity: 1; } }
.pt-aum { position: absolute; left: 50%; top: -30px; transform: translateX(-50%) scale(0); font-weight: 900; font-size: 1.4rem; color: #fff;
  background: #C53030; padding: .1rem .6rem; border-radius: 12px; z-index: 3; box-shadow: 0 4px 10px rgba(0,0,0,.3); }
.bangun .pt-zzz { display: none; }
.bangun .pt-aum { animation: pt-aum .4s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes pt-aum { to { transform: translateX(-50%) scale(1); } }
.pt-jalan { position: absolute; z-index: 2; top: 36%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 0;
  min-width: 108px; padding: .45rem .9rem .5rem; border: 0; border-radius: 12px; cursor: pointer; font: inherit;
  background: linear-gradient(180deg, #9A6A3F, #7A4F2A); color: #FFF7E6; box-shadow: 0 4px 0 #5A3818, 0 10px 18px rgba(0,0,0,.25);
  transition: transform .15s, box-shadow .15s, opacity .2s; }
.pt-jalan::after { content: ""; position: absolute; left: 50%; top: 100%; width: 8px; height: 30px; background: #5A3818; transform: translateX(-50%); z-index: -1; }
.pt-jalan span { font-size: .72rem; font-weight: 700; opacity: .85; }
.pt-jalan b { font-size: 1.2rem; letter-spacing: .04em; }
.pt-jalan.kiri { left: 23%; } .pt-jalan.kanan { left: 77%; }
.pt-jalan:not([disabled]):hover { transform: translate(-50%, -54%); }
.pt-jalan:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--gold), 0 4px 0 #5A3818; }
.pt-jalan[disabled] { cursor: default; }
.pt-jalan.benar { background: linear-gradient(180deg, #38A169, #2F855A); box-shadow: 0 4px 0 #22543D, 0 0 0 4px rgba(56,161,105,.35); }
.pt-jalan.salah { background: linear-gradient(180deg, #E05252, #C53030); box-shadow: 0 4px 0 #822727, 0 0 0 4px rgba(197,48,48,.35); }
.pt-kancil { top: calc(100% - 20px); width: 90px; }
.pt-kancil.kabur .kj-tubuh { animation: pt-kabur 1.2s ease-in forwards; }
@keyframes pt-kabur { 0%, 30% { transform: translateX(-4px); } 15% { transform: translateX(4px); } 100% { transform: translateY(30px) scale(.8); opacity: .35; } }
.pt-harimau .pt-rumah { left: 3%; right: 3%; top: 52%; justify-content: space-between; z-index: 1; }
.pt-harimau .pt-rumah b { display: none; }

/* ---- Timun Mas ---- */
.pt-ladang-0 { background: radial-gradient(ellipse 40px 12px at 20% 86%, #4C8F45 70%, transparent 72%), radial-gradient(ellipse 40px 12px at 64% 90%, #4C8F45 70%, transparent 72%),
  linear-gradient(180deg, #CFE9F2 0%, #E6F2D5 46%, #A9D08A 47%, #86BA68 100%); }
.pt-ladang-1 { background: repeating-linear-gradient(90deg, transparent 0 40px, rgba(70,130,60,.35) 40px 46px), linear-gradient(180deg, #D7EDD0 0%, #B5DA9E 47%, #7FB463 48%, #6AA152 100%); }
.pt-ladang-2 { background: linear-gradient(180deg, #CFE6F5 0%, #E7F1F7 46%, #F0DCAE 47%, #E2C690 100%); }
.pt-ladang-3 { background: linear-gradient(180deg, #F6DFC0 0%, #F2E5C8 46%, #A88B5A 47%, #8B7046 100%); }
.pt-buto { position: absolute; z-index: 2; bottom: 6px; width: 96px; transition: left .8s cubic-bezier(.3,.7,.4,1); animation: pt-hentak 1s ease-in-out infinite; }
.pt-buto svg, .pt-timunmas svg, .pt-kapal svg, .pt-ibu svg, .pt-peti svg { display: block; width: 100%; height: auto; }
.pt-buto .pt-aum { top: -18px; background: #2F5D24; font-size: 1rem; }
@keyframes pt-hentak { 50% { transform: translateY(-5px) rotate(-2deg); } }
.pt-buto.mengejar { animation: pt-hentak .35s ease-in-out infinite; }
.pt-buto.mengejar .pt-aum { animation: pt-aum .4s cubic-bezier(.2,1.4,.4,1) forwards; }
.pt-buto.terhambat { animation: none; filter: saturate(.6); transform: rotate(-6deg); transition: left .8s, transform .6s; }
.pt-timunmas { position: absolute; z-index: 2; left: 74%; bottom: 8px; width: 48px; transition: left 1.2s cubic-bezier(.3,.7,.4,1); animation: pt-lari .5s ease-in-out infinite; }
@keyframes pt-lari { 50% { transform: translateY(-4px); } }
.pt-timunmas.selamat { left: 80%; animation: kj-girang .5s ease 3; }
.pt-rumah.kanan { right: 2%; bottom: 10px; flex-direction: column; gap: .1rem; font-size: 2.6rem; }
.pt-rintang { position: absolute; z-index: 1; left: 34%; bottom: 0; width: 24%; height: 0; border-radius: 40% 40% 0 0 / 30% 30% 0 0; transition: height .7s cubic-bezier(.2,.8,.3,1); }
.pt-rintang.muncul { height: 62%; }
.pt-rintang.r0 { background: radial-gradient(circle at 25% 30%, #2F7D32 0 16%, transparent 17%), radial-gradient(circle at 70% 45%, #2F7D32 0 18%, transparent 19%),
  radial-gradient(ellipse 10px 18px at 45% 70%, #8BC34A 90%, transparent 95%), linear-gradient(180deg, #4CAF50, #2E7D32); }
.pt-rintang.r1 { background: repeating-linear-gradient(90deg, #3E8E41 0 7px, #6DBF5A 7px 10px, transparent 10px 15px); border-radius: 0; }
.pt-rintang.r2 { background: repeating-radial-gradient(ellipse at 50% 0, #6FC3E8 0 8px, #3B9DCB 8px 16px); border-radius: 50% 50% 0 0 / 22% 22% 0 0; }
.pt-rintang.r3 { background: radial-gradient(circle at 30% 30%, #8B6A3E 0 10%, transparent 11%), radial-gradient(circle at 70% 55%, #7A5A30 0 12%, transparent 13%),
  linear-gradient(180deg, #A07A48, #6E5230); border-radius: 50% 50% 0 0 / 24% 24% 0 0; }
.pt-benda { position: absolute; z-index: 3; left: 75%; bottom: 62px; width: 16px; height: 16px; border-radius: 50%; opacity: 0;
  background: radial-gradient(circle at 35% 35%, #FFF8D6, #F0C35C 60%, #C8902A); box-shadow: 0 0 14px 4px rgba(240,195,92,.8); }
.pt-benda.terbang { animation: pt-lempar .7s cubic-bezier(.3,.6,.5,1) forwards; }
@keyframes pt-lempar { 0% { left: 75%; bottom: 62px; opacity: 1; } 50% { bottom: 150px; } 100% { left: 45%; bottom: 20px; opacity: 0; transform: scale(2.4); } }

/* ---- Malin Kundang di Pelabuhan ---- */
.pt-laut-0 { background: linear-gradient(180deg, #FCE3BF 0%, #FBEBD2 52%, #3FA6D3 53%, #2C86B5 100%); }
.pt-laut-1 { background: linear-gradient(180deg, #CFE6F5 0%, #E8F2F8 52%, #2F94C6 53%, #1F74A6 100%); }
.pt-laut-2 { background: linear-gradient(180deg, #D8E4F4 0%, #EEF2F8 52%, #2378AA 53%, #185E8A 100%); }
.pt-laut-3 { background: linear-gradient(180deg, #F7C99B 0%, #FBE0C2 52%, #2B8FC1 53%, #1A5E8C 100%); }
.pt-air { position: absolute; left: -10%; right: -10%; bottom: 0; height: 47%;
  background: repeating-radial-gradient(ellipse 30px 6px at 50% 20%, rgba(255,255,255,.18) 0 2px, transparent 3px 14px); animation: pt-ombak 6s linear infinite; }
@keyframes pt-ombak { to { transform: translateX(30px); } }
.pt-dermaga { position: absolute; z-index: 2; left: 0; bottom: 30%; width: 34%; height: 16px; background: #8B5E3C; border-bottom: 4px solid #5A3818;
  border-radius: 0 6px 6px 0; }
.pt-dermaga::before, .pt-dermaga::after { content: ""; position: absolute; top: 100%; width: 9px; height: 70px; background: #5A3818; }
.pt-dermaga::before { left: 18%; } .pt-dermaga::after { right: 14%; }
.pt-peti-tumpuk { position: absolute; left: 6px; right: 6px; bottom: 100%; display: flex; flex-wrap: wrap-reverse; gap: 2px; justify-content: center; }
.pt-peti { width: 30px; transition: none; }
.pt-peti.naik { animation: pt-naik .9s cubic-bezier(.3,.6,.5,1) forwards; }
@keyframes pt-naik { 50% { transform: translate(calc(min(48vw, 380px) * .5), -60px) rotate(8deg); } 100% { transform: translate(min(48vw, 380px), 10px) scale(.5); opacity: 0; } }
.pt-peti.jatuh { animation: pt-jatuh 1s ease-in forwards; }
@keyframes pt-jatuh { 30% { transform: translate(30px, -16px) rotate(-10deg); } 100% { transform: translate(60px, 110px) rotate(40deg); opacity: 0; } }
.pt-kapal { position: absolute; z-index: 1; right: 4%; bottom: 14%; width: 160px; transition: right 1.6s cubic-bezier(.4,.1,.4,1), transform 1.6s; animation: pt-apung 2.6s ease-in-out infinite; }
@keyframes pt-apung { 50% { transform: translateY(-5px) rotate(-1.5deg); } }
.pt-kapal.berlayar { right: -50%; }
.pt-kapal.merapat { right: 40%; }
.pt-ibu { position: absolute; z-index: 3; left: 4%; bottom: calc(30% + 16px); width: 40px; opacity: .9; }
.pt-malin .pt-peti-tumpuk { left: 52px; }
.pt-hati { position: absolute; left: 70%; top: -4px; color: #E53E3E; font-size: 1.4rem; transform: scale(0); }
.pt-ibu.bertemu { animation: kj-girang .5s ease 3; }
.pt-ibu.bertemu .pt-hati { animation: pt-hati 1.4s ease forwards; }
@keyframes pt-hati { 30% { transform: scale(1.3); } 100% { transform: translateY(-26px) scale(1); opacity: 1; } }
.pt-malin .pt-judul-adegan, .pt-timun .pt-judul-adegan { font-size: .82rem; }

@media (max-width: 560px) {
  .pt-harimau { height: 380px; }
  .pt-semak { width: 120px; top: 48%; }
  .pt-jalan { min-width: 86px; padding: .4rem .6rem; top: 38%; }
  .pt-jalan b { font-size: 1rem; }
  .pt-jalan.kiri { left: 21%; } .pt-jalan.kanan { left: 79%; }
  .pt-kancil { width: 74px; }
  .pt-harimau .pt-rumah { top: 56%; font-size: 1.6rem; }
  .pt-harimau .pt-rumah b { display: none; }
  .pt-timun, .pt-malin { height: 220px; }
  .pt-buto { width: 74px; }
  .pt-timunmas { width: 40px; }
  .pt-kapal { width: 118px; }
  .pt-peti { width: 24px; }
  .pt-dermaga { width: 38%; }
  .pt-rumah.kanan { font-size: 2rem; }
  .pt-judul-adegan { font-size: .74rem !important; padding: .25rem .7rem; }
}
@media (prefers-reduced-motion: reduce) {
  .pt-zzz, .pt-buto, .pt-timunmas, .pt-kapal, .pt-air, .pt-buto.mengejar { animation: none; }
  .pt-harimau [data-harimau].bangun svg, .pt-ibu.bertemu, .pt-timunmas.selamat { animation: none; }
  .pt-kapal, .pt-timunmas, .pt-buto, .pt-rintang { transition-duration: .01s; }
}
