/* ============================================================================
   Retro OS '98 · 像素站台 — integration.css
   自持样式：不依赖任何运行时 CDN（Tailwind vendor 缺失/为空时页面仍然完整可用）。
   视觉基准：webdev_os_98 (12).html（房间摆件 / CRT / 键盘 / 窗口 / 氛围光全部保留）。
   ========================================================================== */

:root {
    --os-bg: #DFC17B;
    --os-bg-dots: #CFAF66;
    --win-bg: #E6E0D0;
    --win-inner: #F4EFE3;
}

* {
    box-sizing: border-box;
    user-select: none;
    -webkit-font-smoothing: none;
    image-rendering: pixelated;
}

html, body { height: 100%; }

body.os-body {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100dvh;
    overflow: hidden;
    background-color: #4A3E35;
    font-family: 'VT323', 'DotGothic16', 'Noto Sans SC', monospace;
    color: #2E2922;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* 输入类保留可选中文本 */
textarea, input { user-select: text !important; font-family: 'VT323', 'DotGothic16', monospace; }

.hidden { display: none !important; }

/* ---------- 像素立体凸起与内凹边框 ---------- */
.bevel-out {
    border-top: 2px solid #FDFBF7;
    border-left: 2px solid #FDFBF7;
    border-right: 2px solid #706656;
    border-bottom: 2px solid #706656;
    box-shadow: 1px 1px 0px #2E2922, -1px -1px 0px #2E2922, 1px -1px 0px #2E2922, -1px 1px 0px #2E2922;
}

.bevel-in {
    border-top: 2px solid #706656;
    border-left: 2px solid #706656;
    border-right: 2px solid #FDFBF7;
    border-bottom: 2px solid #FDFBF7;
}

/* ---------- 复古窗口通用容器 ---------- */
.pixel-window {
    background-color: var(--win-bg);
    border: 2px solid #2E2922;
    box-shadow: inset 2px 2px 0px #FDFBF7, inset -2px -2px 0px #A69D8A, 5px 5px 0px rgba(46, 41, 34, 0.38);
    position: absolute;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    transition: width 0.16s ease, height 0.16s ease;
}

.dark-video-window {
    background-color: #4A4A48;
    border: 2px solid #1E1E1C;
    box-shadow: inset 2px 2px 0px #8C8C88, inset -2px -2px 0px #2D2D2B, 6px 6px 0px rgba(30, 27, 22, 0.48);
    position: absolute;
    display: flex;
    flex-direction: column;
    transition: width 0.16s ease, height 0.16s ease;
}

/* 最大化铺满菜单栏下方，覆盖桌面图标所在区域。 */
.win-maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
}

/* App frames resize with their content viewport; the grip stays outside the iframe. */
.window-resize-handle { position: absolute; right: 1px; bottom: 1px; z-index: 3; width: 18px; height: 18px; border: 0; padding: 0; cursor: nwse-resize; touch-action: none; background: repeating-linear-gradient(135deg, transparent 0 3px, #706656 3px 4px, transparent 4px 6px); clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.window-resize-handle:focus-visible { outline: 2px solid #376b5d; outline-offset: -2px; clip-path: none; }
.win-maximized .window-resize-handle { display: none; }
.window-resizing { transition: none !important; user-select: none; }
.window-resizing .app-frame { pointer-events: none; }
.os-app-window .win-statusline { padding-right: 22px; }

/* ---------- CRT 屏幕壁纸 / 扫描线 / 氛围光 ---------- */
.crt-screen-bg {
    background-color: var(--os-bg);
    background-image:
        radial-gradient(var(--os-bg-dots) 25%, transparent 25%),
        radial-gradient(var(--os-bg-dots) 25%, transparent 25%);
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
    position: relative;
    overflow: hidden;
}
.crt-screen-bg.wallpaper-sage { --os-bg: #8FA893; --os-bg-dots: #7B947F; }
.crt-screen-bg.wallpaper-dusk { --os-bg: #C89D8C; --os-bg-dots: #B38776; }

.crt-overlay {
    pointer-events: none !important;
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.02) 50%),
        radial-gradient(circle at center, transparent 72%, rgba(45, 35, 20, 0.08) 100%);
    background-size: 100% 3px, 100% 100%;
    z-index: 90;
}

.mood-overlay {
    pointer-events: none !important;
    position: fixed;
    inset: 0;
    z-index: 45;
    transition: background 0.7s ease;
}
.mood-dusk { background: radial-gradient(circle at 20% 20%, rgba(255, 166, 94, 0.18) 0%, rgba(30, 18, 12, 0.18) 100%); }
.mood-night { background: radial-gradient(circle at 50% 46%, rgba(255, 195, 110, 0.12) 0%, rgba(12, 15, 30, 0.68) 100%); }
.mood-rainy { background: radial-gradient(circle at 50% 50%, rgba(120, 165, 210, 0.15) 0%, rgba(20, 28, 42, 0.48) 100%); }

/* ---------- 动画 ---------- */
@keyframes steamRise { 0% { transform: translateY(0); opacity: 0.7; } 100% { transform: translateY(-20px); opacity: 0; } }
.steam-line { animation: steamRise 2.5s infinite ease-in-out; }

@keyframes spinCD { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.cd-spinning { animation: spinCD 3s linear infinite; }

@keyframes blinkEyes { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.1); } }
.char-eyes { transform-origin: center; animation: blinkEyes 4s infinite; }

@keyframes breathe { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(2px); } }
.char-body { animation: breathe 3s ease-in-out infinite; }
.char-body-delay { animation: breathe 3.4s ease-in-out 1s infinite; }

@keyframes rainFall {
    0% { transform: translateY(-20px) translateX(4px); opacity: 0; }
    30% { opacity: 0.75; }
    100% { transform: translateY(150px) translateX(-16px); opacity: 0; }
}
.pixel-raindrop {
    position: absolute;
    width: 2px;
    height: 11px;
    background: rgba(210, 232, 255, 0.75);
    animation: rainFall 0.75s linear infinite;
}

@keyframes eqBounce { 0%, 100% { height: 22%; } 50% { height: 95%; } }
.eq-bar-active { animation: eqBounce 0.45s ease-in-out infinite; }

/* ---------- 洞洞板与便利贴 ---------- */
.pegboard {
    background-color: #C7B293;
    background-image: radial-gradient(#5C4D3B 22%, transparent 25%);
    background-size: 18px 18px;
    box-shadow: inset 0 4px 8px rgba(0, 0, 0, 0.25);
}
.sticky-note {
    background-color: #F4EFE6;
    background-image: repeating-linear-gradient(transparent, transparent 23px, #D5CEBF 23px, #D5CEBF 24px);
    border: 2px solid #4A4339;
    box-shadow: 4px 6px 0px rgba(0, 0, 0, 0.25);
}

/* ---------- 复古机械键盘键帽 / 滑杆 ---------- */
.mech-key {
    background: #EAE3D2;
    border-top: 2px solid #FFFDF9;
    border-left: 2px solid #FFFDF9;
    border-right: 2px solid #968C79;
    border-bottom: 5px solid #827865;
    border-radius: 2px;
    color: #4A4338;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 0 #3B352C;
}
.mech-key:active, .mech-key.pressed {
    transform: translateY(3px);
    border-bottom-width: 2px;
    background: #DDD5C2;
}

input[type="range"].retro-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #C8BFA8;
    border: 1px solid #3B352C;
}
input[type="range"].retro-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 16px;
    background: #E6E0D0;
    border: 2px solid #2E2922;
    cursor: pointer;
}

/* ============================================================================
   0. 手机端顶部快捷栏
   ========================================================================== */
.mobile-only-bar {
    position: relative;
    z-index: 30;
    width: 100%;
    background: #3B352C;
    border-bottom: 2px solid #231F1A;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #EAE3D2;
    flex-shrink: 0;
}
.mobile-bar-group { display: flex; align-items: center; gap: 6px; }

.lcd-chip {
    background: #36493C;
    border: 1px solid rgba(139, 176, 138, 0.5);
    padding: 2px 6px;
    color: #8AB08A;
    font-family: 'VT323', monospace;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.rbtn {
    font-family: inherit;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 6px;
    cursor: pointer;
    border: 1px solid #2E2922;
    color: inherit;
}
.rbtn:active { transform: scale(0.95); }
.rbtn-dark { background: #5C5346; border-color: rgba(234, 227, 210, 0.5); color: #FAF3E6; }
.rbtn-brown { background: #5C5346; border-color: #ABA18E; color: #DFC17B; padding: 2px 8px; }
.rbtn-light { background: #E6E0D0; color: #2E2922; display: flex; align-items: center; gap: 4px; }
.rbtn-note { background: #F4EFE6; color: #B84A39; display: flex; align-items: center; gap: 4px; }

.cd-disc-mini {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid #5C5346;
    background: linear-gradient(to top right, #9EB5B8, #ffffff, #DFC17B);
}

/* 手机端便签弹层 */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.modal-note { width: 100%; max-width: 320px; padding: 14px; position: relative; }
.modal-note-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
    color: #3B352C;
    margin-bottom: 4px;
}
.modal-close {
    width: 24px;
    height: 24px;
    background: #3B352C;
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
}
.todo-list { list-style: none; margin: 8px 0 0; padding: 0; }
.todo-list-mobile li { padding: 2px 4px 2px 6px; font-size: 15px; line-height: 22px; }
.todo-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0 4px 0 6px;
    font-size: 14px;
    line-height: 22px;
}
.todo-list li:hover { background: rgba(230, 222, 200, 0.6); }
.todo-check { font-weight: bold; }
.todo-done .todo-check { color: #B84A39; }
.todo-done .todo-text { text-decoration: line-through; color: #8C8270; }

/* ============================================================================
   1. 桌面背景房间（>= 860px 显示）
   ========================================================================== */
.room-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    display: flex;
    justify-content: space-between;
    overflow: hidden;
}
.room-side { width: 25%; height: 100%; display: flex; flex-direction: column; justify-content: space-between; position: relative; }

/* 左侧夕阳铁艺窗 */
.window-sky {
    height: 144px;
    width: 100%;
    background: linear-gradient(to bottom, #69525E, #9C6B63, #C98A6B);
    border-bottom: 8px solid #6E5D4F;
    border-right: 8px solid #6E5D4F;
    position: relative;
    overflow: hidden;
    padding: 8px;
    transition: background 0.7s ease;
}
.window-sun-orb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(245, 197, 130, 0.4);
    position: absolute;
    bottom: 16px;
    right: 32px;
    transition: background 0.7s ease;
}
.window-rain-layer { position: absolute; inset: 0; pointer-events: none; }
.window-bars {
    width: 100%;
    height: 100%;
    border: 4px solid #4A3E35;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    opacity: 0.75;
    position: relative;
    z-index: 10;
}
.window-bar-cell {
    border-right: 2px solid #4A3E35;
    display: flex;
    align-items: center;
    justify-content: center;
}
.window-bar-knob { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #4A3E35; }

/* 左侧墙板 + 挂钟 + 洞洞板 */
.wall-panel { flex: 1; width: 100%; background: #9E8C75; padding-top: 16px; padding-right: 16px; display: flex; flex-direction: column; align-items: flex-start; position: relative; }
.wall-clock {
    pointer-events: auto;
    cursor: pointer;
    margin-left: 16px;
    margin-bottom: 12px;
    width: 192px;
    height: 80px;
    background: #4A504D;
    border: 4px solid #2D312F;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.3);
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 10;
}
.lcd-screen {
    width: 100%;
    height: 100%;
    background: #36493C;
    border: 2px solid #233027;
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #8AB08A;
    font-family: 'VT323', monospace;
}
.lcd-brand { font-size: 10px; letter-spacing: 0.15em; opacity: 0.8; }
.lcd-clock { font-size: 24px; font-weight: bold; letter-spacing: 0.05em; line-height: 1; margin-top: 2px; }
.lcd-day { font-size: 14px; margin-left: 4px; border: 1px solid #8AB08A; padding: 0 2px; }
.lcd-mood-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #688968;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lcd-mood-btn:hover { background: #435B4B; }

.pegboard-room { width: 224px; flex: 1; border-top: 4px solid #8A765D; border-right: 4px solid #8A765D; position: relative; }
.pegboard-shelf { width: 64px; height: 8px; background: #E6DEC8; border: 1px solid #4A3E35; position: absolute; top: 24px; left: 32px; box-shadow: 1px 1px 2px rgba(0,0,0,0.3); }
.pegboard-btn {
    pointer-events: auto;
    cursor: pointer;
    position: absolute;
    top: 64px;
    left: 40px;
    background: #3B352C;
    color: #EAE3D2;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #EAE3D2;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.35);
}
.pegboard-btn:hover { background: #B84A39; }

/* 左下角马克杯与书堆 */
.desk-left { height: 96px; width: 100%; position: relative; display: flex; align-items: flex-end; padding-left: 12px; padding-bottom: 24px; z-index: 20; pointer-events: auto; }
.mug { cursor: pointer; position: relative; display: flex; align-items: center; margin-right: 12px; }
.mug:hover .mug-body { transform: translateY(-2px); }
.mug-body { width: 64px; height: 80px; background: #627D82; border: 2px solid #362E28; box-shadow: 2px 2px 4px rgba(0,0,0,0.3); position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; transition: transform 0.15s; }
.mug-steam { position: absolute; top: -32px; left: 16px; display: flex; gap: 8px; pointer-events: none; }
.steam-a { width: 6px; height: 24px; background: rgba(250, 243, 230, 0.7); }
.steam-b { width: 6px; height: 20px; background: rgba(250, 243, 230, 0.6); animation-delay: 1s; }
.mug-handle { width: 16px; height: 40px; border: 4px solid #D8C8B0; border-radius: 8px 0 0 8px; margin-right: -4px; }
.mug-lid { height: 12px; background: #E3D6C1; border-bottom: 2px solid #362E28; }
.mug-art { width: 40px; height: 40px; background: #D8B888; border-radius: 50%; margin-left: -16px; border: 2px solid #362E28; }
.mug-label { font-size: 10px; color: #E3D6C1; text-align: right; padding-right: 6px; padding-bottom: 4px; font-family: 'VT323', monospace; }

.book-stack { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; margin-right: 8px; }
.book { border: 2px solid #4A3E35; }
.book-a { width: 80px; height: 16px; background: #E6DFD3; margin-bottom: 2px; }
.book-b { width: 96px; height: 20px; background: #8E9B82; margin-bottom: 2px; }
.book-c { width: 84px; height: 20px; background: #C87D65; }

.floppy { width: 36px; height: 56px; background: #495B7A; border: 2px solid #2D312F; display: flex; flex-direction: column; align-items: center; }
.floppy-shutter { width: 28px; height: 12px; background: #E6E0D0; border-bottom: 2px solid #2D312F; margin-top: -8px; }
.floppy-label { width: 100%; height: 20px; background: #E6E0D0; margin-top: 12px; }

/* 右侧文件柜 */
.room-side-right { align-items: stretch; }
.cabinet { width: 100%; flex: 1; background: #B7AD9B; border-left: 4px solid #7A7162; padding: 12px; display: flex; flex-direction: column; justify-content: space-between; position: relative; }
.cabinet-drawer { width: 100%; border: 2px solid #8C8272; background: #C4B9A5; padding: 8px; }
.cabinet-drawer-a { height: 96px; margin-top: 64px; }
.cabinet-drawer-b { height: 112px; }
.cabinet-handle { width: 64px; height: 12px; background: #8C8272; margin: 8px auto 0; }
.cabinet-shelf { margin-top: auto; width: 224px; height: 112px; background: #D8CEBE; border: 2px solid #5C5346; padding: 8px; display: flex; align-items: flex-end; gap: 4px; }
.shelf-book { border: 1px solid #3B352C; }
.sb-a { width: 20px; height: 84px; background: #558B8E; }
.sb-b { width: 20px; height: 92px; background: #C46D85; }
.sb-c { width: 24px; height: 80px; background: #625D68; }
.sb-d { flex: 1; height: 64px; background: #E6DEC8; }

/* 右上角便利贴 */
.desk-note {
    pointer-events: auto;
    position: absolute;
    top: 8px;
    right: 12px;
    width: 288px;
    padding: 12px;
    z-index: 30;
}
.desk-note-head { display: flex; align-items: center; justify-content: space-between; font-size: 15px; font-weight: bold; color: #3B352C; margin-bottom: 4px; }

/* 右下角 CD 随身听与仙人掌 */
.desk-right { height: 96px; width: 100%; position: relative; display: flex; align-items: flex-end; justify-content: flex-end; padding-right: 16px; padding-bottom: 24px; z-index: 20; pointer-events: auto; gap: 12px; }
.cd-corner { position: relative; display: flex; flex-direction: column; align-items: flex-end; }
.cd-pill {
    cursor: pointer;
    margin-bottom: 4px;
    background: rgba(46, 41, 34, 0.9);
    color: #DFC17B;
    border: 1px solid #8C8270;
    padding: 2px 8px;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}
.cd-pill-dot { width: 6px; height: 6px; border-radius: 50%; background: #8C8270; }
.cd-pill-link { color: #98C4A0; text-decoration: underline; margin-left: 4px; }
.cd-player { cursor: pointer; width: 128px; height: 84px; background: #E6E0D0; padding: 8px; display: flex; align-items: center; justify-content: space-between; position: relative; gap: 6px; box-shadow: 4px 4px 8px rgba(0,0,0,0.3); }
.cd-disc {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #8C8270;
    background: linear-gradient(to top right, #B8C6C6, #F2F5F5, #9EB5B8);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.cd-sheen { width: 100%; height: 10px; background: rgba(255, 255, 255, 0.6); transform: rotate(45deg); position: absolute; }
.cd-hole { width: 16px; height: 16px; border-radius: 50%; background: #E6E0D0; border: 2px solid #7A7162; z-index: 10; }
.cd-side { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 2px 0; }
.cd-mini-screen { width: 32px; height: 20px; background: #36493C; border: 1px solid #233027; color: #8AB08A; font-size: 9px; display: flex; align-items: center; justify-content: center; font-family: 'VT323', monospace; }
.cd-btns { display: flex; gap: 2px; }
.cd-btn { width: 16px; height: 16px; background: #C8BFA8; border: 1px solid #5C5346; font-size: 8px; display: flex; align-items: center; justify-content: center; }

.cactus { display: flex; flex-direction: column; align-items: center; margin-bottom: -4px; }
.cactus-arms { display: flex; align-items: flex-end; gap: 2px; }
.cactus-arm { border: 2px solid #2A4733; border-radius: 999px 999px 0 0; }
.ca-a { width: 16px; height: 48px; background: #4C7A5B; }
.ca-b { width: 24px; height: 80px; background: #3B694B; border-color: #24402D; }
.ca-c { width: 16px; height: 40px; background: #568766; }
.cactus-pot { width: 64px; height: 24px; background: #D6CEBE; border: 2px solid #5C5346; }

/* ============================================================================
   2. 中央 CRT 显示器 + 机械键盘
   ========================================================================== */
.crt-main-shell {
    position: relative;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1060px;
    flex: 1;
    min-height: 0;
    padding: 6px 8px;
    pointer-events: none;
}
.crt-outer-bezel {
    pointer-events: auto;
    width: 88%;
    flex: 1;
    min-height: 0;
    background: #EAE3D2;
    border: 4px solid #3B352C;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 3px 3px 0 #FFFDF9, inset -3px -3px 0 #ABA18E;
    padding: 12px 12px 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}
.crt-frame {
    width: 100%;
    flex: 1;
    min-height: 0;
    background: #5C5346;
    padding: 4px;
    border: 2px solid #2E2922;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
#crt-screen-wallpaper { width: 100%; flex: 1; min-height: 0; border: 2px solid #2E2922; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }

/* ---------- 顶部菜单栏 ---------- */
.topbar {
    height: 28px;
    background: #E6E0D0;
    border-bottom: 2px solid #4A4338;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    z-index: 40;
    flex-shrink: 0;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 6px; }
.topbar-menu-btn { display: flex; align-items: center; gap: 4px; background: none; border: none; font: inherit; cursor: pointer; padding: 2px 4px; color: inherit; }
.topbar-menu-btn:hover { background: #D5CEBF; }
.topbar-key-hint { font-size: 11px; background: #9E9583; color: #fff; padding: 0 4px; line-height: 1.2; }
.topbar-app { display: flex; align-items: center; gap: 4px; border-left: 2px solid #ABA18E; padding-left: 8px; }
.app-badge { background: #ABA18E; color: #fff; font-size: 12px; padding: 0 6px; }
.topbar-radio {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #36493C;
    border: 1px solid #233027;
    padding: 2px 6px;
    color: #8AB08A;
    font-size: 12px;
    cursor: pointer;
    font-family: inherit;
}
.eq-bars { display: flex; align-items: flex-end; gap: 2px; height: 12px; width: 16px; }
.eq-bars span { width: 4px; background: #8AB08A; height: 4px; display: block; }
.topbar-btn { font-size: 12px; background: #D5CEBF; border: 1px solid #6E6556; padding: 2px 6px; cursor: pointer; font-family: inherit; color: inherit; }
.topbar-btn:hover { background: #DFC17B; }
.topbar-clock { font-weight: bold; letter-spacing: 0.05em; color: #3B352C; }

/* ---------- 开始菜单 ---------- */
.start-menu {
    position: absolute;
    top: 30px;
    left: 4px;
    width: 208px;
    max-width: 72vw;
    background: #E6E0D0;
    padding: 6px;
    font-size: 14px;
    z-index: 50;
    box-shadow: 6px 6px 0 rgba(46, 41, 34, 0.4);
}
.start-brand { background: #5C5346; color: #F4EFE3; padding: 4px 8px; font-weight: bold; font-size: 12px; margin-bottom: 4px; }
.start-item {
    width: 100%;
    text-align: left;
    padding: 6px 8px;
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: inherit;
}
.start-item:hover { background: #DFC17B; }
.start-key { font-size: 11px; opacity: 0.65; }
.start-divider { border-top: 1px solid #ABA18E; margin: 4px 0; }
.start-danger:hover { background: #B84A39; color: #fff; }
.start-attach-row { position: relative; }
.start-arrow { font-size: 11px; }
.start-submenu {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 2px;
    width: 190px;
    max-width: 60vw;
    background: #E6E0D0;
    border: 1px solid #4A4338;
    padding: 4px;
    z-index: 60;
    box-shadow: 4px 4px 0 rgba(46, 41, 34, 0.4);
}
.start-attach-btn { width: 100%; }

/* ---------- 工作区 ---------- */
.workspace { flex: 1; min-height: 0; position: relative; width: 100%; overflow: hidden; }
.watermark {
    pointer-events: none;
    position: absolute;
    bottom: 12px;
    right: 12px;
    text-align: right;
    opacity: 0.35;
    color: #4A3E35;
}
.watermark-title { font-size: 18px; font-weight: bold; line-height: 1; }
.watermark-sub { font-size: 11px; }

/* ---------- 窗口标题栏与按钮 ---------- */
.win-titlebar {
    height: 28px;
    background: #D5CEBF;
    border-bottom: 2px solid #4A4338;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move;
    flex-shrink: 0;
    min-width: 0;
}
.win-titlebar-dark { background: #5C5346; color: #F4EFE3; border-bottom-color: #2E2922; }
.win-title-left { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: bold; min-width: 0; }
.win-title-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-glyph {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid #2E2922;
    color: #fff;
    font-size: 10px;
    line-height: 18px;
    text-align: center;
    flex-shrink: 0;
}
.win-glyph-dark { background: transparent; }
.win-glyph-term { background: #2E2922; color: #8AB08A; }
.win-btns { display: flex; gap: 4px; flex-shrink: 0; }
.win-btn {
    width: 20px;
    height: 20px;
    background: #E6E0D0;
    color: #2E2922;
    font-size: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    padding: 0;
}
.win-btn-dark { background: #C8BFA8; border: 1px solid #2E2922; }
.win-btn-link { font-size: 11px; }

/* ---------- 像素确认框（退出游戏 / NewAPI 嵌入受限） ---------- */
.confirm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(22, 17, 13, 0.52);
}
.confirm-backdrop.hidden { display: none !important; }
.confirm-dialog {
    width: min(420px, calc(100% - 20px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    border: 3px solid #2E2922;
    background: #E6E0D0;
    color: #2E2922;
    box-shadow: inset 2px 2px #FDFBF7, inset -2px -2px #A69D8A, 6px 6px 0 rgba(22, 17, 13, 0.42);
    outline: none;
}
.confirm-titlebar {
    min-height: 29px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #5C5346;
    border-bottom: 2px solid #2E2922;
    color: #F4EFE3;
    font-size: 13px;
    font-weight: bold;
}
.confirm-titlebar > span:last-child { color: #DFC17B; font: 11px 'VT323', monospace; }
.confirm-close {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border: 2px outset #FDFBF7;
    background: #E6E0D0;
    color: #2E2922;
    font: bold 16px/1 inherit;
    cursor: pointer;
}
.confirm-body { padding: 18px 20px 14px; text-align: center; }
.confirm-glyph { margin-bottom: 6px; font-size: 28px; line-height: 1.1; }
.confirm-body h2 { margin: 0; color: #3B352C; font-size: 19px; line-height: 1.2; }
.confirm-body p { margin: 7px 0 0; color: #5C5346; font-size: 13px; line-height: 1.5; }
.confirm-game-name { color: #2E2922 !important; font-weight: bold; }
.confirm-actions { display: flex; justify-content: center; gap: 10px; padding: 0 14px 15px; }
.confirm-btn {
    min-height: 38px;
    padding: 6px 13px;
    border: 2px outset #FDFBF7;
    background: #D5CEBE;
    color: #2E2922;
    font: inherit;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
}
.confirm-btn:hover { filter: brightness(1.04); }
.confirm-btn:active { border-style: inset; transform: translate(1px, 1px); }
.confirm-btn-danger { border-color: #7A342C; background: #B84A39; color: #FFF8EC; }
.confirm-btn-primary { display: inline-flex; align-items: center; justify-content: center; border-color: #294A38; background: #5B7053; color: #FFF8EC; }
.confirm-btn:focus-visible, .confirm-close:focus-visible { outline: 3px solid #315A85; outline-offset: 3px; }

/* ---------- 像素站台（欢迎窗） ---------- */
.welcome-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 10px; gap: 8px; background: #E6E0D0; overflow: hidden; }
.welcome-hero { display: flex; flex-direction: column; }
.welcome-title { font-size: 22px; font-weight: bold; letter-spacing: 0.06em; color: #3B352C; line-height: 1.1; }
.welcome-sub { font-size: 12px; color: #5C5346; }
.acct-line {
    font-size: 12px;
    color: #3B352C;
    background: #E6DEC8;
    border: 1px solid #C8BFA8;
    padding: 3px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.acct-line a, .statuslink, .fm-acct a { color: #2E5A8F; text-decoration: underline; }
.welcome-apps { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.welcome-app {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    background: #F4EFE3;
    border: 2px solid #4A4338;
    padding: 8px 10px;
    cursor: pointer;
    font: inherit;
    color: inherit;
    min-height: 52px;
}
.welcome-app:hover { background: #DFC17B; }
.welcome-app:active { transform: scale(0.99); }
.welcome-app-icon { width: 32px; height: 32px; border: 2px solid #2E2922; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.welcome-app-info { display: flex; flex-direction: column; min-width: 0; }
.welcome-app-info b { font-size: 15px; color: #2E2922; }
.welcome-app-info i { font-style: normal; font-size: 11px; color: #5C5346; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.welcome-foot { font-size: 11px; color: #5C5346; border-top: 1px solid #ABA18E; padding-top: 6px; }

/* ---------- 内嵌应用窗口（iframe） ---------- */
.app-frame-wrap { flex: 1; min-height: 0; margin: 4px; border-top: 2px solid #706656; border-left: 2px solid #706656; border-right: 2px solid #FDFBF7; border-bottom: 2px solid #FDFBF7; background: #FAF6EE; position: relative; overflow: hidden; }
.app-frame { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
#win-map .app-frame-wrap { background: #dce6df; }
#win-map .app-frame-wrap::before { content: ""; position: absolute; inset: -20px; pointer-events: none; background: linear-gradient(#e7efe57a, #e7efe57a), url('/arcade/winter-harbor/assets/town-map.webp') center / cover; filter: blur(18px); }
#win-map .app-frame { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.newapi-frame-fallback {
    position: absolute;
    inset: 0;
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    text-align: center;
    background: #F4EFE3;
}
.newapi-frame-fallback[hidden] { display: none; }
.newapi-frame-fallback p { max-width: 380px; font-size: 13px; line-height: 1.7; color: #5C5346; }
.win-statusline {
    height: 24px;
    background: #E6DEC8;
    border-top: 1px solid #C8BFA8;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: #5C5346;
    flex-shrink: 0;
    min-width: 0;
}
.win-statusline > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statuslinks { display: flex; gap: 8px; flex-shrink: 0; }
.app-err {
    position: absolute;
    inset: 0;
    background: #F4EFE3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    padding: 16px;
    z-index: 5;
}
.app-err-title { font-size: 15px; font-weight: bold; color: #B84A39; }
.app-err-sub { font-size: 12px; color: #5C5346; line-height: 1.6; }
.app-err-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* ---------- 游戏文件夹（像素文件管理器） ---------- */
.fm-toolbar {
    height: 28px;
    background: #DFD8C8;
    border-bottom: 1px solid #ABA18E;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    flex-shrink: 0;
    min-width: 0;
}
.fm-path { font-family: 'VT323', monospace; color: #5C5346; letter-spacing: 0.04em; }
.fm-acct { margin-left: auto; color: #3B352C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-refresh { background: #E6E0D0; border: 1px solid #4A4338; font: inherit; font-size: 11px; padding: 1px 6px; cursor: pointer; }
.fm-refresh:hover { background: #DFC17B; }
.fm-guest-hint { font-size: 11px; color: #7A4A38; background: #F1E3C8; border-bottom: 1px solid #C8BFA8; padding: 3px 8px; flex-shrink: 0; }
.fm-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px; background: #E6E0D0; }
.fm-note { font-size: 12px; color: #5C5346; padding: 10px; text-align: center; line-height: 1.7; }
.fm-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #F4EFE3;
    border-top: 2px solid #706656;
    border-left: 2px solid #706656;
    border-right: 2px solid #FDFBF7;
    border-bottom: 2px solid #FDFBF7;
    padding: 6px 8px;
    min-width: 0;
}
.fm-icon { width: 34px; height: 34px; border: 1px solid #2E2922; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.fm-info { flex: 1; min-width: 0; }
.fm-name { font-size: 13px; font-weight: bold; color: #2E2922; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-desc { font-size: 11px; color: #5C5346; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-actions { display: flex; gap: 4px; flex-shrink: 0; }
.fm-btn {
    font: inherit;
    font-size: 11px;
    font-weight: bold;
    padding: 2px 8px;
    background: #E6E0D0;
    border: 1px solid #4A4338;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.fm-btn:hover { background: #DFC17B; }
.fm-btn-primary { background: #708B75; color: #fff; }
.fm-btn-primary:hover { background: #5C7A62; }

/* ---------- Lo-Fi 调音台窗口 ---------- */
.lofi-body { flex: 1; min-height: 0; background: #E6E0D0; padding: 10px; display: flex; flex-direction: column; justify-content: space-between; overflow-y: auto; font-size: 12px; gap: 6px; }
.lofi-now { background: #36493C; border: 2px solid #233027; padding: 8px; color: #8AB08A; font-family: 'VT323', monospace; display: flex; align-items: center; justify-content: space-between; }
.lofi-bpm { font-size: 10px; opacity: 0.8; }
.lofi-track { font-size: 14px; font-weight: bold; color: #DFC17B; margin-top: 2px; }
.lofi-status { font-size: 11px; margin-top: 2px; }
.tape-reels { display: flex; gap: 6px; background: #26342A; padding: 6px 8px; border: 1px solid #56735E; }
.tape-reel { width: 20px; height: 20px; border-radius: 50%; border: 2px dashed #8AB08A; }
.lofi-controls { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.lofi-play { flex: 1; padding: 6px 0; background: #708B75; color: #fff; font-weight: bold; border: 2px solid #2E2922; cursor: pointer; font: inherit; }
.lofi-play:active { transform: scale(0.95); }
.lofi-next { padding: 6px 12px; background: #D5CEBF; border: 2px solid #2E2922; font-weight: bold; cursor: pointer; font: inherit; }
.lofi-next:active { transform: scale(0.95); }
.lofi-mixer { background: #F4EFE3; border-top: 2px solid #706656; border-left: 2px solid #706656; border-right: 2px solid #FDFBF7; border-bottom: 2px solid #FDFBF7; padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.mixer-row { display: flex; align-items: center; justify-content: space-between; }
.mixer-label { font-weight: bold; color: #3B352C; width: 96px; flex-shrink: 0; }
.mixer-row .retro-slider { flex: 1; margin: 0 8px; }
.mixer-val { width: 32px; text-align: right; font-family: 'VT323', monospace; }
.mood-row { display: flex; align-items: center; justify-content: space-between; padding-top: 4px; }
.mood-label { font-size: 11px; color: #5C5346; font-weight: bold; }
.mood-btns { display: flex; gap: 4px; }
.mood-btn { padding: 2px 8px; border: 1px solid #2E2922; background: #D5CEBF; cursor: pointer; font: inherit; }
.mood-btn-active { background: #DFC17B; font-weight: bold; }

/* ---------- 聊天框（示例） ---------- */
.chat-flex { flex: 1; min-height: 0; display: flex; flex-direction: row; overflow: hidden; padding: 6px; gap: 6px; background: #E6E0D0; }
.chat-side { width: 144px; background: #DFD8C8; border-top: 2px solid #706656; border-left: 2px solid #706656; border-right: 2px solid #FDFBF7; border-bottom: 2px solid #FDFBF7; display: flex; flex-direction: column; flex-shrink: 0; }
.chat-side-head { background: #C8BFA8; font-size: 11px; padding: 2px 8px; color: #5C5346; font-weight: bold; border-bottom: 1px solid #ABA18E; }
.chat-contacts { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.contact-row { padding: 6px 8px; display: flex; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; border-bottom: 1px solid #C8BFA8; }
.contact-row:hover { background: #D5CEBF; }
.contact-row-active { background: #C8B078; }
.contact-avatar { width: 28px; height: 28px; flex-shrink: 0; border: 1px solid #2E2922; display: flex; align-items: center; justify-content: center; font-size: 14px; }
.contact-info { overflow: hidden; flex: 1; }
.contact-name { font-size: 12px; font-weight: bold; color: #2E2922; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-status { font-size: 11px; color: #5C5346; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-main { flex: 1; min-width: 0; background: #F4EFE3; border-top: 2px solid #706656; border-left: 2px solid #706656; border-right: 2px solid #FDFBF7; border-bottom: 2px solid #FDFBF7; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; }
.chat-head { height: 24px; background: #E6DEC8; border-bottom: 1px solid #C8BFA8; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; flex-shrink: 0; }
.chat-messages { flex: 1; min-height: 0; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.bubble { padding: 8px; border: 1px solid #8C8270; background: #E6DEC8; color: #2E2922; margin-right: 16px; align-self: flex-start; max-width: 92%; }
.bubble-me { background: #C8D6C5; border-color: #5B7053; margin-right: 0; margin-left: 16px; align-self: flex-end; text-align: right; }
.bubble-meta { font-size: 11px; font-weight: bold; color: #6E6556; margin-bottom: 2px; }
.chat-inputbar { padding: 6px; background: #E6DEC8; border-top: 1px solid #C8BFA8; flex-shrink: 0; }
.chat-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.chat-actions button { font: inherit; font-size: 12px; background: #F4EFE3; border: 1px solid #4A4338; padding: 2px 8px; cursor: pointer; text-align: left; color: inherit; }
.chat-actions button:hover { background: #DFC17B; }

/* ---------- 视频通话（示例演出） ---------- */
.video-screen { position: relative; flex: 1; min-height: 0; background: #3D2B24; overflow: hidden; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.video-screen svg { width: 100%; height: 100%; }
.video-sub { min-height: 52px; background: #333330; border-top: 2px solid #1E1E1C; padding: 6px 10px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; flex-shrink: 0; }
.video-sub:hover { background: #3D3D39; }
.video-sub-line { display: flex; align-items: flex-start; gap: 6px; font-size: 13px; line-height: 1.35; color: #DFC17B; }
.video-sub-dot { color: #C87D65; }
.video-sub-step { font-size: 10px; color: #9E9B93; text-align: right; }

/* ---------- 记事本 ---------- */
.notepad-body { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 6px; background: #E6E0D0; }
.notepad-area { flex: 1; min-height: 0; width: 100%; background: #FAF6EE; color: #2E2922; padding: 10px; font-size: 15px; line-height: 1.6; border: 0; border-top: 2px solid #706656; border-left: 2px solid #706656; border-right: 2px solid #FDFBF7; border-bottom: 2px solid #FDFBF7; resize: none; outline: none; }
.notepad-foot { height: 24px; background: #DFD8C8; border-top: 1px solid #ABA18E; padding: 0 8px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #5C5346; flex-shrink: 0; }
.notepad-save { background: #708B75; color: #fff; padding: 2px 8px; font-size: 11px; border: 1px solid #2E2922; cursor: pointer; font: inherit; }
.notepad-save:active { transform: scale(0.95); }

/* ---------- 新鲜事（示例） ---------- */
.news-feed { flex: 1; min-height: 0; background: #F4EFE3; border-top: 2px solid #706656; border-left: 2px solid #706656; border-right: 2px solid #FDFBF7; border-bottom: 2px solid #FDFBF7; margin: 6px; padding: 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.news-item { background: #E6DEC8; border: 2px solid #4A4338; padding: 10px; }
.news-head { display: flex; justify-content: space-between; font-size: 12px; color: #6E6556; margin-bottom: 2px; }
.news-author { font-weight: bold; color: #3B5978; }
.news-title { font-weight: bold; color: #2E2922; }
.news-body { font-size: 12px; color: #3B352C; margin-top: 4px; }

/* ---------- 控制台 ---------- */
.console-body { flex: 1; min-height: 0; background: #232622; color: #8AB08A; padding: 8px; font-family: 'VT323', monospace; font-size: 12px; display: flex; flex-direction: column; justify-content: space-between; border-top: 2px solid #706656; border-left: 2px solid #706656; border-right: 2px solid #FDFBF7; border-bottom: 2px solid #FDFBF7; margin: 4px; }
.console-output { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.console-hl { color: #DFC17B; }
.console-line { color: #DFC17B; }
.console-resp { color: #8AB08A; margin-bottom: 4px; }
.console-quick { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; padding-top: 4px; border-top: 1px solid #3E473C; }
.console-quick button { padding: 2px 8px; background: #36493C; color: #DFC17B; border: 1px solid rgba(139, 176, 138, 0.4); cursor: pointer; font: inherit; }
.console-inputrow { display: flex; align-items: center; border-top: 1px solid #3E473C; padding-top: 4px; }
.console-prompt { margin-right: 4px; color: #DFC17B; }
.console-inputrow input { flex: 1; background: transparent; border: none; outline: none; color: #8AB08A; font: inherit; }

/* ---------- Dock 栏 ---------- */
.dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    padding: 0 8px 4px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 0;
    gap: 4px;
}
.dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
    outline: none;
}
.dock-item:active .dock-icon { transform: translateY(1px) scale(0.96); }
.dock-icon {
    width: 36px;
    height: 36px;
    border: 2px solid #2E2922;
    box-shadow: 2px 2px 0 #2E2922;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s;
}
.dock-item:hover .dock-icon { transform: translateY(-2px); }
.dock-glyph { width: 24px; height: 24px; }
.dock-label {
    font-size: 12px;
    font-weight: bold;
    color: #3B352C;
    margin-top: 2px;
    background: rgba(223, 193, 123, 0.85);
    padding: 0 4px;
    white-space: nowrap;
}
.dock-icon-reserved { background: #8C8272; }
.dock-disabled { cursor: default; }
.dock-disabled .dock-icon {
    background: #8C8272 !important;
    box-shadow: 2px 2px 0 #5C5346;
    border-color: #5C5346;
    opacity: 0.75;
    transform: none !important;
}
.dock-disabled .dock-label { opacity: 0.65; }

/* ---------- Toast ---------- */
.toast {
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    position: absolute;
    top: 36px;
    right: 12px;
    background: #2E2922;
    color: #DFC17B;
    border: 2px solid #FDFBF7;
    padding: 4px 12px;
    font-size: 14px;
    z-index: 50;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.4);
}

/* ---------- 显示器下巴 / 支架 ---------- */
.monitor-chin { height: 24px; padding-top: 6px; display: flex; align-items: center; justify-content: space-between; padding-left: 16px; padding-right: 16px; }
.chin-vents { width: 160px; height: 6px; background: #C8BFA8; border-bottom: 1px solid #fff; }
.chin-leds { display: flex; align-items: center; gap: 8px; }
.chin-led { width: 10px; height: 6px; background: #6A9955; border: 1px solid #2E2922; }
.chin-chip { width: 24px; height: 12px; background: #D5CEBF; border: 1px solid #5C5346; }
.monitor-stand { width: 75%; height: 12px; background: #C8BFA8; border-left: 4px solid #4A4338; border-right: 4px solid #4A4338; }

/* ---------- 机械键盘 ---------- */
.mech-keyboard {
    pointer-events: auto;
    width: 86%;
    height: 96px;
    background: #EAE3D2;
    border: 4px solid #4A4338;
    box-shadow: 0 6px 0 #7A7162, 0 8px 15px rgba(0, 0, 0, 0.4);
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: relative;
}
.writepad {
    flex: 0 0 96px;
    width: 96px;
    height: 64px;
    background: #365341;
    border: 2px solid #233027;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.3);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(3, 1fr);
    opacity: 0.9;
    cursor: pointer;
    flex-shrink: 0;
}
.writepad div { border: 1px solid rgba(70, 105, 83, 0.4); }
.key-rows { flex: 1; display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 2px 0; gap: 4px; }
.key-row { display: flex; gap: 4px; height: 16px; }
.key-row-mid { padding: 0 8px; }
.key-row-tall { height: 20px; }
.mech-key { flex: 1; min-width: 0; }
.key-flex2 { flex: 2; }
.key-flex4 { flex: 4; }
/* .mech-key 的 flex:1 会吞掉宽度：大回车键必须脱离弹性拉伸，保持原稿 80px */
.enter-big { flex: 0 0 80px; width: 80px; height: 56px; font-size: 18px; font-family: 'VT323', monospace; }

/* ============================================================================
   响应式
   ========================================================================== */
@media (max-width: 859px) {
    * { min-width: 0; }
    .topbar { min-height: 36px; height: 36px; gap: 3px; padding-inline: 4px; overflow: hidden; }
    .topbar-left, .topbar-right { min-width: 0; flex: 0 1 auto; }
    .topbar-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; overflow: hidden; }
    .topbar-radio { flex: 0 0 30px; width: 30px; justify-content: center; padding: 2px; }
    .topbar-wallpaper { flex: 0 0 auto; padding-inline: 3px; }
    .topbar-btn { flex: 0 0 auto; min-height: 22px; padding: 2px 3px; font-size: 10px; line-height: 1.1; white-space: nowrap; }
    .topbar-clock { flex: 0 0 auto; font-size: 10px; }
    .crt-screen-bg, #crt-screen-wallpaper { min-width: 0; }
    .workspace { min-width: 0; }
    #win-welcome { min-width: 0; max-width: calc(100% - 8px); }
    .welcome-head, .welcome-acct, .welcome-app-list { min-width: 0; }
    .welcome-app-list button { min-width: 0; }
    .dock { min-width: 0; }
    .dock-item { flex: 0 0 54px; min-width: 0; }
    .dock-icon { flex: 0 0 36px; }
    .dock-label { max-width: 54px; overflow: hidden; text-overflow: ellipsis; }
    /* 手机端隐藏底部实体键盘与桌面两侧摆件 */
    .mech-keyboard,
    .monitor-stand,
    .monitor-chin,
    .room-decor { display: none !important; }
    /* 显示器外壳紧凑环绕，露出完整复古网点壁纸 */
    .crt-main-shell { width: 100% !important; max-width: 100% !important; height: 100% !important; padding: 4px !important; }
    .crt-outer-bezel { width: 100% !important; height: 100% !important; padding: 5px !important; border-width: 3px !important; }
    /* 保留窗口化以欣赏背后壁纸，点击[□]才全屏 */
}

@media (min-width: 860px) {
    .mobile-only-bar { display: none !important; }
}

@media (max-width: 639px) {
    .topbar-wallpaper, .topbar-key-hint { display: none; }
    .topbar { font-size: 13px; }
    .watermark { display: none; }
    .dock { gap: 2px; }
    .dock-label { font-size: 11px; }
    .chat-flex { flex-direction: column; }
    .chat-side { width: 100%; height: 84px; }
    .chat-contacts { flex-direction: row; overflow-x: auto; overflow-y: hidden; }
    .contact-row { border-bottom: none; border-right: 1px solid #C8BFA8; }
    .contact-status { display: none; }
    .win-statusline .statuslink { white-space: nowrap; }
}

@media (max-width: 439px) {
    .topbar-app { display: none; }
    .dock-label { font-size: 10px; padding: 0 2px; }
    .start-submenu { width: 150px; }
    .welcome-title { font-size: 18px; }
    .mobile-only-bar { font-size: 11px; padding: 3px 6px; }
    .rbtn { font-size: 10px; }
}
