:root {
  --bg: #fbf8f3; --surface: #ffffff; --ink: #1c2236; --muted: #5d6479; --line: #e7e1d6;
  --primary: #1f3a68; --primary-ink: #ffffff; --link: #1f4d94; --accent: #e0a030; --accent-soft: #fbf0d9;
  --hero-a: #13244a; --hero-b: #2a4f8f; --shadow: 0 6px 24px rgba(28, 34, 54, .08);
  --radius: 16px; --max: 1120px;
  --serif: ui-serif, "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1420; --surface: #171e2e; --ink: #eceff6; --muted: #a0a9bd; --line: #26304a;
    --primary: #e0a030; --primary-ink: #1a1405; --link: #8fb4ee; --accent: #e0a030; --accent-soft: #2a2412;
    --hero-a: #0a1226; --hero-b: #1c3a6e; --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 1rem/1.65 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--link); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--serif); font-weight: 700; font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--accent-soft); }
.nav .cta { background: var(--primary); color: var(--primary-ink); font-weight: 600; margin-left: 6px; }
.nav .cta:hover { background: var(--primary); filter: brightness(1.1); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; color: var(--ink); cursor: pointer; }
.nav { flex: none; }
.nav a, .sub-btn { white-space: nowrap; }
/* Menu ringkas: kelas .compact dipasang oleh script bila semua item tidak muat dalam satu baris. */
.site-header.compact .menu-btn { display: grid; place-items: center; }
.site-header.compact .nav { position: absolute; inset: 64px 0 auto 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
.site-header.compact .nav.open { display: flex; }
.site-header.compact .nav a { padding: 12px; }
.site-header.compact .nav .cta { margin: 6px 0 0; text-align: center; }

/* Hero */
.hero { color: #fff; background: radial-gradient(900px 420px at 85% -10%, rgba(224, 160, 48, .35), transparent 60%), linear-gradient(135deg, var(--hero-a), var(--hero-b)); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px; opacity: .08;
  background: linear-gradient(#fff, #fff) center/36px 100% no-repeat, linear-gradient(#fff, #fff) center 30%/180px 36px no-repeat; pointer-events: none; }
.hero .wrap { padding: clamp(56px, 10vw, 112px) 0 clamp(80px, 10vw, 124px); position: relative; z-index: 1; }
.eyebrow { display: inline-block; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 14px; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.6rem); max-width: 18ch; margin-bottom: 18px; }
.hero p.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 56ch; color: rgba(255, 255, 255, .86); }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 12px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font: inherit; font-weight: 600; }
.btn-gold { background: var(--accent); color: #1a1405; }
.btn-gold:hover { filter: brightness(1.08); }
.btn-ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-line { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-danger { background: #b3261e; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .88rem; border-radius: 9px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 44px; max-width: 680px; }
.fact { border-left: 3px solid var(--accent); padding-left: 12px; }
.fact b { display: block; font-family: var(--serif); font-size: 1.7rem; }
.fact span { font-size: .85rem; color: rgba(255, 255, 255, .78); }

/* Sections */
section.block { padding: clamp(48px, 8vw, 88px) 0; }
/* Pita selang-seling: warna aksen dicampur ke latar (ikut berubah bila warna aksen diatur), dengan garis tipis di tepinya. */
section.alt { background: color-mix(in srgb, var(--accent) 14%, var(--bg)); border-block: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
@media (prefers-color-scheme: dark) { section.alt { background: color-mix(in srgb, var(--accent) 8%, var(--bg)); border-block-color: color-mix(in srgb, var(--accent) 16%, var(--line)); } }
/* Pita gelap penutup (Dukung Kami): gradasi yang sama dengan hero; kartu di dalamnya tetap berlatar terang. */
section.band-dark { background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; }
section.band-dark h2 { color: #fff; }
section.band-dark .head p { color: rgba(255, 255, 255, .8); }
section.band-dark .card, section.band-dark .more { color: var(--ink); border-color: transparent; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.head p { color: var(--muted); max-width: 60ch; margin: 0; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.card .pad { padding: 20px; }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); margin: 0; }
a.card { text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
a.card:hover { transform: translateY(-3px); }
.thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); object-fit: cover; width: 100%; }
.meta { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.quote { font-family: var(--serif); font-size: clamp(1.25rem, 2.6vw, 1.7rem); line-height: 1.4; border-left: 4px solid var(--accent); padding-left: 20px; margin: 0 0 32px; max-width: 62ch; }
.mission { counter-reset: m; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.mission .card { counter-increment: m; }
.mission .card::before { content: counter(m); width: 36px; height: 36px; margin: 20px 20px 0; display: grid; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--ink); font-weight: 700; border: 1px solid var(--accent); }
.mission .card p { padding: 12px 20px 20px; color: var(--ink); }
.empty { color: var(--muted); padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; grid-column: 1 / -1; }

/* Jadwal */
.events { display: grid; gap: 14px; }
.event { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; align-items: flex-start; }
.event.past { opacity: .6; }
.date-badge { flex: none; width: 64px; text-align: center; border-radius: 12px; background: var(--primary); color: var(--primary-ink); padding: 8px 0; line-height: 1.1; }
.date-badge b { display: block; font-size: 1.5rem; font-family: var(--serif); }
.date-badge span { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.event h3 { font-size: 1.1rem; margin-bottom: 4px; }
.event p { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; max-width: 760px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 28px 36px; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); border: 3px solid var(--bg); box-shadow: 0 0 0 2px var(--accent); }
.timeline b { font-family: var(--serif); font-size: 1.25rem; display: block; }
.timeline p { color: var(--muted); margin: 4px 0 0; }

/* Galeri */
.gallery { columns: 3 240px; column-gap: 14px; }
.gallery button { display: block; width: 100%; margin: 0 0 14px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; cursor: zoom-in; background: var(--line); break-inside: avoid; }
.gallery img { width: 100%; height: auto; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.03); }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog.lightbox::backdrop { background: rgba(5, 8, 16, .88); }
dialog.lightbox img { max-width: 96vw; max-height: 82vh; margin: auto; border-radius: 10px; }
dialog.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
dialog.lightbox form { text-align: right; margin-bottom: 8px; }

/* Artikel */
.article { max-width: 720px; margin-inline: auto; }
.article h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.article .cover { border-radius: var(--radius); margin: 20px 0 28px; width: 100%; aspect-ratio: auto; object-fit: initial; background: none; }
.article p { font-size: 1.07rem; line-height: 1.8; }
.page-title { background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); color: #fff; padding: 26px 0 22px; }
.page-title h1 { margin: 0 0 4px; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.page-title p { margin: 0; color: rgba(255, 255, 255, .8); font-size: .95rem; }
/* Bagian isi tepat di bawah banner: jarak atas dirapatkan */
section.block.tight { padding: 24px 0 clamp(40px, 6vw, 64px); }

/* Footer */
.site-footer { border-top: 3px solid var(--accent); background: var(--hero-a); color: rgba(255, 255, 255, .8); padding: 48px 0 24px; margin-top: 0; }
.site-footer a { color: #fff; }
.foot { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-family: var(--serif); font-size: 1.05rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.copy { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 32px; padding-top: 18px; font-size: .85rem; }

.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Dukung Kami */
.support { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.support .card .pad { flex: 1; display: flex; flex-direction: column; padding: 24px; }
.support .card h3 { font-size: 1.25rem; padding-left: 12px; border-left: 4px solid var(--accent); line-height: 1.25; margin-bottom: 12px; }
.support .card p { margin: 0 0 18px; }
.acct { list-style: none; padding: 0; margin: auto 0 0; display: grid; gap: 10px; }
.acct li { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); border: 1px solid var(--line); font-variant-numeric: tabular-nums; font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.acct b { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.acct span { font-size: .85rem; font-weight: 400; color: var(--muted); }
.more { margin-top: 24px; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); }
.more h3 { font-size: 1.15rem; }
.more p { color: var(--muted); }
.more p:last-child { margin: 0; color: var(--ink); }
@media (max-width: 700px) { .support { grid-template-columns: 1fr; } .support .card .pad { padding: 20px; } }

/* Kepengurusan */
.team-intro { max-width: 70ch; }
.team-intro p { color: var(--muted); }
.chart { margin: 8px 0 36px; }
.chart button { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; cursor: zoom-in; }
.chart img { width: 100%; height: auto; }
.group { margin-top: 36px; }
.group h2 { font-size: 1.4rem; border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 4px; margin-bottom: 18px; }
.people { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 14px; text-align: center; box-shadow: var(--shadow); }
.person b { display: block; line-height: 1.3; }
.person span { display: block; font-size: .88rem; color: var(--muted); margin-top: 2px; }
.avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; background: var(--accent-soft); }
.avatar.ini { display: grid; place-items: center; font: 700 1.7rem var(--serif); color: var(--ink); border: 2px solid var(--accent); }

/* Slider Sorotan */
.slider .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.slider .track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; position: relative; display: flex; align-items: center; min-height: clamp(480px, 74vh, 680px); }
.slide .wrap { position: relative; z-index: 2; min-width: 0; }
.slide-title { font-size: clamp(1.8rem, 5vw, 3.1rem); max-width: 20ch; margin-bottom: 10px; }
.slide .lead { margin-bottom: 0; }
.slide-photo { align-items: flex-end; background: #0a1226; }
.slide-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide-photo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(5, 10, 25, .88), rgba(5, 10, 25, .1) 65%); }
.slide-caption { font: 700 clamp(1.4rem, 4vw, 2.3rem)/1.25 var(--serif); max-width: 28ch; margin: 0 0 18px; }
.countdown { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 26px; }
.cd { min-width: 74px; text-align: center; padding: 10px 8px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(4px); }
.cd b { display: block; font: 700 clamp(1.6rem, 5vw, 2.4rem)/1.1 var(--serif); font-variant-numeric: tabular-nums; }
.cd span { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; opacity: .85; }
.cd.live { padding: 12px 18px; font-weight: 600; }
.slider-ui { position: absolute; left: 0; right: 0; bottom: 20px; z-index: 5; display: flex; justify-content: center; align-items: center; gap: 8px; }
.slider-ui[hidden] { display: none; }
.dot { position: relative; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 6px; background: rgba(255, 255, 255, .4); cursor: pointer; transition: width .3s; }
.dot::before { content: ""; position: absolute; inset: -9px -4px; }
.dot::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: left; }
.dot[aria-current="true"] { width: 44px; }
.ctl { width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .5); background: rgba(0, 0, 0, .28); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; }
.ctl:hover { background: rgba(0, 0, 0, .5); }
.slide-summary { max-width: 52ch; margin: 0 0 18px; color: rgba(255, 255, 255, .9); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Slide berita dengan poster: gambar utuh di samping teks */
.slide-split .wrap.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-top: 48px; padding-bottom: 96px; }
.poster { width: auto; height: auto; max-width: 100%; max-height: min(64vh, 540px); justify-self: center; border-radius: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
@media (max-width: 860px) {
  .slide-split .wrap.split { grid-template-columns: 1fr; gap: 16px; padding-top: 28px; padding-bottom: 84px; }
  .poster { order: -1; max-height: 32vh; }
  .slide-split .slide-summary { -webkit-line-clamp: 2; }
  .slide-split .slide-title { font-size: clamp(1.4rem, 6vw, 1.9rem); }
}

/* Poster kegiatan di daftar jadwal */
.event-img { flex: none; align-self: flex-start; width: 84px; margin-left: auto; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; cursor: zoom-in; }
.event-img img { display: block; width: 100%; height: auto; }
.event > div:nth-child(2) { min-width: 0; }
@media (max-width: 520px) { .event-img { width: 64px; } }

/* Slide foto galeri: foto utuh + latar buram, keterangan di pita bawah */
.slide-fit { background: #0a1226; overflow: hidden; }
.fit-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(28px) brightness(.5) saturate(1.1); transform: scale(1.15); }
.fit-img { position: absolute; left: 0; right: 0; top: 0; z-index: 1; width: 100%; height: calc(100% - 150px); object-fit: contain; padding: 14px 0 0; }
.slide-fit .fit-bar { position: absolute; left: 0; right: 0; bottom: 64px; z-index: 2; padding: 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px; }
.slide-fit .slide-caption { font-size: clamp(1.1rem, 2.6vw, 1.6rem); max-width: 60ch; margin: 0; }
.slide-fit .btn { margin-left: auto; padding: 8px 18px; }
@media (max-width: 860px) {
  .fit-img { height: calc(100% - 196px); }
  .slide-fit .fit-bar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .slide-fit .btn { margin-left: 0; }
}

/* Slider baru tampil setelah data siap (menghindari kedipan sambutan -> kegiatan) */
.slider:not(.ready) .track { visibility: hidden; }
.hero .btn-a { background: var(--accent); color: #1a1405; }
.hero .btn-a:hover { filter: brightness(1.08); }
.hero .btn-b { border-color: rgba(255, 255, 255, .45); color: #fff; }
.hero .btn-b:hover { background: rgba(255, 255, 255, .12); }

/* Pita pengantar di bawah slider */
.intro { border-bottom: 1px solid var(--line); }
.intro .wrap { padding: 36px 0 40px; }
.intro .welcome { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); column-gap: 48px; align-items: start; }
.intro .welcome > :not(.facts) { grid-column: 1; }
.intro .eyebrow { color: var(--link); margin-bottom: 8px; }
.intro h1 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 0 0 10px; max-width: 22ch; }
.intro .lead { color: var(--muted); max-width: 58ch; margin: 0 0 20px; }
.intro .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.intro .btn-a { background: var(--primary); color: var(--primary-ink); }
.intro .btn-a:hover { filter: brightness(1.1); }
.intro .btn-b { border-color: var(--line); background: var(--surface); color: var(--ink); }
.intro .facts { grid-column: 2; grid-row: 1 / span 4; align-self: center; margin: 0; max-width: none; grid-template-columns: 1fr; gap: 14px; }
.intro .fact span { color: var(--muted); }
@media (max-width: 860px) {
  .intro .welcome { grid-template-columns: 1fr; }
  .intro .facts { grid-column: 1; grid-row: auto; grid-template-columns: repeat(3, 1fr); margin-top: 22px; gap: 12px; }
  .intro .fact b { font-size: 1.35rem; }
}

/* Navigasi: menu "Tentang" */
.has-sub { position: relative; }
.sub-btn { padding: 8px 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer; }
.sub-btn:hover, .sub-btn[aria-current] { background: var(--accent-soft); }
.sub { display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 190px; padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; }
.has-sub.open .sub { display: grid; }
.sub a { white-space: nowrap; }
.site-header.compact .has-sub { display: grid; }
.site-header.compact .sub-btn { text-align: left; padding: 12px; font-weight: 600; pointer-events: none; }
.site-header.compact .sub-btn span { display: none; }
.site-header.compact .sub { display: grid; position: static; border: 0; box-shadow: none; background: none; padding: 0 0 0 12px; min-width: 0; }

/* Perpustakaan */
.lib-info { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 14px; }
.lib-info p { color: var(--muted); }
.lib-info p:last-child { margin: 0; }
.lib-info .btn { margin-top: 6px; }
.lib-tools { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; margin: 0 0 6px; }
.lib-tools input, .lib-tools select { padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; min-width: 0; }
@media (max-width: 640px) { .lib-tools { grid-template-columns: 1fr 1fr; } .lib-tools input { grid-column: 1 / -1; } .lib-tools select { padding: 11px 8px; font-size: .9rem; text-overflow: ellipsis; } }

/* Sampul: tampil utuh, sisa ruang diisi versi buram dari sampul itu sendiri */
.cover { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--line); }
.cover-box { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--line); border-radius: 10px; box-shadow: 0 3px 14px rgba(0, 0, 0, .14); }
.cover-box::before { content: ""; position: absolute; inset: -12%; background: var(--img) center / cover no-repeat; filter: blur(16px) brightness(.92); }
.cover-box .cover { position: relative; height: 100%; aspect-ratio: auto; background: none; }
.cover-ph { border-radius: 10px; box-shadow: 0 3px 14px rgba(0, 0, 0, .14); display: grid; place-items: center; font: 700 3rem var(--serif); color: #fff; background: linear-gradient(135deg, hsl(var(--h) 45% 34%), hsl(var(--h) 50% 22%)); }

/* Kartu buku */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; margin-top: 14px; }
.bc { display: flex; flex-direction: column; text-align: left; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--surface); color: inherit; font: inherit; cursor: pointer;
  box-shadow: 0 8px 30px rgba(28, 34, 54, .09); transition: transform .2s, box-shadow .2s; }
.bc:hover { transform: translateY(-3px); box-shadow: 0 14px 38px rgba(28, 34, 54, .15); }
.bc .cover-box, .bc .cover-ph { aspect-ratio: 4 / 3; border-radius: 0; box-shadow: none; }
.bc-body { display: flex; flex-direction: column; gap: 14px; flex: 1; padding: 18px 20px 20px; }
.bc-title { font: 650 1.12rem/1.35 var(--sans); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bc-rows { display: grid; gap: 8px; }
.bc-row { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; line-height: 1.45; }
.bc-row .ico { flex: none; margin-top: 2px; display: grid; }
.bc-row.ok { color: #1b7a3d; }
.bc-row.out { color: #a15c00; }
.bc-row.off { color: var(--muted); }
.pill { margin-top: auto; align-self: flex-start; padding: 9px 20px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, var(--surface)); font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.bc:hover .pill { background: color-mix(in srgb, var(--accent) 28%, var(--surface)); }
.more-row { text-align: center; margin-top: 26px; }
@media (max-width: 640px) {
  .books { grid-template-columns: 1fr; gap: 14px; margin-top: 10px; }
  .bc { flex-direction: row; }
  .bc .cover-box, .bc .cover-ph { flex: none; width: 104px; aspect-ratio: auto; min-height: 136px; }
  .bc-body { padding: 12px 14px; gap: 8px; }
  .bc-title { font-size: 1rem; }
  .bc-row { font-size: .82rem; }
  .pill { display: none; }
}

/* Status (dipakai di kartu dan jendela rincian) */
.badge { display: inline-block; width: fit-content; font-size: .72rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid currentColor; }
.badge.ok { color: #1b7a3d; }
.badge.out { color: #a15c00; }
.badge.off { color: var(--muted); }
@media (prefers-color-scheme: dark) {
  .badge.ok, .bc-row.ok { color: #6fd08c; }
  .badge.out, .bc-row.out { color: #f0b45a; }
  .bc { box-shadow: 0 0 0 1px var(--line); }
  .bc:hover { box-shadow: 0 0 0 1px var(--line), 0 14px 38px rgba(0, 0, 0, .4); }
}

/* Jendela rincian buku */
dialog.book-dlg { border: 0; border-radius: 18px; padding: 20px; width: min(100% - 16px, 760px); max-height: 92vh; overflow: auto; background: var(--bg); color: var(--ink); }
dialog.book-dlg::backdrop { background: rgba(5, 8, 16, .7); }
.book-close { text-align: right; margin-bottom: 8px; }
.book-detail { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: start; }
.book-detail .cover { border-radius: 10px; border: 1px solid var(--line); }
.book-detail h2 { font-size: 1.5rem; margin-bottom: 8px; }
.book-detail dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 14px 0; }
.book-detail dt { color: var(--muted); font-size: .88rem; }
.book-detail dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 600px) { .book-detail { grid-template-columns: 1fr; } .book-detail .cover { max-width: 180px; } }
