/* Pilzkarten – Aufbau, Neigung und Holo-Schichten aus der Cardle-Engine (karte.css), neu eingefärbt. */
@property --dia { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.karte { --b: 180px; width: var(--b); aspect-ratio: 5 / 7; container-type: inline-size; perspective: 1000px; position: relative; flex: none; user-select: none; -webkit-user-select: none; cursor: pointer; }
.k-dreh { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.k-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2, .9, .25, 1); }
.karte.gedreht .k-flip { transform: rotateY(180deg); }
.k-vorne, .k-hinten { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 5cqw; overflow: hidden; box-shadow: 0 2cqw 6cqw rgba(0, 0, 0, .55), 0 0 0 .3cqw rgba(0, 0, 0, .6); }
.k-hinten { transform: rotateY(180deg); }

/* Rahmen nach Seltenheit */
.k-rahmen { position: absolute; inset: 0; background: var(--rahmen); }
.k-rahmen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .8) 50%, transparent 62%); background-size: 260% 100%; background-position: calc(100% - var(--px, 50%)) 0; mix-blend-mode: overlay; opacity: calc(var(--glanz, 0) * .6); }
.sel-1 { --rahmen: linear-gradient(135deg, #3a2614, #7a5530 25%, #4a3018 50%, #8a6238 70%, #3e2814); --kc: #c9a274; }
.sel-2 { --rahmen: linear-gradient(135deg, #1f3a18, #5e8a3a 25%, #2a4a1e 50%, #7aa64a 70%, #23401a); --kc: #b8e08a; }
.sel-3 { --rahmen: linear-gradient(135deg, #6e6a5e, #efece2 22%, #8f8a7c 45%, #fffdf4 62%, #7a7568 84%, #d9d4c6); --kc: #f3efe2; }
.sel-4 { --rahmen: linear-gradient(135deg, #6a2e0a, #f0a35c 22%, #9a4a14 45%, #ffd2a0 60%, #7a3a10 82%, #e08a3a); --kc: #ffbf7a; }
.sel-5 { --rahmen: linear-gradient(135deg, #3a1660, #c48aff 22%, #5a2a90 45%, #f0d8ff 60%, #4a1c78 82%, #a86ae8); --kc: #e2c2ff; }
.sel-6 { --rahmen: conic-gradient(from var(--dia), #b8f0ff, #ffffff, #d9c8ff, #b8fff0, #fff6c8, #ffd6f0, #b8f0ff); --kc: #f0fbff; }
.sel-6 .k-rahmen { animation: diaDreh 7s linear infinite; }
.sel-6 .k-rahmen::before { content: ''; position: absolute; inset: 0; background: var(--glitzer) 0 0 / 60px 60px; mix-blend-mode: screen; opacity: .8; animation: glitzerZiehen 8s linear infinite; }
@keyframes diaDreh { to { --dia: 360deg; } }
.sel-6 .k-vorne { box-shadow: 0 0 0 .4cqw #fff, 0 0 5cqw rgba(170, 235, 255, .8), 0 0 12cqw rgba(210, 190, 255, .4), 0 2cqw 6cqw rgba(0, 0, 0, .5); }
.sel-5 .k-vorne { box-shadow: 0 0 4cqw rgba(196, 138, 255, .45), 0 2cqw 6cqw rgba(0, 0, 0, .55); }

/* Innenfläche */
.k-panel { position: absolute; inset: 3.2cqw; border-radius: 3cqw; display: flex; flex-direction: column; gap: 1.4cqw; padding: 2.4cqw;
  background: radial-gradient(120% 60% at 50% 0%, rgba(120, 150, 210, .22), transparent 70%), linear-gradient(180deg, #16201e, #0b110f);
  box-shadow: inset 0 0 0 .5cqw rgba(0, 0, 0, .4), inset 0 .4cqw 0 rgba(255, 255, 255, .06); }
.k-kopf { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; padding: 0 1cqw; min-height: 9cqw; }
.k-name { font: 700 6.4cqw/1.05 var(--f-display); color: #fff7e6; text-shadow: 0 .4cqw 0 rgba(0, 0, 0, .5); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.k-sel { display: flex; gap: .8cqw; flex: none; }
.k-sel i { width: 2.6cqw; height: 2.6cqw; border-radius: 50%; background: var(--selc); box-shadow: 0 0 1.4cqw var(--selc); }
.k-bild { position: relative; flex: 1 0 62cqw; max-height: 76cqw; border-radius: 2.4cqw; overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 55% at 50% 30%, #2c3a4c, #101722 70%), #0d131c;
  box-shadow: 0 0 0 .6cqw rgba(0, 0, 0, .55), 0 0 0 .9cqw rgba(255, 255, 255, .1); }
.k-bild::before { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, transparent, #22301c 40%, #131c10); }
.k-bild-inhalt { position: absolute; inset: 4% 6% 2%; transform: translate(calc(var(--dx, 0) * -5%), calc(var(--dy, 0) * -4%)); }
.k-bild-inhalt svg { width: 100%; height: 100%; display: block; }
.k-ess { position: absolute; left: 2cqw; bottom: 2cqw; z-index: 3; width: 11cqw; height: 11cqw; border-radius: 50%; display: grid; place-items: center; color: var(--essc);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .25), rgba(10, 12, 10, .85) 60%); border: .6cqw solid var(--essc); box-shadow: 0 0 2.5cqw color-mix(in srgb, var(--essc) 55%, transparent); }
.k-ess svg { width: 62%; height: 62%; }
.k-saison { position: absolute; right: 2cqw; top: 2cqw; z-index: 3; padding: .8cqw 2cqw; border-radius: 3cqw; font: 800 3.2cqw/1 var(--f-ui); color: #1a2410; background: #b8e08a; letter-spacing: .05em; }
.k-latein { font: italic 600 3.7cqw/1.1 var(--f-display); color: #c9d2bf; padding: 0 1cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-zeile { display: flex; justify-content: space-between; align-items: center; padding: .9cqw 2cqw; border-radius: 2cqw; background: rgba(0, 0, 0, .3); font: 800 3.8cqw/1 var(--f-ui); color: var(--essc); }
.sterne { color: #ffd45a; letter-spacing: .05em; } .sterne i { font-style: normal; color: rgba(255, 255, 255, .18); }
.k-trivia { margin: 0; padding: 0 1cqw; font-size: 3.1cqw; line-height: 1.3; color: rgba(255, 255, 255, .72); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-style: italic; }
.k-fuss { margin-top: auto; display: flex; justify-content: space-between; font: 800 3.2cqw/1 var(--f-ui); color: var(--kc); padding: 0 1cqw; letter-spacing: .03em; }
.k-anz { color: #fff; }

/* Glanz und Holo */
.k-glanz, .k-holo, .k-mond, .k-stern { position: absolute; inset: 0; pointer-events: none; }
.k-glanz { border-radius: inherit; z-index: 6; background: radial-gradient(farthest-corner circle at var(--px, 50%) var(--py, 50%), rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .12) 24%, rgba(0, 0, 0, .3) 95%); mix-blend-mode: overlay; opacity: var(--glanz, 0); }
.k-holo, .k-mond, .k-stern { display: none; }
/* Mondschein (5 Funde): Rahmen und Hintergrund schimmern silbrig-blau */
.ve-mond .k-mond, .ve-gluehen .k-mond, .ve-stern .k-mond { display: block; z-index: 1; background-image: repeating-linear-gradient(115deg, hsl(200 90% 75%) 0%, hsl(240 80% 80%) 6%, hsl(180 80% 75%) 12%, hsl(260 80% 82%) 18%, hsl(200 90% 75%) 24%), var(--glitzer); background-size: 400% 400%, 90px 90px; background-position: var(--px, 50%) var(--py, 50%), center; mix-blend-mode: color-dodge; filter: brightness(.55) contrast(1.4); opacity: calc(.3 + var(--glanz, 0) * .4); }
.ve-mond .k-rahmen::before, .ve-gluehen .k-rahmen::before, .ve-stern .k-rahmen::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(115deg, hsl(200 100% 78%) 0%, hsl(250 100% 82%) 5%, hsl(170 100% 75%) 10%, hsl(200 100% 78%) 15%), var(--glitzer); background-size: 300% 300%, 70px 70px; background-position: var(--px, 50%) var(--py, 50%), center; mix-blend-mode: color-dodge; opacity: calc(.35 + var(--glanz, 0) * .4); }
/* Glühend (15 Funde): Regenbogen über dem Bild */
.ve-gluehen .k-holo, .ve-stern .k-holo { display: block; z-index: 2; background-image: repeating-linear-gradient(0deg, hsl(0 100% 62%) 0%, hsl(50 100% 60%) 5%, hsl(120 100% 58%) 10%, hsl(190 100% 60%) 15%, hsl(250 100% 66%) 20%, hsl(320 100% 64%) 25%, hsl(360 100% 62%) 30%), repeating-linear-gradient(133deg, #0e152e 0%, hsl(180 10% 60%) 3.8%, hsl(180 29% 70%) 4.5%, hsl(180 10% 60%) 5.2%, #0e152e 10%, #0e152e 12%), var(--glitzer); background-size: 200% 700%, 300% 100%, 110px 110px; background-position: 0 var(--py, 50%), var(--px, 50%) var(--py, 50%), center; background-blend-mode: hue, hard-light, normal; mix-blend-mode: color-dodge; filter: brightness(.6) contrast(1.6) saturate(1.2); opacity: calc(.45 + var(--glanz, 0) * .4); }
/* Sternenstaub (40 Funde): Prisma über der ganzen Karte, Partikel */
.ve-stern .k-stern { display: block; z-index: 5; border-radius: inherit; background-image: conic-gradient(from calc(var(--dx, 0) * 220deg) at var(--px, 50%) var(--py, 50%), #ff9ad2, #8affef, #ffe98a, #a99cff, #ff9ad2), var(--glitzer); background-size: 100% 100%, 64px 64px; mix-blend-mode: color-dodge; filter: brightness(.55) contrast(1.6) saturate(1.3); opacity: calc(.3 + var(--glanz, 0) * .45); }
.ve-stern .k-vorne::after { content: ''; position: absolute; inset: 0; z-index: 7; pointer-events: none; background-image: var(--glitzer); background-size: 140px 140px; mix-blend-mode: screen; opacity: .55; animation: partikel 7s linear infinite; }
@keyframes partikel { to { background-position: 0 -280px; } }
/* Leuchtende Variante */
.karte.leuchtend .k-bild { background: radial-gradient(60% 50% at 50% 55%, rgba(110, 255, 225, .35), transparent 70%), radial-gradient(70% 55% at 50% 30%, #1a3a44, #0a1418 70%); }
.karte.leuchtend .k-bild-inhalt svg { filter: drop-shadow(0 0 3cqw rgba(120, 255, 230, .9)) saturate(1.2) brightness(1.1); }
.karte.leuchtend .k-vorne { box-shadow: 0 0 0 .5cqw #8affe6, 0 0 6cqw rgba(120, 255, 230, .7), 0 2cqw 6cqw rgba(0, 0, 0, .5); }
.karte.leuchtend .k-name::after { content: ' ✦'; color: #8affe6; }

/* Rückseite */
.k-hinten { background: var(--glitzer) center / 120px 120px, radial-gradient(circle at 50% 45%, #1e3326, #0c160f 62%, #060b08); border: 3cqw solid #1a2a1e; }
.rs-logo { position: absolute; inset: 0; display: grid; place-items: center; }
.rs-pilz { width: 70%; height: 55%; opacity: .9; }
.rs-pilz svg { width: 100%; height: 100%; }
.silhouette { filter: brightness(0) drop-shadow(0 0 2cqw rgba(170, 220, 160, .5)); }
.silhouette .laubdecke { display: none; }
.rs-text { position: absolute; top: 9%; font: 700 9cqw/1 var(--f-display); letter-spacing: .06em; background: linear-gradient(180deg, #fff6c8, #e0b864 60%, #b8803a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rs-sub { position: absolute; bottom: 9%; font: 800 3cqw/1 var(--f-ui); color: #9fc48a; letter-spacing: .18em; text-transform: uppercase; }

/* Unentdeckt */
.karte.leer { cursor: default; }
.karte.leer .k-vorne { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .025) 0 2cqw, transparent 2cqw 4cqw), linear-gradient(180deg, #121a16, #090e0b); border: .6cqw dashed color-mix(in srgb, var(--selc) 45%, transparent); box-shadow: none; }
.leer-innen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqw; color: rgba(255, 255, 255, .45); font: 800 4cqw/1 var(--f-ui); }
.leer-bild { width: 70%; height: 50%; opacity: .5; }
.leer-bild svg { width: 100%; height: 100%; }
.leer-innen em { font: 700 14cqw/1 var(--f-display); font-style: normal; color: color-mix(in srgb, var(--selc) 60%, transparent); }
.leer-innen span { color: var(--selc); opacity: .8; }

@media (prefers-reduced-motion: reduce) { .sel-6 .k-rahmen, .ve-stern .k-vorne::after { animation: none; } }
