/* Farb-Token. Werte als RGB-Tripel, damit Tailwind Transparenzen bilden kann. */
:root {
  --base: 236 239 244;      /* Binder-Grau */
  --surface: 255 255 255;
  --raised: 246 248 251;
  --line: 214 220 229;
  --ink: 27 34 48;
  --muted: 96 107 125;
  --accent: 31 95 154;      /* Insel-Blau */
  --gold: 150 108 14;       /* Rare-Symbol, für Preise */
  --mythic: 196 68 26;
  --gain: 30 128 74;
  --loss: 190 50 50;

  --mana-w: 232 220 170;
  --mana-u: 58 128 196;
  --mana-b: 62 56 66;
  --mana-r: 206 70 46;
  --mana-g: 46 132 82;
  --mana-c: 160 166 176;
  --mana-m: 196 160 60;
  color-scheme: light;
}

.dark {
  --base: 18 22 31;
  --surface: 26 32 44;
  --raised: 33 40 54;
  --line: 45 54 70;
  --ink: 231 234 241;
  --muted: 150 160 178;
  --accent: 120 172 226;
  --gold: 226 184 82;
  --mythic: 240 118 70;
  --gain: 98 196 136;
  --loss: 240 110 110;

  --mana-w: 236 226 184;
  --mana-b: 120 110 130;
  color-scheme: dark;
}

body { font-feature-settings: "tnum" 0; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 2px solid rgb(var(--accent)); outline-offset: 2px; border-radius: 4px; }

/* Marke: fünf Manapunkte */
.brand-pips { display: inline-flex; gap: 2px; }
.brand-pips i { width: 7px; height: 18px; border-radius: 2px; display: block; }
.pip-w { background: rgb(var(--mana-w)); }
.pip-u { background: rgb(var(--mana-u)); }
.pip-b { background: rgb(var(--mana-b)); }
.pip-r { background: rgb(var(--mana-r)); }
.pip-g { background: rgb(var(--mana-g)); }
.pip-c { background: rgb(var(--mana-c)); }
.pip-m { background: rgb(var(--mana-m)); }

img.mana { display: inline-block; width: 1.05em; height: 1.05em; vertical-align: -0.15em; margin: 0 1px; }

/* Bedienelemente */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; color: rgb(var(--muted)); }
.icon-btn:hover { color: rgb(var(--ink)); background: rgb(var(--raised)); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 40px; padding: 0 16px; border-radius: 8px; font-weight: 500; font-size: 15px; border: 1px solid transparent; white-space: nowrap; }
.btn-primary { background: rgb(var(--accent)); color: #fff; }
.dark .btn-primary { color: rgb(var(--base)); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: rgb(var(--line)); background: rgb(var(--surface)); }
.btn-ghost:hover { background: rgb(var(--raised)); }
.btn-danger { color: rgb(var(--loss)); border-color: rgb(var(--line)); background: rgb(var(--surface)); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { width: 100%; height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); color: rgb(var(--ink)); font-size: 16px; }
select.field { padding-right: 28px; }
textarea.field { height: auto; padding: 10px 12px; }
.field:focus { outline: none; border-color: rgb(var(--accent)); box-shadow: 0 0 0 3px rgb(var(--accent) / .18); }
.label { display: block; font-size: 13px; color: rgb(var(--muted)); margin-bottom: 4px; }

/* Farbfilter-Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); font-size: 14px; cursor: pointer; user-select: none; }
.chip[aria-pressed="true"] { border-color: rgb(var(--ink)); background: rgb(var(--ink)); color: rgb(var(--base)); }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }

/* Kartenraster */
/* minmax(0, …) und min-width: 0, sonst schiebt ein langer Kartenname seine Spalte breiter als die anderen */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
@media (max-width: 420px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card-tile { position: relative; text-align: left; min-width: 0; width: 100%; }
.card-tile .art { aspect-ratio: 488 / 680; border-radius: 4.5% / 3.5%; overflow: hidden; background: rgb(var(--raised)); box-shadow: 0 1px 2px rgb(0 0 0 / .18); }
.card-tile .art img { width: 100%; height: 100%; object-fit: cover; }
.card-tile:hover .art { box-shadow: 0 0 0 2px rgb(var(--accent)); }
.qty-badge { position: absolute; top: 6px; left: 6px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: rgb(var(--ink)); color: rgb(var(--base)); font: 600 14px/26px "Barlow Condensed", sans-serif; text-align: center; }
.foil-badge { background: linear-gradient(120deg, #e6c3ff, #9fe3ff 45%, #ffe7a3); color: #222; }

/* Kartenliste (Listenansicht von Suche, Sammlung, Freunden) */
.card-list { display: flex; flex-direction: column; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); border-radius: 12px; overflow: hidden; }
.card-list > * + * { border-top: 1px solid rgb(var(--line)); }
.card-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 12px; text-align: left; min-width: 0; }
.card-row:hover { background: rgb(var(--raised)); }
.card-row .thumb { width: 36px; aspect-ratio: 488 / 680; border-radius: 3px; flex-shrink: 0; object-fit: cover; background: rgb(var(--raised)); }
.card-row .mana { width: 16px; height: 16px; }
.row-qty { flex-shrink: 0; min-width: 24px; height: 20px; padding: 0 5px; border-radius: 10px; background: rgb(var(--ink)); color: rgb(var(--base)); font: 600 13px/20px "Barlow Condensed", sans-serif; text-align: center; }
.row-chip { flex-shrink: 0; font-size: 11px; font-weight: 600; padding: 0 4px; border-radius: 4px; border: 1px solid rgb(var(--line)); }
/* Knopf "in die Anfrage" bei Freunden: in der Liste mittig rechts, die Zeile macht Platz */
.card-list .relative > [data-want] { top: 50%; transform: translateY(-50%); right: 10px; }
.card-list .relative > .card-row { padding-right: 56px; }
/* Symbole aus mtg-vectors (github.com/Investigamer/mtg-vectors, MPL-2.0, Lizenz in assets/icons/mtg-vectors-LICENSE.md),
   als Maske eingefärbt, damit sie jede Farbe annehmen können */
.mtg-ic { display: inline-block; width: 18px; height: 18px; background-color: currentColor; -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; }
.mtg-plains { --ic: url(../icons/mtg-plains.svg); }
.mtg-island { --ic: url(../icons/mtg-island.svg); }
.mtg-swamp { --ic: url(../icons/mtg-swamp.svg); }
.mtg-mountain { --ic: url(../icons/mtg-mountain.svg); }
.mtg-forest { --ic: url(../icons/mtg-forest.svg); }
.mtg-planeswalker { --ic: url(../icons/mtg-planeswalker.svg); }
/* Reaktionen im Feed: Farbe des Manas, gewählte Reaktion mit Rahmen */
.react { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px; border-radius: 14px; border: 1px solid transparent; color: rgb(var(--muted)); }
.react:hover { background: rgb(var(--raised)); }
.react[aria-pressed="true"] { border-color: currentColor; background: rgb(var(--raised)); }
.react-W { color: #b8a25a; } .react-U { color: rgb(var(--mana-u)); } .react-B { color: rgb(var(--ink)); } .react-R { color: rgb(var(--mana-r)); } .react-G { color: rgb(var(--mana-g)); }

/* Einklappbare Bereiche (Deckseite) */
.folded > :not(:first-child) { display: none !important; }
[data-fold-head] { cursor: pointer; user-select: none; }
[data-fold-head] .fold-chev { transition: transform .15s; }
.folded [data-fold-head] .fold-chev { transform: rotate(-90deg); }

/* Seltenheit */
.r-common { color: rgb(var(--muted)); }
.r-uncommon { color: #7d8fa3; }
.r-rare { color: rgb(var(--gold)); }
.r-mythic { color: rgb(var(--mythic)); }

/* Kartendetail: Set-Symbol (Maske, Farbe aus der Seltenheit), Werte, Merkmale */
.set-icon { display: inline-block; width: 1.15em; height: 1.15em; flex-shrink: 0; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.r-common.set-icon { color: rgb(var(--ink)); }
.stat { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: rgb(var(--ink)); color: rgb(var(--base));
  font: 600 15px/24px "Barlow Condensed", sans-serif; }
.meta-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid rgb(var(--gold)); color: rgb(var(--gold)); font-size: 12px; font-weight: 500; }
.meta-badge.is-quiet { border-color: rgb(var(--line)); color: rgb(var(--muted)); }
.chip.chip-sm { height: 26px; padding: 0 10px; font-size: 12px; }

/* Farbverteilung der Sammlung: das Mana-Spektrum */
.spectrum { display: flex; height: 18px; border-radius: 3px; overflow: hidden; gap: 2px; }
.spectrum > span { display: block; min-width: 3px; }

/* Bottom-Sheet */
#sheet:not(.hidden) .sheet-panel { animation: sheet-in .22s ease-out; }
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } }
/* Deckliste: Preise ausblendbar (Schalter "Preise") */
.deck-no-prices .deck-price { display: none; }
.card-preview { position: fixed; left: 0; top: 0; z-index: 60; width: 240px; pointer-events: none; border-radius: 4.5% / 3.5%; overflow: hidden;
  box-shadow: 0 12px 32px rgb(0 0 0 / .35); background: rgb(var(--raised)); aspect-ratio: 488 / 680; }
.card-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-preview img { opacity: 0; transition: opacity .12s; }
.card-preview img.is-loaded { opacity: 1; }
.token-panel { animation: token-in .18s ease-out; }
@keyframes token-in { from { transform: scale(.96); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .token-panel { animation: none; } }
@media (min-width: 768px) {
  @keyframes sheet-in { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  #sheet:not(.hidden) .sheet-panel { animation: none; }
}

.skeleton { background: rgb(var(--raised)); border-radius: 6px; }
.spin { width: 14px; height: 14px; border: 2px solid rgb(var(--line)); border-top-color: rgb(var(--accent)); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Sprache der echten Karte auf der Kachel */
.lang-badge { position: absolute; left: 6px; bottom: 6px; min-width: 26px; height: 20px; padding: 0 5px; border-radius: 4px;
  background: rgb(var(--surface) / .92); color: rgb(var(--ink)); font: 600 11px/20px "Barlow Condensed", sans-serif; letter-spacing: .04em; text-align: center;
  box-shadow: 0 1px 2px rgb(0 0 0 / .25); }

/* Wertentwicklung seit Kauf auf der Kachel */
.gain-badge { position: absolute; right: 6px; bottom: 6px; height: 20px; padding: 0 6px; border-radius: 4px;
  font: 600 11px/20px "Barlow Condensed", sans-serif; color: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .25); }
.gain-badge.is-up { background: rgb(30 128 74); }
.gain-badge.is-down { background: rgb(190 50 50); }

/* Karten für Läden und Events (Leaflet): eigener Stapelkontext, damit Kopfleiste und Kartendetail darüber bleiben */
.place-map { position: relative; isolation: isolate; z-index: 0; border-radius: 12px; overflow: hidden; border: 1px solid rgb(var(--line)); background: rgb(var(--raised)); }
.place-map .leaflet-container { font: inherit; background: rgb(var(--raised)); }
.place-map .leaflet-popup-content-wrapper, .place-map .leaflet-popup-tip { background: rgb(var(--surface)); color: rgb(var(--ink)); }
.place-map .leaflet-popup-content { margin: 10px 12px; font-size: 14px; line-height: 1.35; }
.place-map .leaflet-control-attribution { background: rgb(var(--surface) / .8); color: rgb(var(--muted)); }
.place-map .leaflet-control-attribution a { color: rgb(var(--accent)); }
.place-pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 1px 4px rgb(0 0 0 / .35); background: rgb(var(--accent)); }
.place-pin.is-event { background: rgb(var(--mythic)); }
.place-pin.is-con { background: rgb(var(--gold)); }
.place-pin.is-partner { width: 32px; height: 32px; border: 3px solid rgb(var(--gold)); box-shadow: 0 1px 6px rgb(0 0 0 / .45); }
.place-pin.is-me { background: rgb(var(--gain)); border-radius: 50%; transform: none; width: 18px; height: 18px; }
.chip:disabled { opacity: .55; cursor: default; }

/* Künstlerangabe auf Artwork-Ausschnitten (Scryfall-Regel), Behälter mit position: relative */
.art-credit { position: absolute; right: 4px; bottom: 4px; max-width: calc(100% - 8px); padding: 1px 6px; border-radius: 4px; background: rgb(0 0 0 / .55); color: #fff; font-size: 11px; line-height: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.art-credit-sm { right: 2px; bottom: 2px; max-width: calc(100% - 4px); padding: 0 4px; font-size: 9px; line-height: 13px; }

/* Frontpage (views/welcome.php) */
.binder { margin: 0; }
.binder-page { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 16px 16px 16px 40px; border-radius: 14px; position: relative;
  background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); box-shadow: 0 18px 40px -18px rgb(var(--ink) / .35); }
/* Lochung am Rand der Binderseite */
.binder-page::before { content: ""; position: absolute; left: 14px; top: 12%; bottom: 12%; width: 10px;
  background: radial-gradient(circle, rgb(var(--base)) 4px, rgb(var(--line)) 4.5px, transparent 5px) center top / 10px 33.3% repeat-y; }
.binder-pocket { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; transition: transform .18s ease, box-shadow .18s ease; position: relative; border-radius: 4.75% / 3.5%; background: rgb(var(--raised)); aspect-ratio: 488 / 680;
  box-shadow: inset 0 0 0 1px rgb(var(--line)); animation: pocket-in .55s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i) * 70ms + 150ms); }
.binder-pocket img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
/* Hülle: leichter Glanz über der Karte */
.binder-pocket::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(125deg, rgb(255 255 255 / .22), transparent 38%, transparent 70%, rgb(255 255 255 / .08)); }
.binder-price { position: absolute; right: 6px; bottom: 6px; z-index: 1; padding: 1px 7px; border-radius: 5px; font: 600 13px/20px "Barlow Condensed", sans-serif;
  background: rgb(var(--ink)); color: rgb(var(--base)); }
@media (max-width: 639px) { .binder-page { gap: 6px; padding: 10px 10px 10px 28px; } .binder-page::before { left: 9px; } .binder-price { right: 3px; bottom: 3px; padding: 0 4px; font-size: 11px; line-height: 16px; } }
@keyframes pocket-in { from { opacity: 0; transform: translateY(-14px) scale(.97); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .binder-pocket { animation: none; } }

.welcome-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: center; }
@media (min-width: 768px) {
  .welcome-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
  .welcome-row:nth-child(even) > :first-child { order: 2; }
}
.welcome-row p { max-width: 60ch; }
.welcome-demo { min-width: 0; }
.welcome-caret { display: inline-block; width: 1px; height: 1.1em; margin-left: 1px; background: rgb(var(--accent)); }
.welcome-end { background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); }

/* Frontpage, zweite Fassung: Bewegung und Interaktion */
.binder-pocket:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: 0 10px 22px -10px rgb(0 0 0 / .45); z-index: 2; }
.binder-pocket.is-flip { transform: rotateY(90deg); transition: transform .16s ease-in; }
.welcome-lang { display: inline-flex; border: 1px solid rgb(var(--line)); border-radius: 999px; padding: 2px; background: rgb(var(--surface)); }
.welcome-lang button { height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; color: rgb(var(--muted)); }
.welcome-lang button[aria-pressed="true"] { background: rgb(var(--ink)); color: rgb(var(--base)); }
.welcome-caret { animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.welcome-pop { animation: pop-in .25s ease-out both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Preiskurve: zeichnet sich, dann erscheinen Punkt und Hinweis */
.welcome-chart line, .welcome-chart polyline { vector-effect: non-scaling-stroke; }
.welcome-chart-line { fill: none; stroke: rgb(var(--loss)); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.welcome-chart-target { stroke: rgb(var(--gain)); stroke-width: 1.5; stroke-dasharray: 5 5; }
.welcome-chart-dot { stroke: rgb(var(--gain)); stroke-width: 9; stroke-linecap: round; }
.welcome-js [data-reveal]:not(.is-in) .welcome-chart-line { clip-path: inset(0 100% 0 0); }
.welcome-js [data-reveal]:not(.is-in) .welcome-chart-dot,
.welcome-js [data-reveal]:not(.is-in) .welcome-alert { opacity: 0; }
[data-reveal] .welcome-chart-line { clip-path: inset(0 0 0 0); transition: clip-path 1.6s ease-in-out; }
[data-reveal] .welcome-chart-dot { transition: opacity .3s 1.5s; }
[data-reveal] .welcome-alert { transition: opacity .4s 1.7s; }

/* Deck-Balken füllt sich */
.welcome-bar { width: var(--w); transition: width 1.2s cubic-bezier(.2,.7,.2,1) .2s; }
.welcome-js [data-reveal]:not(.is-in) .welcome-bar { width: 0; }

/* Scanner: Karten wechseln unter dem Rahmen */
.welcome-scan { position: relative; flex-shrink: 0; width: 170px; aspect-ratio: 488 / 680; border-radius: 12px; overflow: hidden; background: #0d1018; }
.welcome-scan img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: cover; border-radius: 4.75% / 3.5%;
  opacity: 0; transform: translateY(18px) scale(.96); transition: opacity .35s ease, transform .35s ease; }
.welcome-scan img.is-on { opacity: .95; transform: none; }
.welcome-scan-frame { position: absolute; inset: 10px; border: 3px solid rgb(var(--gain)); border-radius: 10px; }

/* Kostenlos */
.welcome-free { background: rgb(var(--ink)); color: rgb(var(--base)); }
.welcome-free .text-muted { color: rgb(var(--base) / .7); }
.welcome-count { font-size: clamp(4rem, 13vw, 8.5rem); letter-spacing: -.02em; color: rgb(var(--gold)); }
.dark .welcome-free { background: rgb(var(--surface)); color: rgb(var(--ink)); border: 1px solid rgb(var(--line)); }
.dark .welcome-free .text-muted { color: rgb(var(--muted)); }
.welcome-check { position: relative; padding-left: 22px; }
.welcome-check::before { content: ""; position: absolute; left: 2px; top: .45em; width: 11px; height: 6px; border-left: 2px solid rgb(var(--gain)); border-bottom: 2px solid rgb(var(--gain)); transform: rotate(-45deg); }

/* Karte groß */
.welcome-zoom { padding: 16px; border: 0; border-radius: 16px; background: rgb(var(--surface)); color: rgb(var(--ink)); max-width: min(92vw, 420px); }
.welcome-zoom::backdrop { background: rgb(0 0 0 / .6); }
.welcome-zoom img { width: 100%; border-radius: 4.75% / 3.5%; }

@media (prefers-reduced-motion: reduce) {
  .binder-pocket, .welcome-scan img, .welcome-bar, [data-reveal] .welcome-chart-line { transition: none; }
  .welcome-caret, .welcome-pop { animation: none; }
}

/* Läden für Inhaber: Werbebanner (immer als Anzeige gekennzeichnet) und Abzeichen "Geprüft" */
.shop-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-radius: 12px;
  background: linear-gradient(100deg, rgb(var(--accent) / .10), rgb(var(--surface)) 60%); border: 1px solid rgb(var(--accent) / .35); }
.shop-banner-ad { display: inline-block; padding: 0 5px; border-radius: 4px; border: 1px solid rgb(var(--line)); font-size: 11px; line-height: 16px; color: rgb(var(--muted)); }
.shop-verified { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: rgb(var(--gain)); border: 1px solid rgb(var(--gain) / .5); cursor: help; }
.shop-verified::before { content: ""; width: 8px; height: 4px; margin-top: -2px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); }

/* Partnerläden (Abo): Kennzeichen, Rahmen in der Liste, Markierung in "In deiner Nähe" */
.partner-badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .02em;
  color: rgb(var(--gold)); border: 1px solid rgb(var(--gold) / .6); background: rgb(var(--gold) / .08); vertical-align: middle; white-space: nowrap; }
.shop-partner { border-color: rgb(var(--gold) / .55); box-shadow: inset 3px 0 0 rgb(var(--gold)); }
.near-partner { box-shadow: inset 3px 0 0 rgb(var(--gold)); padding-left: 10px; }

/* Mehrere Banner im selben Platz: übereinander gestapelt (Höhe des größten), überblenden, Punkte darunter */
.banner-stack { display: grid; }
.banner-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility 0s linear .5s; }
.banner-slide[data-active] { opacity: 1; visibility: visible; transition: opacity .5s ease; }
.banner-dots { display: flex; justify-content: center; gap: 2px; margin-top: 2px; }
.banner-dot { width: 24px; height: 20px; display: grid; place-items: center; }
.banner-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: rgb(var(--muted) / .45); transition: background .2s, transform .2s; }
.banner-dot[aria-current="true"]::before { background: rgb(var(--accent)); transform: scale(1.2); }
@media (prefers-reduced-motion: reduce) { .banner-slide, .banner-slide[data-active] { transition: none; } }

/* Banner mit Bild: auf dem Handy oben, ab Tablet links neben dem Text */
.shop-banner.has-img { padding: 0; overflow: hidden; gap: 0; }
.shop-banner.has-img > div, .shop-banner.has-img > .btn { margin: 14px 16px; }
.shop-banner.has-img > .btn { margin-left: 0; }
.shop-banner-img { display: block; width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
@media (min-width: 640px) {
  .shop-banner.has-img { flex-wrap: nowrap; }
  .shop-banner-img { width: 240px; flex-shrink: 0; align-self: stretch; height: auto; aspect-ratio: auto; min-height: 120px; }
}

/* Geöffnet jetzt: grüner Punkt, geschlossen grau */
.open-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: rgb(var(--gain)); box-shadow: 0 0 0 3px rgb(var(--gain) / .18); flex-shrink: 0; }
.open-state { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; }
.open-state.is-open { color: rgb(var(--gain)); font-weight: 500; }
.open-state.is-closed { color: rgb(var(--muted)); }
.open-state.is-closed .open-dot { background: rgb(var(--muted) / .6); box-shadow: none; }

/* Logo und Galerie der Läden */
.shop-logo { border-radius: 10px; object-fit: contain; background: rgb(var(--surface)); border: 1px solid rgb(var(--line)); }
.shop-logo-box { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 14px; border: 1px dashed rgb(var(--line)); background: rgb(var(--raised)); overflow: hidden; flex-shrink: 0; }
.shop-logo-box img { width: 100%; height: 100%; object-fit: contain; }
.shop-gallery { display: grid; gap: 6px; grid-template-columns: repeat(4, minmax(0, 1fr)); border-radius: 12px; overflow: hidden; }
.shop-gallery-item { position: relative; display: block; padding: 0; border: 0; background: rgb(var(--raised)); aspect-ratio: 4 / 3; cursor: zoom-in; overflow: hidden; }
.shop-gallery-item.is-first { grid-column: span 4; aspect-ratio: 16 / 9; }
.shop-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.shop-gallery-item:hover img { transform: scale(1.03); }
.shop-gallery-more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgb(0 0 0 / .5); color: #fff; font: 600 22px "Barlow Condensed", sans-serif; }
@media (min-width: 640px) { .shop-gallery-item.is-first { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; } }
.gallery-dialog { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgb(0 0 0 / .92); color: #fff; }
.gallery-dialog[open] { display: flex; align-items: center; justify-content: center; }
.gallery-dialog::backdrop { background: transparent; }
.gallery-dialog figure { margin: 0; max-width: calc(100vw - 32px); text-align: center; }
.gallery-dialog img { max-width: 100%; max-height: calc(100dvh - 90px); width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.gallery-dialog figcaption { margin-top: 10px; font-size: 14px; color: rgb(255 255 255 / .8); }
.gallery-close { position: absolute; top: 12px; right: 12px; color: #fff; background: rgb(255 255 255 / .12); }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: rgb(255 255 255 / .12); }
.gallery-nav.is-prev { left: 12px; }
.gallery-nav.is-next { right: 12px; }
@media (prefers-reduced-motion: reduce) { .shop-gallery-item img { transition: none; } }

.shop-banner-code { display: inline-block; padding: 2px 10px; border-radius: 6px; border: 1px dashed rgb(var(--accent)); font: 600 16px/24px "Barlow Condensed", sans-serif; letter-spacing: .04em; }

/* ---------- Eigene Beiträge im Feed (views/friends.php) ---------- */
.feed-card-ref, .feed-user-ref { color: rgb(var(--accent)); font-weight: 500; }
.feed-card-ref:hover, .feed-user-ref:hover { text-decoration: underline; }
/* Bilder: 1 in voller Breite, 2 und 4 im Quadratraster, 3 mit großem Bild links */
.feed-media { display: grid; gap: 4px; margin-top: 8px; max-width: 32rem; border-radius: 10px; overflow: hidden; }
.feed-media button { display: block; padding: 0; min-height: 0; background: rgb(var(--raised)); cursor: zoom-in; }
.feed-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.feed-media.n1 img { height: auto; max-height: 32rem; object-fit: contain; }
.feed-media.n2, .feed-media.n3, .feed-media.n4 { grid-template-columns: 1fr 1fr; }
.feed-media.n2 button, .feed-media.n4 button { aspect-ratio: 1; }
.feed-media.n3 { grid-template-rows: 1fr 1fr; aspect-ratio: 1; }
.feed-media.n3 button:first-child { grid-row: span 2; }
.post-previews { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.post-previews.hidden { display: none; }
.post-prev { position: relative; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: rgb(var(--raised)); }
.post-prev img { width: 100%; height: 100%; object-fit: cover; }
.post-prev-x { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: rgb(0 0 0 / .65); color: #fff; }
.post-menu > summary { list-style: none; cursor: pointer; }
.post-menu > summary::-webkit-details-marker { display: none; }
.post-menu-list { position: absolute; right: 0; top: 38px; z-index: 20; min-width: 180px; padding: 4px; border-radius: 10px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); box-shadow: 0 8px 24px rgb(0 0 0 / .14); }
.post-menu-list > * { display: block; width: 100%; text-align: left; padding: 7px 10px; border-radius: 6px; font-size: 14px; }
.post-menu-list > *:hover { background: rgb(var(--raised)); }
/* Vorschläge für @name und [[Karte]] */
.ac-menu { position: absolute; z-index: 60; padding: 4px; border-radius: 10px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); box-shadow: 0 8px 24px rgb(0 0 0 / .16); }
.ac-item { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 6px 8px; border-radius: 6px; text-align: left; font-size: 14px; }
.ac-item[aria-selected="true"], .ac-item:hover { background: rgb(var(--raised)); }

/* Laden im Feed ohne Logo: Anfangsbuchstaben auf einer Kachel (includes/feed_view.php) */
.shop-ini { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: rgb(var(--raised)); border: 1px solid rgb(var(--line)); color: rgb(var(--accent)); font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 15px; }

/* Umfragen an Laden-Beiträgen: Knöpfe, nach dem Abstimmen Balken mit Prozent */
.poll { display: grid; gap: 6px; max-width: 28rem; }
.poll-opt { position: relative; display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 12px; border-radius: 8px; border: 1px solid rgb(var(--line)); background: rgb(var(--surface)); text-align: left; overflow: hidden; font-size: 14px; }
.poll-opt:not(.is-result):hover { border-color: rgb(var(--accent)); }
.poll-opt.is-result { background: rgb(var(--raised)); }
.poll-opt:disabled { cursor: default; }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: rgb(var(--accent) / .18); transition: width .3s ease; }
.poll-opt.is-mine { border-color: rgb(var(--accent)); }
.poll-opt.is-mine .poll-bar { background: rgb(var(--accent) / .32); }
.poll-label { position: relative; flex: 1; min-width: 0; }
.poll-pct { position: relative; font-size: 13px; color: rgb(var(--muted)); }
.poll-opt.is-mine .poll-label { font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .poll-bar { transition: none; } }

/* Rechtliches (Impressum, Datenschutz, Nutzungsbedingungen): lesbarer Fließtext */
.legal h2 { font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 1.5rem; line-height: 1.15; margin: 2rem 0 .5rem; }
.legal p { margin: 0 0 .75rem; line-height: 1.65; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin: 0 0 .75rem; line-height: 1.65; }
.legal li { margin: .15rem 0; }
.legal a { color: rgb(var(--accent)); text-decoration: underline; text-underline-offset: 2px; }
