.lc-widget {
    width: 250px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f3ec 100%);
    border: 1px solid #dfd5c5;
    border-radius: 18px;
    padding: 12px 14px;
    box-shadow: 0 12px 28px rgba(30, 25, 20, 0.14);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #2b2d42;
    user-select: none;
    box-sizing: border-box;
}
.lc-floating {
    position: fixed !important;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
    right: 16px !important;
    z-index: 2147483647 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.lc-inline { margin: 20px auto; }

.lc-top-bar {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; font-weight: 600; color: #7f7669; margin-bottom: 6px;
}
.lc-close-btn {
    cursor: pointer; background: #ede7dd; border: none; border-radius: 50%;
    width: 20px; height: 20px; line-height: 18px; text-align: center;
    font-size: 13px; color: #5c5346; padding: 0;
}
.lc-close-btn:hover { background: #dfd5c5; }

.lc-room {
    position: relative; height: 118px;
    background: radial-gradient(circle at 75% 25%, #f3efe6 0%, #e4ddd0 100%);
    border-radius: 12px; overflow: hidden; border: 1px solid #d6cbb9; cursor: pointer;
}

/* Окно: 4 времени суток */
.lc-window {
    position: absolute; top: 10px; right: 14px; width: 54px; height: 52px;
    border-radius: 6px; border: 2px solid #b8ab96; overflow: hidden;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.12); transition: background 0.6s ease;
}
.lc-window.morning { background: linear-gradient(180deg, #ff9a9e 0%, #fecfef 60%, #ffeaa7 100%); }
.lc-window.day     { background: linear-gradient(180deg, #4facfe 0%, #8fd3f4 100%); }
.lc-window.evening { background: linear-gradient(180deg, #2c3e50 0%, #fd746c 65%, #ff9068 100%); }
.lc-window.night   { background: linear-gradient(180deg, #090d16 0%, #1b263b 100%); }

/* Рама окна поверх неба */
.lc-window::after {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        linear-gradient(to right, transparent 48%, #b8ab96 48%, #b8ab96 52%, transparent 52%),
        linear-gradient(to bottom, transparent 48%, #b8ab96 48%, #b8ab96 52%, transparent 52%);
}

/* Светила и звёзды в окне */
.lc-sun-morning {
    position: absolute; bottom: 6px; left: 8px; width: 14px; height: 14px;
    border-radius: 50%; background: #ffe066; box-shadow: 0 0 10px #ffd166;
}
.lc-sun-day {
    position: absolute; top: 6px; right: 6px; width: 14px; height: 14px;
    border-radius: 50%; background: #ffd166; box-shadow: 0 0 10px #ffd166;
}
.lc-sun-evening {
    position: absolute; bottom: 4px; right: 8px; width: 15px; height: 15px;
    border-radius: 50%; background: #ff6b6b; box-shadow: 0 0 10px #ff8787;
}
.lc-moon {
    position: absolute; top: 7px; right: 8px; width: 11px; height: 11px;
    border-radius: 50%; box-shadow: -3px 2px 0 0 #f8f9fa;
}
.lc-stars {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle, #fff 1px, transparent 1.5px),
        radial-gradient(circle, #fff 0.8px, transparent 1.2px);
    background-size: 22px 22px, 15px 15px;
    background-position: 4px 5px, 11px 12px;
    animation: starTwinkle 2.5s infinite alternate;
}
.lc-cloud {
    position: absolute; top: 12px; left: -20px; width: 22px; height: 8px;
    background: rgba(255,255,255,0.85); border-radius: 10px;
    animation: cloudDrift 10s linear infinite;
}

.lc-floor {
    position: absolute; bottom: 0; width: 100%; height: 24px;
    background: linear-gradient(180deg, #cbb89d 0%, #b59e7e 100%);
    border-top: 1px solid #a89070;
}

.lc-actor {
    position: absolute; bottom: 10px; left: 50%; width: 115px; height: 95px;
    transform: translateX(-50%); transition: left 2.2s linear;
}
.lc-actor.flip { transform: translateX(-50%) scaleX(-1); }

.lc-bubble {
    position: absolute; top: 8px; left: 10px; background: #fff;
    border: 1px solid #d6cbb9; border-radius: 10px; padding: 3px 8px;
    font-size: 11px; font-weight: 600; color: #9c6644;
    opacity: 0; transform: translateY(5px); transition: all 0.25s ease;
    pointer-events: none; box-shadow: 0 2px 6px rgba(0,0,0,0.06); z-index: 5;
}
.lc-bubble.show { opacity: 1; transform: translateY(0); }

@keyframes walkBodyBob {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-2px) rotate(-1.5deg); }
    75% { transform: translateY(-2px) rotate(1.5deg); }
}
@keyframes legFrontA { 0%, 100% { transform: rotate(-18deg); } 50% { transform: rotate(22deg); } }
@keyframes legFrontB { 0%, 100% { transform: rotate(22deg); } 50% { transform: rotate(-18deg); } }
@keyframes tailSway  { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(10deg); } }
@keyframes chestBreathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.03); } }
@keyframes eyeBlink  { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.1); } }
@keyframes pawTypeL  { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes pawTypeR  { 0%, 100% { transform: translateY(-4px); } 50% { transform: translateY(0); } }
@keyframes zzzRise {
    0% { opacity: 0; transform: translate(0, 0) scale(0.8); }
    50% { opacity: 0.9; }
    100% { opacity: 0; transform: translate(8px, -14px) scale(1.15); }
}
@keyframes catHop { 0%, 100% { bottom: 10px; } 50% { bottom: 24px; } }
@keyframes cloudDrift { from { left: -26px; } to { left: 60px; } }
@keyframes starTwinkle { from { opacity: 0.5; } to { opacity: 1; } }

.lc-jump { animation: catHop 0.35s ease; }
.lc-walk-bob { animation: walkBodyBob 0.45s infinite ease-in-out; }
.lc-leg-a { transform-origin: top center; animation: legFrontA 0.45s infinite ease-in-out; }
.lc-leg-b { transform-origin: top center; animation: legFrontB 0.45s infinite ease-in-out; }
.lc-tail { transform-origin: 32px 68px; animation: tailSway 2.4s infinite ease-in-out; }
.lc-body { transform-origin: bottom; animation: chestBreathe 3s infinite ease-in-out; }
.lc-eyes { transform-origin: center 33px; animation: eyeBlink 4.5s infinite; }
.lc-paw-l { animation: pawTypeL 0.28s infinite; }
.lc-paw-r { animation: pawTypeR 0.28s infinite; }
.lc-zzz { animation: zzzRise 2.4s infinite ease-out; }

.lc-info {
    margin-top: 9px; display: flex; justify-content: space-between;
    align-items: center; font-size: 12px;
}
.lc-state-text { font-weight: 700; color: #3d352e; }
.lc-time { font-size: 11px; color: #8c8070; }

.lc-badges { display: flex; gap: 6px; margin-top: 8px; }
.lc-badge {
    flex: 1; background: #fff; border: 1px solid #e3dacb; border-radius: 8px;
    padding: 5px 6px; text-align: center; font-size: 11px; color: #7f7669;
}
.lc-badge b { display: block; font-size: 13px; color: #3d352e; }

@keyframes yarnRoll {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(-14px, -6px) rotate(-180deg); }
}
@keyframes batPaw {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-28deg) translateY(-4px); }
}
.lc-yarn { transform-box: fill-box; transform-origin: center; animation: yarnRoll 1.1s infinite ease-in-out; }
.lc-bat-paw { transform-origin: 62px 58px; animation: batPaw 0.55s infinite ease-in-out; }
@media (max-width: 600px) {
    .lc-widget.lc-floating {
        width: 210px;
        right: 10px !important;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 10px 11px;
        border-radius: 14px;
    }
    .lc-widget.lc-floating .lc-room {
        height: 98px;
    }
    .lc-widget.lc-floating .lc-badge {
        font-size: 10px;
        padding: 4px;
    }
    .lc-widget.lc-floating .lc-badge b {
        font-size: 11px;
    }
}