:root {
  color-scheme: light;
  --paper: #f4f4f1;
  --paper-2: #e8e8e4;
  --metal: #d1d1cc;
  --mid: #8c8c87;
  --ink: #11110f;
  --line: #20201e;
  --shadow: rgba(0, 0, 0, 0.22);
  --signal: #ff4d00;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; background: #0d0d0c; }

button, input { font: inherit; }

button { color: inherit; }

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

[hidden] { display: none !important; }

body {
  min-width: 320px;
  overflow: hidden;
  color: var(--ink);
}

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: #fff;
  color: var(--ink);
  transition: opacity .42s ease, visibility .42s ease;
}

.boot-screen.is-leaving { opacity: 0; visibility: hidden; }
.boot-screen > img {
  position: absolute;
  right: .9rem;
  bottom: .9rem;
  display: block;
  width: clamp(8rem, 14vw, 11rem);
  height: auto;
}
.desktop.is-booting { opacity: 0; pointer-events: none; }

.desktop {
  position: relative;
  width: 100vw;
  min-height: 100dvh;
  overflow: hidden;
  transition: opacity .32s ease;
  background:
    radial-gradient(circle at center, transparent 0 1px, rgba(0,0,0,.035) 1px 2px, transparent 2px) 0 0 / 4px 4px,
    linear-gradient(145deg, #efefec 0%, #cacac5 68%, #b8b8b2 100%);
}

.desktop::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 9997;
  pointer-events: none;
  opacity: .17;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.3) 0, rgba(255,255,255,.3) 1px, rgba(0,0,0,.08) 2px, transparent 3px);
  mix-blend-mode: overlay;
}

.menubar {
  position: relative;
  z-index: 9999;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 43px;
  border-bottom: 1px solid var(--line);
  background: rgba(247,247,244,.9);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 -1px rgba(255,255,255,.7);
}

.system-mark,
.menubar nav button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-weight: 700;
  font-size: .79rem;
  letter-spacing: .04em;
  cursor: pointer;
}

.system-mark { padding: 0 1rem; background: var(--ink); color: white; }
.menubar nav { display: flex; height: 100%; }
.menubar nav button { padding: 0 1.1rem; }
.menubar nav button:hover { background: var(--ink); color: white; }

.system-data {
  display: flex;
  gap: 1.25rem;
  padding: 0 1rem;
  font: 700 .72rem/1.1 "Courier New", monospace;
  letter-spacing: .04em;
}

.desktop-field {
  position: relative;
  height: calc(100dvh - 69px);
  overflow: hidden;
}

.desktop-index {
  position: absolute;
  left: 1.25rem;
  bottom: .5rem;
  display: flex;
  gap: 1rem;
  margin: 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: clamp(3.4rem, 6vw, 7.6rem);
  line-height: .82;
  letter-spacing: -.02em;
  font-weight: 900;
  color: rgba(17,17,15,.1);
  white-space: nowrap;
  user-select: none;
}

.desktop-index span {
  font: 400 .72rem/1 "Courier New", monospace;
  letter-spacing: .04em;
  color: rgba(17,17,15,.4);
}

.icon-column {
  position: absolute;
  top: 2rem;
  left: 1.5rem;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 8.5rem;
}

.desktop-icon {
  display: grid;
  grid-template-columns: 3.25rem 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: .1rem .65rem;
  padding: .3rem;
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: default;
}

.desktop-icon:hover,
.desktop-icon:focus-visible {
  border-color: var(--ink);
  background: rgba(244,244,241,.82);
}

.desktop-icon > span:nth-child(2) { font-size: .83rem; font-weight: 700; letter-spacing: -.02em; }
.desktop-icon small { grid-column: 2; color: #555; font: .64rem/1 "Courier New", monospace; }

.folder-icon {
  position: relative;
  grid-row: 1 / 3;
  width: 3.1rem;
  height: 2.25rem;
  border: 1px solid var(--ink);
  background: linear-gradient(#f8f8f6 0 24%, #d6d6d1 25% 100%);
  box-shadow: inset 2px 2px white, 3px 3px 0 rgba(0,0,0,.12);
}

.folder-icon::before {
  content: "";
  position: absolute;
  top: -.52rem;
  left: .18rem;
  width: 1.25rem;
  height: .55rem;
  border: 1px solid var(--ink);
  border-bottom: 0;
  background: #ecece8;
}

.file-icon,
.music-file-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 3.05rem;
  height: 3.25rem;
  border: 1px solid var(--ink);
  background: #f8f8f5;
  box-shadow: inset 2px 2px white, 3px 3px 0 rgba(0,0,0,.12);
  font: 700 .68rem/1 "Courier New", monospace;
}

.music-file-icon {
  position: relative;
  height: 3.05rem;
  overflow: hidden;
  background: linear-gradient(145deg, #f5f5f2 0 18%, #30302e 19% 100%);
  color: white;
  font: 700 2rem/.9 Georgia, serif;
  text-shadow: 1px 1px 0 #000;
}

.music-file-icon::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(255,255,255,.12) 3px 4px); pointer-events: none; }
.folder-icon.locked { filter: invert(1); }

.window {
  position: absolute;
  z-index: 20;
  left: var(--x);
  top: var(--y);
  width: min(var(--w), calc(100vw - 2rem));
  height: min(var(--h), calc(100dvh - 7rem));
  min-width: 21rem;
  min-height: 17rem;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: var(--paper);
  box-shadow: 1px 1px 0 white, 2px 2px 0 var(--ink), 14px 18px 40px var(--shadow);
}

.window img,
.window video,
.window canvas { max-width: 100%; }

.window.is-active { z-index: 100; }
.window.is-maximized { left: .75rem !important; top: .75rem !important; width: calc(100vw - 1.5rem) !important; height: calc(100dvh - 5.4rem) !important; }
.window.is-minimized { height: 2.55rem !important; min-height: 0; }
.window.is-minimized > :not(.window-bar) { display: none; }

.window-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 2.55rem;
  border-bottom: 1px solid var(--ink);
  background:
    repeating-linear-gradient(to bottom, #f5f5f2 0 2px, #bdbdb8 2px 3px, #f5f5f2 3px 5px);
  cursor: grab;
  user-select: none;
}

.window-bar:active { cursor: grabbing; }
.window-bar h1, .window-bar h2 { justify-self: center; min-width: 0; max-width: 100%; margin: 0; padding: .2rem .7rem; overflow: hidden; background: var(--paper); font-size: .82rem; letter-spacing: .04em; text-overflow: ellipsis; white-space: nowrap; }
.window-bar > span { padding: 0 .7rem; background: var(--paper); font: .65rem/1 "Courier New", monospace; white-space: nowrap; }

.window-controls { display: flex; align-items: center; gap: .34rem; padding: 0 .55rem; background: var(--paper); height: 100%; }
.window-controls button { width: .85rem; height: .85rem; padding: 0; border: 1px solid var(--ink); background: #f6f6f3; cursor: pointer; }
.window-controls button:first-child::after { content: "×"; display: block; transform: translateY(-2px); font-size: .75rem; }
.window-controls button:nth-child(2)::after { content: "–"; display: block; transform: translateY(-3px); }
.window-controls button:nth-child(3)::after { content: "+"; display: block; transform: translateY(-2px); }
.window-controls button:hover { background: var(--ink); color: white; }

.window-toolbar {
  display: flex;
  min-height: 2.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--metal);
}

.window-toolbar button {
  min-width: 4.5rem;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  font-size: .73rem;
  font-weight: 700;
  cursor: pointer;
}

.window-toolbar button.is-active { background: var(--ink); color: white; }
.window-toolbar span { margin-left: auto; align-self: center; padding: 0 .65rem; font: .64rem/1 "Courier New", monospace; }

.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, .65fr);
  height: calc(100% - 7.2rem);
  min-width: 0;
}

.work-layout > * { min-width: 0; }

.project-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  align-content: start;
  gap: 1px;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--line);
  border-right: 1px solid var(--line);
}

.project-list.is-list { grid-template-columns: 1fr; align-content: start; }
.project-list.is-list .project-card { grid-template-columns: 5.5rem minmax(0,1fr); grid-template-rows: auto auto; min-height: 6rem; }
.project-list.is-list .project-visual,
.project-list.is-list .file-thumbnail,
.project-list.is-list .explorer-folder { grid-row: 1 / 3; min-height: 4.6rem; height: 4.6rem; }
.project-list.is-list small { grid-column: 2; }

.project-card {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: .42rem;
  min-height: 15rem;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: .75rem;
  border: 0;
  background: var(--paper);
  text-align: left;
  cursor: pointer;
}

.project-card:hover,
.project-card.is-selected { background: #fff; }
.project-card.is-selected { box-shadow: inset 0 0 0 2px var(--ink); }
.project-card strong { display: block; min-width: 0; max-width: 100%; overflow: hidden; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
.project-card small { min-width: 0; max-width: 100%; overflow: hidden; font: .68rem/1.2 "Courier New", monospace; text-overflow: ellipsis; white-space: nowrap; }

.folder-card { align-content: center; }
.explorer-folder {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(9rem, 76%);
  height: 6.4rem;
  margin: 1rem 0;
  border: 1px solid var(--ink);
  background: linear-gradient(#f8f8f6 0 18%, #d6d6d1 19% 100%);
  box-shadow: inset 3px 3px white, 5px 6px 0 rgba(0,0,0,.13);
}
.explorer-folder::before { content: ""; position: absolute; top: -1rem; left: .45rem; width: 3.2rem; height: 1rem; border: 1px solid; border-bottom: 0; background: #ecece8; }
.explorer-folder.dark { filter: invert(1); }

.file-thumbnail {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 9.4rem;
  overflow: hidden;
  border: 1px dashed var(--ink);
  background: #d3d3ce;
}
.file-thumbnail img { display: block; width: 100%; height: 100%; min-height: 9.4rem; object-fit: cover; filter: saturate(.9) contrast(1.03); }
.file-thumbnail::after { content: attr(data-ext); position: absolute; right: .3rem; bottom: .3rem; padding: .22rem .3rem; border: 1px solid; background: rgba(244,244,241,.9); color: var(--ink); font: 700 .62rem/1 "Courier New", monospace; }
.file-thumbnail.video::before { content: "▶"; position: absolute; z-index: 1; left: 50%; top: 50%; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border: 1px solid white; border-radius: 50%; background: rgba(0,0,0,.62); color: white; transform: translate(-50%,-50%); }

.project-visual {
  position: relative;
  min-height: 9.4rem;
  overflow: hidden;
  border: 1px dashed var(--ink);
  background-color: #d3d3ce;
}

.project-visual::after {
  content: attr(data-code);
  position: absolute;
  right: .35rem;
  bottom: .25rem;
  font: .62rem/1 "Courier New", monospace;
}

.visual-one { background: radial-gradient(circle at 62% 42%, #111 0 7%, transparent 7.5%), repeating-radial-gradient(ellipse at 62% 42%, transparent 0 7px, #111 8px 9px, transparent 10px 15px), #efefec; }
.visual-two { background: linear-gradient(122deg, transparent 0 32%, #111 32% 46%, transparent 46% 55%, #8d8d88 55% 58%, transparent 58%), repeating-linear-gradient(90deg,#eee 0 8px,#bbb 9px,#eee 10px 17px); }
.visual-three { background: repeating-radial-gradient(circle at 50% 50%, #111 0 1px, transparent 1px 4px), linear-gradient(45deg, transparent 0 38%, #111 38% 40%, transparent 40% 60%, #111 60% 62%, transparent 62%), #e8e8e4; }
.visual-four { background: conic-gradient(from 90deg at 50% 50%, #111 0 12.5%, #eee 0 25%, #888 0 37.5%, #eee 0 50%, #111 0 62.5%, #eee 0 75%, #aaa 0 87.5%, #eee 0); filter: grayscale(1); }

.project-inspector { overflow-x: hidden; overflow-y: auto; padding: 1rem 1.1rem 1.25rem; background: #e6e6e1; }
.inspector-code { display: flex; justify-content: space-between; padding-bottom: .55rem; border-bottom: 1px solid; font: .7rem/1 "Courier New", monospace; }
.project-inspector h2 { max-width: 100%; margin: 1.1rem 0 1.7rem; overflow-wrap: anywhere; font-size: clamp(2.6rem, 4vw, 5.7rem); line-height: .81; letter-spacing: -.075em; }
.project-inspector dl { margin: 0; border-top: 1px solid; }
.project-inspector dl div { display: grid; grid-template-columns: 4.5rem minmax(0,1fr); padding: .5rem 0; border-bottom: 1px solid; }
.project-inspector dt { font: .68rem/1.2 "Courier New", monospace; }
.project-inspector dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: .78rem; font-weight: 700; }
.open-project { width: 100%; margin-top: 1.5rem; padding: .75rem; border: 1px solid; background: var(--paper); font-size: .78rem; font-weight: 700; text-align: left; cursor: pointer; }
.open-project:hover { background: var(--ink); color: white; }

.window-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 2.5rem;
  padding: 0 .7rem;
  border-top: 1px solid;
  background: var(--metal);
  font: .65rem/1 "Courier New", monospace;
}

.document-view { height: calc(100% - 2.55rem); overflow-x: hidden; overflow-y: auto; padding: 1.5rem; }
.file-meta { padding-bottom: 1rem; border-bottom: 1px solid; font: .7rem/1.45 "Courier New", monospace; }
.document-view h2 { margin: 3rem 0 .25rem; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .85; letter-spacing: -.08em; }
.document-view .lead { max-width: 28rem; font-size: 1.3rem; line-height: 1.08; }
.document-view p:not(.file-meta):not(.lead) { max-width: 35rem; font-size: 1rem; line-height: 1.45; }
.rule { height: 1px; margin: 2rem 0; background: var(--ink); }

.about-document { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(13rem,.65fr); gap: 1.5rem; }
.about-copy { min-width: 0; }
.about-copy h2 { margin-top: 2rem; }
.about-photo { align-self: start; margin: 0; border: 1px solid; background: #080808; }
.about-photo img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about-photo figcaption { padding: .55rem; border-top: 1px solid var(--ink); background: var(--paper); font: .62rem/1.35 "Courier New", monospace; }
.availability { font-weight: 700; letter-spacing: .03em; }
.contact-lines a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.contact-lines a:hover { color: var(--signal); }

.player-window { background: #161615; color: white; }
.player-window .window-bar { color: var(--ink); }
.player-body { display: grid; grid-template-rows: auto minmax(8rem,1fr) 11.8rem auto auto auto; height: calc(100% - 2.55rem); min-width: 0; padding: 1rem; gap: .65rem; overflow-y: auto; }
.track-display { display: grid; grid-template-columns: 3.5rem 1fr; gap: .75rem; align-items: center; padding-bottom: .8rem; border-bottom: 1px solid #61615d; }
.track-display > span { font-size: 2.8rem; line-height: .85; letter-spacing: -.08em; }
.track-display strong, .track-display small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-display strong { font-size: .92rem; }
.track-display small { margin-top: .3rem; color: #aaa; font: .66rem/1 "Courier New", monospace; }
.visualizer-shell { position: relative; min-width: 0; min-height: 0; overflow: hidden; border: 1px solid #555; background: #000; }
#visualizer { display: block; width: 100%; height: 100%; min-height: 8rem; background: #000; image-rendering: pixelated; image-rendering: crisp-edges; }
.visualizer-data { position: absolute; right: .45rem; bottom: .35rem; left: .45rem; display: flex; justify-content: space-between; gap: 1rem; color: rgba(255,255,255,.65); font: .58rem/1 "Courier New", monospace; mix-blend-mode: difference; pointer-events: none; }

.eq-panel { min-width: 0; overflow: hidden; border: 1px solid #050505; background: #aeb1ae; color: #080808; box-shadow: inset 1px 1px #e8e9e7, inset -1px -1px #5f625f; }
.eq-panel-head { display: flex; justify-content: space-between; gap: .6rem; min-width: 0; padding: .38rem .5rem; border-bottom: 1px solid #444744; background: #d0d2cf; font: 700 .57rem/1 "Courier New", monospace; }
.eq-panel-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-channels { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); height: calc(100% - 1.8rem); min-width: 0; padding: .35rem .28rem .3rem; }
.eq-channel { display: grid; grid-template-rows: 1.4rem minmax(0,1fr) .9rem; min-width: 0; border-right: 1px solid rgba(0,0,0,.22); text-align: center; }
.eq-channel:last-child { border-right: 0; }
.eq-shape { align-self: start; justify-self: center; display: grid; place-items: center; width: calc(100% - .35rem); height: 1.22rem; border: 1px solid #202420; background: linear-gradient(#596158,#30372f); color: #e6ebe4; font: 700 1rem/1 Georgia, serif; box-shadow: inset 1px 1px rgba(255,255,255,.28); }
.eq-slot { position: relative; display: block; width: 100%; min-height: 0; overflow: visible; background: repeating-linear-gradient(to bottom, transparent 0 .42rem, rgba(0,0,0,.4) .42rem .47rem, transparent .47rem .84rem); }
.eq-slot::before { content: ""; position: absolute; top: .15rem; bottom: .15rem; left: 50%; width: .18rem; border: 1px solid #4d504d; background: #777a77; transform: translateX(-50%); box-shadow: inset 1px 0 rgba(255,255,255,.4); }
.eq-slider { position: absolute; top: 50%; left: 50%; width: 6.9rem; height: 1rem; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; background: transparent; transform: translate(-50%,-50%) rotate(-90deg); cursor: ns-resize; }
.eq-slider::-webkit-slider-runnable-track { height: .18rem; border: 0; background: transparent; }
.eq-slider::-webkit-slider-thumb { width: 1.15rem; height: .9rem; margin-top: -.36rem; appearance: none; -webkit-appearance: none; border: 1px solid #050505; border-radius: 0; background: linear-gradient(#3a3d3a 0 38%, #080808 39% 55%, #3a3d3a 56% 100%); box-shadow: inset 1px 1px rgba(255,255,255,.32), 1px 1px 0 rgba(0,0,0,.3); }
.eq-slider::-moz-range-track { height: .18rem; border: 0; background: transparent; }
.eq-slider::-moz-range-thumb { width: 1.15rem; height: .9rem; border: 1px solid #050505; border-radius: 0; background: linear-gradient(#3a3d3a 0 38%, #080808 39% 55%, #3a3d3a 56% 100%); box-shadow: inset 1px 1px rgba(255,255,255,.32), 1px 1px 0 rgba(0,0,0,.3); }
.eq-channel small { align-self: end; font: 700 .57rem/1 "Courier New", monospace; }
.timeline { display: grid; grid-template-columns: 1fr auto; gap: .7rem; align-items: center; font: .65rem/1 "Courier New", monospace; }
input[type="range"] { accent-color: white; }
.transport { display: grid; grid-template-columns: auto 1fr auto 1.25fr; gap: .45rem; }
.transport button, .upload-button { display: grid; place-items: center; min-height: 2.5rem; border: 1px solid white; background: transparent; color: white; font-size: .7rem; font-weight: 700; cursor: pointer; }
.transport button:hover, .upload-button:hover, .play-button { background: white !important; color: black !important; }
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.player-foot { display: flex; justify-content: space-between; align-items: center; color: #aaa; font: .61rem/1 "Courier New", monospace; }
.player-foot label { display: flex; align-items: center; gap: .45rem; }
.player-foot input { width: 5rem; }

.case-window { background: var(--paper); }
.case-body { height: calc(100% - 2.55rem); overflow-x: hidden; overflow-y: auto; }
.case-heading { position: relative; min-height: 21rem; padding: 1.25rem; border-bottom: 1px solid; }
.case-heading > p { margin: 0; font: .7rem/1 "Courier New", monospace; }
.case-heading h2 { margin: 4rem 0 0; overflow-wrap: anywhere; font-size: clamp(4rem, 10vw, 10rem); line-height: .74; letter-spacing: -.09em; }
.barcode { position: absolute; top: 1.25rem; right: 1.25rem; width: 8rem; height: 2.6rem; border: 1px solid; background: repeating-linear-gradient(90deg, var(--ink) 0 1px, transparent 1px 3px, var(--ink) 3px 5px, transparent 5px 7px, var(--ink) 7px 8px, transparent 8px 11px); }
.case-meta { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid; }
.case-meta span { padding: .8rem; border-right: 1px solid; font: .68rem/1.2 "Courier New", monospace; }
.case-meta span:last-child { border-right: 0; }
.file-viewer { display: grid; place-items: center; min-height: 30rem; padding: 1.2rem; border-bottom: 1px solid; background: #111; }
.file-viewer img, .file-viewer video { display: block; max-width: 100%; max-height: min(72vh, 62rem); object-fit: contain; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
.file-viewer img { width: min(100%, 72rem); }
.file-viewer video { width: min(100%, 72rem); background: #000; }

.secret-window { background: #0b0b0a; color: white; }
.secret-window .window-bar { color: var(--ink); }
.secret-content { display: grid; place-items: center; height: calc(100% - 2.55rem); min-width: 0; padding: .7rem; overflow: auto; background: repeating-linear-gradient(0deg, transparent 0 5px, rgba(255,255,255,.04) 6px); }
.secret-media { width: 100%; max-width: 34.875rem; margin: 0; border: 1px solid #777; background: #000; }
.secret-media img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 12rem); object-fit: contain; user-select: none; }
.secret-media figcaption { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .65rem; border-top: 1px solid #777; color: #c9c9c4; font: .62rem/1.25 "Courier New", monospace; }

.sasun-layer {
  position: fixed;
  z-index: 15000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0,0,0,.2);
  cursor: default;
}

.sasun-window {
  display: grid;
  width: min(72vmin, 30rem);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #111;
  background: #000;
  box-shadow: 1px 1px 0 #fff, 2px 2px 0 #111, 18px 24px 60px rgba(0,0,0,.45);
  animation: sasun-open .13s steps(3, end) both;
}

.sasun-window video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  image-rendering: pixelated;
  pointer-events: none;
  user-select: none;
}

.sasun-window video::-webkit-media-controls { display: none !important; }

@keyframes sasun-open {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

.desktop-footer {
  position: absolute;
  z-index: 9999;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 26px;
  padding: 0 .65rem;
  border-top: 1px solid;
  background: rgba(240,240,236,.9);
  backdrop-filter: blur(12px);
  font: .62rem/1 "Courier New", monospace;
}

.toast {
  position: fixed;
  z-index: 10000;
  right: 1rem;
  bottom: 2.7rem;
  max-width: min(28rem, calc(100vw - 2rem));
  padding: .85rem 1rem;
  border: 1px solid;
  background: var(--ink);
  color: white;
  box-shadow: 5px 5px 0 rgba(255,255,255,.85);
  font: .72rem/1.35 "Courier New", monospace;
  transform: translateY(1rem);
  opacity: 0;
  pointer-events: none;
  transition: .18s ease;
}

.toast.is-visible { transform: translateY(0); opacity: 1; }

.desktop.ghost-mode .window { box-shadow: 1px 1px 0 white, 2px 2px 0 var(--ink), 20px 24px 0 rgba(0,0,0,.16); }
.desktop.ghost-mode .project-visual,
.desktop.ghost-mode .file-thumbnail img { filter: contrast(1.7) grayscale(1); }
.desktop.negative-mode { filter: invert(1) grayscale(1); }
.desktop.negative-mode .project-visual,
.desktop.negative-mode .file-thumbnail img,
.desktop.negative-mode .about-photo img,
.desktop.negative-mode .file-viewer img,
.desktop.negative-mode .file-viewer video { filter: invert(1); }
.desktop.shake { animation: system-shake .35s steps(2); }
@keyframes system-shake { 0%,100%{transform:translate(0)} 20%{transform:translate(-7px,3px)} 40%{transform:translate(5px,-4px)} 60%{transform:translate(-3px,-2px)} 80%{transform:translate(6px,4px)} }

@media (max-width: 850px) {
  body { overflow: auto; }
  .desktop { min-height: 100dvh; overflow: hidden; }
  .menubar { grid-template-columns: auto 1fr; }
  .menubar nav { overflow-x: auto; }
  .system-data { display: none; }
  .desktop-field { height: calc(100dvh - 69px); }
  .desktop-index { display: none; }
  .icon-column { top: .75rem; left: .65rem; right: .65rem; width: auto; flex-direction: row; gap: .25rem; overflow-x: auto; padding-bottom: .5rem; }
  .desktop-icon { flex: 0 0 5.5rem; display: flex; flex-direction: column; gap: .3rem; text-align: center; }
  .desktop-icon small { display: none; }
  .desktop-icon > span:nth-child(2) { font-size: .69rem; }
  .folder-icon, .file-icon, .music-file-icon { width: 2.7rem; height: 2.25rem; min-height: 2.25rem; }
  .window, .window.is-maximized {
    position: fixed;
    left: .5rem !important;
    top: 8.25rem !important;
    width: calc(100vw - 1rem) !important;
    height: calc(100dvh - 10.6rem) !important;
    min-width: 0;
    min-height: 0;
    box-shadow: 1px 1px 0 white, 2px 2px 0 var(--ink), 8px 10px 24px var(--shadow);
  }
  .window-bar { cursor: default; }
  .window-bar > span { display: none; }
  .window-toolbar span { display: none; }
  .work-layout { grid-template-columns: 1fr; height: calc(100% - 7.2rem); }
  .project-list { grid-template-columns: repeat(2, minmax(8rem,1fr)); border-right: 0; }
  .project-card { min-height: 12rem; }
  .project-visual, .file-thumbnail { min-height: 7rem; }
  .file-thumbnail img { min-height: 7rem; }
  .project-inspector { display: none; }
  .about-document { grid-template-columns: 1fr; }
  .about-photo { width: min(18rem,100%); order: -1; }
  .transport { grid-template-columns: auto 1fr auto; }
  .upload-button { grid-column: 1 / -1; }
  .case-heading { min-height: 15rem; }
  .case-heading h2 { margin-top: 4rem; font-size: clamp(3.2rem, 15vw, 6rem); }
  .barcode { width: 5.5rem; }
  .case-meta { grid-template-columns: 1fr; }
  .case-meta span { border-right: 0; border-bottom: 1px solid; }
  .file-viewer { min-height: 18rem; padding: .6rem; }
  .player-body { padding: .7rem; gap: .55rem; }
  .secret-media figcaption { flex-direction: column; gap: .25rem; }
  .sasun-window { width: min(84vmin, 30rem); }
}

@media (max-width: 480px) {
  .menubar nav button { padding: 0 .7rem; }
  .system-mark { padding: 0 .7rem; }
  .project-list { grid-template-columns: 1fr; }
  .project-card { grid-template-columns: 6rem 1fr; grid-template-rows: auto auto; min-height: 7rem; }
  .project-visual, .file-thumbnail, .explorer-folder { grid-row: 1 / 3; min-height: 5.5rem; height: 5.5rem; }
  .file-thumbnail img { min-height: 5.5rem; }
  .project-card small { grid-column: 2; }
  .window-controls { gap: .25rem; padding: 0 .35rem; }
  .window-bar h1, .window-bar h2 { font-size: .7rem; }
  .desktop-footer span:nth-child(3) { display: none; }
  .boot-screen > img { width: 8rem; right: .55rem; bottom: .55rem; }
  .eq-panel-head { font-size: .52rem; }
  .eq-shape { font-size: .86rem; }
  .eq-channel small { font-size: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
