[hidden] { display: none !important; }
:root {
  --font-display: "Cabinet Grotesk", "Satoshi", system-ui, sans-serif;
  --font-body: "Satoshi", "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1vw, 2.125rem);
  --text-hero: clamp(2.5rem, 1.6rem + 4vw, 4.75rem);

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 72px;
  --radius: 14px;
  --radius-sm: 8px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="light"] {
  --bg: #f2eee6;
  --surface: #fbf9f4;
  --surface-2: #e8e2d6;
  --ink: #1c1a17;
  --muted: #625c52;
  --line: #d6cebf;
  --accent: #b83a0a;
  --accent-hover: #9a3008;
  --on-accent: #fffaf4;
  --shadow: 0 1px 0 rgba(28, 26, 23, 0.06), 0 10px 30px -18px rgba(28, 26, 23, 0.35);
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #151311;
  --surface: #1e1b18;
  --surface-2: #2a2622;
  --ink: #efe9df;
  --muted: #a69e91;
  --line: #34302a;
  --accent: #ee6a33;
  --accent-hover: #f5824f;
  --on-accent: #1a0d05;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4), 0 14px 34px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
.mono { font-family: var(--font-mono); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: var(--s4); top: var(--s4); z-index: 10; background: var(--ink); color: var(--bg); padding: var(--s2) var(--s4); border-radius: var(--radius-sm); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(1200px, 100% - 2 * clamp(16px, 4vw, 40px)); margin-inline: auto; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; }
.brand__mark {
  width: 22px; height: 22px; background: var(--accent);
  /* Pixel-Figur aus Rechtecken */
  clip-path: polygon(0 0,25% 0,25% 25%,75% 25%,75% 0,100% 0,100% 100%,75% 100%,75% 75%,25% 75%,25% 100%,0 100%);
  border-radius: 2px;
}
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.25rem; letter-spacing: -0.01em; }
.top__meta { display: flex; align-items: center; gap: var(--s3); }
.counter { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.counter b { color: var(--ink); font-weight: 600; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: border-color 0.2s; }
.icon-btn:hover { border-color: var(--ink); }
[data-theme="light"] .i-sun, [data-theme="dark"] .i-moon { display: none; }

/* Intro */
.intro { padding-block: clamp(40px, 7vw, 88px) clamp(24px, 4vw, 40px); max-width: 1200px; }
.kicker { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent); margin-bottom: var(--s4); }
h1 { font-family: var(--font-display); font-weight: 800; font-size: var(--text-hero); line-height: 0.98; letter-spacing: -0.03em; max-width: 14ch; }
.lede { margin-top: var(--s5); max-width: 52ch; color: var(--muted); font-size: var(--text-lg); line-height: 1.5; }

/* Featured */
.featured {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px);
  overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit;
}
.featured__art { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; }
.featured__art img, .featured__art svg { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
a.featured:hover .featured__art img, a.featured:hover .featured__art svg { transform: scale(1.03); }
.featured__body { display: flex; flex-direction: column; justify-content: center; gap: var(--s4); padding: clamp(24px, 4vw, 48px); }
.featured__label { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); display: flex; align-items: center; gap: var(--s2); }
.featured__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); animation: pulse 2.4s var(--ease) infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--accent) 0%, transparent); } }
.featured__title { font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); line-height: 1.05; letter-spacing: -0.02em; }
.featured__desc { color: var(--muted); max-width: 46ch; }
.featured__meta { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); }
.btn {
  align-self: flex-start; display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5); border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-weight: 700; font-size: var(--text-sm); letter-spacing: 0.01em; transition: background-color 0.2s, transform 0.2s var(--ease);
}
a.featured:hover .btn { background: var(--accent-hover); }
a.featured:hover .btn svg { transform: translateX(3px); }
.btn svg { transition: transform 0.2s var(--ease); }

/* Library */
.library { padding-block: clamp(48px, 7vw, 88px) var(--s8); }
.library__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; padding-bottom: var(--s5); border-bottom: 1px solid var(--line); margin-bottom: var(--s5); }
h2 { font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); letter-spacing: -0.02em; line-height: 1; }
.toolbar { display: flex; gap: var(--s3); flex-wrap: wrap; }
.search { display: flex; align-items: center; gap: var(--s2); height: 44px; padding: 0 var(--s3); border: 1px solid var(--line); background: var(--surface); border-radius: 999px; min-width: 240px; color: var(--muted); transition: border-color 0.2s; }
.search:focus-within { border-color: var(--ink); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; color: var(--ink); font-size: var(--text-sm); }
.search input::-webkit-search-cancel-button { display: none; }
.search kbd { font-family: var(--font-mono); font-size: 11px; border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); height: 44px; }
.seg button { border: 0; background: transparent; padding: 0 var(--s4); border-radius: 999px; font-size: var(--text-sm); font-weight: 500; color: var(--muted); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.seg button[aria-checked="true"] { background: var(--ink); color: var(--bg); }

.tags { display: flex; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s5); }
.tag { min-height: 36px; padding: 0 var(--s4); border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: var(--text-sm); cursor: pointer; color: var(--muted); }
.tag[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: var(--s5); }
.card { content-visibility: auto; contain-intrinsic-size: 320px; animation: rise 0.45s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.card__link { display: flex; flex-direction: column; height: 100%; text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s; }
.card__link:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ink) 40%, var(--line)); box-shadow: var(--shadow); }
.card__art { aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; border-bottom: 1px solid var(--line); }
.card__art img, .card__art svg { width: 100%; height: 100%; object-fit: cover; }
.card__body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s4) var(--s4) var(--s4); flex: 1; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.card__title { font-size: var(--text-lg); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.card__desc { color: var(--muted); font-size: var(--text-sm); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.9em; }
.card__foot { margin-top: auto; padding-top: var(--s3); display: flex; justify-content: space-between; gap: var(--s3); font-size: var(--text-xs); color: var(--muted); }
.card__host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card__time { flex-shrink: 0; }
.badge { flex-shrink: 0; font-family: var(--font-mono); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); }

/* States */
.state { padding: clamp(40px, 8vw, 80px) var(--s5); text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.state h3 { font-family: var(--font-display); font-weight: 800; font-size: var(--text-xl); letter-spacing: -0.02em; margin-bottom: var(--s3); }
.state p { color: var(--muted); max-width: 52ch; margin: 0 auto; }
.state ol { text-align: left; max-width: 56ch; margin: var(--s5) auto 0; padding-left: 1.3em; color: var(--muted); display: grid; gap: var(--s2); }
.state code { font-family: var(--font-mono); font-size: 0.9em; background: var(--surface-2); padding: 1px 6px; border-radius: 5px; color: var(--ink); }
.state .actions { margin-top: var(--s5); display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }
.state .pixel { width: 64px; height: 64px; margin: 0 auto var(--s5); color: var(--accent); animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.ghost-btn { min-height: 44px; padding: 0 var(--s5); border-radius: 999px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 500; font-size: var(--text-sm); }
.ghost-btn:hover { border-color: var(--ink); }
.solid-btn { min-height: 44px; padding: 0 var(--s5); border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; font-weight: 700; font-size: var(--text-sm); }
.solid-btn:hover { background: var(--accent-hover); }

/* Skeleton */
.skel { display: block; background: linear-gradient(90deg, var(--surface-2) 0%, color-mix(in srgb, var(--surface-2) 55%, var(--surface)) 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: 6px; }
.skel--line { height: 14px; width: 100%; }
.skel--title { height: 40px; width: 80%; }
.featured.is-loading .featured__art { border-radius: 0; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Footer */
.foot { border-top: 1px solid var(--line); }
.foot__inner { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); min-height: 72px; font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); flex-wrap: wrap; padding-block: var(--s3); }
.link-btn { border: 0; background: none; padding: var(--s3) 0; cursor: pointer; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; font-family: var(--font-mono); font-size: var(--text-xs); }

@media (max-width: 820px) {
  .featured { grid-template-columns: 1fr; }
  .library__head { align-items: stretch; flex-direction: column; }
  .toolbar { width: 100%; }
  .search { flex: 1; min-width: 0; }
}
@media (max-width: 420px) {
  .counter { display: none; }
  .toolbar { flex-direction: column; }
  .seg { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Splashscreen */
.splash-on body { overflow: hidden; }
.splash {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; cursor: pointer;
  background: #1c1a17; color: #ee6a33;
  clip-path: inset(0 0 0 0);
  transition: clip-path 0.7s cubic-bezier(0.7, 0, 0.2, 1);
}
.splash.is-out { clip-path: inset(0 0 100% 0); }
.splash.is-out .splash__inner { transform: translateY(-40px); opacity: 0; transition: transform 0.5s var(--ease), opacity 0.35s; }
.splash__scan {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 4px);
}
.splash__scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 30%;
  background: linear-gradient(180deg, transparent, rgba(238,106,51,0.06), transparent);
  animation: scan 2.4s linear infinite;
}
@keyframes scan { from { top: -30%; } to { top: 100%; } }
.splash__inner { display: flex; flex-direction: column; align-items: center; gap: 28px; }
.splash__mark { width: clamp(88px, 16vw, 132px); height: auto; overflow: visible; }
.splash__mark .px {
  transform-box: fill-box; transform-origin: center;
  animation: pxIn 0.42s cubic-bezier(0.3, 1.6, 0.5, 1) both, pxBob 1.2s steps(2) 1.4s infinite;
  animation-delay: calc(var(--d) * 70ms + 150ms), 1.4s;
}
@keyframes pxIn { from { transform: scale(0) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pxBob { 50% { transform: translateY(-0.6px); } }
.splash__word { overflow: hidden; padding: 0 4px; }
.splash__word span {
  display: block; font-family: var(--font-display); font-weight: 800; color: #efe9df;
  font-size: clamp(2.5rem, 1.5rem + 5vw, 5rem); letter-spacing: -0.03em; line-height: 1.05;
  animation: wordUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.85s both;
}
@keyframes wordUp { from { transform: translateY(105%); } }
.splash__bar { display: flex; gap: 5px; }
.splash__bar i { width: 12px; height: 12px; background: currentColor; opacity: 0.15; animation: barOn 0.01s linear both; }
.splash__bar i:nth-child(1) { animation-delay: 1.15s } .splash__bar i:nth-child(2) { animation-delay: 1.23s }
.splash__bar i:nth-child(3) { animation-delay: 1.31s } .splash__bar i:nth-child(4) { animation-delay: 1.39s }
.splash__bar i:nth-child(5) { animation-delay: 1.47s } .splash__bar i:nth-child(6) { animation-delay: 1.55s }
.splash__bar i:nth-child(7) { animation-delay: 1.63s } .splash__bar i:nth-child(8) { animation-delay: 1.71s }
.splash__bar i:nth-child(9) { animation-delay: 1.79s } .splash__bar i:nth-child(10) { animation-delay: 1.87s }
.splash__bar i:nth-child(11) { animation-delay: 1.95s } .splash__bar i:nth-child(12) { animation-delay: 2.03s }
@keyframes barOn { to { opacity: 1; } }
.splash__hint {
  font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: 0.3em; text-transform: uppercase; color: #a69e91;
  animation: blink 1s steps(2) 1.2s infinite both;
}
@keyframes blink { 0% { opacity: 0; } 50% { opacity: 1; } }
