.gui-app {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) 230px;
  gap: 16px;
  align-items: start;
}
.palette, .menus, .stage { padding: 12px; }
.palette { max-height: calc(100vh - 140px); overflow: auto; }
.group-label { margin: 12px 0 8px; }
.swatch {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
  text-align: left;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--line);
  padding: 6px;
  cursor: pointer;
  font-family: "Noto Sans", sans-serif;
  font-size: 14px;
  margin-bottom: 8px;
}
.swatch canvas {
  width: 72px;
  height: 32px;
  image-rendering: pixelated;
  background: #0d0d0d;
  flex: none;
  object-fit: contain;
  object-position: left center;
}
.swatch span { min-width: 0; }
.swatch:hover, .swatch[aria-pressed="true"] { border-color: var(--accent-2); }
.menu-list a {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  background: transparent;
  color: var(--muted);
  font-family: "MCTen", sans-serif;
  font-size: 16px;
  padding: 8px 10px;
  border-bottom: 3px solid transparent;
}
.menu-list a[aria-current="true"] {
  color: #fff;
  border-bottom-color: #fff;
  background: #111;
}
.hint {
  background: #6a4dff;
  color: #fff;
  padding: 12px 14px;
}
.search, #suche {
  display: block;
  width: min(420px, 100%);
}
#suche {
  background: #0d0d0d;
  color: var(--text);
  border: 2px solid var(--line);
  padding: 10px 12px;
  margin: 0 0 18px;
}
.parts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.part-full {
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  background: #0d0d0d;
  border: 2px solid var(--line);
}
#zoom { width: min(100%, 512px); height: auto; }
.stage label { display: block; color: var(--text); font-weight: 700; margin: 12px 0 6px; }
.stage input[type="text"],
.stage input[type="url"],
.stage input[type="password"] {
  width: 100%;
  background: #0d0d0d;
  color: var(--text);
  border: 2px solid var(--line);
  padding: 10px 12px;
  font-size: 16px;
}
#view, #sheet, #zoom {
  image-rendering: pixelated;
  background: #0d0d0d;
  border: 2px solid var(--line);
  touch-action: none;
}
#view { width: min(100%, 512px); height: auto; }
.view-wrap { position: relative; }
.tool-row, .save-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.colors { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.colors button {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid var(--line);
  cursor: pointer;
}
.colors button[aria-pressed="true"] { border-color: #fff; }
.preview-crop {
  height: 180px;
  overflow: hidden;
  border: 2px solid var(--line);
  background: #0d0d0d;
  margin-bottom: 10px;
}
.preview-crop canvas { width: 100%; height: auto; image-rendering: pixelated; }
.card-link { text-decoration: none; display: block; color: inherit; }
.card-link h3 { margin-top: 0; }
.asset-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; }
.asset-list { max-height: calc(100vh - 160px); overflow: auto; }
#zoom { max-width: 100%; height: auto; }
html[data-theme="light"] .menu-list a[aria-current="true"] {
  color: var(--text);
  border-bottom-color: var(--text);
  background: #fff;
}
html[data-theme="light"] #suche { background: #fff; }
html[data-theme="light"] .stage input[type="text"],
html[data-theme="light"] .stage input[type="url"],
html[data-theme="light"] .stage input[type="password"],
html[data-theme="light"] .swatch canvas,
html[data-theme="light"] #view,
html[data-theme="light"] #sheet,
html[data-theme="light"] #zoom,
html[data-theme="light"] .preview-crop { background: #fff; }
@media (max-width: 980px) {
  .gui-app, .asset-layout { grid-template-columns: 1fr; }
  .palette, .asset-list { max-height: none; }
}
