/* Kerangka "rasa aplikasi" (app.js shell/beranda/profilView). Dimuat terakhir, menimpa kerangka web lama.
   HP & tablet: header ringkas + 5 tab di bawah. Layar lebar (≥1024px): rail kiri seperti aplikasi desktop. */

/* ---------- header ringkas ---------- */
.app-shell .appbar { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; }
.app-shell .brand, .app-shell .mainnav { display: none !important; }
.app-shell .kid { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; max-width: none; min-width: 0; flex: 1; cursor: pointer; text-align: left; }
.app-shell .kid .ava { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #ffe7a8; border: 3px solid var(--ink); }
.app-shell .kid .who { display: grid; min-width: 0; line-height: 1.15; }
.app-shell .kid b { font-family: var(--display); font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .kid small { display: block !important; font-size: 12.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-pills { display: flex; gap: 6px; flex-shrink: 0; }
.app-pill { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 11px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2.5px var(--ink); font: 700 15px var(--display); white-space: nowrap; }
.app-pill.fire { background: #fff1e5; }
.app-shell .app-pill.star-count { background: #fff8d6; font-size: 15px; padding: 0 11px; box-shadow: inset 0 0 0 2.5px var(--ink); }
.app-shell .banner { margin: 0 16px 6px; border-radius: 14px; font-size: 13.5px; padding: 8px 12px; box-shadow: none; border: 0; }

/* ---------- 5 tab bawah (HP & tablet) ---------- */
.app-shell .rail { display: none; }
@media (max-width: 1023px) {
  .app-shell .bottomnav { display: grid !important; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: #fff; border-top: 0; box-shadow: 0 -1px 0 var(--line), 0 -10px 24px -14px rgba(29,42,91,.35); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .app-shell .bottomnav a { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-height: 54px; text-decoration: none; color: var(--ink-2); font: 700 12px var(--display); border-radius: 14px; }
  .app-shell .bottomnav a img { width: 30px; height: 30px; object-fit: contain; filter: grayscale(.8); opacity: .65; transition: transform .15s; }
  .app-shell .bottomnav a.on { color: var(--ink); }
  .app-shell .bottomnav a.on img { filter: none; opacity: 1; transform: translateY(-2px) scale(1.08); }
  .app-shell .bottomnav a.on::before { content: ""; position: absolute; top: -6px; width: 34px; height: 4px; border-radius: 0 0 4px 4px; background: var(--orange, #f89048); }
  .app-shell .hub-main { padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important; }
}

/* ---------- rail kiri (layar lebar) ---------- */
@media (min-width: 1024px) {
  .app-shell { padding-left: 236px; }
  .app-shell .bottomnav { display: none !important; }
  .app-shell .rail { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 236px; z-index: 20; padding: 22px 14px; background: #fff; box-shadow: 1px 0 0 var(--line); }
  .rail-brand img { height: 34px; margin: 0 10px 26px; display: block; }
  .rail nav { display: grid; gap: 6px; }
  .rail-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 16px; text-decoration: none; color: var(--ink); font: 600 17px var(--display); border: 2.5px solid transparent; }
  .rail-item img { width: 34px; height: 34px; object-fit: contain; }
  .rail-item:hover { background: #f4f0e6; }
  .rail-item.on { background: #e9f1ff; border-color: var(--potentia, #3868c8); color: var(--potentia, #3868c8); }
  .app-shell .appbar { padding: 14px 28px; }
  .app-shell .hub-main { max-width: 980px; }
}

/* ---------- beranda: misi hari ini ---------- */
.mission { position: relative; overflow: hidden; margin: 4px 0 18px; padding: 22px 20px; min-height: 230px; border-radius: 28px; color: #fff;
  background: radial-gradient(circle at 82% 40%, rgba(255,255,255,.16) 0 34%, transparent 34.5%), radial-gradient(120% 90% at 100% 100%, #73a6ff 0, transparent 60%),
    linear-gradient(135deg, #4a86ea, #2a56b8 78%);
  box-shadow: 0 0 0 3px var(--ink), 0 7px 0 3px var(--ink); }
.mission::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: radial-gradient(circle, rgba(255,255,255,.55) 1.5px, transparent 2px) 0 0 / 26px 26px; -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000); mask-image: linear-gradient(90deg, transparent 35%, #000); }
.mis-body { position: relative; z-index: 2; max-width: 62%; }
.mission small { display: block; font: 700 12.5px var(--display); letter-spacing: .1em; text-transform: uppercase; color: #ffe48a; }
.mission h2 { margin: 6px 0 6px; font: 700 clamp(24px, 5.6vw, 34px)/1.08 var(--display); text-shadow: 0 2px 0 rgba(29,42,91,.25); }
.mission p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.45; opacity: .95; max-width: 34ch; }
.mis-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.mis-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 12px; border-radius: 999px; background: rgba(255,255,255,.16);
  border: 1.5px solid rgba(255,255,255,.4); font: 700 13.5px var(--display); color: #fff; white-space: nowrap; }
.mis-dots { display: inline-flex; gap: 4px; }
.mis-dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.35); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }
.mis-dots i.on { background: #ffd23f; box-shadow: none; }
.mis-ringchip svg { width: 24px; height: 24px; display: block; }
.mis-visual { position: absolute; z-index: 1; top: 0; right: 0; bottom: 0; width: 42%; pointer-events: none; }
.mis-glow { position: absolute; right: 6%; bottom: -14%; width: min(92%, 300px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.5), rgba(255,255,255,.12) 55%, transparent 70%); }
.mis-hero { position: absolute; right: 8%; bottom: 0; height: 86%; max-height: 240px; width: auto; filter: drop-shadow(0 6px 0 rgba(29,42,91,.28)); }
.mis-badge { position: absolute; width: 52px; filter: drop-shadow(0 4px 0 rgba(29,42,91,.25)); animation: mis-float 4.5s ease-in-out infinite; }
.mis-badge.b1 { top: 10%; right: 66%; width: 44px; }
.mis-badge.b2 { top: 18%; right: 3%; animation-delay: -2.2s; }
@keyframes mis-float { 50% { transform: translateY(-8px) rotate(-6deg); } }
@media (prefers-reduced-motion: reduce) { .mis-badge { animation: none; } }
@media (max-width: 560px) {
  .mis-body { max-width: 100%; padding-right: 30%; }
  .mis-visual { width: 40%; }
  .mis-hero { height: 58%; right: -4%; }
  .mis-badge.b1 { display: none; }
  .mis-badge.b2 { width: 40px; top: 8%; }
}
.mis-go { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: min(58%, 320px); height: 58px; padding: 0 28px; border: 0; border-radius: 18px; cursor: pointer;
  background: var(--green, #3cc47c); color: #fff; font: 700 22px var(--display); text-shadow: 0 2px 0 rgba(0,0,0,.2); box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px var(--ink); }
.mis-go:active { transform: translateY(4px); box-shadow: 0 0 0 3px var(--ink), 0 2px 0 3px var(--ink); }

/* ---------- untukmu: ubin ikon (gambar stiker game di atas warna) ---------- */
.for-you { margin: 4px 0 16px; }
.for-you .sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.for-you h2 { font: 700 20px var(--display); margin: 0; }
.for-you .sec-head a { font: 700 14px var(--display); color: var(--potentia, #3868c8); text-decoration: none; }
.fy-row { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 6px; padding: 6px 6px 10px; scrollbar-width: none; }
.fy-row::-webkit-scrollbar { display: none; }
.fy-card { flex: 0 0 96px; scroll-snap-align: start; display: grid; justify-items: center; gap: 3px; border: 0; background: none; padding: 0; cursor: pointer; text-align: center; color: var(--ink); }
.fy-card .ic { width: 88px; height: 88px; border-radius: 26px; display: grid; place-items: center; box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink); transition: transform .1s; }
.fy-card .ic img { width: 74px; height: 74px; object-fit: contain; filter: drop-shadow(0 3px 0 rgba(29,42,91,.18)); }
.fy-card:active .ic { transform: translateY(3px); }
.fy-card b { margin-top: 8px; font: 700 13.5px/1.15 var(--display); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fy-card small { font-size: 11.5px; font-weight: 700; color: var(--ink-2); }
.fy-card .stars { display: flex; gap: 1px; font-size: 13px; line-height: 1; }
.fy-card .stars i { all: unset; color: #d6dbe8; font-size: 13px; }
.fy-card .stars i.on { color: #f5b301; }

/* ---------- progres tes Potentia ---------- */
.pot-card { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; padding: 12px 14px; border-radius: 22px; background: #fff; text-decoration: none; color: var(--ink);
  box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink); }
.pot-card img { width: 56px; height: 56px; object-fit: contain; }
.pot-card b { font: 700 16px var(--display); }
.pot-card small { display: block; font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.pot-dots { display: flex; gap: 4px; margin: 6px 0 4px; }
.pot-dots i { width: 20px; height: 8px; border-radius: 4px; background: #e3e8f4; }
.pot-dots i.on { background: var(--green, #3cc47c); }
.pot-go { margin-left: auto; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; display: grid; place-items: center; background: var(--sun); box-shadow: inset 0 0 0 2.5px var(--ink); font-weight: 700; }

/* ---------- profil ---------- */
.prof-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.prof-head img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: 50% 12%; background: #ffe7a8; border: 3px solid var(--ink); }
.prof-head h1 { font: 700 26px var(--display); margin: 0; }
.prof-head p { margin: 2px 0 6px; color: var(--ink-2); font-weight: 600; }
.prof-list { display: grid; margin: 0 0 22px; border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink); }
.prof-list > a, .prof-list > button { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 14px; border: 0; border-top: 1px solid var(--line); background: #fff;
  text-decoration: none; color: var(--ink); text-align: left; font: inherit; cursor: pointer; width: 100%; }
.prof-list > :first-child { border-top: 0; }
.prof-list img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 40px; }
.prof-list span { display: grid; flex: 1; min-width: 0; }
.prof-list b { font: 700 16px var(--display); }
.prof-list small { color: var(--ink-2); font-size: 13px; }
.prof-list i { font-style: normal; font-size: 26px; color: #b9c0d6; }
.prof-list .prof-out { justify-content: center; color: #c22a3e; }
.prof-list .prof-out span { flex: 0 0 auto; }

@media (min-width: 1024px) { .mission { min-height: 250px; padding: 28px 34px; } .mis-hero { max-height: 250px; } }
@media (prefers-reduced-motion: reduce) { .app-shell .bottomnav a img { transition: none; } }

/* soal di bilah atas game: soal panjang tetap utuh (app.js prompt(): .long > 55 huruf, .xlong > 85 huruf) */
.hud-prompt.long { font-size: clamp(14px, 1.9vw, 22px); -webkit-line-clamp: 3; line-height: 1.12; }
.hud-prompt.xlong { font-size: clamp(13px, 1.6vw, 19px); -webkit-line-clamp: 4; line-height: 1.1; }
@media (max-width: 900px) { .hud-title { flex-basis: 120px; } .hud-dots { max-width: 90px; } }

/* ---------- Lab Simulasi (Lab Crescia) ---------- */
.lab-card img { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; box-shadow: 0 0 0 2px var(--ink); }
.lab-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin: 6px 0 14px; }
.lab-sim { position: relative; display: grid; align-content: start; gap: 4px; padding: 0 0 14px; border-radius: 22px; overflow: hidden; background: #fff; text-decoration: none; color: var(--ink);
  box-shadow: 0 0 0 3px var(--ink), 0 5px 0 3px var(--ink); transition: transform .1s; }
.lab-sim:active { transform: translateY(3px); }
.lab-sim img { width: 100%; aspect-ratio: 600 / 394; object-fit: cover; border-bottom: 3px solid var(--ink); background: #e8f1ff; }
.lab-sim b { margin: 8px 14px 0; font: 700 18px var(--display); }
.lab-sim small { margin: 0 14px; font-weight: 700; font-size: 12.5px; color: var(--ink-2); }
.lab-sim p { margin: 4px 14px 0; font-size: 14px; color: var(--ink-2); line-height: 1.35; }
.lab-cocok { position: absolute; top: 10px; left: 10px; background: var(--green, #3cc47c); color: #fff; font: 700 12px var(--display); padding: 4px 10px; border-radius: 999px; box-shadow: 0 0 0 2px var(--ink); }
.lab-grid.small { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.lab-grid.small .lab-sim p { display: none; }
.lab-credit { font-size: 12.5px; color: var(--ink-2); margin: 0 0 20px; }
.td-sim { margin-top: 16px; }
.td-sim > b { display: block; font: 700 17px var(--display); margin-bottom: 8px; }
.sim-view { position: fixed; inset: 0; display: flex; flex-direction: column; background: #1d2a5b; }
.sim-bar { display: flex; align-items: center; gap: 12px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: var(--paper); border-bottom: 3px solid var(--ink); }
.sim-title { display: grid; line-height: 1.15; min-width: 0; }
.sim-title b { font: 700 18px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim-title small { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.sim-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.sim-credit { padding: 5px 12px calc(5px + env(safe-area-inset-bottom)); font-size: 11.5px; color: #c9cfe6; text-align: center; }
.sim-credit a { color: #fff; }
.sim-bar .icon-btn { display: grid; place-items: center; color: var(--ink); text-decoration: none; font-size: 22px; flex: 0 0 auto; }

/* ---------- layar game di HP mendatar (tinggi ≤ 520px) ----------
   Kolom kiri: tombol, judul dan titik kemajuan di atas, kartu soal di tengah kolom. Seluruh tinggi layar dipakai game 16:9
   (tidak ada ruang biru kosong di kiri-kanan) dan soal panjang punya ruang beberapa baris. */
@media (orientation: landscape) and (max-height: 520px) {
  .play { display: grid; grid-template-columns: 210px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .play .hud { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: 40px 1fr 40px; grid-template-rows: auto auto auto; align-items: start; gap: 6px 8px;
    padding: calc(6px + env(safe-area-inset-top)) 8px 4px calc(8px + env(safe-area-inset-left)); border-bottom: 0; border-right: 3px solid var(--ink); }
  .play .hud .icon-btn { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; }
  .play .hud #p-back { grid-column: 1; grid-row: 1; }
  .play .hud #p-say { grid-column: 3; grid-row: 1; }
  .play .hud .hud-title { grid-column: 2; grid-row: 1; align-self: center; flex: none; }
  .play .hud .hud-title small { font-size: 10px; }
  .play .hud .hud-title b { font-size: 13px; }
  .play .hud:not(:has(#p-say)) .hud-title { grid-column: 2 / -1; }
  .play .hud .hud-dots { grid-column: 1 / -1; grid-row: 2; max-width: none; justify-content: flex-start; margin: 0; }
  .play .hud .stop-btn { grid-column: 1 / -1; grid-row: 3; justify-self: start; }
  .play .soal-band { grid-column: 1; grid-row: 2; display: flex; min-height: 0; overflow-y: auto; background: var(--paper); border-right: 3px solid var(--ink);
    padding: 6px 10px calc(10px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); }
  .play .stage { grid-column: 2; grid-row: 1 / -1; padding: 6px; }
  .play .frame { width: min(100%, calc((100dvh - 12px) * 16 / 9)); border-radius: 14px; }
}

/* Paket per jenjang (halaman Lembar Kerja): tombol unduh + jadwal per minggu */
.pj-act { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.pj-act .btn { text-decoration: none; }
.pj-jadwal summary { cursor: pointer; font-weight: 700; color: var(--ink, #1d2a5b); padding: 6px 0; }
.pj-jadwal table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.pj-jadwal th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: #5d6684; padding: 6px 8px; border-bottom: 2px solid #e3e7ef; }
.pj-jadwal td { padding: 8px; border-bottom: 1px solid #eef1f6; vertical-align: top; }
.pj-jadwal td:first-child { width: 64px; font-weight: 700; color: #1d2a5b; }
.pj-t { display: block; line-height: 1.45; }
.pj-t b { color: #3868c8; font-weight: 700; margin-right: 4px; }

/* Lab Crescia (simulasi buatan sendiri, Phaser) + grup simulasi tambahan */
.lab-group h2 { margin: 18px 0 6px; font: 700 20px var(--display); color: var(--ink); }
.sim-phaser { background: #fff8ec; overflow: hidden; display: grid; place-items: center; }
.sim-phaser canvas { display: block; }
.mis-go span { font-size: 24px; transition: transform .15s; } .mis-go:hover span { transform: translateX(4px); }

/* ---------- soal game: kartu besar di baris sendiri, di tengah antara bilah atas dan game ----------
   Soal tidak lagi menempel di bilah atas: bilah atas hanya berisi ✕, judul dan titik kemajuan; soal tampil sebagai kartu
   putih bergaris tebal di atas latar biru, di tengah, tepat di atas game. HP tegak: kartu selebar layar. HP mendatar:
   kartu di tengah kolom kiri. Bingkai game 16:9 selalu muat di sisa ruang (soal panjang = game sedikit mengecil). */
.play .hud .hud-title { flex: 0 1 auto; max-width: 60%; }
.play .hud .hud-dots { margin-left: auto; }
.soal-band { flex: 0 0 auto; display: flex; justify-content: center; padding: 14px 16px 6px; }
.soal-band[hidden] { display: none; }
.play .hud-prompt { flex: 0 1 auto; max-width: min(1040px, 100%); min-width: min(440px, 100%); margin: auto 0; box-sizing: border-box;
  background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); padding: 10px 24px;
  font-size: clamp(22px, 3vw, 36px); line-height: 1.22; -webkit-line-clamp: 3; }
.play .hud-prompt.long { font-size: clamp(20px, 2.6vw, 30px); -webkit-line-clamp: 3; }
.play .hud-prompt.xlong { font-size: clamp(18px, 2.2vw, 26px); -webkit-line-clamp: 4; }
.play .hud-prompt:empty { visibility: hidden; }
.play .frame { width: min(100%, calc((100dvh - 190px) * 16 / 9)); } /* cadangan untuk peramban tanpa container query */
@supports (width: 1cqw) {
  .play .stage { container-type: size; }
  .play .frame { width: min(100cqw, 100cqh * 16 / 9); }
}
@media (orientation: portrait) and (max-width: 820px) {
  .soal-band { padding: 10px 8px 2px; }
  .play .hud-prompt, .play .hud-prompt.long, .play .hud-prompt.xlong { flex: 1 1 100%; max-width: none; min-width: 0; font-size: 21px; line-height: 1.25; -webkit-line-clamp: 4;
    min-height: calc(2 * 1.25em + 26px); display: -webkit-box; -webkit-box-pack: center; text-align: center; padding: 10px 12px; }
  .play .hud-prompt.long { font-size: 19px; -webkit-line-clamp: 5; }
  .play .hud-prompt.xlong { font-size: 17px; -webkit-line-clamp: 6; }
  .play .frame { width: 100%; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .play .hud-prompt, .play .hud-prompt.long, .play .hud-prompt.xlong { flex: 1 1 100%; max-width: none; min-width: 0; display: block; -webkit-line-clamp: unset; overflow: visible;
    text-align: center; font-size: 21px; line-height: 1.25; padding: 10px; }
  .play .hud-prompt.long { font-size: 19px; }
  .play .hud-prompt.xlong { font-size: 17px; }
  .play .frame { width: min(100%, calc((100dvh - 12px) * 16 / 9)); }
}
@supports (width: 1cqw) { @media (orientation: landscape) and (max-height: 520px) { .play .frame { width: min(100cqw, 100cqh * 16 / 9); } } }
/* Kuis Panggung dan Tarik Tambang sudah menampilkan soal di tengah layar game (papan soal), jadi kartu soal di atas
   disembunyikan agar soal tidak tampil dua kali (tetap terbaca pembaca layar). */
.play:is([data-game="kuis"], [data-game="tarik"]) .soal-band { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
@media (orientation: landscape) and (max-height: 520px) { .play:is([data-game="kuis"], [data-game="tarik"]) .hud { grid-row: 1 / -1; align-content: start; } }

/* ---------- Persiapan ujian (#/ujian, js/ujian.js): STS, SAS per mapel + TKA kelas 6 ---------- */
.uj-head p { max-width: 74ch; }
.uj-info { background: #fff4d6; border-radius: 14px; padding: 10px 14px; font-weight: 700; }
.uj-filter .chip { font-size: 14px; }
.uj-sec .sec-head h2 { font: 700 20px var(--display); margin: 0; }
.uj-jenis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 14px; }
.uj-jenis > div { background: #f3f6ff; border-radius: 14px; padding: 10px 12px; font-size: 14px; color: var(--ink-2); }
.uj-jenis b { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 8px; background: var(--potentia, #3868c8); color: #fff; font: 800 13px var(--body); }
.uj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.uj-card { display: grid; align-content: start; gap: 10px; background: #fff; border-radius: 20px; padding: 14px; border-top: 6px solid var(--mc, #3868c8); box-shadow: 0 0 0 2px rgba(29,42,91,.08), 0 8px 18px -12px rgba(29,42,91,.4); }
.uj-card header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.uj-card header b { font: 700 18px var(--display); }
.uj-card header small { color: var(--ink-2); font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.uj-btns { display: grid; gap: 8px; }
.uj-row-btn { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.uj-row-btn .btn { flex: 1 1 160px; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; text-align: left; }
.uj-row-btn .btn span { font: 800 17px var(--display); }
.uj-row-btn .btn small { font-weight: 700; font-size: 12.5px; opacity: .9; }
.uj-nilai { font: 800 12.5px var(--body); padding: 4px 10px; border-radius: 999px; background: #fff0eb; color: #b2401f; white-space: nowrap; }
.uj-nilai.ok { background: #e5f8ee; color: #17663e; }
.uj-atur summary { cursor: pointer; font-weight: 800; font-size: 13.5px; color: var(--potentia, #3868c8); padding: 4px 0; }
.uj-atur-isi { display: grid; gap: 8px; padding-top: 6px; }
.uj-bab-pilih { border: 2px solid #e6e9f2; border-radius: 14px; padding: 8px 12px 10px; margin: 0; display: grid; gap: 6px; }
.uj-bab-pilih legend { font-weight: 800; font-size: 13px; padding: 0 6px; }
.uj-bab-pilih label { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 1.3; cursor: pointer; }
.uj-bab-pilih input { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; }
.uj-bab-pilih .uj-reset { justify-self: start; }
.uj-domain { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.uj-domain li { display: flex; justify-content: space-between; font-weight: 700; font-size: 14.5px; padding: 6px 10px; background: #f3f6ff; border-radius: 10px; }
.uj-domain small { color: var(--ink-2); }
.uj-catatan { margin: 4px 0 24px; }
.jl-box.jl-ujian { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); margin-bottom: 14px; }
.jl-box.jl-ujian img { width: 44px; height: 44px; object-fit: contain; flex: 0 0 auto; }
.jl-box.jl-ujian span { display: grid; flex: 1; }
.jl-box.jl-ujian b { font: 700 16px var(--display); }
.jl-box.jl-ujian small { color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.jl-box.jl-ujian i { font-style: normal; font-size: 24px; color: #b9c0d6; }
/* akhir latihan ujian: nilai + hasil per bab */
.uj-end { display: grid; justify-items: center; gap: 8px; }
.uj-skor { width: 120px; height: 120px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: #fff0eb; box-shadow: inset 0 0 0 6px #ff9f80; }
.uj-skor.ok { background: #e5f8ee; box-shadow: inset 0 0 0 6px #5fd08f; }
.uj-skor b { font: 800 44px/1 var(--display); color: var(--ink); }
.uj-skor small { font-weight: 800; color: var(--ink-2); }
.uj-bab { width: 100%; display: grid; gap: 8px; text-align: left; background: #fff; border-radius: 18px; padding: 12px 14px; box-shadow: 0 0 0 2px rgba(29,42,91,.08); }
.uj-bab h3 { margin: 0 0 2px; font: 700 17px var(--display); }
.uj-row { display: grid; grid-template-columns: 1fr 90px auto auto; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; }
.uj-row i { height: 10px; border-radius: 99px; background: #eef0f5; overflow: hidden; }
.uj-row em { display: block; height: 100%; background: var(--green, #3cc47c); border-radius: 99px; }
.uj-row.lemah em { background: #ff9f80; }
.uj-row .btn { padding: 6px 12px; font-size: 13px; }
.uj-ok { font-size: 12.5px; color: #17663e; font-weight: 800; }
@media (max-width: 560px) {
  .uj-jenis { grid-template-columns: 1fr; }
  .uj-row { grid-template-columns: 1fr auto auto; }
  .uj-row i { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- pembahasan soal (kolom bahas di bank): pelajaran, akhir latihan ujian, layar hasil game ---------- */
.ls-bahas { margin-top: 14px; background: #fffbea; border: 2px solid #f3d46b; border-radius: 16px; padding: 10px 14px; text-align: left; animation: ls-pop .2s ease-out; }
.ls-bahas summary { cursor: pointer; font: 800 15px var(--body); color: #8a5a00; list-style: none; display: flex; align-items: center; gap: 8px; }
.ls-bahas summary::-webkit-details-marker { display: none; }
.ls-bahas summary::before { content: "\1F4A1"; }
.ls-bahas p { margin: 6px 0 2px; font-size: 17px; line-height: 1.45; color: var(--ink); }
.uj-review, .res-bahas { width: 100%; text-align: left; background: #fff; border-radius: 18px; padding: 10px 14px; box-shadow: 0 0 0 2px rgba(29,42,91,.08); margin: 6px 0; }
.uj-review summary, .res-bahas summary { cursor: pointer; font: 700 16px var(--display); color: var(--ink); padding: 4px 0; }
.uj-review .rb, .res-bahas .rb { border-top: 1px solid #eef0f5; padding: 8px 0; }
.uj-review .rb:first-of-type, .res-bahas .rb:first-of-type { border-top: 0; }
.uj-review p, .res-bahas p { margin: 2px 0; font-size: 14.5px; line-height: 1.4; }
.uj-review .a, .res-bahas .a { color: #17663e; }
.uj-review .e, .res-bahas .e { background: #fffbea; border-radius: 10px; padding: 6px 10px; margin-top: 4px; }
.res-card .res-bahas { margin: 10px 0 14px; max-height: 260px; overflow-y: auto; }
