.app-body {
  height: 100dvh;
  overflow: hidden;
}

.anvil {
  --topbar-height: 52px;
  --sidebar-width: 244px;
  --inspector-width: 440px;
  display: grid;
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  height: 100dvh;
  background: var(--background);
}

.anvil[data-state="landing"],
.anvil[data-state="loading"] {
  overflow-y: auto;
  grid-template-rows: var(--topbar-height) auto;
}

.anvil-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-4);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
}

.anvil-topbar .brand {
  flex: none;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
}

.crumbs > a,
.crumbs > span:not(.crumb-separator) {
  color: var(--text-muted);
  white-space: nowrap;
}

.crumbs > a:hover {
  color: var(--text);
}

.crumb-separator {
  color: var(--text-subtle);
}

.crumb-separator::before {
  content: "/";
}

.cartridge-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
}

.cartridge-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cartridge-chip .icon {
  color: var(--accent-text);
}

.chip-version {
  color: var(--text-subtle);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.search-trigger.compact {
  min-width: 0;
  height: 30px;
}

.changes-button {
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.changes-count {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--surface-hover);
  color: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.changes-button.has-changes .changes-count {
  background: var(--accent);
  color: var(--accent-contrast);
}

@media (max-width: 860px) {
  .crumbs > a:first-child,
  .crumbs > .crumb-separator:first-of-type,
  .search-trigger.compact span,
  .search-trigger.compact .kbd-group,
  .changes-button span:not(.changes-count),
  .chip-version {
    display: none;
  }
}

.landing {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--space-16) var(--space-6) var(--space-20);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: var(--space-12);
  align-items: center;
}

.landing-copy h1 {
  margin-top: var(--space-5);
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.landing-copy p {
  max-width: 540px;
  margin-top: var(--space-5);
  color: var(--text-muted);
  font-size: 17px;
  line-height: 1.6;
}

.landing-points {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-8);
  padding: 0;
  list-style: none;
  color: var(--text-muted);
  font-size: 14.5px;
}

.landing-points li {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.landing-points .icon {
  color: var(--accent-text);
}

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--space-3);
  padding: var(--space-12) var(--space-8) var(--space-8);
  overflow: hidden;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-extra-large);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color 200ms ease, transform 200ms var(--ease-out), box-shadow 200ms ease;
}

.dropzone:hover,
.anvil.dragging .dropzone {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.dropzone-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 280px;
  background: radial-gradient(closest-side, var(--glow), transparent);
  pointer-events: none;
}

.dropzone-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background-subtle);
  color: var(--accent-text);
  box-shadow: var(--shadow-medium);
}

.dropzone h2 {
  margin-top: var(--space-2);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dropzone > p {
  color: var(--text-muted);
  font-size: 14px;
}

.dropzone .button {
  margin-top: var(--space-2);
}

.dropzone-error {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  max-width: 380px;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger) !important;
  font-size: 13px !important;
  text-align: left;
}

.spinning .icon {
  animation: spin-icon 1s linear infinite;
}

@keyframes spin-icon {
  to {
    transform: rotate(360deg);
  }
}

.recent {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  text-align: left;
}

.recent-title {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 500;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background-subtle);
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.recent-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

.recent-item span {
  display: grid;
  flex: 1;
  min-width: 0;
}

.recent-item strong {
  font-size: 14px;
  font-weight: 600;
}

.recent-item small {
  overflow: hidden;
  color: var(--text-subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-item > .icon:first-child {
  color: var(--accent-text);
}

.landing-games {
  margin-top: var(--space-20);
}

.section-label {
  margin: var(--space-8) 0 var(--space-4);
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.game-card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-small), var(--highlight);
}

.game-year {
  color: var(--text-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}

.game-card h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.game-card p {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-2);
}

@media (max-width: 900px) {
  .landing-hero {
    grid-template-columns: 1fr;
  }

  .game-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .landing {
    padding: var(--space-10) var(--space-4) var(--space-16);
  }

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

.anvil.dragging::after {
  content: "Drop to open the cartridge";
  position: fixed;
  inset: var(--space-3);
  z-index: 200;
  display: grid;
  place-items: center;
  border: 2px dashed var(--accent);
  border-radius: var(--radius-extra-large);
  background: color-mix(in srgb, var(--background) 80%, transparent);
  color: var(--text);
  font-size: 20px;
  font-weight: 600;
  pointer-events: none;
}

.anvil-body {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 0;
}

.anvil-sidebar {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--border);
  background: var(--background-subtle);
}

.sidebar-cartridge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-small), var(--highlight);
}

.sidebar-cartridge {
  width: calc(100% - var(--space-6));
  text-align: left;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.sidebar-cartridge:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

.cartridge-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.cartridge-chevron {
  color: var(--text-subtle);
}

.sidebar-cartridge strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-cartridge small {
  color: var(--text-subtle);
  font-size: 12px;
}

.cartridge-art {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 50%, #ffd08a));
  color: var(--accent-contrast);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
  padding: var(--space-2) var(--space-3);
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: var(--space-3) var(--space-2) var(--space-2);
  color: var(--text-subtle);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  list-style: none;
  cursor: default;
}

summary.sidebar-label {
  cursor: pointer;
}

summary.sidebar-label::-webkit-details-marker {
  display: none;
}

summary.sidebar-label .icon {
  transition: transform 150ms ease;
}

details[open] > summary.sidebar-label .icon {
  transform: rotate(90deg);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 32px;
  padding: 0 var(--space-2);
  border-radius: var(--radius-small);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: background-color 120ms ease, color 120ms ease;
}

.sidebar-link.small {
  height: 28px;
  font-size: 12.5px;
}

.sidebar-link span:first-of-type {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-link:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.sidebar-link[aria-current] {
  background: var(--surface-hover);
  color: var(--text);
}

.sidebar-link[aria-current] .icon {
  color: var(--accent-text);
}

.sidebar-count {
  margin-left: auto;
  color: var(--text-subtle);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.sidebar-footer {
  padding: var(--space-3);
  border-top: 1px solid var(--border);
}

.sidebar-footer .button {
  width: 100%;
  justify-content: flex-start;
}

@media (max-width: 860px) {
  .anvil-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .anvil-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-cartridge,
  .sidebar-footer,
  .sidebar-label,
  .sidebar-group {
    display: none;
  }

  .sidebar-nav {
    display: flex;
    gap: var(--space-1);
    overflow-x: auto;
    padding: var(--space-2);
  }

  .sidebar-link {
    flex: none;
  }
}

.anvil-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.view-frame {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.view-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-6);
  padding: var(--space-5) var(--space-6) var(--space-4);
  border-bottom: 1px solid var(--border);
}

.view-title {
  min-width: 0;
}

.view-title h1 {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.025em;
}

.view-count {
  color: var(--text-subtle);
  font-size: 14px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.view-title p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.view-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.search-field {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 260px;
  height: 32px;
  padding: 0 6px 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-subtle);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-field:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 13.5px;
}

.search-field input::-webkit-search-cancel-button {
  display: none;
}

.view-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.view-error {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin: var(--space-6);
  padding: var(--space-4);
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent);
  border-radius: var(--radius-large);
  color: var(--danger);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.split.has-inspector {
  grid-template-columns: minmax(0, 1fr) var(--inspector-width);
}

.split.has-inspector.wide {
  --inspector-width: 580px;
}

.split-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

@media (max-width: 1100px) {
  .split.has-inspector {
    grid-template-columns: minmax(0, 1fr);
  }

  .split.has-inspector .inspector {
    position: fixed;
    inset: var(--topbar-height) 0 0 auto;
    z-index: 40;
    width: min(100vw, var(--inspector-width));
    box-shadow: var(--shadow-large);
  }
}

.data-grid-host {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
}

.data-grid {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  outline: none;
}

.data-grid-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.data-grid-head,
.data-grid-row {
  display: grid;
  grid-template-columns: var(--columns);
  min-width: var(--minimum-width);
}

.data-grid-head {
  position: sticky;
  top: 0;
  z-index: 2;
  height: var(--row-height);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(8px);
}

.data-grid-header {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 0 var(--space-3);
  border: 0;
  background: none;
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.data-grid-header:first-child,
.data-grid-cell:first-child {
  padding-left: var(--space-6);
}

.data-grid-header span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-grid-header.numeric {
  justify-content: flex-end;
}

.data-grid-header:hover {
  color: var(--text);
}

.data-grid-header .sort-icon {
  flex: none;
  opacity: 0;
  transition: opacity 120ms ease;
}

.data-grid-header:hover .sort-icon,
.data-grid-header[aria-sort="ascending"] .sort-icon,
.data-grid-header[aria-sort="descending"] .sort-icon {
  opacity: 1;
}

.data-grid-header[aria-sort="ascending"],
.data-grid-header[aria-sort="descending"] {
  color: var(--text);
}

.data-grid-header:disabled {
  cursor: default;
}

.data-grid-body {
  position: relative;
}

.data-grid-rows {
  position: absolute;
  inset: 0 0 auto;
  will-change: transform;
}

.data-grid-row {
  height: var(--row-height);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  cursor: default;
  transition: background-color 80ms ease;
}

.data-grid-row:hover {
  background: var(--background-subtle);
}

.data-grid-row.selected {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.data-grid-cell {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 var(--space-3);
  overflow: hidden;
  font-size: 13.5px;
  white-space: nowrap;
}

.data-grid-cell > * {
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-grid-cell.numeric {
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.data-grid-cell.mono {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.cell-empty {
  color: var(--text-subtle);
}

.cell-strong {
  font-weight: 500;
}

.cell-muted {
  color: var(--text-muted);
}

.cell-input {
  width: 72px;
  height: 26px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  transition: border-color 120ms ease, background-color 120ms ease;
}

.data-grid-row:hover .cell-input {
  border-color: var(--border);
  background: var(--surface);
}

.cell-input:focus {
  border-color: var(--accent);
  background: var(--surface);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.data-grid-empty {
  position: absolute;
  inset: calc(var(--row-height) + var(--space-10)) 0 auto;
  color: var(--text-subtle);
  text-align: center;
}

.inspector {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid var(--border);
  background: var(--background);
  animation: inspector-in 260ms var(--ease-out) both;
}

@keyframes inspector-in {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
}

.inspector-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-4) var(--space-3) var(--space-5);
  border-bottom: 1px solid var(--border);
}

.inspector-header h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.inspector-header p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 13px;
}

.inspector-actions {
  display: flex;
  gap: var(--space-1);
}

.inspector-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-bottom: var(--space-10);
}

.inspector-section {
  padding: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.inspector-section > h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.inspector-section > h3 small {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 400;
}

.section-note {
  margin-top: var(--space-3);
  color: var(--text-subtle);
  font-size: 12.5px;
  line-height: 1.5;
}

.fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4) var(--space-3);
}

.fields .wide {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.field-hint {
  color: var(--text-subtle);
  font-size: 11.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.input:hover {
  border-color: var(--border-strong);
}

.input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 18%, transparent);
}

.input-group .input {
  padding-right: 56px;
}

.input-suffix {
  position: absolute;
  right: 10px;
  color: var(--text-subtle);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.input-suffix.full {
  color: var(--warning);
}

.select {
  appearance: none;
  padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-subtle) 50%), linear-gradient(135deg, var(--text-subtle) 50%, transparent 50%);
  background-position: calc(100% - 15px) 15px, calc(100% - 11px) 15px;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}

.field-error {
  color: var(--danger);
  font-size: 12px;
}

.slider-row {
  display: grid;
  grid-template-columns: minmax(96px, 128px) minmax(0, 1fr) 34px;
  align-items: center;
  gap: var(--space-3);
  min-height: 30px;
  font-size: 13px;
}

.slider-label {
  overflow: hidden;
  color: var(--text-muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slider-row output {
  color: var(--text);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background-subtle);
}

.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.segmented button:hover {
  color: var(--text);
}

.segmented button[aria-selected="true"] {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-small), 0 0 0 1px var(--border);
}

.segment-count {
  color: var(--text-subtle);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.key-values {
  display: grid;
  margin: 0;
}

.key-values div {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.key-values div:last-child {
  border-bottom: 0;
}

.key-values dt {
  color: var(--text-muted);
}

.key-values dd {
  margin: 0;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.key-values code {
  font-size: 12px;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  max-width: 420px;
  margin: var(--space-16) auto;
  padding: 0 var(--space-4);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-muted);
}

.empty-state h2 {
  font-size: 16px;
  font-weight: 600;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
}

.loading-rows {
  display: grid;
  gap: 10px;
  padding: var(--space-6);
}

.loading-bar {
  display: block;
  height: 18px;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--surface-raised), var(--surface-hover), var(--surface-raised));
  background-size: 200% 100%;
  animation: shimmer-move 1.4s ease-in-out infinite;
  animation-delay: var(--delay, 0ms);
}

@keyframes shimmer-move {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}

.overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: var(--space-8);
  padding: var(--space-6);
}

@media (max-width: 1180px) {
  .overview {
    grid-template-columns: 1fr;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stat-tile {
  position: relative;
  display: grid;
  gap: 2px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-small), var(--highlight);
  transition: border-color 150ms ease, transform 200ms var(--ease-out);
}

.stat-tile:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.stat-icon {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  color: var(--text-subtle);
}

.stat-value {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 13.5px;
  font-weight: 600;
}

.stat-text {
  color: var(--text-subtle);
  font-size: 12.5px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

@media (max-width: 640px) {
  .action-grid {
    grid-template-columns: 1fr;
  }
}

.action-card {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  transition: border-color 150ms ease, background-color 150ms ease;
}

.action-card:hover {
  border-color: var(--border-strong);
  background: var(--background-subtle);
}

.action-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent-border);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-text);
}

.action-card strong {
  font-size: 14px;
  font-weight: 600;
}

.action-card span:not(.action-icon) {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.action-arrow {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  color: var(--text-subtle);
  transition: transform 200ms var(--ease-out), color 150ms ease;
}

.action-card:hover .action-arrow {
  color: var(--text);
  transform: translateX(2px);
}

.facts {
  padding: var(--space-1) var(--space-5);
}

.showcase {
  display: flex;
  flex-direction: column;
  align-self: start;
  overflow: hidden;
  position: sticky;
  top: var(--space-6);
}

.showcase-stage,
.stage-frame {
  position: relative;
  background-color: var(--background-subtle);
  background-image: radial-gradient(circle at 50% 38%, var(--accent-soft), transparent 60%), radial-gradient(var(--grid-line) 1.2px, transparent 1.2px);
  background-size: 100% 100%, 14px 14px;
}

.showcase-stage {
  aspect-ratio: 4 / 5;
}

.showcase-stage canvas,
.stage-frame canvas {
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

.showcase-stage canvas:active,
.stage-frame canvas:active {
  cursor: grabbing;
}

.showcase-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
}

.showcase-caption div {
  display: grid;
  min-width: 0;
}

.showcase-caption strong {
  font-size: 14px;
  font-weight: 600;
}

.showcase-caption small {
  overflow: hidden;
  color: var(--text-subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-frame {
  aspect-ratio: 1 / 1;
  border-bottom: 1px solid var(--border);
}

.stage-toolbar {
  position: absolute;
  right: var(--space-3);
  bottom: var(--space-3);
  display: flex;
  gap: var(--space-1);
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
  backdrop-filter: blur(8px);
}

.stage-badge {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
}

.transport {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
}

.transport input[type="range"] {
  flex: 1;
}

.transport output {
  min-width: 72px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.changes-popover {
  position: fixed;
  z-index: 60;
  width: min(420px, calc(100vw - 24px));
  max-height: min(560px, 70vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-large);
  animation: palette-in 180ms var(--ease-out) both;
}

.changes-popover .popover-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.changes-popover .popover-head span {
  color: var(--text-subtle);
  font-size: 12.5px;
}

.changes-popover ul {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  padding: var(--space-2);
  list-style: none;
}

.changes-popover li {
  padding: var(--space-3);
  border-radius: var(--radius);
}

.changes-popover li + li {
  border-top: 1px solid var(--border);
}

.change-target {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.change-target span {
  flex: 1;
}

.changes-popover li p {
  margin-top: 4px;
  font-size: 13.5px;
}

.changes-popover .popover-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
  background: var(--background-subtle);
}

.changes-empty {
  padding: var(--space-6) var(--space-5);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.input.static {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  background: var(--background-subtle);
}

.inline-select {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-subtle);
}

.inline-select .input {
  width: auto;
  max-width: 220px;
  height: 32px;
}

.sliders {
  display: grid;
  gap: 2px;
}

details.more {
  margin-top: var(--space-2);
}

details.more > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

details.more > summary::-webkit-details-marker {
  display: none;
}

details.more > summary .icon {
  transition: transform 150ms ease;
}

details.more[open] > summary .icon {
  transform: rotate(90deg);
}

details.more[open] > summary {
  margin-bottom: var(--space-3);
}

.inspector-section details.more:first-child {
  margin-top: 0;
}

.moveset {
  display: grid;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.moveset-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 36px;
  gap: var(--space-3);
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.moveset-row:last-child {
  border-bottom: 0;
}

.moveset-category {
  overflow: hidden;
  color: var(--text-subtle);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moveset-move {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.moveset-damage {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.section-note.warning {
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
  padding: var(--space-3);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--warning) 10%, transparent);
  color: var(--text);
}

.section-note.warning .icon {
  margin-top: 2px;
  color: var(--warning);
}

.animation-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.animation-list {
  border-right: 1px solid var(--border);
}

.animation-stage {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.stage-frame.wide {
  flex: 1;
  aspect-ratio: auto;
  min-height: 0;
}

.stage-overlay {
  position: absolute;
  top: var(--space-4);
  left: var(--space-5);
  right: var(--space-5);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-4);
  pointer-events: none;
}

.stage-overlay > * {
  pointer-events: auto;
}

.stage-overlay div {
  display: grid;
}

.stage-overlay strong {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.stage-overlay small {
  color: var(--text-muted);
  font-size: 12.5px;
}

@media (max-width: 900px) {
  .animation-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1.2fr);
  }

  .animation-list {
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6) var(--space-10);
}

.texture-card {
  display: grid;
  gap: 2px;
  padding: 6px 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--surface);
  text-align: left;
  content-visibility: auto;
  contain-intrinsic-size: 128px 170px;
  transition: border-color 120ms ease, transform 200ms var(--ease-out), box-shadow 150ms ease;
}

.texture-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.texture-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.texture-frame,
.texture-stage {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 6px;
  background-color: var(--background-subtle);
  background-image: linear-gradient(45deg, var(--surface-hover) 25%, transparent 25%, transparent 75%, var(--surface-hover) 75%), linear-gradient(45deg, var(--surface-hover) 25%, transparent 25%, transparent 75%, var(--surface-hover) 75%);
  background-position: 0 0, 6px 6px;
  background-size: 12px 12px;
}

.texture-frame {
  aspect-ratio: 1;
  margin-bottom: 6px;
  padding: 6px;
}

.texture-frame canvas,
.texture-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.texture-frame canvas {
  opacity: 0;
  transition: opacity 200ms ease;
}

.texture-card.painted canvas {
  opacity: 1;
}

.texture-card.broken .texture-frame {
  opacity: 0.4;
}

.texture-label {
  padding: 0 2px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.texture-meta {
  padding: 0 2px;
  color: var(--text-subtle);
  font-size: 11.5px;
}

.texture-preview {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border-bottom: 1px solid var(--border);
}

.texture-preview.compare {
  grid-template-columns: 1fr 1fr;
}

.texture-preview figure {
  display: grid;
  gap: var(--space-2);
}

.texture-stage {
  aspect-ratio: 1;
  padding: var(--space-3);
}

.texture-preview figcaption {
  color: var(--text-subtle);
  font-size: 12px;
  text-align: center;
}

.drop-target {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-large);
  background: var(--background-subtle);
  color: var(--accent-text);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.drop-target:hover,
.drop-target.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-target span {
  display: grid;
  gap: 2px;
}

.drop-target strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.drop-target small {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}

.replace-options {
  display: grid;
  gap: var(--space-3);
}

.replace-options > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
}

.replace-options > label.toggle {
  justify-content: flex-start;
  gap: var(--space-2);
  cursor: pointer;
}

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

.replace-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

.swatches {
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  gap: 3px;
}

.swatch {
  aspect-ratio: 1;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.15);
}

.swatch.clear {
  background-image: linear-gradient(45deg, transparent 45%, var(--danger) 45%, var(--danger) 55%, transparent 55%);
}

.now-playing {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--border);
  background: var(--background-subtle);
}

.now-playing-info {
  display: grid;
  min-width: 150px;
}

.now-playing-info strong {
  font-size: 13.5px;
  font-weight: 600;
}

.now-playing-info small {
  color: var(--text-subtle);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.now-playing canvas {
  flex: 1;
  min-width: 0;
  height: 36px;
  cursor: pointer;
}

.song-title {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.song-title .icon {
  color: var(--text-subtle);
}

.hex {
  display: flex;
  min-height: 360px;
  height: 60vh;
}

.hex-scroll {
  flex: 1;
  overflow: auto;
  padding: var(--space-3) 0;
}

.hex-body {
  position: relative;
}

.hex-rows {
  position: absolute;
  inset: 0 0 auto;
}

.hex-row {
  display: flex;
  gap: var(--space-4);
  height: 22px;
  padding: 0 var(--space-5);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 22px;
  white-space: pre;
}

.hex-offset {
  color: var(--text-subtle);
}

.hex-bytes {
  display: flex;
  gap: 5px;
}

.hex-bytes .zero {
  color: var(--text-subtle);
}

.hex-text {
  color: var(--text-muted);
}

.mode-switch {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
  padding: var(--space-2);
  border-radius: var(--radius);
  cursor: pointer;
}

.mode-switch:hover {
  background: var(--surface-hover);
}

.mode-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  flex: none;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color 150ms ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-small);
  transition: transform 200ms var(--ease-out);
}

.mode-switch input:checked + .switch-track {
  background: var(--accent);
}

.mode-switch input:checked + .switch-track .switch-thumb {
  transform: translateX(12px);
}

.mode-switch input:focus-visible + .switch-track {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.mode-label {
  display: grid;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
}

.mode-label small {
  color: var(--text-subtle);
  font-size: 11.5px;
  font-weight: 400;
}

.costume-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-block: var(--space-3);
}

.costume-section > h3 {
  margin: 0;
}

.switch-popover {
  position: fixed;
  z-index: 60;
  display: grid;
  gap: 2px;
  padding: var(--space-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow-large);
  animation: palette-in 160ms var(--ease-out) both;
}

.switch-title {
  padding: var(--space-1) var(--space-2) var(--space-2);
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 500;
}

.switch-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 8px var(--space-2);
  border: 0;
  border-radius: var(--radius);
  background: none;
  text-align: left;
}

.switch-item:hover {
  background: var(--surface-hover);
}

.switch-item > .icon:first-child {
  color: var(--text-subtle);
}

.switch-item.current > .icon:first-child,
.switch-item .icon:last-child {
  color: var(--accent-text);
}

.switch-item span {
  display: grid;
  flex: 1;
  min-width: 0;
}

.switch-item strong {
  font-size: 13.5px;
  font-weight: 600;
}

.switch-item small {
  overflow: hidden;
  color: var(--text-subtle);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.switch-item:last-child {
  margin-top: var(--space-1);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  padding-top: var(--space-3);
}

.cartridge-text strong,
.cartridge-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-toolbar {
  left: var(--space-3);
  right: auto;
  flex-wrap: wrap;
  align-items: center;
  max-width: calc(100% - var(--space-6));
}

.stage-toolbar .segmented {
  padding: 2px;
  border: 0;
  background: transparent;
}

.stage-toolbar .segmented button {
  height: 24px;
  padding: 0 8px;
  font-size: 12px;
}

.toolbar-divider {
  width: 1px;
  height: 16px;
  margin: 0 2px;
  background: var(--border);
}

.bone-size {
  display: inline-flex;
  align-items: center;
  width: 84px;
  padding: 0 4px;
}

.stage-toolbar [aria-pressed="true"] {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.showcase-stage .stage-toolbar {
  bottom: var(--space-3);
}

.rating-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.rating-rank {
  min-width: 30px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.rating-bar {
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--border);
}

.rating-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 55%, transparent), var(--accent));
}

.rating-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: var(--space-4);
}

.rating-summary strong {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.rating-summary span {
  color: var(--text-muted);
}

.rating-summary em {
  margin-left: auto;
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 15px;
}

.situations {
  display: grid;
  gap: 8px;
}

.situation {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}

.situation > span:first-child {
  color: var(--text-muted);
}

.situation em {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: normal;
  text-align: right;
}

.situation-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
}

.situation-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--value) * 100%);
  border-radius: 4px;
  background: var(--text-subtle);
}

.situation-bar i.above {
  background: var(--accent);
}

.situation-bar b {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 50%;
  width: 1px;
  background: var(--text-muted);
}

button.moveset-row {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 36px 14px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: none;
  text-align: left;
  transition: background-color 120ms ease;
}

button.moveset-row:hover {
  background: var(--surface-hover);
}

.moveset-edit {
  color: var(--text-subtle);
  opacity: 0;
  transition: opacity 120ms ease;
}

button.moveset-row:hover .moveset-edit {
  opacity: 1;
}

.skins {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
  gap: 6px;
}

.skin {
  display: grid;
  place-items: center;
  height: 56px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background-subtle);
  transition: border-color 120ms ease, transform 200ms var(--ease-out);
}

.skin:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.skin canvas {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  image-rendering: pixelated;
}

.footer-actions {
  display: flex;
  gap: var(--space-2);
}

.now-playing.drop-ready {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.song-title .cell-muted {
  font-size: 12px;
}

.entrance-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.theme-pick {
  flex: 1;
  min-width: 0;
  justify-content: space-between;
}

.theme-pick span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-variant {
  margin-left: var(--space-2);
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-subtle);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 16px;
}

.slider-group {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: var(--space-4) 0 var(--space-2);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
}

.slider-group small {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 400;
}

.entrance {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

.entrance.no-video {
  grid-template-columns: minmax(0, 1fr);
}

.tron-screen {
  width: 112px;
  height: 112px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #000;
  image-rendering: pixelated;
}

.entrance-controls {
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}

.entrance-label {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.entrance-label small {
  color: var(--text-subtle);
  font-size: 12px;
  font-weight: 400;
}

.weight-control {
  display: grid;
  gap: var(--space-2);
}

.texture-owner {
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-grid-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.data-grid-sort:disabled {
  cursor: default;
}

.data-grid-sort:focus-visible {
  border-radius: 4px;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.changes-popover .popover-head h2 {
  margin: 0;
  font-size: inherit;
  font-weight: 600;
}

.field-label label {
  cursor: default;
}

.drop-target:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.colour-select {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
}

.colour-swatch {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background-image: linear-gradient(45deg, var(--surface-hover) 25%, transparent 25%, transparent 75%, var(--surface-hover) 75%);
  background-size: 8px 8px;
}

.section-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
