
.room-root {
    --room-glass: rgba(255, 255, 255, 0.06);
    --room-line: rgba(255, 255, 255, 0.12);
    font-family: Muli, system-ui, sans-serif;
}

.room-narrator {
    font-style: normal;
    font-size: 16px;
    letter-spacing: 0.01em;
    color: rgba(255, 255, 255, 0.82);
    margin: 4px auto 18px;
    min-height: 0 !important;
    max-width: 760px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(var(--t-panel-rgb), 0.55);
    border: 1px solid var(--room-line);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.room-back {
    position: static !important;
    transform: none !important;
    width: fit-content !important;
    margin: 22px auto 8px !important;
    padding: 10px 18px !important;
    font-size: 14px !important;
    border-width: 1px !important;
    border-color: rgba(var(--t-accent-rgb), 0.6) !important;
    background: rgba(var(--t-panel-rgb), 0.82) !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35) !important;
}

    .room-back:hover {
        background: var(--t-accent) !important;
    }

.room-floor {
    border: 1px solid var(--room-line);
    border-radius: 28px;
    min-height: clamp(640px, 76vh, 880px);
    background:
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.10) 0 2px, transparent 2px 140px),
        linear-gradient(180deg, transparent 0 62%, #3a2617 62%, #2a1b10 100%),
        radial-gradient(ellipse at 70% 30%, rgba(var(--t-glow-rgb), 0.10), transparent 55%),
        linear-gradient(180deg, rgba(var(--t-panel-rgb), 1) 0%, rgba(var(--t-panel-rgb), 0.85) 62%);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45), inset 0 0 120px rgba(0, 0, 0, 0.45);
}

    .room-floor::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 62%;
        height: 10px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.25));
        pointer-events: none;
        z-index: 1;
    }

.room-wall, .room-desk, .room-shelf {
    display: none;
}

.room-rug {
    bottom: 5%;
    width: 42%;
    height: 14%;
    border-radius: 50%;
    background:
        radial-gradient(ellipse, rgba(var(--t-accent-rgb), 0.18) 0%, rgba(var(--t-accent-rgb), 0.08) 55%, transparent 72%);
    color: transparent;
    font-size: 10px;
    letter-spacing: 6px;
    z-index: 1;
}

.room-art {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

    .room-art > * {
        position: absolute;
    }

.art-window {
    left: 6%;
    top: 8%;
    width: 21%;
    height: 40%;
    border-radius: 14px 14px 6px 6px;
    background:
        radial-gradient(circle at 72% 26%, #fff8dd 0 5%, rgba(255, 248, 221, 0.25) 6%, transparent 14%),
        radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1px 1px at 40% 70%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 60% 50%, #fff, transparent), radial-gradient(1px 1px at 85% 75%, #fff, transparent),
        radial-gradient(1px 1px at 30% 55%, #fff, transparent), radial-gradient(1px 1px at 12% 80%, #fff, transparent),
        linear-gradient(180deg, #070a24 0%, #182058 70%, #2a2a6a 100%);
    border: 8px solid #2b2238;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), 0 0 60px rgba(var(--t-glow-rgb), 0.15);
}

    .art-window::before,
    .art-window::after {
        content: "";
        position: absolute;
        background: #2b2238;
    }

    .art-window::before { left: 50%; top: 0; bottom: 0; width: 6px; transform: translateX(-50%); }
    .art-window::after { left: -14px; right: -14px; bottom: -16px; height: 10px; border-radius: 4px; background: #3a2e4a; }

.art-clock {
    left: 33.5%;
    top: 9%;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: radial-gradient(circle, #f5efe4 0 60%, #d8cfbf 61% 66%, #6b5644 67%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

    .art-clock::before,
    .art-clock::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 50%;
        width: 2px;
        background: #2b2238;
        transform-origin: bottom center;
    }

    .art-clock::before { height: 22px; transform: translateX(-50%) rotate(98deg); }
    .art-clock::after { height: 16px; transform: translateX(-50%) rotate(102deg); }

.art-poster {
    left: 45%;
    top: 9%;
    width: 11%;
    height: 27%;
    border-radius: 6px;
    background:
        linear-gradient(160deg, rgba(var(--t-accent-rgb), 0.55), rgba(var(--t-glow-rgb), 0.15)),
        #1d1830;
    border: 6px solid #e9e1d4;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
    transform: rotate(-1.5deg);
}

.art-shelf {
    left: 60%;
    top: 22%;
    width: 15%;
    height: 8px;
    border-radius: 3px;
    background: #4a3426;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
}

    .art-shelf i {
        position: absolute;
        bottom: 8px;
        width: 12%;
        border-radius: 2px 2px 0 0;
    }

        .art-shelf i:nth-child(1) { left: 6%; height: 38px; background: #b0543c; }
        .art-shelf i:nth-child(2) { left: 20%; height: 44px; background: #3c6aa8; }
        .art-shelf i:nth-child(3) { left: 34%; height: 34px; background: #e0b04a; }
        .art-shelf i:nth-child(4) { left: 48%; height: 46px; background: #5a8a5c; transform: rotate(8deg); transform-origin: bottom left; }
        .art-shelf i:nth-child(5) { left: 72%; width: 18%; height: 18px; background: #e9e1d4; border-radius: 50% 50% 4px 4px; }

.art-lamp {
    right: 37%;
    top: 30%;
    width: 4px;
    height: 34%;
    background: #3a3040;
}

    .art-lamp::before {
        content: "";
        position: absolute;
        left: 50%;
        top: -26px;
        width: 54px;
        height: 30px;
        transform: translateX(-50%);
        background: linear-gradient(180deg, #f0d9a6, #c99b52);
        clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
    }

    .art-lamp::after {
        content: "";
        position: absolute;
        left: 50%;
        top: -10px;
        width: 260px;
        height: 260px;
        transform: translate(-50%, -20%);
        background: radial-gradient(circle, rgba(255, 210, 140, 0.20), transparent 62%);
        border-radius: 50%;
    }

.art-fridge {
    left: 30%;
    top: 30%;
    width: 9%;
    height: 46%;
    border-radius: 14px;
    background: linear-gradient(90deg, #d9dee6, #f4f6f9 40%, #c9d0da);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

    .art-fridge::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 36%;
        height: 2px;
        background: rgba(0, 0, 0, 0.18);
    }

    .art-fridge::after {
        content: "";
        position: absolute;
        right: 12%;
        top: 14%;
        width: 4px;
        height: 16%;
        border-radius: 2px;
        background: #9aa4b2;
        box-shadow: 0 160% 0 #9aa4b2;
    }

.art-desk {
    right: 5%;
    top: 58%;
    width: 31%;
    height: 22%;
}

    .art-desk::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        height: 14px;
        border-radius: 6px;
        background: linear-gradient(180deg, #7a5638, #5a3e28);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    }

    .art-desk::after {
        content: "";
        position: absolute;
        left: 6%;
        right: 6%;
        top: 14px;
        bottom: 0;
        border-left: 10px solid #4a3220;
        border-right: 10px solid #4a3220;
    }

.art-monitor {
    right: 13%;
    top: 31%;
    width: 17%;
    height: 22%;
    border-radius: 10px;
    background: #10131f;
    border: 6px solid #232836;
    box-shadow: 0 0 50px rgba(var(--t-glow-rgb), 0.25), 0 10px 24px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

    .art-monitor i {
        position: absolute;
        left: 10%;
        height: 5px;
        border-radius: 3px;
        background: rgba(var(--t-glow-rgb), 0.7);
        animation: art-code 3.2s ease-in-out infinite;
    }

        .art-monitor i:nth-child(1) { top: 18%; width: 55%; }
        .art-monitor i:nth-child(2) { top: 36%; width: 38%; left: 18%; animation-delay: 0.4s; background: rgba(255, 200, 120, 0.7); }
        .art-monitor i:nth-child(3) { top: 54%; width: 62%; left: 18%; animation-delay: 0.8s; }
        .art-monitor i:nth-child(4) { top: 72%; width: 30%; animation-delay: 1.2s; background: rgba(140, 220, 160, 0.7); }

    .art-monitor::after {
        content: "";
        position: absolute;
    }

@keyframes art-code {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.art-dresser {
    left: 4%;
    top: 56%;
    width: 15%;
    height: 26%;
    border-radius: 8px;
    background:
        linear-gradient(180deg, transparent 0 32%, rgba(0, 0, 0, 0.25) 32% 34%, transparent 34% 66%, rgba(0, 0, 0, 0.25) 66% 68%, transparent 68%),
        linear-gradient(90deg, #6e4d33, #8a623f 50%, #6e4d33);
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

.art-dogbed {
    left: 21%;
    bottom: 7%;
    width: 17%;
    height: 10%;
    border-radius: 50%;
    background: radial-gradient(ellipse at 50% 40%, #b98a5e 0 45%, #8a5e3b 46% 100%);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.art-plant {
    right: 2.5%;
    top: 40%;
    width: 46px;
    height: 70px;
}

    .art-plant::before {
        content: "";
        position: absolute;
        left: 8px;
        right: 8px;
        bottom: 0;
        height: 30px;
        border-radius: 0 0 10px 10px;
        background: #b0543c;
    }

    .art-plant::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 26px;
        height: 48px;
        border-radius: 50% 50% 40% 40%;
        background: radial-gradient(circle at 30% 40%, #6fae6a, #3f7a46 70%);
    }

.room-hotspot {
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    width: auto !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    z-index: 3;
    transform: translate(-50%, -50%);
    color: #fff !important;
}

    .room-hotspot:hover,
    .room-hotspot:focus-visible {
        transform: translate(-50%, -50%) scale(1.06) !important;
        box-shadow: none !important;
        outline: none;
    }

    .room-hotspot .hs-icon {
        width: 58px;
        height: 58px;
        display: grid;
        place-items: center;
        font-size: 28px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.22);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(var(--t-glow-rgb), 0.5);
        animation: hs-breathe 3.6s ease-in-out infinite;
        transition: background-color 0.25s ease, border-color 0.25s ease;
    }

    .room-hotspot:hover .hs-icon,
    .room-hotspot:focus-visible .hs-icon {
        background: rgba(var(--t-glow-rgb), 0.22);
        border-color: var(--t-accent);
        animation: none;
        box-shadow: 0 0 0 6px rgba(var(--t-glow-rgb), 0.18), 0 10px 26px rgba(0, 0, 0, 0.4);
    }

    .room-hotspot .hs-label {
        margin: 0;
        padding: 3px 11px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.03em;
        color: #fff;
        background: rgba(var(--t-panel-rgb), 0.78);
        border: 1px solid rgba(255, 255, 255, 0.14);
        white-space: nowrap;
    }

    .room-hotspot .hs-hint {
        position: absolute;
        top: -26px;
        left: 50%;
        margin: 0;
        padding: 3px 9px;
        border-radius: 8px;
        font-size: 11px;
        white-space: nowrap;
        color: #fff;
        background: rgba(0, 0, 0, 0.7);
        opacity: 0;
        transform: translate(-50%, 4px);
        transition: opacity 0.2s ease, transform 0.2s ease;
        pointer-events: none;
    }

    .room-hotspot:hover .hs-hint,
    .room-hotspot:focus-visible .hs-hint {
        opacity: 1;
        transform: translate(-50%, 0);
    }

@keyframes hs-breathe {
    0%, 100% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(var(--t-glow-rgb), 0.35); }
    50% { box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35), 0 0 0 7px rgba(var(--t-glow-rgb), 0); }
}

.room-window { top: 28% !important; left: 16.5% !important; right: auto !important; bottom: auto !important; }
.room-clock { top: 14% !important; left: 35.7% !important; right: auto !important; bottom: auto !important; }
.room-poster { top: 22% !important; left: 50.5% !important; right: auto !important; bottom: auto !important; }
.room-fridge { top: 48% !important; left: 34.5% !important; right: auto !important; bottom: auto !important; }
.room-pc { top: 42% !important; left: 78.5% !important; right: auto !important; bottom: auto !important; }
.room-tea { top: 52% !important; left: 90% !important; right: auto !important; bottom: auto !important; }
.room-drawer { top: 68% !important; left: 11.5% !important; right: auto !important; bottom: auto !important; }
.room-dog { top: 84% !important; left: 29.5% !important; right: auto !important; bottom: auto !important; }
.room-sock { top: 86% !important; left: 50% !important; right: auto !important; bottom: auto !important; }
.room-box { top: 76% !important; left: 63% !important; right: auto !important; bottom: auto !important; }
.room-trash { top: 86% !important; left: 92% !important; right: auto !important; bottom: auto !important; }

@media (max-width: 1000px) {
    .room-art { display: none; }

    .apt-room {
        border-radius: 22px !important;
        border: 1px solid var(--room-line) !important;
        background:
            radial-gradient(ellipse at 100% 0%, rgba(var(--t-glow-rgb), 0.14), transparent 60%),
            rgba(var(--t-panel-rgb), 0.82) !important;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35) !important;
    }

    .apt-badge {
        font-size: 13px !important;
        letter-spacing: 0.18em !important;
        color: var(--t-accent) !important;
    }

    .apt-desc {
        font-style: normal !important;
        color: rgba(255, 255, 255, 0.65) !important;
    }

    .apt-grid {
        gap: 10px !important;
    }

    .room-mobile-btn {
        width: auto !important;
        margin: 0 !important;
        border-radius: 18px !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        background: rgba(255, 255, 255, 0.05) !important;
        padding: 14px 8px !important;
        color: #fff !important;
        transition: transform 0.15s ease, background-color 0.2s ease;
    }

        .room-mobile-btn:active {
            transform: scale(0.97);
            background: rgba(var(--t-glow-rgb), 0.18) !important;
        }

    .mb-icon {
        display: grid !important;
        place-items: center;
        width: 48px;
        height: 48px;
        margin: 0 auto 6px;
        border-radius: 50%;
        font-size: 24px !important;
        background: rgba(var(--t-glow-rgb), 0.12);
    }

    .mb-label {
        color: #fff !important;
    }

    .mb-hint {
        color: rgba(255, 255, 255, 0.55) !important;
    }

    .apt-hallway {
        color: rgba(255, 255, 255, 0.4) !important;
        letter-spacing: 0.2em;
        font-size: 11px !important;
    }
}

.mini-screen {
    position: relative;
    border-radius: 28px !important;
    border: 1px solid var(--room-line) !important;
    background:
        radial-gradient(ellipse at 50% -10%, rgba(var(--t-glow-rgb), 0.18), transparent 60%),
        rgba(var(--t-panel-rgb), 0.86) !important;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 40px 34px 34px !important;
}

    .mini-screen h2 {
        font-size: 24px !important;
        font-weight: 800;
        letter-spacing: 0.01em;
        color: #fff !important;
    }

    .mini-screen p {
        color: rgba(255, 255, 255, 0.82);
    }

    .mini-screen .tea-cup, .mini-screen .dog-avatar, .mini-screen .trash-can, .mini-screen .fridge-door,
    .mini-screen .bed-zzz, .mini-screen .sock-spin, .mini-screen .mystery-box {
        display: inline-grid;
        place-items: center;
        width: 110px;
        height: 110px;
        margin-bottom: 8px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(var(--t-glow-rgb), 0.22), rgba(var(--t-glow-rgb), 0.04) 70%);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
    }

.room-action-btn {
    width: auto !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    border-radius: 999px !important;
    padding: 12px 24px !important;
    font-size: 15px !important;
    background: linear-gradient(135deg, var(--t-accent), rgba(var(--t-glow-rgb), 0.9)) !important;
    color: rgba(var(--t-panel-rgb), 1) !important;
    box-shadow: 0 10px 24px rgba(var(--t-glow-rgb), 0.25);
}

    .room-action-btn:hover {
        transform: translateY(-2px) !important;
    }

.terminal-screen {
    background: #0b0e16 !important;
    font-family: 'Courier New', monospace !important;
}

.poster-frame {
    border-radius: 18px !important;
}

#starsView .stars-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px 20px;
    text-align: left;
    margin-bottom: 16px;
}

#starsView .stars-head-text {
    min-width: 0;
}

#starsView .stars-title {
    font-size: clamp(24px, 3.4vw, 34px);
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.01em;
}

#starsView .stars-sub {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    margin: 6px 0 0;
}

#starsView .stars-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

#starsView .stars-constellation-badge,
#starsView .stars-note-count {
    margin: 0;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
}

    #starsView .stars-note-count:empty { display: none; }

#starsView .stars-note-count {
    color: #ffe2b8;
    border-color: rgba(255, 214, 150, 0.4);
}

.starnote-open {
    width: auto !important;
    margin: 0 !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    border: 1px solid rgba(255, 214, 150, 0.6);
    background: linear-gradient(135deg, rgba(255, 214, 150, 0.22), rgba(255, 214, 150, 0.06));
    color: #ffe9c9;
    font-family: Muli, sans-serif;
    font-size: 15px !important;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

    .starnote-open:hover {
        transform: translateY(-2px);
        box-shadow: 0 0 24px rgba(255, 214, 150, 0.3);
    }

#starsView .stars-canvas-wrap {
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

#starsView .stars-panel {
    left: 50%;
    right: auto;
    bottom: 18px;
    width: min(560px, calc(100% - 32px));
    transform: translate(-50%, 140%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(10, 12, 40, 0.72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    color: #fff;
}

    #starsView .stars-panel.visible {
        transform: translate(-50%, 0);
    }

    #starsView .stars-panel .star-label {
        color: var(--t-accent);
        letter-spacing: 0.2em;
    }

    #starsView .stars-panel.is-note .star-label {
        color: #ffd696;
    }

    #starsView .stars-panel.is-note p {
        font-family: 'Caveat', cursive;
        font-size: 24px;
        line-height: 1.3;
        color: #fff1dc;
    }

#starsView .stars-hint {
    color: rgba(255, 255, 255, 0.5);
}

.starnote-sheet {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(4, 6, 20, 0.6);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

    .starnote-sheet[hidden] {
        display: none;
    }

.starnote-card {
    width: min(480px, 100%);
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 26px 24px 22px;
    border-radius: 24px;
    border: 1px solid rgba(255, 214, 150, 0.35);
    background:
        radial-gradient(ellipse at 50% -20%, rgba(255, 214, 150, 0.18), transparent 60%),
        #10122e;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    color: #fff;
    text-align: left;
    font-family: Muli, sans-serif;
}

    .starnote-card h3 {
        margin: 0 0 6px;
        font-size: 22px;
        font-weight: 800;
    }

    .starnote-card p {
        margin: 0 0 14px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.72);
    }

    .starnote-card textarea,
    .starnote-card input {
        width: 100%;
        box-sizing: border-box;
        border-radius: 14px;
        border: 1px solid rgba(255, 255, 255, 0.18);
        background: rgba(255, 255, 255, 0.06);
        color: #fff;
        font-family: Muli, sans-serif;
        font-size: 16px;
        padding: 12px 14px;
        outline: none;
    }

    .starnote-card textarea {
        min-height: 92px;
        resize: vertical;
    }

        .starnote-card textarea:focus,
        .starnote-card input:focus {
            border-color: #ffd696;
            box-shadow: 0 0 0 3px rgba(255, 214, 150, 0.18);
        }

.starnote-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 14px;
}

    .starnote-row input {
        flex: 1;
        height: 44px;
    }

    .starnote-row span {
        font-family: 'Courier New', monospace;
        font-size: 12px;
        color: rgba(255, 255, 255, 0.55);
        white-space: nowrap;
    }

#starNoteCaptcha {
    min-height: 78px;
}

.starnote-card input.starnote-email {
    height: 44px;
    margin: 0 0 6px;
}

.starnote-card p.starnote-privacy {
    margin: 0 0 14px;
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
}

.starnote-msg {
    min-height: 1.4em;
    margin: 10px 0 0 !important;
    font-size: 14px !important;
}

    .starnote-msg.is-ok { color: #9ff0b5 !important; }
    .starnote-msg.is-err { color: #ffb0a8 !important; }

.starnote-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
}

    .starnote-actions button {
        flex: 1;
        width: auto !important;
        margin: 0 !important;
        min-height: 46px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        background: transparent;
        color: #fff;
        font-family: Muli, sans-serif;
        font-size: 15px !important;
        font-weight: 700;
        cursor: pointer;
    }

        .starnote-actions button[type="submit"] {
            border: 0;
            background: linear-gradient(135deg, #ffd696, #ff9f7a);
            color: #2a1530;
        }

        .starnote-actions button:disabled {
            opacity: 0.6;
            cursor: progress;
        }

@media (max-width: 600px) {
    #starsView .stars-canvas-wrap {
        aspect-ratio: 3 / 4;
        border-radius: 22px;
    }

    .starnote-open {
        width: 100% !important;
        justify-content: center;
    }
}

.room-hotspot:active {
    transform: translate(-50%, -50%) scale(0.96) !important;
}

.rd-deck {
    position: relative;
    max-width: 580px;
    margin: 18px auto 0;
    isolation: isolate;
}

    .rd-deck::before,
    .rd-deck::after {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        border-radius: 22px;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(var(--t-panel-rgb), 0.6);
        transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), opacity 0.35s ease;
        pointer-events: none;
    }

    .rd-deck::before {
        transform: translateY(calc(9px - var(--rd-pull, 0) * 9px)) scale(calc(0.955 + var(--rd-pull, 0) * 0.045));
        opacity: calc(0.8 + var(--rd-pull, 0) * 0.2);
    }

    .rd-deck::after {
        transform: translateY(calc(18px - var(--rd-pull, 0) * 9px)) scale(calc(0.91 + var(--rd-pull, 0) * 0.045));
        opacity: 0.45;
    }

.rd-card {
    position: relative;
    cursor: grab;
    touch-action: pan-y;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    will-change: transform;
}

    .rd-card:not(.rd-card-custom) {
        padding: 24px 26px;
        border-radius: 22px;
        border: 1px solid rgba(var(--t-accent-rgb), 0.3);
        background:
            radial-gradient(ellipse at 0% 0%, rgba(var(--t-glow-rgb), 0.16), transparent 60%),
            rgba(var(--t-panel-rgb), 0.94);
        box-shadow: 0 16px 34px rgba(0, 0, 0, 0.32);
    }

    .rd-card.rd-card-custom {
        margin-bottom: 0 !important;
    }

    .rd-card.is-dragging {
        cursor: grabbing;
    }

    .rd-card:focus-visible {
        box-shadow: 0 0 0 3px rgba(var(--t-accent-rgb), 0.6), 0 16px 34px rgba(0, 0, 0, 0.32);
    }

    .rd-card::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: inherit;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.2s ease;
        box-shadow: inset 0 0 0 2px rgba(var(--t-accent-rgb), 0.55);
    }

.rd-deck[data-dir] .rd-card::after {
    opacity: var(--rd-pull, 0);
}

.rd-card > p {
    margin: 0 !important;
    min-height: 3.4em;
}

    .rd-card > p.poster-quote {
        min-height: 0;
    }

.rd-w {
    display: inline-block;
    white-space: pre;
    animation: rdWord 0.55s cubic-bezier(.2, .8, .2, 1) backwards;
}

@keyframes rdWord {
    from {
        opacity: 0;
        transform: translateY(7px);
        filter: blur(5px);
    }

    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

.rd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 14px;
    max-width: 580px;
    margin: 30px auto 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
}

.rd-count b {
    color: var(--t-accent);
    font-size: 14px;
}

.rd-bar {
    flex: 0 1 120px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

    .rd-bar i {
        display: block;
        width: 0;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, var(--t-accent), rgba(var(--t-glow-rgb), 0.9));
        transition: width 0.45s cubic-bezier(.2, .8, .2, 1);
    }

.rd-hint {
    animation: rdHint 2.6s ease-in-out infinite;
}

    .rd-hint.is-toast {
        animation: rdToast 0.35s ease both;
        color: var(--t-accent);
    }

.rd-hint-seen .rd-hint:not(.is-toast) {
    display: none;
}

@keyframes rdHint {
    0%, 100% { transform: translateX(0); opacity: 0.85; }
    50% { transform: translateX(-5px); opacity: 1; }
}

@keyframes rdToast {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.room-action-btn.rd-next-btn {
    margin-top: 14px !important;
    padding: 9px 18px !important;
    font-size: 14px !important;
    background: rgba(var(--t-accent-rgb), 0.1) !important;
    color: var(--t-accent) !important;
    border: 1px solid rgba(var(--t-accent-rgb), 0.4) !important;
    box-shadow: none;
}

    .room-action-btn.rd-next-btn::before {
        content: "↻";
        display: inline-block;
        margin-right: 8px;
        transition: transform 0.45s cubic-bezier(.2, .8, .2, 1);
    }

    .room-action-btn.rd-next-btn:hover {
        background: rgba(var(--t-accent-rgb), 0.2) !important;
    }

        .room-action-btn.rd-next-btn:hover::before {
            transform: rotate(-200deg);
        }

.mystery-box {
    touch-action: none;
    cursor: grab;
}

.rd-tappable {
    cursor: pointer;
    transition: transform 0.2s ease, text-shadow 0.2s ease;
    border-radius: 12px;
    outline: none;
}

    .rd-tappable:hover {
        text-shadow: 0 0 28px var(--t-accent);
    }

    .rd-tappable:focus-visible {
        box-shadow: 0 0 0 3px rgba(var(--t-accent-rgb), 0.55);
    }

@media (max-width: 600px) {
    .rd-card:not(.rd-card-custom) {
        padding: 20px 18px;
    }

    .rd-meta {
        margin-top: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rd-w,
    .rd-hint {
        animation: none;
    }

    .rd-deck::before,
    .rd-deck::after,
    .rd-bar i {
        transition: none;
    }
}
