/* Jalur Inggris — konsep "buku catatan belajar": kertas terang, tinta hijau tua, stabilo kuning.
   Satu kolom fokus: sapaan, kartu sesi berikutnya, statistik, peta 16 minggu, pencapaian. */
:root {
  /* Warna */
  --bg: #f5f7f3;
  --surface: #ffffff;
  --surface-2: #f8faf7;
  --ink: #16211c;
  --ink-2: #33403a;
  --muted: #66736d;
  --line: #e3e8e2;
  --line-strong: #cfd7cf;
  --grid: rgba(22, 33, 28, .05);

  --primary: #0b7a5a;
  --primary-hover: #096a4e;
  --primary-press: #075640;
  --primary-soft: #e4f4ec;
  --primary-ring: rgba(11, 122, 90, .18);

  --mark: #ffe15a;
  --mark-soft: #fff6c7;
  --flame: #f25c2a;
  --flame-soft: #ffece4;
  --gold: #b97900;
  --gold-soft: #fff3d1;
  --done: #11935f;
  --done-soft: #e6f6ee;
  --danger: #cf3048;

  --t-grammar: #2d55d8;
  --t-grammar-bg: #e9eefe;
  --t-listening: #0b7a5a;
  --t-listening-bg: #e4f4ec;
  --t-reading: #b35f00;
  --t-reading-bg: #fff0dc;
  --t-test: #c12f63;
  --t-test-bg: #fde8f0;
  --t-buffer: #5d6863;
  --t-buffer-bg: #eef1ee;
  --t-speaking: #8a3fb3;
  --t-speaking-bg: #f4eafa;
  --t-writing: #4f6a00;
  --t-writing-bg: #eef5d9;

  /* Tipografi */
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
  --fs-xs: .75rem;   /* 12 */
  --fs-sm: .8125rem; /* 13 */
  --fs-md: .9375rem; /* 15 */
  --fs-base: 1rem;   /* 16 */
  --fs-lg: 1.125rem; /* 18 */
  --fs-xl: 1.375rem; /* 22 */
  --fs-2xl: clamp(1.5rem, 3.6vw, 2rem);
  --fs-3xl: clamp(1.75rem, 4.8vw, 2.5rem);

  /* Bentuk */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --shadow-sm: 0 1px 2px rgba(22, 33, 28, .06);
  --shadow: 0 1px 2px rgba(22, 33, 28, .05), 0 10px 28px -16px rgba(22, 33, 28, .18);
  --shadow-lg: 0 2px 4px rgba(22, 33, 28, .04), 0 24px 48px -24px rgba(22, 33, 28, .28);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3 { margin: 0; font-family: var(--font-display); line-height: 1.15; text-wrap: balance; letter-spacing: -0.02em; color: var(--ink); }
p { margin: 0; }
button, input { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--primary-ring); outline-offset: 2px; border-radius: var(--r-sm); }
::selection { background: var(--mark); color: var(--ink); }

.container, .topbar-inner, .footer {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.container { display: grid; gap: 40px; padding-block: 28px 56px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg); color: var(--ink); text-decoration: none; letter-spacing: -0.02em; }
.brand-mark { width: 32px; height: 32px; }
.chips { display: flex; align-items: center; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px; border-radius: 99px;
  font-weight: 700; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; white-space: nowrap;
  border: 1px solid transparent;
}
.chip svg { width: 16px; height: 16px; }
.chip-flame { background: var(--flame-soft); color: var(--flame); }
.chip-flame.cold { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.chip-xp { background: var(--mark-soft); color: var(--gold); }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; flex: none;
  border: 1px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer;
  color: var(--ink-2); transition: border-color .15s, color .15s, background-color .15s;
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ---------- Sapaan ---------- */
.greeting { display: grid; gap: 8px; }
.eyebrow { font-family: var(--mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.greeting h1 { font-size: var(--fs-3xl); font-weight: 800; }
.greet-sub { color: var(--muted); font-size: var(--fs-lg); max-width: 58ch; line-height: 1.55; }

.greet-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.clock {
  font-family: var(--mono); font-size: var(--fs-xs); font-weight: 500; font-variant-numeric: tabular-nums;
  color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px;
}
.day-chip { font-size: var(--fs-xs); font-weight: 800; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; }
.day-chip.on { background: var(--mark); border-color: transparent; color: var(--ink); }
.day-chip.soon { background: var(--primary-soft); border-color: transparent; color: var(--primary); }

/* Garis perjalanan B1–B4 */
.strip { display: grid; gap: 10px; margin-top: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.strip-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: var(--fs-sm); color: var(--muted); }
.strip-head b { color: var(--ink); font-weight: 800; }
.strip-where { font-weight: 700; color: var(--primary); }
.strip-track { position: relative; display: flex; align-items: center; gap: 4px; padding-right: 34px; height: 26px; }
.strip-seg { position: relative; height: 10px; border-radius: 99px; background: var(--line); overflow: visible; min-width: 0; }
.strip-seg.locked { background: repeating-linear-gradient(135deg, var(--line) 0 4px, var(--surface-2) 4px 8px); }
.strip-fill { position: absolute; inset: 0 auto 0 0; border-radius: 99px; background: var(--done); transition: width .6s ease; }
.strip-label { position: absolute; top: 13px; left: 0; font-family: var(--mono); font-size: .625rem; font-weight: 500; color: var(--muted); }
.strip-seg.active .strip-label { color: var(--primary); font-weight: 700; }
.strip-goal { position: absolute; right: 0; top: 50%; transform: translateY(-50%) rotate(-4deg); width: 26px; height: 26px; border-radius: 8px; background: var(--mark); display: grid; place-items: center; }
.strip-pin {
  position: absolute; top: 50%; width: 18px; height: 18px; margin-left: -9px; transform: translateY(-50%);
  border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); box-shadow: 0 0 0 4px var(--primary-ring);
}
.strip-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: var(--fs-xs); color: var(--muted); padding-top: 6px; }
.strip-foot b { color: var(--ink); }

/* Kalimat hari ini + insight */
.insight-row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px; margin-top: -12px; }
.phrase {
  position: relative; overflow: hidden; display: grid; gap: 8px; align-content: start;
  background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 20px;
}
.phrase::after { content: "“"; position: absolute; right: 12px; bottom: -42px; font-family: var(--font-display); font-size: 9rem; line-height: 1; color: rgba(255, 225, 90, .16); pointer-events: none; }
.phrase .eyebrow { color: var(--mark); }
.phrase-en { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; text-wrap: balance; }
.phrase-id { font-size: var(--fs-md); color: rgba(255, 255, 255, .78); }
.phrase-word { margin-top: 4px; font-size: var(--fs-sm); color: rgba(255, 255, 255, .78); }
.phrase-word b { color: var(--ink); background: var(--mark); padding: 1px 6px; border-radius: 5px; font-weight: 800; }
.insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.insight { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: grid; gap: 4px; align-content: start; min-width: 0; box-shadow: var(--shadow-sm); }
.insight-value { font-family: var(--font-display); font-size: var(--fs-xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
#nickname { font-family: var(--font); font-size: var(--fs-md); }

/* ---------- Hero: kartu sesi berikutnya ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 28px; display: grid; gap: 18px;
  box-shadow: var(--shadow-lg);
}
.hero::before {
  /* kertas kotak-kotak, memudar ke kiri bawah */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(120% 90% at 100% 0%, #000 30%, transparent 75%);
}
.hero-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-right: 120px; }
.hero-sticker {
  position: absolute; top: 22px; right: 22px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--mark); color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-sm); letter-spacing: -0.01em;
  padding: 7px 12px; border-radius: 10px; transform: rotate(3deg);
  box-shadow: 0 6px 14px -8px rgba(120, 90, 0, .55);
}
.hero-sticker svg { width: 14px; height: 14px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--ink-2); font-size: var(--fs-xs); font-weight: 700;
}
.pill.warm { background: var(--flame-soft); border-color: transparent; color: var(--flame); }
.hero h2 { font-size: var(--fs-2xl); font-weight: 800; max-width: 24ch; line-height: 1.22; }
.hl {
  background: linear-gradient(transparent 56%, var(--mark) 56%, var(--mark) 92%, transparent 92%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 4px; margin: 0 -4px;
}
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--fs-md); color: var(--ink-2); font-weight: 500; }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 17px; height: 17px; color: var(--primary); }
.hero-path {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: var(--r-md); padding: 10px 10px 10px 14px;
}
.hero-path code { flex: 1; min-width: 0; font-family: var(--mono); font-size: var(--fs-sm); color: var(--ink-2); overflow-wrap: anywhere; line-height: 1.55; }
.hero-path button {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: var(--fs-sm); cursor: pointer; transition: border-color .15s, color .15s;
}
.hero-path button:hover { border-color: var(--primary); color: var(--primary); }
.hero-path svg { width: 15px; height: 15px; }
.hero-note { font-size: var(--fs-base); color: var(--ink-2); max-width: 62ch; }
.hero-hint { font-size: var(--fs-sm); color: var(--muted); }
.hero-hint button { background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 4px; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-md); border: 1.5px solid transparent;
  font-weight: 700; font-size: var(--fs-md); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform .1s ease, background-color .15s ease, box-shadow .1s ease, border-color .15s ease, color .15s ease;
}
.btn svg { width: 18px; height: 18px; stroke-width: 2.6; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 0 var(--primary-press); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { transform: translateY(3px); box-shadow: 0 0 0 var(--primary-press); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: 0 3px 0 var(--line); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost:active { transform: translateY(3px); box-shadow: 0 0 0 var(--line); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: rgba(207, 48, 72, .4); }
.btn-danger.armed { background: var(--danger); border-color: var(--danger); color: #fff; }

/* ---------- Statistik ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: -12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; display: grid; gap: 6px; align-content: start; min-width: 0; box-shadow: var(--shadow-sm);
}
.stat-label { font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.stat-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value small { font-family: var(--font); font-size: var(--fs-md); color: var(--muted); font-weight: 600; letter-spacing: 0; }
.stat-value.text { font-size: var(--fs-xl); }
.stat-foot { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.stat-ring { display: flex; align-items: center; gap: 12px; }
.ring { width: 52px; height: 52px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--line); }
.ring .fill { stroke: var(--done); stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.meter { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--mark); border-radius: 99px; box-shadow: inset 0 -2px 0 rgba(185, 121, 0, .25); transition: width .6s ease; }
.flame-dots { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.flame-dots i { height: 8px; border-radius: 99px; background: var(--line); }
.flame-dots i.on { background: var(--flame); }

/* ---------- Seksi ---------- */
.block { display: grid; gap: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: var(--fs-xl); font-weight: 800; }
.section-head p { color: var(--muted); font-size: var(--fs-sm); font-weight: 500; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 0.6875rem; font-weight: 800; letter-spacing: .02em; white-space: nowrap;
}
.tag-grammar { color: var(--t-grammar); background: var(--t-grammar-bg); }
.tag-listening { color: var(--t-listening); background: var(--t-listening-bg); }
.tag-reading { color: var(--t-reading); background: var(--t-reading-bg); }
.tag-test { color: var(--t-test); background: var(--t-test-bg); }
.tag-buffer { color: var(--t-buffer); background: var(--t-buffer-bg); }
.tag-speaking { color: var(--t-speaking); background: var(--t-speaking-bg); }
.tag-writing { color: var(--t-writing); background: var(--t-writing-bg); }

/* ---------- Roadmap 4 batch ---------- */
.roadmap { display: grid; gap: 14px; }
.rm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rm-card {
  position: relative; display: grid; gap: 8px; align-content: start; text-align: left; min-width: 0;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; box-shadow: var(--shadow-sm); font: inherit; color: inherit;
}
button.rm-card { cursor: pointer; transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease; }
button.rm-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.rm-card.active { border-color: var(--primary); }
.rm-card.viewing { box-shadow: 0 0 0 4px var(--primary-ring); }
.rm-card.done { background: linear-gradient(180deg, var(--done-soft), var(--surface) 75%); border-color: transparent; }
.rm-card.locked {
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 10px, var(--surface) 10px 20px);
  border-style: dashed; border-color: var(--line-strong); box-shadow: none;
}
.rm-card.locked h3, .rm-card.locked .rm-goal { color: var(--ink-2); }
.rm-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rm-num { white-space: nowrap; font-family: var(--mono); font-size: var(--fs-xs); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rm-chip { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: .6875rem; font-weight: 800; white-space: nowrap; }
.rm-chip.active { background: var(--mark); color: var(--ink); }
.rm-chip.done { background: var(--done); color: #fff; }
.rm-chip.locked { background: var(--surface); color: var(--muted); border: 1px solid var(--line); }
.rm-card h3 { font-size: var(--fs-lg); font-weight: 800; line-height: 1.2; }
.rm-meta { font-size: var(--fs-xs); font-weight: 700; color: var(--primary); }
.rm-card.locked .rm-meta { color: var(--muted); }
.rm-goal { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.45; }
.rm-points { margin: 2px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.rm-points li { position: relative; padding-left: 14px; font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.rm-points li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.rm-card.active .rm-points li::before { background: var(--primary); }
.rm-progress { display: grid; gap: 6px; margin-top: 6px; }
.rm-progress span:last-child { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); }
.rm-unlock { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.rm-dest {
  display: flex; align-items: flex-start; gap: 14px;
  background: var(--mark-soft); border: 1px solid #f1d77a; border-radius: var(--r-lg); padding: 16px 18px;
}
.rm-dest-icon { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--mark); display: grid; place-items: center; transform: rotate(-4deg); }
.rm-dest-icon svg { width: 20px; height: 20px; }
.rm-dest b { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 800; }
.rm-dest p { font-size: var(--fs-sm); color: var(--ink-2); margin-top: 2px; max-width: 70ch; }

/* ---------- Peta perjalanan ---------- */
.journey { display: grid; gap: 20px; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px; display: grid; gap: 14px; box-shadow: var(--shadow); }
.stage-head { display: flex; align-items: center; gap: 14px; }
.stage-num {
  width: 44px; height: 44px; flex: none; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg);
}
.stage.complete .stage-num { background: var(--done); color: #fff; }
.stage-title { flex: 1; min-width: 0; display: grid; gap: 2px; }
.stage-title h3 { font-size: var(--fs-lg); font-weight: 800; }
.stage-title p { font-size: var(--fs-sm); color: var(--muted); }
.stage-count { font-family: var(--mono); font-size: var(--fs-sm); font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.stage-bar { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.stage-bar > span { display: block; height: 100%; background: var(--done); border-radius: 99px; transition: width .6s ease; }

.weeks { display: grid; }
.week { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px dashed var(--line); }
.week:first-child { border-top: 0; padding-top: 4px; }
.week:last-child { padding-bottom: 0; }
.week-label { display: grid; gap: 2px; align-content: start; padding-top: 10px; }
.week-label b { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 800; }
.week-label span { font-family: var(--mono); font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.week.now .week-label b { color: var(--primary); }
.week-now { font-family: var(--font) !important; font-weight: 800; color: var(--ink) !important; background: var(--mark); padding: 1px 6px; border-radius: 5px; }
.sessions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.session {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start; text-align: left;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-md); padding: 14px;
  cursor: pointer; transition: border-color .15s ease, transform .12s ease, box-shadow .15s ease, background-color .15s ease;
}
.session:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.session .dot {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; margin-top: 1px; transition: background-color .2s, border-color .2s;
}
.session .dot svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 3.4; opacity: 0; }
.session-body { display: grid; gap: 6px; min-width: 0; }
.session-day { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.session-what { font-size: var(--fs-md); font-weight: 700; line-height: 1.4; color: var(--ink); }
.session.done { background: var(--done-soft); border-color: transparent; }
.session.done .dot { background: var(--done); border-color: var(--done); }
.session.done .dot svg { opacity: 1; }
.session.done .session-what { color: var(--ink-2); text-decoration: line-through; text-decoration-color: rgba(17, 147, 95, .45); text-decoration-thickness: 2px; }
.session.partial .dot { border-color: var(--flame); background: var(--flame-soft); }
.session.next { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 4px var(--primary-ring); }
.session.next .dot { border-color: var(--primary); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(11, 122, 90, .35); } 50% { box-shadow: 0 0 0 7px rgba(11, 122, 90, 0); } }

/* ---------- Pencapaian ---------- */
.badges { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.badge {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 16px; display: grid; gap: 6px; justify-items: start; align-content: start; min-width: 0;
  box-shadow: var(--shadow-sm);
}
.badge-icon { width: 44px; height: 44px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px dashed var(--line-strong); margin-bottom: 4px; }
.badge-icon svg { width: 22px; height: 22px; }
.badge b { font-family: var(--font-display); font-size: var(--fs-md); font-weight: 800; letter-spacing: -0.01em; }
.badge span { font-size: var(--fs-xs); color: var(--muted); line-height: 1.45; }
.badge.locked b { color: var(--ink-2); }
.badge.locked .badge-icon { opacity: .7; }
.badge.got { border-color: #f1d77a; background: linear-gradient(180deg, var(--mark-soft), var(--surface) 70%); }
.badge.got .badge-icon { background: var(--mark); color: var(--ink); border: 0; transform: rotate(-4deg); }

/* ---------- Aturan ---------- */
.guide-grid { display: grid; gap: 10px; }
.guide details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 0 18px; transition: border-color .15s; }
.guide details[open] { border-color: var(--line-strong); }
.guide summary { cursor: pointer; font-weight: 700; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.guide summary::-webkit-details-marker { display: none; }
.guide summary::after {
  content: ""; width: 10px; height: 10px; flex: none; margin-right: 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px); transition: transform .2s;
}
.guide details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.guide ol { margin: 0 0 18px; padding-left: 1.4em; display: grid; gap: 10px; color: var(--ink-2); max-width: 65ch; }
.guide ol b { color: var(--ink); font-weight: 700; }
.guide li { padding-left: 4px; }
.guide li::marker { color: var(--primary); font-family: var(--font-display); font-weight: 800; }

.footer { padding-block: 0 48px; color: var(--muted); font-size: var(--fs-sm); text-align: center; }

/* ---------- Dialog ---------- */
.sheet {
  width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px);
  border: 1px solid var(--line); padding: 0; border-radius: var(--r-xl); background: var(--surface); color: var(--ink);
  box-shadow: 0 40px 80px -24px rgba(22, 33, 28, .35);
}
.sheet::backdrop { background: rgba(22, 33, 28, .32); backdrop-filter: blur(4px); }
.sheet[open] { animation: rise .22s ease-out; }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-inner { padding: 24px; display: grid; gap: 18px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-size: var(--fs-xl); font-weight: 800; line-height: 1.25; }
.sheet .muted { color: var(--muted); font-size: var(--fs-md); }
.sheet .path-box { font-family: var(--mono); font-size: var(--fs-sm); color: var(--ink-2); background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 12px 14px; overflow-wrap: anywhere; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); font-weight: 700; }
.status-line.ok { color: var(--done); }
.status-line.part { color: var(--flame); }
.row { display: flex; flex-wrap: wrap; gap: 10px; }
.row.end { justify-content: flex-end; }
.field { display: grid; gap: 8px; }
.field > span { font-weight: 700; font-size: var(--fs-md); }
.field small { color: var(--muted); font-size: var(--fs-sm); }
.field input[type="text"] {
  width: 100%; min-height: 48px; padding: 0 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--line-strong); background: var(--surface-2); font-family: var(--mono); font-size: var(--fs-sm);
}
.field input[type="text"]:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 4px var(--primary-ring); background: var(--surface); }
.field.danger > span { color: var(--danger); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; padding: 12px 14px 12px 18px; border-radius: var(--r-lg);
  box-shadow: 0 20px 40px -14px rgba(22, 33, 28, .5); font-weight: 600; font-size: var(--fs-md);
  animation: rise .22s ease-out;
}
.toast button { background: none; border: 0; color: var(--mark); font-weight: 800; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 70; }

/* ---------- Responsif ---------- */
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .badges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insight-row { grid-template-columns: minmax(0, 1fr); margin-top: -8px; }
}
@media (max-width: 480px) {
  .rm-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .container { gap: 32px; padding-block: 20px 48px; }
  .greet-sub { font-size: var(--fs-base); }
  .hero { padding: 22px 18px; border-radius: 20px; gap: 16px; }
  .hero-top { padding-right: 0; }
  .hero-sticker { position: static; justify-self: start; order: -1; transform: rotate(-2deg); }
  .hero-path { flex-direction: column; align-items: stretch; }
  .hero-path button { justify-content: center; }
  .hero-actions .btn { flex: 1 1 100%; }
  .stats { gap: 10px; margin-top: -8px; }
  .stat { padding: 14px; }
  .stage { padding: 16px; }
  .week { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .week-label { display: flex; align-items: baseline; gap: 8px; padding-top: 0; }
  .sessions { grid-template-columns: minmax(0, 1fr); }
  .chip-xp .xp-num { display: none; }
  .brand span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
