:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #292524;
  --muted: #78716c;
  --line: #e7e5e4;
  --soft: #f5f5f4;
  --soft-2: #ebe9e7;
  --ring: #a8a29e;
  --danger: #a4574d;
  --ok: #5f7a64;
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #131312;
  --surface: #1b1a19;
  --text: #e7e5e4;
  --muted: #a09a94;
  --line: #2c2a28;
  --soft: #232120;
  --soft-2: #2d2b29;
  --ring: #57534e;
  --danger: #cf8a80;
  --ok: #8fb096;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
  --bg: #131312;
  --surface: #1b1a19;
  --text: #e7e5e4;
  --muted: #a09a94;
  --line: #2c2a28;
  --soft: #232120;
  --soft-2: #2d2b29;
  --ring: #57534e;
  --danger: #cf8a80;
  --ok: #8fb096;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ---------- Animasi ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes popOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.view-enter { animation: fadeUp 0.55s var(--ease) both; }

/* ---------- Header & tab ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { font-weight: 600; letter-spacing: 0.01em; text-decoration: none; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  padding: 8px 12px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}
.tab::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 1.5px;
  background: var(--text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.tab:hover, .tab.active { color: var(--text); }
.tab.active::after { transform: scaleX(1); }
.tabs-row { border-bottom: 1px solid var(--line); background: var(--bg); }

main { padding: 32px 0 80px; min-height: 70vh; }
.view-head { margin-bottom: 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.view-head p { margin-top: 4px; }
footer.site-foot { padding: 28px 0 40px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 0.85rem; }

/* ---------- Tombol & form ---------- */
.btn {
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn:hover { background: var(--soft-2); border-color: var(--ring); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: default; }
.btn.small { padding: 0.3rem 0.7rem; font-size: 0.82rem; border-radius: 8px; }
.btn.danger { color: var(--danger); }
.input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s;
}
.input:focus { outline: none; border-color: var(--ring); }
textarea.input { resize: vertical; min-height: 84px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 0.85rem; color: var(--muted); margin-bottom: 6px; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Grid galeri ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
  border: 1px solid var(--line);
  cursor: pointer;
  animation: fadeUp 0.6s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s var(--ease);
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.3); }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s var(--ease), opacity 0.6s var(--ease); }
.fade-img { opacity: 0; }
.fade-img.loaded { opacity: 1; }
.card:hover img { transform: scale(1.03); }
.card .meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 30px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
  color: #fff;
  font-size: 0.88rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.card .meta .c { font-size: 0.78rem; opacity: 0.8; }
.card:hover .meta, .card:focus-visible .meta { opacity: 1; }
@media (hover: none) { .card .meta { opacity: 1; } }
.card .play {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  color: #fff;
}
.card-wrap { position: relative; animation: fadeUp 0.6s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 45ms); }
.card-wrap .card { animation: none; }
.card-wrap .dl {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s var(--ease), transform 0.4s var(--ease), background 0.2s;
}
.card-wrap:hover .dl, .card-wrap .dl:focus-visible { opacity: 1; }
.card-wrap:hover .dl { transform: translateY(-3px); }
.card-wrap .dl:hover { background: rgba(0, 0, 0, 0.8); }
@media (hover: none) { .card-wrap .dl { opacity: 1; } }
.card.skeleton { animation: pulse 1.4s ease-in-out infinite; cursor: default; border-style: dashed; }
.card.skeleton:hover { transform: none; box-shadow: none; }
.notice { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); color: var(--muted); font-size: 0.92rem; }
.notice p + p { margin-top: 6px; }
.more-wrap { margin-top: 28px; text-align: center; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal .backdrop { position: absolute; inset: 0; background: rgba(20, 20, 19, 0.55); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade 0.3s var(--ease) both; }
.modal .panel {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  width: min(960px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  animation: pop 0.35s var(--ease) both;
}
.modal .x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}
.modal .x:hover { background: rgba(0, 0, 0, 0.65); }
.viewer { background: #0f0f0e; display: flex; justify-content: center; align-items: center; min-height: 160px; }
.viewer img, .viewer video { max-width: 100%; max-height: 62vh; display: block; }
.info { padding: 20px 24px 28px; animation: fadeUp 0.45s 0.08s var(--ease) both; }
.info h2 { font-size: 1.3rem; }
.info .desc { margin-top: 10px; white-space: pre-wrap; }
.info .links { margin-top: 8px; }
.comments { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.comments h3 { font-size: 1rem; margin-bottom: 14px; }
.comment { padding: 12px 0; border-bottom: 1px solid var(--line); animation: fadeUp 0.45s var(--ease) backwards; }
.comment:last-child { border-bottom: 0; }
.comment .c-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 0.9rem; }
.comment .c-head span { font-size: 0.78rem; color: var(--muted); }
.comment p { margin-top: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-form { margin-top: 18px; display: grid; gap: 10px; position: relative; }
.c-form .row2 { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.form-msg { font-size: 0.85rem; color: var(--danger); }

/* ---------- Admin ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.login-card h1 { font-size: 1.25rem; margin-bottom: 4px; }
.login-card .muted { margin-bottom: 20px; font-size: 0.92rem; }
.section-title { font-size: 1.15rem; margin-bottom: 16px; }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.row2c { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .row2c { grid-template-columns: 1fr; } }
.dropzone {
  display: block;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--ring); background: var(--soft); }
.dropzone input { display: none; }
.q-list { margin-top: 16px; display: grid; gap: 12px; }
.q-item { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; animation: fadeUp 0.4s var(--ease) backwards; }
.q-top { display: flex; align-items: center; gap: 10px; }
.q-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.bar { height: 4px; background: var(--soft-2); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--muted); transition: width 0.35s var(--ease); }
.ok { color: var(--ok); }
.err { color: var(--danger); }
.actions { margin-top: 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.list { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; animation: fadeUp 0.45s var(--ease) backwards; }
.row .thumb { width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: var(--soft); }
.row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-text { margin-top: 2px; font-size: 0.92rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.row.edit { display: grid; gap: 10px; }
@media (max-width: 640px) {
  .row { flex-wrap: wrap; }
  .row-actions { width: 100%; justify-content: flex-start; }
}
.badge { display: inline-block; font-size: 0.74rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--soft); color: var(--muted); }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--danger); }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.9rem; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; }
.inline-form .input { flex: 1; min-width: 200px; }
.steps { margin: 8px 0 0; padding-left: 20px; }
.steps li { margin-bottom: 4px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 16px);
  background: var(--text);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  z-index: 100;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Input tags (admin) ---------- */
.tag-input { position: relative; }
.ti-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 42px; padding: 5px 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  cursor: text; transition: border-color 0.2s;
}
.ti-box:focus-within { border-color: var(--ring); }
.ti-chips { display: contents; }
.ti-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.82rem; padding: 3px 4px 3px 10px; border-radius: 999px;
  background: var(--soft-2); color: var(--text); animation: pop 0.25s var(--ease) both;
}
.ti-chip button {
  width: 18px; height: 18px; border: 0; border-radius: 50%; padding: 0;
  background: transparent; color: var(--muted); font-size: 0.95rem; line-height: 1; cursor: pointer;
}
.ti-chip button:hover { background: var(--line); color: var(--text); }
.ti-input { flex: 1; min-width: 120px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 0.95rem; padding: 4px 2px; }
.ti-list {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: 6px; list-style: none; max-height: 240px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.35); animation: fadeUp 0.2s var(--ease) both;
}
.ti-head { padding: 4px 10px 6px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.ti-opt { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 8px; font-size: 0.92rem; cursor: pointer; }
.ti-opt small { color: var(--muted); font-size: 0.75rem; white-space: nowrap; align-self: center; }
.ti-opt.active, .ti-opt:hover { background: var(--soft); }
.badge.life { color: var(--text); background: var(--soft-2); }

/* ---------- Tag ---------- */
.tagbar { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 22px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.2;
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}
.chip:hover { border-color: var(--ring); color: var(--text); }
.chip:active { transform: scale(0.97); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.chip .n { font-size: 0.72rem; opacity: 0.6; }
.chip.static { cursor: default; background: var(--soft); }
.chip.static:hover { border-color: var(--line); color: var(--muted); }
.tags-static { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* ---------- Ikon gembok (tab Life & pop up) ---------- */
.lock-ico .shackle { transform-box: view-box; transform-origin: 8px 11px; transition: transform 0.5s cubic-bezier(0.3, 1.4, 0.5, 1); }
.lock-ico.unlocked .shackle { transform: translateY(-1.5px) rotate(-28deg); }
.tab-life .lock-ico { margin-left: 2px; vertical-align: -1px; opacity: 0.75; }

/* ---------- Pop up password Life ---------- */
.btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn.primary:hover { background: var(--text); border-color: var(--text); opacity: 0.88; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--soft); border-color: transparent; color: var(--text); }

.gate { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; padding: 20px; }
.gate.open { display: flex; }
.gate .backdrop { position: absolute; inset: 0; background: rgba(20, 20, 19, 0.6); -webkit-backdrop-filter: blur(10px) saturate(0.9); backdrop-filter: blur(10px) saturate(0.9); animation: fade 0.35s var(--ease) both; }
.gate-card {
  position: relative;
  width: min(380px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 34px 28px 24px;
  text-align: center;
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  animation: pop 0.45s var(--ease) both;
}
.gate-icon {
  width: 68px;
  height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--text);
  background: var(--soft);
  border: 1px solid var(--line);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--soft) 55%, transparent);
  transition: background 0.4s, color 0.4s, box-shadow 0.4s, transform 0.4s;
}
.gate-card.done .gate-icon { background: var(--ok); color: #fff; border-color: var(--ok); transform: scale(1.06); box-shadow: 0 0 0 9px color-mix(in srgb, var(--ok) 22%, transparent); }
.gate-card h2 { font-size: 1.4rem; }
.gate-sub { margin: 6px 0 22px; font-size: 0.92rem; }
.pw-field { position: relative; }
.pw-field .input { padding-right: 44px; text-align: left; height: 46px; border-radius: 12px; }
.pw-field .input[aria-invalid="true"] { border-color: var(--danger); }
.pw-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.pw-toggle:hover { background: var(--soft); color: var(--text); }
.pw-toggle .eye-off { display: none; }
.pw-toggle[aria-pressed="true"] .eye-on { display: none; }
.pw-toggle[aria-pressed="true"] .eye-off { display: block; }
.gate-msg { min-height: 1.4em; margin: 10px 0 6px; font-size: 0.85rem; color: var(--danger); text-align: left; }
.gate-actions { display: flex; gap: 10px; justify-content: flex-end; }
.gate-actions .btn { padding: 0.6rem 1.2rem; border-radius: 12px; }
.gate-actions .btn.primary { flex: 1; position: relative; }
.spin { display: none; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; vertical-align: -2px; margin-right: 8px; }
.btn.loading .spin { display: inline-block; }
.btn.loading { opacity: 0.8 !important; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-7px); } 40%, 60% { transform: translateX(7px); } }
.gate-card.shake { animation: shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@media (max-width: 420px) { .gate { align-items: flex-end; padding: 12px; } .gate-card { border-radius: 22px; } }

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

/* ---------- Form unggah ---------- */
.q-item.leaving, .row.leaving {
  opacity: 0;
  transform: translateX(14px);
  height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: -5px !important;
  margin-bottom: -5px !important;
  border-width: 0 !important;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), height 0.35s var(--ease) 0.05s, padding 0.35s var(--ease) 0.05s, margin 0.35s var(--ease) 0.05s;
}
.q-item { transition: opacity 0.25s var(--ease); }
.bulk { margin-top: 16px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--soft); animation: fadeUp 0.45s var(--ease) backwards; }
.bulk-title { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.q-item textarea.input { min-height: 44px; }

/* ---------- Animasi keluar (modal & pop up) ---------- */
.modal.closing .backdrop, .gate.closing .backdrop { animation: fadeOut 0.26s var(--ease-io) both; }
.modal.closing .panel { animation: popOut 0.26s var(--ease-io) both; }
.gate.closing .gate-card { animation: popOut 0.26s var(--ease-io) both; }
.modal .x { display: grid; place-items: center; padding: 0; }
.stamp { font-variant-numeric: tabular-nums; }
.stamp time { color: var(--text); opacity: 0.85; }

/* ---------- Pergantian tema ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2; }
/* Cadangan untuk browser tanpa View Transitions: warna berubah halus. */
.theme-anim, .theme-anim *, .theme-anim *::before, .theme-anim *::after {
  transition: background-color 0.55s var(--ease-io), color 0.55s var(--ease-io), border-color 0.55s var(--ease-io), box-shadow 0.55s var(--ease-io), fill 0.55s var(--ease-io) !important;
}

.theme-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.theme-toggle:hover { background: var(--soft-2); border-color: var(--ring); }
.theme-toggle:active { transform: scale(0.92); }
.theme-toggle .tt-core { transition: r 0.6s var(--ease), fill 0.3s; }
.theme-toggle .tt-cut { transition: cx 0.6s var(--ease), cy 0.6s var(--ease); }
.theme-toggle .tt-rays { transform-origin: 12px 12px; transition: transform 0.7s var(--ease), opacity 0.4s var(--ease); }
.theme-toggle svg { transition: transform 0.7s var(--ease); }
.theme-toggle[aria-pressed="true"] svg { transform: rotate(40deg); }
.theme-toggle[aria-pressed="true"] .tt-core { r: 8.5px; }
.theme-toggle[aria-pressed="true"] .tt-cut { cx: 17px; cy: 7px; }
.theme-toggle[aria-pressed="true"] .tt-rays { transform: rotate(-60deg) scale(0.4); opacity: 0; }
.head-right { display: flex; align-items: center; gap: 8px; flex: none; }
.theme-fixed { position: fixed; top: 16px; right: 16px; z-index: 5; }

/* ---------- Font (dihosting sendiri, mendukung mobile dan desktop) ---------- */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}
body { font-family: var(--font-ui); font-size: 15.5px; line-height: 1.65; }
button, input, select, textarea { font-family: inherit; }
h1, h2, .brand { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.012em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.3rem); }
.brand { font-size: 1.2rem; }
h3 { font-weight: 650; }
.tab { font-weight: 500; }

/* ---------- Tombol dengan ikon ---------- */
.btn .ico { display: inline-flex; vertical-align: -3px; margin-right: 6px; }
.btn .ico:empty { display: none; }
.btn .ico svg { display: block; }

/* ---------- Komentar: foto, IP, moderasi ---------- */
.sr-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.comment .c-ip { font-size: 0.76rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 1px; }
.c-img { display: block; margin-top: 8px; width: fit-content; max-width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--soft); }
.c-img img { display: block; max-width: 100%; max-height: 260px; width: auto; height: auto; }
.c-actions { display: flex; gap: 8px; align-items: center; }
.c-note { margin-top: -2px; }
.c-preview { position: relative; width: fit-content; max-width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); animation: pop 0.35s var(--ease) both; }
.c-preview img { display: block; max-height: 140px; max-width: 100%; }
.x-mini { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.62); color: #fff; cursor: pointer; }
.c-admin { margin-top: 10px; }
.c-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ban-panel { margin-top: 10px; display: grid; gap: 10px; padding: 12px; border-radius: 12px; background: var(--soft); animation: pop 0.3s var(--ease) both; }
.ban-panel .check, .check { display: flex; gap: 8px; align-items: center; font-size: 0.85rem; color: var(--muted); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--danger); }
.comment.leaving { opacity: 0; transform: translateX(8px); transition: opacity 0.25s, transform 0.25s; }

/* ---------- Admin: unggah massal ---------- */
.bulk-pick { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.bulk-pick .small { margin-left: auto; }
.q-item { transition: opacity 0.25s var(--ease), border-color 0.2s, background 0.2s; }
.q-item.picked { border-color: var(--ring); background: color-mix(in srgb, var(--soft) 70%, transparent); }
.q-item.is-done { opacity: 0.62; }
.q-check { display: grid; place-items: center; width: 28px; height: 28px; cursor: pointer; flex: none; }
.q-check input { width: 18px; height: 18px; accent-color: var(--text); cursor: pointer; }
.q-thumb { position: relative; width: 48px; height: 48px; flex: none; border-radius: 10px; overflow: hidden; background: var(--soft-2); }
.q-thumb img, .q-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.q-kind { position: absolute; right: 3px; bottom: 3px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; }
.q-kind svg { width: 11px; height: 11px; }
.q-meta { flex: 1; min-width: 0; display: grid; }
.q-meta .q-name { display: block; }

/* ---------- Admin: komentar & blokir ---------- */
.c-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.ua { margin-top: 2px; overflow-wrap: anywhere; }
.c-row { align-items: flex-start; }
.c-row .c-img img { max-height: 120px; }
