/* Infinite Canvas — the page's own layout. Tokens, top bar, sections, buttons,
   swatches and steps all come from ../style.css. */

.ic-head { padding-top: clamp(28px, 4vw, 48px); }
.tnav a.is-on { box-shadow: inset 0 -2px 0 var(--accent); }

/* ── viewer ──────────────────────────────────────────────── */
.ic-viewer { margin-top: 36px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.ic-viewer > * { min-width: 0; }
.ic-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 14px; }
.ic-stages { flex-wrap: wrap; }
.ic-stages button { min-height: 36px; font-family: var(--mono); }
.ic-check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; font-size: 13px; color: var(--fg-3); cursor: pointer; }
.ic-check input { accent-color: var(--accent-2); width: 16px; height: 16px; }

/* The wall is always laid out at the canvas's largest grid, so the starter
   stays put and the empty places show where it grows. */
.ic-wall-wrap { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--well); padding: clamp(12px, 2.4vw, 28px); }
.ic-wall { --cols: 6; --rows: 4; --icols: 6; --irows: 4; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 3px; margin-inline: auto; max-width: calc(62vh * var(--cols) / var(--rows)); }
.ic-tile { position: relative; aspect-ratio: 1; border-radius: 2px; background-repeat: no-repeat; background-size: calc(var(--icols) * 100%) calc(var(--irows) * 100%); box-shadow: 0 2px 6px var(--shadow); transition: opacity .45s var(--ease), transform .45s var(--ease), outline-color .3s; outline: 2px solid transparent; outline-offset: -2px; }
.ic-tile.is-off { background-image: none !important; box-shadow: none; outline: 1px dashed var(--line); outline-offset: -1px; }
.ic-tile.is-new { outline-color: var(--accent); animation: ic-in .5s var(--ease) backwards; }
@keyframes ic-in { from { opacity: 0; transform: scale(.94); } }
.ic-tile span { position: absolute; left: 5px; top: 4px; font-family: var(--mono); font-size: 10px; line-height: 1; padding: 3px 4px; border-radius: 3px; background: var(--pop-bg); color: var(--fg); display: none; }
.show-ids .ic-tile span { display: block; }
.ic-tile.is-off span { background: none; color: var(--fg-5); }
.ic-size { margin: 14px 0 0; font-size: 12px; color: var(--fg-3); }
.ic-size b { color: var(--fg); }
.ic-size .new { color: var(--accent); }

.ic-tag-row { margin: 0 0 10px; }
.ic-title { font-size: 26px; font-weight: 700; line-height: 1.15; }
.ic-blurb { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--fg-3); }
.ic-meta { margin: 0; font-size: 11.5px; line-height: 1.8; color: var(--fg-4); }
#yours-stl { cursor: pointer; font-family: inherit; min-height: 40px; }
#yours-stl:disabled { opacity: .6; cursor: progress; }
.ic-pre { margin: 10px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--well); color: var(--fg-2); font-family: var(--mono); font-size: 11.5px; line-height: 1.6; overflow-x: auto; }

/* ── picker ──────────────────────────────────────────────── */
.ic-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ic-pick { display: flex; flex-direction: column; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); overflow: hidden; transition: border-color .3s var(--ease), transform .3s var(--ease); }
.ic-pick:hover { border-color: var(--line-hi); transform: translateY(-2px); }
.ic-pick.is-on { border-color: var(--accent); }
.ic-pick i { display: block; width: 100%; aspect-ratio: 1; background-repeat: no-repeat; background-position: 0 0; border-bottom: 1px solid var(--line); }
.ic-pick div { padding: 12px 14px 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ic-pick b { font-size: 15px; font-weight: 600; }

/* ── studio ──────────────────────────────────────────────── */
.ic-studio { display: flex; flex-wrap: wrap; align-items: stretch; gap: 12px; }
.ic-drop { flex: 1 1 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 96px; padding: 16px; border: 1px dashed var(--line-hi); border-radius: var(--r-lg); background: var(--panel); cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease); }
.ic-drop:hover, .ic-drop.is-over, .ic-drop:focus-within { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
.ic-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ic-drop span { font-size: 13px; color: var(--fg-4); }
.ic-studio .field { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--panel); height: auto; }
.ic-studio .field label { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--fg-4); }
.ic-studio select { font: inherit; font-size: 16px; color: var(--fg); background: var(--well); border: 1px solid var(--line-hi); border-radius: 8px; padding: 8px 10px; min-height: 40px; }
.ic-note { margin: 14px 0 0; font-size: 13px; color: var(--fg-3); min-height: 1.6em; }

@media (max-width: 1000px) {
  .ic-viewer { grid-template-columns: minmax(0, 1fr); }
  .ic-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  /* style.css hides the nav here; this page has only these links, so keep them */
  .tnav { display: flex; margin-left: auto; }
  .tnav a { padding: 0 8px; font-size: 13px; }
  .tnav a:first-child, .tnav a:last-child { display: none; }
}
@media (max-width: 640px) {
  .ic-wall { gap: 2px; }
  .ic-tile span { font-size: 8px; left: 2px; top: 2px; padding: 2px; }
}
@media (prefers-reduced-motion: reduce) { .ic-tile.is-new { animation: none; } }
