/*
 * Daddelkiste – Portal
 * Bildsprache: Spielzeug-Plastik. Kräftige Umrisse, harte Schatten, jedes Spiel ist ein Steckmodul.
 */
/* Schriften liegen hier selbst – es geht keine Anfrage an fremde Server (Lizenz: fonts/OFL.txt) */
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 400 800;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url(fonts/bricolage-grotesque-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --paper: #ece8fb;
  --paper-deep: #ddd6f6;
  --ink: #22174a;
  --ink-soft: #554a80;
  --sun: #ffc93c;
  --focus: #6b4dff;
  --line: 3px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--paper); }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.05; font-stretch: 82%; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Kopfzeile ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand svg { width: 30px; height: 34px; flex: none; }
.brand-name {
  font-size: 1.65rem;
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.01em;
  line-height: 1;
}
.back {
  font-weight: 600;
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.back:hover { border-bottom-color: currentColor; }

/* ---------- Knöpfe ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px 10px;
  border: var(--line) solid var(--ink);
  border-radius: 12px;
  background: var(--sun);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn svg { width: 18px; height: 18px; }

/* ---------- Startseite ---------- */
.intro { padding-top: clamp(18px, 5vw, 56px); padding-bottom: clamp(26px, 4vw, 44px); max-width: 40rem; }
.intro h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.4rem);
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.02em;
  line-height: 0.95;
}
.intro p { margin: 16px 0 0; font-size: 1.12rem; color: var(--ink-soft); max-width: 32rem; }

/* Das Regal: Steckmodule nebeneinander */
.shelf {
  list-style: none;
  margin: 0;
  padding: 0 0 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr));
  gap: clamp(22px, 3vw, 34px);
  max-width: 1000px;
}
.shelf > li { display: flex; }

/* ---------- Steckmodul (Spielkarte) ---------- */
.cart {
  --c: #b9a8ff;
  --c-ink: var(--ink);
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 36px 14px 16px;
  border: var(--line) solid var(--ink);
  border-radius: 20px 20px 12px 12px;
  background: var(--c);
  color: var(--c-ink);
  text-decoration: none;
  box-shadow: inset 0 -7px 0 rgb(0 0 0 / 0.1), inset 0 3px 0 rgb(255 255 255 / 0.35), 0 7px 0 var(--ink);
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out;
}
/* Griffrillen oben */
.cart::before {
  content: '';
  position: absolute;
  top: 9px;
  left: 50%;
  width: 44%;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: repeating-linear-gradient(to bottom, rgb(0 0 0 / 0.22) 0 2.5px, transparent 2.5px 6px);
}
.cart:hover { transform: translateY(-6px); box-shadow: inset 0 -7px 0 rgb(0 0 0 / 0.1), inset 0 3px 0 rgb(255 255 255 / 0.35), 0 13px 0 var(--ink); }
.cart:active { transform: translateY(2px); box-shadow: inset 0 -7px 0 rgb(0 0 0 / 0.1), inset 0 3px 0 rgb(255 255 255 / 0.35), 0 3px 0 var(--ink); }

/* Etikett mit Titelbild */
.label {
  padding: 6px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: #fff;
}
.label img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 5px;
  background: var(--paper-deep);
}
.cart h2 { margin: 14px 4px 4px; font-size: 1.55rem; font-weight: 800; font-stretch: 78%; }
.cart .teaser { margin: 0 4px; font-weight: 500; }

.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 4px 0; padding: 0; }
.facts li {
  padding: 2px 10px 3px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgb(0 0 0 / 0.1);
}

.cart .go {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 14px 7px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
}
.cart .go svg { width: 14px; height: 14px; }

.badge {
  position: absolute;
  top: -14px;
  right: -12px;
  padding: 5px 11px 6px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  transform: rotate(8deg);
}

/* Freier Platz im Regal */
.slot {
  flex: 1;
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 24px;
  border: var(--line) dashed rgb(34 23 74 / 0.28);
  border-radius: 20px 20px 12px 12px;
  color: var(--ink-soft);
  text-align: center;
}
.slot p { margin: 0; max-width: 14rem; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: auto;
  padding-top: 56px;
  padding-bottom: 28px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}
.foot p { margin: 0; }
.legal-links { display: flex; gap: 20px; }
.legal-links a { text-decoration: none; border-bottom: 1px solid currentColor; }
.legal-links a:hover { color: var(--ink); }

/* ---------- Impressum, Datenschutz ---------- */
.legal { max-width: 46rem; padding-top: clamp(18px, 4vw, 44px); }
.legal h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.6rem);
  font-weight: 800;
  font-stretch: 75%;
  letter-spacing: -0.02em;
  line-height: 0.95;
  hyphens: manual;
}
.legal h2 { font-size: 1.3rem; font-weight: 800; margin: 34px 0 8px; }
.legal p, .legal li { max-width: 40rem; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 1.2em; }
.legal li + li { margin-top: 10px; }
.legal .lead { margin-top: 18px; font-size: 1.1rem; color: var(--ink-soft); }
.legal .stand { margin-top: 34px; color: var(--ink-soft); font-size: 0.92rem; }
/* Noch auszufüllen – fällt absichtlich auf */
.todo { padding: 0 4px; border-radius: 4px; background: #ffd6d0; color: #8a1c0c; font-weight: 700; }

/* ---------- Spielseite ---------- */
.play { padding-bottom: 24px; }

.notice {
  margin: 18px auto 0;
  max-width: 44rem;
  padding: 10px 16px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: #fff;
  font-weight: 600;
  text-align: center;
}

/* Spielbereich: so breit, dass das Spiel samt Rahmen ganz ins Fenster passt */
.stage {
  --chrome: 180px; /* Kopfzeile und Konsolenrahmen in der Höhe */
  width: 100%;
  max-width: max(300px, calc((100svh - var(--chrome)) * var(--aw, 4) / var(--ah, 3) + 32px));
  margin: 32px auto 0;
}

/* Die Konsole: das Spiel steckt als Modul oben drin */
.console {
  --c: #b9a8ff;
  position: relative;
  padding: 13px;
  border: var(--line) solid var(--ink);
  border-radius: 24px;
  background: #2f2463;
  box-shadow: inset 0 3px 0 rgb(255 255 255 / 0.12), 0 8px 0 var(--ink);
}
/* Das eingesteckte Modul schaut oben heraus */
.console::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  width: min(34%, 260px);
  height: 20px;
  transform: translateX(-50%);
  border: var(--line) solid var(--ink);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background:
    repeating-linear-gradient(to bottom, rgb(0 0 0 / 0.22) 0 2.5px, transparent 2.5px 6px) center 5px / 44% 11px no-repeat,
    var(--c);
}
.screen {
  aspect-ratio: var(--aw, 4) / var(--ah, 3);
  border-radius: 12px;
  overflow: hidden;
  background: #100d22;
}
.screen iframe { display: block; width: 100%; height: 100%; border: 0; }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 24px;
}
.bar h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 800; font-stretch: 75%; letter-spacing: -0.01em; }
.bar .teaser { margin: 4px 0 0; color: var(--ink-soft); }

.info {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 28px clamp(28px, 5vw, 64px);
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px solid var(--paper-deep);
}
.info h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 10px; }
.info p { margin: 0 0 12px; max-width: 38rem; }
.info .facts { margin: 16px 0 0; }
.info .facts li { background: var(--paper-deep); }

.keys { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0; align-items: center; }
.keys dt { display: flex; gap: 5px; }
.keys dd { margin: 0; }
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 2.1em;
  height: 2.1em;
  padding: 0 0.5em;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 0 var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}
.tips { margin: 18px 0 0; padding-left: 1.1em; color: var(--ink-soft); }
.tips li + li { margin-top: 4px; }

.more { margin-top: 48px; }
.more h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 22px; }

/* Spiel nicht gefunden */
.missing { padding-top: clamp(24px, 7vw, 80px); max-width: 36rem; }
.missing h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; font-stretch: 75%; letter-spacing: -0.02em; }
.missing p { margin: 16px 0 26px; color: var(--ink-soft); font-size: 1.1rem; }

@media (max-width: 760px) {
  .info { grid-template-columns: 1fr; }
  .console { padding: 9px; border-radius: 18px; }
  .screen { border-radius: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  .cart, .btn { transition: none; }
  .cart:hover { transform: none; }
}
