/* app-views.css: App shell (sidebar/topbar/bottom-nav), dashboard, learning & 3D video studio, */

/* 4. App shell & Collapsible Sidebar (260px <-> 76px) */
.app { display: flex; min-height: 100vh; width: 100%; }
.sidebar,
#sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-w, 260px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
  border-right: 2px solid var(--line);
  transition: width 220ms cubic-bezier(0.4, 0, 0.2, 1), transform 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 14px 12px;
  flex-shrink: 0;
  border-bottom: 1.5px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; padding: 0; }
.brand-text { min-width: 0; flex: 1; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0;
  background: var(--green); border-bottom: 4px solid var(--green-d); color: #fff;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-name { font-family: var(--font-display); font-weight: 900; font-size: 21px; letter-spacing: -0.02em; color: var(--green-d); line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11.5px; font-weight: 600; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
}
.sb-toggle-btn .ic-expand { display: none !important; }
html[data-sidebar-collapsed="true"] .sb-toggle-btn .ic-collapse,
.app.sidebar-collapsed .sb-toggle-btn .ic-collapse,
.sidebar.collapsed .sb-toggle-btn .ic-collapse { display: none !important; }
html[data-sidebar-collapsed="true"] .sb-toggle-btn .ic-expand,
.app.sidebar-collapsed .sb-toggle-btn .ic-expand,
.sidebar.collapsed .sb-toggle-btn .ic-expand { display: inline-block !important; }

.nav,
#nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 12px 24px;
  scrollbar-width: thin;
}
.nav-label { padding: 10px 12px 4px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-link {
  position: relative;
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; margin-bottom: 3px;
  border-radius: 14px; border: 2px solid transparent; font-weight: 700; font-size: 14px; color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}
.nav-link .nav-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: var(--slate-s); color: var(--slate-d); transition: inherit; }
.nav-link .nav-ic svg { width: 19px; height: 19px; }
.nav-link .nav-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-link:hover { background: var(--bg-soft); color: var(--ink); }
.nav-link.active { background: var(--cs); border-color: var(--c); color: var(--ct); }
.nav-link.active .nav-ic { background: var(--c); color: #fff; }
.nav-tag { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px; background: var(--orange-s); color: var(--orange-t); flex-shrink: 0; }
.nav-live { margin-left: auto; width: 8px; height: 8px; border-radius: 99px; background: var(--red); animation: livePulse 1.8s infinite; }
.sidebar-foot { flex-shrink: 0; margin-top: auto; padding: 10px 14px 14px; border-top: 2px solid var(--line); background: var(--surface); }
.backdrop { position: fixed; inset: 0; z-index: 115; background: rgba(15, 23, 42, .48); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }

.main,
#main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: auto;
  max-width: 100%;
  margin-left: var(--sidebar-w, 260px);
  display: flex;
  flex-direction: column;
  transition: margin-left 220ms cubic-bezier(0.4, 0, 0.2, 1);
}
.topbar { position: sticky; top: 0; z-index: 35; background: var(--surface); border-bottom: 2px solid var(--line); }
.topbar-in { height: 72px; padding: 0 32px; display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-title { min-width: 0; }
.topbar-title .crumb { font-size: 12px; font-weight: 700; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title h1 { font-family: var(--font-display); font-size: 21px; font-weight: 900; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); border: 2px solid var(--line); background: #fff; flex-shrink: 0; }
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.view { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: 28px 32px 64px; min-width: 0; transition: max-width 220ms cubic-bezier(0.4, 0, 0.2, 1); }
.only-mobile { display: none !important; }

/* Floating Tooltip untuk Collapsed Mini-Rail (76px) */
.sb-floating-tooltip {
  position: fixed;
  z-index: 220;
  transform: translateY(-50%) translateX(-4px);
  opacity: 0;
  pointer-events: none;
  padding: 7px 13px;
  border-radius: 10px;
  background: #0F172A;
  color: #F8FAFC;
  font-size: 12.5px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.26);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  transition: opacity 140ms ease, transform 140ms ease;
}
.sb-floating-tooltip.visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Desktop Collapsed Mini-Rail (76px pada layar >= 1025px) */
@media (min-width: 1025px) {
  html[data-sidebar-collapsed="true"] .sidebar,
  html[data-sidebar-collapsed="true"] #sidebar,
  .app.sidebar-collapsed .sidebar,
  .app.sidebar-collapsed #sidebar,
  .sidebar.collapsed {
    width: var(--sidebar-collapsed-w, 76px);
  }
  html[data-sidebar-collapsed="true"] .main,
  html[data-sidebar-collapsed="true"] #main-content,
  .app.sidebar-collapsed .main,
  .app.sidebar-collapsed #main-content {
    margin-left: var(--sidebar-collapsed-w, 76px);
    width: 100%;
  }
  html[data-sidebar-collapsed="true"] .view,
  .app.sidebar-collapsed .view {
    max-width: 1520px;
    width: 100%;
  }
  html[data-sidebar-collapsed="true"] .topbar-sb-toggle,
  .app.sidebar-collapsed .topbar-sb-toggle {
    display: inline-grid !important;
  }
  html[data-sidebar-collapsed="true"] .sidebar-head,
  .app.sidebar-collapsed .sidebar-head,
  .sidebar.collapsed .sidebar-head {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 8px 10px;
  }
  html[data-sidebar-collapsed="true"] .brand,
  .app.sidebar-collapsed .brand,
  .sidebar.collapsed .brand {
    justify-content: center;
    flex: 0 0 auto;
  }
  html[data-sidebar-collapsed="true"] .brand-text,
  html[data-sidebar-collapsed="true"] .nav-label,
  html[data-sidebar-collapsed="true"] .nav-link .nav-text,
  html[data-sidebar-collapsed="true"] .nav-link > span:not(.nav-ic),
  html[data-sidebar-collapsed="true"] .nav-tag,
  html[data-sidebar-collapsed="true"] .sb-profile-meta,
  html[data-sidebar-collapsed="true"] .sb-profile-prog,
  html[data-sidebar-collapsed="true"] .sb-profile-gear,
  .app.sidebar-collapsed .brand-text,
  .app.sidebar-collapsed .nav-label,
  .app.sidebar-collapsed .nav-link .nav-text,
  .app.sidebar-collapsed .nav-link > span:not(.nav-ic),
  .app.sidebar-collapsed .nav-tag,
  .app.sidebar-collapsed .sb-profile-meta,
  .app.sidebar-collapsed .sb-profile-prog,
  .app.sidebar-collapsed .sb-profile-gear,
  .sidebar.collapsed .brand-text,
  .sidebar.collapsed .nav-label,
  .sidebar.collapsed .nav-link .nav-text,
  .sidebar.collapsed .nav-link > span:not(.nav-ic),
  .sidebar.collapsed .nav-tag,
  .sidebar.collapsed .sb-profile-meta,
  .sidebar.collapsed .sb-profile-prog,
  .sidebar.collapsed .sb-profile-gear {
    display: none !important;
  }
  html[data-sidebar-collapsed="true"] .nav,
  .app.sidebar-collapsed .nav,
  .sidebar.collapsed .nav {
    padding: 10px 8px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  html[data-sidebar-collapsed="true"] .nav-link,
  .app.sidebar-collapsed .nav-link,
  .sidebar.collapsed .nav-link {
    width: 48px;
    height: 48px;
    padding: 0;
    margin: 0 auto 6px;
    justify-content: center;
    border-radius: 14px;
  }
  html[data-sidebar-collapsed="true"] .sidebar-foot,
  .app.sidebar-collapsed .sidebar-foot,
  .sidebar.collapsed .sidebar-foot {
    padding: 10px 8px 14px;
    display: flex;
    justify-content: center;
  }
  html[data-sidebar-collapsed="true"] .sb-profile,
  .app.sidebar-collapsed .sb-profile,
  .sidebar.collapsed .sb-profile {
    padding: 4px !important;
    display: flex;
    justify-content: center;
    align-items: center;
  }
  html[data-sidebar-collapsed="true"] .sb-profile-top,
  .app.sidebar-collapsed .sb-profile-top,
  .sidebar.collapsed .sb-profile-top {
    justify-content: center;
    gap: 0;
  }
}

/* Grade switch (segmented) */
.seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--slate-s); border: 2px solid var(--line); }
.seg button { padding: 6px 14px; border-radius: 10px; font-size: 13px; font-weight: 800; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
.seg button:hover { color: var(--ink); }
.seg button.active { background: var(--c); color: #fff; box-shadow: 0 2px 0 var(--cd); }

/* Stat pills di topbar */
.stat-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 12px; border: 2px solid var(--line); background: #fff; font-family: var(--font-display); font-weight: 900; font-size: 16px; line-height: 1; white-space: nowrap; }
.stat-pill svg { width: 20px; height: 20px; }
.stat-pill.streak { color: var(--orange); }
.stat-pill.streak svg { fill: var(--orange); stroke: var(--orange-d); }
.stat-pill.xp { color: var(--gold); }
.stat-pill.xp svg { fill: var(--gold); stroke: var(--gold-d); }
.stat-pill .unit { font-family: var(--font); font-size: 12px; font-weight: 700; color: var(--muted); }
.bump { animation: bump .5s cubic-bezier(.2, 1.4, .4, 1); }

/* Bottom nav (mobile) */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: none; background: #fff; border-top: 2px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav a { flex: 1; display: grid; place-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; font-size: 10.5px; font-weight: 800; color: var(--faint); border: 2px solid transparent; }
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active { color: var(--ct); background: var(--cs); border-color: var(--c); }


/* 14. Dashboard */
.hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: center; padding: 28px 32px; background: var(--green-50); border-color: #A7F3D0; }
.hero-art { position: absolute; right: 0; bottom: 0; width: 380px; height: 100%; pointer-events: none; }
.hero-goal { position: relative; z-index: 1; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 18px; display: flex; align-items: center; gap: 16px; }
.week-dots { display: flex; gap: 6px; }
.week-dots span { width: 26px; height: 26px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; font-weight: 900; background: var(--slate-s); color: var(--faint); }
.week-dots span.on { background: var(--orange); color: #fff; }
.week-dots span.today { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--orange); }
.quest { display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.quest + .quest { border-top: 2px solid var(--line); }
.chest { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--gold-s); color: var(--gold-d); flex-shrink: 0; }
.chest.done { background: var(--gold); color: #fff; border-bottom: 3px solid var(--gold-d); }
.gauge-num { font-family: var(--font-display); font-weight: 900; font-size: 40px; line-height: 1; letter-spacing: -0.02em; }
.target-line { position: relative; height: 14px; border-radius: 99px; background: #E9EDF2; }
.target-line .fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--c); }
.target-line .flag { position: absolute; top: -4px; transform: translateX(-50%); width: 4px; height: 22px; background: var(--red); border-radius: 4px; box-shadow: 0 0 0 2px #fff; }
.lb-mini-row { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; }
.lb-mini-row.me { background: var(--green-50); border: 2px solid #A7F3D0; }
.rank-no { width: 28px; text-align: center; font-family: var(--font-display); font-weight: 900; font-size: 16px; color: var(--muted); }
.rank-no.r1 { color: var(--gold-d); } .rank-no.r2 { color: #64748B; } .rank-no.r3 { color: #B45309; }
.split-wide > * { min-width: 0; }
.dash-bottom-grid > * { min-width: 0; }
.dash-mtn-card-head > :first-child { min-width: 0; flex: 1; }
.card-link,
.dash-open-map-link { white-space: nowrap; flex-shrink: 0; }
.trail-mini {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 14px;
  border-radius: 14px;
  border: 2px solid var(--line);
  box-sizing: border-box;
  overflow: hidden;
  text-align: left;
  transition: border-color .15s;
}
.trail-mini:hover { border-color: var(--c); }
.trail-mini > .ic-box { flex-shrink: 0; }
.trail-mini-body { flex: 1; min-width: 0; text-align: left; }
.trail-mini-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.trail-mini-title {
  flex: 1;
  min-width: 0;
  text-align: left;
  overflow-wrap: break-word;
}
.trail-mini-pos-badge { flex-shrink: 0; white-space: nowrap; }
.trail-mini-desc { text-align: left; overflow-wrap: break-word; }
.trail-mini-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.pos-dots {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  gap: 4px;
}
.pos-dots span {
  flex: 1 1 0;
  min-width: 4px;
  width: auto;
  height: 8px;
  border-radius: 99px;
  background: #E9EDF2;
}
.pos-dots span.on { background: var(--c); }
.trail-mini-pct { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 1360px) {
  .dash-bottom-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 15. Learning */
.video-card { display: block; overflow: hidden; text-align: left; }
.video-thumb { position: relative; aspect-ratio: 16 / 9; background: var(--cs); overflow: hidden; border-bottom: 2px solid var(--line); }
.video-thumb svg.thumb-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-thumb .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 99px; display: grid; place-items: center; background: #fff; color: var(--ct); border-bottom: 4px solid var(--line-strong); transition: transform .15s; }
.video-thumb .play svg { width: 24px; height: 24px; margin-left: 3px; fill: currentColor; }
.video-card:hover .play { transform: translate(-50%, -50%) scale(1.08); }
.video-thumb .dur { position: absolute; right: 10px; bottom: 10px; padding: 3px 8px; border-radius: 8px; background: rgba(15, 23, 42, .78); color: #fff; font-size: 12px; font-weight: 800; }
.video-thumb .watched { position: absolute; left: 10px; top: 10px; }
.chapter-card { display: flex; flex-direction: column; text-align: left; overflow: hidden; min-width: 0; }
.chapter-band { height: 8px; background: var(--c); }
.chapter-body { padding: 20px; display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; }
.chapter-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.chapter-meta span { display: inline-flex; align-items: center; gap: 5px; }
.chapter-meta svg { width: 15px; height: 15px; }
.reader h3 { font-family: var(--font-display); font-weight: 900; font-size: 19px; margin: 28px 0 8px; color: var(--ink); }
.reader h3:first-child { margin-top: 0; }
.reader p { font-size: 15.5px; line-height: 1.8; color: var(--ink-2); }
.reader b, .reader strong { color: var(--ink); font-weight: 800; }
.keypoints { border-radius: 16px; padding: 18px 20px; background: var(--gold-s); border: 2px solid #FDE68A; }
.keypoints li { list-style: none; display: flex; gap: 10px; padding: 5px 0; font-size: 14.5px; font-weight: 600; color: #78350F; }
.keypoints li svg { color: var(--gold-d); margin-top: 2px; width: 18px; height: 18px; }
.formula { padding: 16px 18px; border-radius: 14px; background: var(--indigo-s); border: 2px solid #C7D2FE; }
.formula code { display: block; font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 14.5px; font-weight: 700; color: var(--indigo-t); white-space: pre-wrap; }
.checklist li { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 0; font-weight: 700; font-size: 14px; }
.checklist li + li { border-top: 2px solid var(--line); }
.check-dot { width: 28px; height: 28px; border-radius: 99px; display: grid; place-items: center; border: 2px solid var(--line-strong); color: transparent; flex-shrink: 0; }
.check-dot svg { width: 16px; height: 16px; }
.check-dot.on { background: var(--green); border-color: var(--green); color: #fff; }
.gen-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-weight: 700; font-size: 14px; color: var(--faint); }
.gen-step .gs-ic { width: 30px; height: 30px; border-radius: 99px; display: grid; place-items: center; background: var(--slate-s); }
.gen-step .gs-ic svg { width: 16px; height: 16px; }
.gen-step.active { color: var(--ink); }
.gen-step.active .gs-ic { background: var(--sky-s); color: var(--sky-d); }
.gen-step.active .gs-ic svg { animation: spin 1s linear infinite; }
.gen-step.done { color: var(--green-t); }
.gen-step.done .gs-ic { background: var(--green); color: #fff; }

/* Video player chrome (stage tetap gelap seperti layar video) */
.vp { border-radius: 18px; overflow: hidden; border: 2px solid var(--line); background: #fff; }
.vp-stage { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #0B1220; overflow: hidden; }
.vp-stage .scene-3d { position: absolute; inset: 0; perspective: 1400px; }
.vp-stage .scene-3d > .plane { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.vp-stage svg { width: 100%; height: 100%; display: block; }
.vp-caption { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: 86%; padding: 8px 14px; border-radius: 12px; background: rgba(255, 255, 255, .95); color: var(--ink); font-size: clamp(11px, 1.4vw, 15px); font-weight: 700; text-align: center; border-bottom: 3px solid var(--line-strong); }
.vp-badge { position: absolute; top: 14px; left: 14px; display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 10px; font-size: 12px; font-weight: 800; background: #fff; color: var(--indigo-t); }
.vp-badge svg { width: 14px; height: 14px; }
.vp-big { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(11, 18, 32, .35); transition: opacity .2s; }
.vp-big span { width: 76px; height: 76px; border-radius: 99px; display: grid; place-items: center; background: #fff; color: var(--green-d); border-bottom: 5px solid var(--line-strong); transition: transform .15s; }
.vp-big span svg { width: 32px; height: 32px; margin-left: 4px; fill: currentColor; }
.vp-big:hover span { transform: scale(1.06); }
.vp-bar { padding: 12px 16px 14px; }
.vp-range { -webkit-appearance: none; appearance: none; width: 100%; height: 8px; border-radius: 99px; background: #E9EDF2; outline: none; cursor: pointer; }
.vp-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 99px; background: var(--green); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--green-d); }
.vp-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 99px; background: var(--green); border: 3px solid #fff; }
.vp-marks { position: relative; height: 8px; margin-top: 2px; }
.vp-marks span { position: absolute; top: 0; width: 2px; height: 6px; border-radius: 2px; background: var(--line-strong); }
.transcript li { list-style: none; display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 9px 10px; border-radius: 12px; font-size: 14px; color: var(--muted); cursor: pointer; }
.transcript li:hover { background: var(--bg-soft); }
.transcript li.on { background: var(--sky-s); color: var(--sky-t); font-weight: 700; }
.transcript li .ts { font-weight: 800; font-variant-numeric: tabular-nums; }

/* 16. Naik Gunung — Duolingo path */
.trail-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trail-tab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px; background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; text-align: left; transition: border-color .15s, background .15s; }
.trail-tab:hover { background: var(--bg-soft); }
.trail-tab.active { background: var(--cs); border-color: var(--c); }
.unit-banner { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 18px; background: var(--c); border-bottom: 5px solid var(--cd); color: #fff; }
.unit-banner .eyebrow { color: rgba(255, 255, 255, .8); }
.map { position: relative; border-radius: 20px; overflow: hidden; border: 2px solid var(--line); background: #EAF6FF; }
.map-bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-path { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.node { position: absolute; transform: translate(-50%, -50%); z-index: 3; display: flex; flex-direction: column; align-items: center; }
.node-btn {
  position: relative; width: 76px; height: 70px; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: #E5E7EB; border-bottom: 8px solid #C4CAD3; color: #9CA3AF;
  transition: transform .08s, border-bottom-width .08s, margin .08s;
}
.node-btn svg { width: 32px; height: 32px; }
.node-btn:active:not(:disabled) { transform: translateY(4px); border-bottom-width: 4px; margin-bottom: 4px; }
.node.done .node-btn { background: var(--gold); border-bottom-color: var(--gold-d); color: #fff; }
.node.done .node-btn svg { fill: #fff; }
.node.current .node-btn { background: var(--c); border-bottom-color: var(--cd); color: #fff; }
.node.current::before { content: ""; position: absolute; left: 50%; top: 39px; width: 100px; height: 100px; margin: -50px 0 0 -50px; border-radius: 50%; border: 6px solid color-mix(in srgb, var(--c) 30%, transparent); animation: nodePulse 1.6s ease-out infinite; pointer-events: none; }
.node.locked .node-btn { cursor: not-allowed; }
.node.summit .node-btn { width: 96px; height: 88px; }
.node.summit .node-btn svg { width: 40px; height: 40px; }
.node.summit.current::before { width: 124px; height: 124px; margin: -62px 0 0 -62px; top: 48px; }
.node.base .node-btn { background: #fff; border: 3px solid var(--line); border-bottom-width: 8px; color: var(--green-d); cursor: default; }
.node.base .node-btn svg { fill: none; }
.node-label { margin-top: 10px; padding: 4px 12px; border-radius: 10px; background: #fff; border: 2px solid var(--line); font-size: 12.5px; font-weight: 800; color: var(--ink-2); white-space: nowrap; text-align: center; line-height: 1.3; }
.node-label small { display: block; font-size: 11px; font-weight: 700; color: var(--faint); }
.node.current .node-label { border-color: var(--c); color: var(--ct); }
.node .stars { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); display: flex; gap: 1px; color: var(--gold); }
.node .stars svg { width: 16px; height: 16px; fill: var(--gold); stroke: #fff; stroke-width: 2; }
.climber { position: absolute; z-index: 6; width: 0; height: 0; pointer-events: none; transition: left .9s cubic-bezier(.45, 0, .2, 1), top .9s cubic-bezier(.45, 0, .2, 1); }
.climber-in { position: absolute; left: -32px; top: -128px; width: 64px; display: flex; flex-direction: column; align-items: center; animation: hover 2.2s ease-in-out infinite; }
.climber-tip { margin-bottom: 4px; padding: 6px 12px; border-radius: 12px; background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; font-size: 12px; font-weight: 900; color: var(--ct); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; position: relative; }
.climber-tip::after { content: ""; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--line); }
.climber.walking .climber-in { animation: walk .3s ease-in-out infinite; }
.climber.sliding .climber-in { animation: slide .22s linear infinite; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i.dot { width: 14px; height: 14px; border-radius: 99px; display: inline-block; }
.cp-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 2px solid transparent; }
.cp-row.next { background: var(--cs); border-color: var(--c); }
.cp-row.locked { opacity: .55; }
.cp-num { width: 32px; height: 32px; border-radius: 99px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 14px; background: #E5E7EB; color: var(--muted); flex-shrink: 0; }
.cp-num.done { background: var(--gold); color: #fff; }
.cp-num.next { background: var(--c); color: #fff; }
.stopwatch { font-family: var(--font-display); font-weight: 900; font-size: 30px; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

/* Tryout modal */
.tryout-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 16px 24px; border-bottom: 2px solid var(--line); }
.tryout-time { height: 6px; background: #E9EDF2; }
.tryout-time > span { display: block; height: 100%; background: var(--c); transition: width 1s linear, background .3s; }
.tryout-time.warn > span { background: var(--red); }
.q-card { padding: 20px 22px; border-radius: 18px; background: var(--bg-soft); border: 2px solid var(--line); }
.q-text { font-size: 17px; font-weight: 700; line-height: 1.65; color: var(--ink); }
.q-num { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: 12px; background: var(--c); color: #fff; font-family: var(--font-display); font-weight: 900; font-size: 16px; border-bottom: 3px solid var(--cd); }

/* 17. Tutor */
.chat { display: flex; flex-direction: column; height: calc(100vh - 136px); min-height: 540px; max-height: 820px; overflow: hidden; }
.chat-head { flex-shrink: 0; }
.chat-stream, .messages-container { flex: 1 1 0%; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 20px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 16px; scroll-behavior: smooth; }
.tutor-empty-chips { margin-top: 8px; padding: 14px 16px; border-radius: 16px; background: var(--bg-card, #fff); border: 2px dashed var(--line); display: flex; flex-direction: column; gap: 10px; max-width: 100%; overflow-x: hidden; }
.tutor-empty-chips-grid { display: flex; flex-wrap: wrap; gap: 8px; max-width: 100%; overflow-x: hidden; }
.tutor-empty-chips .chip { white-space: normal; text-align: left; word-break: break-word; overflow-wrap: anywhere; max-width: 100%; line-height: 1.4; padding: 10px 14px; border-radius: 14px; align-items: flex-start; }
.tutor-workbench-body { overflow-x: hidden; min-width: 0; }
.tutor-quick-chapters { display: flex; flex-direction: column; gap: 8px; max-height: 220px; overflow-y: auto; overflow-x: hidden; padding-right: 2px; }
.tutor-quick-chapters .chip { width: 100%; max-width: 100%; justify-content: flex-start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 12px; padding: 9px 12px; }
.tutor-quick-chapters .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.msg { display: flex; gap: 12px; align-items: flex-end; max-width: min(760px, 92%); animation: msgIn .25s ease; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.bubble { padding: 14px 18px; border-radius: 18px; font-size: 14.5px; line-height: 1.65; background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; color: var(--ink-2); }
.msg.bot .bubble { border-bottom-left-radius: 6px; }
.msg.user .bubble { background: var(--green); border-color: var(--green); border-bottom-color: var(--green-d); color: #fff; border-bottom-right-radius: 6px; font-weight: 600; }
.chat-input { flex-shrink: 0; display: flex; gap: 10px; padding: 14px 16px; border-top: 2px solid var(--line); background: #fff; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing span { width: 8px; height: 8px; border-radius: 99px; background: var(--faint); animation: typing 1.1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
.md p { display: block; margin: 6px 0; white-space: normal; word-spacing: normal; letter-spacing: normal; }
.md p:first-child { margin-top: 0; }
.md strong, .md b { display: inline; color: var(--ink); font-weight: 800; white-space: normal; word-spacing: normal; letter-spacing: normal; }
.md em { display: inline; color: var(--muted); white-space: normal; word-spacing: normal; letter-spacing: normal; }
.md a { display: inline; white-space: normal; word-spacing: normal; }
.md ul, .md ol { margin: 6px 0 6px 22px; padding: 0; }
.md ol ul, .md ul ul { margin: 4px 0 4px 18px; list-style-type: disc; }
.md li { display: list-item; margin: 3px 0; white-space: normal; word-spacing: normal; letter-spacing: normal; }
.md h4 { font-family: var(--font-display); font-weight: 900; font-size: 16.5px; color: var(--ink); margin: 12px 0 4px; white-space: normal; word-spacing: normal; letter-spacing: normal; }
.md h4:first-child { margin-top: 0; }
.md code { display: inline; font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 13px; padding: 1px 6px; border-radius: 6px; background: var(--indigo-s); color: var(--indigo-t); font-weight: 700; word-spacing: normal; letter-spacing: normal; }
.md .md-hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.md .formula-block { margin: 10px 0; padding: 12px 14px; border-radius: 12px; background: var(--indigo-s); border: 2px solid #C7D2FE; font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 13px; font-weight: 700; color: var(--indigo-t); white-space: pre-wrap; }
.md .md-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 10px 0; border-radius: 12px; }
.md table { width: 100%; min-width: 360px; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 13px; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; }
.md th, .md td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1.5px solid var(--line); word-break: normal; overflow-wrap: break-word; }
.md tr:last-child td { border-bottom: 0; }
.md th { background: var(--bg-soft); color: var(--ink); font-weight: 800; white-space: nowrap; }
.md td:first-child { white-space: nowrap; }
.calc-result { padding: 16px; border-radius: 14px; background: var(--green-50); border: 2px solid #A7F3D0; }
.calc-result .big { font-family: var(--font-display); font-weight: 900; font-size: 26px; color: var(--green-t); line-height: 1.15; }

/* 18. Study room */
.room-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.live-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; color: var(--red-d); }
.live-dot::before { content: ""; width: 8px; height: 8px; border-radius: 99px; background: var(--red); animation: livePulse 1.8s infinite; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.member-row + .member-row { border-top: 2px solid var(--line); }
.room-chat { height: 380px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 18px; background: var(--bg-soft); border-radius: 14px; border: 2px solid var(--line); }
.rc-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 92%; }
.rc-msg.me { margin-left: auto; flex-direction: row-reverse; }
.rc-msg .rc-b { padding: 9px 13px; border-radius: 14px; background: #fff; border: 2px solid var(--line); font-size: 14px; color: var(--ink-2); }
.rc-msg.me .rc-b { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.rc-msg.sys { margin: 0 auto; }
.rc-msg.sys .rc-b { background: var(--gold-s); border-color: #FDE68A; color: var(--gold-t); font-weight: 700; font-size: 13px; text-align: center; }
.pomo-time { font-family: var(--font-display); font-weight: 900; font-size: 40px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.battle-score { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; }
.battle-score.me { background: var(--green-50); border: 2px solid #A7F3D0; }

/* 19. Leaderboard */
.league { display: flex; align-items: center; gap: 18px; padding: 22px 24px; }
.league-shield { width: 64px; height: 72px; flex-shrink: 0; }
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: end; }
.podium-col { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.podium-step { width: 100%; border-radius: 16px 16px 8px 8px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 900; font-size: 30px; color: #fff; }
.podium-step.p1 { height: 128px; background: var(--gold); border-bottom: 6px solid var(--gold-d); }
.podium-step.p2 { height: 96px; background: #94A3B8; border-bottom: 6px solid #64748B; }
.podium-step.p3 { height: 76px; background: #D97706; border-bottom: 6px solid #B45309; }
.lb-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.lb-table th { position: sticky; top: 0; background: #fff; z-index: 1; padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); border-bottom: 2px solid var(--line); }
.lb-table td { padding: 12px 14px; border-bottom: 2px solid var(--line); font-size: 14px; vertical-align: middle; }
.lb-table tr:last-child td { border-bottom: 0; }
.lb-table tr.me td { background: var(--green-50); }
.lb-table tr.me td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.lb-table tr.zone-up td:first-child { box-shadow: inset 4px 0 0 var(--green); }
.lb-table tr.zone-safe td:first-child { box-shadow: inset 4px 0 0 #94A3B8; }
.lb-table tr.zone-down td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.zone-sep td { padding: 6px 14px !important; background: var(--bg-soft); font-size: 11.5px !important; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.league-tiers { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.league-pill {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px;
  border-radius: 16px; border: 2px solid var(--line); border-bottom-width: 4px;
  background: #fff; text-align: center; transition: transform .14s, border-color .14s, background .14s;
}
.league-pill:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.league-pill.active { border-color: var(--lg-accent, var(--green)); background: var(--lg-bg, var(--green-50)); box-shadow: 0 6px 14px -8px rgba(15,23,42,.22); }
.mtn-peers-chip {
  margin-top: 4px; padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 800;
  background: #0F172A; color: #fff; box-shadow: 0 3px 8px rgba(15,23,42,.25); white-space: nowrap;
}
@media (max-width: 1120px) { .league-tiers { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { .league-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lb-scroll { max-height: 640px; overflow-y: auto; }
.challenge-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
.challenge-card.done { background: var(--green-50); border-color: #A7F3D0; }
.badge-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; text-align: center; border-radius: 16px; border: 2px solid var(--line); background: #fff; }
.badge-medal { width: 58px; height: 58px; border-radius: 99px; display: grid; place-items: center; background: var(--c); color: #fff; border-bottom: 5px solid var(--cd); }
.badge-medal svg { width: 26px; height: 26px; }
.badge-tile.locked .badge-medal { background: #E5E7EB; border-bottom-color: #CBD5E1; color: #9CA3AF; }
.badge-tile.locked { background: var(--bg-soft); }

/* Settings & Qwen/Qwen3-8B + RAG UI */
:root { --border: var(--line); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 > *, .grid-3 > * { min-width: 0; }
.mtn-passport-hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 18px; align-items: center; }
.tp-profile-logout-btn { margin-left: 8px; }
.c-sub { color: var(--ink-2); }
.c-emerald { color: var(--green-d); }
.c-violet { color: var(--violet-d); }
.c-rose { color: var(--red-d); }
.badge-emerald { background: var(--green-s); color: var(--green-t); }
.badge-sky { background: var(--sky-s); color: var(--sky-t); }
.badge-indigo { background: var(--indigo-s); color: var(--indigo-t); }
.badge-gold { background: var(--gold-s); color: var(--gold-t); }
.ico-box { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex-shrink: 0; background: var(--cs); color: var(--ct); border-bottom: 3px solid color-mix(in srgb, var(--c) 35%, transparent); }
.ico-box.sky { background: var(--sky-s); color: var(--sky-t); border-bottom-color: #7DD3FC; }
.ico-box.indigo { background: var(--indigo-s); color: var(--indigo-t); border-bottom-color: #A5B4FC; }
.ico-box.emerald { background: var(--green-s); color: var(--green-t); border-bottom-color: #6EE7B7; }
.ico-box.gold { background: var(--gold-s); color: var(--gold-t); border-bottom-color: #FCD34D; }
.ico-box.violet { background: var(--violet-s); color: var(--violet-t); border-bottom-color: #C4B5FD; }
.ico-box.rose { background: var(--red-s); color: var(--red-t); border-bottom-color: #FCA5A5; }
.select { width: 100%; min-height: 46px; padding: 10px 36px 10px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg-soft); font-size: 14.5px; font-weight: 600; color: var(--ink); outline: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.select:focus { border-color: var(--sky); background-color: #fff; }
.btn-secondary { --bc: #fff; --bd: var(--line-strong); --bt: var(--ink-2); border-color: var(--line); border-bottom-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-soft); filter: none; }
.btn-amber { --bc: var(--gold); --bd: var(--gold-d); --bt: #fff; }
.btn-xs { min-height: 30px; padding: 4px 10px; font-size: 11.5px; border-radius: 10px; }
.choice-title { font-weight: 800; font-size: 13.5px; color: var(--ink); }
.choice-sub { font-weight: 600; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.set-row + .set-row { border-top: 2px solid var(--line); }
.set-row .set-label, .set-row .set-title { font-weight: 800; font-size: 14.5px; color: var(--ink); }
.set-row .set-hint, .set-row .set-sub { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-top: 2px; }
button.toggle {
  position: relative; width: 56px; height: 32px; border-radius: 99px;
  background: #E5E7EB; border: 2px solid #D1D5DB; border-bottom-width: 4px;
  transition: background .15s, border-color .15s; flex-shrink: 0;
}
button.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 99px; background: #fff; border: 2px solid #D1D5DB;
  transition: transform .18s cubic-bezier(.3, 1.4, .5, 1), border-color .15s;
}
button.toggle.on { background: var(--green); border-color: var(--green-d); }
button.toggle.on::after { transform: translateX(24px); border-color: var(--green-d); }
.danger-zone { padding: 20px; border-radius: 16px; border: 2px solid #FECACA; background: linear-gradient(180deg, #FFF5F5 0%, #FFFBFB 100%); }
.av-custom-box { padding: 14px; border-radius: 16px; border: 2px solid var(--line); background: var(--bg-soft); }
.av-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 12px; background: #fff; border: 2px solid var(--line); }
.av-tab { padding: 7px 8px; border-radius: 9px; font-size: 12px; font-weight: 800; color: var(--muted); transition: all .15s ease; text-align: center; }
.av-tab:hover { color: var(--ink); background: var(--bg-soft); }
.av-tab.active { background: var(--green-50); color: var(--green-t); box-shadow: inset 0 0 0 1.5px #A7F3D0; }
.av-char-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.av-char-btn { height: 42px; border-radius: 12px; border: 2px solid var(--line); border-bottom-width: 3px; background: #fff; font-size: 20px; display: grid; place-items: center; transition: transform .14s cubic-bezier(.34,1.56,.64,1), border-color .14s ease, background .14s ease; }
.av-char-btn:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.av-char-btn.active { border-color: var(--green); background: var(--green-50); box-shadow: 0 4px 10px -4px rgba(16,185,129,.35); }
.av-swatch-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.av-swatch { width: 28px; height: 28px; border-radius: 99px; border: 2.5px solid #fff; box-shadow: 0 2px 6px rgba(15,23,42,.16); transition: transform .15s cubic-bezier(.34,1.56,.64,1), box-shadow .15s ease; }
.av-swatch:hover { transform: scale(1.12); }
.av-swatch.active { transform: scale(1.1); box-shadow: 0 0 0 2.5px #1E293B, 0 4px 10px rgba(15,23,42,.22); }
.code-block { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 12.5px; font-weight: 600; padding: 12px 14px; border-radius: 12px; background: #0F172A; color: #E2E8F0; white-space: pre-wrap; word-break: break-all; }
.sb-profile { display: block; width: 100%; text-align: left; transition: border-color .15s; cursor: pointer; }
.sb-profile:hover { border-color: var(--green); }

/* Qwen3 Thinking Mode Pill Toggle in #tutor */
.qwen-thinking-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px;
  border-radius: 99px; border: 2px solid #DDD6FE; border-bottom-width: 4px;
  background: #F5F3FF; color: #5B21B6; font-size: 12px; font-weight: 800;
  cursor: pointer; transition: all .15s ease;
}
.qwen-thinking-pill .qwen-pill-state {
  padding: 2px 7px; border-radius: 99px; background: #CBD5E1; color: #334155; font-size: 10.5px; font-weight: 900;
}
.qwen-thinking-pill.on {
  background: #EDE9FE; border-color: #8B5CF6; border-bottom-color: #6D28D9; color: #4C1D95;
}
.qwen-thinking-pill.on .qwen-pill-state {
  background: #8B5CF6; color: #FFFFFF;
}

/* Alur Analisis Konsep Accordion */
.qwen-think-box {
  border-radius: 14px; border: 2px solid #DDD6FE; background: #FAF5FF;
  overflow: hidden; margin-bottom: 12px;
}
.qwen-think-summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 14px; cursor: pointer; font-size: 12.5px; color: #5B21B6;
  background: linear-gradient(90deg, #F3E8FF 0%, #FAF5FF 100%);
  user-select: none;
}
.qwen-think-summary::-webkit-details-marker { display: none; }
.qwen-think-meta {
  font-size: 11px; font-weight: 800; color: #7C3AED;
}
.qwen-think-body {
  padding: 10px 16px 12px; border-top: 1.5px dashed #DDD6FE;
  font-family: var(--font);
  font-size: 13px; line-height: 1.6; color: #4C1D95; background: #FDFBFF;
}
.analysis-step-list { margin: 0 0 0 18px; padding: 0; }
.analysis-step-list li { margin: 4px 0; font-weight: 600; }

/* RAG Citation Badge & Top-3 Chunks Drawer */
.rag-citation-wrap { margin-bottom: 10px; }
.rag-citation-details {
  border-radius: 12px; border: 2px solid #BAE6FD; background: #F0F9FF; overflow: hidden;
}
.rag-citation-pill {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 12px; font-size: 12px; color: #0369A1; cursor: pointer; user-select: none;
  background: linear-gradient(90deg, #E0F2FE 0%, #F0F9FF 100%);
}
.rag-citation-pill::-webkit-details-marker { display: none; }
.rag-pill-toggle { font-size: 11px; font-weight: 800; color: #0284C7; white-space: nowrap; }
.rag-chunks-drawer {
  padding: 10px 12px; border-top: 1.5px dashed #BAE6FD; background: #FFFFFF;
  display: flex; flex-direction: column; gap: 8px;
}
.rag-chunk-item {
  padding: 8px 10px; border-radius: 10px; background: #F8FAFC; border: 1.5px solid var(--line);
}

/* 3-Column Tutor Layout & Gemini History Sidebar */
.tutor-layout-3col {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}
.tutor-history-sidebar {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 136px);
  min-height: 540px;
  max-height: 820px;
  overflow: hidden;
  background: #FFFFFF;
}
.tutor-history-head {
  padding: 12px 14px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.tutor-history-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tutor-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s;
}
.tutor-history-item:hover {
  background: var(--bg-soft);
}
.tutor-history-item.active {
  background: var(--violet-s);
  border-color: #C4B5FD;
  color: var(--violet-t);
}
.tutor-history-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.tutor-history-item.active .tutor-history-title {
  color: var(--violet-t);
  font-weight: 800;
}
.tutor-history-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.15s;
}
.tutor-history-item:hover .tutor-history-actions,
.tutor-history-item.active .tutor-history-actions {
  opacity: 1;
}
.hist-act-btn {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  line-height: 1;
  transition: background 0.12s, transform 0.1s;
}
.hist-act-btn:hover {
  background: rgba(15, 23, 42, 0.08);
  transform: scale(1.1);
}
.hist-act-btn.pinned {
  background: var(--gold-s);
}

/* Studio Avatar Pendaki (3 Mode Lengkap: Inisial, Duolingo x Netflix, Upload) */
.sb-avatar-btn {
  position: relative; display: inline-flex; flex-shrink: 0; border-radius: 999px;
  cursor: pointer; transition: transform .15s cubic-bezier(.34,1.56,.64,1);
}
.sb-avatar-btn:hover { transform: scale(1.06); }
.sb-avatar-edit-dot {
  position: absolute; right: -3px; bottom: -3px; width: 19px; height: 19px; border-radius: 99px;
  background: #0F172A; color: #fff; border: 2px solid #fff;
  display: grid; place-items: center; font-size: 9px; line-height: 1;
}
.av-studio-wrap { display: flex; flex-direction: column; gap: 14px; }
.av-mode-bar,
.av-mode-tabs {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}
.av-mode-btn,
.av-mode-tab {
  flex: 1 1 0;
  min-width: 110px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  background: #F1F5F9;
  color: #334155;
  border: 1.5px solid #CBD5E1;
  text-align: center;
  cursor: pointer;
  transition: all .15s ease;
}
html[data-theme="dark"] .av-mode-btn,
html[data-theme="dark"] .av-mode-tab,
body.dark-mode .av-mode-btn,
body.dark-mode .av-mode-tab {
  background: #1E293B;
  color: #E2E8F0;
  border-color: #334155;
}
.av-mode-btn:hover,
.av-mode-tab:hover {
  border-color: #10B981;
  color: #0F172A;
  background: #E2E8F0;
}
html[data-theme="dark"] .av-mode-btn:hover,
html[data-theme="dark"] .av-mode-tab:hover,
body.dark-mode .av-mode-btn:hover,
body.dark-mode .av-mode-tab:hover {
  border-color: #10B981;
  color: #FFFFFF;
  background: #334155;
}
.av-mode-btn.active,
.av-mode-tab.active {
  background: #059669 !important;
  color: #FFFFFF !important;
  border-color: #059669 !important;
  font-weight: 800;
  box-shadow: 0 4px 12px -3px rgba(5, 150, 105, .42);
}
.av-mode-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 13px;
  line-height: 1;
}
.av-studio-card { border-radius: 18px; border: 2px solid var(--line); background: #fff; }
.av-big-ring {
  padding: 4px; border-radius: 999px; background: linear-gradient(135deg, #10B981, #0EA5E9);
  display: inline-flex; box-shadow: 0 10px 20px -10px rgba(16, 185, 129, .45);
}
.av-theme-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.av-theme-grid .av-swatch { width: 100%; height: 36px; border-radius: 12px; }

/* Dark/Modern Studio Panel */
.av-dark-studio {
  border-radius: 20px; padding: 16px; background: linear-gradient(180deg, #0F172A 0%, #111827 100%);
  color: #F8FAFC; border: 2px solid #1E293B; box-shadow: 0 14px 32px -12px rgba(15, 23, 42, .55);
  display: flex; flex-direction: column; gap: 14px;
}
.av-studio-top { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.av-subtabs { display: inline-flex; gap: 6px; padding: 4px; border-radius: 12px; background: #1E293B; }
.av-subtab {
  padding: 7px 14px; border-radius: 9px; font-size: 12.5px; font-weight: 800; color: #E2E8F0;
  transition: all .15s ease;
}
.av-subtab:hover { color: #FFFFFF; }
.av-subtab.active { background: #38BDF8; color: #0F172A; }
.av-dark-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 99px; font-size: 12px; font-weight: 800;
  background: #1E293B; color: #E2E8F0; border: 1.5px solid #334155; cursor: pointer;
}
.av-dark-pill:hover { border-color: #10B981; color: #FFFFFF; }
.av-builder-stage {
  display: grid; place-items: center; padding: 18px 12px; border-radius: 16px;
  background: radial-gradient(circle at 50% 35%, #1E293B 0%, #0B1220 100%);
  border: 1.5px solid #334155;
}
.av-duo-switcher {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
  border-bottom: 2px solid #1E293B; padding-bottom: 8px;
}
.av-duo-tab {
  padding: 9px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em;
  color: #E2E8F0; background: #1E293B; border: 1px solid #334155; cursor: pointer;
  transition: all .15s ease;
}
.av-duo-tab:hover { border-color: #64748B; color: #FFFFFF; }
.av-duo-tab.active {
  background: #10B981;
  color: #FFFFFF;
  border-color: #059669;
  font-weight: 900;
  box-shadow: 0 3px 0 #047857;
}
.av-cat-bar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.av-cat-btn {
  flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 12px; border-radius: 12px; background: #1E293B; border: 2px solid transparent;
  font-size: 11px; font-weight: 800; color: #CBD5E1;
}
.av-cat-btn.active { border-color: #38BDF8; background: #0C4A6E; color: #fff; }
.av-builder-controls { background: #0B1220; border: 1.5px solid #1E293B; border-radius: 14px; padding: 14px; }
.av-ctrl-title { font-size: 11.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #94A3B8; margin-bottom: 10px; }
.av-skin-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.av-skin-box {
  height: 36px; border-radius: 10px; border: 2.5px solid rgba(255,255,255,0.14);
  transition: transform .12s, border-color .12s, box-shadow .12s;
}
.av-skin-box:hover { transform: scale(1.06); }
.av-skin-box.active { border-color: #38BDF8; box-shadow: 0 0 0 2px #0284C7; transform: scale(1.05); }
.av-opt-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.av-dark-chip {
  padding: 7px 13px; border-radius: 10px; font-size: 12.5px; font-weight: 800;
  background: #1E293B; color: #E2E8F0; border: 2px solid #334155;
}
.av-dark-chip.active { border-color: #38BDF8; background: #0369A1; color: #fff; }
.av-suits-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.av-suit-card {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 10px;
  border-radius: 14px; background: #1E293B; border: 2px solid #334155; text-align: center;
  transition: transform .14s, border-color .14s;
}
.av-suit-card:hover { transform: translateY(-2px); border-color: #64748B; }
.av-suit-card.active { border-color: #38BDF8; background: #0C4A6E; }
.av-suit-card.locked { opacity: .82; }
.av-suit-lock {
  padding: 2px 8px; border-radius: 99px; font-size: 10.5px; font-weight: 800;
  background: #334155; color: #FDE047;
}
.av-suit-lock.open { background: #065F46; color: #6EE7B7; }

/* EkoAvatarCanvas — 11-Layer Transparent PNG Modular Avatar + Animations */
.eko-avatar-canvas {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  overflow: visible;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-select: none;
  vertical-align: middle;
}
.eko-av-clip {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  overflow: hidden;
  background: #E2E8F0;
}
.eko-av-layer {
  position: absolute;
  object-fit: contain;
  pointer-events: none;
  display: block;
  max-width: none;
}
.eko-av-z1  { z-index: 1; }
.eko-av-z2  { z-index: 2; }
.eko-av-z3  { z-index: 3; }
.eko-av-z4  { z-index: 4; }
.eko-av-z5  { z-index: 5; }
.eko-av-z6  { z-index: 6; }
.eko-av-z7  { z-index: 7; }
.eko-av-z8  { z-index: 8; }
.eko-av-z9  { z-index: 9; }
.eko-av-z10 { z-index: 10; }
.eko-av-z11 { z-index: 11; }

.eko-av-body-group,
.eko-av-head-group,
.eko-av-pet-group {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.eko-av-body-group { transform-origin: 50% 85%; z-index: 3; }
.eko-av-head-group { transform-origin: 50% 54%; z-index: 5; }
.eko-av-pet-group  { transform-origin: 78% 82%; z-index: 10; }

/* Idle Breathing & Head Sway & Mini-Pet Float */
@keyframes ekoAvBreathe {
  0%, 100% { transform: translateY(0px) scaleY(1); }
  50%      { transform: translateY(-3px) scaleY(1.02); }
}
@keyframes ekoAvHeadSway {
  0%, 100% { transform: rotate(-1.2deg); }
  50%      { transform: rotate(1.2deg); }
}
@keyframes ekoAvPetFloat {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-4px); }
}
@keyframes ekoAvPop {
  0%   { transform: scale(0.92); }
  55%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
@keyframes ekoAvShuffle {
  0%   { transform: scale(0.88) rotate(-7deg); }
  45%  { transform: scale(1.08) rotate(5deg); }
  75%  { transform: scale(0.98) rotate(-2deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes ekoAvVictoryJump {
  0%, 100% { transform: translateY(0px) scale(1); }
  22%      { transform: translateY(-9px) scale(1.06); }
  42%      { transform: translateY(0px) scale(0.97); }
  62%      { transform: translateY(-6px) scale(1.04); }
  80%      { transform: translateY(0px) scale(1); }
}
@keyframes ekoAvSparkleFloat {
  0%   { opacity: 0; transform: scale(0.4) translateY(6px) rotate(0deg); }
  35%  { opacity: 1; transform: scale(1.1) translateY(-4px) rotate(45deg); }
  100% { opacity: 0; transform: scale(0.5) translateY(-14px) rotate(120deg); }
}
@keyframes ekoAv3Blink {
  0%, 92%, 98%, 100% { opacity: 0; }
  94%, 96%           { opacity: 1; }
}

/* Vector 2D Soft-Shaded Avatar Engine (vector_v3 · viewBox 0 0 240 240) */
.eko-av3-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 4;
  pointer-events: none;
  display: block;
}
.eko-av3-body {
  transform-box: view-box;
  transform-origin: 50% 88.33%;
}
.eko-av3-head,
.eko-av3-head-back {
  transform-box: view-box;
  transform-origin: 50% 60.83%;
}
.eko-av3-blink { opacity: 0; pointer-events: none; }

.eko-avatar-canvas.is-animated .eko-av3-body {
  animation: ekoAvBreathe 2.8s ease-in-out infinite;
  will-change: transform;
}
.eko-avatar-canvas.is-animated .eko-av3-head,
.eko-avatar-canvas.is-animated .eko-av3-head-back {
  animation: ekoAvHeadSway 3.4s ease-in-out infinite;
  will-change: transform;
}
.eko-avatar-canvas.is-animated .eko-av3-blink {
  animation: ekoAv3Blink 4.2s linear infinite;
}
.eko-av3-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
  display: block;
}
.eko-av3-pet-img {
  position: absolute;
  right: 2%;
  bottom: 1%;
  width: 34%;
  height: 34%;
  object-fit: contain;
  z-index: 10;
  pointer-events: none;
  display: block;
}
.eko-av3-frame-img {
  position: absolute;
  inset: -3%;
  width: 106%;
  height: 106%;
  object-fit: contain;
  z-index: 11;
  pointer-events: none;
  display: block;
}
.eko-av3-thumb-svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.av-gender-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.av-gender-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.72);
  color: #CBD5E1;
  font-weight: 800;
  font-size: 13.5px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.av-gender-btn:hover { transform: translateY(-1px); border-color: rgba(16, 185, 129, 0.55); }
.av-gender-btn.active {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10B981;
  color: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
}
.av-skin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  align-items: stretch;
  gap: 8px;
}
.av-skin-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 12px;
  border: 2px solid #334155;
  background: #1E293B;
  color: #E2E8F0;
  min-height: 62px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.av-skin-card.active {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.2);
  color: #FFFFFF;
}
.av-skin-circle {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  box-shadow: inset -5px -5px 0 rgba(0, 0, 0, 0.14);
}
.av-color-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.av-color-dot {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.av-color-dot:hover { transform: scale(1.1); }
.av-color-dot.active {
  border-color: #FFFFFF;
  box-shadow: 0 0 0 2.5px #10B981;
  transform: scale(1.12);
}

.eko-avatar-canvas.is-animated .eko-av-body-group {
  animation: ekoAvBreathe 2.8s ease-in-out infinite;
  will-change: transform;
}
.eko-avatar-canvas.is-animated .eko-av-head-group {
  animation: ekoAvHeadSway 3.4s ease-in-out infinite;
  will-change: transform;
}
.eko-avatar-canvas.is-animated .eko-av-pet-group.is-pet {
  animation: ekoAvPetFloat 2.4s ease-in-out infinite;
  will-change: transform;
}
.eko-avatar-canvas.eko-av-pop {
  animation: ekoAvPop 0.34s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.eko-avatar-canvas.eko-av-shuffle {
  animation: ekoAvShuffle 0.42s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.eko-avatar-canvas.is-celebrate {
  animation: ekoAvVictoryJump 1.15s ease-in-out 2;
}
.eko-av-sparkles {
  position: absolute;
  inset: -12%;
  pointer-events: none;
  z-index: 12;
}
.eko-av-sparkle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, #FEF08A 0%, #F59E0B 65%, transparent 72%);
  clip-path: polygon(50% 0%, 63% 37%, 100% 50%, 63% 63%, 50% 100%, 37% 63%, 0% 50%, 37% 37%);
  animation: ekoAvSparkleFloat 1.3s ease-out infinite;
}
.eko-av-sparkle.sp1 { top: 4%; left: 10%; animation-delay: 0s; }
.eko-av-sparkle.sp2 { top: 0%; right: 12%; animation-delay: 0.25s; width: 14px; height: 14px; }
.eko-av-sparkle.sp3 { bottom: 14%; left: -4%; animation-delay: 0.5s; width: 10px; height: 10px; }
.eko-av-sparkle.sp4 { bottom: 10%; right: -2%; animation-delay: 0.72s; width: 13px; height: 13px; }
.eko-av-sparkle.sp5 { top: 42%; right: -8%; animation-delay: 0.4s; width: 10px; height: 10px; }

/* Respect Reduce Motion accessibility setting */
html[data-reduce-motion="true"] .eko-avatar-canvas,
html[data-reduce-motion="true"] .eko-avatar-canvas *,
.eko-avatar-canvas.no-anim,
.eko-avatar-canvas.no-anim * {
  animation: none !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .eko-avatar-canvas,
  .eko-avatar-canvas * {
    animation: none !important;
  }
}

/* Studio Item Grids (AVATAR Categories + KOSTUM) */
.av-png-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  align-items: stretch;
  gap: 10px;
  max-height: 310px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
}
.av-costume-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  align-items: stretch;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
}
.av-png-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 14px;
  background: #1E293B;
  border: 2px solid #334155;
  color: #E2E8F0;
  min-height: 84px;
  height: 100%;
  cursor: pointer;
  transition: transform 0.14s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.14s, background 0.14s;
}
.av-costume-grid .av-png-tile {
  min-height: 104px;
}
.av-png-tile:hover {
  transform: translateY(-2px);
  border-color: #64748B;
  color: #FFFFFF;
}
.av-png-tile.active {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.18);
  color: #FFFFFF;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}
.av-png-thumb-wrap {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(255,255,255,0.12), rgba(15,23,42,0.55));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.av-costume-grid .av-png-thumb-wrap {
  width: 82px;
  height: 82px;
}
.av-png-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.av-png-label {
  font-size: 11px;
  font-weight: 600;
  color: #E2E8F0;
  line-height: 1.25;
  text-align: center;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.av-png-tile.active .av-png-label {
  color: #FFFFFF;
  font-weight: 700;
}
.av-png-badge {
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(16, 185, 129, 0.2);
  color: #6EE7B7;
  margin-top: auto;
}
.av-png-none-icon {
  width: 36px;
  height: 36px;
  border-radius: 99px;
  border: 2px dashed #64748B;
  display: grid;
  place-items: center;
  color: #E2E8F0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.av-solid-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.av-solid-dot {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 2.5px solid rgba(255,255,255,0.22);
  cursor: pointer;
  transition: transform 0.14s, border-color 0.14s;
}
.av-solid-dot:hover { transform: scale(1.1); }
.av-solid-dot.active {
  border-color: #10B981;
  box-shadow: 0 0 0 2px #059669;
  transform: scale(1.08);
}
.av-cat-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  border-radius: 11px;
  background: #1E293B;
  border: 1.5px solid #334155;
  font-size: 11.5px;
  font-weight: 800;
  color: #E2E8F0;
  white-space: nowrap;
}
.av-cat-btn.active {
  border-color: #10B981;
  background: #065F46;
  color: #FFFFFF;
}
.av-duo-tab.active {
  background: #10B981;
  color: #FFFFFF;
  border-color: #059669;
  box-shadow: 0 3px 0 #047857;
}
.av-expr-strip {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #1E293B;
}

/* Netflix-style Categorized Icon Gallery */
.av-netflix-gallery { display: flex; flex-direction: column; gap: 14px; max-height: 410px; overflow-y: auto; padding-right: 4px; }
.av-nf-cat { display: flex; flex-direction: column; gap: 8px; }
.av-nf-title { font-size: 12.5px; font-weight: 800; color: #E2E8F0; }
.av-nf-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.av-nf-item {
  flex: 0 0 auto; width: 88px; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 8px 6px; border-radius: 12px; background: #1E293B; border: 2px solid transparent;
  font-size: 11px; font-weight: 700; color: #CBD5E1; text-align: center; transition: transform .13s, border-color .13s;
}
.av-nf-item:hover { transform: scale(1.05); border-color: #64748B; color: #fff; }
.av-nf-item.active { border-color: #38BDF8; background: #0C4A6E; color: #fff; }
.av-nf-item span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Mode 3 Drag & Drop Photo Zone */
.av-dropzone {
  padding: 22px 16px; border-radius: 16px; border: 2.5px dashed #CBD5E1; background: var(--bg-soft);
  transition: border-color .15s, background .15s;
}
.av-dropzone.is-drag { border-color: var(--green); background: var(--green-50); }
@media (max-width: 640px) {
  .av-mode-bar { grid-template-columns: 1fr; }
  .av-theme-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .av-suits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Preferensi: matikan animasi peta gunung */
body.no-map-anim .node.current::before, body.no-map-anim .climber-in { animation: none !important; }
body.no-map-anim .climber { transition: none !important; }

/* Desktop defaults for mobile-specific UI helpers */
.mobile-top-left,
.room-mobile-tabs,
.mob-profile-quick,
.tutor-mobile-menu-btn,
.tutor-drawer-close,
.tutor-drawer-backdrop,
.tutor-drawer-mob-foot,
.tutor-mobile-wb-btn,
.tutor-workbench-backdrop,
.tutor-sheet-grab,
.tutor-sheet-head,
.av-sticky-preview-bar,
.av-head-close-left,
.av-head-save-mob {
  display: none;
}
.tutor-workbench-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.room-join-input {
  width: 225px;
}
.lb-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* App responsive */
@media (max-width: 1280px) {
  .split, .split-wide { grid-template-columns: minmax(0, 1fr) 320px; }
  .tutor-layout-3col { grid-template-columns: 220px minmax(0, 1fr) 310px; gap: 16px; }
  .hero { grid-template-columns: 1fr; }
  .hero-art { opacity: .35; }
}
@media (max-width: 1100px) {
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split, .split-wide, .tutor-layout-3col { grid-template-columns: 1fr; }
  .tutor-history-sidebar { height: auto; min-height: 0; max-height: 240px; }
}
@media (max-width: 1024px) {
  html, body, #app, #app-shell, .app, .main, #main-content {
    overflow-x: clip;
    max-width: 100%;
  }
  .sidebar,
  #sidebar {
    width: min(280px, 84vw) !important;
    max-width: 84vw;
    height: 100vh;
    height: 100dvh;
    z-index: 125;
    transform: translateX(-105%);
  }
  .sidebar.open,
  #sidebar.open {
    transform: translateX(0);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .45);
  }
  .sidebar .sb-toggle-btn {
    display: none !important;
  }
  .main,
  #main-content {
    margin-left: 0 !important;
    width: 100%;
  }
  .only-mobile { display: grid !important; }
  .hide-mobile { display: none !important; }
  .bottom-nav {
    display: flex;
    z-index: 90;
    height: calc(64px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .view { padding: 20px 14px calc(88px + env(safe-area-inset-bottom)); }
  .topbar-in { padding: 0 14px; height: 62px; }
  .toast-root { bottom: calc(82px + env(safe-area-inset-bottom)); right: 12px; left: 12px; align-items: stretch; }
}

@media (max-width: 768px) {
  /* 1. Global Mobile Layout: Slide-Over Drawer tetap dapat dibuka via #sidebarOpen + Bottom Nav 64px */
  html, body, #app, #app-shell, .app, .main, #main-content {
    overflow-x: clip;
    max-width: 100%;
  }
  #sidebar, #sidebarBackdrop, #sidebarOpen {
    box-sizing: border-box;
  }
  .card, .well, iframe, svg { max-width: 100%; }
  .card { min-width: 0; }
  .view {
    padding: 14px 12px calc(84px + env(safe-area-inset-bottom)) !important;
  }
  .bottom-nav {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    z-index: 90;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 2px solid var(--line);
    box-shadow: 0 -6px 24px rgba(15, 23, 42, .08);
  }
  .bottom-nav a {
    flex: 1 1 0%;
    min-width: 0;
    height: 50px;
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 10px;
    line-height: 1.1;
    white-space: nowrap;
  }
  .bottom-nav a span {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .bottom-nav a svg { width: 20px; height: 20px; }

  /* 2. Compact Mobile Header */
  .topbar { z-index: 65; }
  .topbar-in {
    height: 58px;
    padding: 0 12px;
    gap: 8px;
    justify-content: space-between;
  }
  .topbar-title,
  .topbar-title .crumb,
  #gradeSwitch,
  #topSettingsBtn {
    display: none !important;
  }
  .mobile-top-left {
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 1;
  }
  .mobile-top-brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
  }
  .mobile-top-logo {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    background: var(--green);
    border-bottom: 3px solid var(--green-d);
    color: #fff;
    flex-shrink: 0;
  }
  .mobile-top-logo svg { width: 19px; height: 19px; }
  .mobile-top-name {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 15px;
    color: var(--green-d);
    letter-spacing: -0.02em;
    display: none;
  }
  .mobile-grade-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 34px;
    border-radius: 11px;
    background: var(--cs);
    border: 2px solid var(--c);
    border-bottom-width: 3px;
    color: var(--ct);
    padding: 0 22px 0 10px;
    flex-shrink: 0;
  }
  .mobile-grade-pill select {
    appearance: none;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 12.5px !important;
    font-weight: 900;
    color: var(--ct);
    cursor: pointer;
    padding-right: 4px;
  }
  .mobile-grade-pill.mobile-grade-locked {
    padding: 0 10px;
    font-size: 12.5px;
    font-weight: 900;
    gap: 4px;
    white-space: nowrap;
  }
  .mobile-grade-caret {
    position: absolute;
    right: 8px;
    pointer-events: none;
    font-size: 11px;
    font-weight: 900;
  }
  #topStats {
    gap: 6px;
    flex-shrink: 0;
  }
  .stat-pill {
    padding: 5px 8px;
    font-size: 13px;
    border-radius: 10px;
    gap: 4px;
  }
  .stat-pill svg { width: 15px; height: 15px; }
  .stat-pill .unit { display: none; }
  #topAvatarBtn .avatar {
    width: 34px !important;
    height: 34px !important;
  }

  /* 4. EkoTutor AI Mobile Full-Screen ala Gemini Mobile */
  .tutor-ctx-banner { padding: 12px 14px; }
  .tutor-ctx-controls { width: 100%; }
  .tutor-ctx-select { max-width: 100% !important; width: 100%; }
  .tutor-layout-3col { grid-template-columns: 1fr; gap: 0; }
  .tutor-mobile-menu-btn,
  .tutor-drawer-close,
  .tutor-mobile-wb-btn {
    display: inline-flex !important;
  }
  .tutor-drawer-mob-foot {
    display: flex !important;
  }
  .tutor-desktop-mascot,
  .tutor-main-sub,
  .tutor-desktop-act {
    display: none !important;
  }
  .chat-head {
    padding: 10px 12px !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
  }
  .chat-head-left {
    gap: 8px !important;
    min-width: 0;
    flex: 1;
  }
  .tutor-head-title-wrap {
    flex: 1;
    min-width: 0;
    text-align: center;
  }
  .tutor-main-title {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tutor-mobile-menu-btn,
  .tutor-mobile-wb-btn {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 12px;
    flex-shrink: 0;
  }
  .chat-chips {
    padding: 8px 10px !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .chat-chips::-webkit-scrollbar { display: none; }
  .tutor-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    z-index: 94;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  .tutor-drawer-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .tutor-history-sidebar {
    position: fixed !important;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(300px, 84vw);
    max-height: 100dvh !important;
    height: 100dvh !important;
    border-radius: 0 20px 20px 0;
    z-index: 96;
    transform: translateX(-106%);
    transition: transform .25s cubic-bezier(.22, 1, .36, 1);
    box-shadow: 12px 0 36px rgba(15, 23, 42, .24);
  }
  .tutor-history-sidebar.open { transform: translateX(0); }
  .tutor-workbench-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    z-index: 94;
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
  }
  .tutor-workbench-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }
  .tutor-workbench-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 86dvh;
    z-index: 95;
    background: #F8FAFC;
    border-top: 2px solid var(--line);
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -16px 40px rgba(15, 23, 42, .22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(105%);
    transition: transform .28s cubic-bezier(.22, 1, .36, 1);
  }
  .tutor-workbench-sheet.open {
    transform: translateY(0);
  }
  .tutor-sheet-grab {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
    background: #fff;
    flex-shrink: 0;
  }
  .tutor-sheet-grab span {
    width: 42px;
    height: 5px;
    border-radius: 99px;
    background: #CBD5E1;
  }
  .tutor-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 12px;
    background: #fff;
    border-bottom: 2px solid var(--line);
    flex-shrink: 0;
  }
  .tutor-workbench-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 12px calc(24px + env(safe-area-inset-bottom));
    gap: 14px;
  }
  .chat {
    height: calc(100dvh - 148px);
    min-height: 410px;
    max-height: calc(100dvh - 134px);
  }
  .chat-stream, .messages-container { padding: 14px 12px; gap: 12px; }
  .tutor-empty-chips-grid .chip { white-space: normal; text-align: left; }
  .msg { max-width: 96%; gap: 8px; }
  .bubble { padding: 11px 14px; font-size: 15px; line-height: 1.55; }
  .chat-input { padding: 10px 10px; gap: 8px; }
  .chat-input .input { font-size: 16px !important; min-height: 44px; padding: 8px 12px; }

  /* 5. Dashboard, Learning, Mountain, Study Room, & Leaderboard Mobile */
  .cols-2, .cols-3, .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px; }
  .cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .span-2 { grid-column: auto; }
  .hero { grid-template-columns: 1fr; padding: 18px 16px; gap: 16px; }
  .hero .btn-lg { width: 100%; }
  .hero-art { opacity: .2; width: 220px; }
  .hero-goal { padding: 14px; gap: 12px; flex-wrap: wrap; }
  .stat-card { padding: 13px 12px; }
  .stat-card .stat-label { font-size: 11.5px; }
  .stat-card .stat-value { font-size: 22px; }
  .week-dots { gap: 3px; justify-content: space-between; }
  .week-dots span { width: 19px; height: 19px; font-size: 9.5px; }

  .trail-tabs { grid-template-columns: 1fr; }
  .unit-banner { flex-direction: column; align-items: stretch; padding: 16px; gap: 12px; }
  .unit-banner .btn-lg { width: 100%; }
  .search { min-width: 0 !important; width: 100%; }
  .node-btn { width: 58px; height: 54px; }
  .node-btn svg { width: 24px; height: 24px; }
  .node.current::before { width: 80px; height: 80px; margin: -40px 0 0 -40px; top: 30px; }
  .node.summit .node-btn { width: 72px; height: 66px; }
  .node.summit.current::before { width: 96px; height: 96px; margin: -48px 0 0 -48px; top: 36px; }
  .node-label { font-size: 10.5px; padding: 3px 8px; max-width: 128px; white-space: normal; }
  .climber-in { top: -110px; }

  /* Study Room Mobile */
  .room-lobby-controls {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .room-join-form {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .room-join-input,
  .room-join-btn,
  .room-lobby-btn-row {
    width: 100%;
  }
  .w-full-mob {
    width: 100%;
  }
  .w-full-mob .btn {
    flex: 1 1 100%;
  }
  .room-mobile-tabs {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 6px;
    background: #fff;
    border: 2px solid var(--line);
    border-radius: 16px;
    position: sticky;
    top: 64px;
    z-index: 25;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .06);
  }
  .room-mtab {
    padding: 8px 4px;
    min-height: 40px;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 2px solid transparent;
  }
  .room-mtab.active {
    background: var(--cs);
    border-color: var(--c);
    color: var(--ct);
  }
  .room-active-shell [data-room-panel] {
    display: none;
  }
  .room-active-shell[data-active-rtab="quiz"] [data-room-panel="quiz"],
  .room-active-shell[data-active-rtab="chat"] [data-room-panel="chat"],
  .room-active-shell[data-active-rtab="timer"] [data-room-panel="timer"],
  .room-active-shell[data-active-rtab="materi"] [data-room-panel="materi"] {
    display: block;
  }
  .room-chat { height: 320px; padding: 12px; }

  /* Leaderboard & Profile Quick Mobile */
  .mob-profile-quick {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }
  .league {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 16px;
    gap: 12px;
  }
  .league .btn-lg { width: 100%; }
  .league-tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .lb-table th, .lb-table td { padding: 10px 8px; font-size: 12.5px; }
  .podium-step.p1 { height: 100px; } .podium-step.p2 { height: 76px; } .podium-step.p3 { height: 60px; }

  /* 6. Avatar Studio Full-Screen Mobile Modal (Duolingo x Netflix Sticky Preview) */
  .av-modal-head {
    padding: 12px 14px !important;
    background: #0F172A;
    color: #fff;
    border-bottom-color: #1E293B !important;
    flex-shrink: 0;
    gap: 10px;
  }
  .av-head-close-left {
    display: grid !important;
    width: 38px;
    height: 38px;
    background: #1E293B;
    border-color: #334155;
    color: #fff;
    flex-shrink: 0;
  }
  .av-head-desk-ico,
  .av-head-desk-sub,
  .av-head-close-right,
  .av-studio-wrap.av-is-modal .av-studio-footer-bar,
  .av-mode-lbl-desk {
    display: none !important;
  }
  .av-head-title-block h3 {
    color: #fff !important;
    text-align: center;
    font-size: 15.5px;
  }
  .av-head-save-mob {
    display: inline-flex !important;
    min-height: 36px;
    padding: 6px 14px;
    font-size: 12.5px;
    letter-spacing: .04em;
    flex-shrink: 0;
  }
  .av-modal-body {
    padding: 0 !important;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .av-studio-wrap.av-is-modal {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
  }
  .av-studio-wrap.av-is-modal > * + * {
    margin-top: 0 !important;
  }
  .av-studio-wrap.av-is-modal .av-sticky-preview-bar {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: radial-gradient(circle at 25% 50%, #1E293B 0%, #0B1220 100%);
    border-bottom: 1.5px solid #1E293B;
    color: #F8FAFC;
    flex-shrink: 0;
    z-index: 5;
  }
  .av-studio-wrap.av-is-modal .av-sticky-preview-bar .c-ink {
    color: #F8FAFC !important;
  }
  .av-studio-wrap.av-is-modal .av-sticky-preview-bar .c-muted {
    color: #94A3B8 !important;
  }
  .av-sticky-ring,
  .av-sticky-preview-ring {
    padding: 3px;
    border-radius: 999px;
    background: linear-gradient(135deg, #10B981, #38BDF8);
    display: inline-flex;
    flex-shrink: 0;
  }
  .av-studio-wrap.av-is-modal .av-builder-stage {
    display: none;
  }
  .av-studio-wrap.av-is-modal .av-mode-bar,
  .av-studio-wrap.av-is-modal .av-mode-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-radius: 0;
    border-bottom: 1.5px solid var(--line, #E2E8F0);
    padding: 8px 10px;
    gap: 6px;
    flex-shrink: 0;
    background: var(--surface, #FFFFFF);
  }
  .av-studio-wrap.av-is-modal .av-mode-tabs::-webkit-scrollbar {
    display: none;
  }
  .av-studio-wrap.av-is-modal .av-mode-btn,
  .av-studio-wrap.av-is-modal .av-mode-tab {
    flex: 0 0 auto;
    min-width: auto;
    padding: 7px 11px;
    font-size: 12px;
    min-height: 36px;
    white-space: nowrap;
  }
  .av-studio-wrap.av-is-modal .av-studio-scroll-area,
  .av-studio-wrap.av-is-modal .av-studio-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 12px 12px calc(28px + env(safe-area-inset-bottom));
    background: var(--bg-soft, #F8FAFC);
  }
  .av-studio-wrap.av-is-modal .av-netflix-gallery {
    max-height: none;
    overflow-y: visible;
  }
}

.mobile-grade-compact,
.learn-tab-lbl-mob {
  display: none;
}
.learn-search-box {
  min-width: 240px;
}

@media (min-width: 560px) and (max-width: 768px) {
  .topbar-title {
    display: block !important;
    min-width: 0;
    flex: 1 1 auto;
  }
  .topbar-title h1 {
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-top-name {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .cols-4 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .mtn-passport-hero-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .league-tiers {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
  }
  .league-pill {
    padding: 10px 8px;
    min-width: 0;
  }
  .topbar-in {
    padding: 0 10px;
    gap: 6px;
  }
  .mobile-top-left {
    gap: 6px;
    flex-shrink: 0;
  }
  .mobile-top-brand {
    flex-shrink: 0;
  }
  .mobile-top-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .mobile-top-logo svg {
    width: 18px;
    height: 18px;
  }
  /* Sembunyikan teks EkoPuncak pada layar <= 640px agar tidak terpotong setengah */
  .mobile-top-name {
    display: none !important;
  }
  .mobile-grade-full {
    display: none !important;
  }
  .mobile-grade-compact {
    display: inline !important;
  }
  .mobile-grade-pill.mobile-grade-locked {
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
    gap: 4px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  #sidebarOpen {
    width: 34px;
    height: 34px;
    padding: 0;
    flex-shrink: 0;
  }
  #topStats {
    gap: 5px;
    flex-shrink: 0;
  }
  .stat-pill {
    padding: 4px 7px;
    font-size: 12px;
    gap: 3px;
    border-radius: 9px;
  }
  .stat-pill svg {
    width: 14px;
    height: 14px;
  }
  #topNotifBtn {
    width: 34px;
    height: 34px;
    padding: 0;
    flex-shrink: 0;
  }
  #topAvatarBtn .avatar {
    width: 32px !important;
    height: 32px !important;
  }
  .bottom-nav {
    gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    font-size: 10.5px;
    gap: 3px;
    padding: 4px;
  }

  /* 4. Bar Tab "Belajar & Materi" Mobile (<= 640px): Segmented Control 2 Kolom Penuh */
  .learn-top-bar {
    padding: 10px !important;
    gap: 8px !important;
  }
  .learn-main-tabs {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    width: 100%;
    padding: 4px;
    background: var(--bg-soft, #F1F5F9);
    border-radius: 14px;
    border: 1.5px solid var(--line, #E2E8F0);
    overflow: visible !important;
  }
  .learn-main-tabs button {
    width: 100%;
    min-width: 0;
    justify-content: center;
    align-items: center;
    padding: 9px 8px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    border-bottom-width: 1.5px;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    gap: 6px;
    background: transparent;
  }
  .learn-main-tabs button.active {
    background: var(--bg-card, #FFFFFF);
    border-color: var(--c, #0EA5E9);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  }
  .learn-main-tabs button svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
  }
  .learn-tab-lbl-desk {
    display: none !important;
  }
  .learn-tab-lbl-mob {
    display: inline !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .learn-top-badges {
    width: 100%;
    justify-content: flex-start;
  }
  .learn-filter-bar {
    flex-direction: column;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .learn-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }
  .learn-filter-chips .btn {
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  .learn-search-box {
    width: 100% !important;
    min-width: 0 !important;
  }
  .learn-search-box .input {
    width: 100%;
  }
  /* Bank Soal HOTS dropdown responsive width on mobile */
  .qb-filter-box {
    width: 100%;
    min-width: 0 !important;
  }
}

@media (max-width: 480px) {
  .topbar-in {
    padding: 0 8px;
    gap: 5px;
  }
  .mobile-top-left {
    gap: 5px;
  }
  #topStats {
    gap: 4px;
  }
  .stat-pill {
    padding: 4px 6px;
    font-size: 11.5px;
    gap: 3px;
  }
  .av-theme-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .av-studio-card .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
}

@media (max-width: 390px) {
  .hide-xs-lbl {
    display: none;
  }
}

/* BANK SOAL HOTS (#question-bank) — White-Label EkoPuncak Theme */
.qb-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.qb-topbar-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 20px;
  flex-wrap: wrap;
  padding: 20px 22px;
  position: relative;
  z-index: 1;
  margin-top: 0;
}

.qb-hero-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 8px;
  min-width: 0;
}

.qb-page-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.25;
  overflow-wrap: break-word;
}

.qb-filter-box {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 240px;
  flex: 0 1 320px;
  max-width: 100%;
}

.qb-select {
  min-height: 44px;
  font-weight: 800;
  color: var(--text-primary, var(--ink));
  background: var(--bg-card, #FFFFFF);
}

/* 3 Kartu Ringkas Quick Hub */
.qb-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.qb-hub-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  background: var(--bg-card, #FFFFFF);
  border: 2px solid var(--border-color, var(--line));
  border-bottom: 4px solid var(--line-strong);
  border-radius: 18px;
  padding: 15px 16px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background-color .15s ease;
}

.qb-hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--c);
}

.qb-hub-card.is-active {
  background: var(--gold-s, #FEF3C7);
  border-color: var(--gold);
  border-bottom-color: var(--gold-d);
}

.qb-hub-ico {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--cs);
  color: var(--ct);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.qb-hub-copy {
  min-width: 0;
  flex: 1 1 0%;
}

.qb-hub-copy strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--text-primary, var(--ink));
}

.qb-hub-copy small {
  display: block;
  font-size: 0.77rem;
  font-weight: 600;
  color: var(--text-secondary, var(--muted));
  margin-top: 3px;
  line-height: 1.38;
}

/* Tryout inline picker */
.qb-tryout-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.qb-try-pick {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
  background: var(--bg-elevated, #F8FAFC);
  border: 2px solid var(--border-color, var(--line));
  border-radius: 14px;
  padding: 11px 12px;
  cursor: pointer;
}

.qb-try-pick:hover {
  border-color: var(--indigo);
  background: var(--indigo-s, #EEF2FF);
}

.qb-try-pick b {
  font-size: 0.75rem;
  font-weight: 900;
  color: var(--indigo-d);
}

.qb-try-pick span {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary, var(--ink));
  line-height: 1.3;
}

/* Accordion 3 Tingkat */
.qb-accordion-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.qb-pkg-card {
  background: var(--bg-card, #FFFFFF);
  border: 2px solid var(--border-color, var(--line));
  border-bottom: 4px solid var(--line-strong);
  border-radius: 20px;
  overflow: hidden;
}

.qb-pkg-card.is-open.tone-sky { border-color: var(--sky); }
.qb-pkg-card.is-open.tone-indigo { border-color: var(--indigo); }
.qb-pkg-card.is-open.tone-emerald { border-color: var(--green); }
.qb-pkg-card.is-open.tone-amber { border-color: var(--gold); }

.qb-pkg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  cursor: pointer;
  background: var(--bg-card, #FFFFFF);
  color: var(--text-primary, var(--ink));
}

.qb-pkg-head:hover {
  background: var(--bg-elevated, #F8FAFC);
}

.qb-pkg-main {
  flex: 1;
  min-width: 0;
}

.qb-pkg-badges {
  display: flex;
  align-items: center;
  gap: 7px 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  min-width: 0;
}

.qb-code-pill {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 99px;
  letter-spacing: 0.03em;
}
.qb-code-pill.tone-sky { background: var(--sky-s); color: var(--sky-t); }
.qb-code-pill.tone-indigo { background: var(--indigo-s); color: var(--indigo-t); }
.qb-code-pill.tone-emerald { background: var(--green-s); color: var(--green-t); }
.qb-code-pill.tone-amber { background: var(--gold-s); color: var(--gold-t); }

.qb-total-pill {
  font-size: 0.72rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--bg-elevated, #F1F5F9);
  color: var(--text-secondary, var(--ink-2));
}

.qb-prog-pill {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--orange-s, #FFF7ED);
  color: var(--orange-t);
  border: 1.5px solid var(--orange, #FED7AA);
}

.qb-prog-pill.is-done {
  background: var(--green-50);
  color: var(--green-t);
  border-color: var(--green, #A7F3D0);
}

.qb-pkg-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 900;
  color: var(--text-primary, var(--ink));
  line-height: 1.3;
}

.qb-pkg-sub {
  margin: 4px 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, var(--muted));
}

.qb-pkg-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  max-width: 420px;
}

.qb-pkg-bar-wrap .prog {
  flex: 1;
}

.qb-pkg-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.qb-chevron {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg-elevated, #F1F5F9);
  display: grid;
  place-items: center;
  color: var(--text-secondary, var(--muted));
  transition: transform .2s ease;
}

.qb-pkg-card.is-open .qb-chevron {
  transform: rotate(180deg);
}

.qb-pkg-body {
  border-top: 2px solid var(--border-color, var(--line));
  background: var(--bg-elevated, #F8FAFC);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Tingkat 2: Bab */
.qb-chap-card {
  background: var(--bg-card, #FFFFFF);
  border: 1.5px solid var(--border-color, var(--line));
  border-radius: 16px;
  overflow: hidden;
}

.qb-chap-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card, #FFFFFF);
  color: var(--text-primary, var(--ink));
  border: none;
  text-align: left;
  cursor: pointer;
}

.qb-chap-head:hover {
  background: var(--bg-elevated, #F8FAFC);
}

.qb-chap-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.qb-chap-code {
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--indigo);
  letter-spacing: 0.04em;
}

.qb-chap-title {
  font-size: 0.94rem;
  font-weight: 900;
  color: var(--text-primary, var(--ink));
  line-height: 1.3;
}

.qb-chap-meta {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary, var(--muted));
}

.qb-chap-chevron {
  color: var(--text-secondary, var(--muted));
  transition: transform .2s ease;
  flex-shrink: 0;
}

.qb-chap-card.is-open .qb-chap-chevron {
  transform: rotate(180deg);
}

/* Tingkat 3: Sub-Bab Ber-Kode */
.qb-sub-list {
  border-top: 1.5px solid var(--border-color, var(--line));
  display: flex;
  flex-direction: column;
}

.qb-sub-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: none;
  border-bottom: 1px solid var(--border-color, #F1F5F9);
  background: var(--bg-card, #FFFFFF);
  color: var(--text-primary, var(--ink));
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}

.qb-sub-row:last-child {
  border-bottom: none;
}

.qb-sub-row:hover {
  background: var(--green-50, #ECFDF5);
}

.qb-sub-left {
  flex: 1;
  min-width: 0;
}

.qb-sub-title {
  font-size: 0.87rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.35;
}

.qb-sub-code {
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--indigo-d);
}

.qb-sub-progress {
  margin-top: 5px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qb-cnt-num {
  font-weight: 900;
}

.qb-cnt-num.is-pending {
  color: var(--orange-d);
}

.qb-cnt-num.is-done {
  color: var(--green-d);
}

.qb-flag-mini {
  background: #FEF3C7;
  color: #B45309;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 0.68rem;
  font-weight: 800;
}

.qb-sub-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 7px 10px;
  border-radius: 12px;
  background: #F1F5F9;
  flex-shrink: 0;
}

.qb-count-big {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}

.qb-count-lbl {
  font-size: 0.62rem;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-top: 2px;
}

/* Workspace Pengerjaan Soal */
.qb-ws-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 18px;
}

.qb-mode-switch {
  display: inline-flex;
  background: #F1F5F9;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

.qb-mode-switch button {
  border: none;
  background: transparent;
  padding: 6px 11px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}

.qb-mode-switch button.active {
  background: #FFFFFF;
  color: var(--indigo-d);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
}

.qb-timer-pill {
  padding: 7px 12px;
  border-radius: 12px;
  background: #FEF3C7;
  border: 1.5px solid #FCD34D;
  color: #B45309;
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 900;
}

.qb-ws-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 16px;
  align-items: start;
}

.qb-stem {
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.65;
  margin-bottom: 16px;
}

.qb-options-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.qb-opt-btn {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  width: 100%;
  background: #FFFFFF;
  border: 2px solid var(--line);
  border-bottom-width: 4px;
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background-color .15s ease;
}

.qb-opt-btn:hover:not(:disabled) {
  background: #F8FAFC;
  border-color: var(--indigo);
}

.qb-opt-btn.is-selected {
  background: #EEF2FF;
  border-color: var(--indigo);
}

.qb-opt-btn.is-right {
  background: #ECFDF5;
  border-color: var(--green);
}

.qb-opt-btn.is-wrong {
  background: #FEF2F2;
  border-color: var(--orange);
}

.qb-opt-letter {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: #F1F5F9;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.82rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.qb-opt-btn.is-selected .qb-opt-letter { background: var(--indigo); color: #FFFFFF; }
.qb-opt-btn.is-right .qb-opt-letter { background: var(--green); color: #FFFFFF; }
.qb-opt-btn.is-wrong .qb-opt-letter { background: var(--orange); color: #FFFFFF; }

.qb-opt-text {
  font-size: 0.89rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
  padding-top: 2px;
}

.qb-solution-box {
  margin-top: 16px;
  border-radius: 16px;
  border: 2px solid var(--green);
  background: #F0FDF4;
  padding: 15px 16px;
}

.qb-solution-box.is-err {
  border-color: var(--orange);
  background: #FFF7ED;
}

.qb-sol-head {
  font-size: 0.92rem;
  color: var(--ink);
  margin-bottom: 8px;
}

.qb-formula-hint {
  background: rgba(255, 255, 255, .85);
  border-radius: 10px;
  padding: 8px 11px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--indigo-t);
  margin-bottom: 9px;
}

.qb-sol-body {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.58;
}

.qb-sol-footer {
  margin-top: 12px;
}

.qb-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1.5px solid var(--line);
}

/* Number Grid 1..N */
.qb-num-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.qb-num-btn {
  position: relative;
  height: 38px;
  border-radius: 10px;
  border: 2px solid var(--line);
  background: #F8FAFC;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 900;
  color: var(--ink-2);
  cursor: pointer;
}

.qb-num-btn.is-correct { background: #D1FAE5; border-color: var(--green); color: #065F46; }
.qb-num-btn.is-wrong { background: #FEE2E2; border-color: var(--red); color: #991B1B; }
.qb-num-btn.is-flagged { background: #FEF3C7; border-color: var(--gold); color: #92400E; }
.qb-num-btn.is-answered-exam { background: #E0E7FF; border-color: var(--indigo); color: #3730A3; }
.qb-num-btn.is-current { outline: 3px solid var(--indigo); outline-offset: 1px; }

.qb-num-flag {
  position: absolute;
  top: -5px;
  right: -4px;
  font-style: normal;
  font-size: 10px;
}

.qb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.qb-legend .dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  margin-right: 4px;
}
.qb-legend .dot.ok { background: var(--green); }
.qb-legend .dot.err { background: var(--red); }
.qb-legend .dot.flag { background: var(--gold); }
.qb-legend .dot.idle { background: #CBD5E1; }

.qb-loading-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #FFFFFF;
  border: 2px solid var(--indigo-s);
  border-radius: 18px;
  padding: 24px 20px;
}

.qb-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--indigo-s);
  border-top-color: var(--indigo);
  animation: qbSpin .8s linear infinite;
  flex-shrink: 0;
}

@keyframes qbSpin {
  to { transform: rotate(360deg); }
}

.qb-irt-badge {
  background: linear-gradient(135deg, #4F46E5, #059669);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 16px;
  text-align: center;
}

.qb-irt-badge span {
  display: block;
  font-size: 0.64rem;
  font-weight: 800;
  opacity: .9;
}

.qb-irt-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.1;
}

.qb-report-item, .qb-weak-item, .qb-wrong-row {
  padding: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #F8FAFC;
}

.qb-wrong-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.qb-exp-box {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
}

@media (max-width: 960px) {
  .qb-hub-grid,
  .qb-tryout-grid,
  .qb-ws-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .bottom-nav a {
    font-size: 9.5px;
    padding: 4px 1px;
  }
  .qb-filter-box {
    width: 100%;
    min-width: 0;
  }
  .qb-pkg-head {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
  }
  .qb-pkg-actions {
    justify-content: space-between;
  }
  .qb-num-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}


/* Ekspansi Masif: Video 3 Kategori, Pembaca PDF A4 & Badge Kesulitan HOTS */
.badge-rose {
  background: #FFE4E6;
  color: #BE123C;
  border: 1px solid #FDA4AF;
}

.video-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.vid-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 11px 13px;
  border-radius: 14px;
  border: 2px solid var(--line);
  background: #FFFFFF;
  cursor: pointer;
  transition: transform .12s ease, border-color .15s ease, background-color .15s ease;
}

.vid-choice:hover {
  border-color: var(--c, #0EA5E9);
  background: #F8FAFC;
}

.vid-choice.active {
  border-color: var(--c, #0EA5E9);
  background: var(--cs, #E0F2FE);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08);
}

/* Pembaca PDF Dalam Aplikasi (A4 Sheet Magazine Layout) */
.pdf-stage {
  background: #E2E8F0;
  padding: 20px;
  max-height: 68vh;
  overflow-y: auto;
}

.pdf-sheet {
  max-width: 720px;
  margin: 0 auto;
  background: #FFFFFF;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16);
  border: 1px solid #CBD5E1;
}

.pdf-sheet-head {
  padding: 22px 26px;
  color: #FFFFFF;
}

.pdf-sheet-kicker {
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: .92;
  text-transform: uppercase;
}

.pdf-sheet-title {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.38em;
  font-weight: 900;
  line-height: 1.25;
  color: #FFFFFF;
}

.pdf-sheet-sub {
  margin: 6px 0 0;
  font-size: 0.88em;
  font-weight: 600;
  opacity: .94;
}

.pdf-sheet-body {
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #1E293B;
}

.pdf-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #F1F5F9;
  font-size: 0.78em;
  font-weight: 800;
  color: #334155;
}

.pdf-subhead {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.05em;
  font-weight: 900;
  color: #0F172A;
  padding-bottom: 5px;
  border-bottom: 2px solid #E2E8F0;
}

.pdf-para {
  margin: 0;
  font-size: 0.92em;
  line-height: 1.65;
  color: #1E293B;
}

.pdf-bullet {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 0.9em;
  line-height: 1.55;
}

.pdf-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c, #10B981);
  margin-top: 7px;
  flex-shrink: 0;
}

.pdf-formula-box {
  background: #EEF2FF;
  border-left: 4px solid #6366F1;
  border-radius: 10px;
  padding: 12px 14px;
}

.pdf-formula-name {
  font-size: 0.75em;
  font-weight: 900;
  color: #4338CA;
  text-transform: uppercase;
}

.pdf-formula-code {
  display: block;
  margin-top: 4px;
  font-size: 0.96em;
  font-weight: 800;
  color: #0F172A;
}

.pdf-formula-note {
  margin-top: 4px;
  font-size: 0.78em;
  color: #475569;
}

.pdf-case-box {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9em;
  line-height: 1.55;
  color: #78350F;
}

.pdf-q-box {
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 14px;
}

.pdf-q-stem {
  font-size: 0.92em;
  line-height: 1.55;
  color: #0F172A;
}

.pdf-q-opts {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.86em;
  color: #334155;
  padding-left: 14px;
}

.pdf-ans-box {
  background: #ECFDF5;
  border: 1.5px solid #A7F3D0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88em;
  font-weight: 800;
  color: #065F46;
}

.pdf-sheet-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 26px;
  background: #F8FAFC;
  border-top: 1.5px solid #E2E8F0;
  font-size: 0.74em;
  font-weight: 700;
  color: #64748B;
}

@media (max-width: 768px) {
  .pdf-stage {
    padding: 10px;
  }
  .pdf-sheet-head,
  .pdf-sheet-body,
  .pdf-sheet-foot {
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* Bank Soal HOTS: Tombol Selesai 3D, Sidebar Finish & Halaman Hasil / Review */
.qb-sub-right-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.qb-sub-res-btn {
  white-space: nowrap;
  font-weight: 800;
  border-color: #CBD5E1;
}

.qb-score-mini {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 900;
}
.qb-score-mini.is-high { background: #D1FAE5; color: #065F46; }
.qb-score-mini.is-mid { background: #FEF3C7; color: #92400E; }
.qb-score-mini.is-low { background: #FFE4E6; color: #BE123C; }

.qb-retry-banner {
  background: #FEF3C7;
  border: 1.5px solid #FCD34D;
  color: #92400E;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
}

.qb-btn-finish-3d {
  background: linear-gradient(135deg, #10B981, #059669);
  border-color: #047857;
  box-shadow: 0 4px 0 #047857, 0 8px 18px rgba(16, 185, 129, 0.24);
  color: #FFFFFF;
  font-weight: 900;
}
.qb-btn-finish-3d:hover:not(:disabled) {
  filter: brightness(1.04);
  transform: translateY(-1px);
}
.qb-btn-finish-3d:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: 0 2px 0 #047857;
}

.qb-finish-sidebar-btn {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Result & Review Screen */
.qb-result-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.qb-result-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px;
  border-width: 2px;
}
.qb-result-hero.tone-emerald { border-color: #6EE7B7; background: linear-gradient(135deg, #FFFFFF 0%, #ECFDF5 100%); }
.qb-result-hero.tone-amber { border-color: #FCD34D; background: linear-gradient(135deg, #FFFFFF 0%, #FFFBEB 100%); }
.qb-result-hero.tone-rose { border-color: #FDA4AF; background: linear-gradient(135deg, #FFFFFF 0%, #FFF1F2 100%); }

.qb-result-hero-left { flex-shrink: 0; }
.qb-result-hero-mid { flex: 1; min-width: 0; }

@keyframes qbRingSpring {
  0% { transform: scale(0.72); opacity: 0.25; }
  65% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.qb-score-ring-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: qbRingSpring 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.qb-score-ring-svg {
  transform: rotate(-90deg);
}

.qb-ring-track {
  fill: none;
  stroke: #E2E8F0;
  stroke-width: 11;
}

.qb-ring-fill {
  fill: none;
  stroke-width: 11;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.qb-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.qb-ring-pct {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}

.qb-ring-lbl {
  font-size: 0.62rem;
  font-weight: 900;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

.qb-pred-badge {
  font-size: 0.78rem;
  font-weight: 900;
  padding: 5px 11px;
}

/* 4 Stat Cards */
.qb-stat-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.qb-stat-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid var(--line);
  background: #FFFFFF;
}
.qb-stat-card.is-green { border-color: #A7F3D0; background: #ECFDF5; }
.qb-stat-card.is-red { border-color: #FECDD3; background: #FFF1F2; }
.qb-stat-card.is-gray { border-color: #CBD5E1; background: #F8FAFC; }
.qb-stat-card.is-amber { border-color: #FDE68A; background: #FFFBEB; }

.qb-stat-k { font-size: 0.75rem; font-weight: 800; color: var(--ink-2); }
.qb-stat-v {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--ink);
  line-height: 1.15;
}
.qb-stat-card.is-green .qb-stat-v { color: #047857; }
.qb-stat-card.is-red .qb-stat-v { color: #BE123C; }
.qb-stat-card.is-amber .qb-stat-v { color: #B45309; }
.qb-stat-sub { font-size: 0.7rem; font-weight: 700; color: var(--muted); }

/* Review List & Filter Tabs */
.qb-rev-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: #F1F5F9;
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 4px;
}

.qb-rev-tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
}
.qb-rev-tab.is-active {
  background: #FFFFFF;
  color: var(--indigo-d);
  box-shadow: 0 2px 6px rgba(15, 23, 42, .08);
}
.qb-rev-tab.is-err.is-active { color: #BE123C; }
.qb-rev-tab.is-ok.is-active { color: #047857; }

.qb-rev-item {
  border-radius: 16px;
  border: 1.5px solid var(--line);
  background: #F8FAFC;
  padding: 14px;
}
.qb-rev-item.is-ok { border-color: #A7F3D0; background: #F0FDF4; }
.qb-rev-item.is-err { border-color: #FECDD3; background: #FFF1F2; }
.qb-rev-item.is-blank { border-color: #CBD5E1; background: #F8FAFC; }

.qb-rev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.qb-rev-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--ink);
}

.qb-rev-ans-pair {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.qb-ans-chip {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 99px;
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--ink-2);
}
.qb-ans-chip.is-ok { border-color: #6EE7B7; color: #065F46; background: #ECFDF5; }
.qb-ans-chip.is-err { border-color: #FDA4AF; color: #BE123C; background: #FFE4E6; }
.qb-ans-chip.is-blank { border-color: #CBD5E1; color: #475569; background: #F1F5F9; }
.qb-ans-chip.is-key { border-color: #6EE7B7; color: #065F46; background: #D1FAE5; }

.qb-rev-snippet {
  margin: 9px 0 0;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-2);
  line-height: 1.55;
}

.qb-rev-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.qb-rev-exp-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #FFFFFF;
  border: 1.5px solid var(--line);
}

.qb-rev-key-full {
  padding: 8px 10px;
  border-radius: 9px;
  background: #ECFDF5;
  color: #065F46;
  font-size: 0.78rem;
  font-weight: 700;
}

.qb-result-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 960px) {
  .qb-stat-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .qb-result-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px;
  }
  .qb-result-hero .flex {
    justify-content: center;
  }
  .qb-result-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .qb-result-footer-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .qb-sub-right-wrap {
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
  }
}


/* Naik Gunung — Peta Ekspedisi 10 Level, Peta Pos Atmosferik & Baris Sumber */
.mtn-exp-hero {
  position: relative;
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #064E3B 0%, #0F172A 62%, #1E293B 100%);
  color: #F8FAFC;
  border: 2px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.mtn-exp-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.mtn-exp-stat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.mtn-exp-stat img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}
.mtn-exp-stat-val {
  font-size: 18px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.15;
}
.mtn-exp-stat-lbl {
  font-size: 11px;
  font-weight: 700;
  color: #A7F3D0;
}
.mtn-exp-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.mtn-exp-filter-btn {
  padding: 7px 14px;
  border-radius: 99px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  color: #E2E8F0;
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}
.mtn-exp-filter-btn.active {
  background: #10B981;
  border-color: #34D399;
  color: #022C22;
}
.mtn-level-sec {
  margin-top: 22px;
}
.mtn-level-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 16px;
  border-radius: 18px;
  background: var(--card, #FFFFFF);
  border: 2px solid var(--line, #E2E8F0);
}
.mtn-level-head.is-secret {
  background: linear-gradient(135deg, #1E1B4B 0%, #4C0519 100%);
  border-color: rgba(244, 63, 94, 0.55);
  color: #FFF1F2;
}
.mtn-level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 900;
  color: #FFFFFF;
}
.mtn-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.mtn-card-grid.single-col {
  grid-template-columns: minmax(0, 380px);
}
.mtn-card {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #0F172A;
  border: 2px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  text-align: left;
  padding: 0;
}
.mtn-card:hover:not(.locked) {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(16, 185, 129, 0.24);
  border-color: #10B981;
}
.mtn-card.conquered {
  border-color: #10B981;
}
.mtn-card.locked {
  cursor: not-allowed;
}
.mtn-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
  transition: transform 0.3s ease;
}
.mtn-card:hover:not(.locked) .mtn-card-bg {
  transform: scale(1.03);
}
.mtn-card-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.42) 0%, rgba(15, 23, 42, 0.12) 38%, rgba(15, 23, 42, 0.88) 76%, rgba(15, 23, 42, 0.96) 100%);
}
.mtn-card-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px 0;
}
.mtn-elev-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 99px;
  background: rgba(15, 23, 42, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 900;
  backdrop-filter: blur(4px);
}
.mtn-diff-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 900;
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.mtn-card-bot {
  position: relative;
  z-index: 2;
  padding: 14px 16px 16px;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mtn-card-name {
  font-size: 18px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.2;
  margin: 0;
}
.mtn-card-country {
  font-size: 12px;
  font-weight: 700;
  color: #CBD5E1;
}
.mtn-card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}
.mtn-card-prog-track {
  width: 100%;
  height: 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  overflow: hidden;
}
.mtn-card-prog-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #10B981, #34D399);
}
.mtn-stars-row {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mtn-stars-img {
  height: 22px;
  width: auto;
  object-fit: contain;
}
.mtn-star-dot {
  font-size: 15px;
  line-height: 1;
}
.mtn-star-dot.earned { color: #FBBF24; }
.mtn-star-dot.empty { color: rgba(255, 255, 255, 0.28); }
.mtn-card-reward-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 800;
  color: #FDE68A;
}
.mtn-card-reward-chip img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}
.mtn-card-lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(2.5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  gap: 10px;
}
.mtn-card-lock-overlay img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.45));
}
.mtn-card-lock-txt {
  font-size: 12.5px;
  font-weight: 800;
  color: #E0F2FE;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(125, 211, 252, 0.35);
  padding: 6px 12px;
  border-radius: 12px;
  max-width: 240px;
  line-height: 1.4;
}

/* Inside-Mountain Atmospheric Pos Trail */
.mtn-inside-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 20px;
  background: var(--card, #FFFFFF);
  border: 2px solid var(--line, #E2E8F0);
  margin-bottom: 16px;
}
.mtn-inside-stage {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 2px solid rgba(16, 185, 129, 0.4);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.26);
  background: #0F172A;
}
.mtn-inside-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.mtn-inside-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.62) 0%, rgba(15, 23, 42, 0.72) 50%, rgba(15, 23, 42, 0.88) 100%);
}
.mtn-inside-content {
  position: relative;
  z-index: 2;
  padding: 20px;
}
.mtn-chest-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.76);
  border: 1.5px solid rgba(251, 191, 36, 0.48);
  backdrop-filter: blur(6px);
  margin-bottom: 18px;
  color: #FEF3C7;
}
.mtn-trail-canvas {
  position: relative;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}
.mtn-trail-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.mtn-pos-row {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  transform: translateY(-50%);
  z-index: 3;
  padding: 0 14px;
}
.mtn-pos-icon-btn {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.78);
  background: rgba(15, 23, 42, 0.84);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  padding: 0;
}
.mtn-pos-icon-btn:hover:not(:disabled) {
  transform: scale(1.06);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.45);
}
.mtn-pos-icon-btn.done {
  border-color: #34D399;
  background: rgba(6, 78, 59, 0.9);
}
.mtn-pos-icon-btn.current {
  border-color: #FBBF24;
  box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.24), 0 10px 24px rgba(0, 0, 0, 0.4);
}
.mtn-pos-icon-btn.locked {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.84);
  cursor: not-allowed;
}
.mtn-pos-icon-btn img.pos-ic {
  width: 50px;
  height: 50px;
  object-fit: contain;
}
.mtn-pos-info-card {
  flex: 0 1 250px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #F8FAFC;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}
.mtn-pos-info-card.current {
  border-color: #34D399;
}
.mtn-pos-info-card.done {
  border-color: rgba(52, 211, 153, 0.55);
}

/* Mandatory Question Source Line (directly below question box, before A-E) */
.mtn-source-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 800;
}
.mtn-source-line.official {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  color: #1E40AF;
}
.mtn-source-line.parametric {
  background: #ECFDF5;
  border: 1.5px solid #A7F3D0;
  color: #065F46;
}
.mtn-source-line.ai {
  background: #F5F3FF;
  border: 1.5px solid #DDD6FE;
  color: #5B21B6;
}
[data-theme="dark"] .mtn-source-line.official {
  background: rgba(30, 64, 175, 0.24);
  border-color: rgba(96, 165, 250, 0.45);
  color: #BFDBFE;
}
[data-theme="dark"] .mtn-source-line.parametric {
  background: rgba(6, 95, 70, 0.26);
  border-color: rgba(52, 211, 153, 0.45);
  color: #A7F3D0;
}
[data-theme="dark"] .mtn-source-line.ai {
  background: rgba(91, 33, 182, 0.26);
  border-color: rgba(167, 139, 250, 0.45);
  color: #DDD6FE;
}
.mtn-source-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: underline;
  font-weight: 800;
  font-size: 12px;
}

@media (max-width: 960px) {
  .mtn-exp-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mtn-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .mtn-card-grid { grid-template-columns: 1fr; }
  .mtn-pos-icon-btn { width: 62px; height: 62px; }
  .mtn-pos-icon-btn img.pos-ic { width: 42px; height: 42px; }
  .mtn-pos-info-card { flex: 1 1 180px; padding: 8px 11px; }
}


/* Naik Gunung Tahap 2 — Cerita Raka, Audio Controls, Oksigen, Combo & Paspor Puncak */
.mtn-audio-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.mtn-audio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 99px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  background: rgba(15, 23, 42, 0.48);
  color: #E2E8F0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}
.mtn-audio-pill.on {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.6);
  color: #A7F3D0;
}
.mtn-audio-pill.light-surface {
  background: var(--bg-elevated, #F1F5F9);
  border-color: var(--line, #CBD5E1);
  color: var(--ink, #0F172A);
}
.mtn-audio-pill.light-surface.on {
  background: rgba(16, 185, 129, 0.14);
  border-color: #10B981;
  color: #047857;
}
[data-theme="dark"] .mtn-audio-pill.light-surface.on {
  color: #6EE7B7;
}
.mtn-passport-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px;
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28), rgba(180, 83, 9, 0.35));
  color: #FEF3C7;
  font-size: 12.5px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.15s ease;
}
.mtn-passport-btn:hover {
  transform: translateY(-2px);
}

/* Non-Blocking 1-Line Raka Speech Bubble above Pos Map */
.mtn-raka-bubble {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.82);
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  margin-bottom: 14px;
  color: #F8FAFC;
  backdrop-filter: blur(6px);
}
.mtn-raka-bubble-text {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  color: #ECFDF5;
}

/* Story Dialog Modal (2-3 bubbles Raka + User Avatar) */
.mtn-story-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mtn-story-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 2px dashed var(--line, #E2E8F0);
}
.mtn-story-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mtn-story-line {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.mtn-story-line.is-user {
  flex-direction: row-reverse;
}
.mtn-story-bubble {
  flex: 1;
  padding: 12px 15px;
  border-radius: 18px;
  border: 2px solid var(--line, #E2E8F0);
  background: var(--bg-elevated, #F8FAFC);
  color: var(--ink, #0F172A);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.55;
}
.mtn-story-line.is-raka .mtn-story-bubble {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.08);
  border-bottom-left-radius: 6px;
}
.mtn-story-line.is-user .mtn-story-bubble {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
  border-bottom-right-radius: 6px;
}

/* Oxygen Bar & Combo Badge in Pos Quiz */
.mtn-quiz-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-elevated, #F1F5F9);
  border: 1.5px solid var(--line, #CBD5E1);
}
.mtn-oxygen-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.mtn-o2-tank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
  border: 1.5px solid #06B6D4;
  background: rgba(6, 182, 212, 0.16);
  color: #0891B2;
  transition: all 0.2s ease;
}
.mtn-o2-tank.empty {
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(148, 163, 184, 0.12);
  color: #94A3B8;
  opacity: 0.48;
}
.mtn-o2-tank.critical {
  border-color: #F43F5E;
  background: rgba(244, 63, 94, 0.18);
  color: #E11D48;
}
.mtn-combo-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  background: linear-gradient(135deg, #F59E0B, #EA580C);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 900;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.32);
}

/* Wrong Questions Review + EkoTutor AI CTA */
.mtn-wrong-review {
  text-align: left;
  padding: 14px;
  border-radius: 16px;
  border: 1.5px solid rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mtn-wrong-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card, rgba(255, 255, 255, 0.85));
  border: 1px solid var(--line, #E2E8F0);
  font-size: 12.5px;
  line-height: 1.45;
}

/* Summit Passport Celebration Card & 27-Mountain Stamp Gallery */
.mtn-passport-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid rgba(251, 191, 36, 0.72);
  background: #0F172A;
  color: #F8FAFC;
  padding: 20px;
}
.mtn-passport-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.32;
}
.mtn-passport-stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 18px;
  border: 3px dashed #FBBF24;
  background: rgba(15, 23, 42, 0.82);
  color: #FEF3C7;
  transform: rotate(-2deg);
}
.mtn-passport-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-height: 62vh;
  overflow-y: auto;
  padding-right: 4px;
}
.mtn-stamp-slot {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--line, #E2E8F0);
  background: var(--bg-elevated, #F8FAFC);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mtn-stamp-slot.stamped {
  border-color: #10B981;
  background: linear-gradient(160deg, #064E3B 0%, #0F172A 100%);
  color: #F8FAFC;
}
.mtn-stamp-thumb {
  width: 100%;
  height: 92px;
  border-radius: 10px;
  object-fit: cover;
}
.mtn-stamp-thumb.locked-img {
  filter: grayscale(1) brightness(0.45);
  opacity: 0.65;
}
@media (max-width: 720px) {
  .mtn-passport-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* BELAJAR & MATERI — BUKU PAKET RESMI KEMENDIKBUDRISTEK & PDF READER */
.tb-official-banner {
  position: relative;
  overflow: hidden;
}
.tb-book-cover {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  flex-shrink: 0;
}
.tb-banner-actions {
  min-width: 220px;
  justify-content: center;
}
.tb-k10-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(14, 165, 233, 0.12);
  border: 1.5px solid rgba(14, 165, 233, 0.35);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}
.tb-k10-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #0284C7;
}
.tb-slice-card {
  transition: transform .15s ease, border-color .15s ease;
  min-width: 0;
  overflow: hidden;
}
.tb-slice-title,
.tb-slice-sub {
  overflow-wrap: break-word;
  word-break: break-word;
}
.tb-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.tb-card-primary-btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  white-space: nowrap;
}
.tb-card-sub-actions {
  display: grid;
  gap: 8px;
  width: 100%;
  min-width: 0;
}
.tb-card-sub-actions.is-duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.tb-card-sub-actions.is-single {
  grid-template-columns: minmax(0, 1fr);
}
.tb-card-sec-btn {
  width: 100%;
  min-width: 0;
  justify-content: center;
  padding-left: 10px;
  padding-right: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-card-sec-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1180px) and (min-width: 769px) {
  .tb-slice-card {
    padding: 18px;
  }
}

/* Redesigned Spacious PDF Reader Modal (94vh + Single Slim Header + Fullscreen Toggle) */
.modal-wrap.modal-wrap-pdf {
  padding: 16px;
}
.modal-wrap.modal-wrap-pdf.is-pdf-fullscreen {
  padding: 0 !important;
}
.modal.modal-textbook-reader,
.modal.modal-pdf-reader {
  width: min(1200px, 96vw) !important;
  max-width: 1200px !important;
  height: 94vh !important;
  max-height: 94vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  border-radius: 18px;
}
.modal.modal-textbook-reader.is-pdf-fullscreen,
.modal.modal-pdf-reader.is-pdf-fullscreen {
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0 !important;
  border: 0 !important;
}
.tb-reader-shell,
.pdf-reader-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.tb-reader-slim-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  min-height: 52px;
  border-bottom: 1.5px solid var(--line);
  flex-shrink: 0;
}
.tb-reader-slim-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 0%;
}
.tb-reader-slim-ic {
  width: 32px !important;
  height: 32px !important;
  border-radius: 9px !important;
  flex-shrink: 0;
}
.tb-reader-slim-ic svg {
  width: 16px !important;
  height: 16px !important;
}
.tb-reader-slim-meta {
  min-width: 0;
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.tb-reader-slim-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-reader-slim-sub {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tb-reader-slim-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.tb-slim-btn {
  min-height: 34px !important;
  padding: 5px 11px !important;
  font-size: 12px !important;
  border-radius: 10px !important;
  border-bottom-width: 3px !important;
  white-space: nowrap;
  gap: 5px;
}
.tb-mini-btn {
  min-height: 30px !important;
  padding: 4px 9px !important;
  font-size: 11.5px !important;
  border-radius: 8px !important;
  border-bottom-width: 2px !important;
}
.tb-reader-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  flex-shrink: 0;
}
.pdf-reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-soft, #F8FAFC);
  border-bottom: 1.5px solid var(--line);
  flex-shrink: 0;
}
.tb-reader-stage {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: #1E293B;
  position: relative;
  overflow: hidden;
}
.pdf-reader-stage {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.tb-reader-iframe {
  flex: 1 1 0%;
  min-height: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #FFFFFF;
  display: block;
}
.tb-reader-iframe.is-hidden,
.tb-reader-fallback-panel.is-hidden {
  display: none !important;
}
.tb-reader-fallback-panel {
  flex: 1 1 0%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
  background: var(--bg-soft, #F8FAFC);
}
.tb-reader-fallback-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card, #FFFFFF);
  border: 2px solid var(--line, #E2E8F0);
  border-radius: 20px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}
.tb-reader-fallback-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

@media (max-width: 980px) {
  .tb-slim-lbl-wide {
    display: none;
  }
}

@media (max-width: 768px) {
  .tb-banner-actions {
    width: 100%;
    min-width: 0;
  }
  .modal-wrap.modal-wrap-pdf {
    padding: 0 !important;
  }
  .modal.modal-textbook-reader,
  .modal.modal-pdf-reader {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: 0 !important;
  }
  .tb-reader-slim-bar {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 8px;
  }
  .tb-reader-slim-left {
    width: calc(100% - 44px);
    flex: 1 1 auto;
  }
  .tb-reader-slim-ic,
  .tb-slim-desk-only {
    display: none !important;
  }
  .tb-reader-slim-actions {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }
  .tb-slim-read-btn {
    flex: 1 1 0%;
    min-width: 0;
    justify-content: center;
  }
  .pdf-reader-toolbar {
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  .tb-reader-stage {
    flex: 1 1 0% !important;
    min-height: 0 !important;
  }
  .tb-reader-iframe {
    flex: 1 1 0% !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
  }
}


/* Bank Soal HOTS — 3 Sumber, Stimulus Visual (Gambar/Grafik/Tabel/Diagram), */
:root {
  --qb-chart-axis: #64748B;
  --qb-chart-grid: rgba(148, 163, 184, 0.28);
  --qb-chart-muted: #94A3B8;
  --qb-chart-ink: #0F172A;
  --qb-chart-sub: #475569;
}
[data-theme="dark"], .dark {
  --qb-chart-axis: #94A3B8;
  --qb-chart-grid: rgba(148, 163, 184, 0.18);
  --qb-chart-muted: #64748B;
  --qb-chart-ink: #F1F5F9;
  --qb-chart-sub: #CBD5E1;
}

.qb-source-filter-bar .qb-src-cnt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.08);
}
.qb-source-filter-bar .btn-primary .qb-src-cnt {
  background: rgba(255, 255, 255, 0.24);
  color: #FFFFFF;
}

/* Media mini-badges on packages, subchapters & quiz cards */
.qb-media-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.qb-media-pill.is-image   { background: #FEF3C7; color: #B45309; }
.qb-media-pill.is-chart   { background: #D1FAE5; color: #047857; }
.qb-media-pill.is-diagram { background: #E0E7FF; color: #4338CA; }
.qb-media-pill.is-table   { background: #E0F2FE; color: #0369A1; }
.qb-media-pill.is-tf      { background: #FCE7F3; color: #BE185D; }
.qb-media-pill.is-multi   { background: #EDE9FE; color: #6D28D9; }
.qb-media-pill.is-ce      { background: #FFEDD5; color: #C2410C; }

[data-theme="dark"] .qb-media-pill.is-image   { background: rgba(245,158,11,0.2); color: #FBBF24; }
[data-theme="dark"] .qb-media-pill.is-chart   { background: rgba(16,185,129,0.2); color: #34D399; }
[data-theme="dark"] .qb-media-pill.is-diagram { background: rgba(99,102,241,0.2); color: #A5B4FC; }
[data-theme="dark"] .qb-media-pill.is-table   { background: rgba(14,165,233,0.2); color: #38BDF8; }
[data-theme="dark"] .qb-media-pill.is-tf      { background: rgba(236,72,153,0.2); color: #F472B6; }
[data-theme="dark"] .qb-media-pill.is-multi   { background: rgba(139,92,246,0.2); color: #C4B5FD; }
[data-theme="dark"] .qb-media-pill.is-ce      { background: rgba(249,115,22,0.2); color: #FB923C; }

/* Stimulus visual stack */
.qb-stimulus-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 14px;
}
.qb-media-card {
  border-radius: 14px;
  border: 1.5px solid var(--line, #E2E8F0);
  background: var(--bg-soft, #F8FAFC);
  overflow: hidden;
  margin: 0;
}
[data-theme="dark"] .qb-media-card {
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.24);
}
.qb-media-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line, #E2E8F0);
  background: var(--card, #FFFFFF);
}
[data-theme="dark"] .qb-media-head {
  background: rgba(30, 41, 59, 0.85);
  border-bottom-color: rgba(148, 163, 184, 0.2);
}
.qb-media-kind {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.14);
  color: #059669;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.qb-media-card.is-table .qb-media-kind { background: rgba(14, 165, 233, 0.15); color: #0284C7; }
.qb-media-card.is-diagram .qb-media-kind { background: rgba(99, 102, 241, 0.15); color: #4F46E5; }
.qb-media-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink, #0F172A);
}

/* Image block + zoom pill */
.qb-media-img-btn {
  position: relative;
  display: block;
  width: 100%;
  padding: 8px;
  border: 0;
  background: #FFFFFF;
  cursor: zoom-in;
  text-align: center;
}
.qb-media-img {
  display: block;
  max-width: 100%;
  max-height: 440px;
  margin: 0 auto;
  border-radius: 10px;
  object-fit: contain;
}
.qb-media-zoom-pill {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: #FFFFFF;
  font-size: 11.5px;
  font-weight: 800;
  backdrop-filter: blur(4px);
}
.qb-media-zoom-pill svg { width: 14px; height: 14px; }
.qb-media-caption {
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #64748B);
  border-top: 1px solid var(--line, #E2E8F0);
}

/* Data table block */
.qb-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.qb-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.qb-data-table thead th {
  padding: 9px 12px;
  background: rgba(148, 163, 184, 0.14);
  color: var(--ink, #0F172A);
  font-weight: 800;
  font-size: 12px;
  border-bottom: 1.5px solid var(--line, #CBD5E1);
  white-space: nowrap;
}
.qb-data-table tbody td {
  padding: 8px 12px;
  color: var(--ink-2, #1E293B);
  border-bottom: 1px solid var(--line, #E2E8F0);
}
.qb-data-table tbody tr:nth-child(even) {
  background: rgba(148, 163, 184, 0.06);
}
.qb-data-table .is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.qb-data-table .is-center { text-align: center; }
.qb-data-table .is-left { text-align: left; }

/* SVG Charts & Diagrams */
.qb-chart-wrap {
  padding: 12px 14px;
  background: var(--card, #FFFFFF);
}
[data-theme="dark"] .qb-chart-wrap {
  background: rgba(15, 23, 42, 0.45);
}
.qb-svg-chart {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin: 0 auto;
}
.qb-svg-axis-lbl { font-size: 11.5px; font-weight: 800; fill: var(--qb-chart-ink); }
.qb-svg-tick { font-size: 10.5px; font-weight: 600; fill: var(--qb-chart-axis); }
.qb-svg-val-lbl { font-size: 11px; font-weight: 800; fill: var(--qb-chart-ink); }
.qb-svg-curve-lbl { font-size: 13px; font-weight: 900; }
.qb-svg-eq-lbl { font-size: 11.5px; font-weight: 800; fill: var(--qb-chart-ink); }
.qb-svg-anno { font-size: 10.5px; font-weight: 700; fill: var(--qb-chart-sub); }
.qb-svg-node-t { font-size: 12px; font-weight: 800; fill: var(--qb-chart-ink); }
.qb-svg-node-s { font-size: 10px; font-weight: 600; fill: var(--qb-chart-sub); }
.qb-chart-note {
  margin-top: 6px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted, #64748B);
}
.qb-chart-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.qb-chart-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-2, #334155);
}
.qb-chart-leg-item i {
  display: inline-block;
  width: 12px;
  height: 4px;
  border-radius: 3px;
}

/* Mandatory Source Attribution Bar right below question stem */
.qb-source-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 12px;
  margin: 10px 0 14px;
  border-radius: 11px;
  border: 1px solid var(--line, #E2E8F0);
  font-size: 12px;
  line-height: 1.45;
}
.qb-source-bar-left {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  flex: 1;
}
.qb-source-bar-left svg { width: 15px; height: 15px; flex-shrink: 0; }
.qb-source-bar.is-internet {
  background: #F0F9FF;
  border-color: #BAE6FD;
  color: #0C4A6E;
}
.qb-source-bar.is-internet .qb-source-bar-left svg { color: #0284C7; }
[data-theme="dark"] .qb-source-bar.is-internet {
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(56, 189, 248, 0.35);
  color: #E0F2FE;
}
.qb-source-ext-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid #7DD3FC;
  background: #FFFFFF;
  color: #0284C7;
  font-size: 11.5px;
  font-weight: 800;
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.qb-source-ext-link:hover {
  background: #E0F2FE;
  transform: translateY(-1px);
}
.qb-source-ext-link svg { width: 13px; height: 13px; }
[data-theme="dark"] .qb-source-ext-link {
  background: rgba(2, 132, 199, 0.25);
  border-color: #38BDF8;
  color: #7DD3FC;
}

.qb-source-bar.is-textbook {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #064E3B;
}
.qb-source-bar.is-textbook .qb-source-bar-left svg { color: #059669; }
[data-theme="dark"] .qb-source-bar.is-textbook {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.35);
  color: #D1FAE5;
}

.qb-source-bar.is-ai {
  background: var(--bg-soft, #F8FAFC);
  border-color: var(--line, #E2E8F0);
  color: var(--muted, #64748B);
  padding: 6px 11px;
}

/* Interactive Question Panel (MCQ, Multi-Select, Cause-Effect, True/False Table) */
.qb-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.qb-opt {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1.5px solid var(--line, #CBD5E1);
  background: var(--card, #FFFFFF);
  color: var(--ink, #0F172A);
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.qb-opt:hover:not(:disabled) {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.05);
}
.qb-opt.is-selected {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.1);
}
.qb-opt.is-correct {
  border-color: #10B981;
  background: rgba(16, 185, 129, 0.14);
}
.qb-opt.is-wrong {
  border-color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
}
.qb-opt.is-missed {
  border-color: #F59E0B;
  background: rgba(245, 158, 11, 0.12);
}

.qb-ce-guide, .qb-multi-guide, .qb-tf-guide {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.qb-ce-guide { background: #FFF7ED; color: #9A3412; border: 1px solid #FED7AA; }
.qb-multi-guide { background: #F5F3FF; color: #5B21B6; border: 1px solid #DDD6FE; }
.qb-tf-guide { background: #FDF2F8; color: #9D174D; border: 1px solid #FBCFE8; }
[data-theme="dark"] .qb-ce-guide { background: rgba(249,115,22,0.16); color: #FDBA74; border-color: rgba(251,146,60,0.3); }
[data-theme="dark"] .qb-multi-guide { background: rgba(139,92,246,0.16); color: #C4B5FD; border-color: rgba(167,139,250,0.3); }
[data-theme="dark"] .qb-tf-guide { background: rgba(236,72,153,0.16); color: #F9A8D4; border-color: rgba(244,114,182,0.3); }

/* Multi-select checkboxes */
.qb-check-box {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--muted, #94A3B8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}
.qb-check-box.is-checked {
  background: #6366F1;
  border-color: #6366F1;
  color: #FFFFFF;
}
.qb-multi-tag {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.qb-multi-tag.is-ok   { background: #D1FAE5; color: #047857; }
.qb-multi-tag.is-err  { background: #FEE2E2; color: #B91C1C; }
.qb-multi-tag.is-miss { background: #FEF3C7; color: #B45309; }

/* True/False Interactive Table */
.qb-tf-table {
  width: 100%;
  border-collapse: collapse;
  border: 1.5px solid var(--line, #CBD5E1);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card, #FFFFFF);
}
.qb-tf-table thead th {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(148, 163, 184, 0.14);
  color: var(--ink, #0F172A);
  border-bottom: 1.5px solid var(--line, #CBD5E1);
}
.qb-tf-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line, #E2E8F0);
  vertical-align: middle;
}
.qb-tf-table .col-no { width: 42px; text-align: center; font-weight: 800; color: var(--muted, #64748B); }
.qb-tf-table .col-stmt { min-width: 240px; }
.qb-tf-table .col-choice { width: 104px; text-align: center; }
.qb-tf-stmt-text { font-size: 13.5px; line-height: 1.55; font-weight: 600; color: var(--ink, #0F172A); }
.qb-tf-table tr.is-row-correct { background: rgba(16, 185, 129, 0.10); }
.qb-tf-table tr.is-row-wrong   { background: rgba(239, 68, 68, 0.09); }

.qb-tf-radio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 82px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1.5px solid var(--line, #CBD5E1);
  background: var(--card, #FFFFFF);
  color: var(--ink-2, #334155);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}
.qb-tf-radio:hover:not(:disabled) { border-color: #10B981; }
.qb-tf-radio .qb-tf-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid var(--muted, #94A3B8);
  display: inline-block;
}
.qb-tf-radio.is-selected {
  border-color: #10B981;
  background: #D1FAE5;
  color: #065F46;
}
.qb-tf-radio.is-selected .qb-tf-dot {
  border-color: #10B981;
  background: #10B981;
}
.qb-tf-radio[data-qb-tf-val="false"].is-selected {
  border-color: #EF4444;
  background: #FEE2E2;
  color: #991B1B;
}
.qb-tf-radio[data-qb-tf-val="false"].is-selected .qb-tf-dot {
  border-color: #EF4444;
  background: #EF4444;
}
.qb-tf-radio.is-key {
  box-shadow: 0 0 0 2px #10B981;
}
.qb-tf-row-feedback {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 6px;
}
.qb-tf-row-badge {
  display: inline-flex;
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}
.qb-tf-row-badge.is-ok  { background: #D1FAE5; color: #047857; }
.qb-tf-row-badge.is-err { background: #FEE2E2; color: #B91C1C; }
.qb-tf-row-exp { font-size: 12px; color: var(--muted, #475569); line-height: 1.45; }

.qb-partial-summary {
  margin-top: 10px;
  padding: 9px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 800;
}
.qb-partial-summary.is-ok   { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.qb-partial-summary.is-warn { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }

/* Zoom Lightbox Modal */
.qb-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(2, 6, 23, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  backdrop-filter: blur(4px);
}
.qb-lightbox-box {
  width: min(980px, 100%);
  max-height: 92vh;
  background: var(--card, #FFFFFF);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.qb-lightbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line, #E2E8F0);
}
.qb-lightbox-title {
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink, #0F172A);
}
.qb-lightbox-actions { display: flex; gap: 8px; flex-shrink: 0; }
.qb-lightbox-stage {
  flex: 1;
  overflow: auto;
  padding: 16px;
  background: #0F172A;
  text-align: center;
}
.qb-lightbox-img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  transition: width 0.2s ease;
}
.qb-lightbox-img.is-zoomed {
  max-width: none;
  width: 160%;
}


/* Topbar Layout Fix — 1 Tombol Sidebar Saja & Topbar Mobile 2 Grup Rapi */
/* Desktop (sidebar = rel tetap): tombol collapse hanya di dalam sidebar.
   Tombol topbar disembunyikan total, termasuk saat sidebar ter-collapse. */
@media (min-width: 1024px) {
  .topbar-sb-toggle,
  #sidebarOpen,
  html[data-sidebar-collapsed="true"] .topbar-sb-toggle,
  .app.sidebar-collapsed .topbar-sb-toggle {
    display: none !important;
  }
}

/* Mobile (<= 768px): [Drawer][Logo][Kls 12] ........ [Streak][XP][Lonceng][Avatar] */
@media (max-width: 768px) {
  .topbar-in {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 0 12px !important;
    height: 56px !important;
  }
  #sidebarOpen {
    order: 1;
    display: inline-grid !important;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
  }
  .mobile-top-left {
    order: 2;
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    margin: 0 auto 0 0 !important;
    min-width: 0;
  }
  .mobile-top-brand,
  #mobileGradeWrap {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
  }
  .topbar-title,
  #gradeSwitch {
    display: none !important;
  }
  #topStats {
    order: 3;
    display: flex !important;
    align-items: center;
    gap: 6px !important;
    margin-left: auto !important;
    flex-shrink: 0;
  }
  #topStats > * {
    flex-shrink: 0;
  }
}

@media (max-width: 400px) {
  .topbar-in { gap: 6px !important; padding: 0 8px !important; }
  .mobile-top-left { gap: 6px; }
  #topStats { gap: 4px !important; }
  .stat-pill { padding: 4px 6px; }
}


/* 7 Kasta Liga Ekonomi — Global <LeagueRankEmblem /> & Banner Gradients (Light/Dark) */
.rank-emblem-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--re-size, 48px);
  height: var(--re-size, 48px);
  flex-shrink: 0;
  vertical-align: middle;
  background: transparent !important;
  border: 0 !important;
  overflow: visible;
}

.rank-emblem-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform .22s ease, filter .22s ease;
}

.rank-emblem-wrap.is-glow .rank-emblem-img {
  filter: drop-shadow(0 4px 10px var(--re-glow-rgba, rgba(245, 158, 11, 0.42)));
}

.rank-emblem-wrap.is-glow.rank-tier-bronze .rank-emblem-img {
  filter: drop-shadow(0 4px 10px rgba(205, 127, 50, 0.45));
}

.rank-emblem-wrap.is-glow.rank-tier-silver .rank-emblem-img {
  filter: drop-shadow(0 4px 11px rgba(56, 189, 248, 0.42)) drop-shadow(0 0 6px rgba(148, 163, 184, 0.38));
}

.rank-emblem-wrap.is-glow.rank-tier-gold .rank-emblem-img {
  filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.50));
}

.rank-emblem-wrap.is-glow.rank-tier-sapphire .rank-emblem-img {
  filter: drop-shadow(0 4px 13px rgba(37, 99, 235, 0.52));
}

.rank-emblem-wrap.is-glow.rank-tier-emerald .rank-emblem-img {
  filter: drop-shadow(0 5px 14px rgba(16, 185, 129, 0.55)) drop-shadow(0 0 8px rgba(251, 191, 36, 0.36));
}

.rank-emblem-wrap.is-glow.rank-tier-diamond .rank-emblem-img {
  filter: drop-shadow(0 5px 15px rgba(56, 189, 248, 0.58)) drop-shadow(0 0 8px rgba(245, 158, 11, 0.34));
}

.rank-emblem-wrap.is-glow.rank-tier-zenith .rank-emblem-img {
  filter: drop-shadow(0 6px 16px rgba(168, 85, 247, 0.62)) drop-shadow(0 0 10px rgba(245, 158, 11, 0.42));
}

.rank-emblem-wrap.is-locked {
  opacity: 0.46;
  filter: grayscale(0.45);
}

@keyframes rankEmblemFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}

.rank-emblem-wrap.is-animated .rank-emblem-img {
  animation: rankEmblemFloat 3.4s ease-in-out infinite;
}

html[data-reduce-motion="true"] .rank-emblem-wrap.is-animated .rank-emblem-img,
html[data-reduce-motion="true"] .rank-up-aura {
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .rank-emblem-wrap.is-animated .rank-emblem-img,
  .rank-up-aura {
    animation: none !important;
  }
}

/* Banner Hero 7 Kasta Liga Ekonomi — Gradien Halus per Tier (Light & Dark Mode) */
.card.league-hero-card {
  gap: 18px;
  overflow: visible;
}
.league-hero-tier-bronze {
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 46%, var(--bg-card, #FFFFFF) 100%) !important;
}
.league-hero-tier-silver {
  background: linear-gradient(135deg, #F1F5F9 0%, #E0F2FE 48%, var(--bg-card, #FFFFFF) 100%) !important;
}
.league-hero-tier-gold {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 48%, var(--bg-card, #FFFFFF) 100%) !important;
}
.league-hero-tier-sapphire {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 48%, var(--bg-card, #FFFFFF) 100%) !important;
}
.league-hero-tier-emerald {
  background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 48%, var(--bg-card, #FFFFFF) 100%) !important;
}
.league-hero-tier-diamond {
  background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 48%, var(--bg-card, #FFFFFF) 100%) !important;
}
.league-hero-tier-zenith {
  background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 48%, var(--bg-card, #FFFFFF) 100%) !important;
}

[data-theme="dark"] .league-hero-tier-bronze {
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.30) 0%, rgba(205, 127, 50, 0.14) 52%, var(--bg-card, #111827) 100%) !important;
}
[data-theme="dark"] .league-hero-tier-silver {
  background: linear-gradient(135deg, rgba(148, 163, 184, 0.24) 0%, rgba(56, 189, 248, 0.14) 52%, var(--bg-card, #111827) 100%) !important;
}
[data-theme="dark"] .league-hero-tier-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.28) 0%, rgba(251, 191, 36, 0.12) 52%, var(--bg-card, #111827) 100%) !important;
}
[data-theme="dark"] .league-hero-tier-sapphire {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.32) 0%, rgba(56, 189, 248, 0.14) 52%, var(--bg-card, #111827) 100%) !important;
}
[data-theme="dark"] .league-hero-tier-emerald {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.30) 0%, rgba(251, 191, 36, 0.12) 52%, var(--bg-card, #111827) 100%) !important;
}
[data-theme="dark"] .league-hero-tier-diamond {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.32) 0%, rgba(245, 158, 11, 0.14) 52%, var(--bg-card, #111827) 100%) !important;
}
[data-theme="dark"] .league-hero-tier-zenith {
  background: linear-gradient(135deg, rgba(147, 51, 234, 0.34) 0%, rgba(245, 158, 11, 0.16) 52%, var(--bg-card, #111827) 100%) !important;
}

.season-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.season-history-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: var(--bg-soft);
}
.season-reset-transition {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 14px 12px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1.5px solid var(--line);
}
.season-reset-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 112px;
}
.season-reset-arrow {
  width: 34px;
  height: 34px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: var(--bg-card, #FFFFFF);
  border: 1.5px solid var(--line);
  color: var(--ink-2);
}
.season-rules-table td,
.season-rules-table th {
  padding: 10px 12px;
  vertical-align: middle;
}

.league-pill-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}

.league-pill.is-locked-tier {
  opacity: 0.72;
}

.lb-row-league-pill,
.dash-league-badge,
.set-rank-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding-left: 5px !important;
}

/* Modal Selebrasi Naik Liga (Rank Up) */
.modal.modal-rank-up {
  overflow: visible;
  text-align: center;
}
.rank-up-body {
  position: relative;
  padding: 28px 24px 24px;
  text-align: center;
}
.rank-up-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.rank-up-kicker {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  color: var(--re-glow, #F59E0B);
  text-transform: uppercase;
}
.rank-up-emblem-stage {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  width: 148px;
  height: 148px;
}
@keyframes rankAuraPulse {
  0%, 100% { transform: scale(0.95); opacity: 0.35; }
  50% { transform: scale(1.08); opacity: 0.62; }
}
.rank-up-aura {
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--re-glow-rgba, rgba(245, 158, 11, 0.45)) 0%, transparent 72%);
  animation: rankAuraPulse 2.6s ease-in-out infinite;
  pointer-events: none;
}

@media (max-width: 640px) {
  .league-hero-emblem {
    --re-size: 68px !important;
  }
  .card.league-hero-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }
  .card.league-hero-card .league-hero-actions {
    width: 100%;
  }
  .card.league-hero-card .league-hero-actions .btn {
    flex: 1 1 0%;
    min-width: 0;
    justify-content: center;
    padding: 10px 12px;
    font-size: 13px;
  }
  .set-hero-rank-emblem {
    --re-size: 34px !important;
  }
}


/* PORTAL GURU EKOPUNCAK (Web) — Tema Hijau Zamrud Seragam (#059669) */
.sb-teacher-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.sidebar.is-teacher-portal .brand-mark {
  background: linear-gradient(135deg, #059669, #047857);
}

.tp-shell {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.tp-hero-card {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #FFFFFF;
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: 0 10px 26px rgba(5, 150, 105, 0.22);
}

.tp-hero-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  flex: 1;
}

.tp-hero-av {
  cursor: pointer;
  flex-shrink: 0;
}

.tp-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #D1FAE5;
  margin-bottom: 4px;
}

.tp-hero-title {
  font-size: 21px;
  font-weight: 900;
  color: #FFFFFF;
  line-height: 1.25;
  margin: 0;
}

.tp-hero-sub {
  font-size: 13px;
  font-weight: 600;
  color: #ECFDF5;
  margin-top: 4px;
}

.tp-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.tp-kpi-card {
  background: var(--surface, #FFFFFF);
  border: 1px solid var(--border, #E2E8F0);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.tp-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tp-kpi-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-muted, #64748B);
}

.tp-kpi-ico {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tp-kpi-ico.emerald { background: #ECFDF5; color: #059669; }
.tp-kpi-ico.blue { background: #EFF6FF; color: #2563EB; }
.tp-kpi-ico.amber { background: #FEF3C7; color: #D97706; }
.tp-kpi-ico.violet { background: #F5F3FF; color: #7C3AED; }
.tp-kpi-ico.rose { background: #FEF2F2; color: #DC2626; }

.tp-kpi-val {
  font-size: 28px;
  font-weight: 900;
  color: var(--ink, #0F172A);
  margin-top: 8px;
  line-height: 1.15;
}

.tp-kpi-hint {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-muted, #64748B);
  margin-top: 4px;
}

.tp-main-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
}

.tp-heat-row {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft, #F8FAFC);
  border: 1px solid var(--border, #E2E8F0);
}

.tp-heat-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.tp-heat-track {
  height: 7px;
  border-radius: 999px;
  background: var(--border, #E2E8F0);
  overflow: hidden;
  margin-top: 6px;
}

.tp-heat-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.tp-feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft, #F8FAFC);
  border: 1px solid var(--border, #E2E8F0);
}

.tp-feed-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tp-feed-ico.emerald { background: #ECFDF5; color: #059669; }
.tp-feed-ico.rose { background: #FEF2F2; color: #DC2626; }
.tp-feed-ico.indigo { background: #EEF2FF; color: #4F46E5; }

.tp-empty-mini {
  padding: 24px 16px;
  text-align: center;
  border-radius: 14px;
  background: var(--surface-soft, #F8FAFC);
  border: 1px dashed var(--border, #CBD5E1);
}

.tp-student-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tp-student-mini-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border, #E2E8F0);
  background: var(--surface-soft, #F8FAFC);
}

.tp-class-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.tp-class-card {
  background: var(--surface, #FFFFFF);
  border: 1.5px solid var(--border, #E2E8F0);
  border-radius: 18px;
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease;
}

.tp-class-card.active,
.tp-class-card:hover {
  border-color: #10B981;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.12);
}

.tp-grade-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ECFDF5;
  color: #047857;
  font-size: 11px;
  font-weight: 800;
}

.tp-chip-soft {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #F1F5F9;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.tp-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-soft, #F8FAFC);
  border: 1px solid var(--border, #E2E8F0);
  flex-wrap: wrap;
}

.tp-code-val {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #059669;
}

.tp-projector-code {
  font-size: clamp(44px, 9vw, 84px);
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #059669;
  background: #ECFDF5;
  border: 2px dashed #10B981;
  border-radius: 22px;
  padding: 24px 20px;
  display: inline-block;
  margin-top: 8px;
}

.tp-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.tp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.tp-table th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-muted, #64748B);
  border-bottom: 1.5px solid var(--border, #E2E8F0);
  background: var(--surface-soft, #F8FAFC);
}

.tp-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border, #E2E8F0);
  vertical-align: middle;
}

.tp-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.tp-status-pill.pass { background: #DCFCE7; color: #15803D; }
.tp-status-pill.remedial { background: #FEF2F2; color: #DC2626; }
.tp-status-pill.muted { background: #F1F5F9; color: #64748B; }

.tp-mini-stat {
  padding: 12px;
  border-radius: 14px;
  background: var(--surface-soft, #F8FAFC);
  border: 1px solid var(--border, #E2E8F0);
  text-align: center;
}

.tp-seg-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-soft, #F1F5F9);
  border: 1px solid var(--border, #E2E8F0);
}

.tp-seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--ink-muted, #64748B);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}

.tp-seg-btn.active {
  background: var(--surface, #FFFFFF);
  color: #047857;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}

.tp-filter-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tp-hots-pick-list {
  max-height: 310px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.tp-hots-pick-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border, #E2E8F0);
  background: var(--surface-soft, #F8FAFC);
  cursor: pointer;
}

.tp-hots-pick-item.checked {
  border-color: #10B981;
  background: #ECFDF5;
}

.tp-custom-q-box {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border, #E2E8F0);
  background: var(--surface-soft, #F8FAFC);
}

.ta-bg-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border, #CBD5E1);
  background: var(--surface, #FFFFFF);
  color: var(--ink, #334155);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.ta-bg-pill.active[data-ta-bg="blue"] { border-color: #2563EB; background: #EFF6FF; color: #1D4ED8; }
.ta-bg-pill.active[data-ta-bg="red"] { border-color: #DC2626; background: #FEF2F2; color: #B91C1C; }
.ta-bg-swatch { width: 15px; height: 15px; border-radius: 999px; flex-shrink: 0; }

.stu-teacher-card {
  border-left: 4px solid #059669 !important;
}

.tp-kpi-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-kpi-grid,
  .tp-kpi-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-main-grid { grid-template-columns: 1fr; }
  .tp-class-grid { grid-template-columns: 1fr; }
  .tp-student-mini-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .tp-hero-card {
    padding: 16px;
    gap: 12px;
  }
  .tp-hero-title {
    font-size: 18px;
  }
  .tp-filter-strip select,
  .tp-filter-strip input {
    width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100%;
  }
  #tpDashClassFilter,
  #tpGradeClassSelect {
    width: 100%;
    min-width: 0 !important;
  }
  .tp-seg-bar {
    grid-template-columns: 1fr;
  }
  .tp-profile-logout-btn {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  .tp-kpi-grid,
  .tp-kpi-grid-3 {
    grid-template-columns: 1fr;
  }
  .tp-table th,
  .tp-table td {
    padding: 9px 10px;
    font-size: 12px;
  }
}

/* Optimasi Tablet (769px – 1024px) — iPad Portrait (769–834px) & Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
  /* 1. Pastikan tombol buka/tutup drawer sidebar selalu rapi & mudah dijangkau di tablet */
  .sidebar,
  #sidebar {
    width: 272px !important;
    max-width: 82vw;
    height: 100dvh;
    z-index: 125;
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .sidebar.open,
  #sidebar.open {
    transform: translateX(0);
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.42);
  }
  .sidebar .sb-toggle-btn {
    display: none !important;
  }
  #sidebarOpen,
  .topbar-sb-toggle.only-tablet-nav {
    display: inline-grid !important;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }
  #sidebarClose {
    display: inline-grid !important;
    place-items: center;
  }
  .main,
  #main-content,
  html[data-sidebar-collapsed="true"] .main,
  html[data-sidebar-collapsed="true"] #main-content,
  .app.sidebar-collapsed .main,
  .app.sidebar-collapsed #main-content {
    margin-left: 0 !important;
    width: 100% !important;
    min-width: 0;
  }

  /* 2. Topbar Tablet lega & tidak menimpa judul halaman maupun kontrol */
  .topbar-in {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 0 20px !important;
    height: 64px !important;
  }
  .topbar-title {
    display: block !important;
    min-width: 0;
    flex: 1 1 auto;
  }
  .topbar-title h1 {
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .mobile-top-left {
    display: none !important;
  }
  #gradeSwitch {
    display: inline-flex !important;
    flex-shrink: 0;
  }
  #topStats {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
    flex-shrink: 0;
  }

  /* 3. Ruang konten utama lega (padding nyaman + bebas overflow horizontal) */
  .view {
    padding: 20px 22px calc(92px + env(safe-area-inset-bottom)) !important;
    max-width: 100%;
    min-width: 0;
  }

  /* 4. Bank Soal HOTS, Peta Naik Gunung & EkoTutor AI: tata letak lega di Tablet */
  .qb-ws-layout,
  .qb-workspace-grid,
  .split,
  .split-wide {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 16px !important;
  }
  .qb-card,
  .qb-ws-main,
  .qb-ws-side,
  .mtn-stage,
  .mtn-map-card {
    min-width: 0;
    max-width: 100%;
  }
  .qb-filter-bar,
  .qb-source-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  /* Peta Naik Gunung: grid 2 kolom seimbang di Tablet */
  .mtn-grid,
  .exp-mountain-grid,
  .cols-3,
  .cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px;
  }

  /* EkoTutor AI: ruang chat penuh agar pesan, rumus & tabel leluasa dibaca */
  .tutor-layout-3col {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
  }
  .tutor-chat-panel,
  .tutor-main-col {
    min-width: 0;
    width: 100%;
  }
  .tutor-msg-bubble {
    max-width: 86%;
  }
  .tutor-history-sidebar {
    max-height: 220px;
  }
}

/* Tablet Portrait Khusus (769px – 834px · iPad Air / Galaxy Tab Portrait) */
@media (min-width: 769px) and (max-width: 834px) {
  .topbar-in {
    padding: 0 16px !important;
    gap: 10px !important;
  }
  .view {
    padding: 16px 16px calc(88px + env(safe-area-inset-bottom)) !important;
  }
  .qb-stat-grid,
  .qb-result-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .tutor-msg-bubble {
    max-width: 90%;
  }
}
