/* ==========================================================================
   LizeBoeken.nl - Volledige Stijlgids, Thema's, Responsieve Grid & Studio UI
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --font-display: 'Fredoka', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Standaardthema: Zachte Wolkenlucht */
  --bg-page: linear-gradient(160deg, #eef6ff 0%, #f8f2ff 50%, #fff7ed 100%);
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-surface-strong: #ffffff;
  --bg-muted: #f1f5f9;
  --text-main: #1e293b;
  --text-muted: #475569;
  --border-subtle: rgba(148, 163, 184, 0.28);
  --accent: #6c5ce7;
  --accent-strong: #5645d6;
  --accent-soft: #ede9fe;
  --accent-2: #ff7a59;
  --accent-3: #10b981;
  --shelf-bar: linear-gradient(180deg, #e7c697 0%, #cfa167 100%);
  --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.1);
  --shadow-lg: 0 22px 54px rgba(15, 23, 42, 0.18);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --focus-ring: 0 0 0 4px rgba(108, 92, 231, 0.45);
}

/* --------------------------------------------------------------------------
   1. De 10 Globale Website-thema's
   -------------------------------------------------------------------------- */
body[data-theme="soft-clouds"] {
  --bg-page: linear-gradient(160deg, #e8f4ff 0%, #f6efff 52%, #fff8ec 100%);
  --accent: #6c5ce7; --accent-strong: #5544d4; --accent-soft: #ede9fe; --accent-2: #ff7a59;
}

body[data-theme="fairy-forest"] {
  --bg-page: linear-gradient(160deg, #e6f7ee 0%, #eefae7 50%, #fef7e5 100%);
  --bg-surface: rgba(255, 255, 252, 0.92);
  --text-main: #183629; --text-muted: #3d6352;
  --accent: #1d9a6c; --accent-strong: #157a55; --accent-soft: #d7f5e8; --accent-2: #e67e22;
}

body[data-theme="starry-night"] {
  --bg-page: radial-gradient(circle at 18% 15%, #273269 0%, #151b3d 52%, #0c1026 100%);
  --bg-surface: rgba(27, 35, 74, 0.88); --bg-surface-strong: #1d254f; --bg-muted: #263163;
  --text-main: #f8fafc; --text-muted: #cbd5e1;
  --border-subtle: rgba(148, 163, 184, 0.25);
  --accent: #ffd166; --accent-strong: #f4be3c; --accent-soft: rgba(255, 209, 102, 0.18); --accent-2: #ff8fab;
  --focus-ring: 0 0 0 4px rgba(255, 209, 102, 0.65);
}

body[data-theme="pastel-rainbow"] {
  --bg-page: linear-gradient(135deg, #ffe9f0 0%, #fff4dc 28%, #e6f9f0 58%, #e8f0ff 84%, #f4e8ff 100%);
  --accent: #d946ef; --accent-strong: #b82fd0; --accent-soft: #fae8ff; --accent-2: #0ea5e9;
}

body[data-theme="warm-paper"] {
  --bg-page: linear-gradient(160deg, #f9f1e2 0%, #f5ead6 50%, #efe2ca 100%);
  --bg-surface: rgba(255, 252, 245, 0.94); --bg-surface-strong: #fffdf8; --bg-muted: #f2e8d5;
  --text-main: #35271d; --text-muted: #685343;
  --accent: #b85d38; --accent-strong: #964829; --accent-soft: #f7e4d8; --accent-2: #3b7a57;
}

body[data-theme="sunny-yellow"] {
  --bg-page: linear-gradient(160deg, #fff9d6 0%, #ffefc2 50%, #ffe6d5 100%);
  --text-main: #3a2b12; --text-muted: #6e572b;
  --accent: #e67e00; --accent-strong: #c46a00; --accent-soft: #fff0cc; --accent-2: #ef476f;
}

body[data-theme="magic-library"] {
  --bg-page: linear-gradient(160deg, #2d1e3e 0%, #201633 55%, #161426 100%);
  --bg-surface: rgba(48, 34, 68, 0.9); --bg-surface-strong: #372652; --bg-muted: #463166;
  --text-main: #faf5ff; --text-muted: #d8c8f0;
  --border-subtle: rgba(216, 180, 254, 0.25);
  --accent: #f5b942; --accent-strong: #e09f24; --accent-soft: rgba(245, 185, 66, 0.2); --accent-2: #c084fc;
  --focus-ring: 0 0 0 4px rgba(245, 185, 66, 0.65);
}

body[data-theme="underwater"] {
  --bg-page: linear-gradient(165deg, #d8f8ff 0%, #d4eeff 50%, #e0f7fa 100%);
  --text-main: #0f3246; --text-muted: #2e5c75;
  --accent: #0284c7; --accent-strong: #0369a1; --accent-soft: #e0f2fe; --accent-2: #f97316;
}

body[data-theme="flower-meadow"] {
  --bg-page: linear-gradient(160deg, #fff0f6 0%, #fef9e7 52%, #ebfaef 100%);
  --text-main: #352130; --text-muted: #694960;
  --accent: #e11d74; --accent-strong: #be125d; --accent-soft: #ffe4f0; --accent-2: #16a34a;
}

body[data-theme="space-adventure"] {
  --bg-page: radial-gradient(circle at 80% 10%, #1d3a6d 0%, #0e172f 55%, #070b18 100%);
  --bg-surface: rgba(19, 31, 61, 0.9); --bg-surface-strong: #17254a; --bg-muted: #223564;
  --text-main: #f0f9ff; --text-muted: #bae6fd;
  --border-subtle: rgba(125, 211, 252, 0.22);
  --accent: #38bdf8; --accent-strong: #0ea5e9; --accent-soft: rgba(56, 189, 248, 0.2); --accent-2: #fb7185;
  --focus-ring: 0 0 0 4px rgba(56, 189, 248, 0.6);
}

/* --------------------------------------------------------------------------
   2. Basis, Toegankelijkheid & Eigen Achtergrondlaag
   -------------------------------------------------------------------------- */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--bg-page);
  background-attachment: fixed;
  line-height: 1.55;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.custom-bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

body.has-custom-bg .custom-bg-layer {
  opacity: 1;
}

body.has-custom-bg .custom-bg-layer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.62) 0%, rgba(255, 255, 255, 0.78) 100%);
  backdrop-filter: blur(2px);
}

body[data-theme="starry-night"].has-custom-bg .custom-bg-layer::after,
body[data-theme="magic-library"].has-custom-bg .custom-bg-layer::after,
body[data-theme="space-adventure"].has-custom-bg .custom-bg-layer::after {
  background: linear-gradient(180deg, rgba(12, 16, 38, 0.62) 0%, rgba(12, 16, 38, 0.78) 100%);
}

.container {
  width: min(1360px, 100% - 2rem);
  margin-inline: auto;
}

@media (min-width: 1700px) {
  .container {
    width: min(1620px, 100% - 4rem);
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 2000;
  background: var(--accent); color: #fff; padding: 0.7rem 1.2rem;
  border-radius: var(--radius-sm); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

[hidden] { display: none !important; }

img { max-width: 100%; display: block; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

/* --------------------------------------------------------------------------
   3. Topbanners & Knoppen
   -------------------------------------------------------------------------- */
.top-banner {
  padding: 0.6rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
}
.top-banner__inner {
  width: min(1360px, 100%);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.top-banner--demo { background: #312e81; color: #eef2ff; }
.top-banner--warn { background: #b45309; color: #fffbeb; }
.top-banner--preview { background: #0f766e; color: #f0fdfa; position: sticky; top: 0; z-index: 90; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
  min-height: 44px;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled { opacity: 0.52; cursor: not-allowed; }

.btn--xs { min-height: 32px; padding: 0.3rem 0.75rem; font-size: 0.82rem; }
.btn--sm { min-height: 38px; padding: 0.45rem 0.95rem; font-size: 0.9rem; }
.btn--lg { min-height: 52px; padding: 0.8rem 1.6rem; font-size: 1.08rem; }

.btn--primary { background: var(--accent); color: #ffffff; }
.btn--primary:hover:not(:disabled) { background: var(--accent-strong); }

body[data-theme="starry-night"] .btn--primary,
body[data-theme="magic-library"] .btn--primary,
body[data-theme="space-adventure"] .btn--primary {
  color: #0f172a;
}

.btn--secondary { background: var(--accent-soft); color: var(--text-main); border-color: var(--border-subtle); }
.btn--success { background: #15803d; color: #ffffff; }
.btn--success:hover:not(:disabled) { background: #166534; }
.btn--warning { background: #fef3c7; color: #78350f; border-color: #f59e0b; }
.btn--warning:hover:not(:disabled) { background: #fde68a; }
.btn--danger { background: #dc2626; color: #ffffff; }
.btn--danger:hover:not(:disabled) { background: #b91c1c; }
.btn--ghost { background: transparent; color: var(--text-main); border-color: var(--border-subtle); }
.btn--ghost:hover:not(:disabled) { background: var(--bg-muted); }
.btn--ghost-light { background: rgba(255, 255, 255, 0.16); color: #ffffff; border-color: rgba(255, 255, 255, 0.35); }
.btn--light { background: #ffffff; color: #0f172a; }
.btn--surprise {
  background: linear-gradient(135deg, #ff6b6b 0%, #ff9f43 100%);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(255, 107, 107, 0.32);
}

/* --------------------------------------------------------------------------
   4. Openbare Header, Mascotte, Teller & Filterbalk
   -------------------------------------------------------------------------- */
.site-header {
  padding: 1.4rem 0 1rem;
}

.site-header__card {
  position: relative;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem 1.35rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(10px);
}

.site-header__top-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.studio-lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface-strong);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.studio-lock-btn:hover {
  color: var(--text-main);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.site-header__hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-right: 5.5rem;
}

.publisher-logo {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.publisher-logo__emblem { font-size: 2.35rem; line-height: 1; }
.publisher-logo img { width: 100%; height: 100%; object-fit: cover; }

.publisher-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 2.7rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.publisher-subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: clamp(0.98rem, 1.5vw, 1.12rem);
  max-width: 62ch;
}

.publisher-mascot {
  margin-left: auto;
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  animation: gentleFloat 4.5s ease-in-out infinite;
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.stats-bar {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1.5px dashed var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.92rem;
}

/* Filterbalk */
.filter-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.75rem 0;
}

.filter-bar__inner {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.cat-tab {
  border: 2px solid transparent;
  background: var(--bg-muted);
  color: var(--text-main);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  min-height: 42px;
  transition: all 0.16s ease;
}
.cat-tab:hover { transform: translateY(-1px); border-color: var(--accent); }
.cat-tab.is-active {
  background: var(--accent);
  color: #ffffff;
}
body[data-theme="starry-night"] .cat-tab.is-active,
body[data-theme="magic-library"] .cat-tab.is-active,
body[data-theme="space-adventure"] .cat-tab.is-active {
  color: #0f172a;
}

.filter-bar__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  flex: 1 1 320px;
  justify-content: flex-end;
}

.search-field {
  position: relative;
  flex: 1 1 200px;
  max-width: 310px;
}
.search-field__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}
.search-field__input, .maker-select {
  width: 100%;
  min-height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-surface-strong);
  color: var(--text-main);
  padding: 0.45rem 0.95rem;
}
.search-field__input { padding-left: 2.35rem; }
.maker-select-wrap { flex: 0 1 180px; }

/* --------------------------------------------------------------------------
   5. Galerijsecties & Responsieve Kaartengrid
   -------------------------------------------------------------------------- */
.gallery-root {
  padding: 1.1rem 0 3.5rem;
}

.gallery-section {
  margin-bottom: 2.6rem;
}

.gallery-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--border-subtle);
}

.gallery-section--book .gallery-section__header { border-bottom-color: rgba(207, 161, 103, 0.7); }
.gallery-section--drawing .gallery-section__header { border-bottom-color: rgba(236, 72, 153, 0.45); }
.gallery-section--craft .gallery-section__header { border-bottom-color: rgba(16, 185, 129, 0.5); }

.gallery-section__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.gallery-section__count {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-muted);
}

.creations-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 460px) {
  .creations-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 820px) {
  .creations-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1120px) {
  .creations-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1480px) {
  .creations-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.5rem; }
}

.creation-card {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  padding: 0.75rem;
  background: var(--card-bg, #ffffff);
  color: var(--card-title, #1e293b);
  border-width: 3px;
  border-style: var(--card-border-style, solid);
  border-color: var(--card-border, #e2e8f0);
  border-radius: var(--card-radius, 20px);
  box-shadow: var(--card-shadow, 0 10px 24px rgba(15, 23, 42, 0.08));
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
  animation: cardEnter 0.36s ease both;
}

.creation-card.border-frame {
  border-style: solid;
  border-width: 6px;
  outline: 2px solid rgba(15, 23, 42, 0.08);
  outline-offset: -4px;
}

.creation-card:hover,
.creation-card:focus-visible {
  transform: translateY(-6px) rotate(-0.5deg);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.16);
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.creation-card__media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  border-radius: calc(var(--card-radius, 20px) - 7px);
  overflow: hidden;
  background: #f1f5f9;
  margin-bottom: 0.75rem;
}

.creation-card--drawing .creation-card__media { aspect-ratio: 4 / 3; }
.creation-card--craft .creation-card__media { aspect-ratio: 1 / 1; }

.creation-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.creation-card:hover .creation-card__media img {
  transform: scale(1.04);
}

/* Subtiele boekrug voor boekcovers */
.creation-card--book .creation-card__media::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 12px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.22), rgba(255, 255, 255, 0.18) 45%, rgba(0, 0, 0, 0));
  z-index: 2;
  pointer-events: none;
}

.creation-card__type-chip {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
}

.creation-card__stamp {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  background: #fef08a;
  color: #422006;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  transform: rotate(2.5deg);
  max-width: 78%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creation-card__title {
  margin: 0;
  font-family: var(--card-font, var(--font-display));
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--card-title, #1e293b);
}

.creation-card__footer {
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  opacity: 0.84;
}

.creation-card__maker {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creation-card__likes {
  flex: 0 0 auto;
  font-weight: 700;
}

.empty-state, .loading-state {
  background: var(--bg-surface);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 3rem 1.5rem;
  text-align: center;
  max-width: 620px;
  margin: 2rem auto;
}
.empty-state__icon { font-size: 3rem; margin-bottom: 0.5rem; }

.loading-spinner {
  width: 44px; height: 44px; margin: 0 auto 1rem;
  border-radius: 50%;
  border: 4px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.site-footer {
  padding: 1.5rem 0 2.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.2rem;
  border-top: 1.5px solid var(--border-subtle);
}
.footer-studio-link {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-weight: 700; text-decoration: underline; padding: 0.35rem;
}
.footer-studio-link:hover { color: var(--text-main); }

/* --------------------------------------------------------------------------
   6. Modals (Strikt gescheiden backdrop & scroll-inhoud)
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.68);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.6rem, 2.5vw, 1.8rem);
  overscroll-behavior: contain;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-dialog {
  position: relative;
  width: 100%;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  display: flex;
  flex-direction: column;
  background: var(--modal-bg, #ffffff);
  color: var(--modal-text, #1e293b);
  border: 4px solid var(--modal-border, #cbd5e1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-family: var(--modal-font, var(--font-body));
  animation: modalPop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-dialog--detail { max-width: 980px; }
.modal-dialog--md { max-width: 780px; }
.modal-dialog--sm { max-width: 470px; background: #ffffff; color: #1e293b; border-color: #cbd5e1; }

.modal-scroll-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: clamp(1.1rem, 3vw, 2rem);
  font-size: var(--modal-p-size, 1rem);
  flex: 1 1 auto;
}

.modal-close-btn {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  z-index: 20;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(15, 23, 42, 0.16);
  background: #ffffff;
  color: #0f172a;
  font-size: 1.2rem;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.modal-close-btn:hover { transform: scale(1.08); background: #f1f5f9; }

/* Subtiele modal-patronen */
.pattern-paper { background-image: radial-gradient(rgba(120, 90, 50, 0.08) 1px, transparent 0); background-size: 16px 16px; }
.pattern-dots { background-image: radial-gradient(rgba(100, 116, 139, 0.18) 2px, transparent 2px); background-size: 22px 22px; }
.pattern-stars { background-image: radial-gradient(rgba(234, 179, 8, 0.25) 1.5px, transparent 1.5px), radial-gradient(rgba(99, 102, 241, 0.16) 1.5px, transparent 1.5px); background-size: 32px 32px; background-position: 0 0, 16px 16px; }
.pattern-grid { background-image: linear-gradient(rgba(100, 116, 139, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 116, 139, 0.12) 1px, transparent 1px); background-size: 24px 24px; }

/* --------------------------------------------------------------------------
   7. Detailpresentaties: Boek, Digitale Lezer, Tekening & Knutselwerk
   -------------------------------------------------------------------------- */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
}
@media (max-width: 780px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-heading {
  margin: 0 2.5rem 0.6rem 0;
  font-size: var(--modal-h-size, 1.9rem);
  line-height: 1.18;
  font-weight: 800;
}

.detail-stamp-pill {
  display: inline-block;
  margin-bottom: 0.75rem;
  background: #fef08a;
  color: #422006;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* 3D Boek Omdraaien */
.book-stage {
  perspective: 1200px;
}

.book-flip-card {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  transform-style: preserve-3d;
  transition: transform 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 14px;
}
.book-flip-card.is-flipped {
  transform: rotateY(180deg);
}

.book-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 14px;
  overflow: hidden;
  background: #e2e8f0;
  box-shadow: -8px 12px 26px rgba(15, 23, 42, 0.25);
}
.book-face img { width: 100%; height: 100%; object-fit: cover; }
.book-face--back { transform: rotateY(180deg); }

.book-flip-controls {
  margin-top: 0.85rem;
  display: flex;
  justify-content: center;
}

/* Lijst- & Vitrinestijlen voor Tekeningen & Knutselwerken */
.art-frame {
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.25s ease;
}
.art-frame img { width: 100%; height: auto; max-height: 520px; object-fit: contain; background: rgba(0,0,0,0.04); }

.frame-wood {
  padding: 14px;
  background: linear-gradient(135deg, #b8824e 0%, #8b5a2b 50%, #a6713f 100%);
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.22), 0 12px 28px rgba(0,0,0,0.22);
}
.frame-wood img { border: 6px solid #fffdf8; border-radius: 4px; }

.frame-passepartout {
  padding: 20px;
  background: #ffffff;
  border: 6px solid #1e293b;
  box-shadow: 0 12px 28px rgba(0,0,0,0.18);
}
.frame-passepartout img { box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }

.frame-polaroid {
  padding: 14px 14px 44px;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.2);
}

.frame-museum {
  padding: 16px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(241,245,249,0.96));
  border: 2px solid #94a3b8;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.16);
}

.extra-gallery {
  margin-top: 0.9rem;
}
.extra-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.thumb-btn {
  width: 66px;
  height: 66px;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 2.5px solid transparent;
  cursor: pointer;
  background: #e2e8f0;
}
.thumb-btn.is-active { border-color: var(--accent); transform: scale(1.05); }
.thumb-btn img { width: 100%; height: 100%; object-fit: cover; }

.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.65rem;
  margin: 0.9rem 0 1.1rem;
}
.detail-meta-item {
  background: rgba(127, 127, 127, 0.12);
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
}
.detail-meta-item__label {
  display: block;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.78;
  font-weight: 700;
}
.detail-meta-item__value {
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}
.material-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.16);
  font-size: 0.86rem;
  font-weight: 700;
}

.detail-prose {
  white-space: pre-line;
  line-height: 1.65;
  margin: 0.75rem 0 1.1rem;
}

.detail-callout {
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(127, 127, 127, 0.12);
  margin: 0.85rem 0;
}

.detail-actions-row {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1.5px dashed rgba(127, 127, 127, 0.35);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.applaud-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 2px solid #f43f5e;
  background: #fff1f2;
  color: #9f1239;
  font-family: var(--font-display);
  font-weight: 700;
  cursor: pointer;
  min-height: 46px;
  transition: transform 0.18s ease, background-color 0.18s ease;
}
.applaud-btn:hover { transform: scale(1.04); background: #ffe4e6; }
.applaud-btn.is-liked { background: #e11d48; color: #ffffff; border-color: #e11d48; }

/* Digitale Kinderboeklezer */
.reader-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.reader-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding-right: 2.8rem;
}
.reader-progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(127, 127, 127, 0.22);
  overflow: hidden;
}
.reader-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.25s ease;
}
.reader-page {
  min-height: 360px;
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 2px solid rgba(127, 127, 127, 0.22);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
}
.reader-page__img {
  max-height: 58vh;
  width: auto;
  margin-inline: auto;
  border-radius: 12px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}
.reader-page__heading {
  margin: 0;
  font-size: calc(var(--modal-h-size, 1.7rem) * 0.85);
}
.reader-page__text {
  margin: 0;
  white-space: pre-line;
  line-height: 1.75;
}
.reader-page__caption {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.82;
}
.reader-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.reader-counter { font-weight: 800; }

/* --------------------------------------------------------------------------
   8. Creatieve Studio van Lize (Beheermodus)
   -------------------------------------------------------------------------- */
.studio-view {
  min-height: 100vh;
  background: #f5f7fb;
  color: #1e293b;
  --bg-surface: #ffffff;
  --bg-surface-strong: #ffffff;
  --bg-muted: #eef2f7;
  --text-main: #1e293b;
  --text-muted: #475569;
  --border-subtle: #cbd5e1;
  --accent: #6c5ce7;
  --accent-strong: #5544d4;
  --accent-soft: #ede9fe;
}

.studio-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #ffffff;
  border-bottom: 2px solid #e2e8f0;
  padding: 0.65rem 0;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
.studio-topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.studio-topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.studio-home-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: none;
  background: transparent;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 12px;
}
.studio-home-btn:hover { background: #f1f5f9; }

.autosave-pill {
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
}

.studio-topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.studio-root {
  padding: 1.5rem 0 4rem;
}

/* Dashboard */
.studio-hero {
  background: linear-gradient(135deg, #6c5ce7 0%, #8b5cf6 55%, #ec4899 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.8rem;
  margin-bottom: 1.4rem;
  box-shadow: var(--shadow-md);
}
.studio-hero h1 { margin: 0 0 0.35rem; font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.1rem); }
.studio-hero p { margin: 0; opacity: 0.94; }

.privacy-note {
  margin-top: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.18);
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
}

.milestone-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1.4rem;
}
.milestone-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.85rem;
  border-radius: 999px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #64748b;
}
.milestone-badge.is-earned {
  background: #fef9c3;
  border-color: #eab308;
  color: #713f12;
}

.dashboard-tiles {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(235px, 1fr));
}

.dash-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.45rem;
  padding: 1.35rem;
  border-radius: 22px;
  border: 2px solid #e2e8f0;
  background: #ffffff;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.dash-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #6c5ce7;
}
.dash-tile__icon { font-size: 2.3rem; line-height: 1; }
.dash-tile__title { font-family: var(--font-display); font-size: 1.18rem; font-weight: 700; color: #0f172a; }
.dash-tile__desc { font-size: 0.9rem; color: #475569; }
.dash-tile__badge {
  margin-top: auto;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  background: #ede9fe;
  color: #4c1d95;
  font-size: 0.82rem;
  font-weight: 700;
}

/* Statusbalken (Kladje vs. Live vs. Opgeborgen) */
.status-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1.2rem;
  border-radius: 16px;
  font-weight: 700;
  margin-bottom: 1.1rem;
  border: 2px solid transparent;
}
.status-banner--draft { background: #fef3c7; color: #78350f; border-color: #f59e0b; }
.status-banner--live { background: #dcfce7; color: #14532d; border-color: #22c55e; }
.status-banner--archived { background: #e2e8f0; color: #334155; border-color: #94a3b8; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}
.status-badge--published { background: #dcfce7; color: #166534; }
.status-badge--draft { background: #fef3c7; color: #92400e; }
.status-badge--archived { background: #e2e8f0; color: #334155; }
.status-badge--trashed { background: #fee2e2; color: #991b1b; }

/* Wizard & Formulieren */
.studio-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}
.studio-section-head h1, .studio-section-head h2 {
  margin: 0;
  font-family: var(--font-display);
}

.wizard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1.15rem;
}
.wizard-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.wizard-step-btn.is-active {
  background: #6c5ce7;
  border-color: #6c5ce7;
  color: #ffffff;
}

.editor-card {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 22px;
  padding: clamp(1rem, 2.5vw, 1.65rem);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.15rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}
.field-label {
  font-weight: 800;
  font-size: 0.94rem;
  color: #1e293b;
}
.field-hint {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0;
}

.text-input, .textarea-input, .select-input {
  width: 100%;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 0.65rem 0.9rem;
  background: #ffffff;
  color: #0f172a;
  font-size: 1rem;
  transition: border-color 0.15s ease;
}
.text-input:focus, .textarea-input:focus, .select-input:focus {
  border-color: #6c5ce7;
  outline: none;
}
.textarea-input { min-height: 110px; resize: vertical; line-height: 1.55; }

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}
.chip-btn {
  padding: 0.36rem 0.8rem;
  border-radius: 999px;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
.chip-btn.is-selected {
  background: #6c5ce7;
  border-color: #6c5ce7;
  color: #ffffff;
}

/* Foto-upload & 90°-draai/bijsnij-hulpmiddel */
.upload-box {
  border: 2.5px dashed #94a3b8;
  border-radius: 18px;
  padding: 1.25rem;
  text-align: center;
  background: #f8fafc;
}
.upload-preview-img {
  max-height: 290px;
  margin: 0 auto 0.9rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.photo-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.extra-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.85rem;
  margin-top: 0.9rem;
}
.extra-upload-item {
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.55rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.extra-upload-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

/* Digitale boekpagina-editor */
.digital-page-card {
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem;
  background: #f8fafc;
  margin-bottom: 0.9rem;
}
.digital-page-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

/* Vormgevingsengine + WCAG-contrastkiezer + Live Preview */
.style-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.35rem;
  align-items: start;
}
@media (max-width: 920px) {
  .style-workspace { grid-template-columns: 1fr; }
}

.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.swatch-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 2.5px solid rgba(15, 23, 42, 0.22);
  cursor: pointer;
  transition: transform 0.14s ease;
}
.swatch-btn:hover:not(:disabled) { transform: scale(1.1); }
.swatch-btn.is-selected {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px #ffffff, 0 0 0 6px #6c5ce7;
}
.swatch-btn.is-locked {
  opacity: 0.34;
  cursor: not-allowed;
}
.swatch-btn.is-locked::after {
  content: '🔒';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 10px;
}

.contrast-notice {
  margin-top: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  background: #eff6ff;
  border: 1.5px solid #93c5fd;
  color: #1e3a8a;
  font-size: 0.86rem;
  font-weight: 600;
}

.live-preview-box {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.preview-panel {
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 1rem;
  background: #f8fafc;
}
.preview-panel h4 { margin: 0 0 0.65rem; font-size: 0.92rem; color: #475569; }
.mini-modal-preview {
  border-radius: 16px;
  border: 3px solid var(--modal-border, #cbd5e1);
  background: var(--modal-bg, #ffffff);
  color: var(--modal-text, #1e293b);
  font-family: var(--modal-font, var(--font-body));
  padding: 1rem;
}
.mini-modal-preview h5 { margin: 0 0 0.35rem; font-size: var(--modal-h-size, 1.4rem); }
.mini-modal-preview p { margin: 0; font-size: var(--modal-p-size, 0.98rem); }

.editor-footer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}
.editor-footer-bar__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

/* Beheeroverzicht & Prullenbak */
.manage-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.manage-row {
  display: grid;
  grid-template-columns: auto 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 1rem;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
@media (max-width: 760px) {
  .manage-row { grid-template-columns: 64px minmax(0, 1fr); }
  .manage-row__drag { display: none; }
  .manage-row__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.manage-row.is-dragging { opacity: 0.5; }
.manage-row.is-drag-over { border-color: #6c5ce7; background: #f5f3ff; }

.drag-handle {
  cursor: grab;
  font-size: 1.2rem;
  color: #64748b;
  padding: 0.3rem;
  user-select: none;
}
.manage-thumb {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
  background: #e2e8f0;
}
.manage-row__title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.08rem;
}
.manage-row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: #475569;
}
.manage-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

/* Thema- & Mascottekeuze */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 0.8rem;
}
.theme-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.65rem;
  border-radius: 16px;
  border: 2.5px solid #cbd5e1;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
}
.theme-card.is-selected {
  border-color: #6c5ce7;
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.25);
}
.theme-card__swatch {
  height: 54px;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(0,0,0,0.1);
}

/* Opslagmeter */
.storage-bar {
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  margin: 0.65rem 0;
}
.storage-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #3b82f6);
  transition: width 0.35s ease;
}
.storage-bar__fill.is-warn {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* --------------------------------------------------------------------------
   9. Login, Bevestiging, Certificaat, Confetti & Toasts
   -------------------------------------------------------------------------- */
.login-box, .confirm-box, .cert-box { text-align: center; }
.login-box__icon, .confirm-box__icon { font-size: 2.8rem; margin-bottom: 0.35rem; }
.login-box__title, .confirm-box__title, .cert-box__title { margin: 0 0 0.4rem; font-family: var(--font-display); }
.login-box__desc, .confirm-box__message, .cert-box__desc { margin: 0 0 1.1rem; color: #475569; }
.login-form { text-align: left; }
.password-input-wrap { display: flex; gap: 0.45rem; }
.password-toggle-btn {
  min-width: 48px; border-radius: 14px; border: 2px solid #cbd5e1;
  background: #f8fafc; cursor: pointer;
}
.form-error { color: #b91c1c; font-weight: 700; font-size: 0.9rem; margin: 0.6rem 0; }
.info-callout {
  background: #eef2ff; border: 1.5px solid #a5b4fc; color: #312e81;
  border-radius: 14px; padding: 0.7rem 0.9rem; font-size: 0.9rem; margin-bottom: 1rem;
}
.login-form__actions, .confirm-box__actions, .cert-box__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.65rem; margin-top: 1.15rem;
}
.cert-canvas-wrap {
  border-radius: 14px; overflow: hidden; border: 2px solid #cbd5e1;
  box-shadow: var(--shadow-sm); background: #fffdf8;
}
#certificate-canvas { width: 100%; height: auto; display: block; }

.confetti-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1500;
}

.toast-container {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 1600;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: min(390px, calc(100vw - 2rem));
}
.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 0.8rem 1.1rem;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  font-weight: 600;
  font-size: 0.94rem;
  animation: toastIn 0.25s ease;
}
.toast--success { background: #14532d; }
.toast--warn { background: #92400e; }
.toast--error { background: #991b1b; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsieve verfijning mobiel */
@media (max-width: 640px) {
  .site-header__card { padding: 1.2rem 1rem 1rem; }
  .site-header__hero { padding-right: 0; flex-wrap: wrap; padding-top: 2rem; }
  .publisher-mascot { display: none; }
  .filter-bar { position: static; }
}

/* Respecteer voorkeur voor minder beweging */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   10. Printstijl voor het Uitgeverscertificaat
   -------------------------------------------------------------------------- */
.print-certificate-area { display: none; }

@media print {
  body > *:not(.print-certificate-area) { display: none !important; }
  .print-certificate-area {
    display: block !important;
    width: 100%;
    text-align: center;
    padding: 0;
  }
  .print-certificate-area img {
    width: 100%;
    max-width: 260mm;
    height: auto;
    margin: 0 auto;
  }
}