/* ==========================================================================
   KomaKita: tema gelap sinematik. Latar tinta hampir hitam, teks putih kertas,
   satu aksen merah (dipakai hanya di momen kunci: tombol utama, fokus, tautan,
   penanda chapter aktif). Tipografi Archivo, bobot tebal untuk judul ala poster
   komik. Radius tunggal 6px, tanpa pill, tanpa glow.
   ========================================================================== */

:root {
  --bg: #101014;
  --bg-soft: #17171d;
  --surface: #1c1c23;
  --line: #2a2a33;
  --text: #f4f2ec;
  --muted: #a49fae;
  --link: #ff5964;
  --accent: #d92536;
  --on-accent: #ffffff;
  --r: 6px;
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f5f0;
  --bg-soft: #eeebe4;
  --surface: #ffffff;
  --line: #ddd7cc;
  --text: #191821;
  --muted: #5d5766;
  --link: #b81f2d;
  --accent: #c92232;
  --on-accent: #ffffff;
  --shadow-lift: 0 8px 24px rgba(25, 24, 33, 0.12);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
  color: inherit;
}

a,
button,
summary,
label[for],
input[type="search"]::-webkit-search-cancel-button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

.wrap {
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: 0 0 var(--r) 0;
  font-weight: 700;
}

.skip:focus {
  left: 0;
}

/* Ikon */
.ic {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.wordmark {
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.wm-accent {
  color: var(--link);
}

.wm-dot {
  color: var(--accent);
}

/* tombol Menu di topbar */
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.menu-btn:hover {
  background: var(--bg-soft);
  border-color: var(--muted);
}

.menu-btn:active {
  background: var(--surface);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--r);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-soft);
  border-color: var(--line);
}

.icon-btn:active {
  background: var(--surface);
}

/* Ikon tombol tema: matahari saat gelap (tujuan: ke terang), bulan saat terang. */
:root[data-theme="dark"] .ic-moon { display: none; }
:root[data-theme="light"] .ic-sun { display: none; }

/* ----------------------------------------------------------------- halaman */

main {
  min-height: calc(100vh - 200px);
  outline: none;
}

.page {
  padding: 36px 0 64px;
}

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

h1 {
  font-size: clamp(1.6rem, 4.5vw, 2.3rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

.sub {
  margin: 6px 0 0;
  color: var(--muted);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 48px 0 16px;
}

.section-title h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.count {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* ------------------------------------------------------------------ kartu */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 18px 12px;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 22px 16px;
  }
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--r) + 2px);
  padding: 8px;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 37, 54, 0.45);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

:root[data-theme="light"] .card:hover {
  box-shadow: 0 10px 24px rgba(25, 24, 33, 0.12);
}

.card-cover-wrap {
  position: relative;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 2 / 3;
}

.cover {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2 / 3;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .cover img {
  transform: scale(1.05);
}

.cover-gradient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.72) 100%);
  opacity: 0.85;
}

.card-badge {
  position: absolute;
  bottom: 7px;
  left: 7px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: rgba(16, 16, 20, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ic-star {
  width: 11px;
  height: 11px;
  fill: #ffb800;
  stroke: #ffb800;
  stroke-width: 1;
}

.noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: var(--line);
}

.noimg .ic {
  width: 36px;
  height: 36px;
}

.card-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 8px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.35;
}

.card-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text);
  transition: color 0.15s ease;
}

.card-title a:hover {
  color: var(--link);
}

.card-chaps {
  list-style: none;
  margin: auto 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chap-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 32px;
  padding: 4px 8px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.chap-link:hover {
  background: var(--surface);
  border-color: var(--line);
  color: var(--link);
}

.chap-link.is-latest {
  font-weight: 700;
}

.chap-link.is-latest::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.chap-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chap-date {
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
  flex: none;
}

.card-meta {
  color: var(--muted);
  font-size: 0.75rem;
  margin: 0 0 4px;
}

/* ------------------------------------------------------------------- tab */

.tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 24px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 16px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tab:hover {
  color: var(--text);
  border-color: var(--muted);
}

.tab[aria-selected="true"] {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* --------------------------------------------------------------- tombol */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  background: var(--accent);
  color: var(--on-accent);
  border: 1px solid var(--accent);
  border-radius: var(--r);
  font-weight: 700;
  font-size: 0.95rem;
  transition: filter 0.15s ease;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn:active {
  filter: brightness(0.92);
}

.btn:disabled {
  opacity: 0.45;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--bg-soft);
  filter: none;
}

.btn-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------- pencarian */

.search-form {
  display: flex;
  gap: 10px;
  margin-bottom: 28px;
}

.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.search-form input[type="search"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: transparent;
}

.search-form input::placeholder {
  color: var(--muted);
}

/* ------------------------------------------------------------------- komik */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 18px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
}

.back-link:hover {
  color: var(--link);
}

.series-head {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 32px;
  align-items: start;
}

.series-cover {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-soft);
  aspect-ratio: 2 / 3;
}

.series-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 2 / 3;
}

.series-info h1 {
  margin-bottom: 4px;
}

.alt-title {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 0.95rem;
}

.meta-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 28px;
  margin: 0 0 18px;
}

.meta-table > div {
  display: flex;
  gap: 8px;
  font-size: 0.9rem;
  min-width: 0;
}

.meta-table dt {
  color: var(--muted);
  flex: none;
  min-width: 84px;
}

.meta-table dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.genre {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-size: 0.8rem;
  color: var(--text);
}

.genre .ic {
  width: 13px;
  height: 13px;
  color: var(--muted);
}

.synopsis {
  margin: 0;
  max-width: 65ch;
  color: var(--text);
}

.synopsis {
  white-space: pre-line;
}

.synopsis.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.synopsis-toggle {
  background: none;
  border: none;
  padding: 8px 0;
  min-height: 36px;
  color: var(--link);
  font-weight: 700;
  font-size: 0.9rem;
}

.synopsis-toggle:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------- daftar chapter */

.ch-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 16px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.chip-btn:hover {
  color: var(--text);
  border-color: var(--muted);
}

.chip-btn[aria-pressed="true"] {
  color: var(--text);
  border-color: var(--accent);
}

.ch-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.ch-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  padding: 8px 14px;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: var(--r);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.ch-grid a:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.ch-no {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.ch-no small {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
}

.ch-grid .is-new .ch-no small {
  color: var(--accent);
}

.ch-side {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  color: var(--muted);
  font-size: 0.75rem;
}

.ch-side time {
  white-space: nowrap;
}

.nbadge {
  color: var(--accent);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* jejak baca */
.rd-badge {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
}

.ch-grid li.is-last .rd-badge {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.ch-grid li.is-read a .ch-no {
  color: var(--muted);
}

.ch-grid li.is-read a {
  opacity: 0.6;
}

.ch-arrow {
  width: 13px;
  height: 13px;
  color: var(--accent);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ch-grid a:hover .ch-arrow,
.ch-grid a:focus-visible .ch-arrow {
  opacity: 1;
  transform: none;
}

.is-new > a {
  background: var(--surface);
  border-color: var(--line);
}

.series-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 22px;
}

.series-cta .btn .ic {
  width: 16px;
  height: 16px;
}

.series-cta .btn:hover .ic {
  transform: translateX(2px);
}

.series-cta .ic {
  transition: transform 0.15s ease;
}

/* ----------------------------------------------------------------- reader */

.reader-wrap {
  max-width: 760px;
  margin-inline: auto;
  padding: 0 12px 64px;
}

.reader-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 0;
}

.reader-nav {
  display: flex;
  gap: 8px;
}

.reader-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 4px 0 18px;
}

.reader-title .count {
  display: block;
  font-weight: 500;
  font-size: 0.85rem;
  margin-top: 2px;
}

.pages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pages img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  background: var(--bg-soft);
}

.reader-end {
  margin-top: 20px;
  padding: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.reader-end p {
  margin: 0;
  color: var(--muted);
}

/* ------------------------------------------------------------ status UI */

.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 64px 20px;
  max-width: 440px;
  margin-inline: auto;
}

.state .ic {
  width: 40px;
  height: 40px;
  color: var(--muted);
}

.state h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.loading-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 16px;
  padding: 32px 16px;
  text-align: center;
}

.loading-note.center {
  min-height: 32vh;
}

.spinner {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2.5px solid var(--line);
  border-top-color: var(--accent);
  animation: rot 0.8s linear infinite;
}

@keyframes rot {
  to { transform: rotate(360deg); }
}

.skel {
  background: linear-gradient(100deg, var(--bg-soft) 40%, var(--surface) 50%, var(--bg-soft) 60%);
  background-size: 200% 100%;
  animation: sweep 1.2s ease-in-out infinite;
  border-radius: var(--r);
}

@keyframes sweep {
  from { background-position: 120% 0; }
  to { background-position: -80% 0; }
}

.grid-skel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  gap: 28px 18px;
}

.cover-skel {
  aspect-ratio: 2/3;
}

.line-skel {
  height: 14px;
  margin-top: 10px;
}

.short { width: 60%; }

/* ----------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 36px;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 60ch;
}

.site-footer a {
  color: var(--link);
}

.site-footer a:hover {
  text-decoration: underline;
}

/* -------------------------------------------------------------- responsive */

@media (max-width: 640px) {
  .page { padding: 24px 0 48px; }
  .series-head { grid-template-columns: 130px 1fr; gap: 18px; }
  .meta-table { grid-template-columns: 1fr; gap: 6px; }
  .grid, .grid-skel { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .card { padding: 6px; }
  .card-title { font-size: 0.84rem; }
  .search-form .btn { padding: 10px 14px; }
}

@media (min-width: 480px) and (max-width: 640px) {
  .grid, .grid-skel { grid-template-columns: repeat(3, 1fr); }
}

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

/* ------------------------------------------------------------ drawer menu */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 8, 12, 0.6);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 88vw);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-right: 1px solid var(--line);
  transform: translateX(-102%);
  transition: transform 0.22s ease;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  padding-left: calc(16px + env(safe-area-inset-left));
  overflow-y: auto;
}

.drawer.is-open .drawer-backdrop {
  opacity: 1;
}

.drawer.is-open .drawer-panel {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: 4px;
}

.drawer-title {
  font-weight: 900;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer-group {
  margin: 18px 0 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r);
  background: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: background-color 0.15s ease;
}

.drawer-link:hover {
  background: var(--bg-soft);
}

.drawer-link:active {
  background: var(--surface);
}

/* penanda halaman aktif: batang merah tipis di tepi kiri, hanya pada yang aktif */
.drawer-link[aria-current="page"] {
  background: var(--bg-soft);
}

.drawer-link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

/* petak jenis rilisan: dua kolom, aktif ditandai tepi dan titik merah */
.src-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 4px;
}

.src-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  min-height: 64px;
  padding: 10px 12px;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--r);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.src-tile:hover {
  border-color: var(--muted);
  background: var(--bg-soft);
}

.src-tile:active {
  background: var(--surface);
}

.src-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}

.src-tile[aria-current="page"] {
  border-color: var(--accent);
  background: var(--bg-soft);
}

.src-tile[aria-current="page"] .src-dot {
  background: var(--accent);
}

.src-name {
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.src-sub {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.drawer-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.theme-row .ic-sun,
.theme-row .ic-moon {
  margin-right: 0;
}

html.drawer-lock {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .drawer-backdrop,
  .drawer-panel {
    transition-duration: 0.01ms;
  }
}
