@font-face {
  font-family: "Abyss UI";
  src: url("/assets/open-sans-regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Abyss UI";
  src: url("/assets/open-sans-semibold.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}

@font-face {
  font-family: "Abyss Mono";
  src: url("/assets/dejavu-sans-mono.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Abyss UI", system-ui, sans-serif;
  --mono: "Abyss Mono", Consolas, monospace;
  --surface: #0b112b;
  --ink: #eef2ff;
  --muted: #9baac7;
  --line: #304476;
  --edge: #596e9e;
  --accent: #27eaff;
  --accent-strong: #06ddeb;
  --good: #52e199;
  --bad: #ff8799;
  --mast: clamp(58px, 9.3dvh, 83px);
  --tabs: clamp(51px, 8.2dvh, 73px);
  --foot: clamp(74px, 14.3dvh, 126px);
  --code-base-size: clamp(16px, 1.72vw, 29px);
  --code-line: 1.65;
  --code-top: clamp(15px, 2.5dvh, 24px);
  --code-inset: clamp(15px, 1.6vw, 29px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  width: 100%;
  min-width: 0;
  min-height: 100%;
  background: var(--surface);
  color: var(--ink);
  overscroll-behavior: none;
}

body { overflow: hidden; }

button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .53; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon-definitions { position: absolute; width: 0; height: 0; }
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-rows: var(--mast) minmax(0, 1fr) var(--foot);
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 12px;
  background: linear-gradient(145deg, #101932, #0a112e 76%);
}

.masthead, .action-bar {
  display: flex;
  align-items: center;
  padding-inline: clamp(16px, 2.15vw, 39px);
  background: linear-gradient(100deg, #101831, #0b1230);
}

.masthead {
  gap: 13px;
  border-bottom: 1px solid var(--line);
}

.brand-dolphin {
  flex-shrink: 0;
  width: clamp(37px, 3.6vw, 58px);
  height: auto;
  image-rendering: pixelated;
}

.masthead h1 {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  font-size: clamp(21px, 1.95vw, 33px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-inline-start: auto;
  color: var(--muted);
  font-size: clamp(12px, 1.35vw, 17px);
  white-space: nowrap;
}

.presence strong {
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.presence-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.presence[data-connected] .presence-dot { background: var(--good); }

.workspace {
  --split: 55%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, var(--split)) 5px minmax(0, 1fr);
}

.editor-panel, .console-panel {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  min-height: 0;
}

.editor-panel {
  background: radial-gradient(ellipse at 8% 0%, #111b36, #0a112b 70%);
}

.divider {
  position: relative;
  z-index: 1;
  border-inline: 1px solid #283b68;
  background: #354777;
  cursor: col-resize;
  touch-action: none;
}

.divider::after {
  position: absolute;
  content: "";
  inset: 0 -5px;
}

.divider:hover, .divider:focus-visible, .divider[data-dragging] {
  background: #62a6d2;
}

.workspace[data-resizing] { user-select: none; }

.panel-bar {
  min-height: var(--tabs);
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 12px clamp(10px, 1.5vw, 26px) 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #151e37, #0f1730);
}

.panel-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: .53em;
  padding: 0 clamp(10px, 1.15vw, 20px);
  border: 1px solid transparent;
  border-radius: 9px 9px 0 0;
  background: transparent;
  color: var(--muted);
  font-size: clamp(15px, 1.53vw, 27px);
  font-weight: 600;
  white-space: nowrap;
}

.file-tab, [role="tab"][aria-selected="true"] {
  border-color: #39739b;
  border-bottom-color: transparent;
  background: linear-gradient(125deg, #172842, #152b4d);
  color: var(--ink);
}

.file-tab {
  justify-content: flex-start;
  padding-right: clamp(17px, 2vw, 36px);
  border-color: #05b9eb;
  border-bottom-color: #172c48;
}

.file-tab span { overflow: hidden; text-overflow: ellipsis; }

[role="tab"][aria-selected="true"] {
  box-shadow: inset 0 -3px 0 var(--accent-strong);
}

[role="tab"]:hover { color: var(--ink); }

.icon-button {
  border: 0;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.icon-button:hover { color: var(--ink); background: #223457; }
.find-toggle { margin: auto 0; }

.editor-zoom {
  display: flex;
  align-items: center;
  align-self: center;
  margin-inline-start: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.editor-zoom .icon-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  font-size: 18px;
}

.editor-zoom #zoom-reset {
  width: 42px;
  min-width: 42px;
  font: 12px var(--mono);
}

.find-bar {
  position: absolute;
  z-index: 3;
  top: calc(var(--tabs) + 6px);
  right: 7px;
  display: flex;
  align-items: center;
  gap: 3px;
  max-width: calc(100% - 14px);
  padding: 6px;
  border-radius: 9px;
  border: 1px solid var(--edge);
  background: #121b32;
  box-shadow: 0 9px 18px #03091380;
}

.find-bar input {
  width: min(27vw, 225px);
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  background: #0a1328;
  padding: 6px 8px;
}

.find-bar .icon-button { width: 28px; min-width: 28px; height: 30px; }
#find-count { min-width: 3em; text-align: center; color: var(--muted); font-size: 12px; }

.editor-body {
  --code-size: calc(var(--code-base-size) * var(--editor-scale, 1));
  --gutter-inset: clamp(8px, 1.6vw, 28px);
  display: grid;
  grid-template-columns: max(clamp(41px, 6.03vw, 107px),
    calc(var(--code-size) * .61 * var(--line-digits, 1) + var(--gutter-inset) + 4px)) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.line-gutter {
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: #13204342;
  color: #8498b8;
  user-select: none;
}

#line-numbers,
#highlight,
.source {
  margin: 0;
  font-family: var(--mono);
  font-size: var(--code-size);
  font-weight: 400;
  line-height: var(--code-line);
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0;
  tab-size: 4;
  letter-spacing: 0;
  direction: ltr;
  text-align: left;
}

#line-numbers {
  padding-top: var(--code-top);
  padding-bottom: var(--code-top);
  text-align: right;
}

#line-numbers div {
  padding-right: var(--gutter-inset);
  height: calc(1em * var(--code-line));
}

#line-numbers .has-error { background: #4d2945; color: #ffd1d9; }

.editor-surface {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.highlight-viewport, .source {
  position: absolute;
  inset: 0;
}

.highlight-viewport { overflow: hidden; pointer-events: none; }
#highlight, .source {
  padding: var(--code-top) var(--code-inset);
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

#highlight {
  width: max-content;
  min-width: 100%;
  color: #eaf0ff;
}

.source {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  overflow: auto;
  border: 0;
  border-radius: 0;
  outline: none;
  resize: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background: transparent;
  caret-color: #e6fbff;
}

.source:focus-visible { box-shadow: inset 0 0 0 1px #79c7e52e; }
.source::selection { color: transparent; background: #6baeee50; }

.error-line {
  position: absolute;
  inset-inline: 0;
  height: calc(var(--code-size) * var(--code-line));
  border-left: 2px solid #ff829c;
  background: #bc547442;
  pointer-events: none;
}

.token-directive { color: #d09aff; }
.token-header, .token-string { color: #ffbf89; }
.token-type { color: #2ce4f8; }
.token-keyword { color: #d49bff; }
.token-number { color: #bee89b; }
.token-call { color: #ffdf9c; }
.token-comment { color: #93a6c3; }

.console-panel {
  --console-background: #0b142d;
  --console-foreground: #f1f4ff;
  --console-error: #ffa0ac;
  padding-bottom: 11px;
  background: #0e1833;
}

.console-tabs {
  border-bottom: 0;
  padding-inline: 12px;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.console-well {
  flex: 1;
  min-height: 0;
  margin: 10px 12px 0;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 11px;
  background: var(--console-background);
  color: var(--console-foreground);
}

.console-view { height: 100%; min-height: 0; min-width: 0; }
.output-view { display: flex; flex-direction: column; }

.output-scroll, .compiler-log, #text-input {
  font-family: var(--mono);
  font-size: clamp(14px, 1.49vw, 27px);
  line-height: 1.54;
}

.output-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 13px clamp(12px, 1.25vw, 23px) 19px;
}

.output-scroll:focus-visible, .compiler-log:focus-visible {
  outline-offset: -3px;
  border-radius: 9px;
}

.terminal-command {
  margin: 0 0 4px;
  color: var(--console-foreground);
  opacity: .69;
  font-size: .95em;
}

.terminal-command span:first-child { margin-right: .24em; }

.terminal-log, .compiler-log {
  padding: 0;
  margin: 0;
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.terminal-log .stream-stderr, .compiler-log { color: var(--console-error); }

.terminal-log .stream-input {
  color: var(--console-foreground);
  opacity: .73;
  text-decoration: underline dotted;
  text-underline-offset: .19em;
}

.empty-output {
  margin: 2px 0 0;
  color: var(--console-foreground);
  opacity: .61;
  font-size: .79em;
}

.terminal-form {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px clamp(12px, 1.25vw, 23px);
  border-top: 1px solid var(--line);
}

.terminal-prompt { font: 1em var(--mono); color: var(--console-foreground); }

#terminal-input {
  flex: 1;
  min-width: 0;
  height: 35px;
  padding: 4px 3px;
  border: 0;
  outline-offset: 0;
  border-radius: 3px;
  color: var(--console-foreground);
  background: transparent;
  font-family: var(--mono);
}

#terminal-input::placeholder, #text-input::placeholder {
  color: var(--console-foreground);
  opacity: .57;
}

#panel-input {
  display: flex;
  flex-direction: column;
  padding: 13px clamp(11px, 1.25vw, 23px);
}

.text-input-label { font-weight: 600; padding-bottom: 8px; }

#text-input {
  display: block;
  flex: 1;
  min-height: 45px;
  width: 100%;
  resize: none;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--console-foreground);
}

.console-note {
  margin: 0;
  padding: 6px 13px;
  color: var(--console-foreground);
  opacity: .75;
  font-size: 13px;
}

#panel-input .console-note { padding: 8px 0 0; }
.compiler-log {
  height: 100%;
  overflow: auto;
  padding: 13px clamp(12px, 1.25vw, 23px);
  font: clamp(13px, 1.2vw, 20px)/1.55 var(--mono);
}

.action-bar {
  min-width: 0;
  gap: clamp(14px, 3.17vw, 56px);
  padding-right: 113px;
  border-top: 1px solid var(--line);
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45em;
  height: clamp(46px, 8.55dvh, 76px);
  min-width: clamp(136px, 17.2vw, 305px);
  border-radius: 11px;
  border: 1px solid #5df2ff;
  color: #001329;
  font-size: clamp(23px, 2.2vw, 38px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
}

.action-button .icon { width: .9em; height: .9em; }

.run-button {
  background: linear-gradient(165deg, #32efff, #07dfed 80%);
  box-shadow: 0 4px 13px #03294885, inset 0 1px 0 #b0f9ff97;
}

.run-button:hover { background: #62f6ff; }

.stop-button {
  border-color: #f6a2ac;
  background: #ffa6b1;
}

.stop-button:hover:not(:disabled) { background: #ffbac3; }

.status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(9px, 1.33vw, 23px);
  font-size: clamp(14px, 1.63vw, 28px);
  font-weight: 600;
}

.status-dot {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: clamp(18px, 2.3vw, 40px);
  height: clamp(18px, 2.3vw, 40px);
  border: 2px solid #7b9bbd;
  border-radius: 50%;
  color: #083a2d;
}

.status-dot .icon { display: none; width: 74%; height: 74%; stroke-width: 3; }
.status[data-state="finished"] .status-dot { border-color: var(--good); background: var(--good); }
.status[data-state="finished"] .status-dot .icon { display: block; }
.status[data-state="failed"] .status-dot, .status[data-state="timed_out"] .status-dot {
  border-color: var(--bad);
  background: #ff879965;
}
.status[data-state="compiling"] .status-dot,
.status[data-state="running"] .status-dot,
.status[data-state="stopping"] .status-dot {
  border-color: #26395d;
  border-top-color: var(--accent);
  animation: progress-spin .85s linear infinite;
}

@keyframes progress-spin { to { transform: rotate(1turn); } }

.elapsed {
  color: var(--muted);
  font: .63em var(--mono);
  white-space: nowrap;
}

.dolphin {
  position: fixed;
  z-index: 10;
  right: 12px;
  bottom: 12px;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.dolphin[data-dragging] { cursor: grabbing; }
.dolphin-frame {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("/assets/dolphin-sprites.png");
  background-size: 400% 400%;
  background-position: var(--sprite-x, 0%) var(--sprite-y, 0%);
  background-repeat: no-repeat;
  image-rendering: pixelated;
  pointer-events: none;
}

.dolphin-grip {
  position: absolute;
  width: 16px;
  height: 16px;
  right: 0;
  bottom: 1px;
  background-image: radial-gradient(circle, #dae5ff 1px, transparent 1.55px);
  background-size: 5px 5px;
  opacity: .63;
  pointer-events: none;
}

.dolphin:hover .dolphin-grip, .dolphin:focus-visible .dolphin-grip { opacity: 1; }

.dolphin-card {
  position: fixed;
  z-index: 12;
  width: min(352px, calc(100vw - 20px));
  padding: 12px 14px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #8098c6;
  border-radius: 13px;
  background: linear-gradient(150deg, #172339, #10192e);
  color: #f4f6ff;
  box-shadow: 0 13px 34px #020718b0;
  scrollbar-width: thin;
}

.card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  margin: 0 0 7px;
  padding-left: 2px;
}

.card-top h2, .menu-section h3 {
  margin: 0;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
}

.card-top h2 { font-size: 18px; }
.card-top .icon-button { width: 29px; min-width: 29px; height: 29px; }

.menu-section {
  padding: 8px 0;
  border-top: 1px solid #3b4f78;
}

.menu-section h3 { margin: 0 0 4px; }
.mode-option, .language-option {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-size: 14px;
  text-align: left;
}

.mode-option .icon { visibility: hidden; color: var(--accent); }
.mode-option[aria-pressed="true"] .icon { visibility: visible; }
.mode-option[aria-pressed="true"], .language-option[aria-pressed="true"] {
  border-color: #37557d;
  background: #253d65;
  font-weight: 600;
}
.mode-option:hover, .language-option:hover { background: #283c5c; }

.compact-row, .menu-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.menu-section select {
  min-width: 85px;
  border: 1px solid #647ba8;
  border-radius: 6px;
  background: #111c32;
  color: var(--ink);
  padding: 4px 8px;
}

.menu-section summary {
  min-height: 25px;
  padding: 0 2px;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
}

.menu-section summary::-webkit-details-marker { display: none; }
.disclosure-icon { color: var(--muted); }
.menu-section[open] .disclosure-icon { transform: rotate(180deg); }

.design-controls, .language-controls { margin-top: 6px; }
.design-controls .compact-row { min-height: 32px; font-size: 14px; }

input[type="color"] {
  width: 40px;
  height: 25px;
  padding: 2px;
  border: 1px solid #506891;
  border-radius: 5px;
  background: #111a31;
  cursor: pointer;
}

.control-caption { display: block; color: #b4c1dc; font-size: 13px; margin: 0 0 5px 2px; }
.language-options { display: flex; gap: 7px; }
.language-option { justify-content: center; border-color: #4e6287; }

.download-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: #142f46;
  color: #f3fbff;
  font-weight: 600;
}

.download-button:hover { background: #1d4861; }
.secondary-button {
  padding: 5px 8px;
  border: 1px solid #566f99;
  border-radius: 6px;
  background: #213352;
  color: #f2f6ff;
  font-size: 13px;
}
.secondary-button:hover:not(:disabled) { background: #324a73; }
.design-controls .secondary-button { margin: 5px 0 1px; }

.dolphin-hint { border-color: #d9879d; }
.hint-top h2 { color: #ffc0cc; font-size: 15px; }
.dolphin-hint p { margin: 0 0 11px 2px; font-size: 14px; overflow-wrap: anywhere; }
.hint-actions { display: flex; flex-wrap: wrap; gap: 7px; }

@media (max-width: 700px) {
  :root {
    --mast: 58px;
    --tabs: 43px;
    --foot: 68px;
    --code-base-size: 15px;
    --code-top: 11px;
    --code-inset: 10px;
  }

  .shell { border-radius: 0; }
  .masthead { gap: 9px; }
  .brand-dolphin { width: 35px; }
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, var(--split)) 5px minmax(0, 1fr);
  }
  .divider { border: 0; border-block: 1px solid #283b68; cursor: row-resize; }
  .divider::after { inset: -5px 0; }
  .panel-bar { padding: 4px 9px 0; }
  .panel-tab { padding-inline: 11px; }
  .console-panel { padding-bottom: 6px; }
  .console-well { margin: 5px 8px 0; }
  .output-scroll { padding-top: 8px; }
  .action-bar { gap: 13px; padding-right: 83px; }
  .action-button { min-width: 96px; min-height: 40px; height: 42px; font-size: 19px; }
  .status { gap: 6px; flex-wrap: wrap; line-height: 1.15; }
  .status-dot { width: 15px; height: 15px; }
  .elapsed { font-size: 10px; }
  .dolphin { width: 72px; height: 72px; }
  .find-bar input { width: min(46vw, 205px); }
  #terminal-input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .status-dot { animation: none !important; }
}

@media (forced-colors: active) {
  .highlight-viewport { display: none; }
  .source { color: CanvasText; -webkit-text-fill-color: CanvasText; caret-color: CanvasText; }
  .error-line { border-left: 3px solid Highlight; }
}

.search-match {
  border-radius: 2px;
  background: #d7b25365;
  outline: 1px solid #f9d779ac;
}

.dolphin-pointer {
  position: fixed;
  z-index: 11;
  width: 13px;
  height: 13px;
  transform: translate(-50%, -50%) rotate(45deg);
  border: 1px solid #8098c6;
  background: #131e34;
  pointer-events: none;
}
.dolphin-pointer[data-error] { border-color: #d9879d; }

/* Files and diagnostics */
.file-controls, .file-tabs, .file-tab-group {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.file-controls { position: relative; gap: 3px; }
.file-tabs { gap: 4px; }
.file-tab-group {
  align-items: center;
  position: relative;
  border: 1px solid #263953;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #142037;
}
.file-tab-group:has([aria-selected="true"]) {
  border-color: #05b9eb;
  background: linear-gradient(125deg, #172842, #152b4d);
}
.file-tab-group .file-tab {
  min-width: 0;
  align-self: stretch;
  padding: 0 6px 0 10px;
  border: 0;
  background: none;
  box-shadow: none;
  color: #aebed9;
  gap: 6px;
  font-family: var(--mono);
  font-size: clamp(11px, 1.14vw, 18px);
}
.file-tab-group .file-tab[aria-selected="true"] { color: var(--ink); }
.file-language {
  flex: 0 0 auto;
  padding: 2px 4px;
  border-radius: 4px;
  background: #203959;
  color: #9dd2f4;
  font: 600 clamp(9px, .73vw, 12px)/1.2 "Abyss UI", sans-serif;
}
.file-close, .background-remove {
  display: grid;
  place-items: center;
  flex: 0 0 22px;
  border: 0;
  border-radius: 4px;
  padding: 0;
  margin-right: 4px;
  background: transparent;
  font: 18px/1 "Abyss UI", sans-serif;
  color: var(--muted);
}
.file-close { height: 25px; }
.file-close:hover, .background-remove:hover { color: white; background: #3c304d; }
.file-add, .file-actions { margin: auto 0; font-size: 19px; }
.file-add:not(:disabled) { opacity: .55; }
.file-add:hover:not(:disabled), .file-add:focus-visible { opacity: 1; }
.file-menu {
  position: absolute;
  top: calc(100% + 5px);
  z-index: 5;
  display: grid;
  min-width: max-content;
  padding: 5px;
  border: 1px solid var(--edge);
  border-radius: 8px;
  background: #152440;
  box-shadow: 0 8px 20px #05091ab0;
}
.file-menu button, .customization-link {
  border: 0;
  background: transparent;
  text-align: left;
  font: 600 14px/1.4 "Abyss UI", sans-serif;
}
.file-menu button { padding: 7px 11px; border-radius: 5px; }
.file-menu button:hover, .customization-link:hover { background: #233d5d; }
.source { scrollbar-width: none; }
.source::-webkit-scrollbar { display: none; }
#line-numbers .has-warning { background: #564727; color: #ffe297; }
#panel-compiler { display: flex; flex-direction: column; }
.compiler-log { flex: 1; height: auto; min-height: 0; }
.compiler-summary { max-height: 40%; overflow: auto; padding: 8px 12px 0; }
.warning-entry {
  display: block;
  width: 100%;
  margin-bottom: 5px;
  border: 1px solid #8e743d;
  border-radius: 5px;
  background: #413622;
  color: #ffe195;
  padding: 5px 8px;
  text-align: left;
  overflow-wrap: anywhere;
  font: 13px/1.45 var(--mono);
}
.status[data-state="finished_with_warnings"] .status-dot { border-color: #ffcb67; background: #ffcb67; }
.dolphin-hint[data-kind="warning"], .dolphin-pointer[data-warning] { border-color: #e6ba63; }
.dolphin-hint[data-kind="warning"] h2 { color: #ffe195; }

.dolphin {
  --base-dolphin: 96px;
  width: min(calc(var(--base-dolphin) * var(--dolphin-scale, 1)), calc(100vw - 18px), calc(100dvh - 18px));
  height: min(calc(var(--base-dolphin) * var(--dolphin-scale, 1)), calc(100vw - 18px), calc(100dvh - 18px));
}
.code-language { color: #a9e3ff; font-weight: 600; }
.customization-link {
  width: 100%;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  font-size: 15px;
}
.customization-link span:last-child { color: #8cc9ed; font-size: 22px; line-height: 1; }

/* Customization and background layers */
.workspace-background { position: fixed; inset: 0; pointer-events: none; background: #0b112b; }
.workspace-background > * { width: 100%; height: 100%; object-fit: cover; display: block; }
.shell { position: relative; }
[data-glass] .shell { background: #07132638; }
[data-glass] :is(.masthead, .action-bar, .panel-bar, .editor-panel, .console-panel, .dolphin-card) {
  background: rgb(12 24 47 / var(--glass-alpha, .62));
}
[data-glass] :is(.masthead, .action-bar, .editor-panel, .console-panel, .dolphin-card) {
  backdrop-filter: blur(3px);
}
[data-glass] .panel-bar { background: rgb(12 24 47 / .36); }
[data-glass] .console-well {
  background: color-mix(in srgb, var(--console-background) var(--console-glass-weight, 62%), transparent);
}
[data-glass] .dolphin-pointer { background: rgb(12 24 47 / var(--glass-alpha, .62)); }

.workspace-dialog {
  width: min(100% - 32px, 430px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  color: var(--ink);
  background: #101b34;
  border: 1px solid #53749f;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 24px 65px #020815ad;
  font: 15px/1.5 "Abyss UI", sans-serif;
}
.workspace-dialog::backdrop { background: #060e2262; backdrop-filter: blur(2px); }
.workspace-dialog h2 { font-size: 20px; line-height: 1.2; margin: 0 0 13px; }
.workspace-dialog .card-top h2 { margin: 0; }
.workspace-dialog input:is([type="text"], [type="url"]) {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #536f9f;
  border-radius: 6px;
  background: #0c172b;
  color: var(--ink);
}
.rename-dialog label { display: block; margin-bottom: 4px; }
.form-error { margin: 4px 0 0; min-height: 22px; color: var(--bad); font-size: 13px; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rename-dialog .dialog-actions { justify-content: flex-end; }
.primary-button {
  padding: 7px 13px;
  min-height: 34px;
  border: 1px solid #36e9fe;
  border-radius: 6px;
  background: #21dcef;
  color: #031a27;
  font-weight: 600;
}
.primary-button:hover:not(:disabled) { background: #8bf5ff; }

.customization-dialog { width: min(100% - 32px, 675px); }
.customization-dialog .card-top { margin-bottom: 13px; }
.custom-layout { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 16px; }
.custom-tabs {
  display: flex;
  flex-direction: column;
  align-self: start;
  gap: 4px;
  border-right: 1px solid #314463;
  padding-right: 10px;
}
.custom-tabs button {
  min-height: 35px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #baccdf;
  text-align: left;
  line-height: 1.3;
}
.custom-tabs button[aria-selected="true"] {
  color: #ecfdff;
  border-color: #3b6888;
  background: #203854;
  box-shadow: none;
}
.custom-panel { min-width: 0; }
.custom-panel.design-controls { margin-top: 0; }
.custom-panel.design-controls .compact-row { gap: 10px; margin-bottom: 7px; }
.custom-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 13px; }
.glass-switch {
  appearance: none;
  border: 1px solid #537396;
  border-radius: 15px;
  width: 41px;
  height: 23px;
  margin: 0;
  background: #0b192f;
  cursor: pointer;
}
.glass-switch::before {
  content: "";
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin: 3px;
  background: #a8bfd1;
}
.glass-switch:checked { background: #17637d; border-color: #4ce9ff; }
.glass-switch:checked::before { transform: translateX(17px); background: #bdf7ff; }
.range-control { display: grid; grid-template-columns: 1fr auto; gap: 5px 9px; margin-bottom: 14px; }
.range-control output { color: #9debf8; font-family: var(--mono); }
.range-control input { margin: 0; width: 100%; grid-column: 1 / -1; accent-color: #32e1fb; }

.background-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
.background-card { position: relative; min-width: 0; }
.background-choice {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #405c84;
  border-radius: 7px;
  padding: 0;
  background: #0e203d;
  text-align: left;
}
.background-choice[aria-pressed="true"] { border-color: #43e6ff; background: #1a4056; }
.background-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(145deg, #203956, #162b44);
  color: #a0d8f6;
}
.background-preview > * { width: 100%; height: 100%; display: block; object-fit: cover; }
.background-caption { font-size: 12px; padding: 6px; overflow-wrap: anywhere; }
.background-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  margin: 0;
  width: 24px;
  height: 24px;
  color: #f5faff;
  background: #0a1427dd;
}
.background-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; margin-top: 9px; }
.background-form label { grid-column: 1 / -1; }
.background-status { color: #afd7ed; font-size: 13px; margin: 8px 0 0; }
.background-status:empty { display: none; }

@media (max-width: 700px) {
  .dolphin { --base-dolphin: 72px; }
  .file-tab-group .file-tab { padding-left: 6px; gap: 3px; }
  .file-close { flex-basis: 14px; font-size: 15px; margin-right: 2px; }
  .file-add, .file-actions { width: 25px; min-width: 25px; padding: 0; }
  .custom-layout { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .custom-tabs { flex-direction: row; flex-wrap: wrap; border: 0; padding: 0; }
}

@media (max-width: 395px) {
  .editor-panel .panel-bar { gap: 4px; padding-inline: 6px; }
  .editor-zoom .icon-button { min-width: 20px; width: 20px; }
  .editor-zoom #zoom-reset { min-width: 34px; }
  .find-toggle { min-width: 24px; width: 24px; }
}
