:root { --cream: #fff8f0; --pink: #f7a8c8; --pink2: #f07fae; --lilac: #c9b3f2; --ink: #5a3f63; --shadow: 0 6px 0 rgba(160, 90, 140, .25), 0 10px 24px rgba(120, 60, 120, .18); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #bfe6ff; font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, sans-serif; color: var(--ink); touch-action: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
button { font: inherit; color: inherit; border: 0; padding: 0; background: none; cursor: pointer; }
.round { border-radius: 50%; background: var(--cream); box-shadow: var(--shadow); display: grid; place-items: center; transition: transform .08s; }
.round:active { transform: scale(.92); }
.round img { width: 72%; height: 72%; object-fit: contain; pointer-events: none; }
.sm { width: 56px; height: 56px; } .md { width: 76px; height: 76px; } .lg { width: 128px; height: 128px; background: var(--pink); }
.lg img { width: 62%; height: 62%; }
.lg.off { background: #eadbe6; } .lg.off img { opacity: .35; }
.pill { display: flex; align-items: center; gap: 6px; background: var(--cream); border-radius: 999px; padding: 4px 14px 4px 6px; box-shadow: var(--shadow); font-weight: 800; font-size: 22px; }
.pill img { width: 34px; height: 34px; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#tl { position: absolute; left: calc(14px + env(safe-area-inset-left)); top: calc(10px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 8px; align-items: flex-start; pointer-events: none; }
#hearts { display: flex; gap: 2px; min-height: 40px; } #hearts img { width: 40px; height: 40px; }
#tr { position: absolute; right: calc(14px + env(safe-area-inset-right)); top: calc(10px + env(safe-area-inset-top)); display: flex; gap: 10px; align-items: center; }
#tasks { display: flex; gap: 8px; }
.task { width: 56px; height: 56px; border-radius: 50%; background: conic-gradient(var(--pink2) calc(var(--p) * 1turn), #fff 0); padding: 5px; box-shadow: var(--shadow); position: relative; }
.task > div { width: 100%; height: 100%; border-radius: 50%; background: var(--cream); display: grid; place-items: center; }
.task img { width: 70%; height: 70%; } .task.done::after { content: ''; position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; background: url(../img/ui/check.png) center/contain no-repeat; }
#stick { position: absolute; left: calc(24px + env(safe-area-inset-left)); bottom: calc(24px + env(safe-area-inset-bottom)); width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .35); border: 3px solid rgba(255, 255, 255, .7); pointer-events: none; }
#stick.on { bottom: auto; margin: -70px 0 0 -70px; }
#knob { position: absolute; left: 35px; top: 35px; width: 64px; height: 64px; border-radius: 50%; background: var(--pink); box-shadow: 0 4px 10px rgba(0, 0, 0, .15); border: 4px solid #fff; }
#br { position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; gap: 10px; align-items: end; justify-items: end; pointer-events: none; }
#br > * { pointer-events: auto; }
#wand { grid-column: 1; grid-row: 1; } #bag { grid-column: 2; grid-row: 1; } #act { grid-column: 1 / span 2; grid-row: 2; }
#flash { position: absolute; left: 50%; top: 38%; transform: translate(-50%, -50%); display: flex; gap: 8px; pointer-events: none; }
#flash img { width: 84px; height: 84px; animation: pop 1.2s ease-out forwards; }
#flash.no img { filter: grayscale(.3); } #flash.no::after { content: ''; position: absolute; right: -18px; top: -18px; width: 44px; height: 44px; background: url(../img/ui/close.png) center/contain no-repeat; }
#flash.no::after { animation: pop 1.2s ease-out forwards; }   /* X blendet zusammen mit dem Bild aus (blieb sonst allein stehen) */
@keyframes pop { 0% { transform: scale(.3); opacity: 0 } 20% { transform: scale(1.15); opacity: 1 } 70% { transform: scale(1); opacity: 1 } 100% { transform: scale(1) translateY(-30px); opacity: 0 } }
#layer { position: fixed; inset: 0; pointer-events: none; }
#layer > * { pointer-events: auto; }
.bubble { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(720px, 72vw); background: var(--cream); border-radius: 32px; box-shadow: var(--shadow); padding: 16px 20px 16px 120px; min-height: 120px; animation: up .25s ease-out; }
@keyframes up { from { transform: translate(-50%, 40px); opacity: 0 } }
.bubble .who { position: absolute; left: 14px; top: -26px; width: 96px; height: 96px; border-radius: 50%; background: var(--pink); border: 5px solid #fff; overflow: hidden; display: grid; place-items: center; font-size: 40px; font-weight: 900; color: #fff; }
.bubble .who img { width: 100%; height: 100%; object-fit: cover; }
.bubble .name { font-weight: 900; color: var(--pink2); font-size: 18px; }
.bubble .text { font-size: 22px; line-height: 1.3; margin: 4px 0 8px; }
.bubble .icons { display: flex; gap: 6px; } .bubble .icons img { width: 46px; height: 46px; }
.bubble .speak { position: absolute; right: 14px; top: -22px; }
.bubble .next { position: absolute; right: 18px; bottom: 12px; width: 34px; height: 34px; animation: bob 1s infinite; }
@keyframes bob { 50% { transform: translateY(-5px) } }
.sheet { position: absolute; inset: 0; background: rgba(90, 63, 99, .35); display: flex; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; padding: calc(18px + env(safe-area-inset-top)) calc(10px + env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) calc(10px + env(safe-area-inset-left)); animation: fade .2s; }
.sheet > * { margin: auto; flex-shrink: 0; }   /* mittig; ist der Inhalt höher als der Bildschirm (Handy quer), lässt er sich scrollen statt unten abgeschnitten zu sein */
@keyframes fade { from { opacity: 0 } }
.panel { background: var(--cream); border-radius: 36px; box-shadow: var(--shadow); padding: 22px; position: relative; max-width: 94vw; }
.panel .close { position: absolute; right: -14px; top: -14px; }
.cards { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.card { width: 150px; border-radius: 28px; background: #fff; box-shadow: var(--shadow); padding: 10px; text-align: center; font-weight: 900; font-size: 20px; }
.card .pic { width: 130px; height: 130px; border-radius: 22px; background: var(--c, var(--lilac)); display: grid; place-items: center; overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card.sel { outline: 5px solid var(--pink2); }
/* viele Karten (Heldenwahl): 5 je Reihe, passt ins iPhone-Querformat */
.cards.many { gap: 12px; max-width: 600px; }
.cards.many .card { width: 104px; border-radius: 22px; padding: 8px; font-size: 16px; }
.cards.many .card .pic { width: 88px; height: 88px; border-radius: 18px; }
.cards.lots { max-width: 740px; gap: 10px; }
.cards.lots .card { width: 92px; padding: 6px; font-size: 14px; }
.cards.lots .card .pic { width: 80px; height: 80px; }
.namefield { margin-top: 14px; display: flex; gap: 10px; justify-content: center; align-items: center; }
.namefield input { font: inherit; font-size: 22px; font-weight: 800; color: var(--ink); border: 3px solid var(--lilac); border-radius: 18px; padding: 8px 14px; width: 220px; text-align: center; user-select: text; -webkit-user-select: text; }
.grid { display: grid; grid-template-columns: repeat(5, 84px); gap: 12px; }
.slot { width: 84px; height: 84px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); position: relative; display: grid; place-items: center; }
.slot img { width: 70%; } .slot b { position: absolute; right: 6px; bottom: 2px; font-size: 18px; }
.wheel { width: 320px; height: 320px; border-radius: 50%; background: var(--cream); box-shadow: var(--shadow); position: relative; display: grid; place-items: center; }
.wheel .round { position: absolute; }
.trace { width: min(70vh, 70vw); height: min(70vh, 70vw); border-radius: 40px; background: #3b2f5c; box-shadow: var(--shadow); touch-action: none; }
.toggles { display: flex; gap: 18px; } .toggles .round.off img { opacity: .3; }
#rotate { position: fixed; inset: 0; background: var(--cream); display: none; place-items: center; z-index: 50; }
#rotate img { width: 160px; animation: bob 1.2s infinite; }
/* Hochformat wird unterstützt (früher: Bitte-drehen-Bild) */
#loader { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 22px; background: linear-gradient(#bfe7ff, #fff4e6); transition: opacity .5s; }
#loader img { width: 110px; animation: bob .7s ease-in-out infinite; }
#loader .bar { width: 220px; height: 16px; border-radius: 10px; background: rgba(255,255,255,.8); box-shadow: var(--shadow); overflow: hidden; }
#loader .bar i { display: block; height: 100%; width: 0; background: var(--pink2, #ff8fbf); border-radius: 10px; transition: width .2s; }
#loader.gone { opacity: 0; pointer-events: none; }
#err { position: fixed; left: 8px; bottom: 8px; max-width: 60vw; background: #c0392b; color: #fff; font: 12px monospace; padding: 6px; z-index: 99; white-space: pre-wrap; }
@media (max-height: 430px) { .lg { width: 108px; height: 108px; } .md { width: 64px; height: 64px; } .sm { width: 48px; height: 48px; } .task { width: 48px; height: 48px; } .bubble { padding-left: 110px; min-height: 100px; } .bubble .text { font-size: 19px; } }

/* M2: Extra-Knöpfe, Hand, Überblendung, Werkbank, Laden, Reiter, Sammelbuch */
#extras { position: absolute; right: calc(160px + env(safe-area-inset-right)); bottom: calc(26px + env(safe-area-inset-bottom)); display: flex; gap: 10px; }
#handslot { position: absolute; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: var(--cream); border-radius: 999px; padding: 4px 6px 4px 10px; box-shadow: var(--shadow); }
#handslot > img { width: 56px; height: 56px; object-fit: contain; }
#handslot[hidden] { display: none; }
#fade { position: fixed; inset: 0; background: #fff8f0; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
#fade.on { opacity: 1; }
.tabs { display: flex; gap: 10px; justify-content: center; margin-bottom: 14px; }
.tabs .round.on { background: var(--pink); }
.scroll { max-height: 62vh; overflow-y: auto; touch-action: pan-y; padding: 6px; }
.cat { display: grid; grid-template-columns: repeat(auto-fill, 150px); gap: 12px; justify-content: center; width: min(820px, 86vw); }
.item { background: #fff; border-radius: 24px; box-shadow: var(--shadow); padding: 8px; text-align: center; position: relative; }
.item .pic { width: 100%; height: 96px; display: grid; place-items: center; }
.item .pic img { max-width: 96px; max-height: 96px; }
.item .cost { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; font-weight: 900; font-size: 16px; align-items: center; }
.item .cost span { display: inline-flex; align-items: center; } .item .cost img { width: 28px; height: 28px; }
.item.off { opacity: .45; }
.item .n { position: absolute; right: 10px; top: 6px; font-weight: 900; font-size: 18px; }
.job { display: flex; gap: 10px; align-items: center; justify-content: center; font-weight: 900; font-size: 22px; margin-bottom: 10px; }
.job img { width: 48px; height: 48px; }
.dex .item .pic img.unseen { filter: brightness(0); opacity: .25; }
.dex .item.friend { outline: 5px solid #ffd35e; }
.dex .item .cost img { width: 26px; height: 26px; }

/* M4: Farbtupfer im Sammelbuch */
.dots { display: flex; gap: 5px; justify-content: center; align-items: center; margin-top: 4px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.dots img { width: 22px; height: 22px; }
.dex .item.goldie { outline: 5px solid #f6c64a; box-shadow: 0 0 18px #ffe38a; }

/* Einstiegs-Hinweise: pulsierender Leuchtring; am Stick wischt eine kleine Hand über den Knopf */
@keyframes hintpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 214, 102, .9), var(--shadow); transform: scale(1) } 50% { box-shadow: 0 0 0 14px rgba(255, 214, 102, 0), var(--shadow); transform: scale(1.08) } }
@keyframes hintswipe { 0%, 15% { transform: translate(0, 0); opacity: 0 } 25% { opacity: 1 } 60% { transform: translate(34px, -30px); opacity: 1 } 80%, 100% { transform: translate(34px, -30px); opacity: 0 } }
button.hint { animation: hintpulse 1.3s ease-in-out infinite; }
#stick.hint { border-color: #ffd666; }
#stick.hint::after { content: ''; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -10px 0 0 -18px; background: url(../img/ui/hand.png) center / contain no-repeat; animation: hintswipe 1.8s ease-in-out infinite; }
/* Freizeitpark: Bude, Tanzstudio, Tanzrad-Knopf, Spiel-Rahmen */
.booth { display: grid; justify-items: center; gap: 14px; padding: 6px 10px; }
.bgame { width: 180px; height: 180px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(120, 60, 120, .2)); }
.bstake { display: flex; gap: 4px; } .bstake img { width: 40px; height: 40px; } .bstake.poor img { filter: grayscale(1); opacity: .45; }
.bmodes, .bcount { display: flex; gap: 18px; } .bmodes .round:nth-child(2) { background: var(--lilac); } .bmodes .round:nth-child(3) { background: #9fd8f7; }
.bcount b { font-size: 34px; font-weight: 900; }
.studio { display: grid; grid-template-columns: repeat(4, 118px); gap: 14px; }
.dcard { width: 118px; height: 118px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; position: relative; }
.dcard > img { width: 78%; height: 78%; object-fit: contain; } .dcard:not(.has) > img { filter: grayscale(.85); opacity: .55; }
.dcard.has { background: #fff0f7; } .dstar { position: absolute; right: -8px; top: -8px; width: 44px; height: 44px; } .dstar:not(.on) img { filter: grayscale(1); opacity: .35; }
.dprice { position: absolute; bottom: -6px; display: flex; align-items: center; gap: 2px; background: var(--cream); border-radius: 999px; padding: 2px 10px 2px 4px; box-shadow: var(--shadow); font-weight: 900; }
.dprice img { width: 26px; height: 26px; } .dprice.poor { color: #d9485f; }
.dnote { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-weight: 900; font-size: 22px; } .dnote img { width: 44px; height: 44px; }
#dancebtn[hidden] { display: none; }
.partyframe { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 40; background: #bfe6ff; }
@media (max-width: 640px) { .studio { grid-template-columns: repeat(3, 96px); } .dcard { width: 96px; height: 96px; } .lg { width: 104px; height: 104px; } }
#extras .round.on { background: var(--pink); transform: scale(1.12); }
.bcount[hidden] { display: none; }
.booth .lg { width: 110px; height: 110px; } .booth .bgame { width: 140px; height: 140px; } .bmodes[hidden] { display: none; } .bcount .round { background: var(--lilac); } .bcount b { font-size: 48px; color: #fff; text-shadow: 0 3px 0 rgba(90, 63, 99, .3); }
.bgame.locked { filter: grayscale(.8) brightness(1.05); opacity: .6; }
.bowner { display: flex; align-items: center; gap: 10px; } .bowner > img { width: 64px; height: 64px; }
.bpic { width: 110px; height: 110px; border-radius: 50%; background: var(--lilac); border: 5px solid #fff; box-shadow: var(--shadow); overflow: hidden; display: grid; place-items: center; } .bpic img { width: 100%; height: 100%; object-fit: cover; }
.skinrow { display: flex; justify-content: center; gap: 16px; margin-top: 14px; } .skinrow[hidden] { display: none; }
.swatch { width: 54px; height: 54px; border-radius: 50%; background: var(--c); border: 5px solid #fff; box-shadow: var(--shadow); } .swatch.sel { outline: 5px solid var(--pink2); transform: scale(1.1); }
.cards.six { display: grid; grid-template-columns: repeat(3, auto); justify-content: center; } .cards.six .card { width: 132px; } .cards.six .card .pic { width: 112px; height: 112px; }
/* Tanz-Gedächtnis */
.dg-start { display: flex; align-items: center; gap: 10px; margin: 0 auto 14px; background: #ffe9a8; border-radius: 999px; padding: 6px 18px 6px 8px; box-shadow: var(--shadow); font-weight: 900; font-size: 24px; }
.dg-start > img { width: 64px; height: 64px; } .dg-start span { display: flex; align-items: center; gap: 4px; } .dg-start span img { width: 34px; height: 34px; }
.dgame { position: absolute; inset: 0; z-index: 20; }
.dg-top { position: absolute; top: calc(12px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); display: flex; gap: 14px; } .dg-top img { width: 34px; height: 34px; }
.dg-pads { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 18px; }
.dg-pad { background: var(--cream); transition: transform .1s, background .1s; } .dg-pad.lit { background: #ffe08a; transform: scale(1.18); box-shadow: 0 0 0 8px rgba(255, 224, 138, .6), var(--shadow); }
.dg-cue { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); width: 96px; height: 96px; } .dg-cue img { width: 100%; height: 100%; }
.dg-cue.hand img { animation: pulse 0.9s infinite; } @keyframes pulse { 50% { transform: scale(1.18); } }
.dg-close { position: absolute; right: 16px; top: calc(12px + env(safe-area-inset-top)); }
.dg-end { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 12px; padding: 24px 34px; }
.dg-end .pill.big { font-size: 40px; } .dg-end .pill.big img { width: 52px; height: 52px; } .dg-crown { width: 90px; height: 90px; animation: pulse 1s infinite; }
.dg-stars { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 320px; } .dg-stars img { width: 38px; height: 38px; }
.dg-again { display: flex; align-items: center; gap: 16px; }
@media (max-width: 640px) { .dg-pads { gap: 10px; } .dg-pads .lg { width: 84px; height: 84px; } }
.st-choice { display: flex; gap: 28px; padding: 10px 18px; }
.st-opt { width: 190px; height: 190px; border-radius: 40px; background: #ffd1e6; box-shadow: var(--shadow); display: grid; place-items: center; position: relative; } .st-opt > img { width: 70%; height: 70%; object-fit: contain; }
.st-opt.game { background: #ffe9a8; } .st-opt span { position: absolute; bottom: -14px; display: flex; align-items: center; gap: 4px; background: var(--cream); border-radius: 999px; padding: 2px 12px 2px 6px; box-shadow: var(--shadow); font-weight: 900; font-size: 22px; } .st-opt span img { width: 32px; height: 32px; }
.st-opt:active { transform: scale(.95); }
@media (max-width: 640px) { .st-opt { width: 140px; height: 140px; } }
/* Aufgabenbuch */
.book { display: grid; gap: 12px; width: min(620px, 86vw); }
.bk-now { display: flex; align-items: center; gap: 14px; background: #fff0f7; border-radius: 28px; padding: 12px; box-shadow: var(--shadow); }
.bk-por { width: 96px; height: 96px; flex: none; border-radius: 50%; background: var(--lilac); border: 4px solid #fff; overflow: hidden; display: grid; place-items: center; } .bk-por img { width: 100%; height: 100%; object-fit: cover; }
.bk-por.sm { width: 58px; height: 58px; border-width: 3px; }
.bk-big { width: 96px; height: 96px; flex: none; display: grid; place-items: center; } .bk-big img { width: 90%; height: 90%; object-fit: contain; }
.bk-txt { flex: 1; } .bk-txt p { margin: 0 0 6px; font-weight: 800; font-size: 19px; line-height: 1.3; } .bk-ic img { width: 36px; height: 36px; margin-right: 2px; }
.bk-btns { display: grid; gap: 10px; }
.bk-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bk-item { display: flex; align-items: center; gap: 6px; background: #fff; border-radius: 999px; padding: 4px 14px 4px 6px; box-shadow: var(--shadow); font-weight: 900; font-size: 20px; } .bk-item img { width: 40px; height: 40px; } .bk-item.done { opacity: .5; }
.bk-wish { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 999px; padding: 4px 16px 4px 4px; box-shadow: var(--shadow); font-weight: 900; font-size: 22px; }
.bk-want, .bk-game { width: 46px; height: 46px; } .bk-star { width: 30px; height: 30px; margin-left: auto; } .bk-game { margin-left: auto; } .bk-wish b.ok { color: #2fae6a; }
#book.hint { animation: pulse 1s infinite; }
.bk-state { margin-top: 8px; background: #fff; border-radius: 16px; padding: 6px 10px; font-weight: 800; font-size: 16px; color: #b0408a; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.bk-state img { width: 30px; height: 30px; } .bk-state span { display: inline-flex; align-items: center; gap: 2px; }
.bk-how { margin: 8px 0 0; padding-left: 22px; font-size: 15px; font-weight: 700; line-height: 1.35; color: #6a5070; } .bk-how li { margin: 2px 0; }
#tipbar { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top)); transform: translateX(-50%); max-width: min(560px, 80vw); display: flex; align-items: center; gap: 10px; background: var(--cream); border-radius: 22px; padding: 8px 14px 8px 8px; box-shadow: var(--shadow); font-weight: 800; font-size: 17px; line-height: 1.25; animation: up .25s ease-out; z-index: 5; }
#tipbar img { width: 40px; height: 40px; flex: none; } #tipbar[hidden] { display: none; }
.tb-need { display: inline-flex; align-items: center; gap: 2px; font-size: 18px; } .tb-need img { width: 30px !important; height: 30px !important; }
/* Werkstation & Saat */
.station { display: grid; gap: 14px; justify-items: center; } .st-title { width: 90px; height: 90px; object-fit: contain; }
.st-job { display: flex; align-items: center; gap: 12px; background: #fff0f7; border-radius: 999px; padding: 6px 16px; font-weight: 900; font-size: 26px; } .st-job img { width: 52px; height: 52px; }
.st-cards { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; max-width: 560px; }
.st-card { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 26px; padding: 10px 14px; box-shadow: var(--shadow); } .st-card.off { opacity: .45; }
.st-card span { display: inline-flex; align-items: center; gap: 2px; font-weight: 900; font-size: 20px; } .st-card span img { width: 46px; height: 46px; } .st-card span.miss b { color: #d9485f; } .st-card span.miss img { filter: grayscale(.8); opacity: .6; }
.st-arrow { width: 30px; height: 30px; transform: rotate(90deg); }
.item.lock .pic img { filter: grayscale(1); opacity: .5; }
.bk-level { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-weight: 900; font-size: 18px; } .bk-level img { width: 32px; height: 32px; filter: grayscale(1); opacity: .35; } .bk-level img.on { filter: none; opacity: 1; }
.bk-level b { margin: 0 8px; color: var(--pink2); } .bk-level span { font-size: 15px; font-weight: 700; color: #6a5070; }
/* Größen-Regler (ui/size.js) */
.sizebar { position: absolute; left: 50%; top: calc(76px + env(safe-area-inset-top)); transform: translateX(-50%); display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: #fff; border-radius: 40px; box-shadow: var(--shadow); width: min(560px, calc(100vw - 32px)); box-sizing: border-box; pointer-events: auto; z-index: 30; }
.sizebar .sz-s { width: 34px; height: 34px; object-fit: contain; } .sizebar .sz-b { width: 60px; height: 60px; object-fit: contain; }
.sizebar input[type=range] { flex: 1; min-width: 0; height: 44px; accent-color: var(--pink2); }
.sizebar input[type=range]::-webkit-slider-thumb { width: 36px; height: 36px; }
/* Zoom in den Einstellungen (ui/settings.js) */
.zoomrow { display: flex; align-items: center; gap: 12px; margin-top: 18px; } .zoomrow img { width: 52px; height: 52px; }
.zoomrow input[type=range] { flex: 1; min-width: 0; height: 44px; accent-color: var(--pink2); }
/* Intro-Video (ui/introvid.js) */
#intro { position: fixed; inset: 0; z-index: 95; background: #fbe9f0; transition: opacity .6s ease; overflow: hidden; }
#intro video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
#intro::before { content: ''; position: absolute; inset: -40px; background: url(../img/keyart.jpg) center/cover; filter: blur(28px) saturate(1.1); opacity: .9; }   /* Querformat: Ränder */
@media (min-aspect-ratio: 3/4) { #intro video { object-fit: contain; } }   /* Querformat: ganzes Hochkant-Video zeigen (Helden am Ende nicht abschneiden) */
#intro [hidden] { display: none; }
#intro.out { opacity: 0; pointer-events: none; }
#intro .iskip, #intro .isound { position: absolute; top: calc(14px + env(safe-area-inset-top)); z-index: 2; } #intro .iskip { right: 14px; } #intro .isound { left: 14px; }
.introbtn { margin: 16px auto 0; display: block; overflow: hidden; padding: 0; } .introbtn img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* Impressum/Datenschutz in den Einstellungen (für Eltern) */
.panel .legal { margin-top: 14px; text-align: center; font-size: 13px; color: #8a7f99; } .panel .legal a { color: #8a7f99; }
/* Einstellungen: Intro + Kamera nebeneinander; Kamera-Drehen: Welt frei, unten Pfeile + Haken */
.setrow { display: flex; gap: 18px; justify-content: center; margin-top: 16px; } .setrow .introbtn { margin: 0; }
.sheet.camsheet { background: none; display: block; }
.camsheet .close { position: absolute; right: calc(14px + env(safe-area-inset-right)); top: calc(10px + env(safe-area-inset-top)); }
.camctl { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 22px; align-items: center; }
.camctl .camturn { touch-action: none; }
/* Handy quer (niedrig): Heldenwahl in einer Reihe, damit Farbtupfer und Haken ohne Scrollen sichtbar sind */
@media (max-height: 500px) and (min-aspect-ratio: 1/1) {
  .cards.six { grid-template-columns: repeat(6, auto); gap: 10px; } .cards.six .card { width: 104px; padding: 7px; font-size: 16px; border-radius: 22px; } .cards.six .card .pic { width: 88px; height: 88px; border-radius: 18px; }
  .panel { padding: 16px; border-radius: 28px; } .namefield { margin-top: 10px; } .skinrow { margin-top: 8px; }
}
/* Hochformat (Handy hochkant): schmalere Karten, Sprechblase breiter, Extra-Knöpfe über die Aktionsknöpfe */
@media (max-aspect-ratio: 1/1) {
  .cards.six .card { width: 100px; padding: 6px; font-size: 16px; } .cards.six .card .pic { width: 86px; height: 86px; } .cards.six { gap: 10px; }
  .cards { gap: 10px; } .card { width: 120px; } .card .pic { width: 104px; height: 104px; }
  .bubble { width: calc(100vw - 20px); bottom: calc(14px + env(safe-area-inset-bottom)); }
  #extras { right: calc(20px + env(safe-area-inset-right)); bottom: calc(250px + env(safe-area-inset-bottom)); flex-direction: column; }
  #tr { flex-wrap: wrap; justify-content: flex-end; max-width: calc(100vw - 150px); }
  .grid { grid-template-columns: repeat(4, 72px); } .slot { width: 72px; height: 72px; }
  .namefield input { width: 170px; }
}
@media (max-aspect-ratio: 1/1) and (max-width: 430px) { .lg { width: 104px; height: 104px; } .md { width: 64px; height: 64px; } }
.camctl .camturn { background: var(--cream); }
.cammid { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.campin img { opacity: .3; } .campin.on { background: var(--pink); } .campin.on img { opacity: 1; }
/* dauerhafte Dreh-Pfeile im Spiel: unten mittig (Hochformat: etwas höher, zwischen Stick und Aktionsknöpfen ist kein Platz) */
#camturns { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; gap: 14px; }
#camturns[hidden] { display: none; } #camturns .round { touch-action: none; opacity: .9; }
@media (max-aspect-ratio: 1/1) { #camturns { bottom: calc(190px + env(safe-area-inset-bottom)); left: calc(24px + env(safe-area-inset-left)); transform: none; } }
/* Landkarte (ui/map.js): quadratisch, so groß wie es hoch- und querformat passt; Größen in cqw = Anteil der Kartenbreite */
.mappanel { padding: 10px; }
.map { position: relative; width: min(88vw, calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), 760px); aspect-ratio: 1; border-radius: 26px; overflow: hidden; background: #7fd0ee; container-type: inline-size; }
.mapimg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.mp { --s: 8.5cqw; position: absolute; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, calc(var(--s) / -2)); pointer-events: none; }
.mp.spot { --s: 6.2cqw; }
.mp img { width: var(--s); height: var(--s); object-fit: contain; filter: drop-shadow(0 2px 2px rgba(90, 63, 99, .45)); }
.mp b { margin-top: -0.4cqw; padding: .1em .55em; border-radius: 999px; background: rgba(255, 248, 240, .92); font-size: max(10px, 2.7cqw); font-weight: 800; white-space: nowrap; box-shadow: 0 2px 4px rgba(90, 63, 99, .25); }
.mp.area b { font-size: max(11px, 3.3cqw); }
.mp.side-r, .mp.side-l { flex-direction: row; transform: translate(calc(var(--s) / -2), -50%); } .mp.side-l { flex-direction: row-reverse; transform: translate(calc(var(--s) / 2 - 100%), -50%); }
.mp.side-r b, .mp.side-l b { margin: 0 -0.4cqw; }
.me { position: absolute; width: 8cqw; height: 8cqw; transform: translate(-50%, -50%); pointer-events: none; }
.me .pic { position: absolute; inset: 0; border-radius: 50%; background: #fff; border: 0.8cqw solid #f07fae; overflow: hidden; box-shadow: 0 0 0 0 rgba(240, 127, 174, .8); animation: mepulse 1.4s infinite; }
.me .pic img { width: 100%; height: 100%; object-fit: cover; }
.me .dir { position: absolute; inset: -4cqw; transform: rotate(var(--a)); }
.me .dir::before { content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%); border: 2.6cqw solid transparent; border-top: 0; border-bottom: 4.4cqw solid #f07fae; filter: drop-shadow(0 1px 1px rgba(90, 63, 99, .5)); }
@keyframes mepulse { 70% { box-shadow: 0 0 0 3cqw rgba(240, 127, 174, 0) } 100% { box-shadow: 0 0 0 0 rgba(240, 127, 174, 0) } }
.compass { position: absolute; left: 2.5cqw; top: 2.5cqw; width: 15cqw; height: 15cqw; filter: drop-shadow(0 2px 3px rgba(90, 63, 99, .35)); }
.compass text { font-weight: 900; text-anchor: middle; dominant-baseline: middle; fill: var(--ink); font-size: 13px; }
.compass .n { fill: #f0506e; font-size: 17px; }
/* Laden/Werkbank: rechts ein Wisch-Streifen zum Scrollen (keine Knöpfe), Nachfrage vor dem Kaufen */
.scroll { padding-right: 30px; background: linear-gradient(to left, rgba(247, 168, 200, .22) 0 22px, transparent 22px); border-radius: 0 18px 18px 0; }
.panel .confirm { position: absolute; left: 12px; right: 12px; bottom: 12px; justify-content: center; display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 28px; padding: 10px 14px; box-shadow: 0 0 0 4px var(--pink2), var(--shadow); z-index: 5; animation: cpop .18s ease-out; }
@keyframes cpop { from { transform: scale(.9); opacity: 0 } }
.scroll .cat { width: min(820px, calc(86vw - 30px)); }
.confirm .cpic { width: 84px; height: 84px; display: grid; place-items: center; position: relative; } .confirm .cpic img { max-width: 84px; max-height: 84px; }
.confirm .cost { display: flex; gap: 6px; font-weight: 900; font-size: 20px; align-items: center; } .confirm .cost span { display: inline-flex; align-items: center; } .confirm .cost img { width: 30px; height: 30px; }
.confirm .yes { background: var(--pink); }
@media (max-width: 480px) { .scroll .cat { width: 268px; grid-template-columns: repeat(2, 128px); } .scroll .cat .item .pic { height: 84px; } }
/* Handbuch (ui/manual.js) */
.panel.manual { width: min(720px, 94vw); }
.mtabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; } .mtabs .round.on { background: var(--pink); }
.mbody { max-height: min(60vh, 520px); text-align: left; }
.mbody h2 { display: flex; align-items: center; gap: 10px; margin: 4px 0 10px; font-size: 24px; color: var(--pink2); } .mbody h2 img { width: 40px; height: 40px; }
.mrow { display: flex; gap: 12px; align-items: center; background: #fff; border-radius: 20px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 3px 0 rgba(160, 90, 140, .15); }
.micons { display: flex; flex-shrink: 0; min-width: 48px; } .micons img { width: 44px; height: 44px; object-fit: contain; } .micons img + img { margin-left: -8px; }
.mrow p { margin: 0; font-size: 18px; line-height: 1.35; font-weight: 600; }
@media (max-width: 480px) { .mtabs .round { width: 52px; height: 52px; } .mrow p { font-size: 16px; } .micons img { width: 36px; height: 36px; } }
.dots i.z { border-color: #f07fae; border-radius: 4px; transform: rotate(45deg) scale(.85); }   /* Zucht-Farbe: rosa Raute */
.dots { flex-wrap: wrap; max-width: 140px; margin-left: auto; margin-right: auto; }
.confirm .qty { display: flex; align-items: center; gap: 6px; } .confirm .qty .round { width: 44px; height: 44px; font-size: 26px; font-weight: 900; } .confirm .qn { min-width: 32px; text-align: center; font-size: 26px; font-weight: 900; }
@media (max-width: 480px) { .panel .confirm { flex-wrap: wrap; gap: 8px; } .confirm .cpic { width: 64px; height: 64px; } .confirm .cpic img { max-width: 64px; max-height: 64px; } }
/* Meine Tiere (Rucksack): Zuhause-Bild unten rechts, Boot = zur Adoption vorgemerkt */
.pets .item { position: relative; } .pets .pname { font-weight: 900; font-size: 15px; }
.pets .pinfo { display: flex; gap: 4px; justify-content: center; align-items: center; min-height: 24px; } .pets .pinfo i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); } .pets .pinfo img { width: 22px; height: 22px; }
.pets .phome { position: absolute; right: 6px; top: 6px; width: 38px; height: 38px; } .pets .phome.none { opacity: .45; filter: grayscale(.6); }
.pets .pboat { position: absolute; left: 6px; top: 6px; width: 38px; height: 38px; } .pets .item.adopt { outline: 4px solid #8fd3ff; }
.confirm .adopt.on { background: #8fd3ff; }
/* Medaillen an der Bude (Schleifen-Stern, Medaille, Krone), Übersicht am Glücksrad, Herausforderung */
.bmedals { display: flex; gap: 10px; } .bmedals img { width: 52px; height: 52px; filter: grayscale(1); opacity: .3; } .bmedals img.on { filter: drop-shadow(0 3px 4px rgba(120, 60, 120, .25)); opacity: 1; }
.bmedals.tally span { display: flex; align-items: center; gap: 4px; font-weight: 900; font-size: 26px; color: #5a3f63; } .bmedals.tally img { filter: none; opacity: 1; width: 46px; height: 46px; }
.booth { position: relative; } .bduel { position: absolute; top: 0; left: 0; display: flex; align-items: flex-end; } .bduel .bpic { width: 70px; height: 70px; border-width: 3px; } .bduel > img { width: 38px; height: 38px; margin-left: -14px; }
.blevel { display: flex; gap: 10px; } .blv { display: grid; justify-items: center; gap: 2px; width: 92px; padding: 6px 4px 8px; border-radius: 22px; background: var(--cream); box-shadow: var(--shadow); opacity: .6; transition: transform .08s; }
.blv:active { transform: scale(.94); } .blv img { width: 52px; height: 52px; pointer-events: none; } .blv span { font-weight: 900; font-size: 18px; pointer-events: none; }
.blv.on { opacity: 1; background: #ffe58a; outline: 4px solid #fff; transform: scale(1.06); }
@media (max-height: 500px) { .blv { width: 78px; padding: 4px 4px 6px; border-radius: 18px; } .blv img { width: 40px; height: 40px; } .blv span { font-size: 15px; } }
.duel .bmodes .round.no { background: #ffd0d8; } .duel .bmodes .round.yes { background: #c9f0d3; }
.btries { display: flex; gap: 4px; } .btries img { width: 34px; height: 34px; }

/* Tagesaufgaben oben: Stand als Zahl unter dem Bild, füttern = Apfel mit Pfote */
.task { margin-bottom: 14px; } .task > div { position: relative; }
.task .tcount { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); background: var(--cream); border-radius: 999px; padding: 0 6px; font-size: 12px; font-weight: 900; line-height: 18px; box-shadow: 0 2px 4px rgba(0,0,0,.15); white-space: nowrap; }
.task.done .tcount { display: none; }
.task .tpaw { position: absolute; right: -2px; bottom: -2px; width: 52% !important; height: 52% !important; }
/* Königsstall-Fenster */
.royalhead { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; } .royalhead img { width: 44px; height: 44px; } .royalhead img.off { filter: grayscale(1); opacity: .3; }
.pets .item.cur { outline: 4px solid var(--pink2); }
.royalnew { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; padding-top: 10px; border-top: 3px dashed #f3d9e6; } .royalnew .item { width: 120px; }
.royalhead { align-items: center; } .royalhead .rnest { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; font-weight: 900; } .royalhead .rnest img { width: 34px; height: 34px; }
.royalhead .breed { margin-left: 10px; } .royalhead .breed.on { background: var(--pink); }
/* Neuer Freund: frei lassen oder Zuhause (ui/freechoice.js) */
.freechoice .panel { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 20px; width: auto; }
.freechoice .fcpic { width: 120px; height: 120px; display: grid; place-items: center; } .freechoice .fcpic img { max-width: 120px; max-height: 120px; }
.freechoice .fcrow { display: flex; gap: 22px; }
.freechoice .round.lg { width: 104px; height: 104px; flex-direction: column; gap: 2px; display: flex; align-items: center; justify-content: center; }
.freechoice .round.lg img { width: 58px; height: 58px; } .freechoice .round.lg b { font-size: 15px; }
.freechoice .fchome { background: var(--pink); }
/* Stickerheft (Rucksack, ui/bag.js): Seiten mit 6 runden Stickern, fehlende blass */
.stickers { display: flex; flex-direction: column; gap: 12px; padding: 4px; }
.spage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff7fb; border-radius: 22px; padding: 10px; box-shadow: 0 0 0 3px var(--pink2); }
.spage.full { box-shadow: 0 0 0 3px #ffd35e; background: #fffaf0; }
.stk { width: 64px; height: 64px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px #ffe3f0, 0 2px 6px rgba(0,0,0,.12); overflow: hidden; display: grid; place-items: center; }
.stk img { width: 64px; height: 64px; object-fit: cover; transform: scale(1.8) translateY(16%); }
.stk.miss { background: #f1e8ee; box-shadow: 0 0 0 4px #efe6ec; } .stk.miss img { filter: grayscale(1) brightness(1.6) opacity(.28); }
.sreward { display: flex; align-items: center; gap: 4px; font-weight: 900; margin-left: auto; } .sreward img { width: 26px; height: 26px; }
