/* Katalog Aset GELITA: the page of gelita-katalog/ (built by php spark gelita:katalog:halaman). */

:root {
  --navy-900: #0B1320; --navy-800: #121C2E; --navy-700: #1B2740; --navy-600: #26355A;
  --gold-500: #DFC087; --gold-600: #C7A265; --gold-300: #F0DFB8;
  --text: #EDE6D6; --text-dim: #B4B9C6;
  --ok: #4FBF7A; --fix: #49B3C4; --redo: #E8954A; --later: #D9C05B; --drop: #E26A6A; --none: #8E97AB;
  --radius: 12px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--navy-900); color: var(--text);
  font: 400 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
}
a { color: var(--gold-500); }
a:hover { color: var(--gold-300); }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

.top {
  background: radial-gradient(ellipse at 30% 0%, var(--navy-600), var(--navy-800) 60%, var(--navy-900));
  border-bottom: 2px solid var(--gold-600);
  position: sticky; top: 0; z-index: 5;
}
.top .wrap:first-child { padding-top: 18px; }
.eyebrow { margin: 0; color: var(--gold-600); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; color: var(--gold-300); }
h1 { margin: 2px 0 4px; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.lead { margin: 0; color: var(--text-dim); max-width: 48rem; }
.summary { margin: 6px 0 0; font-size: .9rem; color: var(--gold-500); }
.tabs { display: flex; gap: 6px; padding-top: 12px; padding-bottom: 0; overflow-x: auto; }
.tabs a {
  padding: 8px 16px; border: 1px solid var(--gold-600); border-bottom: none; border-radius: 10px 10px 0 0;
  text-decoration: none; color: var(--gold-300); background: var(--navy-800); white-space: nowrap; font-weight: 700;
}
.tabs a[aria-current="page"] { background: linear-gradient(to bottom, var(--gold-300), var(--gold-500)); color: var(--navy-900); }

main { padding-top: 18px; padding-bottom: 24px; }
.intro, .note { color: var(--text-dim); }
.note { font-size: .9rem; border-left: 3px solid var(--gold-600); padding-left: 10px; }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--gold-300); min-width: 150px; flex: 1 1 150px; }
.filters label.grow { flex: 3 1 240px; }
.filters input, .filters select {
  font: inherit; color: var(--text); background: var(--navy-800); border: 1px solid var(--navy-600);
  border-radius: 8px; padding: 8px 10px; min-height: 42px; width: 100%;
}
.count { color: var(--text-dim); font-size: .9rem; margin: 12px 0; }

.group { margin: 22px 0 8px; display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--navy-600); padding-bottom: 4px; }
.group h2 { margin: 0; font-size: 1.35rem; }
.group span { color: var(--text-dim); font-size: .9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.card {
  display: flex; flex-direction: column; text-align: left; padding: 0; cursor: pointer; font: inherit; color: inherit;
  background: var(--navy-800); border: 1px solid var(--navy-600); border-radius: var(--radius); overflow: hidden;
}
.card:hover { border-color: var(--gold-600); }
.thumb {
  aspect-ratio: 4 / 3; display: grid; place-items: center; width: 100%;
  background: repeating-conic-gradient(#1a2438 0% 25%, #141d2e 0% 50%) 50% / 16px 16px;
}
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.card .body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.card .name { font-size: .88rem; line-height: 1.3; overflow-wrap: anywhere; }

.badges { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: .74rem; font-weight: 700; line-height: 1.2;
  padding: 3px 7px; border-radius: 999px; border: 1px solid currentColor; background: rgba(11, 19, 32, .6);
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.st-keep { color: var(--ok); } .st-fixed { color: var(--fix); } .st-redo { color: var(--redo); }
.st-redo-later { color: var(--later); } .st-drop { color: var(--drop); } .st-none { color: var(--none); }
.badge.tag { color: var(--gold-500); } .badge.tag::before { display: none; }
.badge.unused { color: var(--text-dim); border-style: dashed; } .badge.unused::before { display: none; }

.sounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.sound { background: var(--navy-800); border: 1px solid var(--navy-600); border-radius: var(--radius); padding: 12px; }
.sound h3 { margin: 0 0 4px; font-size: 1.1rem; }
.sound p { margin: 0 0 8px; color: var(--text-dim); font-size: .9rem; }
.sound code { color: var(--gold-500); font-size: .8rem; }
audio { width: 100%; height: 40px; }

.lines { display: flex; flex-direction: column; gap: 10px; }
.line { background: var(--navy-800); border: 1px solid var(--navy-600); border-radius: var(--radius); padding: 12px; }
.line header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.line header strong { color: var(--gold-300); }
.line header code { color: var(--text-dim); font-size: .8rem; }
.line .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.line .lang { display: flex; flex-direction: column; gap: 6px; }
.line .lang p { margin: 0; font-size: .95rem; }
.line .lang .label { font-size: .75rem; color: var(--gold-600); text-transform: uppercase; letter-spacing: .06em; }
.missing-file {
  display: grid; place-items: center; text-align: center; min-height: 40px; width: 100%; padding: 8px;
  color: var(--text-dim); font-size: .85rem; font-style: italic; border: 1px dashed var(--navy-600); border-radius: 8px;
}
.thumb .missing-file { height: 100%; border: none; }
.detail figure .missing-file { min-height: 200px; }
.guide { margin: 4px 0 0; font-size: .85rem; color: var(--text-dim); }

dialog {
  width: min(1100px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 2px solid var(--gold-600);
  border-radius: 16px; background: var(--navy-800); color: var(--text);
}
dialog::backdrop { background: rgba(5, 9, 16, .8); }
.detail { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); position: relative; }
.detail figure {
  margin: 0; min-height: 260px; display: grid; place-items: center; padding: 12px;
  background: repeating-conic-gradient(#1a2438 0% 25%, #141d2e 0% 50%) 50% / 20px 20px;
}
.detail figure img { max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain; display: block; }
.detail .info { padding: 16px 18px; overflow-y: auto; max-height: calc(100vh - 28px); }
.detail h2 { margin: 0 36px 8px 0; font-size: 1.4rem; }
.detail dl { margin: 12px 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; font-size: .9rem; }
.detail dt { color: var(--gold-500); }
.detail dd { margin: 0; overflow-wrap: anywhere; }
.detail dd ul { margin: 0; padding-left: 18px; }
.detail code { color: var(--gold-300); font-size: .85em; }
.close {
  position: absolute; top: 8px; right: 8px; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--gold-500); background: var(--navy-900); color: var(--gold-300); font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.pager { display: flex; gap: 8px; }
.pager button {
  flex: 1; min-height: 42px; font: inherit; font-weight: 700; cursor: pointer; border-radius: 999px;
  border: 1px solid var(--gold-600); background: var(--navy-700); color: var(--gold-300);
}
.empty { color: var(--text-dim); padding: 24px 0; }
.foot { color: var(--text-dim); font-size: .8rem; padding-bottom: 32px; }

@media (max-width: 760px) {
  .top { position: static; }
  .detail { grid-template-columns: 1fr; }
  .detail figure img { max-height: 50vh; }
  .detail .info { max-height: none; }
  dialog { max-height: calc(100vh - 16px); overflow-y: auto; }
  .line .pair { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
  .filters label { flex-basis: 140px; }
}
