/* ================================================================
   V4 — DESKTOP OS  ·  STRUCTURE PIVOT
   ────────────────────────────────────────────────────────────────
   Not a scroll-through-sections page. A fake Windows 98 desktop
   where the entire IA is presented spatially: all content visible
   at once, arranged as multiple "open windows" + desktop icons +
   sticky notes + popups + taskbar. Visitor scans, doesn't scroll.
================================================================ */
:root {
  --teal:        #008080;
  --teal-dark:   #006666;
  --gray:        #c3c7cb;
  --gray-light:  #e4e7ea;
  --gray-dark:   #828790;
  --gray-darker: #555a62;
  --black:       #0a0a0a;
  --white:       #ffffff;
  --blue:        #000080;
  --blue-2:      #1084d0;
  --purple:      #6a0080;
  --magenta:     #ff00ff;
  --lime:        #00ff66;
  --yellow:      #fff200;
  --red:         #ff2a2a;
  --select:      #316ac5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
*::selection { background: var(--select); color: var(--white); }

html, body {
  background: var(--teal);
  background-image:
    repeating-conic-gradient(rgba(255,255,255,0.04) 0% 25%, transparent 0% 50%);
  background-size: 4px 4px;
  color: var(--black);
  font-family: "Tahoma", "MS Sans Serif", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.media__cover img, .file__frame--cover { image-rendering: pixelated; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* Variant nav */
.vnav {
  position: sticky; top: 0; z-index: 1000;
  background: #131211; color: #f1ecde;
  display: flex; align-items: center; gap: 0;
  padding: 0 1.25rem;
  font: 600 11px "VT323", monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--lime);
}
.vnav__brand { padding: 0.5rem 1rem 0.5rem 0; color: var(--lime); font-weight: 700; }
.vnav a { padding: 0.55rem 1rem; color: #f1ecde; border-left: 1px solid #2a2620; }
.vnav a:hover { background: var(--lime); color: var(--black); }
.vnav a.is-active { background: var(--magenta); color: var(--white); }
.vnav__meta { margin-left: auto; color: #8a8470; }

/* =================================================================
   DESKTOP CANVAS
================================================================= */
.osroot {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 38px); /* minus vnav */
  padding-bottom: 38px; /* room for taskbar */
}


/* =================================================================
   DESKTOP ICONS  (left rail)
================================================================= */
.icons {
  position: absolute;
  top: 44px; left: 16px;
  display: grid;
  gap: 22px;
  z-index: 5;
}
.icon {
  width: 88px;
  display: grid;
  justify-items: center;
  text-align: center;
  cursor: pointer;
  color: var(--white);
  text-shadow: 1px 1px 0 var(--black);
}
.icon:hover .icon__frame {
  background: rgba(255,255,255,0.18);
  outline: 1px dotted var(--white);
}
.icon__frame {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  font-size: 32px;
  margin-bottom: 6px;
  padding: 2px;
  position: relative;
}
.icon__name {
  font: 600 13px "Tahoma", sans-serif;
  line-height: 1.25;
  padding: 2px 5px;
  letter-spacing: 0.01em;
}
.icon--active .icon__frame {
  background: rgba(49,106,197,0.65);
  outline: 1px dotted var(--white);
}
.icon--active .icon__name {
  background: var(--select); color: var(--white);
}
.icon__chip {
  position: absolute; top: -8px; right: -2px;
  background: var(--magenta); color: var(--white);
  padding: 2px 5px;
  font: 400 10px "Press Start 2P", monospace;
  border: 1px solid var(--black);
  letter-spacing: 0.04em;
}

/* =================================================================
   WIN98 WINDOW CHROME
================================================================= */
.w {
  position: absolute;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  box-shadow:
    inset -1px -1px 0 0 var(--black),
    inset  1px  1px 0 0 var(--gray),
    4px 4px 0 rgba(0,0,0,0.18);
  padding: 2px;
}
.w__title {
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
  color: var(--white);
  display: flex; align-items: center; gap: 6px;
  padding: 4px 6px;
  font: 700 14px "Tahoma", "MS Sans Serif", sans-serif;
  letter-spacing: 0.02em;
  cursor: move;            /* draggable by the title bar */
  touch-action: none;      /* let pointer-drag work on touch */
}
.w__title__icon { width: 16px; font-size: 13px; line-height: 1; }
.w__title__text { flex: 1; }
.w__title__btn { cursor: pointer; }
body.dragging, body.dragging * { user-select: none !important; }
.w__title__btn {
  width: 16px; height: 14px;
  background: var(--gray);
  border-top: 1px solid var(--white);
  border-left: 1px solid var(--white);
  border-bottom: 1px solid var(--gray-darker);
  border-right: 1px solid var(--gray-darker);
  font: 700 10px "Pixelify Sans", sans-serif;
  color: var(--black);
  display: inline-grid; place-items: center;
}
.w__menu {
  background: var(--gray);
  padding: 3px 6px;
  display: flex; gap: 1rem;
  border-bottom: 1px solid var(--gray-dark);
  font: 400 13px "Tahoma", sans-serif;
}
.w__menu span:first-letter { text-decoration: underline; }
.w__body { background: var(--gray); padding: 12px 14px; }

/* alt title bar variants */
.w--media .w__title { background: linear-gradient(90deg, var(--purple), var(--magenta)); }
.w--cal .w__title { background: linear-gradient(90deg, #2b5fb0, var(--blue-2)); }
.w--mail .w__title { background: linear-gradient(90deg, #1d6f60, #11a98f); }
.w--note .w__title { background: linear-gradient(90deg, #b07000, #d49000); }
.w--explorer .w__title { background: linear-gradient(90deg, #3a4f8f, var(--blue-2)); }

.w button {
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  padding: 7px 14px;
  font: 700 14px "Tahoma", sans-serif;
  color: var(--black);
  cursor: pointer;
}
.w button:active {
  border-top: 2px solid var(--gray-darker); border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white); border-right: 2px solid var(--white);
}
.w button.primary {
  outline: 1px dotted var(--black); outline-offset: -4px;
}
.w button.big { padding: 10px 16px; font-size: 16px; }

.w input[type=email], .w input[type=text] {
  background: var(--white);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 7px 10px;
  font: 400 15px "Tahoma", sans-serif;
  width: 100%;
}

/* =================================================================
   WIN A  —  MEDIA PLAYER  (CENTER STAGE)
================================================================= */
.w--media {
  top: 50px;
  left: 120px;          /* clears the desktop icon rail */
  width: clamp(360px, 36vw, 500px);
  z-index: 10;
}
.media__body {
  display: grid;
  gap: 10px;
  padding: 10px;
  background: var(--gray);
}
.media__top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
}
.media__cover {
  width: 160px; aspect-ratio: 1/1;
  background: var(--black);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  position: relative; overflow: hidden;
}
.media__cover img {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: pixelated;
  filter: contrast(1.2);
}
.media__cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-conic-gradient(rgba(0,0,0,0.25) 0% 25%, transparent 0% 50%);
  background-size: 2px 2px;
  mix-blend-mode: multiply;
}
.media__txt { display: grid; gap: 4px; align-content: start; }
.media__kicker {
  font: 400 18px "VT323", monospace;
  color: var(--gray-darker);
  letter-spacing: 0.06em;
}
.media__title {
  font-family: "Press Start 2P", "Pixelify Sans", sans-serif;
  font-size: clamp(1.2rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  color: var(--black);
  text-shadow: 2px 2px 0 var(--magenta), 4px 4px 0 var(--lime);
  margin: 4px 0 6px;
}
.lcd {
  background: #0a1a0a; color: var(--lime);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 10px 12px;
  font: 400 19px "VT323", monospace;
  letter-spacing: 0.08em;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
}
.lcd__bar { height: 10px; background: #002211; border: 1px solid var(--gray-darker); position: relative; }
.lcd__fill { position: absolute; left: 1px; right: 70%; top: 1px; bottom: 1px; background: var(--lime); background-image: repeating-linear-gradient(90deg, transparent 0 3px, #002b00 3px 4px); }
.lcd__tag { color: var(--yellow); }
.lcd__time { display: inline-flex; align-items: center; gap: 9px; }
.lcd__play {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px;
  border: 1px solid var(--lime);
  background: #062b06; color: var(--lime);
  font-size: 11px; line-height: 1;
  border-radius: 2px; cursor: pointer;
}
.lcd__play:hover { background: var(--lime); color: #062b06; }

/* Live Spotify embed — single-column LCD inset holding the player widget */
.lcd--live { grid-template-columns: 1fr; color-scheme: dark; }
.spotify-embed { display: block; width: 100%; border: 0; }

/* ── AddALane.exe launcher: attention pulse on the PLAY chip + a little car bob ── */
#sim-launch-icon .icon__frame { animation: iconBob 2.4s ease-in-out infinite; }
#sim-launch-icon .icon__chip {
  animation: chipPulse 1.05s ease-in-out infinite;
  transform-origin: center;
}
@keyframes iconBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
@keyframes chipPulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 rgba(255,0,255,0); }
  50%      { transform: scale(1.16); box-shadow: 0 0 9px rgba(255,0,255,0.95); }
}

.media__cta-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.media__also {
  font: 400 14px "Tahoma", sans-serif;
  color: var(--gray-darker);
  line-height: 1.4;
}
.media__also a { color: var(--blue); border-bottom: 1px dotted var(--blue); }
.media__also a:hover { color: var(--magenta); }
.media__also b { color: var(--blue); font-weight: 700; }
.media__fallback {
  margin-top: 10px;
  padding: 7px 10px;
  background: #e8f0ff;
  border: 1px dashed var(--blue-2);
  font: 400 13px "Tahoma", sans-serif;
  color: var(--gray-darker);
}
.media__fallback a { color: var(--blue); font-weight: 700; border-bottom: 1px solid var(--blue-2); }
.media__fallback a:hover { color: var(--magenta); }

.w__status {
  background: var(--gray);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  margin: 4px;
  padding: 5px 8px;
  font: 400 12px "Tahoma", sans-serif;
  display: flex; gap: 8px;
}
.w__status span { padding: 0 8px; border-right: 1px solid var(--gray-dark); }
.w__status span:last-child { border-right: 0; margin-left: auto; }

/* =================================================================
   WIN B  —  CALENDAR
================================================================= */
.w--cal {
  top: 50px;
  right: 24px;          /* top-right column */
  width: clamp(320px, 28vw, 360px);
  z-index: 7;
}
.cal {
  background: var(--white);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  font: 400 13px "Tahoma", sans-serif;
  text-align: center;
}
.cal__bar {
  display: flex; justify-content: space-between;
  padding: 6px 10px;
  background: var(--gray);
  font: 700 14px "Tahoma", sans-serif;
  border-bottom: 1px solid var(--gray-dark);
}
.cal__h { background: var(--gray); padding: 5px 0; font-weight: 700; font-size: 12px; }
.cal__d { background: var(--white); padding: 7px 0; color: var(--black); }
.cal__d--out { color: var(--gray-dark); }
.cal__d--14 {
  background: var(--magenta); color: var(--white); font-weight: 700;
  outline: 2px solid var(--yellow); outline-offset: -2px;
}
.cal__d--evt2 {
  background: var(--blue-2); color: var(--white); font-weight: 700;
  outline: 2px solid var(--lime); outline-offset: -2px;
}
.cal-callout {
  margin: 10px 10px 8px;
  padding: 10px 12px;
  background: #ffffe1;
  border: 1px solid var(--black);
  font: 400 13px "Tahoma", sans-serif;
  line-height: 1.5;
}
.cal-callout + .cal-callout { margin-top: 0; }
.cal-callout strong { font-family: "VT323", monospace; font-size: 18px; color: var(--magenta); display: block; margin-bottom: 2px; }
.cal-callout--evt2 strong { color: var(--blue-2); }
.cal-callout small { font-size: 12px; color: var(--gray-darker); display: block; margin-top: 4px; }
.cal-actions { padding: 0 10px 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.cal-actions--evt2 { padding-top: 0; }
.cal-actions--evt2 button { font-size: 13px; padding: 5px 10px; }

/* =================================================================
   WIN C  —  MAILING LIST popup
================================================================= */
.w--mail {
  bottom: 52px;
  right: 24px;          /* bottom-right column */
  width: clamp(320px, 28vw, 360px);
  z-index: 6;
}
.mail__body {
  background: var(--white);
  padding: 16px 18px;
  display: grid; gap: 10px;
}
.mail__h {
  font: 700 18px "Tahoma", sans-serif;
  color: var(--black);
  line-height: 1.3;
}
.mail__h em { color: var(--blue); font-style: italic; }
.mail__sub {
  font: 400 14px "Tahoma", sans-serif;
  line-height: 1.55;
  max-width: 38ch;
}
.mail__form { display: grid; gap: 8px; grid-template-columns: 1fr auto; align-items: center; margin-top: 4px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.mail__ok { font: 400 15px "VT323", monospace; color: #1d6f60; padding: 4px 0; }
.mail__form.is-invalid input { border: 2px solid #c0392b; } /* visible invalid state (native validation is primary; this surfaces the JS regex fallback) */
.mail__consent {
  grid-column: 1 / -1;
  display: flex; align-items: flex-start; gap: 6px;
  font: 400 13px "VT323", monospace; color: var(--gray-darker);
  line-height: 1.3; cursor: pointer;
}
.mail__consent input { margin: 2px 0 0; flex: none; }

/* =================================================================
   WIN E  —  EXPLORER (releases)
================================================================= */
.w--explorer {
  bottom: 52px;
  left: 120px;          /* bottom-left column */
  width: clamp(360px, 36vw, 500px);
  z-index: 5;
}
.explorer__path {
  background: var(--gray);
  padding: 6px 10px;
  border-bottom: 1px solid var(--gray-dark);
  font: 400 13px "Tahoma", sans-serif;
  display: flex; align-items: center; gap: 8px;
}
.explorer__path::before { content: "Address:"; }
.explorer__path__field {
  background: var(--white);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 4px 7px;
  flex: 1;
  font: 400 13px "Tahoma", sans-serif;
}
.explorer__body {
  background: var(--white);
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.file {
  display: grid; justify-items: center; padding: 4px 2px;
  text-align: center; cursor: pointer; position: relative;
}
.file:hover { background: var(--select); color: var(--white); }
.file:hover .file__t { color: var(--white); }
.file__frame {
  width: 64px; height: 64px;
  background: var(--gray);
  border: 1px solid var(--gray-darker);
  display: grid; place-items: center;
  position: relative;
  overflow: hidden;
}
.file__frame--cover {
  background-size: cover;
  background-position: center;
  image-rendering: pixelated;
}
.file__frame--cover::after {
  content: ""; position: absolute; inset: 0;
  background-image: repeating-conic-gradient(rgba(0,0,0,0.2) 0% 25%, transparent 0% 50%);
  background-size: 3px 3px;
  mix-blend-mode: multiply;
}
.file__chip {
  position: absolute; top: 2px; left: 2px;
  background: var(--magenta); color: var(--white);
  padding: 2px 4px;
  font: 400 9px "Press Start 2P", monospace;
}
.file__art-mono {
  font: 400 15px "Press Start 2P", monospace; color: var(--white);
}
.file__t {
  margin-top: 6px;
  font: 700 13px "Tahoma", sans-serif;
  line-height: 1.25;
}
.file__m {
  font: 400 12px "Tahoma", sans-serif;
  color: var(--gray-darker);
  margin-top: 2px;
}

/* =================================================================
   WIN F  —  NOTEPAD (bio)
================================================================= */
.w--note {
  top: 78px;
  right: 24px;
  width: 230px;
  z-index: 4;
  display: none; /* keep optional — not shown on the V4 desktop */
}

/* =================================================================
   WIN G  —  about.txt  (bio: buried + de-emphasized per Aaron 5/27)
   Not a diploma. A humble, unfocused Notepad window. No accolades.
================================================================= */
.w--about {
  position: absolute;
  top: 322px;
  left: calc(50% - 130px);  /* center channel, buried behind primaries */
  width: 260px;
  z-index: 3;            /* sits BEHIND the primary windows (click to raise) */
  opacity: 0.96;
  display: none;         /* closed by default — opens via README.txt icon / Start → About */
}
.w--about.is-open { display: block; }
/* inactive title bar = gray, signals "not the focus" (real Win98 behavior) */
.w--about .w__title {
  background: var(--gray-dark);
  color: var(--gray-light);
}
.w--about .w__title__text { font-weight: 400; }
.about__body {
  background: var(--white);
  padding: 14px 16px 16px;
  font: 400 16px "VT323", monospace;
  line-height: 1.35;
  color: var(--black);
}

/* =================================================================
   WIN — Socials hub (multi-platform links popup)
================================================================= */
.w--social {
  position: absolute;
  top: 96px;
  left: calc(50% - 150px);
  width: 300px;
  z-index: 7;              /* hidden until opened; raised to the front on open via raise() */
  display: none;            /* opened from the Socials.url icon / Start menu */
}
.w--social.is-open { display: block; }
.w--social .w__title { background: linear-gradient(90deg, #1d6f60, #11a98f); }
.social__body {
  background: var(--white);
  padding: 8px;
  display: grid;
  gap: 2px;
}
.social__link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  font: 400 15px "Tahoma", sans-serif;
  color: var(--black);
}
.social__link:hover { background: var(--select); color: var(--white); }
.social__ico { width: 20px; text-align: center; font-size: 15px; }
.social__name { font-weight: 700; }
.social__handle { margin-left: auto; font: 400 14px "VT323", monospace; color: var(--gray-darker); }
.social__link:hover .social__handle { color: var(--gray-light); }

/* =================================================================
   TASKBAR
================================================================= */
.taskbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--gray);
  border-top: 2px solid var(--white);
  height: 38px;
  display: flex; align-items: center;
  padding: 2px 4px;
  z-index: 100;
  box-shadow: 0 -1px 0 var(--gray-darker);
}
.start {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  padding: 4px 12px;
  font: 700 15px "Tahoma", sans-serif;
  height: 30px;
  color: var(--black);
}
.start__flag {
  width: 18px; height: 18px;
  background: linear-gradient(135deg, var(--red) 0 50%, var(--lime) 50% 100%);
  border: 1px solid var(--black);
}
.taskbar__sep { width: 1px; height: 24px; background: var(--gray-darker); margin: 0 4px; }
.task-tab {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--gray-darker);
  border-right: 2px solid var(--gray-darker);
  padding: 5px 12px;
  margin-right: 3px;
  font: 400 13px "Tahoma", sans-serif;
  height: 30px;
  color: var(--black);
  max-width: 220px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.task-tab--active {
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  background: var(--gray-light);
}
.tray {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gray);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 4px 12px;
  height: 30px;
  font: 400 14px "Tahoma", sans-serif;
}
.tray a { display: inline-grid; place-items: center; width: 18px; }
.tray .clock { letter-spacing: 0.04em; }

/* =================================================================
   START MENU  (hover/focus the Start button to open)
================================================================= */
.start-wrap { position: relative; display: inline-flex; }
.start { cursor: pointer; }
.start-wrap:hover .start,
.start-wrap:focus-within .start {
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  background: var(--gray-light);
}
.startmenu {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 0;
  width: 260px;
  background: var(--gray);
  border-top: 2px solid var(--white);
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--black);
  border-right: 2px solid var(--black);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
  z-index: 200;
}
.start-wrap:hover .startmenu,
.start-wrap:focus-within .startmenu { display: flex; }
.startmenu__rail {
  width: 36px;
  background: linear-gradient(180deg, var(--blue), var(--purple));
  display: flex; align-items: flex-end; justify-content: center;
  padding: 10px 0;
}
.startmenu__rail span {
  writing-mode: vertical-rl; transform: rotate(180deg);
  color: var(--white);
  font: 700 16px "Tahoma", sans-serif;
  letter-spacing: 0.06em;
}
.startmenu__rail span b { color: var(--lime); }
.startmenu__list { flex: 1; padding: 4px; }
.startmenu__item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  font: 400 15px "Tahoma", sans-serif;
  color: var(--black);
}
.startmenu__item span:first-child { width: 18px; text-align: center; }
.startmenu__item:hover { background: var(--select); color: var(--white); }
.startmenu__item b { font-weight: 700; }
.startmenu__sep { height: 1px; background: var(--gray-dark); border-bottom: 1px solid var(--white); margin: 4px 6px; }

/* =================================================================
   CRT OVERLAY  —  scanlines + vignette (sells the old monitor)
================================================================= */
.crt {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9000;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0,0,0,0.10) 0px,
      rgba(0,0,0,0.10) 1px,
      transparent 1px,
      transparent 3px
    ),
    radial-gradient(ellipse at center,
      transparent 60%,
      rgba(0,0,0,0.16) 100%);
  mix-blend-mode: multiply;
  animation: crtflicker 5s steps(60) infinite;
}
@keyframes crtflicker {
  0%, 96%, 100% { opacity: 1; }
  97% { opacity: 0.93; }
  98% { opacity: 0.98; }
}

/* =================================================================
   BOOT SPLASH  —  PondlessOS startup, auto-fades (~2.2s)
================================================================= */
.boot {
  position: fixed; inset: 0;
  z-index: 9999;
  background: #000;
  display: grid; place-content: center; justify-items: center; gap: 26px;
  pointer-events: none;
  animation: bootfade 2.4s ease-in forwards;
}
@keyframes bootfade {
  0%, 64% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
.boot__logo {
  font: 400 34px "Press Start 2P", monospace;
  color: var(--white);
  text-align: center;
  line-height: 1.4;
  text-shadow: 3px 3px 0 var(--magenta), -3px -3px 0 var(--blue-2);
}
.boot__logo small {
  display: block;
  font-size: 12px; color: var(--lime); margin-top: 14px; letter-spacing: 0.1em;
}
.boot__status { font: 400 16px "VT323", monospace; color: #b8b8b8; letter-spacing: 0.08em; }
.boot__bar {
  width: 320px; height: 18px;
  border: 2px solid var(--gray);
  padding: 2px;
  background: #111;
}
.boot__fill {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--lime) 0 10px, #00aa44 10px 14px);
  width: 0;
  animation: bootbar 2.0s steps(20) forwards;
}
@keyframes bootbar { to { width: 100%; } }

@media (prefers-reduced-motion: reduce) {
  .boot { animation: none; opacity: 0; visibility: hidden; }
  .crt { animation: none; }
  .sim__car { animation: none !important; }
  #sim-launch-icon .icon__frame, #sim-launch-icon .icon__chip { animation: none !important; }
}

/* =================================================================
   WIN — AddAnotherLane.exe  (the induced-demand gag, launchable)
================================================================= */
.w--sim {
  position: absolute;
  top: 96px; left: 220px;
  width: 440px;
  z-index: 50;
  display: none;            /* launched from icon / Start / callouts */
}
.w--sim.is-open { display: block; }
.w--sim .w__title { background: linear-gradient(90deg, #7a1f00, var(--red)); }
.sim__body { background: var(--gray); padding: 10px; }

.sim__road {
  position: relative;
  background: #2b2b2b;
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  padding: 4px 0;
  overflow: hidden;
}
.sim__lane {
  position: relative;
  height: 20px;
  border-bottom: 2px dashed #ffd400;
}
.sim__lane:last-child { border-bottom: 0; }
.sim__car {
  position: absolute;
  top: 4px;
  width: 16px; height: 11px;
  image-rendering: pixelated;
  animation: drive linear infinite;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.35);
}
@keyframes drive {
  from { transform: translateX(-24px); }
  to   { transform: translateX(440px); }
}

.sim__readout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
  margin: 10px 0 8px;
  font: 400 14px "VT323", monospace;
  letter-spacing: 0.04em;
}
.sim__readout b { font-weight: 400; color: var(--gray-darker); }
.sim__readout .val { color: var(--black); font-weight: 700; text-align: right; }
.sim__readout .val--bad { color: var(--red); }

.sim__gauge {
  height: 16px;
  background: var(--white);
  border-top: 2px solid var(--gray-darker);
  border-left: 2px solid var(--gray-darker);
  border-bottom: 2px solid var(--white);
  border-right: 2px solid var(--white);
  margin-bottom: 8px;
  position: relative;
}
.sim__gauge__fill {
  height: 100%;
  background: repeating-linear-gradient(90deg, var(--red) 0 8px, #aa1d1d 8px 12px);
  width: 64%;
  transition: width 240ms ease;
}
.sim__status {
  background: #000; color: var(--lime);
  font: 400 16px "VT323", monospace;
  padding: 6px 10px;
  margin-bottom: 10px;
  border: 2px inset var(--gray-dark);
  min-height: 30px;
}
.sim__status .blink { animation: simblink 1s steps(2) infinite; }
@keyframes simblink { 50% { opacity: 0; } }

.sim__controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sim__controls .sim__reset {
  background: none; border: 0; cursor: pointer;
  font: 400 13px "Tahoma", sans-serif;
  color: var(--blue); text-decoration: underline;
  padding: 4px;
}
.sim__controls .sim__reset:hover { color: var(--magenta); }

/* =================================================================
   RESPONSIVE COLLAPSE  —  on narrow viewports, stack windows
================================================================= */
@media (max-width: 960px) {
  .osroot { min-height: 0; }
  .icons {
    position: static; padding: 20px 14px 0;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }
  .w { position: static; width: auto; margin: 14px; }
  .cer { position: static; margin: 14px; transform: rotate(0deg); }
}

/* =================================================================
   SHORT-VIEWPORT ICON WRAP
   On wide-but-short screens (laptops, e.g. 14" 1080p, 1366x768) the
   single 8-icon column overflows below the taskbar. Flow icons into
   two columns of four and nudge the two left-anchored windows right
   so column 2 isn't hidden behind them. Tall monitors keep one column.
================================================================= */
@media (min-width: 961px) and (max-height: 1000px) {
  .icons {
    grid-auto-flow: column;
    grid-template-rows: repeat(4, auto);  /* assumes 8 icons → 2 cols of 4; a 9th would spill to a 3rd column behind the windows */
    gap: 16px 18px;           /* row-gap 16, column-gap 18 */
  }
  /* icon col2 right edge = 16(.icons left) + 88(icon) + 18(col-gap) + 88(icon) = 210px.
     Shift the two left-anchored windows to 228px → ~18px clearance from col2 (was 10px;
     widened so long labels like "Add_Another_" can't bleed under the window on Windows DPI). */
  .w--media,
  .w--explorer { left: 228px; }
}

/* =================================================================
   CLICK WIRING — focus-flash + clickable affordance
   ================================================================= */
[data-win] { cursor: pointer; }
.w.is-flash { animation: w-flash 0.5s ease 2; }   /* two pulses (~1s) — see js timeout */
@keyframes w-flash {
  0%, 100% { box-shadow: 0 0 0 0 transparent; }
  50%      { box-shadow: 0 0 0 4px var(--yellow), 0 0 26px 6px var(--blue-2); }
}
@media (prefers-reduced-motion: reduce) {
  .w.is-flash { animation: none; outline: 4px solid var(--yellow); box-shadow: 0 0 22px 5px var(--blue-2); }
}
