@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #07070a;
  --bg-2: #0f0f15;
  --line: rgba(247, 181, 28, 0.14);
  --text: #f2efe6;
  --muted: #9b98a6;
  --gold: #f2c14e;
  --gold-hi: #ffd76a;
  --gold-dark: #8a5c0e;
  --orange: #f2801f;
  --red: #e5262b;
  --cream: #f4e6c4;
  --glow: 0 0 18px rgba(247, 181, 28, 0.5), 0 0 42px rgba(242, 128, 31, 0.3);
  --gold-grad: linear-gradient(180deg, #ffe9a0 0%, #f7c23a 35%, #f29b1f 70%, #c9620f 100%);
  --display: 'Bebas Neue', 'Impact', sans-serif;
  --ui: 'Oswald', 'Arial Narrow', sans-serif;
  --body: 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--body);
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
img { display: block; }

/* ---------- Sfeer: gloed, neon-vloer, korrel, scanlines ---------- */

.fx { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.glow { position: absolute; inset: -20% -40%; filter: blur(40px); animation: drift 50s linear infinite alternate; }
.glow-a { background: radial-gradient(35% 30% at 20% 20%, rgba(247, 181, 28, 0.16), transparent 70%), radial-gradient(30% 25% at 80% 70%, rgba(242, 128, 31, 0.12), transparent 70%); }
.glow-b { background: radial-gradient(30% 25% at 70% 10%, rgba(229, 38, 43, 0.10), transparent 70%), radial-gradient(40% 30% at 30% 90%, rgba(120, 80, 255, 0.07), transparent 70%); animation-duration: 80s; animation-direction: alternate-reverse; }
@keyframes drift { from { transform: translateX(-10%); } to { transform: translateX(10%); } }
.grid-floor {   /* retro neon-vloer onderaan het scherm */
  position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%;
  background:
    repeating-linear-gradient(90deg, rgba(247, 181, 28, 0.13) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(247, 181, 28, 0.13) 0 1px, transparent 1px 80px);
  transform: perspective(420px) rotateX(62deg);
  transform-origin: bottom;
  mask-image: linear-gradient(0deg, rgba(0,0,0,.9), transparent 75%);
  -webkit-mask-image: linear-gradient(0deg, rgba(0,0,0,.9), transparent 75%);
  animation: floor 4s linear infinite;
  opacity: 0.55;
}
@keyframes floor { to { background-position: 0 80px, 0 80px; } }
.grain {
  position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  opacity: 0.06;
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -4%); }
  60% { transform: translate(-4%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
.scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 3px); }
.vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 20%, transparent 45%, rgba(0,0,0,0.85) 100%); }

/* ---------- Knoppen ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font: 500 14px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}
.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); }
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
.btn-ghost { background: transparent; }
.btn-gold { background: var(--gold-grad); border-color: rgba(255, 215, 106, 0.6); color: #2a1600; font-weight: 600; text-shadow: 0 1px 0 rgba(255,255,255,0.3); }
.btn-gold:hover { box-shadow: var(--glow); background: var(--gold-grad); border-color: var(--gold-hi); }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(255, 255, 255, 0.1); }
.seg button {
  height: 32px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font: 500 13px/1 var(--ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  transition: background 0.2s, color 0.2s;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--gold-grad); color: #2a1600; box-shadow: 0 0 12px rgba(247, 181, 28, 0.4); }

/* ---------- Archief: kop ---------- */

.library .hero, .library .toolbar, .library .page, .library .foot { position: relative; z-index: 1; }
.hero { padding: clamp(24px, 6vw, 60px) 16px 6px; text-align: center; }
.hero-inner { max-width: 1100px; margin: 0 auto; position: relative; }
.hero-pu { width: clamp(110px, 16vw, 170px); margin: 0 auto -12px; filter: drop-shadow(0 8px 24px rgba(247, 150, 28, 0.35)); }
.logo { margin: 0; line-height: 0.85; display: flex; flex-direction: column; align-items: center; }
.logo-word {
  display: inline-block;
  font: 400 clamp(54px, 12vw, 150px)/0.88 var(--display); letter-spacing: 0.02em;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 22px rgba(247, 150, 28, 0.35)) drop-shadow(0 6px 0 rgba(0,0,0,0.6));
}
body.shine .logo-word { animation: pop 1.4s ease; }   /* af en toe een power-up-flits */
@keyframes pop { 30% { filter: drop-shadow(0 0 44px rgba(255, 215, 100, 0.9)) brightness(1.25) drop-shadow(0 6px 0 rgba(0,0,0,0.6)); } }
.logo-sub { font: 600 clamp(15px, 3.4vw, 24px)/1 var(--ui); letter-spacing: 0.9em; text-transform: uppercase; color: var(--cream); margin: 10px 0 0 0.9em; opacity: 0.9; }
.speed { display: grid; gap: 5px; width: min(640px, 86%); margin: 18px auto 0; }
.speed i { display: block; height: 5px; border-radius: 5px; background: linear-gradient(90deg, transparent, var(--orange) 20%, var(--gold-hi) 50%, var(--orange) 80%, transparent); box-shadow: 0 0 12px rgba(247, 150, 28, 0.6); animation: zoom 3s ease-in-out infinite; }
.speed i:nth-child(2) { width: 80%; margin: 0 auto; animation-delay: .15s; opacity: .8; }
.speed i:nth-child(3) { width: 60%; margin: 0 auto; animation-delay: .3s; opacity: .6; }
@keyframes zoom { 50% { transform: scaleX(1.06); filter: brightness(1.3); } }
.tagline { margin: 20px 0 4px; font: italic 500 clamp(15px, 2.4vw, 18px)/1.4 var(--body); color: var(--cream); opacity: 0.9; }
.stats { margin: 0; font: 400 13px/1.7 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stats i, .block-head i { color: var(--gold); font-style: normal; margin: 0 6px; }
.stats b { color: var(--text); font-weight: 600; }
.hero { position: relative; }
/* zwevend "30 jaar"-embleem in de hoek; schaalt mee zodat het nooit over de titel valt */
.emblem {
  position: absolute; right: clamp(12px, 2.5vw, 36px); top: clamp(12px, 2vw, 30px); width: clamp(64px, 11vw, 160px);
  filter: drop-shadow(0 16px 40px rgba(233, 185, 73, 0.3)); animation: float 7s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-10px) rotate(-2deg); } }

/* ---------- Archief: werkbalk ---------- */

.toolbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 10px 14px;
  margin-top: 26px; padding: 10px max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(7, 7, 10, 0.96), rgba(7, 7, 10, 0.86));
  border-bottom: 1px solid var(--line); border-top: 1px solid var(--line);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.years {
  position: relative; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; flex: 1;
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
.years::-webkit-scrollbar { display: none; }
.years a {
  position: relative; flex: none; padding: 8px 10px 9px; text-decoration: none;
  font: 600 17px/1 var(--ui); letter-spacing: 0.06em; color: var(--muted); transition: color 0.2s;
}
.years a:hover { color: var(--text); }
.years a.on { color: #fff; text-shadow: 0 0 14px rgba(247, 181, 28, 0.8); }
.years a.on::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; border-radius: 3px;
  background: var(--gold); box-shadow: 0 0 10px var(--gold);
}
.tools { display: flex; align-items: center; gap: 8px; flex: none; }
.search { position: relative; display: flex; align-items: center; }
.search svg { position: absolute; left: 12px; width: 16px; height: 16px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; pointer-events: none; }
.search input {
  width: 250px; height: 38px; padding: 0 12px 0 34px;
  border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 999px; background: rgba(0, 0, 0, 0.5);
  color: var(--text); font: 500 15px var(--ui); letter-spacing: 0.03em; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, width 0.25s;
}
.search input:focus { width: 320px; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(247, 181, 28, 0.2); }
@media (max-width: 900px) {
  .toolbar { flex-wrap: wrap; }
  .years { flex-basis: 100%; order: 2; }
  .tools { flex: 1; }
  .tools .search { flex: 1; }
  .search input, .search input:focus { width: 100%; }
}
@media (max-width: 520px) { #sort { display: none; } #dare { padding: 0 12px; } }

/* ---------- Archief: planken ---------- */

.page { max-width: 1480px; margin: 0 auto; padding: 14px max(16px, env(safe-area-inset-right)) 40px max(16px, env(safe-area-inset-left)); }
.section-title, .block-head {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 16px; margin: 34px 0 16px;
  font: 400 clamp(32px, 5vw, 48px)/1 var(--display); letter-spacing: 0.04em; color: var(--cream);
}
.section-title::after, .block-head::after { content: ""; flex: 1; min-width: 40px; height: 1px; align-self: center; background: linear-gradient(90deg, var(--line), transparent); }
.block-head span { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 14px rgba(247, 150, 28, 0.35)); }
.block-head small { order: 3; flex-basis: 100%; font: 400 13px/1 var(--ui); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
@media (min-width: 700px) { .block-head small { order: 0; flex-basis: auto; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 26px 20px; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 160px; gap: 20px; overflow-x: auto; padding: 6px 2px 16px; scroll-snap-type: x proximity; }
.row .cover { scroll-snap-align: start; }
@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px 10px; }
  .row { grid-auto-columns: 30vw; gap: 10px; }
}
.quick:empty { display: none; }
.quick { margin-bottom: 30px; }

.cover { display: block; text-decoration: none; outline: none; perspective: 900px; }
.cover-img {
  position: relative; aspect-ratio: 0.75; border-radius: 6px; overflow: hidden;
  background: linear-gradient(110deg, #15151d 30%, #23232e 50%, #15151d 70%) 0 0 / 300% 100%;
  animation: pulse 1.6s linear infinite;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1.2), box-shadow 0.35s;
}
.cover-img.in { animation: none; background: #111; }
@keyframes pulse { to { background-position: -300% 0; } }
.cover-img img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.5s, filter 0.4s; }
.cover-img.in img { opacity: 1; }
.cover-img::before {   /* glimlicht dat de muis volgt */
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.3), transparent 45%);
  opacity: 0; transition: opacity 0.3s;
}
.cover-img::after {    /* gouden gloed die opkomt bij hover */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(242, 128, 31, 0.8), rgba(247, 181, 28, 0) 55%);
  opacity: 0; transition: opacity 0.35s;
}
.cover-no {
  position: absolute; left: 0; right: 0; bottom: 6px; z-index: 2; text-align: center;
  font: 400 clamp(32px, 4vw, 44px)/1 var(--display); color: #fff; letter-spacing: 0.04em;
  text-shadow: 0 2px 0 #000, 0 0 16px rgba(247, 150, 28, 0.9);
  opacity: 0; transform: translateY(12px); transition: opacity 0.3s, transform 0.35s;
}
.cover:hover .cover-img, .cover:focus-visible .cover-img {
  transform: rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-6px) scale(1.04);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.7), 0 0 0 2px var(--gold), var(--glow);
}
.cover:hover .cover-img::before, .cover:hover .cover-img::after, .cover:focus-visible .cover-img::after { opacity: 1; }
.cover:hover .cover-no, .cover:focus-visible .cover-no { opacity: 1; transform: none; }
.cover.done .cover-img img { filter: grayscale(0.6) brightness(0.7); }
.cover.done:hover .cover-img img { filter: none; }
.cover-done {
  position: absolute; top: 6px; right: 6px; z-index: 2; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font: 700 15px/1 var(--body); color: #2a1600;
  background: var(--gold-grad); box-shadow: 0 0 12px rgba(247, 181, 28, 0.6);
}
.cover-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(0, 0, 0, 0.65); z-index: 3; }
.cover-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--orange), var(--gold-hi)); box-shadow: 0 0 8px var(--gold); }
.cover-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 9px 2px 0; }
.cover-title { font: 600 14px/1.2 var(--ui); letter-spacing: 0.05em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover-pages { flex: none; font: 400 12px/1.2 var(--ui); color: var(--muted); letter-spacing: 0.03em; }
@media (max-width: 520px) { .cover-pages { display: none; } .cover-title { font-size: 12px; } }

.hint { color: var(--muted); font-style: italic; }

/* ---------- Archief: zoekresultaten ---------- */

.results-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.results-head .section-title { flex: 1; min-width: 240px; }
.hit-issue {
  display: grid; grid-template-columns: 100px 1fr; gap: 18px; padding: 18px 0;
  border-bottom: 1px solid var(--line);
  animation: rise .35s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.hit-cover img { width: 100%; aspect-ratio: 0.75; object-fit: cover; border-radius: 5px; box-shadow: 0 6px 16px rgba(0,0,0,0.6); transition: box-shadow 0.3s, transform 0.3s; }
.hit-cover:hover img { box-shadow: var(--glow); transform: rotate(-1.5deg); }
.hit-body { min-width: 0; }
.hit-body h3 { margin: 0 0 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font: 400 30px/1 var(--display); letter-spacing: 0.04em; }
.hit-body h3 a { text-decoration: none; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hit-body h3 small { font: 500 12px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hit-pages { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 290px); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.hit {
  display: grid; grid-template-columns: 66px 1fr; grid-template-rows: auto 1fr; gap: 3px 11px;
  padding: 9px; border-radius: 9px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(255, 255, 255, 0.07);
  text-decoration: none; scroll-snap-align: start; transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.hit:hover { background: rgba(247, 181, 28, 0.1); border-color: rgba(247, 181, 28, 0.5); transform: translateY(-2px); }
.hit img { grid-row: 1 / 3; width: 66px; aspect-ratio: 0.75; object-fit: cover; border-radius: 3px; background: #1a1a22; }
.hit-no { font: 600 12px/1.2 var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.hit-snip { font-size: 13px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.hit-more { display: grid; place-items: center; grid-template-columns: 1fr; font: 600 14px var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); min-width: 120px; }
mark { background: none; color: #fff; font-weight: 600; text-shadow: 0 0 10px rgba(247, 181, 28, 0.9); box-shadow: inset 0 -0.45em 0 rgba(242, 128, 31, 0.55); }
@media (max-width: 520px) {
  .hit-issue { grid-template-columns: 58px 1fr; gap: 10px; }
  .hit-pages { grid-auto-columns: 78vw; }
  .hit-body h3 { font-size: 24px; }
}
.more { display: flex; margin: 26px auto 0; }
.spinner { width: 30px; height: 30px; margin: 50px auto; border: 3px solid rgba(255,255,255,0.1); border-top-color: var(--gold); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; padding: 26px 16px 40px; color: var(--muted); font: 400 13px/1.4 var(--ui); letter-spacing: 0.1em; text-transform: uppercase; border-top: 1px solid var(--line); }
.to-top { position: fixed; right: 18px; bottom: 18px; z-index: 6; width: 44px; height: 44px; padding: 0; background: rgba(15, 15, 21, 0.9); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.to-top.show { opacity: 1; pointer-events: auto; }

@media (prefers-reduced-motion: reduce) {
  .glow, .grain, .grid-floor, .speed i, .emblem, .cover-img, .hit-issue { animation: none !important; }
  .cover-img, .cover-no { transition: none; }
}

/* ---------- Lezer ---------- */

body.reader { position: fixed; inset: 0; overflow: hidden; background: #000; touch-action: none; }
body.reader::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(130% 100% at 50% 50%, transparent 60%, rgba(60, 35, 0, 0.5) 100%); }
.stage { position: absolute; inset: 0; overflow: hidden; cursor: default; user-select: none; -webkit-user-select: none; }
.spread { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; transform-origin: 0 0; will-change: transform; }
.spread.animate { transition: transform 0.22s ease; }
.spread .pg { position: relative; flex: none; background: #111; box-shadow: 0 0 60px rgba(0, 0, 0, 0.9); }   /* maat via fitSpread() */
.spread .pg + .pg::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 30px; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(0,0,0,0.28), transparent); }
.spread .pg:first-child:not(:last-child)::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 30px; pointer-events: none; background: linear-gradient(270deg, rgba(0,0,0,0.22), transparent); }
.spread img { width: 100%; height: 100%; opacity: 0; transition: opacity 0.25s; }
.spread img.in { opacity: 1; }

.find {
  position: fixed; z-index: 4; top: 70px; right: max(12px, env(safe-area-inset-right)); width: min(380px, calc(100vw - 24px));
  max-height: calc(100vh - 150px); display: flex; flex-direction: column;
  background: rgba(12, 12, 16, 0.95); border: 1px solid rgba(247, 181, 28, 0.3); border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(247, 150, 28, 0.15);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: fadein 0.2s;
}
.find[hidden] { display: none; }
.find-head { display: flex; gap: 6px; padding: 10px; }
.find-head input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 999px; outline: none;
  border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(0, 0, 0, 0.5); color: var(--text); font: 500 15px var(--body);
}
.find-head input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(247, 181, 28, 0.2); }
.find-count { padding: 0 16px 6px; font: 500 12px var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.find-list { overflow-y: auto; padding: 0 8px 8px; }
.find-list a { display: grid; grid-template-columns: 46px 1fr; gap: 8px; padding: 8px; border-radius: 8px; text-decoration: none; font-size: 13px; line-height: 1.4; color: var(--muted); }
.find-list a:hover { background: rgba(247, 181, 28, 0.12); }
.find-list b { font: 600 13px var(--ui); color: var(--gold); letter-spacing: 0.05em; }
.find-keys { padding: 8px 16px 10px; border-top: 1px solid var(--line); font: 400 11px var(--ui); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
@media (hover: none) { .find-keys { display: none; } }

.rbar, .rfoot { position: fixed; left: 0; right: 0; z-index: 3; transition: transform 0.3s ease, opacity 0.3s ease; }
.rbar {
  top: 0; display: flex; align-items: center; gap: 12px;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.55) 70%, transparent);
}
.rtitle { flex: 1; min-width: 0; }
.rname { font: 400 28px/1 var(--display); letter-spacing: 0.04em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsub { font: 400 12px/1.4 var(--ui); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.rtools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.rfoot { bottom: 0; padding: 22px max(16px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); background: linear-gradient(0deg, rgba(0, 0, 0, 0.9), transparent); }
body.chrome-hidden .rbar { transform: translateY(-100%); opacity: 0; pointer-events: none; }
body.chrome-hidden .rfoot { transform: translateY(100%); opacity: 0; pointer-events: none; }
@media (max-width: 640px) {
  .rbar { flex-wrap: wrap; }
  .rtitle { order: -1; flex-basis: calc(100% - 120px); }
  .rtools { width: 100%; justify-content: flex-start; }
  .rtools .btn { height: 34px; padding: 0 11px; font-size: 12px; }
}

input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--orange), var(--gold-hi)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--orange), var(--gold-hi)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 4px rgba(247, 150, 28, 0.5), 0 0 14px var(--gold); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border: 0; border-radius: 50%; background: var(--cream); box-shadow: 0 0 0 4px rgba(247, 150, 28, 0.5), 0 0 14px var(--gold); }

.toast {
  position: fixed; left: 50%; top: 50%; z-index: 6; transform: translate(-50%, -50%) scale(0.9);
  padding: 10px 22px; border-radius: 12px; background: rgba(0, 0, 0, 0.8); border: 1px solid var(--line);
  font: 400 40px/1 var(--display); letter-spacing: 0.05em; color: var(--gold); text-shadow: 0 0 14px rgba(247, 181, 28, 0.6);
  opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.pagegrid { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; background: rgba(6, 6, 9, 0.97); touch-action: pan-y; }
.pagegrid[hidden], .endcard[hidden] { display: none; }
.pagegrid-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: max(10px, env(safe-area-inset-top)) 16px 10px; border-bottom: 1px solid var(--line); font: 500 15px/1.2 var(--ui); letter-spacing: 0.08em; text-transform: uppercase; }
.pagegrid-list { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px; padding: 16px; align-content: start; }
.pagegrid-list a { display: flex; flex-direction: column; align-items: center; gap: 5px; text-decoration: none; color: var(--muted); font: 500 13px var(--ui); }
.pagegrid-list img { width: 100%; aspect-ratio: var(--ratio); object-fit: cover; border-radius: 4px; background: #1a1a22; box-shadow: 0 4px 12px rgba(0,0,0,0.6); transition: transform .2s; }
.pagegrid-list a:hover img { transform: translateY(-3px); }
.pagegrid-list a.current img { outline: 3px solid var(--gold); box-shadow: var(--glow); }
.pagegrid-list a.current { color: #fff; }

.endcard { position: fixed; inset: 0; z-index: 6; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle at 50% 40%, rgba(90, 55, 0, 0.85), rgba(0, 0, 0, 0.95)); animation: fadein 0.4s; }
@keyframes fadein { from { opacity: 0; } }
.endcard-box { max-width: 560px; text-align: center; }
.endcard-title { font: 400 clamp(48px, 10vw, 84px)/1 var(--display); letter-spacing: 0.04em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 24px rgba(247, 150, 28, 0.6)); }
.endcard p { color: var(--cream); font-style: italic; margin: 14px 0 24px; }
.endcard-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
