/* ─── Discordochi Game Page ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body.dochi-body {
    margin: 0;
    min-height: 100vh;
    background: #1e2124;
    color: #e4e6eb;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* ── Atmosphere ── */
.dochi-atmosphere {
    position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.13;
}
.blob-1 {
    width: 600px; height: 600px;
    background: #7289da;
    top: -200px; left: -150px;
    animation: drift1 18s ease-in-out infinite alternate;
}
.blob-2 {
    width: 500px; height: 500px;
    background: #9b59b6;
    bottom: -150px; right: -100px;
    animation: drift2 22s ease-in-out infinite alternate;
}
.blob-3 {
    width: 300px; height: 300px;
    background: #43b581;
    top: 50%; left: 55%;
    animation: drift3 15s ease-in-out infinite alternate;
}
@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(60px, 80px) scale(1.1); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-50px, -60px) scale(1.15); } }
@keyframes drift3 { from { transform: translate(0,0) scale(1); } to { transform: translate(40px, -50px) scale(0.9); } }

/* ── Shell / layout ── */
.dochi-shell {
    position: relative; z-index: 1;
    max-width: 900px; margin: 0 auto; padding: 24px 16px 60px;
}

/* ── Header ── */
.dochi-header {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 28px;
}
.dochi-header h1 { margin: 0; font-size: 1.6rem; font-weight: 700; color: #fff; }
.dochi-header-actions {
    display: flex; align-items: center; justify-content: flex-end;
    flex-wrap: wrap; gap: 10px;
}
.dochi-guild-select, .dochi-player-select {
    background: #1e2030; color: #e4e6eb; border: 1px solid #3a3f55;
    border-radius: 8px; padding: 8px 12px; font-size: .9rem; cursor: pointer;
    min-width: 200px;
}
.dochi-guild-select:focus, .dochi-player-select:focus { outline: 2px solid #7c5cbf; }
.dochi-back-link {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 39px; padding: 8px 14px;
    background: rgba(67, 181, 129, 0.12); color: #43b581;
    border: 1px solid #43b581; border-radius: 8px;
    text-decoration: none; font-size: .9rem; font-weight: 700;
    transition: background .2s, border-color .2s, color .2s;
}
.dochi-back-link:hover {
    background: rgba(67, 181, 129, 0.2);
    border-color: #5fd19b;
    color: #5fd19b;
}

/* ── Login notice ── */
.dochi-login-notice {
    background: #1e2030; border: 1px solid #3a3f55; border-radius: 12px;
    padding: 40px; text-align: center; color: #8b8fa8;
}
.dochi-login-notice a { color: #9b72e6; text-decoration: none; }
.dochi-login-notice a:hover { text-decoration: underline; }

.dochi-pause-notice {
    background: rgba(127, 29, 29, 0.72);
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 12px;
    color: #fecaca;
    margin-bottom: 20px;
    padding: 14px 16px;
    font-size: .92rem;
    line-height: 1.45;
}

/* ── Pet card ── */
.dochi-pet-card {
    position: relative;
    display: grid; grid-template-columns: 188px 1fr; gap: 0;
    background: #161824; border: 1px solid #2a2d42; border-radius: 14px;
    overflow: hidden; margin-bottom: 20px;
}
@media (max-width: 600px) { .dochi-pet-card { grid-template-columns: 1fr; } }

.dochi-avatar-wrap {
    background: #0f111a; position: relative;
    min-height: 212px; padding: 14px;
    display: flex; align-items: center; justify-content: center;
}
.dochi-pet-window {
    --pet-accent: #ffb86c;
    --pet-accent-soft: rgba(255, 184, 108, 0.24);
    --pet-room-top: #3d3858;
    --pet-room-mid: #28243d;
    --pet-room-bottom: #171624;
    --pet-weather-overlay: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
    --pet-weather-particles:
        radial-gradient(circle at 20% 26%, rgba(255,255,255,0.16) 0 2px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 72% 18%, rgba(255,255,255,0.12) 0 1.5px, rgba(255,255,255,0) 2.5px),
        radial-gradient(circle at 84% 34%, rgba(255,255,255,0.09) 0 1px, rgba(255,255,255,0) 2px);
    --pet-weather-disc: radial-gradient(circle at 74% 20%, rgba(255, 229, 150, 0.28) 0 12%, rgba(255,255,255,0) 30%);
    --pet-weather-clouds:
        radial-gradient(ellipse at 26% 38%, rgba(255,255,255,0.12) 0 16%, rgba(255,255,255,0) 17%),
        radial-gradient(ellipse at 56% 30%, rgba(255,255,255,0.09) 0 14%, rgba(255,255,255,0) 15%),
        radial-gradient(ellipse at 76% 46%, rgba(255,255,255,0.08) 0 12%, rgba(255,255,255,0) 13%);
    --pet-weather-fall: none;
    --pet-weather-fall-opacity: 0;
    --pet-floor-glow: rgba(255,255,255,0.04);
    --pet-window-overlay-animation: dochiPetWeatherGlow 12s ease-in-out infinite;
    --pet-backdrop-before-animation: dochiPetWeatherDrift 18s ease-in-out infinite alternate;
    --pet-backdrop-after-animation: dochiPetWeatherFall 8s linear infinite;
    --pet-floor-decor: none;
    --pet-floor-decor-height: 0px;
    --pet-floor-decor-bottom: 0px;
    --pet-floor-decor-radius: 0px;
    --pet-floor-decor-opacity: 0;
    --pet-fur-top: #ffd79b;
    --pet-fur-mid: #f2b870;
    --pet-fur-bottom: #d88c57;
    --pet-outline: #8a5538;
    --pet-belly-top: #fff2db;
    --pet-belly-bottom: #ffdcb1;
    --pet-inner-ear: #f8b2c0;
    position: relative;
    width: 150px;
    height: 188px;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    cursor: pointer;
    touch-action: manipulation;
    background:
        radial-gradient(circle at 18% 18%, rgba(255,255,255,0.14), rgba(255,255,255,0) 24%),
        radial-gradient(circle at 80% 24%, rgba(255,255,255,0.06), rgba(255,255,255,0) 18%),
        linear-gradient(180deg, var(--pet-room-top), var(--pet-room-mid) 58%, var(--pet-room-bottom));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 14px 36px rgba(0,0,0,0.32);
}
.dochi-live-pet-nav {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}
.dochi-live-pet-nav[hidden] { display: none; }
.dochi-live-pet-arrow {
    pointer-events: auto;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px;
    background: rgba(10, 12, 20, 0.76);
    color: #f6d7ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    opacity: 0.3;
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
    backdrop-filter: blur(10px);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}
.dochi-live-pet-arrow:hover {
    background: rgba(18, 21, 34, 0.88);
    border-color: rgba(246,215,255,0.28);
    opacity: 0.55;
    transform: translateY(-1px);
}
.dochi-live-pet-arrow:disabled {
    opacity: 0.16;
    cursor: default;
    transform: none;
}
.dochi-body.dochi-pet-focus .dochi-live-pet-nav {
    display: none !important;
}
.dochi-focus-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 7;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(10, 12, 20, 0.74);
    color: #f6d7ff;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
    backdrop-filter: blur(10px);
}
.dochi-focus-toggle:hover { background: rgba(18, 21, 34, 0.86); }
.dochi-focus-toggle[hidden] { display: none; }
.dochi-focus-guild-name {
    display: none;
    pointer-events: none;
}
.dochi-pet-window[data-mood="happy"] {
    --pet-accent: #43b581;
    --pet-accent-soft: rgba(67, 181, 129, 0.24);
    --pet-room-top: #384a63;
    --pet-room-mid: #29354a;
    --pet-room-bottom: #1a2130;
}
.dochi-pet-window[data-mood="playful"] {
    --pet-accent: #ff9f43;
    --pet-accent-soft: rgba(255, 159, 67, 0.26);
    --pet-room-top: #59403a;
    --pet-room-mid: #3a2b29;
    --pet-room-bottom: #231b1d;
}
.dochi-pet-window[data-mood="sleepy"],
.dochi-pet-window[data-mood="sleeping"] {
    --pet-accent: #4a5a90;
    --pet-accent-soft: rgba(74, 90, 144, 0.12);
    --pet-room-top: #05070e;
    --pet-room-mid: #020306;
    --pet-room-bottom: #000102;
    --pet-floor-glow: rgba(99, 102, 241, 0.03);
    /* Shadow the pet fur itself when sleeping */
    --pet-fur-top: #2a3356;
    --pet-fur-mid: #1b213c;
    --pet-fur-bottom: #101426;
    --pet-outline: #090c1a;
    --pet-belly-top: #343c5b;
    --pet-belly-bottom: #222941;
    --pet-inner-ear: #372330;
}
.dochi-pet-window[data-mood="working"] {
    --pet-accent: #f7c95f;
    --pet-accent-soft: rgba(247, 201, 95, 0.22);
    --pet-room-top: #524636;
    --pet-room-mid: #392f25;
    --pet-room-bottom: #201a15;
}
.dochi-pet-window[data-mood="nanny"] {
    --pet-accent: #f4a9f5;
    --pet-accent-soft: rgba(244, 169, 245, 0.24);
    --pet-room-top: #4c3757;
    --pet-room-mid: #35293f;
    --pet-room-bottom: #1c1722;
}
.dochi-pet-window[data-mood="sad"] {
    --pet-accent: #7ea6c9;
    --pet-accent-soft: rgba(126, 166, 201, 0.18);
    --pet-room-top: #3b4154;
    --pet-room-mid: #2a2f3e;
    --pet-room-bottom: #191c25;
}
.dochi-pet-window[data-mood="grumpy"] {
    --pet-accent: #f04747;
    --pet-accent-soft: rgba(240, 71, 71, 0.2);
    --pet-room-top: #503741;
    --pet-room-mid: #382730;
    --pet-room-bottom: #21171d;
}
.dochi-pet-window[data-mood="calm"] {
    --pet-accent: #72d5ea;
    --pet-accent-soft: rgba(114, 213, 234, 0.22);
    --pet-room-top: #394e61;
    --pet-room-mid: #2a3847;
    --pet-room-bottom: #1a212c;
}
.dochi-pet-window[data-weather="morning"] {
    --pet-weather-overlay: linear-gradient(180deg, rgba(255,231,181,0.2), rgba(255,186,133,0.06) 46%, rgba(255,255,255,0));
    --pet-weather-particles:
        radial-gradient(circle at 20% 24%, rgba(255,243,213,0.3) 0 2px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 68% 18%, rgba(255,228,176,0.26) 0 1.5px, rgba(255,255,255,0) 2.5px);
    --pet-weather-disc: radial-gradient(circle at 74% 20%, rgba(255,194,124,0.58) 0 14%, rgba(255,194,124,0.12) 19%, rgba(255,255,255,0) 34%);
    --pet-weather-clouds:
        radial-gradient(ellipse at 28% 42%, rgba(255,235,213,0.2) 0 18%, rgba(255,255,255,0) 19%),
        radial-gradient(ellipse at 58% 34%, rgba(255,221,192,0.16) 0 16%, rgba(255,255,255,0) 17%),
        radial-gradient(ellipse at 78% 50%, rgba(255,234,210,0.14) 0 14%, rgba(255,255,255,0) 15%);
    --pet-floor-glow: rgba(255,198,126,0.12);
}
.dochi-pet-window[data-weather="day"] {
    --pet-weather-overlay: linear-gradient(180deg, rgba(168,219,255,0.18), rgba(255,255,255,0.02) 52%, rgba(255,255,255,0));
    --pet-weather-particles:
        radial-gradient(circle at 26% 24%, rgba(255,255,255,0.2) 0 2px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 74% 16%, rgba(255,255,255,0.16) 0 1.6px, rgba(255,255,255,0) 2.6px);
    --pet-weather-disc: radial-gradient(circle at 78% 18%, rgba(255,232,124,0.68) 0 14%, rgba(255,232,124,0.18) 18%, rgba(255,255,255,0) 34%);
    --pet-weather-clouds:
        radial-gradient(ellipse at 28% 36%, rgba(255,255,255,0.22) 0 18%, rgba(255,255,255,0) 19%),
        radial-gradient(ellipse at 56% 28%, rgba(255,255,255,0.16) 0 16%, rgba(255,255,255,0) 17%),
        radial-gradient(ellipse at 76% 46%, rgba(255,255,255,0.12) 0 14%, rgba(255,255,255,0) 15%);
    --pet-floor-glow: rgba(117,198,255,0.11);
}
.dochi-pet-window[data-weather="sunset"] {
    --pet-weather-overlay: linear-gradient(180deg, rgba(255,176,111,0.24), rgba(255,117,117,0.08) 54%, rgba(255,255,255,0));
    --pet-weather-particles:
        radial-gradient(circle at 18% 24%, rgba(255,210,166,0.22) 0 2px, rgba(255,255,255,0) 3px),
        radial-gradient(circle at 76% 18%, rgba(255,179,132,0.18) 0 1.5px, rgba(255,255,255,0) 2.5px);
    --pet-weather-disc: radial-gradient(circle at 76% 24%, rgba(255,152,90,0.66) 0 15%, rgba(255,152,90,0.16) 20%, rgba(255,255,255,0) 38%);
    --pet-weather-clouds:
        radial-gradient(ellipse at 24% 38%, rgba(255,203,173,0.2) 0 18%, rgba(255,255,255,0) 19%),
        radial-gradient(ellipse at 54% 30%, rgba(255,171,163,0.18) 0 16%, rgba(255,255,255,0) 17%),
        radial-gradient(ellipse at 74% 48%, rgba(255,199,158,0.14) 0 14%, rgba(255,255,255,0) 15%);
    --pet-floor-glow: rgba(255,146,103,0.12);
}
.dochi-pet-window[data-weather="night"] {
    --pet-weather-overlay: linear-gradient(180deg, rgba(137,161,255,0.12), rgba(20,26,49,0.2) 55%, rgba(255,255,255,0));
    --pet-weather-particles:
        radial-gradient(circle at 12% 20%, rgba(231,240,255,0.82) 0 1.6px, rgba(255,255,255,0) 2.8px),
        radial-gradient(circle at 28% 32%, rgba(228,234,255,0.52) 0 1.2px, rgba(255,255,255,0) 2.3px),
        radial-gradient(circle at 66% 18%, rgba(231,238,255,0.74) 0 1.5px, rgba(255,255,255,0) 2.6px),
        radial-gradient(circle at 82% 28%, rgba(224,232,255,0.48) 0 1.1px, rgba(255,255,255,0) 2.2px),
        radial-gradient(circle at 74% 10%, rgba(255,255,255,0.4) 0 1px, rgba(255,255,255,0) 2px);
    --pet-weather-disc:
        radial-gradient(circle at 76% 18%, rgba(224,232,255,0.54) 0 9%, rgba(224,232,255,0.14) 13%, rgba(255,255,255,0) 28%),
        radial-gradient(circle at 79% 17%, rgba(98,114,164,0.3) 0 4%, rgba(255,255,255,0) 5%);
    --pet-weather-clouds:
        radial-gradient(ellipse at 26% 40%, rgba(131,149,214,0.12) 0 18%, rgba(255,255,255,0) 19%),
        radial-gradient(ellipse at 58% 30%, rgba(121,140,207,0.1) 0 16%, rgba(255,255,255,0) 17%),
        radial-gradient(ellipse at 78% 50%, rgba(108,128,196,0.08) 0 14%, rgba(255,255,255,0) 15%);
    --pet-floor-glow: rgba(124,141,232,0.1);
}
.dochi-pet-window[data-mood="sleepy"],
.dochi-pet-window[data-mood="sleeping"] {
    --pet-weather-overlay: linear-gradient(180deg, rgba(104, 123, 214, 0.18), rgba(24, 31, 62, 0.34) 52%, rgba(10, 13, 24, 0.2));
    --pet-weather-particles:
        radial-gradient(circle at 12% 18%, rgba(243,247,255,0.86) 0 1.4px, rgba(255,255,255,0) 2.7px),
        radial-gradient(circle at 28% 28%, rgba(243,247,255,0.54) 0 1.1px, rgba(255,255,255,0) 2.2px),
        radial-gradient(circle at 66% 16%, rgba(243,247,255,0.78) 0 1.45px, rgba(255,255,255,0) 2.8px),
        radial-gradient(circle at 82% 26%, rgba(243,247,255,0.52) 0 1.1px, rgba(255,255,255,0) 2.2px),
        radial-gradient(circle at 74% 10%, rgba(255,255,255,0.44) 0 1px, rgba(255,255,255,0) 2px),
        radial-gradient(circle at 46% 14%, rgba(243,247,255,0.6) 0 1.2px, rgba(255,255,255,0) 2.4px);
    --pet-weather-disc: radial-gradient(circle at 76% 18%, rgba(235,241,255,0.88) 0 9%, rgba(235,241,255,0.24) 13%, rgba(255,255,255,0) 30%);
    --pet-weather-clouds:
        radial-gradient(ellipse at 24% 40%, rgba(156,170,232,0.12) 0 18%, rgba(255,255,255,0) 19%),
        radial-gradient(ellipse at 58% 30%, rgba(132,148,217,0.1) 0 16%, rgba(255,255,255,0) 17%),
        radial-gradient(ellipse at 76% 48%, rgba(118,132,198,0.08) 0 14%, rgba(255,255,255,0) 15%);
    --pet-floor-glow: rgba(126,145,234,0.08);
    --pet-window-overlay-animation: dochiPetSleepSkyTwinkle 6.8s ease-in-out infinite;
    --pet-backdrop-before-animation: dochiPetSleepMoonFloat 10s ease-in-out infinite alternate;
    --pet-floor-decor-height: 62px;
    --pet-floor-decor-bottom: -2px;
    --pet-floor-decor-radius: 18px;
    --pet-floor-decor-opacity: 1;
    --pet-floor-decor:
        linear-gradient(180deg, rgba(84,68,86,0.96), rgba(56,42,58,0.96)) 50% 92% / 92px 14px no-repeat,
        linear-gradient(180deg, rgba(104,78,110,0.98), rgba(73,56,90,0.98)) 50% 52% / 92px 18px no-repeat,
        linear-gradient(180deg, rgba(230,220,245,0.98), rgba(205,192,232,0.98)) 50% 34% / 34px 14px no-repeat,
        linear-gradient(180deg, rgba(123,146,226,0.92), rgba(89,110,190,0.92)) 50% 70% / 78px 24px no-repeat,
        linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0)) 50% 66% / 76px 14px no-repeat;
}
.dochi-pet-window[data-mood="working"] {
    --pet-weather-overlay: linear-gradient(180deg, rgba(224,213,189,0.28), rgba(196,183,154,0.16) 52%, rgba(120,96,68,0.06));
    --pet-weather-particles:
        linear-gradient(180deg, rgba(131,158,201,0.28), rgba(81,110,156,0.12)) 80% 19% / 42px 48px no-repeat,
        linear-gradient(90deg, rgba(255,255,255,0.18) 0 2px, rgba(255,255,255,0) 2px 20px, rgba(255,255,255,0.18) 20px 22px, rgba(255,255,255,0) 22px) 80% 19% / 42px 48px no-repeat,
        linear-gradient(180deg, rgba(92,72,48,0.22), rgba(92,72,48,0.22)) 22% 28% / 32px 4px no-repeat,
        linear-gradient(180deg, rgba(108,86,59,0.16), rgba(108,86,59,0.16)) 22% 34% / 26px 20px no-repeat,
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
    --pet-weather-disc: radial-gradient(circle at 80% 19%, rgba(246,232,188,0.38) 0 13%, rgba(246,232,188,0.08) 18%, rgba(255,255,255,0) 32%);
    --pet-weather-clouds:
        radial-gradient(ellipse at 26% 38%, rgba(255,255,255,0.08) 0 16%, rgba(255,255,255,0) 17%),
        radial-gradient(ellipse at 58% 28%, rgba(255,255,255,0.05) 0 14%, rgba(255,255,255,0) 15%);
    --pet-floor-glow: rgba(183,147,102,0.1);
    --pet-floor-decor-height: 58px;
    --pet-floor-decor-bottom: -2px;
    --pet-floor-decor-radius: 16px;
    --pet-floor-decor-opacity: 1;
    --pet-floor-decor:
        linear-gradient(180deg, rgba(67,78,92,0.98), rgba(36,44,56,0.98)) 54% 18% / 36px 20px no-repeat,
        linear-gradient(180deg, rgba(28,34,42,0.94), rgba(28,34,42,0.94)) 54% 35% / 8px 9px no-repeat,
        linear-gradient(180deg, rgba(149,106,64,0.98), rgba(102,70,40,0.98)) 50% 56% / 96px 10px no-repeat,
        linear-gradient(180deg, rgba(96,66,38,0.94), rgba(70,47,28,0.94)) 24% 86% / 8px 30px no-repeat,
        linear-gradient(180deg, rgba(96,66,38,0.94), rgba(70,47,28,0.94)) 76% 86% / 8px 30px no-repeat,
        radial-gradient(circle, rgba(247,241,233,0.94) 0 56%, rgba(255,255,255,0) 57%) 78% 48% / 11px 11px no-repeat;
}
.dochi-pet-window[data-mood="nanny"] {
    --pet-weather-overlay: linear-gradient(180deg, rgba(255,228,239,0.28), rgba(218,233,255,0.14) 56%, rgba(255,255,255,0));
    --pet-weather-particles:
        repeating-linear-gradient(90deg, rgba(255,255,255,0.08) 0 18px, rgba(255,255,255,0) 18px 36px),
        radial-gradient(circle at 18% 24%, rgba(255,207,226,0.26) 0 6px, rgba(255,255,255,0) 7px),
        radial-gradient(circle at 74% 18%, rgba(209,232,255,0.24) 0 7px, rgba(255,255,255,0) 8px),
        radial-gradient(circle at 58% 34%, rgba(255,239,176,0.18) 0 4px, rgba(255,255,255,0) 5px),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
    --pet-weather-disc: radial-gradient(circle at 76% 20%, rgba(255,248,211,0.34) 0 12%, rgba(255,248,211,0.08) 18%, rgba(255,255,255,0) 34%);
    --pet-weather-clouds:
        radial-gradient(ellipse at 26% 38%, rgba(255,244,248,0.22) 0 18%, rgba(255,255,255,0) 19%),
        radial-gradient(ellipse at 58% 30%, rgba(233,241,255,0.18) 0 16%, rgba(255,255,255,0) 17%),
        radial-gradient(ellipse at 78% 48%, rgba(255,233,243,0.14) 0 14%, rgba(255,255,255,0) 15%);
    --pet-floor-glow: rgba(255,179,210,0.11);
    --pet-floor-decor-height: 58px;
    --pet-floor-decor-bottom: -1px;
    --pet-floor-decor-radius: 16px;
    --pet-floor-decor-opacity: 1;
    --pet-floor-decor:
        linear-gradient(180deg, rgba(255,223,149,0.98), rgba(236,169,115,0.98)) 50% 60% / 66px 24px no-repeat,
        linear-gradient(180deg, rgba(255,241,186,0.98), rgba(247,205,123,0.98)) 50% 42% / 66px 10px no-repeat,
        linear-gradient(180deg, rgba(255,122,156,0.96), rgba(243,84,126,0.96)) 20% 70% / 12px 12px no-repeat,
        linear-gradient(180deg, rgba(126,209,255,0.96), rgba(79,165,236,0.96)) 32% 66% / 14px 14px no-repeat,
        linear-gradient(180deg, rgba(157,229,127,0.96), rgba(97,184,79,0.96)) 74% 68% / 14px 14px no-repeat,
        linear-gradient(180deg, rgba(255,189,214,0.96), rgba(247,146,183,0.96)) 84% 72% / 10px 10px no-repeat;
}
.dochi-pet-window::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--pet-weather-particles), var(--pet-weather-overlay);
    opacity: 0.9;
    pointer-events: none;
    animation: var(--pet-window-overlay-animation);
}
.dochi-pet-window-backdrop {
    position: absolute;
    width: 170px;
    height: 170px;
    left: -34px;
    top: -50px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--pet-accent-soft), rgba(255,255,255,0) 70%);
    filter: blur(9px);
}
.dochi-pet-window-backdrop::before,
.dochi-pet-window-backdrop::after {
    content: "";
    position: absolute;
    inset: -18px;
    pointer-events: none;
}
.dochi-pet-window-backdrop::before {
    border-radius: 50%;
    background: var(--pet-weather-disc), var(--pet-weather-clouds);
    animation: var(--pet-backdrop-before-animation);
}
.dochi-pet-window-backdrop::after {
    inset: -8px -4px;
    background: var(--pet-weather-fall);
    background-size: 22px 22px;
    opacity: var(--pet-weather-fall-opacity);
    mix-blend-mode: screen;
    animation: var(--pet-backdrop-after-animation);
}
.dochi-pet-window-floor {
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 10px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(10,13,19,0.7));
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 -10px 24px var(--pet-floor-glow);
}
.dochi-pet-window-floor::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 13px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0)),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.02) 0 14px, rgba(255,255,255,0.04) 14px 15px);
    opacity: 0.45;
}
.dochi-pet-window-floor::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: var(--pet-floor-decor-bottom);
    height: var(--pet-floor-decor-height);
    border-radius: var(--pet-floor-decor-radius);
    background: var(--pet-floor-decor);
    opacity: var(--pet-floor-decor-opacity);
    pointer-events: none;
}
@keyframes dochiPetWeatherGlow {
    0%, 100% { opacity: 0.82; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(-2px); }
}
@keyframes dochiPetSleepSkyTwinkle {
    0%, 100% { opacity: 0.76; transform: translateY(0); }
    35% { opacity: 1; transform: translateY(-1px); }
    62% { opacity: 0.88; transform: translateY(0); }
    78% { opacity: 1; transform: translateY(-2px); }
}
@keyframes dochiPetWeatherDrift {
    0% { transform: translate3d(-4px, 0, 0) scale(1); }
    50% { transform: translate3d(3px, -3px, 0) scale(1.03); }
    100% { transform: translate3d(8px, 2px, 0) scale(0.98); }
}
@keyframes dochiPetSleepMoonFloat {
    0% { transform: translate3d(-2px, 0, 0) scale(1); opacity: 0.8; }
    50% { transform: translate3d(4px, -4px, 0) scale(1.06); opacity: 1; }
    100% { transform: translate3d(8px, -1px, 0) scale(0.99); opacity: 0.8; }
}
@keyframes dochiPetWeatherFall {
    0% { background-position: 0 0; }
    100% { background-position: -24px 84px; }
}
.dochi-pet-rig {
    position: absolute;
    left: 50%;
    bottom: 10px;
    width: 142px;
    height: 164px;
    transform: translateX(-50%) scale(1);
    transform-origin: center bottom;
    z-index: 2;
    pointer-events: none;
}
.dochi-pet-shadow {
    position: absolute;
    left: 50%;
    bottom: 4px;
    width: 82px;
    height: 16px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(4,6,10,0.48), rgba(4,6,10,0) 72%);
    filter: blur(4px);
}
.dochi-pet-tail {
    position: absolute;
    right: -8px;
    bottom: 28px;
    width: 28px;
    height: 56px;
    border-radius: 70% 50% 60% 50%;
    background: linear-gradient(180deg, var(--pet-fur-top), var(--pet-fur-bottom));
    border: 2px solid var(--pet-outline);
    box-shadow: 0 8px 12px rgba(0,0,0,0.12);
    transform: rotate(58deg);
    transform-origin: 16% 100%;
    z-index: 0;
}
.dochi-pet-tail::after {
    content: "";
    position: absolute;
    inset: 6px 5px 10px 7px;
    border-radius: 70% 50% 60% 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.26), rgba(255,255,255,0));
}
.dochi-pet-ear {
    position: absolute;
    top: -12px;
    width: 32px;
    height: 42px;
    background: linear-gradient(180deg, var(--pet-fur-top), var(--pet-fur-mid));
    border: 2px solid var(--pet-outline);
    box-shadow: 0 8px 14px rgba(0,0,0,0.1);
    z-index: 1;
    transform-origin: 50% 100%;
}
.dochi-pet-ear::after {
    content: "";
    position: absolute;
    inset: 7px 8px 11px;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.18), var(--pet-inner-ear));
}
.dochi-pet-ear-left {
    left: 10px;
    border-radius: 76% 24% 58% 32%;
    transform: rotate(-12deg);
}
.dochi-pet-ear-right {
    right: 10px;
    border-radius: 24% 76% 32% 58%;
    transform: rotate(12deg);
}
.dochi-pet-limb {
    position: absolute;
    background: linear-gradient(180deg, var(--pet-fur-top), var(--pet-fur-bottom));
    border: 2px solid var(--pet-outline);
    border-radius: 999px;
    box-shadow: 0 8px 14px rgba(0,0,0,0.14);
}
.dochi-pet-limb::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--pet-belly-bottom);
    border: 2px solid rgba(138, 85, 56, 0.44);
}
.dochi-pet-leg {
    bottom: 8px;
    width: 16px;
    height: 44px;
    transform-origin: top center;
    z-index: 1;
}
.dochi-pet-leg::after {
    bottom: -8px;
    width: 24px;
    height: 12px;
}
.dochi-pet-leg-left { left: 47px; }
.dochi-pet-leg-right { right: 47px; }
.dochi-pet-arm {
    bottom: 48px;
    width: 15px;
    height: 52px;
    transform-origin: top center;
    z-index: 2;
}
.dochi-pet-arm::after {
    bottom: -7px;
    width: 18px;
    height: 18px;
}
.dochi-pet-arm-left {
    left: 14px;
    transform: rotate(20deg);
}
.dochi-pet-arm-right {
    right: 14px;
    transform: rotate(-20deg);
}
.dochi-pet-tail-wrap,
.dochi-pet-body-wrap {
    position: absolute;
    left: 50%;
    bottom: 18px;
    width: 112px;
    height: 124px;
    transform: translateX(-50%);
    transform-origin: 50% 88%;
}
.dochi-pet-tail-wrap {
    z-index: 1;
    pointer-events: none;
}
.dochi-pet-body-wrap {
    z-index: 3;
}
.dochi-pet-body {
    position: absolute;
    inset: 0;
    border-radius: 44% 44% 38% 38% / 36% 36% 44% 44%;
    overflow: hidden;
    border: 2px solid var(--pet-outline);
    background: linear-gradient(180deg, var(--pet-fur-top), var(--pet-fur-bottom));
    box-shadow: 0 18px 26px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,255,255,0.22);
    z-index: 2;
}
.dochi-pet-avatar-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.dochi-pet-body-avatar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    opacity: 1;
    filter: saturate(0.96) contrast(1.02) brightness(0.92);
    display: block;
    z-index: 1;
}
.dochi-pet-body-avatar-placeholder {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, #1e2030, #383d59);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.5);
    z-index: 0;
}
.dochi-pet-body-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 24% 24%, rgba(255,255,255,0.16), rgba(255,255,255,0) 20%),
        radial-gradient(circle at 72% 18%, rgba(255,255,255,0.14), rgba(255,255,255,0) 16%),
        radial-gradient(circle at 20% 64%, rgba(255,255,255,0.08), rgba(255,255,255,0) 18%);
    opacity: 0.9;
    z-index: 1;
}
.dochi-pet-face {
    position: absolute;
    left: 50%;
    top: 22px;
    width: 58px;
    height: 30px;
    transform: translateX(-50%);
    z-index: 3;
}
.dochi-pet-eye {
    position: absolute;
    top: 4px;
    width: 8px;
    height: 12px;
    border-radius: 999px;
    background: #2c1f1c;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.08) inset;
}
.dochi-pet-eye-left { left: 12px; }
.dochi-pet-eye-right { right: 12px; }
.dochi-pet-mouth {
    position: absolute;
    left: 50%;
    bottom: 1px;
    width: 18px;
    height: 12px;
    transform: translateX(-50%);
    border-bottom: 2px solid #7d4b3d;
    border-radius: 0 0 14px 14px;
}
.dochi-pet-mouth::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -7px;
    width: 8px;
    height: 6px;
    margin-left: -4px;
    border-radius: 999px 999px 80% 80%;
    background: #7d4b3d;
}
.dochi-pet-blush {
    position: absolute;
    top: 48px;
    width: 14px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 149, 173, 0.45);
    filter: blur(0.2px);
    z-index: 3;
}
.dochi-pet-blush-left { left: 17px; }
.dochi-pet-blush-right { right: 17px; }
.dochi-avatar[hidden] { display: none; }
.dochi-avatar-placeholder[hidden] { display: none; }
.dochi-pet-avatar-shine {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.14), rgba(255,255,255,0.02) 42%, rgba(0,0,0,0.12)),
        radial-gradient(circle at 26% 22%, rgba(255,255,255,0.34), rgba(255,255,255,0.08) 24%, rgba(255,255,255,0) 50%);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 2;
}
.dochi-pet-body-shine {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 26% 18%, rgba(255,255,255,0.44), rgba(255,255,255,0.12) 22%, rgba(255,255,255,0) 50%);
    mix-blend-mode: screen;
    pointer-events: none;
    z-index: 4;
}
.dochi-pet-effect-layer {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
}
.dochi-pet-effect {
    position: absolute;
    left: 50%;
    bottom: 102px;
    font-size: 20px;
    line-height: 1;
    opacity: 0;
    transform: translate(-50%, 0) scale(0.6);
    text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.dochi-pet-effect-1 { margin-left: -20px; }
.dochi-pet-effect-2 { margin-left: 0; }
.dochi-pet-effect-3 { margin-left: 20px; }
.dochi-pet-effect.is-live { animation: dochiPetEffectFloat 1.2s ease-out forwards; }
.dochi-pet-window[data-effect-action="feed"] .dochi-pet-effect {
    bottom: 106px;
}
.dochi-pet-window[data-effect-action="feed"] .dochi-pet-effect.is-live {
    animation: dochiPetEffectFeed 0.95s ease-in forwards;
}
.dochi-pet-effect-burst {
    position: absolute;
    left: 50%;
    bottom: 82px;
    font-size: var(--pet-burst-size, 18px);
    line-height: 1;
    opacity: 0;
    transform: translate(calc(-50% + var(--pet-burst-x-start, 0px)), 0) scale(0.55) rotate(var(--pet-burst-rotate-start, 0deg));
    text-shadow: 0 4px 12px rgba(0,0,0,0.28);
    animation: dochiPetHeartBurst var(--pet-burst-duration, 1.25s) ease-out forwards;
}
.dochi-pet-prop {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}
.dochi-pet-prop-sleep {
    top: 10px;
    right: 14px;
    width: 40px;
    height: 40px;
}
.dochi-zz {
    position: absolute;
    font-weight: bold;
    opacity: 0;
    font-family: "Courier New", Courier, monospace;
}
.dochi-zz.z1 {
    font-size: 13px;
    color: #e0e7ff;
    text-shadow: 0 0 8px rgba(129, 140, 248, 0.9), 0 0 16px rgba(129, 140, 248, 0.5);
    animation: dochiPetZzzFloat1 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
.dochi-zz.z2 {
    font-size: 17px;
    color: #f5f3ff;
    text-shadow: 0 0 8px rgba(167, 139, 250, 0.9), 0 0 16px rgba(167, 139, 250, 0.5);
    animation: dochiPetZzzFloat2 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    animation-delay: 1.5s;
}
.dochi-zz.z3 {
    font-size: 21px;
    color: #fae8ff;
    text-shadow: 0 0 8px rgba(232, 121, 249, 0.9), 0 0 16px rgba(232, 121, 249, 0.5);
    animation: dochiPetZzzFloat3 4.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    animation-delay: 3s;
}

/* Sleeping Nightcap */
.dochi-pet-nightcap {
    position: absolute;
    top: -28px;
    left: 21px;
    width: 70px;
    height: 38px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    border: 2px solid #1e1b4b;
    border-bottom: none;
    border-radius: 40px 40px 0 0;
    z-index: 10;
    opacity: 0;
    transform: rotate(-10deg) scale(0.9) translateY(4px);
    transform-origin: bottom center;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}
.dochi-pet-nightcap::before {
    content: "";
    position: absolute;
    bottom: -6px;
    left: -4px;
    width: calc(100% + 8px);
    height: 12px;
    background: #ffffff;
    border: 2px solid #1e1b4b;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
}
.dochi-pet-nightcap::after {
    content: "";
    position: absolute;
    top: 4px;
    right: -20px;
    width: 24px;
    height: 22px;
    background: #4f46e5;
    border: 2px solid #1e1b4b;
    border-left: none;
    border-radius: 0 20px 20px 0;
    transform: rotate(15deg);
    transform-origin: left top;
}
.dochi-pet-nightcap-pom {
    position: absolute;
    top: 20px;
    right: -28px;
    width: 14px;
    height: 14px;
    background: #ffffff;
    border: 2px solid #1e1b4b;
    border-radius: 50%;
    z-index: 11;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    transform-origin: center center;
}
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-nightcap,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-nightcap,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-nightcap {
    opacity: 1;
    transform: rotate(-10deg) scale(1) translateY(0);
}
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-nightcap-pom,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-nightcap-pom {
    animation: dochiPetNightcapPomWiggle 4.2s ease-in-out infinite;
}
@keyframes dochiPetNightcapPomWiggle {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(2px) scale(1.08) rotate(6deg); }
}

/* Sleepy Nasal Bubble */
.dochi-pet-sleep-bubble {
    position: absolute;
    bottom: 2px;
    left: calc(50% + 5px);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(147, 197, 253, 0.4);
    border: 1px solid rgba(191, 219, 254, 0.75);
    box-shadow: 0 0 4px rgba(147, 197, 253, 0.3);
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
    transform-origin: bottom left;
    transition: opacity 0.3s ease;
    z-index: 5;
}
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-sleep-bubble,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-sleep-bubble,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-sleep-bubble {
    animation: dochiPetSleepBubble 4.2s ease-in-out infinite;
}
@keyframes dochiPetSleepBubble {
    0% { transform: scale(0); opacity: 0; }
    40% { transform: scale(1.2) translate(-2px, -2px); opacity: 0.85; }
    48% { transform: scale(1.4) translate(-3px, -3px); opacity: 0.95; }
    50% { transform: scale(0) translate(-3px, -3px); opacity: 0; }
    100% { transform: scale(0); opacity: 0; }
}
.dochi-pet-prop-briefcase {
    right: 12px;
    bottom: 20px;
    width: 22px;
    height: 18px;
    border-radius: 6px;
    background: linear-gradient(180deg, #856846, #5d422a);
    border: 2px solid rgba(44, 31, 20, 0.5);
    box-shadow: 0 6px 10px rgba(0,0,0,0.18);
}
.dochi-pet-prop-briefcase::before {
    content: "";
    position: absolute;
    left: 5px;
    right: 5px;
    top: -7px;
    height: 8px;
    border: 2px solid rgba(44, 31, 20, 0.5);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}
.dochi-pet-prop-plush {
    top: 22px;
    left: 16px;
    width: 20px;
    height: 20px;
    border-radius: 44% 44% 48% 48%;
    background: linear-gradient(180deg, #d7a26a, #b67447);
    border: 2px solid rgba(115, 68, 39, 0.45);
    box-shadow: 0 6px 10px rgba(0,0,0,0.14);
}
.dochi-pet-prop-plush::before {
    content: "";
    position: absolute;
    left: 1px;
    top: -6px;
    width: 6px;
    height: 8px;
    border-radius: 50%;
    background: #c98a5a;
    box-shadow: 10px 0 0 #c98a5a;
}
.dochi-pet-prop-plush::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    width: 10px;
    height: 8px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 30%, #f6e1c6 0 2px, transparent 3px), linear-gradient(180deg, #f8e6cf, #efcfa7);
}
.dochi-pet-prop-bottle {
    top: 20px;
    right: 18px;
    width: 13px;
    height: 30px;
    border-radius: 8px 8px 10px 10px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(244, 236, 220, 0.98));
    border: 2px solid rgba(150, 166, 189, 0.45);
    box-shadow: 0 6px 10px rgba(0,0,0,0.12);
}
.dochi-pet-prop-bottle::before {
    content: "";
    position: absolute;
    left: 2px;
    right: 2px;
    top: -6px;
    height: 8px;
    border-radius: 5px 5px 3px 3px;
    background: linear-gradient(180deg, #8fd8ff, #5aa7dc);
    border: 2px solid rgba(84, 127, 164, 0.38);
}
.dochi-pet-prop-bottle::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    bottom: 6px;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(180deg, rgba(255, 229, 173, 0.95), rgba(255, 212, 132, 0.95));
}
.dochi-pet-prop-rattle {
    left: 10px;
    bottom: 16px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: conic-gradient(from 30deg, #ffd5e4 0 14%, #ff88b0 14% 28%, #ffe4ed 28% 42%, #f56d97 42% 56%, #ffdbe8 56% 70%, #ff7ba5 70% 84%, #ffe8f0 84% 100%);
    border: 2px solid rgba(171, 70, 102, 0.4);
    box-shadow: 0 6px 10px rgba(0,0,0,0.12);
    transform: rotate(-10deg);
}
.dochi-pet-prop-rattle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 13px;
    width: 6px;
    height: 17px;
    margin-left: -3px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f7e7c7, #ddb07b);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}
.dochi-pet-prop-rattle::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 34% 34%, rgba(255,255,255,0.75), rgba(255,255,255,0.1) 36%, rgba(255,255,255,0) 42%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0) 0 34%, rgba(255,255,255,0.55) 35% 45%, rgba(255,255,255,0) 46% 100%);
}
.dochi-pet-prop-book {
    right: 7px;
    bottom: 14px;
    width: 28px;
    height: 20px;
    border-radius: 5px 6px 6px 5px;
    background: linear-gradient(180deg, #6fb684, #4b8f5c);
    border: 2px solid rgba(58, 105, 66, 0.42);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
    transform: rotate(-8deg);
}
.dochi-pet-prop-book::before {
    content: "";
    position: absolute;
    left: 6px;
    right: -1px;
    top: 2px;
    bottom: -1px;
    border-radius: 3px 5px 5px 2px;
    background:
        linear-gradient(90deg, rgba(181, 140, 87, 0.4) 0 2px, rgba(255,255,255,0) 2px 100%),
        repeating-linear-gradient(180deg, rgba(181, 140, 87, 0.22) 0 1px, rgba(255,255,255,0) 1px 4px),
        linear-gradient(180deg, #fff8e6, #f1e2bc);
    border: 1px solid rgba(162, 132, 92, 0.25);
}
.dochi-pet-prop-book::after {
    content: "";
    position: absolute;
    left: 12px;
    top: 2px;
    width: 6px;
    height: 12px;
    background: linear-gradient(180deg, #ffdca3, #ffbe4c);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
}
.dochi-status-badge {
    position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
    background: rgba(9, 12, 17, 0.86); border: 1px solid rgba(255,255,255,0.08); border-radius: 20px;
    padding: 3px 9px; font-size: .67rem; white-space: nowrap;
    z-index: 5;
}

.dochi-pet-window[data-mood="calm"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetIdleCalm 3.4s ease-in-out infinite; }
.dochi-pet-window[data-mood="calm"] .dochi-pet-arm-left,
.dochi-pet-window[data-mood="calm"] .dochi-pet-arm-right { animation: dochiPetArmsCalm 3.4s ease-in-out infinite; }
.dochi-pet-window[data-mood="calm"] .dochi-pet-tail { animation: dochiPetTailWave 3.4s ease-in-out infinite; }
.dochi-pet-window[data-mood="happy"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetIdleHappy 2.5s ease-in-out infinite; }
.dochi-pet-window[data-mood="happy"] .dochi-pet-arm-left { animation: dochiPetArmHappyLeft 2.5s ease-in-out infinite; }
.dochi-pet-window[data-mood="happy"] .dochi-pet-arm-right { animation: dochiPetArmHappyRight 2.5s ease-in-out infinite; }
.dochi-pet-window[data-mood="happy"] .dochi-pet-tail { animation: dochiPetTailHappy 2.2s ease-in-out infinite; }
.dochi-pet-window[data-mood="playful"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetIdlePlayful 1.9s ease-in-out infinite; }
.dochi-pet-window[data-mood="playful"] .dochi-pet-arm-left { animation: dochiPetArmPlayfulLeft 1.9s ease-in-out infinite; }
.dochi-pet-window[data-mood="playful"] .dochi-pet-arm-right { animation: dochiPetArmPlayfulRight 1.9s ease-in-out infinite; }
.dochi-pet-window[data-mood="playful"] .dochi-pet-leg-left,
.dochi-pet-window[data-mood="playful"] .dochi-pet-leg-right { animation: dochiPetLegPlayful 1.9s ease-in-out infinite; }
.dochi-pet-window[data-mood="playful"] .dochi-pet-tail { animation: dochiPetTailPlayful 1.5s ease-in-out infinite; }
.dochi-pet-window[data-mood="sleepy"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap),
.dochi-pet-window[data-mood="sleeping"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetIdleSleepy 4.2s ease-in-out infinite; }
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-arm-left,
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-arm-right,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-arm-left,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-arm-right { animation: dochiPetArmsSleepy 4.2s ease-in-out infinite; }
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-eye,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-eye,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-eye {
    width: 10px;
    height: 6px;
    background: transparent;
    border: 2.5px solid #2c1f1c;
    border-top: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0 0 6px 6px;
    box-shadow: none;
    top: 6px;
}
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-mouth,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-mouth,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-mouth {
    width: 6px;
    height: 6px;
    border: 2px solid #7d4b3d;
    border-radius: 50%;
    background: transparent;
    bottom: 4px;
}
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-prop-sleep,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-prop-sleep,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-prop-sleep { opacity: 1; }
.dochi-pet-window[data-mood="working"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetIdleWorking 0.72s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite; }
.dochi-pet-window[data-mood="working"] .dochi-pet-arm-left { animation: dochiPetArmWorkingLeft 0.36s linear infinite; }
.dochi-pet-window[data-mood="working"] .dochi-pet-arm-right { animation: dochiPetArmWorkingRight 0.36s linear infinite; }
.dochi-pet-window[data-mood="working"] .dochi-pet-leg-left,
.dochi-pet-window[data-mood="working"] .dochi-pet-leg-right { animation: dochiPetLegWorking 0.36s linear infinite; }
.dochi-pet-window[data-mood="working"] .dochi-pet-tail { animation: dochiPetTailWork 0.72s ease-in-out infinite; }
.dochi-pet-window[data-mood="working"] .dochi-pet-prop-briefcase {
    opacity: 1;
    animation: dochiPetBriefcaseShake 0.72s ease-in-out infinite;
}

/* Dim custom avatar images & body shine during sleep */
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-body-avatar,
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-avatar-placeholder,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-body-avatar,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-avatar-placeholder,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-body-avatar,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-avatar-placeholder {
    filter: brightness(0.38) contrast(1.15) saturate(0.65);
}
.dochi-pet-window[data-mood="sleepy"] :is(.dochi-pet-avatar-shine, .dochi-pet-body-shine),
.dochi-pet-window[data-mood="sleeping"] :is(.dochi-pet-avatar-shine, .dochi-pet-body-shine),
.dochi-pet-rig[data-action="sleep"] :is(.dochi-pet-avatar-shine, .dochi-pet-body-shine) {
    opacity: 0.15;
}
/* Darken the nightcap hat & pom during sleep to match the dimmed pet */
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-nightcap,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-nightcap,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-nightcap,
.dochi-pet-window[data-mood="sleepy"] .dochi-pet-nightcap-pom,
.dochi-pet-window[data-mood="sleeping"] .dochi-pet-nightcap-pom,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-nightcap-pom {
    filter: brightness(0.38) saturate(0.65);
}
.dochi-pet-window[data-mood="nanny"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetIdleNanny 3.2s ease-in-out infinite; }
.dochi-pet-window[data-mood="nanny"] .dochi-pet-arm-left { animation: dochiPetArmNannyLeft 3.2s ease-in-out infinite; }
.dochi-pet-window[data-mood="nanny"] .dochi-pet-arm-right { animation: dochiPetArmNannyRight 3.2s ease-in-out infinite; }
.dochi-pet-window[data-mood="nanny"] .dochi-pet-leg-left,
.dochi-pet-window[data-mood="nanny"] .dochi-pet-leg-right { animation: dochiPetLegNanny 3.2s ease-in-out infinite; }
.dochi-pet-window[data-mood="nanny"] .dochi-pet-tail { animation: dochiPetTailHappy 2.6s ease-in-out infinite; }
.dochi-pet-window[data-mood="nanny"] .dochi-pet-prop-plush { opacity: 1; animation: dochiPetPlushBob 2.5s ease-in-out infinite; }
.dochi-pet-window[data-mood="nanny"] .dochi-pet-prop-bottle { opacity: 1; animation: dochiPetBottleTilt 2.8s ease-in-out infinite; }
.dochi-pet-window[data-mood="nanny"] .dochi-pet-prop-rattle { opacity: 1; animation: dochiPetRattleBounce 2.2s ease-in-out infinite; }
.dochi-pet-window[data-mood="nanny"] .dochi-pet-prop-book { opacity: 1; animation: dochiPetBookFloat 2.9s ease-in-out infinite; }
.dochi-pet-window[data-mood="sad"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetIdleSad 3.3s ease-in-out infinite; }
.dochi-pet-window[data-mood="sad"] .dochi-pet-arm-left,
.dochi-pet-window[data-mood="sad"] .dochi-pet-arm-right { animation: dochiPetArmsSad 3.3s ease-in-out infinite; }
.dochi-pet-window[data-mood="sad"] .dochi-pet-tail { animation: dochiPetTailSlow 3.4s ease-in-out infinite; }
.dochi-pet-window[data-mood="sad"] .dochi-pet-mouth { border-bottom-color: #8d5960; }
.dochi-pet-window[data-mood="grumpy"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetIdleGrumpy 2.6s ease-in-out infinite; }
.dochi-pet-window[data-mood="grumpy"] .dochi-pet-arm-left { animation: dochiPetArmGrumpyLeft 2.6s ease-in-out infinite; }
.dochi-pet-window[data-mood="grumpy"] .dochi-pet-arm-right { animation: dochiPetArmGrumpyRight 2.6s ease-in-out infinite; }
.dochi-pet-window[data-mood="grumpy"] .dochi-pet-tail { animation: dochiPetTailTwitch 1.8s ease-in-out infinite; }
.dochi-pet-window[data-mood="grumpy"] .dochi-pet-eye-left { transform: rotate(12deg); }
.dochi-pet-window[data-mood="grumpy"] .dochi-pet-eye-right { transform: rotate(-12deg); }

.dochi-pet-rig[data-action="deposit"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionDepositBody 0.44s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="deposit"] .dochi-pet-arm-left { animation: dochiPetActionDepositLeft 0.44s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="deposit"] .dochi-pet-arm-right { animation: dochiPetActionDepositRight 0.44s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="deposit"] .dochi-pet-tail { animation: dochiPetTailHappy 0.44s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="withdraw"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionWithdrawBody 0.4s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="withdraw"] .dochi-pet-arm-left { animation: dochiPetActionWithdrawLeft 0.4s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="withdraw"] .dochi-pet-arm-right { animation: dochiPetActionWithdrawRight 0.4s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="withdraw"] .dochi-pet-tail { animation: dochiPetTailPlayful 0.4s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="feed"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionFeedBody 0.55s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="feed"] .dochi-pet-arm-left { animation: dochiPetActionFeedLeft 0.55s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="feed"] .dochi-pet-arm-right { animation: dochiPetActionFeedRight 0.55s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="feed"] .dochi-pet-tail { animation: dochiPetTailHappy 0.55s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="wash"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionWashBody 0.44s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="wash"] .dochi-pet-arm-left { animation: dochiPetActionWashLeft 0.44s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="wash"] .dochi-pet-arm-right { animation: dochiPetActionWashRight 0.44s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="wash"] .dochi-pet-tail { animation: dochiPetTailPlayful 0.44s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="sleep"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionSleepBody 2.8s ease-in-out 1 forwards !important; }
.dochi-pet-rig[data-action="sleep"] .dochi-pet-arm-left,
.dochi-pet-rig[data-action="sleep"] .dochi-pet-arm-right { animation: dochiPetActionSleepArms 2.8s ease-in-out 1 forwards !important; }
.dochi-pet-rig[data-action="sleep"] .dochi-pet-prop-sleep { opacity: 1 !important; }
.dochi-pet-rig[data-action="walk"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionWalkBody 0.6s ease-in-out 3 !important; }
.dochi-pet-rig[data-action="walk"] .dochi-pet-leg-left { animation: dochiPetActionWalkLegLeft 0.6s ease-in-out 3 !important; }
.dochi-pet-rig[data-action="walk"] .dochi-pet-leg-right { animation: dochiPetActionWalkLegRight 0.6s ease-in-out 3 !important; }
.dochi-pet-rig[data-action="walk"] .dochi-pet-arm-left { animation: dochiPetActionWalkArmLeft 0.6s ease-in-out 3 !important; }
.dochi-pet-rig[data-action="walk"] .dochi-pet-arm-right { animation: dochiPetActionWalkArmRight 0.6s ease-in-out 3 !important; }
.dochi-pet-rig[data-action="walk"] .dochi-pet-tail { animation: dochiPetActionWalkTail 0.6s ease-in-out 3 !important; }
.dochi-pet-rig[data-action="job"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionJobBody 0.7s ease-in-out 2 !important; }
.dochi-pet-rig[data-action="job"] .dochi-pet-arm-left { animation: dochiPetActionJobLeft 0.7s ease-in-out 2 !important; }
.dochi-pet-rig[data-action="job"] .dochi-pet-arm-right { animation: dochiPetActionJobRight 0.7s ease-in-out 2 !important; }
.dochi-pet-rig[data-action="job"] .dochi-pet-prop-briefcase { opacity: 1; transform: rotate(-4deg); }
.dochi-pet-rig[data-action="dig"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionDigBody 0.5s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="dig"] .dochi-pet-arm-left { animation: dochiPetActionDigLeft 0.5s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="dig"] .dochi-pet-arm-right { animation: dochiPetActionDigRight 0.5s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="dig"] .dochi-pet-tail { animation: dochiPetTailWork 0.5s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="pet"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionPetBody 0.34s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="pet"] .dochi-pet-arm-left { animation: dochiPetActionPetLeft 0.34s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="pet"] .dochi-pet-arm-right { animation: dochiPetActionPetRight 0.34s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="pet"] .dochi-pet-tail { animation: dochiPetTailHappy 0.34s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="pet"] .dochi-pet-blush { animation: dochiPetActionPetBlush 0.45s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="cure"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionCureBody 0.48s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="cure"] .dochi-pet-arm-left { animation: dochiPetActionCureLeft 0.48s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="cure"] .dochi-pet-arm-right { animation: dochiPetActionCureRight 0.48s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="cure"] .dochi-pet-tail { animation: dochiPetTailHappy 0.48s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="cure"] .dochi-pet-body-shine { animation: dochiPetActionCureShine 0.48s ease-in-out 4 !important; }
.dochi-pet-rig[data-action="surprise"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionSurpriseBody 0.38s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="surprise"] .dochi-pet-arm-left { animation: dochiPetActionSurpriseLeft 0.38s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="surprise"] .dochi-pet-arm-right { animation: dochiPetActionSurpriseRight 0.38s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="surprise"] .dochi-pet-leg-left,
.dochi-pet-rig[data-action="surprise"] .dochi-pet-leg-right { animation: dochiPetActionSurpriseLegs 0.38s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="surprise"] .dochi-pet-tail { animation: dochiPetTailPlayful 0.38s ease-in-out 5 !important; }
.dochi-pet-rig[data-action="peep"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionPeepBody 1.55s cubic-bezier(.22, .8, .26, 1) 1 !important; }
.dochi-pet-rig[data-action="peep"] .dochi-pet-face { animation: dochiPetActionPeepFace 1.55s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="peep"] .dochi-pet-eye { animation: dochiPetActionPeepEyes 1.55s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="peep"] .dochi-pet-arm-left { animation: dochiPetActionPeepLeft 1.55s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="peep"] .dochi-pet-arm-right { animation: dochiPetActionPeepRight 1.55s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="jump"] .dochi-pet-shadow { animation: dochiPetActionJumpShadow 1.12s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="jump"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionJumpBody 1.12s cubic-bezier(.2, .84, .24, 1) 1 !important; }
.dochi-pet-rig[data-action="jump"] .dochi-pet-arm-left { animation: dochiPetActionJumpLeft 1.12s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="jump"] .dochi-pet-arm-right { animation: dochiPetActionJumpRight 1.12s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="jump"] .dochi-pet-leg-left,
.dochi-pet-rig[data-action="jump"] .dochi-pet-leg-right { animation: dochiPetActionJumpLegs 1.12s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="jump"] .dochi-pet-tail { animation: dochiPetActionJumpTail 1.12s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="poke"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionPokeBody 1.18s cubic-bezier(.2, .8, .24, 1) 1 !important; }
.dochi-pet-rig[data-action="poke"] .dochi-pet-arm-left { animation: dochiPetActionPokeLeft 1.18s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="poke"] .dochi-pet-arm-right { animation: dochiPetActionPokeRight 1.18s cubic-bezier(.2, .8, .24, 1) 1 !important; }
.dochi-pet-rig[data-action="poke"] .dochi-pet-eye { animation: dochiPetActionPokeEyes 1.18s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="blink"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionBlinkBody 0.9s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="blink"] .dochi-pet-eye { animation: dochiPetActionBlinkEyes 0.9s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="ears"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionEarsBody 1.18s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="ears"] .dochi-pet-ear-left { animation: dochiPetActionEarsLeft 1.18s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="ears"] .dochi-pet-ear-right { animation: dochiPetActionEarsRight 1.18s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="ears"] .dochi-pet-eye { animation: dochiPetActionEarsEyes 1.18s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="ears"] .dochi-pet-tail { animation: dochiPetActionEarsTail 1.18s ease-in-out 1 !important; }

/* ── Glance (look-around) ── */
.dochi-pet-rig[data-action="glance"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionGlanceBody 1.6s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="glance"] .dochi-pet-face { animation: dochiPetActionGlanceFace 1.6s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="glance"] .dochi-pet-eye { animation: dochiPetActionGlanceEyes 1.6s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="glance"] .dochi-pet-ear-left { animation: dochiPetActionGlanceEarL 1.6s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="glance"] .dochi-pet-ear-right { animation: dochiPetActionGlanceEarR 1.6s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="glance"] .dochi-pet-tail { animation: dochiPetActionGlanceTail 1.6s ease-in-out 1 !important; }

/* ── Yawn ── */
.dochi-pet-rig[data-action="yawn"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionYawnBody 2.2s cubic-bezier(.22,.8,.26,1) 1 !important; }
.dochi-pet-rig[data-action="yawn"] .dochi-pet-mouth { animation: dochiPetActionYawnMouth 2.2s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="yawn"] .dochi-pet-eye { animation: dochiPetActionYawnEyes 2.2s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="yawn"] .dochi-pet-arm-left { animation: dochiPetActionYawnArmL 2.2s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="yawn"] .dochi-pet-arm-right { animation: dochiPetActionYawnArmR 2.2s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="yawn"] .dochi-pet-ear-left { animation: dochiPetActionYawnEarL 2.2s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="yawn"] .dochi-pet-ear-right { animation: dochiPetActionYawnEarR 2.2s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="yawn"] .dochi-pet-tail { animation: dochiPetActionYawnTail 2.2s ease-in-out 1 !important; }

/* ── Stretch ── */
.dochi-pet-rig[data-action="stretch"] :is(.dochi-pet-body-wrap, .dochi-pet-tail-wrap) { animation: dochiPetActionStretchBody 1.9s cubic-bezier(.22,.8,.26,1) 1 !important; }
.dochi-pet-rig[data-action="stretch"] .dochi-pet-arm-left { animation: dochiPetActionStretchArmL 1.9s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="stretch"] .dochi-pet-arm-right { animation: dochiPetActionStretchArmR 1.9s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="stretch"] .dochi-pet-leg-left { animation: dochiPetActionStretchLegL 1.9s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="stretch"] .dochi-pet-leg-right { animation: dochiPetActionStretchLegR 1.9s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="stretch"] .dochi-pet-tail { animation: dochiPetActionStretchTail 1.9s ease-in-out 1 !important; }
.dochi-pet-rig[data-action="stretch"] .dochi-pet-shadow { animation: dochiPetActionStretchShadow 1.9s ease-in-out 1 !important; }

@keyframes dochiPetIdleCalm {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(-4px) scale(1.01); }
}
@keyframes dochiPetArmsCalm {
    0%, 100% { transform: rotate(12deg); }
    50% { transform: rotate(17deg); }
}
@keyframes dochiPetTailWave {
    0%, 100% { transform: rotate(52deg); }
    50% { transform: rotate(68deg); }
}
@keyframes dochiPetTailHappy {
    0%, 100% { transform: rotate(48deg); }
    50% { transform: rotate(82deg); }
}
@keyframes dochiPetTailPlayful {
    0%, 100% { transform: rotate(42deg); }
    25% { transform: rotate(84deg); }
    75% { transform: rotate(34deg); }
}
@keyframes dochiPetTailSlow {
    0%, 100% { transform: rotate(56deg); }
    50% { transform: rotate(62deg); }
}
@keyframes dochiPetTailWork {
    0%, 100% { transform: rotate(58deg); }
    50% { transform: rotate(44deg); }
}
@keyframes dochiPetTailTwitch {
    0%, 100% { transform: rotate(58deg); }
    35% { transform: rotate(36deg); }
    60% { transform: rotate(52deg); }
}
@keyframes dochiPetIdleHappy {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(-7px) scale(1.02); }
}
@keyframes dochiPetArmHappyLeft {
    0%, 100% { transform: rotate(14deg); }
    50% { transform: rotate(26deg); }
}
@keyframes dochiPetArmHappyRight {
    0%, 100% { transform: rotate(-14deg); }
    50% { transform: rotate(-26deg); }
}
@keyframes dochiPetIdlePlayful {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    25% { transform: translateX(-49%) translateY(-8px) scale(1.03) rotate(3deg); }
    75% { transform: translateX(-51%) translateY(-5px) scale(1.03) rotate(-3deg); }
}
@keyframes dochiPetArmPlayfulLeft {
    0%, 100% { transform: rotate(8deg); }
    50% { transform: rotate(36deg); }
}
@keyframes dochiPetArmPlayfulRight {
    0%, 100% { transform: rotate(-8deg); }
    50% { transform: rotate(-36deg); }
}
@keyframes dochiPetLegPlayful {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(-5deg) translateY(-3px); }
}
@keyframes dochiPetIdleSleepy {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg) scale(0.98, 0.98); }
    50% { transform: translateX(-50%) translateY(2px) rotate(-1.5deg) scale(1.02, 1.04); }
}
@keyframes dochiPetArmsSleepy {
    0%, 100% { transform: rotate(10deg) translateY(4px) scale(0.98); }
    50% { transform: rotate(4deg) translateY(6px) scale(1.02); }
}
@keyframes dochiPetZzzFloat1 {
    0% { transform: translate(0, 0) scale(0.5) rotate(-15deg); opacity: 0; }
    15% { opacity: 0.9; }
    50% { transform: translate(-15px, -25px) scale(0.85) rotate(10deg); opacity: 0.9; }
    80% { opacity: 0.3; }
    100% { transform: translate(-5px, -85px) scale(1.4) rotate(15deg); opacity: 0; }
}
@keyframes dochiPetZzzFloat2 {
    0% { transform: translate(0, 5px) scale(0.5) rotate(10deg); opacity: 0; }
    15% { opacity: 0.9; }
    50% { transform: translate(15px, -20px) scale(0.9) rotate(-5deg); opacity: 0.9; }
    80% { opacity: 0.3; }
    100% { transform: translate(10px, -80px) scale(1.5) rotate(-10deg); opacity: 0; }
}
@keyframes dochiPetZzzFloat3 {
    0% { transform: translate(0, 2px) scale(0.4) rotate(-5deg); opacity: 0; }
    15% { opacity: 0.9; }
    50% { transform: translate(-10px, -22px) scale(0.8) rotate(15deg); opacity: 0.9; }
    80% { opacity: 0.3; }
    100% { transform: translate(-2px, -88px) scale(1.6) rotate(8deg); opacity: 0; }
}
@keyframes dochiPetIdleWorking {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    25% { transform: translateX(-50%) translateY(-2px) rotate(1.5deg) scale(1.02, 0.98); }
    50% { transform: translateX(-50%) translateY(0.5px) scale(0.98, 1.02); }
    75% { transform: translateX(-50%) translateY(-1px) rotate(-1.5deg) scale(1.01, 0.99); }
}
@keyframes dochiPetArmWorkingLeft {
    0%, 100% { transform: rotate(42deg) translateY(-3px) scaleX(0.95); }
    50% { transform: rotate(18deg) translateY(-1px) scaleX(1.05); }
}
@keyframes dochiPetArmWorkingRight {
    0%, 100% { transform: rotate(-18deg) translateY(-1px) scaleX(1.05); }
    50% { transform: rotate(-42deg) translateY(-3px) scaleX(0.95); }
}
@keyframes dochiPetLegWorking {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(5deg) translateY(-3px); }
}
@keyframes dochiPetBriefcaseShake {
    0%, 100% { transform: rotate(-4deg) translateY(0); }
    50% { transform: rotate(6deg) translateY(-2px); }
}
@keyframes dochiPetIdleNanny {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(-6px) scale(1.02); }
}
@keyframes dochiPetArmNannyLeft {
    0%, 100% { transform: rotate(18deg); }
    50% { transform: rotate(30deg); }
}
@keyframes dochiPetArmNannyRight {
    0%, 100% { transform: rotate(-18deg); }
    50% { transform: rotate(-30deg); }
}
@keyframes dochiPetLegNanny {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(3deg) translateY(-2px); }
}
@keyframes dochiPetPlushBob {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-3px) rotate(3deg); }
}
@keyframes dochiPetBottleTilt {
    0%, 100% { transform: rotate(6deg) translateY(0); }
    50% { transform: rotate(-4deg) translateY(-2px); }
}
@keyframes dochiPetRattleBounce {
    0%, 100% { transform: rotate(-12deg) translateY(0); }
    50% { transform: rotate(8deg) translateY(-4px); }
}
@keyframes dochiPetBookFloat {
    0%, 100% { transform: rotate(-8deg) translateY(0); }
    50% { transform: rotate(-3deg) translateY(-2px); }
}
@keyframes dochiPetIdleSad {
    0%, 100% { transform: translateX(-50%) translateY(2px) scale(0.985); }
    50% { transform: translateX(-50%) translateY(-2px) scale(0.99); }
}
@keyframes dochiPetArmsSad {
    0%, 100% { transform: rotate(5deg) translateY(6px); }
    50% { transform: rotate(0deg) translateY(8px); }
}
@keyframes dochiPetIdleGrumpy {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(-3px) scale(1.01); }
}
@keyframes dochiPetArmGrumpyLeft {
    0%, 100% { transform: rotate(22deg); }
    50% { transform: rotate(12deg); }
}
@keyframes dochiPetArmGrumpyRight {
    0%, 100% { transform: rotate(-22deg); }
    50% { transform: rotate(-12deg); }
}
@keyframes dochiPetActionDepositBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(-5px) scale(1.02); }
}
@keyframes dochiPetActionDepositLeft {
    0%, 100% { transform: rotate(12deg); }
    50% { transform: rotate(30deg) translateY(-4px); }
}
@keyframes dochiPetActionDepositRight {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(-18deg) translateY(-2px); }
}
@keyframes dochiPetActionWithdrawBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    25% { transform: translateX(-49%) translateY(-7px) scale(1.04) rotate(2deg); }
    75% { transform: translateX(-51%) translateY(-5px) scale(1.04) rotate(-2deg); }
}
@keyframes dochiPetActionWithdrawLeft {
    0%, 100% { transform: rotate(10deg); }
    50% { transform: rotate(38deg) translateY(-4px); }
}
@keyframes dochiPetActionWithdrawRight {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(-42deg) translateY(-4px); }
}
@keyframes dochiPetActionFeedBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(-7px) scale(1.03); }
}
@keyframes dochiPetActionFeedLeft {
    0%, 100% { transform: rotate(14deg); }
    50% { transform: rotate(44deg) translateY(-3px); }
}
@keyframes dochiPetActionFeedRight {
    0%, 100% { transform: rotate(-14deg); }
    50% { transform: rotate(-44deg) translateY(-3px); }
}
@keyframes dochiPetActionWashBody {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-49%) rotate(4deg); }
    75% { transform: translateX(-51%) rotate(-4deg); }
}
@keyframes dochiPetActionWashLeft {
    0%, 100% { transform: rotate(14deg); }
    50% { transform: rotate(34deg); }
}
@keyframes dochiPetActionWashRight {
    0%, 100% { transform: rotate(-14deg); }
    50% { transform: rotate(-34deg); }
}
@keyframes dochiPetActionSleepBody {
    0% { transform: translateX(-50%) translateY(0) rotate(0deg) scale(1); }
    55% { transform: translateX(-50%) translateY(5px) rotate(-7deg) scale(0.98); }
    100% { transform: translateX(-50%) translateY(8px) rotate(-9deg) scale(0.975); }
}
@keyframes dochiPetActionSleepArms {
    0% { transform: rotate(10deg); }
    100% { transform: rotate(2deg) translateY(8px); }
}
@keyframes dochiPetActionWalkBody {
    0%, 50%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    25% { transform: translateX(-52%) translateY(-5px) rotate(-2.5deg); }
    75% { transform: translateX(-48%) translateY(-5px) rotate(2.5deg); }
}
@keyframes dochiPetActionWalkLegLeft {
    0%, 100% { transform: rotate(24deg) translateY(-2px); }
    50% { transform: rotate(-20deg) translateY(0); }
}
@keyframes dochiPetActionWalkLegRight {
    0%, 100% { transform: rotate(-20deg) translateY(0); }
    50% { transform: rotate(24deg) translateY(-2px); }
}
@keyframes dochiPetActionWalkArmLeft {
    0%, 100% { transform: rotate(-18deg) translateY(1px); }
    50% { transform: rotate(26deg) translateY(-1px); }
}
@keyframes dochiPetActionWalkArmRight {
    0%, 100% { transform: rotate(26deg) translateY(-1px); }
    50% { transform: rotate(-18deg) translateY(1px); }
}
@keyframes dochiPetActionWalkTail {
    0%, 100% { transform: rotate(45deg); }
    50% { transform: rotate(65deg); }
}
@keyframes dochiPetActionJobBody {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-4px) scale(1.01); }
}
@keyframes dochiPetActionJobLeft {
    0%, 100% { transform: rotate(10deg); }
    50% { transform: rotate(40deg) translateY(-3px); }
}
@keyframes dochiPetActionJobRight {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(-8deg); }
}
@keyframes dochiPetActionDigBody {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-6px) scale(1.02); }
}
@keyframes dochiPetActionDigLeft {
    0%, 100% { transform: rotate(12deg); }
    50% { transform: rotate(42deg) translateY(-2px); }
}
@keyframes dochiPetActionDigRight {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(-42deg) translateY(-2px); }
}
@keyframes dochiPetActionPetBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    25% { transform: translateX(-49%) translateY(-6px) scale(1.03) rotate(2deg); }
    75% { transform: translateX(-51%) translateY(-4px) scale(1.03) rotate(-2deg); }
}
@keyframes dochiPetActionPetLeft {
    0%, 100% { transform: rotate(14deg); }
    50% { transform: rotate(42deg) translateY(-4px); }
}
@keyframes dochiPetActionPetRight {
    0%, 100% { transform: rotate(-14deg); }
    50% { transform: rotate(-42deg) translateY(-4px); }
}
@keyframes dochiPetActionPetBlush {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.72; transform: scale(1.15); }
}
@keyframes dochiPetActionCureBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    50% { transform: translateX(-50%) translateY(-7px) scale(1.04); }
}
@keyframes dochiPetActionCureLeft {
    0%, 100% { transform: rotate(12deg); }
    50% { transform: rotate(34deg) translateY(-5px); }
}
@keyframes dochiPetActionCureRight {
    0%, 100% { transform: rotate(-12deg); }
    50% { transform: rotate(-40deg) translateY(-7px); }
}
@keyframes dochiPetActionCureShine {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.06); }
}
@keyframes dochiPetActionSurpriseBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    25% { transform: translateX(-49%) translateY(-8px) scale(1.05) rotate(3deg); }
    75% { transform: translateX(-51%) translateY(-6px) scale(1.05) rotate(-3deg); }
}
@keyframes dochiPetActionSurpriseLeft {
    0%, 100% { transform: rotate(10deg); }
    50% { transform: rotate(46deg) translateY(-5px); }
}
@keyframes dochiPetActionSurpriseRight {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(-46deg) translateY(-5px); }
}
@keyframes dochiPetActionSurpriseLegs {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(-4deg) translateY(-4px); }
}
@keyframes dochiPetActionPeepBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    32% { transform: translateX(-50%) translateY(-8px) scale(1.06); }
    58% { transform: translateX(-50%) translateY(-10px) scale(1.1); }
    82% { transform: translateX(-50%) translateY(-4px) scale(1.03); }
}
@keyframes dochiPetActionPeepFace {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    35% { transform: translateX(-50%) translateY(1px) scale(1.04); }
    58% { transform: translateX(-50%) translateY(2px) scale(1.1); }
}
@keyframes dochiPetActionPeepEyes {
    0%, 100% { transform: scale(1); }
    34% { transform: scale(1.05, 1.12); }
    58% { transform: scale(1.18, 1.26); }
}
@keyframes dochiPetActionPeepLeft {
    0%, 100% { transform: rotate(20deg); }
    55% { transform: rotate(36deg) translateY(-3px); }
}
@keyframes dochiPetActionPeepRight {
    0%, 100% { transform: rotate(-20deg); }
    55% { transform: rotate(-34deg) translateY(-4px); }
}
@keyframes dochiPetActionJumpShadow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    38% { transform: translateX(-50%) scale(0.8); opacity: 0.72; }
    62% { transform: translateX(-50%) scale(0.74); opacity: 0.66; }
}
@keyframes dochiPetActionJumpBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    16% { transform: translateX(-50%) translateY(0) scale(0.97, 1.03); }
    44% { transform: translateX(-50%) translateY(-26px) scale(1.02); }
    62% { transform: translateX(-50%) translateY(-22px) scale(1.01); }
    82% { transform: translateX(-50%) translateY(0) scale(1.03, 0.97); }
}
@keyframes dochiPetActionJumpLeft {
    0%, 100% { transform: rotate(20deg); }
    18% { transform: rotate(10deg) translateY(4px); }
    48% { transform: rotate(36deg) translateY(-8px); }
    82% { transform: rotate(18deg); }
}
@keyframes dochiPetActionJumpRight {
    0%, 100% { transform: rotate(-20deg); }
    18% { transform: rotate(-10deg) translateY(4px); }
    48% { transform: rotate(-36deg) translateY(-8px); }
    82% { transform: rotate(-18deg); }
}
@keyframes dochiPetActionJumpLegs {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    16% { transform: rotate(8deg) translateY(3px); }
    44% { transform: rotate(-14deg) translateY(-9px); }
    82% { transform: rotate(4deg) translateY(1px); }
}
@keyframes dochiPetActionJumpTail {
    0%, 100% { transform: rotate(52deg); }
    20% { transform: rotate(38deg); }
    48% { transform: rotate(76deg); }
    78% { transform: rotate(58deg); }
}
@keyframes dochiPetActionPokeBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    28% { transform: translateX(-51%) translateY(-3px) scale(1.01) rotate(-2deg); }
    54% { transform: translateX(-55%) translateY(-8px) scale(1.04) rotate(-7deg); }
    76% { transform: translateX(-52%) translateY(-2px) scale(1.01) rotate(-3deg); }
}
@keyframes dochiPetActionPokeLeft {
    0%, 100% { transform: rotate(20deg); }
    54% { transform: rotate(4deg) translateY(4px); }
}
@keyframes dochiPetActionPokeRight {
    0%, 100% { transform: rotate(-20deg); }
    28% { transform: rotate(-42deg) translateY(-3px); }
    54% { transform: rotate(-88deg) translateY(-16px) scaleY(1.08); }
    76% { transform: rotate(-34deg) translateY(-3px); }
}
@keyframes dochiPetActionPokeEyes {
    0%, 100% { transform: scale(1); }
    54% { transform: scale(0.9, 1.08); }
}
@keyframes dochiPetActionBlinkBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    40% { transform: translateX(-50%) translateY(-2px) scale(1.01); }
}
@keyframes dochiPetActionBlinkEyes {
    0%, 14%, 100% { transform: scaleY(1); }
    18%, 24% { transform: scaleY(0.16); }
    56%, 62% { transform: scaleY(0.2); }
}
@keyframes dochiPetActionEarsBody {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    34% { transform: translateX(-49%) translateY(-3px) rotate(2deg); }
    66% { transform: translateX(-51%) translateY(-2px) rotate(-2deg); }
}
@keyframes dochiPetActionEarsLeft {
    0%, 100% { transform: rotate(-12deg); }
    22% { transform: rotate(-30deg); }
    44% { transform: rotate(-4deg); }
    72% { transform: rotate(-22deg); }
}
@keyframes dochiPetActionEarsRight {
    0%, 100% { transform: rotate(12deg); }
    22% { transform: rotate(30deg); }
    44% { transform: rotate(4deg); }
    72% { transform: rotate(22deg); }
}
@keyframes dochiPetActionEarsEyes {
    0%, 100% { transform: scale(1); }
    34% { transform: scale(1.02, 0.92); }
    66% { transform: scale(1.02, 1.05); }
}
@keyframes dochiPetActionEarsTail {
    0%, 100% { transform: rotate(52deg); }
    26% { transform: rotate(72deg); }
    58% { transform: rotate(34deg); }
    82% { transform: rotate(62deg); }
}
@keyframes dochiPetEffectFloat {
    0% { opacity: 0; transform: translate(-50%, 6px) scale(0.6); }
    14% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -46px) scale(1.05); }
}
@keyframes dochiPetEffectFeed {
    0% { opacity: 0; transform: translate(-50%, -52px) scale(0.88); }
    16% { opacity: 1; }
    82% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, 0) scale(0.7); }
}
@keyframes dochiPetHeartBurst {
    0% {
        opacity: 0;
        transform: translate(calc(-50% + var(--pet-burst-x-start, 0px)), 8px) scale(0.55) rotate(var(--pet-burst-rotate-start, 0deg));
    }
    14% { opacity: 1; }
    100% {
        opacity: 0;
        transform: translate(calc(-50% + var(--pet-burst-x-end, 0px)), calc(-1 * var(--pet-burst-rise, 84px))) scale(var(--pet-burst-scale-end, 1.1)) rotate(var(--pet-burst-rotate-end, 0deg));
    }
}

/* ──────────────────────────────────────────────────────────────────────────
   Idle Animations: Glance · Yawn · Stretch
   ────────────────────────────────────────────────────────────────────────── */

/* Glance — subtle head look left then right */
@keyframes dochiPetActionGlanceBody {
    0%, 100% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    24%       { transform: translateX(-52%) translateY(-2px) rotate(-3deg); }
    54%       { transform: translateX(-48%) translateY(-2px) rotate(3deg); }
    80%       { transform: translateX(-50%) translateY(-1px) rotate(0deg); }
}
@keyframes dochiPetActionGlanceFace {
    0%, 100% { transform: translateX(-50%); }
    24%       { transform: translateX(calc(-50% - 5px)); }
    54%       { transform: translateX(calc(-50% + 5px)); }
    80%       { transform: translateX(-50%); }
}
@keyframes dochiPetActionGlanceEyes {
    0%, 100% { transform: scale(1); }
    24%       { transform: scale(0.9, 1.06) translateX(-1px); }
    54%       { transform: scale(0.9, 1.06) translateX(1px); }
    80%       { transform: scale(1); }
}
@keyframes dochiPetActionGlanceEarL {
    0%, 100% { transform: rotate(-12deg); }
    24%       { transform: rotate(-24deg); }
    54%       { transform: rotate(-6deg); }
}
@keyframes dochiPetActionGlanceEarR {
    0%, 100% { transform: rotate(12deg); }
    24%       { transform: rotate(6deg); }
    54%       { transform: rotate(24deg); }
}
@keyframes dochiPetActionGlanceTail {
    0%, 100% { transform: rotate(52deg); }
    32%       { transform: rotate(62deg); }
    66%       { transform: rotate(44deg); }
}

/* Yawn — mouth opens wide, arms drift up, eyes squint, ears droop, body swells */
@keyframes dochiPetActionYawnBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1); }
    22%       { transform: translateX(-50%) translateY(-3px) scale(1.02, 1.04); }
    46%       { transform: translateX(-50%) translateY(-5px) scale(1.04, 1.07); }
    70%       { transform: translateX(-50%) translateY(-3px) scale(1.02, 1.03); }
    88%       { transform: translateX(-50%) translateY(-1px) scale(1.01, 1.01); }
}
@keyframes dochiPetActionYawnMouth {
    0%, 100% { width: 18px; height: 12px; border-radius: 0 0 14px 14px; }
    32%       { width: 22px; height: 16px; border-radius: 0 0 18px 18px; }
    54%       { width: 28px; height: 22px; border-radius: 8px 8px 24px 24px; border-bottom-color: #5a3530; }
    74%       { width: 22px; height: 16px; }
}
@keyframes dochiPetActionYawnEyes {
    0%, 100% { transform: scaleY(1); }
    36%       { transform: scaleY(0.72); }
    56%       { transform: scaleY(0.34); }
    78%       { transform: scaleY(0.62); }
}
@keyframes dochiPetActionYawnArmL {
    0%, 100% { transform: rotate(20deg); }
    46%       { transform: rotate(42deg) translateY(-5px); }
    74%       { transform: rotate(28deg) translateY(-2px); }
}
@keyframes dochiPetActionYawnArmR {
    0%, 100% { transform: rotate(-20deg); }
    46%       { transform: rotate(-42deg) translateY(-5px); }
    74%       { transform: rotate(-28deg) translateY(-2px); }
}
@keyframes dochiPetActionYawnEarL {
    0%, 100% { transform: rotate(-12deg); }
    44%       { transform: rotate(-6deg) translateY(3px); }
    68%       { transform: rotate(-10deg) translateY(1px); }
}
@keyframes dochiPetActionYawnEarR {
    0%, 100% { transform: rotate(12deg); }
    44%       { transform: rotate(6deg) translateY(3px); }
    68%       { transform: rotate(10deg) translateY(1px); }
}
@keyframes dochiPetActionYawnTail {
    0%, 100% { transform: rotate(52deg); }
    44%       { transform: rotate(38deg); }
    80%       { transform: rotate(56deg); }
}

/* Stretch — full-body elongate, arms shoot up high */
@keyframes dochiPetActionStretchBody {
    0%, 100% { transform: translateX(-50%) translateY(0) scale(1, 1); }
    18%       { transform: translateX(-50%) translateY(2px) scale(1.02, 0.96); }
    44%       { transform: translateX(-50%) translateY(-10px) scale(0.94, 1.1); }
    66%       { transform: translateX(-50%) translateY(-8px) scale(0.96, 1.08); }
    86%       { transform: translateX(-50%) translateY(-2px) scale(1.01, 1.01); }
}
@keyframes dochiPetActionStretchArmL {
    0%, 100% { transform: rotate(20deg); }
    16%       { transform: rotate(12deg) translateY(3px); }
    44%       { transform: rotate(72deg) translateY(-12px) scaleY(1.1); }
    66%       { transform: rotate(64deg) translateY(-10px); }
    86%       { transform: rotate(26deg) translateY(-1px); }
}
@keyframes dochiPetActionStretchArmR {
    0%, 100% { transform: rotate(-20deg); }
    16%       { transform: rotate(-12deg) translateY(3px); }
    44%       { transform: rotate(-72deg) translateY(-12px) scaleY(1.1); }
    66%       { transform: rotate(-64deg) translateY(-10px); }
    86%       { transform: rotate(-26deg) translateY(-1px); }
}
@keyframes dochiPetActionStretchLegL {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    20%       { transform: rotate(6deg) translateY(4px); }
    50%       { transform: rotate(-4deg) translateY(-4px); }
    80%       { transform: rotate(2deg) translateY(0); }
}
@keyframes dochiPetActionStretchLegR {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    20%       { transform: rotate(-6deg) translateY(4px); }
    50%       { transform: rotate(4deg) translateY(-4px); }
    80%       { transform: rotate(-2deg) translateY(0); }
}
@keyframes dochiPetActionStretchTail {
    0%, 100% { transform: rotate(52deg); }
    18%       { transform: rotate(36deg); }
    46%       { transform: rotate(72deg); }
    80%       { transform: rotate(56deg); }
}
@keyframes dochiPetActionStretchShadow {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    44%       { transform: translateX(-50%) scale(0.84); opacity: 0.78; }
}

.dochi-pet-info { padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }

.dochi-pet-name {
    font-size: 1.4rem; font-weight: 700; color: #fff; margin: 0;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.dochi-level-badge {
    font-size: .8rem; font-weight: 600; background: #2a2048; color: #b08cff;
    border-radius: 20px; padding: 3px 10px;
}
.dochi-mood-tag {
    font-size: .85rem; background: #1e2030; border-radius: 8px; padding: 4px 10px;
    display: inline-flex; align-items: center; gap: 5px;
}

/* stat bars */
.dochi-stats-grid { display: flex; flex-direction: column; gap: 8px; }
.dochi-stat-row { display: flex; align-items: center; gap: 8px; }
.dochi-stat-label { min-width: 90px; font-size: .82rem; color: #8b8fa8; }
.dochi-bar-wrap {
    flex: 1; height: 10px; background: #2a2d42; border-radius: 6px; overflow: hidden;
}
.dochi-bar-fill {
    height: 100%; border-radius: 6px; transition: width .5s ease;
}
.dochi-bar-fill.hunger { background: linear-gradient(90deg,#e8703a,#f5a623); }
.dochi-bar-fill.hygiene { background: linear-gradient(90deg,#3abde8,#4fc3f7); }
.dochi-stat-val { min-width: 36px; font-size: .82rem; text-align: right; }

.dochi-coins-row {
    display: flex; gap: 16px; flex-wrap: wrap;
}
.dochi-coin-chip {
    background: #1e2030; border: 1px solid #2a2d42; border-radius: 8px;
    padding: 6px 14px; font-size: .88rem; display: flex; align-items: center; gap: 6px;
}
.dochi-coin-chip.bank { border-color: #4a3a18; background: #1c1a0a; }

.dochi-special-flags { display: flex; gap: 8px; flex-wrap: wrap; }
.dochi-flag {
    font-size: .78rem; border-radius: 6px; padding: 3px 9px;
    display: flex; align-items: center; gap: 4px;
}
.dochi-flag.sick { background: #2d1a1a; color: #f87171; border: 1px solid #5c2a2a; }
.dochi-flag.sleeping { background: #1a1a3d; color: #818cf8; border: 1px solid #2a2a6d; }
.dochi-flag.working { background: #1a2a1a; color: #86efac; border: 1px solid #2a5a2a; }
.dochi-flag.nanny { background: #2d1a2d; color: #f0abfc; border: 1px solid #5c2a5c; }
.dochi-flag.treasure { background: #2d2a1a; color: #fcd34d; border: 1px solid #5c4a1a; }

/* ── No pet notice ── */
.dochi-no-pet {
    background: #161824; border: 1px solid #2a2d42; border-radius: 14px;
    padding: 40px; text-align: center; color: #8b8fa8; margin-bottom: 20px;
}
.dochi-no-pet-actions {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}
.dochi-no-pet-actions .dochi-btn {
    min-width: 172px;
    justify-content: center;
}

/* ── Action toolbar ── */
.dochi-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px;
}
.dochi-btn {
    padding: 10px 18px; border-radius: 8px; border: none; cursor: pointer;
    font-size: .9rem; font-weight: 600; transition: opacity .15s, transform .1s;
    display: flex; align-items: center; gap: 6px;
}
.dochi-btn:hover:not(:disabled) { opacity: .88; transform: translateY(-1px); }
.dochi-btn:active:not(:disabled) { transform: translateY(0); }
.dochi-btn:disabled { opacity: .35; cursor: not-allowed; }

.dochi-btn.danger { background: #6b2121; color: #fecaca; }
.dochi-btn.feed   { background: #2d6a2d; color: #bbf7d0; }
.dochi-btn.wash   { background: #1a4a7a; color: #bae6fd; }
.dochi-btn.walk   { background: #3a3a1a; color: #fef08a; }
.dochi-btn.run    { background: #4a2818; color: #ffedd5; }
.dochi-btn.marathon { background: #5a450c; color: #fef08a; }
.dochi-btn.sleep  { background: #1e1e4a; color: #c7d2fe; }
.dochi-btn.job    { background: #2a2a1a; color: #d9f99d; }
.dochi-btn.dig    { background: #3a2a1a; color: #fed7aa; }
.dochi-btn.shop   { background: #3a1a3a; color: #f0abfc; }
.dochi-btn.bank   { background: #3a2a1a; color: #fcd34d; }
.dochi-btn.workshop { background: #1a4a5a; color: #a5f3fc; }

.dochi-btn.dig.dochi-btn-ready {
    outline: 1px solid rgba(253, 186, 116, 0.52);
    animation: dochiDigReadyGlow 2.8s ease-in-out infinite;
}

@keyframes dochiDigReadyGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.00), 0 0 0 1px rgba(253, 186, 116, 0.16);
    }
    50% {
        box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.12), 0 0 14px rgba(251, 191, 36, 0.18);
    }
}

/* ── Collapsible panels ── */
.dochi-panel {
    background: #161824; border: 1px solid #2a2d42; border-radius: 12px;
    margin-bottom: 16px; overflow: hidden;
}
.dochi-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; cursor: pointer; user-select: none;
    font-weight: 600; font-size: .95rem;
}
.dochi-panel-header:hover { background: #1a1e30; }
.dochi-panel-chevron { transition: transform .2s; font-size: .8rem; color: #6b7280; }
.dochi-panel.open .dochi-panel-chevron { transform: rotate(180deg); }
.dochi-panel-body { padding: 16px 18px; display: none; }
.dochi-panel.open .dochi-panel-body { display: block; }

/* ── Shop panel ── */
.dochi-shop-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 12px;
}
.dochi-shop-item {
    background: #1e2030; border: 1px solid #2a2d42; border-radius: 10px;
    padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.dochi-shop-item-name { font-weight: 600; font-size: .9rem; }
.dochi-shop-item-cost { font-size: .8rem; color: #fcd34d; }
.dochi-shop-item-desc { font-size: .78rem; color: #8b8fa8; flex: 1; }
.dochi-shop-item .dochi-btn { width: 100%; justify-content: center; margin-top: auto; }

/* rename/redescibe input */
.dochi-input-row {
    display: flex; gap: 8px; margin-top: 8px;
}
.dochi-input {
    flex: 1; background: #0f111a; border: 1px solid #3a3f55; border-radius: 7px;
    color: #e4e6eb; padding: 8px 12px; font-size: .88rem;
}
.dochi-input:focus { outline: 2px solid #7c5cbf; border-color: transparent; }

/* ── Bank panel ── */
.dochi-bank-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 560px) { .dochi-bank-grid { grid-template-columns: 1fr; } }
.dochi-bank-stat {
    background: #1e2030; border: 1px solid #2a2d42; border-radius: 10px; padding: 14px;
}
.dochi-bank-stat-label { font-size: .78rem; color: #8b8fa8; margin-bottom: 4px; }
.dochi-bank-stat-val { font-size: 1.1rem; font-weight: 700; color: #fcd34d; }
.dochi-bank-ops { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dochi-bank-op-row { display: flex; gap: 8px; }
.dochi-bank-op-row .dochi-input { max-width: 120px; }

@media (min-width: 761px) {
    .dochi-focus-toggle { display: none !important; }
}

@media (max-width: 760px) {
    .dochi-shell {
        padding: 18px 12px 112px;
    }
    .dochi-pet-card {
        grid-template-columns: 1fr;
    }
    .dochi-avatar-wrap {
        min-height: 320px;
        padding: 18px 14px 20px;
    }
    .dochi-pet-window {
        width: 200px;
        height: 248px;
    }
    .dochi-live-pet-nav {
        padding: 0 8px;
    }
    .dochi-live-pet-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.08rem;
    }
    .dochi-pet-rig {
        transform: translateX(-50%) scale(1.3);
    }
    .dochi-pet-info {
        padding: 18px 18px 20px;
    }
    .dochi-toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .dochi-toolbar::-webkit-scrollbar {
        display: none;
    }
    .dochi-toolbar > div,
    .dochi-toolbar > button {
        flex: 0 0 auto;
    }
}

@media (max-width: 760px) {
    .dochi-body.dochi-pet-focus {
        overflow: hidden;
    }
    .dochi-body.dochi-pet-focus .dochi-shell {
        max-width: none;
        min-height: 100vh;
        padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 172px);
    }
    .dochi-body.dochi-pet-focus .dochi-header,
    .dochi-body.dochi-pet-focus .dochi-pause-notice,
    .dochi-body.dochi-pet-focus #noPetNotice,
    .dochi-body.dochi-pet-focus #shopPanel,
    .dochi-body.dochi-pet-focus #bankPanel,
    .dochi-body.dochi-pet-focus #achPanel,
    .dochi-body.dochi-pet-focus #statsPanel,
    .dochi-body.dochi-pet-focus #deadPanel,
    .dochi-body.dochi-pet-focus #miniGamesPanel,
    .dochi-body.dochi-pet-focus #dungeonPanel,
    .dochi-body.dochi-pet-focus #scorchedPanel {
        display: none !important;
    }
    .dochi-body.dochi-pet-focus #petSection {
        position: fixed;
        inset: 0 0 calc(env(safe-area-inset-bottom, 0px) + 164px) 0;
        z-index: 40;
        display: flex !important;
        align-items: stretch;
        justify-content: center;
        padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px 12px;
        background: linear-gradient(180deg, rgba(15,17,26,0.76), rgba(9,10,16,0.94));
    }
    .dochi-body.dochi-pet-focus #petCard {
        width: 100%;
        max-width: 560px;
        margin: 0 auto;
        border: none;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
        display: block;
    }
    .dochi-body.dochi-pet-focus .dochi-avatar-wrap {
        width: 100%;
        position: relative;
        z-index: 1;
        min-height: 100%;
        align-items: center;
        justify-content: center;
        padding: 12px 12px 172px;
        background: rgba(9, 11, 18, 0.42);
        border: 1px solid rgba(255,255,255,0.06);
        border-radius: 28px;
    }
    .dochi-body.dochi-pet-focus .dochi-pet-window {
        position: relative;
        z-index: 1;
        width: min(100%, clamp(280px, 92vw, 450px));
        height: clamp(330px, 61vh, 520px);
        max-height: calc(100% - 148px);
        margin-top: 2px;
        border-radius: 30px;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 44px rgba(0,0,0,0.34);
    }
    .dochi-body.dochi-pet-focus .dochi-pet-rig {
        bottom: 26px;
        transform: translateX(-50%) scale(2.3);
    }
    .dochi-body.dochi-pet-focus .dochi-status-badge {
        top: calc(env(safe-area-inset-top, 0px) + 16px);
        left: 16px;
        bottom: auto;
        transform: none;
        font-size: .74rem;
        padding: 4px 10px;
    }
    .dochi-body.dochi-pet-focus .dochi-focus-toggle {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        right: 12px;
    }
    .dochi-body.dochi-pet-focus .dochi-focus-guild-name:not([hidden]) {
        display: block;
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        left: 50%;
        z-index: 6;
        transform: translateX(-50%);
        width: min(calc(100vw - 164px), 320px);
        padding: 8px 14px;
        border-radius: 999px;
        border: 1px solid rgba(255,255,255,0.1);
        background: rgba(10, 12, 20, 0.72);
        color: #f7e9ff;
        font-size: .82rem;
        font-weight: 700;
        letter-spacing: .02em;
        line-height: 1.1;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        box-shadow: 0 10px 24px rgba(0,0,0,0.2);
        backdrop-filter: blur(10px);
    }
    .dochi-body.dochi-pet-focus .dochi-pet-info {
        position: absolute;
        left: 50%;
        bottom: 16px;
        z-index: 5;
        transform: translateX(-50%);
        width: min(94vw, 388px);
        padding: 12px 14px;
        gap: 7px;
        background: rgba(8, 10, 18, 0.76);
        border: 1px solid rgba(255,255,255,0.08);
        border-radius: 18px;
        backdrop-filter: blur(12px);
        box-shadow: 0 12px 26px rgba(0,0,0,0.24);
    }
    .dochi-body.dochi-pet-focus .dochi-pet-name {
        justify-content: center;
        text-align: center;
        font-size: 1.08rem;
    }
    .dochi-body.dochi-pet-focus #petMoodRow {
        align-self: center !important;
        justify-content: center;
        text-align: center;
        max-width: 100%;
    }
    .dochi-body.dochi-pet-focus #petDescription,
    .dochi-body.dochi-pet-focus #specialFlags {
        display: none !important;
    }
    .dochi-body.dochi-pet-focus .dochi-stats-grid {
        gap: 6px;
    }
    .dochi-body.dochi-pet-focus .dochi-stat-row {
        gap: 6px;
    }
    .dochi-body.dochi-pet-focus .dochi-stat-label {
        min-width: 62px;
        font-size: .72rem;
    }
    .dochi-body.dochi-pet-focus .dochi-bar-wrap {
        height: 8px;
    }
    .dochi-body.dochi-pet-focus .dochi-stat-val {
        min-width: 34px;
        font-size: .72rem;
    }
    .dochi-body.dochi-pet-focus .dochi-coins-row {
        gap: 8px;
        justify-content: center;
    }
    .dochi-body.dochi-pet-focus .dochi-coin-chip {
        flex: 1 1 44%;
        justify-content: center;
        padding: 6px 10px;
        font-size: .78rem;
    }
    .dochi-body.dochi-pet-focus #actionToolbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        display: grid !important;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        align-items: start;
        margin: 0;
        padding: 10px 10px calc(env(safe-area-inset-bottom, 0px) + 10px);
        background: linear-gradient(180deg, rgba(9,10,15,0), rgba(9,10,15,0.92) 28%, rgba(9,10,15,0.98));
        backdrop-filter: blur(14px);
    }
    .dochi-body.dochi-pet-focus #actionToolbar > div,
    .dochi-body.dochi-pet-focus #actionToolbar > button {
        min-width: 0;
        width: 100%;
    }
    .dochi-body.dochi-pet-focus #actionToolbar > div {
        align-items: stretch !important;
    }
    .dochi-body.dochi-pet-focus #actionToolbar .dochi-btn {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        padding: 9px 6px;
        font-size: .78rem;
        justify-content: center;
    }
    .dochi-body.dochi-pet-focus #btnRefresh,
    .dochi-body.dochi-pet-focus #btnActionLog {
        min-width: 0;
    }
    .dochi-body.dochi-pet-focus .dochi-cooldown {
        min-height: 14px;
        font-size: .64rem;
    }
}

@media (max-width: 380px) {
    .dochi-body.dochi-pet-focus .dochi-pet-info {
        width: min(95vw, 372px);
        padding: 11px 12px;
    }
    .dochi-body.dochi-pet-focus .dochi-pet-window {
        width: min(100%, 320px);
        height: min(58vh, 430px);
        max-height: calc(100% - 144px);
    }
    .dochi-body.dochi-pet-focus .dochi-pet-rig {
        bottom: 24px;
        transform: translateX(-50%) scale(2.08);
    }
    .dochi-body.dochi-pet-focus .dochi-focus-guild-name:not([hidden]) {
        width: min(calc(100vw - 136px), 268px);
        font-size: .76rem;
        padding: 8px 12px;
    }
    .dochi-body.dochi-pet-focus .dochi-pet-name {
        font-size: 1rem;
    }
    .dochi-body.dochi-pet-focus #actionToolbar .dochi-btn {
        font-size: .72rem;
        padding: 8px 4px;
    }
}

/* ── Achievements grid ── */
.dochi-ach-grid {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.dochi-ach-badge {
    background: #1e2030; border: 1px solid #2a2d42; border-radius: 8px;
    padding: 6px 10px; font-size: .82rem; display: flex; align-items: center; gap: 6px;
    cursor: default; position: relative;
}
.dochi-ach-badge.earned { border-color: #5c4a18; background: #221d08; }
.dochi-ach-badge.earned .dochi-ach-name { color: #fde68a; }
.dochi-ach-badge.locked { opacity: .4; }
.dochi-ach-name { font-weight: 600; }

/* ── Leaderboard / dead list ── */
.dochi-table {
    width: 100%; border-collapse: collapse; font-size: .85rem;
}
.dochi-table th {
    text-align: left; padding: 8px 10px; color: #6b7280;
    border-bottom: 1px solid #2a2d42; font-weight: 600; font-size: .78rem;
}
.dochi-table td {
    padding: 8px 10px; border-bottom: 1px solid #1e2030;
    vertical-align: middle;
}
.dochi-table tr:last-child td { border-bottom: none; }

/* ── Toast ── */
.dochi-toast-area {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    display: flex; flex-direction: column-reverse; gap: 10px; pointer-events: none;
}
.dochi-toast {
    background: #1e2030; border: 1px solid #3a3f55; border-radius: 10px;
    padding: 12px 18px; font-size: .88rem; max-width: 340px;
    box-shadow: 0 4px 20px rgba(0,0,0,.5);
    animation: toastIn .25s ease; pointer-events: auto;
}
.dochi-toast.ok  { border-left: 3px solid #22c55e; }
.dochi-toast.err { border-left: 3px solid #ef4444; }
.dochi-toast.info{ border-left: 3px solid #7c5cbf; }
@keyframes toastIn { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:none} }

/* ── Spinner ── */
.dochi-spinner {
    display: inline-block; width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.2); border-top-color: #fff;
    border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Cooldown indicator ── */
.dochi-cooldown {
    font-size: .72rem; color: #f59e0b; margin-top: 2px;
}

/* ── Dialog ─────────────────────────────────────────────────────────────── */
.dochi-dialog {
    background: #1e2030;
    color: #e4e6eb;
    border: 1px solid #3a3f55;
    border-radius: 14px;
    padding: 24px 28px 20px;
    min-width: 300px;
    max-width: 440px;
    width: 90vw;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}
.dochi-dialog::backdrop {
    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(4px);
}
.dochi-dialog h3 {
    margin: 0 0 6px;
    font-size: 1.1rem;
    color: #c9b8ff;
}
.dochi-dialog-sub {
    font-size: .83rem;
    color: #8b8fa8;
    margin: 0 0 14px;
}
.dochi-dialog .dochi-input {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0;
}
.dochi-dialog-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

/* ── Backpack panel & grid ── */
.dochi-backpack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.dochi-backpack-item {
    background: #1e2030;
    border: 1px solid #2a2d42;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}
.dochi-backpack-item-name {
    font-weight: 600;
    font-size: .9rem;
    color: #e4e6eb;
}
.dochi-backpack-item-qty {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(124, 92, 191, 0.2);
    border: 1px solid rgba(124, 92, 191, 0.4);
    color: #c9b8ff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 700;
}
.dochi-backpack-item-desc {
    font-size: .78rem;
    color: #8b8fa8;
    flex: 1;
}
.dochi-backpack-item .dochi-btn {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

@media (max-width: 760px) {
    /* Mini-games button layout on mobile */
    #miniGamesPanel .dochi-panel-body > div > div:first-child {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }
    
    #miniGamesPanel .dochi-panel-body > div > div:first-child > div {
        justify-content: stretch !important;
        width: 100% !important;
    }
    
    #miniGamesPanel .dochi-btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
        padding: 8px 12px !important;
        font-size: 0.82rem !important;
    }
}
