/* ════════════════════════════════════════════════════════════════
   GOOSE OS v1.0 — styles
   dark CRT control plane × chunky 90s chrome
   zero image files: everything is CSS + inline SVG
   ════════════════════════════════════════════════════════════════ */

:root {
  /* palette */
  --room: #05060a;
  --wall-1: #060d16;
  --wall-2: #0a1622;
  --cyan: #62ddff;
  --cyan-hot: #b9f1ff;
  --cyan-dim: #3a87a5;
  --cyan-deep: #14394d;
  --ink: #bfdcec;
  --ink-dim: #6f8da0;
  --ink-faint: #3a5468;
  --amber: #ffbd55;
  --amber-deep: #8a5c1e;
  --red: #ff6b6b;
  --green: #6fe09a;

  /* chrome (the 90s plastic, recolored dark blue) */
  --plastic: #102331;
  --plastic-hi: #2d5a72;     /* top/left bevel light */
  --plastic-lo: #050d14;     /* bottom/right bevel dark */
  --plastic-face: #0c1b27;
  --title-a: #0a2a3d;
  --title-b: #1c5d7d;

  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Menlo, Consolas, monospace;
}

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

html, body { height: 100%; }

body {
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(ellipse 120% 90% at 50% -10%, #0b1018 0%, var(--room) 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  gap: 10px;
}

::selection { background: var(--cyan); color: #03212e; }

a { color: var(--cyan); }
a:hover { color: var(--cyan-hot); }

.sr-only,
.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.skip-link:focus {
  position: fixed; top: 8px; left: 8px;
  width: auto; height: auto; clip: auto;
  z-index: 9999;
  background: var(--cyan); color: #03212e;
  padding: 8px 14px; font-family: var(--mono);
}

button { font-family: var(--mono); }

:focus-visible { outline: 2px dashed var(--amber); outline-offset: 2px; }

/* ════════════════ bevel recipes (the chunky 90s plastic) ════════ */

.window, .taskbar, .start-menu, .goose-bubble {
  background: var(--plastic-face);
  border: 2px solid;
  border-color: var(--plastic-hi) var(--plastic-lo) var(--plastic-lo) var(--plastic-hi);
  box-shadow:
    inset 1px 1px 0 rgba(98, 221, 255, 0.10),
    3px 3px 0 rgba(0, 0, 0, 0.5);
}

.bevel-btn,
.titlebar-btns button,
.task-tabs button,
.start,
.gate-row button,
.chatrow button,
.goose-bubble-actions button,
.boot-skip {
  background: var(--plastic);
  color: var(--ink);
  border: 2px solid;
  border-color: var(--plastic-hi) var(--plastic-lo) var(--plastic-lo) var(--plastic-hi);
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.bevel-btn:active,
.titlebar-btns button:active,
.task-tabs button:active,
.task-tabs button[aria-current="true"],
.start[aria-expanded="true"],
.gate-row button:active,
.chatrow button:active {
  border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo);
}

.sunken,
.tray,
.chatlog,
.chatrow input,
.boot-meter,
.modcard pre,
.notepad {
  border: 2px solid;
  border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo);
  background: #04101a;
}

/* ════════════════ boot ════════════════ */

.boot {
  position: fixed; inset: 0; z-index: 9990;
  background: #02060c;
  display: flex; align-items: center; justify-content: center;
  padding: 6vw;
}
.boot.done { display: none; }
.boot-inner { width: min(640px, 100%); }
.boot-mark {
  color: var(--cyan);
  font-size: clamp(6px, 1.6vw, 11px);
  line-height: 1.25;
  text-shadow: 0 0 12px rgba(98, 221, 255, 0.5);
  margin-bottom: 28px;
  overflow: hidden;
}
.boot-log { min-height: 200px; font-size: 13px; color: var(--ink-dim); }
.boot-log .ok { color: var(--cyan); }
.boot-log .warn { color: var(--amber); }
.boot-meter { height: 14px; margin: 18px 0 14px; }
.boot-meter span {
  display: block; height: 100%; width: 0;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 8px, transparent 8px 11px);
}
.boot-skip { padding: 6px 14px; color: var(--ink-dim); }
.boot-skip:hover { color: var(--cyan); }

/* ════════════════ the monitor ════════════════ */

.monitor {
  width: min(1280px, 100%);
  height: min(64vh, 720px);
  min-height: 500px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #232a33 0%, #11151b 55%, #0a0d11 100%);
  border-radius: 22px;
  padding: 16px 16px 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 6px rgba(0, 0, 0, 0.6),
    0 30px 60px rgba(0, 0, 0, 0.7);
}

.screen-glass {
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  background: #010407;
  padding: 6px;
  box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.9);
}

.monitor-chin {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  height: 40px;
  flex-shrink: 0;
}
.chin-brand {
  font-size: 10px; letter-spacing: 0.42em;
  color: #5a6671;
}
.chin-led {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.under-monitor {
  display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: center;
  font-size: 11px; color: var(--ink-faint);
  letter-spacing: 0.06em;
}
.under-monitor a { color: var(--ink-dim); }

/* ════════════════ workstation hardware ════════════════ */

.workstation {
  width: min(1280px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.workstation .monitor { width: 100%; }

.machine-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 22px;
  margin-bottom: 10px;
  background: linear-gradient(160deg, #1c222a, #0d1117);
  border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 20px rgba(0, 0, 0, 0.5);
}
.machine-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(98, 221, 255, 0.35);
}
.machine-brand svg { width: 24px; height: 24px; }
.machine-badges { display: flex; gap: 10px; }
.machine-badges i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  border: 1px solid var(--cyan-deep);
  padding: 3px 9px;
}

.keyboard-deck {
  width: min(980px, 92%);
  margin-top: 12px;
  padding: 12px 18px 16px;
  background: linear-gradient(170deg, #1a2028, #0c0f14);
  border-radius: 8px 8px 14px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 28px rgba(0, 0, 0, 0.55);
}
.deck-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.deck-power { font-size: 9px; letter-spacing: 0.2em; color: var(--green); }
.deck-vents {
  flex: 1;
  height: 6px;
  background: repeating-linear-gradient(90deg, #060a0f 0 6px, transparent 6px 12px);
  opacity: 0.7;
}
.deck-label { font-size: 9px; letter-spacing: 0.26em; color: #5a6671; }
.deck-keys {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
}
.deck-keys span {
  display: grid;
  place-items: center;
  height: 26px;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  background: var(--plastic);
  border: 2px solid;
  border-color: var(--plastic-hi) var(--plastic-lo) var(--plastic-lo) var(--plastic-hi);
  border-radius: 3px;
  transition: color 90ms linear, background 90ms linear,
              box-shadow 90ms linear, transform 90ms linear;
}
/* keyboard is a live prop: keys respond to real typing + clicks */
.keyboard-deck.is-live .deck-keys span,
.keyboard-deck.is-live .deck-power { cursor: pointer; }
.keyboard-deck.is-live .deck-keys span:hover { color: var(--ink-dim); }
.deck-keys span.lit {
  color: #03212e;
  background: var(--cyan);
  border-color: var(--cyan-hot) var(--cyan-dim) var(--cyan-dim) var(--cyan-hot);
  box-shadow: 0 0 10px rgba(98, 221, 255, 0.7), inset 0 0 4px rgba(185, 241, 255, 0.8);
  transform: translateY(1px);
}
.deck-keys span.lit-amber {
  color: #1c1305;
  background: var(--amber);
  border-color: #ffe2a8 var(--amber-deep) var(--amber-deep) #ffe2a8;
  box-shadow: 0 0 10px rgba(255, 189, 85, 0.7);
  transform: translateY(1px);
}
.keyboard-deck.is-live .deck-power:hover { color: var(--cyan-hot); }
.deck-power.armed { color: var(--amber); }
/* power-down flash before the screensaver takes over */
.power-flash {
  position: fixed;
  inset: 0;
  background: #b9f1ff;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  animation: powerFlash 420ms ease-out forwards;
}
@keyframes powerFlash {
  0%   { opacity: 0; }
  12%  { opacity: 0.85; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .power-flash { animation: none; display: none; }
  .deck-keys span { transition: none; }
}

/* ════════════════ desktop / wallpaper ════════════════ */

.desktop {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 7px;
  background:
    /* goose emblem: ringed seal + chevron escort */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 600'%3E%3Cg fill='none' stroke='%2362ddff'%3E%3Ccircle cx='300' cy='300' r='272' stroke-opacity='0.07' stroke-width='1.5'/%3E%3Ccircle cx='300' cy='300' r='236' stroke-opacity='0.05' stroke-width='1' stroke-dasharray='3 9'/%3E%3Ccircle cx='300' cy='300' r='176' stroke-opacity='0.04' stroke-width='14'/%3E%3C/g%3E%3Cg stroke='%2362ddff' stroke-opacity='0.10' stroke-width='1.5'%3E%3Cpath d='M300 18v22M300 560v22M18 300h22M560 300h22'/%3E%3C/g%3E%3Cg transform='translate(130,124) scale(10.6)' shape-rendering='crispEdges'%3E%3Cg fill='%2362ddff' fill-opacity='0.06'%3E%3Crect x='4' y='18' width='16' height='8'/%3E%3Crect x='2' y='16' width='4' height='4'/%3E%3Crect x='16' y='8' width='4' height='12'/%3E%3Crect x='16' y='4' width='8' height='5'/%3E%3C/g%3E%3Crect x='8' y='20' width='8' height='4' fill='%2362ddff' fill-opacity='0.035'/%3E%3Cg fill='%23ffbd55' fill-opacity='0.09'%3E%3Crect x='24' y='6' width='4' height='2'/%3E%3Crect x='9' y='26' width='2' height='3'/%3E%3Crect x='14' y='26' width='2' height='3'/%3E%3C/g%3E%3C/g%3E%3Ccircle cx='415' cy='140' r='9' fill='%23ffbd55' fill-opacity='0.13'/%3E%3Cg fill='none' stroke='%2362ddff' stroke-opacity='0.09' stroke-width='4'%3E%3Cpath d='M438 86l22-17 22 17'/%3E%3Cpath d='M482 64l20-15 20 15'/%3E%3Cpath d='M524 46l17-13 17 13'/%3E%3C/g%3E%3Ctext x='300' y='588' text-anchor='middle' font-family='monospace' font-size='13' letter-spacing='8' fill='%2362ddff' fill-opacity='0.10'%3EGOOSE SYSTEMS · EST. v4.x%3C/text%3E%3C/svg%3E") 58% 46% / min(82vh, 600px) no-repeat,
    /* grid */
    linear-gradient(rgba(98, 221, 255, 0.045) 1px, transparent 1px) 0 0 / 100% 48px,
    linear-gradient(90deg, rgba(98, 221, 255, 0.045) 1px, transparent 1px) 0 0 / 48px 100%,
    /* depth */
    radial-gradient(ellipse 100% 130% at 50% -20%, var(--wall-2) 0%, var(--wall-1) 55%, #040a12 100%);
}

/* CRT overlays */
.desktop::before {
  content: ""; position: absolute; inset: 0; z-index: 200;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, 0.14) 2px 4px);
}
.desktop::after {
  content: ""; position: absolute; inset: 0; z-index: 201;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 58%, rgba(0, 0, 0, 0.42) 100%);
}

/* identity plate */
.id-plate {
  position: absolute;
  top: 34px; right: 38px;
  text-align: right;
  z-index: 1;
  pointer-events: none;
}
.id-plate h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  letter-spacing: 0.04em;
  color: var(--cyan);
  text-shadow: 0 0 24px rgba(98, 221, 255, 0.4);
  line-height: 1;
}
.id-plate h1 span { color: var(--ink); }
.id-plate p {
  margin-top: 8px;
  font-size: 11px; letter-spacing: 0.18em;
  color: var(--ink-dim);
}
.id-plate .id-status { color: var(--amber); margin-top: 4px; }

/* split-screen widths: slim the identity plate so it never collides with icons */
@media (max-width: 1120px) and (min-width: 681px) {
  .id-plate { top: 24px; right: 26px; max-width: 300px; }
  .id-plate h1 { font-size: 32px; }
  .id-plate p { display: none; }
  .id-plate p.id-status { display: block; font-size: 9px; margin-top: 6px; }
}

/* ════════════════ desktop icons ════════════════ */

.icon-field {
  position: absolute;
  top: 24px; left: 22px; bottom: 64px;
  z-index: 2;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 6px 22px;
  overflow-y: auto;
  scrollbar-width: none;
}
.icon-field::-webkit-scrollbar { display: none; }
.iblock { display: flex; flex-direction: column; min-height: 0; }
.glabel {
  font-size: 9px;
  font-weight: 400;
  letter-spacing: 0.3em;
  color: var(--ink-faint);
  margin: 0 0 8px 9px;
  text-shadow: 1px 1px 0 #000;
}
.igroup {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-content: flex-start;
  gap: 2px;
}
.icon-field .dicon.mob-only { display: none; }

.dicon {
  width: 96px;
  padding: 7px 4px 5px;
  background: transparent;
  border: 1px dotted transparent;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.dicon:hover, .dicon:focus-visible {
  border-color: var(--cyan-dim);
  background: rgba(98, 221, 255, 0.07);
}
.dicon-art { width: 34px; height: 34px; display: block; }
.dicon-art svg {
  width: 100%; height: 100%;
  shape-rendering: crispEdges;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.55));
}
.dicon-label {
  font-size: 11px;
  text-align: center;
  line-height: 1.25;
  text-shadow: 1px 1px 0 #000;
}

/* full PC-style icon set on the desktop (also the app grid on mobile) */
.m-only { display: flex; }

/* pixel icon fills */
.px-cyan { fill: var(--cyan); }
.px-cyan-dim { fill: var(--cyan-dim); }
.px-amber { fill: var(--amber); }
.px-dark { fill: #06121c; }
.px-paper { fill: #d9eef7; }
.px-line { fill: var(--cyan-dim); }
.px-green { fill: var(--green); }
.px-stroke-dark { fill: none; stroke: #06121c; stroke-width: 2; }

/* ════════════════ windows ════════════════ */

.window-layer { position: absolute; inset: 0; z-index: 10; pointer-events: none; }

.window {
  position: absolute;
  width: min(560px, 86%);
  max-height: calc(100% - 110px);
  display: flex;
  flex-direction: column;
  pointer-events: auto;
}
.window.wide { width: min(760px, 92%); }

/* critical: hidden must beat display:flex — windows stay closed until launched */
.window[hidden] { display: none !important; }

.window.is-active { z-index: 60; }
.window.is-active .titlebar {
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
}

.titlebar {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 6px 5px 10px;
  background: linear-gradient(90deg, #081722, #0e2c3d);
  cursor: grab;
  user-select: none;
  touch-action: none;
  flex-shrink: 0;
}
.titlebar:active { cursor: grabbing; }
.titlebar-icon { color: var(--cyan); font-size: 13px; }
.titlebar h2 {
  flex: 1;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cyan-hot);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.titlebar-btns { display: flex; gap: 4px; }
.titlebar-btns button {
  width: 24px; height: 22px;
  font-size: 13px; line-height: 1;
  color: var(--ink);
  display: grid; place-items: center;
  padding: 0;
}
.titlebar-btns .tb-close:hover { color: var(--red); }
.titlebar-btns .tb-min:hover { color: var(--cyan); }

.winbody {
  padding: 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-deep) transparent;
  font-size: 13px;
}
.winpath {
  font-size: 11px; color: var(--ink-faint);
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.dim { color: var(--ink-faint); }
.stat { font-size: 10px; letter-spacing: 0.14em; color: var(--cyan); }
.stat.warn { color: var(--amber); }

/* notepad */
.notepad {
  padding: 14px;
  background: #04101a;
  color: var(--ink);
}
.notepad p { margin-bottom: 12px; }
.notepad p:last-child { margin-bottom: 0; }

/* changelog */
.changelog { display: flex; flex-direction: column; }
.ver {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 4px 16px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--cyan-deep);
}
.ver:last-child { border-bottom: 0; }
.ver-tag { color: var(--cyan); font-weight: 600; font-size: 13px; }
.ver-tag span {
  display: block;
  font-size: 9px; letter-spacing: 0.12em;
  color: var(--ink-faint); font-weight: 400;
  margin-top: 3px;
}
.ver h3 { font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.ver p { font-size: 12.5px; color: var(--ink-dim); }
.ver .note { margin-top: 5px; font-size: 11.5px; }
.ver.current { border-left: 3px solid var(--amber); padding-left: 12px; margin-left: -15px; }
.ver.current .ver-tag, .ver.current h3 { color: var(--amber); }

/* modules */
.modgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}
.modcard {
  border: 1px solid var(--cyan-deep);
  background: rgba(4, 16, 26, 0.6);
  padding: 12px;
}
.modcard header {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 8px;
}
.modcard h3 { font-size: 12.5px; color: var(--cyan); letter-spacing: 0.06em; }
.modcard p { font-size: 12px; color: var(--ink-dim); margin-bottom: 8px; }
.modcard pre {
  font-size: 11px; line-height: 1.5;
  padding: 8px; overflow-x: auto;
  color: var(--ink);
}
.modcard .pending { color: var(--amber); font-size: 11.5px; }
.gate-row { display: flex; gap: 8px; margin: 10px 0 8px; }
.gate-row button { flex: 1; padding: 7px 0; font-size: 11px; }
.gate-row #gateApprove { color: var(--amber); }
.gate-row #gateDeny { color: var(--red); }
.gate-out { font-size: 11.5px; color: var(--amber); min-height: 1.3em; }

/* artifacts */
.artgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 14px;
}
.artcard {
  border: 1px solid var(--cyan-deep);
  background: rgba(4, 16, 26, 0.6);
  padding: 14px;
  display: flex; flex-direction: column;
}
.artcard header span { font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.16em; }
.artcard h3 { font-size: 15px; color: var(--cyan); margin: 3px 0 8px; }
.artcard p { font-size: 12px; color: var(--ink-dim); flex: 1; }
.artcard footer {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 10px; padding-top: 9px;
  border-top: 1px dashed var(--cyan-deep);
}
.artcard footer a, .linklike {
  font-size: 11px; letter-spacing: 0.08em;
  background: none; border: 0; cursor: pointer;
  color: var(--cyan); text-decoration: underline;
  padding: 0; font-family: var(--mono);
}

/* proof */
.opslog { display: flex; flex-direction: column; }
.opslog > div {
  display: grid; grid-template-columns: 92px 1fr; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(98, 221, 255, 0.08);
  font-size: 12px;
}
.opslog span { color: var(--ink-faint); letter-spacing: 0.06em; font-size: 10.5px; padding-top: 2px; }
.opslog p { color: var(--ink-dim); }
.opslog b { color: var(--ink); }

/* talk */
.talkbody { display: flex; flex-direction: column; min-height: 300px; }
.chatlog {
  flex: 1;
  min-height: 180px; max-height: 260px;
  overflow-y: auto;
  padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 10px;
}
.msg { max-width: 88%; padding: 7px 10px; font-size: 12px; line-height: 1.5; }
.msg.bot { align-self: flex-start; background: rgba(98, 221, 255, 0.08); border: 1px solid var(--cyan-deep); color: var(--ink); }
.msg.user { align-self: flex-end; background: var(--cyan-deep); color: var(--cyan-hot); }
.msg .pre { display: block; font-size: 9.5px; letter-spacing: 0.12em; color: var(--ink-faint); margin-bottom: 3px; }
.chatrow { display: flex; gap: 8px; }
.chatrow input {
  flex: 1; padding: 9px 10px;
  color: var(--ink); font-family: var(--mono); font-size: 12.5px;
}
.chatrow input:focus { outline: 1px solid var(--cyan-dim); }
.chatrow button { padding: 0 16px; color: var(--cyan); }
.chatnote { margin-top: 9px; font-size: 10.5px; }

/* ports — folder view with icons */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}
.ficon {
  display: flex; flex-direction: column; align-items: center;
  gap: 5px;
  padding: 12px 6px 10px;
  border: 1px dotted transparent;
  text-decoration: none;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
}
.ficon:hover, .ficon:focus-visible {
  border-color: var(--cyan-dim);
  background: rgba(98, 221, 255, 0.07);
}
.ficon .dicon-art { width: 36px; height: 36px; }
.ficon .dicon-art svg {
  width: 100%; height: 100%;
  shape-rendering: crispEdges;
  filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.55));
}
.ficon > span:not(.dicon-art) { font-size: 11px; }
.ficon small { font-size: 9px; color: var(--ink-faint); letter-spacing: 0.06em; }
.ficon.future { opacity: 0.45; cursor: default; }

.portlist { display: flex; flex-direction: column; gap: 10px; }
.portlist a, .portlist .future {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 4px 14px; align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--cyan-deep);
  background: rgba(4, 16, 26, 0.6);
  text-decoration: none;
  font-size: 12px;
}
.portlist a:hover { border-color: var(--cyan); }
.portlist b { color: var(--cyan); letter-spacing: 0.1em; font-size: 11.5px; }
.portlist a span, .portlist .future > span { color: var(--ink-dim); }
.portlist i { font-style: normal; font-size: 9.5px; color: var(--ink-faint); letter-spacing: 0.12em; }
.portlist .future { opacity: 0.55; }

/* ════════════════ taskbar + start ════════════════ */

.taskbar {
  position: absolute;
  left: 6px; right: 6px; bottom: 6px;
  z-index: 100;
  display: flex; align-items: stretch; gap: 8px;
  padding: 5px;
  height: 46px;
}
.start {
  display: flex; align-items: center; gap: 7px;
  padding: 0 14px;
  font-weight: 700; font-size: 12px; letter-spacing: 0.1em;
  color: var(--cyan);
}
.start svg { width: 20px; height: 20px; }
.task-tabs {
  flex: 1;
  display: flex; gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}
.task-tabs::-webkit-scrollbar { display: none; }
.task-tabs button {
  min-width: 110px; max-width: 170px;
  padding: 0 12px;
  font-size: 11px;
  text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink);
}
.task-tabs button[aria-current="true"] { color: var(--cyan-hot); background: #0a1d2a; }
.tray {
  display: flex; align-items: center; gap: 9px;
  padding: 0 12px;
  font-size: 11.5px; color: var(--ink-dim);
}
.tray-led {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
}

.start-menu {
  position: absolute;
  left: 10px; bottom: 56px;
  z-index: 150;
  display: flex;
  width: 240px;
}
.start-menu[hidden] { display: none; }
.start-side {
  width: 28px;
  background: linear-gradient(to top, var(--title-b), var(--title-a));
  display: flex; align-items: flex-end; justify-content: center;
  padding: 10px 0;
}
.start-side span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 11px; font-weight: 700; letter-spacing: 0.2em;
  color: var(--cyan-hot);
}
.start-items { flex: 1; padding: 6px; display: flex; flex-direction: column; }
.start-items button, .start-items a {
  text-align: left;
  background: none; border: 0;
  padding: 9px 10px;
  font-size: 12px;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font-family: var(--mono);
}
.start-items button:hover, .start-items a:hover,
.start-items button:focus-visible, .start-items a:focus-visible {
  background: var(--cyan-deep); color: var(--cyan-hot);
}
.start-items hr { border: 0; border-top: 1px solid var(--cyan-deep); margin: 6px 4px; }

/* ════════════════ start submenus ════════════════ */

.smi { position: relative; }
.smi .sub-toggle {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
}
.smi .sub-toggle i { font-style: normal; color: var(--ink-faint); }
.submenu {
  display: none;
  position: absolute;
  left: 100%; bottom: 0;
  width: 190px;
  padding: 6px;
  flex-direction: column;
  background: var(--plastic-face);
  border: 2px solid;
  border-color: var(--plastic-hi) var(--plastic-lo) var(--plastic-lo) var(--plastic-hi);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.5);
}
.smi:hover .submenu,
.smi.open .submenu,
.smi:focus-within .submenu { display: flex; }
.submenu button, .submenu a {
  display: block;
  text-align: left;
  background: none; border: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--mono);
  text-decoration: none;
}
.submenu button:hover, .submenu button:focus-visible,
.submenu a:hover, .submenu a:focus-visible {
  background: var(--cyan-deep); color: var(--cyan-hot);
}

/* ════════════════ GPT launcher ════════════════ */

.gptsec {
  margin: 18px 0 10px;
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--ink-faint);
  border-bottom: 1px dashed var(--cyan-deep);
  padding-bottom: 5px;
}
.gptsec:first-of-type { margin-top: 4px; }
.gptgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 9px;
}
.gptcard {
  border: 1px solid var(--cyan-deep);
  background: rgba(4, 16, 26, 0.6);
  padding: 10px 11px;
  display: flex; flex-direction: column;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.15s;
}
.gptcard:hover, .gptcard:focus-visible {
  border-color: var(--cyan);
  transform: translateY(-2px);
}
.gptcard header { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.gpt-led {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}
.gptcard h3 { font-size: 12.5px; color: var(--cyan); }
.gptcard:hover h3 { color: var(--cyan-hot); }
.gptcard p { font-size: 11px; color: var(--ink-dim); margin: 0; }

/* ════════════════ Botpress Bay ════════════════ */

.bp-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.bp-launch, .bp-reel {
  display: inline-block;
  padding: 11px 18px;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 2px solid;
}
.bp-launch {
  color: #07121b;
  background: var(--cyan);
  border-color: var(--cyan-hot) var(--cyan-dim) var(--cyan-dim) var(--cyan-hot);
  font-weight: 700;
}
.bp-launch:hover { background: var(--cyan-hot); color: #07121b; }
.bp-reel {
  color: var(--cyan);
  background: var(--plastic);
  border-color: var(--plastic-hi) var(--plastic-lo) var(--plastic-lo) var(--plastic-hi);
}
.bp-reel:hover { color: var(--cyan-hot); }
.bp-slot {
  margin-top: 12px;
  padding: 18px;
  border: 2px solid;
  border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo);
  background: #04101a;
}
.bp-slot-title {
  color: var(--amber);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}
.bp-slot p { font-size: 12.5px; color: var(--ink-dim); margin-bottom: 8px; }
.bp-slot p:last-child { margin-bottom: 0; }

/* ════════════════ open channel ════════════════ */

.channel-addr {
  font-size: clamp(15px, 2.6vw, 20px);
  color: var(--cyan-hot);
  letter-spacing: 0.04em;
  padding: 12px;
  margin-bottom: 12px;
  border: 2px solid;
  border-color: var(--plastic-lo) var(--plastic-hi) var(--plastic-hi) var(--plastic-lo);
  background: #04101a;
  user-select: all;
  overflow-wrap: anywhere;
}
.channel-mailto {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 7px 0;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--cyan);
  background: var(--plastic);
  border: 2px solid;
  border-color: var(--plastic-hi) var(--plastic-lo) var(--plastic-lo) var(--plastic-hi);
}
.channel-mailto:hover { color: var(--cyan-hot); }
.copy-out { min-height: 1.2em; margin-bottom: 10px; font-size: 11px; color: var(--amber); }

/* ════════════════ FATAL.err ════════════════ */

.fatalbody .fatal-line { color: var(--ink-dim); margin-bottom: 6px; }
.fatalbody .fatal-stop {
  color: var(--red);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 10px 0;
}
.fatalbody .gate-row button { color: var(--amber); }

/* ════════════════ screensaver ════════════════ */

.saver {
  position: absolute; inset: 0;
  z-index: 400;
  background: #010409;
  cursor: pointer;
}
.saver[hidden] { display: none; }
.saver canvas { width: 100%; height: 100%; display: block; }
.saver-hint {
  position: absolute;
  bottom: 18px; left: 0; right: 0;
  text-align: center;
  font-size: 10px; letter-spacing: 0.22em;
  color: var(--ink-faint);
  pointer-events: none;
}

/* ════════════════ honk storm ════════════════ */

.honk-bit {
  position: absolute;
  z-index: 350;
  font-weight: 700;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 189, 85, 0.55);
  pointer-events: none;
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .honk-bit { animation: honkbit 1.6s ease-out forwards; }
  @keyframes honkbit {
    0% { opacity: 0; transform: translateY(12px) scale(0.6) rotate(-6deg); }
    15% { opacity: 1; transform: translateY(0) scale(1.1) rotate(3deg); }
    70% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-70px) scale(0.9) rotate(-4deg); }
  }
}

/* ════════════════ goose assistant ════════════════ */

.goose-zone {
  position: absolute;
  right: 22px; bottom: 58px;
  z-index: 90;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 10px;
}

.goose {
  position: relative;
  width: 130px; height: 102px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}
.goose svg { width: 100%; height: 100%; overflow: visible; }

.g-shadow { fill: rgba(0, 0, 0, 0.4); }
.g-body, .g-tail {
  fill: #cfe6f0;
  stroke: #07121b; stroke-width: 2.5;
}
.g-wing {
  fill: #9dbecd;
  stroke: #07121b; stroke-width: 2;
}
.g-neck, .g-head {
  fill: #0b1219;
  stroke: #2c3e4c; stroke-width: 1.5;
}
.g-chin { fill: #eef7fb; }
.g-beak { fill: var(--amber); stroke: #07121b; stroke-width: 1.5; }
.g-eye { fill: var(--cyan); }
.g-foot { fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-linecap: round; }

.g-watch {
  transform-box: fill-box;
  transform-origin: 30% 90%;
  transform: rotate(var(--goose-rotate, 0deg));
  transition: transform 140ms ease-out;
}
.goose:hover .g-eye { fill: var(--amber); }

.goose-honk {
  position: absolute;
  top: -16px; right: 4px;
  font-size: 15px; font-weight: 700; letter-spacing: 0.16em;
  color: var(--amber);
  text-shadow: 0 0 10px rgba(255, 189, 85, 0.6);
  opacity: 0;
  pointer-events: none;
}
.goose-honk.is-honking { opacity: 1; }

.goose-bubble {
  width: min(290px, 70vw);
  position: relative;
}
.goose-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px; right: 44px;
  width: 14px; height: 14px;
  background: var(--plastic-face);
  border-right: 2px solid var(--plastic-lo);
  border-bottom: 2px solid var(--plastic-lo);
  transform: rotate(45deg);
}
.goose-bubble-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 8px;
  background: linear-gradient(90deg, var(--title-a), var(--title-b));
  font-size: 10px; letter-spacing: 0.16em; color: var(--cyan-hot);
}
.goose-bubble-bar button {
  background: none; border: 0;
  color: inherit; font-size: 13px; line-height: 1;
  padding: 1px 5px; cursor: pointer;
}
.goose-bubble > p {
  padding: 11px 12px 7px;
  font-size: 12px; line-height: 1.55;
  color: var(--ink);
}
.goose-bubble-actions { display: flex; justify-content: flex-end; padding: 2px 10px 10px; }
.goose-bubble-actions button { padding: 6px 12px; font-size: 11px; color: var(--cyan); }

/* ════════════════ mobile chrome (hidden on desktop) ════════════ */

.m-statusbar, .m-homebar { display: none; }

/* ════════════════ animations (motion-safe only) ════════════════ */

@media (prefers-reduced-motion: no-preference) {
  .tray-led, .chin-led { animation: led-pulse 2.4s infinite; }
  @keyframes led-pulse { 50% { opacity: 0.35; } }

  .desktop { animation: crt-flicker 9s infinite; }
  @keyframes crt-flicker {
    0%, 100% { opacity: 1; }
    97.5% { opacity: 1; }
    98% { opacity: 0.93; }
    98.5% { opacity: 1; }
  }

  .window:not([hidden]) { animation: win-open 0.16s ease-out; }
  @keyframes win-open {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: none; }
  }

  .goose-bubble:not([hidden]) { animation: bubble-in 0.2s ease-out; }
  @keyframes bubble-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
  }

  .goose.is-waddling svg { animation: waddle 0.7s ease-in-out 2; }
  @keyframes waddle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-2.5deg) translateY(-1px); }
    75% { transform: rotate(2.5deg) translateY(-1px); }
  }

  .goose-honk.is-honking { animation: honk-pop 0.9s ease-out forwards; }
  @keyframes honk-pop {
    0% { opacity: 0; transform: translateY(6px) scale(0.7); }
    20% { opacity: 1; transform: translateY(-4px) scale(1.15) rotate(-4deg); }
    60% { opacity: 1; transform: translateY(-12px) rotate(3deg); }
    100% { opacity: 0; transform: translateY(-22px) scale(0.9); }
  }

  .id-plate h1 { animation: plate-glow 5s ease-in-out infinite; }
  @keyframes plate-glow {
    0%, 100% { text-shadow: 0 0 24px rgba(98, 221, 255, 0.4); }
    50% { text-shadow: 0 0 34px rgba(98, 221, 255, 0.6); }
  }
}

/* ════════════════ MOBILE — the handheld shell ════════════════ */

@media (max-width: 680px) {
  body { padding: 10px; }

  /* handheld: no monitor head, no keyboard */
  .machine-head, .keyboard-deck { display: none; }
  .workstation { width: 100%; }

  .monitor {
    width: 100%;
    height: calc(100vh - 70px);
    height: calc(100dvh - 70px);
    min-height: 480px;
    border-radius: 26px;
    padding: 10px 10px 0;
  }
  .monitor-chin { height: 30px; }
  .chin-brand { font-size: 8px; letter-spacing: 0.3em; }

  /* status bar */
  .m-statusbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 110;
    padding: 8px 14px;
    font-size: 10px; letter-spacing: 0.12em;
    color: var(--ink-dim);
    background: rgba(2, 8, 14, 0.85);
    border-bottom: 1px solid var(--cyan-deep);
  }
  .m-signal { color: var(--cyan); }

  /* identity plate becomes header */
  .id-plate {
    position: absolute;
    top: 44px; left: 0; right: 0;
    text-align: center;
    padding: 0 16px;
  }
  .id-plate h1 { font-size: 34px; }
  .id-plate p { font-size: 9px; letter-spacing: 0.14em; }

  /* icons become app grid; groups flatten into labeled sections */
  .icon-field {
    top: 150px; left: 10px; right: 10px; bottom: 64px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-content: start;
    gap: 10px 6px;
    overflow-y: auto;
  }
  .iblock, .igroup { display: contents; }
  .glabel {
    grid-column: 1 / -1;
    margin: 12px 4px 0;
    padding-bottom: 4px;
    border-bottom: 1px dashed var(--cyan-deep);
  }
  .dicon { width: auto; padding: 10px 2px 8px; }
  .m-only { display: flex; }
  .icon-field .dicon.mob-only { display: flex; }
  .dicon-art { width: 44px; height: 44px; }
  .dicon-label { font-size: 10.5px; }

  /* windows go full screen */
  .window, .window.wide {
    width: auto;
    left: 0 !important; right: 0 !important;
    top: 32px !important; bottom: 50px !important;
    transform: none !important;
    max-height: none;
  }
  .titlebar { cursor: default; padding: 8px 8px 8px 12px; }
  .titlebar-btns .tb-min { display: none; }
  .titlebar-btns button { width: 30px; height: 28px; }
  .winbody { font-size: 13px; -webkit-overflow-scrolling: touch; }

  .ver { grid-template-columns: 1fr; gap: 4px; }
  .ver.current { margin-left: 0; padding-left: 10px; }
  .opslog > div { grid-template-columns: 1fr; gap: 3px; }
  .portlist a, .portlist .future { grid-template-columns: 1fr; gap: 3px; }

  /* no taskbar / start / goose on handheld */
  .taskbar, .start-menu, .goose-zone { display: none; }

  /* home bar */
  .m-homebar {
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 110;
    padding: 9px 0 11px;
    background: rgba(2, 8, 14, 0.85);
    border-top: 1px solid var(--cyan-deep);
  }
  .m-homebar button {
    width: 110px; height: 5px;
    border: 0; border-radius: 3px;
    background: var(--cyan-dim);
    cursor: pointer;
  }
  .m-homebar button:active { background: var(--cyan); }

  .under-monitor { font-size: 9.5px; gap: 4px 14px; }
}

/* ════════════════ reduced motion hard stop ════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .boot { display: none !important; }
}
