/* CLINED — Ergonomi Beranda & Buat Soal (v1)
   Dimuat PALING AKHIR. Target: layar HP, jempol, area sentuh >= 44px. */

/* Tombol Download (Install ke Homescreen) di Header */
.header .pwa-dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 2px solid #46a302;
  border-bottom: 4px solid #3c8d00;
  background: #58cc02;
  color: #ffffff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
  flex: none;
  transition: transform .1s ease, border-bottom-width .1s ease;
}
.header .pwa-dl-btn[hidden] { display: none !important; }
.header .pwa-dl-btn:active {
  transform: translateY(2px);
  border-bottom-width: 2px;
}
@media (max-width: 430px) {
  .header .pwa-dl-btn {
    height: 34px;
    padding: 0 9px;
    font-size: 11px;
    border-radius: 10px;
  }
}

/* ───────────── BERANDA ───────────── */

/* Jarak antar blok seragam */
html body #home > .card,
html body #home > section,
html body #home > .stats,
html body #home > .home-quick-row,
html body #home > a.feedback-card { margin: 0 0 12px !important; }

/* Peta belajar / Home Banner Slider */
html body #home .duo-learning-map { padding: 12px 14px 10px !important; margin-bottom: 12px !important; }
html body #home .duo-learning-map.home-banner-slider {
  padding: 0 !important;
  background: #ffffff !important;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
html body #home .duo-learning-map.home-banner-slider::after { display: none !important; content: none !important; }
.hbs-track {
  display: flex;
  width: 100%;
  transform: translate3d(0%, 0, 0);
  transition: transform 520ms cubic-bezier(0.22, 1, 0.36, 1) !important;
  will-change: transform;
  cursor: grab;
  touch-action: pan-y;
}
.hbs-track.dragging {
  cursor: grabbing;
  transition: none !important;
}
.hbs-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 100%;
  position: relative;
}
.hbs-slide picture,
.hbs-slide img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}
.hbs-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
  -webkit-user-drag: none;
}
.hbs-track.dragging .hbs-link,
.hbs-track.dragging .hbs-overlay-click {
  cursor: grabbing;
}
.hbs-slide-overlay {
  background: #ffffff;
}
.hbs-overlay-frame {
  position: absolute;
  inset: 6px 8px;
  border-radius: 12px;
  border: 2.5px dashed #cbd5e1;
  background: #ffffff;
  overflow: hidden;
}
.hbs-overlay-iframe {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 680px;
  height: 138px;
  border: 0;
  background: transparent;
  transform-origin: top left;
  pointer-events: none;
}
.hbs-overlay-click {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  cursor: pointer;
  -webkit-user-drag: none;
}
.hbs-dots {
  position: absolute;
  left: 50%;
  bottom: 7px;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(4px);
}
.hbs-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.22);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}
.hbs-dot.active {
  width: 20px;
  background: #58cc02;
}
@media (max-width: 520px) {
  .hbs-dots { bottom: 5px; padding: 3px 7px; }
}
html body #home .duo-map-header h3 { font-size: 17px !important; margin: 0 0 8px !important; }
html body #home .duo-unit-card { padding: 10px 12px !important; margin-bottom: 8px !important; }
html body #home .duo-node { width: 64px !important; }
html body #home .duo-node span { width: 46px !important; height: 46px !important; }
html body #home .duo-node small { font-size: 10px !important; }

/* Strip statistik: 4 kolom rata, label tidak terpotong */
html body #home .duo-reward-strip { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 6px !important; margin: 0 0 12px !important; }
html body #home .duo-reward-item { flex-direction: column !important; justify-content: center !important; align-items: center !important; gap: 2px !important; padding: 9px 4px !important; min-height: 68px; text-align: center; min-width: 0; }
html body #home .duo-reward-item > div { display: flex; flex-direction: column; align-items: center; min-width: 0; }
html body #home .duo-reward-icon { width: auto !important; height: auto !important; flex: none !important; font-size: 18px !important; background: none !important; }
html body #home .duo-reward-item b { font-size: 15px !important; line-height: 1.1; }
html body #home .duo-reward-item small { font-size: 9px !important; white-space: nowrap; overflow: visible !important; text-overflow: clip !important; letter-spacing: .02em !important; }

/* Latihan Hari Ini = aksi utama, naik ke atas */
html body #home .daily-home-card { padding: 14px !important; }

/* Pilih ujian: dua tombol besar, tinggi wajar */
html body #home .exam-launcher.card { padding: 12px 12px 14px !important; }
html body #home .exam-launcher .section-title { margin: 0 0 8px !important; font-size: 15px !important; }
html body #home .exam-launcher-grid { gap: 10px !important; margin: 0 !important; }
html body #home .exam-launch-card,
html body #home .exam-launch-card.uab,
html body #home .exam-launch-card.upi { min-height: 84px !important; padding: 10px !important; display: grid !important; place-items: center !important; }
html body #home .exam-launch-card .exam-launch-icon { width: 64px !important; height: 64px !important; font-size: 18px !important; border-radius: 18px !important; }

/* Baris cepat: Materi + Buat Soal sejajar, ukuran sama */
html body #home .home-quick-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
html body #home .home-quick-row > .home-quick-tile,
html body #home #openMaterialsPage,
html body #home #userBankBtn {
  margin: 0 !important; width: 100% !important; min-width: 0 !important; min-height: 76px !important;
  padding: 12px !important; border-radius: 18px !important;
  display: flex !important; align-items: center !important; justify-content: flex-start !important;
  background: var(--card) !important; color: var(--text) !important;
  border: 2px solid var(--line) !important; border-bottom-width: 4px !important;
  text-align: left !important; font-size: 14px !important; font-weight: 800 !important;
}
html body #home .home-quick-tile .home-materials-leading { width: 100% !important; justify-content: flex-start !important; gap: 10px !important; }
html body #home .home-quick-tile .home-materials-icon { display: grid !important; width: 40px !important; height: 40px !important; flex: 0 0 40px !important; font-size: 21px !important; border-radius: 13px !important; background: rgba(88,204,2,.16) !important; }
html body #home #userBankBtn .home-materials-icon { background: rgba(28,176,246,.16) !important; }
html body #home .home-quick-tile b { display: block !important; font-size: 15px !important; font-weight: 900 !important; line-height: 1.15 !important; color: var(--text) !important; }
html body #home .home-quick-tile small { display: block !important; margin-top: 2px !important; font-size: 11px !important; font-weight: 700 !important; opacity: .7 !important; line-height: 1.2 !important; }

/* Papan peringkat mini: judul tidak membungkus aneh */
html body #home .leaderboard-teaser-card { padding: 12px 14px !important; }
html body #home .leaderboard-teaser-head { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 10px !important; }
html body #home .leaderboard-teaser-head > span { flex: 1; min-width: 0; font-size: 13.5px !important; line-height: 1.25; white-space: normal; }
html body #home .leaderboard-see-all { flex: none !important; min-height: 38px !important; padding: 0 12px !important; font-size: 12px !important; white-space: nowrap; }

/* Progress: streak sudah ada di strip atas → sembunyikan duplikat */
html body #home .player-card .daily-streak-card { display: none !important; }
html body #home .player-card { padding: 14px !important; }

/* Statistik ringkas: 4 kolom */
html body #home .stats { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 6px !important; padding: 0 !important; background: none !important; border: 0 !important; overflow: visible !important; }
html body #home .stats .stat { padding: 10px 2px !important; min-width: 0; text-align: center; }
html body #home .stats .stat b { font-size: 17px !important; }
html body #home .stats .stat span { font-size: 9.5px !important; white-space: normal !important; line-height: 1.15; }

/* MENU: kisi 2 kolom, ikon di atas, tinggi seragam */
html body #home #menuSectionContent.menu-grid,
html body #home #menuSection .menu-section-content { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 8px !important; }
html body #home #menuSectionContent .menu-item,
html body #home #menuSectionContent .menu-item:last-child {
  flex-direction: column !important; justify-content: center !important; align-items: center !important; text-align: center !important;
  gap: 5px !important; min-height: 84px !important; padding: 10px 6px !important; border-radius: 16px !important;
}
html body #home #menuSectionContent .menu-item::after { display: none !important; }
html body #home #menuSectionContent .menu-icon { flex: none !important; width: 38px !important; height: 38px !important; min-width: 0 !important; display: grid !important; place-items: center; font-size: 20px !important; border-radius: 12px !important; }
html body #home #menuSectionContent .menu-item > span:last-child { flex: none !important; font-size: 12.5px !important; font-weight: 800 !important; line-height: 1.2 !important; text-align: center !important; overflow: visible !important; text-overflow: clip !important; }
html body #home .menu-section-toggle { min-height: 48px; }

/* Pesan & Kesan */
html body #home .feedback-card { min-height: 64px; }

/* Tombol kartu (FAB): pojok kanan bawah, di atas nav — tidak menimpa konten */
.card-shop-fab { left: auto; right: 14px; top: auto; bottom: calc(100px + env(safe-area-inset-bottom)); width: 46px; min-height: 54px; padding: 5px 2px; gap: 1px; border-radius: 15px; opacity: .94; box-shadow: 0 4px 0 #4c1d95, 0 6px 14px rgba(124,58,237,.3); }
.card-shop-fab .fab-dia { font-size: 9px !important; padding: 1px 5px !important; }
.card-shop-fab .fab-basket-img { width: 24px; height: 24px; }
body.quiz-context .card-shop-fab { display: none; }

/* ───────────── BUAT SOAL ───────────── */
#userBankPage .ub-head { padding: 8px !important; margin-bottom: 0 !important; }
#userBankPage .ub-head .topline { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 8px; }
#userBankPage .ub-head .back { min-height: 44px !important; padding: 0 14px !important; border-radius: 14px !important; font-size: 14px !important; white-space: nowrap; flex: none; }
#userBankPage .ub-head #ubTitle { flex: 1; min-width: 0; text-align: right; font-size: 15px; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#userBankPage .ub-body { gap: 12px; padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
#userBankPage .ub-hero { padding: 12px 14px; border-radius: 18px; }
#userBankPage .ub-hero-ico { width: 40px; height: 40px; flex-basis: 40px; font-size: 21px; }
#userBankPage .ub-hero small { font-size: 12.5px; }

/* Semua tombol di halaman ini: besar, terbaca, rata */
#userBankPage .ub-body button { min-height: 48px; font-size: 14px !important; font-weight: 900; border-radius: 14px; padding: 0 14px; line-height: 1.2; }
#userBankPage .ub-body .small-btn { min-height: 44px; }
#userBankPage .ub-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
#userBankPage .ub-actions > button { min-width: 0; width: 100%; }
#userBankPage .ub-actions-main { grid-template-columns: 1fr 1fr; }
#userBankPage .ub-body button { white-space: nowrap; }
#userBankPage .ub-head.card { padding: 6px 8px !important; min-height: 0 !important; }
#userBankPage .ub-actions > button:only-child { grid-column: 1 / -1; }

/* Input ≥16px agar iOS tidak zoom sendiri */
#userBankPage .ub-body textarea,
#userBankPage .ub-body input[type=text],
#userBankPage .ub-body select { font-size: 16px; padding: 12px 14px; min-height: 48px; }
#userBankPage .ub-body textarea { min-height: 96px; }
#userBankPage .ub-paste { min-height: 240px !important; font-size: 14px !important; }

/* Tab: kontrol segmen dua kolom */
#userBankPage .ml-chips { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); }
#userBankPage .ml-chips .ml-chip { min-height: 44px; margin: 0; border-radius: 12px; font-size: 13.5px; justify-content: center; text-align: center; }
#userBankPage .ub-practice .ml-chips { grid-template-columns: repeat(4, 1fr); }

/* Daftar deck */
#userBankPage .ub-deck { flex-direction: column; align-items: stretch; gap: 10px; }
#userBankPage .ub-deck-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#userBankPage .ub-deck-btns > button { width: 100%; }

/* Kartu soal */
#userBankPage .ub-q-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#userBankPage .ub-q-actions > button { width: 100%; min-width: 0; }

/* Editor soal */
#userBankPage .ub-editor { padding: 14px; }
#userBankPage .ub-lab { margin: 12px 0 6px; font-size: 13.5px; }
#userBankPage .ub-lab:first-child { margin-top: 0; }
#userBankPage .ub-lab-row small { display: block; margin-top: 2px; font-size: 11.5px; }
#userBankPage .ub-opt-row { gap: 10px; margin-bottom: 8px; }
#userBankPage .ub-opt-key { position: relative; flex: none; width: 48px; height: 48px; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
#userBankPage .ub-opt-key input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
#userBankPage .ub-opt-key .ub-letter { width: 44px; height: 44px; font-size: 16px; font-weight: 950; border: 2px solid var(--line); border-bottom-width: 4px; background: var(--card); transition: background .15s, color .15s, border-color .15s; }
#userBankPage .ub-opt-key input:checked + .ub-letter { background: #58cc02; border-color: #3a9c00; color: #fff; }
#userBankPage .ub-opt-key input:focus-visible + .ub-letter { outline: 3px solid rgba(28,176,246,.5); outline-offset: 2px; }
#userBankPage .ub-opt-row > .ub-letter { width: 32px; height: 32px; font-size: 13px; }
#userBankPage .ub-more { margin-top: 12px; padding: 0 12px; }
#userBankPage .ub-more > summary { min-height: 48px; display: flex; align-items: center; font-size: 13.5px; }

/* Tombol simpan editor: menempel di bawah layar, di atas nav melayang */
#userBankPage .ub-editor-actions,
#userBankPage .ub-save .ub-actions:last-of-type {
  position: sticky; bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 30;
  margin: 14px -6px 0; padding: 10px 6px; background: var(--card);
  border-top: 2px solid var(--line); box-shadow: 0 -10px 16px -10px rgba(0,0,0,.18);
}
#userBankPage .ub-editor-actions { grid-template-columns: 1fr 1.6fr; }
#userBankPage .ub-save { padding: 14px; }
#userBankPage .ub-summary { position: sticky; top: 4px; z-index: 20; }

@media (max-width: 360px) {
  html body #home .duo-reward-item b { font-size: 13px !important; }
  #userBankPage .ub-actions-main { grid-template-columns: 1fr; }
  #userBankPage .ub-practice .ml-chips { grid-template-columns: repeat(2, 1fr); }
}

/* Mode gelap */
:root.dark html body #home .home-quick-tile, :root.dark #home .home-quick-tile { background: #1c1c1e !important; border-color: rgba(255,255,255,.13) !important; }
:root.dark #userBankPage .ub-editor-actions, :root.dark #userBankPage .ub-save .ub-actions:last-of-type { background: #1c1c1e; }

/* ───────── v3: kartu "lanjutkan" ringkas (kuis tersimpan + latihan materi) ───────── */
html body #home .resume-card {
  display: grid !important; grid-template-columns: minmax(0, 1fr) auto auto; column-gap: 8px; row-gap: 2px; align-items: center;
  padding: 10px 12px !important; margin: 0 0 8px !important; border-width: 2px !important; box-shadow: none !important;
}
html body #home .resume-card[hidden] { display: none !important; }
html body #home .resume-card .section-title { grid-column: 1 / -1; margin: 0 !important; font-size: 12px !important; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; color: var(--ios-blue, #1cb0f6); }
html body #home .resume-card #resumeText,
html body #home .resume-card .ml-resume-info { grid-column: 1; grid-row: 2; min-width: 0; margin: 0 !important; }
html body #home .resume-card #resumeText { font-size: 13px !important; font-weight: 800; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html body #home .resume-card .ml-resume-info b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; line-height: 1.3; }
html body #home .resume-card .ml-resume-info small { display: block; margin-top: 2px; font-size: 11.5px; opacity: .75; }
html body #home .resume-card .ml-progress { grid-column: 1 / -1; grid-row: 3; margin: 6px 0 0 !important; height: 5px; }
html body #home .resume-card .resume-actions { display: contents !important; }
html body #home .resume-card .resume-actions .primary { grid-column: 2; grid-row: 2; width: auto !important; min-width: 0; min-height: 44px !important; padding: 0 16px !important; font-size: 13.5px !important; border-radius: 14px !important; white-space: nowrap; margin: 0 !important; }
html body #home .resume-card .resume-actions .resume-del { grid-column: 3; grid-row: 2; width: 44px !important; min-width: 44px !important; height: 44px !important; min-height: 44px !important; padding: 0 !important; font-size: 16px !important; border-radius: 14px !important; margin: 0 !important; display: grid; place-items: center; }

/* Clinical Progress: dipadatkan karena sekarang di atas */
html body #home .player-card { padding: 12px 14px !important; }
html body #home .player-card .player-top { margin-bottom: 8px; }
html body #home .player-card .xp-track { margin: 6px 0 4px; }
html body #home .player-card .player-badges:empty { display: none; }
html body #home .player-card .xp-total b { font-size: 20px; }

/* Tombol kartu memudar saat scroll agar tidak menutupi tombol */
.card-shop-fab { transition: opacity .25s ease, transform .25s ease; }
.card-shop-fab.fab-idle { opacity: .28; transform: scale(.92); }
.sp-today-chips{display:none!important}
#todayPracticeCard{display:none!important}

/* v4: kalender ujian menggantikan "Target" di strip atas */
html body #home button.duo-reward-item.duo-cal {
  appearance: none; -webkit-appearance: none; font: inherit; color: inherit; cursor: pointer; width: 100%;
  background: var(--card) !important; border: 2px solid var(--line) !important; border-bottom-width: 4px !important;
  box-shadow: none; -webkit-tap-highlight-color: transparent; transition: transform .1s;
}
html body #home button.duo-reward-item.duo-cal:active { transform: translateY(2px); border-bottom-width: 2px !important; }
html body #home button.duo-reward-item.duo-cal b { color: var(--text); }
:root.dark html body #home button.duo-reward-item.duo-cal { background: #1c1c1e !important; }
#materiLatihanResumeCard{display:none!important}

/* v5: kalender ujian — ikon halaman kalender + warna urgensi */
html body #home .duo-cal .duo-reward-icon.cal-ico { display: grid !important; grid-template-rows: 11px 1fr; width: 30px !important; height: 30px !important; border-radius: 9px !important; overflow: hidden; background: #fff !important; border: 1.5px solid rgba(0,0,0,.14); box-shadow: 0 2px 0 rgba(0,0,0,.1); font-size: 18px !important; place-items: center; }
html body #home .duo-cal .cal-ico:not(:has(.cal-mo)) { display: flex !important; background: none !important; border: 0; box-shadow: none; justify-content: center; align-items: center; }
html body #home .duo-cal .cal-mo { display: block; width: 100%; font-style: normal; font-size: 7.5px; font-weight: 900; line-height: 11px; text-align: center; letter-spacing: .06em; color: #fff; background: #ff4b4b; }
html body #home .duo-cal .cal-dy { display: block; font-style: normal; font-size: 14px; font-weight: 900; line-height: 17px; text-align: center; color: #1f2937; }
html body #home .duo-cal b { font-size: 19px !important; }
html body #home .duo-cal small { font-weight: 900 !important; }
html body #home button.duo-cal[data-urg=far]  { border-color: #58cc02 !important; background: linear-gradient(180deg, rgba(88,204,2,.10), var(--card) 70%) !important; }
html body #home button.duo-cal[data-urg=near] { border-color: #1cb0f6 !important; background: linear-gradient(180deg, rgba(28,176,246,.12), var(--card) 70%) !important; }
html body #home button.duo-cal[data-urg=soon] { border-color: #ff9600 !important; background: linear-gradient(180deg, rgba(255,150,0,.16), var(--card) 70%) !important; }
html body #home button.duo-cal[data-urg=soon] b { color: #e07b00 !important; }
html body #home button.duo-cal[data-urg=near] b { color: #1493d1 !important; }
html body #home button.duo-cal[data-urg=far] b  { color: #46a302 !important; }
html body #home button.duo-cal[data-urg=past] { border-color: #ff4b4b !important; }
html body #home button.duo-cal[data-urg=none] { border-style: dashed !important; }
:root.dark html body #home .duo-cal .cal-ico { background: #2c2c2e !important; border-color: rgba(255,255,255,.2); }
:root.dark html body #home .duo-cal .cal-dy { color: #f2f2f7; }

/* v6: FAB gacha tanpa background — hanya keranjang + diamond */
html body .card-shop-fab:not(.is-visible) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
html body .card-shop-fab.is-visible {
  background: none !important; border: 0 !important; box-shadow: none !important; backdrop-filter: none !important;
  width: 72px !important; min-height: 78px !important; padding: 0 !important; gap: 0 !important; border-radius: 0 !important;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center;
}
html body .card-shop-fab .fab-basket-img { width: 64px !important; height: 64px !important; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)) !important; }
html body .card-shop-fab .fab-dia {
  background: none !important; padding: 0 !important; margin-top: -4px; border-radius: 0 !important;
  font: 900 14px system-ui, sans-serif !important; color: var(--text, #1f2937) !important; white-space: nowrap;
  text-shadow: 0 0 3px var(--card, #fff), 0 0 3px var(--card, #fff), 0 0 6px var(--card, #fff);
}
:root.dark html body .card-shop-fab .fab-dia { color: #f2f2f7 !important; text-shadow: 0 0 3px #000, 0 0 6px #000; }
html body .card-shop-fab:active { transform: scale(.94); }

/* v7: tombol Lanjutkan & hapus tidak boleh menempel */
html body #home .resume-card { column-gap: 12px; }
html body #home .resume-card .resume-actions { display: flex !important; grid-column: 2 / 4 !important; grid-row: 2; align-items: center; gap: 12px !important; }
html body #home .resume-card .resume-actions .primary,
html body #home .resume-card .resume-actions .resume-del { grid-column: auto !important; grid-row: auto !important; margin: 0 !important; }
html body #home .resume-card .resume-actions .resume-del { flex: 0 0 44px; }
html body #home .resume-card .resume-actions .primary { flex: 0 0 auto; }
html body #home .resume-card { grid-template-columns: minmax(0, 1fr) auto !important; }
html body #home .resume-card .resume-actions { grid-column: 2 !important; flex-wrap: nowrap !important; }
html body #home .resume-card { overflow: hidden; }
html body #home .resume-card .resume-actions { min-width: 0; max-width: 100%; gap: 10px !important; }
html body #home .resume-card .resume-actions .primary { flex: 0 1 auto !important; min-width: 0 !important; width: auto !important; max-width: 118px; padding: 0 12px !important; font-size: 13px !important; overflow: hidden; text-overflow: ellipsis; }
html body #home .resume-card .resume-actions .resume-del { flex: 0 0 44px !important; width: 44px !important; min-width: 44px !important; }
html body #home .resume-card #resumeText { max-width: 100%; }

/* v8: baris cepat 3 kolom — Materi, Buat Soal, Duel (ikon di atas, tanpa subteks) */
html body #home .home-quick-row { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 8px !important; }
html body #home .home-quick-row > .home-quick-tile,
html body #home #openMaterialsPage, html body #home #userBankBtn, html body #home #socialBtn {
  min-height: 84px !important; padding: 10px 4px !important; justify-content: center !important; position: relative;
}
html body #home .home-quick-tile .home-materials-leading { flex-direction: column !important; justify-content: center !important; align-items: center !important; gap: 6px !important; text-align: center; }
html body #home .home-quick-tile .home-materials-leading > span:last-child { display: block; }
html body #home .home-quick-tile b { font-size: 13.5px !important; text-align: center; }
html body #home .home-quick-tile small { display: none !important; }
html body #home #socialBtn .home-materials-icon { background: rgba(255,150,0,.18) !important; }

/* v9: baris cepat 4 kolom — Materi, Buat Soal, Duel, Mini Games */
html body #home .home-quick-row { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 6px !important; }
html body #home .home-quick-row > .home-quick-tile, html body #home #openMaterialsPage, html body #home #userBankBtn, html body #home #socialBtn, html body #home #miniGamesBtn { min-height: 78px !important; padding: 8px 2px !important; position: relative; }
html body #home .home-quick-tile b { font-size: 12.5px !important; white-space: nowrap; }
html body #home .home-quick-tile .home-materials-icon { width: 36px !important; height: 36px !important; flex-basis: 36px !important; font-size: 19px !important; }
html body #home #miniGamesBtn .home-materials-icon { background: rgba(16,185,129,.18) !important; }

/* Mini Games Hub (#miniGamesPage) */
#miniGamesPage { padding-bottom: 100px; }
#miniGamesPage .mg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
#miniGamesPage .mg-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; border-radius: 22px; text-align: left; width: 100%; border: 2px solid var(--border, #e2e8f0); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
#miniGamesPage .mg-card-igd, #miniGamesPage .mg-card-rl, #miniGamesPage .mg-card-bl { cursor: pointer; background: var(--card, #fff); }
#miniGamesPage .mg-card-igd:hover { transform: translateY(-3px); border-color: #10b981; box-shadow: 0 14px 30px rgba(15, 23, 42, .14); }
#miniGamesPage .mg-card-rl:hover { transform: translateY(-3px); border-color: #2ec4b6; box-shadow: 0 14px 30px rgba(15, 23, 42, .14); }
#miniGamesPage .mg-card-bl:hover { transform: translateY(-3px); border-color: #38bdf8; box-shadow: 0 14px 30px rgba(15, 23, 42, .16); }
#miniGamesPage .mg-card-igd:active, #miniGamesPage .mg-card-rl:active, #miniGamesPage .mg-card-bl:active { transform: translateY(1px); }
#miniGamesPage .mg-banner { position: relative; padding: 14px 16px 16px; min-height: 118px; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
#miniGamesPage .mg-banner-igd { background: radial-gradient(circle at 85% 20%, rgba(225,29,72,.38) 0%, transparent 55%), radial-gradient(circle at 18% 85%, rgba(16,185,129,.28) 0%, transparent 60%), linear-gradient(135deg, #070e1d 0%, #0f1f38 60%, #172a4a 100%); color: #f8fafc; }
#miniGamesPage .mg-banner-rl { background: radial-gradient(circle at 84% 22%, rgba(255,75,92,.34) 0%, transparent 52%), radial-gradient(circle at 16% 88%, rgba(70,196,90,.36) 0%, transparent 58%), linear-gradient(135deg, #0f3a4a 0%, #146c78 55%, #1d9a6c 100%); color: #f8fafc; }
#miniGamesPage .mg-banner-bl { background: radial-gradient(circle at 82% 22%, rgba(255,217,74,.34) 0%, transparent 50%), radial-gradient(circle at 18% 86%, rgba(56,189,248,.34) 0%, transparent 58%), linear-gradient(135deg, #1b285c 0%, #263f8c 55%, #155e75 100%); color: #f8fafc; }
#miniGamesPage .mg-badge { align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: rgba(16,185,129,.22); border: 1px solid rgba(52,211,153,.5); color: #6ee7b7; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
#miniGamesPage .mg-badge-rl { background: rgba(255,195,49,.22); border-color: rgba(255,220,102,.55); color: #fef08a; }
#miniGamesPage .mg-badge-bl { background: rgba(56,189,248,.22); border-color: rgba(125,211,252,.55); color: #bae6fd; }
#miniGamesPage .mg-status { align-self: flex-start; margin-top: 6px; padding: 3px 10px; border-radius: 99px; background: rgba(2,6,16,.65); border: 1px solid rgba(148,163,184,.3); color: #cbd5e1; font-size: 11px; font-weight: 700; }
#miniGamesPage .mg-status.active-shift { background: rgba(6,78,59,.85); border-color: #10b981; color: #a7f3d0; }
#miniGamesPage .mg-art { position: absolute; right: 16px; bottom: 12px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; pointer-events: none; }
#miniGamesPage .mg-art-ico { font-size: 42px; line-height: 1; filter: drop-shadow(0 6px 12px rgba(0,0,0,.5)); }
#miniGamesPage .mg-art-stamp { padding: 2px 8px; border: 2px double rgba(248,113,113,.75); border-radius: 5px; font-size: 9px; font-weight: 900; letter-spacing: .12em; color: #fda4af; transform: rotate(-6deg); }
#miniGamesPage .mg-art-tier { padding: 2px 9px; border: 1.5px solid rgba(255,255,255,.55); border-radius: 99px; background: rgba(255,75,92,.85); font-size: 9px; font-weight: 900; letter-spacing: .08em; color: #fff; transform: rotate(-4deg); box-shadow: 0 3px 8px rgba(0,0,0,.25); }
#miniGamesPage .mg-art-bl { padding: 2px 9px; border: 1.5px solid rgba(255,217,74,.65); border-radius: 99px; background: rgba(15,23,54,.84); font-size: 9px; font-weight: 900; letter-spacing: .08em; color: #fde047; transform: rotate(-3deg); box-shadow: 0 3px 8px rgba(0,0,0,.28); }
#miniGamesPage .mg-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
#miniGamesPage .mg-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
#miniGamesPage .mg-body h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--text, #0f172a); }
#miniGamesPage .mg-tag-night { padding: 2px 9px; border-radius: 99px; background: rgba(225,29,72,.12); color: #e11d48; font-size: 11px; font-weight: 800; }
:root.dark #miniGamesPage .mg-tag-night { background: rgba(244,63,94,.2); color: #fda4af; }
#miniGamesPage .mg-tag-rl { padding: 2px 9px; border-radius: 99px; background: rgba(46,196,182,.15); color: #0f766e; font-size: 11px; font-weight: 800; }
:root.dark #miniGamesPage .mg-tag-rl { background: rgba(45,212,191,.2); color: #5eead4; }
#miniGamesPage .mg-tag-bl { padding: 2px 9px; border-radius: 99px; background: rgba(56,189,248,.16); color: #0369a1; font-size: 11px; font-weight: 800; }
:root.dark #miniGamesPage .mg-tag-bl { background: rgba(56,189,248,.22); color: #7dd3fc; }
#miniGamesPage .mg-body p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted, #475569); }
#miniGamesPage .mg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#miniGamesPage .mg-chips span { padding: 3px 9px; border-radius: 99px; background: var(--soft, rgba(14,165,233,.1)); color: var(--text, #334155); font-size: 11px; font-weight: 700; border: 1px solid var(--border, rgba(148,163,184,.25)); }
#miniGamesPage .mg-cta { margin-top: auto; padding-top: 6px; }
#miniGamesPage .mg-play-btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 11px 16px; border-radius: 14px; background: linear-gradient(135deg, #10b981 0%, #059669 100%); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .03em; box-shadow: 0 4px 0 #047857; }
#miniGamesPage .mg-play-btn-rl { background: linear-gradient(135deg, #2ec4b6 0%, #0d9488 100%); box-shadow: 0 4px 0 #115e59; }
#miniGamesPage .mg-play-btn-bl { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); box-shadow: 0 4px 0 #1e3a8a; }
#miniGamesPage .mg-card-soon { border-style: dashed; background: transparent; justify-content: center; min-height: 140px; }
#miniGamesPage .mg-soon-inner { padding: 20px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
#miniGamesPage .mg-soon-ico { font-size: 34px; line-height: 1; opacity: .85; }
#miniGamesPage .mg-soon-badge { padding: 3px 10px; border-radius: 99px; background: rgba(148,163,184,.16); color: var(--muted, #64748b); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
#miniGamesPage .mg-soon-inner h3 { margin: 2px 0 0; font-size: 16px; font-weight: 800; color: var(--text, #0f172a); }
#miniGamesPage .mg-soon-inner p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted, #64748b); max-width: 380px; }
@media (max-width: 680px) {
  #miniGamesPage .mg-grid { grid-template-columns: 1fr; }
}

/* v11: Tombol Latihan Resep khusus di BLOK KEDKEL (#blokKedkelPage) + Layout #resepPage */
.resep-kedkel-section {
  margin-top: 10px !important;
}
.materi-button.resep-kedkel-button {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%) !important;
  border: 2px solid #0f766e !important;
  border-bottom: 5px solid #115e59 !important;
  color: #ffffff !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
  gap: 8px !important;
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
.materi-button.resep-kedkel-button::after {
  content: none !important;
  display: none !important;
}
.materi-button.resep-kedkel-button:active {
  transform: translateY(3px) !important;
  border-bottom-width: 2px !important;
}
.ringkasan-kedkel-section {
  margin-top: 10px !important;
}
.materi-button.ringkasan-kedkel-button {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%) !important;
  border: 2px solid #1d4ed8 !important;
  border-bottom: 5px solid #1e3a8a !important;
  color: #ffffff !important;
  box-shadow: none !important;
  cursor: pointer !important;
  font-family: inherit !important;
  gap: 8px !important;
  width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}
.materi-button.ringkasan-kedkel-button::after {
  content: none !important;
  display: none !important;
}
.materi-button.ringkasan-kedkel-button:active {
  transform: translateY(3px) !important;
  border-bottom-width: 2px !important;
}
html body:has(#resepPage.active) .card-shop-fab {
  display: none !important;
}
html body #resepPage {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-x: hidden !important;
  padding-top: max(6px, env(safe-area-inset-top)) !important;
}
html body #resepPage .ub-head {
  padding: 14px 16px !important;
  margin-bottom: 12px !important;
}
html body #resepPage .ub-head .topline {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
html body #resepPage .ub-head .back {
  min-height: 40px !important;
  padding: 0 14px !important;
  border-radius: 12px !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  flex: none !important;
}
html body #resepPage #resepHost {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

/* ── KEDKEL 2026: Materi PPT pills & Deskripsi Bobot Soal modal ── */
.clinical-bank-bobot {
  border: 1.5px solid #0284c7;
  border-bottom-width: 3px;
  border-radius: 13px;
  min-height: 42px;
  padding: 0 11px;
  background: #e0f2fe;
  color: #0369a1;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.clinical-bank-bobot:active {
  transform: translateY(2px);
  border-bottom-width: 1.5px;
}
:root.dark .clinical-bank-bobot {
  background: rgba(14, 165, 233, .18);
  border-color: #38bdf8;
  color: #7dd3fc;
}

.quiz-materi-bar {
  margin: 0 0 12px;
}
.quiz-materi-bar[hidden] {
  display: none !important;
}
.quiz-materi-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.materi-ppt-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  border: 1.5px solid #0284c7;
  border-bottom-width: 3px;
  background: rgba(14, 165, 233, .11);
  color: #0369a1;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.3;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.materi-ppt-btn:hover {
  background: rgba(14, 165, 233, .18);
}
.materi-ppt-btn:active {
  transform: translateY(1px);
  border-bottom-width: 1.5px;
}
:root.dark .materi-ppt-btn {
  background: rgba(56, 189, 248, .16);
  border-color: #38bdf8;
  color: #bae6fd;
}
.materi-ppt-sub-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.explain-materi-box {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1.5px solid rgba(14, 165, 233, .32);
  background: rgba(14, 165, 233, .08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
:root.dark .explain-materi-box {
  background: rgba(14, 165, 233, .12);
  border-color: rgba(56, 189, 248, .35);
}
.explain-materi-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.explain-materi-tag {
  font-size: 11px;
  font-weight: 900;
  color: #0369a1;
  background: rgba(14, 165, 233, .16);
  padding: 3px 8px;
  border-radius: 99px;
}
:root.dark .explain-materi-tag {
  color: #7dd3fc;
}
.explain-materi-head small {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.explain-materi-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Modal Deskripsi Bobot Soal */
.kedkel-bobot-modal {
  width: min(680px, 95vw);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  overflow: hidden;
}
.kedkel-bobot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.kedkel-bobot-head h2 {
  margin: 2px 0 4px;
  font-size: 19px;
  line-height: 1.25;
}
.kedkel-bobot-head p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.kedkel-bobot-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.kb-stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.kb-stat-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}
.kb-drive-root-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  background: #0284c7;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.kedkel-bobot-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
#kedkelBobotSearch {
  flex: 1 1 200px;
  min-width: 0;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}
.kedkel-bobot-sort {
  display: flex;
  gap: 6px;
}
.kedkel-bobot-list {
  flex: 1 1 auto;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.kb-topic-card {
  border: 1.5px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.kb-topic-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.kb-topic-num {
  flex: 0 0 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(14, 165, 233, .15);
  color: #0369a1;
  font-weight: 900;
  font-size: 13px;
  display: grid;
  place-items: center;
}
:root.dark .kb-topic-num {
  color: #7dd3fc;
}
.kb-topic-title {
  flex: 1 1 auto;
  min-width: 0;
}
.kb-topic-title b {
  display: block;
  font-size: 13.5px;
  line-height: 1.3;
}
.kb-topic-title small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
  margin-top: 2px;
}
.kb-topic-weight {
  flex: 0 0 auto;
  text-align: right;
}
.kb-topic-weight b {
  display: block;
  font-size: 13px;
  color: #16a34a;
}
:root.dark .kb-topic-weight b {
  color: #4ade80;
}
.kb-topic-weight small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.kb-weight-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.kb-weight-bar > i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
}
.kb-topic-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.kb-file-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, .35);
  background: var(--card);
  color: #0369a1;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}
:root.dark .kb-file-link {
  color: #7dd3fc;
}
.kb-train-btn {
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 10px;
  border: 1px solid #16a34a;
  background: rgba(22, 163, 74, .12);
  color: #15803d;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
}
:root.dark .kb-train-btn {
  color: #4ade80;
}

.ml-bobot-btn {
  margin-left: auto;
  padding: 7px 11px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, .65);
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}
.ml-ppt-link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid rgba(14, 165, 233, .35);
  background: rgba(14, 165, 233, .1);
  color: #0369a1;
  font-size: 11.5px;
  font-weight: 800;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}
:root.dark .ml-ppt-link {
  color: #7dd3fc;
}

@media (max-width: 560px) {
  .clinical-bank-actions {
    flex-wrap: wrap;
  }
  .ml-hero {
    flex-wrap: wrap;
  }
  .ml-bobot-btn {
    margin-left: 0;
    width: 100%;
  }
}



