/* Asset explorer: the preview is the visual focus. */
:root {
  color-scheme: light dark;
  --bg: #eef2f7;
  --panel: #ffffff;
  --text: #24324a;
  --muted: #5d6d85;
  --border: #d8e0eb;
  --accent: #275cda;
  --accent-text: #ffffff;
  --accent-hover: #1746b3;
  --row-hover: #f0f5ff;
  --selected: #e0eaff;
  --code-bg: #f3f6fa;
  --busy-bg: #fff3d7;
  --busy-text: #775311;
  --ready-bg: #e9f5ef;
  --ready-text: #256747;
  --error-bg: #ffebee;
  --error-text: #9a2640;
  --check-a: #dae1eb;
  --check-b: #f6f8fc;
  --key: #7045ac;
  --string: #237243;
  --number: #275cda;
  --literal: #a34e1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141e2e;
    --panel: #1c293d;
    --text: #e4ecf8;
    --muted: #a3b3ca;
    --border: #34455d;
    --accent: #91b6ff;
    --accent-text: #122440;
    --accent-hover: #b4ccff;
    --row-hover: #243651;
    --selected: #2c4265;
    --code-bg: #162236;
    --busy-bg: #3e331e;
    --busy-text: #f6d28d;
    --ready-bg: #203b35;
    --ready-text: #a1debd;
    --error-bg: #452635;
    --error-text: #ffb9c6;
    --check-a: #283b54;
    --check-b: #31455e;
    --key: #ccb1ff;
    --string: #a1debd;
    --number: #91b6ff;
    --literal: #ffbf92;
  }
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
a {
  color: var(--accent);
  text-underline-offset: 3px;
}
code, pre, .mono, .eyebrow, .art-label {
  font-family: "SF Mono", Consolas, ui-monospace, monospace;
  font-size: 0.88em;
}
pre {
  background: var(--code-bg);
  padding: 18px;
  border-radius: 8px;
  overflow: auto;
  max-height: 480px;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
header.site {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.brand span {
  color: var(--muted);
  font-weight: 400;
}
header.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 12px;
}
header.site nav a {
  color: var(--muted);
  text-decoration: none;
}
header.site nav a:hover {
  color: var(--accent);
}
main {
  max-width: 1600px;
  margin: auto;
  padding: 28px 32px;
  display: grid;
  gap: 22px;
}
.intro {
  display: grid;
  grid-template-columns: 1fr 300px;
  align-items: center;
  gap: 36px;
  padding: 18px 24px 30px;
}
.eyebrow {
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.intro h1 {
  font-family: "Avenir Next", "Trebuchet MS", sans-serif;
  font-size: clamp(32px, 4.4vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin: 18px 0;
  font-weight: 650;
}
.tagline {
  max-width: 560px;
  font-size: 16px;
  color: var(--muted);
}
.privacy {
  color: var(--muted);
  font-size: 12px;
}
.privacy span {
  color: var(--ready-text);
  margin-right: 7px;
}
.bundle-art {
  padding: 30px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: repeating-conic-gradient(var(--check-a) 0% 25%, var(--check-b) 0% 50%) 0 0 / 24px 24px;
  transform: rotate(4deg);
}
.pixel-tile {
  width: 144px;
  height: 144px;
  background: repeating-conic-gradient(#4975e4 0% 25%, #a6c4ff 0% 50%) 0 0 / 48px 48px;
  border: 8px solid var(--panel);
  box-shadow: 8px 8px 0 #24324a26;
}
.art-label {
  background: var(--panel);
  padding: 4px 10px;
  border-radius: 4px;
}
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  min-width: 0;
}
.panel h2 {
  font-size: 16px;
  margin: 0 0 18px;
  font-weight: 650;
}
.panel h3 {
  font-size: 15px;
  margin: 18px 0 12px;
  overflow-wrap: anywhere;
}
.open-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 24px;
  margin-top: 18px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.stack > label {
  font-weight: 600;
}
.stack button {
  align-self: flex-start;
}
.dropzone {
  border: 1px dashed var(--accent);
  border-radius: 10px;
  padding: 18px;
  background: var(--row-hover);
}
.dropzone label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}
.dropzone strong {
  color: var(--text);
  font-size: 16px;
}
.upload-icon {
  color: var(--accent);
  font-size: 24px;
  line-height: 1;
}
.dropzone.over {
  outline: 3px solid var(--accent);
  background: var(--selected);
}
input, select, textarea, button {
  font: inherit;
  color: inherit;
  min-width: 0;
}
input[type="search"], input[type="text"], select, textarea {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 9px 10px;
  width: 100%;
  max-width: 100%;
}
input[type="file"] {
  max-width: 100%;
  margin-top: 12px;
  font-size: 12px;
}
input::file-selector-button {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  margin-right: 10px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}
textarea {
  resize: vertical;
}
button {
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 16px;
  cursor: pointer;
  font-weight: 600;
}
button:hover {
  background: var(--accent-hover);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
button.link {
  background: none;
  color: var(--accent);
  padding: 0;
  border: 0;
  text-align: left;
  overflow-wrap: anywhere;
}
button.link:hover {
  text-decoration: underline;
}
.status {
  margin: 20px 0 0;
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.status[data-state="busy"] {
  background: var(--busy-bg);
  color: var(--busy-text);
}
.status[data-state="ready"] {
  background: var(--ready-bg);
  color: var(--ready-text);
}
.status[data-state="error"], .error {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 12px;
  border-radius: 7px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.workspace {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  grid-template-areas: "assets details" "batch batch";
  align-items: start;
}
.assets {
  grid-area: assets;
}
.details {
  grid-area: details;
  min-height: 430px;
}
.batch {
  grid-area: batch;
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}
.toolbar label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  flex: 1 1 160px;
}
.toolbar .grow {
  flex: 1 1 240px;
}
.file-list {
  margin: 14px 0;
  font-size: 12px;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
summary:hover {
  color: var(--accent);
}
.table-wrap {
  overflow: auto;
  max-height: 65vh;
  border: 1px solid var(--border);
  border-radius: 8px;
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 420px;
  font-size: 12px;
}
/* IDs and source files remain available in each asset’s information panel. */
th:nth-child(4), th:nth-child(5), td.id, td.file {
  display: none;
}
td:nth-child(2) {
  min-width: 96px;
}
th, td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
thead th {
  position: sticky;
  top: 0;
  background: var(--code-bg);
  color: var(--muted);
  z-index: 1;
  font-weight: 500;
}
td.path, td.file {
  word-break: break-all;
  max-width: 220px;
}
td.id {
  white-space: nowrap;
}
td.num, th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
tbody tr:hover {
  background: var(--row-hover);
}
tbody tr[aria-selected="true"] {
  background: var(--selected);
}
tbody tr[aria-selected="true"] td:first-child {
  box-shadow: inset 3px 0 var(--accent);
}
.empty-state {
  padding: 48px 20px;
  text-align: center;
}
.empty-state p {
  max-width: 320px;
  margin: 12px auto 22px;
}
.empty-icon {
  font-size: 48px;
  color: var(--muted);
}
.metadata, #image-info {
  border-top: 1px solid var(--border);
  padding: 14px 0;
}
.preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}
.preview-toolbar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
}
.preview-toolbar button {
  margin-left: auto;
}
.preview-stage {
  width: 100%;
  min-height: 300px;
  max-height: 480px;
  overflow: auto;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  display: grid;
}
.preview-stage[data-background="checker"], .gallery canvas {
  background: repeating-conic-gradient(var(--check-a) 0% 25%, var(--check-b) 0% 50%) 0 0 / 16px 16px;
}
.preview-stage[data-background="dark"] {
  background: #172233;
}
.preview-stage[data-background="light"] {
  background: #ffffff;
}
#preview {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
  align-self: center;
  justify-self: center;
}
dl.info {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px 16px;
  margin: 16px 0;
  font-size: 12px;
}
dl.info dt {
  color: var(--muted);
}
dl.info dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.tree, .tree ul {
  list-style: none;
  margin: 0;
  padding-left: 16px;
  font-family: "SF Mono", Consolas, monospace;
  font-size: 12px;
}
.tree {
  padding: 14px;
  background: var(--code-bg);
  border-radius: 8px;
  overflow: auto;
}
.tree summary {
  font-weight: 400;
}
.tree .key {
  color: var(--key);
}
.tree .string {
  color: var(--string);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.tree .number, .tree .bigint {
  color: var(--number);
}
.tree .literal {
  color: var(--literal);
}
.tree .note {
  color: var(--muted);
  font-style: italic;
}
.gallery {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(144px, 1fr));
  align-items: start;
  gap: 12px;
}
.gallery button {
  width: 100%;
  min-height: 152px;
  background: var(--code-bg);
  color: var(--text);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.gallery button:hover {
  border-color: var(--accent);
  background: var(--row-hover);
}
.gallery canvas {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 96px;
  image-rendering: pixelated;
}
progress {
  width: 200px;
  max-width: 100%;
  accent-color: var(--accent);
}
.developer {
  font-size: 13px;
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 12px 24px 32px;
}
@media (min-width: 961px) {
  .details {
    max-height: calc(100vh - 40px);
    overflow: auto;
  }
}
@media (max-width: 960px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "assets" "details" "batch";
  }
  .open-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dropzone {
    grid-column: 1 / -1;
  }
  .intro {
    grid-template-columns: 1fr 200px;
    padding: 10px 0 24px;
  }
  .bundle-art {
    padding: 16px;
  }
  .pixel-tile {
    width: 112px;
    height: 112px;
  }
}
@media (max-width: 600px) {
  header.site {
    padding: 16px;
  }
  header.site nav {
    gap: 16px;
  }
  main {
    padding: 20px 14px;
    gap: 16px;
  }
  .intro {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .bundle-art {
    display: none;
  }
  .intro h1 {
    font-size: 38px;
  }
  .tagline {
    font-size: 14px;
  }
  .open-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .panel {
    padding: 16px;
  }
  .preview-stage {
    min-height: 240px;
    padding: 12px;
  }
  .preview-toolbar button {
    margin-left: 0;
  }
  dl.info {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  dl.info dd {
    margin-bottom: 10px;
  }
}
