/* Fawn — tema FLAT SOFT. Satu sumber kebenaran: variabel di :root.
   Flat: warna solid saja, tanpa bayangan, tanpa gradient halus, tanpa tekstur.
   Soft: kuning mentega + hitam hangat (turunan logo), krem lembut, sudut membulat, lapisan nada (tonal) dan garis tipis, bukan kontras keras.
   (Nama file tetap comic.css supaya semua tautan dan cache lama nggak putus.) */
:root {
  /* Warna merek: hitam soft + kuning soft */
  --ink: #2b2925;          /* hitam hangat: teks, panel gelap */
  --ink-2: #6a6454;        /* teks sekunder */
  --cream: #fbf3d9;        /* teks di atas panel gelap */
  --yellow: #f6cd5a;       /* kuning logo yang dilembutkan */
  --yellow-deep: #efbd35;  /* kuning saat hover/ditekan */
  --yellow-soft: #fcefc2;
  --yellow-tint: #fff8e0;
  /* Permukaan: krem berlapis */
  --bg: #f8f3e4;           /* latar halaman */
  --bg-2: #f0e8d0;         /* kolom isian, jalur tab, area cekung */
  --surface: #fffcf3;      /* kartu */
  --line: #ebe2c6;         /* garis tipis pemisah */
  --line-2: #ddd1ad;       /* garis saat hover */
  /* Status dan merek pihak ketiga (dilembutkan) */
  --red: #c0443b;
  --red-soft: #fbe3de;
  --green: #2f7d58;
  --green-soft: #dcf1e3;
  --wa: #6fd99b;           /* tombol merek WhatsApp */
  --wa-deep: #58cb87;
  --blurple: #5a63c9;      /* tombol merek Discord */
  --blurple-deep: #4a53b6;
  --blue-soft: #e4e8fa;
  /* Bentuk */
  --radius: 26px;
  --radius-sm: 18px;
  --gutter: 28px;
  --ease: cubic-bezier(.2, .9, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  /* Tipografi */
  --display: "Outfit", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); font: 500 1rem/1.65 var(--body); background: var(--bg); }
h1, h2, h3 { overflow-wrap: anywhere; font-family: var(--display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(2.3rem, 6vw, 3.8rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0; max-width: 62ch; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

/* ---------- Tata letak ---------- */
.wrap { position: relative; z-index: 1; width: min(1080px, 100% - 32px); margin-inline: auto; padding-block: 40px 56px; }
.stack { display: grid; gap: 14px; }
.panel, .stack > * { min-width: 0; }
.row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--gutter); align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }

/* Kartu flat soft: krem polos + garis tipis, tanpa bayangan */
.panel { position: relative; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel > h2 + p { margin-top: 8px; }
.caption { display: inline-block; margin-bottom: 14px; padding: 3px 12px; border-radius: 999px; background: var(--yellow-soft); color: var(--ink); font: 700 .75rem/1.6 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.grid-3 > .panel { transition: transform .3s var(--spring), background-color .2s, border-color .2s; }
.grid-3 > .panel:hover { transform: translateY(-4px); background: var(--yellow-tint); border-color: var(--yellow); }

/* Rel: pemisah dan motif merek */
.rail { height: 16px; margin: var(--gutter) 0; border-radius: 8px; background: var(--bg-2); background-image: repeating-linear-gradient(90deg, transparent 0 14px, var(--yellow) 14px 20px); }

/* ---------- Dock: menu melebar saat di-hover ---------- */
.dock { position: fixed; z-index: 50; display: flex; gap: 6px; padding: 8px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 30px; }
.dock-list { display: flex; gap: 6px; }
.brand { display: block; flex: none; overflow: hidden; text-decoration: none; transition: width .32s var(--ease); }
.brand img { display: block; height: 100%; width: auto; max-width: none; }
.dock-item { position: relative; z-index: 1; display: flex; align-items: center; flex: none; height: 48px; padding: 0 16px; border: 0; border-radius: 20px; background: transparent; color: var(--ink); font: 700 .95rem/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer; transition: background-color .2s, scale .12s; }
.dock-item:active { scale: .96; }
.dock-item:focus-visible { outline-offset: -3px; }
.dock-item svg { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dock-item svg .dot { fill: currentColor; stroke: none; }
.dock-item:hover { background: var(--yellow-tint); }
.dock-item[aria-current="page"], .dock-item[aria-selected="true"] { background: var(--yellow); }
.dock-label { opacity: 0; transition: opacity .2s, transform .3s var(--ease); }
.dock-glide { position: absolute; z-index: 0; left: 8px; right: 8px; top: 0; height: 0; border-radius: 20px; background: var(--yellow-tint); opacity: 0; pointer-events: none; transition: transform .3s var(--spring), height .2s, opacity .15s; }
.dock-glide.on { opacity: 1; }
@media (min-width: 821px) {
  .wrap { width: min(1080px, 100% - 232px); }
  .dock { left: 16px; top: 50%; translate: 0 -50%; flex-direction: column; width: 72px; overflow: hidden; transition: width .34s var(--ease); }
  .dock:hover, .dock:has(:focus-visible) { width: 232px; }
  .dock-list { flex-direction: column; }
  .dock-foot { margin-top: 4px; padding-top: 10px; border-top: 1.5px solid var(--line); }
  .brand { width: 56px; height: 36px; margin: 6px 0 8px; }
  .dock:hover .brand, .dock:has(:focus-visible) .brand { width: 192px; }
  .dock-label { margin-left: 14px; transform: translateX(-8px); }
  .dock:hover .dock-label, .dock:has(:focus-visible) .dock-label { opacity: 1; transform: none; transition-delay: calc(var(--i, 0) * 30ms + 90ms); }
}
@media (max-width: 820px) {
  .wrap { padding-bottom: 120px; }
  .dock { left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); translate: -50% 0; align-items: center; max-width: calc(100% - 16px); }
  .dock-list { align-items: center; }
  .dock-foot { margin-left: 4px; padding-left: 10px; border-left: 1.5px solid var(--line); }
  .dock-glide { display: none; }
  .brand { width: 44px; height: 28px; margin: 0 6px 0 6px; }
  .brand img { height: 28px; }
  .dock-item { height: 44px; padding: 0 10px; }
  .dock-label { max-width: 0; overflow: hidden; transition: max-width .32s var(--spring), margin .32s var(--spring), opacity .2s; }
  .dock-item[aria-current="page"] .dock-label, .dock-item[aria-selected="true"] .dock-label, .dock-item:hover .dock-label, .dock-item:focus-visible .dock-label { max-width: 90px; margin-left: 8px; opacity: 1; }
}
@media (max-width: 400px) { .brand { display: none; } }

/* ---------- Tombol ---------- */
.btn { position: relative; max-width: 100%; text-align: center; appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 10px 26px; border: 0; border-radius: var(--radius-sm); background: var(--yellow); color: var(--ink); font: 650 1rem/1 var(--body); text-decoration: none; cursor: pointer; translate: var(--mx, 0) var(--my, 0); transition: background-color .2s, color .2s, scale .12s, translate .4s var(--spring); }
.btn:not([disabled]):not([aria-disabled="true"]):hover { background: var(--yellow-deep); }
.btn:not([disabled]):active { scale: .95; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.wa { background: var(--wa); }
.btn.wa:not([disabled]):hover { background: var(--wa-deep); }
.btn.discord { background: var(--blurple); color: var(--surface); }
.btn.discord:not([disabled]):hover { background: var(--blurple-deep); }
.btn.ghost { background: var(--bg-2); }
.btn.ghost:not([disabled]):hover { background: var(--line); }
.btn.block { width: 100%; }
.btn svg { width: 22px; height: 22px; flex: none; }
.link { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; cursor: pointer; color: inherit; }
.link:hover { text-decoration-color: var(--yellow); }

/* ---------- Form ---------- */
label { display: grid; gap: 6px; font-weight: 700; }
input { width: 100%; padding: 14px 18px; font: 600 1rem var(--body); color: var(--ink); background: var(--bg-2); border: 2px solid transparent; border-radius: var(--radius-sm); transition: border-color .15s, background-color .15s; }
input:hover { border-color: var(--line-2); }
input:focus-visible { outline: none; border-color: var(--ink); background: var(--surface); }
input:disabled { opacity: .5; cursor: not-allowed; }
.hint { font-size: .9rem; font-weight: 500; color: var(--ink-2); }

/* Segmented control: jempol karet yang meregang lalu mendarat (diatur fx.js) */
.tabs { position: relative; display: flex; padding: 4px; background: var(--bg-2); border-radius: var(--radius-sm); isolation: isolate; }
.tab { position: relative; z-index: 1; flex: 1; min-height: 42px; border: 0; border-radius: 14px; background: transparent; font: 700 .95rem/1 var(--body); cursor: pointer; color: var(--ink-2); transition: color .2s; }
.tab:hover, .tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--yellow); }
.tabs.has-thumb .tab[aria-selected="true"] { background: transparent; }
.seg-thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; width: 0; border-radius: 14px; background: var(--yellow); pointer-events: none; }
.tabs.ready .seg-thumb { transition: left .34s var(--spring), width .34s var(--spring); }

/* ---------- Pesan status ---------- */
.bubble { position: relative; margin-top: 8px; padding: 12px 16px 12px 22px; overflow: hidden; background: var(--yellow-soft); border-radius: var(--radius-sm); font-weight: 600; }
.bubble::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--yellow-deep); }
.bubble.ok { background: var(--green-soft); } .bubble.ok::before { background: var(--green); }
.bubble.error { background: var(--red-soft); } .bubble.error::before { background: var(--red); }

/* Kode login */
.code-card { display: grid; gap: 12px; padding: 22px; border-radius: var(--radius); background: var(--ink); color: var(--cream); }
.code-card .small { font-size: .95rem; opacity: .9; }
.code { font: 700 clamp(2rem, 7vw, 2.8rem)/1.1 var(--display); letter-spacing: .14em; color: var(--yellow); word-break: break-all; user-select: all; }
.code-card .link { color: var(--yellow); }
.code-card :focus-visible { outline-color: var(--yellow); }

/* ---------- Hero ---------- */
.hero { display: flex; align-items: center; justify-content: space-between; gap: 32px; overflow: hidden; padding: clamp(28px, 5vw, 56px); background: var(--yellow); border-color: var(--yellow); }
.hero .stack { gap: 16px; flex: 1; }
.hero-art { width: clamp(150px, 28vw, 290px); height: auto; flex: none; }
.a-ink { fill: var(--ink); } .a-yellow { fill: var(--yellow); } .a-paper { fill: var(--surface); }
.wheel { transform-box: fill-box; transform-origin: center; }
.ticker { overflow: hidden; margin: var(--gutter) 0; border-radius: 999px; background: var(--ink); color: var(--yellow); }
.ticker-track { display: flex; width: max-content; }
.ticker-set { display: flex; gap: 36px; padding: 16px 18px; font: 700 1.05rem/1 var(--display); letter-spacing: .06em; text-transform: uppercase; }
.ticker-set span::after { content: "/"; margin-left: 36px; opacity: .5; }

/* ---------- Komponen isi ---------- */
.chip { display: inline-block; padding: 2px 12px; border-radius: 999px; font: 700 .85rem/1.6 var(--body); background: var(--bg-2); color: var(--ink); }
.chip.on { background: var(--green); color: var(--surface); } .chip.soon { background: var(--yellow-soft); }
.role { display: inline-block; padding: 1px 12px; border-radius: 999px; background: var(--red); color: var(--surface); font: 700 .85rem/1.7 var(--body); letter-spacing: .04em; }
.coins { font: 700 clamp(2.4rem, 7vw, 3.4rem)/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.avatar { width: 72px; height: 72px; flex: none; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font: 700 2rem/1 var(--display); object-fit: cover; }
.conn { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1.5px solid var(--line); }
.conn:last-child { border-bottom: 0; }
.wallet { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.wallet .coins { color: var(--yellow); } .wallet .hint { color: var(--cream); opacity: .85; }

.chat-log { height: 300px; overflow-y: auto; border-radius: var(--radius-sm); background: var(--bg-2); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.chat-log:empty::before { content: "Sepi…"; margin: auto; font: 700 1.6rem/1 var(--display); color: var(--ink-2); opacity: .5; }
.msg { max-width: 86%; padding: 8px 14px; border-radius: 18px 18px 18px 6px; background: var(--surface); overflow-wrap: anywhere; }
.msg.web { align-self: flex-end; background: var(--yellow); border-radius: 18px 18px 6px 18px; }
.msg b { font-weight: 700; }
.chat-form { display: flex; gap: 10px; margin-top: 12px; }
.chat-form input { flex: 1; }

.reels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 14px; background: var(--ink); border-radius: var(--radius-sm); }
.reel { display: grid; place-items: center; aspect-ratio: 1 / 1.1; font-size: clamp(2.4rem, 9vw, 3.6rem); background: var(--surface); border-radius: 16px; user-select: none; }
.reel.win { background: var(--yellow); }
.chipbtn { min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--bg-2); font: 700 .95rem/1 var(--body); cursor: pointer; color: var(--ink); translate: var(--mx, 0) var(--my, 0); transition: background-color .2s, scale .12s, translate .4s var(--spring); }
.chipbtn:hover { background: var(--yellow-soft); }
.chipbtn:active { scale: .94; }

.players { display: grid; gap: 8px; max-height: 240px; overflow-y: auto; padding: 2px; }
.players:empty::before { content: "Sepi…"; justify-self: center; font: 700 1.6rem/1 var(--display); color: var(--ink-2); opacity: .5; }
.player { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px; text-align: left; padding: 10px 14px; border: 0; border-radius: var(--radius-sm); background: var(--bg-2); color: var(--ink); font: inherit; cursor: pointer; transition: background-color .2s, scale .12s; }
.player .pname { font: 700 1.1rem/1.2 var(--display); }
.player .chip { grid-row: 1 / 3; grid-column: 2; align-self: center; background: var(--surface); }
.player:hover:not([disabled]) { background: var(--blue-soft); }
.player:active:not([disabled]) { scale: .98; }
.player[aria-selected="true"] { background: var(--yellow); }
.player[disabled] { opacity: .5; cursor: not-allowed; }

.weather { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.w-icon { font-size: 3.4rem; line-height: 1; }
.w-temp { font: 700 2.8rem/1 var(--display); }
.w-meta { flex-basis: 100%; }
.quake { display: flex; align-items: center; gap: 14px; }
.mag { flex: none; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; background: var(--yellow); font: 700 1.6rem/1 var(--display); }
.mag.strong { background: var(--red); color: var(--surface); }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.fact dt { font-size: .85rem; color: var(--ink-2); } .fact dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.news { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.news li { padding-bottom: 12px; border-bottom: 1.5px solid var(--line); }
.news li:last-child { border-bottom: 0; padding-bottom: 0; }
.news a { font-weight: 700; text-underline-offset: 4px; }
.prose { display: grid; gap: 14px; }
.prose h2 { margin-top: 10px; }
.prose ul { margin: 0; padding-left: 1.2rem; display: grid; gap: 6px; }
.footer { margin-top: 16px; font-size: .95rem; font-weight: 600; color: var(--ink-2); }
.footer a { color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Input kode OTP */
.otp { display: flex; gap: clamp(4px, 1.6vw, 10px); justify-content: center; }
.otp-box { width: clamp(38px, 12vw, 52px); height: clamp(48px, 14vw, 62px); padding: 0; text-align: center; font: 700 clamp(1.5rem, 6vw, 2rem)/1 var(--display); color: var(--ink); background: var(--bg-2); border: 2px solid transparent; border-radius: 16px; transition: background-color .2s, border-color .2s; }
.otp-box:focus, .otp-box:focus-visible { outline: none; border-color: var(--ink); background: var(--surface); }
.otp-box.filled { background: var(--yellow-soft); border-color: var(--yellow); }
.otp-box.bad { background: var(--red-soft); }
.otp-email { overflow-wrap: anywhere; }

/* Utilitas (pengganti atribut style inline, supaya CSP tetap ketat) */
.narrow { width: min(640px, 100% - 32px); }
.narrow-wide { width: min(760px, 100% - 32px); }
.h1-md { font-size: 2.4rem; }
.gap-lg { gap: var(--gutter); }
.gap-sm { gap: 6px; }
.mt-md { margin-top: 14px; }
.mt-sm { margin-top: 12px; }
@media (min-width: 821px) { .narrow { width: min(640px, 100% - 232px); } .narrow-wide { width: min(760px, 100% - 232px); } }
[role="tabpanel"] > .panel + .panel, [role="tabpanel"] > .stack > .panel { margin-top: 0; }

/* ---------- Lapisan efek (dibuat fx.js) ---------- */
.fx-grid, .fx-sparks { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fx-grid { z-index: 0; }
.fx-sparks { z-index: 100; }
.fx .reveal { opacity: 0; translate: 0 24px; transition: opacity .6s var(--ease), translate .6s var(--ease); transition-delay: var(--d, 0ms); }
.fx .reveal.in { opacity: 1; translate: 0 0; }
.split-w { display: inline-block; }
.fx .split-w { opacity: 0; translate: 0 .5em; filter: blur(8px); }
.fx .split-w.in { opacity: 1; translate: 0 0; filter: blur(0); transition: opacity .6s var(--ease), translate .6s var(--ease), filter .6s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }

/* ---------- Halaman masuk / daftar / lupa / reset (kartu auth) ---------- */
.auth-page { overflow-x: hidden; }
.auth-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.auth-bg i { position: absolute; border-radius: 50%; background: var(--yellow-soft); }
.auth-bg i:nth-child(1) { width: clamp(180px, 34vw, 420px); aspect-ratio: 1; left: -8%; top: -10%; }
.auth-bg i:nth-child(2) { width: clamp(120px, 20vw, 260px); aspect-ratio: 1; right: 6%; top: 14%; background: var(--yellow-tint); border: 1.5px solid var(--line); }
.auth-bg i:nth-child(3) { width: clamp(160px, 28vw, 340px); aspect-ratio: 1; right: -6%; bottom: -12%; }
.auth-wrap { display: grid; place-items: center; min-height: 100vh; padding-block: 32px 40px; }
.auth { width: min(448px, 100%); display: grid; gap: 14px; }
.auth-card { position: relative; display: grid; gap: 18px; padding: 32px 28px 26px; overflow: hidden; background: var(--surface); border: 1.5px solid var(--line); border-radius: 32px; }
.auth-card > * { min-width: 0; }
.auth-head { display: grid; justify-items: center; gap: 8px; text-align: center; }
.auth-logo { display: block; width: 84px; height: 84px; margin-bottom: 4px; border-radius: 50%; }
.auth-head h1 { font-size: 1.75rem; }
.auth-sub { max-width: 34ch; font-size: .95rem; line-height: 1.55; color: var(--ink-2); }
.auth-foot { text-align: center; margin: 0; }
.auth-form { display: grid; gap: 14px; }
.view { display: grid; gap: 14px; min-width: 0; }
.view[hidden] { display: none !important; }
.view-title { text-align: center; font-size: 1.4rem; }
.view-sub { text-align: center; color: var(--ink-2); font-size: .95rem; margin-inline: auto; }
.view-sub b { color: var(--ink); }
.view .code-card { text-align: center; }
[data-copied] { background: var(--green-soft); }
.view .code { font-size: clamp(1.5rem, 7vw, 2rem); letter-spacing: .08em; }
.back { justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border: 0; border-radius: 999px; background: var(--bg-2); color: var(--ink); font: 650 .9rem/1 var(--body); cursor: pointer; transition: background-color .2s, scale .12s; }
.back:hover { background: var(--yellow-soft); } .back:active { scale: .95; }
.back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.back-link { justify-self: center; font-size: .95rem; }
.link.small { font-size: .9rem; }
.switch { text-align: center; font-size: .85rem; color: var(--ink-2); margin-inline: auto; }
.auth-row { gap: 10px; justify-content: flex-end; }
.auth-sub:empty { display: none; }
.auth-row .hint { flex: 1 1 14ch; font-size: .85rem; }

/* Kolom isian */
.field { display: grid; gap: 6px; }
.field > label { font-size: .9rem; }
.field-box { position: relative; display: flex; align-items: center; gap: 10px; padding: 0 12px 0 16px; background: var(--bg-2); border: 2px solid transparent; border-radius: var(--radius-sm); transition: border-color .15s, background-color .2s; }
.field-box:hover { border-color: var(--line-2); }
.field-box:focus-within { border-color: var(--ink); background: var(--surface); }
.field-ico { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.field-box:focus-within .field-ico { stroke: var(--ink); }
.field-box input { flex: 1; min-width: 0; padding: 14px 0; border: 0; border-radius: 0; background: transparent; }
.field-box input:hover, .field-box input:focus-visible { border: 0; background: transparent; }
.field.bad .field-box { border-color: var(--red); background: var(--red-soft); }
.field.bad .field-ico { stroke: var(--red); }
.field-err { margin: 0; max-width: none; min-height: 0; font-size: .85rem; font-weight: 600; color: var(--red); }
.field-err:empty { display: none; }
.pw-eye { flex: none; display: grid; place-items: center; width: 38px; height: 38px; margin-right: -6px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s, scale .12s; }
.pw-eye:hover { background: var(--yellow-soft); color: var(--ink); } .pw-eye:active { scale: .9; }
.pw-eye svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye .eye-off { opacity: 0; transition: opacity .2s; } .pw-eye.on .eye-off { opacity: 1; }

/* Meter kekuatan password (flat, 4 segmen) */
.meter-wrap { display: grid; gap: 6px; margin-top: -4px; }
.meter-wrap[hidden] { display: none; }
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.meter span { height: 6px; border-radius: 999px; background: var(--bg-2); transition: background-color .3s; }
.meter[data-score="1"] span:nth-child(-n+1) { background: var(--red); }
.meter[data-score="2"] span:nth-child(-n+2) { background: var(--yellow-deep); }
.meter[data-score="3"] span:nth-child(-n+3) { background: var(--yellow-deep); }
.meter[data-score="4"] span { background: var(--green); }
.meter-text { margin: 0; font-size: .85rem; }

/* Turnstile */
.ts-slot { display: grid; align-items: center; justify-items: center; min-height: 65px; overflow: hidden; border-radius: var(--radius-sm); border: 1.5px solid transparent; }
.ts-slot[hidden], .ts-slot.ts-done { display: none; }
.ts-slot.ts-loading { background: var(--bg-2); }
.ts-slot.ts-bad { border-color: var(--red); background: var(--red-soft); }
.ts-slot.ts-bad::after { content: "Verifikasi keamanan gagal dimuat. Muat ulang halaman."; padding: 12px; font-size: .85rem; font-weight: 600; text-align: center; }
.ts-slot.ts-quiet { min-height: 0; } .ts-slot.ts-quiet.ts-loading { background: none; }
.ts-slot iframe { max-width: 100%; }

/* Pemisah dan tombol sosial (logo merek penuh) */
.divider { display: flex; align-items: center; gap: 12px; color: var(--ink-2); font: 650 .75rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1.5px; background: var(--line); }
.social { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.social-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 650 1rem/1 var(--body); text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, scale .12s; }
.social-btn:hover { background: var(--yellow-tint); border-color: var(--yellow); }
.social-btn:active { scale: .96; }
.brand-ico { flex: none; width: 24px; height: 24px; transition: opacity .2s, scale .3s var(--spring); }
.social-btn:hover .brand-ico { scale: 1.12; }
.social-btn[data-loading] { pointer-events: none; background: var(--yellow-soft); border-color: var(--yellow); }
.social-btn[data-loading] .brand-ico { opacity: 0; }
.social-btn[data-loading]::before { content: ""; position: absolute; left: 14px; width: 18px; height: 18px; border: 2.5px solid var(--ink); border-top-color: transparent; border-radius: 50%; }
.brand-ico.on-btn path { fill: var(--ink); }
.btn.wa .brand-ico { width: 22px; height: 22px; }
@media (max-width: 380px) { .social { grid-template-columns: 1fr; } }

/* Tombol berstatus: idle -> loading -> success / error */
.state-btn { overflow: hidden; }
.state-btn > * { position: relative; z-index: 1; }
.state-btn .btn-fill { position: absolute; z-index: 0; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); background: var(--yellow-deep); transition: width .25s var(--ease); }
.state-btn:not(.progress) .btn-fill { display: none; }
.state-btn .btn-spin { display: none; flex: none; width: 18px; height: 18px; border: 2.5px solid var(--ink); border-top-color: transparent; border-radius: 50%; }
.state-btn .btn-check { flex: none; width: 0; height: 22px; opacity: 0; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 26; stroke-dashoffset: 26; transition: width .25s var(--ease), opacity .2s, stroke-dashoffset .4s .1s var(--ease); }
.state-btn[data-state="loading"], .state-btn[data-state="success"] { opacity: 1 !important; cursor: progress; }
.state-btn[data-state="loading"] .btn-spin { display: block; }
.state-btn[data-state="success"] { background: var(--green); color: var(--surface); }
.state-btn[data-state="success"] .btn-fill { display: none; }
.state-btn[data-state="success"] .btn-check { width: 22px; opacity: 1; stroke-dashoffset: 0; }
.state-btn[data-state="error"] { background: var(--red); color: var(--surface); }
.state-btn[data-state="error"] .btn-fill { display: none; }

/* Ikon panggung (kunci / centang / WhatsApp) dengan cincin progres */
.stage-ico { position: relative; justify-self: center; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--yellow-soft); transition: background-color .3s; }
.stage-ico > svg:not(.ring-svg):not(.brand-ico) { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.stage-ico.wa { background: var(--bg-2); } .stage-ico.wa .brand-ico { width: 38px; height: 38px; }
.ring-svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.ring-svg circle { fill: none; stroke-width: 3; }
.ring-track { stroke: var(--line); }
.ring-arc { stroke: var(--yellow-deep); stroke-linecap: round; stroke-dasharray: 182.2; stroke-dashoffset: 182.2; }
.ico-ok { display: none; } .ico-ok { stroke-dasharray: 26; }
.stage-ico.verifying .ring-arc { stroke-dasharray: 46 182.2; stroke-dashoffset: 0; }
.stage-ico.ok { background: var(--green); }
.stage-ico.ok .ring-svg, .stage-ico.ok .ico-lock { display: none; }
.stage-ico.ok .ico-ok { display: block; stroke: var(--surface); }
.done-ico { background: var(--green); } .done-ico svg { stroke: var(--surface) !important; width: 34px !important; height: 34px !important; }

/* Kotak OTP: status menunggu / sukses / salah */
.otp-box.wait { background: var(--yellow-soft); }
.otp-box.ok { background: var(--green); border-color: var(--green); color: var(--surface); }
.otp-err { text-align: center; }
.resend-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cd-ring { flex: none; width: 20px; height: 20px; rotate: -90deg; }
.cd-ring circle { fill: none; stroke-width: 3; }
.cd-ring .ring-arc { stroke-dasharray: 56.55; stroke-dashoffset: 56.55; }
.cd-ring.run .ring-arc { stroke-dashoffset: 0; }

/* ---------- Responsif ---------- */
@media (max-width: 820px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .auth-wrap { padding-bottom: 120px; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-art { width: 160px; }
  .chat-form { flex-direction: column; }
  .facts { grid-template-columns: 1fr; }
  .grid-3 > .panel:hover { transform: none; }
}
@media (max-width: 420px) { h1 { font-size: 2.1rem; } .h1-md { font-size: 1.9rem; } .panel { padding: 22px 18px; } .auth-card { padding: 26px 18px 22px; border-radius: 28px; } .auth-card .auth-head h1 { font-size: 1.5rem; } }

/* ---------- Gerakan (cuma kalau pengguna nggak minta dikurangi) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .bubble { animation: pop-in .4s var(--spring) both; }
  .bubble.error { animation: pop-in .4s var(--spring) both, nudge .4s .1s; }
  @keyframes pop-in { from { opacity: 0; scale: .92; translate: 0 -6px; } to { opacity: 1; scale: 1; translate: 0 0; } }
  @keyframes nudge { 25% { translate: -5px 0; } 75% { translate: 5px 0; } }
  .hero-art { animation: roll-in 1s var(--ease) both; }
  .wheel { animation: spin 1s var(--ease) both; }
  @keyframes roll-in { from { opacity: 0; translate: 90px 0; } to { opacity: 1; translate: 0 0; } }
  @keyframes spin { from { rotate: 0deg; } to { rotate: -540deg; } }
  .ticker-track { animation: marquee 30s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  @keyframes marquee { to { translate: -50% 0; } }
  .reel.spin { animation: jiggle .16s linear infinite; }
  .reel.win { animation: pop-win .5s var(--spring) both; }
  @keyframes jiggle { 0%, 100% { translate: 0 -3px; } 50% { translate: 0 3px; } }
  @keyframes pop-win { from { scale: .8; } to { scale: 1; } }
  .otp-box.pop { animation: slot-in .4s var(--spring); }
  @keyframes slot-in { from { scale: .6; } to { scale: 1; } }
  .otp-box.bad { animation: nudge .35s; }
  /* Halaman auth: masuk berurutan, ikon logo memantul, tombol berstatus, kotak OTP */
  .auth-bg i { animation: drift 14s ease-in-out infinite alternate; }
  .auth-bg i:nth-child(2) { animation-duration: 18s; animation-direction: alternate-reverse; }
  .auth-bg i:nth-child(3) { animation-duration: 22s; }
  @keyframes drift { to { translate: 24px -30px; } }
  .auth-card { animation: card-in .7s var(--ease) both; }
  @keyframes card-in { from { opacity: 0; translate: 0 36px; scale: .97; } to { opacity: 1; translate: 0 0; scale: 1; } }
  .auth-logo { animation: logo-in .9s .15s var(--spring) both; }
  @keyframes logo-in { from { opacity: 0; scale: .4; rotate: -14deg; } to { opacity: 1; scale: 1; rotate: 0deg; } }
  .view > * { animation: rise .55s var(--ease) both; }
  .view > :nth-child(1) { animation-delay: .25s; } .view > :nth-child(2) { animation-delay: .3s; } .view > :nth-child(3) { animation-delay: .35s; } .view > :nth-child(4) { animation-delay: .4s; }
  .view > :nth-child(5) { animation-delay: .45s; } .view > :nth-child(6) { animation-delay: .5s; } .view > :nth-child(7) { animation-delay: .55s; } .view > :nth-child(n+8) { animation-delay: .6s; }
  .view.enter > :nth-child(n) { animation-delay: 0s; animation-duration: .4s; }
  .view.enter > :nth-child(2) { animation-delay: .04s; } .view.enter > :nth-child(3) { animation-delay: .08s; } .view.enter > :nth-child(4) { animation-delay: .12s; } .view.enter > :nth-child(n+5) { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
  .auth-head h1.swap, .auth-sub.swap { animation: swap .4s var(--ease); }
  @keyframes swap { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
  .shake { animation: nudge .4s; }
  .ts-slot.nudge { animation: nudge .45s, flash-line 1.2s; }
  @keyframes flash-line { 0%, 60% { border-color: var(--yellow-deep); } 100% { border-color: transparent; } }
  .state-btn[data-state="loading"] .btn-spin, .social-btn[data-loading]::before { animation: turn .7s linear infinite; }
  @keyframes turn { to { rotate: 360deg; } }
  .state-btn[data-state="success"] { animation: pop-win .5s var(--spring) both; }
  .state-btn[data-state="error"] { animation: nudge .4s; }
  .stage-ico.verifying .ring-svg { animation: turn 1s linear infinite; }
  .stage-ico.ok { animation: pop-win .5s var(--spring) both; }
  .stage-ico.ok .ico-ok, .done-ico svg { stroke-dashoffset: 26; animation: draw .5s .15s var(--ease) forwards; }
  @keyframes draw { to { stroke-dashoffset: 0; } }
  .done-ico { animation: pop-win .6s var(--spring) both; }
  .otp-box.wait { animation: pulse-box .9s ease-in-out infinite; animation-delay: calc(var(--i, 0) * 90ms); }
  @keyframes pulse-box { 50% { translate: 0 -4px; } }
  .otp-box.ok { animation: hop .5s var(--spring) both; animation-delay: calc(var(--i, 0) * 70ms); }
  @keyframes hop { 0% { translate: 0 0; } 40% { translate: 0 -10px; } 100% { translate: 0 0; } }
  .otp-box.shake { animation: nudge .4s; }
  .cd-ring.run .ring-arc { animation: countdown var(--cd, 60s) linear forwards; }
  @keyframes countdown { from { stroke-dashoffset: 0; } to { stroke-dashoffset: 56.55; } }
}
/* Hormati preferensi kurangi gerakan: semua animasi dan transisi mati */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
