/* ============================================================
   BitDazed — "dazedOS, allegedly"
   deep indigo field · pixel grid under everything ·
   the hero is the power button · the site is the computer
   ============================================================ */

:root {
  --bg: #0D0B14;
  --panel: #151120;
  --panel-2: #1C1730;
  --ink: #EDEAF4;
  --muted: #8F89A3;
  --dim: #6E6880;
  --line: #262133;
  --accent: #9B7BFF;
  --accent-hi: #B79CFF;
  --accent-dim: rgba(155, 123, 255, .14);
  --coral: #FF8E7A;
  --green: #7BE0A3;
  --amber: #FFC46B;
  --blue: #8FC7FF;
  --win: #17131F;
  --win-bar: #1E1930;
  --win-line: #372E4D;
  --dot-p: #FF7AA2;
  --dot-a: #FFD37A;
  --dot-g: #7AE8B8;
  --tm-gold: #c99a3a;
  --tm-cream: #ede0c4;
  --font-body: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-pixel: "Silkscreen", ui-monospace, "Cascadia Code", Consolas, monospace;
  --font-doodle: "Caveat", "Segoe Script", cursive;
  --mx: 50vw;
  --my: 40vh;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.booted { overflow: hidden; }

/* the grid + the daze glow that follows the cursor */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(155, 123, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155, 123, 255, .055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 120% 90% at 50% 30%, black 40%, transparent 100%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(640px circle at var(--mx) var(--my), rgba(155, 123, 255, .09), transparent 65%);
  transition: background .12s linear;
}

::selection { background: var(--accent); color: #0D0B14; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

img { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; }

#trail {
  position: fixed;
  inset: 0;
  z-index: 390;
  pointer-events: none;
}

/* shared keyframes */
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes vsblink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes dz-pop { 0% { opacity: 0; transform: scale(.96); } 100% { opacity: 1; transform: scale(1); } }
@keyframes sheet-pop { 0% { opacity: 0; transform: translate(-50%, -48%) scale(.96); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

/* ============ GATE — the hero, now a power button ============ */
.gate {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 60px 20px 120px;
  transition: opacity .42s ease, transform .42s ease;
}
.gate.gate-out { opacity: 0; transform: scale(1.045); pointer-events: none; }
.pre-booted .gate { display: none; }
.hero-inner { text-align: center; max-width: 1000px; }
.hero-eyebrow {
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 34px;
}
.hero-logo {
  width: min(860px, calc(100vw - 72px));
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 0 34px rgba(155, 123, 255, .22));
}
.hero-logo .wl { will-change: transform; }
.hero-bit { will-change: transform; }
.hero-sub {
  margin-top: 38px;
  font-size: clamp(19px, 2.6vw, 26px);
  font-weight: 500;
  color: var(--ink);
}
.accent { color: var(--accent-hi); }
.hero-note {
  margin-top: 12px;
  font-family: var(--font-doodle);
  font-size: 23px;
  color: var(--muted);
  transform: rotate(-1deg);
}
.hero-note em { color: var(--accent-hi); font-style: normal; }
.boot-btn {
  margin-top: 54px;
  font-family: var(--font-pixel);
  font-size: 14px;
  letter-spacing: .1em;
  text-transform: lowercase;
  color: #0D0B14;
  background: var(--accent);
  padding: 17px 32px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 12px 44px rgba(155, 123, 255, .35);
  transition: background .2s;
  will-change: transform;
}
.boot-btn:hover { background: var(--accent-hi); }
.boot-btn:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 3px; }
.boot-power { display: inline-block; margin-right: 8px; animation: power-pulse 2.2s ease-in-out infinite; }
@keyframes power-pulse { 50% { opacity: .5; } }
.boot-hint {
  margin-top: 15px;
  font-family: var(--font-doodle);
  font-size: 20px;
  color: var(--muted);
  transform: rotate(-1deg);
}
.noscript-note { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* mascot face mechanics (shared by every instance of the guy) */
.eye {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .16s ease-out, opacity .3s;
}
.mouth {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .2s ease-out;
}
.dizzy .eye { animation: spin-eyes .45s linear infinite; }
@keyframes spin-eyes { to { transform: rotate(360deg); } }
.annoyed .mouth { transform: scaleY(.25); }
.asleep .eye { opacity: .12; }

/* ============ MARQUEE (gate footer + taskbar ticker) ============ */
.marquee {
  position: relative;
  z-index: 1;
  transform: rotate(-1.2deg) scale(1.02);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  padding: 13px 0;
}
.gate-marquee { position: absolute; left: -2%; right: -2%; bottom: 30px; }
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: 34px;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  will-change: transform;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee-track span {
  font-family: var(--font-pixel);
  font-size: 12.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.marquee-track i { color: var(--accent); font-style: normal; }

/* ============ BOOT — the ritual ============ */
.boot {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  cursor: pointer;
}
.boot[hidden] { display: none; }
.boot-mascot svg { width: 76px; height: auto; display: block; animation: floaty 2s ease-in-out infinite; }
.boot-wordmark { height: 32px; }
.boot-bar {
  width: 220px;
  height: 8px;
  background: var(--win-bar);
  border: 1px solid var(--win-line);
  border-radius: 99px;
  overflow: hidden;
}
#boot-fill {
  display: block;
  height: 100%;
  width: 4%;
  background: var(--accent);
  border-radius: 99px;
  animation: dz-boot 2.2s ease-out forwards;
}
@keyframes dz-boot { 0% { width: 4%; } 60% { width: 71%; } 80% { width: 74%; } 100% { width: 100%; } }
.boot-log { font-family: var(--font-pixel); font-size: 9px; letter-spacing: .06em; color: var(--muted); min-height: 14px; }
.boot-skip { font-family: var(--font-doodle); font-size: 17px; color: var(--dim); }

/* ============ dazedOS shell ============ */
.os { position: fixed; inset: 0; z-index: 1; }
.os[hidden] { display: none; }
.os::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(1200px 500px at 70% -10%, rgba(122, 85, 240, .16), transparent 60%);
}

/* menu bar */
.menubar {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 16px;
  background: rgba(23, 19, 31, .92);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--muted);
  z-index: 400;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.mascot-menu svg { width: 16px; height: 16px; display: block; }
.os-name { color: var(--ink); letter-spacing: .08em; }
.menu-links { display: flex; gap: 16px; }
.menu-links button {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--muted);
  cursor: pointer;
  transition: color .15s;
}
.menu-links button:hover { color: var(--ink); }
.menu-links .menu-hire { color: var(--accent); }
.menu-links .menu-hire:hover { color: var(--accent-hi); }
.menu-clock { margin-left: auto; color: var(--accent); white-space: nowrap; cursor: pointer; transition: color .15s; }
.menu-clock:hover { color: var(--accent-hi); }

/* desk */
.desk { position: absolute; top: 31px; bottom: 41px; left: 0; right: 0; }

/* desktop icons */
.icons {
  position: absolute;
  left: 24px;
  top: 26px;
  display: grid;
  grid-template-columns: repeat(2, 86px);
  gap: 12px 8px;
}
.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 9px 4px 7px;
  border-radius: 10px;
  cursor: pointer;
  transition: background .15s;
}
.icon:hover { background: var(--accent-dim); }
.icon:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }
.icon-name {
  font-family: var(--font-pixel);
  font-size: 8px;
  letter-spacing: .02em;
  color: var(--ink);
  white-space: nowrap;
}

/* icon tiles (shared between desktop icons and window rows) */
.ico {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}
.ico img { width: 100%; height: 100%; object-fit: cover; }
.ico-hello { background: transparent; }
.ico-folder {
  position: relative;
  width: 46px;
  height: 38px;
  margin-top: 8px;
  background: linear-gradient(160deg, #8F6DF4, #6A48D8);
  border-radius: 5px 10px 10px 10px;
  overflow: visible;
}
.folder-tab {
  position: absolute;
  top: -6px; left: 0;
  width: 20px; height: 8px;
  background: #8F6DF4;
  border-radius: 4px 6px 0 0;
}
.folder-moth { font-size: 17px; display: grid; place-items: center; height: 100%; }
.ico-cocoon { background: #241B33; }
.ico-thirdman {
  background: radial-gradient(30px 18px at 50% 100%, rgba(201, 150, 58, .3), transparent 70%), #0d1018;
  border: 1px solid rgba(201, 150, 58, .28);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
}
.stumps { display: flex; gap: 3.5px; align-items: flex-end; }
.stumps i { width: 3px; height: 19px; background: var(--tm-cream); border-radius: 1px; }
.ico-talaria { background: #2A2140; }
.orb {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--coral);
  display: inline-block;
  animation: orb-breathe 2.4s ease-in-out infinite;
  box-shadow: 0 0 12px rgba(255, 142, 122, .7);
}
.orb-ico { width: 14px; height: 14px; }
@keyframes orb-breathe { 50% { transform: scale(1.45); opacity: .75; } }
.ico-works {
  background: var(--win-bar);
  border: 1px solid var(--win-line);
  grid-template-columns: repeat(2, 10px);
  gap: 5px;
  place-content: center;
}
.ico-works i { width: 10px; height: 10px; border-radius: 3px; }
.ico-works i:nth-child(1) { background: var(--accent); }
.ico-works i:nth-child(2) { background: var(--coral); }
.ico-works i:nth-child(3) { background: var(--green); }
.ico-works i:nth-child(4) { background: var(--amber); }
.ico-elsewhere {
  background: var(--win-bar);
  border: 1px solid var(--win-line);
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}
.ico-hire { background: #2A2140; font-size: 20px; }
.ico-argent {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #050505;
  border: 1px solid #33270f;
  color: #FFB84D;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex: none;
}
.ico-kalma {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: #EDE9E1;
  font-size: 14px;
  display: grid;
  place-items: center;
  flex: none;
}
.ico-ig {
  background: var(--win-bar);
  border: 1px solid var(--win-line);
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--accent);
}
.ico-lb { color: #00e054; font-size: 7px; letter-spacing: -1px; }
.ico-mal { color: #2e51a2; font-size: 7px; }
.ico-mdl { color: #1c9cea; font-size: 7px; }

/* desk doodles */
.doodle {
  position: absolute;
  font-family: var(--font-doodle);
  font-size: 24px;
  color: var(--accent-hi);
  transform: rotate(calc(var(--r) * 1deg));
  pointer-events: none;
  opacity: .75;
  white-space: nowrap;
  z-index: 1;
}

/* ============ WINDOWS ============ */
.win {
  position: absolute;
  display: flex;
  flex-direction: column;
  max-height: min(70vh, 620px);
  background: var(--win);
  border: 1px solid var(--win-line);
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
  overflow: hidden;
  animation: dz-pop .18s ease-out;
}
.win-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--win-bar);
  border-bottom: 1px solid var(--win-line);
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  flex: none;
}
.win-bar:active { cursor: grabbing; }
.win-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot-p { background: var(--dot-p); }
.dot-a { background: var(--dot-a); }
.dot-g { background: var(--dot-g); }
.win-icon { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.win-title {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .04em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.win-close {
  margin-left: auto;
  flex: none;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--dot-p);
  cursor: pointer;
  padding: 2px 6px;
  transition: color .15s;
}
.win-close:hover { color: var(--ink); }
.win-close:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 1px; border-radius: 4px; }
.win-body { padding: 18px 20px 17px; overflow-y: auto; overscroll-behavior: contain; }

/* window flavors */
.win-accent { border-color: var(--accent); }
.win-accent .win-bar { background: #2A2140; }
.win-accent .win-title { color: var(--accent); }
.win-tm { background: #0d1018; border-color: rgba(201, 150, 58, .35); }
.win-tm .win-bar { background: #131722; border-bottom-color: rgba(201, 150, 58, .25); }
.win-tm .win-title { color: var(--tm-gold); }
.win-sticky { background: var(--win-bar); transform: rotate(-1.5deg); box-shadow: 0 18px 44px rgba(0, 0, 0, .4); }
.win-sticky .win-bar { background: transparent; border-bottom: none; padding: 12px 15px 0; cursor: grab; }
.win-sticky .win-title { color: var(--dot-a); }
.win-sticky .win-body { padding: 10px 15px 13px; }
.win-notif .win-bar { background: transparent; border-bottom: none; padding: 12px 15px 0; }
.win-notif .win-title { color: var(--accent); }
.win-notif { background: var(--win-bar); transform: rotate(2deg); }
.win-notif .win-body { padding: 8px 15px 13px; font-size: 12.5px; line-height: 1.5; }

/* window content: rows */
.rows { display: flex; flex-direction: column; gap: 9px; }
.family-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: var(--win-bar);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
  transition: border-color .15s;
}
.row:hover, .row:focus-visible { border-color: var(--accent); }
.row:focus-visible { outline: none; }
.row .ico { width: 38px; height: 38px; border-radius: 10px; }
.row .ico-folder { height: 32px; margin-top: 5px; }
.row .stumps i { height: 15px; width: 2.5px; }
.row .orb-ico { width: 11px; height: 11px; }
.row-name { font-family: var(--font-pixel); font-size: 8.5px; color: var(--ink); display: block; }
.row-sub { font-size: 11.5px; color: var(--muted); display: block; margin-top: 1px; }
.row .chip { margin-left: auto; flex: none; }
.row-static { cursor: default; }
.row-static:hover { border-color: var(--line); }
a.row { text-decoration: none; color: inherit; }
.pill-ext {
  margin-left: auto;
  flex: none;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--muted);
  transition: color .15s, transform .15s;
}
a.row:hover .pill-ext, a.row:focus-visible .pill-ext {
  color: var(--accent);
  transform: translate(2px, -2px);
}
.pill-soon {
  margin-left: auto;
  flex: none;
  font-family: var(--font-pixel);
  font-size: 7.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--win-line);
  padding: 4px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.win-foot {
  margin-top: 13px;
  font-family: var(--font-doodle);
  font-size: 18px;
  color: var(--muted);
  transform: rotate(-.6deg);
}

/* hello window */
.hello-flex { display: flex; gap: 18px; align-items: flex-start; }
.hello-avatar {
  width: 84px; height: 110px;
  object-fit: cover;
  border-radius: 8px;
  border: 2px solid var(--win-line);
  flex: none;
}
.hello-wordmark { height: 28px; margin-bottom: 12px; }
.hello-copy { font-size: 14px; line-height: 1.55; color: #B7B0CC; }
.hello-copy strong { color: var(--ink); }
.caret {
  display: inline-block;
  width: 8px; height: 15px;
  background: var(--accent);
  margin-left: 4px;
  vertical-align: middle;
  animation: vsblink 1s infinite;
}

/* experimental rows */
.exp-row { display: flex; align-items: center; gap: 9px; }
.exp-row strong { font-size: 12.5px; display: block; color: var(--ink); }
.exp-row div span { font-size: 10.5px; color: var(--muted); display: block; }

/* hire (eml) window */
.eml-row { display: flex; gap: 10px; align-items: baseline; border-bottom: 1px solid var(--line); padding: 7px 0; font-size: 13px; }
.eml-k { font-family: var(--font-pixel); font-size: 8px; color: var(--dim); width: 58px; flex: none; }
.eml-body { margin: 11px 0 4px; color: #B7B0CC; line-height: 1.6; font-size: 13.5px; }
.eml-body strong { color: var(--ink); }
.eml-send { margin-top: 8px; display: inline-block; text-decoration: none; }
.eml-note {
  margin-top: 15px;
  font-family: var(--font-doodle);
  font-size: 19px;
  color: var(--muted);
  transform: rotate(-1deg);
}

/* pixel buttons */
.btn-pixel {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .06em;
  color: #0D0B14;
  background: var(--accent);
  padding: 9px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.btn-pixel:hover { background: var(--accent-hi); }
.btn-ghost { background: transparent; color: var(--accent); border: 1px solid var(--win-line); }
.btn-ghost:hover { background: transparent; border-color: var(--accent); }
.win-actions { display: flex; align-items: center; gap: 9px; margin-top: 16px; flex-wrap: wrap; }
.win-meta { margin-left: auto; font-size: 11px; color: var(--dim); white-space: nowrap; }

/* project card content (lives inside windows now) */
.card-toprow { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; }
.card-mark { width: 54px; height: 54px; object-fit: contain; border-radius: 13px; flex: none; }
.card-mark.squareless { border-radius: 0; }
.pixelated { image-rendering: pixelated; }
.card-names { display: flex; flex-direction: column; gap: 6px; }
.card-title { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.chip {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-pixel);
  font-size: 8.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid;
}
.chip-shipped { color: var(--green); border-color: rgba(123, 224, 163, .4); background: rgba(123, 224, 163, .08); }
.chip-oven { color: var(--amber); border-color: rgba(255, 196, 107, .4); background: rgba(255, 196, 107, .08); }
.chip-early { color: var(--blue); border-color: rgba(143, 199, 255, .4); background: rgba(143, 199, 255, .08); }
.card-oneliner { font-size: 14.5px; line-height: 1.5; max-width: 54ch; }
.card-aside {
  margin-top: 11px;
  font-family: var(--font-doodle);
  font-size: 21px;
  line-height: 1.2;
  color: var(--accent-hi);
  transform: rotate(-.8deg);
  max-width: 46ch;
}
.card-stack { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 15px; }
.card-stack span {
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: .08em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 4px 9px;
  border-radius: 8px;
}
.card-shots {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
}
.card-shots img {
  scroll-snap-align: start;
  border-radius: 12px;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.card-shots.shots-phone img { height: 240px; width: auto; }
.card-shots.shots-wide { flex-direction: column; overflow: visible; }
.card-shots.shots-wide img { width: 100%; height: auto; }
.card-noshots {
  margin-top: 16px;
  font-family: var(--font-doodle);
  font-size: 20px;
  color: var(--muted);
  transform: rotate(-.6deg);
}

/* ============ TASKBAR ============ */
.taskbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  background: rgba(23, 19, 31, .95);
  border-top: 1px solid var(--line);
  z-index: 400;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.task-mascot {
  width: 28px; height: 28px;
  flex: none;
  cursor: pointer;
  animation: floaty 3s ease-in-out infinite;
}
.task-mascot svg { width: 100%; height: 100%; display: block; }
.task-mascot:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; border-radius: 7px; }
.task-count { font-family: var(--font-pixel); font-size: 9px; color: var(--muted); white-space: nowrap; }
.task-tap { font-family: var(--font-doodle); font-size: 16px; color: var(--dim); white-space: nowrap; }
.task-ticker {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  opacity: .7;
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.task-ticker .marquee-track { animation-duration: 46s; gap: 26px; }
.task-ticker .marquee-track span { font-size: 10px; }
.task-cta {
  font-family: var(--font-pixel);
  font-size: 9px;
  color: #0D0B14;
  background: var(--accent);
  padding: 7px 12px;
  border-radius: 7px;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  transition: background .18s;
  will-change: transform;
}
.task-cta:hover { background: var(--accent-hi); color: #0D0B14; }

/* ============ CONTEXT MENU / QUIP / BACKDROP ============ */
.ctx {
  position: fixed;
  width: 190px;
  background: var(--win-bar);
  border: 1px solid var(--win-line);
  border-radius: 10px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .6);
  padding: 5px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  animation: dz-pop .12s ease-out;
}
.ctx[hidden] { display: none; }
.ctx-item {
  text-align: left;
  padding: 8px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--ink);
  transition: background .12s;
}
.ctx-item:hover { background: #2A2140; }
.ctx-hire { color: var(--accent); }

.quip {
  position: fixed;
  left: 50%;
  bottom: 62px;
  transform: translateX(-50%);
  background: #2A2140;
  border: 1px solid var(--accent);
  border-radius: 99px;
  padding: 9px 18px;
  font-size: 13px;
  color: var(--ink);
  z-index: 510;
  white-space: nowrap;
  opacity: 0;
  translate: 0 8px;
  pointer-events: none;
  transition: opacity .18s, translate .18s;
}
.quip.show { opacity: 1; translate: 0 0; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 7, 16, .66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 402;
}
.sheet-backdrop[hidden] { display: none; }

/* ============ WIDGETS (mobile homescreen cards) ============ */
.widget { display: none; }

/* ============ ROAMER ============ */
.roamer {
  position: fixed;
  right: 22px; bottom: 74px;
  z-index: 450;
  width: 64px;
  cursor: pointer;
  will-change: transform;
}
.roamer svg { width: 64px; height: auto; display: block; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .5)); }
.roamer-bubble {
  position: absolute;
  bottom: calc(100% + 12px);
  right: -6px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-pixel);
  font-size: 10.5px;
  letter-spacing: .06em;
  padding: 8px 11px;
  border-radius: 10px;
  white-space: nowrap;
  opacity: 0;
  transform: scale(.7) translateY(6px);
  transform-origin: bottom right;
  transition: opacity .22s, transform .22s cubic-bezier(.2, 1.8, .4, 1);
  pointer-events: none;
}
.roamer-bubble::after {
  content: "";
  position: absolute;
  top: 100%; right: 18px;
  border: 6px solid transparent;
  border-top-color: var(--ink);
}
.roamer-bubble.show { opacity: 1; transform: scale(1) translateY(0); }

/* ============ MAXIMUM DAZE ============ */
body.maximum-daze { filter: hue-rotate(28deg) saturate(1.25); }
body.maximum-daze .marquee-track { animation-duration: 5s !important; }
body.maximum-daze .roamer svg { animation: daze-spin .7s linear infinite; }
body.maximum-daze .os::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 700;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .14), rgba(0, 0, 0, .14) 1px, transparent 1px, transparent 3px);
}
@keyframes daze-spin { to { transform: rotate(360deg); } }
.daze-toast {
  position: fixed;
  top: 60px; left: 50%;
  translate: -50% 0;
  z-index: 520;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 13px 22px;
  border-radius: 12px;
  opacity: 0;
  transform: translateY(-12px) scale(.9);
  transition: opacity .3s, transform .3s cubic-bezier(.2, 1.6, .4, 1);
  pointer-events: none;
}
.daze-toast.show { opacity: 1; transform: translateY(0) scale(1); }

/* ============ NEW DESKTOP TOYS ============ */

/* icon tiles for the new residents */
.ico-term {
  background: #0B0912;
  border: 1px solid var(--win-line);
  color: var(--green);
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: .04em;
}
.ico-trash { background: var(--win-bar); border: 1px solid var(--win-line); font-size: 19px; }
.ico-virus {
  background: #2B1420;
  border: 1px solid rgba(255, 142, 122, .45);
  color: var(--coral);
  font-size: 19px;
  animation: virus-pulse 1.8s ease-in-out infinite;
}
@keyframes virus-pulse { 50% { box-shadow: 0 0 16px rgba(255, 142, 122, .38); } }
.ico-binfile { background: var(--win-bar); border: 1px solid var(--line); font-size: 16px; }

/* terminal window */
.win-term { background: #0B0912; }
.win-term .win-title { color: var(--green); }
.win-term .win-body { padding: 12px 14px; min-height: 240px; background: #0B0912; }
.term { font-family: var(--font-pixel); font-size: 10px; line-height: 1.9; letter-spacing: .04em; color: #C9C2DC; }
.term-ln { white-space: pre-wrap; word-break: break-word; }
.term-echo { color: var(--accent-hi); margin-top: 6px; }
.term-dim { color: var(--dim); }
.term-line { display: flex; gap: 8px; align-items: center; margin-top: 6px; }
.term-ps { color: var(--green); flex: none; }
.term-in {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: .04em;
  caret-color: var(--accent);
}

/* virus window */
.win-virus { border-color: var(--coral); }
.win-virus .win-title { color: var(--coral); }
.virus-copy { font-size: 13px; line-height: 1.55; color: #B7B0CC; }
.btn-danger { background: var(--coral); }
.btn-danger:hover { background: #FFA694; }

/* regrets bin */
.bin-note { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.btn-mini { margin-left: auto; flex: none; font-size: 7.5px; padding: 5px 8px; }

/* body glitch while the "virus" runs */
body.glitching { animation: glitch-flicker .12s steps(2) infinite; }
@keyframes glitch-flicker { 50% { filter: hue-rotate(80deg) saturate(2) contrast(1.2); } }

/* purple screen of daze */
.psod {
  position: fixed;
  inset: 0;
  z-index: 950;
  background: #43309F;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 28px;
}
.psod-inner { max-width: 640px; font-family: var(--font-pixel); color: #F2F0F7; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.psod-mascot {
  width: 84px; height: 84px;
  border-radius: 18px;
  background: #F2F0F7;
  color: #43309F;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 700;
}
.psod-title { font-size: clamp(18px, 3.4vw, 28px); line-height: 1.25; font-weight: 400; }
.psod-code { font-size: 10px; letter-spacing: .08em; opacity: .75; word-break: break-word; }
.psod-prog { font-size: 12px; }
.psod-hint { font-family: var(--font-doodle); font-size: 23px; opacity: .85; transform: rotate(-1deg); }

/* screensaver */
.saver { position: fixed; inset: 0; z-index: 940; background: var(--bg); cursor: none; transition: background .4s; }
.saver.corner-flash { background: #241B4A; }
.saver-bounce {
  position: absolute;
  left: 0; top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  will-change: transform;
}
.saver-bounce svg { width: 84px; height: auto; }
.saver-name { font-family: var(--font-pixel); font-size: 13px; letter-spacing: .14em; color: var(--accent); }
.saver-hits { font-family: var(--font-pixel); font-size: 8px; letter-spacing: .06em; color: var(--dim); }

/* achievement toast */
.ach-toast {
  position: fixed;
  top: 44px; right: 16px;
  z-index: 530;
  background: var(--win-bar);
  border: 1px solid rgba(255, 196, 107, .5);
  color: var(--amber);
  font-family: var(--font-pixel);
  font-size: 9.5px;
  letter-spacing: .08em;
  line-height: 1.6;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 300px;
  opacity: 0;
  transform: translateX(16px);
  transition: opacity .25s, transform .25s cubic-bezier(.2, 1.6, .4, 1);
  pointer-events: none;
}
.ach-toast.show { opacity: 1; transform: translateX(0); }

/* lasso select */
.lasso {
  position: absolute;
  z-index: 5;
  border: 1px dashed var(--accent);
  background: rgba(155, 123, 255, .08);
  border-radius: 4px;
  pointer-events: none;
}

/* tofu rain */
.tofu-bit {
  position: fixed;
  top: -40px;
  z-index: 640;
  pointer-events: none;
  display: block;
  width: 18px; height: 18px;
  background: #F2F0F7;
  border-radius: 4px;
  box-shadow: inset 0 -5px 0 rgba(13, 11, 20, .12);
  animation: tofu-fall linear forwards;
}
.tofu-bit.tofu-word {
  width: auto; height: auto;
  background: none;
  box-shadow: none;
  font-family: var(--font-doodle);
  font-size: 24px;
  color: var(--accent-hi);
}
@keyframes tofu-fall { to { transform: translateY(112vh) rotate(var(--tr, 300deg)); } }

/* daze.fm player */
.pl-top { display: flex; gap: 14px; align-items: center; }
.eq { display: flex; gap: 3px; align-items: flex-end; height: 36px; flex: none; }
.eq i {
  width: 5px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: eqb .8s ease-in-out infinite alternate;
}
.eq i:nth-child(odd) { background: var(--accent-hi); }
.player.paused .eq i { animation-play-state: paused; opacity: .45; }
@keyframes eqb { from { height: 5px; } to { height: 34px; } }
.pl-meta { min-width: 0; }
.pl-meta strong { display: block; font-size: 14px; color: var(--ink); }
.pl-meta span { font-size: 11px; color: var(--muted); }
.pl-controls { display: flex; gap: 8px; align-items: center; margin-top: 13px; }
.pl-btn {
  font-size: 13px;
  padding: 5px 10px;
  border: 1px solid var(--win-line);
  border-radius: 8px;
  background: var(--win-bar);
  cursor: pointer;
  transition: border-color .15s;
}
.pl-btn:hover { border-color: var(--accent); }
.pl-time { margin-left: auto; font-family: var(--font-pixel); font-size: 8.5px; color: var(--dim); }

/* todo.txt sticky */
.win-todo { transform: rotate(1.2deg); }
.win-todo .win-title { color: var(--green); }
.todo-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: #B7B0CC; cursor: pointer; padding: 3px 0; }
.todo-row input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; flex: none; }
.todo-row input:checked + span { text-decoration: line-through; opacity: .55; }

/* a moth passes through */
.moth-fly {
  position: fixed;
  left: 0;
  z-index: 640;
  font-size: 26px;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(155, 123, 255, .5));
}

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  /* menubar */
  .menubar { gap: 10px; padding: 8px 14px; }

  /* desk becomes a scrolling homescreen */
  .desk {
    top: 31px;
    bottom: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 16px 78px;
  }
  .desk-doodle { display: none; }

  .widget {
    display: block;
    background: var(--win);
    border: 1px solid var(--win-line);
    border-radius: 12px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45);
    overflow: hidden;
    max-width: 440px;
    margin: 0 auto 16px;
  }
  .widget-hello { transform: rotate(-.8deg); }
  .widget-exp { transform: rotate(.9deg); background: var(--win-bar); margin-top: 18px; }
  .widget-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 13px;
    background: var(--win-bar);
    border-bottom: 1px solid var(--win-line);
  }
  .widget-exp .widget-bar { background: transparent; border-bottom: none; padding-bottom: 0; }
  .widget-bar .win-dot { width: 9px; height: 9px; }
  .widget-title { font-family: var(--font-pixel); font-size: 9px; color: var(--muted); margin-left: 4px; }
  .exp-title { color: var(--dot-a); margin-left: 0; }
  .widget-body { padding: 15px 16px; display: flex; gap: 14px; align-items: center; }
  .widget-exp-body { flex-direction: column; align-items: stretch; gap: 9px; padding-top: 10px; }
  .widget .hello-avatar { width: 64px; height: 84px; }
  .widget .hello-wordmark { height: 20px; margin-bottom: 8px; }
  .widget .hello-copy { font-size: 13px; }

  .icons {
    position: static;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px 4px;
    max-width: 440px;
    margin: 6px auto 0;
  }
  .icon-hello { display: none; }

  /* windows become centered sheets */
  .win {
    position: fixed !important;
    left: 50% !important;
    top: 50% !important;
    width: min(94vw, 480px) !important;
    max-height: min(82vh, 640px);
    transform: translate(-50%, -50%) !important;
    z-index: 405 !important;
    animation: sheet-pop .2s ease-out;
  }
  .win-body { padding: 16px 16px 15px; }
  .card-shots.shots-phone img { height: 200px; }
  .hello-flex { flex-direction: row; }

  /* taskbar becomes a dock */
  .task-tap, .task-ticker { display: none; }
  .taskbar { justify-content: space-between; padding: 8px 14px; }
  .task-cta { padding: 9px 13px; }

  .roamer { display: none; }

  /* gate tweaks */
  .gate { padding: 40px 16px 110px; }
  .boot-btn { margin-top: 44px; padding: 15px 26px; font-size: 12.5px; }
}
@media (max-width: 640px) {
  .menu-links { display: none; }
  .family-grid { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1100px) {
  .task-tap { display: none; }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .marquee-track { animation: none; transform: none; }
}
