/* Make a board (studio/tools/create.js): one question a page, big cards that
   all look the same, the cost beside the button. Every rule starts .stc-;
   colours only from the studio's variables. */

.stc { gap: 18px; }
.stc .st-q { margin-top: 0; }
.stc .st-q textarea { resize: vertical; line-height: 1.45; }
.stc h4 { margin: 0; font-size: 17px; }
.stc-opening { padding: 32px 0; text-align: center; }

/* The line above every question: which step, what a board costs, start again. */
.stc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 28px; padding-right: 48px; }
.stc-step { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.stc-pill { font-size: 13px; font-weight: 700; color: var(--gold); background: rgba(245, 194, 27, .08); border: 1px solid rgba(245, 194, 27, .35); padding: 4px 10px; border-radius: 999px; }
.stc-pill.warn { color: var(--red); background: rgba(240, 100, 106, .08); border-color: rgba(240, 100, 106, .4); }
.stc-restart { margin-left: auto; font-size: 14px; color: var(--muted) !important; }
.stc-q { margin: 2px 0 0; font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.stc-link { background: none; border: 0; padding: 0; color: var(--green); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.stc-alt { margin: 0; text-align: center; color: var(--muted); }
.stc-nav .stc-alt-nav { font-size: 15px; }

/* THE CARDS: the same size, the same picture square, everywhere. */
.stc-kinds, .stc-cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stc-cards-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stc-cards-1 { display: grid; gap: 10px; }
.stc-card { display: grid; grid-template-rows: auto 1fr; justify-items: start; align-content: start; gap: 12px; padding: 18px; min-height: 160px; border-radius: 16px;
  background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: border-color .2s, background .2s, transform .12s; }
.stc-card:hover { border-color: var(--green); }
.stc-card:active { transform: scale(.985); }
.stc-card:focus-visible, .stc-colour:focus-visible, .stc-speed:focus-visible, .stc-look:focus-visible, .stc-pick:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.stc-card.on { border-color: var(--green); background: rgba(46, 212, 122, .08); box-shadow: inset 0 0 0 1px var(--green); }
.stc-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--green); flex: none; }
.stc-icon svg { width: 28px; height: 28px; display: block; }
.stc-card.on .stc-icon { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.stc-card-words { display: grid; gap: 4px; align-content: start; }
.stc-card-words b { font-size: 17px; line-height: 1.25; }
.stc-card-words span { color: var(--muted); font-size: 14px; line-height: 1.4; }
.stc-cards-1 .stc-card { grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto; align-items: center; min-height: 0; padding: 14px 16px; }

/* A box of its own: a photo, the logo, a bar's words. */
.stc-box { display: grid; gap: 12px; padding: 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.stc-box p { margin: 0; }
.stc-box > .st-btn, .stc-box > .stc-row { justify-self: start; }
.stc-box .st-q input, .stc-box .st-q textarea { background: var(--surface); }
.stc-warn { border-color: rgba(245, 194, 27, .5); }
.stc-alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 14px; border: 1px solid rgba(240, 100, 106, .6); background: rgba(240, 100, 106, .08); }
.stc-alert p { margin: 0; font-weight: 600; }
.stc-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stc-photo { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.stc-photo img { width: 132px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #05080f; display: block; }
.stc-photo b { display: block; margin-bottom: 4px; overflow-wrap: anywhere; }
.stc-photo p { margin: 0 0 10px; }

/* One of their own boards, as the look to start from. */
.stc-looks { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.stc-look { display: grid; gap: 6px; padding: 8px; border-radius: 14px; background: var(--surface-2); border: 2px solid var(--line); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer; }
.stc-look:hover, .stc-look.on { border-color: var(--green); }
.stc-look img { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 8px; background: #05080f; display: block; }

/* The colours, as bubbles, numbered in the order tapped. */
.stc-colours { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stc-colour { display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 14px; background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.stc-colour:hover { border-color: rgba(255, 255, 255, .22); }
.stc-colour.on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.stc-colour i { width: 36px; height: 36px; border-radius: 50%; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); display: grid; place-items: center;
  font-style: normal; font-size: 14px; font-weight: 800; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.stc-colour span { line-height: 1.2; text-align: center; }

/* The logo. */
.stc-logo { grid-template-columns: 132px minmax(0, 1fr); align-items: center; }
.stc-logo img, .stc-logo-none { width: 132px; height: 100px; object-fit: contain; border-radius: 10px; background: #fff; padding: 8px; display: grid; place-items: center; }
.stc-logo-none { background: var(--surface); color: var(--muted); font-size: 13px; border: 1px dashed var(--line); }

/* How a bar moves. */
.stc-speeds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stc-speed { display: grid; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface); border: 1.5px solid var(--line); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.stc-speed span { color: var(--muted); font-size: 13px; }
.stc-speed.on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.stc .st-label { margin: 0; }

/* What goes on it. */
.stc-example { border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); padding: 12px 16px; }
.stc-example summary { cursor: pointer; }
.stc-example pre, .stc-against pre { margin: 10px 0; padding: 12px; border-radius: 10px; background: var(--surface); white-space: pre-wrap; font: 14px/1.5 ui-monospace, Consolas, monospace; color: var(--text); }
.stc-example p { margin: 0; }
.stc-reading { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
.stc-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--green); animation: stc-pulse 1.2s ease-in-out infinite; }
@keyframes stc-pulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }

/* The last looks. */
.stc-review { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.stc-review:has(> div:only-child) { grid-template-columns: 1fr; }
.stc-review-pic { width: 100%; border-radius: 12px; background: #05080f; display: block; }
.stc-look-words { margin: 0 0 6px; font-weight: 700; }
.stc-facts { list-style: none; margin: 0; padding: 0; display: grid; }
.stc-facts li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stc-facts li:last-child { border-bottom: 0; }
.stc-problems { margin: 0; padding: 12px 16px 12px 32px; border-radius: 12px; border: 1px solid rgba(240, 100, 106, .5); color: var(--text); }
.stc-problems li + li { margin-top: 6px; }
.stc-note { margin: 8px 0 0; font-weight: 700; color: var(--gold); }
.stc-cost { margin: 0; }

/* Back on the left, the big Next on the right, always in reach. */
.stc-nav { position: sticky; bottom: -18px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 4px -18px -18px; padding: 12px 18px 18px; background: var(--surface); box-shadow: 0 -14px 14px -6px var(--surface); }
.stc-go { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.stc-sure .stc-nav, .stc-result .stc-go { position: static; margin: 0; padding: 0; background: none; }

/* The wait: the green ring, one line under it. */
.stc-making { display: grid; gap: 14px; }
.stc-wait { display: grid; justify-items: center; gap: 10px; padding: 26px 18px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.stc-wait p { margin: 0; max-width: 520px; }
.stc-ring { width: 164px; height: 164px; }
.stc-ring-track { stroke: rgba(255, 255, 255, .1); }
.stc-ring-arc { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .9s linear; }
.stc-ring-pct { fill: var(--text); font-weight: 800; font-family: inherit; }
.stc-ring.done .stc-ring-arc { transition-duration: .3s; }
.stc-tries { color: var(--gold); font-weight: 700; }
.stc-tries.last { color: var(--muted); }
.stc-phrase { font-size: 18px; font-weight: 700; }
.stc-film { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #05080f; }
.stc-film iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 720px; border: 0; transform-origin: 0 0; }

/* The board, as the TV will show it. */
.stc-result { display: grid; gap: 16px; }
.stc-result > p { margin: 0; }
.stc-result-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.stc-result-split:not(:has(.stc-against)) { grid-template-columns: 1fr; }
.stc-result-main { display: grid; gap: 14px; }
.stc-result-main > p { margin: 0; }
.stc-shot { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #05080f; justify-self: center; }
.stc-shot.tall { aspect-ratio: 9 / 16; width: min(100%, calc(70dvh * 9 / 16)); }
.stc-shot-art, .stc-shot iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.stc-shot-art { object-fit: contain; }
.stc-shot iframe { transition: opacity .4s ease; background: transparent; }
.stc-shot.waiting iframe { opacity: 0; }
.stc-shot-wait { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); padding: 6px 12px; border-radius: 999px; background: rgba(5, 8, 15, .8); color: var(--text); font-size: 13px; font-weight: 700; white-space: nowrap; }
.stc-shot:not(.waiting) .stc-shot-wait { display: none; }
.stc-slide { animation: stc-wipe 1s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes stc-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.stc-choose { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stc-choice-wrap { display: grid; gap: 6px; justify-items: center; }
.stc-pick { display: grid; gap: 8px; width: 100%; padding: 8px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.stc-pick.on { border-color: var(--green); }
.stc-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stc-against { display: grid; gap: 8px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.stc-against p { margin: 0; }
.stc-against img { width: 100%; border-radius: 10px; display: block; }
.stc-against pre { max-height: 360px; overflow: auto; margin: 0; }
.stc-change textarea { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; line-height: 1.45; resize: vertical; }
.stc-change .stc-go { justify-content: space-between; }
.stc-change .stc-go > span { flex: 1 1 260px; }
.stc-lines summary { cursor: pointer; font-weight: 700; }
.stc-lines .st-q { margin-top: 10px; }
.stc-chip-pic { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.stc-chip-pic img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; }
.stc-mock { border-color: rgba(245, 194, 27, .5); }

/* A question about the question: leave? start again? discard? */
.stc-sure { display: grid; gap: 12px; padding: 8px 0; }
.stc-sure p { margin: 0; }
.stc-sure .stc-nav { justify-content: flex-end; }

/* The lines we ask about, one at a time. */
.stc-confirm-pic { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #05080f; cursor: zoom-in; overflow: hidden; }
.stc-confirm-pic img { display: block; width: 100%; max-height: 200px; object-fit: contain; }
.stc-confirm-pic.big { cursor: zoom-out; }
.stc-confirm-pic.big img { max-height: 60dvh; }
.stc-read { margin: 0; font-size: 18px; }
.stc-read b { font-size: 22px; overflow-wrap: anywhere; }
.stc-confirm-buttons, .stc-edit { display: grid; gap: 10px; }
.stc-edit input { width: 100%; min-height: 52px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: inherit; font-size: 18px; }

/* Something wrong with this drawing? */
.stc-reasons { display: grid; gap: 8px; }
.stc-reason { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 14px; border-radius: 12px; background: var(--surface-2); border: 1.5px solid var(--line); cursor: pointer; font-weight: 600; }
.stc-reason.on { border-color: var(--green); }
.stc-reason input { width: 20px; height: 20px; accent-color: var(--green); }

/* A bar already printed on their own picture. */
.stc-bar-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.stc-bar-pics figure { margin: 0; display: grid; gap: 6px; }
.stc-bar-pics img { width: 100%; border-radius: 8px; border: 1px solid var(--line); display: block; }

/* Their own picture with the bars, as the TV shows it. */
.stc-own { display: grid; grid-template-rows: var(--top) minmax(0, 1fr) var(--bottom); width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #05080f; }
.stc-own.tall { aspect-ratio: 9 / 16; width: min(100%, calc(60dvh * 9 / 16)); justify-self: center; }
.stc-own-pic { min-height: 0; }
.stc-own-pic img { width: 100%; height: 100%; object-fit: contain; display: block; }
.stc-own-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; background: var(--surface-2); color: var(--text); font-weight: 800; font-size: 13px; white-space: nowrap; overflow: hidden; min-height: 0; }
.stc-own-bar span { overflow: hidden; text-overflow: ellipsis; }
.stc-own-qr { flex: none; height: 80%; aspect-ratio: 1; background: #fff; border-radius: 3px; }

/* A phone: one card a row, the same everywhere; the big button the width of the screen. */
@media (max-width: 640px) {
  .stc-q { font-size: 22px; }
  .stc-kinds, .stc-cards-3, .stc-cards-2 { grid-template-columns: 1fr; gap: 10px; }
  .stc-card { grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto; align-items: center; min-height: 0; padding: 14px 16px; }
  .stc-colours { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stc-speeds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stc-photo, .stc-logo { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; }
  .stc-photo img, .stc-logo img, .stc-logo-none { width: 96px; }
  .stc-logo img, .stc-logo-none { height: 76px; }
  .stc-review, .stc-result-split { grid-template-columns: 1fr; }
  .stc-review-pic { max-height: 200px; object-fit: contain; }
  .stc-choose { grid-template-columns: 1fr; }
  .stc-nav { flex-wrap: nowrap; }
  .stc-nav:has(.stc-alt-nav) { flex-wrap: wrap; justify-content: center; }
  .stc-go { flex: 1 1 auto; }
  .stc-go .st-btn.big { flex: 1 1 auto; padding: 0 18px; }
  .stc-change .stc-go, .stc-result .stc-go { flex-wrap: wrap; }
  .stc-actions .st-btn { flex: 1 1 100%; }
  .stc-restart { margin-left: 0; }
  .stc-head { padding-right: 48px; }
}

/* Several screens as one: the layouts, and the strip of TVs with dividers to drag. */
.stc-cards-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stc-walls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stc-wallpick { display: grid; justify-items: center; gap: 8px; padding: 14px 10px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.stc-wallpick.on, .stc-wallpick:hover { border-color: var(--green); }
.stc-wm { display: flex; gap: 3px; align-items: center; height: 44px; }
.stc-wm.col { flex-direction: column; height: 52px; }
.stc-wm i { display: grid; place-items: center; font-style: normal; font-size: 11px; color: var(--muted); background: #22304b; border-radius: 3px; }
.stc-wm-wide { width: 40px; height: 22px; }
.stc-wm.col .stc-wm-wide { width: 44px; height: 24px; }
.stc-wm-tall { width: 22px; height: 40px; }
.stc-wall { display: flex; align-items: stretch; width: 100%; height: 150px; user-select: none; touch-action: none; }
.stc-wall.portrait { height: 240px; }
.stc-wall.col { flex-direction: column; height: 300px; width: min(420px, 100%); margin: 0 auto; }
.stc-wall-tv { display: grid; place-content: center; text-align: center; gap: 4px; min-width: 0; min-height: 0; border-radius: 8px; background: linear-gradient(135deg, #1d6b8f, #2aa3b6); border: 4px solid #050505; color: #fff; }
.stc-wall-tv:nth-child(4n+3) { background: linear-gradient(135deg, #2aa3b6, #67c3c9); }
.stc-wall-tv b { font-size: 16px; }
.stc-wall-tv i { font-style: normal; opacity: .85; font-size: 13px; }
.stc-wall-div { flex: 0 0 14px; cursor: col-resize; display: grid; place-items: center; }
.stc-wall-div::after { content: ''; width: 4px; height: 50%; border-radius: 2px; background: var(--green); }
.stc-wall.col .stc-wall-div { cursor: row-resize; }
.stc-wall.col .stc-wall-div::after { width: 50%; height: 4px; }
@media (max-width: 760px) { .stc-walls { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) and (min-width: 641px) { .stc-cards-3 { grid-template-columns: 1fr 1fr; } }

/* The wall's two icon tiles, side by side. */
.stc-icons { display: flex; gap: 8px; }
/* A phone (19 Oct 2026, the studio walk): one card a row, the wall's two tiles taking the room they need beside the words. */
@media (max-width: 640px) {
  .stc-cards-3 { grid-template-columns: 1fr; gap: 10px; }
  .stc-card:has(.stc-icons) { grid-template-columns: auto minmax(0, 1fr); }
  .stc-icons .stc-icon { width: 44px; height: 44px; }
}

/* Their own video going up (24 Oct 2026). */
.stc-uploading { padding: 18px 0; }
.stc-upbar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; margin: 10px 0; }
.stc-upbar i { display: block; height: 100%; background: var(--green, #2fdc7c); transition: width .3s; }
.stc-photo video { width: 100%; max-width: 320px; border-radius: 10px; background: #000; display: block; }

/* The four under a drawn board: one row, the same size (24 Oct 2026); two by two on a phone. */
.stc-actions.stc-actions-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.stc-actions.stc-actions-4 > .st-btn { width: 100%; min-width: 0; margin: 0; justify-content: center; text-align: center; white-space: normal; line-height: 1.2; text-decoration: none; }
@media (max-width: 700px) { .stc-actions.stc-actions-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
