/* ===== Ruang Belajar Clarissa — gaya peach/coral, judul Fredoka ===== */
:root {
  --bg: #fff3e8;
  --white: #ffffff;
  --ink: #3a1e2b;
  --ink2: #5b4450;
  --muted: #8d8088;
  --line: #f6e2d6;
  --soft: #fff4ec;
  --soft2: #ffe6d8;
  --coral: #f2603f;
  --coral-d: #d9492a;
  --orange: #f9a24b;
  --plum: #3d1f2b;
  --pink: #e86a8b;
  --yellow: #f7c948;
  --green: #2bb673;
  --red: #e5484d;
  --r-xl: 34px;
  --r-lg: 26px;
  --r-md: 18px;
  --shadow: 0 14px 36px rgba(210, 110, 60, .14);
  --display: "Fredoka", "Poppins", system-ui, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg) radial-gradient(1200px 600px at 10% -10%, #ffe1cc 0, transparent 60%) no-repeat;
  color: var(--ink); font-size: 15px; line-height: 1.65; min-height: 100vh; display: flex; flex-direction: column;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.15; font-family: var(--display); font-weight: 700; letter-spacing: -.2px; }
.ic { flex-shrink: 0; display: block; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Header pil melayang ===== */
.site-header { position: sticky; top: 0; z-index: 40; padding: 14px 24px 0; }
.header-pill {
  max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 18px;
  background: rgba(255, 250, 246, .9); backdrop-filter: blur(12px); border: 1px solid #fbe7da;
  border-radius: 999px; padding: 9px 10px 9px 12px; box-shadow: 0 10px 30px rgba(210, 110, 60, .12);
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; background: #fff1e6; display: grid; place-items: center; overflow: hidden; }
.brand-name { font-family: var(--display); font-weight: 700; font-size: 15px; line-height: 1.1; color: var(--ink); display: flex; flex-direction: column; }
.brand-name b { color: var(--coral); font-weight: 600; font-size: 14px; }
.nav { display: flex; gap: 4px; margin: 0 auto; }
.nav a { padding: 10px 20px; border-radius: 999px; color: var(--ink2); font-weight: 500; font-size: 15px; transition: background .15s, color .15s; }
.nav a:hover { background: var(--soft); }
.nav a.on { background: #ffe1d4; color: var(--coral); font-weight: 600; }
.nav a.ask-m { display: none; }
.header-right { display: flex; align-items: center; gap: 10px; }
.user-chip { padding: 9px 16px; border-radius: 999px; border: 1px solid #f3dccf; background: #fff; font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.user-chip:hover { background: var(--soft); }
.btn-ask { padding: 10px 20px; border-radius: 999px; background: #ffe6dc; color: var(--coral); border: 1px solid #f9c7b3; font-weight: 600; font-size: 15px; transition: background .15s; white-space: nowrap; }
.btn-ask:hover, .btn-ask.on { background: #ffd6c6; }
.menu-btn { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #f3dccf; background: #fff; font-size: 18px; }
.view { flex: 1; padding: 36px 0 70px; outline: none; }
.site-footer { padding: 22px 0; color: var(--muted); font-size: 13px; text-align: center; }

/* ===== Tipografi & util ===== */
.display { font-family: var(--display); font-weight: 700; font-size: clamp(38px, 5.4vw, 66px); line-height: 1.05; letter-spacing: -1px; }
.h1 { font-size: clamp(28px, 3.4vw, 40px); }
.h2 { font-size: 24px; }
.h3 { font-size: 18px; }
.lead { font-size: 18px; color: var(--ink2); line-height: 1.7; }
.muted { color: var(--muted); }
.coral { color: var(--coral); }
.small { font-size: 13px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.mt { margin-top: 18px; } .mt2 { margin-top: 36px; } .mt3 { margin-top: 64px; } .mb { margin-bottom: 14px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid { display: grid; gap: 22px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.grid > * { min-width: 0; }
.eyebrow { display: inline-block; padding: 6px 16px; border-radius: 999px; background: #ffe2d6; border: 1px solid #f9c7b3; color: var(--coral); font-size: 12.5px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border-radius: 999px; background: #fff; border: 1px solid #fbe0d2; color: var(--coral); font-size: 14px; font-weight: 600; }
.crumb { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; flex-wrap: wrap; }
.crumb a:hover { color: var(--coral); }

/* ===== Tombol ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: none; border-radius: 999px;
  padding: 15px 30px; font-weight: 600; font-size: 16px; background: var(--coral); color: #fff;
  transition: transform .12s, background .15s, opacity .15s; white-space: nowrap; box-shadow: 0 10px 22px rgba(242, 96, 63, .25);
}
.btn:hover { background: var(--coral-d); }
.btn:active { transform: scale(.97); }
.btn.dark { background: var(--ink); box-shadow: none; } .btn.dark:hover { background: #24111a; }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid #f3dccf; box-shadow: none; }
.btn.ghost:hover { background: var(--soft); }
.btn.soft { background: #ffe6dc; color: var(--coral); box-shadow: none; } .btn.soft:hover { background: #ffd6c6; }
.btn.block { width: 100%; }
.btn.sm { padding: 9px 18px; font-size: 13.5px; }
.btn:disabled { opacity: .45; pointer-events: none; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: none; display: grid; place-items: center; background: #fff1ea; color: var(--coral); transition: background .15s, transform .2s; flex-shrink: 0; }
.icon-btn:hover { background: #ffe1d4; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 13px; border-radius: 999px; background: #ffe6dc; color: var(--coral); font-size: 12.5px; font-weight: 600; }
.chip.dark { background: #f1e7ea; color: var(--ink); }
.chip.green { background: #e1f6ec; color: #13895a; }
.chip.white { background: rgba(255, 255, 255, .6); color: var(--ink); }

/* ===== Kartu umum ===== */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 26px; box-shadow: 0 6px 20px rgba(210, 110, 60, .06); }
.card.hover { transition: transform .15s, box-shadow .15s; }
.card.hover:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-card .lbl { font-weight: 500; font-size: 14.5px; }
.stat-card .val { color: var(--coral); font-weight: 600; font-size: 15px; }

/* ===== Beranda ===== */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 30px 0 10px; }
.hero .display .hl { color: var(--coral); }
.hero .lead { max-width: 640px; margin: 26px 0 32px; }
.fox-card {
  position: relative; border-radius: 40px; padding: 30px 36px 36px; min-height: 560px; color: #fff; display: flex; flex-direction: column;
  background: radial-gradient(circle at 15% 25%, #ff9a4a 0, transparent 35%), radial-gradient(circle at 85% 18%, #f0432e 0, transparent 35%), radial-gradient(circle at 85% 85%, #f9b24b 0, transparent 30%), #f05a3c;
  box-shadow: 0 30px 60px rgba(240, 90, 60, .28);
}
.fox-card .lbl { font-family: var(--display); font-weight: 700; font-size: 17px; opacity: .95; }
.fox-card .face { margin: 26px auto 30px; width: min(290px, 70%); aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 20px 40px rgba(120, 30, 10, .18); }
.fox-card .face svg { width: 74%; height: auto; }
.fox-card h3 { font-size: clamp(30px, 3.2vw, 44px); text-transform: uppercase; line-height: 1.05; margin-top: auto; }
.fox-card p { margin: 12px 0 0; opacity: .95; }
.fox-card .tag { position: absolute; top: -18px; right: -14px; background: var(--plum); color: #fff; padding: 12px 22px; border-radius: 22px; font-family: var(--display); font-weight: 700; transform: rotate(5deg); box-shadow: 0 10px 20px rgba(58, 30, 43, .25); }
.section-head { max-width: 760px; }
.section-head h2 { font-size: clamp(30px, 3.6vw, 44px); margin-top: 16px; }
.section-head p { color: var(--ink2); font-size: 17px; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 22px; margin-top: 30px; }
.step-card { border-radius: 30px; padding: 28px; color: #fff; min-height: 270px; box-shadow: 0 18px 36px rgba(210, 110, 60, .18); transition: transform .15s; }
.step-card:hover { transform: translateY(-4px); }
.step-card .si { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: rgba(255, 255, 255, .2); margin-bottom: 26px; }
.step-card .k { font-size: 13.5px; font-weight: 600; opacity: .85; }
.step-card h3 { font-size: 22px; margin: 4px 0 10px; }
.step-card p { margin: 0; font-size: 14.5px; opacity: .92; }
.step-card.light { color: var(--ink); } .step-card.light .si { background: rgba(255, 255, 255, .45); }
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.feature .art-card { position: relative; border-radius: 36px; aspect-ratio: 1.3; background: radial-gradient(circle at 15% 15%, #ff9a4a 0, transparent 35%), radial-gradient(circle at 80% 20%, #ef3d2b 0, transparent 30%), radial-gradient(circle at 85% 80%, #f9b24b 0, transparent 30%), #f05a3c; display: grid; place-items: center; box-shadow: var(--shadow); }
.feature .art-card .face { width: 48%; aspect-ratio: 1; border-radius: 50%; background: #fff; display: grid; place-items: center; }
.feature .art-card .face svg { width: 74%; height: auto; }
.feature .notif { position: absolute; left: 6%; bottom: -26px; background: rgba(255, 238, 232, .96); border-radius: 22px; padding: 14px 22px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow); max-width: 70%; }
.feature .notif .ni { width: 42px; height: 42px; border-radius: 50%; background: #ffd9cb; color: var(--coral); display: grid; place-items: center; flex-shrink: 0; }
.feat-list { display: flex; flex-direction: column; gap: 24px; margin-top: 28px; }
.feat-list .f { display: flex; gap: 18px; }
.feat-list .fi { width: 50px; height: 50px; border-radius: 16px; background: #ffe4d4; color: var(--coral); display: grid; place-items: center; flex-shrink: 0; }
.feat-list b { font-family: var(--display); font-size: 18px; display: block; }
.feat-list span { color: var(--ink2); }
.note { border: 1px solid var(--line); background: rgba(255, 255, 255, .6); border-radius: 18px; padding: 14px 20px; color: var(--ink2); font-size: 14px; }

/* ===== Daftar & kartu materi ===== */
.list { display: flex; flex-direction: column; gap: 16px; }
.item { display: flex; align-items: center; gap: 16px; border-radius: 20px; padding: 6px; margin: -6px; transition: background .15s; }
.item:hover { background: var(--soft); }
.th { width: 72px; height: 72px; border-radius: 20px; overflow: hidden; flex-shrink: 0; box-shadow: 0 8px 18px rgba(242, 96, 63, .14); background: var(--soft2); position: relative; }
.th svg, .th img { width: 100%; height: 100%; object-fit: cover; }
.th .lock { position: absolute; right: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 8px; background: rgba(58, 30, 43, .85); color: #fff; display: grid; place-items: center; }
.item .t { font-weight: 500; font-size: 15px; }
.item .s { color: var(--muted); font-size: 13px; margin-top: 2px; }
.bar { height: 6px; border-radius: 99px; background: #f6e7de; margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--coral); border-radius: 99px; }
.mat-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.mat-card .cover { height: 160px; background: var(--soft2); position: relative; overflow: hidden; }
.mat-card .cover svg, .mat-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.mat-card .body { padding: 18px 20px 20px; }
.mat-card .t { font-family: var(--display); font-weight: 600; font-size: 18px; }
.empty { text-align: center; padding: 20px 20px 30px; max-width: 540px; margin: 0 auto; }
.empty p { color: var(--muted); }

/* ===== Detail materi ===== */
.mat-head { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: stretch; }
.mat-banner { border-radius: var(--r-xl); padding: 34px 38px; color: #fff; position: relative; overflow: hidden; background: radial-gradient(circle at 90% 10%, #ef3d2b 0, transparent 40%), radial-gradient(circle at 10% 90%, #f9b24b 0, transparent 40%), #f05a3c; }
.mat-banner h1 { font-size: clamp(28px, 3.4vw, 42px); color: #fff; }
.mat-banner .sub { opacity: .9; margin-top: 8px; }
.mat-banner .face { position: absolute; right: -20px; bottom: -30px; width: 170px; opacity: .25; }
.btn.white { background: #fff; color: var(--ink); box-shadow: none; } .btn.white:hover { background: var(--soft); }
.usage .num { font-size: 30px; font-weight: 700; font-family: var(--display); color: var(--coral); }
.usage .body { display: flex; align-items: center; gap: 22px; margin-top: 12px; }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.ring-wrap { position: relative; display: grid; place-items: center; }
.ring-wrap b { position: absolute; font-size: 15px; }
.ai-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 22px; border-radius: 20px; background: #fff; border: 1px dashed #f4b9a3; }
.ai-bar .grow b { display: block; }

/* Accordion bab (seperti contoh) */
.acc { display: flex; flex-direction: column; gap: 16px; }
.acc-item { background: #fff; border-radius: 28px; box-shadow: 0 10px 28px rgba(210, 110, 60, .1); border: 1px solid #fbe9df; overflow: hidden; }
.acc-head { display: flex; align-items: center; gap: 20px; padding: 20px 26px; cursor: pointer; user-select: none; }
.acc-head .num { width: 54px; height: 54px; border-radius: 16px; background: var(--coral); color: #fff; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 22px; flex-shrink: 0; }
.acc-head .num.done { background: var(--green); }
.acc-head h3 { font-size: 20px; }
.acc-head .meta { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acc-item.open > .acc-head { border-bottom: 1px solid #fbe9df; }
.acc-item.open > .acc-head .icon-btn { transform: rotate(180deg); }
.acc-body { display: none; padding: 26px 30px 30px; }
.acc-item.open > .acc-body { display: block; }
.sum-tools { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.local-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 18px; border-radius: 18px; background: #fff6df; border: 1px solid #f7d58a; color: #6b4a00; font-size: 14px; }
.sum-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 32px; align-items: start; }
.sum-grid.noimg { grid-template-columns: minmax(0, 1fr); }
.prose p { margin: 0 0 16px; font-size: 16.5px; line-height: 1.8; color: var(--ink); }
.side-fig { background: linear-gradient(180deg, #fff 0, #fff 60%, #ffe8da 100%); border-radius: 24px; padding: 14px; border: 1px solid #fbe9df; position: sticky; top: 110px; }
.side-fig img { border-radius: 16px; width: 100%; cursor: zoom-in; background: #fff; }
.side-fig .cap { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }
.side-fig .more-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.side-fig .more-imgs img { height: 70px; object-fit: cover; }
.subacc { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.sub-item { background: #fff3ec; border-radius: 18px; overflow: hidden; }
.sub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; cursor: pointer; font-weight: 600; }
.sub-head .ic { color: var(--coral); transition: transform .2s; }
.sub-item.open .sub-head .ic { transform: rotate(180deg); }
.sub-body { display: none; padding: 0 20px 16px; color: var(--ink2); }
.sub-item.open .sub-body { display: block; }
.step-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; margin-top: 26px; }
.step-links a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; transition: border-color .15s, transform .15s; }
.step-links a:hover { border-color: #f4b9a3; transform: translateY(-2px); }
.step-links .n { width: 32px; height: 32px; border-radius: 10px; background: #ffe6dc; color: var(--coral); display: grid; place-items: center; font-family: var(--display); flex-shrink: 0; }
.step-links a.done .n { background: var(--green); color: #fff; }
.step-links small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.mnemo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 18px; }
.mnemo { border-radius: 28px; padding: 26px 28px; color: #fff; }
.mnemo:nth-child(3n+1) { background: var(--coral); } .mnemo:nth-child(3n+2) { background: var(--plum); } .mnemo:nth-child(3n) { background: var(--orange); color: var(--ink); }
.mnemo h3 { font-size: 34px; text-transform: uppercase; }
.mnemo .pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.mnemo .pills span { background: rgba(255, 255, 255, .2); padding: 5px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; }
.mnemo .pills b { font-weight: 800; }
.mnemo p { margin: 0; font-size: 14px; opacity: .95; }
.gloss { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.kw { border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; background: #fffaf7; }
.kw .term { font-weight: 600; color: var(--coral); font-size: 15px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kw p { margin: 6px 0 0; font-size: 14px; color: var(--ink2); }
.kw .src { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ===== Halaman langkah bab ===== */
.chapter-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 28px; align-items: start; }
.ch-side { padding: 18px; position: sticky; top: 110px; }
.ch-side .mt-title { font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.ch-nav { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.ch-nav a { display: flex; gap: 10px; padding: 9px 10px; border-radius: 12px; font-size: 13.5px; color: var(--ink2); align-items: flex-start; }
.ch-nav a:hover { background: var(--soft); }
.ch-nav a.on { background: #ffe6dc; color: var(--ink); font-weight: 600; }
.ch-nav .n { flex-shrink: 0; width: 24px; height: 24px; border-radius: 8px; background: #f7ece6; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ch-nav a.on .n { background: var(--coral); color: #fff; }
.ch-nav .n.done { background: var(--green); color: #fff; }
.ch-select { display: none; }
.ch-head { border-radius: var(--r-xl); padding: 26px 32px; color: #fff; position: relative; overflow: hidden; background: radial-gradient(circle at 90% 10%, #ef3d2b 0, transparent 40%), radial-gradient(circle at 10% 90%, #f9b24b 0, transparent 40%), #f05a3c; }
.ch-head h1 { font-size: clamp(24px, 3vw, 34px); color: #fff; max-width: 80%; }
.ch-head .face { position: absolute; right: -10px; bottom: -40px; width: 150px; opacity: .25; }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 20px 0 26px; }
.stepper a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 20px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px; color: var(--ink2); }
.stepper a:hover { border-color: #f4b9a3; }
.stepper .n { flex-shrink: 0; width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; background: #f7ece6; font-family: var(--display); font-weight: 700; }
.stepper a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.stepper a.on .n { background: var(--coral); color: #fff; }
.stepper a.done .n { background: var(--green); color: #fff; }
.stepper small { display: block; font-weight: 400; font-size: 11.5px; opacity: .7; }
.next-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #ffe9de; border-radius: var(--r-lg); padding: 22px 26px; margin-top: 34px; flex-wrap: wrap; }
.next-cta b { display: block; font-family: var(--display); font-size: 19px; }
.core { background: var(--coral); color: #fff; border-radius: var(--r-lg); padding: 22px 26px; position: relative; overflow: hidden; margin-bottom: 24px; }
.core .k { font-size: 12px; font-weight: 600; letter-spacing: .6px; opacity: .85; text-transform: uppercase; }
.core p { margin: 6px 0 0; font-weight: 500; font-size: 17px; line-height: 1.55; position: relative; }
.core::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .12); }
mark { background: linear-gradient(transparent 55%, #ffd8b8 55%); color: inherit; font-weight: 600; padding: 0 1px; }
.core mark { background: rgba(255, 255, 255, .22); border-radius: 6px; padding: 0 4px; }

/* Peta konsep (gambar penjelas tanpa AI) */
.cmap { position: relative; height: 400px; border-radius: 22px; background: radial-gradient(circle at 50% 50%, #fff 0, #fff7f0 60%, #ffeede 100%); border: 1px solid var(--line); overflow: hidden; }
.cmap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cnode { position: absolute; transform: translate(-50%, -50%); max-width: 140px; padding: 7px 13px; border-radius: 16px; border: none; background: #fff; color: var(--ink); font-weight: 600; font-size: 12.5px; line-height: 1.3; text-align: center; box-shadow: 0 6px 16px rgba(186, 96, 40, .14); border-bottom: 4px solid var(--c, var(--coral)); transition: transform .15s; }
.cnode:hover, .cnode.on { transform: translate(-50%, -50%) scale(1.08); }
.cnode.on { background: var(--c, var(--coral)); color: #fff; }
.cnode.center { background: var(--ink); color: #fff; max-width: 180px; font-size: 13.5px; padding: 13px 17px; border-bottom: none; border-radius: 22px; cursor: default; }
.cmap-info { margin-top: 10px; padding: 12px 16px; border-radius: 16px; background: var(--soft); font-size: 13.5px; }
.cmap-small .cmap { height: 300px; }
.cmap-small .cnode { max-width: 96px; font-size: 11px; padding: 5px 8px; }
.cmap-small .cnode.center { max-width: 110px; font-size: 11.5px; padding: 9px 10px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.gallery figure { margin: 0; border-radius: 16px; overflow: hidden; background: var(--soft); cursor: zoom-in; }
.gallery img { width: 100%; height: 150px; object-fit: cover; }
.gallery figcaption { font-size: 11.5px; padding: 6px 10px; color: var(--muted); }
.fulltext { font-size: 14.5px; color: var(--ink2); }
.fulltext h4 { margin: 18px 0 6px; color: var(--ink); font-size: 15px; }
.fulltext p { margin: 0 0 10px; }
.fulltext ul { margin: 0 0 10px; padding-left: 20px; }
.fulltext img { border-radius: 14px; margin: 10px 0; max-height: 420px; }
details.more summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary .ic { transform: rotate(180deg); }

/* ===== Kartu hafalan ===== */
.study { max-width: 660px; margin: 0 auto; }
.flash-stage { perspective: 1400px; height: 340px; margin: 6px 0 18px; }
.flash { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2, .7, .2, 1); cursor: pointer; }
.flash.on { transform: rotateY(180deg); }
.flash .f, .flash .b { position: absolute; inset: 0; border-radius: 32px; padding: 30px; backface-visibility: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; overflow: hidden; }
.flash .f { background: radial-gradient(circle at 85% 15%, #ef3d2b 0, transparent 40%), radial-gradient(circle at 15% 85%, #f9b24b 0, transparent 40%), #f05a3c; color: #fff; box-shadow: 0 18px 34px rgba(242, 96, 63, .28); }
.flash .f .term { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1.25; }
.flash .f .hint { position: absolute; bottom: 22px; font-size: 13px; opacity: .85; }
.flash .b { background: #fff; border: 1px solid var(--line); transform: rotateY(180deg); box-shadow: var(--shadow); overflow-y: auto; justify-content: flex-start; }
.flash .b .term { color: var(--coral); font-weight: 600; font-size: 14px; margin-bottom: 10px; }
.flash .b p { font-size: 17px; margin: auto 0; line-height: 1.6; }
.flash .b small { color: var(--muted); font-size: 11.5px; margin-top: 10px; }
/* kartu hafalan tanpa 3D: tinggi mengikuti isi, jadi teks panjang tetap bisa dibaca/digulir */
.fc { min-height: 300px; border-radius: 32px; margin-bottom: 18px; cursor: pointer; outline: none; transition: transform .16s ease-in, box-shadow .2s; user-select: none; display: flex; }
.fc.turn { transform: scaleX(.02); }
.fc:hover { box-shadow: 0 22px 40px rgba(242, 96, 63, .22); }
.fc-front, .fc-back { flex: 1; border-radius: 32px; padding: 34px 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; overflow: hidden; }
.fc-front { background: radial-gradient(circle at 85% 15%, #ef3d2b 0, transparent 40%), radial-gradient(circle at 15% 85%, #f9b24b 0, transparent 40%), #f05a3c; color: #fff; box-shadow: 0 18px 34px rgba(242, 96, 63, .28); }
.fc-front .fc-term { font-family: var(--display); font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; line-height: 1.25; }
.fc-hint { margin-top: 22px; font-size: 13px; opacity: .9; }
.fc-back { background: #fff; border: 2px solid #f8d4c2; box-shadow: var(--shadow); }
.fc-back .fc-term { color: var(--coral); font-weight: 700; font-size: 15px; margin-bottom: 12px; font-family: var(--display); }
.fc-back p { font-size: 18px; line-height: 1.65; margin: 0 0 14px; }
.fc-back small { color: var(--muted); font-size: 12px; }
.boxes { display: flex; gap: 6px; }
.boxes i { width: 26px; height: 6px; border-radius: 99px; background: #f6e7de; }
.boxes i.on { background: var(--orange); }
.grade { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grade button { border: none; border-radius: 18px; padding: 13px 6px; font-weight: 600; font-size: 13.5px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.grade .g0 { background: #fde7e7; color: var(--red); } .grade .g1 { background: #fff2d6; color: #b97a00; } .grade .g2 { background: #e1f6ec; color: #13895a; }
.grade span { font-size: 20px; }

/* ===== Quiz ===== */
.progress { height: 8px; border-radius: 99px; background: #f6e7de; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: var(--coral); transition: width .35s; }
.question { font-size: 19px; font-weight: 600; line-height: 1.5; }
.question blockquote { margin: 12px 0 0; padding: 14px 18px; border-radius: 16px; background: var(--soft); font-weight: 500; font-size: 15.5px; color: var(--ink2); }
.opts { display: grid; gap: 10px; }
.opt { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; transition: border-color .15s, background .15s; }
.opt .l { flex-shrink: 0; width: 28px; height: 28px; border-radius: 10px; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--coral); }
.opt:hover:not(:disabled) { border-color: var(--orange); }
.opt:disabled { cursor: default; }
.opt.ok { border-color: var(--green); background: #effaf4; } .opt.ok .l { background: var(--green); color: #fff; }
.opt.bad { border-color: var(--red); background: #fff1f1; } .opt.bad .l { background: var(--red); color: #fff; }
.explain { border-radius: 18px; padding: 14px 16px; background: var(--soft); font-size: 14px; }
.explain.ok { background: #effaf4; } .explain.bad { background: #fff1f1; }
.score-big { font-size: 34px; font-weight: 700; color: var(--coral); font-family: var(--display); }

/* ===== Game ===== */
.game-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.game-pick button { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: var(--r-lg); padding: 20px; display: flex; gap: 16px; align-items: center; transition: border-color .15s, transform .15s; }
.game-pick button:hover { border-color: var(--orange); transform: translateY(-2px); }
.game-pick button.on { border-color: var(--coral); background: var(--soft); }
.game-pick .gi { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; font-size: 28px; flex-shrink: 0; }
.game-pick b { display: block; font-size: 16px; font-family: var(--display); }
.game-pick span { font-size: 13px; color: var(--muted); }
.game-pick { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.game-over, .blitz-start { text-align: center; padding: 30px 10px; }
.go-ic { font-size: 64px; line-height: 1; margin-bottom: 10px; animation: bounce 1s infinite alternate; }
@keyframes bounce { to { transform: translateY(-10px); } }
/* Tangkap Istilah */
.arena-hud { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.arena-hud span { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; font-weight: 600; }
.arena-q { margin: 14px 0; padding: 16px 20px; border-radius: 20px; background: var(--plum); color: #fff; font-size: 16px; text-align: center; min-height: 60px; }
.arena { position: relative; height: 430px; border-radius: 26px; overflow: hidden; background: linear-gradient(180deg, #fff4ec 0, #ffe2cf 100%); border: 1px solid #f8d4c2; touch-action: manipulation; }
.arena.shake { animation: shake .35s; }
.arena-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: repeating-linear-gradient(135deg, #f9a24b 0 14px, #f7b56e 14px 28px); }
.drop-item { position: absolute; top: -50px; padding: 10px 18px; border: none; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 700; font-size: 14px; box-shadow: 0 6px 16px rgba(186, 96, 40, .25); white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; transition: transform .12s, background .2s; }
.drop-item:hover { transform: scale(1.08); background: #ffe6dc; }
.drop-item.caught { background: var(--green); color: #fff; transform: scale(1.25); }
.drop-item.wrong { background: var(--red); color: #fff; }
.pop { position: absolute; font-weight: 800; font-size: 18px; pointer-events: none; animation: popup .9s ease-out forwards; white-space: nowrap; z-index: 3; }
.pop.good { color: #13895a; } .pop.bad { color: var(--red); }
@keyframes popup { to { transform: translateY(-50px); opacity: 0; } }
/* Seret & Cocokkan */
.chip-tray { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px; border-radius: 22px; background: #fff4ec; border: 1px dashed #f4b9a3; min-height: 64px; position: sticky; top: 96px; z-index: 5; }
.dchip { border: none; border-radius: 999px; padding: 10px 18px; background: var(--coral); color: #fff; font-weight: 700; font-size: 14px; cursor: grab; touch-action: none; box-shadow: 0 6px 14px rgba(242, 96, 63, .25); transition: transform .15s, opacity .15s; }
.dchip.sel { outline: 3px solid var(--plum); transform: scale(1.06); }
.dchip.lifted { opacity: .35; }
.dchip.bad { animation: shake .35s; background: var(--red); }
.dchip.ghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(-3deg) scale(1.08); cursor: grabbing; }
.dz-list { display: grid; gap: 12px; margin-top: 16px; }
.dz { display: grid; grid-template-columns: 200px 1fr; gap: 16px; align-items: center; padding: 12px 16px; border-radius: 20px; background: #fff; border: 2px solid var(--line); transition: border-color .15s, background .15s, transform .15s; cursor: pointer; }
.dz-slot { min-height: 44px; border-radius: 14px; border: 2px dashed #e8c9b8; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 600; padding: 6px 10px; text-align: center; }
.dz-def { font-size: 14.5px; color: var(--ink2); }
.dz.over { border-color: var(--orange); background: #fff8f2; transform: scale(1.01); }
.dz.ok { border-color: var(--green); background: #effaf4; cursor: default; }
.dz.ok .dz-slot { border: none; background: var(--green); color: #fff; }
.dz.bad { border-color: var(--red); animation: shake .35s; }
/* Kuis Kilat */
.blitz { max-width: 720px; margin: 0 auto; }
.blitz-q { padding: 22px; border-radius: 22px; background: #fff; border: 1px solid var(--line); font-size: 17px; font-weight: 500; text-align: center; min-height: 90px; display: grid; place-items: center; }
.blitz-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.bopt { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 14px; font-weight: 600; display: flex; gap: 10px; align-items: center; text-align: left; transition: transform .1s, border-color .15s; }
.bopt:hover { border-color: var(--orange); transform: translateY(-2px); }
.bopt .l { width: 28px; height: 28px; border-radius: 9px; background: var(--soft); color: var(--coral); display: grid; place-items: center; flex-shrink: 0; }
.bopt.ok { border-color: var(--green); background: #effaf4; } .bopt.bad { border-color: var(--red); background: #fff1f1; }
@media (max-width: 640px) { .dz { grid-template-columns: 1fr; } .blitz-opts { grid-template-columns: 1fr; } .arena { height: 380px; } .chip-tray { top: 76px; } }
.scramble { max-width: 720px; margin: 0 auto; text-align: center; }
.slots, .tiles { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.slot, .tile { width: 46px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; font-weight: 700; text-transform: uppercase; font-family: var(--display); }
.slot { border: 2px dashed #e8c9b8; background: #fff; cursor: pointer; }
.slot.filled { border-style: solid; border-color: var(--orange); background: var(--soft); }
.slot.space { width: 18px; border: none; background: none; cursor: default; }
.slots.ok .slot.filled { border-color: var(--green); background: #effaf4; color: #13895a; }
.slots.bad { animation: shake .35s; }
.tile { border: none; background: var(--coral); color: #fff; box-shadow: 0 4px 0 var(--coral-d); transition: transform .1s; }
.tile:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--coral-d); }
.tile.used { visibility: hidden; }

/* ===== Upload ===== */
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.drop { display: block; border: 2px dashed #f4b9a3; border-radius: 30px; padding: 36px 24px; text-align: center; cursor: pointer; background: #fff; transition: background .15s, transform .15s; }
.drop:hover { background: var(--soft); }
.drop.over { background: var(--soft2); transform: scale(1.01); }
.drop input { display: none; }
.drop .fmt { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.field { width: 100%; border: 1px solid #f0dcd0; border-radius: 16px; padding: 12px 16px; background: #fff; outline: none; }
.field:focus { border-color: var(--orange); }
textarea.field { min-height: 160px; resize: vertical; }
.steps { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.steps div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.steps div.on { color: var(--ink); font-weight: 500; }
.steps div.ok { color: var(--green); }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--coral); animation: spin .8s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Tanya Clarissa ===== */
.chat { display: flex; flex-direction: column; height: min(68vh, 680px); padding: 0; overflow: hidden; }
.chat-top { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 80%; padding: 12px 16px; border-radius: 20px; white-space: pre-wrap; }
.msg.bot { background: var(--soft); align-self: flex-start; border-bottom-left-radius: 6px; }
.msg.me { background: var(--coral); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.msg .src { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; white-space: normal; }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 12px; }
.chips button { border: 1px solid #f3dccf; background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; }
.chips button:hover { background: var(--soft); }

/* ===== Layar PIN ===== */
.lock-wrap { display: grid; grid-template-columns: 1fr 1fr; max-width: 900px; margin: 0 auto; border-radius: var(--r-xl); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.lock-top { position: relative; min-height: 460px; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.lock-top .blobs { position: absolute; inset: 0; width: 100%; height: 100%; }
.lock-top .fox { position: relative; }
.lock-body { padding: 40px 30px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.lock-body h2 { font-size: 24px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0 8px; }
.pin-dots i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #e2d3cc; transition: background .15s, border-color .15s; }
.pin-dots i.on { background: var(--coral); border-color: var(--coral); }
.pin-dots.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 10px; max-width: 270px; margin: 8px auto 18px; }
.keypad button { height: 58px; border: none; background: transparent; font-size: 22px; font-weight: 500; border-radius: 18px; display: grid; place-items: center; }
.keypad button:hover { background: var(--soft); }

/* ===== Progres ===== */
.week { display: flex; align-items: flex-end; gap: 12px; height: 140px; }
.week div { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.week i { width: 100%; max-width: 36px; border-radius: 10px; background: #ffe6dc; min-height: 6px; }
.week i.on { background: var(--coral); }
.week span { font-size: 11.5px; color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats b { font-size: 28px; font-weight: 700; display: block; font-family: var(--display); }
.stats span { font-size: 13px; color: var(--muted); }

/* ===== Modal, toast ===== */
.sheet-bg { position: fixed; inset: 0; background: rgba(58, 30, 43, .4); z-index: 60; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fade .2s; }
.sheet-bg[hidden] { display: none; }
.sheet { background: #fff; width: 100%; max-width: 620px; border-radius: 28px; padding: 26px; max-height: 90vh; overflow-y: auto; animation: up .25s ease-out; }
.sheet img.full { width: 100%; border-radius: 18px; background: #fff; }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.toast-wrap { position: fixed; left: 0; right: 0; top: 96px; z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; font-weight: 500; box-shadow: var(--shadow); animation: up .25s; max-width: 90vw; }
.confetti { position: fixed; top: -12px; width: 9px; height: 13px; z-index: 90; pointer-events: none; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(680deg); } }

/* ===== Pencapaian (di Beranda) ===== */
#pencapaian { scroll-margin-top: 110px; }
.brag-hero { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; border-radius: var(--r-xl); padding: 30px 34px; color: #fff;
  background: radial-gradient(circle at 90% 10%, #ef3d2b 0, transparent 40%), radial-gradient(circle at 10% 90%, #f9b24b 0, transparent 45%), #f05a3c; box-shadow: var(--shadow); }
.brag-hero .k { font-size: 13px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; opacity: .9; }
.brag-hero .big { font-family: var(--display); font-weight: 700; font-size: clamp(36px, 5vw, 58px); line-height: 1.1; margin: 6px 0 14px; }
.bh-level { background: rgba(255, 255, 255, .16); border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.bh-level .lv-ic { font-size: 42px; line-height: 1; }
.bh-level b { font-family: var(--display); font-size: 22px; }
.bh-level small { opacity: .9; }
.badge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.bdg { text-align: center; padding: 12px 8px; border-radius: 18px; background: #f7f1ee; filter: grayscale(1); opacity: .5; transition: transform .15s; }
.bdg span { font-size: 28px; display: block; }
.bdg b { display: block; font-size: 12.5px; margin-top: 4px; }
.bdg small { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.bdg.ok { filter: none; opacity: 1; background: #fff4ec; border: 1px solid #f8d4c2; }
.bdg.ok:hover { transform: translateY(-3px) rotate(-2deg); }
.brag-preview { display: grid; place-items: center; min-height: 240px; background: #f7f1ee; border-radius: 20px; overflow: hidden; }
.brag-preview img { width: 100%; max-width: 380px; border-radius: 16px; box-shadow: var(--shadow); margin: 14px auto; }
@media (max-width: 820px) { .brag-hero { grid-template-columns: 1fr; padding: 24px; } .badge-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== Animasi maskot Clarissa ===== */
.fox-anim { overflow: visible; animation: fx-float 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); cursor: pointer; }
.fox-anim .fx-head, .fox-anim .fx-ear-l, .fox-anim .fx-ear-r, .fox-anim .fx-eye, .fox-anim .fx-tail, .fox-anim .fx-arm,
.fox-anim .fx-cheek, .fox-anim .fx-nose, .fox-anim .fx-wink, .fox-anim .fx-glint { transform-box: fill-box; }
.fox-anim .fx-head { transform-origin: 50% 90%; animation: fx-nod 4.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fox-anim .fx-ear-l { transform-origin: 70% 95%; animation: fx-ear-l 3.6s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fox-anim .fx-ear-r { transform-origin: 30% 95%; animation: fx-ear-r 3.6s ease-in-out infinite; animation-delay: calc(var(--d, 0s) - .25s); }
.fox-anim .fx-eye { transform-origin: 50% 50%; animation: fx-blink 4.2s infinite; animation-delay: var(--d, 0s); }
.fox-anim .fx-wink { transform-origin: 50% 50%; animation: fx-wink 4.2s infinite; animation-delay: var(--d, 0s); }
.fox-anim .fx-cheek { animation: fx-cheek 2.6s ease-in-out infinite; }
.fox-anim .fx-nose { transform-origin: 50% 50%; animation: fx-sniff 5.5s ease-in-out infinite; animation-delay: var(--d, 0s); }
.fox-anim .fx-tail { transform-origin: 30% 0%; animation: fx-sway 2.4s ease-in-out infinite; }
.fox-anim .fx-arm { transform-origin: 50% 100%; animation: fx-wave 1.8s ease-in-out infinite; }
.fox-anim .fx-glint { transform-origin: 50% 50%; animation: fx-glint 1.8s ease-in-out infinite; }
/* disentuh kursor / diklik: melompat senang */
.fox-anim:hover, :hover > .fox-anim:not(.happy), .fox-anim.happy { animation: fx-hop .7s cubic-bezier(.3, 1.6, .5, 1) 1; }
.fox-anim:hover .fx-ear-l, .fox-anim.happy .fx-ear-l { animation: fx-ear-l .35s ease-in-out 2; }
.fox-anim:hover .fx-ear-r, .fox-anim.happy .fx-ear-r { animation: fx-ear-r .35s ease-in-out 2; }
.fox-anim.happy .fx-cheek { animation: fx-blush .9s ease-in-out 1; }
.fox-anim.happy .fx-arm { animation: fx-wave .3s ease-in-out 3; }

@keyframes fx-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4%); } }
@keyframes fx-nod { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
@keyframes fx-ear-l { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(-12deg); } 90% { transform: rotate(4deg); } }
@keyframes fx-ear-r { 0%, 70%, 100% { transform: rotate(0); } 80% { transform: rotate(12deg); } 90% { transform: rotate(-4deg); } }
@keyframes fx-blink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes fx-wink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(1.6); } }
@keyframes fx-cheek { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes fx-blush { 50% { opacity: 1; transform: scale(1.35); } }
@keyframes fx-sniff { 0%, 86%, 100% { transform: scale(1); } 89% { transform: scale(1.15, .9); } 92% { transform: scale(1); } 95% { transform: scale(1.15, .9); } }
@keyframes fx-sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes fx-wave { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(8deg); } }
@keyframes fx-glint { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
@keyframes fx-hop { 0% { transform: translateY(0) scale(1); } 30% { transform: translateY(-14%) scale(1.04, .96); } 60% { transform: translateY(0) scale(1.06, .92); } 80% { transform: translateY(-3%); } 100% { transform: translateY(0) scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .fox-anim, .fox-anim * { animation: none !important; }
}

/* ===== Responsif ===== */
@media (max-width: 1080px) {
  .nav a { padding: 9px 13px; }
  .user-chip { display: none; }
  .hero { grid-template-columns: 1fr; }
  .fox-card { min-height: 460px; max-width: 560px; }
  .feature { grid-template-columns: 1fr; }
  .mat-head, .layout-side, .chapter-layout { grid-template-columns: 1fr; }
  .ch-side { display: none; }
  .ch-select { display: block; margin-bottom: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .site-header { padding: 10px 12px 0; }
  .menu-btn { display: block; }
  .btn-ask { display: none; }
  .nav { position: absolute; top: 74px; left: 12px; right: 12px; flex-direction: column; background: #fff; border-radius: 24px; padding: 10px; box-shadow: var(--shadow); display: none; }
  .nav.open { display: flex; }
  .nav a.ask-m { display: block; }
  .header-pill { justify-content: space-between; position: relative; }
  .container { padding: 0 16px; }
  .view { padding-top: 24px; }
  .sum-grid { grid-template-columns: 1fr; }
  .side-fig { position: static; max-width: 420px; }
  .acc-head { padding: 16px 18px; gap: 14px; }
  .acc-head .num { width: 44px; height: 44px; font-size: 18px; border-radius: 14px; }
  .acc-head h3 { font-size: 17px; }
  .acc-body { padding: 20px 18px 22px; }
  .prose p { font-size: 15.5px; }
  .stepper { grid-template-columns: 1fr 1fr; }
  .lock-wrap { grid-template-columns: 1fr; }
  .lock-top { min-height: 280px; }
  .lock-top .fox svg { width: 220px; height: 220px; }
  .cmap { height: 340px; }
  .cnode { max-width: 96px; font-size: 11px; padding: 5px 8px; }
  .msg { max-width: 92%; }
}
@media (max-width: 420px) {
  .slot, .tile { width: 38px; height: 46px; font-size: 17px; }
  .fox-card { padding: 24px; min-height: 400px; }
}

/* ---------- Akun: halaman masuk ---------- */
.auth-mode .nav, .auth-mode .header-right, .auth-mode .menu-btn { display: none !important; }
.auth-body { text-align: left; }
.auth-body h2 { font-size: 28px; }
.auth-form { display: flex; flex-direction: column; gap: 8px; }
.auth-form label { margin-top: 4px; }
.auth-form .btn[type="submit"] { margin-top: 8px; }
.cred { border: 1px dashed #f4b9a3; background: #fff7f1; border-radius: 18px; padding: 6px 18px; }
.cred div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cred div:last-child { border-bottom: none; }
.cred span { color: var(--muted); font-size: 13.5px; }
.cred b { font-family: ui-monospace, Consolas, monospace; font-size: 15px; word-break: break-all; }

/* ---------- Backend (admin) ---------- */
.adm-tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 999px; background: #fff; border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.adm-tabs a { padding: 9px 22px; border-radius: 999px; font-weight: 500; font-size: 14.5px; color: var(--ink2); white-space: nowrap; }
.adm-tabs a:hover { background: var(--soft); }
.adm-tabs a.on { background: var(--coral); color: #fff; }
.adm-ava { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--ink); flex-shrink: 0; }
.adm-table { padding: 6px 0; }
.adm-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 1fr 1.4fr 1.3fr 1fr auto; gap: 14px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.adm-row:last-child { border-bottom: none; }
.adm-row.off { opacity: .55; }
.adm-head { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; padding-top: 10px; padding-bottom: 10px; }
.adm-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.adm-mini div { background: var(--soft); border-radius: 14px; padding: 10px; text-align: center; }
.adm-mini b { display: block; font-family: var(--display); font-size: 18px; }
.adm-mini span { font-size: 11.5px; color: var(--muted); }
.switch-row { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { width: 46px; height: 26px; border-radius: 99px; background: #ead9cf; position: relative; flex-shrink: 0; transition: background .2s; margin-top: 2px; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch-row input:checked + .switch { background: var(--coral); }
.switch-row input:checked + .switch::after { transform: translateX(20px); }
.switch-row input:focus-visible + .switch { outline: 2px solid var(--orange); outline-offset: 2px; }
@media (max-width: 860px) {
  .adm-head { display: none; }
  .adm-row { grid-template-columns: 1fr 1fr; padding: 16px 18px; gap: 10px 14px; }
  .adm-row > span:first-child { grid-column: 1 / -1; }
  .adm-row [data-l]::before { content: attr(data-l); display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
  .adm-act { grid-column: 1 / -1; }
  .adm-act .btn { width: 100%; }
  .adm-mini { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) { .auth-wrap .lock-top { min-height: 200px; } .auth-wrap .lock-top .fox svg { width: 170px; height: 170px; } }

/* Rubah bicara di halaman masuk */
.auth-wrap .lock-top .fox { background: none; border: none; padding: 0; cursor: pointer; }
.fox-talk { white-space: normal; overflow-wrap: anywhere; position: absolute; top: 26px; left: 50%; transform: translateX(-50%); z-index: 2; width: max-content; max-width: min(84%, 340px); min-height: 52px; background: #fff; color: var(--ink); border-radius: 22px; padding: 14px 20px; font-weight: 500; font-size: 15px; line-height: 1.45; text-align: center; box-shadow: 0 12px 30px rgba(120, 40, 10, .22); }
.fox-talk::after { content: ""; position: absolute; left: 50%; bottom: -10px; transform: translateX(-50%) rotate(45deg); width: 20px; height: 20px; background: #fff; border-radius: 4px; }
.fox-talk.pop { animation: talkPop .35s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes talkPop { from { transform: translateX(-50%) scale(.85); opacity: .4; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
.auth-wrap .lock-top { min-height: 560px; }
@media (max-width: 760px) { .auth-wrap .lock-top { min-height: 400px; } .auth-wrap .lock-top .fox svg { width: 260px; height: 260px; } .fox-talk { top: 18px; font-size: 14px; padding: 12px 16px; } }
@media (prefers-reduced-motion: reduce) { .fox-talk.pop { animation: none; } }
/* Mulut rubah: senyum biasa, berganti mulut terbuka yang bergerak saat bicara */
.fx-mouth { opacity: 0; transform-box: fill-box; transform-origin: 50% 0; }
.fox-anim.talking .fx-smile { opacity: 0; }
.fox-anim.talking .fx-mouth { opacity: 1; animation: foxMouth .16s ease-in-out infinite alternate; }
@keyframes foxMouth { from { transform: scaleY(.2); } to { transform: scaleY(1); } }
