/* VeriNote — tema gelap "tinta", satu aksen sakura.
   Poster membawa warna; kerangka tetap tenang. Angka Bintangku memakai Anton (gaya poster film). */

@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fira Sans"; src: url("../fonts/fira-sans-600.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Anton"; src: url("../fonts/anton-400.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --ink: #13151d;
  --screen: #1b1e29;
  --shade: #252937;
  --shade-2: #2f3445;
  --line: #2a2f3f;
  --light: #ece8e1;
  --muted: #a2a7b8;
  --faint: #6f7589;
  --sakura: #ff7aa8;
  --sakura-soft: rgba(255, 122, 168, 0.14);
  --danger: #f0857d;
  --fav-glow: rgba(255, 205, 80, 0.13);
  --poster-w: 80px;
  --page-pad: 14px;
  --col: 660px;
  --r-poster: 5px;
  --r-ctl: 12px;
  --font-text: "Fira Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans CJK JP", "Noto Color Emoji", sans-serif;
  --font-num: "Anton", "Fira Sans", Impact, "Arial Narrow", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

@media (min-width: 600px) {
  :root { --poster-w: 88px; --page-pad: 20px; }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--light);
  font: 400 15.5px/1.5 var(--font-text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
body.has-overlay { overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--sakura); outline-offset: 2px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { display: inline-flex; line-height: 0; }

#app { max-width: var(--col); margin: 0 auto; padding: 0 var(--page-pad); min-height: 100vh; }
.boot { padding: 40vh 0; text-align: center; color: var(--muted); }

/* ---------- Bilah atas ---------- */
.topbar {
  display: flex; align-items: center; gap: 6px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 0 6px;
}
.brand {
  font-family: var(--font-num); font-size: 27px; letter-spacing: 0.015em; line-height: 1;
  margin-right: auto; color: var(--light); text-decoration: none; padding: 6px 0;
}
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--muted);
}
.icon-btn:hover { color: var(--light); background: var(--screen); }
.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px 0 8px;
  border-radius: 999px; color: var(--muted); font-size: 13px; background: transparent;
}
.sync-pill:hover { background: var(--screen); color: var(--light); }
.sync-pill[data-state="synced"] .icon { color: var(--sakura); }
.sync-pill[data-state="conflict"], .sync-pill[data-state="needs-review"], .sync-pill[data-state="account-change"], .sync-pill[data-state="error"] { color: var(--light); background: var(--shade); }
.sync-pill[data-state="syncing"] .icon { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }

.pagebar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 4px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 0 8px; margin: 0 calc(-1 * var(--page-pad));
  padding-left: calc(var(--page-pad) - 10px); padding-right: var(--page-pad);
  background: linear-gradient(var(--ink) 75%, rgba(19, 21, 29, 0));
}
.pagebar h1 { font-size: 18px; margin-right: auto; }

/* ---------- Pencarian & mode ---------- */
.search-area { position: sticky; top: 0; z-index: 4; background: var(--ink); padding: 6px 0 8px; margin: 0 calc(-1 * var(--page-pad)); padding-left: var(--page-pad); padding-right: var(--page-pad); }
.mode-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--screen); margin-bottom: 10px; }
.mode-switch button {
  min-height: 36px; padding: 0 16px; border-radius: 999px; color: var(--muted); font-size: 14.5px;
}
.mode-switch button[aria-selected="true"] { background: var(--shade-2); color: var(--light); font-weight: 600; }
.search-box {
  display: flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 4px 0 12px;
  border-radius: var(--r-ctl); background: var(--screen); border: 1px solid var(--line);
}
.search-box:focus-within { border-color: #4a5168; }
.search-box > .icon { color: var(--faint); }
.search-box input {
  flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; outline: none; font-size: 16px; padding: 0 4px;
}
.search-box input::placeholder { color: var(--faint); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-go { min-height: 38px; padding: 0 14px; border-radius: 9px; background: var(--sakura); color: var(--ink); font-weight: 600; font-size: 14.5px; }

.filters { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; margin: 0 calc(-1 * var(--page-pad)); padding-left: var(--page-pad); padding-right: var(--page-pad); }
.filters::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); font-size: 14px; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.chip[aria-pressed="true"] { border-color: transparent; background: var(--sakura-soft); color: var(--sakura); font-weight: 600; }
.chip-sep { flex: none; width: 1px; background: var(--line); margin: 6px 2px; }

.list-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0 2px; color: var(--muted); font-size: 13.5px; }
.sort-select {
  appearance: none; -webkit-appearance: none; min-height: 36px; padding: 0 30px 0 10px; border-radius: 9px;
  background: var(--screen) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a2a7b8' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center;
  border: 1px solid var(--line); color: var(--light); font-size: 13.5px;
}

/* ---------- Kartu koleksi ---------- */
.results { padding-bottom: calc(104px + var(--safe-b)); }
.card {
  display: grid; grid-template-columns: var(--poster-w) minmax(0, 1fr); gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  content-visibility: auto; contain-intrinsic-size: auto 150px;
}
.card:last-child { border-bottom: 0; }
.poster {
  position: relative; display: block; width: var(--poster-w); aspect-ratio: 2 / 3; border-radius: var(--r-poster);
  overflow: hidden; background: var(--screen); box-shadow: inset 0 0 0 1px rgba(236, 232, 225, 0.06);
}
.poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.poster img.is-loading { opacity: 0; }
.poster img { transition: opacity 0.18s ease; }
.poster--empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1.5px dashed #3b4157; background: transparent; box-shadow: none; color: var(--muted);
  font-size: 12px; line-height: 1.25; text-align: center; padding: 6px;
}
.poster--empty .plus { font-size: 20px; line-height: 1; color: var(--sakura); }
.card-body { min-width: 0; display: flex; flex-direction: column; }
.card-head { display: flex; align-items: flex-start; gap: 4px; }
.card-title {
  flex: 1; min-width: 0; font-weight: 600; font-size: 17px; line-height: 1.28; text-decoration: none;
  overflow-wrap: anywhere; padding: 1px 0 2px;
}
.card-title:hover { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.fav-btn {
  flex: none; width: 44px; height: 44px; margin: -9px -8px 0 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 21px; line-height: 1;
}
.fav-btn .emoji { filter: grayscale(1) brightness(0.9); opacity: 0.32; transition: opacity 0.15s, filter 0.15s; }
.fav-btn[aria-pressed="true"] { background: var(--fav-glow); }
.fav-btn[aria-pressed="true"] .emoji { filter: none; opacity: 1; }
.card-meta { color: var(--muted); font-size: 14px; line-height: 1.4; margin-top: 3px; overflow-wrap: anywhere; }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.score-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 12px;
  border-radius: 999px; background: var(--shade); font-size: 14px; color: var(--muted); white-space: nowrap;
}
.score-btn .star { color: var(--sakura); font-size: 16px; }
.score-btn .score-val { display: inline-flex; align-items: baseline; gap: 1px; color: var(--muted); margin-left: 1px; }
.score-btn .score-num { font-family: var(--font-num); font-size: 20px; line-height: 1; color: var(--light); letter-spacing: 0.02em; }
.score-btn.is-empty { background: transparent; border: 1px dashed #3b4157; color: var(--muted); }
.score-btn.is-empty .star { color: var(--muted); }
.ep-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); font-size: 14px; color: var(--light); white-space: nowrap;
}
.ep-btn:hover, .score-btn:hover { border-color: #4a5168; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: var(--r-ctl); font-weight: 600; font-size: 15px; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--sakura); color: var(--ink); }
.btn-primary:disabled { background: var(--shade); color: var(--faint); cursor: not-allowed; }
.btn-secondary { background: var(--shade); color: var(--light); }
.btn-ghost { color: var(--light); border: 1px solid var(--line); }
.btn-danger { background: var(--danger); color: var(--ink); }
.btn-text { color: var(--sakura); font-weight: 600; min-height: 44px; padding: 0 6px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 10px; }
.btn .icon { margin-left: -2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.fab-wrap {
  position: fixed; left: 0; right: 0; bottom: calc(14px + var(--safe-b)); z-index: 6;
  display: flex; justify-content: center; pointer-events: none;
}
.fab {
  pointer-events: auto; display: inline-flex; align-items: center; gap: 8px; height: 54px; padding: 0 24px 0 20px;
  border-radius: 999px; background: var(--sakura); color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 0 6px rgba(19, 21, 29, 0.72);
}

/* ---------- Keadaan kosong ---------- */
.empty { padding: 36px 0 120px; }
.empty-frame {
  width: 96px; aspect-ratio: 2 / 3; border-radius: 6px; border: 1.5px dashed #3b4157; margin-bottom: 22px;
  display: grid; place-items: center; color: var(--sakura); font-family: var(--font-num); font-size: 30px;
}
.empty h2 { font-size: 22px; margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 30em; margin-bottom: 22px; }
.empty .btn-row { flex-direction: column; align-items: stretch; max-width: 340px; }
.no-results { padding: 28px 0; color: var(--muted); }
.no-results p { margin-bottom: 14px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 0; right: 0; margin-inline: auto; bottom: calc(84px + var(--safe-b)); z-index: 60;
  transform: translateY(16px); opacity: 0; pointer-events: none; width: fit-content;
  display: flex; align-items: center; gap: 14px; max-width: min(calc(100vw - 24px), 520px); min-height: 50px; padding: 8px 8px 8px 16px;
  border-radius: 12px; background: #f1ede6; color: #17191f; font-size: 14.5px; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.toast.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.toast-text { flex: 1; }
.toast-action { min-height: 40px; padding: 0 12px; border-radius: 8px; font-weight: 600; color: #b5245a; }
.toast--error { background: #ffd9d4; }

/* ---------- Lembar bawah & dialog ---------- */
.sheet, .dialog { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.dialog { align-items: center; padding: 20px; }
.sheet-scrim { position: absolute; inset: 0; background: rgba(8, 9, 13, 0.62); opacity: 0; transition: opacity 0.2s; }
.sheet.is-open .sheet-scrim, .dialog.is-open .sheet-scrim { opacity: 1; }
.sheet-panel {
  position: relative; width: 100%; max-width: var(--col); max-height: min(90vh, 900px); display: flex; flex-direction: column;
  background: var(--screen); border-radius: 18px 18px 0 0; padding-bottom: var(--safe-b);
  transform: translateY(24px); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease; outline: none;
}
.sheet.is-open .sheet-panel { transform: none; opacity: 1; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 12px 8px 4px 18px; }
.sheet-title { flex: 1; font-size: 17px; }
.sheet-body { overflow-y: auto; padding: 6px 18px 18px; overscroll-behavior: contain; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
.sheet--tall .sheet-panel { height: min(92vh, 900px); }
.dialog-panel {
  position: relative; width: 100%; max-width: 400px; background: var(--screen); border-radius: 16px; padding: 22px 20px 16px;
  transform: scale(0.97); opacity: 0; transition: transform 0.18s, opacity 0.18s; outline: none;
}
.dialog.is-open .dialog-panel { transform: none; opacity: 1; }
.dialog-title { font-size: 18px; margin-bottom: 8px; overflow-wrap: anywhere; }
.dialog-body { color: var(--muted); margin-bottom: 18px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
@media (min-width: 700px) {
  .sheet { align-items: center; padding: 24px; }
  .sheet-panel { border-radius: 18px; max-height: 86vh; }
}

/* Pemilih skor */
.score-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 6px 0 14px; }
.score-grid button {
  height: 56px; border-radius: 12px; background: var(--shade); font-family: var(--font-num); font-size: 24px; letter-spacing: 0.02em;
}
.score-grid button[aria-pressed="true"] { background: var(--sakura); color: var(--ink); }
.score-hint { color: var(--muted); font-size: 13.5px; margin-bottom: 4px; }

/* ---------- Formulir ---------- */
.form { padding-bottom: calc(110px + var(--safe-b)); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label, .field-label { font-size: 14px; color: var(--muted); }
.field .hint { font-size: 13px; color: var(--faint); }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 11px 12px; border-radius: var(--r-ctl); border: 1px solid var(--line);
  background: var(--screen); font-size: 16px; outline: none;
}
.input:focus, .textarea:focus, .select:focus { border-color: #4f5670; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.input-title { font-size: 19px; font-weight: 600; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button {
  min-height: 48px; padding: 4px 6px; border-radius: 11px; border: 1px solid var(--line); color: var(--muted); font-size: 14.5px; line-height: 1.2;
}
.seg button[aria-checked="true"] { border-color: var(--sakura); background: var(--sakura-soft); color: var(--light); font-weight: 600; }
details.more { border-top: 1px solid var(--line); margin-top: 8px; }
details.more > summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; min-height: 54px; cursor: pointer; font-weight: 600;
}
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .icon { transition: transform 0.15s; color: var(--muted); }
details.more[open] > summary .icon { transform: rotate(90deg); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--shade-2); transition: background 0.15s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--light); transition: transform 0.15s; }
.switch input:checked + span { background: var(--sakura); }
.switch input:checked + span::after { transform: translateX(20px); background: var(--ink); }
.switch input:focus-visible + span { outline: 2px solid var(--sakura); outline-offset: 2px; }
.form-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 7; padding: 12px var(--page-pad) calc(12px + var(--safe-b));
  background: linear-gradient(rgba(19, 21, 29, 0), var(--ink) 30%);
}
.form-bar-inner { max-width: var(--col); margin: 0 auto; display: flex; gap: 10px; }
.form-bar-inner .btn-primary { flex: 1; }
.inline-score { display: flex; flex-wrap: wrap; gap: 6px; }
.inline-score button { width: 44px; height: 44px; border-radius: 10px; background: var(--shade); font-family: var(--font-num); font-size: 19px; }
.inline-score button[aria-pressed="true"] { background: var(--sakura); color: var(--ink); }
.inline-score .clear { width: auto; padding: 0 12px; font-family: var(--font-text); font-size: 14px; color: var(--muted); }

.notice {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--screen);
  border: 1px solid var(--line); font-size: 14px; color: var(--muted); margin: 10px 0;
}
.notice strong { color: var(--light); font-weight: 600; }
.notice .icon { color: var(--sakura); margin-top: 1px; }
.notice--warn { border-color: #5b4a2a; }
.notice--warn .icon { color: #f2c46d; }
.notice .btn-text { min-height: 32px; padding: 0; }

/* Kandidat katalog */
.cand-list { display: flex; flex-direction: column; }
.cand {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left;
  padding: 8px 6px; border-radius: 10px; min-height: 84px;
}
.cand:hover, .cand:focus-visible { background: var(--shade); }
.cand[aria-pressed="true"] { background: var(--sakura-soft); }
.cand-poster { width: 48px; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: var(--shade); }
.cand-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cand-title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.cand-meta { color: var(--muted); font-size: 13.5px; }
.cand-year { font-family: var(--font-num); font-size: 18px; color: var(--light); letter-spacing: 0.02em; }
.status-line { color: var(--muted); font-size: 14px; padding: 8px 2px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.source-tabs { display: flex; gap: 6px; margin: 4px 0 10px; }

/* ---------- Detail ---------- */
.detail { padding-bottom: calc(60px + var(--safe-b)); }
.detail-hero { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 4px; }
@media (min-width: 600px) { .detail-hero { grid-template-columns: 220px minmax(0, 1fr); gap: 22px; } }
.detail-poster { position: relative; width: 100%; aspect-ratio: 2 / 3; border-radius: 8px; overflow: hidden; background: var(--screen); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(236, 232, 225, 0.06); }
.detail-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.detail-poster.poster--empty { box-shadow: none; }
.poster-change {
  position: absolute; left: 8px; right: 8px; bottom: 8px; min-height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  background: rgba(19, 21, 29, 0.78); color: var(--light); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(236, 232, 225, 0.16);
}
.detail-title { font-size: 24px; line-height: 1.22; overflow-wrap: anywhere; }
@media (min-width: 600px) { .detail-title { font-size: 28px; } }
.detail-meta { color: var(--muted); margin: 6px 0 14px; font-size: 14.5px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fav-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.fav-toggle .emoji { filter: grayscale(1); opacity: 0.4; font-size: 17px; }
.fav-toggle[aria-pressed="true"] { background: var(--fav-glow); border-color: transparent; color: var(--light); }
.fav-toggle[aria-pressed="true"] .emoji { filter: none; opacity: 1; }
.section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section-title { font-size: 15px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.progress-big { font-size: 18px; font-weight: 600; margin-bottom: 12px; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.info-list { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 16px; margin: 0; font-size: 14.5px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.rating-row { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 12px; }
.rating { display: flex; flex-direction: column; }
.rating-label { color: var(--muted); font-size: 13px; }
.rating-value { font-family: var(--font-num); font-size: 26px; letter-spacing: 0.02em; line-height: 1.1; }
.source-note { color: var(--faint); font-size: 13px; margin-top: 10px; }
.mini-list { display: flex; flex-direction: column; }
.mini {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; text-decoration: none;
}
.mini .poster { width: 40px; }
.mini-title { font-weight: 600; overflow-wrap: anywhere; }
.mini-meta { color: var(--muted); font-size: 13px; }
.mini-score { font-family: var(--font-num); font-size: 18px; color: var(--light); }
.added-at { color: var(--faint); font-size: 13px; padding-top: 16px; }

/* ---------- Editor poster ---------- */
.editor-root { position: fixed; inset: 0; z-index: 50; background: #0c0d12; display: flex; flex-direction: column; opacity: 0; transition: opacity 0.18s; }
.editor-root.is-open { opacity: 1; }
.editor { display: flex; flex-direction: column; height: 100%; outline: none; max-width: 760px; width: 100%; margin: 0 auto; }
.editor-bar { display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px; }
.editor-bar h2 { flex: 1; font-size: 17px; text-align: center; }
.editor-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.editor-stage:active { cursor: grabbing; }
.editor-frame { position: relative; flex: none; width: 200px; height: 300px; border-radius: 6px; }
.editor-frame img { position: absolute; max-width: none; transform-origin: 0 0; pointer-events: none; }
.editor-mask { position: absolute; inset: 0; border-radius: 6px; box-shadow: 0 0 0 200vmax rgba(12, 13, 18, 0.74); outline: 1px solid rgba(236, 232, 225, 0.5); pointer-events: none; }
.editor-tools { padding: 10px 16px calc(12px + var(--safe-b)); display: grid; gap: 10px; }
.zoom-row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 6px; }
.zoom-row input[type="range"] { width: 100%; accent-color: var(--sakura); height: 32px; }
.editor-preview { display: grid; grid-template-columns: var(--poster-w) minmax(0, 1fr); gap: 14px; padding: 10px 12px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line); align-items: start; }
.editor-preview canvas { width: var(--poster-w); aspect-ratio: 2 / 3; border-radius: var(--r-poster); display: block; }
.editor-preview .label { color: var(--faint); font-size: 12.5px; margin-bottom: 2px; }
.editor-hint { color: var(--muted); font-size: 13.5px; text-align: center; }
.editor-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.editor-actions .btn { flex: 1; }

.menu-list { display: flex; flex-direction: column; margin: 0 -8px; }
.menu-item {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 6px 10px; border-radius: 10px; text-align: left; font-size: 15.5px; text-decoration: none;
}
.menu-item:hover { background: var(--shade); }
.menu-item .icon { color: var(--muted); }
.menu-item small { display: block; color: var(--muted); font-size: 13px; }
.url-preview { margin-top: 12px; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: start; }
.url-preview .frame { width: 110px; aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; background: var(--shade); }
.url-preview img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Impor ---------- */
.page-intro { color: var(--muted); margin: 4px 0 18px; }
.choice-list { display: flex; flex-direction: column; gap: 10px; }
.choice {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px; border-radius: 14px;
  background: var(--screen); border: 1px solid var(--line); text-decoration: none; text-align: left; width: 100%;
}
.choice .icon { color: var(--sakura); justify-self: center; }
.choice-title { font-weight: 600; }
.choice-sub { color: var(--muted); font-size: 13.5px; }
.import-table { display: flex; flex-direction: column; gap: 10px; }
.import-row { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--screen); }
.import-row.is-skipped { opacity: 0.55; }
.import-row-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.import-row-head input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--sakura); flex: none; }
.import-row .line-no { color: var(--faint); font-size: 12.5px; }
.import-grid { display: grid; grid-template-columns: minmax(0, 1fr) 88px; gap: 8px; }
.import-grid .input { min-height: 44px; padding: 8px 10px; }
.import-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.import-opts .select { width: auto; min-height: 44px; padding: 6px 30px 6px 10px; }
.tag { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; background: var(--shade); color: var(--muted); }
.tag--warn { background: rgba(242, 196, 109, 0.13); color: #f2c46d; }
.tag--ok { background: var(--sakura-soft); color: var(--sakura); }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bulk-bar {
  position: sticky; top: 0; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 0; background: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 12px;
}
.bulk-bar .label { color: var(--muted); font-size: 13.5px; margin-right: 4px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.compare > div { padding: 10px; border-radius: 10px; background: var(--ink); border: 1px solid var(--line); min-width: 0; }
.compare .who { color: var(--faint); font-size: 12.5px; margin-bottom: 2px; }
.compare .what { font-weight: 600; overflow-wrap: anywhere; }
.compare .sub { color: var(--muted); font-size: 13px; }
.radio-row { display: flex; flex-direction: column; gap: 4px; }
.radio { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 6px; border-radius: 8px; }
.radio input { width: 20px; height: 20px; accent-color: var(--sakura); margin: 0; }
.summary-box { padding: 14px; border-radius: 14px; background: var(--screen); border: 1px solid var(--line); margin: 14px 0; }
.summary-box strong { font-family: var(--font-num); font-size: 22px; letter-spacing: 0.02em; color: var(--light); font-weight: 400; }
.summary-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: left; }
.summary-grid div { color: var(--muted); font-size: 13px; }

/* ---------- Hasil web ---------- */
.web-hint { padding: 22px 0; color: var(--muted); }
.web-hint p { margin-bottom: 14px; }
.example-list { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.example { text-align: left; min-height: 44px; padding: 8px 14px; border-radius: 12px; background: var(--screen); border: 1px solid var(--line); color: var(--light); font-size: 14.5px; }
.web-result { padding: 16px 0; border-bottom: 1px solid var(--line); }
.web-title { font-weight: 600; font-size: 16.5px; line-height: 1.3; text-decoration: none; overflow-wrap: anywhere; }
.web-title:hover { text-decoration: underline; }
.web-domain { color: var(--sakura); font-size: 13px; margin-top: 3px; overflow-wrap: anywhere; }
.web-snippet { color: var(--muted); font-size: 14.5px; margin-top: 6px; overflow-wrap: anywhere; }
.web-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.web-more { padding: 18px 0 8px; }

/* ---------- Pengaturan ---------- */
.settings-section { padding: 18px 0; border-bottom: 1px solid var(--line); }
.settings-section h2 { font-size: 17px; margin-bottom: 6px; }
.settings-section .desc { color: var(--muted); font-size: 14px; margin-bottom: 12px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14.5px; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: right; overflow-wrap: anywhere; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); margin-right: 6px; vertical-align: 1px; }
.status-dot.on { background: var(--sakura); }
.steps { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li { margin: 4px 0; }
.banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; margin: 8px 0 4px; border-radius: 14px;
  background: var(--screen); border: 1px solid var(--line); font-size: 14px;
}
.banner { align-items: flex-start; }
.banner > .icon { margin-top: 2px; color: var(--sakura); }
.banner-body { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.banner p { flex: 1 1 200px; color: var(--muted); }
.banner strong { color: var(--light); display: block; font-weight: 600; }
.conflict-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 12px; }
.conflict-card h3 { font-size: 15.5px; margin-bottom: 4px; overflow-wrap: anywhere; }
.conflict-field { color: var(--muted); font-size: 13.5px; margin-bottom: 6px; }
.conflict-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.conflict-option { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); text-align: left; min-width: 0; }
.conflict-option[aria-checked="true"] { border-color: var(--sakura); background: var(--sakura-soft); }
.conflict-option .who { font-size: 12.5px; color: var(--muted); }
.conflict-option .val { overflow-wrap: anywhere; white-space: pre-wrap; max-height: 9em; overflow: hidden; }
.conflict-option .poster { width: 64px; }

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