/* ============================================================
   KHUSUS WEB — MODE TANPA SCROLL (permintaan Aldi 2026-11-28:
   "tampilan web nya biar ga scroll").
   File ini TIDAK ada di APK dan tidak mengubah CSS bawaan game:
   semua aturan di sini menimpa (override) dari berkas terpisah
   yang dimuat SETELAH <style> bawaan game di play/index.html.

   Prinsip:
   - html/body/#app dikunci tepat 100dvh, overflow hidden,
     tidak ada scroll / rubber-band di level dokumen.
   - Tiap layar (.section di #app) adalah kolom flex setinggi
     viewport; elemen fleksibelnya: grid stage (Home) dan
     adegan arsip (layar soal) — keduanya menyusut/memanjang
     mengikuti sisa ruang, jadi selalu pas satu layar.
   - Layar yang isinya memang melebihi satu layar (Papan Juara
     Online, Papan Rekor lokal, Album, Toko) hanya boleh scroll
     DI DALAM panel/list-nya sendiri, tidak pernah halamannya.
   - Pop-up penjelasan memang sudah scroll internal (bawaan).
   - Slot sponsor dipadatkan jadi bar ramping tinggi tetap,
     supaya tidak pernah mendorong layout jadi scroll.
   - DUA TAMPILAN BERBEDA (permintaan Aldi 2026-11-28: "kalo
     untuk web di hp itu kasih versi berbeda saja dengan pc"):
     * Versi HP (<=899px): kolom tunggal ala aplikasi, maks
       ~480px di tengah, padat tanpa scroll — seperti di atas.
     * Versi PC (>=900px): tata letak lebar dua kolom di blok
       paling bawah berkas ini (Home 2 kolom + grid stage 4x2,
       layar soal: soal di kiri + adegan Sekar besar di kanan).
     Isi, logika, dan bank soal sama persis; yang beda hanya
     tata letaknya, diganti murni lewat breakpoint.
   ============================================================ */

/* ---------- Kunci viewport ---------- */
html, body{
  height:100dvh; max-height:100dvh;
  overflow:hidden; overscroll-behavior:none;
}
body{
  position:fixed; inset:0; width:100%;
  min-height:0;
}
#app{
  height:100dvh; max-height:100dvh; min-height:0;
  overflow:hidden; padding:10px;
  display:flex; flex-direction:column;
}
#app > section{
  flex:1 1 auto; min-height:0;
  display:flex; flex-direction:column;
  overflow:hidden;
}
#app > section > .card{
  flex:1 1 auto; min-height:0; margin:0; width:100%;
}
footer{display:none !important}

/* ---------- Slot sponsor: bar ramping, tinggi tetap ---------- */
[data-sponsor-slot]{
  flex:none; margin:8px 0 0 !important; padding:6px 10px !important;
  height:48px; display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
[data-sponsor-slot] a{
  display:flex !important; align-items:center; justify-content:center; gap:8px;
  max-width:100%; white-space:nowrap; overflow:hidden;
}
[data-sponsor-slot] a > div:nth-of-type(1){font-size:20px !important; line-height:1 !important}
[data-sponsor-slot] a > div:nth-of-type(2){font-size:15px !important; margin-top:0 !important}
[data-sponsor-slot] a > div:nth-of-type(3){display:none !important} /* pesan panjang disembunyikan di bar ramping */
[data-sponsor-slot] a > div:nth-of-type(4){margin-top:0 !important}
[data-sponsor-slot] img{max-height:36px; width:auto}

/* ---------- HOME: padat, grid stage fleksibel ---------- */
#scr-home .card{
  display:flex; flex-direction:column;
  padding:12px 14px 10px; overflow:hidden;
}
#scr-home .howto{display:none} /* Cara Main tetap ada di landing web (/) */
#scr-home .big-emoji{font-size:30px; margin:0; line-height:1.1}
#scr-home h1.title{font-size:30px}
#scr-home .badge{margin:5px auto; font-size:11px; padding:3px 10px; letter-spacing:1px; white-space:nowrap}
#scr-home .subtitle{font-size:13px; margin:3px 0 1px; line-height:1.3;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden}
#scr-home .sekar-greet{margin:6px 0 0; gap:8px}
#scr-home .sekar-mini{width:40px; height:54px}
#scr-home .bubble.mini{padding:6px 9px}
#scr-home .bubble.mini .nametag{font-size:10px; padding:2px 8px; margin-bottom:4px}
#scr-home .bubble.mini p{font-size:12.5px; line-height:1.3}
#scr-home .bank-bar{margin:6px 0 1px; padding:5px 8px; font-size:14px; flex-wrap:nowrap}
#scr-home .bank-bar > span{white-space:nowrap}
#scr-home .bank-bar .btn{min-height:36px; padding:5px 10px; font-size:13.5px; flex:none}
#scr-home #btn-mute-home{min-height:36px !important; padding:5px 9px !important}
/* Baris fitur (Harian/Maraton/Album/Papan Rekor/Online): bar ramping
   nama + tombol; deskripsi statis disembunyikan (namanya sudah jelas),
   khusus status dinamis Tantangan Harian tetap ditampilkan. */
#scr-home .stage-row{margin:4px 0; padding:5px 10px; align-items:center}
#scr-home .stage-row .stage-name{font-size:15px}
#scr-home .stage-row .stage-meta{display:none}
#scr-home #daily-card .stage-meta#daily-status{display:block; font-size:11px; margin-top:1px}
#scr-home .stage-row .btn{min-height:32px !important; padding:4px 11px !important; font-size:13.5px !important}
/* Grid stage: elemen fleksibel Home — 4 baris membagi sisa ruang. */
#scr-home #stage-list{
  flex:1 1 auto; min-height:0;
  grid-template-rows:repeat(4, 1fr); gap:7px; margin-top:7px;
}
#scr-home #stage-list .stage-row{
  min-height:0; height:100%; margin:0; padding:6px 10px;
  flex-direction:column; align-items:flex-start; justify-content:center; gap:1px;
}
#scr-home #stage-list .stage-name{font-size:14.5px; line-height:1.2}
#scr-home #stage-list .stage-meta{
  display:block; font-size:11px; line-height:1.3;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%;
}

/* ---------- LAYAR SOAL: adegan arsip fleksibel ---------- */
#hud{margin-bottom:7px; flex:none}
#hud .hud-box{padding:5px 7px; font-size:14px}
#hearts{font-size:16px; min-width:0}
#progress-wrap{height:13px; margin-bottom:8px; flex:none}
#scr-game .card{flex:none; padding:14px 14px 12px}
#question{font-size:19px; line-height:1.35; margin:4px 0 10px}
.opt{min-height:46px; margin:6px 0; padding:9px 12px; font-size:16px}
#items{margin-top:9px}
.item-btn{min-height:42px; font-size:14px}
#scene{
  flex:1 1 auto; min-height:0;
  display:flex; flex-direction:column; margin-top:8px;
}
#dots-ribbon{flex:none; margin-bottom:7px; padding:4px 11px}
#scene-body{
  flex:1 1 auto; height:auto; min-height:76px;
}
/* Pop-up penjelasan: tetap overlay bawah, scroll hanya di kartunya. */
.pop-card{max-height:56dvh; overflow-y:auto; -webkit-overflow-scrolling:touch}

/* ---------- SELESAI / GAME OVER: tombol lebih ramping ---------- */
#scr-done .card, #scr-over .card{overflow-y:auto; -webkit-overflow-scrolling:touch}
#scr-over .big-emoji{font-size:38px; margin:2px 0}
#scr-over .btn, #scr-done .btn{min-height:46px; margin:7px 0; padding:9px; font-size:17px}
#scr-done footer, #scr-over footer{display:none}

/* ---------- Panel dengan scroll INTERNAL saja ---------- */
/* Toko Nyawa: seluruh kartu scroll di dalam */
#scr-store .card{overflow-y:auto; -webkit-overflow-scrolling:touch}
/* Album: grid kartu scroll di dalam, judul + tombol Kembali diam */
#scr-album .card{display:flex; flex-direction:column; overflow:hidden}
#album-grid{flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch}
/* Papan Rekor lokal: daftar rekor scroll di dalam */
#scr-board .card{display:flex; flex-direction:column; overflow:hidden}
#board-list{flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch}
/* Papan Juara Online (layar disuntik online-board.js) */
#scr-online-board .card{display:flex; flex-direction:column; overflow:hidden}
#online-board-list{flex:1 1 auto; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch}
/* Modal pembayaran: kartu tidak boleh melebihi layar */
.modal-card{max-height:calc(100dvh - 36px); overflow-y:auto}

/* ---------- HP layar pendek (<=720px DAN <=600px lebar, mis. 360x640):
   ekstra padat. Syarat lebar WAJIB ada: tanpa itu tier ini dulu
   menembak jendela browser desktop (tinggi <=720 sangat umum di
   laptop) dan menyembunyikan Sekar di PC. Sekarang tier ini hanya
   untuk HP betulan, dan Sekar DIPERKECIL, bukan disembunyikan. ---------- */
@media (max-height:720px) and (max-width:600px){
  #app{padding:8px}
  #scr-home .card{padding:9px 11px 8px}
  #scr-home .big-emoji{display:none}
  #scr-home h1.title{font-size:24px}
  #scr-home .subtitle{display:none}
  /* Sapaan Sekar tetap tampil, versi mini: foto kecil + gelembung ramping
     (nametag disembunyikan hanya di tier ini demi ruang). */
  #scr-home .sekar-greet{display:flex; margin:4px 0 0; gap:6px}
  #scr-home .sekar-mini{width:28px; height:38px; border-width:2px; border-radius:7px}
  #scr-home .bubble.mini{padding:4px 8px}
  #scr-home .bubble.mini .nametag{display:none}
  #scr-home .bubble.mini p{font-size:11px; line-height:1.25}
  #scr-home .bank-bar{font-size:13.5px; padding:4px 8px; margin-top:5px}
  #scr-home .bank-bar .btn{min-height:32px; font-size:12.5px; padding:4px 8px}
  #scr-home #btn-mute-home{min-height:32px !important}
  #scr-home .stage-row{margin:3px 0; padding:3px 9px}
  #scr-home .stage-row .stage-name{font-size:14px}
  #scr-home .stage-row .btn{min-height:30px !important; padding:3px 10px !important; font-size:13px !important}
  #scr-home #stage-list{gap:5px; margin-top:5px}
  #scr-home #stage-list .stage-name{font-size:13.5px}
  #scr-home #stage-list .stage-meta{display:none}
  [data-sponsor-slot]{height:42px; margin-top:6px !important}
  /* Soal di layar pendek */
  #scr-game .card{padding:11px 12px 10px}
  #question{font-size:17.5px; margin:3px 0 8px}
  .opt{min-height:42px; margin:5px 0; padding:8px 11px; font-size:15.5px}
  .item-btn{min-height:38px}
  #scene-body{min-height:64px}
  .pop-sekar, .sekar-photo{height:150px}
}

/* ============================================================
   VERSI PC — layar lebar (>=900px): tata letak DUA KOLOM.
   Wadah melebar (maks 1120px) supaya ruang cokelat kosong di
   kiri-kanan menyusut jadi bingkai ramping saja. Semua layar
   tetap pas satu viewport, tanpa scroll halaman.
   ============================================================ */
@media (min-width:900px){
  #app{max-width:min(1440px, 96vw); padding:14px}

  /* ----- HOME: kiri = judul/Sekar/bank, kanan = baris fitur,
         grid stage 4 kolom x 2 baris membentang penuh di bawah,
         slot sponsor bar ramping paling bawah. ----- */
  #scr-home .card{
    display:grid;
    grid-template-columns:minmax(320px, 5fr) minmax(360px, 6fr);
    grid-template-rows:repeat(6, auto) 1fr auto;
    column-gap:20px; row-gap:7px;
    padding:16px 20px 14px;
  }
  #scr-home .big-emoji{grid-column:1; grid-row:1; font-size:36px}
  #scr-home h1.title{grid-column:1; grid-row:2; font-size:42px}
  #scr-home .badge{grid-column:1; grid-row:3; justify-self:center; margin:2px auto; font-size:12.5px}
  #scr-home .subtitle{grid-column:1; grid-row:4; font-size:14.5px; -webkit-line-clamp:3}
  #scr-home .sekar-greet{grid-column:1; grid-row:5; margin:4px 0 0; gap:12px}
  #scr-home .sekar-mini{width:88px; height:118px}
  #scr-home .bubble.mini{padding:9px 12px}
  #scr-home .bubble.mini p{font-size:14.5px; line-height:1.35}
  #scr-home .bank-bar{grid-column:1; grid-row:6; margin:4px 0 0; font-size:15.5px}
  /* Baris fitur di kolom kanan, satu per baris grid (1-5);
     meta/deskripsi ditampilkan lagi di PC (ruangnya cukup). */
  #scr-home .stage-row{margin:0}
  #scr-home #daily-card{grid-column:2; grid-row:1}
  #scr-home #marathon-card{grid-column:2; grid-row:2}
  #scr-home #album-card{grid-column:2; grid-row:3}
  #scr-home #board-card{grid-column:2; grid-row:4}
  #scr-home #online-card{grid-column:2; grid-row:5}
  #scr-home .stage-row .stage-meta{display:block; font-size:11.5px; line-height:1.3}
  #scr-home .stage-row .stage-name{font-size:16.5px}
  /* Grid stage: 4 kolom x 2 baris, elemen fleksibel (menyerap sisa tinggi) */
  #scr-home #stage-list{
    grid-column:1 / -1; grid-row:7;
    grid-template-columns:repeat(4, 1fr);
    grid-template-rows:repeat(2, 1fr);
    gap:8px; margin-top:2px;
  }
  #scr-home #stage-list .stage-name{font-size:16px}
  #scr-home #stage-list .stage-meta{display:block}
  /* Slot sponsor: bar penuh di baris terakhir */
  #scr-home [data-sponsor-slot]{grid-column:1 / -1; grid-row:8}

  /* ----- LAYAR SOAL: HUD membentang di atas; kiri kartu soal +
         jawaban + item; kanan adegan arsip (Sekar video besar)
         mengisi tinggi kolom. ----- */
  #app > section#scr-game{
    display:grid;
    grid-template-columns:minmax(400px, 6fr) minmax(340px, 5fr);
    grid-template-rows:auto auto 1fr;
    column-gap:14px;
  }
  #hud{grid-column:1 / -1; grid-row:1}
  #progress-wrap{grid-column:1 / -1; grid-row:2}
  #scr-game .card{
    grid-column:1; grid-row:3; align-self:stretch;
    display:flex; flex-direction:column; justify-content:flex-start;
    overflow:hidden; padding:18px 18px 14px;
  }
  #question{font-size:21px}
  .opt{min-height:52px; font-size:17px}
  #scene{grid-column:2; grid-row:3; margin-top:0; height:100%}
  #scene-body{min-height:0}
  #scene-note{font-size:13px; max-width:56%}
}

/* ----- PC layar PENDEK (>=900px lebar, <=720px tinggi — laptop
   + chrome browser, kasus screenshot Aldi): versi PC dipadatkan
   supaya grid stage tetap dapat ruang. Sekar tetap tampil,
   fotonya 96px (masih dalam rentang desktop). ----- */
@media (min-width:900px) and (max-height:720px){
  #scr-home .card{padding:12px 18px 10px; row-gap:5px}
  #scr-home .big-emoji{font-size:26px}
  #scr-home h1.title{font-size:30px}
  #scr-home .subtitle{font-size:13px; -webkit-line-clamp:2}
  #scr-home .sekar-mini{width:72px; height:96px}
  #scr-home .bubble.mini{padding:7px 10px}
  #scr-home .bubble.mini p{font-size:13px}
  #scr-home .stage-row .stage-meta{display:none}
  #scr-home .stage-row .btn{min-height:30px !important; padding:3px 11px !important}
  #scr-home #stage-list{gap:6px}
  [data-sponsor-slot]{height:42px}
}
