/* cat lounge (prefix lg-) */
.lg-root { background: #e9d4c8; touch-action: none; overflow: hidden; }
.lg-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.lg-stage { position: absolute; left: 0; top: 0; width: 396px; height: 704px; overflow: hidden; }
.lg-piece { position: absolute; transform: translate(-50%, -100%); max-width: none; pointer-events: none; filter: drop-shadow(0 4px 3px rgba(80, 40, 50, .3)); }
.lg-piece.lg-hang { transform-origin: 50% 0; }
.lg-x { z-index: 1000; }
.lg-title { position: absolute; left: 64px; right: 64px; top: 10px; height: 40px; line-height: 40px; text-align: center; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; z-index: 1000; }
.lg-hit { position: absolute; background: transparent; border: 0; padding: 0; cursor: pointer; }
.lg-deco .lg-hit { pointer-events: none; }
.lg-cat { will-change: transform; }
.lg-fx { position: absolute; left: 0; top: 0; z-index: 900; font: 900 16px var(--font); color: #fff; pointer-events: none; text-shadow: 0 0 4px #7a3b58, 0 0 2px #7a3b58; white-space: nowrap; animation: lgFloat 1.9s ease-in-out infinite; }
.lgf-sunbathe { color: #ffd45a; font-size: 20px; text-shadow: 0 0 10px #ffb43a, 0 0 4px #fff; }
.lgf-scratch { letter-spacing: -1px; color: #ffe27a; }
.lgf-bed, .lgf-hammock { font-style: italic; color: #e8f0ff; }
.lgf-yarn { color: #ff9bb8; }
@keyframes lgFloat { 0% { opacity: 0; transform: translateY(0); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-16px); } }
.lg-hop { animation: lgHopT .42s ease-out; }
@keyframes lgHopT { 0%, 100% { translate: 0 0; } 40% { translate: 0 -16px; } }

/* poses: small transforms around the feet */
.lg-cat > .spr-still, .lg-cat > .spr-anim { transform-origin: 0 0; }
.lp-stand > .spr-still, .lp-stand > .spr-anim { animation: lgStand 3s ease-in-out infinite; }
.lp-lie > .spr-still, .lp-lie > .spr-anim, .lp-sunbathe > .spr-still, .lp-sunbathe > .spr-anim { animation: lgLie 3.4s ease-in-out infinite; }
.lp-sunbathe > .spr-still, .lp-sunbathe > .spr-anim { filter: drop-shadow(0 0 8px rgba(255, 214, 120, .95)); }
.lp-sleep > .spr-still, .lp-sleep > .spr-anim { animation: lgSleep 4.2s ease-in-out infinite; }
.lp-bed > .spr-still, .lp-bed > .spr-anim { animation: lgBed 4s ease-in-out infinite; }
.lp-hammock > .spr-still, .lp-hammock > .spr-anim { animation: lgHam 3s ease-in-out infinite; }
.lp-yarn > .spr-still, .lp-yarn > .spr-anim { animation: lgYarn .8s ease-in-out infinite; }
.lp-groom > .spr-still, .lp-groom > .spr-anim { animation: lgGroom .9s ease-in-out infinite; }
.lp-stretch > .spr-still, .lp-stretch > .spr-anim { animation: lgStretch 3s ease-in-out infinite; }
.lp-sway > .spr-still, .lp-sway > .spr-anim { animation: lgSway 1.7s ease-in-out infinite; }
.lp-look > .spr-still, .lp-look > .spr-anim { animation: lgLook 2.4s ease-in-out infinite; }
.lp-scratch > .spr-still, .lp-scratch > .spr-anim { animation: lgScratch .22s linear infinite; }
.lp-play > .spr-still, .lp-play > .spr-anim { animation: lgPlay .7s ease-out infinite; }
.lp-wiggle > .spr-still, .lp-wiggle > .spr-anim { animation: lgWiggle .16s linear infinite; }
.lp-pounce > .spr-still, .lp-pounce > .spr-anim { animation: lgPounce .32s ease-out both; }
.lp-roll > .spr-still, .lp-roll > .spr-anim { transform-origin: 0 -20px; animation: lgRoll 1.3s ease-in-out 2; }
@keyframes lgStand { 50% { transform: scale(1, 1.015); } }
@keyframes lgLie { 0%, 100% { transform: scale(1.08, .87); } 50% { transform: scale(1.1, .85); } }
@keyframes lgSleep { 0%, 100% { transform: scale(1.06, .89); } 50% { transform: scale(1.09, .85); } }
@keyframes lgBed { 0%, 100% { transform: scale(1.1, .74) rotate(-2deg); } 50% { transform: scale(1.12, .71) rotate(-2deg); } }
@keyframes lgHam { 0%, 100% { transform: scale(1.08, .86) rotate(-3deg); } 50% { transform: scale(1.1, .84) rotate(-3deg); } }
@keyframes lgYarn { 0%, 100% { transform: rotate(-4deg) scale(1.02, .96); } 50% { transform: rotate(5deg) scale(1, 1.02); } }
@keyframes lgGroom { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-4deg); } 65% { transform: rotate(3deg); } }
@keyframes lgStretch { 0%, 100% { transform: scale(1, 1); } 35%, 75% { transform: scale(1.14, .88); } }
@keyframes lgSway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes lgLook { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(.98, 1.04); } }
@keyframes lgScratch { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(2px); } }
@keyframes lgPlay { 0%, 100% { translate: 0 0; } 45% { translate: 0 -7px; } }
@keyframes lgWiggle { 0%, 100% { transform: rotate(-6deg) scale(1.04, .92); } 50% { transform: rotate(6deg) scale(1.04, .92); } }
@keyframes lgPounce { 0% { transform: scale(1.06, .9); } 50% { transform: translateY(-16px) scale(.96, 1.12); } 100% { transform: scale(1.08, .88); } }
@keyframes lgRoll { 0% { transform: rotate(0) scale(1.05, .95); } 100% { transform: rotate(360deg) scale(1.05, .95); } }

/* mood bar above each cat while playing */
.lg-mood { position: absolute; left: 0; top: 0; width: 38px; height: 8px; border-radius: 5px; background: rgba(255, 255, 255, .8); border: 1.5px solid #fff; box-shadow: 0 1px 3px rgba(80, 30, 60, .45); z-index: 901; pointer-events: none; display: none; overflow: hidden; }
.lg-chasing .lg-mood { display: block; }
.lg-mood i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffa9c4, #ff6f9a); border-radius: 4px; }
.lg-mood.full i { background: linear-gradient(90deg, #ffe27a, #ffb43a); }
.lg-mood.fav { border-color: #ffd45a; box-shadow: 0 0 0 1.5px #ffd45a, 0 1px 3px rgba(80, 30, 60, .45); }

/* yarn ball */
.lg-yarn { position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%; pointer-events: none;
  background: repeating-linear-gradient(35deg, rgba(255, 255, 255, .4) 0 2px, transparent 2px 6px), radial-gradient(circle at 35% 30%, #ffd1e0, #f06b98 60%, #c64a78);
  box-shadow: 0 2px 2px rgba(80, 30, 50, .3); }

/* bottom bar */
.lg-bar { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 12px; z-index: 1000; animation: lgUp .26s cubic-bezier(.2, 1.5, .4, 1) both; }
.lg-bbtn { flex-direction: column; gap: 0; min-width: 152px; min-height: 58px; padding: 4px 12px; border-radius: 26px; }
.lg-bb1 { display: flex; align-items: center; gap: 6px; font: 900 17px var(--font); }
.lg-bb1 .lg-em { font-size: 20px; }
.lg-chip { font: 800 11px var(--font); color: var(--teal); white-space: nowrap; }
.lg-wandbtn { background: linear-gradient(180deg, #ffb3c7, #e88aa5); border-color: #f6d88a; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), 0 3px 0 #a94d6f, 0 4px 10px rgba(160, 60, 100, .35); }
.lg-wandbtn .lg-chip { color: #fff; text-shadow: 0 1px 2px #a04468; }
.lg-root.lg-deco .lg-bar, .lg-root.lg-chasing .lg-bar { display: none; }
@keyframes lgUp { from { transform: translate(-50%, 40px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }

/* today's progress */
.lg-mini { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); width: 250px; z-index: 1000; padding: 3px 10px 5px; border-radius: 14px; background: rgba(255, 247, 239, .9); border: 2px solid var(--gold-l); box-shadow: 0 2px 6px rgba(80, 30, 60, .25); pointer-events: none; }
.lg-root.lg-deco .lg-mini, .lg-root.lg-chasing .lg-mini { display: none; }
.lg-pl { font: 800 12px/1.3 var(--font); color: var(--ink); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-pbar { height: 8px; border-radius: 5px; background: #f2dcd3; overflow: hidden; margin-top: 2px; box-shadow: inset 0 1px 2px rgba(120, 60, 60, .25); }
.lg-pfill { height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, #ffc2d4, #ff7fa6); transition: width .3s; }

/* play HUD */
.lg-chase { position: absolute; left: 24px; right: 24px; top: 54px; display: none; flex-direction: column; align-items: center; gap: 6px; z-index: 1000; pointer-events: none; }
.lg-root.lg-chasing .lg-chase { display: flex; }
.lg-prog { width: 100%; max-width: 340px; padding: 4px 12px 6px; border-radius: 16px; background: rgba(255, 247, 239, .93); border: 2px solid var(--gold-l); box-shadow: 0 2px 6px rgba(80, 30, 60, .3); }
.lg-end { pointer-events: auto; min-width: 120px; min-height: 46px; }
.lg-wand { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 950; pointer-events: none; display: none; }
.lg-wrod { position: absolute; left: 40px; top: -110px; width: 7px; height: 70px; border-radius: 4px; transform: rotate(20deg);
  background: linear-gradient(90deg, #c98a5a, #f2c48f 50%, #b9763f); box-shadow: 0 1px 3px rgba(80, 40, 20, .4); }
.lg-wstr { position: absolute; left: 31px; top: -42px; width: 2px; height: 52px; background: rgba(120, 70, 90, .75); transform-origin: 0 0; transform: rotate(37deg); }
.lg-feather { position: absolute; left: -9px; top: -16px; width: 18px; height: 34px; border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%; transform-origin: 50% 0;
  background: linear-gradient(120deg, #fff 0, #ffc2d6 45%, #7ad0e0 100%); border: 1.5px solid #fff; box-shadow: 0 2px 4px rgba(120, 50, 90, .4); animation: lgFeather .6s ease-in-out infinite alternate; }
@keyframes lgFeather { from { transform: rotate(-16deg); } to { transform: rotate(16deg); } }
.lg-gain { position: absolute; z-index: 960; display: flex; align-items: center; gap: 3px; transform: translate(-50%, 0); pointer-events: none; font: 900 20px var(--font); color: #fff; -webkit-text-stroke: 4px #7a3b58; paint-order: stroke fill; animation: lgGain 1.3s ease-out both; }
.lg-gain img { width: 24px; height: 24px; object-fit: contain; }
.lg-wal { display: flex; align-items: center; justify-content: center; gap: 4px; font: 900 16px var(--font); color: var(--ink); }
.lg-wal img { width: 22px; height: 22px; object-fit: contain; }
.lg-wal.pop .lg-waln, .lg-wal.pop img { animation: lgWalPop .35s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes lgWalPop { 40% { transform: scale(1.45); } }
.lg-rate { margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #ffe6f0; font: 800 12px var(--font); color: #a2456e; }
.lg-fly { position: absolute; z-index: 1001; width: 28px; height: 28px; object-fit: contain; pointer-events: none; transform: translate(-50%, -50%);
  transition: left .62s cubic-bezier(.5, -0.3, .7, 1), top .62s cubic-bezier(.3, 0, .9, .6), transform .62s, opacity .62s; }
@keyframes lgGain { 0% { opacity: 0; margin-top: 10px; } 15% { opacity: 1; } 100% { opacity: 0; margin-top: -40px; } }

/* slots */
.lg-slotl { position: absolute; inset: 0; z-index: 600; pointer-events: none; }
.lg-slot { position: absolute; width: 46px; height: 46px; border-radius: 50%; padding: 0; display: none; align-items: center; justify-content: center; cursor: pointer; pointer-events: auto;
  border: 3px dashed #fff; background: rgba(232, 138, 165, .5); color: #fff; font: 900 24px/1 var(--font); -webkit-text-stroke: 3px var(--outline); paint-order: stroke fill;
  box-shadow: 0 0 0 2px rgba(122, 59, 88, .5), 0 3px 8px rgba(80, 30, 50, .35); transition: transform .1s, opacity .2s; }
.lg-deco .lg-slot { display: flex; animation: dcIn .25s cubic-bezier(.2, 1.8, .4, 1) both; }
.lg-slot:active { transform: scale(.9); }
.lg-slot.filled { background: rgba(255, 255, 255, .1); border-style: solid; border-color: rgba(255, 255, 255, .85); }
.lg-slot.pulse { background: rgba(255, 224, 110, .65); animation: dcPulse .9s ease-in-out infinite; }
.lg-slot.dim { opacity: .25; }
.lg-slot.src { border-color: #ffe27a; }
@keyframes dcIn { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes dcPulse { 50% { transform: scale(1.15); box-shadow: 0 0 0 2px #fff, 0 0 16px #ffd45a; } }

/* tray */
.lg-tray { position: absolute; left: 8px; right: 8px; bottom: 10px; height: 112px; z-index: 1000; display: none; flex-direction: column; gap: 4px; padding: 8px 10px 8px;
  border-radius: 22px; background: linear-gradient(180deg, #fffaf3, #fbe9e4); border: 3px solid var(--gold-l); box-shadow: 0 4px 12px rgba(80, 30, 60, .35); }
.lg-deco .lg-tray { display: flex; animation: lgUp2 .25s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes lgUp2 { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.lg-hint { font: 800 12px/1.2 var(--font); color: var(--ink); height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-trow { flex: 1; display: flex; gap: 8px; align-items: center; min-height: 0; }
.lg-items { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; align-items: center; touch-action: pan-x; padding: 2px; }
.lg-items::-webkit-scrollbar { display: none; }
.lg-item { flex: none; width: 70px; height: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 2px; cursor: pointer; font-family: var(--font);
  border-radius: 14px; border: 2px solid #f0c9b8; background: linear-gradient(180deg, #fff, #fdeee9); box-shadow: 0 2px 0 #e6b8a5; overflow: hidden; }
.lg-item img { width: 32px; height: 32px; object-fit: contain; flex: none; pointer-events: none; }
.lg-item.on { border-color: #e88aa5; background: linear-gradient(180deg, #ffe3ea, #fbc9d6); box-shadow: 0 0 0 2px #fff, 0 0 10px #ffb3c7; }
.lg-item:active { transform: scale(.94); }
.lg-in { max-width: 64px; font: 800 11px/1.1 var(--font); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.lg-il { font: 800 10px/1.1 var(--font); color: var(--teal); pointer-events: none; }
.lg-empty { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; }
.lg-et { font: 800 13px/1.3 var(--font); color: var(--ink); text-align: center; }
.lg-done { flex: none; min-width: 74px; }
.lg-popback { position: absolute; inset: 0; z-index: 1100; background: rgba(50, 20, 40, .12); }
.lg-pop { position: absolute; width: 184px; z-index: 1200; padding: 6px; border-radius: 18px; background: linear-gradient(180deg, #fffaf3, #fbe9e4); border: 2px solid var(--gold-l);
  box-shadow: 0 4px 12px rgba(80, 30, 60, .35); animation: dcIn .2s cubic-bezier(.2, 1.8, .4, 1) both; }
.lg-pn { text-align: center; font: 900 13px var(--font); color: var(--ink); margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-prow { display: flex; gap: 6px; }
.lg-pb { flex: 1; min-width: 46px; min-height: 46px; padding: 4px 6px; font-size: 13px; }

/* result modal */
.lg-res { display: flex; flex-direction: column; gap: 8px; align-items: center; padding: 4px 0; }
.lg-port { height: 96px; width: auto; max-width: 160px; object-fit: contain; filter: drop-shadow(0 4px 4px rgba(80, 40, 50, .3)); }
.lg-rr { display: flex; align-items: center; gap: 8px; font: 900 18px var(--font); color: var(--ink); }
.lg-rr img { width: 28px; height: 28px; object-fit: contain; }
.lg-rr.big { font-size: 22px; }
.lg-rn { font: 700 13px var(--font); color: #9a7484; text-align: center; max-width: 260px; }
.lg-rp { width: 240px; }
