/* The guided path of the builder (direction E). Pairs with scripts/builder/guided.js. */
.guided-bar { background: var(--bg-0); border-bottom: 2px solid var(--text-main); padding: 10px 14px 8px; }
.guided-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.guided-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.guided-step { display: inline-flex; align-items: center; gap: 8px; font: 600 15px / 1 var(--font-body); padding: 7px 16px 7px 8px; border: 2px solid var(--text-main); border-radius: var(--radius-pill); background: transparent; color: var(--text-main); cursor: pointer; }
.guided-step:hover { background: rgba(29, 42, 51, 0.08); }
.guided-num { display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid currentColor; border-radius: 50%; font: 400 15px / 1 var(--font-display); }
.guided-step:nth-child(even) .guided-num { border-radius: 13px 13px 0 0; }
.guided-step.is-done .guided-num { background: var(--teal); border-color: var(--teal); color: var(--text-on-teal); }
.guided-step.is-current { background: var(--rust); border-color: var(--rust); color: #fff; }
.guided-step.is-current .guided-num { background: #fff; border-color: #fff; color: var(--rust); }
html[data-ui-theme="dark"] .guided-step.is-current { background: var(--mustard); border-color: var(--mustard); color: var(--ink); }
html[data-ui-theme="dark"] .guided-step.is-current .guided-num { background: var(--ink); border-color: var(--ink); color: var(--mustard); }
html[data-ui-theme="dark"] .guided-step.is-done .guided-num { background: var(--accent-secondary); border-color: var(--accent-secondary); color: var(--ink); }
.guided-actions { display: flex; align-items: center; gap: 8px; }
.guided-switch { display: inline-flex; align-items: center; gap: 8px; font: 600 14px / 1 var(--font-body); cursor: pointer; margin-right: 4px; color: var(--text-main); white-space: nowrap; }
.guided-switch input { appearance: none; width: 42px; height: 24px; border: 2px solid var(--text-main); border-radius: 999px; background: transparent; position: relative; cursor: pointer; }
.guided-switch input::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-main); transition: transform 150ms; }
.guided-switch input:checked { background: var(--teal); }
.guided-switch input:checked::after { transform: translateX(18px); background: #fff; }
.guided-hint { margin: 6px 0 0; font-size: 14px; color: var(--text-muted); }
.guided-bar[hidden] { display: none; }
.guided-next[hidden] { display: none; }

/* guided mode: only what the current step needs */
body.is-guided .mode-switcher,
body.is-guided .theme-select-wrapper,
body.is-guided #openInTabBtn,
body.is-guided .elements-scope-toggle,
body.is-guided .elements-attr-row,
body.is-guided .elements-quick-row .quick-check,
body.is-guided .brand-tag { display: none !important; }
body.is-guided .sidebar-tab-btn[data-tab="styling"], body.is-guided .sidebar-tab-btn[data-tab="content"] { display: none; }
body.is-guided:not([data-step="1"]) .sidebar-tab-switcher { display: none; }
body.is-guided[data-step="1"] #tabElementsBtn span:not(.tab-badge) { font-size: 0; }
body.is-guided[data-step="1"] #tabElementsBtn span:not(.tab-badge)::after { content: "Add blocks"; font-size: 14px; }
/* The header Export button is not shown: a page is taken through step 5 (Get it / checkout). The button stays in the page because "Go to the download" and the paid download open the export window through it. */
#openExportModalBtn[hidden] { display: none !important; }
#guidedCheckoutBtn[hidden] { display: none !important; }
html[lang="lv"] body.is-guided[data-step="1"] #tabElementsBtn span:not(.tab-badge)::after { content: "Pievienot blokus"; } /* words made by CSS are not on the page for scripts/builder/ui-lang.js to find */
@media (max-width: 800px) { .guided-label { display: none; } .guided-step { padding-right: 8px; } }

/* guided step 1: the plain block picker replaces the full catalogue (Advanced brings the catalogue back) */
.block-picker { display: none; padding: 14px; }
body.is-guided .block-picker { display: block; }
body.is-guided #paneElements .elements-catalog-header, body.is-guided #elementsCatalogScroll { display: none; }
.bp-h { font: 400 20px / 1.2 var(--font-display); margin: 6px 0 10px; color: var(--text-main); }
.bp-list, .bp-kinds { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 8px; }
.bp-empty { margin: 0 0 14px; color: var(--text-muted); font-size: 15px; }
.bp-item, .bp-kind { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 2px solid var(--text-main); border-radius: 12px; background: var(--bg-1, transparent); }
.bp-name, .bp-kind-text b { font: 600 16px / 1.25 var(--font-body); color: var(--text-main); }
.bp-kind-text { display: grid; gap: 2px; min-width: 0; flex: 1 1 160px; }
.bp-kind-text small { font-size: 14px; color: var(--text-muted); }
.bp-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-btn { font: 600 14px / 1 var(--font-body); min-height: 40px; min-width: 40px; padding: 0 12px; border: 2px solid var(--text-main); border-radius: 999px; background: transparent; color: var(--text-main); cursor: pointer; }
.bp-btn:hover:not(:disabled) { background: var(--mustard); }
.bp-btn:disabled { opacity: .4; cursor: default; }
.bp-add { background: var(--teal); border-color: var(--teal); color: var(--text-on-teal); }
.bp-add:hover:not(:disabled) { background: var(--rust); border-color: var(--rust); color: #fff; }
.bp-kind.is-added .bp-add { background: transparent; color: var(--text-main); border-color: var(--text-main); }
.bp-kind.is-later { border-style: dashed; }
.bp-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* guided step 2: one block at a time, no admin panel */
.words-status { display: none; margin: 0 0 12px; padding: 10px 12px; border: 2px dashed var(--text-main); border-radius: 12px; font-size: 15px; color: var(--text-main); }
body.is-guided .words-status { display: block; }
.words-nav { display: none; gap: 8px; margin: 8px 0; }
body.is-guided .words-nav { display: flex; }
body.is-guided .admin-open-card, body.is-guided .widgets-catalog-header, body.is-guided .quick-edit > summary { display: none; }

/* guided step 3: look picker replaces the classic Styling controls */
.look-picker { display: none; padding: 14px; }
body.is-guided .look-picker { display: block; }
body.is-guided #paneStyling .widgets-catalog-header, body.is-guided #paneStyling .styling-group:not(#pageSettingsGroup), body.is-guided #paneStyling .universal-theming-callout, body.is-guided #paneStyling .adv-only, body.is-guided #paneStyling datalist { display: none; }
.lk-h { font: 400 20px / 1.2 var(--font-display); margin: 6px 0 10px; color: var(--text-main); }
.lk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
.lk-btn { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border: 2px solid var(--text-main); border-radius: 12px; background: transparent; color: var(--text-main); font: 600 14px / 1.2 var(--font-body); cursor: pointer; text-align: left; }
.lk-btn:hover { background: var(--mustard); }
.lk-btn.is-on { background: var(--teal); border-color: var(--teal); color: var(--text-on-teal); }
.lk-swatch { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 32px; border: 3px solid; border-radius: 8px; font: 600 14px / 1 var(--font-body); }
.lk-swatch i { font-style: normal; }
.lk-swatch u { position: absolute; right: -5px; bottom: -5px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg-0, #fff); }
.lk-font { flex: none; display: grid; place-items: center; width: 36px; height: 32px; border-radius: 8px; background: var(--bg-0, #fff); color: var(--text-main); font: 400 20px / 1 var(--font-display); }
.lk-corner { flex: none; width: 30px; height: 30px; border: 3px solid currentColor; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.lk-guard { margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; border: 2px solid var(--teal); font-size: 14px; color: var(--text-main); }
.lk-guard.is-bad { border-color: var(--rust); background: rgba(200, 85, 61, 0.1); }
.lk-fix { margin-bottom: 16px; }
.lk-fix[hidden] { display: none; }

/* guided step 4: the check list */
.check-pane .ck-body { padding: 14px; }
.ck-h { font: 400 20px / 1.25 var(--font-display); margin: 6px 0 12px; color: var(--text-main); }
.ck-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ck-item { display: grid; gap: 8px; padding: 10px 12px; border: 2px solid var(--text-main); border-radius: 12px; }
.ck-text { font-size: 15px; line-height: 1.4; color: var(--text-main); }
.ck-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.ck-input { flex: 1 1 180px; min-width: 0; padding: 8px 10px; border: 2px solid var(--text-main); border-radius: 10px; background: var(--bg-0, #fff); color: var(--text-main); font: 400 15px / 1.3 var(--font-body); }
.ck-btn { min-height: 40px; }

/* guided step 5: price and download; and the help link in the step bar */
.gt-lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0 0 12px; font-size: 15px; color: var(--text-main); }
.gt-lines dt { margin: 0; } .gt-lines dd { margin: 0; font-weight: 600; text-align: right; }
.gt-total { margin: 0 0 14px; font: 400 24px / 1.2 var(--font-display); color: var(--text-main); }
.gt-editor { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 14px; border: 2px solid var(--text-main); border-radius: 12px; cursor: pointer; }
.gt-editor input { margin-top: 4px; width: 20px; height: 20px; accent-color: var(--teal); flex: none; }
.gt-editor span { display: grid; gap: 2px; font-size: 15px; color: var(--text-main); } .gt-editor small { font-size: 14px; color: var(--text-muted); }
.gt-go { width: 100%; min-height: 44px; }
.gt-note { margin: 8px 0 18px; font-size: 14px; color: var(--text-muted); }
.gt-help { padding: 12px; border: 2px dashed var(--text-main); border-radius: 12px; display: grid; gap: 10px; justify-items: start; }
.gt-done { margin: 0; font-size: 15px; color: var(--text-main); }
.guided-ask { font: 600 14px / 1 var(--font-body); color: var(--text-main); text-decoration: underline; text-underline-offset: 3px; padding: 8px 4px; white-space: nowrap; }
.guided-ask:hover { color: var(--rust); }

/* entry from the questions: the offer to start from the visitor's answers */
.brief-offer { display: none; margin: 14px 14px 0; padding: 14px; border: 2px solid var(--rust); border-radius: 14px; background: rgba(200, 85, 61, 0.08); }
body.is-guided .brief-offer { display: block; }
body.is-guided .brief-offer[hidden] { display: none; }
.bo-lead { margin: 0 0 8px; font-size: 15px; color: var(--text-main); }
.bo-list { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 4px; font-size: 15px; color: var(--text-main); }
.bo-list small { font-size: 14px; color: var(--text-muted); }
.bo-missing, .bo-warn { margin: 0 0 10px; font-size: 14px; color: var(--text-muted); }
.bo-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* phone: panel and preview take turns, header slimmed down */
.guided-flip { display: none; }
@media (max-width: 700px) {
  body .guided-flip { display: block; position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 400; min-height: 48px; padding: 0 22px; border: 2px solid var(--text-main); border-radius: 999px; background: var(--rust); color: #fff; font: 600 16px / 1 var(--font-body); box-shadow: 0 4px 0 var(--text-main); cursor: pointer; }
  body.is-guided .builder-header .header-center, body.is-guided #openExportModalBtn { display: none; }
  body .builder-workspace { flex-direction: column; }
  body .builder-sidebar { width: 100%; min-width: 0; max-width: none; flex: 1 1 auto; min-height: 0; border-right: 0; padding-bottom: 76px; }
  body .builder-viewport { display: none; width: 100%; flex: 1 1 auto; min-height: 0; }
  body.show-preview .builder-sidebar { display: none; }
  body.show-preview .builder-viewport { display: flex; }
  /* the preview is the real page at the phone's own width: no fake browser window, no frame, the whole height */
  body .viewport-stage { padding: 0; align-items: stretch; }
  body .viewport-frame-wrapper { width: 100%; max-width: none; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  body .viewport-browser-bar { display: none; }
  body .live-preview-iframe { flex: 1 1 auto; min-height: 0; }
  /* the flip button steps aside while a window is open */
  body:has(.export-modal.is-open) .guided-flip { display: none; }
  /* a short step bar: the hint and the long help stay one tap away */
  body.is-guided .guided-bar { padding: 8px 12px 6px; }
  body.is-guided .guided-steps { gap: 4px; }
  body.is-guided .guided-step { padding: 4px 6px 4px 4px; }
  body.is-guided .guided-num { width: 30px; height: 30px; }
  body.is-guided .guided-hint { display: none; }
  .guided-inner { gap: 8px; }
}

/* help and start over */
.guided-helpbtn { margin: 4px 0 0; padding: 4px 0; border: 0; background: none; color: var(--text-main); font: 600 14px / 1 var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.guided-help { margin: 6px 0 0; padding: 10px 12px; max-width: 70ch; border: 2px dashed var(--text-main); border-radius: 12px; font-size: 15px; line-height: 1.45; color: var(--text-main); }
.guided-help[hidden] { display: none; }
.bp-over-row { margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--text-main); }
.bp-over-row [hidden] { display: none; }
.bp-sure { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 700px) { body.is-guided .guided-hint { display: block; } }

/* languages: the box under the blocks in step 1 and the "Writing in" row in step 2 (scripts/builder/languages.js); Advanced uses the page tabs */
.languages-box, .lang-bar { display: none; }
body.is-guided .languages-box { display: block; padding: 0 14px 14px; }
body.is-guided .lang-bar:not([hidden]) { display: flex; }
.lg-lead, .lg-note { margin: 0 0 10px; font-size: 15px; color: var(--text-muted); }
.lg-label { display: block; margin: 10px 0 4px; font: 600 14px / 1.2 var(--font-body); color: var(--text-main); }
.lg-select { width: 100%; min-height: 44px; padding: 0 10px; border: 2px solid var(--text-main); border-radius: 12px; background: var(--bg-1, transparent); color: var(--text-main); font: 400 15px var(--font-body); }
.lg-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.lg-row .lg-select { flex: 1 1 160px; width: auto; }
.lg-add { background: var(--teal); border-color: var(--teal); color: var(--text-on-teal); }
.lg-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.lg-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 2px solid var(--text-main); border-radius: 12px; background: var(--bg-1, transparent); }
.lg-item b { font: 600 16px / 1.25 var(--font-body); color: var(--text-main); }
.lg-item small { color: var(--text-muted); font-size: 14px; flex: 1 1 auto; }
.lg-here { margin-left: auto; font: 600 13px / 1 var(--font-body); padding: 6px 10px; border-radius: 999px; background: var(--mustard); color: var(--text-main); }
.lg-sure { flex: 1 1 100%; font-size: 14px; color: var(--text-main); }
.lang-bar { align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.lb-label { font: 600 14px / 1 var(--font-body); color: var(--text-main); margin-right: 4px; }
.lb-btn { font: 600 14px / 1 var(--font-body); min-height: 40px; padding: 0 14px; border: 2px solid var(--text-main); border-radius: 999px; background: transparent; color: var(--text-main); cursor: pointer; }
.lb-btn:hover:not(.is-here) { background: var(--mustard); }
.lb-btn.is-here { background: var(--text-main); color: var(--bg-0); }

/* free blocks and account blocks (scripts/builder/access.js): a link beside the catalogue title, a filter pill, a lock on the cards that need an account, a note that floats */
.access-pill { flex: none; margin-left: auto; font: 600 13px / 1 var(--font-body, inherit); padding: 9px 14px; border-radius: 999px; background: var(--rust, #c4522a); color: #fff; text-decoration: none; white-space: nowrap; }
.access-pill:hover { filter: brightness(1.1); }
.access-pill[hidden], #accessFreeBtn[hidden] { display: none; }
.access-toast { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 1200; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: min(440px, calc(100vw - 24px)); padding: 12px 14px; border: 2px solid var(--text-main, #222); border-radius: 12px; background: var(--mustard, #e2a627); color: var(--text-main, #222); box-shadow: 0 6px 20px rgba(0, 0, 0, .25); }
.access-toast[hidden] { display: none; }
.at-text { margin: 0; flex: 1 1 200px; font: 600 14px / 1.35 var(--font-body, inherit); }
.at-go { flex: none; font: 600 13px / 1 var(--font-body, inherit); padding: 9px 14px; border-radius: 999px; background: var(--text-main, #222); color: var(--bg-0, #fff); text-decoration: none; }
.at-no { flex: none; font: 600 13px / 1 var(--font-body, inherit); padding: 9px 12px; border: 2px solid var(--text-main, #222); border-radius: 999px; background: transparent; color: var(--text-main, #222); cursor: pointer; }

.element-lock-badge { font: 600 11px / 1 var(--font-body, inherit); padding: 4px 8px; border-radius: 999px; background: var(--mustard, #e2a627); color: var(--text-main, #222); white-space: nowrap; }

/* the space of the step bar is reserved before the scripts build it, so nothing jumps when it appears (E6.12) */
.guided-skel { background: var(--bg-0); border-bottom: 2px solid var(--text-main); padding: 10px 14px 8px; box-sizing: border-box; }
.guided-skel .guided-hint { margin: 48px 0 0; }
/* the placeholder and the real bar share one height per width, so swapping them moves nothing (measured: tests/e2e/builder-layout-shift.e2e.js) */
.guided-skel, .guided-bar { min-height: 121px; box-sizing: border-box; }
@media (max-width: 700px) { .guided-skel, .guided-bar { min-height: 153px; } }
@media (max-width: 520px) { .guided-skel, .guided-bar { min-height: 182px; } }
/* the header wraps to two rows on a narrow phone once the Advanced switch is added; keep that room from the first paint */
@media (max-width: 380px) { body.is-guided .builder-header { min-height: 88px; } }

/* step 5 panel: room at the sides, and the web address question */
.get-pane .ck-body { padding: 14px; }
.gt-address { display: grid; gap: 6px; margin: 0 0 14px; font-size: 15px; color: var(--text-main); }
.gt-address small { font-size: 14px; line-height: 1.4; color: var(--text-muted); }
.gt-input { width: 100%; box-sizing: border-box; min-height: 44px; padding: 8px 12px; font: 400 16px / 1.2 var(--font-body); color: var(--text-main); background: var(--bg-0); border: 2px solid var(--text-main); border-radius: 10px; }
.gt-input[aria-invalid="true"] { border-color: var(--rust); }
#getAddressNote { min-height: 1.2em; }

/* drag to reorder (touch and mouse): the handle must not scroll the page, the other blocks slide aside */
.bp-drag { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; font-size: 20px; letter-spacing: -2px; }
.bp-drag:active { cursor: grabbing; }
.bp-item { position: relative; }
.bp-list.is-sorting .bp-item:not(.is-dragging) { transition: transform .15s ease; }
.bp-item.is-dragging { z-index: 5; box-shadow: 0 8px 22px rgba(29, 42, 51, .35); background: var(--mustard); }
@media (prefers-reduced-motion: reduce) { .bp-list.is-sorting .bp-item:not(.is-dragging) { transition: none; } }

/* every guided panel scrolls by finger or wheel (the base rule hides overflow, which left the lower part of a long step out of reach on a phone) */
body.is-guided .sidebar-tab-pane { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* "Add a block": the list on a wide screen, a sheet from the bottom on a phone */
.bp-open-sheet, .bp-grabber, .bp-close-sheet, .bp-backdrop { display: none; }
.bp-sheet-head { display: block; }
@media (max-width: 700px) {
  .bp-open-sheet { display: block; width: 100%; min-height: 48px; margin: 0 0 18px; }
  .bp-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 460; max-height: 78vh; max-height: 78dvh; overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; padding: 8px 14px 24px; background: var(--bg-0); border: 2px solid var(--text-main); border-bottom: 0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px rgba(29, 42, 51, .3); transform: translateY(105%); visibility: hidden; transition: transform .22s ease, visibility 0s linear .22s; }
  .bp-sheet.is-open { transform: translateY(0); visibility: visible; transition: transform .22s ease; }
  .bp-sheet.is-pulling { transition: none; }
  .bp-grabber { display: block; width: 48px; height: 6px; margin: 4px auto 10px; border-radius: 3px; background: var(--text-muted); touch-action: none; cursor: grab; padding: 10px 0; background-clip: content-box; box-sizing: content-box; }
  .bp-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: sticky; top: -8px; background: var(--bg-0); padding-bottom: 6px; }
  .bp-sheet-head .bp-h { margin: 0; }
  .bp-close-sheet { display: inline-block; }
  .bp-backdrop { display: block; position: fixed; inset: 0; z-index: 450; background: rgba(29, 42, 51, .45); opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility 0s linear .22s; }
  .bp-backdrop.is-open { opacity: 1; visibility: visible; transition: opacity .22s ease; }
  body.is-guided.bp-sheet-open .guided-flip { display: none; }
  .bp-sheet .bp-kinds { margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .bp-sheet, .bp-backdrop { transition: none !important; } }

/* step 2 (Words): the fields sit inside their cards with room, and read at a size a thumb and eye can use */
body.is-guided .content-field { padding: 10px 12px 12px; }
body.is-guided .content-field .ps-field { font-size: 14px; font-weight: 600; color: var(--text-main); gap: 6px; }
body.is-guided .content-field .ps-field input[type="text"], body.is-guided .content-field .ps-field textarea { font-size: 16px; min-height: 44px; }
@media (max-width: 700px) { body.is-guided .content-fields { gap: 14px; padding-bottom: 12px; } }
body.is-guided .content-field .ps-field input[type="text"], body.is-guided .content-field .ps-field textarea { font-weight: 400; }
body.is-guided #contentSectionSelect { min-height: 44px; font-size: 16px; }

/* a phone must never get a sideways page: the soft glow blobs and the slide-in drawer sit partly outside the screen and made the page 500px wide */
@media (max-width: 700px) {
  html, body.builder-body { overflow-x: hidden; max-width: 100vw; }
  .ambient-aurora, .component-drawer { overflow: hidden; }
}

/* phone, Advanced: every header control stays on screen (the Download button and the account button were pushed off the right edge and then clipped) */
@media (max-width: 700px) {
  .builder-header { flex-wrap: wrap; height: auto; row-gap: 8px; }
  .builder-header .header-right, .builder-header .builder-actions { flex-wrap: wrap; justify-content: flex-start; min-width: 0; max-width: 100%; row-gap: 8px; }
  .builder-header .header-center { flex-wrap: wrap; max-width: 100%; }
  #accountSaveNote, .builder-header .save-note { flex-basis: 100%; }
}

/* phone: the preview is already the page at the phone's own width, so the desktop / tablet / mobile switch has nothing to offer */
@media (max-width: 700px) {
  .viewport-mode-switcher { display: none; }
  /* a size picked earlier on a bigger screen must not shrink the phone preview */
  .viewport-stage[data-active-viewport] .viewport-frame-wrapper { width: 100% !important; max-width: none !important; height: 100% !important; border-radius: 0 !important; }
}
/* 320 px: the header's buttons take a second row; keep that room from the first paint (tests/e2e/builder-layout-shift.e2e.js) */
@media (max-width: 340px) { body.is-guided .builder-header { min-height: 125px; } }

/* Put it online (scripts/builder/guided-publish.js) */
.gt-publish { margin-top: 28px; padding-top: 18px; border-top: 2px solid var(--text-main); }
.gt-publish h4 { margin: 0 0 6px; font-size: 18px; }
.gt-publish [hidden] { display: none !important; }
.gt-suffix { font-weight: 600; color: var(--text-main); }
.gt-sites { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.gt-site { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border: 2px solid var(--text-main); border-radius: 10px; font-size: 15px; }
.gt-site a { font-weight: 600; word-break: break-all; }
.gt-site small { color: var(--text-muted); }
.gt-site button { min-height: 44px; }
#publishResult { margin: 12px 0 0; font-size: 15px; }
#publishResult[data-problem="true"] { color: var(--rust); }

.gt-rename { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 8px; }
.gt-rename .gt-input { flex: 1 1 12em; width: auto; }
.gt-rename small { flex: 1 0 100%; }
