/* =============================================================
   MEDIA PEMBELAJARAN SENI RUPA — PERSPEKTIF
   Gaya: 3D Soft Vinyl Educational
   Ubah warna utama di bagian :root
   ============================================================= */

:root {
  /* Palet utama */
  --blue: #3b6cf6;
  --blue-soft: #e6edff;
  --cyan: #14b8d8;
  --cyan-soft: #dff7fc;
  --purple: #7c4ddf;
  --purple-soft: #efe8ff;
  --yellow: #ffcf3f;
  --yellow-soft: #fff5d6;
  --green: #1fb57a;
  --green-soft: #dcf7eb;
  --red: #e5484d;
  --red-soft: #ffe5e6;

  --ink: #1d2340;         /* teks utama */
  --ink-2: #4a5275;       /* teks sekunder */
  --surface: #ffffff;
  --surface-2: #f5f7ff;
  --line: #dde3f5;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 10px 28px -10px rgba(40, 56, 130, .28), 0 2px 6px rgba(40, 56, 130, .08);
  --shadow-lg: 0 22px 44px -16px rgba(40, 56, 130, .38), 0 4px 10px rgba(40, 56, 130, .1);
  /* efek "vinyl": highlight dalam + bayangan dasar */
  --vinyl: inset 0 2px 0 rgba(255, 255, 255, .9), inset 0 -6px 12px rgba(40, 56, 130, .08);

  --font: "Segoe UI", system-ui, -apple-system, "Nunito", "Poppins", Roboto, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: #eef3ff;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
ul, ol { list-style: none; }
svg { display: block; }
img, video { max-width: 100%; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 10px; }
.skip-link:focus { left: 8px; }

/* Fokus keyboard yang jelas */
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 12px; }
/* judul/area yang difokuskan otomatis oleh script tidak perlu garis fokus */
[tabindex="-1"]:focus { outline: none; }

/* =============================================================
   LATAR RUANG KELAS
   ============================================================= */
.classroom-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: linear-gradient(180deg, #eaf2ff 0%, #f4efff 62%, #fdf4df 62%, #fbecc8 100%); }
.bg-window { position: absolute; top: 7%; right: 5%; width: 22vw; max-width: 260px; aspect-ratio: 4/3; border-radius: 24px;
  background: linear-gradient(160deg, #bfe8ff, #e7f7ff); border: 10px solid #fff; box-shadow: var(--shadow); opacity: .7; }
.bg-window::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 48%, #fff 48% 52%, transparent 52%), linear-gradient(0deg, transparent 48%, #fff 48% 52%, transparent 52%); }
.bg-board { position: absolute; top: 10%; left: 4%; width: 34vw; max-width: 420px; aspect-ratio: 16/8; border-radius: 22px; background: linear-gradient(160deg, #2f7e6e, #276a5d); border: 10px solid #fff; opacity: .16; }
.bg-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 38%;
  background: repeating-linear-gradient(90deg, transparent 0 120px, rgba(214, 170, 90, .15) 120px 122px); }
.bg-blob { position: absolute; border-radius: 50%; filter: blur(50px); opacity: .45; animation: drift 18s ease-in-out infinite; }
.b1 { width: 340px; height: 340px; background: #a8c3ff; top: -80px; left: 30%; }
.b2 { width: 280px; height: 280px; background: #d8c4ff; bottom: 10%; right: -60px; animation-delay: -6s; }
.b3 { width: 220px; height: 220px; background: #a9ecf7; bottom: -40px; left: -40px; animation-delay: -12s; }
@keyframes drift { 50% { transform: translate(30px, 20px) scale(1.08); } }

/* =============================================================
   RANGKA APLIKASI
   ============================================================= */
.app { position: relative; z-index: 1; height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  max-width: 1240px; margin: 0 auto; padding: 12px 16px; gap: 10px; }

.app-header { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius); padding: 8px 10px 8px 8px; box-shadow: var(--shadow), var(--vinyl); }
.brand { display: flex; align-items: center; gap: 10px; text-align: left; padding: 4px 8px 4px 4px; border-radius: 16px; min-width: 0; }
.brand-logo svg { width: 42px; height: 42px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-size: 1rem; }
.brand-text small { font-size: .75rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-center { text-align: center; display: flex; flex-direction: column; line-height: 1.2; }
.page-label { font-weight: 700; font-size: .95rem; }
.page-count { font-size: .78rem; color: var(--ink-2); }
.header-actions { display: flex; gap: 8px; }

.icon-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); box-shadow: var(--vinyl), 0 3px 8px rgba(40, 56, 130, .12);
  transition: transform .2s var(--ease), background .2s; }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { background: var(--blue-soft); transform: translateY(-2px); }
.icon-btn:active { transform: scale(.92); }
#btnSound .ico-off { display: none; }
#btnSound[aria-pressed="false"] .ico-on { display: none; }
#btnSound[aria-pressed="false"] .ico-off { display: block; }
#btnSound[aria-pressed="false"] { background: var(--red-soft); }

.progress-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .8); box-shadow: inset 0 1px 3px rgba(40, 56, 130, .15); overflow: hidden; }
.progress-fill { height: 100%; width: 8.33%; border-radius: inherit; background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple)); transition: width .5s var(--ease); }

/* Area halaman */
.stage { flex: 1; min-height: 0; position: relative; overflow-y: auto; overflow-x: hidden;
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-radius: 28px; box-shadow: var(--shadow-lg), var(--vinyl); scroll-behavior: smooth; }
.stage:focus { outline: none; }
.page { display: none; padding: clamp(18px, 3vw, 36px); min-height: 100%; }
.page.active { display: block; }
.page.enter-next { animation: pageInNext .5s var(--ease); }
.page.enter-prev { animation: pageInPrev .5s var(--ease); }
.page.enter-zoom { animation: pageZoom .5s var(--ease); }
@keyframes pageInNext { from { opacity: 0; transform: translateX(34px); } to { opacity: 1; transform: none; } }
@keyframes pageInPrev { from { opacity: 0; transform: translateX(-34px); } to { opacity: 1; transform: none; } }
@keyframes pageZoom { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

/* Footer navigasi */
.app-footer { display: flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: var(--radius); padding: 8px; box-shadow: var(--shadow), var(--vinyl); }
.nav-btn { display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 16px; font-weight: 700;
  background: var(--surface-2); box-shadow: var(--vinyl), 0 3px 8px rgba(40, 56, 130, .12); transition: transform .2s var(--ease), background .2s, opacity .2s; }
.nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn:hover:not(:disabled) { transform: translateY(-2px); background: var(--blue-soft); }
.nav-btn:active:not(:disabled) { transform: scale(.95); }
.nav-btn:disabled { opacity: .4; cursor: not-allowed; }
.nav-next { background: linear-gradient(135deg, #5b8cff, var(--blue)); color: #fff; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 8px 18px -6px rgba(59, 108, 246, .7); }
.nav-next:hover:not(:disabled) { background: linear-gradient(135deg, #6d98ff, #4a78ff); }
.foot-count { display: none; flex: 1; text-align: center; font-weight: 800; color: var(--ink-2); }
.dots { flex: 1; display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; }
.dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-weight: 700; color: var(--ink-2); background: var(--surface-2); transition: all .25s var(--ease); }
.dot:hover { background: var(--blue-soft); }
.dot.visited { background: var(--cyan-soft); color: #0b6f84; }
.dot.current { background: var(--blue); color: #fff; transform: scale(1.15); box-shadow: 0 4px 10px -2px rgba(59, 108, 246, .6); }

/* =============================================================
   KOMPONEN UMUM
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px;
  border-radius: 16px; font-weight: 800; letter-spacing: .02em; transition: transform .2s var(--ease), box-shadow .2s, filter .2s; }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.05); }
.btn:active:not(:disabled) { transform: scale(.95); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { color: #fff; background: linear-gradient(135deg, #5b8cff 0%, var(--blue) 55%, var(--purple) 130%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 10px 22px -8px rgba(59, 108, 246, .75); }
.btn-soft { background: var(--surface); color: var(--blue); box-shadow: var(--vinyl), 0 4px 12px rgba(40, 56, 130, .14); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: 1.05rem; }

.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 99px; font-size: .8rem; font-weight: 700; background: var(--blue-soft); color: var(--blue); }
.chip-yellow { background: var(--yellow-soft); color: #8a6200; }

.page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.page-head h2 { font-size: clamp(1.35rem, 2.6vw, 2rem); line-height: 1.15; letter-spacing: .01em; }
.eyebrow { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-2); }
.head-ico { width: 60px; height: 60px; flex: none; border-radius: 20px; display: grid; place-items: center; font-size: 1.9rem;
  box-shadow: var(--vinyl), 0 10px 20px -8px rgba(40, 56, 130, .35); animation: bob 4s ease-in-out infinite; }
.ico-yellow { background: linear-gradient(145deg, #fff6d9, #ffe08a); }
.ico-blue { background: linear-gradient(145deg, #e8efff, #b9ccff); }
.ico-purple { background: linear-gradient(145deg, #f2ebff, #d4c2ff); }
.ico-cyan { background: linear-gradient(145deg, #e3fafe, #aee9f5); }
.ico-green { background: linear-gradient(145deg, #e3faf0, #aeeccf); }
.lead { color: var(--ink-2); margin-bottom: 18px; max-width: 70ch; }

.float-slow { animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
.page.active .stagger > *, .page.active .menu-grid > *, .page.active .goal-grid > *, .page.active .materi-grid > *,
.page.active .guide-board > *, .page.active .summary-points > *, .page.active .books > * { animation: popIn .55s var(--ease) both; }
.page.active :is(.menu-grid, .goal-grid, .materi-grid, .guide-board, .summary-points, .books) > :nth-child(2) { animation-delay: .05s; }
.page.active :is(.menu-grid, .goal-grid, .materi-grid, .guide-board, .summary-points, .books) > :nth-child(3) { animation-delay: .1s; }
.page.active :is(.menu-grid, .goal-grid, .materi-grid, .guide-board, .summary-points, .books) > :nth-child(4) { animation-delay: .15s; }
.page.active :is(.menu-grid, .goal-grid, .materi-grid, .guide-board, .summary-points, .books) > :nth-child(5) { animation-delay: .2s; }
.page.active :is(.menu-grid, .goal-grid, .materi-grid, .guide-board, .summary-points, .books) > :nth-child(6) { animation-delay: .25s; }
.page.active :is(.menu-grid, .goal-grid, .materi-grid, .guide-board, .summary-points, .books) > :nth-child(7) { animation-delay: .3s; }
.page.active :is(.menu-grid, .goal-grid, .materi-grid, .guide-board, .summary-points, .books) > :nth-child(8) { animation-delay: .35s; }

/* =============================================================
   HALAMAN 1 — MENU UTAMA
   ============================================================= */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: center; margin-bottom: 22px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 3rem); line-height: 1.08; margin: 12px 0 10px; letter-spacing: .01em; }
.grad-text { background: linear-gradient(90deg, var(--blue), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(1rem, 1.8vw, 1.25rem); color: var(--ink-2); font-weight: 600; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-art svg { width: 100%; max-width: 440px; margin-left: auto; }

.menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.menu-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 130px; padding: 18px 12px; border-radius: var(--radius); text-align: center;
  background: var(--card-bg, #fff); box-shadow: var(--vinyl), 0 12px 24px -12px rgba(40, 56, 130, .45);
  transition: transform .25s var(--ease), box-shadow .25s; }
.menu-card::before { content: ""; position: absolute; inset: 8px 8px auto 8px; height: 38%; border-radius: 16px 16px 40px 40px; background: linear-gradient(180deg, rgba(255, 255, 255, .7), transparent); pointer-events: none; }
.menu-card:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: var(--vinyl), 0 20px 30px -12px rgba(40, 56, 130, .5); }
.menu-card:active, .menu-card.pressed { transform: scale(.94); }
.menu-ico { font-size: 2.4rem; width: 70px; height: 70px; display: grid; place-items: center; border-radius: 22px;
  background: rgba(255, 255, 255, .75); box-shadow: inset 0 -5px 10px rgba(0, 0, 0, .06), 0 6px 12px -4px rgba(40, 56, 130, .3);
  filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .12)); transition: transform .3s var(--ease); }
.menu-card:hover .menu-ico { transform: scale(1.1) translateY(-2px); }
.menu-name { font-weight: 800; font-size: .95rem; text-transform: uppercase; letter-spacing: .03em; }
.c-yellow { --card-bg: linear-gradient(160deg, #fff8e0, #ffe49a); }
.c-blue { --card-bg: linear-gradient(160deg, #eef3ff, #c6d6ff); }
.c-purple { --card-bg: linear-gradient(160deg, #f5efff, #dccdff); }
.c-cyan { --card-bg: linear-gradient(160deg, #e8fbfe, #b6ecf6); }
.c-green { --card-bg: linear-gradient(160deg, #e9fbf3, #b8eed5); }

.quick-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 20px; padding: 12px 14px; border-radius: 18px; background: var(--surface-2); }
.quick-label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.quick-list { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-list button { font-size: .78rem; font-weight: 600; padding: 6px 12px; border-radius: 99px; background: #fff; box-shadow: 0 2px 5px rgba(40, 56, 130, .1); transition: background .2s, transform .2s; }
.quick-list button:hover { background: var(--blue-soft); transform: translateY(-1px); }

/* =============================================================
   HALAMAN 2 — PETUNJUK
   ============================================================= */
.split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 24px; align-items: center; }
.guide-board { display: grid; gap: 10px; padding: 18px; border-radius: var(--radius); background: linear-gradient(160deg, #fffdf5, #fff4cf); box-shadow: var(--vinyl), var(--shadow); border: 3px dashed #f3d77f; }
.guide-item { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; padding: 10px 14px; border-radius: 16px; background: #fff; box-shadow: 0 3px 8px rgba(120, 90, 10, .08); transition: transform .2s var(--ease), background .2s; }
.guide-item:hover { transform: translateX(6px); }
.guide-item .num { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #7a5600; background: var(--yellow); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6); transition: all .25s; }
.guide-item.done { background: var(--green-soft); }
.guide-item.done .num { background: var(--green); color: #fff; }
.guide-item.done .num::after { content: "✓"; }
.guide-item.done .num { font-size: 0; }
.guide-item.done .num::after { font-size: 1rem; }
.illus-card { text-align: center; }
.illus-card svg { width: 100%; max-width: 280px; margin: 0 auto; }
.illus-card figcaption { margin-top: 10px; font-size: .85rem; color: var(--ink-2); font-weight: 600; }

/* =============================================================
   HALAMAN 3 — TUJUAN
   ============================================================= */
.goal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.goal-card { position: relative; padding: 18px; border-radius: var(--radius); background: #fff; box-shadow: var(--vinyl), var(--shadow); transition: transform .25s var(--ease); }
.goal-card:hover { transform: translateY(-4px); }
.goal-ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 16px; font-size: 1.6rem; background: linear-gradient(145deg, var(--blue-soft), #d4e0ff); margin-bottom: 10px; box-shadow: var(--vinyl); }
.goal-card:nth-child(even) .goal-ico { background: linear-gradient(145deg, var(--purple-soft), #ddd0ff); }
.goal-no { position: absolute; top: 14px; right: 16px; font-weight: 800; font-size: 1.4rem; color: #d5ddf5; }
.goal-card p { font-weight: 600; }

/* =============================================================
   HALAMAN 4 — MATERI
   ============================================================= */
.materi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.materi-card { position: relative; display: flex; flex-direction: column; text-align: left; padding: 18px; border-radius: var(--radius);
  background: #fff; box-shadow: var(--vinyl), var(--shadow); transition: transform .25s var(--ease), box-shadow .25s; }
.materi-card:hover { transform: translateY(-6px); box-shadow: var(--vinyl), var(--shadow-lg); }
.materi-card:active { transform: scale(.97); }
.materi-art { width: 100%; height: auto; border-radius: 16px; background: linear-gradient(160deg, #f1f5ff, #eadfff); margin: 10px 0 12px; }
.materi-badge { align-self: flex-start; font-size: .75rem; font-weight: 800; padding: 4px 12px; border-radius: 99px; background: var(--purple-soft); color: var(--purple); }
.read-flag { position: absolute; top: 16px; right: 16px; font-size: .75rem; font-weight: 800; padding: 4px 10px; border-radius: 99px; background: var(--green-soft); color: #0d7a51; opacity: 0; transform: scale(.7); transition: all .3s var(--ease); }
.materi-card.read .read-flag { opacity: 1; transform: none; }
.materi-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.materi-card ul { display: grid; gap: 4px; margin-bottom: 12px; color: var(--ink-2); font-size: .92rem; }
.materi-card li::before { content: "•"; color: var(--cyan); font-weight: 800; margin-right: 8px; }
.card-more { margin-top: auto; font-weight: 800; color: var(--blue); font-size: .9rem; }
.read-status { margin-top: 14px; font-weight: 700; color: var(--ink-2); }

/* =============================================================
   HALAMAN 5 — PENERAPAN
   ============================================================= */
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; counter-reset: flow; }
.flow li { position: relative; }
.flow li:not(:last-child)::after { content: "→"; position: absolute; right: -10px; top: 50%; transform: translate(50%, -50%); font-weight: 800; color: var(--cyan); z-index: 1; }
.flow-step { width: 100%; min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  border-radius: 18px; background: #fff; font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em;
  box-shadow: var(--vinyl), var(--shadow); transition: transform .25s var(--ease), background .25s; }
.flow-ico { font-size: 1.7rem; }
.flow-step:hover { transform: translateY(-4px); }
.flow-step.active { background: linear-gradient(160deg, var(--cyan-soft), #b8eef8); transform: translateY(-4px); box-shadow: var(--vinyl), 0 12px 22px -10px rgba(20, 184, 216, .7); }
.flow-detail { padding: 18px 20px; border-radius: var(--radius); background: var(--cyan-soft); border-left: 6px solid var(--cyan); margin-bottom: 20px; animation: popIn .4s var(--ease); }
.flow-detail h3 { margin-bottom: 4px; }
.challenge-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 22px;
  border-radius: var(--radius); background: linear-gradient(135deg, #fff8e0, #ffeaa8); box-shadow: var(--vinyl), var(--shadow); }
.challenge-text { flex: 1 1 320px; }
.quote { font-size: 1.1rem; font-weight: 700; margin-top: 10px; color: #5a4300; }

/* Checklist tantangan (modal) */
.check-list { display: grid; gap: 8px; margin: 14px 0; }
.check-list label { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: var(--surface-2); cursor: pointer; font-weight: 600; }
.check-list input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.check-list label:has(input:checked) { background: var(--green-soft); text-decoration: line-through; color: var(--ink-2); }
.timer { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--blue-soft); }
.timer-display { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--blue); min-width: 90px; }

/* =============================================================
   HALAMAN 6 — JENIS & TEKNIK
   ============================================================= */
.two-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { padding: 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--vinyl), var(--shadow); }
.panel-title { display: flex; align-items: center; gap: 8px; font-size: 1.2rem; margin-bottom: 12px; }
.panel-hint { font-size: .85rem; color: var(--ink-2); margin: -6px 0 10px; }
.panel-group + .panel-group { margin-top: 14px; }
.panel-group h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); margin-bottom: 8px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list > li:not(:has(button)), .tag-list button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 14px; font-weight: 700; font-size: .92rem; background: var(--blue-soft); color: #23408f; box-shadow: var(--vinyl); }
.tag-list.alt > li:not(:has(button)), .tag-list.alt button { background: var(--purple-soft); color: #4b2a9a; }
.tag-list button { min-height: 44px; transition: transform .2s var(--ease), background .2s; }
.tag-list button:hover { transform: translateY(-2px); }
.tag-list button.active { background: var(--blue); color: #fff; }
.tag-list.alt button.active { background: var(--purple); color: #fff; }
.tech-info { display: flex; gap: 14px; align-items: center; margin-top: 16px; padding: 14px; border-radius: 16px; background: var(--surface-2); min-height: 92px; }
.tech-swatch { flex: none; width: 64px; height: 64px; border-radius: 16px; background: #e7ecfa; box-shadow: var(--vinyl); display: grid; place-items: center; overflow: hidden; }
.tech-swatch svg { width: 100%; height: 100%; }
.tech-info p { font-size: .92rem; color: var(--ink-2); }
.tech-info.flash { animation: popIn .35s var(--ease); }

/* =============================================================
   HALAMAN 7 — TEKNIK PERSPEKTIF
   ============================================================= */
.stepper { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 8px; scrollbar-width: thin; }
.step-tab { flex: none; min-height: 44px; padding: 0 16px; border-radius: 14px; font-weight: 700; font-size: .9rem; background: var(--surface-2); box-shadow: var(--vinyl); transition: all .2s var(--ease); }
.step-tab:hover { background: var(--blue-soft); }
.step-tab[aria-selected="true"] { background: var(--blue); color: #fff; box-shadow: 0 8px 16px -6px rgba(59, 108, 246, .7); }
.teknik-body { display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; align-items: start; }
.teknik-text { padding: 20px; border-radius: var(--radius); background: #fff; box-shadow: var(--vinyl), var(--shadow); }
.teknik-text h3 { font-size: 1.3rem; margin-bottom: 8px; }
.teknik-text p { color: var(--ink-2); margin-bottom: 10px; }
.tips { display: grid; gap: 6px; margin-bottom: 16px; }
.tips li { padding: 8px 12px; border-radius: 12px; background: var(--yellow-soft); font-size: .9rem; font-weight: 600; }
.tips li::before { content: "💡 "; }
.diagram-box { position: relative; aspect-ratio: 4/3; border-radius: var(--radius); background: #fff; box-shadow: var(--vinyl), var(--shadow); overflow: hidden;
  background-image: linear-gradient(#eef2fb 1px, transparent 1px), linear-gradient(90deg, #eef2fb 1px, transparent 1px); background-size: 24px 24px; }
.diagram-empty { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; color: var(--ink-2); padding: 20px; }
.diagram-empty span { font-size: 3rem; }
.diagram-canvas { position: absolute; inset: 0; }
.diagram-canvas svg { width: 100%; height: 100%; }
/* animasi garis diagram */
.draw { stroke-dasharray: var(--len, 1000); stroke-dashoffset: var(--len, 1000); animation: drawLine 1s var(--ease) forwards; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }
.pop { opacity: 0; transform-box: fill-box; transform-origin: center; animation: popSvg .5s var(--ease) forwards; }
@keyframes popSvg { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.fadein { opacity: 0; animation: fadeSvg .6s ease forwards; }
@keyframes fadeSvg { to { opacity: 1; } }

/* =============================================================
   HALAMAN 8 — VIDEO
   ============================================================= */
.video-shell { position: relative; max-width: 900px; margin: 0 auto; aspect-ratio: 16/9; border-radius: 26px; overflow: hidden;
  background: linear-gradient(145deg, #1e2a5e, #3a2a7a); box-shadow: var(--shadow-lg); border: 8px solid #fff; }
.video-shell video { width: 100%; height: 100%; object-fit: contain; background: #000; display: none; }
.video-shell.has-video video { display: block; }
.video-shell.has-video .video-placeholder { display: none; }
.video-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; color: #fff;
  background: radial-gradient(circle at 30% 20%, rgba(91, 140, 255, .5), transparent 50%), radial-gradient(circle at 80% 80%, rgba(139, 92, 246, .5), transparent 50%); }
.vp-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .18); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4); animation: pulse 2.4s ease-in-out infinite; }
.vp-icon svg { width: 38px; fill: #fff; }
@keyframes pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(255, 255, 255, .08); } }
.video-placeholder h3 { font-size: clamp(1rem, 2.2vw, 1.4rem); }
.video-placeholder p { opacity: .85; font-size: .9rem; max-width: 46ch; }
.video-placeholder code { font-size: .8rem; padding: 4px 10px; border-radius: 8px; background: rgba(255, 255, 255, .15); }
.video-controls { max-width: 900px; margin: 14px auto 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px; border-radius: 20px; background: #fff; box-shadow: var(--vinyl), var(--shadow); }
.vbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 14px; font-weight: 700; font-size: .85rem; background: var(--surface-2); box-shadow: var(--vinyl); transition: transform .2s var(--ease), background .2s; }
.vbtn svg { width: 18px; height: 18px; fill: currentColor; }
.vbtn:hover:not(:disabled) { background: var(--blue-soft); transform: translateY(-2px); }
.vbtn:disabled { opacity: .4; cursor: not-allowed; }
.video-controls input[type=range] { accent-color: var(--blue); min-height: 44px; }
#vSeek { flex: 1 1 160px; }
#vVol { width: 90px; }
.vtime { font-size: .82rem; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* =============================================================
   HALAMAN 9 — LATIHAN
   ============================================================= */
.score-pill { margin-left: auto; padding: 8px 16px; border-radius: 99px; background: var(--green-soft); color: #0d7a51; font-weight: 700; }
.quiz, .result { max-width: 820px; margin: 0 auto; padding: clamp(18px, 3vw, 28px); border-radius: var(--radius); background: #fff; box-shadow: var(--vinyl), var(--shadow); }
.quiz-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; color: var(--ink-2); font-size: .9rem; margin-bottom: 12px; }
.quiz-dots { display: flex; gap: 5px; }
.quiz-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--line); transition: background .3s; }
.quiz-dots i.now { background: var(--blue); }
.quiz-dots i.ok { background: var(--green); }
.quiz-dots i.no { background: var(--red); }
.q-text { font-size: clamp(1.08rem, 2vw, 1.35rem); margin-bottom: 16px; }
.q-options { display: grid; gap: 10px; }
.q-opt { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; min-height: 54px; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); border: 2px solid transparent; font-weight: 600; transition: transform .2s var(--ease), background .2s, border-color .2s; }
.q-opt:hover:not(:disabled) { transform: translateX(4px); background: var(--blue-soft); }
.q-opt:disabled { cursor: default; }
.q-opt .letter { flex: none; width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; background: #fff; box-shadow: var(--vinyl); }
.q-opt.correct { background: var(--green-soft); border-color: var(--green); animation: bounce .45s var(--ease); }
.q-opt.correct .letter { background: var(--green); color: #fff; }
.q-opt.wrong { background: var(--red-soft); border-color: var(--red); animation: shake .4s; }
.q-opt.wrong .letter { background: var(--red); color: #fff; }
@keyframes bounce { 40% { transform: scale(1.03); } }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.q-feedback { margin-top: 14px; border-radius: 14px; font-weight: 600; }
.q-feedback:not(:empty) { padding: 12px 16px; animation: popIn .3s var(--ease); }
.q-feedback.ok { background: var(--green-soft); color: #0b5e3f; }
.q-feedback.no { background: var(--red-soft); color: #8a1f23; }
.q-actions { display: flex; justify-content: flex-end; margin-top: 16px; }
.result { text-align: center; animation: pageZoom .5s var(--ease); }
.result-medal { font-size: 4rem; animation: float 3s ease-in-out infinite; }
.result-score { font-size: clamp(3rem, 8vw, 4.5rem); font-weight: 900; line-height: 1; background: linear-gradient(90deg, var(--blue), var(--purple)); -webkit-background-clip: text; background-clip: text; color: transparent; margin: 6px 0; }
.result-score small { font-size: .35em; }
.result-cat { display: inline-block; font-weight: 800; font-size: 1.1rem; padding: 6px 18px; border-radius: 99px; background: var(--yellow-soft); color: #7a5600; }
.result-detail { margin: 12px 0 18px; color: var(--ink-2); }
.result-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* =============================================================
   HALAMAN 10 — RANGKUMAN
   ============================================================= */
.summary-wrap { display: grid; grid-template-columns: .7fr 1.3fr; gap: 24px; align-items: start; }
.mindmap { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 20px; border-radius: var(--radius); background: linear-gradient(170deg, #eef3ff, #f3ecff); box-shadow: var(--vinyl), var(--shadow); }
.mindmap li { position: relative; width: 100%; max-width: 240px; text-align: center; padding: 10px 14px; border-radius: 14px; background: #fff; font-weight: 700; box-shadow: 0 4px 10px -4px rgba(40, 56, 130, .3); }
.mindmap li:not(:last-child)::after { content: "↓"; position: absolute; left: 50%; bottom: -21px; transform: translateX(-50%); color: var(--purple); font-weight: 900; }
.mindmap .mm-root { color: #fff; background: linear-gradient(135deg, var(--blue), var(--purple)); font-size: 1.1rem; letter-spacing: .08em; }
.summary-points { display: grid; gap: 12px; counter-reset: sp; }
.summary-points li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: #fff; box-shadow: var(--vinyl), var(--shadow); font-weight: 600; }
.summary-points li span { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 1.4rem; border-radius: 14px; background: var(--cyan-soft); }

/* =============================================================
   HALAMAN 11 — REFERENSI
   ============================================================= */
.shelf { overflow: hidden; padding: 24px 20px 0; border-radius: var(--radius); background: linear-gradient(180deg, #fff9ec, #f7e6c3); box-shadow: var(--vinyl), var(--shadow); }
.books { display: flex; align-items: flex-end; gap: 12px; overflow-x: auto; padding: 10px 6px 0; }
.book { position: relative; flex: 1 0 130px; min-height: 230px; padding: 14px 12px 18px; border-radius: 10px 14px 4px 4px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, .12), inset -2px 0 0 rgba(255, 255, 255, .25), 0 8px 14px -6px rgba(0, 0, 0, .35); transition: transform .3s var(--ease); }
.book:hover { transform: translateY(-10px) rotate(-1.5deg); }
.book::after { content: ""; position: absolute; left: 12px; right: 12px; top: 56px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .5); }
.bk1 { background: linear-gradient(160deg, #5b8cff, #3b5fd6); min-height: 250px; }
.bk2 { background: linear-gradient(160deg, #9b73f5, #6e46cf); }
.bk3 { background: linear-gradient(160deg, #26c6e2, #0d99b6); min-height: 260px; }
.bk4 { background: linear-gradient(160deg, #3ecf95, #16a06a); min-height: 240px; }
.bk5 { background: linear-gradient(160deg, #ffc94a, #e9a613); color: #4d3500; min-height: 220px; }
.book-no { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; background: rgba(255, 255, 255, .25); }
.book-title { font-weight: 800; font-size: .95rem; line-height: 1.3; }
.shelf-board { height: 22px; margin: 0 -20px; border-radius: 0 0 var(--radius) var(--radius); background: linear-gradient(180deg, #d9a765, #b98545); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .3); }
.note { margin-top: 18px; padding: 14px 18px; border-radius: 16px; background: var(--yellow-soft); color: #5a4300; }

/* =============================================================
   HALAMAN 12 — PENGEMBANG
   ============================================================= */
.profile-card { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: center; max-width: 900px; margin: 0 auto; padding: clamp(20px, 3vw, 34px);
  border-radius: 30px; background: linear-gradient(150deg, #ffffff, #eef3ff 60%, #f3ecff); box-shadow: var(--vinyl), var(--shadow-lg); }
.avatar svg { width: 100%; max-width: 280px; margin: 0 auto; }
.profile-name { font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.profile-role { font-weight: 700; color: var(--blue); margin: 8px 0 16px; font-size: 1.05rem; }
.profile-meta { display: grid; gap: 10px; margin-bottom: 18px; }
.profile-meta div { padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: var(--vinyl); }
.profile-meta dt { font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-2); }
.profile-meta dd { font-weight: 700; }
.eco-badge { display: inline-block; padding: 2px 12px; border-radius: 99px; color: #fff; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.motto { font-size: 1.1rem; font-weight: 700; font-style: italic; padding: 14px 18px; border-radius: 16px; border-left: 6px solid var(--yellow); background: var(--yellow-soft); color: #5a4300; }

/* =============================================================
   MODAL & TOAST
   ============================================================= */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 28, 70, .45); backdrop-filter: blur(4px); animation: fadeSvg .25s ease forwards; }
.modal-card { position: relative; width: min(720px, 100%); max-height: 88vh; max-height: 88dvh; overflow-y: auto; padding: clamp(20px, 3vw, 30px); border-radius: 28px; background: #fff; box-shadow: var(--shadow-lg), var(--vinyl); animation: pageZoom .35s var(--ease); }
.modal-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 14px; font-size: 1.1rem; font-weight: 800; background: var(--surface-2); }
.modal-close:hover { background: var(--red-soft); }
.modal-card h2 { font-size: 1.4rem; margin: 6px 44px 12px 0; }
.modal-card h3 { font-size: 1.02rem; margin: 16px 0 6px; color: var(--blue); }
.modal-card p { color: var(--ink-2); }
.modal-card .m-art { margin: 10px 0; border-radius: 16px; background: linear-gradient(160deg, #f1f5ff, #eadfff); }
.modal-card .m-art svg { width: 100%; height: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px); z-index: 60; padding: 12px 20px; border-radius: 16px; background: var(--ink); color: #fff; font-weight: 700; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: all .3s var(--ease); max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .menu-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .flow { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .flow li:nth-child(3)::after { display: none; }
  .teknik-body { grid-template-columns: 1fr; }
  .diagram-box { order: -1; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art svg { max-width: 360px; margin: 0 auto; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .two-panel, .summary-wrap { grid-template-columns: 1fr; }
  .materi-grid { grid-template-columns: 1fr; }
  .profile-card { grid-template-columns: 1fr; text-align: center; }
  .profile-meta { text-align: left; }
  .motto { text-align: left; }
  .illus-card svg { max-width: 200px; }
  .header-center { display: none; }
  .dots { display: none; }
  .foot-count { display: block; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .app { padding: 8px; gap: 8px; }
  .brand-text small { display: none; }
  .brand-logo svg { width: 38px; height: 38px; }
  .icon-btn { width: 42px; height: 42px; }
  .header-actions { gap: 6px; }
  .stage { border-radius: 22px; }
  .page-head { gap: 12px; }
  .head-ico { width: 50px; height: 50px; font-size: 1.5rem; border-radius: 16px; }
  .menu-card { min-height: 112px; }
  .menu-ico { width: 58px; height: 58px; font-size: 2rem; }
  .menu-name { font-size: .8rem; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li::after { display: none !important; }
  .nav-btn { padding: 0 12px; }
  .nav-btn span { display: none; }
  .hero-art svg { max-width: 260px; }
  .score-pill { font-size: .85rem; padding: 6px 12px; }
  .page-head:has(.score-pill) { flex-wrap: wrap; }
  .book { flex-basis: 110px; min-height: 200px; }
  .toast { bottom: 84px; }
}
/* Layar pendek (laptop kecil / landscape HP) */
@media (max-height: 560px) {
  .app { padding: 6px 10px; gap: 6px; }
  .app-header { padding: 4px 8px; }
  .nav-btn { min-height: 42px; }
}

/* Hormati pengaturan kurangi gerakan */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .draw { stroke-dashoffset: 0 !important; }
  .pop, .fadein { opacity: 1 !important; }
}

/* Mode layar penuh */
:fullscreen .app { max-width: none; }
