/* =========================================================================
   views/sites-live.css — the editor's parts for an uploaded live site
   (doc.customSite.mode 'live', siteBuilderCore): the Site panel (the
   how-to, the page on screen's Google result, the enquiry line and its
   field mapping sheet, the upload's lists and the Site format block),
   the photo picker's groups of the site's own pictures, the text panel's
   line of how-to, and a page file's variants in the pages menu. Linked
   after sites.css in both shells.
   ========================================================================= */

/* ---- the text panel's how-to (G50) ---- */
.sb-live-hint { margin-bottom: var(--space-4); }

/* ---- the Site panel (G49; simplified 19 Oct) ----
   Three quiet blocks, split by one hairline each: the how-to (naked icons, two lines a tip), the rows (enquiries,
   site format: borderless, a grey step on hover, the detail in a side sheet), then the lists. */
.sb-live-site { display: flex; flex-direction: column; margin-bottom: var(--space-5); }
.sb-live-site[hidden] { display: none; }
.sb-live-site > * + *:not([hidden]) { margin-top: var(--space-4); padding-top: var(--space-4); border-top: 1px solid var(--border-faint); }
.sb-live-sec { min-width: 0; }
.sb-live-sec[hidden] { display: none; }
.sb-live-sec > .sb-fs-title { margin-top: 0; }
.sb-live-sec > .btn { margin-top: var(--space-1); }
.sb-live-sec > .btn svg { width: 14px; height: 14px; }
/* the Site tab already names the panel */
#rpNone.is-tabbed > .sb-rp-head { display: none; }

/* the how-to */
.sb-live-tips > .sb-howto-label { margin-top: 0; }
.sb-live-tips .sb-howto { gap: var(--space-3); }
.sb-live-tips .sb-howto li { grid-template-columns: 16px minmax(0, 1fr); column-gap: var(--space-2-5); padding: 0; border: 0; }
.sb-live-tips .sb-howto-ico { width: 16px; height: 20px; background: none; border-radius: 0; color: var(--text-soft); }
.sb-live-tips .sb-howto-ico .ic svg { width: 15px; height: 15px; }
.sb-live-tips .sb-howto li > span:last-child { gap: 2px; }

/* the rows (the site format, admins only: a client has none, so no empty block) */
.sb-live-rows { display: flex; flex-direction: column; gap: var(--space-0-5); }
.sb-live-rows:not(:has(> :not([hidden]))) { display: none; }
.sb-live-line {
  display: flex; align-items: center; gap: var(--space-2-5); width: calc(100% + var(--space-4)); min-height: var(--control-md);
  margin: 0 calc(-1 * var(--space-2)); padding: var(--space-1-5) var(--space-2); border: 0; border-radius: var(--radius-md);
  background: none; font: inherit; font-size: var(--text-sm); color: var(--text-strong); text-align: left;
  transition: background var(--dur-fast) var(--ease);
}
button.sb-live-line { cursor: pointer; }
button.sb-live-line:focus-visible { outline: var(--focus-outline); outline-offset: 0; }
.sb-live-line-ico { display: inline-flex; flex: none; color: var(--text-soft); }
.sb-live-line-ico svg { width: 15px; height: 15px; }
.sb-live-line-text { flex: 1; min-width: 0; font-weight: var(--fw-medium); line-height: var(--leading-snug); }
.sb-live-line-meta { flex: none; font-size: var(--text-sm); color: var(--text-soft); white-space: nowrap; }
.sb-live-line-ok { display: inline-flex; align-items: center; gap: var(--space-1); }
.sb-live-line-ok svg { width: 14px; height: 14px; color: var(--success-600); }
.sb-live-line > .tone-pill { flex: none; }
.sb-live-line-go { display: inline-flex; flex: none; margin-left: calc(-1 * var(--space-1)); color: var(--text-soft); }
.sb-live-line-go svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) {
  button.sb-live-line:hover { background: var(--surface-hover); }
  button.sb-live-line:hover .sb-live-line-go { color: var(--text-strong); }
}


/* the Site format side sheet: the check, then Enquiry form, Pages not made into lists and the notes, each under a
   hairline; the modal's title names it, so the block's own heading steps aside */
.sb-format-sheet > [data-fmt-host] { display: flex; flex-direction: column; }
.sb-fmt-sec { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-5); padding-top: var(--space-5); border-top: 1px solid var(--border-faint); }
.sb-fmt-sec-title { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-size: var(--text-base); font-weight: var(--fw-semibold); color: var(--text-strong); }
.sb-fmt-sec > .sb-hint { margin: 0; }
.sb-fmt-sec .sb-live-map { margin-bottom: 0; }
.sb-fmt-sec .sb-live-notes { gap: var(--space-2); padding: 0; list-style: none; font-size: var(--text-sm); }
.sb-fmt-sec .sb-live-notes b { font-weight: var(--fw-medium); color: var(--text-strong); }
.sb-format-sheet .ns-fmt-head h4 { display: none; }
.sb-format-sheet .ns-fmt-head > .btn { margin-left: auto; }
/* each rule reads top-down: what's wrong, what to do (body text), then where (a quiet sunk list of places) */
.sb-format-sheet .ns-fmt { gap: var(--space-4); }
.sb-format-sheet .ns-fmt-rules { display: flex; flex-direction: column; border: 0; border-radius: 0; background: none; }
.sb-format-sheet .ns-fmt .ns-fmt-rule { row-gap: var(--space-1-5); padding: var(--space-4) 0; }
.sb-format-sheet .ns-fmt .ns-fmt-rule:first-child { padding-top: 0; }
.sb-format-sheet .ns-fmt-rule + .ns-fmt-rule { border-top: 1px solid var(--border-faint); }
.sb-format-sheet .ns-fmt-title { order: 0; font-size: var(--text-base); font-weight: var(--fw-semibold); }
.sb-format-sheet .ns-fmt-fix { order: 1; font-size: var(--text-sm); color: var(--text); }
.sb-format-sheet .ns-fmt-where { order: 2; gap: var(--space-1); margin-top: var(--space-1); padding: var(--space-2-5) var(--space-3); border-radius: var(--radius-md); background: var(--surface-sunk); }
.sb-format-sheet .ns-fmt-path { font-size: var(--text-xs); }

/* the upload's lists (admins, DESIGN §11.2): a section each, its chrome over the shared list component (.ccol--panel,
   collections.css). While an item is open it takes the panel: the other parts step aside */
.sb-live-colls { display: grid; gap: var(--space-5); min-width: 0; }
.sb-live-colls[hidden] { display: none; }
.sb-coll { display: flex; flex-direction: column; gap: var(--space-2-5); }
.sb-coll-chrome { display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.sb-coll-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-width: 0; }
.sb-coll-head > .sb-fs-title { margin: 0; min-width: 0; }
.sb-coll-head > .tone-pill { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; }
.sb-coll-why, .sb-coll-fix { margin: 0; font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-muted); }
.sb-coll-fix { color: var(--text-soft); }
.sb-coll-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2-5); margin: 0; font-size: var(--text-xs); color: var(--text-soft); }
.sb-coll-meta > span { overflow-wrap: anywhere; }
.sb-coll-meta .ns-link:disabled { color: var(--text-placeholder); text-decoration: none; cursor: default; }
.sb-coll-switch { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--control-sm); font-size: var(--text-sm); color: var(--text); cursor: pointer; }
.sb-coll-note { margin: 0; }
.sb-coll-note svg { width: 12px; height: 12px; }
.sb-coll-probe { display: flex; flex-direction: column; gap: var(--space-2); }
.sb-coll-probe[hidden] { display: none; }
.sb-coll-probing { display: flex; align-items: center; gap: var(--space-1-5); margin: 0; font-size: var(--text-xs); color: var(--text-muted); }
.sb-coll-probing .spinner { flex: none; }
.sb-coll-error .load-error-banner { margin: 0; }
/* client changes a new version can't take: one quiet line with Review (siteBuilderCore reviewParked) */
.sb-coll-held { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin: 0 0 var(--space-2); padding: var(--space-1-5) var(--space-2) var(--space-1-5) var(--space-3); border-radius: var(--radius-md); background: var(--warning-50); color: var(--text-strong); font-size: var(--text-xs); }
.sb-coll-held > span { min-width: 0; }
.sb-coll-held.is-quiet { background: var(--gray-50); color: var(--text-muted); }
.sb-live-held .sb-coll-held { margin: 0; }
.sb-live-held .sb-coll-held + .sb-coll-held { margin-top: var(--space-1); }
/* the lists still being read on the server (a read that ran out of time, tried again with more time) */
.sb-coll-reading { display: flex; align-items: center; gap: var(--space-2); margin: 0 0 var(--space-2); padding: var(--space-1-5) var(--space-3); border-radius: var(--radius-md); background: var(--gray-50); color: var(--text-muted); font-size: var(--text-xs); }
.sb-coll-reading .spinner { flex: none; width: 12px; height: 12px; border-width: 2px; }
/* the Review dialog's lines: what the client did, then why it doesn't fit, muted on its own line */
.sb-held-line { display: block; margin-top: var(--space-2); }
.sb-coll-held-why { display: block; color: var(--text-muted); font-size: var(--text-xs); }
.sb-live-site.is-coll-item > :not([data-sp="colls"]) { display: none; }
.sb-live-site.is-coll-item .sb-coll:not(.is-open) { display: none; }
.sb-live-site.is-coll-item .sb-coll.is-open > .sb-coll-chrome, .sb-live-site.is-coll-item .sb-coll.is-open > .sb-coll-probe { display: none; }
/* the item view's Save / Cancel bar sticks to the panel's bottom edge: a sticky bar keeps clear of its scroller's
   padding, so the panel body drops its bottom padding while an item is open (nothing shows below the buttons) */
.sb-rp-body:has(.sb-live-site.is-coll-item) { padding-bottom: 0; }


/* the enquiry form: each question → the Leads field its answer fills */
.sb-live-form-page { margin: var(--space-3) 0 var(--space-1-5); font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-soft); }
.sb-live-map { display: grid; gap: var(--space-1-5); margin: 0 0 var(--space-3); padding: 0; list-style: none; }
.sb-live-map li { display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 0.8fr); column-gap: var(--space-2); align-items: baseline; font-size: var(--text-xs); line-height: var(--leading-snug); }   /* question · arrow · Leads field, in columns */
.sb-live-map span { color: var(--text-muted); overflow-wrap: anywhere; }
.sb-live-map i { font-style: normal; color: var(--text-soft); }
.sb-live-map b { font-weight: var(--fw-medium); color: var(--text-strong); }

/* the upload's notes: what to look at before the site goes out */
.sb-live-notes { display: grid; gap: var(--space-2); margin: 0; padding: 0 0 0 var(--space-4); font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-muted); }
.sb-live-notes li { overflow-wrap: anywhere; }

/* ---- the site's own pictures: the photo picker and the Photos tool (G44) ---- */
.sb-live-group + .sb-live-group { margin-top: var(--space-4); }
.sb-live-folder { margin: var(--space-3) 0 var(--space-1-5); font-size: var(--text-2xs); font-weight: var(--fw-medium); color: var(--text-soft); overflow-wrap: anywhere; }
.sb-live-group > .sb-fs-title + .sb-live-folder { margin-top: 0; }
button.sb-live-ph { display: block; width: 100%; padding: 0; font: inherit; }
.sb-live-ph--view { cursor: default; }
.sb-live-more { margin-top: var(--space-3); }
.sb-live-left { margin-left: var(--space-1); font-weight: var(--fw-regular); color: var(--text-soft); }
@media (hover: hover) and (pointer: fine) {
  .sb-live-ph--view:hover { border-color: transparent; }
}

/* ---- the pages as the site files them (siteBuilderCore livePageTree): a group's chevron at the left, its pages one
   step in under it, opened and closed; a page with no group lines up with the groups' names ---- */
.sb-pg-tree .filter-opt[hidden], .sb-pg-tree .sb-pg-group[hidden], .sb-pg-tree .sb-pg-kids[hidden], .sb-pg-tree .sb-pg-leaf[hidden] { display: none; }
.sb-pg-head { display: flex; align-items: center; min-width: 0; }
.sb-pg-head > .filter-opt { flex: 1; min-width: 0; padding-left: var(--space-1); }
.sb-pg-twisty { flex: none; width: 24px; height: 24px; color: var(--text-soft); }
.sb-pg-twisty svg { width: 14px; height: 14px; transition: transform var(--dur-fast) var(--ease); }
.sb-pg-twisty[aria-expanded="true"] svg { transform: rotate(90deg); }
.sb-pg-tree.has-groups > .sb-pg-leaf > .filter-opt { padding-left: calc(24px + var(--space-1)); }
.sb-pg-kids { padding-left: calc(24px + var(--space-1) - 10px + var(--sb-page-indent)); }
.sb-pg-kids .filter-opt { font-size: var(--text-sm); }
.sb-pg-kids .filter-opt > span:first-child { color: var(--text-muted); }
.sb-pg-kids .filter-opt.is-active > span:first-child { color: var(--text-strong); }
.sb-pg-kids .filter-opt.sb-page-variant { padding-left: 10px; }
.sb-pg-name { font-weight: var(--fw-medium); }
.sb-pg-twisty:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
/* a page's row is its name alone (its address is its tooltip: owner, 6 Nov 2026). A group's number, quiet at the end of
   its row: a list's items (CMS's number), else the pages under it; a list's page with nothing under it has its number on
   its own row (has-count) */
.sb-pg-count { flex: none; padding: 0 var(--space-2-5) 0 var(--space-2); font-size: var(--text-xs); color: var(--text-soft); font-variant-numeric: tabular-nums; }
.sb-pg-leaf.has-count { display: flex; align-items: center; min-width: 0; }
.sb-pg-leaf.has-count > .filter-opt { flex: 1; min-width: 0; }
@media (prefers-reduced-motion: reduce) { .sb-pg-twisty svg { transition: none; } }
/* the Pages dialog's search, over the list */
.sdp-pages-find { position: relative; }
.sdp-pages-find-ico { position: absolute; left: var(--space-2-5); top: 50%; display: flex; color: var(--text-soft); transform: translateY(-50%); pointer-events: none; }
.sdp-pages-find-ico svg { width: 14px; height: 14px; }
.sdp-pages-find .sdp-pages-search { padding-left: calc(var(--space-2-5) + 14px + var(--space-2)); }
.sdp-pages-none { margin: 0; font-size: var(--text-sm); color: var(--text-soft); }
.sdp-pages-none[hidden] { display: none; }
/* ---- a page file's variants in the pages menu (G45): under their page, one step in (sites.css: --sb-page-indent) ---- */
.sb-pages-list .filter-opt.sb-page-variant { padding-left: calc(10px + var(--sb-page-indent)); font-size: var(--text-sm); }
.sb-pages-list .filter-opt.sb-page-variant > span:first-child { color: var(--text-muted); }
.sb-pages-list .filter-opt.sb-page-variant.is-active > span:first-child { color: var(--text-strong); }

/* ---- the Photos tool (simplified 19 Oct): the tab names it, a slim drop row, a 3-up grid of quiet square tiles ---- */
#rpPhotos > .sb-rp-head { display: none; }
/* the photo panel shown as a modal (siteBuilderCore syncImageModal): the modal's own title and × stand for its head, its
   body takes the modal's padding */
#rpImage.is-modal > .sb-rp-head { display: none; }
#rpImage.is-modal > .sb-rp-body { padding: 0; max-height: none; overflow: visible; }
#rpPhotos .sb-drop--compact { min-height: 0; padding: var(--space-3); }
#rpPhotos .sb-drop--compact .sb-drop-inner { flex-direction: row; gap: var(--space-2); }
#rpPhotos .sb-drop--compact .sb-drop-ico { width: auto; height: auto; margin: 0; background: none; }
#rpPhotos .sb-drop--compact .sb-drop-ico .ic svg { width: 16px; height: 16px; }
#rpPhotos .sb-drop--compact .sb-drop-inner b { font-size: var(--text-sm); font-weight: var(--fw-medium); }
#rpPhotos .sb-drop--compact .sb-drop-inner small { display: none; }
#rpPhotos .sb-fs-hint { margin: var(--space-2) 0 0; }
#rpPhotos .sb-live-group { margin-top: var(--space-5); }
#rpPhotos .sb-live-group + .sb-live-group { margin-top: var(--space-5); }
#rpPhotos .sb-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1-5); }
#rpPhotos .sb-ph { aspect-ratio: 1; border-width: 0; background: var(--surface-sunk); outline: 1px solid var(--border-faint); outline-offset: -1px; }
#rpPhotos .sb-ph img { border-radius: 0; }
@media (hover: hover) and (pointer: fine) {
  #rpPhotos .sb-ph--pick:hover { outline: 2px solid var(--gray-400); outline-offset: -2px; }
}
/* the lists' "Content" title sits close to what it names (the lists keep their own gap between them) */
.sb-live-colls > [data-coll-title] { margin: 0 0 calc(var(--space-2) - var(--space-5)); }
.sb-live-form { display: flex; flex-direction: column; gap: var(--space-2); }
.sb-live-form + .sb-live-form { margin-top: var(--space-3); }
.sb-live-form .sb-live-form-page { margin: 0; }
.sb-live-form > .sb-hint, .sb-live-form > .sb-live-map { margin: 0; }

/* ---- the Photo panel: the picture that was clicked, first, under a dark scrim saying Replace photo (click or drop) ---- */
.sb-img-now { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; margin-bottom: var(--space-4); overflow: hidden; border-radius: var(--radius-lg); background: var(--surface-sunk); cursor: pointer; }
.sb-img-now.hidden { display: none; }
.sb-img-now img { width: 100%; height: 100%; object-fit: contain; }
.sb-img-now-over { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-1); padding: var(--space-4); background: var(--overlay-media); color: var(--text-invert); text-align: center; transition: background var(--dur-fast) var(--ease); }
.sb-img-now-ico { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: var(--space-1-5); border-radius: var(--radius-full); background: color-mix(in srgb, var(--text-invert) 16%, transparent); }
.sb-img-now-ico .ic svg { width: 18px; height: 18px; display: block; }
.sb-img-now-over b { font-size: var(--text-sm); font-weight: var(--fw-semibold); }
.sb-img-now-over small { font-size: var(--text-xs); opacity: 0.8; }
.sb-img-now:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }
.sb-img-now.is-over .sb-img-now-over { background: var(--overlay-media-strong); }
@media (hover: hover) and (pointer: fine) {
  .sb-img-now:hover .sb-img-now-over { background: var(--overlay-media-strong); }
}

/* ---- a link or button clicked on the canvas (canvasLinkPop, 10-11 Nov 2026): the shared Modal in the middle of the
   screen, as the Photo dialog (.modal-shell.lpop, size sm): its name for a title and the ×, then its words, where it goes
   (the shared link picker, components.css "Link picker": Page | URL and its field on one row; its pages' menu floats
   over the dialog), a generated site's look rows, and Done, the fields dressed as the Photo dialog's. The same card on a
   phone. Every site: generated and uploaded ---- */
.lpop-body { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
.lpop-body .sb-field { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1-5); min-width: 0; margin: 0; }
.lpop-body .sb-field > span, .lpop-flabel { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-muted); }
.lpop-words { width: 100%; min-width: 0; }
.lpop-where { min-width: 0; }
.lpop-hint { margin: 0; font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-soft); }
/* (a generated site's look rows, the panel's own #rpText body, while the dialog shows them: the panel's padding off) */
.lpop-more { min-width: 0; padding-top: var(--space-3); border-top: 1px solid var(--border-faint); }
.lpop-more > .sb-rp-body { display: flex; flex-direction: column; gap: var(--space-3); padding: 0; max-height: none; overflow: visible; }
.lpop-more .sb-field.hidden, .lpop-more .hidden { display: none; }
.lpop-foot { display: flex; justify-content: flex-end; }

/* a logo strip's Site panel section (siteBuilderCore mountCollSection): the strip is edited from the right panel
   (customLogosPanel), so the section never shows. Its self-test's frames run in .sb-probe-offstage instead: laid out
   on screen (a browser slows frames it can't see) but fully transparent and never in the way */
.sb-coll.is-offstage { display: none; }
/* the Site panel lists no lists (owner call, 19 Oct 2026: they're reached by clicking them on the page). A list's
   section shows only while an item clicked on the page is open in it (collItemView: is-coll-item) */
.sb-live-site:not(.is-coll-item) > [data-sp="colls"] { display: none; }
.sb-live-colls > [data-coll-title][hidden] { display: none; }
.sb-probe-offstage { position: fixed; left: 0; bottom: 0; width: 320px; opacity: 0; pointer-events: none; }

/* =========================================================================
   The Editor Panel System on an uploaded site's right panel (.sb-panel.is-live, set by siteBuilderCore
   applyCustomChrome). Generated sites keep their own panel.
     tabs     segmented pills, 28px; selected = sunk fill + hairline
     header   44px: the selection's icon, what's selected (13px semibold ink), × (Done)
     rows     36px: the label in the left 40% (13px muted), a filled 30px control; a hint is one 12px line under it
     keys     <kbd>Enter</kbd> keep · <kbd>Esc</kbd> undo, never a paragraph
   ========================================================================= */
.sb-panel.is-live .sb-tools { margin: 0; padding: var(--space-2-5) var(--space-4); gap: var(--space-1); }
.sb-panel.is-live .sb-tool { height: 28px; padding: 0 var(--space-2-5); border-radius: var(--radius-sm); font-weight: var(--fw-medium); }
.sb-panel.is-live .sb-tool.active { background: var(--surface-sunk); box-shadow: inset 0 0 0 1px var(--border-faint); font-weight: var(--fw-medium); }
.sb-panel.is-live .sb-tool:focus-visible, .sb-panel.is-live .sb-tool.active:focus-visible { box-shadow: var(--ring-primary); }
/* the selection's header (Text, Photo) */
.sb-panel.is-live #rpText > .sb-rp-head, .sb-panel.is-live #rpImage > .sb-rp-head { justify-content: flex-start; gap: var(--space-2); min-height: 44px; margin: 0; padding: 0 var(--space-2) 0 var(--space-4); border-bottom: 1px solid var(--border-faint); }
.sb-panel.is-live #rpText > .sb-rp-head b, .sb-panel.is-live #rpImage > .sb-rp-head b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--text-sm); }
.sb-panel.is-live #rpText > .sb-rp-body, .sb-panel.is-live #rpImage > .sb-rp-body { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-3) var(--space-4) var(--space-6); }
/* (nothing in the column shrinks: the photo card, a box with overflow hidden, would otherwise be squeezed to nothing
   under a long picker) */
.sb-panel.is-live #rpText > .sb-rp-body > *, .sb-panel.is-live #rpImage > .sb-rp-body > * { flex: none; }
/* property rows: label left, filled control right, the hint under the control */
.sb-panel.is-live #rpText .sb-field:not(#liveOffer) {
  display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr); align-items: center; column-gap: var(--space-2); row-gap: var(--space-0-5); min-height: 36px; margin: 0;
}
.sb-panel.is-live #rpText .sb-field:not(#liveOffer) > span { font-size: var(--text-sm); font-weight: var(--fw-regular); color: var(--text-muted); }
.sb-panel.is-live #rpText .sb-field .input { width: 100%; height: 30px; padding: 0 var(--space-2-5); border: 0; border-radius: var(--radius-md); background: var(--gray-100); box-shadow: none; font-size: var(--text-sm); color: var(--text-strong); }
.sb-panel.is-live #rpText .sb-field .input:focus { background: var(--surface); box-shadow: var(--ring-primary); outline: none; }
@media (pointer: coarse) { .sb-panel.is-live #rpText .sb-field .input { height: 40px; } }
.sb-panel.is-live #rpText .sb-field .input::placeholder { color: var(--text-placeholder); }
.sb-panel.is-live #rpText .sb-field .sb-hint { grid-column: 2; margin: 0 0 var(--space-1); font-size: var(--text-xs); color: var(--text-soft); }
/* a drop-down's choices: its label above its lines, each line the panel's width (fieldCards choicesHTML, the section
   editor's rows) */
.sb-panel.is-live #rpText #rpChoicesField:not(.hidden) { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1-5); }
.sb-panel.is-live #rpText #rpChoicesField .sb-hint { margin: 0; }
/* (the rows, + Add a choice and the prompt's line spaced as a section card's are, .sde-field) */
.sb-panel.is-live #rpText #rpChoicesHost { display: flex; flex-direction: column; gap: var(--space-1-5); min-width: 0; }
.sb-panel.is-live #rpImage .sb-hint--gap { margin-top: 0; }
/* the keys line */
.sb-panel.is-live .sb-live-hint { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2-5); margin: 0 0 var(--space-2); font-size: var(--text-xs); line-height: var(--leading-snug); color: var(--text-soft); }
.sb-panel.is-live .sb-live-hint.hidden { display: none; }
.sb-panel.is-live .sb-live-hint .kbd { min-width: 20px; height: 20px; padding: 0 var(--space-1); font-size: var(--text-2xs); margin-right: var(--space-1); }
.sb-panel.is-live .sb-live-hint-note { flex-basis: 100%; }
/* the photo: the picture itself, 16:10, then its rows */
.sb-panel.is-live .sb-img-now { aspect-ratio: 16 / 10; margin-bottom: var(--space-2); }
/* asset sections (Photos tab and the photo picker): a title row with a faint count, a hairline between sections */
.sb-panel.is-live .sb-live-group > .sb-fs-title { min-height: 32px; margin: 0; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
.sb-panel.is-live .sb-live-group > .sb-fs-title .chip-count { min-width: 0; height: auto; padding: 0; background: none; line-height: 1; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-soft); }
.sb-panel.is-live #rpPhotoPick, .sb-panel.is-live #photoList { display: block; }
.sb-panel.is-live #rpPhotoPick .sb-live-group, .sb-panel.is-live #rpPhotos .sb-live-group { margin: 0; }
.sb-panel.is-live #rpPhotoPick .sb-live-group + .sb-live-group, .sb-panel.is-live #rpPhotos .sb-live-group + .sb-live-group { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border-faint); }
.sb-panel.is-live #rpPhotoPick { margin-top: var(--space-2); padding-top: var(--space-3); border-top: 1px solid var(--border-faint); }
.sb-panel.is-live #rpPhotoPick .sb-photos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1-5); }

/* The Photo dialog (owner, 4 Nov 2026): the picture across the top, whole on a quiet well (a click on it, or a photo
   dropped on it, replaces it: Replace image shows on hover and keyboard focus, and always on touch), then its description,
   its link when the picture is one, Choose from library and Done. No URL box, no second upload tile. */
#rpImage > .sb-rp-body { display: flex; flex-direction: column; gap: var(--space-4); }
.sb-img-editor { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; }
#rpImage .sb-field { display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1-5); min-width: 0; margin: 0; }
#rpImage .sb-field > span { font-size: var(--text-xs); font-weight: var(--fw-medium); color: var(--text-muted); }
#rpImage .sb-field .input { width: 100%; min-width: 0; }
#rpImage .sb-field.hidden { display: none; }   /* (Link only on a picture that is one, Description only where it has one) */
/* (a photo at the box's full width and its own shape, no bars beside it: cropped by cover only past 340px tall; a logo
   whole on its well, as it was) */
.sb-drop.sb-img-drop { width: 100%; height: auto; aspect-ratio: 16 / 10; max-height: 340px; min-height: 0; margin: 0; border-radius: var(--radius-lg); }
#rpImage .sb-img-now { display: block; width: 100%; height: auto; aspect-ratio: auto; min-height: 120px; max-height: 340px; margin: 0; border: 1px solid var(--border-faint); border-radius: var(--radius-lg); }
#rpImage .sb-img-now img { display: block; width: 100%; height: auto; max-height: 340px; object-fit: cover; }
#rpImage .sb-img-now.is-logo { display: flex; aspect-ratio: 16 / 10; }
#rpImage .sb-img-now.is-logo img { width: 100%; height: 100%; padding: var(--space-6); object-fit: contain; }
#rpImage .sb-img-now-over, #rpImage .sb-img-dims { opacity: 0; transition: opacity var(--dur-fast) var(--ease); }
#rpImage .sb-img-now:focus-visible .sb-img-now-over, #rpImage .sb-img-now.is-over .sb-img-now-over,
#rpImage .sb-img-now:focus-visible .sb-img-dims, #rpImage .sb-img-now.is-over .sb-img-dims { opacity: 1; }
@media (hover: hover) and (pointer: fine) { #rpImage .sb-img-now:hover .sb-img-now-over, #rpImage .sb-img-now:hover .sb-img-dims { opacity: 1; } }
/* (touch: no hover to find it, so a small Replace image chip sits in the corner) */
@media (hover: none) {
  #rpImage .sb-img-now-over { opacity: 1; inset: auto auto var(--space-2) var(--space-2); flex-direction: row; gap: var(--space-1-5); padding: var(--space-1) var(--space-2-5); border-radius: var(--radius-full); }
  #rpImage .sb-img-now-over small, #rpImage .sb-img-now-ico { display: none; }
}
.sb-img-dims { position: absolute; right: var(--space-2); bottom: var(--space-2); padding: var(--space-0-5) var(--space-1-5); border-radius: var(--radius-xs); background: var(--overlay-media-strong); color: var(--text-invert); font-size: var(--text-2xs); font-variant-numeric: tabular-nums; pointer-events: none; }
.sb-img-drop .sb-drop-inner { gap: var(--space-1); }
#rpImage #rpUpload.hidden { display: none; }   /* (the photo itself stands in its place: .sb-drop's own display beat .hidden, so both showed) */
.sb-img-actions { display: flex; justify-content: flex-end; }
.sb-img-library { min-width: 0; padding-top: var(--space-3); border-top: 1px solid var(--border-faint); }
.sb-img-library > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--control-md); color: var(--text-muted); font-size: var(--text-sm); list-style: none; cursor: pointer; }
.sb-img-library > summary::-webkit-details-marker { display: none; }
.sb-img-library > summary .ic svg { width: 14px; height: 14px; }
.sb-img-library[open] > summary .ic { transform: rotate(180deg); }
.sb-img-library > summary .ic { transition: transform var(--dur) var(--ease); }
/* its body (photoChoose's libraryToggle slides it): the photos three to a row in a box of their own (.sb-img-pick) that
   scrolls past about three rows, so a big library never makes the dialog endless (owner, 4 Nov 2026). The drop box and
   the library are photoChoose's: the canvas's picture panel and a post's Insert → Image share them. The grid's rules
   keep the canvas's own two-id weight for all three (:is takes its heaviest; the third, a section editor photo's
   Choose from library), so a later class rule (a logo tile's
   .sb-live-ph[data-tone] well, the live panel's 32px group titles, its display: block) never takes them over in either */
.sb-img-library-body { overflow: hidden; }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) { display: block; max-height: 300px; margin-top: var(--space-1); padding: 2px; overflow-y: auto; overscroll-behavior: contain; }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick).sb-photos, :is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-1-5); }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-ph { aspect-ratio: 1; border-width: 0; background: var(--surface-sunk); outline: 1px solid var(--border-faint); outline-offset: -1px; }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-ph img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-live-group { margin: 0; }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-live-group + .sb-live-group { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--border-faint); }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-live-group > .sb-fs-title { min-height: 28px; margin: 0; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-strong); }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-live-group > .sb-fs-title .chip-count { min-width: 0; height: auto; padding: 0; background: none; line-height: 1; font-size: var(--text-sm); font-weight: var(--fw-medium); color: var(--text-soft); }
:is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-ph:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
@media (hover: hover) and (pointer: fine) { :is(#rpImage #rpPhotoPick, .rte-pop-image .sb-img-pick, .sde .sb-img-pick) .sb-ph--pick:hover { outline: 2px solid var(--gray-400); outline-offset: -2px; } }
@media (prefers-reduced-motion: reduce) { .sb-img-library > summary .ic { transition: none; } }
.sb-img-library > summary:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
.sb-panel.is-live #rpImage #rpPhotoPick { margin-top: var(--space-2); padding-top: 0; border-top: 0; }
.sb-panel.is-live #rpPhotoPick .sb-ph { aspect-ratio: 1; border-width: 0; background: var(--surface-sunk); outline: 1px solid var(--border-faint); outline-offset: -1px; }
.sb-panel.is-live #rpPhotoPick .sb-ph img { border-radius: 0; }
.sb-panel.is-live #rpPhotoPick .sb-ph:focus-visible, .sb-panel.is-live #rpPhotos .sb-ph:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }
/* a see-through logo (logoTone): whole, on the ground it was drawn for */
.sb-live-ph[data-tone] img { object-fit: contain; padding: var(--space-2); }
.sb-live-ph[data-tone="light"], .sb-panel.is-live #rpPhotoPick .sb-live-ph[data-tone="light"], #rpPhotos .sb-live-ph[data-tone="light"] { background: var(--logo-well-dark); }
.sb-live-ph[data-tone="dark"], .sb-panel.is-live #rpPhotoPick .sb-live-ph[data-tone="dark"], #rpPhotos .sb-live-ph[data-tone="dark"] { background: var(--logo-well); }
@media (hover: hover) and (pointer: fine) {
  .sb-panel.is-live #rpPhotoPick .sb-ph--pick:hover { outline: 2px solid var(--gray-400); outline-offset: -2px; }
}
/* the Site panel: the how-to as one line each (title · line), the rows as 32px nav rows */
.sb-panel.is-live .sb-live-tips .sb-howto { gap: var(--space-1); }
.sb-panel.is-live .sb-live-tips .sb-howto li { align-items: center; min-height: 28px; }
.sb-panel.is-live .sb-live-tips .sb-howto li > span:last-child { display: flex; align-items: baseline; gap: var(--space-1-5); min-width: 0; }
.sb-panel.is-live .sb-live-tips .sb-howto b { flex: none; }
.sb-panel.is-live .sb-live-tips .sb-howto small { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }
.sb-panel.is-live .sb-live-tips .sb-howto small::before { content: "· "; }
.sb-panel.is-live .sb-howto-label { font-weight: var(--fw-medium); }
.sb-panel.is-live .sb-live-line { min-height: var(--control-sm); }
