/* Cak Besut: Misteri Nasab di Kota Santri — gaya tampilan.
   Target: HP Android kelas bawah, lebar 360 px, lanskap untuk adegan gim.
   Tombol minimal 44 px. Status selalu ikon + label, tidak hanya warna. */

@font-face { font-family: 'LPMQ'; src: url('../fonts/LPMQ-IsepMisbah.ttf') format('truetype'); font-display: swap; }

:root {
  --ts: 1;
  --ink: #2b2118;
  --muted: #6b5d4d;
  --paper: #fbf6ea;
  --paper-2: #f3ead6;
  --line: #dccfb4;
  --wood: #7a4e2d;
  --wood-2: #a26b3f;
  --indigo: #2f3e6b;
  --indigo-2: #3d5291;
  --gold: #c9962e;
  --green: #2c7a4b;
  --green-bg: #e7f4ec;
  --red: #b0372f;
  --red-bg: #fbeceb;
  --info-bg: #eaeef8;
  --radius: 14px;
  --shadow: 0 2px 0 rgba(122, 78, 45, .25), 0 6px 18px rgba(43, 33, 24, .12);
}
* { box-sizing: border-box; }
html { font-size: calc(16px * var(--ts)); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; line-height: 1.45; }
button, input, textarea, select { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.2; margin: .3em 0 .4em; }
p { margin: .35em 0; }
sup { font-size: .68em; line-height: 0; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { display: flex; justify-content: center; margin: .8rem 0; }
.row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .5rem 0; }
.row-end { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; margin: .6rem 0; }
.full { width: 100%; }
.error { color: var(--red); font-weight: 700; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ------------------------------------------------------------- TOMBOL */
.btn { min-height: 44px; padding: .5rem 1rem; border: 2px solid var(--wood-2); border-radius: 12px; background: #fffaf0; color: var(--ink); font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .35rem; text-decoration: none; }
.btn:hover:not(:disabled) { background: #fff3d9; }
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--indigo-2); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: rgba(122, 78, 45, .08); }
.btn-lg { font-size: 1.05rem; padding: .65rem 1.3rem; }
.btn-xl { font-size: 1.3rem; padding: .8rem 2.6rem; border-radius: 16px; }
.btn-icon { width: 48px; height: 48px; padding: 0; font-size: 1.3rem; }
.btn.small { min-height: 36px; font-size: .8rem; }
.linklike { background: none; border: 0; color: var(--indigo); text-decoration: underline; cursor: pointer; padding: .2rem; min-height: 32px; }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(47, 62, 107, .45); } 50% { box-shadow: 0 0 0 8px rgba(47, 62, 107, 0); } }
.shake { animation: shake .4s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* ------------------------------------------------------------- INPUT */
.input { width: 100%; min-height: 44px; padding: .5rem .7rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.input:focus { border-color: var(--indigo); outline: none; }
.input.num { width: 6.5rem; text-align: center; }
.input.ok { border-color: var(--green); background: var(--green-bg); }
.input.bad { border-color: var(--red); background: var(--red-bg); }
textarea.input { resize: vertical; }
.lbl { display: flex; flex-direction: column; gap: .25rem; font-weight: 700; margin: .5rem 0; }
.lbl.inline { flex-direction: row; align-items: center; justify-content: center; }
.check { display: flex; gap: .55rem; align-items: flex-start; margin: .45rem 0; min-height: 32px; }
.check input { width: 22px; height: 22px; margin-top: .1rem; flex: none; }
.chip { display: inline-block; font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); margin-left: .35rem; vertical-align: middle; }
.chip.ok { background: var(--green-bg); border-color: #9ccfb0; }
.chip.warn { background: #fde7d7; border-color: #e7a774; }
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.seg-btn { min-height: 40px; min-width: 44px; padding: .35rem .75rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-weight: 700; }
.seg-btn.on { background: var(--indigo); border-color: var(--indigo); color: #fff; }

/* ------------------------------------------------------------- LATAR */
.bg-gerbang { background: linear-gradient(180deg, #bfe0f5 0%, #f6ecd1 58%, #d8b88a 100%); }
.bg-kelas { background: linear-gradient(180deg, #2f4a3a 0 22%, #efe4cc 22%); }
.bg-kebun_pagi { background: linear-gradient(180deg, #d8f0d6 0%, #a8d391 55%, #7a9b4f 100%); }
.bg-kebun_senja { background: linear-gradient(180deg, #f6b98a 0%, #c98fa5 45%, #59607f 100%); }
.bg-wonosalam { background: linear-gradient(180deg, #e3ece8 0%, #b6cfac 45%, #6f8f4f 100%); }
.bg-gubuk { background: linear-gradient(180deg, #e9d6ae 0%, #c9a46f 100%); }
.bg-kenduri { background: linear-gradient(180deg, #ffe7b3 0%, #f2b36b 100%); }
.bg-teras { background: linear-gradient(180deg, #f6e5cc 0%, #d9b991 100%); }
.bg-ruang_tamu { background: linear-gradient(180deg, #efdcc1 0%, #cfae86 100%); }
.bg-gurun { background: linear-gradient(180deg, #f7d9a8 0%, #e2a65e 100%); }
.bg-poskestren { background: linear-gradient(180deg, #e5f3f3 0%, #b9dcdc 100%); }
.bg-ruang_periksa { background: linear-gradient(180deg, #eef4f6 0%, #cfe0e6 100%); }
.bg-konsultasi { background: linear-gradient(180deg, #edf2f0 0%, #cddfd8 100%); }
.bg-konseling { background: linear-gradient(180deg, #ece6f2 0%, #cfc5e0 100%); }
.bg-kamar { background: linear-gradient(180deg, #ecdfc8 0%, #c7ad86 100%); }
.bg-aula { background: linear-gradient(180deg, #3a2a4a 0%, #6b3b35 100%); }
.bg-langit { background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.8) 0 1px, transparent 2px) 0 0/90px 90px, radial-gradient(circle at 70% 60%, rgba(255,255,255,.7) 0 1px, transparent 2px) 0 0/130px 130px, linear-gradient(180deg, #121a3a 0%, #2c3466 100%); }
.bg-peta { background: radial-gradient(circle at 30% 30%, rgba(122,78,45,.08) 0 2px, transparent 3px) 0 0/22px 22px, #efe5cb; }
/* Latar versi 2 (MAN 3 Jombang, Jombang) */
.bg-halaman { background: linear-gradient(180deg, #cfe8f6 0%, #f3ecd8 60%, #c9b089 100%); }
.bg-ruang_kepala { background: linear-gradient(180deg, #e8e1d2 0 18%, #d7c3a1 18% 22%, #f2ead9 22%); }
.bg-lab { background: linear-gradient(180deg, #e9f3f7 0%, #cfe3ea 55%, #9fbac4 100%); }
.bg-lab_senja { background: linear-gradient(180deg, #f6c79a 0%, #c8a1b8 50%, #5e6688 100%); }
.bg-kebun { background: linear-gradient(180deg, #e2f2dc 0%, #b4d79a 55%, #7a9b4f 100%); }
.bg-warung { background: linear-gradient(180deg, #f8e3c3 0%, #e0b27e 100%); }
.bg-udd { background: linear-gradient(180deg, #fbecec 0%, #efc9c9 55%, #d79c9c 100%); }
.bg-uks { background: linear-gradient(180deg, #eef6f4 0%, #cfe6df 100%); }
.bg-puskesmas { background: linear-gradient(180deg, #e8f4f3 0%, #bfe0dd 100%); }
[class*="bg-"] { background-size: cover; background-position: center; }

/* ----------------------------------------------------- LAYAR PEMBUKA */
.title-screen, .loading, .login-screen, .avatar-screen { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; position: relative; overflow: hidden; }
.title-box { position: relative; z-index: 2; text-align: center; background: rgba(251, 246, 234, .94); border-radius: 22px; padding: 1.2rem 1.6rem; box-shadow: var(--shadow); max-width: 560px; }
.game-title { font-size: clamp(2.4rem, 9vw, 4.2rem); font-weight: 900; color: var(--wood); margin: .1em 0 0; letter-spacing: .5px; text-shadow: 0 3px 0 #f0d9ad; }
.game-sub { font-size: clamp(1.05rem, 3.5vw, 1.5rem); color: var(--indigo); margin: 0 0 .3em; }
.tagline { color: var(--muted); }
.school-chip { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .8rem; font-size: .85rem; font-weight: 700; }
.player-chip { font-size: .85rem; color: var(--muted); margin-top: .8rem; }
.gear { position: absolute; top: 10px; right: 10px; z-index: 3; background: rgba(255,255,255,.8); }
.back { position: absolute; top: 10px; left: 10px; z-index: 3; }
.gate { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: min(520px, 90vw); height: 32vh; z-index: 1; opacity: .9; }
.gate-roof { position: absolute; left: 0; right: 0; top: 0; height: 26%; background: var(--wood); clip-path: polygon(8% 100%, 50% 0, 92% 100%); }
.gate-door { position: absolute; left: 14%; right: 14%; top: 26%; bottom: 0; background: linear-gradient(90deg, #8d5b34 0 18%, transparent 18% 82%, #8d5b34 82%); border-top: 10px solid #6b4224; }
.login-card, .avatar-card { width: 100%; max-width: 440px; background: var(--paper); border-radius: 18px; padding: 1.1rem 1.2rem; box-shadow: var(--shadow); border: 2px solid var(--line); position: relative; z-index: 2; }
.kitab { border-top: 8px solid var(--wood); }
.code-input { text-transform: uppercase; letter-spacing: 3px; font-weight: 800; text-align: center; font-size: 1.2rem; }
.or { text-align: center; margin: .8rem 0; position: relative; color: var(--muted); }
.or::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--line); }
.or span { position: relative; background: var(--paper); padding: 0 .6rem; }
.form-msg { color: var(--red); font-weight: 700; min-height: 1.2em; }
.guru-link { display: block; text-align: center; margin-top: .6rem; color: var(--indigo); font-weight: 700; min-height: 32px; }
.speech { display: flex; gap: .6rem; align-items: flex-start; background: #fff; border-radius: 14px; padding: .6rem; border: 1px solid var(--line); }
.avatar-opts { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .8rem 0; }
.avatar-opt { min-height: 96px; border: 3px solid var(--line); border-radius: 16px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; cursor: pointer; }
.avatar-opt.on { border-color: var(--indigo); background: var(--info-bg); }
.avatar-emoji { font-size: 2.4rem; }

/* ------------------------------------------------------------ POTRET */
.portrait { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 1.05rem; flex: none; border: 3px solid rgba(255,255,255,.85); box-shadow: 0 2px 6px rgba(0,0,0,.18); overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait-lg { width: 72px; height: 72px; font-size: 1.5rem; }
.portrait-xl { width: 84px; height: 84px; font-size: 1.7rem; }

/* ---------------------------------------------------- TEMPLATE MISI */
.mission { display: grid; grid-template-rows: auto 1fr auto auto; height: 100dvh; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: .5rem; padding: .3rem .6rem; background: rgba(251, 246, 234, .94); border-bottom: 1px solid var(--line); min-height: 52px; }
.tb-title { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .95rem; }
.meters { display: flex; align-items: center; gap: .3rem; background: none; border: 0; cursor: pointer; padding: .2rem .3rem; min-height: 44px; border-radius: 12px; }
.meter { width: 30px; height: 30px; border-radius: 50%; background: conic-gradient(var(--indigo) var(--p), #e3d8bf 0); display: grid; place-items: center; }
.meter-icon { width: 23px; height: 23px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; font-size: .75rem; }
.meters-label { font-size: .72rem; color: var(--muted); margin-left: .2rem; }
.btn-menu { min-width: 64px; }
.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 23%); gap: .6rem; padding: .6rem; min-height: 0; }
.stage > * { min-width: 0; }
.area { background: rgba(255, 252, 244, .95); border: 2px solid rgba(122, 78, 45, .18); border-radius: var(--radius); padding: .8rem 1rem; overflow: auto; min-height: 0; position: relative; }
.area.dim { background: rgba(236, 232, 224, .95); }
.side { display: flex; flex-direction: column; gap: .6rem; overflow: auto; min-height: 0; }
.objective { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .75rem; }
.objective h3 { font-size: .95rem; margin: 0 0 .25rem; }
.obj-text { font-size: .9rem; }
.goal-list { margin: .2rem 0; padding-left: 0; list-style: none; }
.obj-status { display: inline-block; margin-top: .35rem; font-size: .8rem; font-weight: 800; color: var(--muted); }
.obj-status.ok { color: var(--green); }
.kamus-btn { width: 100%; }
.rotate-hint { display: none; margin: 0 .6rem .4rem; padding: .35rem .6rem; background: #fff3cf; border-radius: 10px; font-size: .82rem; text-align: center; }
.dialog { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: center; margin: 0 .6rem .6rem; padding: .55rem .8rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); max-height: 34vh; overflow: auto; }
.dialog.empty .dlg-body, .dialog.empty .dlg-portrait { visibility: hidden; }
.dialog.empty:not(.has-next) { display: none; }
.dialog.narasi .dlg-text { font-style: italic; }
.dlg-head { display: flex; gap: .5rem; align-items: baseline; }
.dlg-name { font-weight: 800; color: var(--wood); }
.dlg-count { font-size: .75rem; color: var(--muted); }
.dlg-text { margin: .1rem 0; font-size: 1.02rem; }
.dlg-sub { margin: .1rem 0; color: var(--muted); font-size: .88rem; font-style: italic; }
.dlg-sub::before { content: 'Subtitle: '; font-style: normal; font-weight: 700; font-size: .75rem; }
.no-sub .dlg-sub { display: none !important; }
.btn-next { white-space: nowrap; }

/* ------------------------------------------------------- PETA PONDOK */
.map-screen { min-height: 100dvh; display: flex; flex-direction: column; }
.map-balloon { display: flex; gap: .6rem; align-items: flex-start; margin: .6rem .8rem 0; }
.balloon { background: #fff; border-radius: 16px; padding: .45rem .8rem; box-shadow: var(--shadow); position: relative; }
.balloon::before { content: ''; position: absolute; left: -8px; top: 16px; border: 8px solid transparent; border-right-color: #fff; border-left: 0; }
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; padding: .7rem .8rem; flex: 1; align-content: start; }
.loc { position: relative; border: 3px solid var(--wood); border-radius: 18px; padding: .7rem; text-align: left; display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-height: 118px; cursor: pointer; box-shadow: 0 4px 0 var(--wood); }
.loc > * { background: rgba(255, 252, 244, .9); border-radius: 8px; padding: .05rem .4rem; }
.loc:hover:not(.is-locked) { transform: translateY(-2px); }
.loc-num { font-size: .75rem; font-weight: 800; color: var(--wood); }
.loc-name { font-size: 1.05rem; }
.loc-title { font-size: .82rem; }
.loc-status { font-size: .8rem; font-weight: 800; margin-top: auto; }
.loc-status.done { color: var(--green); }
.loc-status.locked { color: var(--muted); }
.loc.is-locked { filter: grayscale(.75); opacity: .78; cursor: not-allowed; }
.loc.is-done { border-color: var(--green); box-shadow: 0 4px 0 var(--green); }
.bottombar { display: flex; gap: .5rem; justify-content: center; padding: .55rem; position: sticky; bottom: 0; background: rgba(251, 246, 234, .96); border-top: 1px solid var(--line); }
.chapter-sheet .screen-list { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .3rem; max-height: 46vh; overflow: auto; }
.screen-item { width: 100%; min-height: 44px; display: flex; align-items: center; gap: .5rem; text-align: left; border: 2px solid var(--line); border-radius: 10px; background: #fff; padding: .35rem .6rem; cursor: pointer; }
.screen-item.done { border-color: #9ccfb0; background: var(--green-bg); }
.screen-item.is-locked { opacity: .6; cursor: not-allowed; }
.si-icon { width: 1.4rem; text-align: center; font-weight: 800; }
.si-code { font-weight: 800; color: var(--wood); }

/* ------------------------------------------------------------ OVERLAY */
.overlay { position: fixed; inset: 0; background: rgba(30, 22, 14, .55); display: grid; place-items: center; padding: 16px; z-index: 50; animation: fade .18s ease-out; }
.overlay.out { animation: fadeout .18s ease-in forwards; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; } }
.overlay-box { background: var(--paper); border-radius: 18px; width: 100%; max-width: 620px; max-height: 92dvh; overflow: auto; padding: 1.1rem 1.2rem; box-shadow: 0 10px 40px rgba(0,0,0,.3); position: relative; }
.overlay-box.small { max-width: 420px; }
.ov-sheet .overlay-box.sheet { max-width: 880px; height: 92dvh; padding: 0; display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; gap: .5rem; padding: .5rem .8rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--paper); z-index: 1; }
.sheet-head h2 { margin: 0; font-size: 1.15rem; }
.sheet-body { padding: .8rem 1.1rem 1.4rem; overflow: auto; }
.menu-box { max-width: 380px; display: grid; gap: .35rem; }
.menu-item { min-height: 48px; text-align: left; border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: .4rem .8rem; font-weight: 700; cursor: pointer; }
.menu-item:hover { background: #fff7e6; }
.picker { max-width: 360px; text-align: center; }
.picker-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .4rem; margin: .6rem 0; }
.geno-opt { justify-content: center; text-align: center; font-size: 1.1rem; font-weight: 800; }

/* ---------------------------------------------------- KARTU TADABBUR */
.ov-tadabbur { background: rgba(20, 24, 40, .62); }
.tadabbur { max-width: 640px; background: #e6ecf5; border: 3px solid #3b6fc4; text-align: center; padding: 1.4rem 1.3rem 1rem; }
.tb-kind { font-size: .78rem; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #3b6fc4; }
.tb-ref { font-size: 1.2rem; margin: .2rem 0 .6rem; }
.arabic { font-family: 'LPMQ', 'LPMQ IsepMisbah', 'Scheherazade New', 'Amiri', 'Traditional Arabic', serif; font-size: calc(1.75rem * var(--ts)); line-height: 2.1; text-align: right; direction: rtl; margin: .3rem 0 .8rem; color: #1d2a44; }
.tb-tr { text-align: left; font-size: 1rem; }
.tb-src, .tb-note, .tb-meta { text-align: left; font-size: .82rem; color: #4a5568; }
.tb-note { background: rgba(255,255,255,.6); border-radius: 8px; padding: .35rem .55rem; }
.tb-meta { font-style: italic; }
.tb-actions { display: flex; justify-content: center; gap: .5rem; margin-top: .8rem; flex-wrap: wrap; }
.tb-wait { font-size: .78rem; color: #4a5568; }
.reveal { opacity: 0; transform: translateY(6px); transition: opacity .5s ease, transform .5s ease; }
.reveal.shown { opacity: 1; transform: none; }
.draft-ribbon { position: sticky; top: -1.4rem; margin: -1.4rem -1.3rem .6rem; background: var(--red); color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: 1px; padding: .3rem; }

/* ------------------------------------------------- KARTU INFO / KAMUS */
.info-wrap { max-width: 560px; }
.info-card { background: #fff; border: 2px solid var(--line); border-radius: 16px; padding: .9rem 1rem; margin: .4rem 0; }
.info-badge { display: inline-block; background: var(--wood); color: #fff; font-weight: 800; font-size: .78rem; letter-spacing: .5px; padding: .2rem .7rem; border-radius: 999px; }
.info-title { font-size: 1.2rem; margin: .4rem 0; }
.info-rows { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .35rem; }
.info-rows li { display: flex; gap: .5rem; align-items: flex-start; }
.ir-icon { width: 1.6rem; text-align: center; flex: none; }
.info-body { margin: .4rem 0; }
.info-source { font-size: .78rem; color: var(--muted); border-top: 1px dashed var(--line); padding-top: .4rem; margin-top: .6rem; }
.skin-gradient { height: 26px; border-radius: 13px; margin: .5rem 0; background: linear-gradient(90deg, #f6dfcf, #e6bf9c, #c99267, #a5704a, #7a4f32, #4f3322); }
.peta-ilus { background: linear-gradient(90deg, #cfe3f2, #e9f1d8); border-radius: 12px; padding: 1rem; text-align: center; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin: .6rem 0; }
.stat { background: var(--paper); border-radius: 12px; padding: .6rem; text-align: center; }
.stat-big { font-size: 2rem; font-weight: 900; color: var(--red); }
.stat-label { font-size: .85rem; }
.glossary-card { border-color: #9fb3dd; }

/* ------------------------------------------------------- UMPAN BALIK */
.fb { display: flex; gap: .5rem; align-items: flex-start; padding: .55rem .75rem; border-radius: 12px; border-left: 6px solid; margin: .5rem 0; }
.fb-ok { background: var(--green-bg); border-color: var(--green); }
.fb-no { background: var(--red-bg); border-color: var(--red); }
.fb-info { background: var(--info-bg); border-color: var(--indigo); }
.fb-icon { font-weight: 900; font-size: 1.1rem; line-height: 1.3; }
.fb-ok .fb-icon { color: var(--green); }
.fb-no .fb-icon { color: var(--red); }
.toasts { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 80; display: grid; gap: .4rem; width: min(520px, calc(100vw - 32px)); pointer-events: none; }
.toast { background: #fff; border-radius: 12px; padding: .5rem .8rem; box-shadow: 0 6px 20px rgba(0,0,0,.18); border-left: 6px solid var(--indigo); display: flex; gap: .4rem; align-items: center; animation: fade .2s; font-size: .92rem; }
.toast.out { animation: fadeout .4s forwards; }
.toast-benar { border-color: var(--green); }
.toast-salah { border-color: var(--red); }
.toast-kunci { border-color: var(--muted); }
.toast-icon { font-weight: 900; }

/* ------------------------------------------------- ADEGAN & PILIHAN */
.scene { display: flex; flex-direction: column; align-items: center; gap: .6rem; text-align: center; padding: .4rem 0; }
.scene-banner { background: var(--wood); color: #fff; padding: .3rem .9rem; border-radius: 999px; font-weight: 700; display: inline-block; margin: .2rem 0; }
.scene-banner.timeskip { background: var(--indigo); }
.scene-sign { background: #fff; border: 3px solid var(--wood); padding: .25rem .9rem; font-weight: 900; color: var(--wood); border-radius: 6px; }
.scene-caption { font-style: italic; color: var(--muted); max-width: 52ch; font-size: .88rem; }
.cast { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.cast.apart { gap: 3rem; }
.standee { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.standee figcaption { font-weight: 700; font-size: .85rem; }
.standee.small .portrait { width: 44px; height: 44px; font-size: .9rem; }
.illus { display: flex; justify-content: center; margin: .3rem 0; }
.illus svg { width: 100%; max-width: 420px; height: auto; border-radius: 12px; }
.illus.small svg { max-width: 140px; }
.whisper { display: flex; align-items: center; gap: .5rem; justify-content: center; margin-bottom: .4rem; }
.blur-bubble { background: #fff; border-radius: 14px; padding: .4rem .8rem; filter: blur(1.3px); opacity: .85; font-style: italic; }
.prompt { font-weight: 700; margin: .5rem 0; }
.options { display: grid; gap: .45rem; }
.options.two { grid-template-columns: 1fr 1fr; }
.options.three { grid-template-columns: repeat(3, 1fr); }
.opt { min-height: 46px; text-align: left; padding: .5rem .8rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.opt:hover:not(:disabled) { border-color: var(--wood-2); background: #fffaf0; }
.opt:disabled { cursor: default; opacity: .9; }
.opt.chosen { border-color: var(--indigo); background: var(--info-bg); }
.opt.right { border-color: var(--green); background: var(--green-bg); }
.opt.wrong { border-color: var(--red); background: var(--red-bg); }
.opt.visited { border-style: dashed; }
.opt .tag { font-weight: 800; }
.opt-letter { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--paper-2); font-weight: 800; flex: none; }
.opt-sub { display: block; width: 100%; color: var(--muted); font-style: italic; }
.explain { background: #fff8e4; border-radius: 10px; padding: .5rem .7rem; margin: .4rem 0; }
.closing { font-weight: 700; color: var(--indigo); }
.statement { font-size: 1.15rem; font-weight: 800; background: #fff; border-left: 6px solid var(--gold); padding: .6rem .9rem; margin: .4rem 0; border-radius: 8px; }
.ask { margin: .6rem 0; }
.summary-card { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: .5rem .8rem; margin-bottom: .6rem; }
.summary-card ul { margin: .2rem 0; padding-left: 1.1rem; }

/* ------------------------------------------------------------- KUIS */
.q-progress { display: flex; align-items: center; gap: .6rem; font-size: .85rem; color: var(--muted); font-weight: 700; margin-bottom: .3rem; }
.q-bar { flex: 1; height: 8px; background: var(--paper-2); border-radius: 4px; overflow: hidden; }
.q-bar span { display: block; height: 100%; background: var(--indigo); }
.q-text { font-size: 1.08rem; font-weight: 700; }
.style-kayu .q-text { background: linear-gradient(90deg, #b07a45, #c48b52); color: #fff; border-radius: 12px; padding: .8rem 1rem; box-shadow: inset 0 0 0 3px rgba(0,0,0,.12); }
.score-card { text-align: center; background: #fff; border-radius: 16px; padding: 1rem; }
.score-big { font-size: 2.6rem; font-weight: 900; color: var(--indigo); }

/* ------------------------------------------------- SERET-LEPAS UMUM */
.pool { display: flex; flex-wrap: wrap; gap: .45rem; min-height: 58px; padding: .5rem; border: 2px dashed var(--line); border-radius: 12px; background: #fffdf7; }
.dnd-item { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.token { min-width: 50px; min-height: 50px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 12px; background: #fff; padding: .2rem .4rem; }
.geno { font-weight: 800; font-size: 1.05rem; }
.dnd-item.is-selected { outline: 3px solid var(--gold); outline-offset: 1px; transform: scale(1.06); }
.dnd-item.is-dragging { opacity: .35; }
.dnd-ghost { position: fixed; pointer-events: none; z-index: 100; transform: translate(-50%, -50%) scale(1.08); opacity: .92; box-shadow: 0 8px 24px rgba(0,0,0,.25); margin: 0; }
.dnd-zone.is-over, .has-selection .dnd-zone:hover { outline: 3px solid var(--gold); }
.has-selection .dnd-zone:not(.is-locked) { outline: 2px dashed var(--gold); outline-offset: 2px; }
.bins { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .5rem; margin-top: .6rem; }
.bin { border: 2px solid var(--wood-2); border-radius: 14px; background: #f8eedb; min-height: 110px; padding: .4rem; cursor: pointer; }
.bin.is-over { background: #fff1c9; }
.bin-head { display: flex; align-items: center; gap: .3rem; font-size: .9rem; }
.bin-count { margin-left: auto; background: #fff; border-radius: 999px; padding: 0 .45rem; font-weight: 800; font-size: .8rem; }
.bin-body { display: flex; flex-wrap: wrap; gap: .2rem; margin-top: .3rem; }
.bin-body .token { min-width: 34px; min-height: 34px; padding: 0; border-width: 1px; }
.bin-body .token svg { width: 26px; height: 26px; }
.rbc-wrap { gap: .8rem; flex-wrap: wrap; }
.rbc-item { display: flex; flex-direction: column; align-items: center; gap: .3rem; font-size: .75rem; }
.rbc { width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 50% 50%, #d9534f 0 40%, #c0392b 60%); position: relative; display: grid; place-items: center; box-shadow: inset 0 0 0 6px rgba(255,255,255,.18); }
.ag { position: absolute; font-size: .8rem; font-weight: 900; color: #fff; text-shadow: 0 0 2px #000; }
.matcher { display: grid; grid-template-columns: 1fr 1.5fr; gap: .7rem; }
.m-col h4 { font-size: .85rem; color: var(--muted); }
.m-left, .m-right { display: flex; align-items: center; gap: .4rem; min-height: 50px; width: 100%; padding: .45rem .7rem; border: 2px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: .4rem; text-align: left; cursor: pointer; }
.m-left .sym { color: var(--ink); display: inline-flex; }
.matched { border-color: var(--green) !important; background: var(--green-bg) !important; cursor: default; }
.m-num { font-weight: 900; color: var(--green); }
.seq-done { list-style: none; padding: 0; margin: .4rem 0 .7rem; display: grid; gap: .35rem; }
.seq-slot { display: flex; gap: .5rem; align-items: center; min-height: 44px; border: 2px dashed var(--line); border-radius: 10px; padding: .3rem .6rem; background: #fffdf7; }
.seq-slot.filled { border-style: solid; border-color: var(--green); background: var(--green-bg); }
.seq-n { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--paper-2); font-weight: 900; flex: none; }
.seq-n.ok { background: var(--green); color: #fff; }
.seq-empty { color: var(--muted); }
.flower-anim { font-size: 2rem; text-align: center; }

/* ------------------------------------------------------ FENOTIPE */
.ph { display: inline-flex; align-items: center; gap: .2rem; padding: .08rem .45rem; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid rgba(0,0,0,.18); background: var(--ph-bg, #eee); white-space: nowrap; }
.ph-compact { font-size: .7rem; padding: 0 .35rem; }
.ph0 { --ph-bg: #f3e7a6; }
.ph1 { --ph-bg: #c6e3cb; }
.ph2 { --ph-bg: #cbd8f1; }
.ph3 { --ph-bg: #f1c6bd; }
.cb-mode .ph1, .cb-mode .pn-cell.ph1, .cb-mode .bar-fill.ph1, .cb-mode .basket.ph1 { background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.14) 0 2px, transparent 2px 7px); }
.cb-mode .ph2, .cb-mode .pn-cell.ph2, .cb-mode .bar-fill.ph2, .cb-mode .basket.ph2 { background-image: radial-gradient(rgba(0,0,0,.2) 1.3px, transparent 1.6px); background-size: 7px 7px; }
.cb-mode .ph3, .cb-mode .pn-cell.ph3, .cb-mode .bar-fill.ph3, .cb-mode .basket.ph3 { background-image: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0 2px, transparent 2px 6px), repeating-linear-gradient(90deg, rgba(0,0,0,.16) 0 2px, transparent 2px 6px); }

/* ---------------------------------------------------- GENETIKA */
.cross-line { font-weight: 700; margin-bottom: .4rem; }
.cross-line .x { color: var(--wood); }
.punnett-wrap { overflow-x: auto; padding-bottom: .3rem; }
.punnett { display: grid; gap: 5px; width: fit-content; max-width: 100%; }
.pn-corner, .pn-head { display: grid; place-items: center; min-height: 44px; padding: .3rem .5rem; border-radius: 8px; font-weight: 800; }
.pn-corner { font-size: .7rem; color: var(--muted); }
.pn-head { background: var(--wood); color: #fff; font-size: 1.05rem; }
.pn-cell { min-height: 58px; min-width: 3.2rem; border: 2px dashed var(--wood-2); background: #fff; border-radius: 10px; font-size: 1rem; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; padding: .2rem; }
.pn-cell.filled { border-style: solid; border-color: rgba(0,0,0,.2); background: var(--ph-bg); cursor: default; }
.pn-cell .ph { background: rgba(255,255,255,.7); }
.style-anyaman .pn-cell:not(.filled) { background: repeating-linear-gradient(45deg, #f6e7c4 0 6px, #ead3a0 6px 12px); }
.pn-summary { margin-top: .5rem; }
.ratio-box { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: .5rem .8rem; display: grid; gap: .35rem; }
.ph-line { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem; }
.gamete-table { display: grid; gap: .8rem; }
.parent-plant { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.big-emoji { font-size: 2.2rem; }
.allele { min-width: 52px; min-height: 52px; border-radius: 50%; border: 3px solid var(--wood); background: #fff7e0; font-size: 1.3rem; font-weight: 900; }
.wells { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.well { min-height: 96px; border: 3px dashed var(--indigo); border-radius: 50%/40%; background: var(--info-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .2rem; cursor: pointer; }
.well-body { min-height: 54px; display: flex; gap: .3rem; }
.indep { display: grid; gap: .5rem; justify-items: center; }
.cell-view { border: 3px solid #8aa6c8; background: radial-gradient(circle, #f4f8fd, #dce8f5); border-radius: 50%; padding: 1.2rem 2rem; display: grid; gap: .5rem; min-width: 240px; }
.cell-view.split { animation: split .5s; }
@keyframes split { 50% { transform: scaleX(1.12); } }
.cell-row { display: flex; align-items: center; justify-content: center; gap: .9rem; }
.chromo { display: inline-grid; place-items: center; width: 44px; height: 22px; border-radius: 11px; color: #fff; font-weight: 900; }
.chromo.c1 { background: #8a5a2b; }
.chromo.c2 { background: #2f6f8f; }
.cell-mid { color: #8aa6c8; }
.cell-caption { font-size: .78rem; text-align: center; color: var(--muted); }
.gamete-slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; width: 100%; max-width: 480px; }
.gslot { border: 2px dashed var(--line); border-radius: 12px; padding: .4rem; text-align: center; font-weight: 900; background: #fff; }
.gslot small { display: block; font-weight: 600; color: var(--muted); font-size: .7rem; }
.gslot.got { border-style: solid; border-color: var(--green); background: var(--green-bg); }
.chart { display: grid; gap: .4rem; margin: .5rem 0; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 30%) 1fr auto; align-items: center; gap: .5rem; margin: .25rem 0; font-size: .88rem; }
.bar { height: 16px; background: var(--paper-2); border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.bar-fill { height: 100%; background: var(--indigo); transition: width .35s; }
.bar-fill.ph0, .bar-fill.ph1, .bar-fill.ph2, .bar-fill.ph3 { background-color: var(--ph-bg); border-right: 2px solid rgba(0,0,0,.25); }
.bar-val { font-weight: 800; font-size: .82rem; min-width: 3rem; text-align: right; }
.ratio-now { font-weight: 800; color: var(--indigo); }
.compare { background: #fff8e4; border-radius: 10px; padding: .45rem .7rem; font-size: .88rem; }
.histo { display: flex; align-items: flex-end; gap: .5rem; height: 120px; padding: .5rem; background: #fff; border-radius: 12px; border: 1px solid var(--line); margin: .5rem 0; }
.h-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: .72rem; }
.h-bar { width: 70%; background: var(--indigo); border-radius: 6px 6px 0 0; min-height: 2px; transition: height .3s; }
.families { display: grid; gap: .35rem; max-height: 220px; overflow: auto; }
.family { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; font-size: .85rem; }
.baby { display: inline-flex; align-items: center; }
.baskets { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.basket { border: 2px solid var(--wood-2); border-radius: 14px; padding: .5rem; background: var(--ph-bg); }
.basket-head { margin-bottom: .3rem; }
.fruit-grid { background: rgba(255,255,255,.75); border-radius: 10px; padding: .3rem; display: grid; gap: 4px; min-height: 40px; }
.ten { display: flex; gap: 1px; }
.fruit { display: inline-flex; }
.chi-round { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: .6rem .8rem; margin: .6rem 0; }
.table-scroll { overflow-x: auto; }
.chi-table { border-collapse: separate; border-spacing: 0; width: 100%; background: linear-gradient(#f6e5c3, #ebd2a0); border-radius: 12px; overflow: hidden; }
.chi-table th, .chi-table td { padding: .35rem .45rem; text-align: center; border-bottom: 1px solid rgba(122,78,45,.25); font-size: .88rem; }
.chi-table th { background: var(--wood); color: #fff; }
.chi-table td:first-child { text-align: left; font-weight: 700; }
.chi-table .sum td { font-weight: 800; }
.help { background: #fff8e4; border-radius: 10px; padding: .5rem .7rem; font-size: .88rem; }
.parents, .tree-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.plant-pick, .tree { border: 3px solid var(--line); border-radius: 14px; background: #fff; padding: .45rem .6rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; cursor: pointer; min-width: 104px; }
.plant-pick.on, .tree.on { border-color: var(--indigo); background: var(--info-bg); }
.tree.hetero { opacity: .65; border-style: dashed; }
.tree.pure { border-color: var(--green); background: var(--green-bg); }
.tree-tag { font-size: .75rem; font-weight: 800; min-height: 1em; }
.plant-card { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.plant-name { font-weight: 800; }
.kids { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; }
.kid { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: .2rem .3rem; border-radius: 10px; background: var(--ph-bg); border: 1px solid rgba(0,0,0,.15); min-width: 52px; }
.kid small { font-size: .62rem; font-weight: 700; }
.mystery { display: flex; gap: .7rem; align-items: center; background: #fff; border: 3px dashed var(--gold); border-radius: 14px; padding: .5rem .8rem; width: fit-content; }
.tree-panel { margin-top: .6rem; }
.graft-step { margin-top: .7rem; }
.graft-result { display: flex; gap: .7rem; align-items: center; background: var(--green-bg); border-radius: 14px; padding: .6rem .8rem; margin-top: .6rem; }

/* ----------------------------------------------------- SILSILAH */
.ped-scroll { overflow-x: auto; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: .3rem; margin: .4rem 0; }
.pedigree { width: 100%; height: auto; display: block; margin: 0 auto; }
.ped-lines line { stroke: var(--ink); stroke-width: 2; }
.ped-shape { fill: #fff; stroke: var(--ink); stroke-width: 2.2; }
.ped-node.aff .ped-shape { fill: #3a2f28; }
.ped-slot .ped-shape { stroke-dasharray: 4 3; fill: #fff7e0; stroke: var(--wood-2); }
.ped-slot { cursor: pointer; }
.ped-slot.is-over .ped-shape, .has-selection .ped-slot .ped-shape { fill: #ffe9a8; }
.ped-node.glow .ped-shape { stroke: #c99000; stroke-width: 3.5; filter: drop-shadow(0 0 4px #ffd54a); }
.ped-name { font-size: 11px; text-anchor: middle; fill: var(--ink); font-weight: 700; }
.ped-geno { font-size: 12.5px; font-weight: 900; text-anchor: middle; fill: var(--indigo); }
.ped-geno.ok { fill: var(--green); }
.ped-geno.bad { fill: var(--red); }
.ped-a { font-size: 14px; font-weight: 900; fill: #a16d00; }
.ped-q { text-anchor: middle; font-weight: 900; font-size: 14px; }
.facts { background: #fff8e4; border-radius: 12px; padding: .5rem .8rem; margin: .5rem 0; font-size: .9rem; }
.facts ul { margin: .2rem 0; padding-left: 1.1rem; }
.name-tray { margin-top: .4rem; }
.name-card { min-height: 44px; padding: .3rem .7rem; border: 2px solid var(--wood-2); border-radius: 999px; background: #fff; font-weight: 700; }
.geno-list { display: grid; gap: .35rem; margin: .5rem 0; }
.geno-row { display: grid; grid-template-columns: minmax(130px, 1fr) auto; gap: .2rem .6rem; align-items: center; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: .3rem .6rem; }
.geno-row.ok { border-color: var(--green); }
.geno-row.bad { border-color: var(--red); background: var(--red-bg); }
.geno-note { grid-column: 1 / -1; font-size: .8rem; }
.geno-who { font-weight: 700; }
.steps { padding-left: 1.3rem; }
.steps li { margin: .2rem 0; }

/* ---------------------------------------------------- POSKESTREN */
.transfusion { display: grid; gap: .5rem; }
.bag { min-height: 54px; min-width: 96px; border: 2px solid #b0372f; border-radius: 12px 12px 18px 18px; background: #fff3f2; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: .2rem .5rem; }
.patients { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .5rem; }
.patient { border: 2px solid var(--line); border-radius: 14px; background: #fff; padding: .55rem .7rem; min-height: 96px; cursor: pointer; }
.patient.served { border-color: var(--green); background: var(--green-bg); cursor: default; }
.patient.clump { border-color: var(--red); background: radial-gradient(circle at 30% 40%, #8b1e1e 0 4px, transparent 5px), radial-gradient(circle at 60% 60%, #8b1e1e 0 5px, transparent 6px), radial-gradient(circle at 75% 30%, #8b1e1e 0 3px, transparent 4px), var(--red-bg); animation: shake .4s; }
.pt-status { font-weight: 800; font-size: .85rem; margin-top: .25rem; }
.plates { display: flex; justify-content: center; }
.plate-wrap { display: grid; gap: .5rem; justify-items: center; text-align: center; }
.plate { width: 220px; height: 220px; border-radius: 50%; box-shadow: 0 2px 10px rgba(0,0,0,.2); background: #f4efe2; }
.cb-filter { filter: url(#cb-deut); }
.poster { background: #fff; border: 3px solid var(--wood); border-radius: 12px; padding: .7rem .9rem; max-width: 440px; margin: .5rem 0; }
.poster-title { text-align: center; margin: 0 0 .4rem; }
.poster-items { display: grid; gap: .3rem; }
.p-row { display: flex; align-items: center; gap: .6rem; padding: .3rem .4rem; border-radius: 8px; min-height: 44px; border: 2px solid transparent; }
.poster-editor .p-row { border-color: var(--line); cursor: pointer; }
.p-day { width: 4.5rem; font-weight: 700; }
.p-sq { width: 40px; height: 26px; border-radius: 5px; border: 1px solid rgba(0,0,0,.25); flex: none; }
.st-buka { background-color: #2e9e4f; }
.st-tutup { background-color: #d23b2f; }
.pat-buka { background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.8) 0 3px, transparent 3px 7px); }
.pat-tutup { background-image: radial-gradient(rgba(255,255,255,.9) 1.7px, transparent 2px); background-size: 7px 7px; }
.p-cues { display: flex; gap: .3rem; flex-wrap: wrap; }
.cue { min-height: 32px; border: 2px solid var(--ink); border-radius: 8px; background: #fff; font-weight: 900; padding: 0 .4rem; cursor: pointer; }
.cue.small { font-size: .72rem; font-weight: 700; }
.p-row.ok::after { content: '✓'; margin-left: auto; color: var(--green); font-weight: 900; }
.p-row.bad::after { content: '✗'; margin-left: auto; color: var(--red); font-weight: 900; }
.p-row.bad { border-color: var(--red); }
.poster-legend { font-size: .8rem; color: var(--muted); margin-top: .5rem; }
.tools { margin-bottom: .4rem; }
.tool { min-height: 44px; padding: .3rem .7rem; border: 2px solid var(--indigo); border-radius: 10px; background: #fff; font-weight: 700; }
.labsheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .6rem; }
.labsheet { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: .5rem .7rem; font-family: ui-monospace, 'Courier New', monospace; }
.labsheet h4 { font-family: 'Nunito', sans-serif; }
.lab-row { width: 100%; min-height: 44px; display: grid; grid-template-columns: 1fr auto; gap: .1rem .4rem; text-align: left; border: 2px solid transparent; border-bottom: 1px dashed var(--line); background: none; padding: .3rem .4rem; cursor: pointer; border-radius: 8px; }
.lab-row.marked { border-color: var(--gold); background: #fff6dc; }
.lab-row.ok { border-color: var(--green); background: var(--green-bg); }
.lab-row.bad { border-color: var(--red); background: var(--red-bg); }
.lab-v { font-weight: 800; text-align: right; }
.lab-mark { grid-column: 1 / -1; font-size: .75rem; font-weight: 800; color: #9a6a00; font-family: 'Nunito', sans-serif; }
.turn-line { display: flex; gap: .6rem; align-items: flex-start; background: #fff; border-radius: 14px; padding: .5rem .7rem; margin-bottom: .4rem; }
.turn-line p { margin: .1rem 0; }
.reply { font-style: italic; color: var(--muted); }
.notice-board { background: linear-gradient(#c79a63, #b07f4b); border-radius: 14px; padding: .6rem; color: #fff; }
.notice-board h4 { margin: .1rem 0 .2rem; }
.donor-board { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: .45rem; margin-top: .4rem; }
.donor-card { background: #fffdf3; color: var(--ink); border: 2px solid transparent; border-radius: 8px; padding: .4rem; display: flex; flex-direction: column; align-items: flex-start; gap: .05rem; min-height: 96px; cursor: pointer; box-shadow: 0 2px 0 rgba(0,0,0,.2); transform: rotate(-.6deg); }
.donor-card:nth-child(even) { transform: rotate(.7deg); }
.donor-card.on { border-color: var(--indigo); }
.donor-card.ok { border-color: var(--green); background: var(--green-bg); }
.donor-card.bad { border-color: var(--red); background: var(--red-bg); }
.blood-chip { font-weight: 800; }
.pick-mark { font-size: .72rem; font-weight: 800; color: var(--indigo); min-height: 1em; }

/* --------------------------------------------------------- PANGGUNG */
.members { display: grid; gap: .4rem; }
.member-row { display: grid; grid-template-columns: auto 1fr auto; gap: .4rem; align-items: center; }
.kentongan { width: 70px; height: 150px; margin: .5rem auto; position: relative; }
.ken-body { position: absolute; inset: 0; background: linear-gradient(90deg, #7a4e2d, #a26b3f 40%, #7a4e2d); border-radius: 30px; }
.ken-slot { position: absolute; left: 30px; top: 20px; bottom: 20px; width: 10px; background: #3b2414; border-radius: 6px; }
.kentongan.hit { animation: swing .35s; }
@keyframes swing { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.case-card h3 { margin: .3rem 0; }
.stage-editor { display: grid; gap: .6rem; }
.stage-preview { position: relative; min-height: 150px; border-radius: 14px; border: 4px solid #4a2e1a; display: flex; align-items: flex-end; justify-content: center; padding: .6rem 2.6rem; overflow: hidden; }
.curtain { position: absolute; top: 0; bottom: 0; width: 34px; background: repeating-linear-gradient(90deg, #8b1e2d 0 8px, #a52a3a 8px 16px); }
.curtain.l { left: 0; } .curtain.r { right: 0; }
.stage-preview .standee figcaption { background: rgba(255,255,255,.85); border-radius: 6px; padding: 0 .3rem; }
.chips { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.chip-btn { min-height: 40px; padding: .2rem .7rem; border-radius: 999px; border: 2px solid var(--line); background: #fff; cursor: pointer; font-weight: 700; }
.chip-btn.on { background: var(--indigo); color: #fff; border-color: var(--indigo); }
.concepts { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; font-size: .9rem; }
.parikan-ex .sampiran { color: var(--muted); }
.parikan-ex .isi { font-weight: 700; }
.parikan-form { display: grid; gap: .1rem; }
.phone { max-width: 380px; border: 8px solid #222; border-radius: 26px; overflow: hidden; background: #e5ddd5; margin: .4rem 0; }
.phone-head { background: #075e54; color: #fff; padding: .55rem .8rem; font-weight: 800; }
.phone-body { padding: .6rem; display: grid; gap: .35rem; min-height: 120px; }
.bubble { background: #fff; border-radius: 10px; padding: .35rem .6rem; max-width: 85%; display: flex; flex-direction: column; font-size: .9rem; }
.bubble b { font-size: .75rem; color: #075e54; }
.bubble.me { background: #dcf8c6; justify-self: end; }
.phone-input { display: flex; gap: .3rem; padding: .4rem; background: #f0f0f0; align-items: flex-end; }
.phone-input textarea { border-radius: 16px; }
.checklist { background: #fff; border-radius: 12px; padding: .4rem .7rem; margin: .4rem 0; }
.peer-card { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: .4rem .7rem; margin: .4rem 0; }
.peer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem; }
.stars { display: inline-flex; }
.star { width: 44px; height: 44px; border: 0; background: none; font-size: 1.6rem; color: #d6c9ab; cursor: pointer; }
.star.on { color: var(--gold); }
.area.night { background: rgba(26, 32, 70, .92); color: #f4f1e6; }
.area.night .muted { color: #c9c4dc; }
.area.night .bar { background: rgba(255,255,255,.2); }
.area.night .bar-fill { background: var(--gold); }
.stars-sky { height: 60px; background: radial-gradient(circle, #fff 0 1px, transparent 2px) 0 0/40px 40px, radial-gradient(circle, #ffe9a8 0 1.5px, transparent 2px) 20px 15px/70px 50px; opacity: .8; border-radius: 10px; }
.gallery ul { padding-left: 1.1rem; }

/* ---------------------------------------------------- PROFIL & LAIN */
.profile-head { display: flex; gap: .8rem; align-items: center; }
.badges { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; margin: .5rem 0; }
.badge { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: .55rem; text-align: center; display: flex; flex-direction: column; gap: .15rem; align-items: center; }
.badge.got { border-color: var(--gold); background: #fff8e4; }
.badge.locked { opacity: .7; }
.badge.big { max-width: 320px; margin: .6rem auto; }
.badge-icon { font-size: 2rem; }
.badge small { font-size: .75rem; color: var(--muted); }
.history { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .3rem .6rem; margin: .3rem 0; }
.history summary { cursor: pointer; font-weight: 700; min-height: 36px; display: list-item; }
.history ul { list-style: none; padding: 0; font-size: .85rem; }
.history li.ok { color: var(--green); }
.term-list { display: grid; gap: .4rem; margin-top: .5rem; }
.term { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .5rem .7rem; }
.term h4 { margin: 0 0 .2rem; }
.settings { display: grid; gap: .5rem; }
.set-row { display: flex; gap: .7rem; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; min-height: 52px; }
.set-row.col { flex-direction: column; align-items: flex-start; }
.set-row input[type="checkbox"] { width: 24px; height: 24px; flex: none; }
.set-row small { display: block; color: var(--muted); }
.set-row input[type="range"] { width: 100%; min-height: 32px; }
.panduan .legend { list-style: none; padding: 0; }
.panduan .ic { display: inline-block; min-width: 2rem; font-weight: 900; }
.panduan .ic.ok { color: var(--green); } .panduan .ic.no { color: var(--red); }
.ref-card { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .45rem .7rem; margin: .35rem 0; }
.chapter-done { text-align: center; }
.unlock { font-weight: 700; color: var(--indigo); }
.confetti { height: 40px; background: radial-gradient(circle, #c9962e 0 3px, transparent 4px) 0 0/34px 30px, radial-gradient(circle, #2c7a4b 0 3px, transparent 4px) 12px 10px/40px 26px, radial-gradient(circle, #2f3e6b 0 3px, transparent 4px) 22px 4px/46px 32px; }
.certificate { background: #fffdf5; border: 10px double var(--wood); border-radius: 8px; padding: 1.6rem 1.4rem; text-align: center; }
.certificate h1 { letter-spacing: 6px; color: var(--wood); margin: .2rem 0; }
.cert-name { font-size: 1.9rem; color: var(--indigo); margin: .3rem 0; }
.cert-school { font-weight: 800; color: var(--muted); }
.cert-badges { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: .6rem 0; }
.cert-badge { background: #fff8e4; border: 1px solid var(--gold); border-radius: 999px; padding: .15rem .6rem; font-weight: 700; }
.cert-quote { font-style: italic; color: var(--muted); }
.cert-date { margin-top: 1rem; font-weight: 700; }

/* --------------------------------------------------------- RESPONSIF */
@media (max-height: 440px) and (orientation: landscape) {
  .topbar { min-height: 44px; padding: .1rem .5rem; }
  .meter { width: 26px; height: 26px; }
  .meter-icon { width: 20px; height: 20px; font-size: .65rem; }
  .stage { padding: .35rem .5rem; gap: .4rem; }
  .area { padding: .5rem .7rem; }
  .objective { padding: .4rem .55rem; }
  .objective h3 { font-size: .82rem; }
  .obj-text { font-size: .8rem; }
  .dialog { margin: 0 .5rem .35rem; padding: .3rem .6rem; max-height: 40vh; gap: .5rem; }
  .dlg-portrait .portrait { width: 40px; height: 40px; font-size: .85rem; }
  .dlg-text { font-size: .92rem; }
  .dlg-sub { font-size: .8rem; }
  .portrait-xl { width: 64px; height: 64px; font-size: 1.3rem; }
  .meters-label { display: none; }
  .tb-title { font-size: .85rem; }
}
@media (max-width: 640px) {
  .mission { height: auto; min-height: 100dvh; overflow: visible; grid-template-rows: auto auto auto auto; }
  .stage { grid-template-columns: minmax(0, 1fr); }
  .side { order: -1; flex-direction: row; flex-wrap: wrap; overflow: visible; }
  .objective { flex: 1 1 100%; }
  .kamus-btn { width: auto; flex: 1; }
  .area { overflow: visible; }
  .dialog { position: sticky; bottom: 0; z-index: 5; margin: 0 .4rem .4rem; grid-template-columns: auto 1fr; }
  .btn-next { grid-column: 1 / -1; }
  .meters-label { display: none; }
  .meter { width: 26px; height: 26px; }
  .meter-icon { width: 20px; height: 20px; font-size: .62rem; }
  .map-grid { grid-template-columns: repeat(2, 1fr); }
  .matcher { grid-template-columns: 1fr; }
  .options.three { grid-template-columns: 1fr; }
  .gamete-slots { grid-template-columns: repeat(2, 1fr); }
  .topbar { flex-wrap: wrap; }
  .tb-title { flex-basis: 100%; order: -1; }
}
@media (orientation: portrait) and (max-width: 640px) {
  body:not(.hide-rotate) .rotate-hint { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ------------------------------------------------------------- CETAK */
@media print {
  body.printing-cert > *:not(.ov-cert) { display: none !important; }
  body.printing-cert .ov-cert { position: static; background: none; padding: 0; display: block; }
  body.printing-cert .overlay-box { box-shadow: none; max-height: none; max-width: none; padding: 0; background: none; }
  .no-print { display: none !important; }
  .certificate { min-height: 90vh; display: flex; flex-direction: column; justify-content: center; }
}


/* ====================================================== VERSI 2 */
/* Map Bukti */
.bukti-chip { border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: .25rem .6rem; font-weight: 800; min-height: 36px; cursor: pointer; white-space: nowrap; }
.bukti-chip:hover { background: var(--paper-2); }
.bukti-list { padding-left: 1.2rem; display: grid; gap: .35rem; }
.bukti-list li.todo { color: var(--muted); }
.bukti-list li.ok::marker { color: var(--green); font-weight: 800; }
.bukti-new { background: var(--green-bg); border: 1px solid #b9dcc6; border-radius: var(--radius); padding: .5rem .75rem; margin: .5rem 0; text-align: left; }
.bukti-new p { margin: .2rem 0 0; }

/* Barometer Jombang */
.barometer { display: grid; gap: .8rem; }
.baro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .55rem; }
.baro-card { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--red); border-radius: 12px; padding: .55rem .7rem; box-shadow: var(--shadow); }
.baro-big { font-size: 1.55rem; font-weight: 900; color: var(--red); line-height: 1.1; }
.baro-big small { font-size: .78rem; font-weight: 700; color: var(--muted); }
.baro-label { margin: .25rem 0; font-size: .9rem; }
.baro-src { margin: 0; font-size: .74rem; color: var(--muted); }
.baro-gerakan { background: var(--green-bg); border: 1px solid #b9dcc6; border-radius: var(--radius); padding: .55rem .75rem; }
.gerakan-list { list-style: none; padding: 0; margin: .3rem 0 0; display: grid; gap: .3rem; }
.gerakan-list li { display: flex; align-items: center; gap: .5rem; }
.gk-label { flex: 1; min-width: 0; }
.gk-val { font-size: 1.15rem; color: var(--green); min-width: 2.5rem; text-align: right; }
.baro-compare { background: var(--info-bg); border-radius: var(--radius); padding: .55rem .75rem; }
.baro-compare p { margin: .25rem 0; }

/* Paribasan Jawa */
.paribasan { background: #fff7e3; border: 1px dashed var(--gold); border-radius: var(--radius); padding: .5rem .7rem; }
.pb-head { font-size: .78rem; font-weight: 800; color: var(--wood); text-transform: uppercase; letter-spacing: .03em; }
.pb-text { margin: .2rem 0; font-weight: 800; font-style: italic; }
.pb-arti { margin: 0; font-size: .85rem; color: var(--muted); }

/* Unggah-ungguh */
.unggah { border-top: 1px dashed var(--line); padding-top: .5rem; margin-top: .5rem; }
.opt.retry { opacity: .7; border-style: dashed; background: var(--info-bg); }
.phone-sm { max-width: 420px; }

/* Rencana donor */
.planner { display: grid; gap: .6rem; }
.plan-q { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .55rem .75rem; }
.plan-q .prompt { margin-top: 0; }
.plan-q .input.num { max-width: 7rem; }
.plan-final { border-color: var(--gold); }
.planner-rules ul { list-style: none; padding: 0; }

/* Transkripsi DNA/RNA */
.rule-chip { display: inline-block; background: var(--info-bg); border-radius: 999px; padding: .2rem .7rem; font-weight: 800; font-size: .9rem; margin: 0 0 .5rem; }
.ladder-scroll { overflow-x: auto; padding-bottom: .3rem; }
.dna-ladder { display: inline-grid; gap: .1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem .8rem; }
.strand { display: flex; align-items: center; gap: .6rem; }
.strand-label { width: 8.5rem; flex: none; font-size: .8rem; font-weight: 800; color: var(--muted); }
.strand-cells, .rungs { display: flex; gap: .25rem; }
.rungs { margin-left: 9.1rem; color: #b8a98c; }
.rungs span { width: 2.2rem; text-align: center; }
.rungs span.codon-end { margin-right: .35rem; }
.base { width: 2.2rem; height: 2.2rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; font-weight: 900; border: 2px solid transparent; background: var(--paper-2); }
.base.codon-end { margin-right: .35rem; }
.strand.tgt .base { background: #fff; border: 2px dashed var(--line); color: var(--muted); }
.strand.tgt .base.current { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(47, 62, 107, .18); }
.strand.tgt .base.filled { border-style: solid; color: #fff; }
.b-A { background: #d9534f !important; color: #fff; }
.b-T { background: #3c7dd9 !important; color: #fff; }
.b-U { background: #8e44ad !important; color: #fff; }
.b-G { background: #2c9a5a !important; color: #fff; }
.b-C { background: #e3a21a !important; color: #1d1d1d; }
.strand.tgt .base.filled.b-C { color: #1d1d1d; }
.base-palette { display: flex; gap: .5rem; margin: .7rem 0; flex-wrap: wrap; }
.base-btn { width: 3.2rem; height: 3.2rem; border-radius: 12px; border: 0; font-size: 1.3rem; font-weight: 900; cursor: pointer; box-shadow: var(--shadow); }
.base-btn:disabled { opacity: .45; cursor: default; }
.codons { margin: .6rem 0; }
.codon-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .3rem; }
.codon { display: grid; text-align: center; background: #fff; border: 2px solid var(--indigo); border-radius: 10px; padding: .3rem .6rem; }
.codon b { letter-spacing: .15em; }
.codon small { color: var(--muted); }
.chromo-illus { display: flex; justify-content: center; }

/* Jurnal Profil Lulusan */
.jurnal { display: grid; gap: .3rem; }

@media (max-width: 720px) {
  .strand-label { width: 5.5rem; }
  .rungs { margin-left: 6.1rem; }
  .base, .rungs span { width: 1.8rem; height: 1.8rem; }
  .baro-big { font-size: 1.3rem; }
  .bukti-chip { padding: .2rem .45rem; }
}

/* Penutup (latar malam): kartu tetap terbaca */
.night .baro-card, .night .baro-gerakan, .night .baro-compare { color: var(--ink); }
.night .baro-gerakan .muted, .night .baro-compare .muted { color: var(--muted); }
.night .jurnal details { background: rgba(255, 255, 255, .94); color: var(--ink); border-radius: 10px; padding: .3rem .55rem; }
.night .bukti-list li.todo { color: #cfc8e0; }
.night .baro-data > .muted { color: #cfc8e0; }

/* Momen tadabbur: ayat/hadis di dalam adegan (bukan pop-up) */
.tdb-moment { margin: .9rem 0 .3rem; padding: .75rem .85rem .85rem; background: #eef2f9; color: var(--ink); border: 2px solid #3b6fc4; border-radius: var(--radius); scroll-margin-top: .5rem; }
.tdb-head { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; font-size: .95rem; color: #1d2a44; margin-bottom: .5rem; }
.tdb-head .chip { margin-left: auto; }
.tdb-icon { font-size: 1.15rem; }
.tdb-line { display: flex; gap: .5rem; align-items: flex-start; margin: .35rem 0; }
.tdb-line .portrait { flex: none; width: 40px; height: 40px; font-size: .85rem; border-width: 2px; }
.tdb-line.narasi .tdb-bubble { font-style: italic; background: transparent; border-style: dashed; }
.tdb-bubble { background: #fff; border: 1px solid #c7d3ea; border-radius: 12px; padding: .35rem .65rem; min-width: 0; }
.tdb-name { display: block; font-size: .78rem; color: #3b6fc4; }
.tdb-text { margin: .1rem 0; }
.tdb-sub { margin: .1rem 0 0; font-size: .85rem; color: #4a5568; font-style: italic; }
.tdb-ayat { background: #fff; border-radius: 12px; border: 1px solid #c7d3ea; padding: .6rem .8rem; margin: .6rem 0; text-align: center; }
.tdb-ayat .arabic { margin: .3rem 0 .5rem; }
.tdb-ask { border-top: 1px dashed #9fb3d9; padding-top: .55rem; margin-top: .4rem; }
.tdb-ask .prompt { font-weight: 800; }
.tdb-moment.done { border-color: #9ccfb0; }
.night .tdb-moment, .night .tdb-moment p, .night .tdb-moment h3 { color: var(--ink); }
.night .tdb-moment .tdb-sub, .night .tdb-moment .tb-src { color: #4a5568; }

/* =====================================================================
   TEMA JOMBANG (v2.2): nuansa batik sogan, wayang, dan gunungan.
   Lapisan tampilan di atas gaya dasar; latar dan tokoh digambar art.js.
   ===================================================================== */
:root {
  --ink: #2a1d16;
  --muted: #6e5a46;
  --paper: #faf3e3;
  --paper-2: #f0e3c6;
  --line: #dcc59a;
  --wood: #5a3420;
  --wood-2: #8b5a3c;
  --indigo: #1c2747;
  --indigo-2: #2c3a66;
  --gold: #d4a24c;
  --gold-2: #f0cf86;
  --cream: #f8efdc;
  --font-display: 'Alegreya', 'Georgia', serif;
  --font-title: 'Alegreya SC', 'Alegreya', 'Georgia', serif;
  --pat-kawung: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2228%22%20height%3D%2228%22%3E%3Cg%20fill%3D%22%23d4a24c%22%20opacity%3D%220.22%22%20transform%3D%22rotate%2845%2014.0%2014.0%29%22%3E%3Cellipse%20cx%3D%2214.0%22%20cy%3D%228.399999999999999%22%20rx%3D%223.64%22%20ry%3D%225.6000000000000005%22/%3E%3Cellipse%20cx%3D%2214.0%22%20cy%3D%2219.6%22%20rx%3D%223.64%22%20ry%3D%225.6000000000000005%22/%3E%3Cellipse%20cx%3D%228.399999999999999%22%20cy%3D%2214.0%22%20rx%3D%225.6000000000000005%22%20ry%3D%223.64%22/%3E%3Cellipse%20cx%3D%2219.6%22%20cy%3D%2214.0%22%20rx%3D%225.6000000000000005%22%20ry%3D%223.64%22/%3E%3C/g%3E%3Ccircle%20cx%3D%2214.0%22%20cy%3D%2214.0%22%20r%3D%221.4000000000000001%22%20fill%3D%22%23d4a24c%22%20opacity%3D%220.22%22/%3E%3C/svg%3E");
  --pat-kawung-sogan: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2236%22%20height%3D%2236%22%3E%3Cg%20fill%3D%22%235a3420%22%20opacity%3D%220.07%22%20transform%3D%22rotate%2845%2018.0%2018.0%29%22%3E%3Cellipse%20cx%3D%2218.0%22%20cy%3D%2210.8%22%20rx%3D%224.68%22%20ry%3D%227.2%22/%3E%3Cellipse%20cx%3D%2218.0%22%20cy%3D%2225.2%22%20rx%3D%224.68%22%20ry%3D%227.2%22/%3E%3Cellipse%20cx%3D%2210.8%22%20cy%3D%2218.0%22%20rx%3D%227.2%22%20ry%3D%224.68%22/%3E%3Cellipse%20cx%3D%2225.2%22%20cy%3D%2218.0%22%20rx%3D%227.2%22%20ry%3D%224.68%22/%3E%3C/g%3E%3Ccircle%20cx%3D%2218.0%22%20cy%3D%2218.0%22%20r%3D%221.8%22%20fill%3D%22%235a3420%22%20opacity%3D%220.07%22/%3E%3C/svg%3E");
  --pat-parang: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2218%22%20height%3D%2218%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23d4a24c%22%20stroke-width%3D%222.5200000000000005%22%20stroke-linecap%3D%22round%22%20opacity%3D%220.9%22%3E%3Cpath%20d%3D%22M-4.5%2018.900000000000002%20C%201.8%209.9%209.0%2015.299999999999999%209.9%208.1%20S%2017.099999999999998%200.9%2022.5%20-0.9%22/%3E%3C/g%3E%3Ccircle%20cx%3D%222.16%22%20cy%3D%222.16%22%20r%3D%221.2600000000000002%22%20fill%3D%22%23d4a24c%22%20opacity%3D%220.9%22/%3E%3C/svg%3E");
  --pat-parang-cream: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2218%22%20height%3D%2218%22%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23f0cf86%22%20stroke-width%3D%222.5200000000000005%22%20stroke-linecap%3D%22round%22%20opacity%3D%220.55%22%3E%3Cpath%20d%3D%22M-4.5%2018.900000000000002%20C%201.8%209.9%209.0%2015.299999999999999%209.9%208.1%20S%2017.099999999999998%200.9%2022.5%20-0.9%22/%3E%3C/g%3E%3Ccircle%20cx%3D%222.16%22%20cy%3D%222.16%22%20r%3D%221.2600000000000002%22%20fill%3D%22%23f0cf86%22%20opacity%3D%220.55%22/%3E%3C/svg%3E");
  --shadow: 0 10px 28px rgba(26, 15, 8, .22), 0 2px 0 rgba(90, 52, 32, .18);
}
body { background: #2a1d16; }
h1, h2, h3 { font-family: var(--font-display); }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
[class*="bg-"].has-scene { background-size: cover; background-position: center bottom; }

/* ------------------------------------------------------------ TOMBOL */
.btn { border: 1.5px solid #c9a86a; background: linear-gradient(180deg, #fffaf0, #f2e4c6); box-shadow: 0 2px 0 #b8925a; border-radius: 12px; transition: transform .08s ease, filter .15s ease; }
.btn:hover:not(:disabled) { background: linear-gradient(180deg, #fffdf6, #f6eacf); filter: brightness(1.02); }
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 0 #b8925a; }
.btn-primary { background: linear-gradient(180deg, #34457a, #1c2747); border-color: var(--gold); color: #fbefd5; box-shadow: 0 3px 0 #0e1530, inset 0 1px 0 rgba(255, 255, 255, .18); letter-spacing: .2px; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(180deg, #3d5091, #24325d); }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; }
.btn-xl { font-family: var(--font-display); font-size: 1.35rem; padding: .7rem 2.6rem; border-radius: 999px; border-width: 2px; }

/* --------------------------------------------------------- BILAH ATAS */
.topbar { background: linear-gradient(180deg, #24315a, #19223f); color: var(--cream); border-bottom: 0; position: relative; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); gap: .6rem; }
.topbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6px; height: 6px; background: var(--pat-parang) repeat-x, #5a3420; background-size: 9px 9px; opacity: .95; }
.tb-brand { width: 30px; height: 30px; flex: none; }
.tb-brand svg { width: 100%; height: 100%; }
.tb-title { display: flex; align-items: baseline; gap: .45rem; font-size: 1rem; }
.tb-title b { font-family: var(--font-display); font-size: 1.12rem; color: #fff6e2; font-weight: 800; overflow: hidden; text-overflow: ellipsis; }
.tb-bab { font-size: .72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--gold-2); font-weight: 800; white-space: nowrap; }
.tb-code { font-size: .72rem; color: #a9b2d0; white-space: nowrap; }
.tb-progress { display: flex; align-items: center; gap: .4rem; color: #cfd6ee; font-size: .78rem; font-weight: 700; }
.tbp-bar { width: 90px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.tbp-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 99px; }
.bukti-chip { display: inline-flex; align-items: center; gap: .35rem; min-height: 38px; padding: .2rem .7rem; border-radius: 999px; border: 1px solid rgba(240, 207, 134, .55); background: rgba(255, 255, 255, .08); color: var(--gold-2); cursor: pointer; font-size: .85rem; }
.bukti-chip b { color: #fff6e2; }
.topbar .btn-menu { background: transparent; color: var(--gold-2); border-color: rgba(240, 207, 134, .6); box-shadow: none; min-height: 38px; }
.topbar .btn-menu:hover { background: rgba(255, 255, 255, .08); }
.topbar .meters { color: var(--cream); }
.meters { flex-wrap: wrap; }
.meter { width: 32px; height: 32px; background: conic-gradient(var(--gold) var(--p), rgba(90, 52, 32, .2) 0); }
.meter-icon { width: 25px; height: 25px; background: #fffaf0; color: var(--wood); }
.meter-icon svg { width: 15px; height: 15px; }
.topbar .meter { background: conic-gradient(var(--gold) var(--p), rgba(255, 255, 255, .18) 0); }
.topbar .meter-icon { background: #24315a; color: var(--gold-2); }
.meters-label { font-weight: 700; }
.topbar .meters-label { color: #cfd6ee; }

/* -------------------------------------------------------- POTRET */
.portrait.has-art { background: none !important; border: 2.5px solid var(--gold); box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
.portrait.has-art img { display: block; }
.portrait-hero { width: min(34vh, 240px); height: min(34vh, 240px); border-width: 5px; }

/* ------------------------------------------------------ LAYAR JUDUL */
.title-screen { justify-content: center; }
.title-screen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28, 39, 71, .05), rgba(28, 39, 71, .35)); pointer-events: none; }
.gate { display: none; }
.title-stage { position: relative; z-index: 2; display: flex; align-items: center; gap: clamp(1rem, 4vw, 3rem); }
.title-hero { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .5rem; }
.title-hero figcaption { background: var(--indigo); color: var(--cream); border: 2px solid var(--gold); border-radius: 999px; padding: .25rem 1rem; text-align: center; line-height: 1.2; box-shadow: var(--shadow); }
.title-hero figcaption b { font-family: var(--font-display); display: block; font-size: 1.05rem; color: var(--gold-2); }
.title-hero figcaption span { font-size: .75rem; }
.title-box { background: rgba(250, 243, 227, .96); border: 2px solid var(--gold); border-radius: 28px; padding: 1.1rem 2rem 1.3rem; max-width: 600px; box-shadow: var(--shadow), inset 0 0 0 6px rgba(250, 243, 227, .96), inset 0 0 0 7px rgba(212, 162, 76, .55); }
.title-emblem { width: 64px; height: 64px; margin: -3rem auto .1rem; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .3)); }
.title-emblem svg { width: 100%; height: 100%; }
.school-chip { background: var(--indigo); color: var(--gold-2); border: 0; letter-spacing: 2px; text-transform: uppercase; font-size: .72rem; padding: .25rem .9rem; }
.game-title { font-family: var(--font-title); font-weight: 800; color: var(--wood); font-size: clamp(2rem, 5.4vw, 3.4rem); line-height: 1.05; text-shadow: 0 2px 0 rgba(240, 207, 134, .9); margin: .35em 0 .1em; letter-spacing: .5px; }
.game-sub { font-family: var(--font-display); font-style: italic; color: #a06d1f; font-size: clamp(1.1rem, 3vw, 1.6rem); font-weight: 700; }
.batik-rule { height: 10px; margin: .5rem auto .4rem; width: 70%; background: var(--pat-parang) repeat-x, var(--wood); background-size: 10px 10px; border-radius: 99px; }
.tagline { color: var(--muted); margin-bottom: .9rem; }

/* ------------------------------------------------- MASUK & AVATAR */
.login-card, .avatar-card { background: rgba(250, 243, 227, .97); border: 2px solid var(--gold); border-radius: 22px; box-shadow: var(--shadow); }
.kitab { border-top: 2px solid var(--gold); position: relative; padding-top: 1.4rem; }
.kitab::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-radius: 20px 20px 0 0; background: var(--pat-parang) repeat-x, var(--wood); background-size: 10px 10px; }

/* ------------------------------------------------------- PETA MADRASAH */
.map-screen { background-color: #efe2c4; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem 1rem 0; flex-wrap: wrap; }
.map-balloon { margin: 0; align-items: center; }
.balloon { border: 1.5px solid var(--gold); background: #fffaf0; border-radius: 18px; padding: .5rem .9rem; }
.balloon::before { border-right-color: var(--gold); top: 22px; }
.balloon-name { font-family: var(--font-display); color: var(--wood); font-size: .85rem; }
.journey { display: flex; align-items: center; gap: .55rem; background: var(--indigo); color: var(--cream); border: 1.5px solid var(--gold); border-radius: 999px; padding: .35rem .9rem; box-shadow: var(--shadow); font-size: .85rem; }
.journey-label { color: var(--gold-2); text-transform: uppercase; letter-spacing: 1.2px; font-size: .7rem; font-weight: 800; }
.journey-bar { width: 120px; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.journey-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.map-grid { gap: 1rem; padding: 1rem; }
.loc { padding: 0; border: 0; border-radius: 20px; overflow: hidden; min-height: 190px; background: #2a1d16; box-shadow: var(--shadow); display: block; text-align: left; transition: transform .15s ease, box-shadow .15s ease; outline: 2px solid rgba(212, 162, 76, .7); outline-offset: -2px; }
.loc > * { background: none; border-radius: 0; padding: 0; }
.loc:hover:not(.is-locked) { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(26, 15, 8, .32); }
.loc-img { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .4s ease; }
.loc:hover:not(.is-locked) .loc-img { transform: scale(1.04); }
.loc::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 14, 10, 0) 30%, rgba(20, 14, 10, .82) 100%); pointer-events: none; }
.loc-num { position: absolute; top: 10px; left: 10px; z-index: 2; width: 42px; height: 46px; display: grid; place-items: center; background: var(--indigo); color: var(--gold-2); font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; clip-path: path('M21 0 C 27 6, 40 18, 41 30 C 42 38, 38 44, 35 46 L 7 46 C 4 44, 0 38, 1 30 C 2 18, 15 6, 21 0 Z'); }
.loc-num span { margin-top: 12px; }
.loc-body { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: .7rem .85rem .75rem; display: flex; flex-direction: column; gap: .1rem; color: #fff6e2; }
.loc-name { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; line-height: 1.1; }
.loc-title { font-size: .82rem; color: #ead8b4; }
.loc-foot { display: flex; align-items: center; gap: .6rem; margin-top: .35rem; }
.loc-status { font-size: .76rem; font-weight: 800; padding: .12rem .55rem; border-radius: 999px; background: var(--gold); color: var(--indigo); margin: 0; }
.loc-status.done { background: #2f7a4b; color: #fff; }
.loc-status.locked { background: rgba(255, 255, 255, .2); color: #f1e7d2; }
.loc-prog { flex: 1; height: 5px; background: rgba(255, 255, 255, .22); border-radius: 99px; overflow: hidden; }
.loc-prog > span { display: block; height: 100%; background: var(--gold-2); }
.loc.is-locked { filter: grayscale(.85) brightness(.75); opacity: 1; }
.loc.is-done { outline-color: #6fbf8a; box-shadow: var(--shadow); }
.loc.is-current { outline: 3px solid var(--gold-2); }
.dock { background: linear-gradient(180deg, #24315a, #19223f); border-top: 0; gap: .3rem; padding: .45rem .6rem; box-shadow: 0 -4px 14px rgba(0, 0, 0, .2); }
.dock::before { content: ''; position: absolute; left: 0; right: 0; top: -6px; height: 6px; background: var(--pat-parang) repeat-x, #5a3420; background-size: 9px 9px; }
.dock-btn { display: flex; flex-direction: column; align-items: center; gap: .1rem; min-width: 76px; min-height: 48px; padding: .25rem .5rem; border: 0; border-radius: 12px; background: transparent; color: #e7dcc6; font-weight: 700; font-size: .78rem; cursor: pointer; }
.dock-btn .ic { width: 22px; height: 22px; color: var(--gold-2); }
.dock-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

/* ---------------------------------------------------------- LAYAR MISI */
.mission.has-scene { background-color: #2a1d16; }
.stage { padding: .9rem .9rem .6rem; gap: .8rem; }
.area { background: rgba(250, 244, 230, .95); border: 1.5px solid rgba(212, 162, 76, .75); border-radius: 20px; box-shadow: var(--shadow); padding: 1rem 1.2rem; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.area::before { content: ''; display: block; height: 8px; margin: -1rem -1.2rem .8rem; border-radius: 18px 18px 0 0; background: var(--pat-parang) repeat-x, var(--wood); background-size: 8px 8px; }
.side { gap: .7rem; }
.objective { background: linear-gradient(180deg, #24315a, #1a2443); color: var(--cream); border: 1.5px solid var(--gold); border-radius: 18px; box-shadow: var(--shadow); padding: .75rem .9rem; }
.objective h3 { font-family: var(--font-display); color: var(--gold-2); font-size: .82rem; text-transform: uppercase; letter-spacing: 1.6px; }
.obj-text { color: #f6ecd6; font-size: .95rem; }
.obj-status { color: #a9b2d0; }
.obj-status.ok { color: #8fe0a8; }
.kamus-btn { justify-content: flex-start; }
.kamus-btn .ic { color: var(--wood); }
.side .meters { background: rgba(250, 244, 230, .92); border: 1.5px solid rgba(212, 162, 76, .7); border-radius: 16px; padding: .45rem .55rem; justify-content: center; box-shadow: var(--shadow); }
.side .meters-label { width: 100%; text-align: center; margin: .1rem 0 0; color: var(--wood); font-size: .7rem; letter-spacing: 1.2px; text-transform: uppercase; }
.scene-caption { font-family: var(--font-display); font-size: .98rem; color: var(--muted); }
.cast { gap: 1.2rem; }
.standee .portrait-xl { width: 104px; height: 104px; border-width: 3px; }
.standee figcaption { font-family: var(--font-display); font-weight: 800; color: var(--wood); background: #fffaf0; border: 1px solid var(--line); border-radius: 99px; padding: .05rem .6rem; margin-top: .3rem; }
.prompt { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; color: var(--wood); }
.opt { border: 1.5px solid var(--line); border-radius: 14px; background: #fffdf7; box-shadow: 0 2px 0 rgba(90, 52, 32, .12); transition: transform .08s ease, border-color .15s ease; }
.opt:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); }
.info-card { border: 1.5px solid var(--line); border-radius: 18px; background: #fffdf7; }
.info-badge { background: var(--indigo); color: var(--gold-2); }

/* -------------------------------------------------------- PANEL DIALOG */
.dialog { background: linear-gradient(180deg, rgba(36, 49, 90, .97), rgba(24, 33, 62, .97)); color: var(--cream); border: 2px solid var(--gold); border-radius: 20px; margin: 0 .9rem .8rem; padding: .65rem 1rem .65rem .75rem; box-shadow: 0 12px 30px rgba(0, 0, 0, .35); position: relative; }
.dialog::before { content: ''; position: absolute; left: 22px; right: 22px; top: -2px; height: 4px; background: var(--pat-parang) repeat-x; background-size: 8px 8px; opacity: .9; }
.dlg-portrait .portrait { width: 66px; height: 66px; }
.dlg-name { display: inline-block; font-family: var(--font-display); color: var(--indigo); background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-radius: 999px; padding: .02rem .7rem; font-size: .92rem; }
.dlg-count { color: #a9b2d0; }
.dlg-text { color: #fff8ea; font-size: 1.06rem; }
.dlg-sub { color: #e8cf95; }
.dlg-sub::before { content: ''; }
.dialog.narasi .dlg-name { background: rgba(255, 255, 255, .12); color: var(--gold-2); }
.dialog .btn-next { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--indigo); border-color: #f6dfa6; box-shadow: 0 3px 0 #9c7128; font-family: var(--font-display); font-size: 1.05rem; }
.dialog .btn-next:hover:not(:disabled) { background: linear-gradient(180deg, #f7dca1, #dcaa55); }

/* ------------------------------------------------------ MOMEN TADABBUR */
.tdb-moment { background: #fbf6ea; border: 2px solid var(--gold); border-radius: 20px; padding: 0 1rem 1rem; overflow: hidden; box-shadow: 0 6px 18px rgba(26, 15, 8, .14); }
.tdb-head { margin: 0 -1rem .7rem; padding: .55rem 1rem; background: linear-gradient(180deg, #24315a, #1a2443); color: var(--gold-2); position: relative; }
.tdb-head b { font-family: var(--font-display); font-size: 1.05rem; color: #fff6e2; }
.tdb-head::after { content: ''; position: absolute; left: 0; right: 0; bottom: -5px; height: 5px; background: var(--pat-parang) repeat-x, var(--wood); background-size: 8px 8px; }
.tdb-ayat { border: 1.5px solid rgba(212, 162, 76, .6); background: #fffdf8 var(--pat-kawung-sogan); border-radius: 16px; }
.tdb-ayat .tb-kind { color: #a06d1f; }
.tdb-ayat .tb-ref { font-family: var(--font-display); color: var(--wood); }
.tdb-ayat .arabic { color: #1c2747; }
.tdb-bubble { border-color: var(--line); border-radius: 14px; }
.tdb-name { color: #a06d1f; font-family: var(--font-display); }
.tdb-moment.done { border-color: #6fbf8a; }
.ov-tadabbur .tadabbur { background: #fbf6ea var(--pat-kawung-sogan); border: 2px solid var(--gold); border-radius: 22px; }

/* ----------------------------------------------------------- LEMBAR */
.overlay-box { border: 1.5px solid var(--gold); border-radius: 22px; }
.sheet-head { background: linear-gradient(180deg, #24315a, #1a2443); color: var(--cream); border-bottom: 0; }
.sheet-head h2 { color: var(--gold-2); }
.chapter-sheet .info-title, .info-title { font-family: var(--font-display); color: var(--wood); }

/* -------------------------------------------------------- RESPONSIF */
@media (max-height: 440px) and (orientation: landscape) {
  .tb-brand { width: 24px; height: 24px; }
  .tb-title b { font-size: .98rem; }
  .tbp-bar { width: 56px; }
  .tb-code { display: none; }
  .bk-label { display: none; }
  .stage { padding: .55rem .55rem .35rem; }
  .area { padding: .6rem .8rem; }
  .area::before { margin: -.6rem -.8rem .5rem; height: 6px; }
  .dialog { margin: 0 .5rem .4rem; padding: .35rem .7rem .35rem .5rem; }
  .dlg-portrait .portrait { width: 44px; height: 44px; }
  .standee .portrait-xl { width: 70px; height: 70px; }
  .side .meters { display: none; }
  .title-hero { display: none; }
  .title-box { padding: .6rem 1.4rem .8rem; }
  .title-emblem { width: 44px; height: 44px; margin: -1.8rem auto 0; }
  .game-title { font-size: 1.9rem; }
  .batik-rule { margin: .3rem auto; }
  .tagline { margin-bottom: .4rem; font-size: .85rem; }
  .btn-xl { font-size: 1.1rem; padding: .5rem 2rem; }
  .map-head { padding: .5rem .7rem 0; }
  .map-balloon .portrait { width: 44px; height: 44px; }
  .map-grid { gap: .6rem; padding: .6rem .7rem; }
  .loc { min-height: 132px; }
  .loc-name { font-size: 1rem; }
  .loc-title { display: none; }
  .dock-btn { min-height: 40px; font-size: .72rem; }
}
@media (max-width: 760px) {
  .title-stage { flex-direction: column; }
  .portrait-hero { width: 120px; height: 120px; }
  .journey-bar { width: 70px; }
}
@media (max-width: 640px) {
  .tb-progress { display: none; }
  .dock-btn { min-width: 56px; }
}
/* penyesuaian tema */
.tb-title > span { display: flex; align-items: baseline; gap: .55rem; min-width: 0; }
.tb-title > span > b { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balloon .dlg-sub { color: var(--muted); }
.balloon .dlg-sub::before { content: ''; }
.tdb-head .chip.warn { background: #fbe3c8; color: #6b3410; border-color: #e7a774; }
.tdb-head .chip.ok { color: #1f5a35; }
.loc::after { background: linear-gradient(180deg, rgba(20, 14, 10, .05) 20%, rgba(20, 14, 10, .55) 55%, rgba(20, 14, 10, .9) 100%); }
.loc-name, .loc-title { text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.dock { z-index: 10; }
@media (max-height: 440px) and (orientation: landscape) {
  .dialog { max-height: 38vh; }
  .dlg-text { font-size: .9rem; }
  .dlg-sub { font-size: .76rem; }
  .dlg-name { font-size: .8rem; }
  .dialog .btn-next { font-size: .92rem; padding: .35rem .8rem; min-height: 40px; }
  .cast { gap: .6rem; }
  .scene-caption { font-size: .85rem; }
  .tb-bab { display: none; }
}
/* Mode adegan: dialog dan tadabbur tampil di atas latar ilustrasi, seperti gim cerita */
.area.scene-mode { background: transparent; border-color: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; display: flex; flex-direction: column; justify-content: flex-end; }
.area.scene-mode::before { display: none; }
.area.scene-mode .scene { margin-top: auto; }
.area.scene-mode .cast { align-items: flex-end; }
.area.scene-mode .standee .portrait-xl { width: 132px; height: 132px; }
.area.scene-mode .scene-caption { display: inline-block; background: rgba(28, 39, 71, .82); color: #f6ecd6; border: 1px solid rgba(240, 207, 134, .6); border-radius: 12px; padding: .35rem .8rem; max-width: 620px; }
.area.scene-mode .scene-banner { background: rgba(28, 39, 71, .85); color: var(--gold-2); }
.area.scene-mode .tdb-moment, .area.scene-mode .fb, .area.scene-mode .ask { background-color: #fbf6ea; }
.area.scene-mode .center .btn-lg { box-shadow: 0 6px 18px rgba(0, 0, 0, .3); }
@media (max-height: 440px) and (orientation: landscape) {
  .area.scene-mode .standee .portrait-xl { width: 74px; height: 74px; }
}

/* ---------------------------------------------------- PROFIL PENGEMBANG */
.dev-credit { position: absolute; left: 14px; bottom: 14px; z-index: 3; display: flex; align-items: center; gap: .55rem; padding: .35rem .8rem .35rem .4rem; border-radius: 999px; border: 1.5px solid var(--gold); background: rgba(28, 39, 71, .88); color: var(--cream); cursor: pointer; text-align: left; box-shadow: var(--shadow); max-width: calc(100vw - 28px); }
.dev-credit:hover { background: rgba(36, 49, 90, .95); }
.dev-credit img, .dev-credit .dev-mono { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.dev-credit span { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.dev-credit small { font-size: .68rem; color: #c9cfe6; }
.dev-credit b { font-family: var(--font-display); color: var(--gold-2); font-size: .95rem; }
.dev-mono { display: grid; place-items: center; background: linear-gradient(160deg, var(--gold-2), var(--gold)); color: var(--indigo); font-family: var(--font-display); font-weight: 800; border-radius: 50%; }
.dev-mono.big { width: 100%; height: 100%; font-size: 2.6rem; }
.dev-status { position: absolute; right: 14px; bottom: 14px; z-index: 3; max-width: min(520px, 60vw); font-size: .75rem; background: rgba(250, 243, 227, .95); border: 1px dashed var(--wood-2); border-radius: 10px; padding: .3rem .6rem; color: var(--wood); }
.dev-profile { display: grid; gap: .9rem; }
.dev-hero { display: grid; grid-template-columns: 140px 1fr; gap: 1rem; align-items: center; background: linear-gradient(180deg, #24315a, #1a2443); color: var(--cream); border: 1.5px solid var(--gold); border-radius: 20px; padding: 1rem; position: relative; overflow: hidden; }
.dev-hero::after { content: ''; position: absolute; inset: 0; background: var(--pat-kawung); background-size: 28px 28px; opacity: .35; pointer-events: none; }
.dev-hero > * { position: relative; z-index: 1; }
.dev-photo { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; border: 4px solid var(--gold); box-shadow: 0 6px 16px rgba(0, 0, 0, .35); }
.dev-photo img { width: 100%; height: 100%; object-fit: cover; }
.dev-id h3 { font-family: var(--font-display); font-size: 1.5rem; color: #fff6e2; margin: 0; }
.dev-role { color: var(--gold-2); font-weight: 700; margin: .1rem 0 .35rem; }
.dev-tags { display: flex; flex-wrap: wrap; gap: .3rem; }
.dev-tags .chip { margin: 0; background: rgba(255, 255, 255, .1); color: var(--cream); border-color: rgba(240, 207, 134, .5); }
.dev-block .dev-tags .chip.skill { background: #fffaf0; color: var(--wood); border-color: var(--line); font-size: .8rem; padding: .15rem .6rem; }
.dev-facts { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .15rem; font-size: .88rem; }
.dev-facts b { color: var(--gold-2); font-weight: 700; margin-right: .3rem; }
.dev-facts a { color: #fff6e2; }
.dev-block { background: #fffdf7; border: 1.5px solid var(--line); border-radius: 16px; padding: .7rem .9rem; }
.dev-block h4 { font-family: var(--font-display); color: var(--wood); margin: 0 0 .4rem; font-size: 1.05rem; }
.dev-timeline { list-style: none; padding: 0 0 0 .4rem; margin: 0; border-left: 3px solid var(--gold); display: grid; gap: .45rem; }
.dev-timeline li { display: grid; grid-template-columns: 120px 1fr; gap: .5rem; position: relative; padding-left: .7rem; }
.dev-timeline li::before { content: ''; position: absolute; left: -.62rem; top: .4rem; width: 10px; height: 10px; border-radius: 50%; background: var(--indigo); border: 2px solid var(--gold); }
.tl-year { font-weight: 800; color: var(--indigo); }
.dev-awards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .45rem; }
.dev-awards li { display: grid; grid-template-columns: auto 1fr auto; gap: .5rem; align-items: center; background: #fff8e4; border: 1px solid #ecd49a; border-radius: 12px; padding: .4rem .6rem; font-size: .9rem; }
.aw-icon { font-size: 1.3rem; }
.dev-awards b { color: var(--wood-2); font-size: .8rem; }
.dev-projects { margin: 0; padding-left: 1.2rem; display: grid; gap: .4rem; }
.dev-projects li.current { background: #eef6ef; border-radius: 10px; padding: .3rem .5rem; }
.dev-projects p { margin: .05rem 0 0; color: var(--muted); font-size: .88rem; }
.cert-dev { font-size: .8rem; color: var(--muted); margin-top: .4rem; }
@media (max-width: 640px) {
  .dev-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .dev-facts { justify-items: center; }
  .dev-timeline li { grid-template-columns: 1fr; }
}
@media (max-height: 440px) and (orientation: landscape) {
  .dev-credit { left: 8px; bottom: 8px; padding: .2rem .6rem .2rem .25rem; }
  .dev-credit img, .dev-credit .dev-mono { width: 30px; height: 30px; }
  .dev-credit small:last-child { display: none; }
  .dev-status { display: none; }
}
.sheet-head .btn { color: var(--gold-2); }
.sheet-head .btn:hover { background: rgba(255, 255, 255, .08); }
.dev-timeline li { grid-template-columns: 150px 1fr; }
/* Perbaikan: di mode adegan, panel Momen Tadabbur tidak boleh terjepit. */
.area.scene-mode { justify-content: flex-start; }
.area.scene-mode > * { flex-shrink: 0; }
.area.scene-mode > :first-child { margin-top: auto; }
.area.has-tdb > :first-child { margin-top: 0; }
.area.has-tdb .standee .portrait-xl { width: 84px; height: 84px; }
.area.has-tdb .illus { max-height: 140px; }
.tdb-moment { flex-shrink: 0; }

/* Latar layar judul dari file luar (latar/judul.webp dll.) */
[class*="bg-"].has-scene.has-photo { background-position: center center; background-color: var(--indigo, #1c2747); }

/* Keterangan tempat (lokasi adegan) di tepi atas panel permainan */
.stage { position: relative; }
.place-chip { position: absolute; z-index: 6; top: .9rem; left: 1.9rem; transform: translateY(-50%); display: inline-flex; align-items: center; gap: .35rem; max-width: calc(77% - 3rem); padding: .2rem .8rem .2rem .55rem; border-radius: 999px; background: linear-gradient(180deg, #2a3766, #1c2747); color: #f6ecd6; border: 1.5px solid var(--gold); font-weight: 700; font-size: calc(.8rem * var(--ts, 1)); line-height: 1.25; letter-spacing: .2px; box-shadow: 0 3px 10px rgba(0, 0, 0, .28); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.place-chip > span:first-child { display: inline-flex; color: #f0cf86; }
.place-chip svg { width: 14px; height: 14px; }
.place-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
@media (max-height: 440px) and (orientation: landscape) {
  .place-chip { font-size: .7rem; padding: .1rem .6rem .1rem .45rem; left: 1.2rem; top: .55rem; }
  .place-chip svg { width: 12px; height: 12px; }
}
@media (max-width: 640px) {
  .place-chip { position: static; transform: none; justify-self: start; order: -2; max-width: 100%; }
}

.has-scene > .back { background: rgba(250, 244, 230, .94); border: 1.5px solid rgba(212, 162, 76, .8); border-radius: 999px; padding: .3rem .9rem; box-shadow: 0 3px 10px rgba(0, 0, 0, .2); }
