/* GWA — Grow With Abda. Tiga alternatif tema diatur lewat variabel di bawah. */
:root,
[data-theme='bumi'] {
  --bg: #fbf5ea; --surface: #fffdf9; --surface-2: #f5eada; --ink: #33170c; --muted: #75605a; --line: #e8d9c5;
  --primary: #a8442a; --primary-dark: #7e2f1b; --primary-soft: #f6e2d6;
  --accent: #b97a1f; --accent-soft: #f7ecd3; --deep: #3b1a0e; --deep-ink: #f6e9d8;
}
/* Biru Baja: biru tua, gradasi biru lain, dan abu sejuk — sudut lebih tegas, bayangan tipis. */
html[data-theme='baja'] {
  --bg: #eef0f3; --surface: #ffffff; --surface-2: #dcdfe5; --ink: #0b1a26; --muted: #49525e; --line: #cdd3da;
  --primary: #1f4468; --primary-dark: #14304c; --primary-soft: #d5e1ed;
  --accent: #4a7ba6; --accent-soft: #dfe9f2; --deep: #0b1f33; --deep-ink: #dce3ea;
  --glow: #9fc3e3; --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(11 31 51 / 0.05), 0 14px 30px -18px rgb(11 31 51 / 0.24);
}
[data-theme='baja'] .hero-art .blob { background: #c5d5e4; }
[data-theme='baja'] .hero-art .blob.two { background: #dcdfe5; }
[data-theme='sage'] {
  --bg: #f4f6ef; --surface: #ffffff; --surface-2: #e8eee1; --ink: #22332a; --muted: #5e6e64; --line: #d7e0d0;
  --primary: #4a7560; --primary-dark: #335645; --primary-soft: #ddeadf;
  --accent: #b8562f; --accent-soft: #f6e3d7; --deep: #24382e; --deep-ink: #eef3e8;
}
[data-theme='samudra'] {
  --bg: #f1f6f7; --surface: #ffffff; --surface-2: #e1edef; --ink: #11303a; --muted: #567079; --line: #d0e0e4;
  --primary: #1d6c78; --primary-dark: #134e57; --primary-soft: #d8ecef;
  --accent: #b97a1f; --accent-soft: #f8ebd2; --deep: #0f2f38; --deep-ink: #e6f1f3;
}
:root {
  --ok: #2c7a4b; --ok-soft: #e0f1e6; --warn: #8f5d00; --warn-soft: #fbefcf; --danger: #b3261e; --danger-soft: #fbe3e0;
  --radius: 18px; --radius-sm: 12px; --glow: #ffd9a8;
  --shadow: 0 1px 2px rgb(60 30 10 / 0.05), 0 12px 32px -16px rgb(60 30 10 / 0.18);
  --serif: var(--sans);
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.7 var(--sans); letter-spacing: 0.002em; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; display: block; }
a { color: var(--primary-dark); text-underline-offset: 3px; }
/* Satu keluarga huruf (Plus Jakarta Sans) dengan lebar normal: judul dibedakan lewat ukuran dan ketebalan, bukan huruf sempit. */
h1, h2, h3, h4 { font-family: var(--sans); font-weight: 700; line-height: 1.2; letter-spacing: -0.022em; margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.05rem, 4.6vw, 3.3rem); line-height: 1.14; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.025em; }
h3 { font-size: 1.2rem; line-height: 1.3; letter-spacing: -0.012em; }
h4, .h-ui, .card-head h2, .card-head h3, .topbar h1, details.fold summary, .item b, .prose h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; }
h4 { font-size: 1.02rem; }
.h-ui { font-size: 1.1rem; }
.prose h3 { font-size: 1.12rem; }
p { text-wrap: pretty; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { width: 1.25em; height: 1.25em; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; line-height: 1.55; }
.center { text-align: center; }
.wrap { width: min(1160px, 100% - 2.5rem); width: min(1160px, 100% - 2.5rem - env(safe-area-inset-left) - env(safe-area-inset-right)); margin-inline: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); }
.eyebrow::before { content: ''; width: 1.6rem; height: 2px; background: var(--accent); border-radius: 2px; }
.lead { font-size: clamp(1.08rem, 1.5vw, 1.22rem); line-height: 1.65; color: var(--muted); max-width: 58ch; }

/* ---------- Tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 46px; padding: 0.65rem 1.25rem; border: 1.5px solid transparent; border-radius: 999px; background: var(--primary); color: #fff; font: 600 0.95rem/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background 0.18s, transform 0.18s, box-shadow 0.18s; }
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 10px 20px -12px var(--primary-dark); }
.btn.ghost { background: transparent; color: var(--primary-dark); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn.soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn.soft:hover { background: var(--surface-2); box-shadow: none; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn.danger:hover { background: var(--danger-soft); box-shadow: none; }
.btn.light { background: #fff; color: var(--deep); }
.btn.sm { min-height: 36px; padding: 0.35rem 0.85rem; font-size: 0.85rem; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.65rem; align-items: center; }

/* ---------- Kartu, lencana, tata letak ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.1rem, 2.4vw, 1.6rem); box-shadow: var(--shadow); }
.card > :last-child { margin-bottom: 0; }
.card.flat { box-shadow: none; }
.card.tint { background: var(--surface-2); border-color: transparent; box-shadow: none; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 1rem; }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.1rem; }
.grid { display: grid; gap: 1.15rem; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.g3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.split { display: grid; gap: 1.15rem; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; }
.stack { display: grid; gap: 1.15rem; align-content: start; min-width: 0; }
.badge { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.65rem; border-radius: 999px; background: var(--surface-2); color: var(--ink); font-size: 0.76rem; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--primary-soft); color: var(--primary-dark); }
.meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; color: var(--muted); font-size: 0.9rem; margin: 0; padding: 0; list-style: none; }
.meta li { display: inline-flex; align-items: center; gap: 0.4rem; }
.dl { display: grid; grid-template-columns: minmax(110px, 0.42fr) 1fr; gap: 0.5rem 1rem; margin: 0; font-size: 0.94rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty .icon { width: 2rem; height: 2rem; margin: 0 auto 0.6rem; color: var(--primary); }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.35em; }
.prose { overflow-wrap: anywhere; }

.flash { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.1rem; font-weight: 500; background: var(--ok-soft); color: var(--ok); }
.flash.err { background: var(--danger-soft); color: var(--danger); }
.flash.warn { background: var(--warn-soft); color: var(--warn); }

/* ---------- Formulir ---------- */
.form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.35rem; min-width: 0; }
.field > label, .field > .label { font-weight: 600; font-size: 0.94rem; }
.field .hint { font-size: 0.86rem; line-height: 1.5; color: var(--muted); }
.row2 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
input[type='text'], input[type='email'], input[type='password'], input[type='tel'], input[type='date'], input[type='datetime-local'], input[type='number'], input[type='url'], input[type='search'], select, textarea {
  width: 100%; min-height: 46px; padding: 0.6rem 0.85rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
input[type='file'] { width: 100%; padding: 0.6rem; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--surface); font: inherit; font-size: 0.9rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice > span { display: inline-flex; align-items: center; gap: 0.45rem; min-height: 42px; padding: 0.4rem 0.95rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 0.92rem; font-weight: 500; }
.choice input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.92rem; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--primary); }
.inline-form { display: inline; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; margin: 0 -0.25rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th { text-align: left; font-size: 0.74rem; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); padding: 0.55rem 0.7rem; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
td { padding: 0.75rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td strong { display: block; }

/* ---------- Navigasi publik ---------- */
.site-nav { position: sticky; top: 0; z-index: 30; background: var(--bg); background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); padding-top: env(safe-area-inset-top); border-bottom: 1px solid var(--line); }
.site-nav .wrap { display: flex; align-items: center; gap: 1rem; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand img { height: 44px; width: auto; }
.brand b { font-weight: 700; font-size: 1.08rem; line-height: 1.1; display: block; letter-spacing: -0.015em; }
.brand small { font-size: 0.68rem; color: var(--muted); letter-spacing: 0.02em; }
.nav-links { display: flex; align-items: center; gap: 0.25rem; }
.nav-links a:not(.btn) { padding: 0.5rem 0.8rem; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.nav-links a:not(.btn):hover, .nav-links a.on { background: var(--surface-2); }
.nav-links .btn { margin-left: 0.35rem; }
.nav-toggle { display: none; width: 44px; height: 44px; margin-right: -8px; padding: 0; border: 0; background: none; color: var(--ink); align-items: center; justify-content: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav-toggle .bars { position: relative; width: 26px; height: 10px; }
.nav-toggle .bars i { position: absolute; left: 0; right: 0; height: 1.75px; border-radius: 2px; background: currentColor; transition: transform 0.38s cubic-bezier(0.2, 0.8, 0.2, 1), width 0.3s ease; }
.nav-toggle .bars i:first-child { top: 0; }
.nav-toggle .bars i:last-child { bottom: 0; width: 62%; left: auto; }
.nav-toggle:hover .bars i:last-child { width: 100%; }
.nav-toggle[aria-expanded='true'] .bars i:first-child { transform: translateY(4.1px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .bars i:last-child { width: 100%; transform: translateY(-4.1px) rotate(-45deg); }

/* ---------- Beranda ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero .btn-row { margin-top: 1.6rem; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.8rem; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: 0.45rem; }
.hero-trust .icon { color: var(--primary); }
.hero-art { position: relative; aspect-ratio: 1 / 1; max-width: 480px; width: 100%; margin-inline: auto; }
.hero-art .blob { position: absolute; inset: 4% 2% 2% 6%; background: var(--primary-soft); border-radius: 58% 42% 46% 54% / 52% 48% 52% 48%; }
.hero-art .blob.two { inset: 14% 10% 18% -2%; background: var(--accent-soft); border-radius: 42% 58% 60% 40% / 46% 56% 44% 54%; transform: rotate(-8deg); }
.hero-art .logo-tile { position: absolute; inset: 17% 12%; background: #fff; border-radius: 30px; display: grid; place-items: center; box-shadow: 0 30px 60px -30px rgb(60 30 10 / 0.45); overflow: hidden; }
.hero-art .logo-tile img { width: 100%; height: 100%; object-fit: contain; padding: 9%; }
/* Logo unggahan admin: tanpa bingkai krem bawaan; di latar gelap diberi alas putih agar tetap terbaca. */
.site-nav .brand img.custom, [data-theme] .site-nav .brand img.custom { mix-blend-mode: normal; background: none; padding: 0; border-radius: 0; }
.side .brand img.custom { background: #fff; }
.site-foot .logo.custom, .auth-side .logo.custom { background: #fff; padding: 8px; object-fit: contain; filter: none; border-radius: 16px; }
.hero-art .logo-tile.custom { background: #fff; }
.hero-art .logo-tile.custom img { object-fit: contain; padding: 10%; }
.logo-preview { display: grid; place-items: center; height: 110px; padding: 0.8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.logo-preview img { max-height: 100%; max-width: 100%; object-fit: contain; }
.hero-slides { position: absolute; inset: 9% 8%; border-radius: 28px; overflow: hidden; background: var(--surface-2); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.45); }
.hero-slides img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.06); transition: opacity 1.4s ease, transform 7s ease-out; }
.hero-slides img.on { opacity: 1; transform: none; }
.float { position: absolute; display: flex; align-items: center; gap: 0.6rem; padding: 0.65rem 0.9rem; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); font-size: 0.82rem; font-weight: 600; line-height: 1.3; }
.float small { display: block; font-weight: 400; color: var(--muted); }
.float i { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--primary-soft); color: var(--primary-dark); }
.float.a { top: 5%; right: -1%; }
.float.b { bottom: 6%; left: -2%; }
.float.b i { background: var(--accent-soft); color: var(--accent); }
.section { padding: clamp(2.6rem, 6vw, 4.8rem) 0; }
.section.alt { background: var(--surface-2); }
.section-head { max-width: 680px; margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }
.section-head.center { margin-inline: auto; }
.section-head.center .eyebrow::after { content: ''; width: 1.6rem; height: 2px; background: var(--accent); border-radius: 2px; }

.crisis { background: var(--deep); color: var(--deep-ink); border-radius: var(--radius); padding: clamp(1.1rem, 3vw, 1.7rem); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 1rem 1.4rem; align-items: center; }
.crisis h3 { color: #fff; margin: 0 0 0.25rem; font-size: 1.2rem; }
.crisis p { margin: 0; opacity: 0.86; font-size: 0.93rem; }
.crisis .pulse { width: 52px; height: 52px; border-radius: 50%; background: rgb(255 255 255 / 0.12); display: grid; place-items: center; color: var(--glow); }
.crisis-contacts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.8rem 0 0; padding: 0; list-style: none; }
.crisis-contacts li { background: rgb(255 255 255 / 0.1); border-radius: 12px; padding: 0.4rem 0.75rem; font-size: 0.85rem; }
.crisis-contacts b { display: block; font-size: 1rem; color: #fff; }
.crisis-contacts li:has(a) { padding: 0; }
.crisis-contacts a { display: flex; align-items: center; gap: 0.9rem; min-height: 52px; padding: 0.45rem 0.85rem; border-radius: 12px; color: inherit; text-decoration: none; transition: background 0.2s; }
.crisis-contacts a:hover { background: rgb(255 255 255 / 0.12); }
.crisis-contacts a .icon { margin-left: auto; width: 2.1rem; height: 2.1rem; padding: 0.5rem; border-radius: 50%; background: rgb(255 255 255 / 0.14); color: var(--glow); }
.crisis .crisis-hint { margin-top: 0.7rem; font-size: 0.82rem; opacity: 0.7; }

.svc { display: flex; flex-direction: column; gap: 0.6rem; text-decoration: none; color: inherit; transition: transform 0.2s, border-color 0.2s; height: 100%; }
a.svc:hover { transform: translateY(-4px); border-color: var(--primary); }
.svc .ico { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); }
.svc .ico .icon { width: 1.5rem; height: 1.5rem; }
.svc:nth-child(even) .ico { background: var(--accent-soft); color: var(--accent); }
.svc h3 { margin: 0.3rem 0 0; }
.svc p { color: var(--muted); font-size: 0.94rem; margin: 0; flex: 1; }
.svc .go { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.88rem; color: var(--primary-dark); }
.steps { counter-reset: step; display: grid; gap: 1.15rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); padding: 0; margin: 0; list-style: none; }
.steps li { counter-increment: step; position: relative; padding: 1.3rem 1.2rem 1.2rem; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--line); }
.steps li::before { content: counter(step, decimal-leading-zero); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.03em; color: var(--accent); display: block; line-height: 1; margin-bottom: 0.7rem; }
.steps p { color: var(--muted); font-size: 0.93rem; margin: 0; }
/* Isi yang baru muncul setelah tombolnya diklik, dengan gerak membuka yang lembut. */
.reveal { display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease, visibility 0s linear 0.5s; }
.reveal > div { overflow: hidden; min-height: 0; }
.reveal.open { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition-delay: 0s; }
[data-reveal] .icon { transition: transform 0.3s ease; }
[data-reveal][aria-expanded='true'] .icon { transform: rotate(90deg); }
.programs { counter-reset: prog; display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); padding: 1.6rem 0 0; margin: 0; list-style: none; }
.programs li { counter-increment: prog; }
.programs a { display: flex; align-items: flex-start; gap: 0.9rem; height: 100%; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; line-height: 1.35; transition: border-color 0.2s, transform 0.2s; }
.programs a::before { content: counter(prog, decimal-leading-zero); flex: none; font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); padding-top: 0.15rem; }
.programs a:hover { border-color: var(--primary); transform: translateY(-2px); }
.programs b { display: block; font-weight: 600; }
.programs small { display: block; margin-top: 0.3rem; color: var(--muted); font-size: 0.9rem; line-height: 1.5; font-weight: 400; }
.program-pick { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.program-pick .choice > span { width: 100%; height: 100%; border-radius: var(--radius-sm); min-height: 52px; display: block; padding: 0.7rem 0.9rem; }
.program-pick small { display: block; margin-top: 0.2rem; color: var(--muted); font-size: 0.84rem; line-height: 1.45; font-weight: 400; }
.who { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0; margin: 1.2rem 0 0; list-style: none; }
.who li { padding: 0.5rem 1rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 0.9rem; }
.post { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-decoration: none; color: inherit; height: 100%; transition: transform 0.2s; }
a.post:hover { transform: translateY(-4px); }
.post .cover { aspect-ratio: 16 / 9; background: var(--primary-soft); display: grid; place-items: center; color: var(--primary); overflow: hidden; }
.post .cover img { width: 100%; height: 100%; object-fit: cover; }
.post .cover .icon { width: 2.4rem; height: 2.4rem; opacity: 0.6; }
.post .body { padding: 1.15rem 1.25rem 1.3rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.post h3 { margin: 0; font-size: 1.15rem; }
.post p { color: var(--muted); font-size: 0.93rem; margin: 0; flex: 1; }
.cta { background: var(--primary); color: #fff; border-radius: calc(var(--radius) + 8px); padding: clamp(1.8rem, 5vw, 3.2rem); display: grid; gap: 1rem; justify-items: start; position: relative; overflow: hidden; }
.cta::after { content: ''; position: absolute; right: -80px; top: -80px; width: 300px; height: 300px; border-radius: 50%; background: rgb(255 255 255 / 0.1); }
.cta h2 { margin: 0; max-width: 20ch; font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.cta p { margin: 0; opacity: 0.9; max-width: 52ch; }
.site-foot { background: var(--deep); color: var(--deep-ink); padding: 3rem 0 1.5rem; margin-top: clamp(2.6rem, 6vw, 4.8rem); }
.site-foot .cols { display: grid; gap: 2rem; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; }
.site-foot h4 { color: #fff; margin-bottom: 0.7rem; }
.site-foot a { color: inherit; text-decoration: none; opacity: 0.85; display: block; padding: 0.2rem 0; }
.site-foot a:hover { opacity: 1; text-decoration: underline; }
/* Logo footer tampil putih polos di atas latar gelap (bentuknya diambil dari gambar berlatar transparan). */
.site-foot .logo { width: 170px; margin-bottom: 1.1rem; filter: brightness(0) invert(1); }
.site-foot .fine { border-top: 1px solid rgb(255 255 255 / 0.14); margin-top: 2rem; padding-top: 1.2rem; font-size: 0.82rem; opacity: 0.75; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.page-head { padding: clamp(2rem, 5vw, 3.4rem) 0 0.5rem; }
.article { max-width: 760px; margin-inline: auto; }
.article .cover { border-radius: var(--radius); overflow: hidden; margin: 1.5rem 0; aspect-ratio: 16 / 8; background: var(--primary-soft); }
.article .cover img { width: 100%; height: 100%; object-fit: cover; }
.article .prose { font-size: 1.12rem; line-height: 1.8; }
.article .prose p { max-width: 66ch; }

/* ---------- Halaman masuk/daftar ---------- */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
.auth-side { background: var(--deep); color: var(--deep-ink); padding: clamp(1.5rem, 4vw, 3rem); display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; position: relative; overflow: hidden; }
.auth-side::after { content: ''; position: absolute; width: 420px; height: 420px; right: -160px; bottom: -140px; border-radius: 50%; background: rgb(255 255 255 / 0.06); }
.auth-side h2 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.auth-side .logo { width: 170px; border-radius: 18px; background: #fff; padding: 12px 14px; }
.auth-side ul { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.7rem; font-size: 0.95rem; }
.auth-side li { display: flex; gap: 0.6rem; align-items: flex-start; }
.auth-side li .icon { color: var(--glow); margin-top: 0.2rem; }
.auth-side a { color: inherit; }
.auth-main { padding: clamp(1.5rem, 5vw, 3.5rem); display: grid; align-content: center; }
.auth-main .inner { width: min(620px, 100%); margin-inline: auto; }
.auth-main.narrow .inner { width: min(420px, 100%); }
.role-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
.role-grid .choice > span { width: 100%; border-radius: var(--radius-sm); flex-direction: column; align-items: flex-start; gap: 0.1rem; padding: 0.7rem 0.9rem; }
.role-grid .choice small { font-weight: 400; color: var(--muted); font-size: 0.78rem; line-height: 1.35; }

/* Halaman masuk admin: satu kartu di tengah latar gelap, sengaja berbeda dari halaman masuk pengguna. */
.admin-login { min-height: 100dvh; display: grid; place-items: center; padding: 1.5rem; background: var(--deep); position: relative; overflow: hidden; }
.admin-login::before, .admin-login::after { content: ''; position: absolute; border-radius: 50%; background: rgb(255 255 255 / 0.05); }
.admin-login::before { width: 520px; height: 520px; left: -180px; top: -200px; }
.admin-login::after { width: 420px; height: 420px; right: -150px; bottom: -170px; }
.admin-login .box { position: relative; z-index: 1; width: min(420px, 100%); background: var(--surface); border-radius: calc(var(--radius) + 6px); padding: clamp(1.5rem, 5vw, 2.4rem); box-shadow: 0 40px 80px -30px rgb(0 0 0 / 0.6); display: grid; gap: 1.1rem; }
.admin-login .mark { display: flex; align-items: center; gap: 0.8rem; }
.admin-login .mark img { height: 46px; width: auto; }
.admin-login .mark img.custom { background: none; padding: 0; }
.admin-login h1 { font-size: 1.6rem; margin: 0; }
.admin-login .back { text-align: center; font-size: 0.9rem; margin: 0; }

/* ---------- Kerangka aplikasi (dashboard) ---------- */
.app { display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100dvh; }
.side { background: var(--deep); color: var(--deep-ink); padding: 1.2rem 0.9rem; display: flex; flex-direction: column; gap: 1.1rem; position: sticky; top: 0; height: 100dvh; overflow-y: auto; }
.side .brand { color: #fff; margin: 0 0.3rem; }
.side .brand img { background: #fff; border-radius: 12px; padding: 5px 7px; height: 44px; }
.side .brand small { color: var(--deep-ink); opacity: 0.7; }
.side nav { display: grid; gap: 0.15rem; }
.side .group { font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.55; padding: 0.9rem 0.8rem 0.3rem; }
.side nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.62rem 0.8rem; border-radius: 12px; color: inherit; text-decoration: none; font-weight: 500; font-size: 0.94rem; opacity: 0.86; }
.side nav a:hover { background: rgb(255 255 255 / 0.08); opacity: 1; }
.side nav a.on { background: #fff; color: var(--deep); opacity: 1; font-weight: 700; }
.side nav a .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; font-size: 0.72rem; font-weight: 700; padding: 0.05rem 0.5rem; }
.side .me { margin-top: auto; background: rgb(255 255 255 / 0.08); border-radius: 16px; padding: 0.8rem; display: grid; gap: 0.6rem; }
.side .me b { display: block; line-height: 1.25; overflow-wrap: anywhere; }
.side .me small { opacity: 0.7; }
.side .me button { width: 100%; background: transparent; color: inherit; border: 1px solid rgb(255 255 255 / 0.22); border-radius: 999px; min-height: 40px; font: 600 0.86rem var(--sans); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; }
.side .me button:hover { background: rgb(255 255 255 / 0.1); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem clamp(1rem, 3vw, 2rem); background: var(--bg); background: color-mix(in srgb, var(--bg) 90%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: clamp(1.05rem, 2vw, 1.25rem); margin: 0 auto 0 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { position: relative; width: 44px; height: 44px; flex: none; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center; text-decoration: none; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .dot { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 0.7rem; font-weight: 700; display: grid; place-items: center; }
.icon-btn .dot[hidden] { display: none; }
.side-toggle { display: none; }
.content { padding: clamp(1rem, 3vw, 2rem); display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.15rem; align-content: start; flex: 1; }
/* Anak grid/flex tidak boleh melebar mengikuti isi (tabel, baris tab) — tanpa ini halaman bergeser ke samping di ponsel. */
.content > *, .split > *, .stack > *, .grid > *, .card { min-width: 0; }
.content > .flash { margin: 0; }
.scrim { display: none; }
.stat { display: flex; flex-direction: column; gap: 0.2rem; text-decoration: none; color: inherit; }
.stat .n { font-size: 2.1rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--primary-dark); }
.stat .l { color: var(--muted); font-size: 0.88rem; }
.stat.hot { border-color: var(--primary); background: var(--primary-soft); }
.welcome { background: var(--primary); color: #fff; border: 0; position: relative; overflow: hidden; }
.welcome::after { content: ''; position: absolute; right: -70px; bottom: -110px; width: 260px; height: 260px; border-radius: 50%; background: rgb(255 255 255 / 0.1); }
.welcome h2 { margin: 0 0 0.3rem; font-size: clamp(1.5rem, 2.6vw, 1.95rem); }
.welcome p { opacity: 0.92; max-width: 56ch; }
.welcome .meta { color: #fff; opacity: 0.95; margin-bottom: 1rem; }
.welcome > * { position: relative; z-index: 1; }
.list { display: grid; gap: 0.6rem; padding: 0; margin: 0; list-style: none; }
.item { display: flex; gap: 0.9rem; align-items: center; padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); text-decoration: none; color: inherit; }
a.item:hover { border-color: var(--primary); }
.item .grow { flex: 1; min-width: 0; }
.item b { display: block; overflow-wrap: anywhere; line-height: 1.35; }
.item .date { flex: none; width: 54px; text-align: center; background: var(--primary-soft); color: var(--primary-dark); border-radius: 12px; padding: 0.35rem 0; line-height: 1.1; font-weight: 700; }
.item .date small { display: block; font-size: 0.66rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.item.unread { border-color: var(--primary); background: var(--primary-soft); }
.tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.tabs a { padding: 0.4rem 0.9rem; border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; color: var(--ink); font-size: 0.88rem; font-weight: 600; background: var(--surface); }
.tabs a.on { background: var(--deep); border-color: var(--deep); color: #fff; }
.track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; padding: 0; margin: 0; list-style: none; }
.track li { font-size: 0.78rem; font-weight: 600; color: var(--muted); padding-top: 0.6rem; border-top: 4px solid var(--line); }
.track li.done { border-color: var(--primary); color: var(--primary-dark); }
.track li.now { border-color: var(--accent); color: var(--ink); }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.6rem; }
.photos a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.photos img { width: 100%; height: 100%; object-fit: cover; }
details.fold { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
details.fold + details.fold { margin-top: 0.6rem; }
details.fold summary { cursor: pointer; padding: 0.85rem 1rem; font-weight: 700; display: flex; align-items: center; gap: 0.6rem; list-style: none; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold summary::after { content: '+'; margin-left: auto; font-size: 1.3rem; line-height: 1; color: var(--primary); }
details.fold[open] summary::after { content: '–'; }
details.fold .inner { padding: 0 1rem 1rem; }

/* ---------- Worksheet kartu sintaks: satu kartu per sesi, lima kolom ---------- */
.mcards { display: grid; gap: 0.8rem; }
.mcard { border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); background: var(--bg); padding: 0.8rem; display: grid; gap: 0.6rem; }
.mcard-grid { display: grid; gap: 0.6rem; grid-template-columns: 0.7fr repeat(4, minmax(0, 1fr)); align-items: start; }
.mcard-grid .field { gap: 0.3rem; }
.mcard-grid label, .mview-card h4 { margin: 0; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); line-height: 1.3; }
.mcard-grid label { min-height: 2.9em; display: flex; align-items: flex-end; }
.mcard-grid select, .mcard-grid textarea { min-height: 40px; padding: 0.4rem 0.5rem; font-size: 0.88rem; line-height: 1.45; }
.mcard-grid textarea { min-height: 0; }
.mcard-foot { display: flex; justify-content: flex-end; }
.wcards { counter-reset: wcard; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); padding: 0; margin: 0 0 0.4rem; list-style: none; }
.wcards li { counter-increment: wcard; display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.85rem 1rem; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); background: var(--surface); font-size: 0.97rem; line-height: 1.5; break-inside: avoid; }
.wcards li::before { content: counter(wcard, decimal-leading-zero); flex: none; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: var(--accent); padding-top: 0.2rem; }
.mview { display: grid; gap: 0.8rem; }
.mview-card { display: grid; gap: 0.9rem 1.2rem; grid-template-columns: 0.55fr 1fr 1.2fr 1.5fr 1.5fr; padding: 1.1rem; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius); background: var(--surface); }
.mview-card h4 { margin-bottom: 0.4rem; }
.mview-card .prose { font-size: 0.95rem; }
.mview-card .prose > :last-child { margin-bottom: 0; }
.mview-card .prose ul { margin: 0; padding-left: 1.1rem; }
.mview-card > :first-child .prose, .mview-card > :nth-child(2) .prose { font-weight: 600; }
@media (max-width: 1100px) {
  .mcard-grid, .mview-card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mcard-grid > :nth-child(n + 3), .mview-card > :nth-child(n + 3) { grid-column: 1 / -1; }
  .mcard-grid label { min-height: 0; }
}
@media (max-width: 560px) { .mcard-grid, .mview-card { grid-template-columns: minmax(0, 1fr); } .mcard-grid > *, .mview-card > * { grid-column: 1 / -1; } }
@media print { .mview-card { break-inside: avoid; } }

/* ---------- Bilah format editor & grafik dashboard ---------- */
.editor-bar { display: flex; flex-wrap: wrap; gap: 0.3rem; padding: 0.35rem; border: 1.5px solid var(--line); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--surface-2); }
.editor-bar button { min-height: 34px; padding: 0 0.7rem; border: 1px solid transparent; border-radius: 7px; background: var(--surface); color: var(--ink); font: 600 0.84rem var(--sans); cursor: pointer; }
.editor-bar button:hover { border-color: var(--primary); }
.editor-bar button.right { margin-left: auto; }
.editor-bar button[aria-pressed='true'] { background: var(--primary); color: #fff; }
.editor-bar + .editor-preview + textarea, .editor-bar + textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.editor-preview { border: 1.5px solid var(--line); border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--surface); padding: 1rem 1.1rem; min-height: 200px; }
.prose h4 { margin: 1.2em 0 0.4em; font-size: 1rem; }
.prose ol { padding-left: 1.4rem; }
.bars { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 4px; height: 170px; align-items: end; padding-top: 1.2rem; }
.bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 3px; min-width: 0; }
.bar i { display: block; width: 100%; min-height: 2px; background: var(--primary); border-radius: 4px 4px 0 0; }
.bar .v { font-size: 0.7rem; font-weight: 700; color: var(--ink); }
.bar small { font-size: 0.7rem; color: var(--muted); }
.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-bottom: 0.2rem; }
.meter i { display: block; height: 100%; min-width: 2px; background: var(--primary); border-radius: 999px; }

/* ---------- Layanan khusus ---------- */
.fx-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); overflow: hidden; border-radius: calc(var(--radius) + 4px); background: var(--deep); color: #fff; text-decoration: none; min-height: 250px; transition: transform 0.25s; }
.fx-card:hover { transform: translateY(-4px); }
.fx-img { display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--deep)); color: var(--glow); }
.fx-img img { width: 100%; height: 100%; object-fit: cover; }
.fx-img .icon { width: 4rem; height: 4rem; stroke-width: 1.3; }
.fx-body { display: flex; flex-direction: column; gap: 0.6rem; padding: 1.6rem; }
.fx-body b { font-size: 1.6rem; letter-spacing: -0.02em; line-height: 1.2; }
.fx-body span { color: var(--deep-ink); line-height: 1.55; }
.fx-body .go { margin-top: auto; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--glow); font-weight: 700; font-size: 0.92rem; }
.fx-hero { padding: clamp(2rem, 5vw, 3.6rem) 0 1.5rem; }
.fx-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.fx-cover { aspect-ratio: 4 / 3; border-radius: calc(var(--radius) + 8px); overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, var(--primary), var(--deep)); color: var(--glow); box-shadow: var(--shadow); }
.fx-cover img { width: 100%; height: 100%; object-fit: cover; }
.fx-cover .icon { width: 5rem; height: 5rem; stroke-width: 1.2; }
.fx-video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; }
.fx-video iframe, .fx-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.fx-gallery { display: grid; gap: 0.7rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); }
.fx-gallery a { aspect-ratio: 1; border-radius: var(--radius-sm); overflow: hidden; }
.fx-gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.fx-gallery a:hover img { transform: scale(1.04); }
@media (max-width: 860px) { .fx-hero-grid { grid-template-columns: minmax(0, 1fr); } .fx-cover { order: -1; } }
@media (max-width: 560px) { .fx-card { grid-template-columns: minmax(0, 1fr); } .fx-img { aspect-ratio: 16 / 9; } }

.sp-card { display: grid; gap: 0.9rem; padding: 1.1rem; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--radius-sm); background: var(--bg); }
.sp-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
.sp-nums a { display: grid; gap: 0.15rem; padding: 0.6rem 0.7rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.sp-nums a:hover { border-color: var(--primary); }
.sp-nums a.hot { background: var(--primary-soft); border-color: var(--primary); }
.sp-nums b { font-size: 1.5rem; line-height: 1.1; color: var(--primary-dark); }
.sp-nums span { font-size: 0.78rem; color: var(--muted); line-height: 1.3; }
@media (max-width: 560px) { .sp-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Meja tarot daring ---------- */
.tarot { display: grid; gap: 1rem; }
.t-deck { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; padding: 1rem; border-radius: var(--radius); background: radial-gradient(circle at 50% 0%, #1d3a5c, #0b1f33 70%); }
.t-back { aspect-ratio: 2 / 3; border: 1px solid rgb(255 255 255 / 0.25); border-radius: 6px; background: repeating-linear-gradient(45deg, #1f4468 0 6px, #24507a 6px 12px); box-shadow: inset 0 0 0 3px #0b1f33, inset 0 0 0 4px rgb(159 195 227 / 0.5); cursor: pointer; padding: 0; transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s; }
.t-back:hover:not(:disabled) { transform: translateY(-4px); box-shadow: inset 0 0 0 3px #0b1f33, inset 0 0 0 4px #9fc3e3, 0 6px 14px rgb(0 0 0 / 0.4); }
.t-back:disabled { cursor: default; }
.t-back.taken { opacity: 0.15; }
.t-deck.done .t-back:not(.taken), .t-deck.view .t-back { cursor: default; }
.t-spread { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.t-item { display: grid; gap: 0.6rem; align-content: start; }
.t-card { position: relative; aspect-ratio: 2 / 3; max-width: 190px; width: 100%; margin: 0 auto; border-radius: 12px; background: linear-gradient(160deg, #fbf8f1, #efe6d4); border: 1px solid #d9caa8; box-shadow: 0 10px 24px -14px rgb(0 0 0 / 0.5), inset 0 0 0 6px #fbf8f1, inset 0 0 0 7px #c9a95c; text-align: center; padding: 14px 10px; color: #2a2014; animation: t-flip 0.6s ease; }
.t-card .mk { font-weight: 700; font-size: 0.95rem; letter-spacing: 0.06em; color: #8a6a2c; }
.t-card .sym { display: grid; place-items: center; font-size: 2.6rem; color: #1f4468; }
.t-card .nm { display: block; font-weight: 700; font-size: 0.95rem; line-height: 1.25; }
.t-card .gp { display: block; font-size: 0.7rem; color: #7a6a52; margin-top: 2px; }
.t-card .inner { display: grid; grid-template-rows: auto 1fr auto; height: 100%; }
/* Kartu posisi terbalik digambar terbalik, seperti di meja sungguhan. */
.t-card.rev .inner { transform: rotate(180deg); }
.tarot [hidden] { display: none !important; }
/* Desain kartu unggahan admin */
.t-card.img { padding: 0; background: #fbf8f1; overflow: hidden; }
.t-card.img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-card.img.rev img { transform: rotate(180deg); }
.t-deck.has-back .t-back { background: var(--t-back) center / cover no-repeat; box-shadow: none; }
.t-admin-back { width: 140px; aspect-ratio: 2 / 3; }
.t-admin-back img, .t-admin-back .t-back { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.t-admin-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.t-admin-card { display: grid; gap: 0.4rem; align-content: start; }
.t-admin-card .thumb { aspect-ratio: 2 / 3; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(160deg, #fbf8f1, #efe6d4); }
.t-admin-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.t-admin-card .ph { display: grid; place-items: center; height: 100%; color: #8a6a2c; text-align: center; }
.t-admin-card .ph b { font-size: 1.1rem; }
.t-admin-card .ph i { font-style: normal; font-size: 2rem; color: #1f4468; }
.t-admin-card input[type='text'] { min-height: 36px; padding: 0.3rem 0.55rem; font-size: 0.85rem; }
.t-admin-up { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.t-admin-up label.btn { cursor: pointer; }
.t-meta { text-align: center; font-size: 0.85rem; }
.t-meta b { display: block; }
.t-note textarea { min-height: 110px; font-size: 0.93rem; }
.t-note .prose { font-size: 0.95rem; padding: 0.7rem 0.8rem; background: var(--bg); border-radius: var(--radius-sm); border: 1px solid var(--line); }
.t-overall { padding: 1rem 1.1rem; border-radius: var(--radius-sm); background: var(--primary-soft); }
.t-setup { display: grid; gap: 0.4rem; padding: 0.9rem 1rem; border-radius: var(--radius-sm); background: var(--bg); border: 1px dashed var(--line); }
@keyframes t-flip { from { transform: rotateY(90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .t-card { animation: none; } }

/* ---------- Notifikasi per nama ---------- */
.ngroup summary { gap: 0.8rem; }
.ngroup .who { flex: 1; min-width: 0; display: grid; }
.ngroup .who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ngroup .who small { color: var(--muted); font-weight: 400; font-size: 0.82rem; }
.avatar { flex: none; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; font-size: 1rem; }
.ngroup.has-new .avatar { background: var(--primary); color: #fff; }
.count-new { flex: none; min-width: 26px; height: 26px; padding: 0 0.5rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: 0.8rem; font-weight: 700; display: grid; place-items: center; }
.ngroup .inner { display: grid; gap: 0.5rem; }

/* ---------- Obrolan ---------- */
.chat { display: flex; flex-direction: column; height: min(62vh, 520px); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.chat-log .none { margin: auto; color: var(--muted); font-size: 0.9rem; text-align: center; max-width: 30ch; }
.msg { max-width: min(82%, 520px); padding: 0.55rem 0.85rem; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--line); font-size: 0.94rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.msg.mine { align-self: flex-end; background: var(--primary); color: #fff; border-color: transparent; border-radius: 16px 16px 4px 16px; }
.msg small { display: block; font-size: 0.7rem; opacity: 0.7; margin-bottom: 0.1rem; white-space: normal; }
.msg a { color: inherit; font-weight: 700; display: inline-flex; gap: 0.35rem; align-items: center; margin-top: 0.3rem; }
.chat-form { display: flex; gap: 0.5rem; padding: 0.6rem; border-top: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.chat-form input[type='text'] { flex: 1; min-width: 140px; border-radius: 999px; }
.chat-form input[type='file'] { flex-basis: 100%; }
.chat-closed { padding: 0.8rem 1rem; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 0.88rem; text-align: center; }

/* ---------- Chat langsung (tombol Chat + panel) ---------- */
.lc { position: fixed; right: calc(1rem + env(safe-area-inset-right)); bottom: calc(1.5rem + env(safe-area-inset-bottom)); z-index: 60; }
.lc-fab { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 52px; padding: 0 1.3rem 0 1.1rem; border: 0; border-radius: 999px; background: var(--deep); color: #fff; font: 600 0.98rem var(--sans); cursor: pointer; box-shadow: 0 0 0 1.5px rgb(255 255 255 / 0.22), 0 14px 30px -12px rgb(0 0 0 / 0.5); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s; }
.lc-fab:hover { transform: translateY(-2px); background: var(--primary-dark); }
.lc-fab span { max-width: 4rem; overflow: hidden; white-space: nowrap; transition: max-width 0.35s ease, opacity 0.25s ease, margin 0.35s ease; }
.lc-fab { transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.2s, padding 0.35s ease, opacity 0.3s ease; }
/* Saat halaman digulir, tombol menyusut jadi bulatan ikon dan sedikit transparan supaya tidak menutupi bacaan. */
.lc.compact:not(.is-open) .lc-fab { padding: 0 0.95rem; opacity: 0.88; }
.lc.compact:not(.is-open) .lc-fab span { max-width: 0; opacity: 0; margin-left: -0.55rem; }
.lc.compact:not(.is-open) .lc-fab:hover, .lc.compact:not(.is-open) .lc-fab:focus-visible { opacity: 1; }
/* Ruang kosong di ujung halaman agar baris terakhir tidak tertutup tombol. */
body.has-chat .site-foot { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
body.has-chat .content { padding-bottom: calc(6rem + env(safe-area-inset-bottom)); }
.lc-panel { position: absolute; right: 0; bottom: calc(100% + 0.75rem); width: min(380px, calc(100vw - 2rem)); max-height: min(640px, calc(100dvh - 6.5rem)); display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 30px 60px -24px rgb(0 0 0 / 0.4);
  opacity: 0; visibility: hidden; transform: translateY(18px) scale(0.96); transform-origin: bottom right; pointer-events: none;
  transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.2, 0.9, 0.2, 1), visibility 0s linear 0.45s; }
.lc.is-open .lc-panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
.lc-panel header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.1rem; background: var(--deep); color: #fff; }
.lc-panel header b { display: block; font-weight: 700; font-size: 1.05rem; line-height: 1.25; letter-spacing: -0.01em; }
.lc-panel header small { opacity: 0.75; font-size: 0.82rem; }
.lc-close { width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: rgb(255 255 255 / 0.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lc-close:hover { background: rgb(255 255 255 / 0.22); }
.lc-start { padding: 1.1rem; overflow-y: auto; }
.lc-note { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0; padding: 0.75rem 0.85rem; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 0.9rem; line-height: 1.5; }
.lc-note .icon { margin-top: 0.15rem; color: var(--primary); }
.lc-room { display: none; flex-direction: column; min-height: 0; flex: 1; }
.lc-room .lc-note { margin: 0.8rem 0.8rem 0; }
.lc.in-room .lc-start { display: none; }
.lc.in-room .lc-room { display: flex; }
.lc-room .chat { flex: 1; height: auto; min-height: 260px; border: 0; border-radius: 0; background: var(--surface); }
.lc-end { border: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font: 500 0.86rem var(--sans); padding: 0.7rem; cursor: pointer; }
.lc-end:hover { color: var(--danger); }
.chat .chat-form + .chat-closed { display: none; }
.chat.ended .chat-form { display: none; }
.chat.ended .chat-closed { display: block; }
.swatch { display: flex; flex: none; width: 46px; height: 46px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.swatch i { flex: 1; }
.theme-cards { display: grid; gap: 0.8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.theme-cards .choice > span { width: 100%; border-radius: var(--radius-sm); padding: 0.8rem; gap: 0.75rem; align-items: center; }
.theme-cards small { display: block; font-weight: 400; color: var(--muted); font-size: 0.78rem; line-height: 1.3; }

/* ---------- Responsif ---------- */
@media (max-width: 980px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; inset: 0 auto 0 0; width: min(290px, 86vw); z-index: 50; transform: translateX(-102%); transition: transform 0.25s ease; }
  body.side-open .side { transform: none; }
  body.side-open .scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgb(0 0 0 / 0.45); }
  .side-toggle { display: grid; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding-block: 1.5rem; }
  .auth-side .pitch ul, .auth-side .foot { display: none; }
  .auth-side .logo { width: 120px; }
}
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: flex; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0.15rem; padding: 0.6rem 1.25rem 1.3rem; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 24px 34px -24px rgb(0 0 0 / 0.28);
    opacity: 0; visibility: hidden; transform: translateY(-10px); pointer-events: none;
    transition: opacity 0.32s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.42s; }
  .nav-links.open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition-delay: 0s; }
  .nav-links > * { opacity: 0; transform: translateY(-6px); transition: opacity 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .nav-links.open > * { opacity: 1; transform: none; }
  .nav-links.open > :nth-child(2) { transition-delay: 0.04s; }
  .nav-links.open > :nth-child(3) { transition-delay: 0.08s; }
  .nav-links.open > :nth-child(4) { transition-delay: 0.12s; }
  .nav-links.open > :nth-child(n + 5) { transition-delay: 0.16s; }
  .nav-links a:not(.btn) { padding: 0.85rem 0.2rem; border-radius: 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links a:not(.btn):hover, .nav-links a.on { background: none; color: var(--primary); }
  .nav-links .btn { margin: 0.3rem 0 0; }
  .site-nav { background: var(--bg); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .site-nav .wrap { min-height: 64px; }
  .brand img { height: 38px; }
  .hero { padding-top: 2.75rem; overflow: visible; }
  .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .hero-art { max-width: min(300px, 80vw); order: -1; margin-top: 1rem; }
  .float.a { top: 6%; right: 0; }
  .float.b { left: 0; }
  html { scroll-padding-top: 76px; }
  .crisis { grid-template-columns: minmax(0, 1fr); }
  .crisis .pulse { display: none; }
  .site-foot .cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .site-foot .cols > :first-child { grid-column: 1 / -1; }
}
/* Tabel menjadi kartu bertumpuk di layar sempit; label kolom diambil dari judul tabel (diisi oleh app.js). */
@media (max-width: 760px) {
  .table-wrap { overflow: visible; margin: 0; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { padding: 0.9rem 0; border-bottom: 1px solid var(--line); }
  .table-wrap tr:first-child { padding-top: 0; }
  .table-wrap tr:last-child { border-bottom: 0; padding-bottom: 0; }
  .table-wrap td, .table-wrap tr:last-child td { display: grid; grid-template-columns: minmax(96px, 34%) minmax(0, 1fr); gap: 0.2rem 0.8rem; align-items: start; padding: 0.3rem 0; border: 0; text-align: left; white-space: normal !important; overflow-wrap: anywhere; }
  .table-wrap td::before { content: attr(data-label); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); padding-top: 0.2rem; }
  .table-wrap td:not([data-label])::before, .table-wrap td[data-label='']::before { content: none; }
  .table-wrap td:not([data-label]), .table-wrap td[data-label=''] { grid-template-columns: minmax(0, 1fr); }
  .table-wrap td:empty { display: none; }
  .table-wrap td > * { min-width: 0; grid-column: 2; }
  .table-wrap td:not([data-label]) > *, .table-wrap td[data-label=''] > * { grid-column: 1; }
  .table-wrap td strong { font-size: 1.02rem; }
  .table-wrap td .btn-row { flex-wrap: wrap !important; }
  .table-wrap td select { min-width: 0 !important; flex: 1; }
  .table-wrap td details { min-width: 0 !important; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 0.3rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; }
  .card-head { align-items: flex-start; }
  .photos { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .topbar { padding-inline: 0.8rem; gap: 0.5rem; }
}
@media (max-width: 560px) {
  .brand small { display: none; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 0.1rem; }
  .dl dd { margin-bottom: 0.6rem; }
  .track li { font-size: 0.68rem; }
  .float { font-size: 0.74rem; padding: 0.5rem 0.65rem; }
  .lc-panel { position: fixed; right: 0.75rem; left: 0.75rem; bottom: calc(5.75rem + env(safe-area-inset-bottom)); width: auto; max-height: calc(100dvh - 7.5rem - env(safe-area-inset-bottom)); }
  .btn-row .btn { flex: 1 1 auto; }
  .item { flex-wrap: wrap; }
  .item .grow { flex: 1 1 170px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .n { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .side, .topbar, .lc, .no-print, .site-nav, .site-foot { display: none !important; }
  .app { display: block; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
}
