:root {
    color-scheme: dark;
}

body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.35);
}

.stat-pill {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.stat-pill.stat-hit {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 24px rgba(34, 211, 238, 0.16);
    background: rgba(255, 255, 255, 0.16);
}

.fab-shell {
    gap: 0.35rem;
}

.fab-link {
    min-width: 54px;
    text-align: center;
    border-radius: 9999px;
    padding: 0.75rem 0.8rem;
    font-size: 0.8rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.fab-link:hover,
.fab-link:active {
    transform: translateY(-2px) scale(1.03);
    background: rgba(255,255,255,0.12);
}

.fab-primary {
    background: linear-gradient(135deg, rgba(236,72,153,0.9), rgba(139,92,246,0.9));
}

.kitty-stage {
    position: relative;
    background: radial-gradient(circle at top, rgba(255,255,255,0.16), rgba(255,255,255,0.05));
    border: 1px solid rgba(255,255,255,0.18);
}

.stage-ambient {
    isolation: isolate;
}

.stage-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(8px);
    opacity: 0.45;
    pointer-events: none;
    animation: floatOrb 8s ease-in-out infinite;
}

.stage-orb-1 {
    width: 96px;
    height: 96px;
    top: 14px;
    left: 12px;
    background: rgba(59, 130, 246, 0.18);
}

.stage-orb-2 {
    width: 80px;
    height: 80px;
    right: 16px;
    top: 48px;
    background: rgba(244, 114, 182, 0.2);
    animation-delay: -2s;
}

.stage-orb-3 {
    width: 120px;
    height: 120px;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(45, 212, 191, 0.14);
    animation-delay: -4s;
}

.cat-shadow {
    animation: shadowPulse 3s ease-in-out infinite;
}

.cat-idle {
    animation: catFloat 3s ease-in-out infinite;
    transform-origin: center bottom;
    will-change: transform;
}

.meter {
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.meter > span {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(34,211,238,0.9), rgba(167,139,250,0.9));
    transition: width 0.35s ease;
}

.action-btn {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.action-btn-animated {
    position: relative;
    overflow: hidden;
}

.action-btn-animated::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.18) 45%, transparent 100%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.action-btn-animated:hover::before,
.action-btn-animated:active::before {
    transform: translateX(120%);
}

.tap-ripple {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    border-radius: 9999px;
    transform: translate(-50%, -50%);
    background: rgba(255,255,255,0.32);
    animation: rippleBurst 0.7s ease-out forwards;
    pointer-events: none;
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.25);
}

.action-btn:active {
    transform: scale(0.98);
}

.cat-bounce { animation: catBounce 0.55s ease; }
.cat-feed { animation: catHappy 0.9s ease; }
.cat-water { animation: catSplash 0.85s ease; }
.cat-play { animation: catSpinHop 1s ease; }
.cat-sleep { animation: catSleepy 1.2s ease; }
.cat-wash { animation: catWash 0.95s ease; }
.stage-shake { animation: stageShake 0.45s ease; }
.stage-flash::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.18), transparent 55%);
    animation: stageFlash 0.7s ease;
    pointer-events: none;
}

.reaction-particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    font-size: var(--size, 1.5rem);
    animation: floatReaction 1.8s ease forwards;
    filter: drop-shadow(0 8px 12px rgba(15, 23, 42, 0.24));
}

.ambient-sparkle {
    position: absolute;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.8);
    box-shadow: 0 0 12px rgba(255,255,255,0.6);
    animation: sparkleFloat 4.5s ease-in-out infinite;
}

@keyframes rippleBurst {
    0% { opacity: 0.35; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(18); }
}

@keyframes stageFlash {
    0% { opacity: 0; }
    30% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes sparkleFloat {
    0%,100% { transform: translateY(0) scale(0.8); opacity: 0.25; }
    50% { transform: translateY(-10px) scale(1.2); opacity: 0.9; }
}

@keyframes catBounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.08) translateY(-4px); }
    100% { transform: scale(1); }
}

@keyframes catFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-1deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
    75% { transform: translateY(-4px) rotate(-1deg); }
}

@keyframes shadowPulse {
    0%, 100% { transform: translateX(-50%) scaleX(1); opacity: 0.32; }
    50% { transform: translateX(-50%) scaleX(0.88); opacity: 0.22; }
}

@keyframes floatOrb {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -10px, 0); }
}

@keyframes catHappy {
    0% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-6deg); }
    50% { transform: scale(1.05) rotate(6deg); }
    75% { transform: scale(1.1) rotate(-4deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes catSplash {
    0% { transform: translateY(0) scale(1); }
    35% { transform: translateY(-8px) scale(1.08); }
    70% { transform: translateY(-2px) rotate(4deg); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes catSpinHop {
    0% { transform: translateY(0) rotate(0deg); }
    35% { transform: translateY(-16px) rotate(-8deg); }
    70% { transform: translateY(-6px) rotate(8deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@keyframes catSleepy {
    0% { transform: scale(1); opacity: 1; }
    35% { transform: scale(0.96) translateY(4px); opacity: 0.92; }
    70% { transform: scale(0.98) translateY(1px); opacity: 0.98; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes catWash {
    0% { transform: scale(1); }
    30% { transform: scale(1.06) rotate(-4deg); }
    60% { transform: scale(1.08) rotate(4deg); }
    100% { transform: scale(1) rotate(0deg); }
}

@keyframes stageShake {
    0%,100% { transform: translateX(0); }
    20% { transform: translateX(-3px); }
    40% { transform: translateX(3px); }
    60% { transform: translateX(-2px); }
    80% { transform: translateX(2px); }
}

@keyframes floatReaction {
    0% { transform: translate3d(0, 8px, 0) scale(0.6); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translate3d(0, -72px, 0) scale(1.15); opacity: 0; }
}

.stage-ring {
    position: absolute;
    inset: 50% auto auto 50%;
    border-radius: 9999px;
    border: 1px solid rgba(255,255,255,0.16);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.stage-ring-1 {
    width: 13rem;
    height: 13rem;
    animation: ringPulse 4s ease-in-out infinite;
}

.stage-ring-2 {
    width: 15rem;
    height: 15rem;
    border-color: rgba(34,211,238,0.14);
    animation: ringPulse 4s ease-in-out infinite 1.1s;
}

@keyframes ringPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.98); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.03); opacity: 0.18; }
}

.equipment-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(12px);
    animation: equipmentBob 2.6s ease-in-out infinite;
    font-size: 1.4rem;
}

@keyframes equipmentBob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
    .cat-idle,
    .cat-shadow,
    .stage-orb,
    .reaction-particle,
    .ambient-sparkle,
    .cat-bounce,
    .cat-feed,
    .cat-water,
    .cat-play,
    .cat-sleep,
    .cat-wash,
    .stage-shake,
    .action-btn-animated::before,
    .tap-ripple,
    .equipment-chip {
        animation: none !important;
        transition: none !important;
    }
}


.cat-render {
    position: relative;
    filter: drop-shadow(0 22px 28px rgba(15, 23, 42, 0.28));
}

.cat-body, .cat-head, .cat-tail, .cat-ear {
    position: absolute;
    transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cat-body {
    left: 50%;
    bottom: 1.85rem;
    width: 9.7rem;
    height: 8.8rem;
    transform: translateX(-50%);
    border-radius: 46% 46% 38% 38%;
    border: 1px solid rgba(255,255,255,0.2);
    overflow: hidden;
}

.cat-belly {
    position: absolute;
    inset: auto 50% 0;
    width: 5.8rem;
    height: 5rem;
    transform: translateX(-50%);
    border-radius: 48% 48% 38% 38%;
    background: rgba(255,255,255,0.28);
}

.cat-head {
    left: 50%;
    top: 2.6rem;
    width: 9.6rem;
    height: 8.6rem;
    transform: translateX(-50%);
    border-radius: 46%;
    border: 1px solid rgba(255,255,255,0.24);
    z-index: 3;
}

.cat-tail {
    right: 3.6rem;
    bottom: 3.6rem;
    width: 4.4rem;
    height: 1.45rem;
    border-radius: 9999px;
    transform: rotate(28deg);
    transform-origin: left center;
    z-index: 1;
    animation: tailWave 2.6s ease-in-out infinite;
}

.cat-ear {
    top: -1.1rem;
    width: 2.7rem;
    height: 3.2rem;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: -1;
    border: 1px solid rgba(255,255,255,0.22);
}

.cat-ear-left { left: 0.9rem; transform: rotate(-8deg); }
.cat-ear-right { right: 0.9rem; transform: rotate(8deg); }
.cat-ear-inner {
    position: absolute;
    left: 50%;
    top: 0.7rem;
    width: 1.35rem;
    height: 1.75rem;
    transform: translateX(-50%);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    opacity: 0.8;
}

.cat-face { position: absolute; inset: 0; }
.cat-eye {
    position: absolute;
    top: 3.3rem;
    width: 1.1rem;
    height: 1.5rem;
    border-radius: 9999px;
    box-shadow: inset 0 -4px 0 rgba(15,23,42,0.12);
}
.cat-eye::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0.22rem;
    width: 0.22rem;
    height: 0.45rem;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.85);
    border-radius: 9999px;
}
.cat-eye-left { left: 2.3rem; }
.cat-eye-right { right: 2.3rem; }
.cat-blush {
    position: absolute;
    top: 4.6rem;
    width: 1.2rem;
    height: 0.7rem;
    border-radius: 9999px;
    opacity: 0.5;
}
.cat-blush-left { left: 1.2rem; }
.cat-blush-right { right: 1.2rem; }
.cat-nose {
    position: absolute;
    left: 50%;
    top: 4.25rem;
    width: 0.9rem;
    height: 0.7rem;
    transform: translateX(-50%);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.cat-mouth {
    position: absolute;
    left: 50%;
    top: 4.95rem;
    width: 1.8rem;
    height: 1rem;
    transform: translateX(-50%);
}
.cat-mouth::before, .cat-mouth::after {
    content: '';
    position: absolute;
    top: 0;
    width: 0.8rem;
    height: 0.65rem;
    border-bottom: 2px solid rgba(255,255,255,0.88);
    border-radius: 0 0 1rem 1rem;
}
.cat-mouth::before { left: 0.05rem; transform: rotate(10deg); }
.cat-mouth::after { right: 0.05rem; transform: rotate(-10deg); }
.cat-whiskers {
    position: absolute;
    top: 4.65rem;
    width: 2.4rem;
    height: 1.2rem;
}
.cat-whiskers::before, .cat-whiskers::after, .cat-whiskers span {
    content: '';
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: rgba(255,255,255,0.8);
    transform-origin: center;
}
.cat-whiskers-left { left: -0.6rem; }
.cat-whiskers-right { right: -0.6rem; }
.cat-whiskers-left::before { top: 0.2rem; transform: rotate(10deg); }
.cat-whiskers-left::after { top: 0.8rem; transform: rotate(-8deg); }
.cat-whiskers-right::before { top: 0.2rem; transform: rotate(-10deg); }
.cat-whiskers-right::after { top: 0.8rem; transform: rotate(8deg); }
.cat-paw {
    position: absolute;
    bottom: -0.25rem;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.25);
}
.cat-paw-left { left: 1.7rem; }
.cat-paw-right { right: 1.7rem; }

.cat-theme-classic { background: linear-gradient(180deg, #f7b267, #ea8c3d); }
.cat-theme-midnight { background: linear-gradient(180deg, #475569, #111827); }
.cat-theme-cloud { background: linear-gradient(180deg, #dbeafe, #93c5fd); }
.cat-theme-peach { background: linear-gradient(180deg, #fed7d7, #fb7185); }

.cat-ear-inner-rose { background: linear-gradient(180deg, rgba(251,113,133,0.85), rgba(251,113,133,0.35)); }
.cat-ear-inner-violet { background: linear-gradient(180deg, rgba(167,139,250,0.85), rgba(167,139,250,0.35)); }
.cat-ear-inner-sky { background: linear-gradient(180deg, rgba(125,211,252,0.85), rgba(125,211,252,0.35)); }

.cat-eye-emerald { background: linear-gradient(180deg, #bbf7d0, #22c55e); }
.cat-eye-amber { background: linear-gradient(180deg, #fde68a, #f59e0b); }
.cat-eye-cyan { background: linear-gradient(180deg, #cffafe, #06b6d4); }
.cat-eye-rose { background: linear-gradient(180deg, #fecdd3, #fb7185); }

.cat-nose-rose { background: #fb7185; }
.cat-nose-violet { background: #a78bfa; }
.cat-nose-sky { background: #7dd3fc; }
.cat-nose-peach { background: #fb7185; }

.cat-cheek-peach { background: rgba(251, 113, 133, 0.35); }
.cat-cheek-lilac { background: rgba(167, 139, 250, 0.28); }
.cat-cheek-sky { background: rgba(125, 211, 252, 0.3); }

.scene-classic .cat-body, .scene-classic .cat-head, .scene-classic .cat-tail, .scene-classic .cat-ear { box-shadow: 0 12px 30px rgba(234,140,61,0.18); }
.scene-midnight .cat-body, .scene-midnight .cat-head, .scene-midnight .cat-tail, .scene-midnight .cat-ear { box-shadow: 0 12px 30px rgba(76,29,149,0.22); }
.scene-cloud .cat-body, .scene-cloud .cat-head, .scene-cloud .cat-tail, .scene-cloud .cat-ear { box-shadow: 0 12px 30px rgba(14,165,233,0.2); }
.scene-peach .cat-body, .scene-peach .cat-head, .scene-peach .cat-tail, .scene-peach .cat-ear { box-shadow: 0 12px 30px rgba(244,114,182,0.2); }

.cat-slot { position: absolute; z-index: 4; }
.cat-slot-badge {
    position: absolute;
    left: 50%;
    bottom: -1.2rem;
    transform: translateX(-50%);
    padding: 0.18rem 0.45rem;
    border-radius: 9999px;
    background: rgba(15,23,42,0.72);
    border: 1px solid rgba(255,255,255,0.12);
    font-size: 0.52rem;
    letter-spacing: 0.04em;
    color: rgba(255,255,255,0.72);
    text-transform: uppercase;
}
.cat-slot-hat { left: 50%; top: 0.6rem; transform: translateX(-50%); width: 7.2rem; height: 3.4rem; }
.cat-slot-glasses { left: 50%; top: 5.45rem; transform: translateX(-50%); width: 6.4rem; height: 2.5rem; }
.cat-slot-collar { left: 50%; top: 10.8rem; transform: translateX(-50%); width: 5.6rem; height: 2.4rem; }
.cat-slot-outfit { left: 50%; top: 9.7rem; transform: translateX(-50%); width: 8.7rem; height: 6.8rem; }

.cat-hat-beanie::before, .cat-hat-cap::before, .cat-hat-crown::before,
.cat-glasses-round::before, .cat-glasses-round::after, .cat-glasses-star::before, .cat-glasses-star::after,
.cat-collar-bell::before, .cat-collar-bell::after, .cat-collar-bow::before, .cat-collar-bow::after,
.cat-outfit-hoodie::before, .cat-outfit-jacket::before, .cat-outfit-royal::before { content: ''; position: absolute; }

.cat-hat-beanie::before { inset: 0.55rem 0.7rem auto; height: 2rem; border-radius: 1.8rem 1.8rem 0.9rem 0.9rem; background: linear-gradient(180deg,#fb7185,#be185d); box-shadow: inset 0 -0.35rem 0 rgba(255,255,255,0.16); }
.cat-hat-cap::before { inset: 0.7rem 1rem auto; height: 1.6rem; border-radius: 1.5rem 1.5rem 0.8rem 0.8rem; background: linear-gradient(180deg,#60a5fa,#1d4ed8); box-shadow: 1.4rem 1.2rem 0 -0.7rem rgba(96,165,250,0.95); }
.cat-hat-crown::before { left: 1rem; right: 1rem; top: 0.35rem; height: 2.1rem; background: linear-gradient(180deg,#fde68a,#f59e0b); clip-path: polygon(0 100%,0 45%,14% 55%,24% 0,42% 54%,50% 12%,58% 54%,76% 0,86% 55%,100% 45%,100% 100%); box-shadow: 0 0 16px rgba(245,158,11,0.3); }

.cat-glasses-round::before, .cat-glasses-round::after { top: 0.5rem; width: 2rem; height: 1.4rem; border: 3px solid rgba(15,23,42,0.85); border-radius: 9999px; background: rgba(255,255,255,0.12); }
.cat-glasses-round::before { left: 0.7rem; }
.cat-glasses-round::after { right: 0.7rem; }
.cat-glasses-round { box-shadow: inset 0 0 0 0 rgba(0,0,0,0.2); }
.cat-glasses-round .cat-slot-badge { bottom: -1rem; }
.cat-glasses-round::marker { content: ''; }
.cat-glasses-round { }
.cat-glasses-round::after, .cat-glasses-round::before { }
.cat-glasses-round > i { display:none; }
.cat-glasses-round { }
.cat-glasses-round::before { box-shadow: 2.2rem 0 0 -0.95rem rgba(15,23,42,0.85); }
.cat-glasses-star::before, .cat-glasses-star::after { top: 0.45rem; width: 1.95rem; height: 1.95rem; background: linear-gradient(180deg,#fef08a,#f59e0b); clip-path: polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%); filter: drop-shadow(0 4px 8px rgba(245,158,11,0.28)); }
.cat-glasses-star::before { left: 0.8rem; }
.cat-glasses-star::after { right: 0.8rem; }

.cat-collar-bell::before, .cat-collar-bow::before { left: 0.45rem; right: 0.45rem; top: 0.9rem; height: 0.7rem; border-radius: 9999px; background: linear-gradient(90deg,#a855f7,#ec4899); }
.cat-collar-bell::after { left: 50%; top: 1.25rem; width: 1rem; height: 1rem; transform: translateX(-50%); border-radius: 9999px; background: linear-gradient(180deg,#fde68a,#f59e0b); box-shadow: inset 0 -0.15rem 0 rgba(0,0,0,0.14); }
.cat-collar-bow::after { left: 50%; top: 0.55rem; width: 2rem; height: 1.4rem; transform: translateX(-50%); background: radial-gradient(circle at left center,#fb7185 0 48%,transparent 49%), radial-gradient(circle at right center,#fb7185 0 48%,transparent 49%), linear-gradient(180deg,#fda4af,#fb7185); clip-path: polygon(0 50%,20% 15%,50% 40%,80% 15%,100% 50%,80% 85%,50% 60%,20% 85%); }

.cat-outfit-hoodie::before { inset: 0.2rem 1.2rem 0.1rem; border-radius: 2rem 2rem 1.4rem 1.4rem; background: linear-gradient(180deg,#22c55e,#15803d); box-shadow: inset 0 -0.5rem 0 rgba(255,255,255,0.12); }
.cat-outfit-jacket::before { inset: 0.15rem 1rem 0; border-radius: 1.7rem 1.7rem 1.2rem 1.2rem; background: linear-gradient(180deg,#60a5fa,#1d4ed8); box-shadow: inset -0.9rem 0 0 rgba(255,255,255,0.12), inset 0.9rem 0 0 rgba(255,255,255,0.12); }
.cat-outfit-royal::before { inset: 0.05rem 1rem 0; border-radius: 1.8rem 1.8rem 1.2rem 1.2rem; background: linear-gradient(180deg,#7c3aed,#4c1d95); box-shadow: inset 0 -0.45rem 0 rgba(250,204,21,0.26); }

@keyframes tailWave {
    0%,100% { transform: rotate(28deg); }
    50% { transform: rotate(14deg); }
}

@media (prefers-reduced-motion: reduce) {
    .cat-tail { animation: none !important; }
}

.action-rail {
    width: 4.25rem;
}

.action-rail-btn,
.action-rail-link {
    position: relative;
    display: flex;
    width: 4.25rem;
    min-height: 4.25rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border-radius: 1.4rem;
    padding: 0.7rem 0.45rem;
    text-align: center;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.action-rail-link {
    text-decoration: none;
}

.action-rail-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.action-rail-text {
    font-size: 0.68rem;
    line-height: 1.05rem;
    color: rgba(255,255,255,0.88);
    font-weight: 600;
}

.action-rail-btn:hover,
.action-rail-link:hover,
.action-rail-btn:active,
.action-rail-link:active {
    transform: translateY(-2px) scale(1.03);
}

@media (max-width: 420px) {
    .action-rail {
        left: 0.45rem;
        width: 3.7rem;
    }

    .action-rail-btn,
    .action-rail-link {
        width: 3.7rem;
        min-height: 3.7rem;
        padding: 0.6rem 0.35rem;
        border-radius: 1.2rem;
    }

    .action-rail-icon {
        font-size: 1.05rem;
    }

    .action-rail-text {
        font-size: 0.61rem;
        line-height: 0.9rem;
    }
}

.menu-dock {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.menu-dock-handle {
    width: 18px;
    height: 92px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-shadow: 0 16px 32px rgba(15,23,42,0.28);
}

.menu-dock-handle span {
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255,255,255,0.7);
}

.menu-dock-panel {
    width: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0;
    transform: translateX(-10px);
    transition: width 0.28s ease, opacity 0.2s ease, transform 0.28s ease, padding 0.28s ease;
}

.menu-dock.open .menu-dock-panel {
    width: 154px;
    opacity: 1;
    padding: 0.7rem;
    transform: translateX(0);
}

.menu-dock-item,
.menu-dock-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    border-radius: 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.7rem 0.8rem;
    font-size: 0.85rem;
    margin-top: 0.45rem;
}

.menu-dock-link-reward {
    background: linear-gradient(135deg, rgba(34,211,238,0.18), rgba(59,130,246,0.16));
}

.action-rail-icon {
    font-size: 1rem;
    line-height: 1;
}

.action-rail-text {
    white-space: nowrap;
}

.modal-shell {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(2,6,23,0.58);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    width: 100%;
    max-width: 22rem;
    border-radius: 1.75rem;
    padding: 1.2rem;
}

.mini-game-stage {
    position: relative;
    height: 26rem;
    overflow: hidden;
    border-radius: 1.8rem;
    border: 1px solid rgba(255,255,255,0.16);
    background: linear-gradient(180deg, rgba(34,211,238,0.18), rgba(15,23,42,0.28)), radial-gradient(circle at top, rgba(255,255,255,0.18), transparent 40%);
}

.mini-catcher {
    position: absolute;
    left: calc(50% - 34px);
    bottom: 14px;
    width: 68px;
    height: 68px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 18px 30px rgba(15,23,42,0.24);
}

.mini-fall {
    position: absolute;
    top: -40px;
    font-size: 1.8rem;
    filter: drop-shadow(0 8px 12px rgba(15,23,42,0.22));
}

.mini-overlay {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(2,6,23,0.3);
}

.hidden { display: none !important; }


.cat-render {
    filter: drop-shadow(0 22px 38px rgba(15, 23, 42, 0.28));
}

.cat-body,
.cat-head,
.cat-tail {
    animation: catBreath 3.8s ease-in-out infinite;
    transform-origin: center bottom;
}

.cat-tail {
    animation: catTailSway 2.8s ease-in-out infinite;
}

.cat-eye {
    animation: catBlink 5.5s infinite;
    transform-origin: center center;
}

.cat-ear-left,
.cat-ear-right {
    animation: catEarTwitch 6.5s ease-in-out infinite;
    transform-origin: bottom center;
}

.cat-purr { animation: catPurr 0.9s ease; }
.cat-meow { animation: catMeow 0.75s ease; }
.cat-tap-focus { filter: drop-shadow(0 0 24px rgba(255,255,255,0.24)); }

@keyframes catBreath {
    0%, 100% { transform: scaleY(1) translateY(0); }
    50% { transform: scaleY(1.025) translateY(-2px); }
}

@keyframes catTailSway {
    0%, 100% { transform: rotate(12deg); }
    50% { transform: rotate(22deg); }
}

@keyframes catBlink {
    0%, 44%, 48%, 100% { transform: scaleY(1); }
    46% { transform: scaleY(0.08); }
}

@keyframes catEarTwitch {
    0%, 82%, 100% { transform: rotate(0deg); }
    86% { transform: rotate(-6deg); }
    90% { transform: rotate(3deg); }
}

@keyframes catPurr {
    0% { transform: scale(1) translateY(0); }
    20% { transform: scale(1.03) translateY(-2px) rotate(-1deg); }
    40% { transform: scale(1.02) translateY(0) rotate(1deg); }
    60% { transform: scale(1.03) translateY(-2px) rotate(-1deg); }
    100% { transform: scale(1) translateY(0); }
}

@keyframes catMeow {
    0% { transform: scale(1); }
    30% { transform: scale(1.08) translateY(-8px); }
    55% { transform: scale(1.04) translateY(-2px); }
    100% { transform: scale(1); }
}

/* v1.4.1 UI polish */
#kittyStage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 34rem;
}

#catAvatarWrap {
    width: min(100%, 21rem) !important;
    height: 20rem !important;
}

#catAvatar {
    transform-origin: center bottom;
}

.stat-pill {
    min-height: 5.4rem;
}

.stat-pill:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.mission-card {
    min-height: 5.8rem;
    transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.mission-card:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
}

#missionList .mission-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.cat-render {
    filter: drop-shadow(0 28px 42px rgba(15, 23, 42, 0.34));
}

.cat-body::before,
.cat-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 24%, rgba(255,255,255,0.28), transparent 38%),
                radial-gradient(circle at 70% 72%, rgba(255,255,255,0.08), transparent 32%);
    opacity: 0.9;
    pointer-events: none;
}

.cat-body::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 1.3rem;
    width: 3.8rem;
    height: 4.7rem;
    transform: translateX(-50%);
    border-radius: 48% 48% 44% 44%;
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03));
    opacity: 0.7;
}

.cat-head::after {
    content: '';
    position: absolute;
    inset: 0.6rem 1rem 2.5rem;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.16), transparent 68%);
    pointer-events: none;
}

.cat-belly {
    box-shadow: inset 0 10px 16px rgba(255,255,255,0.12);
}

.cat-eye {
    overflow: hidden;
    animation: eyeBlink 6.8s ease-in-out infinite;
}

.cat-eye::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0.18rem;
    width: 0.34rem;
    height: 0.68rem;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.45);
    border-radius: 999px;
}

.cat-ear-left { animation: earTwitchLeft 7s ease-in-out infinite; transform-origin: bottom center; }
.cat-ear-right { animation: earTwitchRight 7s ease-in-out infinite; transform-origin: bottom center; }
.cat-body { animation: bodyBreath 3.2s ease-in-out infinite; }
.cat-head { animation: headNod 3.2s ease-in-out infinite; }
.cat-whiskers-left, .cat-whiskers-right { animation: whiskerTwitch 5.2s ease-in-out infinite; }
.cat-mouth { animation: mouthIdle 5.2s ease-in-out infinite; }

.scene-classic .cat-body,
.scene-classic .cat-head,
.scene-classic .cat-tail,
.scene-classic .cat-ear {
    background-image: linear-gradient(180deg, transparent, transparent),
                      repeating-linear-gradient(90deg, rgba(255,255,255,0.0) 0 18px, rgba(120,60,20,0.09) 18px 24px);
    background-blend-mode: soft-light;
}

.scene-midnight .cat-body,
.scene-midnight .cat-head,
.scene-midnight .cat-tail,
.scene-midnight .cat-ear {
    background-image: linear-gradient(180deg, transparent, transparent),
                      repeating-linear-gradient(90deg, rgba(255,255,255,0.0) 0 20px, rgba(255,255,255,0.04) 20px 25px);
    background-blend-mode: screen;
}

.menu-dock {
    left: max(0.45rem, calc(50vw - 16.4rem)) !important;
}

@media (max-width: 420px) {
    #kittyStage {
        min-height: 32rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    #catAvatarWrap {
        height: 18.6rem !important;
    }

    .menu-dock {
        left: 0.35rem !important;
    }

    .mission-card,
    .stat-pill {
        min-height: 5.1rem;
    }
}

@keyframes eyeBlink {
    0%, 44%, 48%, 100% { transform: scaleY(1); }
    46% { transform: scaleY(0.08); }
}

@keyframes earTwitchLeft {
    0%, 90%, 100% { transform: rotate(-8deg); }
    92% { transform: rotate(-16deg); }
    95% { transform: rotate(-3deg); }
}

@keyframes earTwitchRight {
    0%, 90%, 100% { transform: rotate(8deg); }
    92% { transform: rotate(16deg); }
    95% { transform: rotate(3deg); }
}

@keyframes bodyBreath {
    0%, 100% { transform: translateX(-50%) scaleY(1); }
    50% { transform: translateX(-50%) scaleY(1.025); }
}

@keyframes headNod {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    50% { transform: translateX(-50%) translateY(0.1rem) rotate(0.6deg); }
}

@keyframes whiskerTwitch {
    0%, 88%, 100% { transform: rotate(0deg); }
    92% { transform: rotate(3deg); }
    96% { transform: rotate(-2deg); }
}

@keyframes mouthIdle {
    0%, 85%, 100% { transform: translateX(-50%) scaleX(1); }
    90% { transform: translateX(-50%) scaleX(1.08); }
}


/* v1.4.2 premium hero */
header h1 {
    letter-spacing: -0.02em;
}

#kittyStage {
    min-height: 35.5rem;
    padding-top: 1.6rem;
    background:
        radial-gradient(circle at 50% 10%, rgba(255,255,255,0.2), transparent 28%),
        radial-gradient(circle at 50% 75%, rgba(255,255,255,0.08), transparent 42%);
}

#catAvatarWrap {
    width: min(100%, 22rem) !important;
    height: 21.5rem !important;
}

#catShadow {
    width: 9.8rem;
    height: 2rem;
    bottom: 1.7rem;
    opacity: 0.34;
    filter: blur(12px);
}

#catAvatar {
    height: 18rem !important;
    width: 18rem !important;
}

.cat-render {
    filter: drop-shadow(0 34px 54px rgba(15, 23, 42, 0.42));
}

.cat-body {
    width: 10.3rem;
    height: 9.5rem;
    border-radius: 47% 47% 38% 38%;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.24),
        inset 0 -12px 22px rgba(15,23,42,0.08),
        0 20px 40px rgba(15,23,42,0.16);
}

.cat-head {
    width: 10.2rem;
    height: 9.4rem;
    top: 2rem;
    border-radius: 45% 45% 47% 47%;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.28),
        inset 0 -14px 24px rgba(15,23,42,0.06),
        0 18px 36px rgba(15,23,42,0.14);
}

.cat-tail {
    right: 3rem;
    bottom: 4.25rem;
    width: 5.2rem;
    height: 1.6rem;
    transform: rotate(22deg);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1), 0 10px 20px rgba(15,23,42,0.12);
}

.cat-ear {
    width: 3rem;
    height: 3.6rem;
    top: -1.2rem;
}

.cat-face {
    inset: 0.2rem 0 0;
}

.cat-eye {
    top: 3.4rem;
    width: 1.22rem;
    height: 1.65rem;
    box-shadow:
        inset 0 -4px 0 rgba(15,23,42,0.12),
        0 0 0 1px rgba(255,255,255,0.14),
        0 8px 12px rgba(15,23,42,0.08);
}

.cat-eye-left { left: 2.2rem; }
.cat-eye-right { right: 2.2rem; }

.cat-eye::after {
    top: 0.18rem;
    width: 0.28rem;
    height: 0.58rem;
}

.cat-blush {
    top: 4.95rem;
    width: 1.35rem;
    height: 0.82rem;
    filter: blur(1px);
}

.cat-nose {
    top: 4.45rem;
}

.cat-mouth {
    top: 5.15rem;
}

.cat-whiskers {
    top: 4.95rem;
}

.cat-belly {
    width: 6.25rem;
    height: 5.4rem;
    box-shadow: inset 0 12px 18px rgba(255,255,255,0.13), inset 0 -10px 14px rgba(255,255,255,0.05);
}

.cat-paw {
    width: 2.2rem;
    height: 2.2rem;
    bottom: -0.32rem;
    box-shadow: inset 0 6px 8px rgba(255,255,255,0.08);
}

.stage-ring-1 { width: 14.2rem; height: 14.2rem; }
.stage-ring-2 { width: 16.6rem; height: 16.6rem; }
.stage-orb { filter: blur(14px); opacity: 0.55; }
.stage-orb-1 { width: 118px; height: 118px; }
.stage-orb-2 { width: 92px; height: 92px; }
.stage-orb-3 { width: 138px; height: 138px; }

.scene-classic .cat-body, .scene-classic .cat-head, .scene-classic .cat-tail, .scene-classic .cat-ear {
    background-image:
      radial-gradient(circle at 28% 18%, rgba(255,255,255,0.28), transparent 30%),
      linear-gradient(180deg, transparent, rgba(0,0,0,0.04)),
      repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 15px, rgba(120,60,20,0.11) 15px 19px);
}
.scene-midnight .cat-body, .scene-midnight .cat-head, .scene-midnight .cat-tail, .scene-midnight .cat-ear {
    background-image:
      radial-gradient(circle at 30% 18%, rgba(255,255,255,0.16), transparent 30%),
      linear-gradient(180deg, transparent, rgba(0,0,0,0.08)),
      repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 16px, rgba(255,255,255,0.05) 16px 20px);
}
.scene-cloud .cat-body, .scene-cloud .cat-head, .scene-cloud .cat-tail, .scene-cloud .cat-ear {
    background-image:
      radial-gradient(circle at 32% 18%, rgba(255,255,255,0.34), transparent 30%),
      linear-gradient(180deg, transparent, rgba(15,23,42,0.04)),
      repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 18px, rgba(147,197,253,0.12) 18px 22px);
}
.scene-peach .cat-body, .scene-peach .cat-head, .scene-peach .cat-tail, .scene-peach .cat-ear {
    background-image:
      radial-gradient(circle at 30% 18%, rgba(255,255,255,0.26), transparent 30%),
      linear-gradient(180deg, transparent, rgba(190,24,93,0.04)),
      repeating-linear-gradient(90deg, rgba(255,255,255,0) 0 17px, rgba(251,113,133,0.11) 17px 21px);
}

@media (max-width: 420px) {
    #kittyStage { min-height: 33.75rem; }
    #catAvatarWrap { height: 19.6rem !important; }
    #catAvatar { height: 16.6rem !important; width: 16.6rem !important; }
}
