@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../assets/fonts/Inter.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../assets/fonts/InterMedium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600 700; font-display: swap; src: url("../assets/fonts/InterSemiBold.woff2") format("woff2"); }
@font-face { font-family: "Caskaydia Cove Nerd Font Mono"; font-weight: 400; font-display: swap;
  src: local("CaskaydiaCove Nerd Font Mono"), local("Caskaydia Cove Nerd Font Mono"), url("../assets/fonts/CaskaydiaCoveNFM-Regular.woff2") format("woff2"); }
@font-face { font-family: "Caskaydia Cove Nerd Font Mono"; font-weight: 700; font-display: swap;
  src: local("CaskaydiaCove Nerd Font Mono Bold"), url("../assets/fonts/CaskaydiaCoveNFM-Bold.woff2") format("woff2"); }
@font-face { font-family: "Small Espixel7"; font-display: swap; src: url("../assets/fonts/SmallPixel7.woff") format("woff"); }
@font-face { font-family: "ProggyClean"; font-display: swap; src: url("../assets/fonts/ProggyClean.woff") format("woff"); }
@font-face { font-family: "Minecraftia"; font-display: swap; src: url("../assets/fonts/Minecraftia.woff") format("woff"); }

:root {
  --font: Verdana, "Caskaydia Cove Nerd Font Mono", "JetBrainsMono Nerd Font Mono", Tahoma, "Small Espixel7", "ProggyClean", "Minecraftia", monospace;
  --sans: "Inter", Verdana, "Caskaydia Cove Nerd Font Mono", "JetBrainsMono Nerd Font Mono", Tahoma, "Small Espixel7", "ProggyClean", "Minecraftia", sans-serif;
  --mono: "Caskaydia Cove Nerd Font Mono", "JetBrainsMono Nerd Font Mono", Verdana, Tahoma, "Small Espixel7", "ProggyClean", "Minecraftia", monospace;

  --bg: #0b0b0b;
  --panel: #1e1e1e;
  --panel-2: #232323;
  --card: #262626;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .13);
  --ink: #dcdcdc;
  --ink-2: #a6a6a6;
  --dim: #858585;
  --white: #ffffff;

  /* strictly monochrome: neutral greys only, state is carried by fill / weight / pattern */
  --accent: #e8e8e8;
  --accent-fill: #e8e8e8;
  --on-accent: #0b0b0b;  --accent-2: #bdbdbd;
  --accent-3: #f2f2f2;
  --accent-4: #b0b0b0;
  --pal: #bdbdbd, #8f8f8f, #d0d0d0, #f2f2f2, #6a6a6a;  /* handed to js/widgets/* as opts.palette */

  --ok: #f2f2f2;
  --warn: #a8a8a8;
  --err: #f2f2f2;

  /* discord presence: greys only, shape carries the status; recolour here */
  --discord-online: #f2f2f2;
  --discord-idle: #bcbcbc;
  --discord-dnd: #9a9a9a;
  --discord-offline: #747474;

  /* corner radii: tune here only */
  --r: 4px;
  --r-sm: 3px;
  --r-xs: 2px;
  --r-win: var(--r);
  --r-btn: var(--r-sm);
  --bar-h: 40px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);   /* fallback; real spring below */
  --out: cubic-bezier(.23, 1, .32, 1);
  --dur: .6s;
  --glow: rgba(255, 255, 255, .045);
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Cpath d='M1 4h1v1h-1zM2 5h1v1h-1zM3 6h1v1h-1zM1 5h1v1h-1zM2 6h1v1h-1zM3 7h1v1h-1zM4 6h1v1h-1zM5 5h1v1h-1zM6 4h1v1h-1zM7 3h1v1h-1zM8 2h1v1h-1zM4 7h1v1h-1zM5 6h1v1h-1zM6 5h1v1h-1zM7 4h1v1h-1zM8 3h1v1h-1z' fill='%230b0b0b'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; background: var(--bg); overflow: hidden; }
body { font: 13px/20px var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
::selection { background: var(--accent-fill); color: var(--on-accent); }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 500; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
img { filter: grayscale(1) contrast(1.05); }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .16s var(--out) both; }
::view-transition-new(root) { animation: vt-in .42s var(--out) .04s both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }

#boot {
  position: fixed; inset: 0; z-index: 100; background: var(--bg); color: var(--ink);
  font: 14px/20px var(--mono); padding: 22px 26px; overflow: hidden; cursor: pointer;
  transition: clip-path .75s cubic-bezier(.7, 0, .2, 1);
  clip-path: inset(0 0 0 0);
}
#boot.out { clip-path: inset(0 0 100% 0); pointer-events: none; }
#boot.crt { transition: none; clip-path: none; cursor: default; pointer-events: none; }
.crt-line { position: fixed; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--ink); box-shadow: 0 0 10px 1px color-mix(in srgb, var(--ink) 45%, transparent); opacity: 0; }
.crt-dot { position: fixed; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 2px; background: var(--ink); box-shadow: 0 0 14px 3px color-mix(in srgb, var(--ink) 50%, transparent); opacity: 0; }
.crt-ring { position: fixed; left: 50%; top: 50%; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 4px; border: 1px solid var(--accent); opacity: 0; }
#boot.gone { display: none; }
#boot-log { margin: 0; font: inherit; white-space: pre-wrap; word-break: break-all; }
#boot-log .cur { display: inline-block; width: .6em; height: 1.05em; background: var(--accent); vertical-align: -2px; animation: blink 1s steps(1) infinite; }
#boot-log .ok { color: var(--accent); font-weight: 700; }
#boot-skip { position: fixed; right: 22px; bottom: 16px; color: var(--dim); font: 12px var(--mono); }
@keyframes blink { 50% { opacity: 0; } }

#desktop {
  position: fixed; inset: 0; display: flex; flex-direction: column; font-family: var(--sans);
  background-color: var(--bg);
  opacity: 0; transition: opacity .6s .2s;
}
#desktop.ready { opacity: 1; }
#topo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; display: none; pointer-events: none; }

#topbar {
  flex: 0 0 var(--bar-h); height: var(--bar-h); margin: 8px 8px 0; padding: 0 6px 0 8px;
  display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm);
  box-shadow: inset 0 1px 0 var(--glow), 0 8px 24px rgba(0, 0, 0, .35);
  position: relative; z-index: 5; user-select: none; font: 11px/1 var(--mono);
}
#topbar > div { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.tb-r { justify-content: flex-end; overflow: clip; overflow-clip-margin: 4px; container: tbr / inline-size; }
.tb-r > * { flex: 0 0 auto; }
.tb-c { gap: 10px !important; }

.brand { display: flex; align-items: center; gap: 7px; text-decoration: none; font: 600 13px/14px var(--sans); letter-spacing: -.01em; margin-right: 6px; border-radius: var(--r-sm); padding: 4px 4px 4px 2px; }
.brand b { font-weight: 600; }
.logo { width: 24px; height: 24px; background: url("../assets/logo-mark.png") center / contain no-repeat; flex: 0 0 auto; transition: transform .5s var(--spring); }
.brand:hover .logo { transform: scale(1.1) rotate(-5deg); }
.brand:active .logo { transform: scale(.94); transition-duration: .09s; }

.ws { display: flex; gap: 4px; }
.tile {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; z-index: 1; width: 28px; height: 28px; display: grid; place-items: center;
  font: 13px/1 var(--mono); color: var(--dim); border-radius: var(--r-btn); border: 1px solid transparent;
  transition: color .25s, background .25s, border-color .25s, transform .3s var(--spring);
}
.tile:hover { color: var(--ink); background: rgba(255, 255, 255, .05); transform: translateY(-1px); }
.tile:active { transform: scale(.94); }
.tile:focus-visible { outline: 1px solid var(--accent); outline-offset: 1px; }
.tile.on { color: var(--on-accent); background: none; }.tile[aria-pressed="true"] { color: var(--on-accent); background: var(--accent-fill); }
.ws, .seg { position: relative; }
.ind { position: absolute; left: 0; top: 0; border-radius: var(--r-btn); background: var(--accent-fill); border: 1px solid var(--accent-fill); opacity: 0; transition: opacity .25s; pointer-events: none; will-change: transform; }
.seg .ind { border-radius: var(--r-xs); background: var(--accent-fill); }

#clock { font: 700 13px/14px var(--mono); color: var(--ink); letter-spacing: .02em; }
#date { color: var(--dim); font: 11px/12px var(--mono); letter-spacing: .04em; }
.vdiv { width: 1px; height: 18px; background: var(--line-2); }


.chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; font: 11px/12px var(--mono); letter-spacing: .04em; padding: 0 9px; border-radius: var(--r-sm); border: 1px solid var(--line); background: rgba(255, 255, 255, .025); color: var(--dim); }
.chip[hidden] { display: none; }
.chip b { font-weight: 400; color: var(--ink-2); }
.chip.tag { color: var(--on-accent); background: var(--accent-2); border-color: var(--accent-2); }
.tag { font: normal 11px/1 var(--mono); letter-spacing: .04em; color: var(--on-accent); background: var(--accent-2); border: 1px solid var(--accent-2); padding: 3px 7px; border-radius: var(--r-xs); }
button.chip { cursor: pointer; transition: color .2s, border-color .2s, background .2s, transform .16s var(--out); }
button.chip:hover { color: var(--ink); border-color: var(--line-2); }
button.chip:active { transform: scale(.97); }

#botbar { flex: 0 0 52px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 5; pointer-events: none; }
.pill { pointer-events: auto; display: flex; align-items: center; gap: 14px; min-height: 32px; padding: 8px 14px; border-radius: var(--r-sm); background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--glow), 0 8px 24px rgba(0, 0, 0, .35); font: 11px/1 var(--mono); color: var(--dim); letter-spacing: .03em; user-select: none; max-width: calc(100vw - 16px); }
.hint { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.hint kbd:not(:first-child) { margin-left: 4px; }
kbd { font: inherit; color: var(--ink-2); }
kbd::before { content: "["; color: var(--dim); }
kbd::after { content: "]"; color: var(--dim); }
.pos { white-space: nowrap; min-width: 15ch; text-align: right; font-variant-numeric: tabular-nums; }
#viewport { flex: 1 1 0; min-height: 0; position: relative; overflow: hidden; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
#viewport.panning, #viewport.panning * { cursor: grabbing !important; }
#world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; }
#web { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; pointer-events: none; }
.cluster { display: contents; }
.cl-label { display: none; }
.node { position: absolute; left: 0; top: 0; }

#labels { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.cl, .nl { position: absolute; left: 0; top: 0; white-space: nowrap; font: 11px/14px var(--mono); letter-spacing: .04em; color: var(--dim); }
.cl b { font-weight: 400; color: var(--ink-2); }
.cl small { display: block; font: inherit; opacity: .6; font-variant-numeric: tabular-nums; }
.nl { opacity: 0; }
.nl b { font-weight: 500; color: var(--ink-2); }

#minimap { position: absolute; right: 8px; bottom: 8px; width: 168px; height: 112px; z-index: 6; overflow: hidden; cursor: crosshair; touch-action: none; user-select: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: inset 0 1px 0 var(--glow), 0 8px 24px rgba(0, 0, 0, .35); }
.mm-n, .mm-v { position: absolute; left: 0; top: 0; pointer-events: none; }
.mm-n { background: var(--line-2); border-radius: 1px; transition: background .25s; }
.mm-n.on { background: var(--accent-fill); }
.mm-v { border: 1px solid color-mix(in srgb, var(--accent) 80%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 1px; }

.win {
  width: 100%; height: 100%; display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-win);
  box-shadow: inset 0 1px 0 var(--glow), 0 12px 32px rgba(0, 0, 0, .45);
  position: relative; transition: border-color .35s var(--out);
}
@media (hover: hover) and (pointer: fine) {
  #viewport:not(.panning):not(.holding) .node:hover .win { border-color: var(--line-2); }
}
.node.focused .win, .node.focused:hover .win { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.node.dragging .win { border-color: var(--line-2); }
#viewport.holding, #viewport.holding * { cursor: grabbing !important; }

.wh { display: flex; align-items: center; gap: 11px; padding: 14px 16px 12px; flex: 0 0 auto; cursor: grab; }
.wi { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; border-radius: var(--r-sm); font: 14px/1 var(--mono); color: var(--accent-fill); background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); }
.wi img { width: 18px; height: 18px; display: block; object-fit: contain; filter: none; }
.wt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wt h2 { margin: 0; font: 500 13px/14px var(--sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt small { font: 11px/12px var(--mono); letter-spacing: .03em; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wtag { font: 11px/1 var(--mono); letter-spacing: .05em; color: var(--dim); white-space: nowrap; }

.body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 2px 14px 14px; display: flex; flex-direction: column; gap: 10px; color: var(--ink); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; touch-action: pan-y; }
.body.fixed { overflow: hidden; }
.body::-webkit-scrollbar { width: 8px; }
.body::-webkit-scrollbar-track { background: transparent; }
.body::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: var(--r-xs); }

.card { flex: 0 0 auto; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: inset 0 1px 0 var(--glow); }
.card[hidden] { display: none; }
.card p { margin: 0 0 10px; }
.card p:last-child { margin-bottom: 0; }
.ct { margin: 0 0 14px; text-align: center; font: 500 12px/1 var(--sans); color: var(--ink-2); letter-spacing: .01em; }
.term { font-family: var(--mono); }

.wbox { position: relative; width: 100%; overflow: hidden; border-radius: var(--r); background: #121212; border: 1px solid var(--line); }
.wbox.canvas { flex: 1 1 auto; min-height: 0; }
.wbox.text { font: 12px/17px var(--mono); padding: 12px 14px; color: var(--ink-2); flex: 1 1 auto; min-height: 0; }
.wbox canvas { display: block; width: 100%; height: 100%; }
.wbox .wmiss { position: absolute; inset: 0; display: grid; place-items: center; color: var(--dim); font: 12px var(--mono); }
.body.fixed .wbox.text { overflow: auto; }

.prompt { font: 500 12px/17px var(--mono); margin: 0 0 8px !important; color: var(--accent-fill); }
.dim { color: var(--dim); }
.caret { animation: blink 1s steps(1) infinite; }
.handle { margin: 0 0 14px; font: 600 28px/31px var(--sans); letter-spacing: -.02em; }

.seg { display: flex; gap: 4px; padding: 3px; border-radius: var(--r-sm); background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.seg button { all: unset; box-sizing: border-box; flex: 1; position: relative; z-index: 1; text-align: center; cursor: pointer; padding: 7px 10px; border-radius: var(--r-xs); border: 1px solid transparent; font: 500 12px/1 var(--sans); color: var(--dim); transition: color .2s, background .25s, border-color .25s, transform .3s var(--spring); }
.seg button:hover { color: var(--ink); }
.seg button:active { transform: scale(.97); }
.seg button:focus-visible { outline: 1px solid var(--accent); }
.seg button[aria-pressed="true"] { color: var(--on-accent); }

.kv { list-style: none; margin: 0; padding: 0; font: 12.5px/19px var(--sans); }
.kv li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; }
.kv b { flex: 0 0 auto; font: 400 12.5px/19px var(--sans); color: var(--ink-2); }
.kv span { text-align: right; color: var(--ink); }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; font-size: 12.5px; color: var(--ink-2); }
.chk { cursor: pointer; position: relative; }
.chk input { position: absolute; opacity: 0; pointer-events: none; }
/* checkbox: 16x16 box, 1px border, 10x10 tick centred by grid (all integers, so no sub-pixel blur at any DPR) */
.bx, .spec li::after { width: 16px; height: 16px; display: grid; place-items: center; border-radius: var(--r-xs); background: rgba(0, 0, 0, .3); border: 1px solid var(--line-2); flex: 0 0 auto; position: relative; transition: background .2s, border-color .2s, transform .3s var(--spring); }
.chk:hover .bx { border-color: var(--accent); }
.chk:active .bx { transform: scale(.9); }
.chk input:focus-visible + .bx { outline: 1px solid var(--accent); outline-offset: 2px; }
.bx::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; background: var(--accent-fill); clip-path: circle(0% at 50% 50%); transition: clip-path .5s var(--out); }
.chk input:checked + .bx::before { clip-path: circle(75% at 50% 50%); }
.chk input:checked + .bx::after { transition-delay: .07s; }
.bx::after { content: ""; position: relative; width: 10px; height: 10px; background: var(--tick) center / 10px 10px no-repeat; transform: scale(0); transition: transform .3s var(--spring); }
.chk input:checked + .bx, .spec li::after { background: var(--accent-fill); border-color: var(--accent-fill); }
.chk input:checked + .bx::after { transform: none; }

.rng { display: grid; grid-template-columns: 1fr auto; row-gap: 6px; padding: 6px 0 4px; }
.rng output { font: 11px/1 var(--mono); color: var(--ink-2); letter-spacing: .04em; }
.rng input { grid-column: 1 / -1; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; margin: 0; background: transparent; cursor: pointer; --v: 50%; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; border-radius: 0; background: linear-gradient(90deg, var(--accent-fill) var(--v), var(--line-2) var(--v)); }
input[type=range]::-moz-range-track { height: 2px; border-radius: 1px; background: var(--line-2); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--accent-fill); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 12px; margin-top: -5px; border-radius: var(--r-xs); background: var(--ink); border: 0; transition: transform .25s var(--spring); }
input[type=range]::-moz-range-thumb { width: 8px; height: 12px; border-radius: var(--r-xs); background: var(--ink); border: 0; }
input[type=range]:hover::-webkit-slider-thumb, input[type=range]:active::-webkit-slider-thumb { transform: scale(1.3); }

.dd-wrap { position: relative; display: inline-block; min-width: 110px; vertical-align: middle; }
.dd { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: stretch; width: 100%; height: 28px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line-2); border-radius: var(--r-btn); color: var(--ink); font: 12px/1 var(--sans); transition: border-color .2s, background .2s, transform .5s var(--spring); }
.dd:hover, .dd.open { border-color: var(--ink-2); }
.dd.open { background: rgba(0, 0, 0, .4); }
.dd:active { transform: scale(.98); transition-duration: .09s; }
.dd:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
.dd-l { flex: 1; min-width: 0; padding: 0 10px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-ar { flex: 0 0 24px; position: relative; border-left: 1px solid var(--line-2); }
.dd-ar::before { content: ""; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border: solid var(--ink-2); border-width: 0 1.5px 1.5px 0; transform: translate(-50%, -72%) rotate(45deg); transition: transform .45s var(--spring); }
.dd.open .dd-ar::before { transform: translate(-50%, -28%) rotate(225deg); }
.dd-pop { position: fixed; z-index: 300; padding: 3px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-sm); box-shadow: inset 0 1px 0 var(--glow), 0 14px 36px rgba(0, 0, 0, .55); outline: none; overflow: auto; font: 12px/1 var(--sans); scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; user-select: none; }
.dd-i { display: flex; align-items: center; gap: 4px; height: 26px; padding: 0 12px 0 4px; border-radius: var(--r-xs); color: var(--ink-2); text-decoration: none; cursor: pointer; white-space: nowrap; }
.dd-i.act { background: rgba(255, 255, 255, .09); color: var(--white); }
.dd-i.on { color: var(--ink); }
.dd-i.dis { opacity: .4; cursor: default; }
.dd-ck { flex: 0 0 18px; height: 16px; position: relative; }
.dd-i.on .dd-ck::after { content: ""; position: absolute; left: 7px; top: 2px; width: 4px; height: 8px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.dd-h { margin-left: auto; padding-left: 18px; color: var(--dim); font: 11px/1 var(--mono); }
.dd-sep { height: 1px; margin: 3px 2px; background: var(--line); }

.ascii { margin: 6px 0 12px; font: 11px/12px var(--mono); overflow: hidden; white-space: pre; width: round(calc(var(--cols, 40) * 1ch), 1px); max-width: 100%; }
@keyframes breathe { 50% { opacity: .86; } }
.ascii { animation: breathe 5s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .ascii { animation: none; } }
.ascii .ar { display: block; height: 12px; white-space: pre; }
.ascii .t1 { --c: var(--ink-2); }
.ascii .t2 { --c: color-mix(in srgb, var(--ink-2) 62%, var(--bg)); }
.ascii .t1, .ascii .t2 { color: color-mix(in srgb, var(--white) var(--w, 0%), var(--c)); }
.ascii .w1 { --w: 22%; } .ascii .w2 { --w: 46%; } .ascii .w3 { --w: 72%; } .ascii .w4 { --w: 100%; }
.ascii .u { color: var(--dim); opacity: .6; }
.ff { margin: 0; font: 12px/19px var(--mono); }
.ff .hdr { color: var(--accent-fill); font-weight: 700; }
.ff .hr { display: block; width: round(calc(var(--w) * 1ch), 1px); height: 1px; margin: 4px 0; background: var(--line-2); }
.ff div { display: flex; gap: 8px; white-space: nowrap; }
.ff dt { color: var(--accent-4); flex: 0 0 9ch; }
.ff dd { margin: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; }
.swatch { display: grid; grid-template-columns: repeat(8, 28px); gap: 3px; margin-top: 14px; width: max-content; }
.swatch span { height: 14px; border-radius: var(--r-xs); }

.dc-head { display: flex; gap: 16px; align-items: center; }
.dcav { position: relative; flex: 0 0 auto; --dc-cut: var(--card); }
.dcav .dc-img { position: absolute; inset: 0; width: 100%; height: 100%; aspect-ratio: 1; display: block; object-fit: cover; border-radius: var(--r); background: var(--panel-2); }
.dcav .dc-deco { position: absolute; display: block; pointer-events: none; }
.dci { flex: 0 0 auto; fill: currentColor; display: block; }
.dci-badge { position: absolute; display: block; }
.dci-cut { fill: var(--dc-cut); }
.dci-st { fill: currentColor; }
.dci-st[data-s="online"] { color: var(--discord-online); }
.dci-st[data-s="idle"] { color: var(--discord-idle); }
.dci-st[data-s="dnd"] { color: var(--discord-dnd); }
.dci-st[data-s="offline"] { color: var(--discord-offline); }
.dci-badge[data-s="online"] .dci-st { color: var(--discord-online); }
.dci-badge[data-s="idle"] .dci-st { color: var(--discord-idle); }
.dci-badge[data-s="dnd"] .dci-st { color: var(--discord-dnd); }
.dci-badge[data-s="offline"] .dci-st { color: var(--discord-offline); }
.dci-slot { display: inline-flex; flex: 0 0 auto; }
.dc-name { min-width: 0; display: grid; gap: 4px; justify-items: start; }
.dc-nrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.dc-name h3 { margin: 0; font: 600 16px/20px var(--sans); overflow-wrap: anywhere; }
.dc-name small { display: block; color: var(--dim); font: 12px/16px var(--mono); }
.dc-clan { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px 0 2px; border: 1px solid var(--line-2); border-radius: var(--r-xs); font: 600 11px/16px var(--sans); color: var(--ink-2); }
.dc-clan img { width: 16px; height: 16px; aspect-ratio: 1; object-fit: cover; border-radius: var(--r-xs); display: block; }
.dc-clan span { padding-left: 2px; }
.stat { display: inline-flex; gap: 8px; align-items: center; margin-top: 4px; padding: 4px 8px; border: 1px solid var(--line-2); border-radius: var(--r-xs); font: 11px/16px var(--mono); color: var(--ink-2); }
.dc-card h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 500 12px/16px var(--sans); color: var(--ink-2); }
.dc-card h4 .dci { opacity: .8; }
.dc-card .l1 { font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.dc-card .l2 { color: var(--dim); font: 11.5px/16px var(--mono); overflow-wrap: anywhere; }
.dc-card .l1 { line-height: 20px; }
.dc-act { display: flex; gap: 12px; align-items: flex-start; }
.dc-tx { min-width: 0; display: grid; gap: 0; }
.dc-art { position: relative; flex: 0 0 auto; width: 64px; height: 64px; --dc-cut: var(--card); }
.dc-art img:first-child { width: 64px; height: 64px; aspect-ratio: 1; display: block; object-fit: cover; border-radius: var(--r); background: var(--panel-2); }
.dc-art .dc-art-sm { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; aspect-ratio: 1; object-fit: cover; border-radius: 50%; background: var(--panel-2); box-shadow: 0 0 0 2px var(--card); }
.dc-time { font-variant-numeric: tabular-nums; margin-top: 4px; color: var(--ink-2); }
.dc-card.err { border-color: var(--ink-2); }
.dc-card.err .l1 { color: var(--err); font-weight: 600; }
.cemoji { width: 16px; height: 16px; aspect-ratio: 1; object-fit: contain; display: inline-block; vertical-align: -3px; margin-right: 6px; }



.lyr { position: relative; height: 200px; overflow: hidden; mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 25%, #000 75%, transparent); }
.lyr-in { position: absolute; left: 0; right: 0; top: 0; transition: transform .7s var(--ease); }
.lyr p { margin: 0; height: 34px; display: flex; align-items: center; justify-content: center; text-align: center; font: 11.5px/15px var(--mono); color: var(--dim); opacity: .6; transition: color .5s, opacity .5s, transform .6s var(--spring); }
.lyr p.now { color: var(--ink); opacity: 1; transform: scale(1.05); }

.proj { display: grid; grid-template-columns: 34px 1fr; gap: 3px 10px; padding: 12px; text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); border-radius: var(--r-btn); transition: border-color .25s, background .25s, transform .4s var(--spring); }
.proj:hover, .proj:focus-visible { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); transform: translateY(-2px); outline: none; }
.proj:active { transform: scale(.98); }
.proj .pi { grid-row: 1 / 3; font: 22px/1 var(--mono); align-self: center; text-align: center; color: var(--accent-fill); }
.proj .pt { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.proj .pt b { font: 600 14px/18px var(--sans); }
.proj .pt b::after { content: " \f08e"; font: 400 11px var(--mono); color: var(--dim); }
.proj .pd { font-size: 12px; color: var(--ink-2); }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.chips li { padding: 5px 10px; font: 11.5px/15px var(--mono); color: var(--ink-2); background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: var(--r-btn); transition: color .2s, border-color .2s, background .2s, transform .35s var(--spring); }
.chips li:hover { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); transform: translateY(-2px); }
.spec { list-style: none; margin: 0; padding: 0; font: 12.5px/19px var(--sans); }
.spec li { display: flex; align-items: center; justify-content: space-between; min-height: 30px; color: var(--ink-2); position: relative; }
.spec li { height: 30px; }
.spec li::after { content: ""; order: 2; background: var(--tick) center / 10px 10px no-repeat, var(--accent-fill); }

.btns { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.btns a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, .03); border: 1px solid var(--line-2); border-radius: var(--r-btn); font: 500 12.5px/15px var(--sans);
  transition: border-color .25s, background .25s, transform .4s var(--spring);
}
.btns a .ic { font: 16px/1 var(--mono); width: 22px; text-align: center; color: var(--accent-fill); }
.btns a .ic .dci { margin: 0 auto; }
.btns a { position: relative; overflow: hidden; isolation: isolate; }
.btns a::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--accent) 13%, transparent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .5s var(--out); }
.btns a .go { margin-left: auto; font: 400 11px var(--mono); color: var(--dim); opacity: .4; transform: translateX(-6px); transition: transform .4s var(--spring), color .2s, opacity .25s; }
.btns a:hover::before, .btns a:focus-visible::before { transform: scaleX(1); }
.btns a:hover, .btns a:focus-visible { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); transform: translateY(-1px); outline: none; }
.btns a:hover .go, .btns a:focus-visible .go { color: var(--accent-fill); transform: translateX(2px); opacity: 1; }
.btns a:active { transform: scale(.98); }
.btns a[role=button] { cursor: pointer; }
.btns a.done { border-color: color-mix(in srgb, var(--accent) 60%, transparent); transform: scale(1.02); }
.btns a.done .go { opacity: 1; color: var(--accent-fill); }
.btns a.unset { cursor: not-allowed; }
.btns a.unset .ic { color: var(--dim); }
.btns a.unset .go::after { content: " unset"; font-size: 11px; }

html.glass, html.glass body { background: #070707; }
.glass #desktop { background-color: transparent; background-image: radial-gradient(70% 60% at 30% 10%, rgba(255, 255, 255, .09), transparent 70%), radial-gradient(60% 60% at 85% 95%, rgba(255, 255, 255, .06), transparent 70%); }
.glass #topo { display: block; }
.glass #topbar, .glass .pill, .glass .win {
  background: rgba(30, 30, 30, .4); border-color: rgba(255, 255, 255, .24);
  -webkit-backdrop-filter: blur(18px) grayscale(1); backdrop-filter: blur(18px) grayscale(1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32), inset 0 0 0 1px rgba(255, 255, 255, .04),
              -1px 0 0 rgba(255, 255, 255, .1), 1px 0 0 rgba(255, 255, 255, .16), 0 18px 44px rgba(0, 0, 0, .4);
}
.glass .node.focused .win {
  border-color: rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), -1px 0 0 rgba(255, 255, 255, .16), 1px 0 0 rgba(255, 255, 255, .24), 0 24px 60px rgba(0, 0, 0, .5);
}
.glass #minimap { background: rgba(30, 30, 30, .4); border-color: rgba(255, 255, 255, .24); }
.glass .card { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .16); }
.glass .wbox { background: rgba(10, 10, 10, .5); }
.glass .seg, .glass .dd, .glass .chips li { background: rgba(0, 0, 0, .25); }

@media (pointer: coarse) { .tile { width: 34px; height: 34px; } }

/* touch: no sticky hover movement */
@media (hover: none) {
  .tile:hover, .proj:hover, .btns a:hover, .chips li:hover { transform: none; }
}
#clock, .chip, .pos, .rng output { font-variant-numeric: tabular-nums; }
p, .pd { text-wrap: pretty; }

@container tbr (max-width: 941px) { .c-mem { display: none; } }
@container tbr (max-width: 871px) { .c-cpu { display: none; } }
@container tbr (max-width: 801px) { .c-fps { display: none; } }
@container tbr (max-width: 725px) { .c-up { display: none; } }
@container tbr (max-width: 649px) { .c-tag { display: none; } }
@container tbr (max-width: 587px) { .c-fx { display: none; } }
@container tbr (max-width: 483px) { .c-reset { display: none; } }
@container tbr (max-width: 372px) { .c-boot { display: none; } }
@container tbr (max-width: 336px) { .c-vis .vl { display: none; } }
@container tbr (max-width: 279px) { .c-vis { display: none; } }
@media (max-width: 1100px) { #date, .vdiv { display: none; } }
@media (max-width: 960px) { .c-tag { display: none; } .hint { display: none; } #minimap { width: 132px; height: 88px; } }

@media (max-width: 760px) {
  html, body { overflow: auto; height: auto; }
  #desktop { position: static; min-height: 100vh; }
  #topbar { position: sticky; top: 8px; display: flex; justify-content: space-between; }
  #botbar, #minimap, #labels, #web { display: none; }
  .ws, .vdiv, #date, .tb-r .chip { display: none; }
  .tb-c { margin-left: auto; }
  .tb-r { flex: 0 0 auto; container-type: normal; }
  .c-boot { display: grid !important; }
  #viewport { flex: none; overflow: visible; cursor: auto; touch-action: auto; padding: 8px 10px 22px; }
  #world { position: static; transform: none !important; }
  .cluster { display: block; }
  .cl-label { display: block; margin: 22px 2px 12px; font: 500 12px/14px var(--mono); letter-spacing: .04em; color: var(--accent-fill); }
  .node { position: relative; width: 100% !important; height: auto !important; transform: none !important; opacity: 1 !important; margin-bottom: 20px; }
  .win, .node .win { height: auto; transform: none !important; box-shadow: inset 0 1px 0 var(--glow), 0 10px 30px rgba(0, 0, 0, .45); }
  .wh { cursor: auto; }
  .node .body { overflow: visible; }
  .node .body.fixed { overflow: hidden; }
  .wbox.canvas { height: 260px; flex: none; }
  #htop .wbox { min-height: 340px; }
  #cal .wbox { min-height: 470px; }
  .handle { font-size: 26px; }
  .swatch { grid-template-columns: repeat(8, 1fr); width: 100%; }
  .kv li { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  :root { --dur: .01s; }
  #desktop, #boot, .win, .tile, .proj, .btns a, .chips li, .lyr-in, .lyr p, .logo, .seg button, .btns a .go, .mm-n, button.chip { transition-duration: .01s !important; transition-delay: 0s !important; }
  .caret, #boot-log .cur { animation: none; }
  .pl.playing .sp-eq b { animation: none; transform: scaleY(.6); }
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.065, 0.218, 0.406, 0.593, 0.758, 0.888, 0.981, 1.041, 1.073, 1.083, 1.08, 1.068, 1.053, 1.037, 1.023, 1.011, 1.003, 0.997, 0.994, 0.993, 0.993, 0.994, 0.995, 0.997, 0.998, 0.999, 1, 1);
    --spring-b: linear(0, 0.048, 0.172, 0.343, 0.535, 0.726, 0.899, 1.041, 1.147, 1.216, 1.249, 1.252, 1.231, 1.194, 1.147, 1.098, 1.051, 1.01, 0.977, 0.954, 0.941, 0.936, 0.938, 0.945, 0.955, 0.968, 0.98, 0.991, 1.001, 1.008, 1.013, 1.016, 1.016, 1.015, 1);
  }
}
.tile:active, button.chip:active, .seg button:active, .proj:active, .btns a:active { transition-duration: .09s; transition-timing-function: var(--out); }
.tile { transition: color .25s, background .25s, border-color .25s, transform .5s var(--spring); }
button.chip { transition: color .2s, border-color .2s, background .2s, transform .5s var(--spring); }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.rl { display: inline-flex; vertical-align: top; height: 1em; line-height: 1; overflow: hidden; }
.rc { display: block; height: 1em; overflow: hidden; }
.rc-i { display: block; }
.rc-i i { display: block; height: 1em; font-style: normal; line-height: 1; white-space: pre; }
.mq-in { display: inline-block; white-space: nowrap; }
.mq { -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); text-overflow: clip; }

.node { isolation: isolate; }
.node::before, .node::after { content: ""; position: absolute; pointer-events: none; }
.node::before { inset: -28px; z-index: -2; border-radius: 10px; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 34%, transparent) 62%, transparent 100%); opacity: 0; transition: opacity .6s var(--out); }
.node.focused::before { opacity: .7; }
.node::after { inset: 0; z-index: -1; border-radius: var(--r-win); box-shadow: 0 34px 70px rgba(0, 0, 0, .65), 0 10px 24px rgba(0, 0, 0, .45); opacity: 0; transition: opacity .5s var(--out); }
.node.dragging::after { opacity: 1; transition-duration: .16s; }
.fx-b, .fx-scan, .fx-spec, .ovf { position: absolute; pointer-events: none; }
.fx-b { inset: 0; z-index: 3; padding: 1.5px; border-radius: inherit; opacity: 0; overflow: hidden;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude; }
.fx-b i { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-90deg);
  background: conic-gradient(from 0deg, transparent 0deg 150deg, color-mix(in srgb, var(--accent-fill) 40%, transparent) 280deg, var(--ink) 352deg, transparent 360deg); }
.fx-scan { left: 0; right: 0; top: 0; height: 36%; z-index: 2; opacity: 0;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 16%, transparent) 72%, color-mix(in srgb, var(--accent-fill) 55%, var(--ink)) 99%, transparent); }
.fx-scan.drv { height: 46px; }
.fx-spec { left: 0; top: 0; width: 280px; height: 280px; margin: -140px 0 0 -140px; z-index: 2; opacity: 0;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--ink) 11%, transparent), transparent); }
.ovf { inset: 0; z-index: 4; opacity: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--panel-2); border-radius: inherit; }
.ovf i { font: normal 120px/1 var(--mono); color: var(--accent-fill); }
.ovf b { font: 500 44px/48px var(--sans); color: var(--ink); }
.ovf small { font: 24px/1 var(--mono); color: var(--dim); }

#web { opacity: 0; transition: opacity 1s 1.4s; }
#desktop.ready #web { opacity: 1; }
#web .guide { stroke: var(--accent); stroke-width: 1px; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .18s; }
#web .guide.on { opacity: .7; }

@keyframes bar-in { from { opacity: 0; transform: translateY(-14px); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } }
#desktop.ready #topbar { animation: bar-in .7s var(--ease) .1s backwards; }
#desktop.ready .ws > .tile { animation: bar-in .55s var(--ease) backwards; }
#desktop.ready .ws > .tile:nth-of-type(1) { animation-delay: .3s; }
#desktop.ready .ws > .tile:nth-of-type(2) { animation-delay: .35s; }
#desktop.ready .ws > .tile:nth-of-type(3) { animation-delay: .4s; }
#desktop.ready .ws > .tile:nth-of-type(4) { animation-delay: .45s; }
#desktop.ready .ws > .tile:nth-of-type(5) { animation-delay: .5s; }
#desktop.ready #minimap { animation: rise-in .7s var(--ease) .4s backwards; }
#desktop.ready .pill { animation: rise-in .7s var(--ease) .5s backwards; }
.c-fx b { color: var(--accent-fill); font-weight: 400; }
.chip[aria-pressed="true"] { color: var(--on-accent); background: var(--accent-fill); border-color: var(--accent-fill); }
.chip[aria-pressed="true"]:hover { color: var(--on-accent); }
.chip.off { display: none; }
#boot-logo { position: fixed; right: 7vw; top: 50%; margin: 0; transform: translateY(-50%); font: 10px/11px var(--mono); letter-spacing: 0; color: var(--ink-2); white-space: pre; opacity: 0; pointer-events: none; user-select: none; }
#boot-logo.show { opacity: .8; transition: opacity .8s var(--out); }
@media (max-width: 900px) { #boot-logo { display: none; } }


@media (max-width: 760px) { .node::before, .node::after, .fx-b, .fx-scan, .fx-spec, .ovf { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  #desktop, #desktop.ready { transition: opacity .2s !important; }
  .mq-in { display: inline; }
  .ind { transition: opacity .15s !important; }
}

.c-vis { display: inline-flex; align-items: center; gap: 6px; }
.c-vis .vi { font-size: 12px; line-height: 12px; color: var(--ink-2); transition: color .2s; }
.c-vis:hover .vi { color: var(--white); }
.c-vis .vn { color: var(--ink); }
.c-vis .vs { display: inline-grid; place-items: center; height: 16px; font: normal 9px/10px var(--mono); letter-spacing: .06em; padding: 0 4px; border-radius: var(--r-xs); border: 1px solid var(--line-2); color: var(--dim); }
.c-vis .vs:empty { display: none; }
@media (max-width: 760px) { .tb-r .c-vis { display: inline-flex; } .c-vis .vs { display: none; } }
