/* Pile of Shit: shitty, glitchy, pixel everything. Retro arcade x XP desktop. */
:root {
  --ink: #131313;
  --night: #17122a;
  --night2: #221a3d;
  --xp-blue: #0054e3;
  --xp-frame: #0831d9;
  --xp-face: #ece9d8;
  --xp-green: #3c9c3c;
  --stink: #96c45c;
  --orange: #f7a46a;
  --yellow: #ffe14a;
  --pink: #ff3fa4;
  --cyan: #2ff3ff;
  --k: 6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: #fff;
  font: 22px/1.15 'VT323', monospace;
  background-color: var(--night);
  background-image:
    linear-gradient(45deg, var(--night2) 25%, transparent 25%, transparent 75%, var(--night2) 75%),
    linear-gradient(45deg, var(--night2) 25%, transparent 25%, transparent 75%, var(--night2) 75%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
  padding-bottom: 40px;
  overflow-x: hidden;
  image-rendering: pixelated;
}
img, canvas, video { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: inherit; }
main { position: relative; }
button { font: inherit; }

/* ---------- CRT overlay ---------- */
.crt {
  position: fixed; inset: 0; pointer-events: none; z-index: 90;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
}
.crt::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 60%, rgba(0,0,0,.35) 100%);
}

/* ---------- pixel stepped corners ---------- */
.px-corners, .xp-btn, .an-pick {
  clip-path: polygon(0 4px, 2px 4px, 2px 2px, 4px 2px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px,
    calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px),
    calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px),
    2px calc(100% - 4px), 0 calc(100% - 4px));
}

/* ---------- XP windows ---------- */
.win {
  position: relative; z-index: 3;
  background: var(--xp-frame);
  padding: 0 4px 4px;
  color: #000;
  box-shadow: 8px 8px 0 rgba(0,0,0,.45);
}
.win .title {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 2px 0 6px;
  font: 700 14px/1 'Silkscreen', monospace; color: #fff; letter-spacing: .5px;
  text-shadow: 2px 2px 0 #0a1a8a;
  background: linear-gradient(#3a8cff 0 4px, #0a5cf0 4px 10px, #0050e6 10px 26px, #0046cc 26px 30px, #003bb0 30px);
  white-space: nowrap; overflow: hidden;
  cursor: default; user-select: none;
}
.win .title .tb { margin-left: auto; display: flex; gap: 3px; }
.win .title .tb b {
  width: 24px; height: 24px; display: grid; place-items: center;
  font: 700 16px/1 'Silkscreen', monospace;
  background: linear-gradient(#5a9bff 0 3px, #2a6ef0 3px 19px, #1a55d0 19px);
  border: 2px solid #fff; text-shadow: none;
}
.win .title .tb b.x { background: linear-gradient(#f39a7a 0 3px, #e2552c 3px 19px, #b8381a 19px); }
.win .body { background: var(--xp-face); padding: 16px; }
.win .body.dark { background: var(--ink); color: #fff; }
.win .body.paper { background: #fff; font-size: 24px; line-height: 1.2; max-height: 380px; overflow: auto; }
.win .body.paper p { margin: 0 0 12px; }
.win .body.white { background: #fff; }
.win .body.black { background: #000; padding: 0; }
.win .menu {
  background: var(--xp-face); display: flex; gap: 14px; padding: 4px 8px;
  font: 12px/1.2 'Silkscreen', monospace; border-bottom: 2px solid #c9c5b2;
}
.ico { width: 16px; height: 16px; flex: none; background: #fff; display: inline-block;
  box-shadow: inset -4px -4px 0 #96c45c, inset 4px 4px 0 #7a4a20; }
.ico.doc { box-shadow: inset 0 -4px 0 #9ab, inset 0 4px 0 #fff, inset 0 0 0 2px #456; }
.ico.play { background: #222; box-shadow: inset 6px 4px 0 #222, inset -4px -4px 0 #222, inset 0 0 0 8px #2fd06a; }
.ico.folder { background: #f3c64a; box-shadow: inset 0 4px 0 #e0a22a, inset 0 -2px 0 #b07a10; }
.ico.glass { background: #9fe0ff; box-shadow: inset 0 0 0 3px #234; }
.ico.trophy { background: var(--yellow); box-shadow: inset 0 -5px 0 #b08000, inset 4px 0 0 #fff3a0; }
.ico.warnico { background: var(--yellow); box-shadow: inset 0 0 0 3px #000; }

.xp-btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  font: 700 13px/1 'Silkscreen', monospace; color: #000;
  padding: 10px 16px;
  background: linear-gradient(#ffffff, #ece9d8 70%, #d6d0bd);
  border: 2px solid #003c74;
}
.xp-btn:hover { box-shadow: inset 0 0 0 2px #f8b636, inset 0 0 0 4px #ffe08a; }
.xp-btn:active { background: #d6d0bd; transform: translate(2px, 2px); }
.xp-btn.hot { background: linear-gradient(#ffd2ef, #ff7cc4 70%, #e04aa0); }
.xp-btn:focus-visible, .an-pick:focus-visible, .an-item:focus-visible, .start:focus-visible { outline: 3px dashed var(--yellow); outline-offset: 2px; }

/* ---------- HERO ---------- */
#hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: 60px 16px 80px; }
.wall { position: absolute; inset: 0; overflow: hidden; background: #8fc3f0; }
.wall-in { position: absolute; left: 50%; top: 50%; width: 480px; height: 200px; transform-origin: 0 0; }
.wall-in img { display: block; }
.hero-piles { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hero-piles img { position: absolute; transform-origin: 0 0; }
.hero-piles img.jolt { filter: drop-shadow(3px 0 0 var(--pink)) drop-shadow(-3px 0 0 var(--cyan)); }
.hero-col { position: relative; z-index: 2; width: min(560px, 100%); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.hero-win { width: min(560px, 100%); }
/* X / Twitter button under PILE_OF_SHIT.EXE: rectangular, pixel shadow, glitch on hover */
.x-btn {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font: 700 13px/1 'Silkscreen', monospace; color: #fff; letter-spacing: .5px;
  padding: 12px 22px; background: #000; border: 2px solid #fff;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .08s steps(2), box-shadow .08s steps(2), background .08s steps(2);
}
.x-btn:hover {
  background: #111; color: var(--yellow); border-color: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink), -3px 0 0 var(--pink), 3px 0 0 var(--cyan);
}
.x-btn:hover svg { filter: drop-shadow(2px 0 0 var(--pink)) drop-shadow(-2px 0 0 var(--cyan)); }
.x-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.x-btn:focus-visible { outline: 3px dashed var(--yellow); outline-offset: 3px; }
.hero-win .body { text-align: center; padding: 28px 16px 22px; }
.logo { margin: 0 auto 18px; width: calc(40px * var(--k)); height: calc(10px * var(--k)); position: relative; }
.logo-sprite, .logo .ghost {
  position: absolute; inset: 0; display: block;
  background: url(assets/logo_sheet.png) 0 0 / calc(160px * var(--k)) calc(10px * var(--k)) no-repeat;
  image-rendering: pixelated;
  animation: stink .5s steps(4) infinite;
}
@keyframes stink { to { background-position: calc(-160px * var(--k)) 0; } }
.tag { font: 12px/1.7 'Press Start 2P', monospace; color: #ddd; margin: 0 0 22px; }
.btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.coin { font: 14px 'Press Start 2P', monospace; color: var(--yellow); margin: 24px 0 0; }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* glitch: RGB split slices for a moment */
.logo.glitch.on .logo-sprite { filter: drop-shadow(4px 0 0 var(--pink)) drop-shadow(-4px 0 0 var(--cyan)); }
.logo .ghost { opacity: 0; }
.logo.glitch.on .ghost { opacity: 1; }
.logo .ghost.g1 { clip-path: inset(20% 0 55% 0); transform: translateX(calc(2px * var(--k))); filter: hue-rotate(160deg); }
.logo .ghost.g2 { clip-path: inset(65% 0 10% 0); transform: translateX(calc(-3px * var(--k))); filter: invert(1); }

h2.sec {
  position: relative; display: inline-block;
  font: 28px/1.2 'Press Start 2P', monospace; color: #fff; margin: 0 0 28px;
  text-shadow: 4px 4px 0 #000;
}
h2.sec.glitch::before, h2.sec.glitch::after {
  content: attr(data-text); position: absolute; left: 0; top: 0; width: 100%; overflow: hidden; opacity: 0;
}
h2.sec.glitch::before { color: var(--pink); }
h2.sec.glitch::after { color: var(--cyan); }
h2.sec.glitch.on::before { opacity: 1; transform: translate(-4px, 0); clip-path: inset(0 0 60% 0); }
h2.sec.glitch.on::after { opacity: 1; transform: translate(4px, 0); clip-path: inset(50% 0 0 0); }

/* ---------- ticker ---------- */
.ticker { position: relative; z-index: 4; background: #000; border-block: 4px solid var(--yellow); overflow: hidden; white-space: nowrap; }
.ticker-in { display: inline-block; padding: 10px 0; font: 14px 'Press Start 2P', monospace; color: var(--yellow); animation: tick 45s linear infinite; }
.ticker-in span { margin-right: 36px; }
.ticker-in .dn { color: #ff5a5a; } .ticker-in .up { color: #5aff8a; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- desktop sections ---------- */
section.desk, #anatomy, #scores { position: relative; max-width: 1180px; margin: 0 auto; padding: 90px 16px 40px; }
#about { display: flex; gap: 36px; align-items: flex-start; flex-wrap: wrap; }
.notepad { flex: 1 1 420px; transform: translateY(-14px); }
.player { flex: 1 1 380px; margin-top: 40px; }
.player video { display: block; width: 100%; aspect-ratio: 1; background: #000; }
.controls { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: linear-gradient(#3b3b3b, #111); color: #8f8; font: 12px 'Silkscreen', monospace; }
.controls .seek { flex: 1; height: 8px; background: #000; border: 2px solid #555; }
.controls .seek i { display: block; height: 100%; width: 30%; background: #2fd06a; animation: seek 11s steps(22) infinite; }
@keyframes seek { from { width: 0; } to { width: 100%; } }
.caret { animation: blink 1s steps(1) infinite; }

/* explorer */
.addr { display: flex; gap: 8px; align-items: center; padding: 4px 8px; background: var(--xp-face); font: 12px 'Silkscreen', monospace; }
.addr div { flex: 1; background: #fff; border: 2px solid #7f9db9; padding: 2px 6px; }
.explorer .body.white { padding: 12px; }
.icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 14px 8px; }
.icons button { background: none; border: 0; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; color: #000; }
.icons img { width: 96px; height: 96px; display: block; }
.icons span { font: 12px/1.2 'Silkscreen', monospace; padding: 1px 4px; }
.icons button:hover img { outline: 2px dotted #316ac5; }
.icons button.sel span { background: #316ac5; color: #fff; }
.icons button.sel img { filter: sepia(1) hue-rotate(180deg) saturate(2) brightness(.85); }
/* squatters */
.sq-intro { font: 13px/1.5 'Silkscreen', monospace; color: #333; margin: 0 0 14px; max-width: 760px; }
.squat { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.sq { position: relative; border: 2px solid #c9c5b2; background: #f4f2e8; padding: 10px; color: #000; display: flex; flex-direction: column; gap: 8px; }
.sq.new { border-color: #316ac5; }
.sq .new-tag { position: absolute; top: -9px; right: 8px; background: var(--pink, #ff3fa4); color: #fff; font: 10px 'Press Start 2P', monospace; padding: 3px 5px; }
.sq .spr { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 6px; min-height: 104px; background: #6c8696; padding: 6px; overflow: hidden; }
.sq .spr img { image-rendering: pixelated; display: block; max-width: 100%; }
.sq b { font: 12px 'Press Start 2P', monospace; }
.sq .row { display: flex; justify-content: space-between; font: 12px 'Silkscreen', monospace; color: #444; }
.sq .bar { height: 10px; background: #ddd; }
.sq .bar i { display: block; height: 100%; background: repeating-linear-gradient(90deg, #316ac5 0 8px, transparent 8px 10px); }
.status { display: flex; justify-content: space-between; gap: 8px; padding: 4px 8px; background: var(--xp-face); font: 12px 'Silkscreen', monospace; border-top: 2px solid #c9c5b2; }

/* ---------- arcade cabinet ---------- */
.cab {
  position: relative; z-index: 3;
  background: #050505; color: #fff;
  border: 6px solid #333; box-shadow: 0 0 0 6px #000, 10px 10px 0 6px rgba(0,0,0,.5);
  padding: 28px 22px 32px;
}
.cab::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 2px, transparent 2px 4px); }
.cab-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.cab h2.sec { margin-bottom: 14px; }
.hud { display: flex; gap: 18px; flex-wrap: wrap; font: 12px 'Press Start 2P', monospace; }
.hud .an-score { color: var(--yellow); } .hud .an-found { color: var(--stink); } .hud .hi { color: var(--pink); }
.an-sub { font: 11px/1.6 'Press Start 2P', monospace; color: #9a9a9a; margin: 0 0 20px; }
.an-select { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.an-pick { position: relative; padding: 4px; background: #222; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.an-pick img { width: 96px; height: 96px; display: block; }
.an-pick span { font: 10px 'Press Start 2P', monospace; color: #aaa; padding: 2px 0 3px; }
.an-pick:hover { background: #444; }
.an-pick.on { background: var(--yellow); animation: sel .5s steps(1) infinite; }
.an-pick.on span { color: #000; }
.an-pick.on::after { content: "P1"; position: absolute; top: 6px; left: 6px; font: 10px 'Press Start 2P', monospace; color: #000; background: var(--yellow); padding: 3px; }
@keyframes sel { 50% { background: var(--pink); } }
.an-stage { display: flex; justify-content: center; background: #000; }
.an-stage canvas { display: block; touch-action: manipulation; }
.an-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.an-item { font: 12px 'Silkscreen', monospace; background: #151515; color: #bbb; border: 2px solid #444; padding: 6px 10px; cursor: pointer; }
.an-item.found { color: var(--stink); border-color: #3d5a26; }
.an-item.on { background: #fff; color: #000; border-color: #fff; }
.cleared-msg { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); pointer-events: none;
  font: 28px 'Press Start 2P', monospace; color: var(--yellow); text-shadow: 4px 4px 0 var(--pink); background: #000;
  padding: 18px 22px; border: 4px solid var(--yellow); opacity: 0; white-space: nowrap; }
#anatomy.cleared .cleared-msg { opacity: 1; animation: blink .25s steps(1) infinite; }

/* high scores */
.scores { text-align: center; }
.hs { width: 100%; max-width: 860px; margin: 0 auto 30px; border-collapse: collapse; font: 13px/1.5 'Press Start 2P', monospace; }
.hs th { color: var(--pink); padding: 8px 6px; border-bottom: 4px dotted #333; }
.hs td { padding: 9px 6px; text-align: left; }
.hs td:first-child, .hs th:first-child, .hs td:last-child, .hs th:last-child { text-align: right; }
.hs tr:nth-child(5n+1) td { color: var(--yellow); } .hs tr:nth-child(5n+2) td { color: var(--cyan); }
.hs tr:nth-child(5n+3) td { color: var(--stink); } .hs tr:nth-child(5n+4) td { color: var(--orange); }
.hs tr:nth-child(5n+5) td { color: #fff; }
.tiers-h { font: 16px 'Press Start 2P', monospace; color: #fff; margin: 0 0 16px; }
.tiers { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; text-align: left; }
.tier { display: grid; grid-template-columns: 150px 1fr 60px; gap: 12px; align-items: center; font: 11px 'Press Start 2P', monospace; }
.tier .bar { height: 16px; background: repeating-linear-gradient(90deg, var(--c) 0 12px, transparent 12px 16px); }
.tier .n { text-align: right; color: #aaa; }

/* FAQ error dialogs */
.errs { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 28px 24px; align-items: start; }
.errs .err:nth-child(2) { transform: translateY(26px); } .errs .err:nth-child(4) { transform: translateY(-14px); }
.err .body { display: grid; grid-template-columns: 40px 1fr; gap: 14px; align-items: start; font-size: 22px; }
.err .body p { margin: 0; }
.err .ok { grid-column: 1 / -1; display: flex; justify-content: center; gap: 10px; }
.eico { width: 36px; height: 36px; display: grid; place-items: center; font: 20px 'Press Start 2P', monospace; color: #fff; }
.eico.info { background: #2a5cd8; } .eico.stop { background: #d63a1a; } .eico.warn { background: var(--yellow); color: #000; }

footer { position: relative; z-index: 3; text-align: center; padding: 70px 16px 40px; font: 12px/2 'Press Start 2P', monospace; }
footer .dim { color: #777; font-size: 10px; }

/* ---------- popups ---------- */
.win.pop { position: fixed; z-index: 60; width: min(360px, calc(100vw - 32px)); }
.win.pop .title { cursor: move; }
.win.pop.crit { width: min(440px, calc(100vw - 32px)); }
.win.pop.crit .body { font-size: 18px; line-height: 1.3; }
.win.pop .tb b { cursor: pointer; }
.win.viewer { width: min(560px, calc(100vw - 32px)); }
.viewer .body { display: flex; gap: 16px; flex-wrap: wrap; }
.viewer img { width: 288px; height: 288px; max-width: 100%; }
.viewer ul { margin: 0; padding: 0; list-style: none; font-size: 19px; flex: 1 1 160px; max-height: 288px; overflow: auto; }
.viewer li b { font: 10px 'Silkscreen', monospace; color: #555; display: block; }

/* ---------- NFT bits everywhere ---------- */
#bits { position: absolute; left: 0; top: 0; width: 100%; z-index: 2; pointer-events: none; overflow: hidden; }
#bits .bit { position: absolute; transform-origin: 0 0; animation: bob 2.4s steps(4) infinite; }
#bits .bit.jolt { filter: invert(1) hue-rotate(90deg); }
@keyframes bob { 50% { translate: 0 -8px; } }

/* ---------- taskbar ---------- */
.taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 40px; z-index: 80;
  display: flex; align-items: stretch;
  background: linear-gradient(#3168d5 0 2px, #4993e6 2px 4px, #2157d7 4px 34px, #1941a5 34px);
  font: 12px 'Silkscreen', monospace;
}
.start {
  display: flex; align-items: center; gap: 8px; padding: 0 20px 0 12px; border: 0; cursor: pointer;
  font: italic 700 18px 'Silkscreen', monospace; color: #fff; text-shadow: 2px 2px 0 #1a4a10;
  background: linear-gradient(#5eb85e 0 3px, #3c9c3c 3px 32px, #2a7a2a 32px);
  clip-path: polygon(0 0, calc(100% - 10px) 0, calc(100% - 10px) 4px, calc(100% - 6px) 4px, calc(100% - 6px) 8px, calc(100% - 2px) 8px, 100% 12px, 100% calc(100% - 12px), calc(100% - 2px) calc(100% - 8px), calc(100% - 6px) calc(100% - 8px), calc(100% - 6px) calc(100% - 4px), calc(100% - 10px) calc(100% - 4px), calc(100% - 10px) 100%, 0 100%);
}
.start:hover { filter: brightness(1.12); }
.poop { width: 20px; height: 20px; background-size: 100% 100%; image-rendering: pixelated; }
.tasks { display: flex; gap: 4px; padding: 4px 8px; flex: 1; overflow: hidden; }
.tasks a { display: flex; align-items: center; padding: 0 12px; color: #fff; text-decoration: none; background: #3c81f3; border: 2px solid #1e52b7; white-space: nowrap; }
.tasks a:hover, .tasks a.cur { background: #1e52b7; border-color: #0e3a96; }
.mtn-tab { display: flex; align-items: center; margin: 4px 8px 4px 0; padding: 0 12px; color: #fff; text-decoration: none; white-space: nowrap;
  background: #6b4a1e; border: 2px solid #3d2a10; text-shadow: 1px 1px 0 #000; }
.mtn-tab:hover, .mtn-tab.cur { background: #3d2a10; border-color: #1f1508; }
/* WL tab in the taskbar: blinking yellow/pink, left of the mountain tab */
.wl-tab { display: flex; align-items: center; margin: 4px 6px 4px 0; padding: 0 12px; color: #000; text-decoration: none; white-space: nowrap;
  background: var(--yellow); border: 2px solid #8a6a00; font-weight: 700; animation: wltab 1s steps(1) infinite; }
@keyframes wltab { 50% { background: var(--pink); color: #fff; border-color: #7a0040; } }
.wl-tab .long, .mtn-tab .long { white-space: pre; }   /* flex items drop edge spaces otherwise */
.wl-tab:hover, .wl-tab.cur { animation: none; background: var(--pink); color: #fff; border-color: #7a0040; }
/* 'Your Pile' tab (anatomy.html, wallet -> pile generator) */
.yp-tab { display: flex; align-items: center; margin: 4px 6px 4px 0; padding: 0 12px; color: #fff; text-decoration: none; white-space: nowrap;
  background: #2a7a2a; border: 2px solid #154a16; text-shadow: 1px 1px 0 #000; }
.yp-tab .long { white-space: pre; }
.yp-tab:hover, .yp-tab.cur { background: #154a16; border-color: #0a2a0a; }
.mountain-page { overflow: hidden; }
.mtn { position: fixed; left: 0; right: 0; top: 0; bottom: 40px; overflow: auto; background: #3e3a34; scrollbar-width: none; }
.mtn::-webkit-scrollbar { display: none; }
.gif .taskbar, .gif .crt { display: none; } .gif .mtn { bottom: 0; }
.mtn-cv { display: block; image-rendering: pixelated; touch-action: pan-x pan-y; }
a.start { text-decoration: none; }
.tray { display: flex; align-items: center; gap: 12px; padding: 0 14px; color: #fff; background: linear-gradient(#0f8cee 0 2px, #0f8cee 2px, #0c6dd8); border-left: 2px solid #0b4ab0; }
.fly { width: 12px; height: 10px; background: #000; box-shadow: -4px -4px 0 -1px #e2eaf2, 4px -4px 0 -1px #e2eaf2; animation: buzz .3s steps(2) infinite; }
@keyframes buzz { 50% { transform: translate(1px, -1px); } }
.startmenu { position: fixed; left: 0; bottom: 40px; z-index: 85; width: min(420px, 100vw); background: #fff; color: #000; border: 3px solid var(--xp-blue); font: 13px 'Silkscreen', monospace; box-shadow: 6px 6px 0 rgba(0,0,0,.5); }
.sm-head { display: flex; align-items: center; gap: 12px; padding: 10px; color: #fff; font: 700 18px 'Silkscreen', monospace; background: linear-gradient(#1868ce, #0e60cb 70%, #0a4fb0); }
.avatar { width: 40px; height: 40px; border: 3px solid #fff; background: #638596 url(assets/items/punk.png) center / 28px 38px no-repeat; image-rendering: pixelated; }
.sm-cols { display: grid; grid-template-columns: 1.2fr 1fr; }
.sm-left { padding: 8px 4px; display: grid; gap: 2px; }
.sm-left a { display: grid; grid-template-columns: 24px 1fr; column-gap: 8px; padding: 6px 8px; text-decoration: none; }
.sm-left a .ico { grid-row: span 2; width: 20px; height: 20px; }
.sm-left small { color: #777; font-size: 10px; }
.sm-right { background: #d3e5fa; border-left: 2px solid #95bdee; padding: 8px 4px; display: grid; align-content: start; gap: 2px; }
.sm-right a { padding: 8px 10px; text-decoration: none; color: #0a246a; font-weight: 700; }
.sm-left a:hover, .sm-right a:hover { background: #316ac5; color: #fff; }
.sm-left a:hover small { color: #dde; }
.sm-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 8px; background: linear-gradient(#1868ce, #0a4fb0); }
.sm-foot button { font: 12px 'Silkscreen', monospace; color: #fff; background: none; border: 2px solid transparent; cursor: pointer; padding: 6px 10px; }
.sm-foot button:hover { border-color: #fff; }
.sm-foot .off { background: #d63a1a; }
#shutdown { position: fixed; inset: 0; z-index: 200; background: #000; display: grid; place-items: center; align-content: center; gap: 24px; text-align: center; cursor: pointer; }
#shutdown[hidden] { display: none; }
#shutdown p { font: 22px/1.8 'Press Start 2P', monospace; color: var(--orange); margin: 0; }
#shutdown small { font: 10px 'Press Start 2P', monospace; color: #555; }

/* screen tear: a random band of the page jumps sideways for a frame */
body.tear main { animation: tear .18s steps(2) 1; }
@keyframes tear { 0% { transform: translateX(6px); filter: hue-rotate(90deg); } 100% { transform: translateX(-4px); } }

@media (max-width: 760px) {
  body { font-size: 20px; }
  h2.sec { font-size: 18px; }
  .tasks { display: none; }
  .tray .gas { display: none; }
  .notepad, .player { flex: 1 1 100%; min-width: 0; transform: none; margin-top: 0; }
  .an-select { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; }
  .an-pick { flex: none; }
  .cab { padding: 20px 12px 24px; }
  .errs .err { transform: none !important; }
  .errs { grid-template-columns: 1fr; }
  .hs { font-size: 9px; } .hs th:nth-child(3), .hs td:nth-child(3) { display: none; }
  .tier { grid-template-columns: 96px 1fr 40px; font-size: 9px; }
  .tag { font-size: 10px; }
  .cleared-msg { font-size: 16px; }
  .sm-cols { grid-template-columns: 1fr; }
  .icons { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  /* phones: less dead space between sections, compact taskbar that never overflows */
  section.desk, #anatomy, #scores { padding: 56px 12px 28px; }
  h2.sec { margin-bottom: 18px; }
  .hud { gap: 8px 14px; margin-bottom: 14px; font-size: 10px; }
  .an-sub { font-size: 9px; }
  .start { padding: 0 14px 0 10px; font-size: 16px; }
  .wl-tab, .mtn-tab, .yp-tab { padding: 0 9px; margin-right: 4px; }
  .wl-tab .long, .mtn-tab .long, .yp-tab .long { display: none; }
  .taskbar { justify-content: flex-start; }
  .tray { margin-left: auto; padding: 0 10px; }
  .win .title { font-size: 12px; }
  footer { padding: 46px 12px 30px; font-size: 10px; }
}
@media (max-width: 400px) {
  .tray .fly { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
}
