/* Zippa-Laden (M5, Vorlagen art/mockups/m5/laden_helden.png, laden_deko.png, aufgaben.png): Pavillon-Bild oben mit Bühne, Holzrahmen-Karte unten */
.screen.shop { background: #2a2140; overflow: hidden; }
.sp { position: absolute; inset: 0; display: flex; flex-direction: column; padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 12px);
  background: url('../img/ui/lobby_bg.jpg') center 30% / cover no-repeat, #2a2140; }
.sp::before { content: ''; position: absolute; inset: 0; background: linear-gradient(#1a102855, #0000 18%, #0000 40%, #20163699 62%, #2a2140 78%); pointer-events: none; }
.sp > * { position: relative; }

/* Kopf: Münzstand, Schild, Zurück */
.sp-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 62px; flex: none; }
.sp-coins { display: flex; align-items: center; height: 40px; padding: 0 14px 0 0; margin-left: 4px; border-radius: 20px; background: linear-gradient(#fffaf0, #f2e2c2);
  border: 2px solid #c9a46e; box-shadow: 0 3px 0 #8a5a2b, 0 6px 12px #0005; font: 700 21px/1 'Fredoka', system-ui; color: #5e3a19; min-width: 96px; }
.sp-coins b { padding-left: 4px; font-variant-numeric: tabular-nums; }
.sp-coins .sp-coin.big { width: 50px; height: 50px; margin: -6px 0 -6px -10px; filter: drop-shadow(0 3px 3px #0005); }
.sp-coins.pop { animation: spPop .5s ease-out; }
@keyframes spPop { 30% { transform: scale(1.12); } }
.sp-title { flex: 1; max-width: 220px; text-align: center; font: 700 25px/1 'Fredoka', system-ui; color: #fff6e2; padding: 11px 10px 12px; border-radius: 12px;
  background: url('../img/tex/wood.jpg') 0 40% / 260% auto, #a86e3a; border: 3px solid #5e3a19; box-shadow: inset 0 2px 0 #ffffff33, 0 4px 0 #4a2c12, 0 8px 14px #0006;
  text-shadow: 0 2px 0 #5e3a19, 0 -1px 0 #5e3a19, 2px 0 0 #5e3a19, -2px 0 0 #5e3a19; white-space: nowrap; }
.sp-back { width: 54px; height: 54px; border-radius: 50%; flex: none; background: url('../img/ui/back.png') center / 54% no-repeat, radial-gradient(circle at 50% 30%, #d49a5e, #9a6232 70%, #7a4a22);
  border: 3px solid #fbe8c8; box-shadow: 0 0 0 2px #5e3a19, 0 4px 0 #4a2c12, 0 8px 14px #0006; }
.sp-back:active { transform: translateY(2px); }

/* Reiter */
.sp-tabs { display: flex; gap: 6px; margin: 8px 0 4px; flex: none; }
.sp-tab { position: relative; flex: 1; min-width: 0; padding: 10px 1px 11px; border-radius: 13px; font: 700 clamp(12.5px, 3.55vw, 16px)/1 'Fredoka', system-ui; letter-spacing: -.2px; color: #6d4520;
  background: linear-gradient(#fffaf0, #efdcb8); border: 2px solid #c9a46e; box-shadow: 0 3px 0 #8a5a2b, 0 6px 10px #0004; white-space: nowrap; }
.sp-tab.on { color: #fff; background: linear-gradient(#9be15a, #5fb52c 55%, #4a9a1e); border-color: #2f6e12; box-shadow: 0 0 0 3px #c8ff8a66, 0 3px 0 #2f6e12, 0 6px 14px #5fb52c66;
  text-shadow: 0 2px 0 #2f6e12, 0 -1px 0 #2f6e12, 1px 0 0 #2f6e12, -1px 0 0 #2f6e12; }
.sp-tab:active { transform: translateY(2px); }
.sp-dot { position: absolute; right: -3px; top: -5px; width: 16px; height: 16px; border-radius: 50%; background: #ff4a3a; border: 2px solid #fff; box-shadow: 0 2px 4px #0006; display: none; }
.sp-dot.on { display: block; animation: spDot 1.2s ease-in-out infinite; }
@keyframes spDot { 50% { transform: scale(1.25); } }

/* Bühne */
.sp-stage { flex: 0 0 auto; height: clamp(170px, 31vh, 300px); margin: 0 -12px; }
.sp-cv { display: block; width: 100%; height: 100%; }
.sp-decoprev { display: none; flex: none; height: clamp(110px, 17vh, 190px); margin: 8px 0 4px; border-radius: 18px; overflow: hidden; border: 4px solid #fff6e2; box-shadow: 0 0 0 2px #c9a46e, 0 8px 18px #0007; background: #fff6e2; }
.sp-decoprev img { width: 100%; height: 100%; object-fit: contain; display: block; background: radial-gradient(circle at 50% 45%, #fff, #f2e2c2); }
.sp[data-tab="deco"] .sp-stage { display: none; }
.sp[data-tab="deco"] .sp-decoprev { display: block; }
.sp[data-tab="daily"] .sp-stage { order: 5; height: clamp(150px, 24vh, 230px); margin-bottom: -12px; }

/* Karte im Holzrahmen */
.sp-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 4px; border-radius: 22px; padding: 10px; order: 4;
  background: url('../img/tex/wood.jpg') center / 220% auto, #9a6435; border: 3px solid #5e3a19; box-shadow: inset 0 2px 0 #ffffff33, 0 6px 0 #3e240f, 0 12px 24px #0008; }
.sp-head { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 12px 10px 10px; background: linear-gradient(#fffaf0, #fbf0da); border-radius: 15px 15px 0 0;
  border: 2px solid #e7d2ab; border-bottom: none; position: relative; }
.sp-head::after { content: ''; position: absolute; left: 16px; right: 16px; bottom: 0; height: 2px; background: #e4cfa9; }
.sp-acts { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.sp-name { font: 700 24px/1.05 'Fredoka', system-ui; color: #6d4520; text-align: center; }
.sp-sub { font: 600 14px/1 'Fredoka', system-ui; color: #8a5a2b; }
.sp-pill { padding: 5px 14px 6px; border-radius: 12px; font: 700 16px/1 'Fredoka', system-ui; color: #fff; background: linear-gradient(#9be15a, #5fb52c); border: 2px solid #3f8a1a; text-shadow: 0 1px 0 #2f6e12; }
.sp-act { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px 10px; font-size: 18px; }
.sp-act .sp-coin { width: 24px; height: 24px; filter: drop-shadow(0 1px 1px #0005); }
.sp-missing:disabled { filter: grayscale(.85) brightness(.95); opacity: .9; }
.sp-body { flex: 1; min-height: 0; overflow-y: auto; background: #fbf0da; border-radius: 0 0 15px 15px; border: 2px solid #e7d2ab; border-top: none; padding: 10px 10px 12px; -webkit-overflow-scrolling: touch; }

/* Raster */
.sp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.sp-cell { position: relative; display: flex; flex-direction: column; align-items: stretch; padding: 4px 4px 5px; border-radius: 14px; background: linear-gradient(#fbe7c6, #efd2a6);
  border: 3px solid #fff3dc; box-shadow: 0 0 0 2px #c9a46e, 0 3px 0 #a87a48, 0 5px 8px #0003; min-width: 0; }
.sp-cell.locked { background: linear-gradient(#a08672, #7d6553); border-color: #c8b39c; }
.sp-cell.sel { box-shadow: 0 0 0 3px #ffc93c, 0 0 14px #ffc93caa, 0 3px 0 #a87a48; border-color: #fff8d2; }
.sp-cell:active { transform: scale(.96); }
.sp-face { display: block; width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #fff6e2, #f0d4a8); }
.sp-cell.locked .sp-face { background: radial-gradient(circle at 50% 35%, #b49a84, #8c735f); }
.sp-face img { width: 100%; height: 100%; display: block; object-fit: cover; user-select: none; -webkit-user-select: none; }
.sp-face.hero { background-repeat: no-repeat; box-shadow: inset 0 0 0 2px #ffffff88; }
.sp-cell.locked .sp-face.hero { filter: saturate(.55) brightness(.82); }
.sp-face.skin img { object-position: 50% 0; transform: scale(1.5); transform-origin: 50% 8%; }
.sp-face.deco img { object-fit: contain; padding: 3px; }
.sp-face.dance { position: relative; }
.sp-face.dance i { position: absolute; left: -16%; top: -6%; height: 132%; width: 3960%; background-size: 100% 100%; background-repeat: no-repeat; animation: phdspr 3s steps(30) infinite; }
@keyframes phdspr { to { transform: translateX(-100%); } }
.sp-label { margin-top: 4px; height: 16px; font: 700 12px/16px 'Fredoka', system-ui; color: #6d4520; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-cell.locked .sp-label { color: #fff3dc; }
.sp-cell.locked .sp-label + .sp-check + .sp-lock, .sp-cell.locked:has(.sp-label) .sp-price { margin-top: 1px; }
.sp-check { position: absolute; right: -8px; top: -8px; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(#6fd04a, #3f9a24); border: 2px solid #fff;
  box-shadow: 0 2px 4px #0005; }
.sp-check::after { content: ''; position: absolute; left: 8px; top: 4px; width: 7px; height: 12px; border: solid #fff; border-width: 0 3.5px 3.5px 0; transform: rotate(40deg); }
.sp-lock { position: absolute; right: -7px; top: -9px; width: 32px; height: 32px; filter: drop-shadow(0 2px 2px #0006); pointer-events: none; }
.sp-price { display: flex; align-items: center; justify-content: center; gap: 3px; margin-top: 3px; height: 19px; font: 700 16px/1 'Fredoka', system-ui; color: #fff8e6; text-shadow: 0 1px 0 #4a2c12; }
.sp-price .sp-coin { width: 19px; height: 19px; }
.sp-cell.poor .sp-price b { color: #ffd0c4; }
.sp-ribbon { position: absolute; left: -5px; right: -5px; bottom: 14px; padding: 4px 2px 5px; border-radius: 6px; font: 700 10.5px/1 'Fredoka', system-ui; color: #fff; text-align: center;
  background: linear-gradient(#58c43a, #2f8f1c); border: 2px solid #fff; box-shadow: 0 2px 3px #0005; white-space: nowrap; }
.sp-cell .sp-ribbon + .sp-label, .sp-cell:has(.sp-ribbon) .sp-label { visibility: visible; }

/* Skins: Helden-Leiste */
.sp-strip { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 10px; margin: 0 -2px 4px; scrollbar-width: none; }
.sp-strip::-webkit-scrollbar { display: none; }
.sp-hbtn { flex: none; width: 46px; height: 46px; padding: 0; border-radius: 50%; border: 3px solid #fff3dc; box-shadow: 0 0 0 2px #c9a46e; background: none; position: relative; }
.sp-hbtn .pt { width: 100%; height: 100%; }
.sp-hbtn.sel { box-shadow: 0 0 0 3px #ffc93c, 0 0 10px #ffc93caa; }
.sp-hbtn.locked .pt { filter: grayscale(.8) brightness(.75); }
.sp-hbtn.locked::after { content: ''; position: absolute; right: -6px; bottom: -4px; width: 20px; height: 20px; background: url('../img/ui/schloss.png') center / contain no-repeat; }

/* Deko */
.sp-decolist { display: flex; flex-direction: column; }
.sp-sec { margin: 6px 0 8px; font: 700 20px/1 'Fredoka', system-ui; color: #6d4520; text-align: center; }
.sp-sec:first-child { margin-top: 0; }

/* Aufgaben */
.sp[data-tab="daily"] .sp-head { padding-bottom: 12px; }
.sp-tasks { display: flex; flex-direction: column; gap: 10px; }
.sp-task { display: flex; align-items: stretch; border-radius: 16px; background: linear-gradient(#fffaf0, #f7ead0); border: 3px solid #fff3dc; box-shadow: 0 0 0 2px #c9a46e, 0 3px 0 #a87a48, 0 5px 8px #0002; overflow: hidden; }
.sp-tic { flex: none; width: 58px; margin: 8px 0 8px 8px; border-radius: 12px; background: #f0dcb8; display: flex; align-items: center; justify-content: center; }
.sp-tic img { width: 50px; height: 50px; object-fit: contain; border-radius: 9px; }
.sp-tic img.tile { padding: 5px; background: linear-gradient(#8a6ad8, #5a3ea8); box-shadow: 0 0 0 2px #c9a46e, 0 2px 3px #0004; }
.sp-tmid { flex: 1; min-width: 0; padding: 10px 10px 10px 12px; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.sp-ttext { font: 700 16.5px/1.15 'Fredoka', system-ui; color: #6d4520; }
.sp-bar { position: relative; height: 20px; border-radius: 10px; background: #6b4a33; box-shadow: inset 0 2px 3px #0006; overflow: hidden; }
.sp-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 10px; background: linear-gradient(#ffb85a, #f08a1c); box-shadow: inset 0 2px 0 #fff6; }
.sp-bar.full i { background: linear-gradient(#8fe060, #4aa82a); }
.sp-bar span { position: relative; display: block; text-align: center; font: 700 12.5px/20px 'Fredoka', system-ui; color: #fff; text-shadow: 0 1px 1px #0008; }
.sp-tright { flex: none; width: 112px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; padding: 8px 6px; background: #f0dcb8; }
.sp-reward { display: flex; align-items: center; gap: 4px; font: 700 19px/1 'Fredoka', system-ui; color: #6d4520; }
.sp-reward .sp-coin { width: 32px; height: 32px; }
.sp-rib { display: flex; align-items: center; gap: 3px; padding: 3px 12px 4px 6px; font: 700 17px/1 'Fredoka', system-ui; color: #fff; background: linear-gradient(#f0605a, #c8302a);
  clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%, 8% 50%); text-shadow: 0 1px 0 #8a1e1a; }
.sp-rib .sp-coin { width: 24px; height: 24px; }
.sp-claim { padding: 8px 12px 9px; font-size: 17px; animation: spDot 1.4s ease-in-out infinite; }
.sp-task.done { opacity: .78; }
.sp-task.ready { box-shadow: 0 0 0 2px #6fbf3a, 0 0 12px #8fe06088, 0 3px 0 #a87a48; }
.sp-voucher { margin-top: 6px; padding: 12px; border-radius: 16px; background: linear-gradient(#fffaf0, #f7ead0); border: 3px solid #fff3dc; box-shadow: 0 0 0 2px #c9a46e, 0 3px 0 #a87a48, 0 5px 8px #0002; display: flex; flex-direction: column; gap: 8px; }
.sp-vtitle { font: 700 18px/1 'Fredoka', system-ui; color: #6d4520; }
.sp-vtext { margin: 0; font: 600 14px/1.25 'Fredoka', system-ui; color: #8a5a2b; }
.sp-vrow { display: flex; gap: 8px; align-items: stretch; }
.sp-vin { flex: 1; min-width: 0; box-sizing: border-box; padding: 9px 12px; font: 700 18px/1 'Fredoka', system-ui; letter-spacing: 3px; text-transform: uppercase; color: #4a2e14; background: #fffdf7;
  border: 3px solid #d8b98a; border-radius: 12px; outline: none; user-select: text; -webkit-user-select: text; } .sp-vin:focus { border-color: #f5a623; }
.sp-vin::placeholder { color: #c9b08a; letter-spacing: 2px; }
.sp-vbtn { flex: none; padding: 8px 14px 9px; font-size: 17px; }
.sp-vmsg { margin: 0; min-height: 17px; font: 600 14px/1.2 'Fredoka', system-ui; color: #3f8a1a; } .sp-vmsg.bad { color: #c0282b; } .sp-vmsg:empty { display: none; }

/* Platz-HUD: Münz-Zähler unter dem Porträt (M5) */
.hp-coins { position: absolute; left: 100px; top: calc(env(safe-area-inset-top) + 22px); display: flex; align-items: center; height: 34px; padding: 0 12px 0 0; border-radius: 17px;
  background: linear-gradient(#fffaf0, #f2e2c2); border: 2px solid #c9a46e; box-shadow: 0 3px 0 #8a5a2b, 0 5px 10px #0005; font: 700 18px/1 'Fredoka', system-ui; color: #5e3a19; }
.hp-coins img { width: 42px; height: 42px; margin: -5px 2px -5px -8px; filter: drop-shadow(0 2px 2px #0005); }
.hp-coins.pop { animation: spPop .5s ease-out; }
.hp-coins .hp-dot { position: absolute; right: -5px; top: -6px; width: 14px; height: 14px; border-radius: 50%; background: #ff4a3a; border: 2px solid #fff; display: none; }
.hp-coins.ready .hp-dot { display: block; animation: spDot 1.2s ease-in-out infinite; }
.hp-shop { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 8px; justify-content: center; }
.hp-shop img { width: 30px; height: 30px; margin: -6px 0; }

/* Münzen der Runde: „+15“ über Treppchen bzw. Ergebnis-Karte */
.coin-gain { display: inline-flex; align-items: center; gap: 4px; padding: 5px 14px 6px 6px; border-radius: 20px; font: 700 24px/1 'Fredoka', system-ui; color: #fff;
  background: linear-gradient(#ffd95a, #f2a91c); border: 3px solid #fff6d8; box-shadow: 0 3px 0 #a8650e, 0 8px 16px #0006; text-shadow: 0 2px 0 #a8650e; animation: coinGain 1.1s cubic-bezier(.2, 1.4, .4, 1) both; }
.coin-gain img { width: 34px; height: 34px; }
@keyframes coinGain { 0% { opacity: 0; transform: translateY(30px) scale(.4); } 60% { opacity: 1; transform: translateY(-6px) scale(1.08); } 100% { transform: none; } }
.pd-gain { position: absolute; left: 50%; top: calc(env(safe-area-inset-top) + 18%); transform: translateX(-50%); pointer-events: none; z-index: 13; }
.pd-gain .coin-gain { animation-delay: .9s; }
.pd-gains { position: absolute; inset: 0; pointer-events: none; z-index: 13; }
.pd-gains .coin-gain { position: absolute; font-size: 18px; padding: 3px 10px 4px 4px; transform: translate(-50%, 0); animation-delay: .9s; }
.pd-gains .coin-gain img { width: 26px; height: 26px; }
.rs-gain { display: flex; justify-content: center; margin: 2px 0 10px; }

/* Sticker-Rahmen (Deko M5): um die Farb-Sticker in HUD und Leisten */
body[data-rahmen] :is(.hp-room-s img, .pc-stk, .rt-stk, .pd-stk img, .bh-stk, .ol-stk) { border-radius: 50%; }
body[data-rahmen="holz"] :is(.hp-room-s img, .pc-stk, .rt-stk, .pd-stk img, .bh-stk, .ol-stk) { box-shadow: 0 0 0 3px #a86e3a, 0 0 0 5px #5e3a19; }
body[data-rahmen="blumen"] :is(.hp-room-s img, .pc-stk, .rt-stk, .pd-stk img, .bh-stk, .ol-stk) { box-shadow: 0 0 0 3px #ff8ac0, 0 0 0 5px #fff, 0 0 0 7px #6fbf3a; }
body[data-rahmen="regenbogen"] :is(.hp-room-s img, .pc-stk, .rt-stk, .pd-stk img, .bh-stk, .ol-stk) { padding: 3px; background: conic-gradient(#ff3b3b, #ff9a1f, #ffe03a, #46d66a, #2fa7ff, #8b5cff, #ff3b3b); }
body[data-rahmen="gold"] :is(.hp-room-s img, .pc-stk, .rt-stk, .pd-stk img, .bh-stk, .ol-stk) { box-shadow: 0 0 0 3px #ffd95a, 0 0 0 5px #b07a1a, 0 0 10px #ffd95a99; }

/* Heldenwahl: gesperrte Helden mit Schloss und Preis (M5) */
.hs-cell.locked .pt { filter: grayscale(.75) brightness(.8); }
.hs-cell { position: relative; }
.hs-lock { position: absolute; right: 2px; top: 0; width: 28px; height: 28px; pointer-events: none; filter: drop-shadow(0 2px 2px #0005); }
.hs-price { display: flex; align-items: center; gap: 3px; font: 700 14px/1 'Fredoka', system-ui; color: #8a5a2b; }
.hs-price img { width: 18px; height: 18px; }
.hs-cell.locked .hs-name { display: none; }
.pd-gainrow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; width: 92%; }
.pd-gainrow .coin-gain { font-size: 18px; padding: 3px 10px 4px 3px; }
.pd-gstk { width: 30px; height: 30px; }
/* Marktplatz: oben in der Mitte sitzt der Raum-Knopf → Münz-Zähler unter das Porträt */
.hud-market .hp-coins { left: 14px; top: calc(env(safe-area-inset-top) + 116px); height: 30px; font-size: 16px; }
.hud-market .hp-coins img { width: 36px; height: 36px; }
