/* EntenGames Preisseite (Stand 15.11.2026, schlanker: wenig Text, Symbole statt Erklärungen).
   Baut auf styles.css auf: gleiche Farben, Schriften, Karten. Kacheln wie die Shop-Reiter.
   Nichts unter 16 px, kein Grau, keine Transparenz. Steigt = Grün, fällt = Rot, immer mit Vorzeichen als Text. */

.preise { padding: 24px 0 72px; }

/* ---------- Kopf: Titel, Stand, Suche ---------- */
.preise-kopf { display: grid; gap: 18px; margin-bottom: 20px; }
.preise-kopf h1 { margin-bottom: 8px; }
.stand { display: flex; align-items: flex-start; gap: 8px; font-size: var(--fs-ui); font-weight: 600; }
.stand[hidden] { display: none; }
.stand-ico { flex: none; width: 20px; height: 20px; margin-top: 3px; color: var(--primary); }

.cb-wahl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cb-wahl[hidden] { display: none; }
.cb-knopf {
  min-height: 52px;
  padding: 8px 10px;
  font: 700 17px var(--display);
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-md);
  cursor: pointer;
  touch-action: manipulation;
}
.cb-knopf:hover { border-color: var(--primary); background: var(--primary-soft); }
/* Handy: "CityBuild" klein über der großen Nummer, damit alle drei in eine Zeile passen */
.cb-wort { display: block; font-size: var(--fs-sm); }
.cb-strich { display: none; }
.cb-nr { display: block; font-size: var(--fs-h3); line-height: 1.1; }
.cb-knopf[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #ffffff; box-shadow: 0 3px 0 var(--primary-dark); }

.suche label { display: block; font-family: var(--display); font-weight: 700; font-size: var(--fs-md); margin-bottom: 8px; }
.suche-zeile { position: relative; }
.suche-ico { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); color: var(--primary); pointer-events: none; }
.suche input {
  width: 100%;
  min-height: 56px;
  padding: 12px 16px 12px 50px;
  font: 600 19px "Figtree", system-ui, sans-serif;
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-md);
  -webkit-appearance: none;
  appearance: none;
}
.suche input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Hinweise (leer, veraltet, Fehler) */
.hinweis { margin: 0 0 20px; padding: 14px 18px; background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: var(--r-md); font-weight: 600; }

/* ---------- Kennzahlen als Kacheln mit Symbol ---------- */
/* Handy: drei schmale Kacheln nebeneinander, Symbol oben. Breit: Symbol links. */
.zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 20px; }
.zahlen[hidden] { display: none; }
.zahl { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px 12px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); }
.zahl img { flex: none; width: 44px; height: 44px; }
.zahl .zahl-kopf { width: 32px; height: 32px; margin: 6px; border-radius: var(--r-xs); image-rendering: pixelated; }
.zahl p { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.zahl b { font-family: var(--display); font-weight: 800; font-size: var(--fs-title); line-height: 1.15; }
.zahl span { font-size: var(--fs-sm); font-weight: 600; line-height: 1.3; }

/* ---------- Vier Listen ---------- */
.listen { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: 36px; }
.listen[hidden] { display: none; }
.liste { padding: 18px 18px 10px; }
.liste h2 { display: flex; align-items: center; gap: 10px; font-size: var(--fs-h3); margin-bottom: 6px; }
.l-ico { flex: none; width: 26px; height: 26px; color: var(--primary); }
.liste ol { margin: 0; padding: 0; list-style: none; counter-reset: platz; }
.liste li { counter-increment: platz; border-top: 1px solid var(--line); }
.liste li:first-child { border-top: 0; }
/* ---------- Itembilder ---------- */
.ib { display: block; flex: none; width: 32px; height: 32px; }
.ib img { display: block; width: 100%; height: 100%; }
/* Platzhalter, wenn es kein Bild gibt: gleiche Größe, damit nichts springt */
.ib-leer { background: var(--primary-soft); border: 2px solid var(--primary-line); border-radius: var(--r-sm); }

/* Handy: Name über die ganze Breite, Wert hinter dem Balken. Breit: Wert neben dem Namen. */
.liste-eintrag {
  display: grid;
  grid-template-columns: 24px 36px minmax(0, 1fr) auto;
  grid-template-areas: "nr bild name name" "nr bild balken wert";
  align-items: center;
  gap: 3px 10px;
  width: 100%;
  min-height: 48px;
  padding: 9px 6px 11px 4px;
  font: 600 17px "Figtree", system-ui, sans-serif;
  color: var(--text);
  text-align: left;
  background: none;
  border: 0;
  border-radius: var(--r-sm);
  cursor: pointer;
}
.liste-eintrag::before { content: counter(platz); grid-area: nr; font-family: var(--display); font-weight: 800; color: var(--primary); }
.liste-eintrag .ib { grid-area: bild; width: 36px; height: 36px; }
.liste-eintrag:hover { background: var(--primary-soft); }
.liste-name { grid-area: name; min-width: 0; overflow-wrap: break-word; hyphens: auto; }
.liste-wert { grid-area: wert; font-family: var(--display); font-weight: 700; font-size: var(--fs-sm); white-space: nowrap; }
/* Balken zeigt den Wert im Verhältnis zum Ersten der Liste */
.liste-balken { grid-area: balken; display: block; height: 6px; background: var(--primary-soft); border-radius: 3px; overflow: hidden; }
.liste-eintrag:hover .liste-balken { background: #ffffff; }
.liste-balken i { display: block; height: 100%; background: var(--primary); border-radius: 3px; }
.liste-balken.auf i { background: var(--green); }
.liste-balken.ab i { background: var(--red); }
/* Leere Liste: nur eine Zeile (preise.js stellt sie ans Ende) */
.liste.ist-leer { padding-bottom: 16px; }
.liste-leer { padding: 2px 0 0 36px; font-size: var(--fs-ui); font-weight: 600; }

.auf { color: var(--green-dark); }
.ab { color: var(--red); }

/* ---------- Alle Items ---------- */
.alle { margin-bottom: 32px; }
.alle-kopf { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 20px; margin-bottom: 16px; }
.sortierung { display: flex; flex-direction: column; gap: 6px; font-family: var(--display); font-weight: 700; font-size: var(--fs-ui); }
.sortierung select {
  min-height: 48px;
  padding: 8px 40px 8px 14px;
  font: 600 17px "Figtree", system-ui, sans-serif;
  color: var(--text);
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23111b33' stroke-width='2.4'/%3E%3C/svg%3E") no-repeat right 14px center;
  border: 2px solid var(--line-strong);
  border-radius: var(--r-md);
  -webkit-appearance: none;
  appearance: none;
}
.sortierung select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Kategorien als Bildkacheln (wie die Reiter im Shop) */
.kats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.kat {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 4px 14px 4px 6px;
  font: 700 16px "Figtree", system-ui, sans-serif;
  line-height: 1.15;
  color: var(--text);
  background: #ffffff;
  border: 2px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: 0 3px 0 var(--line);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 0.12s, border-color 0.12s;
}
.kat img { flex: none; width: 34px; height: 34px; transition: transform 0.15s; }
.kat:hover { background: var(--primary-soft); border-color: var(--primary-line); }
.kat:hover img { transform: translateY(-2px) scale(1.06); }
.kat[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); box-shadow: 0 3px 0 var(--primary); color: var(--primary-dark); }

.treffer { margin-bottom: 10px; font-size: var(--fs-ui); font-weight: 600; }

.tabelle-kopf { display: none; }
.items { margin: 0; padding: 0; list-style: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.items:empty { display: none; }
.markt-item + .markt-item { border-top: 1px solid var(--line); }
.zeile {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-areas: "bild name preis" "bild verk trend";
  align-items: center;
  gap: 2px 12px;
  width: 100%;
  min-height: 68px;
  padding: 10px 16px 10px 12px;
  font: 600 17px "Figtree", system-ui, sans-serif;
  color: var(--text);
  text-align: left;
  background: #ffffff;
  border: 0;
  cursor: pointer;
}
.zeile:hover { background: var(--primary-soft); }
.zeile[aria-expanded="true"] { background: var(--primary-soft); }
.zeile .ib { grid-area: bild; width: 44px; height: 44px; }
.z-name { grid-area: name; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; }
.z-titel { font-family: var(--display); font-weight: 700; font-size: var(--fs-md); overflow-wrap: break-word; hyphens: auto; }
.z-marke { padding: 1px 10px; font-size: var(--fs-sm); font-weight: 700; white-space: nowrap; color: var(--primary-dark); background: var(--primary-soft); border: 1px solid var(--primary-line); border-radius: var(--r-full); }
.zeile[aria-expanded="true"] .z-marke, .zeile:hover .z-marke { background: #ffffff; }
.z-preis { grid-area: preis; font-family: var(--display); font-weight: 800; font-size: var(--fs-text); text-align: right; white-space: nowrap; }
/* Ohne Preis steht dort Text: darf umbrechen, damit der Name Platz behält */
.z-preis.ohne { max-width: 7.5em; font-size: var(--fs-sm); font-weight: 700; line-height: 1.25; white-space: normal; }
.z-stack { display: none; }
.z-verk { grid-area: verk; font-size: var(--fs-sm); }
.v-kurz { display: none; }
.z-trend { grid-area: trend; font-size: var(--fs-sm); font-weight: 700; text-align: right; white-space: nowrap; }
/* Handy: unveränderte Preise ohne "gleich", damit nur echte Änderungen auffallen */
.z-trend.gleich { visibility: hidden; }

/* Aufgeklappt: großes Bild links, Fakten daneben */
.detail { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: start; gap: 0 16px; padding: 8px 16px 18px 12px; background: var(--primary-soft); }
.detail[hidden] { display: none; }
.detail .ib-gross { grid-row: 1 / span 2; width: 64px; height: 64px; }
.detail .ib-gross.ib-leer { background: #ffffff; }
.fakten { grid-column: 2; margin: 0; display: grid; gap: 8px; }
.fakten div { display: grid; grid-template-columns: 1fr; gap: 0; }
.fakten dt { font-family: var(--display); font-weight: 700; font-size: var(--fs-sm); color: var(--primary-dark); }
.fakten dd { margin: 0; font-size: var(--fs-ui); font-weight: 600; }
.stufe { display: inline-flex; align-items: center; gap: 8px; padding: 1px 12px 1px 10px; border-radius: var(--r-full); font-weight: 800; border: 1px solid var(--primary-line); background: #ffffff; }
.stufe-hoch { background: #e3f5e6; border-color: #9fd6a8; color: var(--green-dark); }
.stufe-mittel { background: #ffffff; border-color: var(--primary); color: var(--primary-dark); }
/* Sicherheit als drei Balken wie eine Empfangsanzeige */
.stufe-balken { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.stufe-balken i { display: block; width: 4px; background: var(--primary-line); border-radius: 1px; }
.stufe-balken i:nth-child(1) { height: 6px; }
.stufe-balken i:nth-child(2) { height: 10px; }
.stufe-balken i:nth-child(3) { height: 14px; }
.stufe-balken i.voll { background: currentColor; }
.verlauf { grid-column: 2; margin: 14px 0 0; padding: 12px; background: #ffffff; border: 1px solid var(--primary-line); border-radius: var(--r-md); max-width: 420px; }
.verlauf svg { display: block; width: 100%; height: auto; }
.verlauf polyline { fill: none; stroke: var(--primary); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.verlauf figcaption { margin-top: 6px; font-size: var(--fs-sm); font-weight: 600; }

.mehr { width: 100%; margin-top: 16px; }

/* ---------- Erklärung zum Aufklappen ---------- */
.erklaerung.panel { padding: 0; }
.erklaerung summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 14px 20px;
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--fs-title);
  line-height: 1.2;
  list-style: none;
  border-radius: var(--r-lg);
  cursor: pointer;
}
.erklaerung summary::-webkit-details-marker { display: none; }
.erklaerung summary:hover { background: var(--primary-soft); }
.erklaerung[open] summary { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.so-ico { flex: none; width: 24px; height: 24px; color: var(--primary); }
.so-pfeil { flex: none; width: 22px; height: 22px; margin-left: auto; color: var(--primary); transition: transform 0.15s; }
.erklaerung[open] .so-pfeil { transform: rotate(180deg); }
.punkte { margin: 0; padding: 4px 20px 18px; list-style: none; }
.punkte li { position: relative; padding: 4px 0 4px 26px; font-size: var(--fs-md); }
.punkte li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 10px; height: 10px; border-radius: 3px; background: var(--primary); }
.punkte code { font-family: var(--pixel); font-size: var(--fs-title); }

@media (min-width: 720px) {
  .zahlen { gap: 14px; }
  .zahl { flex-direction: row; gap: 14px; padding: 12px 18px 12px 12px; text-align: left; }
  .zahl img { width: 64px; height: 64px; }
  .zahl .zahl-kopf { width: 44px; height: 44px; margin: 10px; border-radius: var(--r-xs); }
  .zahl p { align-items: flex-start; gap: 2px; }
  .zahl b { font-size: var(--fs-h3-lg); white-space: nowrap; }
  .zahl span { font-size: var(--fs-ui); }
  .listen { grid-template-columns: 1fr 1fr; }
  .liste-eintrag { grid-template-columns: 26px 36px minmax(0, 1fr) auto; grid-template-areas: "nr bild name wert" "nr bild balken balken"; gap: 5px 10px; }
  .liste-wert { font-size: var(--fs-ui); }
  .cb-wahl { display: flex; flex-wrap: wrap; }
  .cb-knopf { padding: 8px 22px; }
  .cb-wort, .cb-strich, .cb-nr { display: inline; font-size: var(--fs-ui); }
  .fakten div { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
  /* Kategorien: Symbol über dem Namen, fünf je Reihe */
  .kats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
  .kat { flex-direction: column; justify-content: center; gap: 4px; width: 100%; height: 100%; min-height: 92px; padding: 10px 4px 8px; text-align: center; }
  .kat img { width: 46px; height: 46px; }
}

@media (min-width: 900px) {
  .preise-kopf { grid-template-columns: minmax(0, 1fr) minmax(0, 480px); align-items: end; gap: 18px 36px; }
  .kopf-titel { grid-column: 1; grid-row: 1; }
  .suche { grid-column: 2; grid-row: 1; }
  .cb-wahl { grid-column: 1 / -1; grid-row: 2; }
}

@media (min-width: 1000px) {
  .preise { padding-top: 32px; }
  .kats { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .tabelle-kopf {
    display: grid;
    grid-template-columns: 44px minmax(0, 2.2fr) 1.1fr 1.3fr 1fr 0.8fr;
    gap: 16px;
    padding: 0 16px 8px 12px;
    font-family: var(--display);
    font-weight: 700;
    font-size: var(--fs-sm);
    color: var(--primary-dark);
  }
  .tabelle-kopf span:first-child { grid-column: 2; }
  .tabelle-kopf span:nth-child(n+2) { text-align: right; }
  .zeile {
    grid-template-columns: 44px minmax(0, 2.2fr) 1.1fr 1.3fr 1fr 0.8fr;
    grid-template-areas: "bild name preis stack verk trend";
    gap: 16px;
    min-height: 62px;
  }
  .detail { grid-template-columns: 96px minmax(0, 1fr); padding: 10px 16px 20px 12px; }
  .detail .ib-gross { width: 96px; height: 96px; }
  .z-preis.ohne { max-width: none; }
  .z-stack { display: block; grid-area: stack; font-size: var(--fs-ui); text-align: right; white-space: nowrap; }
  .z-verk { text-align: right; font-size: var(--fs-ui); }
  /* Ausgeschriebener Text bleibt für Screenreader, sichtbar ist nur die Zahl */
  .v-lang { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .v-kurz { display: inline; }
  .z-verk { position: relative; }
  .z-trend { font-size: var(--fs-ui); }
  .z-trend.gleich { visibility: visible; }
}

@media (prefers-reduced-motion: reduce) {
  .kat, .kat img, .so-pfeil { transition: none; }
  .kat:hover img { transform: none; }
}
