:root {
  color-scheme: dark;
  --abyss: #020408;
  --panel: rgba(4, 8, 15, .92);
  --cyan: #41f5e4;
  --cyan-bright: #bafff8;
  --magenta: #ff2e88;
  --violet: #9c7bff;
  --amber: #f5d742;
  --text: #dce9f5;
  --muted: #8195a8;
  --faint: #4c6174;
  --line: rgba(65, 245, 228, .17);
  --line-strong: rgba(65, 245, 228, .42);
  --bar-height: 52px;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", Consolas, monospace;
  --display: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--abyss);
}

body,
button,
input,
textarea { font-family: var(--mono); }

button,
a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible,
.app-window:focus-visible {
  outline: 1px solid var(--cyan);
  outline-offset: -2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tron-field,
.atmosphere {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tron-field { z-index: 0; }

.atmosphere {
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 44%, transparent 0 22%, rgba(2, 4, 8, .15) 55%, rgba(2, 4, 8, .82) 100%),
    linear-gradient(180deg, rgba(2, 4, 8, .12), rgba(2, 4, 8, .52));
  transition: background .7s ease;
}

body[data-workspace="1"] .atmosphere {
  background:
    linear-gradient(rgba(2, 4, 8, .68), rgba(2, 4, 8, .84)),
    radial-gradient(circle at 72% 40%, rgba(65, 245, 228, .08), transparent 35%);
}

.system-bar {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  height: var(--bar-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  background: rgba(2, 5, 10, .82);
  border-bottom: 1px solid var(--line-strong);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
  backdrop-filter: blur(20px) saturate(1.4);
}

.system-actions,
.system-right,
.system-identity,
.runtime-state,
.workspace-dots {
  display: flex;
  align-items: center;
}

.system-actions { justify-self: start; }
.system-right { justify-self: end; min-width: 0; }

.system-button {
  height: 100%;
  min-width: 52px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  cursor: pointer;
  transition: color .15s, background .15s;
}

.system-button:hover,
.system-button[aria-expanded="true"] {
  color: var(--cyan-bright);
  background: rgba(65, 245, 228, .08);
}

.home-button { font-size: 1.25rem; }

.dot-grid {
  width: 17px;
  display: grid;
  grid-template-columns: repeat(3, 3px);
  gap: 3px;
}

.dot-grid i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

.system-identity {
  gap: .65rem;
  justify-self: center;
  letter-spacing: .17em;
  font-size: .62rem;
}

.system-mark {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #020708;
  background: linear-gradient(135deg, var(--cyan-bright), var(--cyan));
  border-radius: 6px 1px;
  font-weight: 900;
  box-shadow: 0 0 16px rgba(65, 245, 228, .4);
}

.system-title { color: var(--text); font-weight: 800; }
.system-context { color: var(--faint); }

.runtime-state {
  height: 100%;
  gap: .55rem;
  padding: 0 1rem;
  color: var(--muted);
  border-inline: 1px solid var(--line);
  font-size: .55rem;
  letter-spacing: .11em;
}

.runtime-led {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 10px rgba(245, 215, 66, .7);
  animation: blink 1.2s steps(2, end) infinite;
}

.runtime-led.is-live {
  background: var(--cyan);
  box-shadow: 0 0 11px rgba(65, 245, 228, .8);
  animation: none;
}

.runtime-led.is-error {
  background: var(--magenta);
  box-shadow: 0 0 11px rgba(255, 46, 136, .8);
  animation: none;
}

@keyframes blink { 50% { opacity: .25; } }

.workspace-dots {
  height: 100%;
  gap: 12px;
  padding: 0 20px;
}

.workspace-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform .25s, border-color .25s, background .25s, box-shadow .25s;
}

.workspace-dots button[aria-current="true"] {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(65, 245, 228, .85);
  transform: scale(1.25);
}

.workspace-viewport {
  position: fixed;
  z-index: 2;
  inset: var(--bar-height) 0 0;
  overflow: hidden;
}

.workspace-track {
  height: 100%;
  width: 200vw;
  display: flex;
  transform: translate3d(0, 0, 0);
  transition: transform .8s cubic-bezier(.16, 1, .3, 1);
  will-change: transform;
}

body[data-workspace="1"] .workspace-track { transform: translate3d(-100vw, 0, 0); }

.workspace {
  position: relative;
  width: 100vw;
  height: 100%;
  flex: 0 0 100vw;
  overflow: hidden;
}

.welcome-workspace {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: clamp(30px, 7vw, 120px);
  padding: clamp(48px, 7vw, 110px);
}

.welcome-workspace::before,
.welcome-workspace::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.welcome-workspace::before {
  inset: 6vh 4vw;
  border-block: 1px solid rgba(65, 245, 228, .1);
}

.welcome-workspace::after {
  width: 32vw;
  height: 32vw;
  right: 8vw;
  top: 50%;
  border: 1px solid rgba(65, 245, 228, .11);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: inset 0 0 80px rgba(65, 245, 228, .025), 0 0 80px rgba(65, 245, 228, .025);
}

.welcome-copy,
.start-button,
.welcome-signal,
.welcome-coordinate { position: relative; z-index: 2; }

.welcome-kicker {
  margin: 0;
  color: var(--cyan);
  font-size: clamp(.58rem, .85vw, .78rem);
  letter-spacing: .25em;
}

.welcome-copy h1 {
  margin: .12em 0 .04em;
  color: transparent;
  background: linear-gradient(110deg, #f1ffff 5%, var(--cyan-bright) 28%, var(--cyan) 56%, #4a9fff 78%, var(--violet));
  background-size: 200% 100%;
  background-clip: text;
  font-family: var(--display);
  font-size: clamp(5.8rem, 17vw, 14rem);
  font-weight: 900;
  line-height: .82;
  letter-spacing: .045em;
  filter: drop-shadow(0 0 34px rgba(65, 245, 228, .24));
  animation: title-shift 14s ease-in-out infinite;
}

@keyframes title-shift {
  0%, 12%, 100% { background-position: 0 50%; }
  50%, 62% { background-position: 100% 50%; }
}

.welcome-tagline {
  margin: 0;
  color: #77d9e7;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 1.7vw, 1.4rem);
  font-style: italic;
  letter-spacing: -.03em;
  text-shadow: 0 0 22px rgba(65, 245, 228, .3);
}

.start-button {
  min-width: clamp(190px, 20vw, 290px);
  min-height: clamp(105px, 11vw, 142px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.3rem;
  color: #031112;
  background: linear-gradient(115deg, #f2ffff, var(--cyan-bright) 30%, var(--cyan) 58%, #4ba8ff 82%, var(--violet));
  background-size: 220% 100%;
  border: 0;
  border-radius: 28px 4px;
  box-shadow: 0 0 25px rgba(65, 245, 228, .35), 0 0 70px rgba(156, 123, 255, .18);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: .23em;
  cursor: pointer;
  opacity: .72;
  animation: start-breathe 4.5s ease-in-out infinite, title-shift 14s ease-in-out infinite;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), opacity .3s, letter-spacing .5s;
}

.start-button i { font-size: 1.8em; font-style: normal; font-weight: 300; }

.start-button:hover {
  opacity: 1;
  letter-spacing: .13em;
  transform: translateY(-4px) scale(1.04);
}

@keyframes start-breathe {
  50% { box-shadow: 0 0 35px rgba(65, 245, 228, .58), 0 0 95px rgba(156, 123, 255, .28); }
}

.welcome-signal,
.welcome-coordinate {
  position: absolute;
  color: var(--faint);
  font-size: .52rem;
  letter-spacing: .17em;
}

.welcome-signal { top: 8vh; right: 5vw; display: flex; gap: 1.5rem; }
.welcome-signal span:first-child { color: var(--cyan); }
.welcome-coordinate { left: 5vw; bottom: 8vh; }

.desktop-workspace { background: rgba(1, 4, 8, .18); }

.desktop-grid {
  position: absolute;
  inset: 0;
  opacity: .32;
  background-image:
    linear-gradient(rgba(65, 245, 228, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 245, 228, .055) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), transparent 95%);
}

.desktop-label,
.desktop-hint {
  position: absolute;
  color: var(--faint);
  font-size: .52rem;
  letter-spacing: .15em;
  pointer-events: none;
}

.desktop-label {
  top: 18px;
  left: 22px;
  right: 22px;
  display: flex;
  justify-content: space-between;
}

.desktop-hint { right: 22px; bottom: 12px; }

.app-window {
  position: absolute;
  z-index: 10;
  min-width: 260px;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  resize: both;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55), inset 0 1px rgba(255, 255, 255, .035);
  backdrop-filter: blur(20px) saturate(1.15);
}

.app-window::before,
.app-window::after {
  content: "";
  position: absolute;
  z-index: 5;
  width: 10px;
  height: 10px;
  pointer-events: none;
}

.app-window::before {
  left: -1px;
  top: -1px;
  border-left: 2px solid var(--cyan);
  border-top: 2px solid var(--cyan);
}

.app-window::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
}

.app-window.is-focused {
  border-color: rgba(65, 245, 228, .65);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .65), 0 0 25px rgba(65, 245, 228, .08);
}

.app-window.is-hidden { display: none; }

.app-window.is-maximized {
  inset: 18px 18px 28px !important;
  width: auto !important;
  height: auto !important;
  resize: none;
}

.files-window { left: 2.4vw; top: 7vh; width: min(22vw, 330px); height: 73vh; }
.editor-window { left: 24.8vw; top: 4vh; width: 45vw; height: 78vh; }
.canvas-window { left: 67.5vw; top: 11vh; width: 30vw; height: 64vh; }

.window-titlebar {
  min-height: 38px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  flex: none;
  background: rgba(2, 5, 10, .82);
  border-bottom: 1px solid var(--line);
  user-select: none;
  cursor: move;
  touch-action: none;
}

.window-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .65rem;
  padding-left: .85rem;
  color: var(--muted);
  font-size: .58rem;
  letter-spacing: .15em;
}

.window-number { color: var(--cyan); }

.dirty-indicator {
  width: 6px;
  height: 6px;
  display: none;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 7px var(--amber);
}

.dirty-indicator.is-dirty { display: inline-block; }
.window-controls { display: flex; }

.window-controls button {
  width: 38px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  cursor: pointer;
}

.window-controls button:hover {
  color: var(--cyan);
  background: rgba(65, 245, 228, .08);
}

.window-toolbar,
.window-status {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 0 .8rem;
  color: var(--faint);
  background: rgba(2, 5, 10, .54);
  font-size: .5rem;
  letter-spacing: .12em;
}

.window-toolbar { border-bottom: 1px solid var(--line); }
.window-status { border-top: 1px solid var(--line); }

.window-toolbar button,
.launcher-foot button {
  padding: .3rem .45rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: .5rem;
  letter-spacing: .1em;
  cursor: pointer;
}

.window-toolbar button:hover:not(:disabled),
.launcher-foot button:hover { color: var(--cyan); }
.window-toolbar button:disabled { opacity: .28; cursor: not-allowed; }

.editor-toolbar .run-button {
  margin-left: .5rem;
  padding: .35rem .7rem;
  color: #031112;
  background: var(--cyan);
  border-radius: 2px;
}

.editor-toolbar .run-button:hover:not(:disabled) {
  color: #031112;
  background: var(--cyan-bright);
}

.editor-toolbar .paredit-button {
  color: var(--violet);
  border-color: rgba(156, 123, 255, .42);
}

.editor-toolbar .paredit-button[aria-pressed="false"] {
  color: var(--faint);
  border-color: rgba(123, 145, 164, .24);
}

.file-tree {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: .55rem 0;
}

.file-group {
  padding: .55rem .8rem .3rem;
  color: var(--faint);
  font-size: .5rem;
  letter-spacing: .14em;
}

.file-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .46rem .8rem;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  text-align: left;
  font-size: .66rem;
  cursor: pointer;
}

.file-row::before { content: "◇"; color: var(--faint); }
.file-row:hover { color: var(--text); background: rgba(65, 245, 228, .04); }

.file-row.is-active {
  color: var(--cyan);
  background: rgba(65, 245, 228, .07);
  border-left-color: var(--cyan);
}

.window-loading {
  padding: 1rem;
  color: var(--faint);
  font-size: .58rem;
  letter-spacing: .1em;
}

.editor-surface {
  position: relative;
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  overflow: hidden;
  background: rgba(1, 3, 7, .42);
}

.line-numbers {
  padding: .9rem .65rem;
  overflow: hidden;
  color: #31485b;
  border-right: 1px solid rgba(65, 245, 228, .08);
  font-size: .68rem;
  line-height: 1.65;
  text-align: right;
  white-space: pre;
  user-select: none;
}

.editor-surface textarea {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: .9rem 1rem;
  resize: none;
  color: transparent;
  background: transparent;
  border: 0;
  outline: 0;
  caret-color: var(--cyan);
  font-size: .68rem;
  line-height: 1.65;
  tab-size: 2;
  white-space: pre;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.code-highlight {
  grid-column: 2;
  grid-row: 1;
  z-index: 0;
  min-width: 0;
  margin: 0;
  padding: .9rem 1rem;
  overflow: hidden;
  color: #c9d8e6;
  font: .68rem/1.65 "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  tab-size: 2;
  white-space: pre;
  pointer-events: none;
  will-change: transform;
}

.code-highlight .paren-0 { color: #41f5e4; }
.code-highlight .paren-1 { color: #f5d742; }
.code-highlight .paren-2 { color: #ff2e88; }
.code-highlight .paren-3 { color: #9c7bff; }
.code-highlight .paren-4 { color: #6ee7ff; }
.code-highlight .paren-5 { color: #a6ff6e; }
.code-highlight .comment { color: #53677a; }
.code-highlight .string { color: #f5d742; }
.code-highlight .keyword { color: #9c7bff; }
.code-highlight .unmatched { color: #ff2e88; background: rgba(255, 46, 136, .15); }

.inline-eval {
  position: absolute;
  z-index: 3;
  max-width: min(42%, 340px);
  overflow: hidden;
  padding: 1px 6px;
  color: var(--cyan);
  background: rgba(2, 12, 16, .94);
  border: 1px solid rgba(65, 245, 228, .28);
  font: .61rem/1.35 "SFMono-Regular", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.inline-eval.is-error { color: var(--pink); border-color: rgba(255, 46, 136, .35); }
.inline-eval.is-pending { color: var(--amber); border-color: rgba(245, 215, 66, .4); }

.hal-completions {
  position: absolute;
  z-index: 4;
  min-width: 190px;
  max-width: 320px;
  max-height: 190px;
  overflow: auto;
  padding: 4px;
  background: #071019;
  border: 1px solid rgba(65, 245, 228, .32);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}

.hal-completion {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 6px 8px;
  color: var(--text);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}

.hal-completion strong { color: var(--cyan); font: .64rem "SFMono-Regular", Consolas, monospace; }
.hal-completion small { color: var(--muted); font-size: .52rem; }
.hal-completion.is-active, .hal-completion:hover { background: rgba(65, 245, 228, .1); }

.editor-surface textarea::selection {
  color: #fff;
  background: rgba(65, 245, 228, .25);
}

.canvas-wrap {
  position: relative;
  min-height: 0;
  flex: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, rgba(65, 245, 228, .025) 25%, transparent 25%, transparent 75%, rgba(65, 245, 228, .025) 75%),
    #010307;
  background-size: 18px 18px;
}

.canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: .6rem;
  color: var(--faint);
  text-align: center;
  letter-spacing: .16em;
  pointer-events: none;
}

.canvas-empty span {
  color: var(--cyan);
  font-size: 1rem;
  text-shadow: 0 0 18px rgba(65, 245, 228, .5);
}

.canvas-empty small { font-size: .5rem; }
.canvas-empty.is-hidden { display: none; }

.app-launcher {
  position: fixed;
  z-index: 1100;
  top: calc(var(--bar-height) + 10px);
  left: 10px;
  width: min(420px, calc(100vw - 20px));
  color: var(--text);
  background: rgba(3, 7, 13, .96);
  border: 1px solid var(--line-strong);
  box-shadow: 0 32px 90px rgba(0, 0, 0, .68), 0 0 35px rgba(65, 245, 228, .08);
  backdrop-filter: blur(24px) saturate(1.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(.97);
  transform-origin: top left;
  transition: opacity .18s, transform .25s cubic-bezier(.16, 1, .3, 1), visibility .18s;
}

.app-launcher.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.launcher-head,
.launcher-foot {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: .55rem;
  letter-spacing: .16em;
}

.launcher-index { color: var(--cyan); }

.launcher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  background: var(--line);
}

.app-tile {
  min-height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  color: var(--muted);
  background: #050a12;
  border: 0;
  font-size: .58rem;
  letter-spacing: .12em;
  text-decoration: none;
  cursor: pointer;
  transition: color .15s, background .15s;
}

.app-tile:hover { color: var(--cyan-bright); background: rgba(65, 245, 228, .08); }

.app-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(65, 245, 228, .06);
  border: 1px solid var(--line-strong);
  border-radius: 8px 2px;
  font-size: .8rem;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(65, 245, 228, .07);
}

.app-icon-canvas { color: var(--magenta); border-color: rgba(255, 46, 136, .42); }
.app-icon-editor { color: var(--violet); border-color: rgba(156, 123, 255, .45); font-size: .62rem; }

.launcher-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--faint);
}

.launcher-scrim {
  position: fixed;
  z-index: 1090;
  inset: var(--bar-height) 0 0;
  display: none;
  background: rgba(0, 0, 0, .16);
}

.launcher-scrim.is-open { display: block; }

.hara-dialog {
  width: min(430px, calc(100vw - 30px));
  padding: 0;
  color: var(--text);
  background: #050a12;
  border: 1px solid var(--line-strong);
  box-shadow: 0 35px 110px #000, 0 0 30px rgba(65, 245, 228, .12);
}

.hara-dialog::backdrop {
  background: rgba(0, 2, 5, .72);
  backdrop-filter: blur(4px);
}

.dialog-head {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 1rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  font-size: .58rem;
  letter-spacing: .15em;
}

.dialog-head button {
  align-self: stretch;
  width: 42px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  cursor: pointer;
}

.hara-dialog label {
  display: grid;
  gap: .6rem;
  padding: 1.2rem 1.2rem .7rem;
  color: var(--faint);
  font-size: .52rem;
  letter-spacing: .13em;
}

.hara-dialog input {
  width: 100%;
  padding: .75rem .8rem;
  color: var(--cyan-bright);
  background: #010408;
  border: 1px solid var(--line);
  outline: none;
}

.hara-dialog p {
  min-height: 1.2em;
  margin: 0;
  padding: 0 1.2rem;
  color: var(--muted);
  font-size: .62rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: 1rem 1.2rem 1.2rem;
}

.dialog-actions button {
  padding: .55rem .8rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  font-size: .55rem;
  letter-spacing: .1em;
  cursor: pointer;
}

.dialog-actions .dialog-confirm {
  color: #031112;
  background: var(--cyan);
  border-color: var(--cyan);
}

.toast-stack {
  position: fixed;
  z-index: 1300;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.toast {
  max-width: min(420px, calc(100vw - 36px));
  padding: .75rem 1rem;
  color: var(--text);
  background: rgba(4, 9, 16, .96);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--cyan);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  font-size: .6rem;
  line-height: 1.5;
  letter-spacing: .06em;
  animation: toast-in .3s cubic-bezier(.16, 1, .3, 1);
}

.toast.is-error { border-left-color: var(--magenta); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 900px) {
  .system-context,
  .runtime-state span:last-child { display: none; }
  .runtime-state { padding: 0 .8rem; }

  .welcome-workspace {
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: start;
  }

  .start-button { min-height: 84px; }
  .desktop-workspace { padding: 16px; }

  .app-window {
    inset: 48px 14px 32px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0;
    min-height: 0;
    resize: none;
  }

  .app-window:not(.is-focused) { display: none; }
  .app-window.is-focused { display: flex; }
  .desktop-hint { left: 18px; right: auto; }
}

@media (max-width: 560px) {
  :root { --bar-height: 48px; }
  .system-button { min-width: 45px; }
  .system-title { display: none; }
  .system-mark { width: 22px; height: 22px; }
  .workspace-dots { gap: 10px; padding: 0 14px; }
  .runtime-state { display: none; }
  .welcome-workspace { padding: 11vw 8vw; }
  .welcome-copy h1 { font-size: clamp(5rem, 28vw, 8.5rem); }
  .welcome-signal { display: none; }
  .welcome-coordinate { bottom: 4vh; }
  .launcher-grid { grid-template-columns: repeat(2, 1fr); }
  .app-tile { min-height: 96px; }
  .window-toolbar { overflow-x: auto; }
  .window-toolbar > span,
  .window-status span:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
