/* ===== Mochi-Tab: 2D-Welt, Räume, Laden, Spiele ===== */

/* Wichtig gegen Flackern auf dem iPhone: keine zweite Unschärfe (backdrop-filter) innerhalb der Sheets.
   Zu viele übereinanderliegende Unschärfe-Ebenen lassen Safari Kacheln schwarz zeichnen oder verschlucken. */
.sheet .glass, .sheet .shop-card, .sheet .chip { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }

.world { position: relative; padding: 10px; }
.scn-box { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 2px 0 #fff, 0 8px 22px rgba(110, 70, 150, .14); }
.scn-box.slide-l .scn { animation: slideL .38s cubic-bezier(.2, .9, .3, 1); }
.scn-box.slide-r .scn { animation: slideR .38s cubic-bezier(.2, .9, .3, 1); }
@keyframes slideL { from { transform: translateX(14%); opacity: .3; } }
@keyframes slideR { from { transform: translateX(-14%); opacity: .3; } }
.scn-hud { position: absolute; z-index: 6; top: 18px; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: flex-start; pointer-events: none; }
.hud-bars { display: flex; gap: 6px; }
.hud-bars span { padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .88); color: #3a2a45; font-size: 12.5px; font-weight: 800; box-shadow: 0 2px 8px rgba(90, 50, 120, .12); }
.hud-letter { pointer-events: auto; position: relative; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .92); font-size: 22px; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(90, 50, 120, .18); transition: transform .15s; }
.hud-letter:active { transform: scale(.9); }
.hud-letter i { position: absolute; top: 2px; right: 2px; width: 11px; height: 11px; border-radius: 50%; background: #ff5f95; border: 2px solid #fff; }

.wish-dot { position: absolute; right: -8%; top: -4%; padding: 4px 9px 4px 7px; border-radius: 16px 16px 16px 4px; background: #fff; font-size: 4.2cqw; box-shadow: 0 4px 12px rgba(90, 50, 120, .2); display: flex; align-items: center; gap: 2px; animation: wishBob 3s ease-in-out infinite; }
.wish-dot b { font-size: 1.2em; }
@keyframes wishBob { 50% { transform: translateY(-4px); } }
.gift-box { position: absolute; left: 31%; bottom: 1%; font-size: 10cqw; z-index: 2; line-height: 1; text-shadow: .035em 0 #fff, -.035em 0 #fff, 0 .035em #fff, 0 -.035em #fff, 0 .07em .05em rgba(70, 40, 80, .28); animation: giftHop 2.2s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes giftHop { 0%, 70%, 100% { transform: none; } 80% { transform: translateY(-12%) rotate(-6deg); } 90% { transform: translateY(0) rotate(4deg); } }

.scn .ball.kick > span { animation: kick .9s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes kick { 30% { transform: translate(60%, -90%) rotate(160deg); } 60% { transform: translate(110%, -10%) rotate(300deg); } 100% { transform: none; } }
.scn-drop { position: absolute; font-size: 4cqw; pointer-events: none; animation: drop .8s ease-in forwards; }
@keyframes drop { from { transform: translate(-50%, 0); opacity: 1; } to { transform: translate(-50%, 55cqw); opacity: 0; } }
.pet-svg.chomp .mouth-g { animation: chomp .25s ease-in-out 3; transform-origin: 100px 140px; }

/* Einrichten: Plätze im Zimmer */
.slot-mark { position: absolute; width: 13cqw; height: 13cqw; border-radius: 50%; border: .6cqw dashed rgba(255, 122, 168, .9); background: rgba(255, 255, 255, .55); color: #ff5f95; font-size: 6cqw; font-weight: 800; display: grid; place-items: center; transform: translate(-50%, 0); pointer-events: auto; animation: markPulse 1.6s ease-in-out infinite; }
.slot-mark.wall { width: 11cqw; height: 11cqw; transform: translate(-50%, -50%); }
.slot-mark.rug { width: 34cqw; height: 9cqw; border-radius: 50%; transform: translate(-50%, 0); }
.slot-mark.used { background: transparent; border-color: rgba(167, 123, 255, .9); animation: none; }
@keyframes markPulse { 50% { box-shadow: 0 0 0 1.4cqw rgba(255, 122, 168, .18); } }

/* Raum-Leiste */
.room-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 10px; }
.room-btn { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; border-radius: 16px; background: var(--glass-strong); border: 1px solid var(--glass-border); transition: transform .15s, background .2s; }
.room-btn:active { transform: scale(.92); }
.room-btn span { font-size: 22px; line-height: 1.1; }
.room-btn small { font-size: 10.5px; font-weight: 800; color: var(--muted); }
.room-btn.on { background: var(--grad); border-color: transparent; box-shadow: 0 6px 16px rgba(192, 139, 255, .35); }
.room-btn.on small { color: #fff; }

/* Aktionen */
.room-actions { margin-top: 10px; }
.act-row, .edit-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.act-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-border); transition: transform .15s; touch-action: none; }
.act-btn:active { transform: scale(.93); }
.act-btn span { font-size: 24px; line-height: 1.1; }
.act-btn small { font-size: 12px; font-weight: 800; color: var(--muted); }
.act-btn[data-primary] { background: var(--grad); border-color: transparent; }
.act-btn[data-primary] span, .act-btn[data-primary] small { color: #fff; }
.act-hint { margin: 8px 6px 2px; font-size: 12.5px; color: var(--muted); text-align: center; font-weight: 600; }
.food-tray { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.food-chip { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 7px; border-radius: 18px; background: var(--glass-strong); border: 1px solid var(--glass-border); touch-action: none; }
.food-chip .fe { font-size: 30px; line-height: 1.1; }
.food-chip small { font-size: 11.5px; font-weight: 800; color: var(--muted); }
.food-chip.poor { opacity: .5; }
.food-chip.wished { box-shadow: 0 0 0 2.5px #ffcf4d inset; }
.food-chip.wished::after { content: "💭"; position: absolute; top: -6px; right: -2px; font-size: 16px; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 90; font-size: 54px; line-height: 1; pointer-events: none; text-shadow: 0 6px 12px rgba(80, 40, 80, .3); }
.game-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.game-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: 20px; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.game-card span { font-size: 34px; }
.game-card b { font-size: 15px; }
.game-card small { font-size: 12px; color: var(--muted); font-weight: 700; }

/* Haus-Zeile */
#houseLine { margin-top: 12px; }
.house-line { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left; }
.hl-ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--glass-strong); flex-shrink: 0; }
.hl-txt { flex: 1; min-width: 0; }
.hl-txt b { display: block; font-size: 15px; }
.hl-txt small { color: var(--muted); font-weight: 600; font-size: 13px; }
.hl-go { font-size: 24px; color: var(--muted); }
.house-prev { width: 70%; margin: 0 auto 10px; }
.house-prev svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 4px 8px rgba(70, 60, 40, .2)); }

/* Sheets: Laden, Sammlung, Kleiderschrank */
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.sheet-head h2 { margin: 0; }
.sheet-hint { margin: -4px 4px 14px; color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.4; }
.center { text-align: center; }
.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--check-off); gap: 4px; }
.seg button { padding: 8px 12px; border-radius: 11px; font-weight: 800; font-size: 14px; color: var(--muted); }
.seg button.on { background: var(--glass-strong); color: var(--text); box-shadow: 0 2px 8px rgba(90, 50, 120, .15); }
.seg.wide { display: flex; margin-bottom: 14px; } .seg.wide button { flex: 1; }
.coin-pill.small { padding: 7px 12px; font-size: 15px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--glass-border); font-weight: 800; white-space: nowrap; }
.cat-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: none; }
.cat-row::-webkit-scrollbar { display: none; }
.cat-row .chip { white-space: nowrap; flex-shrink: 0; padding: 8px 12px; font-size: 14px; }
.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.shop-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; text-align: center; border-radius: 20px;
  background: var(--glass-strong); border: 1px solid var(--glass-border); box-shadow: 0 2px 8px rgba(90, 50, 120, .07); contain: layout paint; }
.shop-card b { font-size: 12.5px; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }
.shop-card .pv { height: 66px; display: grid; place-items: center; }
.shop-card.is-locked .pv { opacity: .45; }
.muted-s { color: var(--muted); font-weight: 700; font-size: 11.5px; margin-top: -4px; }
.own-badge { position: absolute; top: 6px; right: 8px; font-style: normal; font-size: 11px; font-weight: 800; color: var(--accent); }
.pv-emo { font-size: 42px; line-height: 1; }
.pv-mochi { width: 66px; height: 66px; }
.pv-mochi .pet-svg { width: 100%; height: 100%; }
.pv-mochi .pet-svg .body-g, .pv-mochi .pet-svg .eyes { animation: none !important; }
.pv-mochi.big { width: 150px; height: 150px; margin: 0 auto; }
.buy { padding: 6px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--grad); color: #fff; white-space: nowrap; }
.buy.poor { opacity: .55; }
.buy.sure { background: linear-gradient(135deg, #ffb36b, #ff7a59); }
.buy.locked { background: var(--check-off); color: var(--muted); font-size: 11px; }
.buy.using { background: linear-gradient(135deg, #4fd6a5, #2fb5c9); }
.buy.use { background: var(--glass); color: var(--text); border: 1px solid var(--glass-border); }
.wear-opt.active { box-shadow: 0 0 0 3px var(--accent) inset; }
.wardrobe-preview { padding: 6px 0 10px; text-align: center; background: radial-gradient(circle, rgba(255, 143, 180, .18), transparent 65%); }
.album-head { text-align: center; margin-bottom: 6px; }
.album-head b { font-size: 30px; font-weight: 900; }
.album-head .bar { height: 12px; margin: 8px 0 4px; }
.album-head small { color: var(--muted); font-weight: 700; }
.sheet-sub small { color: var(--muted); font-weight: 700; font-size: 13px; margin-left: 6px; }
.album-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.album-cell { position: relative; aspect-ratio: 1; border-radius: 14px; background: var(--glass-strong); display: grid; place-items: center; overflow: hidden; contain: paint; }
.album-cell .pv-emo { font-size: 26px; }
.album-cell .pv-mochi { width: 46px; height: 46px; }
.album-cell .pv-swatch { width: 34px; height: 26px; }
.album-cell .pv-rug { width: 38px; height: 20px; }
.album-cell i { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: 10px; font-weight: 800; color: var(--accent); }
.album-cell:not(.got) > * { opacity: .22; }
.pv-swatch { display: block; width: 58px; height: 44px; border-radius: 12px; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(90, 50, 120, .12); }
.rescue-chip { display: inline-block; margin-left: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--glass-strong); border: 1px solid var(--glass-border); }
.stg { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 14px; background: var(--glass-strong); text-align: center; opacity: .65; }
.stg span { font-size: 22px; }
.stg small { font-size: 10px; font-weight: 700; color: var(--muted); line-height: 1.2; }
.stg.on { opacity: 1; background: linear-gradient(135deg, rgba(255, 213, 107, .3), rgba(255, 143, 180, .22)); }
.stg.next { opacity: 1; outline: 2px dashed var(--accent); outline-offset: -2px; }

/* Einrichten-Sheets */
.slot-cur { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border-radius: 20px; background: var(--glass-strong); margin-bottom: 12px; }
.two-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.two-btn .pill-btn:disabled { opacity: .5; }
.paint-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.paint-sw { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 2px; border-radius: 16px; }
.paint-sw i { width: 48px; height: 48px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 10px rgba(90, 50, 120, .18); }
.paint-sw small { font-size: 12px; font-weight: 700; color: var(--muted); }
.paint-sw.on i { box-shadow: 0 0 0 3px var(--accent), 0 3px 10px rgba(90, 50, 120, .18); }
.paint-sw.sure { background: var(--glass-strong); }
.paint-sw.sure small::after { content: " · Streichen?"; color: var(--accent); }

/* Garten-Sheets */
.bed-hero { text-align: center; font-size: 70px; line-height: 1.1; }
.grow-bar { height: 12px; border-radius: 99px; background: var(--check-off); overflow: hidden; margin: 10px 20px 0; }
.grow-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #8fe3a1, #4fd6a5); }

/* Post an Leon */
.nudge-chips { margin-bottom: 12px; }
.polaroid { width: 78%; margin: 4px auto 12px; padding: 10px 10px 0; background: #fff; border-radius: 6px; box-shadow: 0 10px 26px rgba(70, 40, 80, .22); transform: rotate(-2deg); }
.polaroid .scn { border-radius: 2px; }
.pol-cap { font-family: "Bradley Hand", "Segoe Print", "Comic Sans MS", cursive; color: #4a3a55; text-align: center; padding: 10px 4px 14px; font-size: 16px; }
.polaroid.fly-away { transition: transform .9s cubic-bezier(.5, -.3, .5, 1), opacity .9s; transform: translate(40%, -140%) rotate(18deg) scale(.6); opacity: 0; }
.pol-hl ul { margin: 0 0 12px; padding: 12px 14px 12px 32px; border-radius: 16px; background: var(--glass-strong); font-size: 14px; font-weight: 600; line-height: 1.6; }
.cam-flash { position: fixed; inset: 0; z-index: 99; background: #fff; pointer-events: none; animation: flash .7s ease-out forwards; }
@keyframes flash { from { opacity: .95; } to { opacity: 0; } }
.sent-list { display: flex; flex-direction: column; gap: 6px; }
.sent { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--glass-strong); }
.sent p { margin: 0; flex: 1; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Geschenk */
.gift-modal .gift { background: none; border: 0; }
.gift-list { list-style: none; padding: 0; margin: 10px 0 16px; font-weight: 700; line-height: 1.9; }

/* Spiele */
.game-ov { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: linear-gradient(#bfe6ff, #fde4ef); opacity: 0; transition: opacity .3s; padding-top: env(safe-area-inset-top); }
.game-ov.show { opacity: 1; }
.game-top { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #3a2a45; }
.game-top b { flex: 1; font-size: 18px; }
.game-top span { font-weight: 800; font-size: 17px; }
.game-x { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .85); font-size: 16px; color: #3a2a45; }
.game-field { position: relative; flex: 1; overflow: hidden; touch-action: none; }
.rg-timer { position: absolute; left: 16px; right: 16px; top: 0; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .6); overflow: hidden; }
.rg-timer i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff8fb4, #c08bff); }
.rg-mochi { position: absolute; left: 0; bottom: 30px; width: 100px; height: 100px; }
.rg-mochi .pet-svg { width: 100%; height: 100%; }
.rg-item { position: absolute; left: 0; top: 0; font-size: 36px; line-height: 1; text-shadow: 0 2px 0 #fff, 0 -2px 0 #fff, 2px 0 #fff, -2px 0 #fff; }
.rg-hint { position: absolute; left: 0; right: 0; bottom: 150px; text-align: center; font-weight: 800; color: #3a2a45; opacity: .7; }
.game-end { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 30px; background: rgba(255, 255, 255, .8); color: #3a2a45; text-align: center; }
.game-end h2 { margin: 0; font-size: 28px; }
.game-end p { margin: 0 0 18px; font-weight: 600; }
.ge-big { font-size: 80px; }
.mm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px; max-width: 420px; margin: 0 auto; }
.mm-card { position: relative; aspect-ratio: 3 / 3.6; border-radius: 18px; perspective: 600px; }
.mm-card span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 18px; font-size: 40px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .4s; box-shadow: 0 4px 12px rgba(90, 50, 120, .15); }
.mm-card .back { background: linear-gradient(135deg, #ff8fb4, #c08bff); }
.mm-card .front { background: #fff; transform: rotateY(180deg); }
.mm-card.up .back { transform: rotateY(-180deg); }
.mm-card.up .front { transform: rotateY(0); }
.mm-card.ok .front { box-shadow: 0 0 0 3px #4fd6a5 inset; }

/* ===== Freundschaft ===== */
button.hud-bars { pointer-events: auto; border: 0; padding: 0; background: none; font: inherit; color: inherit; flex-wrap: wrap; text-align: left; }
button.hud-bars:active { transform: scale(.97); }
.hud-bond { background: linear-gradient(135deg, #fff, #ffe6f1) !important; }
.gift-box.bond-gift { left: auto; right: 24%; font-size: 8cqw; }
.bond-head { display: flex; align-items: center; gap: 14px; margin: 4px 4px 12px; }
.bond-head small { color: var(--muted); font-weight: 700; font-size: 13px; }
.bond-head h2 { margin: 2px 0 0; }
.bond-emo { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 32px; background: linear-gradient(135deg, #ffe3ef, #efe4ff); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .8); flex-shrink: 0; }
.bond-bar { height: 12px; border-radius: 999px; background: rgba(192, 139, 255, .16); overflow: hidden; margin: 0 4px 10px; }
.bond-bar i { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.bond-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 10px; }
.bond-stats div { padding: 10px 6px; border-radius: 16px; background: var(--glass-strong); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.bond-stats span { font-size: 20px; }
.bond-stats b { font-size: 17px; }
.bond-stats small { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.bond-unlocks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.bond-unlocks li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--glass-strong); opacity: .6; }
.bond-unlocks li.open { opacity: 1; }
.bond-unlocks li > span { font-size: 22px; width: 30px; text-align: center; }
.bond-unlocks b { display: block; font-size: 14.5px; }
.bond-unlocks small { color: var(--muted); font-weight: 700; font-size: 12px; }
.bond-ms .chip { font-size: 12.5px; }
