/* One Beautiful Future — Portal
 *
 * Ontwerp-systeem overgenomen uit Studio OBF (ThemeManager): dezelfde kleuren,
 * hoeken en rustige uitstraling, nu als CSS-variabelen. Licht is standaard;
 * donker volgt het systeem én een handmatige keuze. Alle richtingsgevoelige
 * opmaak gebruikt logische eigenschappen, zodat RTL (Arabisch) vanzelf klopt.
 */

/* ---- Ontwerp-tokens (bron: Studio OBF ThemeManager) ------------------- */
:root {
  --obf-bg: #f2f3f5;
  --obf-surface: #ffffff;
  --obf-surface-alt: #e5e7eb;
  --obf-primary: #2563eb;
  --obf-primary-hover: #1d4ed8;
  --obf-on-primary: #ffffff;
  --obf-text: #1a1d21;
  --obf-text-muted: #5f6368;

  --obf-radius-card: 12px;
  --obf-radius-control: 8px;
  --obf-radius-button: 6px;

  --obf-pad-page: 32px;
  --obf-pad-card: 20px;
  --obf-gap: 24px;

  --obf-maxw: 1200px;
  --obf-font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --obf-shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 8px 24px rgba(0, 0, 0, .05);
  --obf-ring: 3px solid var(--obf-primary);
  --obf-dur: .5s;
}

/* ---- Basis ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

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

/* Sticky-footer page-shell: één mechanisme voor alle pagina's, zodat de
 * footer bij korte content netjes onderaan blijft en bij lange content
 * gewoon na de inhoud volgt — geen per-pagina hoogte-hacks meer nodig. */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--obf-font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--obf-text);
  background: var(--obf-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* nooit een horizontale scrollbar */
}
body > main { flex: 1 0 auto; min-width: 0; }
body > .site-header, body > .site-footer { flex: none; }
/* De header krimpt netjes: de merknaam mag desnoods inkorten i.p.v. de
 * acties (zoeken/taal/thema) van het scherm te duwen. */
.site-header .container { flex-wrap: nowrap; }
.brand { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

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

/* Zorg dat het hidden-attribuut altijd wint, ook van componentregels die zelf
 * een display zetten (bijv. de werkbalk en de sorteerkeuze). */
[hidden] { display: none !important; }

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

/* Rustige, subtiele focus — altijd zichtbaar voor toetsenbordgebruikers. */
:focus-visible { outline: var(--obf-ring); outline-offset: 3px; border-radius: var(--obf-radius-button); }

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

/* Sla-over-link — eerste tabstop. */
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--obf-surface); color: var(--obf-text);
  padding: 10px 16px; border-radius: var(--obf-radius-button);
  box-shadow: var(--obf-shadow); transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%; max-width: var(--obf-maxw); margin-inline: auto;
  padding-inline: var(--obf-pad-page);
}

/* ---- Header ----------------------------------------------------------- */
body .site-header {
  border-bottom: 1px solid var(--obf-gold-soft);
  background: color-mix(in srgb, var(--obf-cream) 98%, transparent);
}
.site-header .container {
  display: flex; align-items: center; gap: var(--obf-gap);
  min-height: 72px;
}
.brand {
  font-size: 1.15rem; font-weight: 700; letter-spacing: .2px;
  margin-inline-end: auto; white-space: nowrap;
}
.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-button, .lang-current {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; min-width: 54px; padding: 0 12px;
  border: 1px solid var(--obf-surface-alt); border-radius: var(--obf-radius-control);
  background: var(--obf-surface); color: var(--obf-text);
  font: inherit; font-size: .95rem; cursor: pointer;
  transition: background var(--obf-dur) ease, border-color var(--obf-dur) ease;
}
.icon-button:hover, .lang-current:hover { background: var(--obf-surface-alt); }
.icon-button svg { width: 20px; height: 20px; }

/* Taalwisselaar (details/summary — werkt zonder JS). */
.lang { position: relative; }
.lang > summary { list-style: none; }
.lang > summary::-webkit-details-marker { display: none; }
.lang-current > span[aria-hidden="true"]:first-child {
  position: relative; display: block; flex: 0 0 auto;
  width: 34px; height: 34px; overflow: visible; font-size: 0;
}
.lang-current > span[aria-hidden="true"]:first-child::before,
.lang-current > span[aria-hidden="true"]:first-child::after {
  position: absolute; display: grid; width: 23px; height: 21px;
  place-items: center; border-radius: 6px; font-family: Arial, "Noto Sans", sans-serif;
  font-weight: 800; line-height: 1; box-sizing: border-box;
}
.lang-current > span[aria-hidden="true"]:first-child::before {
  content: "文"; inset: 0 0 auto auto; background: #2f7268; color: #fff;
  font-size: 12px;
}
.lang-current > span[aria-hidden="true"]:first-child::after {
  content: "A"; inset: auto auto 0 0; background: #e0ab42; color: #173f3a;
  font-size: 14px;
}
.lang-menu {
  position: absolute; inset-inline-end: 0; margin-top: 6px; z-index: 30;
  width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 520px);
  overflow-y: auto; overscroll-behavior: contain; padding: 8px;
  background: var(--obf-surface); border: 1px solid var(--obf-surface-alt);
  border-radius: var(--obf-radius-control); box-shadow: var(--obf-shadow);
}
.lang-menu a {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 0; padding: 10px 12px;
  border-radius: var(--obf-radius-button); direction: ltr; text-align: start;
}
.lang-menu a:hover, .lang-menu a[aria-current="true"] { background: var(--obf-surface-alt); }
.lang-check { display: inline-block; width: 1.25em; color: var(--obf-gold); font-weight: 700; }
.lang-native { font-weight: 600; }
.lang-english { color: var(--obf-ink-soft); font-weight: 400; }
.lang-separator { margin-inline: .22em; }

/* ---- Hero ------------------------------------------------------------- */
.hero {
  position: relative; width: 100%;
  aspect-ratio: 16 / 6; min-height: 340px; max-height: 72vh;
  overflow: hidden; background: var(--obf-surface-alt);
}
.hero img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%;
  opacity: 0; transform: scale(1.02);
  transition: opacity 1.1s ease, transform 6s ease;
}
.hero img.is-loaded { opacity: 1; transform: scale(1); }

/* ---- Slogan ----------------------------------------------------------- */
.slogan {
  text-align: center; margin: 0; padding: clamp(40px, 7vw, 88px) 0 8px;
  font-size: clamp(1.6rem, 3.6vw, 2.6rem); font-weight: 700; line-height: 1.2;
}

/* ---- Categoriekaarten ------------------------------------------------- */
.categories { padding: clamp(32px, 6vw, 64px) 0; }
.category-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--obf-gap);
  grid-template-columns: repeat(4, 1fr);
}
.category-card {
  display: flex; flex-direction: column;
  background: var(--obf-surface); border-radius: var(--obf-radius-card);
  overflow: hidden; box-shadow: var(--obf-shadow);
  transition: transform var(--obf-dur) ease, box-shadow var(--obf-dur) ease;
}
.category-card:hover, .category-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.10);
}
.category-media {
  aspect-ratio: 4 / 5; background: var(--obf-surface-alt); overflow: hidden;
}
.category-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.category-body {
  display: flex; align-items: center; gap: 12px;
  padding: var(--obf-pad-card);
}
.category-icon { font-size: 1.6rem; line-height: 1; }
.category-title { font-size: 1.25rem; font-weight: 700; margin: 0; }

/* ---- Curator's Choice ------------------------------------------------- */
.curators-choice { padding: 0 0 clamp(48px, 8vw, 96px); }
.cc-eyebrow {
  text-align: center; color: var(--obf-text-muted);
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
  margin: 0 0 16px;
}
.cc-card {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(24px, 4vw, 48px);
  background: var(--obf-surface); border-radius: var(--obf-radius-card);
  overflow: hidden; box-shadow: var(--obf-shadow);
}
.cc-media { aspect-ratio: 4 / 3; background: var(--obf-surface-alt); }
.cc-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.cc-body { padding: clamp(24px, 4vw, 48px); }
.cc-title { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0 0 12px; line-height: 1.2; }
.cc-desc { color: var(--obf-text-muted); margin: 0 0 24px; }
.button-primary {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px;
  background: var(--obf-primary); color: var(--obf-on-primary);
  border-radius: var(--obf-radius-button); font-weight: 600;
  transition: background var(--obf-dur) ease;
}
.button-primary:hover { background: var(--obf-primary-hover); }

/* ---- Footer ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--obf-surface-alt);
  color: var(--obf-text-muted); font-size: .9rem;
}
.site-footer .container {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px;
  min-height: 64px;
}
.site-footer .sep { opacity: .5; }
.site-footer a:hover { color: var(--obf-text); text-decoration: underline; }

/* ---- Zachte binnenkomst ----------------------------------------------
 * Puur CSS en nooit blokkerend: de inhoud is standaard zichtbaar en de
 * animatie eindigt altijd zichtbaar (animation-fill-mode: both). Zo kan een
 * gemiste of uitgeschakelde animatie inhoud nooit verbergen — ook niet zonder
 * JavaScript. Draait alleen als de bezoeker beweging toestaat. */
@media (prefers-reduced-motion: no-preference) {
  [data-animate] { animation: obf-in .7s ease both; }
  @keyframes obf-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .hero img { opacity: 1; transform: none; }
}

/* ---- Responsief ------------------------------------------------------- */
@media (max-width: 900px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .cc-card { grid-template-columns: 1fr; }
  .cc-media { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  :root { --obf-pad-page: 20px; --obf-gap: 16px; }
  body { font-size: 17px; }
  .category-grid { grid-template-columns: 1fr; }
  .brand { font-size: 1.05rem; }
  .hero { min-height: 240px; aspect-ratio: 4 / 3; }
  /* Compacte taalkeuze op smalle schermen: het "Language"-label verdwijnt
   * (de toegankelijke naam blijft via aria-label op de knop), maar de
   * gekozen taalnaam zelf blijft altijd volledig zichtbaar — nooit
   * afgekapt of met ellipsis, ook niet voor langere namen zoals
   * "Македонски" of "Українська". */
  .lang-label { display: none; }
  #lang-current-name { display: inline; white-space: nowrap; }
  .site-header .container { gap: 10px; }
  .header-actions { gap: 6px; }
  .icon-button, .lang-current { padding: 0 10px; }
  .lang[open] .lang-menu {
    position: absolute; inset: auto 0 auto auto; top: calc(100% + 6px);
    width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 520px);
    margin: 0; padding: 8px; border-radius: var(--obf-radius-control); z-index: 100;
    overflow-y: auto;
  }
  html[dir="rtl"] .lang[open] .lang-menu {
    inset-inline-start: auto;
    inset-inline-end: auto;
    left: 0;
    right: auto;
  }
  .lang[open] .lang-menu a { padding: 14px 16px; font-size: 1.05rem; }
}

/* ======================================================================
 * Homepage pixel recreation (SPRINT_HOMEPAGE_PIXEL_PERFECT_RECREATION)
 * Alleen de portal-shell gebruikt deze compositie; overige pagina's blijven
 * op het bestaande presentatiecontract.
 * ==================================================================== */
html[data-page="portal"] .site-header .container {
  max-width: 1440px;
}
html[data-page="portal"] .site-header #search-link,
html[data-page="portal"] .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 400;
  letter-spacing: -.02em;
}
html[data-page="portal"] .brand::before { content: none; }
html[data-page="portal"] .brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  color: #6f8c58;
}
html[data-page="portal"] .portal-intro {
  padding: clamp(22px, 2.4vw, 38px) 0 16px;
}
html[data-page="portal"] .portal-intro h1 {
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  line-height: 1.05;
}
html[data-page="portal"] .portal-intro .slogan {
  margin-top: 10px;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  color: var(--obf-ink);
}
html[data-page="portal"] .ornament-title {
  margin-top: 18px;
  width: 180px;
  height: auto;
  background: none;
}
html[data-page="portal"] .hero {
  width: min(calc(100% - 2 * var(--obf-pad-page)), 1368px);
  aspect-ratio: 3.36 / 1;
  min-height: 0;
  max-height: none;
  border-radius: 18px;
  box-shadow: 0 8px 22px rgba(38, 59, 45, .13);
}
html[data-page="portal"] .hero img {
  object-position: center center;
}
html[data-page="portal"] .home-decor {
  position: absolute;
  inset: 78px 0 auto;
  height: 650px;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
html[data-page="portal"] { overflow-x: hidden; }
html[data-page="portal"] .home-corner {
  position: absolute;
  width: clamp(260px, 28vw, 410px);
  height: auto;
  opacity: .72;
  mix-blend-mode: normal;
}
html[data-page="portal"] .home-corner-left { inset-inline-start: -22px; top: 0; width: clamp(220px, 24vw, 350px); }
html[data-page="portal"] .home-corner-right { inset-inline-end: -22px; top: 0; }
html[data-page="portal"] .home-butterfly {
  position: absolute;
  width: clamp(64px, 7vw, 106px);
  height: auto;
  opacity: .96;
  mix-blend-mode: normal;
}
html[data-page="portal"] .home-butterfly-01 { inset-inline-start: 18%; top: 70px; transform: rotate(-10deg); }
html[data-page="portal"] .home-butterfly-02 { inset-inline-end: 24%; top: 116px; transform: rotate(8deg); }
html[data-page="portal"] .home-butterfly-03 { inset-inline-start: 8%; top: 280px; transform: rotate(14deg); }
html[data-page="portal"] .home-butterfly-04 { inset-inline-end: 8%; top: 300px; transform: rotate(-12deg); }
/* RTL mirrors the homepage artwork as well as its logical positions. */
html[dir="rtl"][data-page="portal"] .home-corner,
html[dir="rtl"][data-page="portal"] .category-decoration {
  transform: scaleX(-1);
}
html[dir="rtl"][data-page="portal"] .home-butterfly-01 { transform: scaleX(-1) rotate(10deg); }
html[dir="rtl"][data-page="portal"] .home-butterfly-02 { transform: scaleX(-1) rotate(-8deg); }
html[dir="rtl"][data-page="portal"] .home-butterfly-03 { transform: scaleX(-1) rotate(-14deg); }
html[dir="rtl"][data-page="portal"] .home-butterfly-04 { transform: scaleX(-1) rotate(12deg); }
html[data-page="portal"] main > .container,
html[data-page="portal"] main > .hero,
html[data-page="portal"] main > .categories,
html[data-page="portal"] .categories > .container {
  position: relative;
  z-index: 1;
}
html[data-page="portal"] main > .container,
html[data-page="portal"] .categories > .container {
  width: min(calc(100% - 2 * var(--obf-pad-page)), 1368px);
  max-width: 1368px;
}
html[data-page="portal"] .categories > .container { padding-inline: 0; }
html[data-page="portal"] .categories {
  padding: 24px 0 42px;
}
html[data-page="portal"] .category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  max-width: none;
  margin-inline: 0;
  gap: 16px;
}
html[data-page="portal"] .category-grid > li {
  min-width: 0;
}
html[data-page="portal"] .category-card {
  min-height: 194px;
  justify-content: center;
  border-radius: 15px;
  background: rgba(255, 253, 248, .78);
  box-shadow: 0 5px 14px rgba(38, 59, 45, .11);
}
html[data-page="portal"] .category-body {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 5px;
  padding: 18px 10px 24px;
  text-align: center;
  background: none;
}
html[data-page="portal"] .category-icon {
  width: 49px;
  height: 49px;
  object-fit: contain;
  color: var(--obf-ink);
  line-height: 1.1;
  margin-bottom: 5px;
}
html[data-page="portal"] .category-title {
  font-size: 1.35rem;
}
html[data-page="portal"] .category-subtitle {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .98rem;
  line-height: 1.25;
}
html[data-page="portal"] .category-decoration {
  position: absolute;
  width: 48%;
  height: auto;
  bottom: -18px;
  object-fit: contain;
  object-position: center bottom;
  opacity: 1;
  mix-blend-mode: normal;
  pointer-events: none;
  z-index: 0;
}
html[data-page="portal"] .category-grid > li:nth-child(1) .category-decoration,
html[data-page="portal"] .category-grid > li:nth-child(3) .category-decoration,
html[data-page="portal"] .category-grid > li:nth-child(5) .category-decoration {
  inset-inline-start: 0;
  inset-inline-end: auto;
  object-position: left bottom;
}
html[data-page="portal"] .category-grid > li:nth-child(2) .category-decoration,
html[data-page="portal"] .category-grid > li:nth-child(4) .category-decoration,
html[data-page="portal"] .category-grid > li:nth-child(6) .category-decoration {
  inset-inline-start: auto;
  inset-inline-end: 0;
  object-position: right bottom;
}
html[data-page="portal"] .category-grid > li:nth-child(6) .category-decoration {
  inset-inline-start: 0;
  inset-inline-end: auto;
  object-position: left bottom;
}
html[data-page="portal"] .category-grid > li:nth-child(1) .category-decoration { width: 70%; }
html[data-page="portal"] .category-grid > li:nth-child(3) .category-decoration,
html[data-page="portal"] .category-grid > li:nth-child(4) .category-decoration { width: 65%; }
html[data-page="portal"] .category-body > :not(.category-decoration) { position: relative; z-index: 1; }
html[data-page="portal"] .curators-choice { display: none !important; }
html[data-page="portal"] .site-footer {
  margin-top: 0;
  border-top: 1px solid var(--obf-gold-soft);
  background: var(--obf-cream-deep);
  color: var(--obf-ink);
  overflow: hidden;
}
html[data-page="portal"] .site-footer::before { display: none; }
html[data-page="portal"] .site-footer .container {
  position: relative;
  min-height: 112px;
  justify-content: space-between;
  align-items: center;
}
html[data-page="portal"] .footer-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: var(--obf-ink);
  font-family: Georgia, "Times New Roman", serif;
}
html[data-page="portal"] .footer-ornament {
  position: absolute;
  top: -227px;
  bottom: auto;
  inset-inline-start: 50%;
  width: min(340px, 48vw);
  height: auto;
  transform: translateX(-50%);
  opacity: .58;
  mix-blend-mode: normal;
  pointer-events: none;
  display: block;
  z-index: 0;
}
html[dir="rtl"][data-page="portal"] .footer-ornament {
  transform: translateX(50%) scaleX(-1);
}
html[data-page="portal"] .footer-copy,
html[data-page="portal"] .footer-links { position: relative; z-index: 1; }
html[data-page="portal"] .footer-copy strong { font-size: 1.05rem; font-weight: 400; }
html[data-page="portal"] .footer-copy span { font-size: .86rem; opacity: .88; }
html[data-page="portal"] .footer-links { display: flex; gap: 34px; color: var(--obf-ink); }
html[data-page="portal"] .footer-links a:hover { color: var(--obf-gold); text-decoration: underline; }

/* Compactere homepage op normale desktopschermen: header, hero, intro en de
 * volledige tegelrij moeten zonder scroll passen. Alleen op desktop (tablet/
 * mobiel scrollen zoals voorheen) — vooral de witruimte tussen tegelrij en
 * footer krimpt, plus wat kleinere marges/gaps; de hero verliest alleen een
 * klein stukje van de bovenkant. */
@media (min-width: 1101px) {
  html[data-page="portal"] .portal-intro { padding: clamp(12px, 1.4vw, 22px) 0 6px; }
  html[data-page="portal"] .ornament-title { margin-top: 10px; }
  html[data-page="portal"] .portal-intro .slogan { margin-top: 6px; }
  html[data-page="portal"] .hero { aspect-ratio: 4 / 1; }
  html[data-page="portal"] .hero img { object-position: center bottom; }
  html[data-page="portal"] .categories { padding: 12px 0 8px; }
  html[data-page="portal"] .category-card { min-height: 172px; }
  html[data-page="portal"] .category-body { padding: 14px 10px 16px; gap: 4px; }
  html[data-page="portal"] .category-decoration { bottom: -14px; }
  html[data-page="portal"] .category-grid > li:nth-child(1) .category-decoration { width: 62%; }
  html[data-page="portal"] .category-grid > li:nth-child(3) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(4) .category-decoration { width: 58%; }
  html[data-page="portal"] .category-grid > li:nth-child(2) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(5) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(6) .category-decoration { width: 42%; }
  html[data-page="portal"] .site-footer .container { min-height: 88px; }
}
@media (max-width: 1100px) {
  html[data-page="portal"] .category-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: none;
  }
  html[data-page="portal"] .category-grid > li {
    flex-basis: calc((100% - 32px) / 3);
  }
  html[data-page="portal"] .category-decoration { width: 44%; height: auto; }
  html[data-page="portal"] .category-grid > li:nth-child(1) .category-decoration { width: 62%; }
  html[data-page="portal"] .category-grid > li:nth-child(3) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(4) .category-decoration { width: 58%; }
}
@media (max-width: 680px) {
  html[data-page="portal"] .category-grid {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }
  html[data-page="portal"] .category-grid > li {
    flex: 0 0 auto;
    width: 100%;
  }
  html[data-page="portal"] .hero { aspect-ratio: 16 / 9; }
  html[data-page="portal"] .home-decor { inset-block-start: 67px; height: 420px; }
  html[data-page="portal"] .home-corner { width: 220px; opacity: .68; }
  html[data-page="portal"] .home-corner-left { width: 187px; inset-inline-start: -36px; }
  html[data-page="portal"] .home-corner-right { inset-inline-end: -36px; }
  html[data-page="portal"] .home-butterfly { width: 52px; opacity: .78; }
  html[data-page="portal"] .home-butterfly-01 { inset-inline-start: 1%; top: 86px; }
  html[data-page="portal"] .home-butterfly-02 { inset-inline-end: 2%; top: 148px; }
  html[data-page="portal"] .home-butterfly-03 { inset-inline-start: 2%; top: 265px; }
  html[data-page="portal"] .home-butterfly-04 { inset-inline-end: 2%; top: 290px; }
  html[data-page="portal"] .category-decoration {
    width: 45%;
    height: auto;
    bottom: -16px;
    opacity: 1;
  }
  html[data-page="portal"] .category-grid > li:nth-child(1) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(3) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(5) .category-decoration {
    inset-inline-start: 0;
    inset-inline-end: auto;
  }
  html[data-page="portal"] .category-grid > li:nth-child(2) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(4) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(6) .category-decoration {
    inset-inline-start: auto;
    inset-inline-end: 0;
  }
  html[data-page="portal"] .category-grid > li:nth-child(1) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(3) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(5) .category-decoration {
    inset-inline-start: 0;
  }
  html[data-page="portal"] .category-grid > li:nth-child(1) .category-decoration { width: 60%; }
  html[data-page="portal"] .category-grid > li:nth-child(3) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(4) .category-decoration { width: 58%; }
  html[data-page="portal"] .category-grid > li:nth-child(6) .category-decoration {
    inset-inline-start: 0;
    inset-inline-end: auto;
    object-position: left bottom;
  }
  html[data-page="portal"] .category-grid > li:nth-child(2) .category-decoration,
  html[data-page="portal"] .category-grid > li:nth-child(5) .category-decoration {
    bottom: -7px;
  }
  html[data-page="portal"] .categories > .container { padding-inline: var(--obf-pad-page); }
  html[data-page="portal"] .brand { flex: 0 0 78px; width: 78px; font-size: .86rem; line-height: 1.05; gap: 5px; }
  html[data-page="portal"] .brand-mark { width: 31px; height: 31px; flex-basis: 31px; }
  html[data-page="portal"] .header-actions { margin-inline-start: auto; gap: 4px; flex-shrink: 1; }
  html[data-page="portal"] .icon-button,
  html[data-page="portal"] .lang-current { min-width: 34px; min-height: 38px; padding-inline: 6px; }
  html[data-page="portal"] .lang-label { font-size: .58rem; letter-spacing: .05em; }
  html[data-page="portal"] .site-footer .container { align-items: flex-start; flex-direction: column; padding-block: 24px; }
  html[data-page="portal"] .footer-ornament { width: 230px; top: -153px; bottom: auto; opacity: .7; }
}
@media (min-width: 681px) and (max-width: 820px) {
  html[data-page="portal"] .category-grid > li {
    flex-basis: calc((100% - 16px) / 2);
  }
}

/* ======================================================================
 * Categoriepagina (Sprint W4.2) — hergebruikt de tokens, header en footer.
 * ==================================================================== */

/* ---- Kruimelpad ------------------------------------------------------- */
.breadcrumb { padding-top: clamp(16px, 3vw, 28px); }
.breadcrumb ol {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  color: var(--obf-text-muted); font-size: .95rem;
}
.breadcrumb a:hover { color: var(--obf-text); text-decoration: underline; }
.breadcrumb [aria-current="page"] { color: var(--obf-text); }
.breadcrumb .sep { opacity: .5; }
[dir="rtl"] .breadcrumb .sep { display: inline-block; transform: scaleX(-1); }

/* ---- Categorie-hero + kop -------------------------------------------- */
.cat-hero {
  margin: clamp(16px, 3vw, 24px) 0 0;
  width: 100%; aspect-ratio: 16 / 6; min-height: 240px; max-height: 56vh;
  overflow: hidden; border-radius: var(--obf-radius-card);
  background: var(--obf-surface-alt);
}
.cat-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.cat-head { padding: clamp(24px, 4vw, 40px) 0 clamp(8px, 2vw, 16px); }
.cat-title { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin: 0; }
.cat-intro {
  margin: 12px 0 0; max-width: 60ch; color: var(--obf-text-muted);
  font-size: 1.05rem;
}

/* ---- Weergavekeuze (tabs) + werkbalk ---------------------------------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px var(--obf-gap);
  padding: clamp(12px, 2vw, 20px) 0 clamp(20px, 3vw, 28px);
}
.view-tabs { display: inline-flex; gap: 6px; background: var(--obf-surface-alt);
  padding: 5px; border-radius: var(--obf-radius-control); }
.view-tab {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-size: .98rem;
  min-height: 40px; padding: 0 18px; border-radius: var(--obf-radius-button);
  background: transparent; color: var(--obf-text);
}
.view-tab[aria-selected="true"] {
  background: var(--obf-surface); color: var(--obf-text); box-shadow: var(--obf-shadow);
  font-weight: 600;
}
.toolbar .spacer { margin-inline-start: auto; }
.sort { display: inline-flex; align-items: center; gap: 8px; color: var(--obf-text-muted);
  font-size: .95rem; }
.sort select {
  font: inherit; min-height: 40px; padding: 0 12px; color: var(--obf-text);
  background: var(--obf-surface); border: 1px solid var(--obf-surface-alt);
  border-radius: var(--obf-radius-control);
}

/* ---- Kaartsysteem (gedeeld met de Portal-categoriekaarten) ------------ */
.media-grid {
  list-style: none; margin: 0; padding: 0; display: grid; gap: var(--obf-gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
}
.category-card, .media-card {
  display: flex; flex-direction: column; height: 100%;
  background: var(--obf-surface); border-radius: var(--obf-radius-card);
  overflow: hidden; box-shadow: var(--obf-shadow);
  transition: transform var(--obf-dur) ease, box-shadow var(--obf-dur) ease;
}
.category-card:hover, .category-card:focus-visible,
.media-card:hover, .media-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.10);
}
.media-card-media { aspect-ratio: 4 / 3; background: var(--obf-surface-alt); overflow: hidden; }
.media-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.media-card-body { padding: var(--obf-pad-card); }
.media-card-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.media-card-desc { margin: 6px 0 0; color: var(--obf-text-muted); font-size: .95rem; }
.media-card-type { font-size: .8rem; color: var(--obf-text-muted); text-transform: uppercase;
  letter-spacing: .08em; margin: 0 0 6px; }

/* ---- Meer laden ------------------------------------------------------- */
.more-wrap { display: flex; justify-content: center; padding: clamp(28px, 5vw, 48px) 0; }
.button-secondary {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600;
  min-height: 48px; padding: 0 28px;
  background: var(--obf-surface); color: var(--obf-text);
  border: 1px solid var(--obf-surface-alt); border-radius: var(--obf-radius-button);
  transition: background var(--obf-dur) ease;
}
.button-secondary:hover { background: var(--obf-surface-alt); }

/* ---- Lege / rustige toestanden --------------------------------------- */
.empty-state {
  padding: clamp(40px, 8vw, 96px) 0; text-align: center; color: var(--obf-text-muted);
}
.empty-state .button-primary { margin-top: 20px; }

.section { padding-bottom: clamp(32px, 6vw, 64px); }

/* Botanische hoekdecoratie op categoriepagina's — hangt aan de footer zelf,
 * net als footer-bloemenrand, in plaats van aan de inhoud erboven. De
 * footer heeft altijd een vaste plek onderaan de pagina, ongeacht hoe lang
 * de kaartenlijst is; door de decoratie daaraan te verankeren (i.p.v. te
 * laten meegroeien met restruimte in main) staat hij altijd op volle,
 * ontworpen grootte direct boven de footer, zonder ooit extra scroll toe te
 * voegen of over een kaart te vallen. Welke afbeelding zichtbaar is, hangt
 * af van data-category (door category.js op <html> gezet). */
.category-decor-music, .category-decor-photos, .category-decor-videos, .category-decor-stories {
  display: none;
  position: absolute;
  bottom: 100%;
  width: auto;
  pointer-events: none;
  z-index: 0;
}
html[data-page="category"][data-category="music"] .category-decor-music {
  display: block;
  inset-inline-end: 0;
  transform: scaleX(-1);
  height: clamp(150px, 22vw, 300px);
}
html[data-page="category"][data-category="photos"] .category-decor-photos {
  display: block;
  inset-inline-start: 0;
  height: clamp(140px, 20vw, 280px);
}
html[data-page="category"][data-category="videos"] .category-decor-videos {
  display: block;
  inset-inline-start: 0;
  height: clamp(160px, 24vw, 320px);
}
html[data-page="category"][data-category="stories"] .category-decor-stories {
  display: block;
  inset-inline-start: 0;
  height: clamp(140px, 20vw, 280px);
}
@media (max-width: 560px) {
  html[data-page="category"][data-category="music"] .category-decor-music,
  html[data-page="category"][data-category="photos"] .category-decor-photos,
  html[data-page="category"][data-category="videos"] .category-decor-videos,
  html[data-page="category"][data-category="stories"] .category-decor-stories {
    display: none;
  }
}
/* RTL: logisch spiegelen zodat de plant altijd "naar binnen" oogt, ongeacht
 * de fysieke hoek waarin de leesrichting hem plaatst. */
html[dir="rtl"][data-page="category"][data-category="music"] .category-decor-music { transform: none; }
html[dir="rtl"][data-page="category"][data-category="photos"] .category-decor-photos,
html[dir="rtl"][data-page="category"][data-category="videos"] .category-decor-videos,
html[dir="rtl"][data-page="category"][data-category="stories"] .category-decor-stories {
  transform: scaleX(-1);
}

@media (max-width: 560px) {
  .media-grid { grid-template-columns: 1fr; }
  .cat-hero { min-height: 200px; aspect-ratio: 4 / 3; }
}

/* ======================================================================
 * Music page v2 — eerste implementatie van Content Page Design System v1.
 * Bewust beperkt tot de Music-categorie; gedeelde chrome en andere
 * inhoudspagina's blijven hun bestaande presentatiecontract volgen.
 * ==================================================================== */
html[data-page="category"][data-category="music"] .cat-hero {
  margin-top: clamp(28px, 5vw, 56px);
  aspect-ratio: 16 / 6.4;
  min-height: 240px;
  max-height: 52vh;
  border-radius: var(--obf-radius-card);
  box-shadow: var(--obf-shadow);
}
html[data-page="category"][data-category="music"] .cat-hero img {
  object-position: 50% 54%;
}
html[data-page="category"][data-category="music"] .cat-head {
  max-width: 720px;
  padding: clamp(36px, 5vw, 64px) 0 clamp(18px, 3vw, 28px);
}
html[data-page="category"][data-category="music"] .cat-title {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.1;
}
html[data-page="category"][data-category="music"] .cat-intro {
  max-width: 65ch;
  margin-top: 16px;
  font-size: 1.08rem;
  line-height: 1.6;
}
html[data-page="category"][data-category="music"] .toolbar {
  align-items: center;
  gap: 14px 22px;
  padding: 10px 0 22px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--obf-gold-soft);
}
html[data-page="category"][data-category="music"] .view-tabs {
  padding: 5px;
  background: color-mix(in srgb, var(--obf-cream-deep) 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--obf-gold-soft) 70%, transparent);
  border-radius: var(--obf-radius-control);
}
html[data-page="category"][data-category="music"] .view-tab {
  min-height: 42px;
  padding-inline: 20px;
}
html[data-page="category"][data-category="music"] .view-tab[aria-selected="true"] {
  background: var(--obf-white);
  box-shadow: var(--obf-shadow);
}
html[data-page="category"][data-category="music"] .sort {
  min-height: 42px;
  padding: 6px 10px 6px 14px;
  border: 1px solid color-mix(in srgb, var(--obf-gold-soft) 70%, transparent);
  border-radius: var(--obf-radius-control);
  background: color-mix(in srgb, var(--obf-white) 65%, transparent);
}
html[data-page="category"][data-category="music"] .sort select {
  min-height: 32px;
  border-color: transparent;
  background: transparent;
}
html[data-page="category"][data-category="music"] .section {
  padding-bottom: clamp(48px, 8vw, 96px);
}
html[data-page="category"][data-category="music"] .media-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 300px));
  justify-content: center;
  max-width: 1080px;
  margin-inline: auto;
  gap: clamp(18px, 2.4vw, 28px);
}
html[data-page="category"][data-category="music"] #panel:has(.media-card[href*="/albums/"]) .media-grid {
  column-gap: clamp(50px, 7vw, 80px);
  width: 90%;
  max-width: 972px;
}
html[data-page="category"][data-category="music"] .media-card {
  border: 1px solid color-mix(in srgb, var(--obf-gold) 14%, transparent);
  border-radius: var(--obf-radius-card);
  box-shadow: var(--obf-shadow);
}
html[data-page="category"][data-category="music"] .media-card-media {
  aspect-ratio: 16 / 10;
}
html[data-page="category"][data-category="music"] .media-card-body {
  padding: 19px 20px 22px;
}
html[data-page="category"][data-category="music"] .media-card-title {
  font-size: 1.35rem;
  line-height: 1.2;
}
html[data-page="category"][data-category="music"] .media-card-desc {
  max-width: 38ch;
  margin-top: 8px;
  line-height: 1.5;
}
html[data-page="category"][data-category="music"] .media-card:hover,
html[data-page="category"][data-category="music"] .media-card:focus-visible {
  box-shadow: var(--obf-shadow-hover);
}
html[data-page="category"][data-category="music"] .empty-state {
  max-width: 60ch;
  margin-inline: auto;
  padding-block: clamp(48px, 8vw, 96px);
}

@media (max-width: 820px) {
  html[data-page="category"][data-category="music"] .cat-hero {
    aspect-ratio: 16 / 9.5;
  }
  html[data-page="category"][data-category="music"] .toolbar {
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  html[data-page="category"][data-category="music"] .cat-hero {
    margin-top: 24px;
    aspect-ratio: 4 / 3.2;
    min-height: 210px;
  }
  html[data-page="category"][data-category="music"] .cat-head {
    padding-block: 30px 20px;
  }
  html[data-page="category"][data-category="music"] .cat-intro {
    font-size: 1rem;
  }
  html[data-page="category"][data-category="music"] .toolbar {
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 22px;
  }
  html[data-page="category"][data-category="music"] .view-tabs {
    width: 100%;
  }
  html[data-page="category"][data-category="music"] .view-tab {
    flex: 1 1 0;
    padding-inline: 10px;
  }
  html[data-page="category"][data-category="music"] .toolbar .spacer {
    display: none;
  }
  html[data-page="category"][data-category="music"] .sort {
    justify-content: space-between;
    width: 100%;
  }
  html[data-page="category"][data-category="music"] .sort select {
    max-width: 62%;
  }
  html[data-page="category"][data-category="music"] .media-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  html[data-page="category"][data-category="music"] #panel:has(.media-card[href*="/albums/"]) .media-grid {
    column-gap: 0;
    width: 100%;
    max-width: none;
  }
  html[data-page="category"][data-category="music"] .media-card-body {
    padding: 16px 17px 19px;
  }
}

/* ======================================================================
 * One Beautiful Future — 2026 botanical redesign
 * Centrale presentatie voor portal, categorie, album, werk en utility pages.
 * ==================================================================== */
:root {
  --obf-cream: #f7f3ea;
  --obf-cream-deep: #eee7d8;
  --obf-ink: #173c32;
  --obf-ink-soft: #53645d;
  --obf-gold: #bd8a32;
  --obf-gold-soft: #e7cf9d;
  --obf-white: #fffdf8;
  --obf-radius-card: 18px;
  --obf-radius-control: 12px;
  --obf-radius-button: 999px;
  --obf-shadow: 0 8px 24px rgba(36, 57, 45, .09);
  --obf-shadow-hover: 0 16px 34px rgba(36, 57, 45, .16);
  --obf-dur: 180ms;
  --obf-gap: clamp(16px, 2vw, 26px);
  --obf-pad-page: clamp(20px, 4vw, 52px);
  --obf-pad-card: clamp(16px, 2vw, 22px);
  --obf-content: 1240px;
  --obf-surface: var(--obf-white);
  --obf-surface-alt: var(--obf-cream-deep);
  --obf-text: var(--obf-ink);
  --obf-text-muted: var(--obf-ink-soft);
  --obf-primary: var(--obf-ink);
  --obf-primary-hover: #285b4c;
  --obf-on-primary: #fffdf8;
}

html, body { background: var(--obf-cream); color: var(--obf-ink); }
body { font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1, h2, h3, .brand, .category-title, .media-card-title, .work-title, .cat-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -.025em;
}
.container { width: min(calc(100% - 2 * var(--obf-pad-page)), var(--obf-content)); }
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--obf-cream) 98%, transparent);
  border-bottom: 1px solid var(--obf-gold-soft);
  backdrop-filter: blur(14px);
}
.site-header .container { min-height: 78px; gap: 22px; }
.brand { color: var(--obf-ink); font-size: clamp(1.2rem, 2vw, 1.65rem); white-space: nowrap; }
.brand::before { content: "❧"; color: var(--obf-gold); font-family: Georgia, serif; font-size: 1.25em; margin-inline-end: 9px; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 30px); margin-inline-start: auto; }
.main-nav a { color: var(--obf-ink); padding: 26px 0 9px; border-bottom: 2px solid transparent; font-size: .95rem; white-space: nowrap; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--obf-gold); border-bottom-color: var(--obf-gold); }
.header-actions { margin-inline-start: 0; }
.icon-button, .lang-current { color: var(--obf-ink); border-color: color-mix(in srgb, var(--obf-gold) 24%, transparent); background: color-mix(in srgb, var(--obf-white) 45%, transparent); }
.lang-current { border-color: var(--obf-gold-soft); border-width: 1px; }
.lang-current { gap: 8px; }
.lang-label { font-size: .78rem; text-transform: none; letter-spacing: normal; color: var(--obf-ink); }
.lang-current > span[aria-hidden="true"] { display: none; }
.nav-toggle { display: none; border: 1px solid var(--obf-gold-soft); background: var(--obf-white); color: var(--obf-ink); border-radius: var(--obf-radius-control); min-width: 42px; min-height: 40px; font-size: 1.2rem; }
.focus-ring:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible { outline: 3px solid var(--obf-gold); outline-offset: 3px; }

.portal-intro { text-align: center; padding: clamp(42px, 7vw, 88px) 0 24px; }
.portal-intro h1 { margin: 0; font-size: clamp(2.7rem, 7vw, 5.8rem); color: var(--obf-ink); }
.portal-intro .slogan { padding: 0; margin: 16px 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.15rem, 2.3vw, 1.65rem); font-weight: 400; }
.ornament-title, .reading p + p::before { position: relative; display: block; margin: 22px auto 0; width: 150px; height: 12px; }
.ornament-title::before, .ornament-title::after, .reading p + p::before { content: ""; position: absolute; top: 50%; width: 62px; height: 1px; background: var(--obf-gold-soft); }
.ornament-title::before { inset-inline-start: 0; }.ornament-title::after { inset-inline-end: 0; }
.ornament-title { background: radial-gradient(ellipse at center, var(--obf-gold) 0 4px, transparent 5px); }
.hero { width: min(calc(100% - 2 * var(--obf-pad-page)), 1240px); margin: 0 auto; aspect-ratio: 16 / 6.5; min-height: 260px; border-radius: var(--obf-radius-card); box-shadow: var(--obf-shadow); }
.hero img { object-position: center; }
.categories { padding: clamp(26px, 4vw, 46px) 0; }
.category-grid { grid-template-columns: repeat(4, 1fr); gap: var(--obf-gap); }
.category-card { position: relative; min-height: 170px; justify-content: flex-end; background: var(--obf-white); border: 1px solid color-mix(in srgb, var(--obf-gold) 16%, transparent); box-shadow: var(--obf-shadow); }
.category-card:hover, .category-card:focus-visible, .media-card:hover, .media-card:focus-visible { transform: translateY(-4px); box-shadow: var(--obf-shadow-hover); }
.category-media { position: absolute; inset: 0; opacity: .18; aspect-ratio: auto; }
.category-media img { object-position: center; }
.category-body { position: relative; z-index: 1; display: block; padding: 20px; background: linear-gradient(transparent, rgba(255,253,248,.96) 35%); }
.category-icon { display: block; color: var(--obf-gold); font-size: 1.8rem; margin-bottom: 8px; }
.category-title { font-size: 1.45rem; margin: 0; }
.curators-choice { padding-bottom: clamp(40px, 7vw, 84px); }
.cc-card { border: 1px solid color-mix(in srgb, var(--obf-gold) 16%, transparent); box-shadow: var(--obf-shadow); }
.site-footer { position: relative; margin-top: clamp(50px, 8vw, 110px); border-top: 1px solid var(--obf-gold-soft); background: var(--obf-cream-deep); color: var(--obf-ink); }
.site-footer .container { position: relative; z-index: 1; min-height: 118px; padding-block: 24px; }
.site-footer a { color: var(--obf-ink); }

/* Botanische footerrand — exact half over de footer, half over de inhoud
 * erboven. De hoogte volgt dezelfde clamp als .site-footer's margin-top
 * (× 2, verticaal gecentreerd op de rand), zodat de bovenste helft per
 * definitie binnen die lege marge blijft en nooit over tekst of knoppen
 * heen valt. Staat achter de footerinhoud (z-index 0 vs. 1). */
.footer-bloemenrand {
  position: absolute;
  top: 0;
  inset-inline-start: 50%;
  transform: translate(-50%, -58%);
  height: clamp(150px, 22vw, 300px);
  width: auto;
  max-width: min(92vw, 780px);
  object-fit: contain;
  pointer-events: none;
  z-index: 0;
}
/* inset-inline-start:50% anchort in RTL vanaf rechts, dus translateX(-50%)
 * verdubbelt de verschuiving naar links i.p.v. te centreren — spiegel het
 * teken zodat de rand ook in RTL exact gecentreerd blijft. */
html[dir="rtl"] .footer-bloemenrand {
  transform: translate(50%, -58%);
}
/* Uitgeschakeld: de Portal-footer (homepage) is de vastgelegde visuele
 * referentie voor footerhoogte en toont deze regel niet. Om de footer op
 * alle pagina's even hoog te houden, blijft deze pseudo-content overal
 * verborgen in plaats van alleen op de Portal. */
.site-footer::before { content: "A Living Garden of Hope"; display: none; width: min(calc(100% - 2 * var(--obf-pad-page)), var(--obf-content)); margin: 18px auto -7px; color: var(--obf-ink); opacity: .82; font-family: Georgia, serif; font-size: 1rem; }

.breadcrumb { padding-top: 28px; }
.cat-head { padding-block: 34px 20px; }
.cat-title { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.toolbar { border-bottom: 1px solid var(--obf-gold-soft); margin-bottom: 28px; }
.view-tabs { background: var(--obf-cream-deep); }
.view-tab[aria-selected="true"] { color: var(--obf-ink); box-shadow: var(--obf-shadow); }
.media-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: var(--obf-gap); }
.media-card { background: var(--obf-white); border: 1px solid color-mix(in srgb, var(--obf-gold) 12%, transparent); box-shadow: var(--obf-shadow); }
.media-card-media { aspect-ratio: 16 / 10; }
.media-card-body { padding: 17px 18px 19px; }
.media-card-type { color: var(--obf-gold); font-size: .7rem; font-weight: 700; letter-spacing: .12em; }
.media-card-title { font-size: 1.35rem; }
.media-card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.media-card-meta {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 0;
  color: var(--obf-text-muted); font-size: .88rem;
}
.media-card-meta-sep { color: var(--obf-gold-soft); }
.button-primary { background: var(--obf-gold); color: #fffdf8; box-shadow: 0 5px 12px rgba(189,138,50,.18); }
.button-primary:hover { background: #a87724; }
.button-secondary { background: transparent; border-color: var(--obf-gold-soft); }
.button-secondary:hover { background: var(--obf-cream-deep); }

.work { max-width: 1120px; }
.work-media { margin-top: 24px; }
.work-cover { max-width: 560px; margin-inline: 0; box-shadow: var(--obf-shadow); }
.work-head { padding-top: 30px; }
.work-title { font-size: clamp(2.5rem, 5vw, 4.6rem); }
.work-title::after { display: none; }
.reading { max-width: 62ch; padding-top: 14px; }
.reading p { position: relative; line-height: 1.9; }
.reading p + p { margin-top: 2.2em; }
.reading p + p::before { width: 70px; margin-top: -1.35em; inset-inline-start: 50%; transform: translateX(-50%); background: linear-gradient(90deg, transparent 0 12%, var(--obf-gold-soft) 12% 40%, transparent 40% 60%, var(--obf-gold-soft) 60% 88%, transparent 88%); }
html[dir="rtl"] .reading p + p::before { transform: translateX(50%); }
.gallery-main { box-shadow: var(--obf-shadow); }
.gallery-main img { aspect-ratio: 16 / 10; object-fit: contain; background: #e8e1d3; }
audio.work-audio { max-width: 620px; margin: 22px 0 0; accent-color: var(--obf-gold); }

@media (min-width: 901px) {
  [data-page="work"] .work { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); column-gap: clamp(28px, 5vw, 70px); align-items: start; }
  [data-page="work"] .work-media { grid-column: 1; grid-row: 1 / span 2; }
  [data-page="work"] .work-head { grid-column: 2; grid-row: 1; }
  [data-page="work"] #extras, [data-page="work"] #downloads, [data-page="work"] .tags { grid-column: 2; }
}
@media (max-width: 1050px) { .main-nav { gap: 13px; } .main-nav a { font-size: .86rem; } }
@media (max-width: 820px) {
  .site-header .container { min-height: 66px; }
  .nav-toggle { display: inline-grid; place-items: center; margin-inline-start: auto; }
  .main-nav { display: none; position: absolute; inset: 66px 0 auto; padding: 16px var(--obf-pad-page) 22px; background: var(--obf-cream); border-bottom: 1px solid var(--obf-gold-soft); box-shadow: var(--obf-shadow); }
  .nav-open .main-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--obf-gold-soft); }
  .header-actions { margin-inline-start: 0; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { aspect-ratio: 16 / 9; }
}
@media (max-width: 560px) {
  :root { --obf-pad-page: 18px; }
  .site-header .container { gap: 8px; }
  .brand { flex: 0 1 94px; min-width: 0; margin-inline-end: 0; font-size: .82rem; line-height: 1.05; white-space: normal; }
  .brand::before { margin-inline-end: 4px; }
  .header-actions { flex: 1 1 auto; min-width: 0; justify-content: flex-end; }
  .icon-button { min-width: 0; min-height: 42px; padding-inline: 6px; }
  /* De taalnaam mag hier nooit afgekapt worden: geen max-width, geen
   * ellipsis. Het "Language"-label verdwijnt om ruimte te maken (de
   * toegankelijke naam blijft via aria-label); de knop krimpt niet mee
   * met de rest van de header zodat langere namen (Македонски,
   * Українська, …) altijd volledig blijven staan. */
  .lang-current { min-height: 42px; padding-inline: 6px; gap: 4px; font-size: .76rem; white-space: nowrap; flex-shrink: 0; }
  .lang-label { display: none; }
  #lang-current-name { display: inline; white-space: nowrap; }
  .category-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .category-card { min-height: 145px; }
  .category-body { padding: 14px; }
  .category-title { font-size: 1.2rem; }
  .category-icon { font-size: 1.35rem; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .media-card-body { padding: 13px; }
  .media-card-title { font-size: 1.1rem; }
  .media-card-desc { font-size: .86rem; }
  .work-title { font-size: 2.5rem; }
  .site-footer .container { align-items: flex-start; flex-direction: column; }
}

/* ======================================================================
 * Films v2 — filmische tegels en expliciete paginering.
 * ==================================================================== */
html[data-page="category"][data-category="videos"] .cat-hero,
html[data-page="category"][data-category="stories"] .cat-hero,
html[data-page="category"][data-category="photos"] .cat-hero {
  margin-top: clamp(22px, 3.5vw, 38px);
  aspect-ratio: 16 / 6.4;
  min-height: 240px;
  max-height: 52vh;
  border-radius: var(--obf-radius-card);
  box-shadow: var(--obf-shadow);
}
html[data-page="category"][data-category="videos"] .cat-hero img,
html[data-page="category"][data-category="stories"] .cat-hero img,
html[data-page="category"][data-category="photos"] .cat-hero img {
  object-position: 50% 50%;
}
html[data-page="category"][data-category="videos"] .cat-head {
  max-width: 720px;
  padding: clamp(24px, 3.5vw, 40px) 0 clamp(12px, 2vw, 20px);
}
html[data-page="category"][data-category="videos"] .cat-title {
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  line-height: 1.1;
}
html[data-page="category"][data-category="videos"] .cat-intro {
  max-width: 65ch; margin-top: 16px; font-size: 1.08rem; line-height: 1.6;
}
html[data-page="category"][data-category="videos"] .toolbar {
  justify-content: space-between; gap: 14px 18px;
}
html[data-page="category"][data-category="videos"] .toolbar .spacer {
  display: none;
}
html[data-page="category"][data-category="videos"] .sort select {
  min-height: 30px; border-color: transparent; background: transparent;
}
html[data-page="category"][data-category="videos"] .media-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 320px));
  justify-content: center;
  gap: clamp(18px, 2.4vw, 30px);
}
html[data-page="category"][data-category="videos"] .media-card {
  border: 1px solid color-mix(in srgb, var(--obf-gold) 14%, transparent);
}
html[data-page="category"][data-category="videos"] .media-card-media {
  aspect-ratio: 16 / 10;
}
html[data-page="category"][data-category="videos"] .media-card-title {
  font-size: clamp(1.2rem, 1.8vw, 1.48rem);
  line-height: 1.18;
}
html[data-page="category"][data-category="videos"] .media-card-body {
  padding: 15px 17px 16px;
}
.video-pagination {
  display: flex; justify-content: center; margin-top: clamp(28px, 5vw, 48px);
}
.video-pagination-list {
  display: flex; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 5px;
  background: var(--obf-cream-deep); border-radius: var(--obf-radius-control);
}
.video-pagination-button {
  appearance: none; min-width: 40px; min-height: 40px; padding: 0 10px;
  border: 1px solid transparent; border-radius: var(--obf-radius-button);
  background: transparent; color: var(--obf-ink); font: inherit; cursor: pointer;
}
.video-pagination-button:hover:not(:disabled) { background: var(--obf-surface); }
.video-pagination-button[aria-current="page"] {
  background: var(--obf-gold); color: var(--obf-white); font-weight: 700;
}
.video-pagination-button:disabled { opacity: .42; cursor: default; }
.video-pagination-ellipsis { min-width: 24px; color: var(--obf-text-muted); text-align: center; }

@media (max-width: 560px) {
  html[data-page="category"][data-category="videos"] .cat-hero {
    aspect-ratio: 4 / 3; min-height: 200px;
  }
  html[data-page="category"][data-category="videos"] .media-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  }
  html[data-page="category"][data-category="videos"] .media-card-body { padding: 13px 14px 14px; }
  html[data-page="category"][data-category="videos"] .media-card-title { font-size: 1.12rem; }
  html[data-page="category"][data-category="videos"] .media-card-meta { font-size: .8rem; }
}
@media (max-width: 380px) {
  html[data-page="category"][data-category="videos"] .media-grid { grid-template-columns: 1fr; }
}

/* ======================================================================
 * Albumpagina (Sprint W4.3) — hergebruikt hero, kaartsysteem en grid.
 * ==================================================================== */

/* Uitgelicht Werk: subtiel, geen schreeuwerige badge. */
.media-card--featured {
  outline: 2px solid color-mix(in srgb, var(--obf-primary) 55%, transparent);
  outline-offset: 0;
}
.media-badge {
  display: flex; align-items: center; gap: 6px; margin: 0 0 6px;
  font-size: .75rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--obf-primary);
}
.media-badge .star { font-size: .9rem; }

/* Mediatype-label in een gemengd Album (elk op een eigen regel). */
.media-card-type { display: flex; align-items: center; gap: 6px; }

/* Verwante Albums. */
.related {
  margin-top: clamp(28px, 5vw, 56px);
  padding-top: clamp(24px, 4vw, 40px);
  border-top: 1px solid var(--obf-surface-alt);
}
.related h2 { font-size: clamp(1.2rem, 2.6vw, 1.7rem); margin: 0 0 var(--obf-gap); }
/* Songdetail: zonder breedtebeperking liepen de tegels tot de linkerrand,
 * in het vaarwater van de hoekdecoratie ernaast. Dezelfde 840px kolom als
 * de rest van de songdetailpagina, met iets minder ruimte erboven. */
body.work-type-music #related {
  max-width: 840px;
  margin-inline: auto;
  margin-top: clamp(20px, 3vw, 36px);
  padding-top: clamp(16px, 2.5vw, 28px);
}

/* ======================================================================
 * Werkpagina (Sprint W4.4) — de media krijgen alle aandacht.
 * ==================================================================== */
.work { max-width: 960px; margin-inline: auto; }
.work-media { margin: clamp(16px, 3vw, 28px) 0 0; }

/* Muziek: grote cover + eenvoudige (native) audiospeler. */
.work-cover {
  width: 100%; max-width: 520px; margin-inline: auto; aspect-ratio: 1 / 1;
  border-radius: var(--obf-radius-card); overflow: hidden; background: var(--obf-surface-alt);
}
.work-cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
audio.work-audio { display: block; width: 100%; max-width: 520px; margin: 16px auto 0; }

/* Video: eigen HTML5-speler met poster, ondertitels en fullscreen. */
.work-video {
  width: 100%; aspect-ratio: 16 / 9; background: #000;
  border-radius: var(--obf-radius-card); overflow: hidden; position: relative;
}
.work-video video { width: 100%; height: 100%; display: block; }
/* Losse posterlaag i.p.v. het <video poster>-attribuut: met crossorigin
   (nodig voor ondertitels) weigeren browsers zonder Access-Control-Allow-
   Origin op de mediabron ook de posterafbeelding, en blijft het beeld
   zwart tot het afspelen begint. Een gewone <img> heeft die beperking
   niet en toont het eerste beeld dus altijd betrouwbaar. */
.work-video-poster {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: 1; pointer-events: none;
}
.work-video-poster[hidden] { display: none !important; }
.work-video-play {
  position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%);
  display: grid; place-items: center; width: clamp(64px, 9vw, 92px);
  height: clamp(64px, 9vw, 92px); padding: 0 0 0 .08em;
  border: 2px solid rgba(255,255,255,.92); border-radius: 50%;
  background: rgba(0,0,0,.68); color: #fff; cursor: pointer;
  font: 700 clamp(28px, 4vw, 42px)/1 system-ui, sans-serif;
  box-shadow: 0 5px 24px rgba(0,0,0,.42); z-index: 2;
}
.work-video-play:hover { background: rgba(0,0,0,.82); transform: translate(-50%, -50%) scale(1.04); }
.work-video-play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.work-video-play[hidden] { display: none !important; }
/* Safari toont anders nog een tweede, niet-betrouwbare centrale startknop. */
.work-video video::-webkit-media-controls-start-playback-button {
  display: none !important; -webkit-appearance: none;
}

/* Films gebruiken de eerste scène als brede, filmische entree. */
.work-type-video .work { max-width: 1240px; }
.work-type-video .work-media { margin-top: clamp(24px, 4vw, 48px); }
.work-type-video .work-video { aspect-ratio: 21 / 9; }
.work-type-video .work-head { padding-top: clamp(24px, 4vw, 42px); }
.work-type-video .work-video-play {
  background: var(--obf-gold); border-color: var(--obf-white);
  box-shadow: 0 8px 24px rgba(36, 57, 45, .22);
}
.work-type-video .work-video-play:hover {
  background: #a87724;
}
@media (min-width: 901px) {
  html[data-page="work"] body.work-type-video .work { display: block; }
  .work-type-video .work-head { max-width: 760px; }
}
@media (max-width: 560px) {
  .work-type-video .work-video { aspect-ratio: 16 / 9; }
}

/* Foto('serie'), vereenvoudigde UX (RR-FOTOALBUM2): geen thumbnail-grid
 * meer, permanente ‹/›-teller naast de grote foto, en een eigen lichtgewicht
 * "volledig scherm"-overlay (``.gallery-lightbox``) i.p.v. een hover-only
 * overlay op de foto zelf. */
.work-photo img { width: 100%; border-radius: var(--obf-radius-card); }
.gallery-main { border-radius: var(--obf-radius-card); overflow: hidden; background: var(--obf-surface-alt); }
.gallery-main img { width: 100%; display: block; aspect-ratio: 3 / 2; object-fit: cover; cursor: zoom-in; }
.gallery-caption { color: var(--obf-text-muted); font-size: .95rem; margin: 10px 0 0; text-align: center; }
.gallery-download { display: block; width: fit-content; margin: 0; }

/* Permanente teller/navigatie ("‹ 1 / 34 ›"), altijd zichtbaar — geen
 * hover-afhankelijkheid, dus even bruikbaar op touch als met muis/toetsenbord. */
.gallery-pager {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 12px 0 0; color: var(--obf-ink); font-size: 1rem;
}
.gallery-pager-nav {
  appearance: none; border: 1px solid var(--obf-gold-soft); background: var(--obf-surface-alt);
  color: var(--obf-ink); border-radius: 50%; width: 38px; height: 38px;
  font: 400 1.4rem/1 system-ui, sans-serif; cursor: pointer;
  display: grid; place-items: center;
}
.gallery-pager-nav:hover { background: var(--obf-cream-deep); }
.gallery-pager-nav:focus-visible { outline: 2px solid rgba(32,59,50,.7); outline-offset: 2px; }
.gallery-pager-count { min-width: 5.5ch; text-align: center; color: var(--obf-text-muted); }

.gallery-item-actions {
  display: flex; justify-content: center; gap: 10px; margin: 14px 0 0; flex-wrap: wrap;
}

/* Volledig-scherm-overlay: eigen, lichtgewicht position:fixed-laag i.p.v.
 * de native Fullscreen-API — die heeft op iOS Safari geen betrouwbare
 * ondersteuning voor gewone elementen (alleen voor <video>), deze overlay
 * werkt overal gelijk zonder nieuwe afhankelijkheid. */
.gallery-lightbox {
  position: fixed; inset: 0; z-index: 1000;
  /* Volledig ondoorzichtig (was rgba(...,.94) — liet de pagina eronder nog
   * lichtjes doorschijnen). Geen viewport-units voor de achtergrond nodig:
   * inset:0 dekt al de volledige, actuele viewport, ook bij de dynamische
   * adresbalk van mobiele browsers. */
  background: #0f1411;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top,16px) env(safe-area-inset-right,16px)
           env(safe-area-inset-bottom,16px) env(safe-area-inset-left,16px);
  touch-action: pan-y;
}
.gallery-lightbox[hidden] { display: none; }
/* position:fixed (i.p.v. uitsluitend overflow:hidden) voorkomt dat de
 * onderliggende pagina op mobiele Safari nog doorscrolt achter de overlay;
 * de exacte scrollpositie wordt via ``top`` vastgezet en bij sluiten
 * hersteld (zie ``openLightbox``/``closeLightbox`` in work.js). */
body.gallery-lightbox-open { position: fixed; overflow: hidden; width: 100%; }
.gallery-lightbox-img {
  /* flex:1 + min-height:0 in een kolom-flexcontainer: de foto krijgt exact
   * de resterende ruimte na de teller/bijschrift/downloadknop eronder (die
   * hun eigen inhoudshoogte behouden) — dus zo groot als de viewport toelaat
   * i.p.v. een vast plafond (was max-height:78vh, vaak veel kleiner dan wat
   * er werkelijk beschikbaar was). object-fit:contain bewaart de verhouding. */
  flex: 1 1 auto; min-height: 0; max-width: 100%;
  object-fit: contain; display: block; box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.gallery-lightbox-close {
  position: absolute; top: 16px; inset-inline-end: 16px;
  appearance: none; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12);
  color: #fff; border-radius: 50%; width: 44px; height: 44px; font-size: 1.2rem; cursor: pointer;
}
.gallery-lightbox-close:hover { background: rgba(255,255,255,.28); }
.gallery-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  appearance: none; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.12);
  color: #fff; border-radius: 50%; width: 48px; height: 48px;
  font: 400 1.8rem/1 system-ui, sans-serif; cursor: pointer;
  display: grid; place-items: center;
}
.gallery-lightbox-nav:hover { background: rgba(255,255,255,.28); }
.gallery-lightbox-prev { inset-inline-start: 12px; }
.gallery-lightbox-next { inset-inline-end: 12px; }
.gallery-lightbox-count { color: #fff; opacity: .85; margin: 14px 0 0; font-size: .95rem; }
.gallery-lightbox-caption { color: #fff; opacity: .92; margin: 4px 0 0; text-align: center; max-width: 70ch; }
.gallery-lightbox-download { margin: 14px 0 0; }
@media (max-width: 560px) {
  .gallery-lightbox-nav { width: 40px; height: 40px; font-size: 1.4rem; }
  .gallery-lightbox-prev { inset-inline-start: 6px; }
  .gallery-lightbox-next { inset-inline-end: 6px; }
}

/* Tekst (verhaal/gedicht): rustige leeskolom. */
.reading { max-width: 68ch; margin-inline: auto; }
.reading h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin: 1.4em 0 .4em; }
.reading p { margin: 0 0 1em; line-height: 1.8; }

/* Titel/beschrijving ná de media. */
.work-head { padding: clamp(20px, 4vw, 36px) 0 0; }
.work-title { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0; }
.work-desc { color: var(--obf-text-muted); max-width: 68ch; margin: 12px 0 0; }
.cc-badge {
  display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px;
  color: var(--obf-primary); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
}

/* Eén primaire actie + secundaire acties. */
.work-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.lang-note { color: var(--obf-text-muted); font-size: .9rem; margin: 8px 0 0; }

/* Tags. */
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 20px 0 0; padding: 0; }
.tag {
  display: inline-flex; min-height: 36px; align-items: center; padding: 0 14px;
  background: var(--obf-surface-alt); color: var(--obf-text);
  border-radius: 999px; font-size: .9rem;
}
.tag:hover { background: color-mix(in srgb, var(--obf-primary) 18%, var(--obf-surface-alt)); }

/* Downloads + songtekst/transcript (rustige details). */
.downloads { margin-top: 20px; }
.downloads .row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.panel-toggle { display: inline-flex; gap: 6px; margin-top: 20px; }
.textpanel {
  margin-top: 12px; padding: var(--obf-pad-card); background: var(--obf-surface);
  border-radius: var(--obf-radius-card); box-shadow: var(--obf-shadow);
  white-space: pre-wrap; line-height: 1.7;
}
.lyrics-panel { min-height: 8.5rem; max-width: 42rem; }
.section-label { font-size: .8rem; color: var(--obf-text-muted); text-transform: uppercase;
  letter-spacing: .08em; margin: 0 0 6px; }

/* ---- Zoekpagina (W4.5) ------------------------------------------------ */
.search { padding: var(--obf-pad-page) 0 48px; }
.search-heading { margin: 0 0 6px; }
.search-intro { margin: 0 0 20px; color: var(--obf-text-muted); max-width: 60ch; }

.search-form { position: relative; max-width: 640px; margin: 0 0 12px; }
.search-input {
  width: 100%; box-sizing: border-box; font-size: 1.1rem;
  padding: 14px 44px 14px 16px;
  color: var(--obf-text); background: var(--obf-surface);
  border: 1px solid color-mix(in srgb, var(--obf-text) 18%, transparent);
  border-radius: var(--obf-radius-control);
}
.search-input:focus-visible {
  outline: 2px solid var(--obf-primary); outline-offset: 1px;
  border-color: var(--obf-primary);
}
/* Logische positionering: klopt vanzelf in RTL. */
.search-clear {
  position: absolute; inset-inline-end: 8px; inset-block-start: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px; line-height: 1; font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
  color: var(--obf-text-muted); background: transparent;
  border: 0; border-radius: 50%; cursor: pointer;
}
.search-clear:hover { background: var(--obf-surface-alt); color: var(--obf-text); }

.search-count { margin: 0 0 18px; color: var(--obf-text-muted); min-height: 1.2em; }

.discover { margin-top: 8px; }
.discover-block { margin: 0 0 32px; }
.discover-block h2 { font-size: 1.15rem; margin: 0 0 14px; }

/* v2 final cascade: after every legacy component rule. */
#lang-current-name { display: inline; color: var(--obf-ink); text-transform: none; letter-spacing: normal; }
.lang-current::after { content: "▼"; color: var(--obf-ink); font-size: .72rem; margin-inline-start: 4px; }
.album-intro { display: grid; grid-template-columns: minmax(260px, .78fr) minmax(0, 1.22fr); gap: clamp(28px, 6vw, 82px); align-items: center; padding-top: clamp(34px, 6vw, 82px); }
.album-intro .cat-hero { margin: 0; aspect-ratio: 1 / 1; min-height: 0; max-height: none; border-radius: var(--obf-radius-card); box-shadow: var(--obf-shadow); }
.album-intro .cat-head { padding: 0; }
.album-intro .cat-title { font-size: clamp(2.4rem, 5vw, 5rem); }
.album-intro .cat-intro { max-width: 58ch; font-size: 1.08rem; }
@media (min-width: 901px) {
  [data-page="work"] .work { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); column-gap: clamp(28px, 5vw, 70px); align-items: start; }
  [data-page="work"] .work-media { grid-column: 1; grid-row: 1 / span 2; margin-top: 24px; }
  [data-page="work"] .work-head { grid-column: 2; grid-row: 1; padding-top: 30px; }
  [data-page="work"] #extras, [data-page="work"] #downloads, [data-page="work"] .tags { grid-column: 2; }
  [data-page="work"] .work-cover { max-width: 560px; margin-inline: 0; }
}
@media (max-width: 700px) {
  .album-intro { grid-template-columns: 1fr; padding-top: 28px; }
  .album-intro .cat-hero { max-width: 520px; width: 100%; }
}
.work-type-story .work, .work-type-poem .work { max-width: 980px; display: block; }
.work-type-story .work-media, .work-type-poem .work-media { margin-top: 24px; }
.work-type-story .work-photo, .work-type-poem .work-photo { width: 100%; max-height: 560px; overflow: hidden; border-radius: var(--obf-radius-card); box-shadow: var(--obf-shadow); }
.work-type-story .work-photo img, .work-type-poem .work-photo img { width: 100%; aspect-ratio: 16 / 6; object-fit: cover; display: block; }
.work-type-story .work-head, .work-type-poem .work-head { text-align: center; padding-top: 42px; }
.work-type-story .work-title::after, .work-type-poem .work-title::after { margin-inline: auto; }
.work-type-story .work-desc, .work-type-poem .work-desc { margin-inline: auto; }
.work-type-story #extras, .work-type-poem #extras { display: block; }
.work-type-story .reading, .work-type-poem .reading { margin-inline: auto; padding: 28px 0 64px; text-align: center; }
.work-type-poem .reading { max-width: 68ch; }
.work-type-poem .reading p {
  margin: 0;
  line-height: 1.55;
  white-space: pre-line;
}
.work-type-poem .reading .poem-inline-title { margin-bottom: .65rem; }
.work-type-story .reading h2, .work-type-poem .reading h2 { font-size: 1.35rem; }
.work-type-story .reading p, .work-type-poem .reading p { margin-inline: auto; }
.work-type-story .work-actions, .work-type-poem .work-actions { justify-content: center; }

/* Gedichtdetail — botanische PNG-decoraties blijven decoratief en uit de
 * leesvolgorde. De strofescheiding wordt door work.js alleen tussen echte
 * strofen geplaatst, dus nooit na de laatste strofe. */
body.work-type-poem { position: relative; overflow-x: clip; }
body.work-type-poem .work { position: relative; z-index: 1; padding-bottom: clamp(180px, 19vw, 300px); }
body.work-type-poem .work-photo { display: none; }
body.work-type-poem .work > :not(.poem-decoration) { position: relative; z-index: 1; }
.poem-decoration { position: absolute; z-index: -1; display: block; pointer-events: none; user-select: none; }
.poem-decoration-left {
  inset-inline-start: max(0px, calc(50% - 690px));
  top: clamp(210px, 18vw, 300px);
  width: min(22vw, 300px);
  height: auto;
  opacity: .92;
}
.poem-decoration-bottom-right {
  inset-inline-end: max(0px, calc(50% - 760px));
  bottom: 0;
  width: min(38vw, 520px);
  height: auto;
  opacity: .78;
}
.poem-title-ornament {
  display: block;
  width: min(300px, 48vw);
  height: 76px;
  margin: 0 auto 8px;
  object-fit: contain;
}
.poem-stanza-divider {
  display: block;
  width: min(360px, 82vw);
  height: 34px;
  margin: .2rem auto .25rem;
  object-fit: cover;
  object-position: center;
}
.work-type-poem .reading p + p::before { display: none; }

@media (max-width: 900px) {
  .poem-decoration-left { display: none; }
  .poem-decoration-bottom-right { width: min(42vw, 360px); opacity: .48; }
}
@media (max-width: 560px) {
  body.work-type-poem .work { padding-bottom: 150px; }
  .poem-decoration-bottom-right { width: 250px; opacity: .4; }
  .poem-title-ornament { width: 260px; height: 64px; }
  .poem-stanza-divider { width: 300px; height: 34px; }
}

/* ======================================================================
 * Music library — luistergerichte standaardweergave.
 * Albums blijven via de optionele tab beschikbaar; de liederenlijst is
 * bewust licht, scanbaar en geschikt voor directe bediening.
 * ==================================================================== */
html[data-page="category"][data-category="music"] .cat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ======================================================================
 * Film detail experience v3 — rustige kijkvolgorde.
 * Alleen de video-detailpagina gebruikt deze presentatie; de overzichts-
 * pagina en overige werktypes behouden hun bestaande layout.
 * ==================================================================== */
body.work-type-video .breadcrumb { display: none; }
body.work-type-video .work {
  max-width: 1120px;
  padding-bottom: clamp(46px, 7vw, 86px);
}
body.work-type-video .work-hero {
  display: block;
  margin-top: clamp(26px, 4vw, 52px);
}
body.work-type-video .work-video-hero {
  margin: 0;
  aspect-ratio: 21 / 7;
  overflow: hidden;
  border-radius: var(--obf-radius-card);
  background: var(--obf-surface-alt);
  box-shadow: var(--obf-shadow);
}
body.work-type-video .work-video-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
}
body.work-type-video .work-head {
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(16px, 2vw, 24px) 0 clamp(26px, 4vw, 44px);
  text-align: center;
}
body.work-type-video .work-title {
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1.08;
}
body.work-type-video .work-title::after { margin-inline: auto; }
body.work-type-video .work-desc {
  max-width: 60ch;
  margin: 18px auto 0;
  line-height: 1.7;
}
body.work-type-video .work-actions { justify-content: center; margin-top: 26px; }
body.work-type-video .work-actions .button-primary {
  background: var(--obf-gold);
  border-color: var(--obf-gold);
  color: var(--obf-white);
}
body.work-type-video .work-actions .button-primary:hover {
  background: #a87724;
  border-color: #a87724;
}
body.work-type-video .work-media { margin: 0; }
body.work-type-video .work-video {
  max-width: 1060px;
  margin-inline: auto;
  aspect-ratio: 16 / 9;
  box-shadow: var(--obf-shadow);
}
body.work-type-video #extras,
body.work-type-video #downloads,
body.work-type-video .tags {
  max-width: 840px;
  margin-inline: auto;
}
body.work-type-video #extras { margin-top: clamp(38px, 6vw, 68px); }
body.work-type-video #extras .section-label { text-align: center; }
body.work-type-video #extras .textpanel {
  margin-top: 10px;
  padding: clamp(20px, 3vw, 28px);
  line-height: 1.8;
  box-shadow: none;
  border: 1px solid color-mix(in srgb, var(--obf-gold-soft) 62%, transparent);
  background: color-mix(in srgb, var(--obf-cream-deep) 42%, var(--obf-white));
}
body.work-type-video #downloads {
  margin-top: clamp(28px, 4vw, 42px);
  padding-top: clamp(22px, 3vw, 32px);
  border-top: 1px solid var(--obf-gold-soft);
}
body.work-type-video #downloads .section-label {
  text-align: center;
  font-size: .72rem;
  letter-spacing: .12em;
  opacity: .82;
}
body.work-type-video #downloads .row { justify-content: center; }
body.work-type-video .tags { justify-content: center; }
body.work-type-video .site-footer { margin-top: 0; }
body.work-type-video #related { max-width: 1120px; margin-inline: auto; }
body.work-type-video #related .media-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.work-type-video #related .media-card-title { font-size: clamp(1.15rem, 2vw, 1.4rem); }

@media (max-width: 700px) {
  body.work-type-video .work { padding-bottom: 46px; }
  body.work-type-video .work-video-hero { aspect-ratio: 16 / 9; }
  body.work-type-video .work-head { padding-top: 0; padding-bottom: 32px; }
  body.work-type-video .work-title { font-size: clamp(2.25rem, 10vw, 3.4rem); }
  body.work-type-video .work-desc { font-size: .98rem; }
  body.work-type-video #related .media-grid { grid-template-columns: 1fr; }
}

/* Botanische hoekdecoratie op de filmdetail- en songdetailpagina, in de
 * linkermarge naast de (op 840px gecentreerde) tekst-/downloadkolom, niet
 * "eronder". Daardoor kan hij over de volledige hoogte van die kolom lopen
 * zonder ooit tekst te raken, en zonder ooit scroll toe te voegen (absolute
 * positionering telt niet mee in de documentstroom). */
body.work-type-video main,
body.work-type-music main {
  position: relative;
}
.work-decor {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  pointer-events: none;
}
.work-decor img { display: none; width: auto; height: auto; }
body.work-type-video .work-decor-video {
  display: block;
  width: clamp(70px, calc((100vw - 840px) / 2 - 24px), 320px);
  max-height: min(64vh, 680px);
}
body.work-type-music .work-decor-music {
  display: block;
  width: clamp(56px, calc((100vw - 840px) / 2 - 24px), 240px);
  max-height: min(64vh, 680px);
}
@media (max-width: 1000px) {
  .work-decor { display: none; }
}
html[dir="rtl"] .work-decor-video,
html[dir="rtl"] .work-decor-music {
  transform: scaleX(-1);
}
html[data-page="category"][data-category="music"] .music-transport {
  display: flex;
  align-items: center;
  gap: 12px;
}
html[data-page="category"][data-category="music"] .music-play-all {
  min-height: 50px;
  padding-inline: 26px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
html[data-page="category"][data-category="music"] .music-stop-all {
  min-height: 50px;
  padding-inline: 22px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
html[data-page="category"][data-category="music"] .music-stop-all:disabled {
  opacity: .45;
  cursor: default;
}
html[data-page="category"][data-category="music"] .music-library {
  list-style: none;
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 0;
  border-top: 1px solid var(--obf-gold-soft);
}
html[data-page="category"][data-category="music"] .music-library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 34%);
  gap: clamp(24px, 4vw, 52px);
  align-items: start;
  width: min(100%, 1080px);
  max-width: 100%;
  min-width: 0;
  margin-inline: auto;
}
html[data-page="category"][data-category="music"] .music-song-cover {
  position: sticky;
  top: 108px;
  aspect-ratio: 1 / 1;
  margin: 0;
  overflow: hidden;
  border-radius: var(--obf-radius-card);
  background: var(--obf-surface-alt);
  box-shadow: var(--obf-shadow);
}
html[data-page="category"][data-category="music"] .music-player-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
html[data-page="category"][data-category="music"] .music-song-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 300ms ease;
}
html[data-page="category"][data-category="music"] .music-song-cover img.is-changing { opacity: .35; }
html[data-page="category"][data-category="music"] .music-song {
  display: grid;
  grid-template-columns: 42px 42px minmax(0, 1fr) 22px 64px;
  align-items: center;
  min-height: 76px;
  gap: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--obf-gold-soft) 72%, transparent);
}
html[data-page="category"][data-category="music"] .music-song.is-selected {
  background: color-mix(in srgb, var(--obf-gold-soft) 15%, transparent);
}
html[data-page="category"][data-category="music"] .music-song.is-playing {
  background: color-mix(in srgb, var(--obf-gold-soft) 24%, transparent);
}
html[data-page="category"][data-category="music"] .music-song-number,
html[data-page="category"][data-category="music"] .music-song-duration {
  color: var(--obf-text-muted);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
}
html[data-page="category"][data-category="music"] .music-song-number {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
}
html[data-page="category"][data-category="music"] .music-song-play {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--obf-gold-soft);
  border-radius: 50%;
  background: var(--obf-white);
  color: var(--obf-ink);
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: background var(--obf-dur) ease, color var(--obf-dur) ease, transform var(--obf-dur) ease;
}
html[data-page="category"][data-category="music"] .music-song-play:hover,
html[data-page="category"][data-category="music"] .music-song-play.is-playing {
  background: var(--obf-gold);
  border-color: var(--obf-gold);
  color: #fffdf8;
  transform: scale(1.04);
}
html[data-page="category"][data-category="music"] .music-song-play:focus-visible,
html[data-page="category"][data-category="music"] .music-song-title:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--obf-gold) 58%, white);
  outline-offset: 3px;
}
html[data-page="category"][data-category="music"] .music-song-details {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 4px;
}
html[data-page="category"][data-category="music"] .music-song-title {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--obf-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  text-decoration: none;
}
html[data-page="category"][data-category="music"] .music-song-title:hover {
  color: var(--obf-gold);
}
html[data-page="category"][data-category="music"] .music-song-description {
  overflow: hidden;
  color: var(--obf-text-muted);
  font-size: .86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html[data-page="category"][data-category="music"] .music-song-language {
  justify-self: center;
  color: var(--obf-gold);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
}
html[data-page="category"][data-category="music"] .music-song-duration {
  justify-self: end;
}
html[data-page="category"][data-category="music"] .music-song-equalizer {
  display: inline-flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  width: 18px;
  height: 18px;
  color: var(--obf-gold);
}
html[data-page="category"][data-category="music"] .music-song-equalizer i {
  display: block;
  width: 3px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
}
html[data-page="category"][data-category="music"] .music-song.is-playing .music-song-equalizer i {
  animation: music-equalizer 900ms ease-in-out infinite alternate;
}
html[data-page="category"][data-category="music"] .music-song.is-playing .music-song-equalizer i:nth-child(2) { animation-delay: -300ms; }
html[data-page="category"][data-category="music"] .music-song.is-playing .music-song-equalizer i:nth-child(3) { animation-delay: -600ms; }
@keyframes music-equalizer { from { height: 5px; } to { height: 16px; } }
@media (min-width: 821px) {
  html[data-page="category"][data-category="music"] .container:has(> .cat-hero),
  html[data-page="category"][data-category="videos"] .container:has(> .cat-hero),
  html[data-page="category"][data-category="stories"] .container:has(> .cat-hero),
  html[data-page="category"][data-category="photos"] .container:has(> .cat-hero) {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: center;
  }
  html[data-page="category"][data-category="music"] .container:has(> .cat-hero) .cat-hero,
  html[data-page="category"][data-category="videos"] .container:has(> .cat-hero) .cat-hero,
  html[data-page="category"][data-category="stories"] .container:has(> .cat-hero) .cat-hero,
  html[data-page="category"][data-category="photos"] .container:has(> .cat-hero) .cat-hero { grid-column: 1; grid-row: 1; }
  html[data-page="category"][data-category="music"] .container:has(> .cat-hero) .cat-head,
  html[data-page="category"][data-category="videos"] .container:has(> .cat-hero) .cat-head,
  html[data-page="category"][data-category="stories"] .container:has(> .cat-hero) .cat-head,
  html[data-page="category"][data-category="photos"] .container:has(> .cat-hero) .cat-head { grid-column: 2; grid-row: 1; }
}
html[data-page="category"][data-category="music"] .music-library-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
html[data-page="category"][data-category="music"] .toolbar:has(#tab-works[aria-selected="true"]) {
  margin-bottom: 26px;
}

@media (max-width: 560px) {
  html[data-page="category"][data-category="music"] .cat-hero,
  html[data-page="category"][data-category="music"] .cat-head,
  html[data-page="category"][data-category="music"] .toolbar,
  html[data-page="category"][data-category="music"] #panel,
  html[data-page="category"][data-category="music"] .music-library-layout,
  html[data-page="category"][data-category="music"] .music-library {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  html[data-page="category"][data-category="music"] .cat-actions {
    margin-top: 18px;
  }
  html[data-page="category"][data-category="music"] .music-transport {
    width: 100%;
  }
  html[data-page="category"][data-category="music"] .music-play-all {
    flex: 1 1 auto;
  }
  html[data-page="category"][data-category="music"] .music-stop-all {
    flex: 0 0 auto;
    min-width: 96px;
  }
  html[data-page="category"][data-category="music"] .music-song {
    grid-template-columns: 28px 38px minmax(0, 1fr) 18px 56px;
    gap: 8px;
    min-height: 70px;
  }
  html[data-page="category"][data-category="music"] .music-song-title {
    font-size: 1.08rem;
  }
  html[data-page="category"][data-category="music"] .music-song-description {
    font-size: .8rem;
  }
  html[data-page="category"][data-category="music"] .music-library-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  html[data-page="category"][data-category="music"] .music-song-cover {
    position: static;
    width: 100%;
    max-width: none;
    margin-inline: auto;
    order: 2;
  }
}
@media (prefers-reduced-motion: reduce) {
  html[data-page="category"][data-category="music"] .music-song-cover img,
  html[data-page="category"][data-category="music"] .music-song.is-playing .music-song-equalizer i {
    transition: none;
    animation: none;
  }
}

/* ======================================================================
 * Global layout refresh — brede desktopcompositie, rustige leeskolommen.
 * Eén sitebrede maat voor chrome, pagina-inhoud en full-bleed media;
 * uitzonderingen blijven inhoudelijk smal waar leesbaarheid dat vraagt.
 * ==================================================================== */
:root {
  --obf-site-max: 1640px;
  --obf-site-gutter: clamp(24px, 4vw, 72px);
  --obf-reading-max: 680px;
  --obf-content: var(--obf-site-max);
  --obf-pad-page: var(--obf-site-gutter);
}

.container,
.site-header .container,
.site-footer .container {
  width: min(calc(100% - 2 * var(--obf-site-gutter)), var(--obf-site-max));
  max-width: var(--obf-site-max);
}

html[data-page="portal"] .site-header .container,
html[data-page="portal"] main > .container,
html[data-page="portal"] .categories > .container,
html[data-page="portal"] .hero {
  width: min(calc(100% - 2 * var(--obf-site-gutter)), var(--obf-site-max));
  max-width: var(--obf-site-max);
}

html[data-page="portal"] .categories > .container { padding-inline: 0; }
.site-footer::before { width: min(calc(100% - 2 * var(--obf-site-gutter)), var(--obf-site-max)); }

@media (min-width: 821px) {
  .site-header .main-nav {
    flex: 1 1 auto;
    justify-content: space-evenly;
    gap: clamp(18px, 2.8vw, 48px);
    margin-inline: clamp(20px, 3vw, 56px);
  }
  html[data-page="work"] .work,
  body.work-type-video .work { max-width: var(--obf-site-max); }
  body.work-type-story .work,
  body.work-type-poem .work { max-width: min(100%, 1240px); }
  html[data-page="category"] .media-grid,
  html[data-page="category"][data-category="music"] .media-grid {
    width: 100%;
    max-width: var(--obf-site-max);
  }
  html[data-page="category"][data-category="music"] #panel:has(.media-card[href*="/albums/"]) .media-grid {
    width: 100%;
    max-width: var(--obf-site-max);
  }
}

/* Botanische gedichtdecoraties horen bij de viewportrand, niet bij de
 * leeskolom. De tekst en controls blijven in de voorgrondlaag. */
body.work-type-poem .work { position: static; }
body.work-type-poem .poem-decoration { z-index: 0; }
body.work-type-poem .poem-decoration-left {
  inset-inline-start: clamp(0px, 2vw, 32px);
}
body.work-type-poem .poem-decoration-bottom-right {
  inset-inline-end: clamp(0px, 2vw, 32px);
}

@media (max-width: 820px) {
  .site-header .main-nav { margin-inline: 0; }
}

/* Desktop layout polish: keep the broad site frame, but give each content
 * type the breathing room and reading width it actually needs. */
@media (min-width: 821px) {
  html[data-page="album"] .album-intro {
    margin-bottom: clamp(32px, 5vw, 76px);
  }
  html[data-page="album"] main > .container.section {
    padding-top: clamp(18px, 2.5vw, 40px);
  }

  html[data-page="category"][data-category="music"] .container:has(> .cat-hero) {
    gap: clamp(28px, 3.5vw, 56px);
  }
  html[data-page="category"][data-category="music"] .music-library {
    width: 100%;
    max-width: 1320px;
  }
  html[data-page="category"][data-category="music"] .music-library-layout {
    width: 100%;
    max-width: 1320px;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: clamp(28px, 3.5vw, 64px);
  }
  html[data-page="category"][data-category="music"] .music-song-cover {
    width: min(100%, 380px);
    justify-self: end;
  }

  body.work-type-music .work-media {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }
  body.work-type-music .work-cover,
  body.work-type-music .work-media audio {
    width: min(100%, 560px);
    max-width: 560px;
  }
  body.work-type-music .work-media audio { margin-top: 18px; }
  body.work-type-music #downloads {
    grid-column: 1 / -1;
    width: min(100%, 840px);
    margin: clamp(30px, 4vw, 56px) auto 0;
    padding-top: 22px;
    border-top: 1px solid var(--obf-gold-soft);
  }
}

/* The song panel reserves a calm, karaoke-compatible reading area without
 * adding timing or animation functionality. */
body.work-type-music .lyrics-panel {
  min-height: clamp(10rem, 15vw, 12rem);
  padding: clamp(22px, 3vw, 36px);
  line-height: 1.9;
  white-space: pre-wrap;
}

/* Photo detail preserves the complete source image. Landscape and portrait
 * assets share one centered stage; no EXIF or crop is introduced. */
body.work-type-image .gallery-main {
  min-height: clamp(360px, 55vh, 760px);
  display: grid;
  place-items: center;
  background: var(--obf-surface-alt);
}
body.work-type-image .gallery-main img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(72vh, 860px);
  aspect-ratio: auto;
  object-fit: contain;
}

/* Poem decorations zijn kinderen van <main> (zie work.js), en <main> is de
 * positioneringscontext. De ruimte voor de decoratie wordt gereserveerd via
 * de padding-bottom van .work (zie hierboven) — dus main volgt automatisch
 * de werkelijke inhoudshoogte in plaats van een vaste viewport-hoogte, en de
 * decoratie blijft daarmee altijd direct boven de footer staan. */
body.work-type-poem main {
  position: relative;
}
body.work-type-poem main > :not(.poem-decoration) {
  position: relative;
  z-index: 1;
}
body.work-type-poem .work-title::after {
  display: none;
}
body.work-type-music .work-title::after,
body.work-type-video .work-title::after,
body.work-type-image .work-title::after {
  display: none;
}
/* Songdetail: work-head is links uitgelijnd (geen text-align: center zoals
 * bij gedicht/video/foto), dus het botanische titelornament moet mee
 * uitlijnen op de titel/tekstkolom in plaats van op de volle kolombreedte
 * te centreren — anders zweeft het los van een kortere titel. */
body.work-type-music .poem-title-ornament {
  margin-inline: 0;
}
/* De "Luisteren"-knop is verwijderd (work.js): de audiospeler heeft al een
 * eigen werkende afspeelknop. Zonder deze regel blijft de lege
 * .work-actions-rij zijn margin-top houden en blijft er een kale opening
 * over vóór de songtekst. */
body.work-type-music .work-actions {
  display: none;
}
body.work-type-poem .poem-decoration-left {
  top: auto;
  bottom: 0;
  inset-inline-start: 0;
}
body.work-type-poem .poem-decoration-bottom-right {
  bottom: 0;
  inset-inline-end: 0;
}

/* The About page remains content-first, but uses the refreshed width without
 * turning it into a separate redesign. */
html[data-page="about"] .about-page {
  width: min(100%, 1080px);
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(0px, 2vw, 32px);
}
html[data-page="about"] .about-page p,
html[data-page="about"] .about-page .contact-block {
  max-width: 72ch;
  margin-inline: auto;
  line-height: 1.8;
}

@media (max-width: 560px) {
  body.work-type-image .gallery-main { min-height: 260px; }
  body.work-type-image .gallery-main img { max-height: 70vh; }
}

/* Polish sprint 2: media and footer transitions stay part of one detail
 * composition instead of falling into unrelated grid tracks. */
@media (min-width: 821px) {
  body.work-type-music .work-media {
    align-items: center;
  }
  body.work-type-music .work-cover,
  body.work-type-music .work-media audio {
    width: min(100%, 540px);
    max-width: 540px;
    margin-inline: auto;
  }
  body.work-type-music .work-media audio {
    margin-top: 18px;
  }
}

body.work-type-music .lyrics-panel {
  min-height: clamp(16rem, 24vw, 20rem);
  padding: clamp(24px, 3.5vw, 42px);
  line-height: 1.9;
}

body.work-type-image .gallery-main {
  min-height: 0;
  padding: clamp(12px, 2vw, 28px);
}
body.work-type-image .work-title::after {
  display: none;
}
body.work-type-image .work-head {
  text-align: center;
}
body.work-type-image .poem-title-ornament {
  margin-inline: auto;
}
body.work-type-image .gallery-main.gallery-landscape img {
  width: 100%;
  max-width: 1400px;
  max-height: none;
}
body.work-type-image .gallery-main.gallery-portrait img {
  width: auto;
  max-width: 100%;
  max-height: min(72vh, 860px);
}

html[data-page="work"] .site-footer,
html[data-page="about"] .site-footer {
  margin-top: 0;
}
body.work-type-poem main {
  margin-bottom: 0;
}
body.work-type-poem .site-footer {
  margin-top: 0;
}

html[data-page="about"] .about-page {
  display: block;
  min-height: 0;
  padding-block: clamp(64px, 9vw, 132px);
  text-align: center;
}
html[data-page="about"] .about-page h1,
html[data-page="about"] .about-page .search-intro {
  max-width: 58ch;
  margin-inline: auto;
}
html[data-page="about"] .about-page h1 {
  max-width: 24ch;
  line-height: 1.15;
}

html[data-page="about"] .ornament-title {
  display: block;
  width: min(280px, 72vw);
  height: 76px;
  aspect-ratio: 1536 / 1024;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
}
html[data-page="about"] .ornament-title::before,
html[data-page="about"] .ornament-title::after {
  display: none;
}

/* Hoekdecoratie in de linkermarge NAAST de tekstkolom, niet eronder. De
 * kolom (.about-page) is begrensd op 1080px en gecentreerd, dus ernaast
 * staat op elke hoogte lege ruimte, ongeacht hoe lang de content is. De
 * breedte is expliciet afgeleid van die marge (calc), dus de afbeelding
 * raakt de tekst nooit — en omdat hij niet meetelt in de documentstroom
 * (position: absolute) voegt hij ook nooit scroll toe. */
html[data-page="about"] main {
  position: relative;
}
html[data-page="about"] .about-decor {
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  pointer-events: none;
}
html[data-page="about"] .about-decor img {
  display: block;
  width: clamp(56px, calc((100vw - 1080px) / 2 - 16px), 320px);
  height: auto;
}
@media (max-width: 1224px) {
  html[data-page="about"] .about-decor { display: none; }
}
html[dir="rtl"][data-page="about"] .about-decor img { transform: scaleX(-1); }

.media-hint {
  margin: 8px auto 0;
  color: var(--obf-text-muted);
  text-align: center;
}

/* The browser audio element remains the playback engine, while these visible
 * controls are deliberately styled as part of the botanical cream palette. */
audio.work-audio {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.audio-player {
  width: min(100%, 560px);
  min-height: 72px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  grid-template-areas:
    "play progress time"
    "play volume volume";
  align-items: center;
  gap: 7px 12px;
  margin: 16px auto 0;
  padding: 11px 15px;
  background: color-mix(in srgb, var(--obf-cream) 88%, white);
  border: 1px solid color-mix(in srgb, var(--obf-ink) 18%, var(--obf-gold-soft));
  border-radius: var(--obf-radius-control);
  box-shadow: 0 5px 16px rgba(36, 57, 45, .1);
}
.audio-play {
  grid-area: play;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: white;
  background: #6f8c58;
  border: 1px solid #52713f;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
}
.audio-play:hover { background: #5e7e4a; }
.audio-progress,
.audio-volume {
  accent-color: #6f8c58;
  cursor: pointer;
}
.audio-progress {
  grid-area: progress;
  width: 100%;
  height: 8px;
}
.audio-time {
  grid-area: time;
  color: var(--obf-ink-soft);
  font-size: .82rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.audio-volume {
  grid-area: volume;
  justify-self: end;
  width: min(100%, 150px);
  height: 8px;
}
.audio-play:focus-visible,
.audio-progress:focus-visible,
.audio-volume:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--obf-gold) 72%, white);
  outline-offset: 3px;
}
.work-type-poem .audio-player { width: min(100%, 560px); }

@media (max-width: 560px) {
  .audio-player {
    grid-template-columns: 46px minmax(0, 1fr);
    grid-template-areas:
      "play time"
      "play progress"
      "volume volume";
    min-height: 80px;
  }
  .audio-time { justify-self: start; }
  .audio-volume { width: 100%; }
}

/* RTL mirrors the poem composition itself: logical positioning already moves
 * the decorations to the opposite side, and this mirrors the artwork so the
 * botanical forms face into the reading area. */
html[dir="rtl"] body.work-type-poem .poem-decoration,
html[dir="rtl"] body.work-type-poem .poem-title-ornament,
html[dir="rtl"] body.work-type-poem .poem-stanza-divider {
  transform: scaleX(-1);
}

/* Long poems keep the page composition fixed while only the reading region
 * scrolls. This is scoped to poem details; other work types retain normal
 * document flow. */
@media (min-width: 561px) {
  body.work-type-poem {
    height: 100svh;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  body.work-type-poem > .site-header,
  body.work-type-poem > .site-footer { flex: 0 0 auto; }
  body.work-type-poem main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 0;
  }
  body.work-type-poem main > .breadcrumb { flex: 0 0 auto; padding-top: 12px; }
  body.work-type-poem main > .container.work {
    flex: 1 1 auto;
    min-height: 0;
    width: min(calc(100% - 2 * var(--obf-site-gutter)), var(--obf-site-max));
    max-width: var(--obf-site-max);
    padding-inline: clamp(150px, 17vw, 300px);
    padding-bottom: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    grid-template-areas:
      "head"
      "media"
      "extras";
    align-content: stretch;
  }
  /* Compacter dan de gedeelde .work-head-regel: minder lucht boven de
   * MP3-speler, zodat het gedichtvenster eronder meer hoogte overhoudt
   * (de derde grid-rij is minmax(0, 1fr) en vult automatisch aan). De
   * generieke "Lezen"-actieknop is overbodig zodra de speler zelf de
   * primaire actie is. */
  body.work-type-poem .work-head { grid-area: head; min-height: 0; padding-top: 4px; }
  body.work-type-poem .poem-title-ornament { margin-bottom: 2px; }
  body.work-type-poem .work-desc { margin-top: 6px; }
  body.work-type-poem .work-actions { display: none; }
  body.work-type-poem .work-media {
    grid-area: media;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  body.work-type-poem .work-media audio {
    width: min(100%, 560px);
    margin: 10px auto 0;
  }
  body.work-type-poem .audio-player { margin-top: 4px; }
  body.work-type-poem #extras {
    grid-area: extras;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  body.work-type-poem .reading {
    width: min(100%, 760px);
    max-width: none;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    flex: 1 1 0;
    margin: 12px auto 0;
    padding: clamp(24px, 3vw, 44px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--obf-cream) 86%, white);
    border: 1px solid color-mix(in srgb, var(--obf-gold-soft) 60%, transparent);
    border-radius: var(--obf-radius-card);
    box-shadow: 0 8px 26px rgba(38, 59, 45, .08);
    text-align: center;
  }
  body.work-type-poem .reading:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--obf-gold) 72%, white);
    outline-offset: 4px;
  }
  body.work-type-poem .reading #downloads {
    margin: 24px auto 0;
    width: min(100%, 840px);
  }
  body.work-type-poem .reading .tags {
    margin-top: 18px;
  }
  body.work-type-poem .poem-decoration-left { top: auto; bottom: 0; }
  body.work-type-poem .poem-decoration-bottom-right { bottom: 0; }
}

@media (max-width: 560px) {
  body.work-type-poem {
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  body.work-type-poem .reading {
    overflow: visible;
    max-height: none;
    width: 100%;
    padding: 22px 10px 36px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
}

@media print {
  body.work-type-poem,
  body.work-type-poem main { display: block; height: auto; min-height: 0; overflow: visible; }
  body.work-type-poem main { padding-bottom: 0; }
  body.work-type-poem main > .container.work { display: block; height: auto; padding-inline: 0; }
  body.work-type-poem #extras,
  body.work-type-poem .reading { display: block; height: auto; max-height: none; overflow: visible; }
  body.work-type-poem .poem-decoration { position: static; max-width: 22%; }
}

@media (max-width: 560px) {
  body.work-type-music .lyrics-panel {
    min-height: 14rem;
    padding: 22px;
  }
  body.work-type-image .gallery-main {
    padding: 8px;
  }
}
