/* Page Studio (studio.html / studio.js). Layout and behaviour from design-refs/page-studio-mockup-11.html (character),
   page-studio-profile-mockup-6.html (profile) and page-studio-restore-mockup.html (existing HTML). Colours only from the
   site tokens; the page being built has its own colours (studiogen.js), inside .st-stage. */
.st-main { max-width: 1500px; margin: 0 auto; padding: 14px 16px 90px; }
.st-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  padding: 8px 12px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.st-bar .st-name { color: var(--text); font-size: 15px; font-weight: 700; }
.st-bar .st-sp { margin-left: auto; }
.st-bar .b-gold, .st-bar .b-ghost { padding: 7px 12px; font-size: 12px; }
.st-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
body.vf .st-seg button { background: none; border: 0; border-radius: 0; color: var(--muted); padding: 5px 12px; font-size: 13px; letter-spacing: 0; text-transform: none; }
body.vf .st-seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 55%, var(--card)); color: var(--gold); }
.st-lay { display: grid; grid-template-columns: 270px minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.st-col { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); min-width: 0; }
.st-col > h3 { margin: 0; padding: 10px 14px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--line); font-weight: 700; }
.st-sec { padding: 10px 12px; }
/* below the site's sticky top bar (style.css --hdr-h, kept up to date by app.js) */
.st-right { position: sticky; top: calc(var(--hdr-h, 0px) + 10px); max-height: calc(100vh - var(--hdr-h, 0px) - 20px); max-height: calc(100dvh - var(--hdr-h, 0px) - 20px); overflow-y: auto; transition: top .2s; }
/* No overscroll-behavior: contain here (owner 2026-12-02: the mouse wheel did nothing over the settings): the panel scrolls
   first and hands the wheel to the page at its end; below 1180px it is no scroll box at all, so the page scrolls. */
@media (max-width: 1180px) { .st-lay { grid-template-columns: 230px minmax(0, 1fr); } .st-right { grid-column: 1 / -1; position: static; max-height: none; overflow: visible; } }
@media (max-width: 760px) { .st-lay { grid-template-columns: minmax(0, 1fr); } .st-mid { order: -1; } .st-main { padding: 10px 8px 90px; } }

/* ---- add a block ---- */
body.vf .st-look { width: 100%; justify-content: center; margin-bottom: 10px; }
.st-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-tile { border: 1px solid var(--line); border-radius: 10px; background: var(--card); padding: 6px; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation; min-width: 0; color: var(--text); font: inherit; text-align: center; }
.st-tile:hover, .st-tile:focus-visible { border-color: var(--gold); }
.st-tile > span { display: block; font-size: 11.5px; margin-top: 5px; }
.st-mini { height: 58px; border-radius: 6px; background: #0e0709; padding: 6px; display: flex; flex-direction: column; gap: 4px; justify-content: center; overflow: hidden; }
.st-mini i { display: block; background: #d4af5f55; border-radius: 3px; flex: none; }
.st-mini .l { height: 4px; } .st-mini .h { height: 7px; background: #fffc; width: 60%; margin: 0 auto; }
.st-mini .bx { border: 1px solid #8e223599; border-top: 3px solid #d4af5f; border-radius: 4px; padding: 4px; display: flex; flex-direction: column; gap: 3px; }
.st-mini .r { display: flex; gap: 4px; justify-content: center; align-items: center; }
.st-mini .im { background: linear-gradient(160deg, #d4af5f, #5a1522); } .st-mini .o { border-radius: 50%; }
.st-hint { color: var(--muted); font-size: 12px; margin-top: 6px; line-height: 1.45; }

/* ---- the page ---- */
.st-stagebox { background: #05020a; padding: 12px; display: flex; justify-content: center; border-radius: 0 0 14px 14px; min-height: 300px; }
.st-stage { container-name: stage; container-type: inline-size; width: 100%; border-radius: 10px; overflow: hidden; position: relative; min-width: 0; isolation: isolate; }
.st-stage.st-phone { width: 390px; max-width: 100%; border: 5px solid var(--line-strong); border-radius: 28px; }
.st-stage .st-bgpic { position: absolute; inset: 0; background-size: cover; background-position: center 20%; pointer-events: none; z-index: -1; }
.st-stage .ps-page { padding-bottom: 28px; }
.st-rows { min-height: 120px; }
.st-stage .ps-hero { width: 100%; margin-left: 0; }
.st-site { position: relative; border: 1px dashed #ffffff2e; border-radius: 12px; padding: 18px 12px 10px; margin: 14px 16px 6px; text-align: center; background: #00000055;
  font-family: system-ui, sans-serif; color: #f2e6d6; font-size: 12px; }
.st-site > .st-lbl { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); background: #000; border: 1px solid #ffffff2e; border-radius: 999px; padding: 0 9px;
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #a99; white-space: nowrap; }
.st-site .st-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.st-site .st-btns u { text-decoration: none; border: 1px solid color-mix(in srgb, var(--ps-m) 45%, transparent); border-radius: 8px; padding: 6px 14px; font-weight: 700; color: #e4dcc8;
  background: color-mix(in srgb, var(--ps-bg) 70%, transparent); }
.st-site .st-btns u.st-main-btn { background: var(--ps-d); color: #fff; border-color: var(--ps-d); }
.st-below .st-tabs { display: flex; gap: 6px; justify-content: center; margin-bottom: 8px; }
.st-below .st-tabs u { text-decoration: none; border: 1px solid #ffffff2e; border-radius: 999px; padding: 3px 12px; color: #a99; }
.st-below .st-tabs u:first-child { color: #c9a54c; border-color: #c9a54c; }
.st-below .st-tilesrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.st-below .st-tilesrow i { display: block; aspect-ratio: 3/4; border-radius: 8px; background: linear-gradient(160deg, #6a4a52, #1f0a13); }

/* blocks in the studio: dragged from anywhere on them; the gold handle on top has the name and delete */
.st-stage .ps-b { position: relative; border-radius: 12px; outline: 2px dashed transparent; outline-offset: 4px; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.st-stage img { -webkit-user-drag: none; -webkit-touch-callout: none; }
.st-stage .ps-b:hover { outline-color: #c9a54c66; }
.st-stage .ps-b.st-on { outline-color: var(--gold); }
.st-stage.st-quiet .ps-b.st-on:not(:hover) { outline-color: transparent; }
.st-stage .ps-b a { pointer-events: none; }
.st-hd { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; background: var(--gold); color: #0b0407; border-radius: 7px;
  font: 700 11px system-ui, sans-serif; white-space: nowrap; opacity: 0; pointer-events: none; letter-spacing: 0; text-transform: none; }
.ps-b:hover > .st-hd, .ps-b.st-on > .st-hd, .ps-b:focus-within > .st-hd { opacity: 1; pointer-events: auto; }
.st-stage.st-quiet .ps-b.st-on:not(:hover) > .st-hd { opacity: 0; pointer-events: none; }
.st-herob > .st-hd { top: 10px; }
.st-hd b { padding: 2px 9px; cursor: grab; touch-action: none; }
.st-hd button { all: unset; padding: 2px 8px; border-left: 1px solid #0b040755; cursor: pointer; }
.st-hd button:focus-visible { outline: 2px solid #fff; }
/* the selected block's tools along its bottom edge (studio.js blockEl): ↑ ↓ · Side by side / Own row · Settings */
.st-tools { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); z-index: 6; display: none; background: var(--gold); color: #0b0407;
  border-radius: 7px; font: 700 11px system-ui, sans-serif; white-space: nowrap; letter-spacing: 0; text-transform: none; box-shadow: 0 4px 14px #0008; }
.ps-b.st-on > .st-tools { display: flex; }
.st-stage.st-quiet .ps-b.st-on:not(:hover) > .st-tools { display: none; }
.st-tools button { all: unset; padding: 3px 9px; cursor: pointer; }
.st-tools button + button { border-left: 1px solid #0b040755; }
.st-tools button:focus-visible { outline: 2px solid #fff; }
@media (min-width: 1181px) { .st-tools .st-set { display: none; } }   /* the settings are beside the page there */
/* A pair where the page shows it stacked (phones, the Phone view): a gold bracket and a label, so it still reads as a
   pair in the studio (owner 2026-11-29). Same width rule as the page itself (studiogen.js, @container 680px). */
@container (max-width: 680px) {
  html.st-touch .st-stage .ps-row.ps-two { position: relative; margin-top: 22px; }
  html.st-touch .st-stage .ps-row.ps-two::before { content: ""; position: absolute; left: -8px; top: 0; bottom: 0; width: 5px; border: 2px solid #c9a54ccc; border-right: 0; border-radius: 6px 0 0 6px; pointer-events: none; }
  html.st-touch .st-stage .ps-row.ps-two::after { content: "SIDE BY SIDE ON COMPUTERS"; position: absolute; left: -6px; top: -19px; font: 700 9.5px/14px system-ui, sans-serif; letter-spacing: .1em; color: #c9a54c; pointer-events: none; }
}
/* "↑ Back to the block" after ⚙ Settings (studio.js toSettings): just under the top bar (or the top of the screen while
   the bar is slid away), moved with the visible part of the screen (--vv-top = visualViewport.offsetTop) so the iOS
   keyboard can't push it out of sight; above the top bar's layer (header z-index 50). */
.st-back { position: fixed; left: 50%; top: calc(var(--hdr-h, 0px) + 10px); transform: translate(-50%, var(--vv-top, 0px)); z-index: 95; display: none;
  background: var(--gold); color: #0b0407; border: 0; border-radius: 999px; padding: 11px 18px; font: 700 13px system-ui, sans-serif; box-shadow: 0 8px 24px #000a; cursor: pointer; }
.st-back.on { display: block; }
.st-right { scroll-margin-top: calc(var(--hdr-h, 0px) + 8px); }
html.st-touch .st-right { scroll-margin-top: 60px; }   /* room for "↑ Back to the block" above the settings heading */
/* The studio keeps the screen still itself after a redraw (studio.js steady / holdHeight); the browser's own scroll
   anchoring would pick some other element (on a phone: the tile list) and scroll to keep that one in place. */
html, body { overflow-anchor: none; }
/* fingers (owner 2026-11-29, iPhone): a handle and buttons big enough to hit; the handle between two blocks wider */
@media (pointer: coarse) {
  .st-hd { top: -17px; font-size: 13px; }
  .st-hd b { padding: 8px 12px; }
  .st-hd button { padding: 8px 12px; }
  .st-tools { bottom: -17px; font-size: 13px; }
  .st-tools button { padding: 8px 11px; }
  html.st-touch .st-splitter { width: 36px; }   /* (round 1 had these before the base rule, so they never applied) */
  html.st-touch .st-splitter::after { width: 32px; height: 32px; font-size: 17px; line-height: 32px; }
}
.ps-b.st-drag { opacity: .35; }
.st-slot { border: 2px dashed var(--gold); border-radius: 12px; background: #c9a54c1c; min-height: 74px; display: grid; place-items: center; color: var(--gold);
  font: 700 12.5px system-ui, sans-serif; text-align: center; padding: 8px; min-width: 0; }
.st-ghost { position: fixed; z-index: 99; pointer-events: none; background: var(--gold); color: #0b0407; font: 700 12px system-ui, sans-serif; border-radius: 8px; padding: 6px 12px; box-shadow: 0 8px 24px #000a; }
.st-drophint { position: fixed; z-index: 99; pointer-events: none; background: #000; border: 1px solid var(--gold); color: var(--text); font: 12px system-ui, sans-serif; border-radius: 7px; padding: 3px 9px; }
.st-drophint.no { border-color: var(--danger); color: var(--danger); }
/* the handle between a pair: inside the row itself (studio.js setupSplitter), on the gap, the row's full height */
.st-stage .ps-row.ps-two { position: relative; }
.st-splitter { position: absolute; top: 0; bottom: 0; z-index: 7; width: 16px; display: none; cursor: col-resize; touch-action: none; }
.st-splitter::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; transform: translateX(-50%); border-radius: 4px; background: #c9a54c; opacity: .55; }
/* in the shrunk Computer view the handle keeps its size (--st-inv = 1 / the scale): mouse size, or finger size */
.st-fit .st-splitter { width: calc(16px * var(--st-inv, 1)); }
.st-fit .st-splitter::after { transform: translate(-50%, -50%) scale(var(--st-inv, 1)); }
html.st-touch .st-fit .st-splitter { width: calc(36px * var(--st-inv, 1)); }
html.st-touch .st-fit .st-splitter::before { width: calc(4px * var(--st-inv, 1)); }
html.st-touch .st-fit .st-splitter::after { transform: translate(-50%, -50%) scale(var(--st-inv, 1)); }
.st-splitter::after { content: "↔"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: #c9a54c; color: #0b0407; font: 700 14px/24px system-ui; text-align: center; }
.st-splitter:hover::before, .st-splitter.act::before { opacity: 1; }
.st-splitlbl { position: fixed; z-index: 61; display: none; pointer-events: none; background: #000; border: 1px solid #c9a54c; color: #f2e6d6; border-radius: 7px; font: 12px system-ui; padding: 3px 9px; white-space: nowrap; transform: translateX(-50%); }
.st-empty-page { padding: 40px 20px; text-align: center; color: #b7b0a4; font-family: system-ui, sans-serif; }
.st-stage .ps-row { transition: grid-template-columns .28s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { .st-stage .ps-row { transition: none; } }

/* the site's own profile header (the "me" block), drawn here as it will look */
.st-me { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 8px 6px; font-family: system-ui, sans-serif; }
.st-me .st-av { display: block; flex: none; width: 110px; height: 110px; border-radius: 50%; object-fit: cover; border: 2px solid var(--ps-m); background: var(--ps-d);
  box-shadow: 0 0 0 5px var(--ps-bg), 0 0 0 6px color-mix(in srgb, var(--ps-m) 45%, transparent), 0 0 34px color-mix(in srgb, var(--ps-d) 70%, transparent); }
.st-me .st-who { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.st-me .st-who > b { font-family: var(--ps-fh); font-size: 30px; color: #f6e9da; line-height: 1.15; overflow-wrap: anywhere; }
.st-me small { color: #a9998f; font-size: 12px; }
.st-me .st-nums { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: #a9998f; } .st-me .st-nums b { color: #f6e9da; }
.st-me .st-mbtns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.st-me .st-mbtns u { text-decoration: none; border: 1px solid color-mix(in srgb, var(--ps-m) 55%, transparent); background: color-mix(in srgb, var(--ps-d) 22%, var(--ps-bg)); color: var(--ps-m);
  border-radius: 999px; padding: 7px 18px; font: 700 12px system-ui; text-transform: uppercase; }
.st-me .st-mbtns u:first-child { background: var(--ps-d); color: #fff; border-color: var(--ps-d); }
.st-me.sharp .st-mbtns u { border-radius: 4px; }
.st-me.ring-plain .st-av { box-shadow: none; } .st-me.ring-square .st-av { box-shadow: none; border-radius: 16px; }
.st-me.me-side { flex-direction: row; justify-content: center; text-align: left; gap: 22px; flex-wrap: wrap; }
.st-me.me-side .st-who { align-items: flex-start; } .st-me.me-side .st-nums, .st-me.me-side .st-mbtns { justify-content: flex-start; }
.st-me.me-column .st-av { width: 96px; height: 96px; } .st-me.me-column .st-who > b { font-size: 22px; }
.st-rows.st-mecol { display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 16px; align-items: start; }
.st-rows.st-mecol > .ps-row { grid-column: 2; } .st-rows.st-mecol > .ps-row.ps-me-row { grid-column: 1; grid-row: 1 / span 40; }
@container stage (max-width: 700px) {
  .st-rows.st-mecol { display: block; }
  .st-me, .st-me.me-side { flex-direction: column; text-align: center; } .st-me .st-who { align-items: center; } .st-me .st-who > b { font-size: 24px; }
  .st-me.me-side .st-nums, .st-me.me-side .st-mbtns { justify-content: center; }
}

/* ---- settings ---- */
.st-pt { color: var(--gold); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.st-fl { font-size: 12.5px; font-weight: 600; margin: 12px 0 4px; display: block; }
.st-fl small { color: var(--muted); font-weight: 400; }
.st-sec input[type="text"], .st-sec input[type="url"], .st-sec input[type="search"], .st-sec input[type="number"], .st-sec input:not([type]), .st-sec textarea, .st-sec select {
  width: 100%; background: var(--field, #07030a); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font: 13.5px system-ui, sans-serif; color: var(--text); }
.st-sec textarea { min-height: 96px; resize: vertical; line-height: 1.45; }
.st-sec textarea.st-code { font-family: Consolas, monospace; font-size: 12.5px; min-height: 180px; }
.st-opt { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .st-opt.three { grid-template-columns: 1fr 1fr 1fr; }
body.vf .st-opt button { background: var(--card); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font: 12.5px system-ui, sans-serif; padding: 8px 6px; letter-spacing: 0; text-transform: none; }
body.vf .st-opt button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }
body.vf .st-sw { display: flex; gap: 10px; align-items: center; background: none; border: 0; color: var(--text); font: 13.5px system-ui, sans-serif; padding: 2px 0; text-align: left; margin-top: 10px; letter-spacing: 0; text-transform: none; }
.st-tg { display: inline-block; width: 32px; height: 19px; border-radius: 999px; background: var(--gold); position: relative; flex: none; transition: background-color .2s; }
.st-tg::after { content: ""; position: absolute; right: 2px; top: 2px; width: 15px; height: 15px; border-radius: 50%; background: var(--bg); transition: right .2s; }
.st-sw[aria-checked="false"] .st-tg { background: var(--line); } .st-sw[aria-checked="false"] .st-tg::after { right: 15px; }
.st-row2 { display: flex; gap: 6px; align-items: center; margin-top: 6px; } .st-row2 > input { flex: 1; min-width: 0; }
.st-list { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.st-item { border: 1px solid var(--line); border-radius: 9px; padding: 7px; background: var(--card); display: flex; flex-direction: column; gap: 5px; }
.st-item .st-row2 { margin: 0; }
.st-thumb { width: 34px; height: 44px; border-radius: 5px; object-fit: cover; flex: none; background: var(--accent); }
body.vf button.st-x { background: none; border: 1px solid var(--line); color: var(--muted); padding: 3px 8px; border-radius: 7px; font-size: 12px; letter-spacing: 0; }
body.vf button.st-x:hover { color: var(--danger); border-color: var(--danger); }
.st-colours { display: flex; gap: 10px; flex-wrap: wrap; } .st-colours label { text-align: center; font-size: 11.5px; color: var(--muted); }
.st-colours input[type="color"] { width: 44px; height: 30px; border: 1px solid #ffffff40; border-radius: 7px; background: none; padding: 2px; display: block; margin: 0 auto 3px; cursor: pointer; }
.st-pal { display: flex; gap: 6px; flex-wrap: wrap; }
body.vf .st-pal button { display: flex; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: none; }
.st-pal button i { width: 18px; height: 22px; display: block; }
body.vf .st-pal button[aria-pressed="true"] { outline: 2px solid var(--gold); }
.st-thms { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
body.vf .st-thm { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 6px; color: var(--text); text-align: left; font: inherit; min-width: 0; letter-spacing: 0; text-transform: none; display: block; }
body.vf .st-thm[aria-pressed="true"] { border-color: var(--gold); }
.st-thm b { display: block; font-size: 12.5px; margin-top: 4px; } .st-thm small { display: block; color: var(--muted); font-size: 11px; line-height: 1.3; }
.st-thm .st-tp { display: flex; flex-direction: column; gap: 5px; border-radius: 6px; height: 62px; padding: 6px 8px; }
.st-thm .st-tp i { font-style: normal; font-size: 15px; text-align: center; line-height: 1.1; } .st-thm .st-tp u { display: block; height: 11px; border: 1px solid; border-top-width: 3px; border-radius: 3px; }
.st-cstate { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; } .st-cstate b { color: var(--gold); }
.st-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; max-height: 300px; overflow-y: auto; margin-top: 8px; padding: 2px 4px 2px 2px; }
body.vf .st-pick button { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 4px; color: var(--text); font: 11.5px/1.25 system-ui; position: relative; min-width: 0; letter-spacing: 0; text-transform: none; }
.st-pick button img, .st-pick button .st-noimg { display: block; width: 100%; aspect-ratio: 3/4; border-radius: 6px; margin-bottom: 4px; object-fit: cover; background: var(--accent); }
.st-pick button img.st-blur { filter: blur(6px); }
.st-pick button span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.vf .st-pick button[aria-pressed="true"] { border-color: var(--gold); }
.st-pick button em { position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #0b0407; font: 700 12px/22px system-ui; font-style: normal; text-align: center; }
.st-step { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
body.vf .st-step button { background: var(--card); border: 0; border-radius: 0; color: var(--text); font: 700 17px system-ui; width: 40px; height: 34px; padding: 0; }
.st-step b { min-width: 48px; text-align: center; font-size: 15px; }
.st-sec input[type="range"] { width: 100%; }   /* the slider look itself is site-wide, style.css */
.st-fmt { display: flex; gap: 6px; margin-top: 4px; align-items: center; flex-wrap: wrap; }
body.vf .st-fmt button { padding: 3px 10px; font-size: 12px; letter-spacing: 0; }
.st-warn { color: var(--danger); font-size: 12.5px; margin-top: 6px; }

/* ---- the opening screen for a page with HTML, and the kept-original bar ---- */
.st-open { max-width: 1000px; margin: 10px auto; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); padding: 18px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 760px) { .st-open { grid-template-columns: minmax(0, 1fr); } }
.st-open h2 { margin: 0 0 4px; color: var(--gold); font-weight: 400; letter-spacing: 1px; font-size: 20px; }
.st-open .st-frame { width: 100%; height: 420px; border: 1px solid var(--line); border-radius: 10px; background: #000; }
.st-open .st-q { font-size: 16px; color: var(--text); margin: 6px 0 12px; line-height: 1.45; font-weight: 600; }
.st-open .st-ok { color: var(--ok); font-size: 13px; margin: 0 0 14px; }
.st-choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; cursor: pointer; background: var(--card); }
.st-choice:has(input:checked) { border-color: var(--gold); }
.st-choice input { width: auto; flex: none; margin: 3px 0 0; accent-color: var(--gold); }
.st-choice b { display: block; font-size: 14px; } .st-choice span { display: block; color: var(--muted); font-size: 12.5px; }
.st-open .st-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.st-keptbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; width: min(820px, calc(100% - 24px)); display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--gold-soft); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow-pop); font-size: 13px; }
.st-keptbar .st-kt { flex: 1 1 260px; min-width: 0; } .st-keptbar b { color: var(--gold); }
body.vf .st-keptbar .b-ghost, body.vf .st-keptbar .b-gold { padding: 6px 10px; font-size: 11.5px; }
.st-codebox { width: 100%; min-height: 50vh; font: 12px/1.45 Consolas, monospace; background: #07030a; color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.st-modal .modal-box { width: 860px; }
.st-modal iframe { width: 100%; height: 60vh; border: 1px solid var(--line); border-radius: 10px; background: #000; }

/* which part of a big picture shows (studio.js cropField, owner 2026-11-26) */
.st-crops { display: flex; gap: 8px; align-items: flex-end; }
.st-crops .st-cropbox { flex: 1 1 0; min-width: 0; }
.st-crops.two .st-cropbox:first-child { flex: 2 1 0; }
.st-cropbox small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.st-crop { position: relative; width: 100%; overflow: hidden; border-radius: 8px; border: 1px solid var(--line-strong); cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; background: #000; }
.st-crop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.st-crop[data-axis="x"] { cursor: ew-resize; } .st-crop[data-axis="y"] { cursor: ns-resize; } .st-crop[data-axis="none"] { cursor: default; }
.st-crop.st-panning, .st-crop.st-panning[data-axis] { cursor: grabbing; border-color: var(--gold); }
body.vf .st-reset { margin-top: 6px; font-size: 11.5px; padding: 3px 10px; text-transform: none; letter-spacing: 0; }
/* the selected block's picture in the page preview: drag it to choose which part shows */
.st-stage .ps-b.st-on .ps-tzp, .st-stage .ps-b.st-on .ps-pic, .st-stage .st-herob.st-on .ps-hero { cursor: grab; touch-action: none; }
.st-stage .st-panning { cursor: grabbing !important; }
.st-crop:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Launch without payments (owner 2026-11-26): "free for now" notice above the studio */
.st-paynote { box-sizing: border-box; width: calc(100% - 32px); max-width: 1468px; margin: 10px auto 0; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--muted); font-size: 13px; line-height: 1.45; }
.st-paynote a { color: var(--gold); }

/* ready-made link buttons in the settings (studio.js, owner 2026-11-26) */
.st-sites { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
body.vf .st-sites button { display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0; text-transform: none; }
.st-ico { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: var(--gold); border: 1px solid var(--gold-soft); flex: none; }
.st-ico svg { width: 12px; height: 12px; }

/* ---- touch mode (owner 2026-11-29; studio.js touchUI = pointer: coarse): helpers for fingers only. A computer with a
   mouse sees the studio as before. ---- */
html:not(.st-touch) .st-touch-only { display: none !important; }
html.st-touch .st-mouse-only { display: none !important; }
/* the Computer view shrunk to fit a phone or tablet (studio.js fitStage) */
.st-stagebox.st-fit { justify-content: flex-start; overflow: hidden; }
.st-stagebox.st-fit > .st-stage { flex: none; align-self: flex-start; max-width: none; transform-origin: 0 0; }   /* its own height, not the box's */
.st-fit .st-stage .st-hd { transform: translateX(-50%) scale(var(--st-inv, 1)); transform-origin: 50% 100%; }
.st-fit .st-stage .st-tools { transform: translateX(-50%) scale(var(--st-inv, 1)); transform-origin: 50% 0; }
/* how it works (studio.js tipsCard) */
.st-tips { border: 1px solid var(--gold); border-radius: 12px; background: var(--panel); padding: 10px 14px; margin-bottom: 12px; font-size: 13.5px; color: var(--text); }
.st-tips[hidden] { display: none !important; }
.st-tips-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--gold); }
body.vf .st-tips-x { background: none; border: 1px solid var(--gold); color: var(--gold); border-radius: 8px; padding: 6px 10px; font-size: 11.5px; }
.st-tips ul { margin: 6px 0 0; padding-left: 18px; }
.st-tips li { margin: 3px 0; line-height: 1.45; }
.st-tips li b { color: var(--gold); }
/* touch mode: only the selected block shows its handle (a block keeps keyboard focus after ↑ / ↓, and a finger leaves
   a sticky :hover, which showed a second handle next to the selected one) */
html.st-touch .st-stage .ps-b:not(.st-on) > .st-hd { opacity: 0; pointer-events: none; }
/* touch mode: room above the first block for its handle and below the last block for its tools, also in the shrunk
   Computer view (--st-inv), so the preview's rounded, clipped edge never cuts them (owner 2026-11-29, iPhone) */
html.st-touch .st-stage .st-rows { padding-top: calc(26px * var(--st-inv, 1)); padding-bottom: calc(44px * var(--st-inv, 1)); }
