/* Perpustakaan Digital — public catalogue (OPAC).
   Reuses the design tokens from styles.css; adds nothing to the palette. */

/* ── Collection statistics strip ────────────────────────────────────────── */
.opac-stat {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  padding: 20px 26px;
  margin-bottom: 26px;
  background: var(--surface);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-lg);
}
.opac-stat__item { display: flex; flex-direction: column; }
.opac-stat__n {
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.1;
  color: var(--c-primary);
}
.opac-stat__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-ink-soft);
}

/* ── Search bar ─────────────────────────────────────────────────────────── */
.opac-search {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.opac-search__field {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 320px;
  padding: 0 18px;
  background: var(--surface);
  border: 1.5px solid var(--c-line-strong);
  border-radius: 999px;
  color: var(--c-ink-soft);
}
.opac-search__field:focus-within { border-color: var(--c-primary); }
.opac-search__field input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: var(--c-ink);
  padding: 13px 0;
}
.opac-search select {
  padding: 12px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--c-line-strong);
  background: var(--surface);
  font: inherit;
  font-size: 0.88rem;
  color: var(--c-ink);
}

/* ── Active filter chips ────────────────────────────────────────────────── */
.opac-chips { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.opac-chips__label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-ink-soft);
}
.opac-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--c-primary);
  color: var(--c-base);
}
.opac-chip:hover { background: var(--c-primary-deep); }
.opac-chip--reset { background: transparent; color: var(--c-ink-soft); border: 1.5px solid var(--c-line-strong); }
.opac-chip--reset:hover { background: transparent; border-color: var(--c-primary); color: var(--c-primary); }

/* ── Layout: facet rail + results ───────────────────────────────────────── */
.opac-layout { display: grid; grid-template-columns: 250px 1fr; gap: 36px; align-items: start; }

/* htmx scrolls the swapped body into view; keep it clear of the sticky nav. */
#katalog-body { scroll-margin-top: 96px; }

/* The facet panel is a <details>: always open beside the results, foldable
   above them on a narrow screen. */
.opac-facets__toggle { display: none; list-style: none; }

.opac-facet { margin-bottom: 26px; }
.opac-facet__title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-ink-soft);
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-line);
}
.opac-facet__opt {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--c-ink);
}
.opac-facet__opt:hover { color: var(--c-primary); }
.opac-facet__opt.is-active { color: var(--c-primary); font-weight: 700; }
.opac-facet__opt.is-active::before { content: "✓ "; }
.opac-facet__n { color: var(--c-ink-soft); font-size: 0.8rem; }

/* ── Result rows ────────────────────────────────────────────────────────── */
.opac-count { font-size: 0.85rem; color: var(--c-ink-soft); margin: 0 0 14px; }
.opac-item {
  display: flex;
  gap: 20px;
  padding: 18px;
  margin-bottom: 14px;
  background: var(--surface);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-lg);
  transition: border-color .2s, transform .2s;
}
.opac-item:hover { border-color: var(--c-primary); transform: translateY(-2px); }
.opac-item__cover {
  flex: 0 0 84px;
  width: 84px;
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--c-base-deep);
}
.opac-item__cover img { width: 100%; height: 100%; object-fit: cover; }
.opac-item__initial {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--c-primary-deep);
  opacity: 0.55;
}
.opac-item__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.opac-item__title { font-family: var(--font-display); font-size: 1.2rem; line-height: 1.25; margin: 0; }
.opac-item__title a:hover { color: var(--c-primary); }
.opac-item__author { font-size: 0.92rem; color: var(--c-ink); margin: 0; }
.opac-item__imprint { font-size: 0.82rem; color: var(--c-ink-soft); margin: 0; }
.opac-item__call {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border-radius: var(--r-sm);
  background: var(--c-base-deep);
  font-size: 0.75rem;
}
.opac-item__flags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
/* Why a search result matched, when the row does not show it (Subjek, ISBN, synopsis). */
.opac-item__cocok { font-size: 0.8rem; color: var(--c-ink-soft); margin: 2px 0 4px; }

/* ── Badges and flags ───────────────────────────────────────────────────── */
.opac-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.85rem;
  font-weight: 700;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--c-primary);
}
.opac-badge[data-hint="maroon"] { background: var(--c-primary); }
.opac-badge[data-hint="gold"]   { background: var(--c-accent); color: var(--c-ink); }
.opac-badge[data-hint="green"]  { background: #2f7d54; }
.opac-badge[data-hint="blue"]   { background: #2c5d8f; }
.opac-badge[data-hint="teal"]   { background: #1f7a78; }
.opac-badge[data-hint="purple"] { background: #6a4a86; }
.opac-badge[data-hint="gray"]   { background: #6b6b6b; }

.opac-flag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  background: var(--c-base-deep);
  color: var(--c-ink-soft);
}
.opac-flag--digital { background: var(--c-accent-soft); color: var(--c-primary-deep); }
.opac-flag.is-ok { background: rgba(47, 125, 84, 0.14); color: #1f5c3b; }
.opac-flag.is-out { background: rgba(155, 60, 60, 0.12); color: #8c3b3b; }

.opac-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--c-ink-soft);
  background: var(--surface);
  border: 1px dashed var(--c-line-strong);
  border-radius: var(--r-lg);
}
.opac-empty p { margin: 0 0 16px; }

/* ── Detail page ────────────────────────────────────────────────────────── */
.opac-detail { display: grid; grid-template-columns: 280px 1fr; gap: 44px; align-items: start; }
.opac-detail__cover {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: var(--c-base-deep);
}
.opac-detail__cover img { width: 100%; height: 100%; object-fit: cover; }
.opac-detail__cover .opac-item__initial { font-size: 4rem; }
.opac-akses { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.opac-akses .btn { justify-content: center; }
.opac-akses__note { font-size: 0.8rem; color: var(--c-ink-soft); margin: 0; }

/* The detail hero holds the page's one title, which can be long; a smaller size
   than other page heads keeps it to a few lines. */
.page-head--koleksi { padding-block: clamp(40px, 5vw, 64px); }
.page-head--koleksi .page-head__title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); line-height: 1.12; margin-bottom: 0; }

a.opac-badge:hover { filter: brightness(1.12); }
.opac-detail__author { font-size: 1.05rem; color: var(--c-ink); margin: 12px 0 18px; }
.opac-detail__author a { color: inherit; text-decoration: underline; text-decoration-color: var(--c-line-strong); text-underline-offset: 3px; }
.opac-detail__author a:hover { color: var(--c-primary); text-decoration-color: currentColor; }

/* Where to find a copy today — first thing under the author. */
.opac-temukan {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  padding: 14px 18px;
  margin: 0 0 24px;
  background: var(--surface);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-lg);
}
.opac-temukan .opac-flag { font-size: 0.85rem; padding: 4px 10px; }
.opac-temukan__info { display: flex; flex-wrap: wrap; gap: 6px 24px; margin: 0; }
.opac-temukan__info div { display: flex; gap: 8px; align-items: baseline; }
.opac-temukan__info dt {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-ink-soft);
}
.opac-temukan__info dd { margin: 0; font-weight: 600; }
.opac-temukan__note { flex-basis: 100%; margin: 0; font-size: 0.82rem; color: var(--c-ink-soft); }
.opac-detail__sinopsis { color: var(--c-ink-soft); margin: 0 0 28px; }
.opac-detail__heading {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--c-primary-deep);
  margin: 32px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--c-line);
}

.opac-biblio { display: grid; grid-template-columns: 180px 1fr; gap: 0; margin: 0; }
.opac-biblio dt {
  padding: 10px 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-ink-soft);
  border-bottom: 1px solid var(--c-line);
}
.opac-biblio dd { padding: 10px 0; margin: 0; border-bottom: 1px solid var(--c-line); }
.opac-biblio__subjek { display: flex; gap: 8px; flex-wrap: wrap; }
.opac-biblio__subjek a { color: var(--c-primary); font-weight: 600; }
.opac-biblio__subjek a:hover { text-decoration: underline; }

.opac-eksemplar { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.opac-eksemplar th {
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-ink-soft);
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--c-line-strong);
}
.opac-eksemplar td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--c-line); }
.opac-status { display: inline-block; line-height: 1.35; font-weight: 600; font-size: 0.82rem; padding: 3px 10px; border-radius: var(--r-sm); background: var(--c-base-deep); color: var(--c-ink-soft); }
.opac-status--tersedia { background: rgba(47, 125, 84, 0.14); color: #1f5c3b; }
.opac-status--dipinjam { background: rgba(155, 60, 60, 0.12); color: #8c3b3b; }
.opac-status--referensi { background: var(--c-accent-soft); color: var(--c-primary-deep); }
.opac-note { font-size: 0.82rem; color: var(--c-ink-soft); margin-top: 12px; }

.opac-status-ringkas {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 0;
  margin: 0 0 12px;
  font-size: 0.9rem;
}
.opac-eksemplar-semua > summary {
  cursor: pointer;
  color: var(--c-primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.opac-back { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 48px; }
.opac-back a { color: var(--c-primary); font-weight: 600; }

.opac-serupa { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.opac-serupa__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--surface);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-lg);
}
.opac-serupa__item:hover { border-color: var(--c-primary); }
.opac-serupa__title { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25; }
.opac-serupa__author { font-size: 0.82rem; color: var(--c-ink-soft); }

/* ── Reader ─────────────────────────────────────────────────────────────── */
.opac-reader__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.opac-reader__back { font-weight: 600; color: var(--c-primary); }
.opac-reader {
  width: 100%;
  height: 80vh;
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

@media (max-width: 900px) {
  .opac-layout { grid-template-columns: 1fr; gap: 24px; }
  .opac-facets__toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--surface);
    border: 1.5px solid var(--c-line);
    border-radius: var(--r-lg);
    font-weight: 600;
    font-size: 0.9rem;
  }
  .opac-facets__toggle::-webkit-details-marker { display: none; }
  .opac-facets__toggle::after { content: "+"; font-size: 1.2rem; line-height: 1; color: var(--c-primary); }
  .opac-facets__panel[open] > .opac-facets__toggle::after { content: "−"; }
  .opac-facets__panel[open] > .opac-facets__toggle { margin-bottom: 18px; }
  .opac-detail { grid-template-columns: 1fr; gap: 28px; }
  /* A phone shows the cover small, beside the read/download buttons, so the
     first screen reaches the catalogue record instead of a placeholder. */
  .opac-detail__side {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 16px;
    align-items: start;
  }
  .opac-detail__cover .opac-item__initial { font-size: 2.2rem; }
  .opac-detail__side .opac-akses { margin-top: 0; }
  .opac-serupa { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .opac-stat { gap: 24px; }
  .opac-item { flex-direction: column; }
  .opac-item__cover { width: 72px; height: 100px; flex: none; }
  .opac-biblio { grid-template-columns: 1fr; }
  .opac-biblio dt { padding-bottom: 0; border-bottom: 0; }
}

/* ── Surface tabs (katalog · koleksi digital · statistik) ───────────────── */
.opac-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.opac-tab {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--c-line-strong);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-ink);
  transition: border-color .15s, color .15s, background .15s;
}
.opac-tab:hover { border-color: var(--c-primary); color: var(--c-primary); }
.opac-tab.is-active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-base);
}

/* ── Charts ─────────────────────────────────────────────────────────────
   One hue for every mark. Identity is carried by the label beside or under a
   mark, never by colour alone, so the page keeps working in print, in forced
   colours, and for a reader with colour vision deficiency. The hue is the brand
   token, so all five site palettes theme these charts for free. */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 26px;
}
.chart {
  margin: 0;
  padding: 22px 24px 18px;
  background: var(--surface);
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-lg);
}
.chart__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--c-primary-deep);
  margin: 0 0 4px;
}
.chart__note { font-size: 0.78rem; color: var(--c-ink-soft); margin: 0 0 18px; }
.chart figcaption { display: block; }
.chart__empty { font-size: 0.88rem; color: var(--c-ink-soft); margin: 8px 0 0; }

/* Column chart — bars sit on the baseline, 4px rounded at the data end. */
.chart__cols {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 170px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--c-line);
}
.chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
  min-width: 0;
}
/* The bar owns the full track height, so 100% is the same height in every
   column. The peak label sits above the bar, inside the track's top padding —
   in the flow it would take height from the tallest bar only. */
.chart__track {
  flex: 1 1 0;
  min-height: 0;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 18px;
}
.chart__peak {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--c-ink);
  white-space: nowrap;
}
.chart__bar {
  position: relative;
  flex: none;
  width: 100%;
  max-width: 26px;
  background: var(--c-primary);
  border-radius: 4px 4px 0 0;
  transition: opacity .15s;
}
.chart__col:hover .chart__bar { opacity: 0.78; }
.chart__x {
  font-size: 0.68rem;
  color: var(--c-ink-soft);
  white-space: nowrap;
  margin-top: 2px;
}

.chart__data { margin-top: 14px; font-size: 0.82rem; }
.chart__data summary { cursor: pointer; color: var(--c-primary); font-weight: 600; }
.chart__data table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.chart__data th {
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--c-ink-soft);
  padding: 6px 8px 6px 0;
  border-bottom: 1px solid var(--c-line-strong);
}
.chart__data td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--c-line); }

/* Composition bars — label, bar and number on one line, so the chart is also
   its own table. */
.bars { display: flex; flex-direction: column; gap: 10px; }
.bars__row {
  display: grid;
  grid-template-columns: minmax(90px, 34%) 1fr auto;
  align-items: center;
  gap: 12px;
}
.bars__label { font-size: 0.86rem; color: var(--c-ink); }
.bars__track {
  height: 10px;
  border-radius: 4px;
  background: var(--c-base-deep);
  overflow: hidden;
}
.bars__fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: 4px;
  background: var(--c-primary);
}
.bars__value { font-size: 0.84rem; font-weight: 600; color: var(--c-ink); white-space: nowrap; }
.bars__value em {
  font-style: normal;
  font-weight: 500;
  font-size: 0.74rem;
  color: var(--c-ink-soft);
  margin-left: 6px;
}

@media (max-width: 900px) {
  .chart-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .chart__cols { height: 140px; gap: 3px; }
  .chart__x { font-size: 0.6rem; }
  .bars__row { grid-template-columns: minmax(80px, 40%) 1fr auto; gap: 8px; }
}

/* ══ Ramah layout ════════════════════════════════════════════════════════
   Positions that differ from the MA Plus catalogue: numbers as tiles beside
   the tabs, a large centered search, the filter rail on the RIGHT, results as
   a grid of upright book cards, and the detail page's cover column on the
   right. Later rules here override the ones above. */

.opac-top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 28px;
}
.opac-top .opac-tabs { order: 2; margin: 0; padding: 6px; background: var(--surface); border-radius: var(--r-pill); }
.opac-tab { border: 0; min-height: 44px; display: inline-flex; align-items: center; }
.opac-tab.is-active { color: var(--c-on-dark); }
.opac-top .opac-stat { order: 1; margin: 0; padding: 0; gap: 12px; background: none; border: 0; border-radius: 0; }
.opac-stat__item {
  min-width: 120px;
  padding: 14px 20px;
  border-radius: var(--r-lg);
  background: var(--p1-bg); color: var(--p1-fg);
}
.opac-stat__item:nth-child(2) { background: var(--p2-bg); color: var(--p2-fg); }
.opac-stat__item:nth-child(3) { background: var(--p3-bg); color: var(--p3-fg); }
.opac-stat__n { color: inherit; font-weight: 700; font-size: 2rem; }
.opac-stat__label { color: inherit; font-weight: 500; }

.opac-search { justify-content: center; max-width: 900px; margin: 0 auto 26px; }
.opac-search__field { border: 0; min-height: 60px; box-shadow: var(--shadow-soft); }
.opac-search__field:focus-within { box-shadow: 0 0 0 3px var(--c-primary); }
.opac-search__field input { font-size: 1.05rem; }
.opac-search select { border: 0; min-height: 60px; box-shadow: var(--shadow-soft); }
.opac-search .btn { min-height: 60px; padding-inline: 32px; }
.opac-chips { justify-content: center; }
.opac-chip { color: var(--c-on-dark); }
.opac-chip--reset { border: 0; background: var(--surface); }

.opac-layout { grid-template-columns: minmax(0, 1fr) 260px; }
/* Not sticky: the facet lists can be taller than the screen, and a sticky card
   would then need its own scrollbar. */
.opac-facets { order: 2; }
.opac-facets__panel { background: var(--surface); border-radius: var(--r-xl); padding: 20px; }
.opac-facet:last-child { margin-bottom: 0; }
.opac-facet__title { border-bottom: 0; padding: 0; color: var(--c-ink); font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.opac-facet__opt { padding: 7px 12px; border-radius: var(--r-pill); }
.opac-facet__opt:hover { background: var(--c-base); }
.opac-facet__opt.is-active { background: var(--c-primary); color: var(--c-on-dark); }
.opac-facet__opt.is-active .opac-facet__n { color: var(--c-on-dark-soft); }
.opac-facet__opt.is-active::before { content: none; }

.opac-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-content: start; }
.opac-results > .opac-count,
.opac-results > .opac-empty,
.opac-results > .berita-pagination { grid-column: 1 / -1; }
.opac-count { margin: 0; }
.opac-item {
  flex-direction: column; gap: 14px;
  margin: 0;
  padding: 12px 12px 20px;
  border: 0;
  border-radius: var(--r-xl);
}
.opac-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.opac-item__cover { width: 100%; height: auto; flex: none; aspect-ratio: 3 / 4; border-radius: var(--r-lg); background: var(--p4-bg); }
.opac-item:nth-of-type(4n+2) .opac-item__cover { background: var(--p2-bg); }
.opac-item:nth-of-type(4n+3) .opac-item__cover { background: var(--p1-bg); }
.opac-item:nth-of-type(4n+4) .opac-item__cover { background: var(--p3-bg); }
.opac-item__initial { font-size: 3.4rem; opacity: 0.5; color: var(--c-ink); }
.opac-item__body { padding: 0 6px; }
.opac-item__title { font-weight: 600; font-size: 1.1rem; }
.opac-badge { font-size: 0.75rem; font-weight: 600; }
.opac-flag { border-radius: var(--r-pill); }
.opac-empty { border: 0; border-radius: var(--r-xl); }

/* Detail: record on the left, cover and actions stick on the right. */
.opac-detail { grid-template-columns: minmax(0, 1fr) 300px; }
.opac-detail__side { order: 2; position: sticky; top: 100px; background: var(--surface); border-radius: var(--r-xl); padding: 16px; }
.opac-detail__cover { border-radius: var(--r-lg); background: var(--p4-bg); }
.opac-detail__main { background: var(--surface); border-radius: var(--r-xl); padding: clamp(22px, 3.4vw, 40px); }
.opac-temukan { border: 0; background: var(--p1-bg); border-radius: var(--r-lg); }
.opac-detail__heading { border-bottom: 0; padding: 0; color: var(--c-ink); font-weight: 600; }
.opac-biblio { background: var(--c-base); border-radius: var(--r-lg); padding: 6px 18px; }
.opac-biblio dt, .opac-biblio dd { border-bottom-color: var(--surface); }
.opac-serupa__item { border: 0; background: var(--c-base); border-radius: var(--r-lg); }
.opac-serupa__item:hover { background: var(--p1-bg); }
.opac-status { border-radius: var(--r-pill); }
.opac-reader { border: 0; border-radius: var(--r-xl); }

/* Statistik charts */
.chart { border: 0; border-radius: var(--r-xl); padding: 26px 28px 22px; }
.chart__title { color: var(--c-ink); font-weight: 600; }
.chart__bar { border-radius: 8px 8px 0 0; }
.bars__track { height: 12px; border-radius: var(--r-pill); background: var(--c-base); }
.bars__fill { border-radius: var(--r-pill); }

@media (max-width: 1100px) {
  .opac-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .opac-layout, .opac-detail { grid-template-columns: minmax(0, 1fr); }
  .opac-facets { order: 0; }
  .opac-facets__toggle { border: 0; }
  .opac-detail__side { order: 0; position: static; }
  .opac-top { justify-content: center; }
  .opac-top .opac-tabs { order: 0; }
}
@media (max-width: 520px) {
  .opac-results { gap: 10px; }
  .opac-item { padding: 8px 8px 14px; }
  .opac-item__cover { width: 100%; height: auto; }
  .opac-item__title { font-size: 1rem; }
  .opac-stat__item { min-width: 0; flex: 1; padding: 12px 14px; }
  .opac-search .btn, .opac-search select { flex: 1; }
}
