/* ============================================================
 * room.css —— 自习室三房间全屏前端壳
 *
 * 只使用 .room-* 新类 + #app.room-mode；不碰 style.css 里旧的
 * .study-room-scene / .device-node，避免旧页面样式串进来。
 * ============================================================ */

/* ==================== 进入房间：全屏壳 ==================== */
#app.room-mode {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background: #0b0806;
}

#app.room-mode .top-bar,
#app.room-mode #bottomNav {
    display: none !important;
}

#app.room-mode #page-study {
    position: absolute;
    inset: 0;
    z-index: 60;
    width: 100%;
    height: 100%;
    padding: 0;
    overflow: hidden;
    background: #0b0806;
}

#app.room-mode #page-study.active {
    display: block;
}

/* ==================== 房间根容器 ==================== */
#app .room-full {
    --room-bg-x: 0px;
    --room-bg-y: 0px;
    --room-fg-x: 0px;
    --room-fg-y: 0px;

    position: absolute;
    inset: 0;
    overflow: hidden;
    isolation: isolate;
    color: #fff7e8;
    background: #120d08;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    touch-action: none;
    overscroll-behavior: none;
}

/* 背景：多留 3% 余量，视差 / cover 都不露黑边 */
#app .room-bg {
    position: absolute;
    inset: -3.2%;
    z-index: 0;
    background-color: #1a120b;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    transform: translate3d(var(--room-bg-x), var(--room-bg-y), 0) scale(1.035);
    transform-origin: 50% 50%;
    transition: transform .22s cubic-bezier(.2, .7, .25, 1);
    will-change: transform;
    pointer-events: none;
}

/* 灯亮后从窗 / 吊灯方向透出的暖光 */
#app .room-glow {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
    transition: opacity .85s ease;
    background:
        radial-gradient(ellipse 46% 30% at 50% 8%, rgba(255, 223, 156, .34), rgba(255, 205, 126, .09) 48%, transparent 76%),
        radial-gradient(ellipse 76% 54% at 50% 76%, rgba(255, 208, 136, .12), transparent 72%);
}

#app .room-full.room-lit .room-glow {
    opacity: 1;
}

/* 四角压暗，让文字和按钮更稳 */
#app .room-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(10, 7, 4, .26) 0%, transparent 17%, transparent 75%, rgba(10, 7, 4, .34) 100%),
        radial-gradient(ellipse at center, transparent 52%, rgba(20, 12, 7, .2) 100%);
}

/* 家具 / 设备 / 宠物层：与背景反向微动 */
#app .room-stage {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 1;
    transform: translate3d(var(--room-fg-x), var(--room-fg-y), 0);
    transition: transform .2s cubic-bezier(.2, .7, .25, 1), opacity .5s ease;
    will-change: transform;
}

/* 开灯前：暗场 + 家具层轻微淡入 */
#app .room-shade {
    position: absolute;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    opacity: 0;
    background:
        radial-gradient(circle at 50% 10%, rgba(13, 10, 8, .82), rgba(4, 4, 5, .97) 72%),
        #050404;
    transition: opacity .55s ease;
}

#app .room-full.room-dark .room-shade {
    opacity: .95;
    transition: none;
}

#app .room-full.room-dark .room-stage {
    opacity: .32;
    transition: transform .2s cubic-bezier(.2, .7, .25, 1), opacity .001s linear;
}

/* ==================== 房间顶部 ==================== */
#app .room-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 24px;
    pointer-events: none;
    background: linear-gradient(180deg,
        rgba(13, 9, 6, .78) 0%,
        rgba(13, 9, 6, .54) 56%,
        rgba(13, 9, 6, 0) 100%);
}

#app .room-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

#app .room-full .room-exit {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 36px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid rgba(255, 240, 210, .3);
    border-radius: 999px;
    background: rgba(18, 13, 9, .58);
    color: #fff3dc;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform .08s ease, background .18s ease;
}

#app .room-full .room-exit:active {
    transform: translateY(1px);
    background: rgba(28, 20, 13, .72);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .06);
}

#app .room-full .room-comfort {
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border: 1px solid rgba(255, 238, 205, .2);
    border-radius: 999px;
    background: rgba(17, 12, 8, .5);
    color: #ffe6b0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#app .room-full .room-comfort.is-empty {
    color: rgba(255, 246, 229, .72);
}

#app .room-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

#app .room-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 240, 210, .2);
    border-radius: 12px;
    background: rgba(20, 14, 9, .4);
    font-size: 20px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#app .room-heading-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

#app .room-title {
    display: block;
    color: #fff8ea;
    font-size: clamp(21px, 6vw, 27px);
    font-weight: 900;
    letter-spacing: .14em;
    line-height: 1.12;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .42), 0 0 18px rgba(255, 205, 130, .16);
}

#app .room-desc {
    display: block;
    color: rgba(255, 240, 214, .74);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    line-height: 1.35;
    text-shadow: 0 1px 5px rgba(0, 0, 0, .42);
}

/* ==================== 自习室设备文字节点 ==================== */
#app .room-devices,
#app .room-pets {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

#app .room-full .room-device {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    margin: 0;
    padding: 4px 8px 5px;
    border: 1px solid rgba(255, 243, 218, .14);
    border-radius: 10px;
    background: rgba(24, 15, 9, .18);
    color: #fff8e8;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.1;
    white-space: nowrap;
    text-align: left;
    text-shadow:
        0 2px 0 #5c2d18,
        1px 0 0 #5c2d18,
        -1px 0 0 #5c2d18,
        0 -1px 0 #5c2d18,
        0 5px 12px rgba(0, 0, 0, .5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -50%);
    transition: transform .16s ease, background .16s ease, border-color .16s ease;
}

#app .room-full .room-device:active {
    transform: translate(-50%, -50%) scale(.96);
    background: rgba(30, 20, 12, .34);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .14);
}

@media (hover: hover) {
    #app .room-full .room-device:hover {
        background: rgba(25, 16, 10, .32);
        border-color: rgba(255, 240, 210, .3);
    }
}

#app .room-full .room-device:disabled {
    opacity: .55;
    cursor: default;
}

#app .room-device-name {
    display: inline-block;
}

#app .room-device-star {
    display: inline-flex;
    align-items: center;
    gap: 1px;
    color: #ffe09b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .02em;
    text-shadow: 0 1px 0 #5c2d18, 0 0 8px rgba(255, 200, 80, .55);
}

#app .room-device-star-glyph {
    font-size: 11px;
}

/* ==================== 空房 / 娱乐室宠物 ==================== */
#app .room-empty {
    position: absolute;
    top: 61%;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 2px;
    color: rgba(255, 247, 232, .72);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .16em;
    line-height: 1.4;
    white-space: nowrap;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .48);
    pointer-events: none;
    transform: translate(-50%, -50%);
}

#app .room-empty::before,
#app .room-empty::after {
    content: "";
    width: 22px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 244, 222, .48));
}

#app .room-empty::after {
    background: linear-gradient(90deg, rgba(255, 244, 222, .48), transparent);
}

#app .room-full .room-pet {
    position: absolute;
    left: var(--pet-x, 50%);
    top: var(--pet-y, 80%);
    z-index: 2;
    display: block;
    width: var(--pet-w, 24%);
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
    pointer-events: auto;
    transform: translate(-50%, -100%);
    transform-origin: 50% 100%;
}

#app .room-full .room-pet::before {
    content: "";
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: -2px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(60, 37, 18, .34), transparent 72%);
    pointer-events: none;
}

#app .room-pet img {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 6px rgba(58, 34, 15, .2));
    animation: roomPetFloat 3.6s ease-in-out infinite;
    transform-origin: 50% 100%;
    will-change: transform;
    pointer-events: none;
}

#app .room-pet-name {
    position: absolute;
    left: 50%;
    bottom: -17px;
    z-index: 2;
    padding: 2px 6px;
    border: 1px solid rgba(255, 241, 215, .14);
    border-radius: 999px;
    background: rgba(30, 20, 12, .4);
    color: rgba(255, 246, 230, .88);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    line-height: 1.35;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transform: translateX(-50%);
    pointer-events: none;
}

#app .room-full .room-pet:active img {
    transform: scale(.985);
    animation-play-state: paused;
}

#app .room-full .room-pet:disabled {
    cursor: default;
    opacity: .55;
}

@keyframes roomPetFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-4px) scale(1.012); }
}

/* ==================== 底部房间标签 + 操作 ==================== */
#app .room-dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 44px 12px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(14, 10, 7, .5) 34%,
        rgba(14, 10, 7, .82) 100%);
    pointer-events: none;
}

#app .room-tabs {
    display: flex;
    gap: 5px;
    padding: 5px;
    border: 1px solid rgba(255, 240, 210, .16);
    border-radius: 16px;
    background: rgba(14, 10, 7, .5);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22), inset 0 1px 0 rgba(255, 255, 255, .05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: auto;
}

/* ==================== 更换装饰入口（V0.06） ==================== */
#app .room-full .room-deco {
    flex: 0 0 auto;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 220, 150, .55);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 236, 186, .96), rgba(232, 168, 74, .94));
    color: #4a2c10;
    font-family: inherit;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
    line-height: 1;
    white-space: nowrap;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
    box-shadow: 0 3px 0 rgba(120, 72, 20, .5), 0 8px 18px rgba(0, 0, 0, .3);
    cursor: pointer;
    pointer-events: auto;
    animation: decoPulse 2.4s ease-in-out infinite;
}

@keyframes decoPulse {
    0%, 100% {
        box-shadow: 0 3px 0 rgba(120, 72, 20, .5), 0 8px 18px rgba(0, 0, 0, .3), 0 0 0 0 rgba(255, 214, 130, .55);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 3px 0 rgba(120, 72, 20, .5), 0 8px 18px rgba(0, 0, 0, .3), 0 0 0 8px rgba(255, 214, 130, 0);
        transform: scale(1.035);
    }
}

#app .room-full .room-deco:active {
    transform: translateY(1px) scale(.98);
    animation: none;
}

#app .room-deco-icon {
    font-size: 14px;
    line-height: 1;
}

#app .room-deco-label {
    line-height: 1;
}

#app .room-full .room-tab {
    flex: 1 1 0;
    min-width: 0;
    min-height: 34px;
    margin: 0;
    padding: 7px 5px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: rgba(255, 244, 225, .58);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1;
    text-shadow: none;
    box-shadow: none;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

#app .room-full .room-tab.active {
    background: linear-gradient(180deg, rgba(255, 246, 222, .96), rgba(244, 218, 166, .94));
    color: #5a3413;
    box-shadow: 0 3px 0 rgba(90, 52, 19, .34), inset 0 1px 0 rgba(255, 255, 255, .8);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
}

#app .room-full .room-tab:active {
    transform: translateY(1px);
}

#app .room-full .room-tab:disabled {
    opacity: .38;
    cursor: not-allowed;
    box-shadow: none;
}

#app .room-actions {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

#app .room-full .room-act {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 54px;
    margin: 0;
    padding: 8px 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 238, 207, .25);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(39, 29, 20, .8), rgba(22, 16, 11, .88));
    color: #fff8e9;
    text-align: left;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: pointer;
    transition: transform .08s ease, box-shadow .18s ease, background .18s ease;
}

#app .room-full .room-act.primary {
    flex-grow: 1.3;
    border-color: rgba(170, 224, 168, .38);
    background: linear-gradient(180deg, rgba(58, 84, 59, .88), rgba(28, 49, 34, .9));
}

#app .room-full .room-act.pet {
    border-color: rgba(255, 210, 124, .34);
    background: linear-gradient(180deg, rgba(78, 58, 29, .86), rgba(37, 27, 15, .9));
}

#app .room-full .room-act:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 255, 255, .05);
}

#app .room-full .room-act:disabled {
    opacity: .48;
    cursor: not-allowed;
    box-shadow: none;
    filter: saturate(.55);
}

#app .room-act-main {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
    line-height: 1.1;
}

#app .room-act-icon {
    flex: 0 0 auto;
    font-size: 16px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}

#app .room-act-label {
    overflow: hidden;
    color: #fff8e9;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#app .room-act-sub {
    display: block;
    overflow: hidden;
    max-width: 100%;
    color: rgba(255, 246, 229, .58);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .015em;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== 未解锁遮罩 ==================== */
#app .room-lock {
    position: absolute;
    inset: 0;
    z-index: 35;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 92px 24px 112px;
    background: rgba(8, 6, 4, .52);
    backdrop-filter: blur(2.5px);
    -webkit-backdrop-filter: blur(2.5px);
}

#app .room-lock.hidden {
    display: none !important;
}

#app .room-lock-card {
    width: min(300px, 84%);
    padding: 24px 22px 22px;
    border: 1px solid rgba(255, 229, 179, .24);
    border-radius: 22px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 214, 132, .08), transparent 58%),
        linear-gradient(180deg, rgba(39, 27, 17, .92), rgba(23, 16, 11, .92));
    text-align: center;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .08);
}

#app .room-lock-badge {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border: 1px solid rgba(255, 213, 126, .24);
    border-radius: 50%;
    background: rgba(255, 215, 126, .09);
    font-size: 22px;
    line-height: 1;
    box-shadow: inset 0 0 16px rgba(255, 196, 92, .06);
}

#app .room-lock-title {
    color: #ffe6ae;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1.4;
    text-shadow: 0 2px 0 rgba(0, 0, 0, .34);
}

#app .room-lock-sub {
    margin-top: 8px;
    color: rgba(255, 244, 225, .64);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.7;
}

/* ==================== 焦点 / 小屏适配 ==================== */
#app .room-full button:focus-visible {
    outline: 2px solid #ffd77e;
    outline-offset: 3px;
}

@media (max-height: 700px) {
    #app .room-top {
        gap: 8px;
        padding-bottom: 18px;
    }

    #app .room-icon {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    #app .room-desc {
        font-size: 11px;
    }

    #app .room-dock {
        gap: 6px;
        padding-top: 32px;
    }

    #app .room-full .room-tab {
        min-height: 31px;
        padding: 6px 4px;
        font-size: 11px;
    }

    #app .room-full .room-act {
        min-height: 48px;
        padding: 6px 10px;
    }

    #app .room-act-label {
        font-size: 13px;
    }

    #app .room-act-sub {
        font-size: 9px;
    }

    #app .room-full .room-device {
        font-size: 15px;
    }
}

@media (max-height: 560px) {
    #app .room-heading {
        gap: 8px;
    }

    #app .room-title {
        font-size: 19px;
    }

    #app .room-dock {
        padding-top: 22px;
    }

    #app .room-lock {
        padding: 74px 20px 96px;
    }
}

/* 用户开了“减少动态效果”时，保留功能但关掉视差 / 呼吸 / 点灯过渡 */
@media (prefers-reduced-motion: reduce) {
    #app .room-bg,
    #app .room-stage,
    #app .room-shade,
    #app .room-glow {
        transition: none !important;
    }

    #app .room-pet img {
        animation: none !important;
    }

    #app .room-full .room-device,
    #app .room-full .room-act,
    #app .room-full .room-exit,
    #app .room-full .room-tab {
        transition: none !important;
    }
}

/* ==================== 氛围补充：光尘 + 宠物轻微走动 ==================== */
/* 开灯后漂浮的细小光尘，纯 CSS，不额外跑动画循环 */
#app .room-full::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    mix-blend-mode: screen;
    transition: opacity 1.1s ease;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255, 235, 190, .55) 0 1px, transparent 1.8px),
        radial-gradient(circle at 68% 42%, rgba(255, 224, 170, .42) 0 1.2px, transparent 2px),
        radial-gradient(circle at 32% 74%, rgba(255, 240, 205, .38) 0 1px, transparent 1.7px),
        radial-gradient(circle at 82% 82%, rgba(255, 220, 160, .34) 0 1.3px, transparent 2.1px);
    background-size: 180px 220px, 240px 180px, 200px 260px, 260px 220px;
    background-repeat: repeat;
    animation: roomDust 26s linear infinite;
}
#app .room-full.room-lit::before { opacity: .42; }

@keyframes roomDust {
    from { background-position: 0 0, 40px 20px, 20px 80px, 80px 40px; }
    to   { background-position: 28px -220px, 74px -160px, 48px -180px, 118px -180px; }
}

/* 宠物在房间地面小幅来回走动；不改变点击区域和呼吸动画 */
#app .room-full .room-pet {
    animation: roomPetWander 13s ease-in-out infinite alternate;
}
#app .room-full .room-pet:nth-child(2) { animation-duration: 17s; animation-delay: -5s; }
#app .room-full .room-pet:nth-child(3) { animation-duration: 15s; animation-delay: -8s; }
#app .room-full .room-pet:nth-child(4) { animation-duration: 19s; animation-delay: -3s; }

@keyframes roomPetWander {
    from { margin-left: -14px; }
    to   { margin-left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    #app .room-full::before,
    #app .room-full .room-pet,
    #app .room-pet img { animation: none; }
    #app .room-full.room-lit::before { opacity: .18; }
}

/* ==================== 更换装饰弹窗（V0.06） ==================== */
.deco-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    background: rgba(8, 6, 4, .62);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: decoFade .18s ease;
}

@keyframes decoFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.deco-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    padding: 16px 14px calc(14px + env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
    border-top: 1px solid rgba(255, 240, 210, .18);
    background: linear-gradient(180deg, #241a12 0%, #17110c 100%);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
    animation: decoUp .24s cubic-bezier(.2, .8, .3, 1);
}

@keyframes decoUp {
    from { transform: translateY(24px); opacity: .6; }
    to   { transform: translateY(0);    opacity: 1; }
}

.deco-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.deco-title {
    font-size: 16px;
    font-weight: 800;
    color: #fff4e0;
    letter-spacing: .02em;
}

.deco-sub {
    margin-top: 5px;
    font-size: 11.5px;
    color: rgba(255, 236, 205, .66);
}

.deco-sub b {
    color: #ffd9a0;
    font-weight: 800;
}

.deco-dot { margin: 0 6px; opacity: .5; }

.deco-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(255, 240, 210, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 244, 225, .8);
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
}

.deco-close:active { transform: translateY(1px); }

.deco-list {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 4px;
}

.deco-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 240, 210, .12);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
    transition: border-color .16s ease, background .16s ease;
}

.deco-item.is-active {
    border-color: rgba(255, 214, 140, .5);
    background: rgba(255, 214, 140, .08);
}

.deco-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 62px;
    height: 82px;
    border-radius: 9px;
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.deco-tier-tag {
    position: absolute;
    left: 4px;
    top: 4px;
    padding: 1px 5px;
    border-radius: 5px;
    background: rgba(12, 8, 5, .7);
    color: #ffd9a0;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .08em;
}

.deco-badge {
    position: absolute;
    left: 50%;
    bottom: 5px;
    transform: translateX(-50%);
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 214, 140, .92);
    color: #4a2c10;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.deco-info {
    flex: 1 1 auto;
    min-width: 0;
}

.deco-name {
    font-size: 14px;
    font-weight: 800;
    color: #fff4e0;
}

.deco-desc {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 236, 205, .58);
}

.deco-price {
    margin-top: 6px;
    font-size: 11.5px;
    font-weight: 800;
    color: #ffd9a0;
}

.deco-btn {
    flex: 0 0 auto;
    min-width: 62px;
    padding: 8px 12px;
    border: 0;
    border-radius: 11px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    transition: transform .12s ease, filter .16s ease;
}

.deco-btn:active { transform: translateY(1px); }

.deco-btn.is-buy {
    background: linear-gradient(180deg, #ffd98f, #e8b455);
    color: #4a2c10;
    box-shadow: 0 3px 0 rgba(90, 52, 19, .4);
}

.deco-btn.is-use {
    background: rgba(255, 246, 222, .92);
    color: #5a3413;
    box-shadow: 0 3px 0 rgba(90, 52, 19, .28);
}

.deco-btn.is-current,
.deco-btn:disabled {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 236, 205, .5);
    box-shadow: none;
    cursor: default;
}

.deco-foot {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 240, 210, .1);
    font-size: 10.5px;
    line-height: 1.6;
    color: rgba(255, 236, 205, .42);
}

.deco-empty {
    padding: 26px 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 236, 205, .5);
}
