  * { box-sizing: border-box; }
  svg { display: block; }

  header.masthead { position: relative; background: var(--card); border-bottom: 1px solid var(--line); }
  header.masthead::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
  }
  .masthead-inner {
    position: relative; z-index: 2; max-width: 900px; margin: 0 auto;
    padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 14px;
  }
  /* Sizing/layout of the lockup lives in base.css; this is the link behaviour only.
     Bez przygaszania pod kursorem — patrz ten sam blok w review.css. */
  .brand { text-decoration: none; cursor: pointer; }

  .btn svg { width: 16px; height: 16px; }

  .wrap { max-width: 900px; margin: 0 auto; padding: 26px 20px 120px; }
  .page-head { margin: 4px 2px 20px; }
  .page-head h1 { margin: 0 0 6px; font-size: clamp(24px, 4vw, 30px); font-weight: 800; letter-spacing: -.025em; }
  .page-head p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }

  .client-card {
    /* Column gap + divider padding are tight (16/16, not 26/26) so the platforms pills get
       enough of the 900px wrap to sit on ONE line next to the other three facts. */
    display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: stretch;
    margin: 0 0 24px; padding: 14px 18px;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm);
  }
  .cc-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 0 0 auto; }
  .cc-item + .cc-item { padding-left: 16px; border-left: 1px solid var(--line-soft); }
  /* Platforms is the one variable-width fact here (5 pills ~390px), so at its natural size it
     drops to a second line and lands under DOMAIN. flex-basis:0 keeps it in the SAME row as the
     other three — it takes whatever is left and the pills wrap inside their own column. */
  .cc-item--platforms { flex: 1 1 0; min-width: 150px; }
  .cc-label { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); }
  .cc-value { font-size: 15px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
  .cc-swatch { width: 15px; height: 15px; border-radius: 5px; flex: 0 0 15px; box-shadow: inset 0 0 0 1px rgba(16,24,40,.12); }
  .cc-platforms { display: inline-flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .cc-plat {
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
    font-size: 11px; font-weight: 800; letter-spacing: .01em; padding: 3px 9px 3px 7px; border-radius: 999px;
  }
  .cc-plat-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; }
  .cc-plat.is-on { color: #fff; text-shadow: 0 1px 1px rgba(0,0,0,.2); }
  .cc-plat.is-on .cc-plat-dot { background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.16); }
  .cc-plat.is-off { background: color-mix(in srgb, var(--ink) 6%, var(--card)); color: var(--muted-2); }
  .cc-plat.is-off .cc-plat-dot { background: var(--muted-2); }
  /* Too narrow to give the pills a usable column: put them on a row of their OWN, full width
     with a top rule — a deliberate band rather than a stray block hanging under DOMAIN. */
  @media (max-width: 860px) {
    .cc-item--platforms {
      flex-basis: 100%; padding-left: 0; border-left: 0;
      padding-top: 10px; border-top: 1px solid var(--line-soft);
    }
  }
  @media (max-width: 560px) { .cc-item + .cc-item { padding-left: 0; border-left: 0; } }

  .section { margin-bottom: 26px; scroll-margin-top: 96px; }
  .section-title { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); margin: 0 4px 12px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
  .section-title::before { content: ""; flex: 0 0 20px; width: 20px; height: 3px; border-radius: 3px; background: var(--brand-grad-90); }
  /* Level-2 sections (per-platform cards, cover style) stay quieter than the top-level ones. */
  .section[data-toc-level="2"] .section-title { font-size: 11.5px; letter-spacing: .08em; color: var(--muted); }
  .section[data-toc-level="2"] .section-title::before { flex-basis: 16px; width: 16px; }
  .section-intro { font-size: 13px; color: var(--muted); line-height: 1.5; margin: -4px 4px 12px; }
  .panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }

  /* Left-gutter table of contents. It is a zero-height STICKY block (not `fixed`): it starts
     in the flow beside the page head, scrolls away with the copy, and only pins once it would
     slide under the demo/test bar — a fixed box sat over the masthead from the first pixel and
     never moved, which read as chrome rather than as part of the page. `height:0` keeps it out
     of the layout (its card overflows downward), so `.wrap` still starts right under the header,
     and the negative `margin-bottom` cancels the flow gap its own top margin would leave. */
  .settings-toc {
    position: sticky; top: calc(var(--topbar-h, 0px) + 16px); z-index: 5;
    width: 168px; height: 0; margin: 26px 0 -26px calc(50% - 634px);
    display: none;
  }
  /* Scrolls inside itself when the list is taller than the screen. The CSS cap is the PINNED
     case; 07-toc.js `fit()` overrides it with the space actually left below the card's current
     top (before it pins, the card starts beside the page head, lower down), so the last entry is
     always reachable. `overscroll-behavior` keeps the wheel from scrolling the page at its ends. */
  .settings-toc-inner {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: 8px;
    max-height: calc(100vh - var(--topbar-h, 0px) - 48px); overflow-y: auto;
    overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line) transparent;
  }
  .settings-toc-title { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); padding: 5px 9px 8px; }
  .settings-toc a {
    display: block; padding: 7px 10px; margin: 1px 0; border-radius: 9px;
    border-left: 2px solid transparent; font-size: 13px; font-weight: 700; line-height: 1.3;
    color: var(--muted); text-decoration: none; cursor: pointer;
    transition: color .15s ease, background .15s ease, border-color .15s ease;
  }
  .settings-toc a:hover { color: var(--ink-2); background: var(--line-soft); }
  .settings-toc a.is-active { color: var(--brand-strong); background: var(--brand-ghost); border-left-color: var(--brand); }
  .settings-toc a[data-level="2"] { margin-left: 12px; padding-left: 12px; font-size: 12.5px; font-weight: 600; }
  @media (min-width: 1300px) { .settings-toc { display: block; } }
  /* Short screens (laptops at 125 % scaling, ~700–860 px tall): ~25 entries at full spacing need
     ~800 px — tighten the rows so the whole list usually fits without scrolling. */
  @media (min-width: 1300px) and (max-height: 860px) {
    .settings-toc a { padding: 4px 10px; font-size: 12.5px; }
    .settings-toc a[data-level="2"] { font-size: 12px; }
    .settings-toc-title { padding: 3px 9px 5px; }
  }

  .setting-row { display: flex; align-items: flex-start; gap: 16px; padding: 16px 18px; }
  .setting-row + .setting-row { border-top: 1px solid var(--line-soft); }
  .setting-row.is-off-note { background: var(--warn-bg); }
  /* Wiersz zależny od przełącznika wyżej (głos lektora ⇢ lektor wł./wył.). Samo `disabled`
     na kontrolce nie wystarcza: bez wygaszenia etykiety wiersz wygląda na czynny. */
  .setting-row.is-dimmed .sr-main { opacity: .45; }
  /* „Karta końcowa": wiersze pod włącznikiem siedzą w jednym opakowaniu, które przejmuje
     kreskę między wierszami; wyłączona karta wygasza je wszystkie naraz (`syncCard()`,
     kontrolki dostają też `disabled`). Tak samo `.card-sub` — wiersze zależne od
     „Dolnego paska" i „Adresu" (kolor/krycie paska, kolor przycisku). */
  /* ▶ próbki głosu obok listy głosów. */
  .voice-pick { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
  .voice-play {
    flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    font: inherit; font-size: 13px; line-height: 1; color: var(--ink); background: var(--card);
    border: 1.5px solid var(--line); transition: border-color .15s, background .15s, color .15s;
  }
  .voice-play:hover:not(:disabled) { border-color: var(--brand-line); }
  .voice-play.is-playing { color: var(--brand-strong); background: var(--brand-ghost); border-color: var(--brand-line); }
  .voice-play:disabled { opacity: .45; cursor: default; }
  .voice-play[hidden] { display: none; }
  .voice-play { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
  .voice-play svg { width: 16px; height: 16px; }
  .voice-play .vp-stop, .voice-play.is-playing .vp-play { display: none; }
  .voice-play.is-playing .vp-stop { display: block; }
  /* Notka „lektor i napisy wyłączone" siedzi między wierszami — ukryta dalej jest rodzeństwem,
     więc `.setting-row + .setting-row` nie dałoby kreski nad „Głosem lektora". */
  [data-script-off-note] + .setting-row { border-top: 1px solid var(--line-soft); }
  .card-rows { border-top: 1px solid var(--line-soft); }
  .card-rows.is-off .sr-main, .card-sub.is-off .sr-main { opacity: .45; }
  .card-rows.is-off .backdrop-grid, .card-rows.is-off .bar-line, .card-rows.is-off .range-field,
  .card-sub.is-off .bar-line, .card-sub.is-off .range-field { opacity: .5; }
  .card-rows .style-card:disabled { cursor: default; transform: none; }
  /* Opakowanie przerywa `.setting-row + .setting-row`, więc kreski nad nim i za nim stawia samo. */
  .card-sub, .card-sub + .setting-row { border-top: 1px solid var(--line-soft); }
  /* Suwak (krycie paska) + wartość w % o stałej szerokości, żeby suwak nie skakał. */
  .range-field { display: inline-flex; align-items: center; gap: 12px; }
  .range-field input[type="range"] { width: 180px; max-width: 100%; accent-color: var(--brand); cursor: pointer; }
  .range-field input[type="range"]:disabled { cursor: default; }
  .range-out { min-width: 4.5ch; text-align: right; font-size: 13px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
  /* ↺ reset-to-default: `visibility` (not display) so the row doesn't jump when it hides. */
  .range-reset { flex: 0 0 auto; width: 24px; height: 24px; margin-left: -6px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: color .15s ease, border-color .15s ease, transform .15s ease; }
  .range-reset:hover:not(:disabled) { color: var(--brand); border-color: var(--brand-line); transform: rotate(-40deg); }
  .range-reset:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
  .range-reset:disabled { cursor: default; }
  .range-reset.is-default { visibility: hidden; }
  .sr-main { flex: 1; min-width: 0; }
  .sr-title { font-size: 15px; font-weight: 700; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
  .sr-desc { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
  .sr-control { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; padding-top: 2px; }

  .plat-head { display: flex; align-items: center; gap: 12px; padding: 15px 18px 6px; }
  .plat-head + .setting-row { border-top: 0; }
  .plat-avatar { width: 34px; height: 34px; border-radius: 8px; flex: 0 0 34px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 14px; text-transform: uppercase; }
  .plat-avatar.fb { background: #1877f2; }
  .plat-avatar.ig { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 42%, #d6249f 60%, #285AEB 92%); }
  .plat-avatar.tt { background: #010101; }
  .plat-avatar.yt { background: #ff0000; }
  .plat-name { font-size: 15px; font-weight: 800; color: var(--ink); }
  .conn-chip { margin-left: auto; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
  .conn-chip.on { color: var(--ok); background: var(--ok-bg); }
  .conn-chip.off { color: var(--muted-2); background: color-mix(in srgb, var(--ink) 6%, var(--card)); }
  .conn-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
  .plat-block + .plat-block { border-top: 1px solid var(--line-soft); }
  .disc-hint { padding: 2px 18px 15px; font-size: 12.5px; color: var(--muted); }
  /* FB/IG Reels (#sec-reels): one block per account inside one panel, divided like the platform
     blocks; inside, the global .plat-head / .setting-row / .off-note rules already apply. */
  .reels-row + .reels-row { border-top: 1px solid var(--line-soft); }
  /* plan_notice: the group's banner sits inside the header .section, whose own margin spaces it. */
  .plan-notice { margin-bottom: 0; }
  .conn-btn {
    margin-left: 10px; border: 1px solid transparent; border-radius: 999px; padding: 7px 14px;
    font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .01em; cursor: pointer;
    background: var(--brand); color: #fff; transition: filter .15s ease, transform .12s ease;
  }
  .conn-btn:hover:not(:disabled) { filter: brightness(1.06); transform: translateY(-1px); }
  .conn-btn:disabled { opacity: .55; cursor: default; }
  .conn-btn.ghost { background: var(--card); color: var(--muted); border-color: var(--line); }
  .conn-btn.ghost:hover:not(:disabled) { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--card)); filter: none; }

  .tone-legend { margin: 0 2px 12px; padding: 0; background: var(--brand-ghost); border: 1px solid var(--brand-line); border-radius: var(--radius-sm); }
  .tone-legend-summary { display: flex; align-items: center; gap: 8px; padding: 11px 16px; cursor: pointer; list-style: none; user-select: none; }
  .tone-legend-summary::-webkit-details-marker { display: none; }
  .tone-legend-summary:hover .tone-legend-title { color: var(--brand); }
  .tone-legend-chevron { width: 15px; height: 15px; margin-left: auto; color: var(--brand-strong); transition: transform .18s ease; }
  .tone-legend[open] .tone-legend-chevron { transform: rotate(180deg); }
  .tone-legend-title { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--brand-strong); transition: color .15s ease; }
  .tone-legend-body { display: flex; flex-direction: column; gap: 5px; padding: 0 16px 13px; }
  .tone-legend-intro { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; margin-bottom: 4px; }
  .tone-legend-item { font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
  .tone-legend-item strong { color: var(--ink); font-weight: 700; }
  .tone-legend-note { font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }

  .tones-block { padding: 12px 18px 16px; border-top: 1px solid var(--line-soft); background: var(--card-soft); }
  .tones-head { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
  /* `.help-btn` + `.help-popover` („?" i jego dymek) są w base.css — dzieli je strona przeglądu. */
  .story-slot { background: none; border: 0; border-radius: 0; padding: 0; margin: 0; }
  .story-slot .setting-row { border-top: 1px solid var(--line-soft); padding: 16px 18px; }
  .tone-slot { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px; }
  .tone-slot + .tone-slot { margin-top: 10px; }
  /* The video slot leads with its own on/off switch and the shared-video warning, then the
     queue. Both sit INSIDE .tone-slot (unlike the story toggle, which replaces the queue), so
     they need their own rhythm and a rule separating them from the steps below. */
  /* The merged tt+yt queue is its own section now, so it uses the same .tones-block frame
     as the fb/ig queues — only the slot's inner card is dropped, since the section's
     panel already provides one. */
  [data-video-queue] .tone-slot { border: 0; padding: 0; background: none; }
  .brand-color-field { display: inline-flex; align-items: center; gap: 10px; }
  .brand-color-hex { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
  /* Wideo → Wygląd: tryb pasów (para radio jako przełącznik segmentowy) i dwa wiersze kolorów.
     Hex w `<code>` ma stałą szerokość, więc obie pipety wiersza stoją w jednej kolumnie. */
  .seg { display: inline-flex; padding: 3px; gap: 3px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
  .seg-opt { position: relative; cursor: pointer; }
  .seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
  .seg-opt span { display: block; padding: 7px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: background .15s, color .15s; }
  .seg-opt input:checked + span { background: var(--brand-ghost); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
  .seg-opt input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
  .bar-line { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
  .bar-line + .bar-line { margin-top: 10px; }
  /* Drugi kolor gradientu przy krawędzi wyrównania, pod pierwszym; róża obok. */
  .bar-line.bar-to-line { flex-direction: row-reverse; justify-content: flex-start; }
  .bar-row [data-bar-to-field][hidden] { display: none; }
  /* Kierunek gradientu: róża wiatrów 3x3 (8 strzałek, pusty środek), jedna SVG obracana. */
  .grad-dir { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
  .grad-dir-opt { position: relative; cursor: pointer; }
  .grad-dir-opt input { position: absolute; opacity: 0; pointer-events: none; }
  .grad-arrow, .grad-dir-hub { display: flex; align-items: center; justify-content: center; width: 26px; height: 24px; border-radius: 6px; }
  .grad-arrow { color: var(--muted); transition: background .15s, color .15s; }
  .grad-dir-hub::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
  .grad-arrow svg { width: 15px; height: 15px; }
  .grad-arrow.dir-down_right svg { transform: rotate(45deg); }
  .grad-arrow.dir-down svg { transform: rotate(90deg); }
  .grad-arrow.dir-down_left svg { transform: rotate(135deg); }
  .grad-arrow.dir-left svg { transform: rotate(180deg); }
  .grad-arrow.dir-up_left svg { transform: rotate(-135deg); }
  .grad-arrow.dir-up svg { transform: rotate(-90deg); }
  .grad-arrow.dir-up_right svg { transform: rotate(-45deg); }
  .grad-dir-opt:hover .grad-arrow { color: var(--ink); }
  .grad-dir-opt input:checked + .grad-arrow { background: var(--brand-ghost); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
  .grad-dir-opt input:focus-visible + .grad-arrow { outline: 2px solid var(--brand); outline-offset: 1px; }
  .grad-dir-opt input:disabled + .grad-arrow { cursor: default; opacity: .6; }
  .bar-row .brand-color-hex { min-width: 7ch; }
  .bar-grad-toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; color: var(--ink); cursor: pointer; }
  .tone-slot.is-locked { background: color-mix(in srgb, var(--ink) 3%, var(--card)); }
  .tone-slot-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
  .fmt-badge { font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #fff; background: var(--brand-grad-90); padding: 3px 10px; border-radius: 999px; }
  .fmt-freq { font-size: 12px; color: var(--muted); font-weight: 600; }
  .tone-count { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--muted-2); }
  .tone-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; counter-reset: tone; }
  .tone-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 9px; }
  /* Aligned queue columns: counter | format | tone | image | controls. The per-row grid and the
     header (.tone-cols) share the same track sizing (fixed counter + controls, fr middle) so the
     two separate grids line up. `qcols` = has a format column, `qimg` = has the image column. */
  .tone-slot.qcols .tone-cols,
  .tone-slot.qcols .tone-item:not(.is-step-locked) { display: grid; align-items: center; gap: 10px; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1.35fr) 116px; }
  .tone-slot.qcols.qimg .tone-cols,
  .tone-slot.qcols.qimg .tone-item:not(.is-step-locked) { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 116px; }
  /* A video queue drops the tone column (see `tone_applies`), so it is counter | style |
     layout | controls. Both labels are long ("Wideo (pokaz zdjęć)", "Kwadrat na plakacie"),
     and with the tone gone there is finally room for them to sit unclipped. */
  .tone-slot.qcols.qimg.qnotone .tone-cols,
  .tone-slot.qcols.qimg.qnotone .tone-item:not(.is-step-locked) { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 116px; }
  /* A step whose format drops the third column (video_raw has no chrome, so no layout) must
     still HOLD its grid cell — with display:none the row's controls slide left and stop lining
     up with the header and the rows above it. visibility keeps it out of the a11y tree too. */
  .tone-slot.qcols.qimg .tone-item [data-step-image][hidden] { display: block; visibility: hidden; }
  .tone-cols { padding: 2px 10px 6px; border: 1px solid transparent; }
  .tone-cols .tc-num { width: 20px; }
  .tone-cols .tc-col { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
  .tone-cols .tc-col > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tone-cols .help-btn { width: 16px; height: 16px; font-size: 10px; flex: 0 0 auto; box-shadow: 0 0 0 3px var(--brand-ghost); }
  .img-locked { display: inline-flex; align-items: center; justify-content: center; min-width: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); background: color-mix(in srgb, var(--ink) 4%, var(--card)); border: 1px dashed var(--line); border-radius: 8px; padding: 7px 9px; cursor: default; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tone-item::before { counter-increment: tone; content: counter(tone); flex: 0 0 20px; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: var(--brand-strong); background: var(--brand-ghost); border-radius: 50%; }
  .tone-item.is-next { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }
  .tone-item.is-step-locked { background: color-mix(in srgb, var(--ink) 3%, var(--card)); }
  .fmt-badge-sm { font-size: 10px; padding: 2px 8px; }
  .tone-fixed { flex: 1 1 0; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--ink-2); }
  .tone-fixed-note { font-weight: 600; font-size: 11.5px; color: var(--muted-2); font-style: italic; margin-left: 6px; }
  .tone-next { position: absolute; top: -9px; right: 12px; z-index: 2; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #fff; background: var(--brand-grad-90); padding: 2px 8px; border-radius: 999px; box-shadow: 0 2px 6px var(--brand-line); }
  .tone-chip.is-next { color: #fff; background: var(--brand-grad-90); border-color: transparent; }
  .step-select { flex: 1 1 0; min-width: 0; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; cursor: pointer; }
  .step-select.step-format { color: var(--brand-strong); font-weight: 800; }
  .tone-slot.qcols .tone-item .step-select { width: 100%; }
  .step-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }
  .lang-picker { appearance: none; -webkit-appearance: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 8px 30px 8px 11px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.4'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
  .lang-picker:hover { border-color: var(--brand-line); }
  .lang-picker:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }
  .text-input { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; min-width: 220px; }
  .text-input:hover { border-color: var(--brand-line); }
  .text-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }
  .num-input { width: 66px; min-width: 0; text-align: center; }
  .text-input--lg { min-width: 340px; padding: 11px 13px; }
  .contact-email-row { display: flex; gap: 8px; align-items: center; }
  .contact-email-msg { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); text-align: right; }
  .contact-email-msg.is-ok { color: var(--ok); }
  .contact-email-msg.is-err { color: var(--err); }
  .sched-days { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }
  .sched-day { position: relative; }
  .sched-day input { position: absolute; opacity: 0; pointer-events: none; }
  .sched-day span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; padding: 6px 8px; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; user-select: none; }
  .sched-day input:checked + span { color: #fff; background: var(--brand); border-color: var(--brand); }
  .sched-hours { display: inline-flex; align-items: center; gap: 8px; }
  .sched-out { width: 100%; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
  .sched-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; max-height: 220px; overflow: auto; }
  .sched-list li { font-variant-numeric: tabular-nums; padding: 3px 0; border-bottom: 1px solid var(--line-soft); }
  .inline-add { display: inline-flex; align-items: center; gap: 8px; }
  .sr-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }

  /* Image-style picker: preset cards showing what each look produces. The saved value is
     the English prompt in a hidden [data-gen] input, so the cards stay a pure UI layer. */
  .style-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 10px; width: 100%; }
  .style-card {
    appearance: none; cursor: pointer; font-family: inherit; text-align: left; padding: 0; overflow: hidden;
    display: flex; flex-direction: column; background: var(--card); border: 1.5px solid var(--line);
    border-radius: 12px; transition: border-color .15s, box-shadow .15s, transform .12s;
  }
  .style-card:hover { border-color: var(--brand-line); transform: translateY(-1px); }
  .style-card:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }
  .style-card[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }
  .style-thumb { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--line-soft); }
  /* No generated thumbnail on disk (scripts/gen_sample_assets.py --styles never run):
     the <img> onerror swaps in a swatch so the picker still reads at a glance. */
  .style-card.is-noimg .style-thumb { display: none; }
  .style-swatch { display: none; width: 100%; aspect-ratio: 16 / 10; }
  .style-card.is-noimg .style-swatch, .style-card--custom .style-swatch { display: block; }
  .style-swatch[data-swatch="realistic"] { background: linear-gradient(140deg, #6f7f96, #d7c9b4 55%, #8e7c66); }
  .style-swatch[data-swatch="studio"] { background: linear-gradient(180deg, #ffffff, #e6e9ee 60%, #cfd5dd); }
  .style-swatch[data-swatch="vintage"] { background: linear-gradient(140deg, #c9a227, #9d6b3f 55%, #5d4535); }
  .style-swatch[data-swatch="cartoon"] { background: linear-gradient(120deg, #ff5f6d 0 33%, #ffc371 33% 66%, #33c3f0 66%); }
  .style-swatch[data-swatch="minimal"] { background: linear-gradient(140deg, #f7f4f1, #e9ded6 60%, #dcd3ea); }
  .style-swatch[data-swatch="custom"] { background: repeating-linear-gradient(45deg, var(--line-soft) 0 9px, var(--card) 9px 18px); }
  /* Backdrop cards are text-free landscape strips (5:2, the frame's top band at true scale —
     see `_render_backdrop_swatch`); the pattern's name is the card's title/aria-label. Several
     fit on a row, so the whole picker is a couple of short lines. There is no .style-swatch
     fallback here: the swatch IS the generated image, so a failed load means the endpoint is
     down, and a fake gradient would misinform. */
  .backdrop-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
  .backdrop-thumb { aspect-ratio: 5 / 2; }
  .bd-card { position: relative; border-radius: 10px; }
  .style-card.is-noimg .backdrop-thumb { display: block; visibility: hidden; }
  /* „Jak w filmie" on the end-card grid: its strip IS one of the patterns, so it keeps a word. */
  .bd-chip {
    position: absolute; left: 5px; bottom: 5px; max-width: calc(100% - 10px); padding: 2px 6px;
    border-radius: 6px; font-size: 10.5px; font-weight: 800; line-height: 1.3; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; color: var(--ink); background: var(--card);
    box-shadow: var(--shadow-sm);
  }
  .style-meta { padding: 9px 11px 11px; display: flex; flex-direction: column; gap: 3px; }
  .style-name { font-size: 13px; font-weight: 800; color: var(--ink); }
  .style-card[aria-pressed="true"] .style-name { color: var(--brand-strong); }
  .style-desc { font-size: 11.5px; line-height: 1.35; color: var(--muted); }
  .style-custom { width: 100%; margin-top: 10px; }
  .style-custom[hidden] { display: none; }
  /* Shared by the "own image style" box and any stacked free-text row (.sr-textarea). */
  .style-custom textarea, .sr-textarea {
    width: 100%; min-height: 74px; resize: vertical; font-family: inherit; font-size: 13px; font-weight: 600;
    line-height: 1.45; color: var(--ink); background: var(--card); border: 1px solid var(--line);
    border-radius: 9px; padding: 10px 12px;
  }
  .style-custom textarea:hover, .sr-textarea:hover { border-color: var(--brand-line); }
  .style-custom textarea:focus, .sr-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }

  /* Kolejka tematow: dwa kompozytory (temat / ID produktu) nad JEDNA lista wpisow.
     Wiersze pozyczaja .tone-item z kolejki postow — razem z licznikiem (::before),
     ramka .is-next i przyciskami .tone-ctrls — zeby obie kolejki na stronie byly
     tym samym elementem UI, a nie dwoma podobnymi. */
  .q-block { display: flex; flex-direction: column; gap: 12px; width: 100%; }
  .q-composers { display: flex; flex-wrap: wrap; gap: 10px 22px; }
  .q-composer { display: flex; flex-direction: column; gap: 6px; }
  .q-composer-lab { font-size: 11.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); }
  .prod-composer, .q-composer { min-width: 0; }
  .prod-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .prod-input { width: 190px; min-width: 0; font-variant-numeric: tabular-nums; }
  /* Pole na temat to zdanie, nie ID — stad szerokosc i brak cyfrowek. */
  .topic-input { width: 340px; max-width: 100%; min-width: 0; }
  .prod-input[aria-invalid="true"], .topic-input[aria-invalid="true"] { border-color: var(--err); }
  .prod-input[aria-invalid="true"]:focus, .topic-input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--err-bg); }
  .prod-error { margin: 0; font-size: 12px; font-weight: 700; color: var(--err); }
  .prod-error[hidden] { display: none; }

  .q-list:empty { display: none; }
  .q-item.is-removing { opacity: .45; }
  /* Pigulka "Następny" siedzi w KAZDYM wierszu, bo strzalki tylko przestawiaja klase
     .is-next zamiast dokladac/usuwac wezel przy kazdym ruchu. Widoczna jest wylacznie
     na gornym wierszu - to on trafi do najblizszej generacji.
     (Kolejka postow renderuje ta pigulke warunkowo w Jinja i dlatego nie ma tej reguly.) */
  .q-item .tone-next { display: none; }
  .q-item.is-next .tone-next { display: inline; }
  /* Wiersz-zaslepka na czas odpytywania sklepu o produkt. Wyszarzony i BEZ strzalek:
     nie ma jeszcze czego przestawiac ani kasowac (brak data-queue-id). */
  .q-item.is-pending { border-style: dashed; background: color-mix(in srgb, var(--ink) 2%, var(--card)); }
  .q-item.is-pending .q-name { color: var(--muted); font-style: italic; font-weight: 600; animation: q-pulse 1.2s ease-in-out infinite; }
  .q-item.is-pending .tone-ctrls { visibility: hidden; }
  @keyframes q-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
  /* Tekst niesie komunikat sam z siebie — puls jest tylko ozdobą, więc znika przy
     prefers-reduced-motion (tak jak animowane tło z _ui_polish.html). */
  @media (prefers-reduced-motion: reduce) { .q-item.is-pending .q-name { animation: none; } }
  /* Rodzaj wpisu: neutralna plakietka, zeby nie konkurowala z "Następny" ani z #ID. */
  .q-kind {
    flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px;
  }
  /* Miniatura ze sklepu klienta — stale pole, zeby wiersze bez zdjecia nie rozjezdzaly listy. */
  .q-thumb { flex: 0 0 auto; width: 34px; height: 34px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); background: var(--card-2, var(--card)); }
  .q-thumb--empty { display: inline-block; background: repeating-linear-gradient(45deg, var(--line) 0 4px, transparent 4px 8px); }
  /* Nazwa produktu/temat sie przycina — pelna tresc zostaje w title="". */
  .q-name { flex: 1 1 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 700; color: var(--ink); }
  .q-name--topic { font-weight: 600; color: var(--ink-2); }
  .q-ref { flex: 0 0 auto; font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand-strong); background: var(--brand-ghost); border-radius: 999px; padding: 2px 8px; }
  .q-empty { margin: 0; font-size: 12.5px; color: var(--muted); }
  .q-empty[hidden] { display: none; }
  .q-cplan-link { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: none; }
  .q-cplan-link:hover { color: var(--brand-strong); text-decoration: underline; }
  .sr-note { font-size: 12px; color: var(--warn-ink); background: var(--warn-bg); border-radius: 8px; padding: 6px 10px; margin-top: 6px; }

  /* Sub-groups inside a section: each group is its own card with a heading, so a long
     panel (Artykuły) reads as several scannable blocks instead of one flat wall. */
  .gen-group + .gen-group { margin-top: 14px; }
  .gen-group[id] { scroll-margin-top: 96px; }
  .group-head { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line-soft); background: color-mix(in srgb, var(--ink) 3%, var(--card)); }
  .group-title { font-size: 13.5px; font-weight: 800; color: var(--ink); }
  .group-sub { font-size: 12px; color: var(--muted-2); margin-left: auto; }

  /* Stacked row: label above a full-width control cell, for controls too wide to sit
     in the right-hand gutter (the schedule block). */
  .setting-row.is-stacked { flex-direction: column; gap: 12px; }
  .setting-row.is-stacked .sr-control { align-items: stretch; width: 100%; padding-top: 0; }
  .sched-block { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--ink) 2%, var(--card)); }
  .sched-block-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; }
  .sched-label { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); }
  .tone-ctrls { display: inline-flex; gap: 4px; flex: 0 0 auto; }
  .tone-ctrls button { appearance: none; cursor: pointer; font-family: inherit; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 7px; transition: color .15s, border-color .15s, background .15s; }
  .tone-ctrls button:hover { color: var(--brand-strong); border-color: var(--brand-line); background: var(--brand-ghost); }
  .tone-ctrls button[data-remove]:hover,
  .tone-ctrls button[data-q-remove]:hover { color: var(--err); border-color: color-mix(in srgb, var(--err) 40%, var(--card)); background: var(--err-bg); }
  .tone-item.is-next [data-set-next] { display: none; }
  .tone-add-btn { margin-top: 8px; appearance: none; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700; color: var(--brand-strong); background: var(--card); border: 1px dashed var(--brand-line); border-radius: 9px; padding: 8px 12px; transition: background .15s, border-color .15s; }
  .tone-add-btn:hover:not(:disabled) { background: var(--brand-ghost); border-color: var(--brand); }
  .tone-add-btn:disabled { opacity: .45; cursor: default; }
  .queue-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
  .queue-foot[hidden] { display: none; }
  .cover-jump { appearance: none; cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; font-size: 12.5px; font-weight: 700; color: var(--brand-strong); background: var(--brand-ghost); border: 1px solid var(--brand-line); border-radius: 999px; transition: background .15s, border-color .15s, transform .15s; }
  .cover-jump:hover { background: color-mix(in srgb, var(--brand) 14%, var(--card)); transform: translateY(-1px); }
  .cover-jump svg { width: 14px; height: 14px; flex: 0 0 14px; }
  .tone-locked { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
  .tone-chip { font-size: 12.5px; font-weight: 700; color: var(--ink-2); background: var(--line-soft); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }
  .tone-locked-note { flex-basis: 100%; font-size: 12px; color: var(--muted); font-style: italic; margin-top: 2px; }

  .off-note { display: none; align-items: flex-start; gap: 8px; padding: 11px 18px; background: var(--warn-bg); border-top: 1px solid var(--warn-line); font-size: 12.5px; line-height: 1.45; color: var(--warn); }
  .off-note.show { display: flex; }
  .off-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }

  .switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
  .switch input { position: absolute; opacity: 0; width: 0; height: 0; }
  .switch .track { position: absolute; inset: 0; background: color-mix(in srgb, var(--ink) 22%, var(--card)); border-radius: 999px; transition: background .18s; cursor: pointer; }
  .switch .track::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .18s; box-shadow: 0 1px 3px rgba(16,24,40,.28); }
  .switch input:checked + .track { background: var(--brand); }
  .switch input:checked + .track::before { transform: translateX(20px); }
  .switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-ghost); }
  .switch input:disabled + .track { cursor: default; opacity: .5; }
  .switch-label { font-size: 11px; font-weight: 700; color: var(--muted); }

  /* Statyczny fallback wysokości paska zapisu (stopka i pasek cookie odsuwają się o tyle,
     żeby go nie zasłonić — patrz base.css, sekcja „Site footer + cookie notice").
     Wartość obowiązuje tylko do DOMContentLoaded i przy wyłączonym JS: potem ui-polish.js
     nadpisuje ją ZMIERZONĄ wysokością [data-bottom-bar], bo pasek zawija się na wąskich
     ekranach (~91px na telefonie) i każda wpisana liczba i tak by kłamała. */
  :root { --bottom-bar-h: 64px; }
  .save-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid var(--line);
  }
  .save-bar-inner { max-width: 900px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 14px; }
  .save-note { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }

  .toast {
    position: fixed; left: 50%; bottom: 78px; transform: translateX(-50%) translateY(8px);
    background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 12px;
    font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none;
    transition: opacity .25s ease, transform .25s ease; z-index: 50; box-shadow: 0 12px 34px rgba(0,0,0,.3);
  }
  .toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

  .preview-panel { padding: 14px 18px 18px; border-top: 1px solid var(--line-soft); }
  .preview-toggle { width: 100%; display: flex; align-items: center; gap: 9px; padding: 11px 14px; font-family: inherit; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-strong); background: var(--brand-ghost); border: 1px solid var(--brand-line); border-radius: var(--radius-sm); cursor: pointer; transition: background .15s ease, box-shadow .15s ease; }
  .preview-toggle:hover { background: color-mix(in srgb, var(--brand) 13%, var(--card)); box-shadow: 0 2px 10px var(--brand-ghost); }
  .preview-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
  .pt-eye { flex: 0 0 auto; display: inline-flex; }
  .pt-eye svg { width: 16px; height: 16px; }
  .pt-label { flex: 1; text-align: left; }
  .pt-chevron { flex: 0 0 auto; width: 15px; height: 15px; transition: transform .18s ease; }
  .preview-panel.is-open .pt-chevron { transform: rotate(180deg); }
  .preview-body { margin-top: 13px; }
  .preview-tabs { display: inline-flex; gap: 5px; background: var(--brand-ghost); padding: 3px; border-radius: 9px; margin-bottom: 12px; }
  .preview-tab {
    appearance: none; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700;
    color: var(--muted); background: transparent; border: 0; border-radius: 7px; padding: 5px 13px;
    transition: background .15s, color .15s;
  }
  .preview-tab.is-active { background: var(--card); color: var(--brand-strong); box-shadow: var(--shadow-sm); }
  /* `contain: inline-size` — jak .video-preview-frame: iframe ma 1080px szerokości (zmniejsza go
     dopiero transform), a <body> to kolumna flex, więc bez tego rozwinięty podgląd poszerzał
     `.wrap` do max-width karty (538px na ekranie 375px). */
  .preview-panel .social-card { max-width: 480px; margin: 0 auto; contain: inline-size; }
  .sample-note { font-size: 11.5px; color: var(--muted); font-style: italic; margin: 14px 2px 0; line-height: 1.5; }

  .social-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
  .social-card .sc-head { display: flex; align-items: center; gap: 11px; padding: 13px 14px; }
  .social-card .sc-avatar {
    width: 42px; height: 42px; border-radius: 50%; flex: 0 0 42px; position: relative; color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
    text-transform: uppercase; background: var(--brand);
  }
  .social-card .sc-avatar.ig { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 42%, #d6249f 60%, #285AEB 92%); }
  .social-card .sc-avatar.fb { background: #1877f2; }
  .social-card .sc-avatar.tt { background: #000; }
  .social-card .sc-avatar.yt { background: #ff0000; }
  .social-card .sc-who { min-width: 0; line-height: 1.3; flex: 1; }
  .social-card .sc-name { font-weight: 700; font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 4px; min-width: 0; }
  .social-card .sc-name .sc-name-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .social-card .sc-name .verified { color: var(--brand); flex: 0 0 auto; }
  .social-card .sc-sub { font-size: 12px; color: var(--muted); margin-top: 1px; display: flex; align-items: center; gap: 5px; }
  .social-card .sc-sub .globe { width: 12px; height: 12px; color: var(--muted-2); flex: 0 0 12px; }
  .social-card .sc-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 800;
    letter-spacing: .04em; text-transform: uppercase; padding: 5px 11px 5px 9px; border-radius: 999px;
    white-space: nowrap; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.22); flex: 0 0 auto;
  }
  .social-card .sc-badge .pill-dot { width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
  .badge--blog      { background: var(--brand-grad); }
  .badge--facebook  { background: radial-gradient(circle at 28% 112%, #5ea2f6 0%, #1877f2 72%); }
  .badge--instagram { background: radial-gradient(circle at 28% 112%, #fdf497 0%, #fd5949 42%, #d6249f 62%, #285aeb 92%); }
  .badge--tiktok    { background: #000; }
  .badge--youtube   { background: #ff0000; }
  .social-card .sc-caption { padding: 2px 15px 13px; white-space: pre-wrap; word-wrap: break-word; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
  .social-card .sc-caption .cap-name { font-weight: 700; color: var(--ink); margin-right: 6px; }
  .social-card .sc-caption.fb-text { font-size: 15px; color: var(--ink); padding: 4px 15px 12px; }
  .social-card .sc-caption.is-empty .cap-text::before { content: var(--i18n-caption-empty); color: var(--muted-2); font-style: italic; }
  /* Article link = the post's FIRST COMMENT (never the caption) — mirrors the publisher. */
  .sc-comment { display: flex; gap: 9px; align-items: flex-start; padding: 11px 15px 14px; border-top: 1px solid var(--line-soft); }
  .sc-comment-av {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
    font-size: 12px; font-weight: 800; color: #fff; background: var(--brand);
  }
  .sc-comment-av.ig { background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 70%, #285aeb 100%); }
  .sc-comment-av.fb { background: #1877f2; }
  .sc-comment-av.yt { background: #ff0000; }
  .sc-comment-body { min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
  .sc-comment-body .scc-name { font-weight: 700; color: var(--ink); margin-right: 6px; }
  .sc-comment-body .scc-link { color: var(--brand); word-break: break-all; margin-left: 5px; }
  /* The .video-grid-preview panel reuses the media box WITHOUT the surrounding card, so both rules
     have to reach it too — `transform-origin` especially: scale() assumes top-left, and about
     the default centre the scaled iframe lands outside the box and gets clipped to nothing. */
  .social-card .sc-media,
  .video-preview-frame .sc-media { position: relative; background: #0c0d10; overflow: hidden; width: 100%; }
  .social-card .sample-media-iframe,
  .video-preview-frame .sample-media-iframe { border: 0; transform-origin: top left; display: block; }
  .sc-meta-fb { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line-soft); }
  .sc-meta-fb .reacts { display: inline-flex; align-items: center; gap: 6px; }
  .sc-meta-fb .react-ico svg { width: 15px; height: 15px; color: #1877f2; }
  .sc-actions-fb { display: flex; border-top: 1px solid var(--line-soft); }
  .sc-actions-fb button {
    flex: 1; appearance: none; cursor: default; font-family: inherit; background: none; border: 0;
    padding: 9px 6px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 13px; font-weight: 700; color: var(--muted);
  }
  .sc-actions-fb button svg { width: 19px; height: 19px; }
  .sc-actions-ig { display: flex; align-items: center; gap: 14px; padding: 11px 14px 4px; color: var(--ink); }
  .sc-actions-ig svg { width: 25px; height: 25px; }
  .sc-actions-ig .spacer { flex: 1; }
  .social-card .sc-media.is-video,
  .video-preview-frame .sc-media.is-video { background: #000; }
  .sc-car-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s ease; }
  .sc-car-nav:hover { background: rgba(0,0,0,.65); }
  .sc-car-nav.prev { left: 8px; }
  .sc-car-nav.next { right: 8px; }
  .sc-car-nav[hidden] { display: none; }
  .sc-car-dots { position: absolute; bottom: 9px; left: 0; right: 0; z-index: 4; display: flex; gap: 5px; justify-content: center; pointer-events: none; }
  .sc-car-dots[hidden] { display: none; }
  .sc-car-dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
  .sc-car-dot.is-active { background: #fff; }
  .sc-video-rail {
    position: absolute; right: 9px; bottom: 14px; z-index: 2; pointer-events: none;
    display: flex; flex-direction: column; align-items: center; gap: 16px; color: #fff;
  }
  .sc-video-rail .vr-item { display: flex; flex-direction: column; align-items: center; gap: 3px; }
  .sc-video-rail svg { width: 27px; height: 27px; filter: drop-shadow(0 1px 3px rgba(0,0,0,.55)); }
  .sc-video-rail .vr-count { font-size: 11px; font-weight: 700; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
  .sc-video-rail.tt .vr-heart svg { color: #fe2c55; }
  .sc-video-cap {
    position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; pointer-events: none; color: #fff;
    padding: 40px 62px 14px 14px;
    background: linear-gradient(to top, rgba(0,0,0,.74) 0%, rgba(0,0,0,.28) 58%, transparent 100%);
  }
  .sc-video-cap .vc-handle { display: block; font-weight: 800; font-size: 13.5px; text-shadow: 0 1px 3px rgba(0,0,0,.6); margin-bottom: 4px; }
  .sc-video-cap .vc-text {
    font-size: 12.5px; line-height: 1.4; text-shadow: 0 1px 3px rgba(0,0,0,.55);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .preview-panel [hidden] { display: none !important; }
  /* The Wideo preview (.video-grid-preview): always open, no toggle bar, and it is the only
     thing in its card rather than a footer under a queue — so no top border, bottom spacing. */
  .preview-panel.is-static { border-top: 0; padding: 16px 18px 4px; }
  .preview-panel.is-static .preview-body { margin-top: 0; }
  /* `contain: inline-size`: the 1080px-wide iframe (scaled down by transform) and the JS-set
     pixel width of .sc-media must not count toward the page's min-content width — <body> is a
     flex column, so they would widen `.wrap` past a phone screen. */
  .video-preview-frame { width: 100%; max-width: 320px; margin: 0 auto; contain: inline-size; }
  /* „Plansza" przy wyłączonej planszy: szare pole w proporcjach kadru zamiast obrazka, więc
     panel nie skacze wysokością przy przełączaniu. */
  .card-off-note {
    aspect-ratio: 9 / 16; margin: 0 auto; display: flex; align-items: center;
    justify-content: center; text-align: center; padding: 18px; box-sizing: border-box;
    font-size: 13px; line-height: 1.45; color: var(--muted); background: var(--brand-ghost);
    border: 1.5px dashed var(--line); border-radius: 12px;
  }
  .video-grid-preview .preview-tabs { display: flex; width: max-content; margin: 0 auto 12px; }
  .preview-panel.is-static .sc-media { border-radius: 12px; border: 1px solid var(--line); }
  .video-preview-head {
    font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
    color: var(--muted-2); margin: 0 0 10px;
  }
  .preview-panel.is-static .sample-note { text-align: center; margin: 12px auto 0; max-width: 380px; }
  /* Wideo: options left, preview right. The aside comes FIRST in the DOM, so below 980px
     (one column) the preview sits above „Wygląd"; on desktop `order` moves it right and it
     sticks while the options scroll. 27px = the height of a level-2 .section-title, so the
     preview card lines up with the first options card, not with its title. */
  .video-grid { display: block; }
  .video-grid-preview { margin-bottom: 26px; }
  @media (min-width: 980px) {
    .video-grid:not(.no-preview) { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
    .video-grid-main { order: 1; min-width: 0; }
    .video-grid-preview { order: 2; position: sticky; top: calc(var(--topbar-h, 0px) + 16px); margin: 27px 0 26px; }
  }
  .masthead-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }

  .cover-panel { padding: 18px; display: grid; gap: 18px; }
  .cs-intro { font-size: 13px; color: var(--muted); margin: -2px 2px 0; line-height: 1.45; }
  .cs-label { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 2px 8px; }
  .font-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .font-chip {
    font-size: 21px; line-height: 1.1; padding: 14px 12px; cursor: pointer; text-align: center;
    color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px;
    transition: border-color .15s, box-shadow .15s, transform .12s; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .font-chip:hover { border-color: var(--brand-line); transform: translateY(-1px); }
  .font-chip[aria-pressed="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ghost); }
  .cs-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 22px; }
  .cs-field { display: flex; flex-direction: column; }
  .cs-color { width: 56px; height: 40px; padding: 0; border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
  .cs-color:disabled { opacity: .4; cursor: not-allowed; }
  .cs-toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; padding-bottom: 8px; }
  .cover-live {
    display: flex; align-items: center; justify-content: center; min-height: 130px; padding: 22px 18px;
    border-radius: 12px; text-align: center;
    background:
      linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 100%),
      linear-gradient(120deg, #5b6b86, #2d3850);
  }
  .cs-render-row { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
  .cover-render-out img { max-width: 320px; width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-sm); display: block; }
  /* `.onb-setup*` (the free-draft offer box) lived here until 2026-08-21, when the freebie was
     withdrawn. Note the `.onb-` prefix is shared with the onboarding overlay's own stylesheets,
     which load AFTER this file — see static/css/onboarding/shell.css. */
  /* Persistent test-version banner (active=0): sticky top bar mirroring the review page.
     Layout only — both rows that use it (demo + test version) carry .is-demo for their skin. */
  .topbar { position: sticky; top: 0; z-index: 40; }
  .test-banner {
    display: flex; align-items: center; gap: 10px; padding: 12px clamp(16px, 4vw, 40px);
    border-bottom: 1px solid transparent;
    font-size: 13.5px; font-weight: 600;
  }
  .test-banner .onb-flask { flex: none; font-size: 15px; line-height: 1; }
  /* Public demo (/preview/settings) and the test-version row: the twin of .onb-banner.is-demo on
     the review page — brand gradient + inverted CTA, so the marketing row is unmistakably not a
     client notice. Keep the two in sync. */
  .test-banner.is-demo {
    background: linear-gradient(90deg, var(--brand), var(--accent));
    border-bottom-color: transparent; color: #fff;
  }
  .test-banner.is-demo .test-msg { display: flex; flex-direction: column; gap: 2px; }
  .test-banner.is-demo .onb-sub { font-size: 12.5px; font-weight: 600; opacity: .86; }
  /* Struck-through old price in the test row's offer — mirror of the rule in review.css. */
  .test-banner .onb-sub s { opacity: .8; text-decoration-thickness: 1.5px; }
  .test-banner.is-demo .demo-cta { background: #fff; color: var(--brand); font-weight: 800; }
  .test-banner.is-demo .demo-cta:hover { background: #fff; opacity: .9; }
  .test-msg { flex: 1 1 auto; }
  .test-cta { flex: none; margin-left: auto; padding: 7px 16px; font-size: 13px; white-space: nowrap; background: var(--brand); color: #fff; border-color: transparent; }

  /* Per-control caption inside a queue step. Invisible on desktop — there the .tone-cols
     header row names the columns — and revealed once the step stacks on a phone. */
  .q-lab { display: none; }

  /* ── Phones ──────────────────────────────────────────────────────────────────
     Three problems this block solves:
     (1) .setting-row is a two-column flex whose right cell (.sr-control) never shrinks, so
         on a phone the label column collapsed to a few dozen pixels and titles broke one
         word — sometimes one letter — per line. Every row stacks instead.
     (2) The publication queue is a 4/5-track grid; at 348px each <select> came out 26–31px
         wide, i.e. unusable. Each step becomes a labelled stack.
     (3) iOS Safari zooms in on focusing any field under 16px and never zooms back. */
  @media (max-width: 640px) {
    .wrap { padding: 20px 14px 130px; }
    .save-bar-inner { padding: 10px 14px; gap: 10px; }
    .test-banner { padding: 10px 14px; font-size: 12.5px; }
    /* Druga linijka pitchu demo znika na telefonie — jeden wiersz zamiast czterech.
       Ta sama reguła i ten sam powód co w review.css (baner jest sticky, a CTA obok
       jest `nowrap` i ściska tekst do wąskiej kolumny). Trzymaj oba w zgodzie. */
    .test-banner.is-demo .onb-sub { display: none; }

    .setting-row { flex-direction: column; align-items: stretch; gap: 12px; padding: 14px; }
    .sr-control { width: 100%; align-items: stretch; padding-top: 0; }
    /* A switch stretched across the row reads as a slider, so the on/off controls stay
       their own size and sit under the label on the left. */
    .sr-control:has(> .switch), .sr-control:has(> label > .switch) { align-items: flex-start; }
    .plat-head, .group-head, .tones-block, .preview-panel { padding-left: 14px; padding-right: 14px; }
    /* Nazwa + chip + „Odłącz konto" w jednym wierszu bez zawijania mają więcej min-content niż
       telefon (po angielsku ~363px na 375) i poszerzały `.wrap`. Przycisk, który się nie mieści,
       schodzi do drugiego wiersza — do prawej, bo nazwa zabiera wolne miejsce w pierwszym. */
    .plat-head { flex-wrap: wrap; justify-content: flex-end; row-gap: 10px; }
    .plat-head .plat-name { flex: 1 1 auto; }

    /* Widths that were sized for the desktop right-hand gutter. */
    .text-input, .text-input--lg, .prod-input, .topic-input { min-width: 0; width: 100%; }
    .voice-pick { display: flex; width: 100%; }
    .voice-pick .lang-picker { flex: 1 1 auto; min-width: 0; }
    .voice-play { width: 44px; height: 44px; font-size: 16px; }
    .grad-arrow, .grad-dir-hub { width: 38px; height: 34px; }
    .q-composers { flex-direction: column; gap: 12px; }
    .q-composer { width: 100%; }
    .num-input { width: 72px; flex: 0 0 72px; }
    .contact-email-row { flex-wrap: wrap; }
    .contact-email-row .text-input { flex: 1 1 180px; }
    .contact-email-msg { text-align: left; }
    .font-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    /* 15px keeps even "Cormorant Garamond" off the ellipsis in a two-up grid. */
    .font-chip { font-size: 15px; padding: 12px 8px; }

    /* Queue: one labelled control per row, the buttons on a row of their own. */
    .tone-slot.qcols .tone-cols { display: none; }
    .tone-slot.qcols .tone-item:not(.is-step-locked),
    .tone-slot.qcols.qimg .tone-item:not(.is-step-locked),
    .tone-slot.qcols.qimg.qnotone .tone-item:not(.is-step-locked) {
      grid-template-columns: 20px minmax(0, 1fr); gap: 6px 10px; padding: 10px 12px;
    }
    /* The step number is the ::before pseudo, which auto-places into the first cell; every
       real child is pinned to the value column so nothing lands beside it. */
    .tone-slot.qcols .tone-item > * { grid-column: 2; }
    .tone-slot.qcols .tone-item > .q-lab { display: block; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
    /* Extra air above every caption but the first — i.e. only where one control ends and the
       next begins. (`:first-of-type` can't do this: .tone-next is a <span> too.) */
    .tone-slot.qcols .tone-item > .step-select + .q-lab,
    .tone-slot.qcols .tone-item > .img-locked + .q-lab { margin-top: 6px; }
    .tone-slot.qcols .tone-item > .tone-ctrls { justify-content: flex-end; margin-top: 6px; }
    /* Stacked, there are no columns left to keep aligned, so a non-applying image control
       can go back to taking no space at all. */
    .tone-slot.qcols.qimg .tone-item [data-step-image][hidden],
    .tone-slot.qcols .tone-item > .q-lab[hidden] { display: none; }
    /* A locked step is flex, not grid: let it wrap and drop the "set by us" note onto its
       own line, or the tone label gets squeezed between the badge and the buttons. */
    .tone-item.is-step-locked { flex-wrap: wrap; }
    .tone-item.is-step-locked .tone-fixed { flex: 1 1 140px; }
    .tone-fixed-note { display: block; margin-left: 0; }
    .tone-ctrls button { width: 32px; height: 32px; }
    .tone-item::before { align-self: start; margin-top: 2px; }

    /* Paski wideo: kontrolki idą od lewej jak cała reszta ułożonego wiersza. Tekst radia
       16px, choć iOS przy radiu nie przybliża — ta sama reguła dla każdej nowej kontrolki. */
    .bar-line { justify-content: flex-start; }
    .bar-line.bar-to-line { flex-direction: row; }
    .seg-opt span { font-size: 16px; padding: 7px 12px; }

    .step-select, .text-input, .lang-picker, .style-custom textarea, .sr-textarea { font-size: 16px; }
  }

  /* „Logo na obrazach" (#sec-logo, 10-logo.js): z lewej plik + wielkość + miejsca, z prawej podgląd
     okładki z czterema klikanymi rogami. Podgląd to render z serwera (ten sam kod co publikacja). */
  .logo-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 22px; padding: 4px 18px 18px; border-top: 1px solid var(--line-soft); padding-top: 16px; }
  .logo-side { display: grid; gap: 18px; align-content: start; }
  .logo-file { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
  .logo-thumb {
    width: 148px; height: 84px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; padding: 10px;
    border: 1.5px dashed var(--line); border-radius: 12px; overflow: hidden;
    /* Szachownica pod logo — widać, czy ma przezroczyste tło. */
    background: repeating-conic-gradient(color-mix(in srgb, var(--ink) 30%, var(--card)) 0 25%, color-mix(in srgb, var(--ink) 16%, var(--card)) 0 50%) 0 0 / 14px 14px;
  }
  .logo-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
  .logo-empty { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; line-height: 1.35; background: var(--card); padding: 2px 6px; border-radius: 6px; }
  .logo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
  .logo-upload { position: relative; cursor: pointer; }
  .logo-upload .logo-input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; font-size: 0; }
  .logo-upload:focus-within { box-shadow: 0 0 0 3px var(--brand-ghost); }
  .logo-remove { color: var(--err); }
  .logo-remove[hidden], .logo-thumb img[hidden], .logo-empty[hidden] { display: none; }
  .logo-hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin: 8px 2px 0; }
  .logo-note { font-size: 12.5px; font-weight: 600; color: var(--ink-2, var(--ink)); line-height: 1.45; margin: 8px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--warn-bg); }
  .logo-seg { display: inline-flex; padding: 3px; gap: 3px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--card); }
  .logo-seg-btn { padding: 7px 16px; border: 0; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 700; color: var(--muted); background: none; cursor: pointer; transition: background .15s, color .15s; }
  .logo-seg-btn[aria-checked="true"] { background: var(--brand-ghost); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--brand-line); }
  .logo-seg-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
  .logo-where { display: flex; padding-bottom: 6px; font-weight: 600; }
  .logo-where-sub { margin-left: 26px; font-weight: 500; color: var(--ink-2, var(--ink)); }
  .logo-where-sub.is-disabled { opacity: .45; cursor: default; }
  .logo-stage { min-width: 0; }
  .logo-preview { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: color-mix(in srgb, var(--ink) 6%, var(--card)); aspect-ratio: 16 / 9; }
  .logo-preview img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .15s; }
  .logo-preview.is-loading img { opacity: .55; }
  /* 3×3 klikane pola nad podglądem (rogi, środki krawędzi, środek). Wybrane pole NIE ma ramki
     (zasłaniałaby logo) — tylko znaczek ✓ od strony środka kadru. */
  .logo-grid9 { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
  .logo-corner {
    position: relative; padding: 0; cursor: pointer; background: transparent;
    border: 0; border-radius: 10px; transition: background .15s;
  }
  .logo-corner:hover { background: color-mix(in srgb, #fff 16%, transparent); }
  .logo-corner:focus-visible { outline: 2px solid #fff; outline-offset: -4px; box-shadow: inset 0 0 0 6px color-mix(in srgb, var(--brand) 55%, transparent); }
  .logo-corner::after {
    content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; opacity: 0; transform: scale(.6);
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 6.2l2.3 2.3 4.7-5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
    box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.3); transition: opacity .15s, transform .15s;
  }
  .logo-corner[aria-pressed="true"]::after { display: none; }   /* bez znaczka ✓ — logo na podglądzie samo pokazuje miejsce */
  .logo-corner[data-logo-corner^="top"]::after { bottom: 8px; }
  .logo-corner[data-logo-corner^="bottom"]::after, .logo-corner[data-logo-corner^="middle"]::after,
  .logo-corner[data-logo-corner="center"]::after { top: 8px; }
  .logo-corner[data-logo-corner$="left"]::after { right: 8px; }
  .logo-corner[data-logo-corner$="right"]::after { left: 8px; }
  .logo-corner[data-logo-corner$="center"]::after { left: calc(50% - 11px); }
  .logo-corner[data-logo-corner$="center"][aria-pressed="true"]::after { transform: none; }
  /* Suwak wielkości */
  .logo-size-val { margin-left: 6px; font-weight: 800; color: var(--ink); text-transform: none; letter-spacing: 0; }
  .logo-size-row { display: flex; align-items: center; gap: 10px; max-width: 360px; }
  .logo-size-end { font-size: 12px; font-weight: 700; color: var(--muted); }
  .logo-size { flex: 1; min-width: 0; accent-color: var(--brand); height: 28px; cursor: pointer; }
  .logo-soft-label { margin-top: 16px; }
  /* Podgląd karty produktu: iframe 1080×1350 przeskalowany do szerokości ramki (10-logo.js) */
  .logo-card-wrap { margin-top: 16px; }
  .logo-card-frame { position: relative; width: 100%; max-width: 230px; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: var(--card-soft); }
  .logo-card-frame iframe { position: absolute; top: 0; left: 0; width: 1080px; height: 1350px; border: 0; transform-origin: 0 0; pointer-events: none; }
  .logo-off-badge {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: none; pointer-events: none;
    padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
    color: #fff; background: rgba(12, 20, 36, .72);
  }
  .logo-panel.is-off .logo-off-badge { display: block; }
  .logo-panel.is-off .logo-preview img { filter: grayscale(.6); opacity: .7; }
  .logo-msg { text-align: left; padding: 0 18px 14px; }
  @media (max-width: 760px) {
    .logo-body { grid-template-columns: 1fr; padding: 14px 14px 16px; }
    .logo-stage { order: -1; }
    .logo-msg { padding: 0 14px 12px; }
    .logo-seg-btn { font-size: 16px; padding: 8px 14px; }
    .logo-size-row { max-width: none; }
  }
