/* goddamm.it – Night Shift
   Calm "ops console" look: dark olive panels, thin lines, one lime accent. */
:root {
  --bg: #11130f;
  --desk: #151812;
  --panel: #191c16;
  --panel2: #1e221a;
  --line: #2f3428;
  --line2: #454c38;
  --text: #d8dcc8;
  --dim: #8c927b;
  --faint: #5d6352;
  --acc: #d4ef6a;
  --acc-soft: rgba(212, 239, 106, .14);
  --warn: #e8b14a;
  --bad: #ee6c4d;
  --info: #8fb8c9;
  --mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;
  --dawn: 0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--bg); color: var(--text); font: 13px/1.5 var(--mono);
  overflow: hidden; display: grid;
  grid-template-columns: 1fr 320px; grid-template-rows: 36px 1fr 38px;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
::selection { background: var(--acc); color: var(--bg); }
.dim { color: var(--dim); } .small { font-size: 11px; }
.ok { color: var(--acc); } .warn { color: var(--warn); } .bad { color: var(--bad); } .info { color: var(--info); }
.spacer { flex: 1; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line2); }
::-webkit-scrollbar-track { background: transparent; }

/* status dot that breathes */
.live { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); display: inline-block; flex: none; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .35; } }

/* ---------- top bar ---------- */
.topbar {
  grid-column: 1 / 3; display: flex; align-items: center; gap: 12px; padding: 0 16px;
  border-bottom: 1px solid var(--line); background: var(--panel); letter-spacing: .06em; font-size: 12px;
}
.topbar b { color: var(--acc); font-weight: 500; }
.topbar .act { color: var(--dim); text-transform: uppercase; }
.topbar .clock { color: var(--acc); font-variant-numeric: tabular-nums; }
.tb-btn { color: var(--dim); padding: 2px 8px; border: 1px solid var(--line); }
.tb-btn:hover { color: var(--acc); border-color: var(--line2); }

/* ---------- desktop ---------- */
.desktop {
  position: relative; overflow: hidden; background: var(--desk);
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px; background-position: -1px -1px;
}
.desktop::before { /* soft vignette so the grid fades out */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 40% 35%, rgba(21,24,18,.55), var(--desk) 75%);
}
.desktop::after { /* dawn glow, driven by --dawn (0..1) in act 5 */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: var(--dawn);
  background: radial-gradient(ellipse at 50% 120%, rgba(240,150,70,.38), rgba(200,90,60,.12) 45%, transparent 70%);
  transition: opacity 2s;
}
.wordmark {
  position: absolute; right: 28px; bottom: 22px; font-size: 34px; font-weight: 600; color: var(--line2);
  letter-spacing: -.02em; user-select: none; text-align: right; line-height: 1;
}
.wordmark span { color: var(--acc); opacity: .6; }
.wordmark small { display: block; font-size: 11px; font-weight: 400; letter-spacing: .12em; margin-top: 6px; color: var(--faint); text-transform: uppercase; }

.icons { position: absolute; top: 18px; left: 18px; display: grid; grid-auto-rows: 92px; gap: 6px; z-index: 2; }
.icon {
  width: 88px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px;
  cursor: pointer; user-select: none; position: relative; border: 1px solid transparent;
}
.icon .glyph {
  width: 42px; height: 42px; display: grid; place-items: center; font-size: 18px; color: var(--acc);
  border: 1px solid var(--line2); background: var(--panel2); transition: border-color .2s, background .2s;
}
.icon small { font-size: 11px; color: var(--text); letter-spacing: .04em; text-align: center; }
.icon:hover .glyph, .icon:focus-visible .glyph { border-color: var(--acc); background: #232818; }
.icon:focus-visible { outline: none; border-color: var(--line); }
.icon .badge {
  position: absolute; top: 0; left: 58px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10px; line-height: 18px;
  text-align: center; background: var(--acc); color: var(--bg); font-weight: 600;
}
.icon.new .glyph { animation: newIcon 1.6s ease-in-out 4; }
@keyframes newIcon { 50% { border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-soft); } }
.icon.appear { animation: appear .6s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } }

/* ---------- windows ---------- */
.win {
  position: absolute; display: flex; flex-direction: column; min-width: 280px; min-height: 160px;
  background: var(--panel); border: 1px solid var(--line2);
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
  animation: winIn .18s ease-out;
}
@keyframes winIn { from { opacity: 0; transform: translateY(8px) scale(.985); } }
.win.closing { animation: winOut .14s ease-in forwards; }
@keyframes winOut { to { opacity: 0; transform: scale(.985); } }
.win[hidden] { display: none; }
.win.focused { border-color: var(--line2); }
.wbar {
  display: flex; align-items: center; gap: 10px; height: 34px; flex: none; padding: 0 6px 0 12px;
  border-bottom: 1px solid var(--line); cursor: move; user-select: none; font-size: 11px; letter-spacing: .08em;
}
.wbar .wdot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.win.focused .wbar .wdot { background: var(--acc); }
.wbar b { font-weight: 500; text-transform: uppercase; color: var(--text); }
.wbar .wsub { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.wbar button { width: 26px; height: 24px; color: var(--dim); }
.wbar button:hover { color: var(--acc); background: var(--panel2); }
.wbody { flex: 1; overflow: auto; position: relative; }
.wresize { position: absolute; right: 0; bottom: 0; width: 14px; height: 14px; cursor: nwse-resize; z-index: 3; }
.wresize::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 6px; height: 6px; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); }

/* light that travels along the window edge */
.edge { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); pointer-events: none; overflow: visible; z-index: 4; }
.edge rect {
  x: .5px; y: .5px; width: calc(100% - 1px); height: calc(100% - 1px);
  fill: none; stroke: var(--acc); stroke-width: 1.5; stroke-dasharray: 7 93; stroke-linecap: square;
  opacity: 0; transition: opacity .4s;
}
.win.focused .edge rect { opacity: .9; animation: edgeRun 9s linear infinite; }
.win.ping .edge rect { stroke: var(--warn); opacity: 1; stroke-dasharray: 18 32; animation: edgeRun 1.6s linear infinite; }
@keyframes edgeRun { to { stroke-dashoffset: -100; } }

/* ---------- side panel ---------- */
.side { grid-row: 2 / 4; grid-column: 2; display: flex; flex-direction: column; border-left: 1px solid var(--line); background: var(--panel); overflow: auto; }
.panel { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel.grow { flex: 1; min-height: 160px; }
.panel h3 { font-size: 10px; font-weight: 500; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; margin-bottom: 10px; display: flex; align-items: center; }
.big { font-size: 34px; color: var(--acc); line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.big.warn { color: var(--warn); } .big.bad { color: var(--bad); animation: breathe 1s infinite; }
.meter { height: 3px; background: var(--line); margin: 8px 0 6px; overflow: hidden; }
.meter > div { height: 100%; background: var(--acc); transition: width .6s, background .6s; }
.timer[hidden] { display: none; }
.timer { margin-top: 12px; padding: 8px 10px; border: 1px solid var(--bad); display: flex; justify-content: space-between; align-items: baseline; }
.timer span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--bad); }
.timer b { font-size: 22px; font-weight: 500; color: var(--bad); font-variant-numeric: tabular-nums; }
.timer.done { border-color: var(--line2); } .timer.done span, .timer.done b { color: var(--dim); }

.servers { list-style: none; }
.servers li { display: grid; grid-template-columns: 12px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.servers li:last-child { border-bottom: 0; }
.servers .led { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); }
.servers .warn .led { background: var(--warn); animation: breathe 1.2s infinite; }
.servers .down .led { background: var(--bad); animation: breathe .6s infinite; }
.servers .ms { color: var(--dim); font-variant-numeric: tabular-nums; font-size: 12px; }
.servers .down .name { color: var(--bad); }
.servers .ghost { opacity: .7; } .servers .ghost .led { background: transparent; border: 1px dashed var(--info); }

.hint-btn { margin-left: auto; font-size: 10px; letter-spacing: .1em; color: var(--acc); border: 1px solid var(--line2); padding: 1px 6px; text-transform: none; }
.hint-btn:hover { border-color: var(--acc); }
.tasks { list-style: none; }
.tasks li { display: grid; grid-template-columns: 16px 1fr; gap: 6px; padding: 2px 0; }
.tasks li::before { content: "○"; color: var(--dim); }
.tasks li.done { color: var(--dim); text-decoration: line-through; text-decoration-color: var(--faint); }
.tasks li.done::before { content: "●"; color: var(--acc); text-decoration: none; }
.tasks li.opt::after { content: " (optional)"; color: var(--faint); grid-column: 2; font-size: 11px; }

.events { list-style: none; font-size: 12px; }
.events li { display: grid; grid-template-columns: 62px 1fr; gap: 8px; padding: 2px 0; }
.events time { color: var(--faint); font-variant-numeric: tabular-nums; }
.events li.warn span { color: var(--warn); } .events li.bad span { color: var(--bad); } .events li.ok span { color: var(--acc); }
.events li.aria span { color: var(--info); } .events li.aria span::before { content: "ARIA › "; color: var(--faint); }
.events li.fresh { animation: fresh 1.2s ease-out; }
@keyframes fresh { from { background: var(--acc-soft); } }

/* ---------- taskbar ---------- */
.taskbar { grid-column: 1; display: flex; align-items: center; gap: 6px; padding: 0 10px; border-top: 1px solid var(--line); background: var(--panel); z-index: 500; }
.start { color: var(--bg); background: var(--acc); padding: 3px 10px; font-weight: 600; letter-spacing: .1em; font-size: 11px; }
.tasklist { display: flex; gap: 4px; overflow-x: auto; flex: 1; }
.tasklist button { padding: 4px 10px; color: var(--dim); border: 1px solid transparent; white-space: nowrap; font-size: 12px; }
.tasklist button.on { color: var(--text); border-color: var(--line2); }
.tasklist button.focused { color: var(--acc); border-color: var(--acc); }
/* studio link: "fatman" in the accent green, ".works" in white */
.brand { font-weight: 700; font-size: 13px; letter-spacing: .02em; color: #fff; text-decoration: none; white-space: nowrap; padding: 3px 6px; border: 1px solid transparent; }
.brand b { color: var(--acc); font-weight: 700; text-shadow: 0 0 10px rgba(212, 239, 106, .35); }
.brand:hover { border-color: var(--line2); }
.brand:hover b { text-shadow: 0 0 14px rgba(212, 239, 106, .7); }
.menu { position: absolute; left: 10px; bottom: 44px; z-index: 600; background: var(--panel); border: 1px solid var(--line2); min-width: 220px; padding: 6px 0; }
.menu button { display: block; width: 100%; text-align: left; padding: 6px 14px; }
.menu button:hover { background: var(--panel2); color: var(--acc); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

/* ---------- toasts ---------- */
.toasts { position: fixed; top: 46px; right: 336px; display: grid; gap: 8px; z-index: 900; pointer-events: none; }
.toast { background: var(--panel2); border: 1px solid var(--line2); border-left: 2px solid var(--acc); padding: 8px 12px; min-width: 240px; max-width: 340px; animation: toastIn .25s ease-out; }
.toast b { color: var(--acc); font-weight: 500; display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.toast.out { animation: winOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(16px); } }

/* ---------- overlays ---------- */
.overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(10,11,9,.92); }
.overlay[hidden] { display: none; }
.card { background: var(--panel); border: 1px solid var(--line2); width: min(640px, 100%); max-height: 100%; overflow: auto; }
.tc-head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--acc); font-size: 11px; letter-spacing: .1em; }
.boot { padding: 12px 16px; color: var(--dim); font: 11px/1.6 var(--mono); border-bottom: 1px solid var(--line); min-height: 130px; white-space: pre-wrap; }
.tc-body { padding: 22px 16px 18px; }
.tc-body h1 { font-size: 40px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.tc-body h1 span { color: var(--acc); }
.tc-body p { margin: 12px 0; }
.tc-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.btn { border: 1px solid var(--line2); padding: 7px 16px; letter-spacing: .06em; }
.btn:hover { border-color: var(--acc); color: var(--acc); }
.btn.primary { background: var(--acc); color: var(--bg); border-color: var(--acc); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); color: var(--bg); }
.end-card h2 { font-size: 26px; font-weight: 500; color: var(--acc); margin: 6px 0 12px; }
.end-card .lead { color: var(--text); }
.end-card ul { list-style: none; margin: 14px 0; border-top: 1px solid var(--line); }
.end-card li { padding: 5px 0; border-bottom: 1px dashed var(--line); display: grid; grid-template-columns: 16px 1fr; gap: 6px; }
.end-card li::before { content: "›"; color: var(--acc); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); margin: 14px 0; }
.stats div { padding: 10px 12px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats small { display: block; font-size: 10px; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; }
.stats b { font-size: 20px; font-weight: 500; color: var(--acc); }
.fired h2 { color: var(--bad); }

/* fake crash for `rm -rf /` */
.crash { position: fixed; inset: 0; z-index: 2000; background: #0b0c0a; color: var(--dim); padding: 40px; font-size: 13px; white-space: pre-wrap; }
.crash.meltdown { background: #000; color: #b9bdb0; overflow: hidden; padding: 24px 28px; line-height: 1.45; cursor: none; }
.crash.flicker { animation: meltFlicker .11s steps(2) infinite; }
@keyframes meltFlicker {
  0% { opacity: 1; transform: translateX(0); filter: none; }
  30% { opacity: .55; transform: translateX(-4px) skewX(-2deg); filter: brightness(1.8); }
  60% { opacity: .9; transform: translateX(3px); clip-path: inset(12% 0 30% 0); }
  100% { opacity: .3; transform: translateY(2px); }
}
/* old CRT switching off: squash to a bright line, then to a dot, then nothing */
.crash.off { animation: crtOff .9s cubic-bezier(.6, 0, .9, .4) forwards; transform-origin: 50% 50%; }
@keyframes crtOff {
  0% { transform: scale(1, 1); filter: brightness(1); }
  45% { transform: scale(1, .004); filter: brightness(6); background: #fff; color: transparent; }
  75% { transform: scale(.004, .004); filter: brightness(8); background: #fff; color: transparent; }
  100% { transform: scale(0, 0); opacity: 0; }
}
.crash.dead { background: #000; cursor: default; }
.blackout { position: fixed; inset: 0; z-index: 1999; background: #000; }

/* ---------- terminal ---------- */
.term { height: 100%; display: flex; flex-direction: column; background: #12140f; cursor: text; }
.term .out { flex: 1; overflow: auto; padding: 10px 12px 0; white-space: pre-wrap; word-break: break-word; }
.term .line { display: flex; padding: 4px 12px 10px; gap: 8px; }
.term .ps { color: var(--acc); white-space: nowrap; }
.term .ps .h { color: var(--info); }
.term input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); caret-color: var(--acc); min-width: 40px; }
.term .cmd { color: var(--text); }
.term .err { color: var(--bad); } .term .wrn { color: var(--warn); } .term .okk { color: var(--acc); } .term .dm { color: var(--dim); }
.term .dir { color: var(--info); } .term .hl { background: var(--acc-soft); color: var(--acc); }
.term .aria { color: var(--info); }
.term .k { color: #c9a0e8; }

/* ---------- mail ---------- */
.mail { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; height: 100%; }
.mail .list { border-right: 1px solid var(--line); overflow: auto; }
.mail .item { padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; display: grid; gap: 2px; }
.mail .item:hover { background: var(--panel2); }
.mail .item.sel { background: var(--panel2); box-shadow: inset 2px 0 var(--acc); }
.mail .item .from { font-size: 11px; color: var(--dim); display: flex; justify-content: space-between; gap: 6px; }
.mail .item .subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail .item.unread .subj { color: var(--acc); font-weight: 500; }
.mail .item.unread .subj::before { content: "● "; font-size: 9px; vertical-align: 2px; }
.mail .read { padding: 14px 16px; overflow: auto; white-space: pre-wrap; }
.mail .read .hdr { color: var(--dim); font-size: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; white-space: normal; }
.mail .read .hdr b { color: var(--text); font-weight: 500; }
.empty { padding: 24px; color: var(--faint); text-align: center; }

/* ---------- files / trash / viewer ---------- */
.files .path { padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 12px; display: flex; gap: 8px; align-items: center; }
.files .path button { color: var(--acc); padding: 0 6px; border: 1px solid var(--line2); }
.files table { width: 100%; border-collapse: collapse; }
.files td { padding: 6px 12px; border-bottom: 1px solid var(--line); }
.files tr { cursor: pointer; }
.files tr:hover td { background: var(--panel2); }
.files td.n { color: var(--text); } .files td.n.d { color: var(--info); }
.files td.s { color: var(--dim); text-align: right; width: 1%; white-space: nowrap; }
.files td.a { width: 1%; white-space: nowrap; }
.files td.a button { color: var(--acc); border: 1px solid var(--line2); padding: 1px 8px; font-size: 11px; }
.files td.a button:hover { border-color: var(--acc); }
.viewer { padding: 14px 16px; white-space: pre-wrap; }
.notes textarea { width: 100%; height: 100%; background: none; border: 0; outline: 0; resize: none; padding: 14px 16px; line-height: 1.6; color: var(--text); }

/* ---------- netmap (styled after an infra dashboard) ---------- */
.netmap { display: flex; flex-direction: column; min-height: 100%; }
.nm-label { font-size: 10px; letter-spacing: .14em; color: var(--faint); text-transform: uppercase; padding: 10px 14px 0; }
.nm-canvas { position: relative; flex: 1; min-height: 300px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 32px 32px; background-color: #161913; }
.nm-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nm-canvas .link { stroke: var(--line2); stroke-width: 1; fill: none; }
.nm-canvas .link.hot { stroke: var(--warn); }
.nm-canvas .link.ghost { stroke: var(--info); stroke-dasharray: 4 4; }
.nm-canvas .pulse { fill: var(--acc); }
.nm-canvas .pulse.warn { fill: var(--warn); } .nm-canvas .pulse.ghost { fill: var(--info); }
.node { position: absolute; transform: translate(-50%, -21px); display: flex; flex-direction: column; align-items: center; text-align: center; width: 140px; }
.node .box { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--acc); color: var(--acc); background: #20261a; font-size: 18px; }
.node b { margin-top: 8px; font-size: 11px; letter-spacing: .12em; font-weight: 600; text-transform: uppercase; }
.node small { font-size: 10px; color: var(--dim); }
.node.warn .box { border-color: var(--warn); color: var(--warn); background: #2a2516; }
.node.down .box { border-color: var(--bad); color: var(--bad); background: #2c1c16; animation: breathe .8s infinite; }
.node.ghost .box { border-style: dashed; border-color: var(--info); color: var(--info); background: #18212a; }
.node.you .box { border-color: var(--text); color: var(--text); }
.nm-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.nm-stats div { padding: 10px 14px; border-right: 1px solid var(--line); }
.nm-stats div:last-child { border-right: 0; }
.nm-stats small { display: block; font-size: 10px; letter-spacing: .14em; color: var(--dim); text-transform: uppercase; }
.nm-stats b { font-size: 24px; font-weight: 400; color: var(--acc); font-variant-numeric: tabular-nums; }
.nm-stream { border-top: 1px solid var(--line); padding: 10px 14px; font-size: 12px; }
.nm-stream div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; }
.nm-stream time { color: var(--faint); }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat .log { flex: 1; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.chat .msg { max-width: 85%; padding: 7px 10px; border: 1px solid var(--line); background: var(--panel2); white-space: pre-wrap; }
.chat .msg.k { border-left: 2px solid #c9a0e8; }
.chat .msg.me { align-self: flex-end; border-color: var(--line2); border-right: 2px solid var(--acc); }
.chat .msg.sys { align-self: center; color: var(--faint); background: none; border: 0; font-size: 11px; }
.chat .msg .who { display: block; font-size: 10px; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }
.chat .typing { color: var(--faint); font-size: 11px; padding: 0 14px 6px; }
.chat .opts { border-top: 1px solid var(--line); padding: 10px; display: grid; gap: 6px; }
.chat .opts button { text-align: left; border: 1px solid var(--line2); padding: 6px 10px; }
.chat .opts button:hover { border-color: var(--acc); color: var(--acc); }

/* ---------- music ---------- */
.synth { padding: 16px; display: grid; gap: 12px; }
.synth .viz { height: 70px; display: flex; align-items: flex-end; gap: 3px; border-bottom: 1px solid var(--line); }
.synth .viz i { flex: 1; background: var(--acc); opacity: .7; height: 4%; transition: height .15s; }
.synth .row { display: flex; gap: 8px; align-items: center; }
.synth input[type=range] { width: 90px; accent-color: var(--acc); }
.tracks { display: grid; border-top: 1px solid var(--line); }
.track { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; text-align: left; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.track b { font-weight: 400; } .track small { color: var(--faint); font-size: 11px; }
.track:hover b { color: var(--acc); }
.track.sel b { color: var(--acc); }
.track.playing b::after { content: "  ▸"; animation: breathe 1s infinite; }

/* ---------- popup (act 4 glitches) ---------- */
.popup .viewer { color: var(--bad); }
.popup .viewer button { margin-top: 12px; }
body.shake .desktop { animation: shake .35s steps(4); }
@keyframes shake { 25% { transform: translate(-5px, 2px); } 50% { transform: translate(4px, -3px); } 75% { transform: translate(-2px, 3px); } }
body.glitch .wordmark { animation: flick .15s steps(2) infinite; }
@keyframes flick { 50% { opacity: .3; transform: translateX(3px); } }

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  body { grid-template-columns: minmax(0, 1fr); grid-template-rows: 36px minmax(0, 1fr) auto 38px; }
  .topbar { padding: 0 12px; gap: 8px; min-width: 0; }
  .topbar .act { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .brand { font-size: 12px; }
  .side { grid-row: 3; grid-column: 1; max-height: 34vh; border-left: 0; border-top: 1px solid var(--line); }
  .taskbar { grid-row: 4; }
  .topbar b { display: none; }
  .icons { grid-auto-flow: column; grid-auto-rows: auto; top: auto; bottom: 8px; left: 8px; right: 8px; overflow-x: auto; }
  .win { left: 6px !important; top: 6px !important; width: calc(100% - 12px) !important; height: calc(100% - 120px) !important; }
  .wordmark { top: 18px; bottom: auto; font-size: 24px; }
  .toasts { right: 16px; }
  .mail { grid-template-columns: 1fr; grid-template-rows: 40% 1fr; }
  .mail .list { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
