* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  font-family: "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  background: linear-gradient(#8fd3ff, #c9f0ff);
  color: #3a2d5c;
  -webkit-user-select: none; user-select: none;
  touch-action: manipulation;
}
[hidden] { display: none !important; }

.screen {
  position: fixed; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: env(safe-area-inset-top) 16px env(safe-area-inset-bottom);
}
.logo {
  font-size: clamp(32px, 9vw, 56px); margin: 0 0 16px;
  color: #fff; text-shadow: 0 4px 0 #ff6b9d, 0 8px 18px rgba(0,0,0,.2);
  text-align: center;
}
.sub { margin: 0 0 16px; font-size: 20px; text-align: center; }
.card {
  background: rgba(255,255,255,.85); border-radius: 28px; padding: 28px 24px;
  width: min(420px, 100%); text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.card .logo { color: #ff6b9d; text-shadow: 0 3px 0 #ffd1e3; }
input {
  font: inherit; font-size: 26px; text-align: center; width: 100%;
  padding: 14px; border-radius: 18px; border: 4px solid #c9b8ff; outline: none;
  background: #fff; color: #3a2d5c; letter-spacing: 2px;
  -webkit-user-select: text; user-select: text;
}
input:focus { border-color: #8e6be8; }
button { font: inherit; cursor: pointer; border: none; color: inherit; }
.big {
  margin-top: 16px; width: 100%; font-size: 26px; padding: 16px;
  border-radius: 20px; background: #ff6b9d; color: #fff;
  box-shadow: 0 6px 0 #d94a7d; transition: transform .08s;
}
.big:active { transform: translateY(4px); box-shadow: 0 2px 0 #d94a7d; }
.round {
  width: 52px; height: 52px; border-radius: 50%; font-size: 26px;
  background: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.15);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.round:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.15); }
.round.xl { width: 68px; height: 68px; font-size: 36px; }
.error { color: #d93a5a; min-height: 1.4em; margin: 12px 0 0; font-size: 18px; }

/* Profile */
.profile-grid {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
  max-width: 900px; overflow-y: auto; padding: 8px;
}
.profile {
  width: 140px; padding: 10px 8px 14px; border-radius: 24px; background: rgba(255,255,255,.9);
  box-shadow: 0 6px 0 rgba(0,0,0,.12); display: flex; flex-direction: column; align-items: center;
  font-size: 20px;
}
.profile:active { transform: translateY(4px); box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.profile canvas { width: 110px; height: 130px; }
.profile.new .plus { width: 110px; height: 130px; display: flex; align-items: center; justify-content: center; font-size: 64px; color: #8e6be8; }
.profile .name { margin-top: 4px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Neues Profil */
.create {
  width: min(480px, 100%); max-height: 100%; overflow-y: auto; position: relative;
  background: rgba(255,255,255,.88); border-radius: 28px; padding: 16px; text-align: center;
}
#create-back { position: absolute; left: 12px; top: 12px; }
#create-preview { width: 160px; height: 190px; }
.option-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.option-row .label { font-size: 28px; width: 36px; flex: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 44px; height: 44px; border-radius: 50%; border: 4px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.swatch.on { border-color: #8e6be8; transform: scale(1.12); }
.swatch canvas { width: 36px; height: 36px; }
.swatch.style { background: #f3eeff; display: flex; align-items: center; justify-content: center; padding: 0; }
.name-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }

/* Spiel */
#screen-game { padding: 0; }
#game { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; }
.hud-top {
  position: fixed; top: calc(env(safe-area-inset-top) + 10px); left: 12px; right: 12px;
  display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none;
}
.hud-top > * { pointer-events: auto; }
#online { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; max-width: 70%; margin-top: 58px; }
.chip {
  background: rgba(255,255,255,.9); border-radius: 20px; padding: 6px 12px 6px 8px;
  font-size: 16px; display: flex; align-items: center; gap: 6px; box-shadow: 0 2px 0 rgba(0,0,0,.1);
}
.chip .dot { width: 14px; height: 14px; border-radius: 50%; }
.hud-bottom {
  position: fixed; left: 0; right: 0; bottom: calc(env(safe-area-inset-bottom) + 14px);
  display: flex; justify-content: center; gap: 14px; pointer-events: none;
}
.hud-bottom > * { pointer-events: auto; }
.emoji-panel {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 96px);
  background: #fff; border-radius: 24px; padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  display: grid; grid-template-columns: repeat(4, 60px); gap: 6px;
}
.emoji-panel button { font-size: 38px; height: 60px; border-radius: 14px; background: #f6f2ff; }
.emoji-panel button:active { background: #e4dbff; }
.toast {
  position: fixed; top: calc(env(safe-area-inset-top) + 76px); left: 50%; transform: translateX(-50%);
  background: rgba(58,45,92,.85); color: #fff; padding: 10px 18px; border-radius: 20px; font-size: 18px;
  pointer-events: none; text-align: center; max-width: 90vw;
}

/* Haus */
.hud-left { display: flex; flex-direction: column; gap: 10px; }
.item-menu {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(env(safe-area-inset-bottom) + 120px);
  display: flex; gap: 10px; background: rgba(255,255,255,.85); padding: 8px; border-radius: 34px;
}
.edit-bar {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 10px 12px calc(env(safe-area-inset-bottom) + 10px);
  background: rgba(255,255,255,.92); box-shadow: 0 -4px 16px rgba(0,0,0,.12);
  display: flex; gap: 10px; align-items: center;
}
.catalog { flex: 1; display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px 2px; }
.catalog button {
  flex: none; width: 72px; height: 72px; border-radius: 18px; background: #f6f2ff;
  border: 3px solid transparent; padding: 0;
}
.catalog button.on { border-color: #8e6be8; background: #e4dbff; }
.catalog canvas { width: 66px; height: 66px; }
.catalog button { position: relative; height: 84px; }
.catalog button .price { position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); font-size: 12px; font-weight: bold; color: #b07800; white-space: nowrap; }
.catalog button.locked { filter: grayscale(1); opacity: .45; }
.catalog button.poor { opacity: .45; }
.catalog button.nudge { animation: shake .5s; }
.room-count { flex: none; font-size: 15px; font-weight: bold; color: #3a2d5c; background: #f6f2ff; border-radius: 14px; padding: 6px 8px; }
.room-count.full { background: #ffe0dc; color: #c0392b; }
.edit-actions { display: flex; gap: 8px; flex: none; }
.chip .where { font-size: 14px; }

/* Wie geht's mir? */
.buddy {
  position: fixed; left: 12px; bottom: calc(env(safe-area-inset-bottom) + 100px);
  width: 76px; padding: 6px 6px 8px; border-radius: 24px; background: rgba(255,255,255,.95);
  box-shadow: 0 4px 0 rgba(0,0,0,.15); display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.buddy .face { font-size: 40px; line-height: 1; }
.buddy .badge {
  position: absolute; right: -8px; top: -8px; width: 34px; height: 34px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.25); font-size: 20px;
  display: flex; align-items: center; justify-content: center;
}
.buddy .mini { display: flex; flex-direction: column; gap: 3px; width: 100%; }
.buddy .bar { display: block; height: 7px; border-radius: 4px; background: #e9e4f5; overflow: hidden; }
.buddy .bar i { display: block; height: 100%; border-radius: 4px; transition: width .6s, background .6s; }
.buddy.need { animation: hop 1.2s infinite; }
@keyframes hop { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }
.hint { animation: glow 1s infinite; }
@keyframes glow { 0%,100% { box-shadow: 0 4px 0 rgba(0,0,0,.15), 0 0 0 0 rgba(255,193,7,.9); } 50% { box-shadow: 0 4px 0 rgba(0,0,0,.15), 0 0 0 10px rgba(255,193,7,0); transform: scale(1.12); } }
.food-panel { bottom: calc(env(safe-area-inset-bottom) + 210px); }
.food-panel .close { font-size: 26px; }
.wake {
  position: fixed; left: 50%; transform: translateX(-50%); width: auto;
  bottom: calc(env(safe-area-inset-bottom) + 30px); padding: 16px 28px; background: #ffb74d; box-shadow: 0 6px 0 #e08e1b;
}
.wake:active { transform: translate(-50%, 4px); }
@media (max-width: 420px) {
  .round.xl { width: 58px; height: 58px; font-size: 30px; }
  .hud-bottom { gap: 10px; }
}

/* Bild-Schloss */
.parent-link { margin-top: 18px; background: rgba(255,255,255,.6); border-radius: 16px; padding: 8px 14px; font-size: 15px; }
.lock-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lock-card #lock-back, .parent-card #parent-close { position: absolute; left: 12px; top: 12px; }
.parent-card #parent-close { left: auto; right: 12px; }
#lock-avatar { width: 90px; height: 105px; }
.lock-dots { display: flex; gap: 10px; justify-content: center; margin: 4px 0; }
.lock-dots i { width: 18px; height: 18px; border-radius: 50%; background: #e4dbff; display: block; }
.lock-dots i.on { background: #8e6be8; }
.lock-grid { display: grid; grid-template-columns: repeat(3, 76px); gap: 10px; justify-content: center; }
.lock-grid button { height: 76px; border-radius: 20px; font-size: 42px; background: #f6f2ff; box-shadow: 0 4px 0 rgba(0,0,0,.1); }
.lock-grid button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.1); }
.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
.profile .lock { position: absolute; top: 6px; right: 8px; font-size: 20px; }
.profile { position: relative; }

/* Eltern-Bereich */
.parent-card { position: relative; text-align: left; max-height: calc(100% - 20px); overflow-y: auto; width: min(520px, 100%); }
.parent-card h2 { margin: 4px 0 12px; text-align: center; }
.parent-card h3 { margin: 18px 0 8px; font-size: 17px; }
.parent-card input { font-size: 18px; padding: 10px; letter-spacing: 0; text-align: left; border-width: 3px; }
.parent-card .note { font-size: 13px; color: #6b5e8a; margin: 6px 0 0; }
.row { display: flex; gap: 8px; align-items: center; }
.small { font-size: 15px; padding: 10px 12px; border-radius: 12px; background: #8e6be8; color: #fff; flex: none; }
.small.grey { background: #e4dbff; color: #3a2d5c; }
.small.danger { background: #e8443a; }
.pprofile { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid #eee6ff; flex-wrap: wrap; }
.pprofile canvas { width: 44px; height: 52px; flex: none; }
.pprofile input { flex: 1; min-width: 100px; }
.pprofile .meta { width: 100%; font-size: 12px; color: #6b5e8a; padding-left: 52px; }
.lock-picker { position: fixed; inset: 0; background: rgba(58,45,92,.5); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lock-picker .card { text-align: center; }
.lock-picker .row { justify-content: center; margin-top: 14px; }
.emoji-panel button.who { font-size: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; height: auto; min-height: 60px; overflow: hidden; }
.emoji-panel button.who canvas { width: 30px; height: 36px; }
.emoji-panel button.who span { max-width: 56px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Auswahl (Essen, Werkzeuge, Geschenke) kompakt unten, damit die Szene sichtbar bleibt */
.food-panel {
  bottom: calc(env(safe-area-inset-bottom) + 12px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
  width: max-content; max-width: calc(100vw - 24px);
}
.food-panel button { width: 58px; height: 58px; font-size: 32px; }
#food-panel:not([hidden]) ~ #emote-bar, #food-panel:not([hidden]) ~ #buddy { display: none; }

/* Behandlungs-Ansicht */
.care {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center;
  padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 12px);
  background: radial-gradient(circle at 50% 45%, #ffffff 0%, #d9efff 55%, #a8d8f5 100%);
}
.care[data-place="nursery"] { background: radial-gradient(circle at 50% 45%, #ffffff 0%, #ffe3ef 55%, #f7b8d2 100%); }
.care-top { width: 100%; display: flex; align-items: center; gap: 10px; }
.care-steps { flex: 1; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.care-steps .step {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.7); display: flex;
  align-items: center; justify-content: center; font-size: 26px; opacity: .45; position: relative; transition: all .3s;
}
.care-steps .step.now { opacity: 1; transform: scale(1.25); background: #fff; box-shadow: 0 0 0 4px #ffd54f; }
.care-steps .step.done { opacity: 1; background: #c9f2c7; }
.care-steps .step.done::after { content: '✓'; position: absolute; right: -4px; bottom: -4px; font-size: 16px; color: #fff; background: #3fbf7f; border-radius: 50%; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.care-coins { background: #fff; border-radius: 20px; padding: 8px 12px; font-size: 18px; box-shadow: 0 2px 0 rgba(0,0,0,.1); }
.care-title { margin: 10px 0 0; font-size: clamp(20px, 5vw, 28px); font-weight: bold; text-align: center; }
.care-stage { position: relative; flex: 1; width: min(92vw, 52vh); max-height: 52vh; aspect-ratio: 1; margin: 6px 0; }
.patient {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: min(64vw, 36vh); line-height: 1; transition: filter .6s;
}
.patient.sick { filter: saturate(.55) brightness(.95); }
.patient.asleep { filter: brightness(.8); }
.patient.shake { animation: shake .45s; }
.patient.jump { animation: jump .6s 4; }
.patient.rock { animation: rock .8s 2; }
@keyframes jump { 50% { transform: translateY(-14%) scale(1.06); } }
@keyframes rock { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.care-layer { position: absolute; inset: 0; pointer-events: none; }
.sticker {
  position: absolute; transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(var(--s, 1));
  font-size: min(30vw, 17vh); line-height: 1; animation: pop .35s;
}
@keyframes pop { from { transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(0); } }
.sticker.badge { animation: pop .35s, bob 1.6s infinite; }
@keyframes bob { 50% { margin-top: -8px; } }
.sticker.wound { width: 13%; height: 7%; border-radius: 40%; background: repeating-linear-gradient(-30deg, #e8443a 0 4px, transparent 4px 8px); opacity: .85; }
.sticker.smear { width: 18%; height: 10%; border-radius: 50%; background: rgba(255,255,255,.75); }
.sticker.foam { width: 16%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #e3f4ff 60%, rgba(200,230,255,.6)); box-shadow: 18px 8px 0 -4px #fff, -14px 10px 0 -6px #fff; }
.sticker.dirt { width: 12%; aspect-ratio: 1.3; border-radius: 45%; background: rgba(110,72,40,.75); }
.sticker.cheeks { width: 46%; height: 10%; background: radial-gradient(circle at 18% 50%, rgba(255,70,70,.55) 0 22%, transparent 24%), radial-gradient(circle at 82% 50%, rgba(255,70,70,.55) 0 22%, transparent 24%); }
.sticker.greenish { width: 60%; height: 60%; border-radius: 50%; background: radial-gradient(rgba(140,220,90,.35), transparent 70%); }
.sticker.smell { animation: pop .35s, bob 1.2s infinite; }
.sticker.tear { animation: pop .35s, drip 1.4s infinite; }
@keyframes drip { 80% { margin-top: 20px; opacity: 1; } 100% { margin-top: 26px; opacity: 0; } }
.flying { position: fixed; z-index: 30; font-size: 64px; transform: translate(-50%, -50%); transition: left .5s ease-in-out, top .5s ease-in-out, transform .5s; pointer-events: none; }
.floating { position: absolute; transform: translate(-50%, -50%); background: #fff; border-radius: 18px; padding: 6px 14px; font-size: 20px; font-weight: bold; white-space: nowrap; box-shadow: 0 4px 10px rgba(0,0,0,.15); animation: floatUp 1.6s forwards; }
.floating.big { font-size: 80px; background: none; box-shadow: none; }
@keyframes floatUp { 0% { opacity: 0; margin-top: 10px; } 15% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; margin-top: -30px; } }
.particle { position: absolute; font-size: 30px; animation: rise 1.6s forwards; opacity: 0; }
.particle.fall { animation-name: fall; }
.particle.side { animation-name: side; }
.particle.foam-p { color: #fff; text-shadow: 0 0 4px #9fdcff; }
@keyframes rise { 10% { opacity: 1; } 100% { transform: translateY(-120px) scale(1.3); opacity: 0; } }
@keyframes fall { 0% { transform: translateY(-120px); opacity: 1; } 100% { transform: translateY(40px); opacity: 0; } }
@keyframes side { 0% { transform: translateX(-80px); opacity: 1; } 100% { transform: translateX(80px); opacity: 0; } }
.care-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; width: 100%; max-width: 620px; }
.care-tray button {
  width: 84px; height: 92px; border-radius: 22px; background: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.12);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.care-tray button:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,.12); }
.care-tray .ico { font-size: 44px; line-height: 1; }
.care-tray .lbl { font-size: 12px; }
.care-tray button.hint { animation: hintHop 1s infinite; box-shadow: 0 5px 0 rgba(0,0,0,.12), 0 0 0 5px #ffd54f; }
@keyframes hintHop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-14px); } }
@media (max-width: 420px) { .care-tray button { width: 70px; height: 80px; } .care-tray .ico { font-size: 36px; } }
.care-done { position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(env(safe-area-inset-bottom) + 24px); pointer-events: none; }
.care-done-box { pointer-events: auto; background: #fff; border-radius: 28px; padding: 18px 28px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.2); animation: pop2 .5s; width: min(420px, 92vw); }
@keyframes pop2 { from { transform: scale(.4); opacity: 0; } }
.care-done-box .t { font-size: 34px; font-weight: bold; color: #ff6b9d; }
.care-done-box .coins { font-size: 40px; font-weight: bold; color: #e8a400; animation: coinPulse .8s 3; }
@keyframes coinPulse { 50% { transform: scale(1.25); } }
.care-done-box .big { margin-top: 10px; }
.buy-preview { width: 120px; height: 140px; margin: 0 auto; }
.buddy .coins { font-size: 14px; font-weight: bold; color: #b07800; }
.swatch .price { position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); font-size: 10px; background: #ffd54f; border-radius: 8px; padding: 0 4px; white-space: nowrap; }
.swatch { position: relative; }
.swatch.locked canvas { opacity: .55; }
.emoji-panel button .price { display: block; font-size: 10px; margin-top: -4px; color: #b07800; }

/* Umkleide */
.dress { background: linear-gradient(160deg, #ffe3ef 0%, #e6ddff 50%, #c9ecff 100%); padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom); }
.dress-wrap { width: min(980px, 100%); height: 100%; display: flex; flex-direction: column; padding: 10px 16px 14px; gap: 8px; }
.dress-head { display: flex; align-items: center; justify-content: space-between; }
.dress-head h2 { margin: 0; font-size: clamp(22px, 5vw, 32px); color: #8e6be8; text-shadow: 0 2px 0 #fff; }
.dress-main { flex: 1; min-height: 0; display: flex; gap: 14px; }
.mirror { flex: 0 0 38%; display: flex; flex-direction: column; align-items: center; gap: 10px; min-height: 0; }
.mirror-glass {
  position: relative; width: 100%; flex: 1; min-height: 0; border-radius: 120px 120px 26px 26px;
  border: 8px solid #ffd54f; box-shadow: inset 0 0 0 4px #fff3b8, 0 8px 24px rgba(142,107,232,.25);
  background: radial-gradient(ellipse at 50% 88%, rgba(255,255,255,.95) 0 18%, transparent 19%), linear-gradient(180deg, #fdfbff, #e9f4ff);
  display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
}
#create-preview { width: 100%; height: 100%; }
#create-preview.hop { animation: dressHop .45s; }
@keyframes dressHop { 40% { transform: translateY(-10px) scale(1.03); } }
.name-row { width: 100%; }
.name-row input { font-size: 20px; padding: 10px; }
.dress-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; background: rgba(255,255,255,.75); border-radius: 26px; padding: 10px; min-height: 0; }
.dress-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; flex: none; }
.dress-tabs button {
  flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; min-width: 64px;
  border-radius: 16px; background: #f3eeff; font-size: 12px; color: #6b5e8a;
}
.dress-tabs button span { font-size: 28px; line-height: 1.1; }
.dress-tabs button.on { background: #8e6be8; color: #fff; box-shadow: 0 4px 0 #6a4fc0; }
.dress-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; padding: 6px 2px; align-content: start; }
.tile {
  position: relative; aspect-ratio: 1; border-radius: 22px; background: #fff; box-shadow: 0 4px 0 rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: center; border: 4px solid transparent; padding: 0; overflow: hidden;
}
.tile canvas { width: 100%; height: 100%; }
.tile.on { border-color: #8e6be8; box-shadow: 0 4px 0 #6a4fc0; }
.tile.on::after { content: '✓'; position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: #8e6be8; color: #fff; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.tile.color { border-width: 5px; }
.tile.color.on { border-color: #fff; box-shadow: 0 0 0 4px #8e6be8; }
.tile.locked canvas { opacity: .45; filter: grayscale(.5); }
.tile .tag { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); background: #ffd54f; border-radius: 10px; padding: 1px 7px; font-size: 12px; font-weight: bold; white-space: nowrap; }
.tile:active { transform: scale(.95); }
.dress .big { margin-top: 0; flex: none; }
.dress .error { margin: 0; min-height: 1.2em; text-align: center; }
@media (orientation: portrait) {
  .dress-main { flex-direction: column; }
  .mirror { flex: 0 0 34%; flex-direction: row; align-items: stretch; }
  .mirror-glass { flex: 1; border-radius: 80px 80px 22px 22px; border-width: 6px; }
  .name-row { width: 46%; display: flex; align-items: flex-end; }
  .dress-grid { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); }
}
.dress-head #create-back { position: static; }
.dress .name-row input { font-size: 18px; letter-spacing: 0; padding: 10px 12px; }

/* Fischen */
.fishing {
  position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 14px);
  background: linear-gradient(#bfe8ff 0%, #8fd3ff 22%, #3fa9e8 23%, #2b86c9 100%);
}
.fish-bag { flex: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; font-size: 22px; background: rgba(255,255,255,.75); border-radius: 18px; padding: 4px 10px; min-height: 40px; align-items: center; }
.fish-bag .empty { font-size: 14px; color: #3a2d5c; }
.sea { position: relative; flex: 1; width: 100%; max-width: 700px; overflow: hidden; }
.sea::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(170deg, transparent 0 40px, rgba(255,255,255,.12) 40px 44px); animation: waves 4s linear infinite; }
@keyframes waves { to { background-position: 0 88px; } }
.rod { position: absolute; left: -10px; bottom: -10px; width: 46%; height: 10px; background: #8b5a2b; border-radius: 6px; transform-origin: left center; transform: rotate(-38deg); }
.line { position: absolute; left: 34%; top: 14%; width: 2px; height: 46%; background: rgba(255,255,255,.9); transform-origin: top; transform: rotate(-20deg); }
.bobber { position: absolute; left: 52%; top: 58%; width: 34px; height: 34px; border-radius: 50%; transform: translate(-50%, -50%);
  background: linear-gradient(#e8443a 0 50%, #fff 50%); box-shadow: 0 0 0 3px rgba(255,255,255,.4); animation: float 1.6s ease-in-out infinite; }
.bobber.bite { animation: bite .3s ease-in-out infinite; }
@keyframes float { 50% { margin-top: -6px; } }
@keyframes bite { 50% { margin-top: 14px; transform: translate(-50%, -50%) scale(.8); } }
.alert { position: absolute; left: 52%; top: 40%; transform: translate(-50%, -50%); font-size: 64px; animation: pop .3s; }
.catch { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); background: #fff; border-radius: 28px; padding: 16px 26px; text-align: center; font-size: 20px; font-weight: bold; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: pop2 .5s; min-width: 220px; }
.catch .e { font-size: 96px; line-height: 1.1; animation: jump .6s 2; }
.fish-btn { width: min(420px, 100%); font-size: 28px; }
.fish-btn.pull { background: #e8443a; box-shadow: 0 6px 0 #b8302a; animation: hintHop .5s infinite; }
.fish-btn:disabled { opacity: .6; }
.food-panel button.wide { width: auto; padding: 0 16px; font-size: 22px; }
.sea { border-radius: 0 0 24px 24px; }
.sky { position: absolute; left: 0; right: 0; top: 0; height: 24%; }
.sky .sun { position: absolute; right: 8%; top: 8%; font-size: 54px; }
.sky .cloud { position: absolute; font-size: 46px; opacity: .9; animation: drift 30s linear infinite; }
.sky .c1 { top: 10%; left: 10%; } .sky .c2 { top: 35%; left: 55%; font-size: 36px; animation-duration: 45s; }
.sky .far { position: absolute; left: 22%; bottom: -8px; font-size: 40px; opacity: .8; }
@keyframes drift { from { transform: translateX(-30px); } 50% { transform: translateX(30px); } to { transform: translateX(-30px); } }
.shadow { position: absolute; width: 60px; height: 22px; border-radius: 50%; background: rgba(10,50,90,.28); animation: swim 9s ease-in-out infinite; }
.shadow::after { content: ''; position: absolute; right: -14px; top: 4px; border-left: 16px solid rgba(10,50,90,.28); border-top: 7px solid transparent; border-bottom: 7px solid transparent; }
.shadow.s1 { top: 45%; left: 15%; } .shadow.s2 { top: 65%; left: 60%; animation-delay: -3s; animation-duration: 12s; } .shadow.s3 { top: 78%; left: 30%; animation-delay: -6s; transform: scale(.7); }
@keyframes swim { 50% { transform: translateX(120px); } }
.dock { position: absolute; left: -4%; bottom: 0; width: 40%; height: 16%; background: repeating-linear-gradient(90deg, #c98b5a 0 26px, #b97c4c 26px 30px); border-top: 6px solid #8b5a2b; border-radius: 0 14px 0 0; }
.fish-me { position: absolute; left: 6%; bottom: 10%; width: 120px; height: 150px; }
.rod-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Kino */
.movie {
  position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 10px calc(env(safe-area-inset-bottom) + 14px);
  background: radial-gradient(ellipse at 50% 30%, #3a1d3a, #120814 70%);
}
.movie-top { width: 100%; display: flex; align-items: center; gap: 12px; }
.movie-title { flex: 1; text-align: center; color: #ffd54f; font-size: clamp(20px, 5vw, 30px); font-weight: bold; margin-right: 52px; text-shadow: 0 2px 0 #7a1d3a; }
.curtains {
  flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; position: relative;
  background: linear-gradient(90deg, #b3123e 0, #7a0b2a 6%, transparent 7%, transparent 93%, #7a0b2a 94%, #b3123e 100%);
  border-top: 14px solid #b3123e; border-radius: 10px;
}
.screen-frame { width: min(94%, 150vh); aspect-ratio: 4 / 3; max-height: 100%; border: 6px solid #2a1220; border-radius: 10px; overflow: hidden; box-shadow: 0 0 40px rgba(255,240,200,.25); }
.movie-stage { position: relative; width: 100%; height: 100%; overflow: hidden; transition: background .8s; }
.actor { position: absolute; font-size: min(13vw, 12vh); line-height: 1; will-change: transform, left, top; }
.movie-caption { min-height: 2.6em; max-width: 720px; color: #fff; font-size: clamp(18px, 4.4vw, 26px); text-align: center; font-weight: bold; text-shadow: 0 2px 4px #000; }
.mfx { position: absolute; pointer-events: none; font-size: 26px; }
.m-rise { animation: mrise 5s linear infinite; opacity: 0; }
@keyframes mrise { 10% { opacity: .9; } 100% { transform: translateY(-60vh); opacity: 0; } }
.m-twinkle { animation: twinkle 1.6s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .2; transform: scale(.6); } }
.m-sway { animation: sway 3s ease-in-out infinite; }
@keyframes sway { 50% { transform: translateX(14px); } }
.m-drip { animation: drip 1.4s infinite; }
.m-rainbow { left: 5%; right: 5%; top: 30%; height: 70%; border-radius: 50% 50% 0 0; animation: pop .8s;
  background: radial-gradient(ellipse at 50% 100%, transparent 52%, #8e6be8 52% 57%, #5d8de8 57% 62%, #3fbf7f 62% 67%, #ffd54f 67% 72%, #f2a33a 72% 77%, #e8443a 77% 82%, transparent 82%); }
.food-panel button.poster { width: 96px; height: 96px; font-size: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.food-panel button.poster span { font-size: 11px; line-height: 1.1; padding: 0 4px; }
.food-panel button.poster.video { width: 112px; height: 112px; position: relative; }
.food-panel button.poster.video i { font-style: normal; font-size: 10px; opacity: .7; }
.food-panel button.poster.seen::after { content: '✅'; position: absolute; top: -6px; right: -6px; font-size: 22px; }

/* Lernvideos und Fragen danach */
.movie[data-kind="learn"] .screen-frame { aspect-ratio: 16 / 10; }
@media (max-aspect-ratio: 4/5) { .movie[data-kind="learn"] .screen-frame { aspect-ratio: auto; height: 100%; } }
.learn-video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.quiz { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.5%; padding: 3%; color: #fff; text-align: center; overflow: auto; }
.quiz-n { font-size: clamp(13px, 2.4vw, 18px); opacity: .75; }
.quiz-q { font-size: clamp(18px, 4vw, 32px); font-weight: bold; max-width: 900px; }
.quiz-a { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5%; width: 100%; max-width: 900px; }
.quiz-a.two { grid-template-columns: repeat(2, 1fr); max-width: 600px; }
.quiz-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 22px; background: #fff; color: #3a2d5c; box-shadow: 0 6px 0 rgba(0,0,0,.3); transition: transform .2s, opacity .3s; }
.quiz-btn .e { font-size: clamp(36px, 9vw, 72px); line-height: 1; }
.quiz-btn .t { font-size: clamp(13px, 2.6vw, 20px); font-weight: bold; line-height: 1.15; }
.quiz-btn.dim { opacity: .45; }
.quiz-btn.right { background: #7ddc7a; opacity: 1; transform: scale(1.06); }
.quiz-btn.wrong { background: #ff8a80; animation: shake .4s; }
.quiz-say { position: absolute; right: 3%; top: 3%; width: 48px; height: 48px; border-radius: 50%; background: rgba(255,255,255,.2); font-size: 24px; padding: 0; }
.quiz-big { font-size: clamp(60px, 16vw, 130px); line-height: 1; animation: quizPop .6s; }
@keyframes quizPop { from { transform: scale(0); } }
.quiz-coins { font-size: clamp(18px, 4vw, 30px); font-weight: bold; color: #ffd54f; }

/* Spielsalon */
.arcade {
  position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 14px);
  background: radial-gradient(circle at 50% 20%, #5b3fb0, #1f1446 75%);
}
.arcade-hud { flex: 1; text-align: center; color: #ffd54f; font-size: clamp(20px, 5vw, 30px); font-weight: bold; margin-right: 52px; text-shadow: 0 0 12px rgba(255,213,79,.6); }
.arcade-area { position: relative; flex: 1; width: 100%; max-width: 720px; }
.arcade-area.menu { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-content: center; gap: 16px; }
.arcade-result { background: #fff; border-radius: 30px; padding: 22px; width: min(420px, 100%); text-align: center; animation: pop2 .5s; }
.arcade-result .t { font-size: 34px; font-weight: bold; color: #ff6b9d; }
.arcade-result .s { font-size: 18px; margin: 6px 0; }
.arcade-result .c { font-size: 30px; font-weight: bold; color: #e8a400; min-height: 1.3em; }
.arcade-result .big { margin-top: 10px; }
.grey-btn { background: #8e6be8 !important; box-shadow: 0 6px 0 #6a4fc0 !important; }
.machine { position: relative; width: min(42vw, 200px); padding: 14px 8px 12px; border-radius: 26px; background: linear-gradient(160deg, #2a1d5e, #120c2c); border: 3px solid #ffd54f;
  box-shadow: 0 8px 0 #8e6be8, 0 0 30px rgba(142,107,232,.6); display: flex; flex-direction: column; align-items: center; gap: 4px; color: #fff; }
.machine .i { font-size: min(16vw, 72px); line-height: 1.1; }
.machine .n { font-size: 19px; font-weight: bold; color: #ffd54f; }
.machine .r { font-size: 12px; opacity: .85; min-height: 1.2em; }
.machine .p { position: absolute; top: -10px; right: -8px; background: #ffd54f; color: #3a2d5c; border-radius: 14px; padding: 2px 8px; font-weight: bold; font-size: 14px; }
.machine:active { transform: translateY(5px); box-shadow: 0 3px 0 #8e6be8; }
.machine-box { width: min(460px, 100%); max-height: 100%; overflow-y: auto; background: #fff; border-radius: 28px; padding: 18px; text-align: center; display: flex; flex-direction: column; gap: 10px; animation: pop2 .4s; }
.machine-box .mt { font-size: 26px; font-weight: bold; color: #5b3fb0; }
.machine-box .mh { font-size: 15px; color: #555; }
.machine-box .poor { font-size: 15px; color: #c0392b; }
.insert { background: #ffd54f !important; color: #3a2d5c !important; box-shadow: 0 6px 0 #e0a800 !important; }
.insert:disabled { opacity: .5; }
.records { list-style: none; margin: 0; padding: 0; text-align: left; }
.records li { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; font-size: 17px; }
.records li:nth-child(odd) { background: #f4f0ff; }
.records li.me { font-weight: bold; color: #5b3fb0; }
.records li.new { background: #fff3b0; box-shadow: 0 0 0 3px #ffd54f; }
.records li.empty { color: #777; font-size: 15px; text-align: center; display: block; }
.records .rk { width: 32px; text-align: center; }
.records .rn { flex: 1; }
.records .rs { font-variant-numeric: tabular-nums; font-weight: bold; }
.arcade-area.playing { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 0; }
.play-top { width: 100%; display: flex; justify-content: space-between; color: #fff; font-size: 20px; font-weight: bold; padding: 0 6px; }
.play-top .ps { color: #ffd54f; }
.arc-screen { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; align-items: center; justify-content: center; }
.arc-screen canvas { border-radius: 10px; border: 4px solid #ffd54f; box-shadow: 0 0 24px rgba(255,213,79,.4); touch-action: none; }
.pad { display: flex; gap: 10px; justify-content: center; padding-bottom: 2px; }
.pad .pk { width: 64px; height: 64px; border-radius: 50%; font-size: 28px; padding: 0; background: rgba(255,255,255,.92); box-shadow: 0 5px 0 rgba(0,0,0,.35); touch-action: none; user-select: none; -webkit-user-select: none; }
.pad .pk.on { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0,0,0,.35); background: #ffd54f; }
.pad.cross { display: grid; grid-template-columns: repeat(3, 64px); grid-template-rows: repeat(2, 56px); gap: 4px 8px; }
.pad.cross .k-up { grid-column: 2; grid-row: 1; }
.pad.cross .k-left { grid-column: 1; grid-row: 2; }
.pad.cross .k-down { grid-column: 2; grid-row: 2; }
.pad.cross .k-right { grid-column: 3; grid-row: 2; }
.over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(10,6,30,.82); border-radius: 10px; color: #fff; text-align: center; padding: 12px; }
.over .go { font-size: clamp(30px, 8vw, 48px); font-weight: 900; color: #ff5252; letter-spacing: 2px; text-shadow: 0 0 16px #ff5252; }
.over .gs { font-size: 26px; font-weight: bold; color: #ffd54f; }
.over .gq { font-size: 17px; }
.over .cd { font-size: 34px; font-weight: bold; min-height: 1.2em; }

/* Aufgaben-Tafel */
.quests { position: fixed; inset: 0; z-index: 25; display: flex; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 10px); background: rgba(40,25,60,.55); }
.quest-board {
  position: relative; width: min(560px, 100%); max-height: 100%; overflow-y: auto; padding: 18px 16px 20px;
  background: linear-gradient(#fff8e1, #fbe9c4); border: 10px solid #a0673a; border-radius: 24px; box-shadow: 0 14px 40px rgba(0,0,0,.35);
}
.quest-board #quest-close { position: absolute; right: 10px; top: 10px; }
.quest-board h2 { margin: 4px 0 10px; font-size: 22px; color: #7a4a20; }
.quest { width: 100%; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 18px; padding: 10px; margin-bottom: 8px; box-shadow: 0 3px 0 rgba(0,0,0,.08); text-align: left; }
.quest .qi { font-size: 34px; }
.quest .qt { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 16px; }
.quest .bar { height: 10px; background: #f0e6d0; border-radius: 6px; overflow: hidden; }
.quest .bar i { display: block; height: 100%; background: #3fbf7f; border-radius: 6px; }
.quest .qc { font-size: 18px; font-weight: bold; min-width: 40px; text-align: center; }
.quest.done { background: #e5f4e4; }
.quest-bonus { text-align: center; font-weight: bold; padding: 8px; border-radius: 14px; background: rgba(255,213,79,.35); margin: 4px 0 14px; }
.quest-bonus.done { background: #ffd54f; animation: coinPulse .8s 3; }
.riddle-q { font-size: 20px; font-weight: bold; text-align: center; margin-bottom: 10px; }
.riddle-a { display: flex; justify-content: center; gap: 12px; }
.riddle-a button { width: 84px; height: 84px; border-radius: 22px; background: #fff; font-size: 48px; box-shadow: 0 5px 0 rgba(0,0,0,.12); }
.riddle-a button.right { background: #c9f2c7; box-shadow: 0 0 0 4px #3fbf7f; }
.riddle-a button.wrong { animation: shake .45s; background: #ffd9d9; }
.riddle-done { text-align: center; margin-top: 10px; font-size: 15px; color: #7a4a20; }
.movie[data-kind="boat"] { background: linear-gradient(#bfe8ff, #2b86c9); }
.movie[data-kind="boat"] .curtains { background: none; border-top: none; }
.movie[data-kind="boat"] .screen-frame { border-color: #8b5a2b; border-width: 10px; border-radius: 30px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.movie[data-kind="boat"] .movie-title { color: #fff; text-shadow: 0 2px 0 #2b86c9; }
.movie[data-kind="boat"] .movie-caption { text-shadow: 0 2px 6px #12456b; }
.who-pick { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: linear-gradient(160deg, #ffe3ef 0%, #e6ddff 50%, #c9ecff 100%); }
.who-pick h2 { margin: 0; font-size: clamp(28px, 7vw, 44px); color: #8e6be8; text-shadow: 0 3px 0 #fff; }
.who-row { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.who-row button { width: 140px; height: 160px; border-radius: 30px; background: #fff; box-shadow: 0 8px 0 #c9b8ff; font-size: 20px; font-weight: bold;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.who-row button span { font-size: 76px; line-height: 1; }
.who-row button:active { transform: translateY(5px); box-shadow: 0 3px 0 #c9b8ff; }
.dress-wrap { position: relative; }

/* Miteinander */
.player-menu {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 12px); z-index: 15;
  width: min(520px, calc(100vw - 24px)); background: #fff; border-radius: 26px; padding: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); animation: pop2 .3s;
}
.pm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pm-head canvas { width: 56px; height: 66px; }
.pm-name { flex: 1; font-size: 22px; font-weight: bold; }
.pm-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pm-actions button { height: 78px; border-radius: 18px; background: #f6f2ff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 12px; gap: 2px; }
.pm-actions button span { font-size: 32px; line-height: 1; }
.pm-actions button:active { background: #e4dbff; }
.invite-pop {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 70px); transform: translateX(-50%); z-index: 30;
  width: min(420px, calc(100vw - 24px)); background: #fff; border-radius: 26px; padding: 16px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.3); animation: pop2 .4s;
}
.inv-icon { font-size: 56px; }
.inv-text { font-size: 20px; font-weight: bold; margin: 6px 0 12px; }
.invite-pop .row { justify-content: center; }
.invite-pop .small { font-size: 20px; padding: 12px 22px; }
.tag-bar, .balloon-mode {
  position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 12px); z-index: 12;
  background: rgba(58,45,92,.9); color: #fff; font-weight: bold; font-size: 17px; padding: 10px 18px; border-radius: 22px; white-space: nowrap; pointer-events: none;
}
.tag-bar.it { background: #ffd54f; color: #3a2d5c; animation: coinPulse 1s infinite; }
.balloon-mode { top: auto; bottom: calc(env(safe-area-inset-bottom) + 100px); background: #4fc3c8; pointer-events: auto; }
.duel {
  position: fixed; inset: 0; z-index: 25; display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 14px);
  background: radial-gradient(circle at 50% 20%, #3f8fd8, #173a6b 75%);
}
.duel-players { display: flex; gap: 14px; }
.dp { background: rgba(255,255,255,.85); border-radius: 20px; padding: 6px 14px; text-align: center; border: 4px solid transparent; min-width: 120px; }
.dp.turn { border-color: #ffd54f; box-shadow: 0 0 20px rgba(255,213,79,.8); background: #fff; }
.dp .n { font-weight: bold; font-size: 15px; }
.dp .s { font-size: 16px; }
.duel-status { color: #fff; font-size: 22px; font-weight: bold; min-height: 1.3em; text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.duel-board.memory { display: grid; grid-template-columns: repeat(4, min(20vw, 104px)); gap: 10px; }
.dcard { aspect-ratio: 3 / 4; border-radius: 16px; font-size: min(10vw, 48px); background: linear-gradient(135deg, #ff6b9d, #8e6be8); color: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.dcard.up { background: #fff; }
.dcard:disabled:not(.up) { opacity: .85; }
.duel-board.connect4 { display: flex; gap: 6px; background: #2f6fd6; padding: 10px; border-radius: 20px; box-shadow: 0 8px 0 #1d4a99; }
.duel-board .col { display: flex; flex-direction: column; gap: 6px; background: none; padding: 0; border-radius: 12px; }
.duel-board .col:not(:disabled):active { background: rgba(255,255,255,.2); }
.duel-board .cell { width: min(10vw, 52px); height: min(10vw, 52px); border-radius: 50%; background: #173a6b; display: block; box-shadow: inset 0 3px 6px rgba(0,0,0,.4); }
.duel-board .cell.red { background: radial-gradient(circle at 35% 35%, #ff8a80, #e8443a); }
.duel-board .cell.yellow { background: radial-gradient(circle at 35% 35%, #fff59d, #ffc107); }
.duel-board .cell.drop { animation: dropIn .35s; }
@keyframes dropIn { from { transform: translateY(-200px); } }
.duel-result { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.tag-bar { top: calc(env(safe-area-inset-top) + 74px); white-space: normal; max-width: 92vw; text-align: center; font-size: 16px; }

/* VS-Bildschirm wie bei Pokémon */
.vs-screen { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; overflow: hidden; background: #fff; animation: vsFlash .35s steps(2) 2, vsOut .3s 1.9s forwards; }
.vs-side { position: absolute; top: 0; bottom: 0; width: 62%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.vs-side.a { left: 0; background: linear-gradient(135deg, #e8443a, #ff8a65); clip-path: polygon(0 0, 100% 0, 62% 100%, 0 100%); padding-right: 14%; animation: vsInL .45s .35s both cubic-bezier(.2,1.4,.5,1); }
.vs-side.b { right: 0; background: linear-gradient(135deg, #2f6fd6, #4fc3f7); clip-path: polygon(38% 0, 100% 0, 100% 100%, 0 100%); padding-left: 14%; animation: vsInR .45s .35s both cubic-bezier(.2,1.4,.5,1); }
.vs-side canvas { width: 120px; height: 140px; filter: drop-shadow(0 6px 0 rgba(0,0,0,.25)); }
.vs-side .n { background: #fff; color: #3a2d5c; font-weight: bold; font-size: 20px; padding: 6px 16px; border-radius: 18px; }
.vs-mid { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; z-index: 1; }
.vs-text { font-size: 96px; font-weight: 900; color: #ffd54f; -webkit-text-stroke: 4px #3a2d5c; text-shadow: 0 8px 0 #3a2d5c; animation: vsPop .5s .75s both cubic-bezier(.2,1.8,.5,1); }
.vs-title { margin-top: 8px; background: #3a2d5c; color: #fff; font-weight: bold; font-size: 22px; padding: 8px 18px; border-radius: 20px; white-space: nowrap; animation: vsPop .4s 1s both; }
@keyframes vsFlash { 50% { background: #3a2d5c; } }
@keyframes vsInL { from { transform: translateX(-100%); } }
@keyframes vsInR { from { transform: translateX(100%); } }
@keyframes vsPop { from { transform: scale(0) rotate(-20deg); opacity: 0; } }
@keyframes vsOut { to { opacity: 0; transform: scale(1.15); } }
@media (orientation: portrait) {
  .vs-side { width: auto; left: 0; right: 0; height: 60%; }
  .vs-side.a { top: 0; bottom: auto; clip-path: polygon(0 0, 100% 0, 100% 66%, 0 100%); padding: 0 0 16%; }
  .vs-side.b { top: auto; bottom: 0; clip-path: polygon(0 34%, 100% 0, 100% 100%, 0 100%); padding: 16% 0 0; }
}

/* Spielauswahl im Spieler-Menü */
.pm-actions button i { font-style: normal; font-size: 13px; position: absolute; top: 4px; right: 6px; }
.pm-actions button { position: relative; }
.pm-actions.games button { height: 84px; }
.pm-actions button.back { background: #eee; }
.who-row button small { display: block; font-size: 13px; font-weight: normal; color: #8a7fa8; }

/* Neue Spiele zu zweit */
.duel-board.mini { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(560px, 100%); flex: 1; min-height: 0; }

/* Furz-Wettbewerb */
.fart-stage { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; min-height: 140px; }
.fart-cloud { font-size: 60px; line-height: 1.1; min-height: 1.1em; }
.fart-cloud.puff { animation: puff 1.4s ease-out; }
@keyframes puff { 0% { transform: scale(.2); opacity: 0; } 25% { transform: scale(1.2); opacity: 1; } 70% { transform: scale(1) translateY(-10px); } 100% { transform: scale(1.1) translateY(-30px); opacity: .5; } }
.fart-text { font-size: 22px; font-weight: bold; text-shadow: 0 2px 4px rgba(0,0,0,.4); text-align: center; }
.fart-left { font-size: 16px; opacity: .85; }
.fart-btn { width: min(52vw, 220px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffb3c9, #ff6b9d 60%, #d94677); color: #fff; font-size: 22px; font-weight: bold;
  box-shadow: 0 10px 0 #a8325a, 0 14px 30px rgba(0,0,0,.3); display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 16px; }
.fart-btn .b { font-size: 80px; line-height: 1; }
.fart-btn:not(:disabled) { animation: coinPulse 1.2s infinite; }
.fart-btn:disabled { filter: grayscale(.6); opacity: .7; }
.fart-btn.push { transform: translateY(6px) scale(.95); box-shadow: 0 4px 0 #a8325a; }

/* Leiterlispiel */
.lad-wrap { position: relative; width: min(100%, calc((100vh - 330px) * 600 / 560)); aspect-ratio: 600 / 560; }
.lad-cell { position: absolute; width: calc(100% / 6); height: calc(100% / 5.6); display: flex; align-items: flex-start; justify-content: flex-start; padding: 3px 6px; box-sizing: border-box;
  background: #fff8e1; border: 2px solid #f0d58a; font-weight: bold; color: #8a6d1f; font-size: 14px; }
.lad-cell.alt { background: #e3f2fd; border-color: #a9cdee; color: #3b6aa0; }
.lad-cell.goal { background: #ffd54f; font-size: 30px; align-items: center; justify-content: center; }
.lad-start { position: absolute; left: 0; bottom: 0; height: calc(100% * 60 / 560); display: flex; align-items: center; color: #fff; font-weight: bold; font-size: 15px; }
.lad-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.lad-token { position: absolute; width: 44px; height: 52px; transform: translate(-50%, -70%); transition: left .22s, top .22s; filter: drop-shadow(0 3px 2px rgba(0,0,0,.35)); z-index: 2; }
.lad-token canvas { width: 44px; height: 52px; }
.lad-token.slide { transition: left .75s ease-in-out, top .75s ease-in-out; }
.lad-ctrl { display: flex; align-items: center; gap: 16px; }
.lad-die { font-size: 64px; color: #fff; line-height: 1; width: 70px; text-align: center; }
.lad-die.rolling { animation: wobble .18s infinite; }
@keyframes wobble { 50% { transform: rotate(20deg) scale(1.1); } }
.lad-roll:disabled { opacity: .5; }

/* Suchen */
.find-q { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 26px; padding: 6px 22px; font-size: 24px; font-weight: bold; color: #3a2d5c; }
.find-t { font-size: 54px; line-height: 1.1; animation: vsPop .5s; }
.find-grid { display: grid; gap: 8px; width: 100%; flex: 1; min-height: 0; align-content: center; justify-items: center; }
.find-pic { width: 100%; aspect-ratio: 1; max-height: 22vh; border-radius: 18px; background: rgba(255,255,255,.92); padding: 0; box-shadow: 0 4px 0 rgba(0,0,0,.2); }
.find-grid[data-n="4"] .find-pic { font-size: min(22vw, 100px); }
.find-grid[data-n="9"] .find-pic { font-size: min(14vw, 64px); }
.find-grid[data-n="20"] .find-pic { font-size: min(9vw, 40px); max-height: 12vh; }
.find-pic.right { background: #b9f6ca; transform: scale(1.08); box-shadow: 0 0 0 5px #4caf50; }
.find-pic.wrong { animation: shake .4s; background: #ffcdd2; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.find-msg { color: #fff; font-size: 22px; font-weight: bold; min-height: 1.3em; text-shadow: 0 2px 4px rgba(0,0,0,.4); }

/* Tanz-Battle */
.dance-stage { display: flex; gap: 20px; justify-content: center; position: relative; }
.dancer { position: relative; text-align: center; }
.dancer canvas { width: 120px; height: 150px; }
.dancer .pts { background: #fff; border-radius: 14px; padding: 2px 10px; font-weight: bold; display: inline-block; }
.dancer.p0 .pts { color: #e8443a; } .dancer.p1 .pts { color: #2f6fd6; }
.dance-timer { width: 90%; height: 12px; background: rgba(255,255,255,.3); border-radius: 6px; overflow: hidden; }
.dance-timer i { display: block; height: 100%; width: 100%; background: #ffd54f; transition: width .1s linear; }
.dance-prompt { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 26px; padding: 6px 24px; font-size: 24px; font-weight: bold; color: #3a2d5c; }
.dance-prompt .e { font-size: 56px; }
.dance-prompt.new { animation: vsPop .25s; }
.dance-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.dance-btn { width: min(40vw, 130px); height: 110px; border-radius: 24px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 14px; font-weight: bold; box-shadow: 0 6px 0 #c9b8ff; }
.dance-btn span { font-size: 54px; line-height: 1.1; }
.dance-btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #c9b8ff; }
.dance-btn.wrong { animation: shake .4s; background: #ffcdd2; }
.dance-count { position: fixed; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0); font-size: 110px; font-weight: 900; color: #ffd54f; -webkit-text-stroke: 4px #3a2d5c; pointer-events: none; transition: transform .2s; white-space: nowrap; z-index: 2; }
.dance-count.show { transform: translate(-50%, -50%) scale(1); }

/* Zusammen malen */
.paint-theme { background: #fff; border-radius: 20px; padding: 6px 18px; font-size: 18px; color: #3a2d5c; }
.paint-canvas { width: min(100%, calc((100vh - 400px) * 4 / 3)); aspect-ratio: 4 / 3; background: #fff; border-radius: 16px; box-shadow: 0 6px 0 rgba(0,0,0,.2); touch-action: none; }
.paint-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.paint-tools button { width: 40px; height: 40px; border-radius: 50%; padding: 0; border: 3px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,.3); font-size: 18px; }
.paint-tools .swatch.on, .paint-tools .brush.on { transform: scale(1.2); border-color: #ffd54f; }
.paint-tools .brush { background: #fff; color: #3a2d5c; }
.paint-done.grey-btn { background: #ccc; }

/* Turm bauen */
.tower-top { display: flex; gap: 20px; font-size: 22px; font-weight: bold; color: #fff; text-shadow: 0 2px 4px rgba(0,0,0,.4); }
.tower-canvas { width: min(100%, calc((100vh - 330px) * 3 / 4)); aspect-ratio: 3 / 4; border-radius: 18px; box-shadow: 0 6px 0 rgba(0,0,0,.25); touch-action: none; }
.tower-drop:disabled { opacity: .5; }
.vid-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 90px; height: 90px; border-radius: 50%; font-size: 44px; padding: 0; background: rgba(255,255,255,.85); box-shadow: 0 6px 20px rgba(0,0,0,.4); transition: opacity .3s; }
.vid-play.hide { opacity: 0; pointer-events: none; }
.vid-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: rgba(255,255,255,.2); pointer-events: none; }
.vid-bar div { height: 100%; width: 0; background: #ffd54f; transition: width .3s linear; }

/* Karte */
.map-view { position: fixed; inset: 0; z-index: 26; display: flex; flex-direction: column; gap: 8px; padding: calc(env(safe-area-inset-top) + 10px) 10px calc(env(safe-area-inset-bottom) + 10px); background: #2b6f99; }
.map-top { display: flex; align-items: center; gap: 10px; }
.map-tabs { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.map-tab { flex: none; padding: 7px 12px; border-radius: 18px; background: rgba(255,255,255,.75); font-size: 15px; font-weight: bold; color: #3a2d5c; }
.map-tab.on { background: #ffd54f; box-shadow: 0 3px 0 #e0a800; }
.map-canvas { flex: 1; min-height: 0; width: 100%; touch-action: manipulation; }
.map-people { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.map-person { display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 16px; background: #fff; font-size: 15px; color: #3a2d5c; }
.map-person .dot { width: 14px; height: 14px; border-radius: 50%; }
.food-panel button.poster.locked { opacity: .6; }

/* Wilde Tiere: Begegnung und Tierbuch */
.wild-view { position: fixed; inset: 0; z-index: 27; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: calc(env(safe-area-inset-top) + 14px) 14px calc(env(safe-area-inset-bottom) + 14px); }
.wild-head { font-size: clamp(22px, 6vw, 34px); font-weight: bold; color: #fff; text-shadow: 0 2px 6px rgba(0,0,0,.4); text-align: center; }
.wild-new { margin-left: 8px; font-size: .55em; background: #ffd54f; color: #3a2d5c; padding: 2px 8px; border-radius: 10px; vertical-align: middle; text-shadow: none; }
.wild-stage { position: relative; width: min(72vmin, 380px); aspect-ratio: 1; }
.wild-target { position: absolute; inset: 0; border-radius: 50%; }
.wild-ring { position: absolute; left: 50%; top: 50%; width: 60%; height: 60%; border: 6px solid #fff; border-radius: 50%; box-shadow: 0 0 12px rgba(0,0,0,.25); }
.wild-ring.hit { border-color: #ffd54f; }
.wild-beast { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -55%); font-size: min(28vmin, 150px); line-height: 1; animation: beastBob 1.2s ease-in-out infinite; }
@keyframes beastBob { 50% { transform: translate(-50%, -62%); } }
.wild-beast.shake { animation: beastShake .4s; }
.wild-beast.happy { animation: beastJump .5s 3; }
@keyframes beastShake { 25% { transform: translate(-60%, -55%); } 75% { transform: translate(-40%, -55%); } }
@keyframes beastJump { 50% { transform: translate(-50%, -75%) scale(1.1); } }
.wild-beast.flee { transition: transform 1.2s, opacity 1.2s; transform: translate(200%, -55%); opacity: 0; animation: none; }
.wild-grass { position: absolute; left: 0; right: 0; bottom: 4%; text-align: center; font-size: min(10vmin, 52px); letter-spacing: -6px; pointer-events: none; }
.wild-apple { position: absolute; left: 50%; bottom: -10%; font-size: 40px; animation: appleFly .6s ease-out forwards; pointer-events: none; }
@keyframes appleFly { to { bottom: 50%; transform: scale(.6); } }
.wild-tries { font-size: 28px; }
.wild-feed { min-width: 240px; }
.wild-run { background: rgba(255,255,255,.7); border-radius: 18px; padding: 8px 16px; font-size: 16px; }
.wild-card { position: relative; background: #fff; border-radius: 28px; padding: 22px; width: min(440px, 100%); text-align: center; display: flex; flex-direction: column; gap: 10px; animation: pop2 .5s; }
.wc-e { font-size: 96px; line-height: 1; }
.wc-n { font-size: 28px; font-weight: bold; color: #3a2d5c; }
.wc-f { font-size: 19px; line-height: 1.35; color: #3a2d5c; }
.wc-new { font-size: 18px; font-weight: bold; color: #e0a800; }
.wild-say { position: absolute; right: 12px; top: 12px; width: 44px; height: 44px; border-radius: 50%; padding: 0; font-size: 22px; background: #f0e9ff; }
.album-view { position: fixed; inset: 0; z-index: 27; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 10px) 14px calc(env(safe-area-inset-bottom) + 20px); background: linear-gradient(#fff8e1, #fbe9c4); }
.album-top { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; }
.album-title { font-size: 24px; font-weight: bold; color: #7a4a20; }
.album-hab { margin: 16px 0 8px; font-size: 19px; font-weight: bold; color: #7a4a20; }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.album-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 18px; background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.album-card .e { font-size: 44px; line-height: 1.1; }
.album-card .n { font-size: 13px; font-weight: bold; color: #3a2d5c; }
.album-card .r { font-size: 10px; }
.album-card.unknown { background: #eee4cf; }
.album-card.unknown .e { filter: grayscale(1); opacity: .5; }
.album-info { position: sticky; bottom: 0; margin-top: 16px; padding: 12px; border-radius: 16px; background: #fff; font-size: 17px; color: #3a2d5c; box-shadow: 0 -4px 12px rgba(0,0,0,.08); }

/* Schule und Jobs */
.lesson-view { position: fixed; inset: 0; z-index: 26; display: flex; flex-direction: column; align-items: center; gap: 10px; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 10px) 14px calc(env(safe-area-inset-bottom) + 16px); background: linear-gradient(#fff8e1, #ffe7b3); }
.lesson-view[data-theme="restaurant"] { background: linear-gradient(#fff0e0, #ffd2a6); }
.lesson-view[data-theme="hair"] { background: linear-gradient(#ffeaf4, #ffc8e0); }
.lesson-top { width: 100%; display: flex; align-items: center; gap: 12px; }
.lesson-title { flex: 1; font-size: clamp(20px, 5vw, 28px); font-weight: bold; color: #7a4a20; margin-right: 52px; text-align: center; }
.lesson-body { flex: 1; width: 100%; max-width: 720px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.lq { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; animation: pop2 .35s; }
.lq-show { font-size: clamp(44px, 12vw, 84px); line-height: 1.15; word-break: break-word; }
.lq-text { font-size: clamp(22px, 5.5vw, 36px); font-weight: bold; color: #3a2d5c; }
.lq-sub { font-size: 18px; font-weight: bold; color: #7a4a20; margin-top: 4px; }
.lq-say { position: absolute; right: 0; top: 0; width: 48px; height: 48px; border-radius: 50%; padding: 0; font-size: 24px; background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.1); }
.lq-answers { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.lq-btn { min-width: 110px; min-height: 96px; padding: 10px 18px; border-radius: 24px; background: #fff; font-size: clamp(36px, 9vw, 60px); font-weight: bold; color: #3a2d5c; box-shadow: 0 6px 0 rgba(0,0,0,.15); }
.lq-btn.small { font-size: clamp(20px, 5vw, 28px); min-height: 70px; }
.lq-btn.right { background: #7ddc7a; transform: scale(1.06); }
.lq-btn.wrong { background: #ffb3ab; opacity: .6; animation: shake .4s; }
.lq-coins { font-size: 24px; font-weight: bold; color: #e0a800; }
.school-menu { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.school-card { width: 170px; height: 160px; border-radius: 28px; background: #fff; box-shadow: 0 7px 0 #e0a800; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.school-card .i { font-size: 64px; line-height: 1; }
.school-card .n { font-size: 18px; font-weight: bold; color: #3a2d5c; }
.paint-pick { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.paint-svg { width: min(78vw, 46vh, 420px); aspect-ratio: 1; background: #fff; border-radius: 22px; box-shadow: 0 6px 0 rgba(0,0,0,.12); touch-action: manipulation; }
.paint-svg > * { cursor: pointer; }
.paint-pal { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.paint-pal .swatch, .hair-opts .swatch { width: 46px; height: 46px; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.25); padding: 0; }
.paint-pal .swatch.on { border-color: #3a2d5c; transform: scale(1.15); }
.rest-table { display: flex; align-items: center; gap: 14px; background: #fff; border-radius: 26px; padding: 12px 22px; box-shadow: 0 6px 0 rgba(0,0,0,.1); }
.rest-guest { font-size: 72px; line-height: 1; }
.rest-bubble { font-size: 48px; background: #fff8e1; border-radius: 22px; padding: 6px 16px; border: 3px solid #f2a33a; }
.rest-menu { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(100%, 460px); }
.rest-dish { display: flex; flex-direction: column; align-items: center; padding: 8px; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.12); }
.rest-dish .e { font-size: 46px; line-height: 1.1; }
.rest-dish .p { font-size: 14px; font-weight: bold; color: #7a4a20; }
.rest-tray-row { display: flex; gap: 10px; align-items: center; }
.rest-tray { min-width: 200px; min-height: 56px; display: flex; align-items: center; justify-content: center; font-size: 36px; background: #d7d2c8; border-radius: 30px; padding: 4px 16px; color: #6b6355; }
.rest-clear { padding: 10px 14px; border-radius: 18px; background: #fff; font-size: 16px; }
.hair-row { position: relative; display: flex; align-items: flex-end; gap: 18px; }
.hair-chair { background: #fff; border-radius: 30px; padding: 6px; box-shadow: 0 6px 0 rgba(0,0,0,.12); }
.hair-big { width: 170px; height: 210px; display: block; }
.hair-wish { background: #fff; border-radius: 22px; padding: 6px 10px; text-align: center; border: 3px dashed #ff6b9d; }
.hw-t { font-size: 15px; font-weight: bold; color: #ff6b9d; }
.hair-small { width: 90px; height: 110px; display: block; }
.hair-opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hair-style { width: 64px; height: 72px; padding: 0; border-radius: 16px; background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.12); }
.hair-style canvas { width: 64px; height: 72px; display: block; }
.hair-verdict { position: absolute; left: 50%; top: -10px; font-size: 64px; transform: translateX(-50%); animation: pop2 .4s; }
.care-hint { background: #ffd54f; color: #3a2d5c; font-size: clamp(20px, 5vw, 28px); font-weight: bold; padding: 8px 20px; border-radius: 22px; box-shadow: 0 4px 0 #e0a800; animation: hintPulse 1.4s ease-in-out infinite; }
@keyframes hintPulse { 50% { transform: scale(1.05); } }
#care-tray button.hint { position: relative; }
#care-tray button.hint::after { content: '👇'; position: absolute; left: 50%; top: -38px; font-size: 30px; transform: translateX(-50%); animation: fingerBob .7s ease-in-out infinite; pointer-events: none; }
@keyframes fingerBob { 50% { top: -28px; } }
#care-tray button.off { filter: grayscale(1); opacity: .3; transform: scale(.85); box-shadow: none; }
#care-tray button:not(.off).hint { transform: scale(1.12); }
#care-tray button.nudge { animation: shake .5s; }
/* Ein einziges grosses Werkzeug für Kinder, die noch nicht lesen */
#care-tray.solo button { width: min(40vw, 22vh, 170px); height: min(40vw, 22vh, 170px); border-radius: 36px; }
#care-tray.solo button .ico { font-size: min(20vw, 11vh, 90px); line-height: 1.1; }
#care-tray.solo button .lbl { font-size: 20px; }
#care-tray.solo button.hint::after { top: -52px; font-size: 44px; }
/* Spielsalon für die Kleinen */
.machine.kids { background: linear-gradient(160deg, #4fc3c8, #2f6fd6); }
.machine.nudge { animation: shake .5s; }
.coin-drop { position: absolute; left: 50%; top: -40px; font-size: 44px; transform: translateX(-50%); animation: coinIn .45s ease-in forwards; pointer-events: none; }
@keyframes coinIn { to { top: 30%; opacity: 0; transform: translateX(-50%) scale(.5); } }
.arc-count { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: min(30vw, 160px); font-weight: 900; color: #fff; text-shadow: 0 6px 0 rgba(0,0,0,.3); pointer-events: none; }
.arc-finger { position: absolute; font-size: 54px; transform: translate(-20%, 10%); pointer-events: none; animation: fingerTap .8s ease-in-out infinite; }
@keyframes fingerTap { 50% { transform: translate(-20%, 30%) scale(.9); } }
.kid-result { font-size: clamp(60px, 18vw, 110px); font-weight: 900; color: #5b3fb0; line-height: 1.1; }
.inv-face { width: 90px; height: 110px; display: inline-block; vertical-align: middle; }
.hide-eyes { position: fixed; inset: 0; z-index: 24; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(30,20,60,.88); color: #fff; font-size: 34px; font-weight: bold; pointer-events: none; }
.hide-eyes div:first-child { font-size: 140px; animation: hideBob 1.2s ease-in-out infinite; }
@keyframes hideBob { 50% { transform: translateY(-12px); } }
/* Verstecken draussen */
.seek-bar { white-space: nowrap; position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 64px); transform: translateX(-50%); z-index: 23; background: rgba(58,45,92,.92); color: #fff; font-size: 22px; font-weight: bold; padding: 8px 20px; border-radius: 22px; pointer-events: none; }
.seek-compass { position: fixed; right: 16px; bottom: calc(env(safe-area-inset-bottom) + 120px); z-index: 23; width: 120px; height: 120px; border-radius: 50%; background: #fff; border: 6px solid #5d8de8; box-shadow: 0 6px 18px rgba(0,0,0,.3); pointer-events: none; transition: border-color .4s; }
.seek-compass[data-heat="warm"] { border-color: #f2a33a; }
.seek-compass[data-heat="hot"] { border-color: #e8443a; animation: hintPulse .6s infinite; }
.seek-compass .dial { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 34px; opacity: .25; }
.seek-compass .needle { position: absolute; left: 50%; top: 50%; width: 14px; height: 92px; margin: -46px 0 0 -7px; background: linear-gradient(#e8443a 0 50%, #3a2d5c 50%); clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%); transition: transform .15s linear; }
/* Läden: grau = zu teuer, gross = ausgewählt (zweiter Tipp kauft) */
.emoji-panel button.poor { filter: grayscale(1); opacity: .4; }
.emoji-panel button.chosen { transform: scale(1.25); box-shadow: 0 0 0 4px #ffd54f, 0 6px 14px rgba(0,0,0,.25); z-index: 1; animation: chosenPulse 1s infinite; }
@keyframes chosenPulse { 50% { transform: scale(1.33); } }
.emoji-panel button.nudge { animation: shake .5s; }
#create-go.pulse { animation: hintPulse 1.4s infinite; }
.lesson-view[data-theme="zoo"] { background: linear-gradient(#e8f5d0, #b9e08a); }
.zoo-fact { font-size: clamp(18px, 4.6vw, 24px); color: #3a2d5c; max-width: 560px; line-height: 1.35; }
/* Kilbi */
.kilbi-view { position: fixed; inset: 0; z-index: 26; display: flex; flex-direction: column; gap: 8px; padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 12px); background: linear-gradient(#3a1d5c, #7a2d6b); }
.kilbi-top { display: flex; align-items: center; gap: 12px; }
.kilbi-title { flex: 1; text-align: center; margin-right: 52px; color: #ffd54f; font-size: clamp(22px, 5vw, 30px); font-weight: bold; }
.kilbi-body { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.kilbi-menu { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.kilbi-card { width: min(42vw, 190px); padding: 16px 8px; border-radius: 28px; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 7px 0 #e0a800; }
.kilbi-card .i { font-size: min(18vw, 80px); line-height: 1.1; }
.kilbi-card .n { font-size: 19px; font-weight: bold; color: #3a2d5c; }
.kilbi-card .p { font-size: 20px; }
.kilbi-card.poor { filter: grayscale(1); opacity: .5; }
.kilbi-canvas { flex: 1; min-height: 0; width: 100%; border-radius: 18px; touch-action: none; }
.kilbi-cap { color: #fff; font-size: clamp(18px, 4.5vw, 24px); font-weight: bold; min-height: 1.4em; text-align: center; }
/* Adventskalender */
.advent-btn { width: 100%; margin: 4px 0 12px; padding: 14px; border-radius: 20px; font-size: 22px; font-weight: bold; color: #fff; background: linear-gradient(135deg, #c62828, #2e7d32); box-shadow: 0 5px 0 #7a1d1d; animation: hintPulse 1.6s infinite; }
.advent-view { position: fixed; inset: 0; z-index: 27; overflow-y: auto; padding: calc(env(safe-area-inset-top) + 10px) 14px calc(env(safe-area-inset-bottom) + 16px); background: radial-gradient(circle at 50% 0, #2e5c8a, #0d1b35 80%); }
.advent-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.advent-title { flex: 1; text-align: center; margin-right: 52px; color: #fff; font-size: clamp(22px, 5vw, 30px); font-weight: bold; }
.advent-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 520px; margin: 0 auto; }
@media (min-aspect-ratio: 1/1) { .advent-grid { grid-template-columns: repeat(6, 1fr); max-width: 760px; } }
.advent-door { aspect-ratio: 1; border-radius: 16px; font-size: clamp(26px, 7vw, 40px); font-weight: 900; color: #fff; background: linear-gradient(135deg, #c62828, #8e1c1c); border: 3px dashed #ffd54f; }
.advent-door:nth-child(3n) { background: linear-gradient(135deg, #2e7d32, #1b5e20); }
.advent-door:nth-child(4n) { background: linear-gradient(135deg, #5b3fb0, #3a2d5c); }
.advent-door.later { opacity: .55; }
.advent-door.open { background: #fff8e1; color: #e0a800; border-style: solid; }
.advent-door.today { box-shadow: 0 0 0 4px #ffd54f, 0 0 24px #ffd54f; }
.advent-door.hint { animation: hintHop 1s infinite; }
.advent-door.opening { transform: rotateY(80deg); transition: transform .4s; }
.advent-surprise { position: fixed; inset: 0; z-index: 28; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; text-align: center; background: rgba(13,27,53,.92); color: #fff; animation: pop2 .4s; }
.advent-surprise .gift-e { font-size: 110px; line-height: 1; }
.advent-surprise .t { font-size: 26px; font-weight: bold; color: #ffd54f; }
.advent-surprise .f { font-size: 20px; max-width: 520px; line-height: 1.35; }
/* Neue Spiele zu zweit */
.race-canvas { aspect-ratio: 16 / 10; }
.golf-canvas, .soccer-canvas { aspect-ratio: 10 / 16; }
.band-canvas { aspect-ratio: 10 / 13; }
.space2-canvas { aspect-ratio: 24 / 32; }
.race-canvas, .golf-canvas, .soccer-canvas, .band-canvas, .space2-canvas { border-radius: 16px; box-shadow: 0 6px 0 rgba(0,0,0,.25); touch-action: none; }
.race-gas { min-width: 220px; font-size: 28px; touch-action: none; }
.race-gas.vroom { transform: scale(.94); }
.uno-foe, .uno-hand { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 100%; }
.uno-mid { display: flex; gap: 22px; align-items: center; justify-content: center; margin: 8px 0; }
.uno-card { width: min(14vw, 64px); aspect-ratio: 2 / 3; border-radius: 10px; border: 3px solid #fff; display: flex; align-items: center; justify-content: center; font-size: min(7vw, 30px); font-weight: 900; color: #fff; text-shadow: 0 2px 2px rgba(0,0,0,.4); box-shadow: 0 4px 0 rgba(0,0,0,.25); }
.uno-card.back { background: linear-gradient(135deg, #3a2d5c, #8e6be8); font-size: min(5vw, 22px); width: min(9vw, 40px); }
.uno-card.top { width: min(22vw, 96px); font-size: min(10vw, 44px); }
.uno-card.play { cursor: pointer; transform: translateY(-8px); box-shadow: 0 0 0 4px #ffd54f, 0 8px 0 rgba(0,0,0,.25); animation: chosenPulse 1.4s infinite; }
.uno-card.dim { opacity: .4; filter: saturate(.5); }
.uno-deck { width: min(22vw, 96px); aspect-ratio: 2 / 3; border-radius: 12px; background: #fff; font-size: min(10vw, 44px); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 5px 0 rgba(0,0,0,.25); }
.uno-deck span { font-size: 13px; font-weight: bold; color: #3a2d5c; }
.uno-deck.hint { animation: hintHop 1s infinite; box-shadow: 0 0 0 4px #ffd54f; }
.bg-board { display: grid; grid-template-columns: repeat(8, 1fr); width: min(94vw, 58vh, 520px); aspect-ratio: 1; border: 6px solid #8b5a2b; border-radius: 10px; overflow: hidden; }
.bg-board .sq { position: relative; border-radius: 0; padding: 0; display: flex; align-items: center; justify-content: center; font-size: min(8.5vw, 5.4vh, 46px); line-height: 1; }
.bg-board .sq.light { background: #f3e2c0; }
.bg-board .sq.dark { background: #b07d4f; }
.bg-board .sq.lastmove { box-shadow: inset 0 0 0 100px rgba(255,213,79,.35); }
.bg-board .sq.sel { box-shadow: inset 0 0 0 4px #ffd54f, inset 0 0 0 100px rgba(255,213,79,.4); }
.bg-board .sq.target::after { content: ''; position: absolute; width: 34%; height: 34%; border-radius: 50%; background: rgba(63,191,127,.75); box-shadow: 0 0 10px #3fbf7f; }
.bg-board .pc.white { color: #fff; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 2px 3px rgba(0,0,0,.6); }
.bg-board .pc.black { color: #1d1d1d; text-shadow: 0 0 2px #fff; }
.bg-board.checkers .pc { width: 78%; height: 78%; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .6em; box-shadow: 0 3px 0 rgba(0,0,0,.35); }
.bg-board.checkers .pc.white { background: radial-gradient(circle at 35% 35%, #fff, #ddd); }
.bg-board.checkers .pc.black { background: radial-gradient(circle at 35% 35%, #555, #111); }
/* Eltern-Überblick */
.pstats { flex-basis: 100%; margin-top: 8px; padding: 10px; border-radius: 14px; background: #f6f2ff; font-size: 14px; color: #3a2d5c; }
.pst-today { font-weight: bold; line-height: 1.5; }
.pst-week { display: flex; gap: 8px; align-items: flex-end; height: 90px; margin: 10px 0 6px; }
.pst-day { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; }
.pst-day i { display: block; width: 70%; min-height: 2px; border-radius: 6px 6px 0 0; background: #8e6be8; }
.pst-day span { font-size: 11px; }
.pst-day b { font-size: 11px; }
.pst-total { font-size: 13px; line-height: 1.5; }

/* Kontostand: immer oben rechts sichtbar, auch über Läden und Spielen */
.wallet { position: fixed; top: calc(env(safe-area-inset-top) + 10px); right: 12px; z-index: 60; pointer-events: none; display: flex; align-items: center; gap: 6px; background: #fff; border: 3px solid #ffd54f; border-radius: 26px; padding: 5px 14px 5px 10px; font-size: 24px; color: #b07800; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.wallet[hidden] { display: none; }
.wallet b { font-weight: 900; min-width: 1.2em; text-align: center; }
.wallet.up { animation: walletUp .6s; }
.wallet.down { animation: walletDown .6s; }
@keyframes walletUp { 30% { transform: scale(1.3); background: #fff6c2; } }
@keyframes walletDown { 20% { transform: translateX(-6px) scale(1.15); background: #ffe0dc; } 40% { transform: translateX(6px) scale(1.15); } 60% { transform: translateX(-3px); } }
.wallet-delta { position: fixed; z-index: 61; pointer-events: none; font-size: 26px; font-weight: 900; animation: walletDelta 1.4s forwards; -webkit-text-stroke: 1px #fff; }
.wallet-delta.minus { color: #e8443a; }
.wallet-delta.plus { color: #2e9e5b; }
@keyframes walletDelta { 0% { opacity: 0; transform: translateY(-14px); } 15% { opacity: 1; transform: translateY(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(26px); } }
.care-coins { visibility: hidden; } /* der Kontostand oben rechts ersetzt die eigene Anzeige */

/* Spielsalon: «Level 3», «⭐ Doppel-Laser!» */
.arc-banner { position: absolute; left: 50%; top: 30%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; white-space: nowrap; font-size: 30px; font-weight: 900; color: #ffd54f; -webkit-text-stroke: 1.5px #3a2d5c; text-shadow: 0 3px 0 rgba(0,0,0,.35); }
.arc-banner.show { animation: arcBanner 1.8s forwards; }
@keyframes arcBanner { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 25% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -80%); } }

/* Schlafen/Ausruhen: Energie-Batterie füllt sich */
.rest-meter { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 74px); transform: translateX(-50%); z-index: 22; pointer-events: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; width: min(340px, 80vw); background: rgba(255,255,255,.95); border-radius: 22px; padding: 10px 14px; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.rest-meter .ri { font-size: 34px; animation: restBob 2s ease-in-out infinite; }
.rest-meter .rbar { height: 26px; border-radius: 13px; background: #e6e1f2; border: 3px solid #3a2d5c; overflow: hidden; }
.rest-meter .rbar i { display: block; height: 100%; width: 0; transition: width 1s, background .5s; background-image: linear-gradient(90deg, rgba(255,255,255,.35) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.35) 50%, rgba(255,255,255,.35) 75%, transparent 75%); background-size: 24px 24px; animation: restStripes 1s linear infinite; }
.rest-meter .rbolt { font-size: 26px; }
.rest-meter .rt { grid-column: 1 / -1; text-align: center; font-size: 17px; font-weight: bold; color: #3a2d5c; }
@keyframes restBob { 50% { transform: translateY(-4px) rotate(-6deg); } }
@keyframes restStripes { to { background-position: 24px 0; } }
.food-panel .piano-key { width: 46px; height: 110px; border-radius: 10px; border: 3px solid rgba(0,0,0,.2); }
.food-panel .piano-key:active { transform: translateY(4px); filter: brightness(1.2); }

/* Wohnblock: Klingelbrett */
.food-panel button.flat { width: 96px; height: 116px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 14px; font-weight: bold; color: #3a2d5c; }
.food-panel button.flat canvas { width: 64px; height: 76px; }
.food-panel button.flat.mine { background: #fff3b8; border: 3px solid #ffd54f; }
.food-panel .flat-empty { padding: 16px; font-size: 18px; font-weight: bold; color: #3a2d5c; }

/* 🎤 Quatsch-Funk: rechts unten, gedrückt halten zum Sprechen */
.funk { position: fixed; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 100px); width: 84px; height: 84px; }
.funk-talk { width: 84px; height: 84px; border-radius: 50%; font-size: 40px; background: #fff; border: 4px solid #8e6be8; box-shadow: 0 4px 0 rgba(0,0,0,.15); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.funk-talk.rec { background: #ff5252; border-color: #c62828; transform: scale(1.12); box-shadow: 0 0 0 calc(var(--lvl, 0) * 28px + 6px) rgba(255,82,82,.35); }
.funk-voice { position: absolute; left: -14px; top: -14px; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; background: #fff3b8; border: 3px solid #ffd54f; box-shadow: 0 2px 0 rgba(0,0,0,.15); padding: 0; }
#food-panel:not([hidden]) ~ #funk { display: none; }
.pfunk { margin-top: 14px; padding: 10px 12px; border-radius: 16px; background: #f6f2ff; font-size: 14px; }
.pfunk h3 { margin: 0 0 6px; font-size: 16px; }
.pfunk div { margin: 4px 0; }

/* 🗺️ Schatzsuche zu zweit */
.treasure { position: fixed; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 70px); z-index: 21; width: min(94vw, 560px); background: #fff8e1; border: 4px solid #a0673a; border-radius: 22px; box-shadow: 0 6px 18px rgba(0,0,0,.3); padding: 8px; }
.treasure.digger { background: rgba(255,248,225,.95); }
.tr-top { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: bold; color: #5a3a24; }
.tr-top span { flex: 1; }
.tr-top b { font-size: 15px; color: #a0673a; }
.tr-stop { width: 34px; height: 34px; border-radius: 50%; background: #fff; font-size: 16px; padding: 0; }
.tr-map { display: block; width: 100%; height: 38vh; margin-top: 6px; border-radius: 14px; touch-action: none; }
.treasure.digger .tr-map { display: none; }
.tr-dig { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 18px); z-index: 21; font-size: 30px; padding: 16px 34px; background: #ffb74d; box-shadow: 0 6px 0 #e08e1b; }
.tr-dig:active { transform: translate(-50%, 4px); }
body.treasure-on #emote-bar { display: none; }
.toast { z-index: 30; }
body.treasure-on .toast { top: calc(env(safe-area-inset-top) + 150px); }

/* 🍿 Kinoabend: Reaktionen */
.react-bar { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.react-bar button { width: 46px; height: 46px; border-radius: 50%; font-size: 24px; background: rgba(255,255,255,.85); padding: 0; }
.react-float { position: absolute; bottom: 90px; font-size: 44px; z-index: 4; pointer-events: none; animation: reactUp 2.5s ease-out forwards; }
@keyframes reactUp { from { transform: translateY(0) scale(.6); opacity: 1; } to { transform: translateY(-260px) scale(1.4); opacity: 0; } }

/* 🛠️ Einrichten: Möbel-Laden unten (Reiter + grosse Kacheln) */
.edit-bar { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 8px; border-radius: 22px 22px 0 0; }
.edit-head { display: flex; align-items: center; gap: 8px; }
.edit-head .round { width: 48px; height: 48px; font-size: 24px; flex: none; }
.edit-head .room-count { margin-right: auto; }
.edit-done { flex: none; height: 48px; padding: 0 16px; border-radius: 24px; font-size: 18px; font-weight: bold; background: #3fbf7f; color: #fff; box-shadow: 0 4px 0 #2e8f5e; }
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cat-tab { flex: 1 0 auto; min-width: 64px; display: flex; flex-direction: column; align-items: center; padding: 4px 8px; border-radius: 14px; background: #f6f2ff; border: 3px solid transparent; }
.cat-tab span { font-size: 26px; line-height: 1.1; }
.cat-tab i { font-style: normal; font-size: 11px; font-weight: bold; color: #3a2d5c; white-space: nowrap; }
.cat-tab.on { border-color: #8e6be8; background: #e4dbff; }
.edit-bar .catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; overflow-x: hidden; overflow-y: auto; max-height: 30vh; padding: 2px; }
.edit-bar .catalog button { width: auto; height: 112px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 2px 2px 4px; }
.edit-bar .catalog canvas { width: 72px; height: 72px; }
.edit-bar .catalog button i { font-style: normal; font-size: 12px; font-weight: bold; color: #3a2d5c; line-height: 1.1; text-align: center; }
.edit-bar .catalog button .price { position: static; transform: none; font-size: 13px; margin-top: 1px; }
.item-menu { z-index: 25; }

/* Einrichten: eine Reihe zum Wischen statt Raster; Drehen/Farbe/Weg in der Kopfzeile */
.edit-bar .catalog { display: flex; max-height: none; overflow-x: auto; overflow-y: hidden; }
.edit-bar .catalog button { flex: none; width: 92px; }
.edit-head .item-menu { position: static; transform: none; background: #fff3b8; padding: 4px; gap: 6px; border-radius: 28px; box-shadow: none; display: flex; }
.edit-head .item-menu[hidden] { display: none; }
.edit-head .item-menu .round { width: 44px; height: 44px; font-size: 22px; }
.edit-head.picked #btn-wall, .edit-head.picked #btn-floor, .edit-head.picked #btn-upgrade { display: none; }
.cat-tab { flex: 1 1 0; min-width: 0; padding: 4px 2px; }
.cat-tab i { font-size: 10px; }
.edit-head.picked .room-count { display: none; }
.edit-head.picked .item-menu { margin-right: auto; }

/* 📸 Foto-Automat */
.photo-view { position: fixed; inset: 0; z-index: 28; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 14px); background: linear-gradient(#3a1d5c, #7a2d6b); overflow-y: auto; }
.photo-top { width: 100%; display: flex; align-items: center; gap: 12px; color: #ffd54f; font-size: 24px; }
.photo-frame { position: relative; width: min(100%, 520px); padding: 10px 10px 30px; background: #fff; border-radius: 6px; box-shadow: 0 8px 20px rgba(0,0,0,.4); transform: rotate(-1.5deg); }
.photo-stage { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 3px; }
.photo-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 110px; font-weight: 900; color: #fff; -webkit-text-stroke: 4px #3a2d5c; pointer-events: none; }
.photo-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 540px; }
.photo-row button { width: 52px; height: 52px; border-radius: 16px; font-size: 28px; background: rgba(255,255,255,.9); padding: 0; border: 3px solid transparent; }
.photo-row.bgs button { border-radius: 50%; }
.photo-row button.on { border-color: #ffd54f; transform: scale(1.12); background: #fff8c4; }
.photo-shoot { font-size: 28px; padding: 14px 36px; background: #ff6b9d; box-shadow: 0 6px 0 #c94a77; }
.photo-view.flash::after { content: ''; position: fixed; inset: 0; background: #fff; animation: photoFlash .5s forwards; pointer-events: none; }
@keyframes photoFlash { from { opacity: 1; } to { opacity: 0; } }
.album-tabs { display: flex; gap: 8px; margin: 6px 0 10px; }
.album-tabs button { flex: 1; height: 48px; border-radius: 16px; font-size: 18px; font-weight: bold; background: rgba(255,255,255,.7); border: 3px solid transparent; }
.album-tabs button.on { border-color: #ffb74d; background: #fff; }
.album-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.album-photo { width: 100%; aspect-ratio: 4 / 3; border: 6px solid #fff; border-bottom-width: 16px; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,.25); }
.band-btn { min-width: 220px; font-size: 30px; touch-action: none; background: #8bc34a; box-shadow: 0 6px 0 #5d8f2a; }
.band-btn.vroom { transform: scale(.92); }

/* 🎤 Mikrofon erlauben */
.funk-ask { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(30,20,60,.6); }
.fa-box { width: min(420px, 100%); background: #fff; border-radius: 26px; padding: 22px 20px; text-align: center; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.fa-icon { font-size: 64px; line-height: 1; }
.fa-title { font-size: 22px; font-weight: 900; color: #3a2d5c; }
.fa-text { font-size: 16px; color: #3a2d5c; line-height: 1.4; text-align: left; white-space: pre-line; }
.fa-yes { background: #3fbf7f; box-shadow: 0 5px 0 #2e8f5e; font-size: 22px; }

/* 🐾 Haustier-Karte und Entwicklung */
.food-panel .pet-card { flex: 1 0 100%; display: flex; align-items: center; gap: 10px; background: #f6f2ff; border-radius: 18px; padding: 8px 12px; text-align: left; }
.pet-card .pc-e { min-width: 70px; text-align: center; line-height: 1; }
.pet-card .pc-mid { flex: 1; display: flex; flex-direction: column; gap: 3px; color: #3a2d5c; }
.pet-card b { font-size: 20px; }
.pet-card span { font-size: 13px; }
.pet-card small { font-size: 12px; color: #6a5a8c; }
.pet-card .pc-bar { height: 14px; border-radius: 7px; background: #e0d8f0; overflow: hidden; }
.pet-card .pc-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd54f, #ff9800); border-radius: 7px; }
.pet-card .pc-next { font-size: 34px; filter: grayscale(1); opacity: .5; }
.evolve-view { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; background: radial-gradient(circle, #5b3d9e, #1d1240 70%); color: #fff; text-align: center; padding: 20px; }
.ev-pic { line-height: 1.1; transition: transform .1s; }
.ev-pic.glow { filter: brightness(0) invert(1) drop-shadow(0 0 20px #fff); }
.evolve-view.done .ev-pic { animation: evPop .6s; }
.ev-text { font-size: 24px; font-weight: 900; max-width: 520px; }
.ev-ok { display: none; background: #ffd54f; color: #3a2d5c; box-shadow: 0 6px 0 #c9a227; }
.evolve-view.done .ev-ok { display: inline-block; }
@keyframes evPop { 0% { transform: scale(.5); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* Eltern: Münzen schummeln */
.pcoins { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; padding: 8px 10px; border-radius: 14px; background: #fff8e1; font-size: 14px; }
.pcoins b { margin-right: 6px; }
.pcoins .pc-input { width: 90px; padding: 6px 8px; border-radius: 10px; border: 2px solid #e6d9a8; font-size: 15px; }
.pcoins .pc-inf { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* 🎡 Glücksrad */
.spin-btn { animation: spinPulse 1.4s ease-in-out infinite; background: #fff3b8; }
@keyframes spinPulse { 50% { transform: scale(1.12) rotate(-8deg); box-shadow: 0 0 0 8px rgba(255,213,79,.5); } }
.spin-view { position: fixed; inset: 0; z-index: 42; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 20px; background: radial-gradient(circle, #ff9a62, #7a2d6b 75%); }
.spin-close { position: absolute; left: 14px; top: calc(env(safe-area-inset-top) + 12px); }
.spin-title { font-size: 34px; font-weight: 900; color: #fff; text-shadow: 0 3px 0 rgba(0,0,0,.25); }
.spin-wrap { position: relative; width: min(82vw, 380px); aspect-ratio: 1; }
.spin-wheel { width: 100%; height: 100%; border-radius: 50%; box-shadow: 0 10px 30px rgba(0,0,0,.4), 0 0 0 10px #fff; }
.spin-pointer { position: absolute; left: 50%; top: -30px; transform: translateX(-50%); font-size: 46px; color: #e8443a; z-index: 2; text-shadow: 0 3px 0 #fff; }
.spin-text { min-height: 2.4em; font-size: 24px; font-weight: 900; color: #fff; text-align: center; max-width: 420px; text-shadow: 0 2px 0 rgba(0,0,0,.25); }
.spin-go { font-size: 30px; padding: 16px 40px; background: #ffd54f; color: #3a2d5c; box-shadow: 0 6px 0 #c9a227; }
.spin-go:disabled { opacity: .5; }
.wallet-boost { font-style: normal; font-size: 13px; font-weight: 900; background: #8e6be8; color: #fff; border-radius: 10px; padding: 2px 6px; margin-left: 2px; }

/* 💎 Luxus-Laden und 🏦 Bank */
.food-panel .lux-head { flex: 1 0 100%; font-size: 15px; font-weight: 900; color: #8a6d12; margin-top: 4px; }
.food-panel button.on { border: 3px solid #ffd54f; background: #fff8c4; }
.food-panel .bank-info { flex: 1 0 100%; display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #e9f9ef; border-radius: 18px; color: #2e6b47; }
.bank-info .pig { font-size: 54px; animation: restBob 2s ease-in-out infinite; }
.bank-info b { display: block; font-size: 22px; }
.bank-info span { font-size: 14px; }

/* 🤿 Tauchen */
.dive-view { position: fixed; inset: 0; z-index: 41; display: flex; flex-direction: column; background: #0b3a66; padding: calc(env(safe-area-inset-top) + 8px) 8px calc(env(safe-area-inset-bottom) + 8px); gap: 6px; }
.dive-top { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 20px; }
.dive-air { display: flex; align-items: center; gap: 6px; flex: 1; }
.dive-air .bar { flex: 1; height: 16px; border-radius: 8px; background: rgba(255,255,255,.25); overflow: hidden; }
.dive-air .bar i { display: block; height: 100%; width: 100%; border-radius: 8px; transition: width .2s; }
.dive-up { background: #ffd54f; color: #3a2d5c; }
.dive-canvas { flex: 1; width: 100%; min-height: 0; border-radius: 18px; touch-action: none; }
.dive-result { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(11,58,102,.75); }
.dr-box { background: #fff; border-radius: 24px; padding: 22px; text-align: center; display: flex; flex-direction: column; gap: 10px; font-size: 22px; color: #3a2d5c; max-width: 90vw; }
.dr-t { font-size: 28px; font-weight: 900; }
.dr-coins { font-size: 34px; font-weight: 900; color: #e8a400; }
#dive-new { font-size: 16px; }
.fishing.deep .sea { background: linear-gradient(#7fc8f0 0, #7fc8f0 30%, #1f6fae 30%, #0b3a66 100%); }
.fishing.deep .dock { display: none; }
.fishing.deep .sea::after { content: '🛥️'; position: absolute; left: calc(6% - 30px); bottom: calc(10% - 10px); font-size: 150px; line-height: 1; pointer-events: none; z-index: 0; }
.fishing.deep .fish-me { z-index: 1; bottom: calc(10% + 52px); }
/* Tauchen: Leiste in zwei Zeilen, Münzanzeige ausblenden */
.dive-top { flex-wrap: wrap; }
.dive-top #dive-items { order: 3; flex-basis: 100%; font-size: 18px; }
body:has(#dive-view:not([hidden])) #wallet { display: none; }
.edit-bar .catalog .cat-empty { padding: 14px; font-size: 15px; color: #6a5a8c; }
body:has(#snow-bar:not([hidden])) .toast { top: calc(env(safe-area-inset-top) + 130px); }

/* 🤝 Freunde (im Spiel und im Eltern-Bereich) */
.friend-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; background: #fff; border-radius: 16px; padding: 10px; margin: 8px 0; box-shadow: 0 3px 0 rgba(0,0,0,.08); }
.friend-row.waiting { background: #fff3c4; }
.friend-row .fr-head { width: 100%; display: flex; justify-content: space-between; align-items: center; font-size: 18px; }
.friend-row .fr-code { font-family: ui-monospace, monospace; font-size: 24px; font-weight: bold; letter-spacing: 3px; color: #6a4fc0; }
.friend-row .fr-status { width: 100%; font-size: 14px; color: #6b5f86; }
.friend-row .qr { width: 100%; display: flex; justify-content: center; padding: 6px 0; }
.friend-row .qr svg { width: 180px; height: 180px; background: #fff; }
#friends-form input, #parent-friend-form input { flex: 1; min-width: 0; }
.quest-board .note { font-size: 14px; color: #7a4a20; margin: 6px 0; }

/* 🎒 Weniger Knöpfe: Rucksack mit grossen Kacheln, Gesten im 😀-Menü, Extra-Knöpfe nur bei Bedarf (rechts über dem Funk) */
.bag-view { position: fixed; inset: 0; z-index: 30; display: flex; align-items: flex-start; justify-content: flex-start;
  padding: calc(env(safe-area-inset-top) + 92px) 12px 12px; background: rgba(40,25,60,.45); }
.bag-grid { display: grid; grid-template-columns: repeat(3, 96px); gap: 12px; background: #fff; border-radius: 28px; padding: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.bag-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 15px; font-weight: bold; color: #3a2d5c; }
.bag-tile:has(> button[hidden]) { display: none; }
.hud-context { position: fixed; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 196px); display: flex; flex-direction: column-reverse; gap: 12px; }
.emoji-panel .gestures { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 6px; padding-bottom: 6px; border-bottom: 2px solid #eee6ff; margin-bottom: 2px; }
.emoji-panel .gestures button { flex: 1; font-size: 40px; height: 64px; background: #fff3b8; }
/* Unter der Spielwelt keine weisse Fläche (iPhone: Bereich unter der Werkzeugleiste) */
html:has(#screen-game:not([hidden])), html:has(#screen-game:not([hidden])) body { background: #3a2d5c; }
.bag-tile .round { width: 84px; height: 84px; font-size: 44px; background: #f6f2ff; box-shadow: 0 4px 0 #e0d6ff; }
.emoji-panel { z-index: 20; }
.emoji-panel .gestures button { min-width: 0; padding: 0; }
