:root {
  color-scheme: light;
  --bar: 40px;
  --blue: #0078d7;
  --line: #d9d9d9;
  --muted: #585858;
  font: 14px/1.45 "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #151515;
}
*, *::before, *::after { box-sizing: border-box; }
html { overflow: hidden; }
body {
  position: relative; margin: 0; width: 100%; height: 100vh; height: 100dvh;
  overflow: hidden; background: #000;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
#game-screen {
  position: absolute; left: 50%; top: 50%; overflow: hidden; container: game / size;
  width: 1280px; height: 720px;
  transform: translate(-50%, -50%) rotate(var(--game-turn, 0deg)) scale(var(--game-scale, 0));
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; }
button { appearance: none; background: transparent; border: none; padding: 0; cursor: default; }
button:focus-visible { outline: 1px dotted currentColor; outline-offset: -3px; }
input:focus-visible { outline: 1px solid var(--blue); }
button:disabled { color: #999; }
#desktop [data-item] { -webkit-touch-callout: none; touch-action: manipulation; }
#desktop { position: relative; isolation: isolate; overflow: hidden; height: 100%; user-select: none; }
#wallpaper { position: absolute; inset: 0; z-index: -2; background: #0067b0 url("assets/win10.jpg") center / cover no-repeat; }
#wall-fault { position: absolute; inset: 0 0 var(--bar); z-index: -1; pointer-events: none; }
.wall-glitch { position: absolute; pointer-events: auto; left: 62%; top: 37%; width: 23%; height: 26%; background: url("assets/win10.jpg") calc(50% + 9px) center / cover fixed; filter: hue-rotate(132deg) saturate(.82); opacity: .82; clip-path: polygon(0 18%,96% 0,96% 31%,69% 34%,69% 37%,100% 34%,100% 92%,0 99%,0 64%,45% 60%,45% 57%,0 60%); }
.desktop-icons { position: absolute; z-index: 1; top: 5px; bottom: calc(var(--bar) + 6px); left: 2px; display: grid; grid-auto-flow: column; grid-template-rows: repeat(auto-fill, 76px); grid-auto-columns: 76px; width: max-content; max-width: calc(100cqw - 4px); overflow: auto; pointer-events: none; align-content: start; scrollbar-width: thin; }
/* The host's account badge covers the first 86 desktop pixels in the reference screenshot. */
.touch-desktop .desktop-icons { top: max(96px, calc(48px / var(--game-scale))); }
.desk-item { pointer-events: auto; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 74px; height: 72px; padding: 3px 1px; border: 1px solid transparent; }
.desk-item:hover { background: #b8ddff27; border-color: #c5e7ff58; }
.desk-item.selected { background: #72b8ee61; border-color: #b4d7f8a1; }
.desk-label { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.25; max-width: 100%; overflow-wrap: anywhere; color: white; font-size: 12px; text-shadow: 1px 1px 2px #000,-1px 1px 3px #000,0 1px 5px #13202f; }
.icon { --icon: 24px; display: inline-block; width: var(--icon); height: var(--icon); flex: none; vertical-align: middle; background: center / contain no-repeat; position: relative; }
.icon i { display: none; }
.icon-pc { background-image: url("assets/pc.png"); }
.icon-folder { background-image: url("assets/folder.png"); }
.icon-explorer { background-image: url("assets/explorer.png"); }
.icon-documents { background-image: url("assets/documents.png"); }
.icon-download { background-image: url("assets/download.png"); }
.icon-pictures, .icon-image { background-image: url("assets/pictures.png"); }
.icon-trash { background-image: url("assets/bin33.png"); }
.icon-zip, .icon-archive { background-image: url("assets/compressed.png"); }
.icon-drive { background-image: url("assets/hdd.png"); }
.icon-note { background-image: url("assets/picture.png"); }
.icon-chat, .icon-web, .icon-terminal, .icon-search { display: inline-grid; place-items: center; color: white; font: 700 calc(var(--icon)*.64)/1 "Segoe UI",sans-serif; }
.icon-chat::before { content: "••"; border-radius: 45% 45% 45% 9%; background: #059bda; width: 88%; padding-block: 5%; text-align: center; }
.icon-web::before { content: "e"; color: #0078d7; font: italic 800 calc(var(--icon)*1.08)/.8 Georgia,serif; }
.icon-terminal::before { content: ">_"; width: 92%; background: #151515; border: 1px solid #888; border-top: 3px solid #b6b6b6; text-align: center; font: calc(var(--icon)*.45)/1.15 Consolas,monospace; }
.icon-search::before { content: "⌕"; color: var(--blue); }
.desk-item .icon { --icon: 42px; }
.sys-glyph { --sym: 0; --size: 17px; width: var(--size); height: var(--size); display: inline-block; vertical-align: middle; background: url("assets/symbols.png") calc(var(--sym) * 100% / 21) 0 / 2200% 100% no-repeat; font-size: 0; }
.start-symbol { display: inline-grid; grid-template-columns: 42% 1fr; grid-template-rows: 1fr 1fr; gap: 1px; width: 16px; height: 16px; vertical-align: middle; clip-path: polygon(0 13%,100% 0,100% 100%,0 87%); }
.start-symbol i { background: currentColor; }
.task-view .sys-glyph { --sym: 1; --size: 20px; }
.tray-expand .sys-glyph { --sym: 2; --size: 13px; }
.tray-network .sys-glyph { --sym: 3; }
.task-center .sys-glyph { --sym: 4; }
#sound-button .sys-glyph { --sym: 5; }
#sound-button[aria-pressed="true"] .sys-glyph { --sym: 6; }
.taskbar { height: var(--bar); position: absolute; z-index: 10000; inset: auto 0 0; background: rgba(13,19,25,.96); backdrop-filter: blur(16px); color: white; display: flex; justify-content: space-between; }
.task-left, .task-right, .tasks { display: flex; align-items: stretch; min-width: 0; }
.task-right { flex-shrink: 0; }
.taskbar button { flex: none; position: relative; }
.taskbar button:hover, .taskbar .task-on { background: #ffffff23; }
.task-start, .task-view, .task-app { width: 48px; }
.task-start:hover { color: #43a5ee; }
.taskbar .task-search { width: clamp(180px,20cqw,320px); display: flex; align-items: center; gap: 14px; background: #f2f2f2; color: #363636; padding: 0 13px; font-size: 13px; text-align: left; border: 1px solid #a9a9a9; }
.taskbar .task-search:hover { background: white; border-color: #8e8e8e; }
.lens { display: inline-block; width: 13px; height: 13px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; flex: none; }
.lens::after { content: ""; position: absolute; width: 7px; height: 1.5px; background: currentColor; bottom: -3px; left: -5px; transform: rotate(-48deg); }
.tasks { overflow: auto; scrollbar-width: none; }
.task-app .icon { --icon: 23px; }
.task-app.task-open::after { content: ""; position: absolute; left: 3px; right: 3px; bottom: 0; height: 2px; background: #76b9ed; }
.tray-expand, .tray-network, #sound-button { width: 24px; }
.clock { min-width: 72px; line-height: 1.22; font: 12px/1.25 "Segoe UI",sans-serif; display: grid; align-content: center; justify-items: center; gap: 1px; }
.clock small { font-size: 12px; }
.task-center { width: 39px; }
.show-desktop { width: 6px; border-left: 1px solid #9a9da1; }

.window {
  --work-height: calc(100cqh - var(--bar));
  --window-width: min(var(--width,var(--default-width,min(820px,77cqw))), calc(100cqw - 10px));
  --window-height: min(var(--height,var(--default-height,min(535px,77cqh))), calc(var(--work-height) - 8px));
  z-index: 10; display: flex; flex-direction: column; position: absolute;
  left: clamp(3px,var(--x,var(--default-x,12%)),calc(100cqw - var(--window-width) - 3px));
  top: clamp(3px,var(--y,var(--default-y,13%)),calc(var(--work-height) - var(--window-height) - 3px));
  width: var(--window-width); height: var(--window-height);
  overflow: hidden; background: white; border: 1px solid #a3a3a3; box-shadow: 0 7px 22px #0005;
}
.window.active { border-color: #73808a; box-shadow: 0 8px 28px #0006; }
.window.maximized { inset: 0 0 var(--bar); width: auto; height: auto; max-width: none; max-height: none; }
.window-title { min-height: 31px; height: 31px; flex: none; display: flex; align-items: center; justify-content: space-between; background: white; touch-action: none; color: #333; }
.window-heading { display: flex; align-items: center; gap: 8px; padding-left: 9px; font-size: 12px; min-width: 0; }
.window-heading span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.window-heading .icon { --icon: 17px; }
.win-controls { display: flex; height: 100%; }
.win-controls button, .message-title button { width: 45px; font: 16px/1 "Segoe UI",sans-serif; }
.win-controls button:hover, .message-title button:hover { background: #e5e5e5; }
.win-controls [data-win-action="close"]:hover, .message-title button:hover { background: #e81123; color: white; }
.win-content { min-height: 0; flex: 1; display: flex; flex-direction: column; }
.ribbon-tabs { display: flex; align-items: stretch; min-height: 24px; border-bottom: 1px solid var(--line); }
.ribbon-tabs button { min-width: 54px; font-size: 12px; padding: 2px 9px; }
.ribbon-tabs button:first-child { color: white; background: #176aaa; }
.ribbon-tabs button:hover, .ribbon-tabs button[aria-expanded="true"] { background: #e4f1fc; color: #111; }
.ribbon-content { display: flex; gap: 8px; padding: 6px 10px; background: #f5f6f7; border-bottom: 1px solid #d2d2d2; }
.ribbon-content button { padding: 3px 10px; font-size: 12px; border: 1px solid #bbb; background: white; }
.explorer-toolbar { display: flex; align-items: center; gap: 5px; height: 43px; flex: none; padding: 5px 8px; background: white; }
.nav-btn { width: 26px; height: 26px; flex: none; font-size: 19px; line-height: 1; color: #4f5660; }
.nav-btn:hover:not(:disabled) { background: #e5f3ff; color: #0078d7; }
.breadcrumb, .folder-search { height: 27px; display: flex; align-items: center; gap: 7px; border: 1px solid #b8b8b8; padding: 1px 8px; font-size: 12px; overflow: hidden; white-space: nowrap; }
.breadcrumb { flex: 1; min-width: 0; }
.breadcrumb .icon { --icon: 17px; }
.breadcrumb button:hover { background: #d9ecfc; }
.folder-search { flex: 0 1 177px; min-width: 30px; margin-left: 4px; justify-content: space-between; color: #666; }
.folder-search .lens { width: 10px; height: 10px; margin-right: 3px; }
.explorer-layout { flex: 1; min-height: 0; display: flex; }
.explorer-nav { flex: 0 0 158px; border-right: 1px solid #ededed; padding: 8px 0; overflow: auto; }
.explorer-nav button { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 27px; padding: 2px 8px 2px 19px; text-align: left; font-size: 12px; }
.explorer-nav .icon { --icon: 17px; }
.explorer-nav button:hover, .file-item:hover, .drive-item:hover { background: #e5f3ff; }
.explorer-nav button.chosen { background: #d9d9d9; }
.side-rule { margin: 8px 12px; border-top: 1px solid #eee; }
.file-area { flex: 1; min-width: 0; overflow: auto; padding: 11px 15px; }
.file-group + .file-group { margin-top: 14px; }
.file-group h2 { display: flex; gap: 7px; align-items: center; margin: 0 0 7px; color: #245782; font-size: 15px; font-weight: normal; }
.file-group h2::before { content: ""; width: 6px; height: 6px; border: solid #59636d; border-width: 0 1px 1px 0; transform: translateY(-1px) rotate(45deg); }
.file-group h2::after { content: ""; flex: 1; height: 1px; background: #ddd; }
.file-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 3px 8px; }
.file-grid.compact { grid-template-columns: repeat(3,minmax(0,1fr)); }
.file-item, .drive-item { display: flex; align-items: center; gap: 7px; min-height: 57px; text-align: left; padding: 3px 6px; border: 1px solid transparent; }
.file-item.selected, .drive-item.selected { background: #cce8ff; border-color: #99d1ff; }
.file-item .icon, .drive-item .icon { --icon: 41px; }
.file-item strong, .drive-item strong { display: block; font-size: 13px; font-weight: normal; overflow-wrap: anywhere; }
.file-item small, .drive-item small { display: block; color: #5c5c5c; font-size: 11px; line-height: 1.35; margin-top: 2px; }
.drive-item > div { flex: 1; min-width: 0; }
.disk-usage { display: block; height: 13px; margin: 3px 0; border: 1px solid #c0c1c1; background: #e6e6e6; }
.disk-usage i { display: block; height: 100%; width: var(--usage); background: #26a0da; }
.explorer-status { min-height: 24px; padding: 3px 10px; display: flex; align-items: center; border-top: 1px solid #eee; background: #fafafa; color: #4d4d4d; font-size: 12px; }

.start-menu, .tray-panel { position: absolute; bottom: var(--bar); z-index: 10005; padding: 15px; width: min(314px,95cqw); background: #242526fa; color: white; box-shadow: 1px -2px 16px #0004; max-height: calc(100cqh - var(--bar)); overflow: auto; }
.start-menu { left: 0; }
.tray-panel { right: 0; }
.panel-label { color: #dadada; padding: 6px 8px; margin: 0; font-size: 12px; }
.start-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; font-size: 13px; text-align: left; }
.start-menu button:hover { background: #ffffff24; }
.tray-panel h2 { font-size: 20px; font-weight: 400; margin: 3px 0; }
.tray-panel p { font-size: 13px; line-height: 1.7; }
.tray-panel .quiet-button { background: #444; color: white; border-color: #666; }
.context { position: absolute; z-index: 12000; min-width: 177px; padding: 3px 2px; background: #f4f4f4; border: 1px solid #aaa; box-shadow: 2px 3px 5px #0004; }
.context button { display: block; width: 100%; min-height: 25px; text-align: left; padding: 3px 20px 3px 28px; font-size: 12px; }
.context button:hover, .context button:focus-visible { background: #d9d9d9; }
.notices { position: absolute; z-index: 10001; bottom: calc(var(--bar) + 9px); right: 9px; width: min(320px,calc(100cqw - 18px)); pointer-events: none; }
.notice { padding: 13px 16px; margin-top: 4px; background: #272727; color: white; font-size: 13px; box-shadow: 0 3px 12px #0005; border-left: 3px solid #0078d7; }
.notice.urgent { background: linear-gradient(90deg,#30030b,#171717 75%); border-left-color: #f02b42; box-shadow: 0 0 18px #f02b4247,0 3px 12px #0008; animation: notice-pulse .62s steps(2,end); }
@keyframes notice-pulse { 0%,100% { filter: none; } 22% { filter: brightness(1.65); } 44% { transform: translateX(-4px); } 66% { transform: translateX(3px); } }
.scroll-content { min-height: 0; flex: 1; overflow: auto; padding: 18px; }
.notepad-meta { color: #6c6c6c; border-bottom: 1px solid var(--line); padding: 0 0 8px; font-size: 12px; }
.note-copy { white-space: pre-wrap; user-select: text; line-height: 1.85; font-family: Consolas,"Microsoft YaHei UI",monospace; }
.photo-sample { height: 170px; position: relative; margin: 10px 0; background: url("assets/wallpaper.webp") center 40% / cover; }
.photo-star { position: absolute; top: 21%; right: 24%; color: #ffebff; width: 34px; height: 34px; }
.photo-sample::before { content: "·"; position: absolute; top: 15%; right: 40%; color: #ffeaff; }
.page-title { font-weight: 400; color: #003399; font-size: 22px; margin: 0 0 8px; }
.page-sub { color: var(--muted); font-size: 13px; line-height: 1.75; margin: 0 0 14px; }
.tab-strip { display: flex; gap: 2px; padding: 5px 9px 0; border-bottom: 1px solid #bbb; }
.tab-strip button { background: #eeeeee; border: 1px solid #ccc; padding: 4px 12px; font-size: 12px; }
.tab-strip button[aria-selected="true"] { background: white; border-top: 2px solid var(--blue); }
.quiet-button, .solid-button, .danger-button, .default-button { min-height: 27px; padding: 3px 14px; background: #e1e1e1; border: 1px solid #adadad; color: #111; font-size: 13px; }
.quiet-button:hover, .solid-button:hover, .default-button:hover { background: #e5f1fb; border-color: #0078d7; }
.default-button { border: 2px solid #0078d7; min-width: 85px; }
.story-links, .modal-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.archive-card, .ending-tile, .choice, .diagnostic-active { padding: 9px 11px; margin-bottom: 6px; border: 1px solid #ddd; }
.archive-card { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.archive-card > button:first-child { display: flex; align-items: center; gap: 9px; flex: 1; text-align: left; }
.archive-card small, .choice small { display: block; color: var(--muted); }
.ending-tile h3,.ending-tile p { margin: 0 0 3px; }
.ending-tile h3, .archive-card strong, .choice strong { font-size: 14px; }
.ending-tile p, .choice small { font-size: 12px; line-height: 1.65; }
.ending-tile.unlocked { border-color: #9acbec; background: #f0f8fd; }
.choice { display: block; width: 100%; text-align: left; }
.choice:hover,.archive-card:hover { background: #eaf5fe; }
.chat-layout { display: grid; grid-template-columns: 150px 1fr; flex: 1; min-height: 0; }
.chat-sidebar { padding: 7px 3px; background: #f5f6f8; border-right: 1px solid #ddd; }
.chat-sidebar button { display: flex; align-items: center; width: 100%; padding: 7px; gap: 6px; font-size: 12px; text-align: left; }
.chat-sidebar button.active, .chat-sidebar button:hover { background: #deecfa; }
.chat-avatar { flex: none; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #008fbe; color: white; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-header, .chat-footer { padding: 10px 14px; border-bottom: 1px solid var(--line); }
.chat-scroll { flex: 1; min-height: 0; padding: 10px 14px; overflow: auto; }
.chat-message { margin-bottom: 8px; line-height: 1.65; font-size: 13px; }
.chat-message small { display: block; color: #697784; font-size: 11px; }
.chat-message span { display: inline-block; padding: 4px 8px; border-radius: 5px; background: #edf1f5; }
.chat-footer { border-top: 1px solid var(--line); font-size: 12px; color: #5e6570; }
.browser-tools { display: flex; align-items: center; padding: 7px 10px; background: #eef0f2; border-bottom: 1px solid #ccc; }
.browser-tools form { flex: 1; display: flex; min-width: 0; gap: 4px; }
.browser-tools input,.search-input { width: 100%; min-width: 0; font-size: 13px; padding: 5px 8px; border: 1px solid #aaa; background: white; color: #171717; }
.article-tag { color: #365d77; font-size: 12px; }
.local-article h2 { font-size: clamp(20px,3cqw,27px); font-weight: 500; margin: 10px 0; }
.article-body { max-width: 550px; line-height: 1.8; user-select: text; }
.window[data-disturbance="blood"] .window-title { background: linear-gradient(97deg,#4d0710,#74101b 55%,#270507); color: #fff3f3; }
.window[data-disturbance="blood"] :is(.file-area,.chat-scroll) { background: radial-gradient(ellipse at 96% -15%,#740512c9,transparent 53%),radial-gradient(ellipse at 3% 102%,#54030ec9,transparent 48%),linear-gradient(140deg,#f0ded9,#e3c6c8 68%,#bb9395); box-shadow: inset 0 0 22px #45081559; }
.window[data-disturbance="blood"] .altered-file { color: #650610; text-shadow: 1px 0 #a20c2644; }
.window[data-disturbance="blood"] .altered-file small { color: #752d33; }
.window[data-disturbance="echo"] .window-heading { text-shadow: 1.5px 0 #aa0b323d; }
.window[data-disturbance="echo"] .window-heading span:last-child {
  animation: echo-drift 5.8s ease-in-out infinite;
}
@keyframes echo-drift {
  0%,48%,72%,100% { text-shadow: .6px 0 #85223a52; }
  58% { text-shadow: -2.5px .4px #a6304a80,1.8px 0 #40727c70; }
  65% { text-shadow: .8px 0 #a6304a80,-.6px 0 #40727c70; }
}
.window[data-disturbance="echo"] .altered-file strong { text-shadow: 1.4px 0 #b6123380; }
.window[data-disturbance="echo"] .altered-file .icon { filter: drop-shadow(2px 0 0 #ae253950); }

#overlay { position: absolute; z-index: 20000; inset: 0; }
#overlay.dialog { display: grid; place-items: center; padding: 13px; background: #0003; }
#overlay.system-dialog { background: transparent; }
.modal, .system-message { width: min(470px,100%); max-height: calc(100cqh - 26px); overflow: auto; background: white; border: 1px solid #3d5668; box-shadow: 0 9px 32px #0006; }
.modal { padding: 22px; }
.modal h1, .modal h2 { color: #003399; font-size: 23px; font-weight: 400; margin: 7px 0 12px; }
.modal p { font-size: 14px; line-height: 1.75; }
.modal-meta { color: #555; font-size: 12px; }
.message-title { height: 31px; padding-left: 10px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: #111; }
.message-title button { align-self: stretch; }
.message-content { display: flex; align-items: flex-start; gap: 16px; padding: 15px 23px 18px; }
.message-content h1 { color: #003399; font-size: 18px; font-weight: 400; margin: 1px 0 11px; }
.message-content p { font-size: 13px; line-height: 1.7; margin: 0 0 8px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content b { font-weight: 600; }
.message-symbol { flex: none; width: 32px; height: 32px; margin-top: 3px; text-align: center; }
.information { background: linear-gradient(#70cafd,#0080d8 51%,#086aba); border: 1px solid #0765a9; border-radius: 50%; box-shadow: inset 0 0 0 1px #b5dfff; color: white; font: bold 25px/32px Georgia,serif; }
.warning { background: #ffcd36; clip-path: polygon(50% 1%,100% 94%,0 94%); color: #222; font: bold 23px/38px "Segoe UI",sans-serif; }
.message-footer { display: flex; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid #dfdfdf; background: #f0f0f0; }
#overlay.cascading { overflow: hidden; background: #30080e2e; }
.crash-box { position: absolute; width: min(298px,calc(100cqw - 16px)); background: white; border: 1px solid #777; box-shadow: 0 5px 18px #0006; }
.crash-box b { display: block; font-size: 12px; font-weight: 400; padding: 7px; border-bottom: 1px solid #ddd; }
.crash-box p { margin: 12px; font-size: 13px; line-height: 1.55; }
.crash-box span { color: #a50b13; }
.skip-crash { position: absolute; bottom: 12px; right: 12px; z-index: 90; }
#overlay.blue { background: #0078d7; color: white; overflow: auto; }
.blue-content { max-width: 940px; padding: clamp(28px,8cqh,100px) 22px 30px clamp(24px,11cqw,160px); }
.blue-face { font: 200 clamp(65px,14cqh,135px)/1 "Segoe UI",sans-serif; margin-bottom: 20px; }
.blue-content h1 { font-weight: 350; font-size: clamp(19px,3.2cqw,33px); }
.blue-content p { max-width: 530px; line-height: 1.65; }
.blue-mono { font: 12px/1.5 Consolas,monospace; }
.blue-content button { border-color: #cdeaff; color: white; background: #ffffff15; }
.desktop-icons { grid-template-rows: repeat(auto-fill,var(--row,76px)); grid-auto-columns: var(--col,76px); }
.desk-item { width: calc(var(--col,76px) - 2px); height: calc(var(--row,76px) - 3px); }
.desk-item .icon { --icon: var(--desk-icon,46px); }
#desktop[data-icon-size="small"] { --row: 58px; --col: 70px; --desk-icon: 30px; }
#desktop[data-icon-size="large"] { --row: 102px; --col: 96px; --desk-icon: 65px; }
.nav-group { padding: 3px 8px; font-size: 12px; }
.nav-group span { color: #2589c9; margin-right: 4px; }
.menu-rule { border-top: 1px solid #d3d3d3; }
.sub-parent { position: relative; }
.sub-parent > button span { float: right; }
.sub-context { display: none; position: absolute; left: calc(100% - 1px); top: -4px; background: #f4f4f4; width: 132px; padding: 3px 2px; border: 1px solid #aaa; box-shadow: 2px 3px 5px #0004; }
.sub-parent:hover > .sub-context,.sub-parent:focus-within > .sub-context { display: block; }
.context.flip .sub-context { left: auto; right: calc(100% - 1px); }
.sub-context [aria-checked="true"]::before { content: "•"; position: absolute; left: 10px; }
.start-menu.launch-menu { display: grid; grid-template-columns: 44px 1fr 188px; width: min(507px,98cqw); min-height: min(395px,calc(100cqh - var(--bar))); padding: 0 12px 6px 0; gap: 8px; background: #22272bf7; }
.start-rail { display: flex; flex-direction: column; justify-content: flex-end; }
.start-rail button { height: 44px; display: grid; place-items: center; font-size: 20px; }
.start-rail .icon { --icon: 17px; }
.start-list,.start-tiles { padding-top: 13px; }
.start-tiles { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: max-content; gap: 3px; align-content: start; }
.start-tiles .panel-label { grid-column: 1/-1; }
.start-tiles button { position: relative; height: 87px; padding: 7px; flex-direction: column; justify-content: center; background: #005a9e; }
.start-tiles button:hover { background: #116aa9; outline: 2px solid #85aed1; outline-offset: -2px; }
.start-tiles .icon { --icon: 31px; }
.start-tiles button span:last-child:not(.icon) { align-self: flex-start; font-size: 11px; }
.calendar-time { font-size: 36px; font-weight: 300; }
.calendar-time + p { color: #a5d2f2; margin-top: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); text-align: center; border-top: 1px solid #777; padding-top: 10px; gap: 2px; }
.calendar-grid > * { padding: 4px 0; }
.calendar-grid .today { background: #0078d7; }
.window[data-disturbance="blood"] .file-area, .window[data-disturbance="blood"] .chat-scroll {
  background: radial-gradient(ellipse at right -20%,#47000ae8 1%,#771423aa 19%,transparent 54%),
    radial-gradient(ellipse at -7% 119%,#380009 3%,#720c22cc 21%,transparent 55%),linear-gradient(150deg,#f3e1df 18%,#e0b5b6 70%,#a36368);
}

/* The desktop itself stays interactive under the glass at every danger level. */
#haunting { position: absolute; inset: 0; z-index: 10900; overflow: hidden; pointer-events: none; user-select: none; }
#haunting * { pointer-events: none; }
#desktop .taskbar { z-index: 11000; }
.clock { font-variant-numeric: tabular-nums; }
.screen-stain, #capillaries, #circulation, .signal-tear { position: absolute; inset: 0; width: 100%; height: 100%; }
.screen-stain { box-shadow: inset 0 0 3.6cqmin 1.3cqmin #47020c83; background: radial-gradient(ellipse farthest-side at 50% 46%,transparent 72%,#73041924 93%,#3d010660); }
#capillaries { opacity: .94; }
.watch-eye, .face-reflection, .signal-tear { display: none; }
#desktop:is([data-haunt="2"],[data-haunt="3"]) .watch-eye { display: block; }
.watch-eye {
  position: absolute; width: clamp(118px,17cqw,290px); aspect-ratio: 2/1;
  --socket-x: 33.2%; --blink-time: 6.7s; --blink-offset: -.8s;
  background: radial-gradient(ellipse closest-side,#18090e 48%,#330f1780 70%,transparent);
  mask-image: radial-gradient(ellipse closest-side,#000 49%,#000c 72%,transparent);
  filter: brightness(1.72) contrast(1.16);
}
.watch-eye::before, .watch-eye::after {
  content: ""; position: absolute; inset: 0;
  background: url("assets/onlooker.webp") var(--socket-x) 23.1% / 505% auto no-repeat;
  animation: watcher-blink var(--blink-time) var(--blink-offset) linear infinite;
}
.watch-eye::after {
  mask-image: radial-gradient(ellipse 30% 58% at 50% 50%, #000 66%, transparent 100%);
  transform: translate(var(--look-x,0px),var(--look-y,0px));
  transition: transform .32s cubic-bezier(.14,.75,.23,1);
  animation: watcher-blink var(--blink-time) var(--blink-offset) linear infinite,
             eye-drift 4.9s var(--blink-offset) ease-in-out infinite;
}
.eye-left { left: 12%; bottom: 17%; rotate: -9deg; }
.eye-right { right: 8%; top: 10%; --socket-x: 68%; --blink-time: 8.3s; --blink-offset: -3.1s; width: clamp(137px,20cqw,335px); rotate: 5deg; }
@keyframes watcher-blink {
  0%,72%,77%,100% { clip-path: ellipse(61% 54% at 50% 50%); }
  73.7% { clip-path: ellipse(58% 2% at 50% 55%); }
  75% { clip-path: ellipse(60% 23% at 50% 54%); }
}
@keyframes eye-drift {
  0%,31%,100% { translate: -1.8% .6%; }
  35%,58% { translate: 1.4% -1.6%; }
  64%,79% { translate: 2.9% 1.2%; }
  82%,92% { translate: -.4% 1.4%; }
}
#desktop[data-haunt="3"] #wallpaper::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#10050b55,transparent 50%),url("assets/onlooker.webp") 63% 37% / cover no-repeat; opacity: .94; }
#desktop[data-haunt="3"] .screen-stain { box-shadow: inset 0 0 9cqmin 2cqmin #4c000f90; background: linear-gradient(170deg,#7d001626,transparent 34%,#6c00122e); }
#desktop[data-haunt="3"] .watch-eye { filter: brightness(1.45) contrast(1.24); }
#desktop[data-haunt="3"] .window-title, #desktop[data-haunt="3"] .taskbar { background-color: #3b0711; color: #fff0f0; text-shadow: -1px 0 #ff3a4b,1px 0 #41b6ca; }
#desktop[data-haunt="3"] .face-reflection { display: block; position: absolute; top: 12%; right: -5%; width: min(60cqw,900px); height: 74%; background: url("assets/onlooker.webp") 50% 35% / cover; mask-image: radial-gradient(ellipse closest-side, #000c 10%, #0009 46%,transparent 100%); opacity: .32; }
#desktop[data-haunt="3"] .signal-tear { display: block; background: repeating-linear-gradient(0deg,transparent 0 3px,#23040a28 3px 4px); }
#desktop[data-haunt="3"] .signal-tear::after {
  content: ""; position: absolute; inset: -15% 0 auto; height: 12%;
  background: linear-gradient(0deg,transparent 0%,#48091b44 66%,#d99b9c36 70%,#26081744 72%,transparent 76%);
  animation: signal-roll 6.8s linear infinite;
}
#desktop[data-haunt="3"] #wallpaper::after { transform-origin: 51% 32%; animation: watcher-approach 11s ease-in-out infinite alternate; }
#desktop[data-haunt="3"] .face-reflection { animation: glass-reflection 8.4s -1.7s ease-in-out infinite; }
@keyframes watcher-approach {
  0% { transform: scale(1.015) translate(-.4%,.2%); }
  57% { transform: scale(1.12) translate(.45%,-.6%); }
  100% { transform: scale(1.29) translate(-1%,-.8%); }
}
@keyframes glass-reflection {
  0%,100% { opacity: .12; transform: translate(3%,1%) scale(.97); }
  46% { opacity: .42; transform: translate(-3%,-1.6%) scale(1.08); }
  70% { opacity: .26; transform: translate(-2%,0) scale(1.12); }
}
#desktop[data-haunt="3"] .desk-label { text-shadow: -2px 0 #990416,2px 0 #009aa4,0 1px 3px black; }
.desk-item[data-item="inspect:carbon"] .icon { transform: scaleX(-1); }
.stray-cursor { position: absolute; top: 46%; left: 54%; display: flex; align-items: flex-start; pointer-events: auto; min-width: 95px; min-height: 40px; rotate: -7deg; }
.stray-cursor i { width: 22px; height: 32px; background: #fff3f4; clip-path: polygon(0 0,100% 62%,64% 65%,77% 96%,57% 100%,43% 69%,12% 92%); }
.stray-cursor span { margin-top: 20px; background: #580619; color: #ffecee; font-size: 12px; padding: 2px 5px; box-shadow: 1px 1px #220007; }
.stray-cursor i { animation: borrowed-hand 3.7s ease-in-out infinite; }
@keyframes borrowed-hand { 0%,28%,100% { translate: 0; } 44%,55% { translate: 7px -3px; } 63% { translate: 5px 1px; } }
.impossible-drive .disk-usage i { width: 100%; background: repeating-linear-gradient(-45deg,#8a1224 0 4px,#bc2534 4px 8px); }
.impossible-drive strong,.impossible-drive small { color: #7d0010; }
.photo-intruder { position: absolute; inset: 0 0 0 26%; background: url("assets/onlooker.webp") center 35% / cover; mask-image: linear-gradient(90deg,transparent,#000c 40%,#000); }
.photo-intruder { animation: photo-emerge 5.3s ease-in-out infinite alternate; }
@keyframes photo-emerge { from { opacity: .34; background-position: 50% 31%; } to { opacity: .96; background-position: 50% 48%; } }
[data-item="fault:portrait"] .icon { background: url("assets/onlooker.webp") center / cover; border: 2px solid #f4eeee; box-shadow: 1px 1px 2px #604048; }
.typing-ghost { display: block; text-align: left; color: #681124; border-left: 2px solid #b94556; padding: 7px 10px; background: #f7e5e7; }
.typing-ghost small { display: block; color: #764653; }
.typing-ghost i { display: inline-block; overflow: hidden; vertical-align: bottom; width: 1em; animation: typing-ellipsis 1.8s steps(3) infinite; }
@keyframes typing-ellipsis { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0); } }
.redacted { display: block; text-align: left; color: #160708; background: repeating-linear-gradient(0deg,transparent 0 .45em,#251c21 .45em 1.55em,transparent 1.55em 1.8em); border-left: 3px solid #a50e23; padding: 0 8px; }
.redacted { background-repeat: no-repeat; animation: redact-lines 6.5s ease-in-out infinite; }
@keyframes redact-lines {
  0%,28%,100% { background-size: 100% 100%; }
  57%,67% { background-size: 18% 100%; }
  77% { background-size: 79% 100%; }
}
[data-item="fault:reflection"] strong { transform: scaleX(-1); color: #4d0814; }
#desktop.event-arrival::after { content: ""; position: absolute; inset: 0 0 var(--bar); z-index: 10950; pointer-events: none; background: radial-gradient(ellipse at center,transparent 34%,#9b001b35 72%,#210009aa 100%),linear-gradient(90deg,#ff173420,#0000 18% 82%,#ff173420); animation: arrival-flash .62s steps(2,end) both; }
#desktop.event-arrival .window-heading { animation: window-jolt .62s steps(2,end) both; }
#desktop.event-arrival .taskbar .sys-glyph { animation: bar-jolt .62s steps(2,end) both; }
#desktop.event-arrival .screen-stain { animation: stain-pulse .62s ease-out both; }
#desktop.event-arrival .watch-eye { animation: arrival-eye .62s steps(2,end) both; }
#desktop[data-haunt="1"] .screen-stain { animation: stain-breathe 3.4s ease-in-out infinite; }
@keyframes arrival-flash { 0% { opacity: 0; } 13% { opacity: 1; } 26% { opacity: .13; } 39% { opacity: .8; } 100% { opacity: 0; } }
@keyframes window-jolt { 0%,100% { translate: 0; } 15% { translate: -7px 2px; } 31% { translate: 9px -2px; } 47% { translate: -4px 1px; } 64% { translate: 3px; } }
@keyframes bar-jolt { 0%,100% { filter: none; } 18% { filter: brightness(1.7) saturate(1.5); } 35% { transform: translateX(-3px); } 53% { transform: translateX(3px); } }
@keyframes stain-pulse { 0% { opacity: .2; } 17% { opacity: 1; } 100% { opacity: .55; } }
@keyframes arrival-eye { 0% { scale: .72 .2; opacity: 0; } 20% { scale: 1.08 1; opacity: 1; } 100% { scale: 1; opacity: 1; } }
@keyframes stain-breathe { 0%,100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes signal-roll { 0% { transform: translateY(0); } 88%,100% { transform: translateY(980%); } }
#desktop[data-effects-paused], #desktop[data-effects-paused] *,
#desktop[data-effects-paused]::after, #desktop[data-effects-paused] *::after,
#desktop[data-effects-paused] *::before { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  #desktop *, #desktop::after, #desktop *::before, #desktop *::after { animation: none !important; }
  .watch-eye::after { transform: none; transition: none; }
  #desktop.event-arrival::after, #desktop[data-haunt="3"] .signal-tear::after { display: none; }
}
