:root {
  --kuning: #ffd60a;
  --kuning-muda: #fff3b0;
  --oranye: #f7931e;
  --oranye-tua: #d9670b;
  --merah: #d7362b;
  --cokelat: #2b1608;
  --cokelat-2: #5c3a24;
  --krem: #fff9e8;
  --putih: #ffffff;
  --abu: #8a7766;
  --garis: #eadfc8;
  --hijau: #1f9d55;
  --bayang: 3px 3px 0 var(--cokelat);
  --radius: 14px;
  --font-judul: 'Lilita One', 'Arial Black', system-ui, sans-serif;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--cokelat);
  background: var(--krem);
  line-height: 1.45;
}
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-judul); font-weight: 400; letter-spacing: .3px; margin: 0; line-height: 1.15; }
.tersembunyi { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 2px solid var(--cokelat); border-radius: 12px;
  background: var(--putih); font-weight: 700;
  box-shadow: var(--bayang);
  transition: transform .08s, box-shadow .08s;
  text-decoration: none; color: var(--cokelat);
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--cokelat); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-utama { background: var(--kuning); }
.btn-oranye { background: var(--oranye); color: var(--putih); }
.btn-hijau { background: #25d366; color: var(--cokelat); }
.btn-merah { background: var(--merah); color: var(--putih); }
.btn-kecil { min-height: 36px; padding: 6px 12px; font-size: 14px; border-radius: 10px; }
.btn-lebar { width: 100%; }
.btn-teks { border: 0; background: none; box-shadow: none; padding: 6px 8px; min-height: 0; font-weight: 600; text-decoration: underline; }

:focus-visible { outline: 3px solid var(--oranye); outline-offset: 2px; }

/* ---------- Form ---------- */
label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.isian {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 2px solid var(--cokelat); border-radius: 10px; background: var(--putih);
}
textarea.isian { min-height: 72px; resize: vertical; }
.grup { margin-bottom: 14px; }
.petunjuk { font-size: 13px; color: var(--abu); margin-top: 4px; }

.pilihan { display: flex; flex-wrap: wrap; gap: 8px; }
.pilihan input { position: absolute; opacity: 0; pointer-events: none; }
.pilihan label {
  margin: 0; padding: 9px 14px; border: 2px solid var(--cokelat); border-radius: 999px;
  background: var(--putih); cursor: pointer; font-weight: 700; font-size: 14px;
}
.pilihan input:checked + label { background: var(--kuning); box-shadow: 2px 2px 0 var(--cokelat); }
.pilihan input:focus-visible + label { outline: 3px solid var(--oranye); outline-offset: 2px; }

/* ---------- Kartu & lencana ---------- */
.kartu {
  background: var(--putih); border: 2px solid var(--cokelat); border-radius: var(--radius);
  box-shadow: var(--bayang);
}
.lencana {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--merah); color: var(--putih); font-size: 12px; font-weight: 700;
}
.lencana-abu { background: var(--garis); color: var(--cokelat); }
.lencana-hijau { background: #d8f5e3; color: #11663a; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 100;
  transform: translate(-50%, 140%); opacity: 0;
  max-width: calc(100% - 32px); padding: 12px 18px;
  background: var(--cokelat); color: var(--putih); border-radius: 12px; font-weight: 600;
  transition: transform .25s, opacity .25s;
}
.toast.tampil { transform: translate(-50%, 0); opacity: 1; }
.toast.galat { background: var(--merah); }
.toast.sukses { background: var(--hijau); }

/* ---------- Lembar bawah / modal ---------- */
.latar {
  position: fixed; inset: 0; z-index: 50; background: rgba(43, 22, 8, .55);
  display: flex; align-items: flex-end; justify-content: center;
}
.lembar {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto;
  background: var(--krem); border: 2px solid var(--cokelat); border-bottom: 0;
  border-radius: 20px 20px 0 0; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
}
.lembar-kepala { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tutup {
  width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--cokelat);
  background: var(--putih); font-size: 20px; line-height: 1; flex: none;
}
@media (min-width: 720px) {
  .latar { align-items: center; padding: 24px; }
  .lembar { border-radius: 20px; border-bottom: 2px solid var(--cokelat); }
}

/* ---------- Penghitung jumlah ---------- */
.jumlah { display: inline-flex; align-items: center; border: 2px solid var(--cokelat); border-radius: 10px; background: var(--putih); overflow: hidden; }
.jumlah button { width: 36px; height: 36px; border: 0; background: var(--kuning-muda); font-size: 18px; font-weight: 800; }
.jumlah span { min-width: 34px; text-align: center; font-weight: 800; }
