/* screens.css — the look of every screen: yard, top bar, menus, shop, friends, feeding… */

.hidden { display: none !important; }
.center { text-align: center; }
.small { font-size: 14px; font-weight: 700; opacity: .8; }
.row-center { display: flex; gap: 10px; justify-content: center; align-items: center; margin: 8px 0; }
.row-center.wrap { flex-wrap: wrap; }
.tag { display: inline-block; font-size: 12px; font-weight: 800; background: #FFE9B8; border: 2px solid var(--outline); border-radius: 10px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }
.tag.big { font-size: 14px; padding: 4px 10px; }
.link-btn { background: none; border: none; color: #9A8670; text-decoration: underline; font-weight: 700; cursor: pointer; font-size: 13px; display: block; margin: 6px auto 0; }
.text-input { width: 100%; font-family: var(--font-title); font-size: 22px; padding: 10px 14px; border: 3px solid var(--outline); border-radius: 16px; background: #fff; color: var(--brown); outline: none; -webkit-user-select: text; user-select: text; }
.text-input:focus { box-shadow: 0 0 0 4px rgba(255, 140, 66, .35); }
.shake { animation: shake .45s; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
.bounce { animation: bounceY .35s; }
@keyframes bounceY { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px) scale(1.03, .97); } }
.pulse { animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 140, 66, .6); } 50% { transform: scale(1.08); box-shadow: 0 0 0 14px rgba(255, 140, 66, 0); } }

/* ── The yard ───────────────────────────────────────────────────────────────── */
#app { position: fixed; inset: 0; overflow: hidden; }
#ui-layer { position: fixed; inset: 0; pointer-events: none; z-index: 100; }
#ui-layer > * { pointer-events: auto; }
#ui-layer > .hud { pointer-events: none; }   /* only the buttons in the top bar take taps */
.yard { position: absolute; inset: 0; overflow: hidden; touch-action: none; background: #7EC850; cursor: grab; }
.yard:active { cursor: grabbing; }
.yard-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; overflow: visible; }
.yard .obj { cursor: pointer; }
.yard.decorating .obj.item { cursor: move; }
.yard.decorating .obj.item:hover { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .9)); }
.yard .obj.item.selected { filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 10px rgba(255, 220, 90, 1)); }
.yard .obj.item.kicked > g { animation: kickBounce .7s ease-out; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes kickBounce { 0% { transform: translate(0, 0); } 30% { transform: translate(18px, -40px) rotate(20deg); } 60% { transform: translate(30px, 0) rotate(40deg); } 80% { transform: translate(36px, -10px); } 100% { transform: translate(0, 0); } }
/* Lucky Clover Boing: patted down, then it springs back up with a wobble */
.yard .obj.item.patted .it-boing { animation: patBoing .7s ease-out; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes patBoing { 0% { transform: scaleY(1); } 20% { transform: scaleY(.45); } 45% { transform: scaleY(1.2); } 65% { transform: scaleY(.9) rotate(-6deg); } 82% { transform: scaleY(1.05) rotate(4deg); } 100% { transform: scaleY(1); } }
.pan-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 44px; height: 70px; border-radius: 20px; border: 3px solid var(--outline); background: rgba(255, 248, 231, .85); font-size: 36px; font-weight: 900; color: var(--brown); cursor: pointer; line-height: 1; }
.pan-btn.left { left: 8px; } .pan-btn.right { right: 8px; }
@media (pointer: coarse) { .pan-btn { width: 36px; height: 56px; font-size: 28px; opacity: .8; } }
.weather { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
/* Inside the cabin: the living room covers the yard */
.house-view { position: absolute; inset: 0; z-index: 6; background: #FFFDF6; cursor: default; animation: fadeIn .25s ease-out; }
.house-room { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; touch-action: none; }
.house-out { position: absolute; left: 12px; top: calc(76px + env(safe-area-inset-top)); z-index: 2; }
.house-view { overflow: hidden; touch-action: none; overscroll-behavior: none; }
/* The rooms stand side by side; screens/house.js slides the strip to show one room at a time */
.house-strip { position: absolute; inset: 0; transition: transform .45s ease-in-out; }
/* Room icons at the bottom: the room you're in is big and bright, the others are small and faded */
.house-dots { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2; display: flex; gap: 8px; align-items: center; background: rgba(255, 253, 246, .85); border: 3px solid var(--outline); border-radius: 20px; padding: 4px 12px; pointer-events: none; }
.house-dot { font-size: 18px; opacity: .45; transition: transform .25s, opacity .25s; }
.house-dot.here { opacity: 1; transform: scale(1.35); }
/* Editing inside the house: a hint and a Done button at the top, and things you can grab */
.house-edit-bar { position: absolute; left: 0; right: 0; top: calc(76px + env(safe-area-inset-top)); z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.house-edit-bar > * { pointer-events: auto; }
.house-edit-tools { display: flex; gap: 8px; }
.house-edit-tools.hidden { display: none; }
.house-edit-hint { background: #FFF3D6; border: 3px solid #4A3022; border-radius: 14px; padding: 4px 14px; font-family: Nunito, sans-serif; font-weight: 700; color: #4A3022; }
.house-view.editing .house-home [data-home] { cursor: grab; filter: drop-shadow(0 0 6px rgba(255, 220, 90, .8)); }
.house-view.editing .house-home [data-home].selected { cursor: grabbing; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 10px rgba(255, 220, 90, 1)); }
.house-view.editing .house-items [data-uid] { cursor: grab; filter: drop-shadow(0 0 6px rgba(255, 220, 90, .8)); }
.house-view.editing .house-items [data-uid].selected { cursor: grabbing; filter: drop-shadow(0 0 0 #fff) drop-shadow(0 0 10px rgba(255, 220, 90, 1)); }
.flake { position: absolute; top: -30px; will-change: transform; }
.flake.fall { animation: flakeFall linear infinite; }
.flake.flutter { animation: flutter ease-in-out infinite; top: 40%; }
@keyframes flakeFall { 0% { transform: translate(0, -20px) rotate(0); opacity: 0; } 8% { opacity: 1; } 50% { transform: translate(30px, 50vh) rotate(180deg); } 92% { opacity: .9; } 100% { transform: translate(-10px, 105vh) rotate(360deg); opacity: 0; } }
@keyframes flutter { 0% { transform: translate(-10vw, 0) scaleX(1); opacity: 0; } 10% { opacity: 1; } 25% { transform: translate(20vw, -8vh) scaleX(.6); } 50% { transform: translate(50vw, 4vh) scaleX(1); } 75% { transform: translate(80vw, -6vh) scaleX(.6); } 90% { opacity: 1; } 100% { transform: translate(110vw, 0); opacity: 0; } }

/* sky & scene animations */
.twinkle { animation: twinkle 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes twinkle { 0%, 100% { opacity: .95; transform: scale(1); } 50% { opacity: .3; transform: scale(.7); } }
.sun-rays { animation: spin 40s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }
.cloud-drift { animation: drift 160s linear infinite; }
.cloud-drift.slow { animation-duration: 260s; }
@keyframes drift { 0% { transform: translateX(-120px); } 50% { transform: translateX(160px); } 100% { transform: translateX(-120px); } }
.smoke circle { animation: smoke 4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes smoke { 0% { transform: translate(0, 20px) scale(.5); opacity: 0; } 30% { opacity: .8; } 100% { transform: translate(14px, -40px) scale(1.3); opacity: 0; } }
.grass-sway { animation: sway 3s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(5deg); } }
.tree-sway { animation: treeSway 6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes treeSway { 0%, 100% { transform: rotate(-.8deg); } 50% { transform: rotate(.8deg); } }
#lights { mix-blend-mode: screen; }
.light-flicker { animation: flicker 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes flicker { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.firefly { animation: firefly 9s ease-in-out infinite; transform: translate(var(--fx), var(--fy)); }
@keyframes firefly { 0% { transform: translate(var(--fx), var(--fy)); opacity: 0; } 20% { opacity: 1; } 50% { transform: translate(calc(var(--fx) + 60px), calc(var(--fy) - 50px)); opacity: .3; } 80% { opacity: 1; } 100% { transform: translate(var(--fx), var(--fy)); opacity: 0; } }
.gift-bob { animation: giftBob 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes giftBob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.gift-spark { animation: twinkle 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.pop-in-svg { animation: popInSvg .45s cubic-bezier(.2, 1.5, .4, 1) both; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes popInSvg { 0% { scale: .2; } 100% { scale: 1; } }
.fx-rise { font-size: 34px; font-family: var(--font-title); animation: fxRise 1.3s ease-out forwards; }
.fx-heart { fill: #FF4F7B; stroke: #4A3022; stroke-width: 1.5px; paint-order: stroke; }
@keyframes fxRise { 0% { transform: translateY(0) scale(.5); opacity: 0; } 20% { opacity: 1; transform: translateY(-20px) scale(1.1); } 100% { transform: translateY(-110px) scale(.9); opacity: 0; } }
.emote-pop { animation: popInSvg .3s ease-out both; transform-box: fill-box; transform-origin: 50% 100%; }

/* capybara animations (the SVG parts have class names from art/capy.js) */
.capy-svg .capy-eye { animation: blink 5s infinite; transform-box: fill-box; transform-origin: center; }
@keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.capy-svg .capy-torso { animation: breathe 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.03); } }
.capy-svg .capy-ear { animation: earTwitch 7s infinite; transform-box: fill-box; transform-origin: 70% 90%; }
@keyframes earTwitch { 0%, 90%, 100% { transform: rotate(0); } 93% { transform: rotate(-18deg); } 96% { transform: rotate(6deg); } }
.capy-svg.walking .capy-leg { animation: legSwing .48s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 12%; }
.capy-svg.walking .leg-bn, .capy-svg.walking .leg-ff { animation-direction: alternate-reverse; }
@keyframes legSwing { from { transform: rotate(-20deg); } to { transform: rotate(20deg); } }
.capy-svg.eating .capy-head { animation: munch .42s ease-in-out infinite alternate; transform-box: view-box; transform-origin: 158px 96px; }
@keyframes munch { from { transform: rotate(14deg); } to { transform: rotate(22deg); } }
.capy-svg .capy-zzz { animation: zzz 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 0 100%; }
@keyframes zzz { 0% { transform: translate(0, 6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(10px, -14px); opacity: 0; } }
.capy-svg .capy-horn { animation: hornGlow 2.4s ease-in-out infinite; }
@keyframes hornGlow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 220, 80, 0)); } 50% { filter: drop-shadow(0 0 6px rgba(255, 220, 80, .9)); } }
body.calm *, body.calm *::before { animation-duration: 0s !important; animation-iteration-count: 1 !important; }
body.calm .mg-layer * { animation-duration: initial !important; }

/* ── Top bar (HUD) ──────────────────────────────────────────────────────────── */
.hud { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: calc(8px + env(safe-area-inset-top)) 10px 8px; pointer-events: none; transition: transform .25s, opacity .25s; }
.hud > * { pointer-events: auto; }
.hud-hidden { transform: translateY(-140%); opacity: 0; pointer-events: none !important; }
.hud-hidden * { pointer-events: none !important; }
.hud-menu { display: flex; flex-direction: column; align-items: center; background: var(--cream); border: 3px solid var(--outline); border-radius: 20px; padding: 2px 8px 3px; cursor: pointer; box-shadow: 0 4px 0 rgba(74, 48, 34, .4); }
.hud-menu:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(74, 48, 34, .4); }
.hud-menu-face { display: block; height: 40px; overflow: hidden; margin-top: -2px; }
.hud-menu-face svg { margin-top: -4px; }
.hud-menu-label { font-family: var(--font-title); font-size: 14px; font-weight: 700; line-height: 1; margin-top: -1px; }
.hud-counters { display: flex; gap: 6px; flex-wrap: wrap; }
.hud-pill { display: flex; align-items: center; gap: 4px; background: rgba(255, 248, 231, .96); border: 3px solid var(--outline); border-radius: 18px; padding: 3px 10px 3px 5px; font-family: var(--font-title); font-size: 19px; color: var(--brown); cursor: pointer; box-shadow: 0 3px 0 rgba(74, 48, 34, .35); }
.hud-pill b { font-weight: 700; min-width: 18px; text-align: left; }
.hud-pill.bump, .panel-head.bump { animation: bump .35s; }
@keyframes bump { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.18); } }
.hud-level { position: relative; width: 50px; height: 50px; margin-left: auto; filter: drop-shadow(0 3px 0 rgba(74, 48, 34, .35)); }
.hud-level svg { display: block; }
.hud-level-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-title); font-weight: 700; font-size: 18px; line-height: .9; }
.hud-level-num small { font-size: 9px; opacity: .7; }
.hud-gift { position: relative; background: none; border: none; cursor: pointer; padding: 0; animation: giftBob 1.4s ease-in-out infinite; filter: drop-shadow(0 3px 0 rgba(74, 48, 34, .3)); }
.hud-gift .dot, .menu-badge { position: absolute; top: 0; right: 0; width: 14px; height: 14px; border-radius: 50%; background: #F04848; border: 2px solid #fff; }
.quick { position: absolute; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); display: flex; gap: 10px; align-items: flex-end; transition: transform .25s, opacity .25s; }
.quick-btn { display: flex; flex-direction: column; align-items: center; gap: 0; background: var(--cream); border: 3px solid var(--outline); border-radius: 22px; padding: 6px 10px 4px; cursor: pointer; box-shadow: 0 5px 0 rgba(74, 48, 34, .4); font-family: var(--font-title); font-weight: 700; font-size: 14px; color: var(--brown); min-width: 72px; }
.quick-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(74, 48, 34, .4); }
.quick-btn.feed { background: #FFE2C4; padding: 8px 14px 5px; }
.quick-btn.deco { position: absolute; left: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); transition: transform .25s, opacity .25s; }
.quick.hud-hidden, .quick-btn.deco.hud-hidden { transform: translateY(160%); opacity: 0; }
.deco-bar { position: absolute; top: calc(10px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 6; display: flex; gap: 12px; align-items: center; background: var(--cream); border: 3px solid var(--outline); border-radius: 18px; padding: 8px 10px 8px 16px; font-weight: 800; box-shadow: 0 4px 0 rgba(74, 48, 34, .35); max-width: calc(100% - 20px); }
.item-toolbar { position: absolute; z-index: 7; transform: translate(-50%, -100%); display: flex; gap: 6px; background: var(--cream); border: 3px solid var(--outline); border-radius: 16px; padding: 6px; box-shadow: 0 4px 0 rgba(74, 48, 34, .35); }

/* capybara card */
.capy-card { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 8; display: flex; gap: 12px; align-items: center; background: var(--cream); border: 4px solid var(--outline); border-radius: 24px; padding: 10px 14px; box-shadow: 0 6px 0 rgba(74, 48, 34, .35); width: min(460px, calc(100% - 20px)); animation: slideUp .25s ease-out; }
.card-portrait { flex: 0 0 auto; }
.card-info { flex: 1; min-width: 0; }
.card-name { font-family: var(--font-title); font-size: 22px; font-weight: 700; }
.card-meters { display: grid; gap: 3px; margin: 4px 0 6px; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.meter { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; }
.meter-label { width: 64px; }
.meter-bar { flex: 1; height: 12px; background: #EADCC2; border: 2px solid var(--outline); border-radius: 8px; overflow: hidden; }
.meter-fill { display: block; height: 100%; border-radius: 6px; transition: width .4s; }
.hearts-row { display: flex; gap: 1px; flex-wrap: wrap; margin: 3px 0; }

/* ── Panels ────────────────────────────────────────────────────────────────── */
.panel-back { position: fixed; inset: 0; z-index: 200; background: rgba(40, 26, 14, .42); display: flex; align-items: center; justify-content: center; padding: calc(10px + env(safe-area-inset-top)) 10px calc(10px + env(safe-area-inset-bottom)); animation: fadeIn .18s ease-out; }
.panel-back.closing { animation: fadeOut .18s ease-in forwards; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
.panel-card { width: min(440px, 100%); max-height: 100%; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.panel-card.wide { width: min(860px, 100%); }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px 16px; background: #FFE9B8; border-bottom: 3px solid var(--outline); }
.panel-icon { display: flex; }
.panel-title { font-family: var(--font-title); font-size: 26px; font-weight: 700; flex: 1; }
.panel-x { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--outline); background: #FF8A7A; color: #fff; font-size: 20px; font-weight: 900; cursor: pointer; box-shadow: 0 3px 0 #B8382C; flex: 0 0 auto; }
.panel-x:active { transform: translateY(2px); box-shadow: 0 1px 0 #B8382C; }
.panel-body { padding: 14px 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.panel-card.dialog .panel-head, .panel-card.celebrate .panel-head, .panel-card.bonus-panel .panel-head, .panel-card.rescue-panel .panel-head { background: transparent; border-bottom: none; padding-bottom: 0; }
.dialog-text { font-size: 19px; font-weight: 800; text-align: center; margin: 0 0 10px; }
.celebrate .panel-body { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.celebrate-title { font-family: var(--font-title); font-size: 30px; font-weight: 700; color: var(--carrot); -webkit-text-stroke: 2px var(--outline); paint-order: stroke fill; }
.celebrate-text { font-weight: 700; margin: 0 0 8px; max-width: 340px; }
.celebrate-art { position: relative; animation: bounceY 1s ease-in-out infinite; }
.level-badge { position: absolute; top: -6px; right: -18px; width: 56px; height: 56px; border-radius: 50%; background: var(--gold); border: 4px solid var(--outline); font-family: var(--font-title); font-size: 28px; font-weight: 700; display: flex; align-items: center; justify-content: center; z-index: 2; }

/* menu (3 × 3, like the drawing) */
.menu-panel { width: min(420px, 100%); }
.menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 4px; }
.menu-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 3px solid var(--outline); border-radius: 22px; padding: 10px 4px 8px; cursor: pointer; box-shadow: 0 5px 0 #D9C7A6; font-family: var(--font-title); font-weight: 700; font-size: 16px; color: var(--brown); transition: transform .1s; }
.menu-tile:hover { transform: translateY(-2px) rotate(-1deg); }
.menu-tile:active { transform: translateY(4px); box-shadow: 0 1px 0 #D9C7A6; }
.menu-icon svg { display: block; }
.menu-studio { display: flex; align-items: center; gap: 12px; margin: 16px 4px 4px; padding: 10px 14px; border: 3px solid var(--outline); border-radius: 20px; background: linear-gradient(135deg, #203457, #3B5B95); color: #fff; text-decoration: none; box-shadow: 0 5px 0 #14223A; }
.menu-studio:active { transform: translateY(4px); box-shadow: 0 1px 0 #14223A; }
.menu-studio-text { display: flex; flex-direction: column; }
.menu-studio-text b { font-family: var(--font-title); font-size: 19px; }
.menu-studio-text small { font-weight: 700; opacity: .85; }
.menu-footer { display: flex; justify-content: center; margin-top: 12px; border-top: 3px dashed #E9D8B8; padding-top: 10px; }

/* tabs */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.tab { display: flex; align-items: center; gap: 5px; border: 3px solid var(--outline); border-radius: 16px; padding: 6px 12px; background: #fff; font-family: var(--font-title); font-weight: 700; font-size: 16px; color: var(--brown); cursor: pointer; box-shadow: 0 3px 0 #D9C7A6; }
.tab.on { background: var(--gold); box-shadow: 0 3px 0 var(--gold-dark); }
.tab.tab-pass { background: linear-gradient(135deg, #F3E8FF, #FFE3F1); }
.tab.tab-pass.on { background: linear-gradient(135deg, #C9A7FF, #FFA8D5); }
.tab span { display: flex; }

/* shop */
.wallet { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.cur-pill { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 3px solid var(--outline); border-radius: 14px; padding: 2px 10px 2px 4px; font-family: var(--font-title); font-size: 17px; }
.cur-pill.big { font-size: 24px; padding: 4px 14px 4px 6px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.shop-card { display: flex; flex-direction: column; align-items: center; gap: 4px; background: #fff; border: 3px solid var(--outline); border-radius: 20px; padding: 10px 8px; text-align: center; box-shadow: 0 4px 0 #D9C7A6; font-family: inherit; color: var(--brown); }
button.shop-card { cursor: pointer; }
button.shop-card:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #D9C7A6; }
.shop-card.is-locked { background: #F4EDE2; }
.shop-card.is-locked .shop-thumb { filter: grayscale(.8) opacity(.6); }
.shop-card.is-owned { background: #EEF9E6; }
.shop-card.house-only-outside { opacity: .45; filter: grayscale(1); }
.shop-thumb { height: 80px; display: flex; align-items: center; justify-content: center; }
.shop-name { font-family: var(--font-title); font-weight: 700; font-size: 16px; line-height: 1.1; }
.shop-desc { font-size: 12px; font-weight: 700; opacity: .75; line-height: 1.25; }
.shop-extra { font-size: 12px; font-weight: 800; color: #8A6A3A; }
.shop-buy { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: auto; }
.price { display: inline-flex; align-items: center; gap: 3px; font-family: var(--font-title); font-size: 17px; }
.price svg { margin-right: 1px; }
.owned { color: #3D7A1C; font-weight: 800; font-size: 14px; }
.locked { display: inline-flex; align-items: center; gap: 4px; color: #8A6A3A; font-weight: 800; font-size: 13px; }
.pass-title { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 2px auto 8px; padding: 6px 22px; border: 3px solid var(--outline); border-radius: 14px; background: #fff; font-family: var(--font-title); font-size: 26px; font-weight: 700; width: fit-content; box-shadow: 0 4px 0 #D9C7A6; }
.pass-spark svg { animation: twinkle 1.6s ease-in-out infinite; }
.pass-pager { display: flex; align-items: center; gap: 8px; }
.pass-grid { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pass-grid .shop-card { background: linear-gradient(180deg, #fff, #FBF3FF); }
.pager-btn { width: 44px; height: 84px; flex: 0 0 auto; border: 3px solid var(--outline); border-radius: 22px; background: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 4px 0 #D9C7A6; color: var(--brown); }
.pager-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 560px) {
  .pass-grid { grid-template-columns: repeat(2, 1fr); }
  .pager-btn { width: 30px; height: 64px; font-size: 16px; }
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

/* my stuff / wardrobe */
.who-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.who { border: 3px solid var(--outline); border-radius: 50%; background: #fff; width: 62px; height: 62px; padding: 0; overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.who.on { background: var(--gold); box-shadow: 0 0 0 4px rgba(255, 201, 60, .5); }
.dress-room { display: grid; grid-template-columns: 240px 1fr; gap: 14px; align-items: start; }
.dress-previews { background: linear-gradient(180deg, #CFEFFF, #E6F8D8); border: 3px solid var(--outline); border-radius: 20px; padding: 8px; text-align: center; }
.dress-preview.side { margin-top: -10px; }
.dress-name { font-family: var(--font-title); font-weight: 700; font-size: 20px; }
.slots { display: grid; gap: 8px; }
.slot-row { background: #fff; border: 3px solid var(--outline); border-radius: 16px; padding: 6px 8px; }
.slot-name { font-family: var(--font-title); font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.slot-list { display: flex; gap: 6px; flex-wrap: wrap; }
.wear-btn { width: 56px; height: 56px; border-radius: 14px; border: 3px solid #D9C7A6; background: #FFFDF6; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 22px; color: #B9A88C; padding: 0; }
.wear-btn.on { border-color: var(--outline); background: #FFE9B8; box-shadow: 0 0 0 3px rgba(255, 201, 60, .5); }
.wear-btn.not-owned { position: relative; opacity: .5; border-style: dashed; }
.wear-btn.not-owned::after { content: '🛒'; position: absolute; right: -6px; bottom: -6px; font-size: 16px; }
.wear-btn.color-dot { width: 40px; height: 40px; border-radius: 50%; }
@media (max-width: 620px) { .dress-room { grid-template-columns: 1fr; } .dress-preview.side { display: none; } }

/* food bowl panel */
.food-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin: 8px 0; }
.mail-list { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; }
.mail-letter { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 3px solid var(--outline); border-radius: 16px; background: #fff; color: var(--brown); }
.mail-icon { flex: none; font-size: 24px; line-height: 0; }
.mail-text { flex: 1; }
.mail-time { flex: none; opacity: .6; }
.food-choice { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px; border: 3px solid var(--outline); border-radius: 16px; background: #fff; cursor: pointer; font-family: inherit; color: var(--brown); }
.food-choice:disabled { opacity: .45; }
.food-dot { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--outline); margin: 2px; }

/* friends */
.friend-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.friend-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; background: #fff; border: 3px solid var(--outline); border-radius: 20px; cursor: pointer; box-shadow: 0 4px 0 #D9C7A6; font-family: inherit; color: var(--brown); }
.friend-card.unmet { background: #EFE7DA; cursor: default; }
.friend-card.home { background: linear-gradient(180deg, #FFF6D8, #fff); }
.friend-tag { position: absolute; top: 6px; left: 8px; font-size: 18px; }
.friend-tag.star { left: auto; right: 8px; }
.friend-name { font-family: var(--font-title); font-weight: 700; font-size: 17px; }
.friend-hint { font-size: 11px; font-weight: 800; opacity: .7; line-height: 1.2; text-align: center; }
.friend-detail { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-top: 10px; }
.friend-detail-art { display: flex; flex-direction: column; align-items: center; background: linear-gradient(180deg, #CFEFFF, #E6F8D8); border: 3px solid var(--outline); border-radius: 20px; padding: 8px; }
.friend-detail-name { font-family: var(--font-title); font-weight: 700; font-size: 28px; }
.kv { font-weight: 700; margin-top: 6px; }
.bio { margin: 6px 0; font-weight: 600; line-height: 1.35; }
.loves { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.love { display: flex; flex-direction: column; align-items: center; background: #fff; border: 3px solid #D9C7A6; border-radius: 14px; padding: 4px 6px; width: 84px; text-align: center; }
.love.has { border-color: #5DA832; background: #EEF9E6; }
.love small { font-size: 11px; font-weight: 800; line-height: 1.1; }
@media (max-width: 620px) { .friend-detail { grid-template-columns: 1fr; } .friend-detail-art { flex-direction: row; justify-content: center; } .friend-detail-art svg { width: 130px; height: auto; } }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.badge { background: #F1EADF; border: 3px solid #D9C7A6; border-radius: 18px; padding: 10px; text-align: center; }
.badge.got { background: #FFF6D8; border-color: var(--outline); }
.badge-emoji { font-size: 34px; }
.badge-name { font-family: var(--font-title); font-weight: 700; font-size: 16px; }
.badge-desc { font-size: 12px; font-weight: 700; opacity: .8; }
.badge-prize { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; font-size: 13px; margin-top: 4px; }

/* feeding */
.feed-panel .panel-body { display: flex; flex-direction: column; gap: 8px; background: linear-gradient(180deg, #DDF3FF 0%, #F6FCEB 55%, #FFF8E7 100%); }
.feed-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; }
.level-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.level-chip { display: flex; flex-direction: column; align-items: center; border: 3px solid #D9C7A6; border-radius: 16px; padding: 4px 10px; background: #fff; cursor: pointer; font-family: var(--font-title); color: var(--brown); line-height: 1.1; }
.level-chip span { font-size: 20px; }
.level-chip b { font-size: 14px; }
.level-chip small { display: flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; }
.level-chip.on { border-color: var(--outline); background: #FFE2C4; box-shadow: 0 0 0 3px rgba(255, 140, 66, .4); }
.streak { font-family: var(--font-title); font-size: 20px; }
.streak small { font-size: 12px; }
.feed-stage { position: relative; display: flex; flex-direction: column; align-items: center; }
.speech { position: relative; background: #fff; border: 4px solid var(--outline); border-radius: 22px; padding: 10px 18px; text-align: center; max-width: 520px; box-shadow: 0 4px 0 rgba(74, 48, 34, .25); }
.speech::after { content: ''; position: absolute; left: 50%; bottom: -16px; width: 22px; height: 22px; background: #fff; border-right: 4px solid var(--outline); border-bottom: 4px solid var(--outline); transform: translateX(-50%) rotate(45deg); }
.speech-who { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; color: #B39B7A; }
.speech-text { font-family: var(--font-title); font-weight: 700; font-size: 26px; line-height: 1.2; }
.speech-text.big { text-align: center; margin: 8px 0; }
.hint { margin-top: 18px; background: #FFF6C9; border: 3px dashed #E0B400; border-radius: 14px; padding: 6px 12px; font-weight: 800; }
.feed-scene { position: relative; display: flex; flex-direction: column; align-items: center; margin-top: 18px; }
.feed-capy { position: relative; z-index: 1; }
.feed-capy.shake { animation: shake .45s; }
.feed-bowl { position: relative; z-index: 2; width: 250px; height: 92px; margin-top: -54px; }
.bowl-carrots { position: absolute; left: 20px; right: 20px; bottom: 34px; height: 80px; }
.bowl-carrot { position: absolute; animation: carrotDrop .3s ease-out both; }
@keyframes carrotDrop { 0% { transform: translateY(-60px) scale(.4); opacity: 0; } 100% { opacity: 1; } }
.bowl-more { position: absolute; right: -8px; top: -6px; font-family: var(--font-title); font-weight: 700; font-size: 18px; background: #fff; border: 3px solid var(--outline); border-radius: 12px; padding: 0 8px; }
.bowl-front { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; border: 4px solid var(--outline); border-radius: 0 0 120px 120px; background: linear-gradient(180deg, #7FB2F0, #5A8FD6); box-shadow: inset 0 6px 0 rgba(255, 255, 255, .35); }
.feed-bowl.eaten .bowl-carrot { animation: munchAway .6s ease-in forwards; }
@keyframes munchAway { to { transform: translateY(-40px) scale(0); opacity: 0; } }
.feed-feedback { text-align: center; font-family: var(--font-title); font-size: 22px; font-weight: 700; min-height: 28px; }
.feed-feedback.good { color: #3D9A1C; animation: popIn .3s; }
.feed-feedback.bad { color: #D9483B; animation: shake .4s; }
.feed-warn { display: flex; justify-content: center; align-items: center; gap: 6px; background: #FFEBEB; border: 3px solid #E74C3C; color: #C0392B; font-weight: 800; border-radius: 14px; padding: 6px 10px; }
.feed-counts { display: flex; justify-content: center; gap: 12px; }
.count-box { display: flex; flex-direction: column; align-items: center; background: #fff; border: 3px solid var(--outline); border-radius: 16px; padding: 4px 18px; min-width: 110px; }
.count-box small { font-size: 12px; font-weight: 900; text-transform: uppercase; opacity: .6; }
.count-box b { font-family: var(--font-title); font-size: 30px; color: var(--carrot); line-height: 1; }
.count-box.offered b { color: var(--grass-dark); }
.feed-controls, .feed-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.count-btn { min-width: 74px; font-size: 20px; padding: 8px 12px; }
.give-btn { min-width: 220px; }
.reels { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.reel { width: 80px; height: 80px; border: 4px solid var(--gold-dark); border-radius: 18px; background: #FFF3E0; display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.reel.spinning .reel-sym { animation: reelSpin .12s linear infinite; }
@keyframes reelSpin { 0% { transform: translateY(-30px); } 100% { transform: translateY(30px); } }
.bonus-title { font-family: var(--font-title); font-weight: 700; font-size: 28px; text-align: center; color: var(--carrot); }
.bonus-title.red { color: var(--red); }
.num-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 10px 0; }
.num-btn { width: 52px; height: 52px; border-radius: 14px; border: 3px solid #D9C7A6; background: #fff; font-family: var(--font-title); font-size: 22px; font-weight: 700; color: var(--brown); cursor: pointer; }
.num-btn.on, .num-btn:hover { border-color: var(--carrot); background: #FFF3E0; }
.rescue-emoji { font-size: 48px; text-align: center; }
@media (max-width: 560px) {
  .speech-text { font-size: 21px; }
  .feed-capy svg { width: 160px; height: 160px; }
  .feed-bowl { width: 210px; margin-top: -42px; }
  .count-btn { min-width: 60px; font-size: 17px; padding: 7px 8px; }
  .give-btn { min-width: 180px; font-size: 21px; }
}

/* gift */
.gift-panel .panel-body { text-align: center; }
.gift-week { display: flex; justify-content: center; gap: 5px; margin-bottom: 6px; }
.gift-day { display: flex; flex-direction: column; align-items: center; background: #fff; border: 3px solid #D9C7A6; border-radius: 12px; padding: 3px 6px; font-weight: 800; }
.gift-day.done { background: #EEF9E6; border-color: #5DA832; }
.gift-day.today { border-color: var(--outline); box-shadow: 0 0 0 3px rgba(255, 201, 60, .6); }
.gift-box-big { display: flex; justify-content: center; margin: 4px 0; animation: giftBob 1.4s ease-in-out infinite; }
.gift-box-big.shake-open { animation: shake .3s 3; }
.gift-box-big.opened { animation: none; filter: saturate(.7); transform: scale(.85); }

/* help & settings */
.help-list { display: grid; gap: 12px; }
.help-item { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 3px solid var(--outline); border-radius: 18px; padding: 10px 12px; }
.help-item b { font-family: var(--font-title); font-size: 19px; }
.help-item p { margin: 2px 0 0; font-weight: 600; line-height: 1.35; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 3px solid var(--outline); border-radius: 16px; padding: 10px 14px; margin-bottom: 10px; font-weight: 800; font-size: 17px; }
.setting.col { flex-direction: column; align-items: stretch; }
.slider { width: 55%; accent-color: var(--carrot); height: 28px; }

/* play */
.play-panel .panel-body { position: relative; }
.play-capy { display: flex; justify-content: center; margin: -6px 0 4px; animation: bounceY 1.2s ease-in-out infinite; }
.play-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.play-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 10px; border: 4px solid var(--outline); border-radius: 22px; background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--c) 18%, #fff) 100%); cursor: pointer; box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 70%, #000); font-family: inherit; color: var(--brown); }
.play-card:active { transform: translateY(4px); box-shadow: 0 1px 0 color-mix(in srgb, var(--c) 70%, #000); }
.play-card.is-locked { filter: grayscale(.85); opacity: .7; }
.play-emoji { font-size: 48px; line-height: 1; }
.play-title { font-family: var(--font-title); font-weight: 700; font-size: 20px; }
.play-desc { font-size: 13px; font-weight: 700; opacity: .8; text-align: center; }
.play-best { font-size: 13px; font-weight: 900; }

/* ── Toasts, flying coins, confetti ─────────────────────────────────────────── */
#toasts { position: fixed; top: calc(70px + env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 150; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(520px, calc(100% - 20px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--cream); border: 3px solid var(--outline); border-radius: 18px; padding: 8px 14px; font-weight: 800; box-shadow: 0 5px 0 rgba(74, 48, 34, .3); cursor: pointer; max-width: 100%; }
.toast-icon { display: flex; flex: 0 0 auto; }
.toast-text { flex: 1; }
.slide-down { animation: slideDown .3s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes slideDown { from { transform: translateY(-30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast-out { animation: fadeOut .25s forwards; }
.flyer { position: fixed; z-index: 600; pointer-events: none; }
.float-text { position: fixed; z-index: 600; pointer-events: none; font-family: var(--font-title); font-weight: 700; font-size: 26px; -webkit-text-stroke: 2px var(--outline); paint-order: stroke fill; animation: fxRise 1.2s ease-out forwards; }
.confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 650; pointer-events: none; }

/* ── Loading screen (from the drawing) ──────────────────────────────────────── */
.loading-screen { position: absolute; inset: 0; background: linear-gradient(180deg, #FFFDF5 0%, #FFF4DC 60%, #E8F6D4 100%); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: opacity .4s; }
.loading-screen.fade-out { opacity: 0; }
.load-center { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; width: min(600px, 100%); }
.load-title svg, .title-small svg { max-width: 100%; height: auto; }
.title-letter { animation: letterPop .6s cubic-bezier(.2, 1.6, .4, 1) both; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes letterPop { 0% { transform: translateY(-80px) scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }
.load-label { font-family: var(--font-title); font-size: 26px; font-weight: 700; color: #B5512A; }
.load-bar { width: min(420px, 86%); height: 34px; border: 4px solid var(--outline); border-radius: 22px; background: #fff; overflow: hidden; box-shadow: 0 4px 0 rgba(74, 48, 34, .25); }
.load-fill { height: 100%; width: 0; border-radius: 18px; background: repeating-linear-gradient(-45deg, #FF8C2B 0 18px, #8E8478 18px 32px); background-size: 46px 46px; animation: stripes .8s linear infinite; border-right: 4px solid var(--outline); }
@keyframes stripes { to { background-position: 46px 0; } }
.load-capy { margin-top: 4px; animation: walkAcross 9s linear infinite; }
@keyframes walkAcross { 0% { transform: translateX(-120px); } 50% { transform: translateX(120px); } 50.01% { transform: translateX(120px) scaleX(-1); } 100% { transform: translateX(-120px) scaleX(-1); } }
.load-fact { max-width: 440px; text-align: center; font-weight: 700; background: #fff; border: 3px dashed #E9C48C; border-radius: 16px; padding: 8px 14px; }
.load-grass { position: absolute; inset: 0; pointer-events: none; }
.tall-grass { position: absolute; bottom: 0; width: 3px; background: linear-gradient(180deg, rgba(150, 130, 190, 0), rgba(150, 130, 190, .45)); border-radius: 3px; transform-origin: 50% 100%; animation: sway 3.4s ease-in-out infinite; }
.load-tufts { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; pointer-events: none; }
.tuft { position: absolute; bottom: 8px; width: 70px; height: 50px; background:
  radial-gradient(ellipse 8px 26px at 20% 70%, #5DBB46 60%, transparent 62%),
  radial-gradient(ellipse 8px 34px at 42% 60%, #4AA838 60%, transparent 62%),
  radial-gradient(ellipse 8px 30px at 62% 66%, #6ACB52 60%, transparent 62%),
  radial-gradient(ellipse 8px 22px at 80% 76%, #5DBB46 60%, transparent 62%); animation: sway 2.8s ease-in-out infinite; transform-origin: 50% 100%; }

/* ── Title / "Who's playing?" ───────────────────────────────────────────────── */
.title-screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }
.title-bg { position: absolute; inset: 0; }
.title-bg svg { display: block; }
.title-card { position: relative; z-index: 3; width: min(460px, 100%); max-height: calc(100% - 20px); overflow-y: auto; text-align: center; padding: 16px 18px; }
.tagline { font-weight: 800; opacity: .75; margin-top: -4px; }
.who-title { font-family: var(--font-title); font-weight: 700; font-size: 24px; margin: 12px 0 8px; }
.profiles { display: flex; flex-direction: column; gap: 10px; }
.profile { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 8px; border: 3px solid var(--outline); border-radius: 20px; background: #fff; cursor: pointer; box-shadow: 0 4px 0 #D9C7A6; font-family: inherit; color: var(--brown); text-align: left; }
.profile:active { transform: translateY(3px); box-shadow: 0 1px 0 #D9C7A6; }
.profile-face { width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; }
.profile-face.plus { border: 3px dashed #D9C7A6; border-radius: 50%; font-size: 36px; font-weight: 900; color: #C9B48E; width: 56px; height: 56px; margin: 4px; }
.profile-info { flex: 1; display: flex; flex-direction: column; }
.profile-info b { font-family: var(--font-title); font-size: 22px; }
.profile-info small { font-weight: 800; opacity: .7; }
.profile-go { font-size: 22px; color: var(--carrot); }
.profile-del { position: absolute; top: -8px; right: -8px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--outline); background: #fff; color: #B8382C; font-weight: 900; cursor: pointer; opacity: .55; font-size: 13px; }
.profile-del:hover { opacity: 1; }
.profile.new { background: #FFFBEF; }
.field { display: flex; flex-direction: column; gap: 4px; text-align: left; font-weight: 800; }
.field small.small { font-weight: 700; font-size: 12.5px; opacity: .7; }
/* log in / make an account */
.acct-msg { min-height: 18px; color: var(--brown); }
.acct-msg.bad { color: #B8382C; opacity: 1; }
.acct-note { background: #FFFBEF; border: 2px dashed #D9C7A6; border-radius: 14px; padding: 8px 10px; text-align: left; }
.pin-input { letter-spacing: .4em; text-align: center; font-size: 28px; }
select.text-input { font-size: 18px; }
.new-capy { display: flex; justify-content: center; }
.lang-row { display: flex; gap: 8px; justify-content: center; margin-top: 14px; flex-wrap: wrap; }
.lang-btn { border: 3px solid var(--outline); border-radius: 16px; padding: 5px 12px; background: #fff; font-weight: 800; cursor: pointer; font-size: 14px; color: var(--brown); }
.lang-btn.on { background: var(--grass-dark); color: #fff; }
.title-capys { position: absolute; z-index: 2; bottom: 4%; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 4%; pointer-events: none; }
.title-capys span { animation: bounceY 2.2s ease-in-out infinite; }
.title-capys span:last-child { animation-delay: -1.1s; }
.title-studio { position: absolute; z-index: 4; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 6px; background: rgba(32, 52, 87, .9); color: #fff; text-decoration: none; border: 3px solid var(--outline); border-radius: 16px; padding: 4px 10px 4px 6px; font-weight: 800; font-size: 13px; }
@media (max-width: 560px) { .title-capys { display: none; } }
@media (max-height: 640px) { .title-capys { display: none; } }

/* phones: a more compact top bar */
@media (max-width: 480px) {
  .hud { gap: 5px; padding-left: 6px; padding-right: 6px; }
  .hud-counters { gap: 4px; flex-wrap: nowrap; }
  .hud-pill { font-size: 15px; padding: 2px 7px 2px 3px; border-width: 2.5px; }
  .hud-pill svg { width: 20px; height: 20px; }
  .hud-menu { padding: 1px 5px 2px; border-radius: 16px; }
  .hud-menu-face { height: 32px; }
  .hud-menu-face svg { width: 36px; height: 36px; }
  .hud-menu-label { font-size: 12px; }
  .hud-level { width: 42px; height: 42px; }
  .hud-level svg { width: 42px; height: 42px; }
  .hud-level-num { font-size: 15px; }
  .hud-gift svg { width: 32px; height: 32px; }
  .quick-btn { min-width: 60px; padding: 4px 8px 3px; font-size: 12px; border-radius: 18px; }
  .quick-btn svg { width: 34px; height: 34px; }
  #toasts { top: calc(60px + env(safe-area-inset-top)); }
  .toast { font-size: 14px; padding: 6px 10px; }
}

.credits { margin-top: 12px; font-size: 12.5px; font-weight: 800; opacity: .6; }
