/* app.css — Art Studio · Evolve. Built on base.css tokens; zero horizontal overflow at 390px. */
html, body {
  max-width: 100%;
}

.flush { margin-top: 0; }
.sub-h { font-size: 16px; margin: 0 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mono { font-family: var(--mono); }

button, .btn {
  transition: transform 120ms cubic-bezier(0.22, 1, 0.36, 1), background-color 120ms ease, border-color 120ms ease;
}
button:active, .btn:active {
  transform: scale(0.98);
}
button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.card, .tile {
  transition: border-color 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* Hero stage */
.hero-card {
  margin: 0 0 24px;
  padding: 14px;
  background: var(--surface);
}
.art-frame {
  width: 100%;
  background: #070c18;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.art-frame svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72vh;
}
.hero-caption {
  margin: 10px 0;
  font-size: 15px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.hero-controls {
  padding-top: 6px;
  border-top: 1px solid var(--line);
}
.hero-controls input[type="range"],
.bench-scrub-row input[type="range"] {
  padding: 0;
  min-width: 100px;
  accent-color: var(--accent);
}

/* Gallery wall */
.wall-head h2 {
  margin: 16px 0 8px;
}
.breed-bar {
  margin-bottom: 14px;
}
.gallery-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.tile.tile-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}
.tile-poster {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #070c18;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.tile-poster svg {
  display: block;
  width: 100%;
  height: 100%;
}
.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
.tile-title {
  font-weight: 600;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.tile-sub {
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.tile-acts {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.tile-acts button {
  flex: 1 1 auto;
  min-height: 36px;
  padding: 6px 10px;
  font-size: 14px;
}

/* Workbench */
.bench-card {
  margin-top: 28px;
}
.bench-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .bench-layout {
    grid-template-columns: 1.1fr 0.9fr;
  }
}
.bench-preview-col, .bench-meta-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.bench-actions select {
  max-width: 100%;
}
.bench-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: var(--bg);
}

/* Critic list */
.critic-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.critic-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  padding: 4px 0;
  border-bottom: 1px solid var(--line);
}
.critic-row:last-child {
  border-bottom: none;
}
.critic-name {
  font-weight: 600;
  font-family: var(--mono);
}
.critic-val {
  color: var(--muted);
  font-family: var(--mono);
  overflow-wrap: anywhere;
}

/* Lineage */
.lineage-list {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lineage-list li {
  overflow-wrap: anywhere;
}
.link-btn {
  min-height: 28px;
  padding: 2px 8px;
  font-size: 12px;
  font-family: var(--mono);
}

/* Families & Motion lists */
.families-list, .motion-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}
.family-item, .motion-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.family-swatches svg, .motion-demo svg {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Commissions */
.commission-card {
  border-style: dashed;
}

/* Data card */
.data-card {
  margin-top: 32px;
}

/* Mobile-first Studio collection, built on the existing art renderer. */
*, *::before, *::after { box-sizing: border-box; }
.wrap, .row, section, figure, form, header, footer { min-width: 0; }
.top { flex-wrap: wrap; }
.brand, footer a { display: inline-flex; align-items: center; min-height: 44px; }
button, .btn, select, input, summary, .link-btn, .tile-acts button { min-height:44px; min-width:44px; }
input, select, textarea { font-size:16px; max-width:100%; }
.language-control select[data-language-picker] { font-size:16px; }
button, .btn, summary, h1, h2, h3, p, label { overflow-wrap:anywhere; white-space:normal; }
select { width:auto; min-width:0; }
.gallery-grid { grid-template-columns:repeat(auto-fill,minmax(min(240px,100%),1fr)); }
.families-list,.motion-list { grid-template-columns:repeat(auto-fill,minmax(min(260px,100%),1fr)); }
.collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); margin-top:14px; }
.original-poster { display:block; width:100%; height:auto; aspect-ratio:1; border-radius:8px; }
.original-tile { padding:8px; gap:8px; }
.original-tile button { padding:8px; width:100%; margin-top:auto; }
#collection-filter { width:min(100%,360px); display:block; margin-top:6px; }
#collection-more { margin:12px 0; }
#originals { margin-bottom:24px; }
.hero-card { margin-inline:0; }
.hero-stage svg { max-height:58vh; }
.bench-stage { max-height:320px; }
.bench-stage svg { max-height:320px; }
.bench-actions { align-items:stretch; }
.bench-actions select { width:100%; }
.hero-controls .grow,.bench-scrub-row .grow { flex-basis:100%; }
#seed-form { display:flex; flex-direction:column; gap:8px; }
.studio-details { margin-block:20px; }
.studio-details summary,.bench-panel summary { cursor:pointer; padding:10px 0; }
.tile-acts { flex-wrap:wrap; }
.lineage-list { padding-inline-start:20px; }
#wall { margin-top:32px; }
@media(min-width:720px){ .collection-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } .hero-controls .grow { flex-basis:180px; } }
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto;}button:active,.btn:active{transform:none;}}

/* MARKED LAYER art-compare-20261031: native version controls, no extra canvas. */
.version-switch { margin-block-end: 12px; }
.version-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.version-buttons button { min-width: 44px; min-height: 44px; white-space: normal; overflow-wrap: anywhere; }
/* Studio rooms doorway (2026-11-02) */
.rooms-card { margin: 16px 0; }
.rooms-grid { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.room-link { display: flex; flex-direction: column; gap: 4px; min-height: 44px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.room-link:hover, .room-link:focus-visible { border-color: var(--accent); }
.room-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.room-name { font-weight: 600; }
