:root {
  color-scheme: dark;
  --page: #11151c;
  --window: #272b35;
  --chrome: #292d37;
  --sidebar: #34383f;
  --surface: #242832;
  --surface-soft: #30343d;
  --surface-raised: #3a3e45;
  --terminal: #090b10;
  --text: #f1f0f4;
  --muted: #a9a8b2;
  --dim: #70717d;
  --line: rgba(229, 225, 238, 0.11);
  --line-strong: rgba(190, 159, 230, 0.22);
  --accent: #bd8cf2;
  --accent-bright: #d59fff;
  --accent-soft: rgba(189, 140, 242, 0.15);
  --blue: #65b7ff;
  --green: #74d78b;
  --red: #ff747d;
  --orange: #ffc565;
  --control: rgba(255, 255, 255, 0.045);
  --control-hover: rgba(255, 255, 255, 0.085);
  --focus-ring: rgba(202, 157, 250, 0.72);
  --ui-font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-family: var(--ui-font-family);
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  display: block;
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

body {
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 52% -10%, rgba(115, 83, 183, 0.13), transparent 34rem),
    linear-gradient(180deg, #171d28, #0b1016 72%);
  color: var(--text);
  line-height: 1.45;
}

button,
input,
textarea {
  font: inherit;
}

button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: saturate(0.72);
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.demo-header {
  position: sticky;
  z-index: 30;
  top: 0;
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(14, 18, 25, 0.94);
  padding: 0.55rem 4vw;
  backdrop-filter: blur(18px);
}

.brand,
.demo-header nav {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand {
  font-weight: 820;
  text-decoration: none;
}

.app-brand-icon {
  display: block;
  border-radius: 22%;
  object-fit: contain;
}

.demo-header nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.demo-header nav a {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  text-decoration: none;
}

.demo-header nav .nav-back {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.42rem 0.68rem;
  color: var(--text);
}

.demo-header nav a:hover,
.demo-header nav a:focus-visible {
  color: var(--text);
}

.demo-shell {
  width: min(1480px, 92vw);
  margin-inline: auto;
  padding: clamp(0.75rem, 1.5vw, 1.1rem) 0 2rem;
}

.demo-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 0.72rem;
}

.eyebrow {
  margin: 0 0 0.3rem;
  color: #77bfff;
  font-size: 0.74rem;
  font-weight: 860;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.demo-intro p:not(.eyebrow) {
  max-width: 760px;
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.demo-cues {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.38rem;
  max-width: 430px;
}

.demo-cues span {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.32rem 0.58rem;
  color: #c5c3cc;
  font-size: 0.75rem;
  font-weight: 780;
}

.tool-launchbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 0.72rem;
  border: 1px solid rgba(229, 225, 238, 0.11);
  border-radius: 12px;
  background:
    linear-gradient(110deg, rgba(189, 140, 242, 0.09), transparent 45%),
    rgba(34, 39, 50, 0.76);
  padding: 0.48rem 0.58rem 0.48rem 0.82rem;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.tool-launchbar-copy {
  display: grid;
  min-width: 150px;
}

.tool-launchbar-copy span {
  color: #f0e8f9;
  font-size: 0.78rem;
  font-weight: 830;
}

.tool-launchbar-copy small {
  color: var(--muted);
  font-size: 0.69rem;
}

.tool-launchbar-actions {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.tool-launchbar-actions a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 0.38rem;
  border: 1px solid rgba(229, 225, 238, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 0.4rem 0.62rem;
  color: #e7e4ea;
  font-size: 0.72rem;
  font-weight: 780;
  text-decoration: none;
}

.tool-launchbar-actions a:hover,
.tool-launchbar-actions a:focus-visible {
  border-color: rgba(189, 140, 242, 0.34);
  background: rgba(189, 140, 242, 0.12);
  color: #fff;
  outline: 0;
}

.tool-launchbar-actions .ui-icon {
  width: 0.9rem;
  height: 0.9rem;
  color: var(--accent-bright);
}

.tool-launchbar-actions .feature-help-link {
  background: rgba(101, 183, 255, 0.065);
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  position: absolute;
  z-index: 80;
  right: 0;
  bottom: calc(100% + 8px);
  width: max-content;
  max-width: min(240px, 70vw);
  border: 1px solid rgba(229, 225, 238, 0.15);
  border-radius: 7px;
  background: #171a22;
  padding: 0.38rem 0.5rem;
  color: #eeebf1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  content: attr(data-tooltip);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translateY(3px);
  visibility: hidden;
  white-space: normal;
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    visibility 0s linear 120ms;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
  transition-delay: 0s;
}

.tool-launchbar [data-tooltip]::after,
.window-titlebar [data-tooltip]::after,
.tools-titlebar [data-tooltip]::after,
.settings-titlebar [data-tooltip]::after {
  top: calc(100% + 8px);
  bottom: auto;
}

.window-titlebar .sidebar-toggle[data-tooltip]::after,
.sidebar-footer [data-tooltip]::after {
  right: auto;
  left: 0;
}

.app-window {
  position: relative;
  height: clamp(620px, calc(100svh - 285px), 720px);
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(226, 218, 239, 0.17);
  border-radius: 14px;
  background: var(--window);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.42);
}

.window-titlebar {
  display: grid;
  height: 36px;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
  background: #292d37;
  padding: 0 0.6rem;
}

.traffic-lights {
  display: flex;
  gap: 0.42rem;
}

.traffic-lights span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 999px;
}

.traffic-lights span:nth-child(1) {
  background: #ff5f57;
}

.traffic-lights span:nth-child(2) {
  background: #ffbd2e;
}

.traffic-lights span:nth-child(3) {
  background: #28c840;
}

.sidebar-toggle,
.document-toolbar button,
.document-action-link,
.panel-icon,
.status-actions button,
.tools-titlebar button,
.tools-titlebar a {
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.sidebar-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
}

.sidebar-toggle .ui-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible,
.document-toolbar button:hover,
.document-toolbar button:focus-visible,
.document-action-link:hover,
.document-action-link:focus-visible,
.panel-icon:hover,
.panel-icon:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.sidebar-toggle:active,
.document-toolbar button:active,
.document-action-link:active,
.panel-icon:active {
  background: rgba(189, 140, 242, 0.14);
  color: #fff;
}

.window-title {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.78rem;
}

.window-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-icon {
  width: 0.82rem;
  height: 0.82rem;
  color: #72b9ff;
}

.save-state {
  color: var(--dim);
  font-size: 0.72rem;
  white-space: nowrap;
}

.save-state.is-dirty {
  color: var(--accent-bright);
}

.mobile-workspace-tabs {
  display: none;
}

.workspace {
  display: grid;
  height: calc(100% - 62px);
  min-height: 0;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 0.48rem 0.52rem;
  background: var(--window);
  padding: 0 0.55rem 0.45rem;
}

.workspace.is-sidebar-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.workspace.is-sidebar-hidden .sidebar {
  display: none;
}

.sidebar {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-row: 1 / 3;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border: 1px solid rgba(229, 225, 238, 0.085);
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 8rem),
    var(--sidebar);
  padding: 0.45rem;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.sidebar-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.2rem;
  height: 32px;
  margin-bottom: 0.42rem;
  border-radius: 8px;
  background: rgba(17, 18, 23, 0.2);
  padding: 2px;
}

.sidebar-switcher button {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #8b8992;
  font-size: 0.78rem;
}

.sidebar-switcher .ui-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.sidebar-switcher button.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
  color: var(--accent-bright);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

.sidebar-search {
  display: grid;
  grid-row: 2;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.3rem;
  margin-bottom: 0.42rem;
}

.sidebar-search input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(8, 10, 15, 0.24);
  padding: 0.42rem 0.55rem;
  color: var(--text);
}

.sidebar-search button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  align-self: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: var(--control);
  color: var(--muted);
}

.sidebar-search button:hover,
.sidebar-search button:focus-visible {
  border-color: var(--line);
  background: var(--control-hover);
  color: #fff;
}

.file-list {
  grid-row: 3;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.2rem 0;
}

.tree-folder,
.file-button {
  display: grid;
  width: 100%;
  min-height: 31px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #d8d7dc;
  text-align: left;
}

.tree-folder {
  grid-template-columns: 0.75rem 1rem minmax(0, 1fr);
  gap: 0.28rem;
  padding: 0.18rem 0.36rem 0.18rem calc(0.36rem + (var(--depth, 0) * 0.9rem));
  font-size: 0.78rem;
  font-weight: 760;
}

.tree-folder .disclosure {
  display: grid;
  place-items: center;
  color: #aaa8b0;
}

.tree-folder .disclosure .ui-icon {
  width: 0.7rem;
  height: 0.7rem;
}

.tree-folder .folder-icon {
  display: grid;
  place-items: center;
  color: #5db4ff;
}

.tree-folder .folder-icon .ui-icon {
  width: 0.85rem;
  height: 0.85rem;
  fill: currentColor;
  stroke: none;
}

.file-button {
  grid-template-columns: 1.1rem minmax(0, 1fr) auto;
  gap: 0.38rem;
  padding: 0.2rem 0.36rem 0.2rem calc(0.38rem + (var(--depth, 0) * 0.9rem));
  color: #d0cfd5;
  font-size: 0.76rem;
}

.tree-folder:hover,
.file-button:hover {
  background: rgba(255, 255, 255, 0.045);
}

.file-button.is-active {
  border-color: rgba(189, 140, 242, 0.18);
  background: rgba(189, 140, 242, 0.13);
  color: #fff;
  box-shadow: inset 3px 0 var(--accent-bright);
}

.file-button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-button small {
  color: var(--accent-bright);
  font-size: 0.68rem;
  font-weight: 820;
}

.file-icon {
  display: grid;
  width: 1rem;
  height: 1rem;
  place-items: center;
  color: #70baff;
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: -0.04em;
  text-align: center;
}

.file-icon .ui-icon {
  width: 0.88rem;
  height: 0.88rem;
}

.file-icon.swift .ui-icon {
  fill: currentColor;
  stroke: none;
}

.file-icon.swift {
  color: #ff875f;
}

.file-icon.markdown {
  color: #79c7ff;
}

.file-icon.json,
.file-icon.yaml {
  color: #d69bff;
}

.sidebar-footer {
  display: flex;
  grid-row: 4;
  gap: 0.32rem;
  border-top: 1px solid var(--line);
  padding-top: 0.45rem;
}

.sidebar-footer button {
  display: flex;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.3rem 0.24rem;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 760;
}

.sidebar-footer button:hover,
.sidebar-footer button:focus-visible {
  border-color: rgba(189, 140, 242, 0.28);
  background: rgba(189, 140, 242, 0.12);
  color: #fff;
}

.sidebar-footer button[data-file-action="delete"]:hover,
.sidebar-footer button[data-file-action="delete"]:focus-visible {
  border-color: rgba(255, 116, 125, 0.28);
  background: rgba(255, 116, 125, 0.1);
  color: #ffc2c7;
}

.sidebar-footer button .ui-icon {
  width: 0.75rem;
  height: 0.75rem;
}

.sidebar-footer button span {
  display: none;
}

.editor-area {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-column: 2;
  grid-row: 1;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--window);
  padding: 0;
}

.workspace.is-sidebar-hidden .editor-area {
  grid-column: 1;
}

.document-toolbar {
  display: grid;
  min-width: 0;
  height: 44px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.48rem;
  border: 1px solid rgba(229, 225, 238, 0.07);
  border-radius: 11px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)),
    #383b3f;
  padding: 0.28rem 0.38rem;
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.035),
    0 1px 3px rgba(0, 0, 0, 0.12);
}

.document-toolbar button,
.document-action-link {
  min-width: 32px;
  height: 32px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
}

.document-toolbar .ui-icon {
  width: 0.88rem;
  height: 0.88rem;
}

.new-file-button .ui-icon {
  width: 0.95rem;
  height: 0.95rem;
}

.tabs {
  display: flex;
  min-width: 0;
  gap: 0.28rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab-item {
  display: inline-flex;
  min-width: 0;
  flex: 0 1 auto;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(34, 35, 41, 0.38);
}

.tab-item.is-active {
  border-color: rgba(189, 140, 242, 0.16);
  background: linear-gradient(180deg, rgba(189, 140, 242, 0.13), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 -2px rgba(207, 165, 255, 0.74);
}

.tab-select {
  display: flex !important;
  min-width: 0;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 0.3rem;
  overflow: hidden;
  color: var(--muted) !important;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 0.52rem 0 0.12rem !important;
}

.tab-item.is-active .tab-select {
  color: var(--text) !important;
}

.tab-close {
  min-width: 28px !important;
  width: 28px;
  padding: 0 !important;
  color: #8c8793 !important;
  opacity: 0.85;
}

.tab-close .ui-icon {
  width: 0.69rem;
  height: 0.69rem;
  border-radius: 999px;
  background: rgba(157, 117, 204, 0.25);
  padding: 0.11rem;
}

.tab-item.is-active .tab-close .ui-icon {
  background: rgba(221, 220, 225, 0.28);
  color: #e7e5e9;
}

.tab-dirty {
  order: 2;
  width: 0.42rem;
  height: 0.42rem;
  flex: 0 0 0.42rem;
  border-radius: 999px;
  background: var(--accent-bright);
  box-shadow: 0 0 0 2px rgba(189, 140, 242, 0.09);
}

.document-actions {
  display: flex;
  align-items: center;
  gap: 0.08rem;
}

.editor-panes {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 0.45rem;
}

.editor-panes.is-split {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(190, 159, 230, 0.2);
  border-radius: 14px;
  background: #252933;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.018);
}

.editor-pane.secondary {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.split-head {
  display: flex;
  min-width: 0;
  height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  padding: 0 0.55rem;
  color: var(--muted);
  font-size: 0.72rem;
}

.split-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.split-head button {
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
}

.split-head button:hover,
.split-head button:focus-visible,
.sidebar-switcher button:focus-visible,
.panel-mode-switcher button:focus-visible,
.tools-sidebar button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  outline: 2px solid rgba(189, 140, 242, 0.45);
  outline-offset: 1px;
}

.editor-canvas {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-columns: 3.3rem minmax(0, 1fr);
  overflow: hidden;
}

.line-numbers {
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.035);
  padding: 0.75rem 0.65rem 0.75rem 0;
  color: #8e6dad;
  font: 0.82rem/1.58 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  list-style: none;
  text-align: right;
  user-select: none;
}

.code-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.editor-highlight,
#editor-input,
.secondary-highlight,
.secondary-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: auto;
  border: 0;
  background: transparent;
  padding: 0.75rem 0.95rem;
  font: 0.84rem/1.58 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  tab-size: 2;
  white-space: pre;
}

.editor-highlight,
.secondary-highlight {
  pointer-events: none;
  color: #f2eef5;
}

#editor-input,
.secondary-input {
  z-index: 2;
  resize: none;
  outline: 0;
  color: transparent;
  caret-color: #fff;
  -webkit-text-fill-color: transparent;
}

#editor-input:focus-visible,
.secondary-input:focus-visible {
  outline: 0;
}

.editor-pane:focus-within {
  border-color: rgba(189, 140, 242, 0.38);
  box-shadow:
    inset 0 1px rgba(255, 255, 255, 0.02),
    0 0 0 1px rgba(189, 140, 242, 0.07);
}

#editor-input::selection,
.secondary-input::selection {
  background: rgba(169, 112, 230, 0.42);
}

.split-dirty {
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 0.3rem;
  border-radius: 999px;
  background: var(--accent-bright);
}

.syntax-token.keyword {
  color: #e78cff;
}

.syntax-token.string {
  color: #f4e477;
}

.syntax-token.comment {
  color: #81838d;
}

.syntax-token.number {
  color: #8ad4ff;
}

.syntax-token.type {
  color: #79e0cb;
}

.bottom-panel {
  display: none;
  min-width: 0;
  height: clamp(250px, 38svh, 350px);
  min-height: 220px;
  max-height: none;
  grid-column: 2;
  grid-row: 2;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  margin: 0;
}

.bottom-panel.is-open {
  display: grid;
}

.workspace.is-sidebar-hidden .bottom-panel {
  grid-column: 1;
}

.workspace.is-panel-across .bottom-panel {
  grid-column: 1 / -1;
  margin: 0;
}

.workspace.is-panel-across .sidebar {
  grid-row: 1;
}

.bottom-panel header {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-bottom: 1px solid var(--line);
  background: #373a42;
  padding: 0.22rem 0.48rem;
}

.panel-left,
.panel-actions,
.panel-mode-switcher {
  display: flex;
  align-items: center;
}

.panel-left {
  min-width: 0;
  gap: 0.4rem;
}

.panel-actions {
  min-width: 0;
  gap: 0.05rem;
}

.panel-actions button[hidden] {
  display: none;
}

.panel-mode-switcher {
  gap: 0.08rem;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.12);
  padding: 0.12rem;
}

.panel-mode-switcher button,
.panel-icon {
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  padding: 0 0.3rem;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}

.panel-mode-switcher .ui-icon,
.panel-icon .ui-icon {
  width: 0.78rem;
  height: 0.78rem;
}

.panel-mode-switcher button {
  border: 0;
  background: transparent;
  color: #8f8d96;
}

.panel-mode-switcher button.is-active {
  background: rgba(189, 140, 242, 0.14);
  color: var(--accent-bright);
  box-shadow: inset 0 0 0 1px rgba(189, 140, 242, 0.12);
}

#panel-title {
  font-size: 0.78rem;
}

#panel-state {
  color: var(--muted);
  font-size: 0.7rem;
}

.panel-content {
  min-height: 0;
  overflow: auto;
  background: var(--terminal);
  padding: 0.65rem 0.75rem;
}

.terminal-panel {
  display: grid;
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
}

#terminal-output {
  min-height: 0;
  margin: 0;
  overflow: auto;
  color: #eef0f2;
  font: 0.78rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.terminal-command {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 0.45rem;
  color: var(--accent-bright);
}

.terminal-command input {
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  outline: 0;
  font: 0.78rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.terminal-command button,
.git-action,
.debug-action {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.28rem 0.5rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.git-panel {
  display: grid;
  gap: 0.35rem;
}

.git-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-bottom: 0.3rem;
}

.git-row {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.38rem 0.5rem;
  font-size: 0.75rem;
}

.git-row b {
  color: var(--accent-bright);
}

.git-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.git-row em {
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
}

.debug-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.debug-card {
  display: grid;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.6rem;
}

.debug-card span {
  color: var(--muted);
  font-size: 0.72rem;
}

.window-status-bar {
  display: flex;
  height: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--line);
  background: #30323a;
  padding: 0 0.65rem;
  color: #aaa8b1;
  font-size: 0.68rem;
}

.window-status-bar > div,
.status-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.status-actions button {
  padding: 0;
  font-size: inherit;
}

.status-actions button:hover {
  color: var(--accent-bright);
}

.developer-tools,
.settings-overlay,
.command-palette,
.file-dialog {
  position: absolute;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(10, 10, 15, 0.58);
  padding: 0.75rem;
  backdrop-filter: blur(10px);
}

.developer-tools {
  place-items: center;
  background: rgba(10, 10, 15, 0.58);
  padding: 1.125rem;
  backdrop-filter: blur(10px);
}

.settings-overlay {
  place-items: stretch;
  background: #282b35;
  padding: 0;
  backdrop-filter: none;
}

.tools-window {
  display: grid;
  width: min(940px, 100%);
  height: min(640px, 100%);
  min-width: min(780px, 100%);
  min-height: min(580px, 100%);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(229, 225, 238, 0.12);
  border-radius: 12px;
  background: #272a33;
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.46),
    inset 0 1px rgba(255, 255, 255, 0.035);
}

.tools-titlebar {
  display: grid;
  height: 36px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  background: #292c36;
  padding: 0 0.65rem;
}

.tools-titlebar strong {
  font-size: 0.78rem;
}

.tools-titlebar button,
.tools-titlebar a {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  padding: 0;
  line-height: 1;
}

.tools-titlebar-actions {
  display: flex;
  align-items: center;
  gap: 0.16rem;
}

.tools-titlebar-actions a:hover,
.tools-titlebar-actions a:focus-visible,
.tools-titlebar-actions button:hover,
.tools-titlebar-actions button:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  outline: 0;
}

.settings-window {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #272a33;
}

.settings-titlebar {
  display: grid;
  height: 36px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.035);
  background: #292c36;
  padding: 0 0.65rem;
}

.settings-titlebar strong {
  font-size: 0.78rem;
}

.settings-titlebar button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  padding: 0;
  line-height: 1;
}

.settings-titlebar button:hover,
.settings-titlebar button:focus-visible {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.settings-body {
  display: grid;
  min-height: 0;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
}

.settings-sidebar,
.settings-detail {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(229, 225, 238, 0.08);
  border-radius: 18px;
  background: #34373f;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.settings-sidebar {
  padding: 1rem 0.8rem;
}

.settings-sidebar h2 {
  margin: 0 0 0.65rem;
  font-size: 1.2rem;
}

.settings-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  border: 1px solid rgba(189, 140, 242, 0.58);
  border-radius: 8px;
  background: #262a33;
  padding: 0 0.58rem;
  color: var(--muted);
  box-shadow: 0 0 0 1px rgba(189, 140, 242, 0.08);
}

.settings-search .ui-icon {
  width: 0.88rem;
  height: 0.88rem;
}

.settings-search input {
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0.48rem 0;
  color: var(--text);
  outline: 0;
}

.settings-sidebar nav {
  display: grid;
  gap: 0.12rem;
  margin-top: 0.75rem;
}

.settings-sidebar nav button {
  display: grid;
  min-height: 36px;
  grid-template-columns: 1.05rem minmax(0, 1fr);
  align-items: center;
  gap: 0.55rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  padding: 0.38rem 0.48rem;
  color: var(--accent);
  text-align: left;
  font-size: 0.78rem;
  font-weight: 710;
}

.settings-sidebar nav button .ui-icon {
  width: 0.9rem;
  height: 0.9rem;
}

.settings-sidebar nav button span {
  color: #e4e2e8;
}

.settings-sidebar nav button:hover:not(.is-active) {
  border-color: rgba(229, 225, 238, 0.06);
  background: rgba(255, 255, 255, 0.025);
}

.settings-sidebar nav button:focus-visible:not(.is-active) {
  border-color: rgba(189, 140, 242, 0.16);
  background: rgba(189, 140, 242, 0.055);
}

.settings-sidebar nav button.is-active {
  border-color: rgba(189, 140, 242, 0.26);
  background: rgba(189, 140, 242, 0.13);
  box-shadow: inset 3px 0 var(--accent-bright);
}

.settings-empty {
  margin: 0.8rem 0.35rem 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.settings-detail {
  padding: 1.6rem 1.8rem;
}

.settings-detail-header h3 {
  margin: 0;
  font-size: 1.4rem;
}

.settings-detail-header p {
  margin: 0.18rem 0 1.15rem;
  color: var(--accent);
  font-size: 0.82rem;
}

.settings-card {
  border: 1px solid rgba(189, 140, 242, 0.2);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
  padding: 1rem;
}

.settings-card + .settings-card {
  margin-top: 0.8rem;
}

.settings-card h4 {
  margin: 0;
  font-size: 1rem;
}

.settings-card > p {
  margin: 0.15rem 0 0.8rem;
  color: var(--accent);
  font-size: 0.75rem;
}

.settings-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 310px);
  align-items: center;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding: 0.7rem 0;
}

.settings-row:first-of-type {
  border-top: 0;
}

.settings-row-copy {
  display: grid;
  gap: 0.14rem;
}

.settings-row-copy b {
  font-size: 0.82rem;
}

.settings-row-copy span {
  color: var(--accent);
  font-size: 0.72rem;
}

.settings-control-group {
  display: flex;
  justify-content: flex-end;
  gap: 0.42rem;
}

.settings-control-group select,
.settings-control-group button,
.settings-action-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(189, 140, 242, 0.08);
  padding: 0.38rem 0.65rem;
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 730;
}

.settings-control-group button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.settings-control-group select {
  min-width: 145px;
  background: #3a3d45;
}

.settings-control-group button.primary,
.settings-action-row button.primary {
  border-color: rgba(189, 140, 242, 0.42);
  background: rgba(189, 140, 242, 0.19);
}

.settings-control-group button:disabled,
.settings-action-row button:disabled {
  opacity: 0.4;
}

.settings-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.42rem;
  border-top: 1px solid var(--line);
  padding-top: 0.7rem;
}

.settings-action-row [data-settings-status] {
  align-self: center;
  margin-right: auto;
  color: var(--green);
  font-size: 0.72rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.theme-option {
  display: grid;
  min-height: 112px;
  align-content: space-between;
  gap: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #202329;
  padding: 0.75rem;
  color: var(--text);
  text-align: left;
}

.theme-option:hover,
.theme-option:focus-visible,
.theme-option.is-active {
  border-color: rgba(205, 157, 255, 0.8);
  box-shadow: inset 0 0 0 1px rgba(205, 157, 255, 0.22);
}

.theme-option-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.5rem;
}

.theme-option-head > span:last-child {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  color: var(--muted);
  font-size: 0.64rem;
}

.theme-option small {
  display: block;
  margin-top: 0.08rem;
  color: var(--muted);
}

.theme-swatches {
  display: flex;
  gap: 0.35rem;
}

.theme-swatches i {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 5px;
}

.settings-toggle-list {
  display: grid;
  gap: 0.55rem;
}

.settings-toggle {
  display: grid;
  min-height: 66px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.025);
  padding: 0.75rem;
  cursor: pointer;
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.settings-toggle:hover {
  border-color: rgba(189, 140, 242, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.settings-toggle:has(input:checked) {
  border-color: rgba(189, 140, 242, 0.25);
  background: rgba(189, 140, 242, 0.055);
}

.settings-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.55;
}

.settings-toggle:focus-within {
  border-color: rgba(189, 140, 242, 0.38);
  box-shadow: inset 0 0 0 1px rgba(189, 140, 242, 0.08);
}

.settings-toggle span {
  display: grid;
  gap: 0.15rem;
}

.settings-toggle small {
  color: var(--accent);
}

.settings-toggle input {
  position: relative;
  width: 2.45rem;
  height: 1.42rem;
  flex: 0 0 auto;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(229, 225, 238, 0.22);
  border-radius: 999px;
  background: #555862;
  cursor: pointer;
  outline: 0;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.28),
    0 1px rgba(255, 255, 255, 0.035);
  transition:
    border-color 140ms ease,
    background-color 140ms ease,
    box-shadow 140ms ease;
}

.settings-toggle input::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(1.42rem - 6px);
  height: calc(1.42rem - 6px);
  border-radius: 50%;
  background: #f2f0f4;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.42),
    inset 0 1px rgba(255, 255, 255, 0.72);
  content: "";
  transform: translateX(0);
  transition:
    transform 160ms cubic-bezier(0.22, 0.8, 0.25, 1),
    background-color 140ms ease;
}

.settings-toggle input:hover {
  border-color: rgba(229, 225, 238, 0.34);
  background: #626570;
}

.settings-toggle input:checked {
  border-color: rgba(213, 159, 255, 0.68);
  background: linear-gradient(180deg, #c896f5, #a96bde);
  box-shadow:
    inset 0 1px 2px rgba(72, 31, 105, 0.26),
    0 0 0 1px rgba(189, 140, 242, 0.08);
}

.settings-toggle input:checked::after {
  background: #fff;
  transform: translateX(1rem);
}

.settings-toggle input:focus,
.settings-toggle input:focus-visible {
  box-shadow:
    0 0 0 3px rgba(189, 140, 242, 0.24),
    0 0 0 1px var(--focus-ring),
    inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.settings-toggle input:active::after {
  transform: scaleX(1.08);
  transform-origin: left center;
}

.settings-toggle input:checked:active::after {
  transform: translateX(1rem) scaleX(1.08);
  transform-origin: right center;
}

.settings-toggle input:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.tools-body {
  display: grid;
  min-height: 0;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
}

.tools-sidebar,
.tools-detail {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(229, 225, 238, 0.07);
  border-radius: 13px;
  background: #34373f;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.tools-sidebar {
  display: grid;
  align-content: start;
  gap: 0.08rem;
  padding: 0.75rem 0.6rem;
}

.tools-sidebar h2 {
  margin: 0 0 0.7rem;
  padding: 0 0.35rem 0.65rem;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}

.tools-view-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.18rem;
  margin: 0 0 0.6rem;
  border-radius: 8px;
  background: rgba(15, 17, 22, 0.26);
  padding: 0.18rem;
}

.tools-sidebar .tools-view-switcher button {
  display: block;
  min-height: 34px;
  padding: 0.3rem 0.35rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.67rem;
  font-weight: 790;
}

.tools-sidebar .tools-view-switcher button.is-active {
  background: rgba(189, 140, 242, 0.17);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(189, 140, 242, 0.13);
}

.tools-group {
  display: grid;
  align-content: start;
  gap: 0.08rem;
}

.tools-group-label {
  margin: 0.22rem 0 0.3rem;
  padding: 0 0.48rem;
  color: #8f8c97;
  font-size: 0.62rem;
  font-weight: 840;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.tools-sidebar button {
  display: grid;
  grid-template-columns: 1rem minmax(0, 1fr);
  align-items: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 7px;
  background: transparent;
  min-height: 32px;
  padding: 0.35rem 0.5rem;
  color: var(--accent);
  text-align: left;
  font-size: 0.76rem;
}

.tools-sidebar button .ui-icon {
  width: 1rem;
  height: 1rem;
}

.tools-sidebar button span {
  color: #dedce2;
}

.tools-sidebar button.is-active {
  background: rgba(189, 140, 242, 0.13);
  box-shadow: inset 0 0 0 1px rgba(189, 140, 242, 0.08);
}

.tools-sidebar button:hover {
  background: rgba(255, 255, 255, 0.055);
  color: var(--accent-bright);
}

.tools-detail {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 22px;
}

.tool-detail-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.tool-detail-heading > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.tool-detail-heading h3 {
  margin: 0;
  font-size: 1.05rem;
}

.tool-detail-heading > div > span {
  border: 1px solid rgba(189, 140, 242, 0.18);
  border-radius: 999px;
  background: rgba(189, 140, 242, 0.08);
  padding: 0.18rem 0.45rem;
  color: #d5c2e9;
  font-size: 0.62rem;
  font-weight: 780;
}

.tool-detail-heading > p {
  margin: 0.22rem 0 0;
  color: var(--accent);
  font-size: 0.78rem;
}

.tool-detail-heading > .tool-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  margin: 0.65rem 0 0;
  border: 1px solid rgba(101, 183, 255, 0.13);
  border-radius: 8px;
  background: rgba(101, 183, 255, 0.055);
  padding: 0.45rem 0.55rem;
  color: #b9c9d9;
  line-height: 1.4;
}

.tool-hint .ui-icon {
  width: 0.82rem;
  height: 0.82rem;
  flex: 0 0 auto;
  margin-top: 0.06rem;
  color: var(--blue);
}

.tool-scroll-region {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 0.78rem 0.2rem 0.25rem 0;
  scrollbar-gutter: stable;
}

.tools-detail.has-tool-preview .tool-scroll-region {
  padding-bottom: 0.35rem;
}

.tool-form {
  display: grid;
  gap: 10px;
}

.tool-form label,
.tool-output-section label {
  display: grid;
  grid-template-columns: 156px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
}

.tool-form label > span,
.tool-output-section label > span {
  padding-top: 0.55rem;
  color: #e4e2e7;
  font-size: 0.75rem;
  font-weight: 720;
}

.tool-form input,
.tool-form textarea,
.tool-form select,
.tool-output-section input,
.tool-output-section textarea,
.tool-output-section select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  background: #292d37;
  padding: 0.58rem 0.65rem;
  color: #fff;
  outline: 0;
  transition: border-color 100ms ease, box-shadow 100ms ease;
  font: 0.76rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tool-form input:focus,
.tool-form textarea:focus,
.tool-form select:focus,
.tool-output-section input:focus,
.tool-output-section textarea:focus,
.tool-output-section select:focus {
  border-color: rgba(189, 140, 242, 0.58);
  box-shadow: 0 0 0 3px rgba(189, 140, 242, 0.1);
}

.tool-form select,
.tool-output-section select {
  min-height: 34px;
}

.tool-form textarea,
.tool-output-section textarea {
  min-height: 108px;
  resize: vertical;
}

.tool-form textarea[readonly],
.tool-output-section textarea[readonly] {
  min-height: 110px;
  background: #222630;
  color: #dcd9e1;
}

.tool-output-section {
  display: grid;
  gap: 12px;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.tool-preview {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(229, 225, 238, 0.1);
  border-radius: 10px;
  background: #222630;
  color: #e8e5eb;
}

.tools-detail.has-stale-result .tool-preview {
  opacity: 0.55;
}

.tool-preview pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font: 0.75rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.tool-text-preview,
.cron-preview {
  padding: 0.8rem;
}

.tool-before-after {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tool-before-after section {
  min-width: 0;
  padding: 0.72rem;
}

.tool-before-after section + section {
  border-left: 1px solid var(--line);
}

.tool-before-after b {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.68rem;
}

.regex-match-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.regex-match-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
}

.regex-match-list li:last-child {
  border-bottom: 0;
}

.regex-match-list code {
  color: #f2d5ff;
}

.regex-match-list span {
  color: var(--muted);
  font-size: 0.67rem;
}

.diff-preview {
  overflow: auto;
  font: 0.72rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.diff-line {
  display: grid;
  grid-template-columns: 1.8rem minmax(0, 1fr);
  min-height: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.025);
}

.diff-line b,
.diff-line code {
  padding: 0.25rem 0.45rem;
}

.diff-line b {
  text-align: center;
}

.diff-line.added {
  background: rgba(116, 215, 139, 0.09);
  color: #bff0ca;
}

.diff-line.removed {
  background: rgba(255, 116, 125, 0.09);
  color: #ffc3c8;
}

.markdown-preview {
  padding: 0.9rem 1rem;
}

.markdown-preview h1,
.markdown-preview h2,
.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview h6 {
  margin: 0.85rem 0 0.4rem;
  line-height: 1.2;
}

.markdown-preview h1:first-child,
.markdown-preview h2:first-child,
.markdown-preview p:first-child {
  margin-top: 0;
}

.markdown-preview p,
.markdown-preview ul,
.markdown-preview blockquote {
  margin: 0.45rem 0;
}

.markdown-preview blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 0.7rem;
  color: var(--muted);
}

.markdown-preview pre {
  border-radius: 7px;
  background: #171a21;
  padding: 0.65rem;
}

.password-result,
.integrity-result {
  display: grid;
  gap: 0.45rem;
  padding: 0.8rem;
}

.password-result b,
.integrity-result code {
  overflow-wrap: anywhere;
  color: #f1d9ff;
  font: 0.78rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.password-result span,
.integrity-result span {
  color: var(--muted);
  font-size: 0.69rem;
}

.qr-preview {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.55rem;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 12px;
  background: transparent;
}

.qr-image-surface {
  display: grid;
  width: 128px;
  height: 128px;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
}

.qr-preview svg,
.qr-image-surface svg {
  display: block;
  width: 128px;
  height: 128px;
}

.qr-preview figcaption {
  color: #9a97a1;
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
}

.qr-preview:not(.is-empty) figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.qr-preview-placeholder {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(229, 225, 238, 0.1);
  border-radius: 9px;
  color: #8d8994;
}

.qr-preview-placeholder .ui-icon {
  width: 1.35rem;
  height: 1.35rem;
}

.tools-detail[data-active-tool="qr"] .tool-scroll-region {
  display: grid;
  align-content: start;
  gap: 10px;
  padding-bottom: 0.25rem;
}

.tools-detail[data-active-tool="qr"] .tool-form textarea {
  min-height: clamp(128px, 22vh, 172px);
}

.tools-detail[data-active-tool="qr"] .tool-output-section {
  grid-template-columns: 156px minmax(0, 1fr) 152px;
  min-height: 154px;
}

.tools-detail[data-active-tool="qr"] .tool-output-section [data-tool-field="output"] {
  display: contents;
}

.tools-detail[data-active-tool="qr"] .tool-output-section [data-tool-field="output"] > span {
  grid-column: 1;
  grid-row: 1;
}

.tools-detail[data-active-tool="qr"] .tool-output-section [data-tool-field="output"] > textarea {
  height: 100%;
  min-height: 154px;
  grid-column: 2;
  grid-row: 1;
  resize: none;
}

.tools-detail[data-active-tool="qr"] .tool-preview {
  min-width: 0;
  min-height: 154px;
  grid-column: 3;
  grid-row: 1;
}

.unicode-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.75rem;
}

.unicode-preview > span {
  display: grid;
  min-width: 62px;
  place-items: center;
  gap: 0.18rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.45rem;
}

.unicode-preview b {
  font-size: 1.1rem;
}

.unicode-preview code {
  color: var(--muted);
  font-size: 0.62rem;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.42rem;
  margin-top: 0.55rem;
  border-top: 1px solid var(--line);
  padding-top: 0.65rem;
}

.tool-actions [data-tool-status] {
  align-self: center;
  margin-right: auto;
  color: var(--muted);
  font-size: 0.72rem;
}

.tool-actions [data-tool-status][data-state="success"] {
  color: var(--green);
}

.tool-actions [data-tool-status][data-state="error"] {
  color: var(--red);
}

.tool-actions button,
.file-dialog-actions button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(189, 140, 242, 0.09);
  padding: 0.4rem 0.66rem;
  color: #e4d6f4;
  font-size: 0.74rem;
  font-weight: 760;
}

.tool-actions button {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 0.32rem;
}

.tool-actions button .ui-icon {
  width: 0.78rem;
  height: 0.78rem;
}

.tool-actions button:hover,
.tool-actions button:focus-visible {
  border-color: rgba(189, 140, 242, 0.36);
  background: rgba(189, 140, 242, 0.15);
  color: #fff;
  outline: 0;
}

.tool-actions button:disabled {
  cursor: progress;
  opacity: 0.55;
}

.tool-actions button[data-tool-action="run"] {
  border-color: rgba(189, 140, 242, 0.28);
  background: rgba(189, 140, 242, 0.19);
  color: #fff;
}

.app-window[data-editor-theme="midnight"] .editor-pane {
  border-color: rgba(92, 151, 215, 0.3);
  background: #1c2634;
}

.app-window[data-editor-theme="midnight"] .document-toolbar {
  background:
    linear-gradient(180deg, rgba(91, 136, 190, 0.09), rgba(255, 255, 255, 0.012)),
    #303841;
}

.app-window[data-editor-theme="plum"] .editor-pane {
  border-color: rgba(211, 135, 226, 0.3);
  background: #2b2532;
}

.app-window[data-editor-theme="plum"] .document-toolbar {
  background:
    linear-gradient(180deg, rgba(184, 111, 201, 0.1), rgba(255, 255, 255, 0.012)),
    #3d363f;
}

.app-window[data-editor-theme="dracula"] .editor-pane {
  border-color: rgba(190, 159, 230, 0.22);
  background: #252933;
}

.app-window[data-editor-theme="ayu"] .editor-pane {
  border-color: rgba(92, 151, 215, 0.3);
  background: #1c2634;
}

.app-window[data-editor-theme="ayu"] .document-toolbar {
  background:
    linear-gradient(180deg, rgba(91, 136, 190, 0.09), rgba(255, 255, 255, 0.012)),
    #303841;
}

.app-window[data-editor-theme="gruvbox"] .editor-pane {
  border-color: rgba(216, 166, 87, 0.3);
  background: #282522;
}

.app-window[data-editor-theme="gruvbox"] .document-toolbar {
  background:
    linear-gradient(180deg, rgba(205, 154, 76, 0.08), rgba(255, 255, 255, 0.01)),
    #3b3732;
}

.app-window[data-editor-theme="gruvbox-light"] .editor-pane {
  border-color: rgba(153, 116, 57, 0.42);
  background: #f4e9c9;
}

.app-window[data-editor-theme="gruvbox-light"] .editor-highlight,
.app-window[data-editor-theme="gruvbox-light"] .secondary-highlight {
  color: #3c3836;
}

.app-window[data-editor-theme="gruvbox-light"] .line-numbers {
  color: #8f6f45;
}

.app-window[data-editor-theme="gruvbox-light"] #editor-input,
.app-window[data-editor-theme="gruvbox-light"] .secondary-input {
  caret-color: #282220;
}

.app-window[data-editor-theme="gruvbox-light"] .document-toolbar {
  background: #d8c9a6;
}

.palette-card,
.file-dialog-card {
  width: min(620px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: #292d36;
  padding: 0.85rem;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.48);
}

.palette-card label,
.file-dialog-card label {
  display: grid;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 780;
}

.palette-card input,
.file-dialog-card input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: #20242c;
  padding: 0.65rem 0.72rem;
  color: #fff;
  outline: 0;
}

.command-list {
  display: grid;
  gap: 0.3rem;
  max-height: 320px;
  overflow: auto;
  margin-top: 0.55rem;
}

.command-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 0.5rem 0.58rem;
  color: var(--text);
  text-align: left;
}

.command-item:hover,
.command-item:focus-visible {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.command-item small {
  color: var(--muted);
}

.file-dialog-card h2 {
  margin-bottom: 0.8rem;
}

.file-dialog-hint,
.file-dialog-error {
  margin: 0.55rem 0 0;
  font-size: 0.72rem;
}

.file-dialog-hint {
  color: var(--muted);
}

.file-dialog-error {
  min-height: 1rem;
  color: #ff9aa0;
}

.app-window button:focus-visible,
.app-window a[href]:focus-visible,
.tool-launchbar-actions a:focus-visible,
.demo-header a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 1px;
}

.file-button:focus-visible,
.tree-folder:focus-visible,
.tab-select:focus-visible,
.tab-close:focus-visible,
.settings-sidebar nav button:focus-visible,
.tools-sidebar button:focus-visible {
  outline-offset: -2px;
}

.app-window select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: saturate(0.72);
}

.sidebar-search input:focus-visible,
.palette-card input:focus-visible,
.file-dialog-card input:focus-visible {
  border-color: rgba(189, 140, 242, 0.58);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(189, 140, 242, 0.12);
}

.file-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.file-dialog-actions .primary {
  border-color: rgba(189, 140, 242, 0.38);
  background: rgba(189, 140, 242, 0.2);
  color: #fff;
}

.file-dialog-actions .danger {
  border-color: rgba(255, 116, 125, 0.42);
  background: rgba(255, 116, 125, 0.14);
  color: #ffd8db;
}

.noscript-note {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  padding: 1rem;
}

@media (max-width: 900px) {
  .demo-intro {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .demo-cues {
    justify-content: flex-start;
  }

  .tool-launchbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-launchbar-actions {
    justify-content: flex-start;
  }

  .workspace {
    grid-template-columns: 205px minmax(0, 1fr);
  }

  .document-actions button[data-history] {
    display: none;
  }

  .tools-window {
    height: calc(100% - 0.5rem);
  }
}

@media (max-width: 760px) {
  .demo-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
    padding: 0.7rem 0.85rem;
  }

  .demo-header nav {
    justify-content: flex-start;
  }

  .demo-header nav a {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
  }

  .demo-shell {
    width: min(100% - 1rem, 1480px);
  }

  h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .app-window {
    height: 700px;
    min-height: 700px;
  }

  .tool-launchbar {
    padding: 0.58rem;
  }

  .tool-launchbar-actions a {
    min-height: 40px;
  }

  .tool-launchbar-actions {
    width: 100%;
  }

  .tool-launchbar-actions a {
    flex: 1 1 130px;
    justify-content: center;
  }

  .tool-launchbar [data-tooltip]::after,
  .document-actions [data-tooltip]::after {
    display: none;
  }

  .window-titlebar {
    height: 40px;
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .sidebar-toggle {
    width: 40px;
    height: 40px;
  }

  .save-state {
    display: none;
  }

  .mobile-workspace-tabs {
    display: grid;
    height: 48px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.3rem;
    border-bottom: 1px solid var(--line);
    background: var(--chrome);
    padding: 0.35rem;
  }

  .mobile-workspace-tabs button {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 780;
    transition: none;
  }

  .mobile-workspace-tabs button.is-active {
    border-color: rgba(189, 140, 242, 0.3);
    background: var(--accent-soft);
    color: #fff;
  }

  .workspace,
  .workspace.is-sidebar-hidden {
    height: calc(100% - 114px);
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
    padding: 0 0.42rem 0.42rem;
  }

  .sidebar,
  .editor-area,
  .bottom-panel,
  .workspace.is-sidebar-hidden .editor-area,
  .workspace.is-sidebar-hidden .bottom-panel,
  .workspace.is-panel-across .bottom-panel {
    grid-column: 1;
    grid-row: 1;
    margin: 0;
  }

  .workspace.is-sidebar-hidden .sidebar {
    display: grid;
  }

  .workspace[data-mobile-pane="files"] .editor-area,
  .workspace[data-mobile-pane="files"] .bottom-panel,
  .workspace[data-mobile-pane="editor"] .sidebar,
  .workspace[data-mobile-pane="editor"] .bottom-panel,
  .workspace[data-mobile-pane="panel"] .sidebar,
  .workspace[data-mobile-pane="panel"] .editor-area {
    display: none;
  }

  .workspace[data-mobile-pane="files"] .sidebar,
  .workspace[data-mobile-pane="editor"] .editor-area,
  .workspace[data-mobile-pane="panel"] .bottom-panel {
    display: grid;
  }

  .sidebar {
    border-right: 0;
  }

  .sidebar-switcher {
    height: 42px;
  }

  .sidebar-switcher button,
  .tree-folder,
  .file-button {
    min-height: 38px;
  }

  .sidebar-footer button,
  .sidebar-search button {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .editor-area {
    padding-left: 0.45rem;
  }

  .document-toolbar {
    height: 84px;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: 36px 36px;
    align-content: center;
    gap: 0.28rem 0.35rem;
  }

  .document-toolbar .new-file-button {
    grid-column: 1;
    grid-row: 1;
  }

  .document-toolbar .tabs {
    grid-column: 2;
    grid-row: 1;
  }

  .document-toolbar .document-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .document-toolbar .document-actions::-webkit-scrollbar {
    display: none;
  }

  .document-toolbar button,
  .document-action-link {
    min-width: 36px;
    height: 36px;
  }

  .tab-item {
    min-height: 36px;
  }

  .tab-close {
    min-width: 32px !important;
    width: 32px;
  }

  .document-actions button[data-panel="git"] {
    display: none;
  }

  .editor-panes.is-split {
    grid-template-columns: 1fr;
  }

  .editor-panes.is-split .secondary {
    display: none;
  }

  .bottom-panel {
    height: auto;
    max-height: none;
    border-radius: 0;
  }

  .bottom-panel header {
    min-height: 48px;
  }

  .panel-mode-switcher button,
  .panel-icon {
    min-width: 40px;
    height: 40px;
  }

  .window-status-bar {
    gap: 0.4rem;
    padding-inline: 0.45rem;
  }

  .window-status-bar > div {
    gap: 0.4rem;
  }

  .status-actions button,
  .status-actions span:nth-of-type(2),
  .status-actions span:nth-of-type(3) {
    display: none;
  }

  .developer-tools,
  .settings-overlay,
  .command-palette,
  .file-dialog {
    position: fixed;
    padding: 0.4rem;
  }

  .developer-tools {
    padding: 0;
  }

  .settings-overlay {
    padding: 0;
  }

  .tools-window {
    width: 100%;
    height: 100dvh;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }

  .tools-titlebar,
  .settings-titlebar {
    height: 44px;
  }

  .tools-titlebar button,
  .tools-titlebar a,
  .settings-titlebar button {
    width: 40px;
    height: 40px;
  }

  .settings-window {
    width: 100%;
    height: 100dvh;
  }

  .tools-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.45rem;
  }

  .settings-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.45rem;
  }

  .settings-sidebar {
    overflow: hidden;
    padding: 0.55rem;
  }

  .settings-sidebar h2 {
    display: none;
  }

  .settings-search {
    margin-bottom: 0.45rem;
  }

  .settings-sidebar nav {
    display: flex;
    overflow-x: auto;
    margin: 0;
  }

  .settings-sidebar nav button {
    grid-template-columns: auto auto;
    min-height: 40px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .settings-detail {
    padding: 1rem;
  }

  .settings-row {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .settings-control-group {
    justify-content: flex-start;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }

  .tools-sidebar {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    padding: 0.45rem;
  }

  .tools-sidebar h2 {
    display: none;
  }

  .tools-view-switcher {
    width: min(100%, 360px);
    margin: 0 0 0.35rem;
  }

  .tools-sidebar .tools-view-switcher button,
  .tools-group > button {
    min-height: 40px;
  }

  .tools-group {
    display: flex;
    overflow-x: auto;
  }

  .tools-group-label {
    display: none;
  }

  .tools-group > button {
    grid-template-columns: auto auto;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .tools-detail {
    padding: 0.8rem;
  }

  .tool-form label,
  .tool-output-section label {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .tool-form label > span,
  .tool-output-section label > span {
    padding-top: 0;
  }

  .tools-detail[data-active-tool="qr"] .tool-form textarea {
    min-height: 116px;
  }

  .tools-detail[data-active-tool="qr"] .tool-output-section {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .tools-detail[data-active-tool="qr"] .tool-output-section [data-tool-field="output"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.3rem;
  }

  .tools-detail[data-active-tool="qr"] .tool-output-section [data-tool-field="output"] > span,
  .tools-detail[data-active-tool="qr"] .tool-output-section [data-tool-field="output"] > textarea,
  .tools-detail[data-active-tool="qr"] .tool-preview {
    min-width: 0;
    grid-column: auto;
    grid-row: auto;
  }

  .tools-detail[data-active-tool="qr"] .tool-output-section [data-tool-field="output"] > textarea {
    height: 104px;
    min-height: 104px;
  }

  .tools-detail[data-active-tool="qr"] .tool-preview {
    min-height: 164px;
  }

  .tool-before-after {
    grid-template-columns: 1fr;
  }

  .tool-before-after section + section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .tool-actions [data-tool-status] {
    flex: 1 0 100%;
  }

  .tool-actions button {
    min-height: 40px;
    flex: 1 1 auto;
    justify-content: center;
  }
}

@media (max-width: 430px) {
  .demo-header nav {
    gap: 0.55rem;
  }

  .demo-header nav a {
    font-size: 0.78rem;
  }

  .demo-cues span {
    font-size: 0.7rem;
  }

  .tab-item {
    flex-basis: 145px;
  }

  .editor-canvas {
    grid-template-columns: 2.6rem minmax(0, 1fr);
  }

  .line-numbers {
    padding-right: 0.45rem;
    font-size: 0.75rem;
  }

  .editor-highlight,
  #editor-input,
  .secondary-highlight,
  .secondary-input {
    padding-inline: 0.65rem;
    font-size: 0.78rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  button,
  a,
  .tab-item,
  .save-state {
    transition:
      background-color 140ms ease,
      border-color 140ms ease,
      color 140ms ease,
      opacity 140ms ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-tooltip]::after,
  .settings-toggle,
  .settings-toggle input,
  .settings-toggle input::after {
    transition: none;
  }
}

@media (forced-colors: active) {
  .settings-toggle input {
    width: 1.25rem;
    height: 1.25rem;
    -webkit-appearance: auto;
    appearance: auto;
    border-radius: 0;
    accent-color: Highlight;
    forced-color-adjust: auto;
  }

  .settings-toggle input::after {
    display: none;
  }
}

/* Keep the hands-on editor in the first phone viewport. The full introduction
   remains available to larger screens and to search engines in the document. */
@media (max-width: 760px) {
  .demo-header {
    position: sticky;
    z-index: 30;
    top: 0;
    display: grid;
    min-height: 62px;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 0.45rem;
    border-bottom: 1px solid var(--line);
    background: rgba(14, 17, 23, 0.96);
    padding: max(0.45rem, env(safe-area-inset-top)) 0.55rem 0.45rem;
    backdrop-filter: blur(16px);
  }

  .demo-header .brand {
    width: 42px;
    min-width: 42px;
  }

  .demo-header .brand img {
    width: 40px;
    height: 40px;
  }

  .demo-header .brand span,
  .demo-header nav a:nth-of-type(n + 4) {
    display: none;
  }

  .demo-header nav {
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 0.2rem;
    overflow-x: auto;
    padding: 0.15rem 0.1rem;
    scrollbar-width: none;
  }

  .demo-header nav::-webkit-scrollbar {
    display: none;
  }

  .demo-header nav a {
    min-height: 40px;
    flex: 0 0 auto;
    padding: 0.55rem 0.58rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  .demo-intro,
  .tool-launchbar {
    display: none;
  }

  .demo-shell {
    width: 100%;
    padding: 0;
  }

  .app-window {
    height: calc(100svh - 62px);
    min-height: 480px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 360px) {
  .demo-header nav a {
    padding-inline: 0.48rem;
    font-size: 0.74rem;
  }
}
