/* Business page: canvas size picker */
.canvas-size-picker { margin-bottom: 22px; }
.canvas-orient { display: flex; gap: 8px; margin: 8px 0 12px; }
/* Chip look and label type: components.css. Only placement here. */
.orient-btn { padding: 6px 16px; }
.canvas-size-group { margin: 12px 0 6px; }
.canvas-size-row { display: flex; flex-wrap: wrap; gap: 8px; }
.canvas-size-btn { padding: 7px 14px; }
.canvas-size-btn { position: relative; }
.canvas-size-btn.fit-good::after {
    content: ''; position: absolute; top: 3px; right: 5px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--cta);
}
.canvas-size-btn.selected.fit-good::after { background: var(--white); }
.canvas-size-btn.fit-poor:not(.selected) { opacity: 0.5; }
.canvas-size-legend { margin: 8px 0 0; font-size: 0.75rem; color: var(--ink-muted); }
.canvas-size-legend[hidden] { display: none; }
.canvas-size-info { margin: 14px 0 2px; font-weight: 700; font-size: 0.92rem; }
.canvas-size-info.warn { color: var(--warn); }
.canvas-size-hint { margin: 0; font-size: 0.8rem; color: var(--ink-muted); }

/* ─── Business page layout: its own look, not the personal page ─────────── */
body[data-tier="b2b"] .logo-text small {
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: var(--r-pill);
    background: var(--ink-deep);
    color: var(--white);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    vertical-align: middle;
}

.biz-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* One-screen workspace: big stage on the left, settings on the right. */
body[data-tier="b2b"] { background: var(--bg); }
.biz-app { padding-top: var(--nav-h); }
.biz-workspace { display: grid; grid-template-columns: 1fr; }
.biz-stage {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 60vh; padding: 20px;
    background:
        linear-gradient(45deg, #e6e3db 25%, transparent 25%) 0 0 / 24px 24px,
        linear-gradient(45deg, transparent 75%, #e6e3db 75%) 0 0 / 24px 24px,
        var(--bg-tool-soft);
}
.biz-stage .upload-zone {
    width: 100%; max-width: 640px;
    padding: 72px 28px;
    background: var(--surface-warm);
}
.biz-stage .upload-cta { font-size: 1.15rem; }
.biz-stage .live { width: 100%; display: flex; flex-direction: column; align-items: center; }
.biz-stage .live[hidden] { display: none; }
.biz-stage .live-tabs { justify-content: center; }
.biz-stage .live-stage { width: 100%; background: none; padding: 0; min-height: 0; }
.biz-stage .live-stage canvas { max-height: calc(100vh - var(--nav-h) - 130px); }
.biz-stage .live-meta { text-align: center; }
.biz-stage .preview-container { margin-top: 0; width: 100%; }
.biz-stage .preview-image { max-height: calc(100vh - var(--nav-h) - 130px); }

.biz-side {
    display: flex; flex-direction: column;
    background: var(--white); border-left: 1px solid var(--border);
}
.biz-side-scroll { flex: 1; overflow-y: auto; padding: 4px 22px 12px; }
.biz-block { padding: 18px 0; border-bottom: 1px solid var(--border); }
.biz-block:last-child { border-bottom: 0; }
.biz-block h2 { margin: 0 0 10px; }
.biz-block .canvas-size-picker { margin-bottom: 0; }
.biz-block .canvas-orient { margin-top: 0; }
.biz-block .options-section { display: block; margin-top: 0; }
.biz-block .options-grid { display: flex; flex-direction: column; gap: 18px; }
.biz-block .preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }

.biz-side-foot.preview-actions {
    display: flex !important; flex-direction: column; gap: 8px;
    margin: 0; padding: 14px 22px 18px;
    border-top: 1px solid var(--border); background: var(--white);
}
.biz-side-foot .btn { width: 100%; justify-content: center; }
.biz-workspace:not(.has-image) #changeImageBtn { display: none; }
.biz-workspace:not(.has-image) #createBtn { opacity: 0.5; }

@media (min-width: 1000px) {
    .biz-workspace {
        grid-template-columns: minmax(0, 1fr) 400px;
        height: calc(100vh - var(--nav-h));
    }
    .biz-stage { min-height: 0; overflow: auto; }
    .biz-side { min-height: 0; }
}
@media (max-width: 999px) {
    .biz-side-foot.preview-actions { position: sticky; bottom: 0; z-index: 5; }
    .biz-stage .upload-zone { padding: 48px 20px; }
}

/* ─── Business design studio ────────────────────────────────────────────── */
.studio-page { background: var(--bg-tool); min-height: 100vh; }
.st-bar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 14px;
    padding: 10px 20px;
    background: var(--ink-deep); color: var(--white);
}
.st-back { color: var(--on-deep-muted); text-decoration: none; font-size: 0.9rem; white-space: nowrap; }
.st-back:hover { color: var(--white); }
.st-title {
    flex: 1; min-width: 0; max-width: 420px;
    font: inherit; font-weight: 700; font-size: 1rem; color: var(--white);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--r-sm); padding: 8px 12px;
}
.st-title::placeholder { color: var(--on-deep-muted); font-weight: 500; }
.st-title:focus { outline: none; border-color: var(--accent-light); }
.st-chip {
    margin-right: auto;
    padding: 4px 10px; border-radius: var(--r-pill);
    background: var(--cta); font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.st-bar .nav-cta-account { margin-left: auto; }

.st-main { display: grid; grid-template-columns: 1fr; gap: 18px; padding: 18px 20px 40px; max-width: 1500px; margin: 0 auto; }
@media (min-width: 1000px) {
    .st-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
}
.st-stage { background: var(--white); border-radius: var(--r-lg); border: 1px solid var(--border); overflow: hidden; }
.st-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.st-tabs, .st-zoom { display: flex; gap: 6px; }
.st-tab {
    font: inherit; font-size: 0.84rem; font-weight: 600; cursor: pointer;
    padding: 7px 14px; border-radius: var(--r-sm);
    border: 1px solid var(--border-md); background: var(--white); color: var(--ink-soft);
}
.st-tab:hover { border-color: var(--cta); }
.st-tab.selected { background: var(--ink-deep); border-color: var(--ink-deep); color: var(--white); }
.st-viewport {
    display: flex; align-items: center; justify-content: center;
    height: calc(100vh - 150px); min-height: 360px;
    padding: 18px; overflow: hidden;
    background:
        linear-gradient(45deg, #f1efe9 25%, transparent 25%) 0 0 / 24px 24px,
        linear-gradient(45deg, transparent 75%, #f1efe9 75%) 0 0 / 24px 24px,
        #f7f6f1;
}
.st-viewport canvas {
    display: block; background: var(--white);
    max-width: 100%; max-height: 100%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
}
.st-viewport.actual { display: block; overflow: auto; }
.st-viewport.actual canvas { max-width: none; max-height: none; margin: 0 auto; }
.st-loading { color: var(--ink-muted); }

.st-panel { display: flex; flex-direction: column; gap: 14px; }
.st-card {
    background: var(--white); border-radius: var(--r-md); padding: 18px;
    border: 1px solid var(--border);
}
.st-card h2 { margin: 0 0 12px; font-size: 0.95rem; font-weight: 800; }
.st-card h2 small { color: var(--ink-muted); font-weight: 600; }
.st-specs { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 0.88rem; }
.st-specs dt { color: var(--ink-muted); }
.st-specs dd { margin: 0; font-weight: 700; text-align: right; }
.st-note { margin: 12px 0 0; font-size: 0.8rem; color: var(--ink-muted); line-height: 1.5; }
.st-note.warn { color: var(--warn); }
.st-check { display: flex; gap: 8px; align-items: center; font-size: 0.9rem; margin-bottom: 14px; }
.st-slider-label { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 6px; }
.st-slider-label span { color: var(--ink-muted); }
.st-dl {
    display: block; width: 100%; text-align: left; cursor: pointer;
    font: inherit; padding: 12px 14px; margin-top: 10px;
    border: 1.5px solid var(--border-md); border-radius: var(--r-md); background: var(--white); color: var(--ink);
}
.st-dl strong { display: block; font-size: 0.92rem; }
.st-dl span { display: block; font-size: 0.78rem; color: var(--ink-muted); margin-top: 2px; }
.st-dl:hover { border-color: var(--cta); }
.st-dl.primary { background: var(--cta); border-color: var(--cta); color: var(--white); }
.st-dl.primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); }
.st-dl.primary span { color: rgba(255, 255, 255, 0.8); }
.st-key { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.st-key-help { margin: -4px 0 12px; }
.st-key-row { display: flex; align-items: center; gap: 10px; }
.st-key-swatch {
    position: relative; cursor: pointer;
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: grid; place-items: center; color: var(--white); font-weight: 700; font-size: 0.78rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}
.st-key-swatch input[type="color"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.st-key-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-key-name {
    font: inherit; font-size: 0.82rem; width: 100%;
    border: 1px solid transparent; border-radius: var(--r-sm); padding: 3px 6px; margin-left: -6px; background: transparent; color: var(--ink);
}
.st-key-name:hover { border-color: var(--border-md); }
.st-key-name:focus { outline: none; border-color: var(--cta); background: var(--white); }
.st-key-hex { font-size: 0.72rem; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.st-key-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.st-key-pct { font-size: 0.75rem; color: var(--ink-muted); }
.st-key-merge { font: inherit; font-size: 0.72rem; max-width: 92px; border: 1px solid var(--border-md); border-radius: var(--r-sm); background: var(--white); color: var(--ink-soft); padding: 2px 4px; }

/* Editing */
.st-viewport.editing canvas { cursor: crosshair; }
.st-edit-hint { margin: 0; padding: 8px 14px; font-size: 0.82rem; background: var(--warn-soft); color: var(--warn); border-bottom: 1px solid var(--border); }
.st-tab:disabled { opacity: 0.4; cursor: default; }
.st-tab:disabled:hover { border-color: var(--border-md); }
.st-busy {
    position: absolute; left: 50%; top: 14px; transform: translateX(-50%);
    padding: 7px 16px; border-radius: var(--r-pill); background: var(--ink-deep); color: var(--white);
    font-size: 0.82rem; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 5;
}
.st-busy.visible { opacity: 1; }
.st-viewport { position: relative; }
.st-pop {
    position: fixed; z-index: 100; width: 260px;
    background: var(--white); border-radius: var(--r-md); padding: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25); border: 1px solid var(--border);
}
.st-pop[hidden] { display: none; }
.st-pop-info { margin: 0 0 10px; font-size: 0.8rem; color: var(--ink-soft); }
.st-pop-swatches { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; max-height: 190px; overflow: auto; padding: 2px; }
.st-pop-swatch {
    aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; cursor: pointer;
    color: var(--white); font: inherit; font-size: 0.7rem; font-weight: 700; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.st-pop-swatch:hover { border-color: var(--ink-deep); }
.st-pop-swatch.current { border-color: var(--ink-deep); outline: 2px solid var(--white); outline-offset: -4px; }
.st-pop-actions { display: flex; gap: 8px; margin-top: 12px; }
.st-pop-btn { flex: 1; font: inherit; font-size: 0.82rem; font-weight: 600; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; border: 1px solid var(--border-md); background: var(--white); color: var(--ink-soft); }
.st-pop-btn.primary { background: var(--cta); border-color: var(--cta); color: var(--white); flex: 2; }


/* ─── Live preview (Business page) ──────────────────────────────────────── */
.live[hidden] { display: none; }
.live-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.live-stage {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    min-height: 260px; padding: 12px;
    border-radius: var(--r-md);
    background:
        linear-gradient(45deg, #f1efe9 25%, transparent 25%) 0 0 / 20px 20px,
        linear-gradient(45deg, transparent 75%, #f1efe9 75%) 0 0 / 20px 20px,
        #f7f6f1;
}
.live-stage canvas {
    display: block; max-width: 100%; max-height: 520px; background: var(--white); cursor: zoom-in;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    transition: opacity .2s;
}
/* Updating: keep the current preview fully visible (no fade = no flicker); the pill says it is updating. */
.live-stage.busy canvas { opacity: 1; }
.live-status {
    position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
    padding: 6px 14px; border-radius: var(--r-pill);
    background: var(--ink-deep); color: var(--white); font-size: 0.8rem; font-weight: 600;
    opacity: 0; pointer-events: none; transition: opacity .2s; white-space: nowrap;
}
.live-status.visible { opacity: 1; }
.live-meta { margin: 10px 2px 0; font-size: 0.78rem; color: var(--ink-muted); line-height: 1.5; }

/* Only one of: live canvas / colours (the canvas element), or the draggable photo. */
#tool-section[data-live-view="canvas"] .preview-container,
#tool-section[data-live-view="colour"] .preview-container { display: none !important; }
#tool-section[data-live-view="photo"] .live-stage { display: none; }
#tool-section[data-live-view="photo"] .live-meta { display: none; }

/* Zoomed: the canvas at its real preview size, scrollable, so numbers are readable. */
.live-stage.zoomed { display: block; overflow: auto; max-height: 70vh; }
.live-stage.zoomed canvas { max-width: none; max-height: none; margin: 0 auto; cursor: zoom-out; }

/* No preview yet: show only the status pill, not an empty white box. */
.live-stage.empty { min-height: 200px; }
.live-stage.empty canvas { display: none; }
.live-stage.empty .live-status { bottom: auto; top: 50%; transform: translate(-50%, -50%); white-space: normal; text-align: center; max-width: 90%; }

/* The style suggested for the chosen kit size */
.preset-btn { position: relative; }
.preset-btn.recommended::after {
    content: 'Suggested'; position: absolute; top: -8px; right: 6px;
    padding: 1px 6px; border-radius: var(--r-pill);
    background: var(--cta); color: var(--white); font-size: 0.6rem; font-weight: 700; letter-spacing: .04em;
}

/* Studio: production panels */
.st-field { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; margin-bottom: 12px; color: var(--ink-soft); }
.st-field select, .st-field input, .st-card textarea {
    font: inherit; font-size: 0.88rem; padding: 8px 10px; border-radius: var(--r-sm);
    border: 1px solid var(--border-md); background: var(--white); color: var(--ink); width: 100%;
}
.st-card textarea { font-family: var(--font-mono); font-size: 0.78rem; margin-top: 10px; resize: vertical; }
.st-more { margin-top: 10px; }
.st-more summary { cursor: pointer; font-size: 0.85rem; font-weight: 600; color: var(--cta); padding: 4px 0; }
.st-row { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.st-file { display: inline-flex; align-items: center; justify-content: center; text-align: center; }
.st-logo-row img { max-height: 40px; max-width: 120px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--r-sm); padding: 3px; background: var(--white); }
.st-proofs { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-proof { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; font-size: 0.82rem; }
.st-proof-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.st-proof-status { font-weight: 700; font-size: 0.74rem; padding: 2px 8px; border-radius: var(--r-pill); background: var(--bg-tool-soft); color: var(--ink-soft); white-space: nowrap; }
.st-proof-status.approved { background: var(--success-soft); color: var(--success); }
.st-proof-status.changes { background: var(--warn-soft); color: var(--warn); }
.st-proof-comment { margin: 6px 0 0; color: var(--ink-soft); font-style: italic; }
.st-proof-actions { display: flex; gap: 10px; margin-top: 6px; }
.st-proof-actions button { font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--cta); background: none; border: 0; padding: 0; cursor: pointer; }
.st-key-paint { font-size: 0.72rem; color: var(--cta); font-weight: 600; }
.st-key-paint.far { color: var(--warn); }

/* ─── Studio layout: canvas always in view, one task at a time ─────────── */
/* Studio bar: same height as the site nav, dark variant. */
.studio-page { --bar-h: var(--nav-h); background: var(--bg-tool); }
.st-bar { height: var(--bar-h); padding: 0 16px; gap: 12px; }
.st-back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.st-title { max-width: 300px; }
.st-chip { margin-right: 0; }
.st-stats {
    margin-right: auto; min-width: 0;
    font-size: 0.82rem; color: var(--on-deep-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-bar-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.st-bar .nav-cta-account { margin-left: 0; }
.st-cta {
    display: inline-flex; align-items: center; gap: 7px;
    font: inherit; font-size: 0.88rem; font-weight: 700; cursor: pointer;
    padding: 9px 16px; border-radius: var(--r-md); border: 0;
    background: var(--accent-light); color: var(--ink-deep);
}
.st-cta:hover { background: var(--accent-light-hover); }

.st-main { display: block; padding: 0; max-width: none; margin: 0; }
.st-stage {
    display: flex; flex-direction: column;
    border-radius: 0; border: 0; background: var(--bg-tool-soft);
}
.st-toolbar { padding: 10px 14px; background: var(--white); align-items: center; }
.st-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r-md); background: var(--bg-tool-soft); }
.st-seg .st-tab { border: 0; background: transparent; padding: 6px 14px; }
.st-seg .st-tab.selected { background: var(--ink-deep); color: var(--white); }
.st-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.st-tab.st-icon { padding: 6px 10px; font-size: 1rem; line-height: 1; }
.st-sep { width: 1px; height: 22px; background: var(--border-md); margin: 0 2px; }
.st-edit-btn.selected { background: var(--highlight); border-color: var(--highlight); color: var(--ink-deep); }
.st-viewport { flex: 1; min-height: 0; height: auto; }

.st-panel { display: flex; flex-direction: column; gap: 0; background: var(--white); }
.st-steps {
    display: flex; gap: 4px; padding: 10px 12px;
    border-bottom: 1px solid var(--border); background: var(--white);
}
.st-step {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer;
    padding: 9px 8px; border-radius: var(--r-md); border: 0; background: transparent; color: var(--ink-soft);
    position: relative;
}
.st-step b {
    width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
    font-size: 0.72rem; background: var(--bg-tool); color: var(--ink-soft);
}
.st-step:hover { background: var(--bg-tool-soft); }
.st-step.selected { background: var(--ink-deep); color: var(--white); }
.st-step.selected b { background: var(--accent-light); color: var(--ink-deep); }
.st-step-shop { flex: 0 0 auto; padding: 9px 12px; }
.st-step[data-state="approved"]::after,
.st-step[data-state="changes"]::after,
.st-step[data-state="pending"]::after {
    content: ''; position: absolute; top: 6px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
    background: #c9c9c9; box-shadow: 0 0 0 2px var(--white);
}
.st-step[data-state="approved"]::after { background: var(--success-dot); }
.st-step[data-state="changes"]::after { background: var(--warn-dot); }

.st-panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.st-pane[hidden] { display: none; }
.st-pane-intro { margin: 0; padding: 14px 20px 0; font-size: 0.82rem; color: var(--ink-muted); }
.st-panel .st-card {
    border: 0; border-radius: 0; padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}
.st-panel .st-card:last-child { border-bottom: 0; }
.st-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.st-card-head h2 { margin-bottom: 12px; }
.st-link {
    font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
    padding: 5px 10px; border-radius: var(--r-pill); border: 1.5px solid var(--cta); background: var(--white); color: var(--cta);
    white-space: nowrap;
}
.st-link:hover { background: var(--cta); color: var(--white); }
.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-two .st-field { margin-bottom: 0; }

/* Desktop: the whole app fits the window. Only the panel scrolls. */
@media (min-width: 1000px) {
    .studio-page { height: 100vh; overflow: hidden; }
    .st-main {
        display: grid; grid-template-columns: minmax(0, 1fr) 400px;
        grid-template-rows: minmax(0, 1fr);
        height: calc(100vh - var(--bar-h));
        align-items: stretch;
    }
    .st-stage { min-height: 0; }
    .st-panel { min-height: 0; border-left: 1px solid var(--border); }
}

/* Phone / tablet: canvas sticks under the bar, tools scroll below it. */
@media (max-width: 999px) {
    .st-stats, .st-chip, .st-back span, .st-cta span { display: none; }
    .st-title { max-width: none; }
    .st-stage { position: sticky; top: var(--bar-h); z-index: 20; height: 46vh; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08); }
    .st-toolbar { padding: 8px 10px; gap: 6px; }
    .st-seg .st-tab { padding: 6px 10px; }
    .st-steps { position: sticky; top: calc(var(--bar-h) + 46vh); z-index: 15; }
    .st-panel-body { overflow: visible; }
    .st-viewport { padding: 10px; }
}

/* Fit: the canvas sits inside the viewport box, whatever its size. */
@media (min-width: 1000px) {
    .st-viewport:not(.actual) canvas {
        position: absolute; inset: 0; margin: auto;
        max-width: calc(100% - 36px); max-height: calc(100% - 36px);
    }
}
@media (max-width: 999px) {
    .st-stage .st-viewport:not(.actual) canvas {
        position: absolute; inset: 0; margin: auto;
        max-width: calc(100% - 20px); max-height: calc(100% - 20px);
    }
}
.st-tab.st-icon svg { display: block; }

/* Business create in progress: settings locked, preview stays, progress in the pill. */
.biz-workspace.creating .biz-side-scroll,
.biz-workspace.creating .live-tabs { pointer-events: none; opacity: 0.55; transition: opacity .2s; }
.biz-workspace.creating #changeImageBtn { visibility: hidden; }
.biz-workspace.creating #createBtn { opacity: 1; cursor: progress; }
.biz-workspace.creating .live-status { background: var(--cta); }

/* Studio: nothing (no empty white box) until the design has drawn once. */
.st-viewport:not(.ready) canvas { visibility: hidden; }
.st-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; }

.canvas-orient.disabled { opacity: 0.35; }
.canvas-orient.disabled .orient-btn { cursor: default; }
/* Studio: the design fades in once drawn instead of popping. */
.st-viewport canvas { transition: opacity .15s ease-out; }
.st-viewport:not(.ready) canvas { opacity: 0; }

/* Business: "My designs" lives in the top bar, always in the same place
   (no floating button popping in over the Create button). */
body[data-tier="b2b"] .nav-links { gap: 10px; }
.biz-designs, .biz-designs.hidden { display: flex !important; }
.biz-designs-btn {
    display: inline-flex; align-items: center; gap: 7px;
    font: inherit; font-size: 0.86rem; font-weight: 700; cursor: pointer;
    padding: 8px 12px; border-radius: var(--r-pill);
    border: 1px solid var(--border-md); background: var(--white); color: var(--ink);
}
.biz-designs-btn:hover { border-color: var(--cta); }
.biz-designs .fab-count { display: inline-flex !important; min-width: 20px; height: 20px; font-size: 0.72rem; }
.biz-designs .fab-count:empty { visibility: hidden; }
body[data-tier="b2b"] #galleryGrid:empty::before {
    content: 'No designs yet. Create one and it will appear here.';
    display: block; padding: 24px; text-align: center; color: var(--ink-muted); grid-column: 1 / -1;
}
@media (max-width: 600px) {
    /* Phone: a round folder button; the count sits on its corner, so it never changes the button's size. */
    .biz-designs-btn span:not(.fab-count) { display: none; }
    .biz-designs-btn { position: relative; width: 40px; height: 40px; padding: 0; justify-content: center; }
    .biz-designs .fab-count { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; font-size: 0.68rem; }
}

/* Studio step change: content settles in (only after the first paint). */
.st-panel.motion .st-pane:not([hidden]) { animation: stPaneIn 200ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes stPaneIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.st-step, .st-seg .st-tab, .canvas-size-btn, .orient-btn, .preset-btn, .st-link, .st-dl, .biz-designs-btn {
    transition: background-color .16s ease, color .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}

/* Studio first load: the design's data appears as one reveal. */
.studio-page .st-stats, .studio-page .st-chip, .studio-page .st-panel-body, .studio-page .st-steps {
    transition: opacity 260ms cubic-bezier(0.2, 0, 0, 1);
}
.studio-page.loading .st-stats, .studio-page.loading .st-chip,
.studio-page.loading .st-panel-body, .studio-page.loading .st-steps { opacity: 0; }
.st-viewport canvas { transition-duration: 260ms; transition-timing-function: cubic-bezier(0.2, 0, 0, 1); }
