@font-face { font-family:'DM Sans'; font-style:normal; font-weight:300 700; font-display:swap; src:url('fonts/dmsans-latin.woff2') format('woff2'); }

:root {
  --nacht: #0b1117;
  --ink: #131c26;
  --brick: #b4472c;
  --weiss: #fffdf9;
  --leise: rgba(255, 253, 249, .78);
  --sans: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--nacht); color: var(--weiss); font: 15px/1.4 var(--sans); }
body { overflow: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--weiss); outline-offset: 3px; }

/* ---------- Kopf ---------- */
.feed-kopf { position: fixed; inset: 0 0 auto 0; z-index: 20; display: flex; justify-content: center; align-items: center; height: 56px; padding: env(safe-area-inset-top) 16px 0; pointer-events: none; }
.feed-reiter { display: flex; gap: 22px; pointer-events: auto; }
.feed-reiter a { font-weight: 600; font-size: 16px; text-decoration: none; color: var(--leise); text-shadow: 0 1px 3px rgba(0,0,0,.5); padding: 6px 0; border-bottom: 2px solid transparent; }
.feed-reiter a[aria-current="true"] { color: var(--weiss); border-bottom-color: var(--weiss); }
.feed-zu { position: absolute; right: 12px; top: calc(env(safe-area-inset-top) + 10px); width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,0,0,.35); pointer-events: auto; }
.feed-zu svg { width: 20px; height: 20px; fill: none; }

/* ---------- Feed ---------- */
.feed { height: 100dvh; overflow-y: auto; scroll-snap-type: y mandatory; overscroll-behavior: contain; scrollbar-width: none; }
.feed::-webkit-scrollbar { display: none; }

.karte { position: relative; height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; display: flex; justify-content: center; }
.karte-grund { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(34px) brightness(.45); transform: scale(1.1); }

.karte-bild { position: relative; height: 100%; width: 100%; }
.karte-bild img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; user-select: none; -webkit-user-drag: none; }
/* Oben und unten abgedunkelt, sonst sind Reiter und Text auf hellen Seiten weg */
.karte-bild::before { content: ""; position: absolute; z-index: 1; inset: 0 0 auto 0; height: 120px; background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent); pointer-events: none; }
.karte-bild::after { content: ""; position: absolute; inset: 38% 0 0 0; background: linear-gradient(to bottom, transparent, rgba(0,0,0,.55) 35%, rgba(0,0,0,.88)); pointer-events: none; }

/* Die aktive Karte bewegt sich leicht, wie ein laufendes Video */
.karte.laeuft .karte-bild img { animation: fahrt 14s ease-in-out infinite alternate; }
@keyframes fahrt { from { transform: scale(1); } to { transform: scale(1.06) translateY(-1.5%); } }

.herz-gross { position: absolute; left: 50%; top: 45%; width: 120px; height: 120px; margin: -60px 0 0 -60px; opacity: 0; pointer-events: none; z-index: 3; }
.herz-gross svg { width: 100%; height: 100%; fill: var(--brick); filter: drop-shadow(0 4px 16px rgba(0,0,0,.4)); }
.herz-gross.an { animation: plopp .9s ease-out; }
@keyframes plopp { 0% { opacity: 0; transform: scale(.4) rotate(-12deg); } 25% { opacity: 1; transform: scale(1.15) rotate(-12deg); } 60% { opacity: 1; transform: scale(1) rotate(-12deg); } 100% { opacity: 0; transform: scale(1.3) translateY(-40px) rotate(-12deg); } }

/* ---------- Aktionsspalte ---------- */
.aktionen { position: absolute; z-index: 4; right: 10px; bottom: calc(110px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; gap: 18px; }
.profil { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--weiss); border: 2px solid var(--weiss); margin-bottom: 6px; }
.profil img { width: 22px; height: auto; }
.aktion { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; text-decoration: none; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.aktion svg { width: 34px; height: 34px; fill: var(--weiss); stroke: none; filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); transition: transform .2s; }
.aktion:active svg { transform: scale(.88); }
.herz[aria-pressed="true"] svg { fill: var(--brick); animation: klopf .35s ease-out; }
@keyframes klopf { 50% { transform: scale(1.25); } }

/* ---------- Text unten ---------- */
.text { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%; padding: 0 78px calc(18px + env(safe-area-inset-bottom)) 14px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.konto { display: inline-block; font-weight: 700; font-size: 16px; text-decoration: none; margin-bottom: 6px; }
.zeile { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.karte.offen .zeile { -webkit-line-clamp: unset; display: block; }
.art { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--brick); padding: 1px 6px; border-radius: 3px; margin-right: 4px; vertical-align: 1px; text-shadow: none; }
.mehr { font-weight: 700; margin-top: 2px; }
.tags { margin: 6px 0 0; font-weight: 600; }
.tags span { white-space: nowrap; }
.ton { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 13px; overflow: hidden; }
.ton svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--weiss); stroke-width: 2; }
.ton-lauf { display: flex; white-space: nowrap; overflow: hidden; mask-image: linear-gradient(to right, transparent, #000 8%, #000 85%, transparent); }
.ton-lauf span { flex: none; padding-right: 4px; animation: ton 12s linear infinite; }
@keyframes ton { to { transform: translateX(-100%); } }

.hinweis { position: fixed; z-index: 30; left: 50%; bottom: 40%; transform: translateX(-50%); margin: 0; padding: 10px 16px; border-radius: 6px; background: rgba(0,0,0,.78); font-weight: 600; opacity: 0; transition: opacity .25s; pointer-events: none; }
.hinweis.an { opacity: 1; }

/* Breite Fenster: das Hochformat bekommt einen Rahmen, die Aktionen stehen daneben */
@media (min-width: 700px) {
  .karte-bild { height: calc(100% - 32px); width: auto; aspect-ratio: 390 / 844; margin-top: 16px; border-radius: 14px; overflow: hidden; }
  .aktionen { right: auto; left: calc(50% + (100dvh - 32px) * 390 / 844 / 2 + 18px); }
  .text { width: calc((100dvh - 32px) * 390 / 844); padding-right: 14px; bottom: 16px; border-radius: 0 0 14px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .karte.laeuft .karte-bild img, .ton-lauf span { animation: none; }
  .herz-gross.an { animation-duration: .01s; }
}
