/* Internisto — gaya visual
   Palet: oat/beige hangat + sage (aksi utama), mist (info), ochre (peringatan), rose (salah/lupa).
   Ciri khas: progres sesi berbentuk "blister" kapsul obat. */

@font-face { font-family: 'Jakarta'; src: url('/fonts/pjs-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('/fonts/pjs-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('/fonts/pjs-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Jakarta'; src: url('/fonts/pjs-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --bg: #ECE6DA;
  --surface: #F7F2E9;
  --surface-2: #E3DBCC;
  --line: #D5CBB9;
  --ink: #37322C;
  --ink-2: #6B6358;
  --ink-3: #958B7E;
  --sage: #5B7B69;
  --sage-ink: #FFFFFF;
  --sage-tint: #DCE5DB;
  --mist: #5F778B;
  --mist-tint: #DCE3E9;
  --ochre: #8E6E3A;
  --ochre-tint: #F0E2C8;
  --rose: #A0625A;
  --rose-tint: #F1DBD5;
  --capsule-a: #7E9C8A;
  --capsule-b: #E9DFC9;
  --shadow: 0 1px 0 rgba(90, 70, 40, .05), 0 10px 24px -16px rgba(90, 70, 40, .35);
  --r-l: 24px;
  --r-m: 16px;
  --r-s: 10px;
  --nav-h: 66px;
  --rail-w: 96px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1F1D1A; --surface: #29261F; --surface-2: #35302A; --line: #463F37;
    --ink: #EDE6D9; --ink-2: #B9AF9F; --ink-3: #8A8073;
    --sage: #93B4A0; --sage-ink: #18201B; --sage-tint: #2B3A31;
    --mist: #A2B7C9; --mist-tint: #2A333B;
    --ochre: #D5B47E; --ochre-tint: #3C3122;
    --rose: #DA9E94; --rose-tint: #432C28;
    --capsule-a: #93B4A0; --capsule-b: #4A4237;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 10px 24px -16px rgba(0,0,0,.7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1F1D1A; --surface: #29261F; --surface-2: #35302A; --line: #463F37;
  --ink: #EDE6D9; --ink-2: #B9AF9F; --ink-3: #8A8073;
  --sage: #93B4A0; --sage-ink: #18201B; --sage-tint: #2B3A31;
  --mist: #A2B7C9; --mist-tint: #2A333B;
  --ochre: #D5B47E; --ochre-tint: #3C3122;
  --rose: #DA9E94; --rose-tint: #432C28;
  --capsule-a: #93B4A0; --capsule-b: #4A4237;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 10px 24px -16px rgba(0,0,0,.7);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--ink);
  font: 400 17px/1.55 'Jakarta', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--sage); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--mist) 70%, transparent); outline-offset: 2px; border-radius: 8px; }

h1 { font-size: 29px; line-height: 1.15; font-weight: 700; letter-spacing: -0.015em; margin: 0 0 6px; }
h2 { font-size: 21px; line-height: 1.25; font-weight: 650; letter-spacing: -0.01em; margin: 0 0 8px; }
h3 { font-size: 17px; line-height: 1.35; font-weight: 600; margin: 0 0 6px; }
p { margin: 0 0 10px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.small { font-size: 14px; line-height: 1.45; }
.tiny { font-size: 13px; line-height: 1.4; }

/* ---------- Kerangka ---------- */
.app {
  min-height: 100dvh;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
}
.app.no-nav { padding-bottom: env(safe-area-inset-bottom, 0px); }
.view { max-width: 680px; margin: 0 auto; padding: 22px 18px 40px; animation: viewIn .22s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  padding: 0 6px env(safe-area-inset-bottom, 0px);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-decoration: none; color: var(--ink-3); font-size: 12px; font-weight: 600;
}
.nav a .ico-wrap { width: 54px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .2s var(--ease); }
.nav a[aria-current="page"] { color: var(--sage); }
.nav a[aria-current="page"] .ico-wrap { background: var(--sage-tint); }
.nav a.add .ico-wrap { background: var(--sage); color: var(--sage-ink); }

@media (min-width: 900px) {
  .app, .app.no-nav { padding-left: var(--rail-w); padding-bottom: 0; }
  .app.no-nav { padding-left: 0; }
  .nav {
    top: 0; right: auto; width: var(--rail-w); height: auto;
    grid-template-columns: 1fr; grid-auto-rows: 80px; align-content: center;
    border-top: 0; border-right: 1px solid var(--line);
    padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px);
  }
  .view { padding-top: 40px; }
}

.topbar { display: flex; align-items: center; gap: 8px; margin: -6px 0 14px; min-height: 44px; }
.topbar .spacer { flex: 1; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 22px; border-radius: 16px; border: 0;
  font-weight: 600; font-size: 17px; cursor: pointer; text-decoration: none;
  background: var(--surface-2); color: var(--ink);
  transition: transform .12s var(--ease), background .2s var(--ease), opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .5; cursor: default; }
.btn-primary { background: var(--sage); color: var(--sage-ink); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-danger { background: var(--rose-tint); color: var(--rose); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; border: 0; background: transparent; color: var(--ink-2);
  display: inline-grid; place-items: center; cursor: pointer;
}
.icon-btn:active { background: var(--surface-2); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 12px; }
.grow { flex: 1; }

/* ---------- Kartu & permukaan ---------- */
.card { background: var(--surface); border-radius: var(--r-l); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 14px; }
.section { margin-top: 28px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.sec-head h2 { margin: 0; }
.sec-head a { font-size: 15px; font-weight: 600; text-decoration: none; }

.list { background: var(--surface); border-radius: var(--r-l); box-shadow: var(--shadow); overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; min-height: 64px;
  text-decoration: none; color: inherit; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
}
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row:active { background: var(--surface-2); }
.list-row .t { font-weight: 600; line-height: 1.3; }
.list-row .m { font-size: 13px; color: var(--ink-3); margin-top: 2px; }
.list-row .snip { font-size: 14px; color: var(--ink-2); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.list-row mark { background: var(--ochre-tint); color: inherit; border-radius: 3px; padding: 0 2px; }
.type-dot { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.type-pearl { background: var(--sage-tint); color: var(--sage); }
.type-vignette { background: var(--mist-tint); color: var(--mist); }
.type-tree { background: var(--ochre-tint); color: var(--ochre); }
.type-reference { background: var(--surface-2); color: var(--ink-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--sage-tint); border-color: transparent; color: var(--sage); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 18px 8px; margin: 0 -18px; scrollbar-width: none; scroll-snap-type: x proximity; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; }

.tag { display: inline-block; font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); margin: 0 6px 6px 0; }
.badge-review { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--ochre-tint); color: var(--ochre); }

.seg { display: flex; background: var(--surface-2); border-radius: 14px; padding: 4px; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.seg button { flex: 1; min-height: 40px; border: 0; background: transparent; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; white-space: nowrap; padding: 0 10px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- Form ---------- */
label.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.input, textarea.input, select.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 17px; font-weight: 400;
}
textarea.input { min-height: 180px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px var(--sage-tint); }
.search-wrap { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding: 6px 0 12px; margin-top: -6px; }
.search-wrap .input { padding-left: 46px; font-size: 18px; min-height: 54px; border-radius: 18px; }
.search-wrap .s-ico { position: absolute; left: 15px; top: 21px; color: var(--ink-3); pointer-events: none; }

.dropzone {
  border: 1.5px dashed var(--line); border-radius: var(--r-m); padding: 14px;
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: color-mix(in srgb, var(--surface) 60%, transparent);
}
.thumb { position: relative; width: 76px; height: 76px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; font-size: 12px; text-align: center; color: var(--ink-2); padding: 4px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.thumb .x { position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 99px; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 14px; cursor: pointer; z-index: 1; }

/* ---------- Isi kartu (blok) ---------- */
.blocks { display: grid; gap: 14px; }
.md p { margin: 0 0 6px; }
.md p:last-child { margin-bottom: 0; }
.md ul, .blk-list { margin: 0; padding-left: 20px; }
.md li, .blk-list li { margin: 3px 0; }
.kv { margin: 0; display: grid; gap: 1px; background: var(--line); border-radius: var(--r-m); overflow: hidden; }
.kv-row { display: grid; grid-template-columns: minmax(96px, 38%) 1fr; gap: 12px; padding: 11px 14px; background: var(--surface); }
.kv dt { font-weight: 600; color: var(--ink-2); font-size: 15px; }
.kv dd { margin: 0; font-weight: 500; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.compare > div { border-radius: var(--r-m); padding: 12px 14px; }
.compare > div:first-child { background: var(--sage-tint); }
.compare > div:last-child { background: var(--mist-tint); }
.compare h4 { margin: 0 0 6px; font-size: 15px; }
.compare ul { margin: 0; padding-left: 18px; font-size: 15px; }
@media (max-width: 360px) { .compare { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 14px 40px; counter-increment: s; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 99px;
  background: var(--sage-tint); color: var(--sage); font-size: 13px; font-weight: 700; display: grid; place-items: center;
}
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 12px; top: 28px; bottom: 2px; width: 2px; background: var(--sage-tint); }
.table-wrap { overflow-x: auto; border-radius: var(--r-m); border: 1px solid var(--line); }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 15px; }
.table-wrap th, .table-wrap td { padding: 9px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.table-wrap tr:last-child td { border-bottom: 0; }
.callout { border-radius: var(--r-m); padding: 12px 14px; display: flex; gap: 10px; font-size: 15px; }
.callout.warn { background: var(--ochre-tint); }
.callout.info { background: var(--mist-tint); }
.callout.tip { background: var(--sage-tint); }
.callout svg { flex: none; margin-top: 2px; }
figure { margin: 0; }
figure img { border-radius: var(--r-m); background: #fff; cursor: zoom-in; width: 100%; height: auto; }
figcaption { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.sources { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }

/* ---------- Blister (progres sesi) ---------- */
.blister {
  display: inline-flex; gap: 9px; padding: 11px 15px; border-radius: 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 70%, #fff 30%), var(--surface-2));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(0,0,0,.05);
}
.pill {
  width: 30px; height: 14px; border-radius: 999px; position: relative;
  background: linear-gradient(90deg, var(--capsule-a) 50%, var(--capsule-b) 50%);
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.10), inset 0 2px 0 rgba(255,255,255,.45), 0 1px 2px rgba(0,0,0,.08);
  transition: transform .35s var(--ease), opacity .35s var(--ease);
}
.pill.done { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.pill.current { transform: scale(1.12) rotate(-6deg); }
.pill.pop { animation: pop .4s var(--ease); }
@keyframes pop { 0% { transform: scale(1.12); } 40% { transform: scale(.6); opacity: .3; } 100% { transform: scale(1); opacity: 1; } }

/* ---------- Beranda ---------- */
.home-head { margin-bottom: 18px; }
.session-card { padding: 24px 22px 22px; }
.session-card h2 { margin-top: 18px; font-size: 25px; }
.session-card .btn { margin-top: 14px; }
.algo-chip {
  flex: none; width: 170px; min-height: 92px; padding: 14px; border-radius: 18px; text-decoration: none; color: var(--ink);
  background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
}
.algo-chip .t { font-weight: 600; font-size: 15px; line-height: 1.3; }
.algo-chip .m { font-size: 12px; color: var(--ochre); font-weight: 600; }

/* ---------- Sesi ---------- */
.session-top { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; justify-items: center; margin: -8px 0 18px; }
.flash { min-height: calc(100dvh - 110px - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; }
.flash .front { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 10px 0 24px; }
.flash .front h2 { font-size: 24px; line-height: 1.3; }
.reveal { animation: reveal .28s var(--ease); }
@keyframes reveal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.dock {
  position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 70%, transparent); margin-top: 18px;
}
.rate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rate.three { grid-template-columns: repeat(3, 1fr); }
.rate button { min-height: 64px; border: 0; border-radius: 16px; font-weight: 600; font-size: 15px; cursor: pointer; display: grid; place-content: center; gap: 1px; }
.rate button span { font-size: 12px; font-weight: 500; opacity: .8; }
.rate .r1 { background: var(--rose-tint); color: var(--rose); }
.rate .r2 { background: var(--ochre-tint); color: var(--ochre); }
.rate .r3 { background: var(--sage-tint); color: var(--sage); }
.rate .r4 { background: var(--mist-tint); color: var(--mist); }

.stem { font-size: 18px; line-height: 1.55; }
.opts { display: grid; gap: 10px; margin-top: 14px; }
.opt {
  text-align: left; border: 1.5px solid var(--line); background: var(--surface); border-radius: 16px; padding: 14px 16px;
  min-height: 56px; cursor: pointer; font-size: 16px; font-weight: 500; transition: background .2s, border-color .2s;
}
.opt.correct { background: var(--sage-tint); border-color: var(--sage); }
.opt.wrong { background: var(--rose-tint); border-color: var(--rose); }
.opt.dim { opacity: .55; }
.opt .why { display: block; font-size: 14px; font-weight: 400; color: var(--ink-2); margin-top: 6px; }
.verdict { font-weight: 700; font-size: 18px; margin: 16px 0 6px; }

/* ---------- Pohon keputusan ---------- */
.trail { display: grid; gap: 6px; margin-bottom: 14px; }
.trail button {
  display: flex; gap: 10px; align-items: baseline; text-align: left; border: 0; background: transparent; padding: 6px 4px; cursor: pointer;
  color: var(--ink-2); font-size: 14px; border-radius: 10px;
}
.trail button b { color: var(--ochre); font-weight: 600; white-space: nowrap; }
.node { border-radius: var(--r-l); padding: 22px 20px; background: var(--surface); box-shadow: var(--shadow); border-left: 6px solid var(--ochre); }
.node.action { border-left-color: var(--mist); }
.node.end { border-left-color: var(--sage); background: color-mix(in srgb, var(--sage-tint) 55%, var(--surface)); }
.node .kind { font-size: 13px; font-weight: 600; color: var(--ink-3); margin-bottom: 6px; }
.node h2 { font-size: 22px; }
.node-opts { display: grid; gap: 10px; margin-top: 16px; }
.node-opts .btn { justify-content: space-between; text-align: left; min-height: 58px; background: var(--surface-2); }
.outline { font-size: 15px; }
.outline ul { list-style: none; margin: 0; padding-left: 16px; border-left: 2px solid var(--line); }
.outline > ul { padding-left: 0; border-left: 0; }
.outline li { margin: 8px 0; }
.outline .lbl { color: var(--ochre); font-weight: 600; font-size: 13px; }
.outline .end { color: var(--sage); font-weight: 600; }

/* ---------- Progres ---------- */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.week .d { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.leaf { width: 34px; height: 34px; margin: 0 auto; border-radius: 50% 4px 50% 4px; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.leaf.l1 { background: var(--sage-tint); box-shadow: none; }
.leaf.l2 { background: color-mix(in srgb, var(--sage) 50%, var(--sage-tint)); box-shadow: none; }
.leaf.l3 { background: var(--sage); box-shadow: none; }
.leaf.today { outline: 2px solid var(--ochre); outline-offset: 2px; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar > i { display: block; height: 100%; }
.stat-big { font-size: 34px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stats3 > div { background: var(--surface); border-radius: var(--r-m); padding: 14px; box-shadow: var(--shadow); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.forecast { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end; height: 90px; }
.forecast > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 12px; color: var(--ink-3); gap: 4px; }
.forecast i { width: 70%; background: var(--mist-tint); border-radius: 6px 6px 3px 3px; min-height: 3px; }

/* ---------- Status & lainnya ---------- */
.empty { text-align: center; padding: 40px 14px; }
.empty .art { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 30px; background: var(--surface); display: grid; place-items: center; box-shadow: var(--shadow); color: var(--sage); }
.empty h2 { margin-bottom: 6px; }
.empty .btn { margin-top: 14px; }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--ochre-tint); color: var(--ink); font-size: 14px; }
.banner a, .banner button { margin-left: auto; font-weight: 700; color: var(--ochre); background: none; border: 0; cursor: pointer; text-decoration: none; }
.skeleton { border-radius: 12px; background: linear-gradient(90deg, var(--surface-2), var(--surface), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.spinner { width: 22px; height: 22px; border-radius: 99px; border: 3px solid var(--sage-tint); border-top-color: var(--sage); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 50;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px) + 14px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 15px; font-weight: 500;
  box-shadow: var(--shadow); animation: reveal .25s var(--ease); max-width: calc(100% - 36px);
}
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(20, 18, 15, .92); overflow: auto; display: grid; place-items: center; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.lightbox img { max-width: 100vw; max-height: 100dvh; background: #fff; }
.lightbox.zoom img { max-width: none; max-height: none; width: 200vw; }
.lightbox .close { position: fixed; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 12px; color: #fff; background: rgba(255,255,255,.15); }
.sync-dot { display: inline-block; width: 8px; height: 8px; border-radius: 99px; background: var(--sage); margin-right: 6px; }
.sync-dot.offline { background: var(--ink-3); }
.sync-dot.error, .sync-dot.auth { background: var(--rose); }
.sync-dot.syncing { background: var(--ochre); }
.code-box { font-size: 30px; font-weight: 700; letter-spacing: .18em; text-align: center; padding: 14px; background: var(--surface-2); border-radius: var(--r-m); }
.preview-item { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--surface); }
.preview-item > summary { list-style: none; display: flex; gap: 12px; align-items: center; padding: 12px 14px; cursor: pointer; }
.preview-item > summary::-webkit-details-marker { display: none; }
.preview-item .body { padding: 0 14px 16px; }
.preview-item input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--sage); flex: none; }
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login .card { max-width: 400px; width: 100%; text-align: center; padding: 30px 24px; }
.login .blister { margin-bottom: 18px; }
hr.soft { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- Divisi ---------- */
.div-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.div-grid.one { grid-template-columns: 1fr; }
@media (min-width: 700px) { .div-grid { grid-template-columns: repeat(3, 1fr); } .div-grid.one { grid-template-columns: repeat(2, 1fr); } }
.div-tile {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 128px; padding: 14px;
  border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  border-top: 4px solid color-mix(in srgb, var(--div) 55%, var(--surface));
}
.div-tile:active { transform: scale(.985); }
.div-tile .name { font-weight: 650; font-size: 15px; line-height: 1.25; margin-top: 4px; }
.div-tile .meta { font-size: 12.5px; color: var(--ink-3); line-height: 1.35; }
.div-tile .meta b { color: color-mix(in srgb, var(--div) 70%, var(--ink)); font-weight: 600; }
.div-tile .bar { margin-top: auto; }
.div-tile .bar i { background: color-mix(in srgb, var(--div) 70%, var(--surface)); }
.div-tile.big { flex-direction: row; flex-wrap: wrap; align-items: center; min-height: 0; padding: 16px; gap: 6px 14px; }
.div-tile.big .name { font-size: 17px; margin: 0; flex: 1; }
.div-tile.big .meta { width: 100%; padding-left: 58px; margin-top: -6px; }
.div-tile.big .bar { width: calc(100% - 58px); margin-left: 58px; }
.div-badge { display: inline-grid; place-items: center; border-radius: 12px; font-weight: 700; letter-spacing: .02em; flex: none; }
.div-head { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: var(--r-l); }
.bar.thin { height: 5px; }
.bar.thin i { background: var(--sage); }
