/* WASecret Website builder: editor layout on top of ../shared/theme.css (Bloom tokens). */
body { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; --tools-h: 62px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.topbar { flex: none; flex-wrap: nowrap; gap: 8px; }
.ad-brand { flex: none; white-space: nowrap; }
.ad-brand span:last-child { color: var(--muted); font-weight: 600; }
.name-wrap { flex: 0 1 200px; min-width: 110px; }
.site-name { width: 100%; font-weight: 650; padding: 7px 10px; }
.site-name:focus, .ad-input:focus { outline: 2px solid rgba(91, 76, 240, .35); border-color: var(--accent); }
.save-state { flex: none; font-size: 12.5px; color: var(--muted); min-width: 64px; }
.save-state[data-state="saved"]::before { content: "✓ "; color: #16a34a; }
.save-state[data-state="error"] { color: #c0262d; }
.tools { flex: 1; display: flex; align-items: center; justify-content: center; gap: 2px; min-width: 0; }
.tool { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: none; color: var(--fg); border-radius: 10px; padding: 7px 10px; font: 600 13px/1 system-ui, sans-serif; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.tool:hover:not(:disabled) { background: var(--hover); }
.tool:focus-visible, .mini:focus-visible, .handle:focus-visible, .blk-name:focus-visible, .tpl:focus-visible, .add-card:focus-visible, .preset:focus-visible, .swatch:focus-visible { outline: 2px solid var(--sel); outline-offset: 2px; }
.tool:disabled { opacity: .35; cursor: default; }
.tool.on { background: #efedff; color: var(--accent); }
.tool svg, .mini svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.tool .lbl { display: none; }
.phone-only, .close-sheet { display: none; }
.sizes { margin-left: 6px; }
.sizes button.on, .side-head .ad-tabs button.on { background: #fff; color: var(--fg); box-shadow: 0 1px 4px rgba(27, 33, 51, .12); }
.exports { flex: none; display: flex; gap: 8px; }

/* ---------- work area ---------- */
.work { flex: 1; display: flex; min-height: 0; }
.side { width: 340px; flex: none; display: flex; flex-direction: column; min-height: 0; background: var(--bar); border-right: 1px solid var(--line); }
.side-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.side-head .ad-tabs { flex: 1; }
.side-head .ad-tabs button { flex: 1; }
.side-body { flex: 1; overflow: auto; padding: 12px 14px 20px; overscroll-behavior: contain; }
.pane { animation: rise .2s var(--ease); }
.pane-title { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.pane-title:first-child { margin-top: 4px; }
.hint { color: var(--muted); font-size: 12.5px; margin: 2px 0 10px; line-height: 1.45; }
.stage { flex: 1; position: relative; overflow: hidden; min-width: 0; background: radial-gradient(circle at 20% 0%, #ebe9ff 0, transparent 45%), radial-gradient(circle at 100% 100%, #e3f0ff 0, transparent 40%), var(--bg); }
.frame-box { position: absolute; top: 18px; left: 20px; transform-origin: 0 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(27, 33, 51, .12), 0 18px 50px rgba(27, 33, 51, .14); }
.frame-box.flat { border-radius: 0; box-shadow: none; }
.frame-box iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }

/* ---------- blocks list ---------- */
.block-list { list-style: none; margin: 4px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; position: relative; }
.blk-item { display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px; transition: border-color .15s, box-shadow .15s; }
.blk-item:hover { border-color: #cfc9ff; }
.blk-item.sel { border-color: var(--sel); box-shadow: 0 0 0 3px rgba(91, 76, 240, .14); }
.blk-item.dragging { position: relative; z-index: 3; box-shadow: var(--shadow); border-color: var(--sel); opacity: .95; transition: none; }
.handle { flex: none; border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; padding: 9px 6px; border-radius: 8px; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.handle:hover { background: var(--hover); color: var(--fg); }
.dragging .handle { cursor: grabbing; }
.blk-name { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 0; background: none; padding: 5px 4px; text-align: left; font: inherit; color: inherit; cursor: pointer; border-radius: 8px; }
.blk-name b { font-size: 13.5px; font-weight: 650; }
.blk-name small { max-width: 100%; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acts { display: inline-flex; gap: 0; flex: none; }
.mini { display: grid; place-items: center; width: 30px; height: 30px; border: 0; background: none; color: var(--muted); border-radius: 8px; cursor: pointer; }
.mini:hover:not(:disabled) { background: var(--hover); color: var(--fg); }
.mini:disabled { opacity: .3; cursor: default; }
.mini[data-act="del"]:hover { color: #c0262d; background: #fdecec; }
.mini svg { width: 16px; height: 16px; }
.drop-line { position: absolute; left: 4px; right: 4px; height: 3px; border-radius: 3px; background: var(--grad); pointer-events: none; z-index: 4; }
.btn.wide { width: 100%; }
.btn.sq { padding: 6px 10px; }
.btn.danger { color: #b42318; }
.btn.danger:hover { background: #fdecec; border-color: #f5c2c0; }

/* ---------- edit + theme fields ---------- */
.edit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin: 2px 0 4px; }
.edit-head h3 { margin: 0; font-size: 16px; }
.fld { display: flex; flex-direction: column; gap: 5px; margin: 0 0 12px; font-size: 12.5px; font-weight: 600; color: #4a5266; }
.fld > span:first-child { line-height: 1.3; }
.fld .ad-input, .fld input[type=text], .fld textarea, .fld select { width: 100%; font-weight: 400; font-size: 14px; color: var(--fg); }
.fld textarea { resize: vertical; min-height: 64px; line-height: 1.4; }
.sub-fld, .list-fld { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px 2px; margin: 0 0 12px; min-width: 0; }
.sub-fld > legend, .list-fld > legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.list-fld > legend small { color: var(--muted); font-weight: 500; }
.list-fld .add-item { margin: 2px 0 10px; }
.item-card { border: 1px solid var(--line); border-radius: 10px; background: #fafaff; margin: 0 0 8px; }
.item-card > summary { display: flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px; cursor: pointer; list-style: none; font-weight: 600; font-size: 13px; }
.item-card > summary::-webkit-details-marker { display: none; }
.item-card > summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.item-card[open] > summary::before { transform: rotate(90deg); }
.item-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-body { padding: 4px 10px 2px; }
.img-fld { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.img-fld img, .img-fld .noimg { width: 72px; height: 54px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: #f1f2f8; display: grid; place-items: center; font-size: 11px; color: var(--muted); font-weight: 500; }
.check { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 0 0 12px; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.icon-row { display: flex; gap: 8px; align-items: center; }
.icon-pv { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 10px; background: #efedff; color: var(--accent); }
.icon-pv svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.color-row { display: flex; align-items: center; gap: 8px; }
.color-row select { flex: 1; }
.color-row code { font-size: 12px; color: var(--muted); }
input[type=color] { width: 46px; height: 36px; padding: 2px; border: 1px solid #d9dcea; border-radius: 10px; background: #fff; cursor: pointer; flex: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.swatches:empty { display: none; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--sel); }
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 6px; }
.preset { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 7px 8px; font: 600 12px/1 system-ui, sans-serif; color: var(--fg); cursor: pointer; }
.preset:hover { border-color: #cfc9ff; background: #faf9ff; }
.dots { display: inline-flex; }
.dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; }
.dots i + i { margin-left: -5px; }
#themePane .ad-tabs { display: flex; }
#themePane .ad-tabs button { flex: 1; }
.empty-pane { text-align: center; padding: 20px 6px; }

/* ---------- dialogs ---------- */
dialog[open] { animation: pop .2s var(--ease); }
.dlg { padding: 18px 20px 20px; width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dlg-head h2 { margin: 0; font-size: 19px; }
#linkDlg .dlg { width: min(460px, calc(100vw - 32px)); gap: 0; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 6px; }
.tpl { display: flex; flex-direction: column; text-align: left; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; font: inherit; color: inherit; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.tpl:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfc9ff; }
.tpl-img { display: block; aspect-ratio: 4 / 3; background: #f1f2f8; overflow: hidden; }
.tpl-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tpl-blank { display: grid; place-items: center; height: 100%; font-size: 42px; color: #b7b0ff; background: repeating-linear-gradient(45deg, #fafaff 0 10px, #f3f2ff 10px 20px); }
.tpl .meta { display: block; padding: 10px 12px 12px; }
.tpl b { display: block; font-size: 14.5px; }
.tpl small { display: block; margin-top: 3px; color: var(--muted); line-height: 1.35; }
.add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; margin-top: 8px; }
.add-card { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 12px; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, background .15s; }
.add-card:hover { border-color: #cfc9ff; background: #faf9ff; }
.add-card b { display: block; margin-bottom: 2px; }
.add-card small { color: var(--muted); line-height: 1.35; display: block; }
.proj-list { list-style: none; margin: 6px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.proj { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.proj.current { border-color: var(--sel); background: #faf9ff; }
.proj .info { flex: 1; min-width: 180px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.proj .info b { flex-basis: 100%; }
.proj .info small { color: var(--muted); }
.proj .info .ad-input { flex: 1; min-width: 0; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 6px; }
.ad-toast.show { animation: toastIn .25s var(--ease); }

/* ---------- phones: compact bar on top, tools in a scrollable bottom bar, panels as bottom sheets ---------- */
@media (max-width: 1500px) { .ad-brand span:last-child { display: none; } }
@media (max-width: 1180px) and (min-width: 641px) { .tool > span { display: none; } .save-state { min-width: 0; } .sizes button { padding: 7px 10px; } }
@media (max-width: 900px) and (min-width: 641px) { .side { width: 290px; } .name-wrap { flex-basis: 130px; } .exports .btn { padding: 7px 10px; } }
@media (max-width: 640px) {
  .topbar { padding: 8px 10px; gap: 6px; }
  .ad-brand { font-size: 0; gap: 0; }
  .ad-brand-mark { font-size: 16px; }
  .name-wrap { flex: 1 1 auto; min-width: 0; }
  .save-state { display: none; }
  .exports { gap: 6px; }
  .exports .btn { padding: 7px 11px; font-size: 13px; }
  .long { display: none; }
  .tools { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 2px; padding: 5px 6px max(5px, env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(27, 33, 51, .08); }
  .tools::-webkit-scrollbar { display: none; }
  .tool { flex: none; flex-direction: column; gap: 3px; min-width: 58px; padding: 6px 8px; font-size: 11px; }
  .tool .lbl { display: inline; }
  .phone-only { display: inline-flex; }
  .sizes { flex: none; margin: 0 4px; }
  .sizes button { padding: 8px 10px; font-size: 12px; }
  .work { padding-bottom: calc(var(--tools-h) + env(safe-area-inset-bottom)); }
  .side { position: fixed; left: 0; right: 0; bottom: calc(var(--tools-h) + env(safe-area-inset-bottom)); width: auto; max-height: 64vh; max-height: 64dvh; z-index: 25; border-right: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -14px 34px rgba(27, 33, 51, .18); transform: translateY(calc(100% + var(--tools-h) + 20px)); visibility: hidden; transition: transform .25s var(--ease), visibility .25s; }
  body.sheet-open .side { transform: none; visibility: visible; }
  .side-head { padding: 8px 10px; }
  .side-head::before { content: ""; position: absolute; top: 5px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: #d9dcea; }
  .close-sheet { display: inline-flex; }
  .handle { padding: 11px 8px; }
  .mini { width: 34px; height: 34px; }
  .ad-toast { bottom: calc(var(--tools-h) + 16px); }
  .tpl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .tpl small { display: none; }
  .add-grid { grid-template-columns: 1fr 1fr; }
  .dlg { padding: 14px 14px 16px; }
  .proj .row .btn { padding: 6px 10px; font-size: 13px; }
  input.ad-input, textarea.ad-input, select.ad-input { font-size: 16px; }
}

/* ---------- inside the shared editor frame (../shared/editor-shell.js) ---------- */
html.ad-shell-on .topbar, html.ad-shell-on .work { display: none !important; }
html.ad-shell-on .stage { overflow: auto; background: #eef0f4; }
html.ad-shell-on .ads-pbody .side { position: static; width: auto; max-height: none; transform: none; visibility: visible; border: 0; border-radius: 0; box-shadow: none; background: none; transition: none; min-height: 0; }
html.ad-shell-on .ads-pbody .side-head { padding: 0 0 10px; border: 0; position: static; }
html.ad-shell-on .ads-pbody .side-head::before { display: none; }
html.ad-shell-on .ads-pbody .side-body { overflow: visible; padding: 4px 0 16px; }
html.ad-shell-on .ads-pbody .close-sheet { display: none; }
.ws-bar { display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.ws-bar .tool { padding: 7px 8px; }
.ws-bar .tool > span { display: inline; }
.ws-bar .tool .lbl { display: none; }
.ws-bar .sizes { margin-left: 2px; }
.ws-sep { width: 1px; height: 24px; background: var(--line, #e3e5ee); margin: 0 6px; flex: none; }
.ws-name { font: 650 13px/1 system-ui, sans-serif; color: var(--muted, #5b6175); padding: 0 6px; min-width: 96px; }
.ws-bar.has-sel .ws-name { color: var(--fg, #1b2133); }
.ws-sel { font: 500 13px system-ui, sans-serif; border: 1px solid var(--line, #e3e5ee); border-radius: 8px; padding: 6px 6px; background: #fff; color: inherit; max-width: 150px; margin: 0 2px; }
.ws-sel:disabled, .ws-color:disabled { opacity: .45; }
.ws-color { width: 30px; height: 30px; padding: 0; border: 1px solid var(--line, #e3e5ee); border-radius: 8px; background: none; margin: 0 2px; cursor: pointer; }
.ws-menu { position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 190px; padding: 6px; background: #fff; border-radius: 12px; box-shadow: 0 10px 34px rgba(27, 33, 51, .22); }
.ws-menu button { text-align: left; border: 0; background: none; padding: 9px 12px; border-radius: 8px; font: 500 14px system-ui, sans-serif; cursor: pointer; color: #1b2133; }
.ws-menu button:hover, .ws-menu button:focus-visible { background: #f1f0ff; outline: none; }
.ws-menu button.on { color: #5b4cf0; font-weight: 700; }
.ws-hint { font-size: 12.5px; color: var(--muted, #5b6175); margin: 0 0 10px; }
.ws-h3 { font: 700 14px/1.2 system-ui, sans-serif; margin: 14px 0 8px; }
.ws-elgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ws-el { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px; border: 1px solid var(--line, #e3e5ee); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.ws-el b { font-size: 13px; }
.ws-el small { font-size: 11.5px; color: var(--muted, #5b6175); line-height: 1.3; }
.ws-el:hover, .ws-pair:hover { border-color: #5b4cf0; }
.ws-pair { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--line, #e3e5ee); border-radius: 10px; background: #fff; cursor: pointer; color: #1b2133; }
.ws-laysec { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.ws-chip { border: 1px solid var(--line, #e3e5ee); border-radius: 999px; background: #fff; padding: 6px 11px; font: 600 12.5px/1.2 system-ui, sans-serif; color: #1b2133; cursor: pointer; }
.ws-chip.on, .ws-chip:hover { border-color: #5b4cf0; color: #3f31c9; background: #f4f3ff; }
.ws-laygrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ws-laycard { display: flex; flex-direction: column; gap: 4px; }
.ws-laypic { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 1px solid var(--line, #e3e5ee); border-radius: 10px; background: #fff; overflow: hidden; cursor: pointer; font: 600 12px/1.2 system-ui, sans-serif; color: #1b2133; text-align: left; }
.ws-laypic svg { display: block; width: 100%; height: auto; }
.ws-laypic span { padding: 0 8px 7px; }
.ws-laypic:hover { border-color: #5b4cf0; }
.ws-layhere { border: 0; background: none; color: #4b3fd8; font: 600 11.5px/1.2 system-ui, sans-serif; text-align: left; padding: 2px 2px 4px; cursor: pointer; }
.ws-layhere:hover { text-decoration: underline; }
.ws-palgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0 0 6px; }
.ws-pal { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; border: 1px solid var(--line, #e3e5ee); border-radius: 10px; background: #fff; cursor: pointer; color: #1b2133; }
.ws-pal .dots { display: flex; }
.ws-pal .dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.ws-pal .dots i + i { margin-left: -6px; }
.ws-pal small { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-pal.on, .ws-pal:hover { border-color: #5b4cf0; }
.ws-pair b { font-size: 16px; }
.ws-pair small { font-size: 12.5px; color: var(--muted, #5b6175); }
@media (max-width: 759.98px) {
  html.ad-shell-on .ws-name { min-width: 0; }
  .ws-bar .tool > span { display: none; }
  .ws-bar .tool { flex-direction: row; min-width: 0; padding: 7px; font-size: 13px; }
  html.ad-shell-on .ad-toast { bottom: 140px; }
}
@media (max-width: 1500px) { .ws-bar #barEdit > span, .ws-bar #barTheme > span, .ws-bar #addBlockBtn > span { display: none; } .ws-name { min-width: 0; } }

/* ---------- round 2: Pages panel, Mobile preview, full-screen Preview, Publish dialog ---------- */
.ws-pages { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.ws-page { border: 1px solid var(--line, #e3e5ee); border-radius: 12px; background: #fff; padding: 8px; display: grid; gap: 8px; }
.ws-page.on { border-color: #5b4cf0; box-shadow: 0 0 0 3px rgba(91, 76, 240, .14); }
.ws-prow { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ws-pthumb { width: 72px; aspect-ratio: 16 / 10; padding: 0; border: 1px solid var(--line, #e3e5ee); border-radius: 8px; overflow: hidden; background: #fff; cursor: pointer; }
.ws-pthumb svg { width: 100%; height: 100%; display: block; }
.ws-pname-box { display: grid; gap: 3px; min-width: 0; }
.ws-pname { padding: 6px 8px; font-weight: 650; }
.ws-pfile { font-size: 11.5px; color: var(--muted, #5b6175); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-page .acts { display: flex; gap: 2px; }
.ws-pdesc { width: 100%; font-size: 12.5px; resize: vertical; }
.ws-navtoggle { margin-top: 12px; }
.ws-mob { --k: .77; width: 100%; aspect-ratio: 390 / 760; overflow: hidden; border-radius: 22px; border: 8px solid #1b2133; background: #fff; box-shadow: 0 10px 30px rgba(27, 33, 51, .18); }
.ws-mob iframe { width: 390px; height: 760px; border: 0; display: block; transform-origin: 0 0; transform: scale(var(--k)); }
dialog.ws-preview { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #eef0f4; }
dialog.ws-preview[open] { display: flex; flex-direction: column; }
.ws-pv-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: linear-gradient(90deg, #14b8a6 0%, #2f80ff 40%, #5b4cf0 75%, #8b5cf6 100%); color: #fff; }
.ws-pv-title { font-size: 15px; margin-right: auto; }
.ws-pv-bar .ad-tabs { background: rgba(255, 255, 255, .2); }
.ws-pv-bar .ad-tabs button { color: #fff; }
.ws-pv-bar .ad-tabs button[aria-pressed="true"] { background: #fff; color: #1b2133; }
.ws-pv-stage { flex: 1; min-height: 0; display: flex; justify-content: center; padding: 16px; overflow: auto; }
.ws-pv-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 10px; box-shadow: 0 10px 40px rgba(27, 33, 51, .18); transition: width .2s; }
.ws-pv-stage[data-size="tablet"] iframe { width: 768px; max-width: 100%; }
.ws-pv-stage[data-size="phone"] iframe { width: 390px; max-width: 100%; }
.ws-pub { width: min(980px, calc(100vw - 32px)); }
.ws-pub h3 { font-size: 15px; margin: 14px 0 8px; }
.ws-pub-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 26px; }
.ws-pub .img-fld img[hidden], .ws-pub .noimg[hidden] { display: none; }
.ws-pub #pubFavImg { width: 40px; height: 40px; object-fit: contain; }
.ws-pub-actions { margin-top: 14px; }
.ws-pub-btn { color: #5b4cf0; }
@media (max-width: 760px) { .ws-pub-grid { grid-template-columns: 1fr; } .ws-pv-title { flex-basis: 100%; } }
/* Round 3: page settings, link preview card, QR code, final checks, cookie options */
.ws-pset { margin-top: 6px; font-size: 12.5px; }
.ws-pset > summary { cursor: pointer; color: #5b4cf0; font-weight: 600; padding: 4px 0; }
.ws-pset .fld { margin: 6px 0; }
.ws-dcount { display: block; margin: 2px 0 0; }
.ws-og { display: flex; gap: 10px; align-items: stretch; border: 1px solid var(--line, #e2e4ee); border-radius: 12px; overflow: hidden; background: #fff; margin-top: 6px; }
.ws-og-img { flex: 0 0 120px; min-height: 72px; background: #eef0f6 center / cover no-repeat; }
.ws-og-img[hidden] { display: none; }
.ws-og-txt { display: grid; gap: 2px; padding: 8px 10px; min-width: 0; font-size: 12.5px; color: #1b2133; }
.ws-og-txt small { color: #6b7185; text-transform: lowercase; }
.ws-og-txt b, .ws-og-txt span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ws-qr { display: flex; gap: 12px; align-items: center; }
.ws-qr-img { flex: 0 0 96px; width: 96px; height: 96px; border: 1px dashed #c9cbe0; border-radius: 8px; display: grid; place-items: center; background: #fff; }
.ws-qr-img svg { width: 100%; height: 100%; display: block; }
.ws-qr-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ws-qr-acts small { flex-basis: 100%; }
.ws-cookie-opts { gap: 12px; }
.ws-cookie-opts .fld { flex: 1; }
.ws-pub-pages, .ws-pub-check { margin-top: 10px; border-top: 1px solid var(--line, #e2e4ee); padding-top: 4px; }
.ws-pub-plist { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; font-size: 13px; }
.ws-pub-plist small { display: block; color: #6b7185; overflow-wrap: anywhere; }
.ws-checks { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.ws-ck { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; font-size: 13px; background: #f4f5fa; }
.ws-ck b { flex: 0 0 52px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.ws-ck span { flex: 1; }
.ws-ck.error { background: #fdecec; } .ws-ck.error b { color: #b42318; }
.ws-ck.warn { background: #fff5e0; } .ws-ck.warn b { color: #9a5b00; }
.ws-ck.info b { color: #3b4a8c; }
.ws-ck.ok { background: #e8f7ee; } .ws-ck.ok b { color: #157a3d; }
#barAnimate.on { color: #5b4cf0; }

/* Drags from the left-rail panels: the preview frame lets the drop reach the editor (the drop point is mapped into it) */
.ads-dragging #preview { pointer-events: none; }
