/* ================= Wheek World app styles ================= */
:root { --top-h: 62px; --nav-h: 72px; }
body { min-height: 100dvh; overflow-x: hidden; }
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }
.pad { padding: 14px 14px 24px; max-width: 640px; margin: 0 auto; }
.center { text-align: center; }
.muted { color: var(--ink-soft); font-weight: 700; font-size: 15px; }
.hint { color: var(--ink-soft); font-size: 14px; margin: 8px 0 0; }
.big-emoji { font-size: 64px; line-height: 1.1; filter: drop-shadow(0 4px 0 rgba(43,22,64,.15)); }
.big-emoji.sm { font-size: 38px; }
.kicker { font-family: var(--display); color: var(--pink-deep); margin: 0 0 4px; font-size: 15px; letter-spacing: .5px; text-transform: uppercase; }
.page-t { font-size: 30px; margin: 4px 0 12px; }
.sec { font-size: 21px; margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; }
.sub { font-size: 17px; margin: 14px 0 8px; }
.count { font-family: var(--body); font-weight: 900; font-size: 14px; background: #fff; border: 3px solid var(--ink); border-radius: 99px; padding: 1px 9px; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; border: 3px solid var(--ink); font: 900 12px/16px var(--body); display: inline-flex; align-items: center; justify-content: center; animation: badgePop 1.6s ease-in-out infinite; }
@keyframes badgePop { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.btn.big { font-size: 22px; min-height: 58px; padding: 12px 26px; width: 100%; max-width: 420px; }
.btn.danger { color: #c0203a; }
.btn s { opacity: .55; font-size: .8em; margin-left: 4px; }
.btn.nope { animation: nope .35s; }
@keyframes nope { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.row-btns { display: flex; gap: 10px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.row-btns .btn { flex: 1 1 150px; }
.note { padding: 12px 14px; margin: 16px 0; font-size: 15px; }
.note p { margin: 6px 0 0; }
a { color: var(--pink-deep); }

/* ---------- top bar ---------- */
#top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  height: calc(var(--top-h) + var(--safe-top)); padding: var(--safe-top) 10px 0;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(#fffdf8, #fff6fb); border-bottom: 4px solid var(--ink);
  box-shadow: 0 4px 0 rgba(43,22,64,.12);
}
.tb-level { position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--ink); background: var(--lilac); padding: 0; display: grid; place-items: center; }
.tb-level .lv { font-family: var(--display); font-size: 19px; line-height: 1; margin-top: -6px; }
.tb-level .lvbar { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 6px; border-radius: 9px; background: #fff; border: 2px solid var(--ink); overflow: hidden; }
.tb-level .lvbar i { display: block; height: 100%; background: var(--slime); }
.tb-back { flex: none; width: 46px; height: 46px; border-radius: 14px; border: 4px solid var(--ink); background: #fff; font-size: 18px; box-shadow: 0 4px 0 var(--ink); }
.tb-event { flex: 1; min-width: 0; height: 42px; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 3px solid var(--ink); border-radius: 99px; background: var(--ev); font-weight: 900; font-size: 13px; }
.tb-event .ei { font-size: 18px; }
.tb-event .et { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; text-align: left; }
.tb-event .em { background: rgba(255,255,255,.75); border-radius: 99px; padding: 1px 7px; font-size: 12px; }
.coin-pill { flex: none; height: 42px; display: flex; align-items: center; gap: 5px; padding: 0 12px 0 8px; border: 3px solid var(--ink); border-radius: 99px; background: #fff3c4; font-family: var(--display); font-size: 18px; }
.ii .coin-ico { width: 100%; height: 100%; }
.coin-pill .coin-ico { width: 24px; height: 24px; }
.coin-pill b { font-weight: 400; }
.coin-pill.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: scale(1.18); } }
.tb-quest { position: relative; flex: none; width: 44px; height: 42px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; font-size: 20px; padding: 0; }

/* ---------- view & nav ---------- */
#view { padding-top: calc(var(--top-h) + var(--safe-top)); padding-bottom: calc(var(--nav-h) + var(--safe-bottom) + 10px); min-height: 100dvh; }
#nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-bottom)); padding: 6px 6px var(--safe-bottom);
  display: flex; justify-content: space-around; gap: 4px;
  background: #fffdf8; border-top: 4px solid var(--ink);
}
.nv { position: relative; flex: 1; max-width: 110px; border: none; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 16px; padding: 2px 0; }
.nv .ni { font-size: 26px; line-height: 1.1; transition: transform .15s; }
.nv .nl { font-size: 12px; font-weight: 900; color: var(--ink-soft); }
.nv.on { background: var(--yellow); box-shadow: inset 0 0 0 3px var(--ink); }
.nv.on .ni { transform: translateY(-2px) scale(1.1); }
.nv.on .nl { color: var(--ink); }
.nv .badge { top: 0; right: 14%; }
body.in-game #nav { display: none; }
body.in-game #view { padding-bottom: 0; }
.stage { position: relative; height: calc(100dvh - var(--top-h) - var(--safe-top)); overflow: hidden; }

/* ---------- guinea svg ---------- */
.gp { overflow: visible; display: block; }
.gp .eyes-h, .gp .eyes-o, .gp .eyes-s, .gp .eyes-sad, .gp .mouth-open { display: none; }
.gp.happy .eyes-n { display: none; } .gp.happy .eyes-h { display: inline; }
.gp.wow .eyes-n { display: none; } .gp.wow .eyes-o { display: inline; }
.gp.sleepy .eyes-n { display: none; } .gp.sleepy .eyes-s { display: inline; }
.gp.sad .eyes-n { display: none; } .gp.sad .eyes-sad { display: inline; }
.gp .body { transform-origin: 100px 160px; transform-box: view-box; }
.gp.idle .body { animation: breathe 3s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, .975); } }
.gp.squish .body { animation: squish .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes squish { 0% { transform: scale(1.25, .72); } 60% { transform: scale(.93, 1.08); } 100% { transform: none; } }
.gp.spin .body { animation: spin .6s ease-in-out; }
@keyframes spin { to { transform: rotate(360deg); } }
.gp.sneeze .body { animation: sneeze .8s; }
@keyframes sneeze { 0% { transform: scale(1); } 40% { transform: scale(.94, 1.08) translateY(-4px); } 55% { transform: scale(1.18, .8) translateY(8px); } 100% { transform: none; } }
.gp.sneeze .eyes-n { display: none; } .gp.sneeze .eyes-o { display: inline; }
.gp.munch .mouth { display: none; } .gp.munch .mouth-open { display: inline; animation: munch .18s infinite alternate; transform-box: fill-box; transform-origin: center; }
.gp.munch .eyes-n { display: none; } .gp.munch .eyes-h { display: inline; }
@keyframes munch { to { transform: scaleY(.3); } }
.gp.happy .body, .gp.hop .body { animation: hop .5s ease-out 2; }
.gp.idle.happy .body { animation: breathe 3s ease-in-out infinite; }
@keyframes hop { 0%, 100% { transform: none; } 40% { transform: translateY(-26px) scale(.95, 1.06); } 70% { transform: scale(1.1, .9); } }
.gp.gassy .body { animation: gassy .9s; }
@keyframes gassy { 20% { transform: scale(1.1, .9); } 40% { transform: translateY(-14px) rotate(-6deg); } 70% { transform: rotate(4deg); } }
.gp.disco { animation: disco 2s linear infinite; }
@keyframes disco { to { filter: hue-rotate(360deg); } }
.gp .spk { transform-box: fill-box; transform-origin: center; animation: twinkle 1.4s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: scale(.4) rotate(45deg); opacity: .5; } }
.gp .prop { transform-box: fill-box; transform-origin: center; animation: prop .4s linear infinite; }
@keyframes prop { to { transform: scaleX(-1); } }
.gp .nose-hit { pointer-events: all; }

/* ---------- home room ---------- */
.room { position: relative; height: min(56vh, 440px); min-height: 330px; overflow: hidden; border-bottom: 4px solid var(--ink); }
.room .wall { position: absolute; inset: 0 0 34% 0; background: var(--wall); border-bottom: 5px solid var(--ink); }
.room .wall::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 16px; background: #fff; border-top: 4px solid var(--ink); }
.room .floor { position: absolute; inset: 66% 0 0 0; background: var(--floor); }
.decor { position: absolute; font-size: 56px; line-height: 1; filter: drop-shadow(0 5px 0 rgba(43,22,64,.18)); pointer-events: none; }
.decor.d0 { left: 4%; top: 30%; } .decor.d1 { right: 4%; top: 30%; }
.decor.d2 { left: 3%; bottom: 4%; font-size: 64px; } .decor.d3 { right: 3%; bottom: 4%; font-size: 64px; }
.pet-main { position: absolute; left: 50%; bottom: 7%; transform: translateX(-50%); background: none; border: none; padding: 0; touch-action: manipulation; z-index: 3; }
.pet-main .gp { width: min(56vw, 230px); height: auto; filter: drop-shadow(0 6px 0 rgba(43,22,64,.1)); }
.pet-name { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; background: #fff; border: 3px solid var(--ink); border-radius: 99px; padding: 3px 12px; font-family: var(--display); font-size: 18px; white-space: nowrap; z-index: 4; box-shadow: 0 3px 0 var(--ink); }
.sex { font-family: var(--body); font-weight: 900; }
.tier { display: inline-block; font: 900 11px/1 var(--body); text-transform: uppercase; letter-spacing: .4px; padding: 4px 8px; border-radius: 99px; background: var(--tc); color: #fff; border: 2px solid var(--ink); text-shadow: 0 1px 0 rgba(0,0,0,.25); }
.bubble { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); width: min(86%, 360px); background: #fff; border: 4px solid var(--ink); border-radius: 20px; padding: 8px 14px; font-weight: 800; font-size: 15px; text-align: center; z-index: 4; box-shadow: 0 4px 0 var(--ink); }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -14px; width: 18px; height: 18px; background: #fff; border-right: 4px solid var(--ink); border-bottom: 4px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.bubble.pop { animation: pop .35s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { 0% { transform: translateX(-50%) scale(.7); } 100% { transform: translateX(-50%) scale(1); } }
.pal { position: absolute; bottom: 4%; background: none; border: none; padding: 0; z-index: 2; animation: palWander 9s ease-in-out infinite; }
.pal:nth-of-type(odd) { left: 2%; } .pal:nth-of-type(even) { right: 2%; animation-delay: -4s; }
.pal .gp { width: 84px; height: auto; }
.pal-n { display: block; font-size: 12px; font-weight: 900; background: #fff; border: 2px solid var(--ink); border-radius: 99px; padding: 0 6px; margin-top: -6px; }
@keyframes palWander { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(16px); } }
.courier { position: absolute; right: 8px; top: 120px; z-index: 6; border: none; background: none; padding: 0; display: flex; flex-direction: column; align-items: center; animation: courierIn 1s cubic-bezier(.3,1.4,.5,1) both, float 2.4s 1s ease-in-out infinite; }
.courier .c-ico { font-size: 46px; line-height: 1; }
.courier .c-box { font-size: 34px; margin-top: -10px; animation: wiggle 1s ease-in-out infinite; }
.courier .c-tip { background: var(--pink); border: 3px solid var(--ink); border-radius: 99px; font-size: 12px; font-weight: 900; padding: 2px 8px; white-space: nowrap; }
@keyframes courierIn { from { transform: translate(140px, -80px) rotate(20deg); } to { transform: none; } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(8deg); } }
.sitter { position: absolute; left: 8px; bottom: 8px; background: #fff; border: 3px solid var(--ink); border-radius: 12px; font-size: 12px; padding: 2px 8px; z-index: 5; }
.stats { margin: 12px 12px 0; padding: 10px 14px; display: grid; gap: 7px; }
.stat { display: grid; grid-template-columns: 26px 1fr 56px; align-items: center; gap: 8px; }
.stat .si { font-size: 20px; }
.stat .sb { height: 16px; border: 3px solid var(--ink); border-radius: 99px; background: #f1ebff; overflow: hidden; }
.stat .sb i { display: block; height: 100%; border-radius: 99px; transition: width .5s, background .5s; box-shadow: inset 0 -4px 0 rgba(0,0,0,.12); }
.stat .sl { font-size: 13px; font-weight: 900; color: var(--ink-soft); }
.preg { display: block; width: 100%; text-align: center; background: #ffe3f1; border: 3px solid var(--ink); border-radius: 14px; padding: 6px; font-size: 14px; font-weight: 800; }
.preg.sickrow { background: #e4fbd5; font: inherit; font-size: 14px; }
.actions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; padding: 12px 12px 0; max-width: 640px; margin: 0 auto; }
.act { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border: 4px solid var(--ink); border-radius: 18px; background: #fff; box-shadow: 0 5px 0 var(--ink); font-weight: 900; font-size: 13px; }
.act span { font-size: 26px; line-height: 1.1; }
.act:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.tray { margin: 12px; }
.tray-in { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.tray-it { flex: none; width: 96px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); }
.tray-it b { font-size: 12px; line-height: 1.1; text-align: center; }
.tray-it small { font-size: 12px; color: var(--ink-soft); font-weight: 900; }
.tray-empty { padding: 10px; font-weight: 800; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ii { display: inline-grid; place-items: center; width: 44px; height: 44px; font-size: 34px; line-height: 1; }
.ii.big { width: 64px; height: 64px; font-size: 52px; }
.ii.art svg { width: 44px; height: 44px; }
.ii.outfit { width: 64px; height: 64px; }
.ii.outfit .gp { width: 64px; height: 64px; }
.ii.swatch { width: 52px; height: 52px; border-radius: 12px; border: 3px solid var(--ink); }

/* ---------- floaters, toast, flash ---------- */
.floater { position: fixed; z-index: 70; transform: translate(-50%, 0); font-family: var(--display); pointer-events: none; -webkit-text-stroke: 1.5px var(--ink); paint-order: stroke fill; white-space: nowrap; animation: floatUp 1.15s ease-out forwards; }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), -70px) scale(1); } }
/* Toast drops in under the top bar. Hidden = invisible (not just moved), so it can never peek out on any phone. */
#toast { position: fixed; left: 50%; top: calc(var(--top-h) + var(--safe-top) + 8px); z-index: 80; transform: translate(-50%, -20px) scale(.9); opacity: 0; visibility: hidden; width: max-content; max-width: calc(100vw - 24px); display: flex; gap: 8px; align-items: center; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); padding: 8px 14px; font-weight: 900; font-size: 15px; line-height: 1.25; transition: transform .3s cubic-bezier(.3,1.4,.5,1), opacity .2s, visibility 0s .3s; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .3s cubic-bezier(.3,1.4,.5,1), opacity .2s, visibility 0s; }
#toast .ti { font-size: 24px; }
body.flash::after { content: ""; position: fixed; inset: 0; background: #fff; z-index: 75; pointer-events: none; animation: flash .5s forwards; }
@keyframes flash { from { opacity: .9; } to { opacity: 0; } }

/* ---------- modal ---------- */
#modals { position: relative; z-index: 50; }
.modal-wrap { position: fixed; inset: 0; background: rgba(43,22,64,.45); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .2s; z-index: 50; }
.modal-wrap.in { opacity: 1; }
.modal { position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 20px 18px; transform: scale(.8) translateY(30px); transition: transform .3s cubic-bezier(.3,1.5,.5,1); }
.modal-wrap.in .modal { transform: none; }
.modal-wrap.out .modal { transform: scale(.9); }
.modal h2 { font-size: 26px; margin: 4px 0 10px; text-align: center; }
.modal .mtext { font-size: 16px; line-height: 1.4; margin: 8px 0; text-align: center; }
.modal-x { position: absolute; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-weight: 900; }
.mrow { display: flex; gap: 10px; justify-content: center; margin-top: 16px; flex-wrap: wrap; }
.mrow .btn { flex: 1 1 120px; }
.text-in { width: 100%; font: 800 20px var(--body); padding: 10px 14px; border: 4px solid var(--ink); border-radius: 14px; background: #fff; color: var(--ink); -webkit-user-select: text; user-select: text; }
.text-in.code { font-size: 11px; height: 120px; word-break: break-all; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 3px solid var(--ink); border-radius: 99px; background: #fff; font-weight: 900; font-size: 14px; }
.chip.on { background: var(--slime); box-shadow: inset 0 -3px 0 rgba(0,0,0,.15); }
.chip.locked { background: #eee; color: var(--ink-soft); }
.chip .sw { width: 18px; height: 18px; border-radius: 6px; border: 2px solid var(--ink); }
.ward-prev { display: grid; place-items: center; background: radial-gradient(#fff, #f1ebff); border-radius: 18px; border: 3px solid var(--ink); padding: 6px; }

/* reveal */
.reveal { text-align: center; }
.rv-who { display: flex; gap: 10px; align-items: center; text-align: left; background: #f6f0ff; border: 3px solid var(--ink); border-radius: 16px; padding: 8px 12px; }
.rv-who .rv-ico { font-size: 44px; }
.rv-who p { margin: 2px 0 0; font-size: 14px; }
.rv-box { position: relative; margin: 22px auto 8px; width: 190px; height: 190px; border: none; background: none; display: grid; place-items: center; }
.rv-glow { position: absolute; inset: 10px; border-radius: 50%; background: radial-gradient(var(--rc), transparent 65%); opacity: calc(.25 + var(--k, 0) * .22); animation: glowSpin 3s linear infinite; }
@keyframes glowSpin { to { transform: rotate(360deg) scale(1.05); } }
.rv-b { position: relative; font-size: calc(104px + var(--k, 0) * 10px); line-height: 1; filter: drop-shadow(0 8px 0 rgba(43,22,64,.2)); transition: font-size .2s; }
.rv-tap { position: absolute; bottom: -6px; font-family: var(--display); background: var(--yellow); border: 3px solid var(--ink); border-radius: 99px; padding: 2px 12px; animation: float 1.4s ease-in-out infinite; }
.rv-box.shk .rv-b { animation: shk .35s; }
@keyframes shk { 20% { transform: rotate(-14deg) scale(1.05); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg) scale(1.1); } 80% { transform: rotate(5deg); } }
.rv-box.boom .rv-b { animation: boom .35s forwards; }
@keyframes boom { to { transform: scale(1.8); opacity: 0; } }
.rv-items { display: grid; gap: 10px; margin-top: 16px; }
.rw { display: flex; gap: 12px; align-items: center; text-align: left; padding: 10px; border: 4px solid var(--ink); border-radius: 18px; background: linear-gradient(135deg, #fff 55%, color-mix(in srgb, var(--rc) 30%, #fff)); box-shadow: 0 5px 0 var(--ink), 0 0 0 4px var(--rc) inset; animation: rwIn .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes rwIn { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.rw-art { flex: none; width: 72px; height: 72px; display: grid; place-items: center; }
.rw-art .sq, .rw-art svg { width: 72px; height: 72px; }
.rw-txt { display: flex; flex-direction: column; gap: 2px; }
.rw-rar { align-self: flex-start; font: 900 11px var(--body); text-transform: uppercase; color: #fff; background: var(--rc); border: 2px solid var(--ink); border-radius: 99px; padding: 2px 8px; }
.rw-txt b { font-size: 17px; }
.rw-txt small { color: var(--ink-soft); font-weight: 800; }
.earned { font-family: var(--display); font-size: 40px; display: flex; justify-content: center; align-items: center; gap: 6px; margin: 10px 0; }
.earned .coin-ico { width: 40px; height: 40px; }
.earned b { font-weight: 400; }
.streak { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 12px 0; }
.sd { border: 3px solid var(--ink); border-radius: 12px; padding: 4px 0; background: #fff; display: flex; flex-direction: column; align-items: center; font-size: 11px; }
.sd span { font-size: 20px; } .sd b { font-size: 12px; }
.sd.got { background: #e4fbd5; opacity: .7; } .sd.today { background: var(--yellow); transform: scale(1.1); }
.quests { display: grid; gap: 8px; text-align: left; }
.q { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 14px; background: #fff; }
.q.done { background: #e4fbd5; }
.q .qt { font-weight: 800; font-size: 14px; display: flex; flex-direction: column; }
.q .qt small { color: var(--ink-soft); }
.q .qr { font-family: var(--display); display: flex; align-items: center; gap: 3px; }
.babies { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; margin: 14px 0; }
.baby { border: 4px solid var(--ink); border-radius: 18px; background: #fff; padding: 10px 6px; min-height: 150px; display: grid; place-items: center; box-shadow: 0 5px 0 var(--ink); }
.baby .blanket { font-size: 64px; animation: wiggle 1.2s ease-in-out infinite; }
.baby.open { box-shadow: 0 5px 0 var(--ink), inset 0 0 0 4px var(--tc); animation: rwIn .5s cubic-bezier(.3,1.6,.5,1); }
.baby .bb { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.baby .bb small { font-size: 11px; color: var(--ink-soft); }
.passed .ghost-pet { position: relative; display: grid; place-items: center; opacity: .9; animation: float 3s ease-in-out infinite; }
.intro .dots { display: flex; gap: 6px; justify-content: center; margin-top: 10px; }
.intro .dots i { width: 10px; height: 10px; border-radius: 50%; background: #d8ccf2; border: 2px solid var(--ink); }
.intro .dots i.on { background: var(--pink); }
.intro #inArt { display: grid; place-items: center; min-height: 140px; }
.help p { margin: 10px 0; line-height: 1.35; }

/* ---------- map ---------- */
.v-map { padding-bottom: calc(var(--nav-h) + var(--safe-bottom)); }
.ticker { position: sticky; top: calc(var(--top-h) + var(--safe-top)); z-index: 10; overflow: hidden; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; height: 28px; display: flex; align-items: center; }
.tk-in { white-space: nowrap; padding-left: 100%; animation: tick 60s linear infinite; }
.tk-in b { color: var(--yellow); }
@keyframes tick { to { transform: translateX(-100%); } }
.map-wrap { position: relative; max-width: 520px; margin: 0 auto; }
.map-svg { display: block; width: 100%; height: auto; }
.map-svg .wave { animation: wave 3s ease-in-out infinite; }
@keyframes wave { 50% { transform: translateX(8px); } }
.map-svg .cloud { animation: cloud 30s linear infinite; }
.map-svg .cloud.c2 { animation-duration: 42s; animation-direction: reverse; }
@keyframes cloud { from { transform: translateX(-160px); } to { transform: translateX(420px); } }
.map-svg .balloon { animation: balloon 26s linear infinite; }
@keyframes balloon { 0% { transform: translate(-40px, 900px); } 50% { transform: translate(200px, 520px) rotate(8deg); } 100% { transform: translate(440px, 140px); } }
.map-svg .fountain { animation: fountain 1s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: bottom; }
@keyframes fountain { to { transform: scaleY(1.2); } }
.map-svg .bubble-swamp { animation: swampB 2.4s ease-in infinite; transform-box: fill-box; transform-origin: center; }
@keyframes swampB { 0% { transform: scale(0); } 70% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.lm { position: absolute; transform: translate(-50%, -40%); display: flex; flex-direction: column; align-items: center; background: none; border: none; padding: 0; z-index: 3; }
.lm-ico { font-size: 34px; line-height: 1; width: 58px; height: 58px; display: grid; place-items: center; background: var(--lc); border: 4px solid var(--ink); border-radius: 50%; box-shadow: 0 4px 0 var(--ink); animation: lmBob 3s ease-in-out infinite; }
.lm:nth-child(odd) .lm-ico { animation-delay: -1.5s; }
@keyframes lmBob { 50% { transform: translateY(-4px); } }
.lm-name { margin-top: 4px; background: #fff; border: 3px solid var(--ink); border-radius: 99px; padding: 1px 9px; font-weight: 900; font-size: 12px; white-space: nowrap; box-shadow: 0 3px 0 var(--ink); }
.lm .badge { top: -4px; right: 6px; }
.lm:active .lm-ico { transform: scale(.9); }
.lm.merchant .lm-ico { animation: float 1.5s ease-in-out infinite; box-shadow: 0 0 0 6px rgba(199,179,255,.6), 0 4px 0 var(--ink); }
.me { position: absolute; z-index: 4; transform: translate(-50%, 0); transition: left .6s ease-in-out, top .6s ease-in-out; pointer-events: none; }
.me .gp { width: 58px; height: auto; filter: drop-shadow(0 3px 0 rgba(43,22,64,.25)); }
.me.walking .gp { animation: walk .2s ease-in-out infinite alternate; }
@keyframes walk { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(6deg) translateY(-6px); } }
.rain-sq { position: absolute; z-index: 5; width: 62px; height: 62px; padding: 0; border: none; background: none; animation: rainFall linear forwards; }
.rain-sq .sq { width: 62px; height: 62px; }
@keyframes rainFall { from { transform: translateY(-40px) rotate(-20deg); } to { transform: translateY(900px) rotate(30deg); } }

/* ---------- places ---------- */
.place-hd { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 14px 18px; background: var(--pc); border-bottom: 4px solid var(--ink); }
.place-hd h1 { font-size: 24px; flex: 1; }
.ph-ico { font-size: 40px; line-height: 1; }
.back { flex: none; border: 3px solid var(--ink); background: #fff; border-radius: 99px; padding: 6px 12px; font-weight: 900; font-size: 14px; box-shadow: 0 3px 0 var(--ink); }
.pad > .back { margin-bottom: 10px; }
.sale-tag { position: absolute; right: 12px; bottom: -14px; background: var(--red); color: #fff; font-family: var(--display); font-size: 14px; border: 3px solid var(--ink); border-radius: 99px; padding: 2px 10px; transform: rotate(-4deg); }
.npc { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0 14px; }
.npc-face { flex: none; width: 60px; height: 60px; display: grid; place-items: center; font-size: 38px; background: #fff; border: 4px solid var(--ink); border-radius: 50%; box-shadow: 0 4px 0 var(--ink); }
.npc-talk { position: relative; flex: 1; background: #fff; border: 4px solid var(--ink); border-radius: 18px; padding: 8px 12px; box-shadow: 0 4px 0 var(--ink); }
.npc-talk::before { content: ""; position: absolute; left: -12px; top: 18px; width: 16px; height: 16px; background: #fff; border-left: 4px solid var(--ink); border-bottom: 4px solid var(--ink); transform: rotate(45deg); }
.npc-talk b { font-family: var(--display); font-weight: 400; font-size: 16px; }
.npc-role { margin-left: 6px; font-size: 12px; color: var(--ink-soft); font-weight: 900; }
.npc-talk p { margin: 3px 0 0; font-size: 15px; line-height: 1.3; }
.tabs { display: flex; gap: 6px; margin: 6px 0 14px; flex-wrap: wrap; }
.tabs.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
.tab { flex: none; border: 3px solid var(--ink); border-radius: 99px; background: #fff; padding: 6px 13px; font-weight: 900; font-size: 14px; }
.tab.on { background: var(--pink); box-shadow: 0 3px 0 var(--ink); }
.deal { background: #fff3c4; border: 3px dashed var(--ink); border-radius: 14px; padding: 8px 12px; font-size: 14px; margin-bottom: 10px; }
.shop-grid, .bag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.si-card, .bag-it { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 12px 8px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); }
.bag-it { padding: 10px 6px; font: inherit; }
.bag-it[disabled] { opacity: .4; }
.si-card.owned { background: #f3fff0; }
.si-card.boxcard { background: linear-gradient(160deg, #fff 40%, var(--bc)); }
.si-card.boxcard .ii.big { animation: wiggle 2s ease-in-out infinite; }
.si-art { height: 66px; display: grid; place-items: center; }
.si-n { font-size: 15px; line-height: 1.15; }
.si-d, .bd { font-size: 12px; color: var(--ink-soft); font-weight: 800; line-height: 1.25; flex: 1; }
.si-have { font-size: 12px; font-weight: 900; color: var(--slime-dark); }
.si-own { font-weight: 900; color: var(--slime-dark); padding: 8px; }
.si-card .btn, .bag-it .btn { width: 100%; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.slot { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 34px; border: 3px dashed var(--ink); border-radius: 16px; background: #fff; }
.slot small { font-size: 10px; font-weight: 900; color: var(--ink-soft); }

.adopt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.ad-card { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 10px 8px 12px; background: #fff; border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink), inset 0 0 0 4px var(--tc); }
.ad-card small { font-size: 12px; color: var(--ink-soft); font-weight: 800; }
.ad-card.sold { opacity: .6; }
.ad-card .btn { width: 100%; }
.room-note { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 8px 12px; font-size: 14px; }
.basket { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; padding: 12px; margin: 16px 0; background: linear-gradient(135deg, #fff, #ffe3f1); }
.basket p { margin: 4px 0 0; font-size: 14px; }
.basket .btn { grid-column: 1 / -1; }
.cta { display: block; width: 100%; text-align: left; padding: 12px 14px; margin: 12px 0; font: inherit; font-size: 15px; }
.cta span { float: right; font-family: var(--display); display: inline-flex; gap: 4px; align-items: center; }

.deed { text-align: center; padding: 18px; }
.perks { text-align: left; list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 6px; }
.perks li { background: #fffbea; border: 3px solid var(--ink); border-radius: 12px; padding: 6px 10px; font-size: 15px; }
.price-big { font-family: var(--display); font-size: 34px; display: flex; gap: 6px; align-items: center; justify-content: center; }
.progress { position: relative; height: 26px; border: 3px solid var(--ink); border-radius: 99px; background: #f1ebff; overflow: hidden; margin: 10px 0; }
.progress i { position: absolute; inset: 0 auto 0 0; background: var(--slime); }
.progress span { position: relative; display: block; text-align: center; font-weight: 900; font-size: 13px; line-height: 20px; }
.farm-field { position: relative; height: 260px; border: 4px solid var(--ink); border-radius: 22px; overflow: hidden; background: radial-gradient(circle at 20% 30%, #b6ec8a 0 30px, transparent 31px), radial-gradient(circle at 80% 70%, #b6ec8a 0 40px, transparent 41px), repeating-linear-gradient(80deg, #8fd85e 0 6px, #7fcd4f 6px 10px); box-shadow: var(--shadow); }
.fg { position: absolute; border: none; background: none; padding: 0; animation: graze 7s ease-in-out infinite; }
.fg .gp { width: 64px; height: auto; }
@keyframes graze { 0%, 100% { transform: translateX(0); } 30% { transform: translateX(14px) translateY(-4px); } 60% { transform: translateX(-10px); } }
.poop { position: absolute; border: none; background: none; font-size: 26px; padding: 4px; z-index: 2; animation: poopIn .4s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes poopIn { from { transform: scale(0); } }
.field-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; font-weight: 900; background: rgba(255,255,255,.6); margin: 0; }
.farm-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.hayrack { padding: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.hayrack small { color: var(--ink-soft); font-weight: 800; font-size: 12px; }
.hayrack .progress { margin: 0; height: 22px; }
.hayrack .progress span { line-height: 16px; }
.plots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.plot { position: relative; aspect-ratio: 1; border: 4px solid var(--ink); border-radius: 18px; background: #a0612f; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; overflow: hidden; box-shadow: 0 5px 0 var(--ink); }
.plot.empty { background: repeating-linear-gradient(0deg, #8a5226 0 8px, #a0612f 8px 16px); }
.plot small { font-weight: 900; font-size: 12px; text-shadow: 0 1px 0 var(--ink); }
.plot .crop { font-size: 40px; transform: scale(var(--s)); transition: transform .5s; }
.plot.ready { background: #7cc04a; animation: lmBob 1s ease-in-out infinite; }
.plot.ready .crop { transform: scale(1.1); }
.plot .pbar { position: absolute; left: 0; bottom: 0; height: 6px; background: var(--yellow); }
.upgrade { padding: 14px; margin-top: 18px; text-align: center; }
.upgrade p { margin: 4px 0 10px; }

.list { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; padding: 8px 10px; }
.row-art { flex: none; }
.row-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.row-txt small { color: var(--ink-soft); font-weight: 800; }
.mini-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 4px; }
.mini-bars i { display: block; height: 8px; border: 2px solid var(--ink); border-radius: 9px; background: linear-gradient(90deg, var(--c) var(--v), #f1ebff var(--v)); }

.mem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mem { display: flex; flex-direction: column; align-items: center; padding: 10px; text-align: center; gap: 4px; background: linear-gradient(#fff, #f6efff); }
.mem small { color: var(--ink-soft); font-weight: 800; font-size: 12px; }
.meadow { background: linear-gradient(#fff0fa, transparent 300px); }

.next-pk { padding: 12px; font-size: 15px; }
.couriers { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cr { background: #fff; border: 3px solid var(--ink); border-radius: 14px; padding: 6px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.cr span { font-size: 30px; } .cr small { font-size: 11px; font-weight: 800; line-height: 1.1; }

.well-stage { display: grid; place-items: center; margin: 10px 0; }
.well { position: relative; width: 190px; height: 150px; border: 5px solid var(--ink); border-radius: 50% 50% 18px 18px / 30% 30% 18px 18px; background: repeating-linear-gradient(0deg, #b8c2cc 0 22px, #9aa6b2 22px 26px); overflow: hidden; box-shadow: var(--shadow); }
.well-water { position: absolute; left: 14px; right: 14px; top: 12px; height: 40px; border-radius: 50%; background: #5fd3ff; border: 4px solid var(--ink); }
.well-face { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); font-size: 52px; }
.well.plop .well-water { animation: plop .9s; }
@keyframes plop { 30% { transform: scale(1.1, .7); background: #bfefff; } 60% { transform: scale(.95, 1.2); } }
.bets { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.wish-out { min-height: 60px; text-align: center; font-size: 17px; margin-top: 14px; }
.wish-out.pop { animation: rwIn .4s cubic-bezier(.3,1.6,.5,1); }
.wheel-wrap { position: relative; width: min(320px, 86vw); margin: 10px auto 18px; }
.wheel { display: block; width: 100%; height: auto; filter: drop-shadow(0 6px 0 rgba(43,22,64,.25)); }
.pointer { position: absolute; left: 50%; top: -14px; transform: translateX(-50%); z-index: 2; font-size: 34px; color: var(--red); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; }
.wheel-tile { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px; text-align: left; position: relative; margin-bottom: 12px; font: inherit; background: linear-gradient(135deg, #fff, #fff3c4); }
.wheel-tile small { display: block; color: var(--ink-soft); }
.wheel-tile .badge { top: 10px; right: 10px; }

.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.game-tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px 12px; background: #fff; border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); font: inherit; }
.game-tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.gt-ico { font-size: 46px; line-height: 1.1; animation: lmBob 2.4s ease-in-out infinite; }
.game-tile b { font-family: var(--display); font-weight: 400; font-size: 17px; }
.game-tile small { font-size: 12px; color: var(--ink-soft); font-weight: 800; line-height: 1.25; }
.gt-kind { font-size: 11px; font-weight: 900; border: 2px solid var(--ink); border-radius: 99px; padding: 1px 8px; background: var(--sky); }
.gt-kind.luck { background: var(--pink); }
.gt-best { font-size: 11px; font-weight: 900; color: var(--slime-dark); }

/* ---------- pets ---------- */
.pet-list { display: grid; gap: 10px; }
.pet-card { display: flex; gap: 10px; align-items: center; padding: 8px 12px; text-align: left; font: inherit; box-shadow: 0 6px 0 var(--ink), inset 6px 0 0 var(--tc); }
.pc-art { flex: none; }
.pc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.pc-txt b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.pc-txt small { color: var(--ink-soft); font-weight: 800; font-size: 13px; }
.pc-txt .mini-bars { width: 100%; }
.pc-status { font-size: 12px; font-weight: 900; color: var(--pink-deep); }
.pet-hero { text-align: center; padding: 10px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: radial-gradient(circle at 50% 35%, #fff 30%, color-mix(in srgb, var(--tc) 25%, #fff)); }
.ph-art { border: none; background: none; padding: 0; }
.pet-hero h1 { font-size: 30px; }
.facts { padding: 6px 14px; margin: 14px 0; }
.facts > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 10px; padding: 8px 0; border-bottom: 2px dashed #e1d6f5; }
.facts > div:last-child { border: none; }
.facts span { color: var(--ink-soft); font-weight: 800; font-size: 14px; }
.facts b { font-size: 15px; text-align: right; }
.facts small { width: 100%; text-align: right; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.pet-hero + .facts + .stats { margin: 0; }
.date-stage { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 8px; background: linear-gradient(#fff, #ffe3f1); }
.ds-slot { width: 120px; height: 120px; display: grid; place-items: center; }
.ds-empty { width: 96px; height: 96px; display: grid; place-items: center; border: 4px dashed var(--ink); border-radius: 50%; font-size: 40px; color: var(--ink-soft); }
.ds-heart { font-size: 40px; animation: badgePop 1s ease-in-out infinite; }
.date-stage.dating .ds-slot:first-child { animation: smooch 1s ease-in-out infinite; }
.date-stage.dating .ds-slot:last-child { animation: smooch2 1s ease-in-out infinite; }
@keyframes smooch { 50% { transform: translateX(22px) rotate(8deg); } }
@keyframes smooch2 { 50% { transform: translateX(-22px) rotate(-8deg); } }
.date-row { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.dc { flex: none; width: 110px; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); font: inherit; }
.dc small { font-size: 11px; color: var(--ink-soft); text-align: center; }
.dc.on { background: var(--pink); }
.dc.tired { opacity: .5; }

/* ---------- book ---------- */
.sq-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.sq-cell { position: relative; display: flex; flex-direction: column; align-items: center; padding: 6px 4px; background: #fff; border: 3px solid var(--ink); border-radius: 16px; font: inherit; }
.sq-cell .sq { width: 64px; height: 64px; }
.sq-cell small { font-size: 11px; font-weight: 800; line-height: 1.1; text-align: center; }
.sq-cell.locked { background: #f1ebff; }
.sq.squash { animation: squish .5s cubic-bezier(.3,1.6,.5,1); }
.trophies { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tr { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px 6px; border: 3px solid var(--ink); border-radius: 16px; background: #f1ebff; opacity: .75; }
.tr.got { background: linear-gradient(#fff, #fff3c4); opacity: 1; box-shadow: 0 4px 0 var(--ink); }
.tr span { font-size: 34px; } .tr small { font-size: 12px; color: var(--ink-soft); font-weight: 800; }
.tr em { font-style: normal; font-weight: 900; font-size: 12px; display: flex; gap: 2px; align-items: center; }
.settings { display: grid; gap: 12px; }

/* ---------- lab ---------- */
.order { padding: 10px 12px; font-size: 14px; margin-bottom: 12px; background: #fffbea; }
.order .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); vertical-align: -2px; }
.lab-box { padding: 12px; }
.slime-cv { display: block; width: 100%; height: 280px; touch-action: none; background: radial-gradient(circle at 50% 60%, #f3fff0, #fff 70%); border-radius: 16px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--ink); }
.swatch.on { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--ink); }
.name-row { display: flex; gap: 8px; margin: 14px 0; }
.name-row .text-in { font-size: 17px; }
.jars { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.jar { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px; text-align: center; }
.jar b { font-size: 12px; line-height: 1.1; }
.jar-art { border: none; background: none; padding: 0; }
.jar-art svg { width: 64px; height: 76px; }
.jar .btn { width: 100%; font-size: 12px; padding: 4px; }
.appraise .ap-jar svg { width: 90px; height: 106px; }
.ap-num { font-family: var(--display); font-size: 42px; min-height: 56px; display: flex; gap: 6px; justify-content: center; align-items: center; }
.ap-num .coin-ico { width: 40px; height: 40px; }
.ap-num b { font-weight: 400; }
.ap-num.pop { animation: rwIn .5s cubic-bezier(.3,1.6,.5,1); }

@media (min-width: 700px) {
  .room { height: 460px; }
  .pet-main .gp { width: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ================= v2: home fits one screen, guidance, sheets ================= */
#view.v-home { height: 100dvh; min-height: 0; display: flex; flex-direction: column; overflow-x: hidden; overflow-y: auto; }
.v-home .room { flex: 1 1 0; height: auto; min-height: 230px; }
.v-home .pet-main { bottom: 5%; height: 56%; max-width: 74vw; }
.v-home .pet-main .gp { height: 100%; width: auto; max-width: 74vw; }
.v-home .bubble { top: 50px; font-size: 14px; padding: 6px 12px; }
.v-home .decor { font-size: clamp(36px, 7dvh, 56px); }
.tap-tip { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); z-index: 5; background: var(--yellow); border: 3px solid var(--ink); border-radius: 99px; padding: 2px 12px; font-weight: 900; font-size: 14px; white-space: nowrap; pointer-events: none; animation: float 1.2s ease-in-out infinite; }
.pet-main.nudge .gp { animation: nudge .5s 3; }
@keyframes nudge { 50% { transform: scale(1.08); filter: drop-shadow(0 0 12px #ffd84d); } }
#suggest { flex: none; padding: 10px 12px 0; }
.suggest { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 4px solid var(--ink); border-radius: 18px; background: #fff3c4; box-shadow: 0 4px 0 var(--ink); text-align: left; font-weight: 900; font-size: 15px; line-height: 1.2; }
.suggest.hot { background: #ffe1e6; animation: hotPulse 1.4s ease-in-out infinite; }
@keyframes hotPulse { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 0 5px rgba(255,90,95,.35); } }
.sg-ico { font-size: 26px; flex: none; }
.sg-t { flex: 1; min-width: 0; }
.sg-t small { display: block; font-size: 11px; color: var(--pink-deep); text-transform: uppercase; letter-spacing: .4px; }
.sg-go { flex: none; background: var(--slime); border: 3px solid var(--ink); border-radius: 12px; padding: 4px 10px; font-family: var(--display); font-weight: 400; font-size: 15px; }
.stats.mini { flex: none; margin: 10px 12px 0; padding: 8px 12px; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.stats.mini .stat { grid-template-columns: 22px 1fr; grid-template-areas: "i l" "i b"; row-gap: 1px; }
.stats.mini .stat .si { grid-area: i; font-size: 18px; }
.stats.mini .stat .sb { grid-area: b; height: 12px; border-width: 2.5px; }
.stats.mini .stat .sl { grid-area: l; font-size: 12px; line-height: 1.1; }
.v-home .actions { flex: none; padding: 10px 12px 6px; width: 100%; }
.act { position: relative; min-width: 0; }
.act .badge { top: -8px; right: -6px; }
.act.need { background: #fff3c4; animation: hotPulse 1.4s ease-in-out infinite; }
.sheet { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-bottom)); z-index: 25; background: var(--card); border-top: 4px solid var(--ink); border-radius: 22px 22px 0 0; box-shadow: 0 -6px 0 rgba(43,22,64,.15); padding: 8px 12px 4px; animation: sheetUp .25s cubic-bezier(.3,1.3,.5,1); max-width: 640px; margin: 0 auto; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sheet-hd b { font-family: var(--display); font-weight: 400; font-size: 19px; }
.sheet-hd .muted { flex: 1; font-size: 13px; }
.sheet-x { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--ink); background: #fff; font-weight: 900; flex: none; }
.sheet .tray-in { padding: 6px 2px 10px; }
.qgo { flex: none; }
.q .qt small { display: flex; gap: 3px; align-items: center; }
.q .qt small .coin-ico { width: 14px; height: 14px; }
.empty { text-align: center; padding: 18px 14px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.empty b { font-family: var(--display); font-weight: 400; font-size: 20px; }
.empty p { margin: 0; color: var(--ink-soft); }
.bag-it { cursor: pointer; }
.bag-it .btn { pointer-events: none; margin-top: 4px; }
.sheet-art { display: grid; place-items: center; transform: scale(1.6); height: 90px; }
.text-wrap-fix, .npc-talk p, .si-d, .mtext { overflow-wrap: anywhere; }

/* ---- v2b: small-phone polish ---- */
.stats.mini { grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 7px 10px; }
.stats.mini .stat { grid-template-columns: 1fr; grid-template-areas: "i" "b"; justify-items: center; row-gap: 2px; }
.stats.mini .stat .si { font-size: 17px; line-height: 1; }
.stats.mini .stat .sb { width: 100%; }
.stats.mini .stat .sl { display: none; }
.v-home .pet-main { height: min(58%, calc(95% - 96px)); }
.pal-n { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pet-name { max-width: calc(100% - 20px); }
.pet-name > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.modal-x { z-index: 3; }
.sheet-art { position: relative; z-index: 1; margin-top: 18px; }
.farm-field .fg { z-index: 1; }
@media (max-width: 380px) {
  :root { --top-h: 58px; }
  #top { gap: 6px; padding-left: 8px; padding-right: 8px; }
  .tb-event .em { display: none; }
  .tb-event { padding: 0 8px; font-size: 12px; }
  .coin-pill { font-size: 16px; padding: 0 9px 0 6px; }
  .coin-pill .coin-ico { width: 20px; height: 20px; }
  .tb-level, .tb-back { width: 42px; height: 42px; }
  .tb-quest { width: 40px; }
  .act { font-size: 12px; padding: 6px 2px; border-radius: 16px; }
  .act span { font-size: 23px; }
  .actions { gap: 6px; }
  .suggest { font-size: 14px; }
}
.farm-field { height: auto; }
.poop { padding: 2px; font-size: 24px; line-height: 1; }
.poop-more { position: absolute; right: 8px; bottom: 6px; background: #fff; border: 2px solid var(--ink); border-radius: 99px; padding: 0 8px; font-size: 12px; font-weight: 900; }
.pal { z-index: 4; }
.slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.slot small { text-align: center; line-height: 1.1; }
@media (max-width: 380px) {
  .lm-name { white-space: normal; max-width: 96px; text-align: center; font-size: 11px; line-height: 1.15; padding: 1px 7px; }
  .lm-ico { width: 50px; height: 50px; font-size: 29px; }
}
/* games live in their own sealed box under the top bar */
.stage { isolation: isolate; contain: layout paint; }
.game-root { position: absolute; inset: 0; overflow: hidden; }
.pick-list { display: grid; gap: 8px; margin-top: 8px; }
.pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border: 3px solid var(--ink); border-radius: 16px; background: #fff; box-shadow: 0 4px 0 var(--ink); font: inherit; }
.pick > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick b { font-size: 15px; }
.pick small { color: var(--ink-soft); font-weight: 800; font-size: 12px; line-height: 1.25; }
.pk-r { flex: none; font-weight: 900; display: flex; align-items: center; gap: 2px; }
.shop-grid, .bag-grid, .adopt-grid, .game-grid, .trophies, .mem-grid { grid-template-columns: repeat(auto-fill, minmax(min(140px, calc(50% - 6px)), 1fr)); }
.ticker { position: relative; top: 0; }

/* ================= v3: living guinea ================= */
.v-home .pet-main { transform: translateX(calc(-50% + var(--wx, 0px))); transition: transform var(--wt, .5s) ease-in-out; touch-action: none; }
.props { position: absolute; inset: 0; pointer-events: none; z-index: 7; }
.prop { position: absolute; left: 0; top: 0; line-height: 1; will-change: transform; filter: drop-shadow(0 3px 0 rgba(43,22,64,.18)); transition: transform .12s ease-out, opacity .3s; }
.prop .ii { width: var(--ps); height: var(--ps); font-size: var(--ps); }
.prop .ii.art svg { width: 100%; height: 100%; }
.prop.hand { z-index: 2; filter: drop-shadow(0 4px 0 rgba(43,22,64,.25)); transition: none; }
.pball { display: block; width: 1em; height: 1em; border-radius: 50%; border: 3px solid var(--ink); background: radial-gradient(circle at 35% 30%, #fff 0 18%, var(--bc, #f2f2f2) 19%); }
.stick { display: block; width: 1.5em; height: .38em; border-radius: 8px; border: 3px solid var(--ink); background: repeating-linear-gradient(90deg, #c98a55 0 8px, #b5763f 8px 11px); }
.suds { display: block; width: 1em; height: 1em; border-radius: 50%; border: 2px solid rgba(43,22,64,.3); background: radial-gradient(circle at 32% 30%, #fff 0 22%, #eefaff 40%, #cdeeff 100%); }
.aura { display: block; width: 1em; height: 1em; border-radius: 50%; border: 4px solid #7be04a; box-shadow: 0 0 18px #fff3a8, inset 0 0 10px #fff3a8; }
.gp .tongue { display: none; }
.gp .ear, .gp .nose, .gp .whisk, .gp .foot, .gp .cheek, .gp .mouth-open, .gp .tongue { transform-box: fill-box; transform-origin: center; }
.gp .ear-l { transform-origin: 85% 85%; } .gp .ear-r { transform-origin: 15% 85%; }
.gp .eyes-n, .gp .eyes-sad { transition: transform .25s; }
.gp.blink .eyes-n, .gp.blink .eyes-h, .gp.blink .eyes-sad, .gp.blink .eyes-o { display: none !important; }
.gp.blink .eyes-s { display: inline !important; }
.gp.look-l .eyes-n, .gp.look-l .eyes-sad { transform: translateX(-6px); }
.gp.look-r .eyes-n, .gp.look-r .eyes-sad { transform: translateX(6px); }
.gp.happy-eyes .eyes-n, .gp.petting .eyes-n, .gp.happy-eyes .eyes-sad, .gp.petting .eyes-sad { display: none; }
.gp.happy-eyes .eyes-h, .gp.petting .eyes-h { display: inline; }
.gp.napping .eyes-n, .gp.napping .eyes-h, .gp.napping .eyes-sad { display: none; }
.gp.napping .eyes-s { display: inline; }
.gp.napping .body { animation: nap 2.4s ease-in-out infinite !important; }
@keyframes nap { 50% { transform: scale(1.04, .95) translateY(3px); } }
.gp.earwiggle .ear-l { animation: earL .18s 4 alternate; } .gp.earwiggle .ear-r { animation: earR .18s 4 alternate .09s; }
@keyframes earL { to { transform: rotate(-16deg); } } @keyframes earR { to { transform: rotate(16deg); } }
.gp.petting .ear-l { transform: rotate(14deg); } .gp.petting .ear-r { transform: rotate(-14deg); }
.gp.sniff .nose { animation: sniffN .11s 8 alternate; } .gp.sniff .whisk { animation: whisk .11s 8 alternate; }
@keyframes sniffN { to { transform: scale(1.2, .85) translateY(-1px); } } @keyframes whisk { to { transform: rotate(3deg) translateY(-1px); } }
.gp.walking .body { animation: walkbob .24s ease-in-out infinite alternate !important; }
.gp.walking .foot-l { animation: step .24s infinite alternate; } .gp.walking .foot-r { animation: step .24s infinite alternate-reverse; }
@keyframes walkbob { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-6px) rotate(2deg); } }
@keyframes step { to { transform: translateY(-5px); } }
.gp.popcorn .body { animation: popcorn .65s cubic-bezier(.3,1.2,.5,1) !important; }
@keyframes popcorn { 0% { transform: scale(1.12, .85); } 35% { transform: translateY(-58px) rotate(18deg) scale(.95, 1.08); } 55% { transform: translateY(-62px) rotate(-12deg); } 85% { transform: translateY(0) scale(1.15, .82); } 100% { transform: none; } }
.gp.yawn .eyes-n, .gp.yawn .eyes-h, .gp.yawn .mouth { display: none; }
.gp.yawn .eyes-s { display: inline; }
.gp.yawn .mouth-open { display: inline; animation: yawnM 1.2s ease-in-out; }
@keyframes yawnM { 0% { transform: scale(.4); } 40%, 70% { transform: scale(1.5, 2.2) translateY(2px); } 100% { transform: scale(.4); } }
.gp.yawn .body { animation: yawnB 1.2s ease-in-out !important; }
@keyframes yawnB { 40%, 70% { transform: scale(.97, 1.05); } }
.gp.chew .cheek { animation: cheekPuff .2s infinite alternate; }
@keyframes cheekPuff { to { transform: scale(1.35); } }
.gp.stuffed .cheek { animation: none; transform: scale(1.9); opacity: .9; }
.gp.stuffed .body { animation: stuffed .7s ease-in-out !important; }
@keyframes stuffed { 30% { transform: scale(1.12, .94); } 60% { transform: scale(1.08, .97); } }
.gp.chomp .body { animation: chompNod .18s !important; }
@keyframes chompNod { 50% { transform: translateY(4px) scale(1.03, .96); } }
.gp.lick .tongue { display: inline; animation: lick .55s ease-in-out; }
@keyframes lick { 0% { transform: scaleY(.2); } 40% { transform: scaleY(1.2) translateX(-3px); } 70% { transform: scaleY(1) translateX(3px); } 100% { transform: scaleY(.2); } }
.gp.petting .body { animation: none !important; transform: rotate(var(--tilt, 0deg)) scale(1.03, .97); transition: transform .15s; }
.gp.melt .body { animation: none !important; transform: rotate(var(--tilt, 0deg)) scale(1.14, .84) translateY(6px); }
.gp.shakedry .body { animation: shakedry .09s 9 alternate !important; }
@keyframes shakedry { from { transform: rotate(-13deg); } to { transform: rotate(13deg); } }
.gp.giggle .body { animation: giggleB .11s infinite alternate !important; }
@keyframes giggleB { from { transform: translateX(-3px) rotate(-3deg); } to { transform: translateX(3px) rotate(3deg) scale(1.02, .98); } }
.gp.gulp .body { animation: gulpB .45s !important; }
@keyframes gulpB { 40% { transform: scale(.94, 1.08); } 70% { transform: scale(1.06, .95); } }
.gp.groom .body { animation: groomB .9s ease-in-out !important; }
.gp.groom .eyes-n { display: none; } .gp.groom .eyes-s { display: inline; }
@keyframes groomB { 20% { transform: rotate(-9deg) translateX(-4px); } 45% { transform: rotate(9deg) translateX(4px); } 70% { transform: rotate(-6deg); } }
.tap-tip { font-size: 13px; }
.slime-cv { touch-action: pan-y; }
.v-home .pet-main, .v-home .pet-main .gp { max-width: 62vw; }
