/* ── Atomic Sticker Studio — Product Page + Studio Modal Styles ── */

/* ════════════════════════════════════════════════════════════════════
   SHARED THEME TOKENS
   Applied to both the studio (.asp-studio) and product page
   (.asp-product-wrap). Components reuse the same classes in both.
   ════════════════════════════════════════════════════════════════════ */

.asp-studio,
.asp-product-wrap {
    --st-bg:           #f5f5f2;
    --st-panel:        #ffffff;
    --st-border:       #e0e0da;
    --st-border-mid:   #ccccc6;
    --st-border-deep:  #e8e8e2;
    --st-text:         #1a1a18;
    --st-text-mid:     #444444;
    --st-text-muted:   #666666;
    --st-text-faint:   #888888;
    --st-text-ghost:   #999999;
    --st-input-bg:     #f9f9f6;
    --st-widget-bg:    #f0f0ec;
    --st-hover:        rgba(0,0,0,.04);
    --st-accent:       #d94f2b;
    --st-accent-text:  #ffffff;

    /*
     * The focus ring is NOT --st-accent, deliberately.
     *
     * --st-accent changes with the theme — terracotta here, amber at night,
     * brand blue under .asp-product-wrap. A focus ring that changes colour
     * with context is harder to learn, and it conflates "branded" with "your
     * keyboard is here". This value is fixed across every studio theme.
     *
     * #0e8ab5 measured against every surface the studio paints:
     *   light  bg 3.95  input 3.74  widget 3.45  panel 3.95
     *   night  bg 4.42  panel 3.94  widget 3.55
     * All clear the 3:1 WCAG 1.4.11 floor, which is why one value serves both
     * modes. It is the same ring the theme uses, so the platform has one.
     */
    --st-focus:        #0e8ab5;
    --st-qty-sel-bg:   rgba(217,79,43,.08);
    --st-qty-sel-bdr:  rgba(217,79,43,.25);
}

/* Night override — applied to studio only */
.asp-studio--night {
    --st-bg:           #1a1a18;
    --st-panel:        #242422;
    --st-border:       #333333;
    --st-border-mid:   #444444;
    --st-border-deep:  #2a2a28;
    --st-text:         #ffffff;
    --st-text-mid:     #cccccc;
    --st-text-muted:   #888888;
    --st-text-faint:   #555555;
    --st-text-ghost:   #666666;
    --st-input-bg:     #1a1a18;
    --st-widget-bg:    #2c2c2a;
    --st-hover:        rgba(255,255,255,.04);
    --st-accent:       #f0a500;
    --st-accent-text:  #1a1a18;
    --st-qty-sel-bg:   rgba(240,165,0,.1);
    --st-qty-sel-bdr:  rgba(240,165,0,.3);
}

/* ════════════════════════════════════════════════════════════════════
   PRODUCT PAGE
   ════════════════════════════════════════════════════════════════════ */

.asp-product-wrap {
    margin-bottom: 1.5rem;
    /* The shop's face, not the system's. This said -apple-system until
       2026-10-06, and every option, label and quantity row on the product
       page inherited it while the title beside them was Poppins. */
    font-family: var(--font-sans, 'Poppins', system-ui, -apple-system, sans-serif);
}

/* Section — same structure as studio sidebar sections */
.asp-pg-section {
	border-bottom: 1px solid var(--st-border);
}
.asp-pg-section:first-child { padding-top: 0; }
.asp-pg-section:last-child  { border-bottom: none; padding-bottom: 0; }

.asp-pg-label {
    font-size: 10px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--st-text-faint);
    margin-bottom: 10px;
}

/* Option pills (material, laminate) */
.asp-pg-option-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.asp-pg-option-btn  {
    padding: 6px 14px; border-radius: 20px;
    border: 1.5px solid var(--st-border-mid);
    background: var(--st-panel); color: var(--st-text-muted);
    font-size: 13px; cursor: pointer; font-family: inherit;
    transition: all .15s;
}
.asp-pg-option-btn:hover          { border-color: var(--st-text-faint); color: var(--st-text); }
.asp-pg-option-btn--active        { border-color: var(--st-text); background: var(--st-text); color: var(--st-panel); }
.asp-pg-option-btn--locked        { opacity: .6; cursor: default; }

/* Product page upload CTA */
.asp-pg-upload-section { padding-top: 1.25rem; }

.asp-pg-dropzone {
    border: 2px dashed var(--st-border-mid);
    border-radius: 10px;
    background: var(--st-input-bg);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    position: relative;
}
.asp-pg-dropzone:hover,
.asp-pg-dropzone--active {
    border-color: var(--st-accent);
    background: rgba(217,79,43,.04);
}
.asp-pg-dropzone--loading { opacity: .7; cursor: wait; }

/*
 * Something visibly turning while the server works. The loading state was
 * opacity alone, and the slow phases — a 60-megapixel resize is many seconds
 * — read as a dead page. The spinner rides the text line so it sits beside
 * whatever the phase message says.
 */
.asp-pg-dropzone--loading .asp-pg-dropzone__text::before {
    content: ''; display: inline-block; width: 13px; height: 13px;
    margin-right: 8px; vertical-align: -2px;
    border: 2px solid currentColor; border-top-color: transparent;
    border-radius: 50%; animation: asp-pg-spin .8s linear infinite;
}
@keyframes asp-pg-spin { to { transform: rotate(360deg); } }

/* The refusal's two buttons: the fix, and the quiet way out beside it. */
.asp-pg-fix-btn {
    display: inline-block; margin: 8px 4px 0; padding: 7px 18px;
    font: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
    border-radius: 999px; border: 1.5px solid var(--st-accent);
    background: var(--st-accent); color: #fff;
}
.asp-pg-fix-btn:disabled { opacity: .5; cursor: default; }
.asp-pg-fix-btn--quiet { background: transparent; color: inherit; border-color: currentColor; opacity: .75; }
.asp-pg-fix-btn--quiet:hover { opacity: 1; }

.asp-pg-dropzone__icon  { display: block; margin: 0 auto 10px; color: var(--st-text-faint); }
.asp-pg-dropzone__text  { font-size: 14px; font-weight: 500; color: var(--st-text-mid); margin: 0 0 4px; }
.asp-pg-dropzone__hint  { font-size: 11px; color: var(--st-text-ghost); margin: 0 0 12px; }

.asp-pg-browse-btn {
    display: inline-block; padding: 8px 20px;
    border: 1.5px solid var(--st-accent); border-radius: 6px;
    background: var(--st-accent); color: var(--st-accent-text);
    font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: opacity .15s;
    user-select: none; -webkit-user-select: none;
}
.asp-pg-browse-btn:hover { opacity: .88; }

/*
 * Back into the studio after closing it.
 *
 * Outlined rather than filled: the dropzone's own button is the primary action
 * for someone arriving with no artwork, and this must not compete with it.
 */
.asp-pg-reopen-btn {
    display: block; width: 100%; margin: 10px 0 0; padding: 10px 20px;
    border: 1.5px solid var(--st-accent); border-radius: 6px;
    background: transparent; color: var(--st-accent);
    font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: background .15s, color .15s;
}
.asp-pg-reopen-btn:hover { background: var(--st-accent); color: var(--st-accent-text); }

/* ════════════════════════════════════════════════════════════════════
   SHARED COMPONENTS — used in both product page and studio sidebar
   ════════════════════════════════════════════════════════════════════ */

/* Size control (W × H inputs + presets) */
.asp-size-control              { display: flex; flex-direction: column; gap: 7px; }
.asp-size-control__rows        { display: flex; align-items: center; gap: 6px; }
.asp-size-control__row         { display: flex; align-items: center; gap: 8px; flex: 1; }
.asp-size-control__axis        { font-size: 12px; color: var(--st-text-ghost); width: 14px; }
.asp-size-control__sep         { font-size: 13px; color: var(--st-text-faint); padding: 0 2px; }
.asp-size-control__input {
    flex: 1; background: var(--st-input-bg); border: 1px solid var(--st-border);
    border-radius: 6px; padding: 7px 10px; font-size: 13px; font-family: monospace;
    color: var(--st-text); outline: none; transition: border-color .15s;
}
.asp-size-control__input:focus { border-color: var(--st-accent); outline: 2px solid var(--st-focus, #0e8ab5); outline-offset: 2px; }
.asp-size-control__unit        { font-size: 12px; color: var(--st-text-faint); }

.asp-size-presets              {
	margin-top: 4px;
}
.asp-size-preset {
	font-family: inherit;
}
.asp-size-preset:hover         {
	color: var(--st-text-mid);
}

/* Rush buttons */
.asp-studio-rush-btns  { display: flex; flex-direction: column; gap: 4px; }
.asp-studio-rush-btn {
    text-align: left; padding: 8px 10px; background: var(--st-input-bg);
    border: 1px solid var(--st-border); border-radius: 7px;
    color: var(--st-text-muted); font-size: 12px; cursor: pointer;
    font-family: inherit; transition: all .15s;
}
.asp-studio-rush-btn:hover         { border-color: var(--st-text-faint); color: var(--st-text-mid); }
.asp-studio-rush-btn--active       {
    background: var(--st-qty-sel-bg); border-color: var(--st-qty-sel-bdr);
    color: var(--st-accent); font-weight: 600;
}

/* Quantity list */
.asp-studio-qty-list    { display: flex; flex-direction: column; gap: 2px; }
.asp-studio-qty-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; border-radius: 7px; cursor: pointer;
    border: 1px solid transparent; transition: background .1s;
}
.asp-studio-qty-row:hover          { background: var(--st-hover); }
.asp-studio-qty-row--selected      { background: var(--st-qty-sel-bg); border-color: var(--st-qty-sel-bdr); }
.asp-studio-qty-left   { display: flex; align-items: center; gap: 8px; }
.asp-studio-qty-dot {
    width: 14px; height: 14px; border-radius: 50%;
    border: 1.5px solid var(--st-border-mid); flex-shrink: 0; position: relative;
}
.asp-studio-qty-row--selected .asp-studio-qty-dot  { border-color: var(--st-accent); background: var(--st-accent); }
.asp-studio-qty-row--selected .asp-studio-qty-dot::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%); width: 5px; height: 5px;
    border-radius: 50%; background: var(--st-panel);
}
.asp-studio-qty-num    { font-size: 13px; color: var(--st-text-mid); font-weight: 500; }
.asp-studio-qty-row--selected .asp-studio-qty-num { color: var(--st-text); }
.asp-studio-qty-popular { font-size: 9px; font-weight: 700; background: #e8304a; color: #fff; padding: 1px 5px; border-radius: 8px; }
.asp-studio-qty-price  { font-size: 13px; color: var(--st-text-faint); }
.asp-studio-qty-row--selected .asp-studio-qty-price { color: var(--st-accent); font-weight: 500; }
.asp-studio-qty-hint {
    font-size: 11px; color: var(--st-text-faint); text-align: center;
    padding: 5px 10px; cursor: pointer; border-radius: 6px; transition: all .15s;
}
.asp-studio-qty-hint:hover { color: var(--st-text-mid); background: var(--st-hover); }

/* Live price panel */
.asp-live-price { background: var(--st-input-bg); border-radius: 8px; border: 1px solid var(--st-border); padding: 14px; }
.asp-live-price__row       { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.asp-live-price__label     { font-size: 11px; color: var(--st-text-faint); }
.asp-live-price__total     { font-size: 24px; font-weight: 700; color: var(--st-text); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.asp-live-price__unit      { font-size: 13px; color: var(--st-accent); font-weight: 500; }
.asp-live-price__breakdown { font-size: 11px; color: var(--st-text-faint); margin-top: 10px; display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--st-border-deep); padding-top: 8px; }
.asp-live-price__line      { display: flex; justify-content: space-between; }

/* ════════════════════════════════════════════════════════════════════
   STUDIO MODAL
   ════════════════════════════════════════════════════════════════════ */

/* Explicit background on the modal overlay so no theme colour bleeds through.
   These are hardcoded rather than CSS-var so the Bootcommerce theme cannot
   override them regardless of its own variable names. */
.asp-studio-modal { display: none; position: fixed; inset: 0; z-index: 99999; background: #f5f5f2; }
.asp-studio-modal--open { display: block; }
body.asp-studio-modal-open { overflow: hidden; }

/* Studio shell — full viewport flex column */
.asp-studio {
    display: flex; flex-direction: column; height: 100vh;
    background: #f5f5f2; /* day default — hardcoded fallback */
    background: var(--st-bg);
    transition: background .2s;
}
.asp-studio.asp-studio--night {
    background: #1a1a18;
}

/* ── Topbar ── */
.asp-studio__topbar {
    height: 52px; flex-shrink: 0;
    background: #ffffff; background: var(--st-panel);
    border-bottom: 1px solid #e0e0da; border-bottom-color: var(--st-border);
    display: flex; align-items: center; padding: 0 1.25rem; gap: 1rem;
}
/* Hardcoded night overrides — prevents Bootcommerce theme variables interfering */
.asp-studio--night                        { background: #1a1a18 !important; }
.asp-studio--night .asp-studio__topbar    { background: #242422 !important; border-color: #333 !important; }
.asp-studio--night .asp-studio__left,
.asp-studio--night .asp-studio__canvas-area { background: #1a1a18 !important; }
.asp-studio--night #scg-dropzone          { background: #1a1a18 !important; }
.asp-studio--night .scg-preview-canvas    { background-color: #1a1a18 !important; }
.asp-studio--night .asp-studio__sidebar   { background: #242422 !important; border-left-color: #333 !important; }
.asp-studio--night .asp-cutline-bar       { background: #242422 !important; border-top-color: #333 !important; }
.asp-studio--night .asp-sidebar-section   { border-bottom-color: #333 !important; }
.asp-studio--night .asp-live-price        { background: #1a1a18 !important; border-color: #333 !important; }
.asp-studio__logo          { flex-shrink: 0; display: flex; align-items: center; }
/*
 * Explicit WIDTH, not height.
 *
 * This SVG carries no intrinsic width or height, so `width: auto` resolves to
 * 100% of the container -- and the container is full width, which is why the
 * logo filled the top bar and pushed the buttons out of reach. An SVG without
 * intrinsic dimensions cannot be sized by height alone.
 */
.asp-studio__logo-img      { width: 130px; height: auto; display: block; }
@media (min-width: 768px) {
  .asp-studio__logo-img    { width: 180px; }
}
.asp-studio__logo-fallback { font-size: 14px; font-weight: 700; color: var(--st-text); letter-spacing: -.02em; }
.asp-studio__product-name  { font-size: 13px; color: var(--st-text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asp-studio__topbar-actions{ display: flex; gap: 6px; align-items: center; flex-shrink: 0; }

.asp-studio__btn-close, .asp-studio__btn-theme, .asp-studio__btn-debug {
    background: transparent; border: 1px solid var(--st-border-mid); border-radius: 6px;
    color: var(--st-text-muted); font-size: 12px; padding: 5px 10px;
    cursor: pointer; font-family: inherit; transition: all .15s;
    display: flex; align-items: center; gap: 5px;
}
.asp-studio__btn-close:hover, .asp-studio__btn-theme:hover { border-color: var(--st-text-faint); color: var(--st-text); }
.asp-studio__btn-debug:hover,
.asp-studio__btn-debug--active { border-color: var(--st-accent); color: var(--st-accent); }
.asp-studio__btn-theme svg, .asp-studio__btn-debug svg { width: 14px; height: 14px; flex-shrink: 0; }

.asp-studio__btn-cart {
    background: var(--st-accent); color: var(--st-accent-text);
    border: none; border-radius: 6px; font-size: 13px; font-weight: 700;
    padding: 7px 18px; cursor: pointer; font-family: inherit; transition: opacity .15s;
}
.asp-studio__btn-cart:disabled          { opacity: .4; cursor: default; }
.asp-studio__btn-cart:not(:disabled):hover { opacity: .88; }

/* ── Body grid: left column + sidebar ── */
.asp-studio__body {
    flex: 1; overflow: hidden;
    display: grid; grid-template-columns: 1fr 300px;
}

/* Left column: canvas area (fills) + cutline bar (fixed bottom) */
.asp-studio__left {
    display: flex; flex-direction: column; overflow: hidden;
    background: #f5f5f2;
    background: var(--st-bg);
}

/* Canvas area fills the remaining height completely */
.asp-studio__canvas-area {
    flex: 1; overflow: hidden; position: relative;
    display: flex; flex-direction: column;
    background: #f5f5f2;
    background: var(--st-bg);
}

/* SCG widget fills the canvas area */
.scg-widget {
    flex: 1; display: flex; flex-direction: column; overflow: hidden;
    min-height: 0;
}

/* Dropzone fills the widget area */
#scg-dropzone.scg-dropzone {
    flex: 1; display: flex; align-items: center; justify-content: center;
    background: #f5f5f2;
    background: var(--st-bg); border: none; border-radius: 0;
    cursor: default;
    min-height: 0;
}
/*
 * The inner block ignores the pointer so that dragging across the icon and the
 * text does not register as leaving the dropzone.
 *
 * But "Browse files" lives in here too, and it inherited that — so the click
 * fell straight through to the dropzone div behind it and the button did
 * nothing. Drag and drop still worked, which is what made it look like the
 * button alone was broken. Reported on the second design slot; it was never
 * clickable anywhere.
 *
 * Re-enabled for the control only. This is safe because the dropzone tracks
 * nested dragenter/dragleave with a DEPTH COUNTER rather than relying on
 * children being transparent to the pointer, so a child that takes events back
 * cannot unbalance it.
 */
.scg-dropzone__inner { text-align: center; pointer-events: none; }
.scg-dropzone__inner .scg-browse-btn { pointer-events: auto; cursor: pointer; }

/*
 * The file input is hidden from view but NOT from the keyboard.
 *
 * It used to be display:none, which takes it out of the tab order — and a
 * <label> is not focusable either, so there was no keyboard route to the file
 * picker at all. Clipped instead, so Tab reaches it and Space opens the picker,
 * and the label stays the thing you see.
 */
.scg-file-input--hidden {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.scg-file-input--hidden:focus-visible + .scg-browse-btn,
.scg-browse-btn:focus-visible {
    outline: 2px solid var(--st-focus, #0e8ab5); outline-offset: 2px;
}
.scg-dropzone--active { background: rgba(217,79,43,.04); }
/*
 * `.asp-studio--night #scg-dropzone` was restated here as
 * `background: var(--st-bg)` and never applied: the hardcoded night block
 * above declares the same selector with !important, so it won.
 *
 * Nothing was in dispute. `.asp-studio--night` sets `--st-bg: #1a1a18`, which
 * is exactly the literal the !important rule forces — the two agreed, one of
 * them just never got a say. The !important is deliberate and documented
 * ("prevents Bootcommerce theme variables interfering"), so the redundant
 * restatement is what goes.
 */
.asp-studio--night .scg-dropzone--active { background: rgba(240,165,0,.06); }

.scg-dropzone__icon { display: block; margin: 0 auto 12px; color: var(--st-text-faint); }
.scg-dropzone__text { font-size: 15px; font-weight: 500; color: var(--st-text-mid); margin: 0 0 6px; }
.scg-dropzone__hint { font-size: 12px; color: var(--st-text-ghost); margin: 0 0 14px; }

.scg-browse-btn {
    display: inline-block; padding: 8px 20px; margin-top: 4px;
    border: 1.5px solid var(--st-accent); border-radius: 6px;
    background: var(--st-accent); color: var(--st-accent-text);
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
    user-select: none; -webkit-user-select: none; transition: opacity .15s;
}
.scg-browse-btn:hover { opacity: .88; }

/* Canvas controls — fills widget after upload */
#scg-controls.scg-controls {
    flex: 1; position: relative; overflow: hidden; min-height: 0;
}
.scg-preview-canvas {
    position: absolute; inset: 0;
    width: 100%; height: 100%; display: block;
    background-color: #f2f2f2;
}
.scg-dpi-badge {
    position: absolute; top: 10px; right: 10px;
    font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 10px;
    background: rgba(0,0,0,.55); color: #fff; pointer-events: none;
}
.scg-dpi-badge--good        { background: rgba(22,163,74,.75);  }
.scg-dpi-badge--acceptable  { background: rgba(202,138,4,.8);   }
.scg-dpi-badge--poor        { background: rgba(220,38,38,.8);   }
.scg-dpi-warning {
    position: absolute; bottom: 0; left: 0; right: 0;
    font-size: 11px; color: #dc2626; background: rgba(220,38,38,.08);
    border-top: 1px solid rgba(220,38,38,.2); padding: 6px 12px; text-align: center;
}
.scg-change-link {
    position: absolute; bottom: 8px; right: 10px;
    font-size: 11px; color: var(--st-text-ghost); text-decoration: underline; cursor: pointer;
}
.scg-change-link:hover { color: var(--st-text-muted); }

/* ── Bottom cutline control bar ── */
.asp-cutline-bar {
    flex-shrink: 0;
    background: var(--st-panel); border-top: 1px solid var(--st-border);
    display: flex; align-items: stretch; min-height: 80px; max-height: 100px;
    overflow-x: auto; overflow-y: hidden;
}
.asp-cutline-bar__divider { width: 1px; background: var(--st-border); flex-shrink: 0; margin: 10px 0; }
.asp-cutline-bar__section {
    display: flex; flex-direction: column; justify-content: center;
    padding: 8px 14px; gap: 6px; flex-shrink: 0;
    min-width: 0;
}
.asp-cutline-bar__section--shape { flex-shrink: 0; }
.asp-cutline-bar__section--generate { margin-left: auto; padding-left: 16px; }
.asp-cutline-bar__label {
    font-size: 10px; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--st-text-faint);
    display: flex; align-items: baseline; gap: 6px; white-space: nowrap;
}
.asp-cutline-bar__value { font-size: 11px; font-weight: 400; color: var(--st-text-mid); text-transform: none; letter-spacing: 0; }
.asp-cutline-bar__range { width: 100%; min-width: 100px; accent-color: var(--st-accent); cursor: pointer; }

/* Shape picker inside bar */
.asp-cutline-bar__section--shape .scg-shape-picker {
    display: flex; gap: 4px; flex-wrap: nowrap;
}
.asp-cutline-bar__section--shape .scg-shape-btn {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 8px; border-radius: 6px;
    background: var(--st-input-bg); border: 1px solid var(--st-border);
    color: var(--st-text-muted); cursor: pointer; font-family: inherit; transition: all .15s;
    min-width: 52px;
}
.asp-cutline-bar__section--shape .scg-shape-btn:hover  { border-color: var(--st-text-faint); color: var(--st-text-mid); }
.asp-cutline-bar__section--shape .scg-shape-btn--active{ border-color: var(--st-accent); color: var(--st-accent); background: var(--st-qty-sel-bg); }
.asp-cutline-bar__section--shape .scg-shape-btn span   { font-size: 10px; }

/* Generate + download in bar */
.asp-cutline-bar__generate-btn {
    background: var(--st-accent); color: var(--st-accent-text);
    border: none; border-radius: 7px; padding: 9px 16px;
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
    white-space: nowrap; transition: opacity .15s;
}
.asp-cutline-bar__generate-btn:hover { opacity: .88; }
.asp-cutline-bar__download-btn {
    display: flex; align-items: center; gap: 5px;
    background: var(--st-input-bg); border: 1px solid var(--st-border);
    border-radius: 7px; padding: 7px 12px;
    font-size: 12px; color: var(--st-text-muted); text-decoration: none;
    transition: all .15s; white-space: nowrap; margin-top: 4px;
}
.asp-cutline-bar__download-btn:hover { border-color: var(--st-text-faint); color: var(--st-text); }
.asp-cutline-bar__status {
    font-size: 11px; color: var(--st-text-muted); margin-top: 2px;
    max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.asp-cutline-bar__status .scg-status--success { color: #16a34a; }
.asp-cutline-bar__status .scg-status--error   { color: #dc2626; }

/* ── Sidebar ── */
.asp-studio__sidebar {
    background: var(--st-panel); border-left: 1px solid var(--st-border);
    overflow-y: auto; display: flex; flex-direction: column;
}
.asp-sidebar-section  { padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--st-border); }
.asp-sidebar-section:last-child { border-bottom: none; }
.asp-sidebar-label {
    font-size: 10px; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--st-text-faint); margin-bottom: 12px;
}

/* Studio status */
.asp-studio-status { font-size: 12px; line-height: 1.5; border-radius: 6px; padding: 10px 12px; }
.asp-studio-status--waiting { color: var(--st-text-ghost); background: var(--st-input-bg); border: 1px solid var(--st-border-deep); }
.asp-studio-status--ready   { color: #16a34a; background: rgba(22,163,74,.08); border: 1px solid rgba(22,163,74,.2); }
.asp-studio-status--error   { color: #dc2626; background: rgba(220,38,38,.08); border: 1px solid rgba(220,38,38,.2); }

/* ── Debug panel ── */
.asp-debug-panel {
    border-top: 1px solid var(--st-border); background: var(--st-panel);
    flex-shrink: 0; max-height: 260px; overflow-y: auto;
}
.asp-debug-panel__header {
	padding: 8px 14px;
	display: flex;
	align-items: center;
	border-bottom: 1px solid var(--st-border);
}
.asp-debug-panel__title  { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--st-text-faint); }
.asp-debug-panel__badge  { font-size: 10px; font-weight: 700; color: #fff; padding: 2px 8px; border-radius: 10px; }
.asp-debug-panel__grid   { display: grid; grid-template-columns: 1fr 1fr; }
.asp-debug-card          { padding: 12px 14px; border-right: 1px solid var(--st-border); }
.asp-debug-card:last-child { border-right: none; }
.asp-debug-card__label   { font-size: 10px; font-weight: 600; color: var(--st-text-faint); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.asp-debug-card__img-wrap {
    aspect-ratio: 1; background: var(--st-input-bg); border: 1px solid var(--st-border);
    border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin-bottom: 8px;
}
.asp-debug-card__img         { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.asp-debug-card__placeholder { font-size: 11px; color: var(--st-text-faint); }
.asp-debug-card__meta        { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; font-size: 11px; }
.asp-debug-card__meta dt     { color: var(--st-text-faint); }
.asp-debug-card__meta dd     { margin: 0; color: var(--st-text-mid); font-family: monospace; word-break: break-all; }

/* ── Night mode: adjust component colours ── */
.asp-studio--night .asp-size-preset--active { background: rgba(240,165,0,.08); }
.asp-studio--night .asp-studio-qty-row--selected .asp-studio-qty-dot::after { background: var(--st-panel); }
.asp-studio--night .scg-browse-btn { background: var(--st-accent); color: var(--st-accent-text); border-color: var(--st-accent); }
.asp-studio--night .asp-cutline-bar__generate-btn { background: var(--st-accent); color: var(--st-accent-text); }
.asp-studio--night .asp-studio__btn-cart { background: var(--st-accent); color: var(--st-accent-text); }
.asp-studio--night .asp-pg-browse-btn { background: var(--st-accent); color: var(--st-accent-text); border-color: var(--st-accent); }

/* ── Responsive ── */
@media (max-width: 720px) {
    .asp-studio__body           { grid-template-columns: 1fr; }
    .asp-studio__sidebar        { display: none; }
    .asp-cutline-bar            { min-height: 70px; }
    .asp-cutline-bar__section--generate { margin-left: 0; }
}

/* ── Debug panel generate controls ── */
.asp-debug-panel__header {
    flex-wrap: wrap; gap: 8px;
}
.asp-debug-panel__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.asp-debug-generate-btn {
    background: var(--st-accent); color: var(--st-accent-text);
    border: none; border-radius: 6px; padding: 5px 12px;
    font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
    white-space: nowrap; transition: opacity .15s;
}
.asp-debug-generate-btn:hover { opacity: .88; }
.asp-debug-generate-btn:disabled { opacity: .5; cursor: wait; }
.asp-debug-download-btn {
    display: flex; align-items: center; gap: 4px;
    background: var(--st-input-bg); border: 1px solid var(--st-border);
    border-radius: 6px; padding: 4px 10px; font-size: 11px;
    color: var(--st-text-muted); text-decoration: none; transition: all .15s;
    white-space: nowrap;
}
.asp-debug-download-btn:hover { border-color: var(--st-text-faint); color: var(--st-text); }
.asp-debug-status {
    width: 100%; font-size: 11px; margin-top: 2px;
}
.asp-debug-status .scg-status--success { color: #16a34a; }
.asp-debug-status .scg-status--error   { color: #dc2626; }

/* Remove bottom generate section from cutline bar */
.asp-cutline-bar__section--generate { display: none; }

/* ── Cutline tracing progress overlay ── */
.scg-trace-overlay {
    position: absolute; inset: 0; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    pointer-events: none;
}
.asp-studio--night .scg-trace-overlay { background: rgba(0, 0, 0, 0.35); }

.scg-trace-overlay__inner {
    display: flex; align-items: center; gap: 10px;
    background: var(--st-panel); border: 1px solid var(--st-border);
    border-radius: 10px; padding: 10px 18px;
    box-shadow: 0 4px 20px rgba(0,0,0,.12);
}
.scg-trace-overlay__label { font-size: 13px; font-weight: 500; color: var(--st-text-mid); white-space: nowrap; }

/* The elapsed count. Tabular figures so the line does not twitch as the digits
   change, and quieter than the message it follows — it is evidence that
   something is happening, not the thing being said. */
.asp-wait__secs {
    font-variant-numeric: tabular-nums;
    opacity: .6;
    font-weight: 400;
}

/* Spinner */
.scg-trace-overlay__spinner {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    border: 2.5px solid var(--st-border-mid);
    border-top-color: var(--st-accent);
    animation: scg-spin 0.7s linear infinite;
}
@keyframes scg-spin { to { transform: rotate(360deg); } }

/* ── Image position controls (non-contour shapes) ── */
.asp-cutline-bar__centre-btn {
    display: flex; align-items: center; gap: 5px;
    background: var(--st-input-bg); border: 1px solid var(--st-border);
    border-radius: 6px; padding: 6px 12px; font-size: 12px; font-weight: 500;
    color: var(--st-text-muted); cursor: pointer; font-family: inherit;
    transition: all .15s; white-space: nowrap;
}
.asp-cutline-bar__centre-btn:hover { border-color: var(--st-text-faint); color: var(--st-text); }
.asp-cutline-bar__drag-hint {
    font-size: 10px; color: var(--st-text-faint); margin: 4px 0 0;
    white-space: nowrap;
}

/* Canvas grab cursor for non-contour drag */
#scg-preview-canvas { cursor: default; }

/* ════════════════════════════════════════════════════════════════════
   HIGH-SPECIFICITY OVERRIDES
   ID prefix (#asp-studio-modal) beats any class chain the theme uses.
   These fire AFTER all other rules and cannot be overridden by the theme.
   ════════════════════════════════════════════════════════════════════ */
/*
 * The shell's own fill is for the LEGACY studio, which fills the modal edge
 * to edge. The 4A editor is an inset panel with the product page behind it,
 * so there the shell is the scrim and must stay translucent — see the
 * backdrop rule in studio-4a.css. Scoped rather than fought with a second
 * !important, which is how an override block like this one grows.
 *
 * By CLASS, not `:not(:has(> .asp-4a))` — that selector reads correctly
 * and matched the shell it was written to exclude, so the scrim lost to
 * this !important while every other property from its rule applied.
 */
#asp-studio-modal:not(.asp-studio-modal--4a)   { background: #f5f5f2 !important; }
#asp-studio-modal .asp-studio                  { background: #f5f5f2 !important; }
#asp-studio-modal .asp-studio__topbar          { background: #ffffff !important; border-bottom: 1px solid #e0e0da !important; }
#asp-studio-modal .asp-studio__left            { background: #f5f5f2 !important; }
#asp-studio-modal .asp-studio__canvas-area     { background: #f5f5f2 !important; }
/* Not in 4A: there the dropzone IS the artboard card, and the card shows the
   checkerboard so transparency reads as transparency. Same scoping as the
   shell's fill above. */
#asp-studio-modal:not(.asp-studio-modal--4a) #scg-dropzone { background: #f5f5f2 !important; }
/* Not in 4A: there the canvas sits ON the artboard card, and the card's
   checkerboard is what should show through the artwork's transparency. A grey
   fill here painted over it. Same scoping as the dropzone above. */
#asp-studio-modal:not(.asp-studio-modal--4a) .scg-preview-canvas { background-color: #f2f2f2 !important; }
#asp-studio-modal .asp-studio__sidebar         { background: #ffffff !important; border-left: 1px solid #e0e0da !important; }
#asp-studio-modal .asp-sidebar-section         { border-bottom: 1px solid #e0e0da !important; }
#asp-studio-modal .asp-cutline-bar             { background: #ffffff !important; border-top: 1px solid #e0e0da !important; }
#asp-studio-modal .asp-live-price              { background: #f9f9f6 !important; border: 1px solid #e0e0da !important; }
#asp-studio-modal .asp-size-control__input     { background: #f9f9f6 !important; border: 1px solid #e0e0da !important; }
#asp-studio-modal .asp-studio-rush-btn         { background: #f9f9f6 !important; border: 1px solid #e0e0da !important; }
#asp-studio-modal .asp-studio-qty-row:hover    { background: rgba(0,0,0,.04) !important; }
#asp-studio-modal .asp-debug-panel             { background: #ffffff !important; border-top: 1px solid #e0e0da !important; }
#asp-studio-modal .asp-debug-card              { border-right: 1px solid #e0e0da !important; }

/* Night mode — overrides the day overrides above */
#asp-studio-modal .asp-studio--night                  { background: #1a1a18 !important; }
#asp-studio-modal .asp-studio--night .asp-studio__topbar  { background: #242422 !important; border-bottom-color: #333 !important; }
#asp-studio-modal .asp-studio--night .asp-studio__left    { background: #1a1a18 !important; }
#asp-studio-modal .asp-studio--night .asp-studio__canvas-area { background: #1a1a18 !important; }
#asp-studio-modal .asp-studio--night #scg-dropzone        { background: #1a1a18 !important; }
#asp-studio-modal .asp-studio--night .scg-preview-canvas  { background-color: #1a1a18 !important; }
#asp-studio-modal .asp-studio--night .asp-studio__sidebar { background: #242422 !important; border-left-color: #333 !important; }
#asp-studio-modal .asp-studio--night .asp-sidebar-section { border-bottom-color: #333 !important; }
#asp-studio-modal .asp-studio--night .asp-cutline-bar     { background: #242422 !important; border-top-color: #333 !important; }
#asp-studio-modal .asp-studio--night .asp-live-price      { background: #1a1a18 !important; border-color: #333 !important; }
#asp-studio-modal .asp-studio--night .asp-size-control__input { background: #1a1a18 !important; border-color: #333 !important; color: #fff !important; }
#asp-studio-modal .asp-studio--night .asp-studio-rush-btn { background: #1a1a18 !important; border-color: #333 !important; }
#asp-studio-modal .asp-studio--night .asp-studio-qty-row:hover { background: rgba(255,255,255,.04) !important; }
#asp-studio-modal .asp-studio--night .asp-debug-panel     { background: #242422 !important; }

/* ── Scale dead-zone warning ── */
.asp-cutline-bar__scale-warning {
    font-size: 10px; color: #d97706; margin-top: 3px;
    line-height: 1.3; white-space: normal; max-width: 160px;
}

/* ── Scale warning icon + snap checkbox ── */
.asp-scale-warn-icon {
    display: inline-block; margin-left: 4px;
    font-size: 11px; cursor: default;
    filter: none !important;  /* prevent theme emoji filters */
}
.asp-cutline-bar__snap-label {
    display: flex; align-items: center; gap: 4px;
    font-size: 10px; color: var(--st-text-faint);
    margin-top: 4px; cursor: pointer; white-space: nowrap;
    user-select: none; -webkit-user-select: none;
}
.asp-cutline-bar__snap-label input[type="checkbox"] {
    width: 12px; height: 12px; margin: 0; cursor: pointer;
    accent-color: var(--st-accent);
}

/* ── Sidebar change image link ── */
.asp-sidebar-change-image {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--st-text-faint); text-decoration: none;
    margin-bottom: 10px; transition: color .15s;
}
.asp-sidebar-change-image:hover { color: var(--st-text-mid); }

/* ── Sidebar bottom section (Change image) ── */
.asp-sidebar-section--bottom {
    margin-top: auto;
    border-top: 1px solid var(--st-border);
    border-bottom: none;
}

/* ── Product page slot indicator ────────────────────────────────────── */
.asp-pg-slot-indicator {
    margin-top: 8px;
    padding: 10px 12px;
    background: #f0f6fc;
    border: 1px solid #c5d9ea;
    border-radius: 6px;
    font-size: 13px;
    color: #1e3a5f;
    line-height: 1.4;
}

.asp-pg-slot-indicator__count {
    font-weight: 600;
    color: #0a558c;
}

.asp-pg-slot-indicator--warning {
    background: #fff4e5;
    border-color: #f0c47a;
    color: #6b4200;
}

.asp-pg-slot-indicator__hint {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
}

/* ══════════════════════════════════════════════════════════════════════
   INLINE UPLOAD SECTION (studio-disabled products)
   Manual proofing workflow — compact, clean, mobile-first.
   ══════════════════════════════════════════════════════════════════════ */

.asp-upload-section {
    background: #f5f5f5;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}

/* Compact order summary recap at top */
.asp-upload-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.asp-upload-summary__details {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
}

.asp-upload-summary__details strong {
    color: #111;
    font-weight: 600;
}

.asp-upload-summary__price {
    font-size: 24px;
    font-weight: 700;
    color: #111;
    white-space: nowrap;
    padding-left: 16px;
}

/* Upload header */
.asp-upload-header {
    text-align: center;
    margin-bottom: 16px;
}

.asp-upload-header__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #111;
}

.asp-upload-header__formats {
    font-size: 13px;
    color: #555;
    margin: 0 0 4px;
}

.asp-upload-header__dpi {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    margin: 0;
}

/* Upload zones container — stack on mobile, 2-up on wider screens */
.asp-upload-zones {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

@media (min-width: 720px) {
    .asp-upload-zones--multi {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Individual zone */
.asp-zone {
    border: 2px dashed #c0c0c0;
    border-radius: 8px;
    padding: 16px;
    background: #fff;
    transition: all 0.2s ease;
    position: relative;
}

.asp-zone__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.asp-zone__label {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.asp-zone__optional {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.asp-zone__body {
    text-align: center;
    padding: 16px 8px;
}

.asp-zone__prompt {
    font-size: 13px;
    color: #555;
    margin: 0 0 10px;
    line-height: 1.4;
}

.asp-zone__button {
    display: inline-block;
    padding: 8px 18px;
    background: #5ec4dc;
    color: #111;
    border: 1px solid #4aa9c0;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.asp-zone__button:hover {
    background: #4aa9c0;
    color: #fff;
}

.asp-zone__url {
    margin-top: 12px;
}

.asp-zone__url input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    box-sizing: border-box;
    background: #fafafa;
}

.asp-zone__url input::placeholder {
    color: #9ca3af;
    font-size: 12px;
}

.asp-zone__url-label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 4px;
}

/* Zone — primary-empty (active, ready for upload) */
.asp-zone--primary {
    border-color: #5ec4dc;
    background: #f9fdff;
}

.asp-zone--primary .asp-zone__label {
    color: #0a558c;
}

/* Zone — optional-available (a filled slot exists, this one is next) */
.asp-zone--optional {
    border-color: #d1d5db;
    border-style: dashed;
    background: #fafafa;
}

.asp-zone--optional .asp-zone__body {
    opacity: 0.9;
}

/* Zone — locked (further slots, not yet reachable) */
.asp-zone--locked {
    border-color: #e5e7eb;
    background: #f9f9f9;
    opacity: 0.55;
    pointer-events: none;
}

.asp-zone--locked .asp-zone__button {
    background: #d1d5db;
    border-color: #c0c0c0;
    color: #6b7280;
    cursor: not-allowed;
}

/* Zone — filled (upload successful) */
.asp-zone--filled {
    border-color: #10b981;
    border-style: solid;
    background: #f0fdf4;
}

.asp-zone--filled .asp-zone__body {
    padding: 8px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.asp-zone__thumb {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
    background: #fff;
    border: 1px solid #d0d0d0;
    flex-shrink: 0;
}

.asp-zone__meta {
    flex: 1;
    min-width: 0;
    font-size: 13px;
}

.asp-zone__filename {
    font-weight: 600;
    color: #064e3b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asp-zone__filesize {
    color: #6b7280;
    font-size: 11px;
    margin-top: 2px;
}

.asp-zone__remove {
    background: none;
    border: 0;
    color: #dc2626;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
}

.asp-zone__remove:hover {
    text-decoration: underline;
}

/* Proofing radio options */
.asp-upload-proofing {
    margin-bottom: 20px;
}

.asp-upload-proofing__label {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin: 0 0 10px;
}

.asp-upload-proofing__option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.asp-upload-proofing__option:hover {
    border-color: #9ca3af;
}

.asp-upload-proofing__option input[type="radio"] {
    margin-top: 3px;
    flex-shrink: 0;
}

.asp-upload-proofing__option input[type="radio"]:checked ~ .asp-upload-proofing__content .asp-upload-proofing__title {
    color: #0a558c;
}

.asp-upload-proofing__content {
    flex: 1;
}

.asp-upload-proofing__title {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
}

.asp-upload-proofing__price {
    color: #6b7280;
    font-weight: 500;
}

.asp-upload-proofing__desc {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.5;
}

/* T&Cs section */
.asp-upload-terms {
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

.asp-upload-terms__text {
    font-style: italic;
    margin: 0 0 12px;
    padding: 10px 12px;
    background: #fff;
    border-left: 3px solid #5ec4dc;
    border-radius: 2px;
    font-size: 12px;
}

.asp-upload-terms__text a {
    color: #0a558c;
    text-decoration: underline;
}

.asp-upload-terms__check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 13px;
}

.asp-upload-terms__check input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Upload status line */
.asp-upload-status {
    margin-top: 12px;
    padding: 10px 12px;
    font-size: 13px;
    border-radius: 4px;
    display: none;
}

.asp-upload-status--error {
    display: block;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.asp-upload-status--info {
    display: block;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    color: #1e40af;
}

.asp-upload-status--success {
    display: block;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #14532d;
}

/* ── Qty row tip (inline between qty number and price) ───────────── */
.asp-studio-qty-tip {
    font-size: 11px;
    color: #6b7280;
    white-space: nowrap;
}

.asp-studio-qty-row--selected .asp-studio-qty-tip {
    color: #374151;
}

/* ══════════════════════════════════════════════════════════════════════
   TIGHTEN PRODUCT PAGE OPTIONS (Panel 1)
   Less vertical stacking, tighter padding, Material+Finish side-by-side.
   ══════════════════════════════════════════════════════════════════════ */

.asp-pg-section {
    padding: 10px 0 !important;    /* was 16px — tighter breathing room */
}

.asp-pg-label {
    margin: 0 0 6px !important;    /* was 10px */
}

/* Material and Finish pair up horizontally when they're siblings */
@media (min-width: 560px) {
    .asp-pg-section.asp-pg-section--material,
    .asp-pg-section.asp-pg-section--finish {
        display: inline-block;
        vertical-align: top;
        width: calc(50% - 4px);
        border-bottom: 0;
    }
    .asp-pg-section.asp-pg-section--material {
        padding-right: 8px;
    }
}

/* Shape selector (studio-disabled only) — icon + label as pill buttons */
.asp-pg-shape-btns .asp-pg-option-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.asp-pg-shape-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    background: currentColor;
    opacity: 0.85;
}

.asp-pg-shape-icon--circle {
    border-radius: 50%;
}

.asp-pg-shape-icon--square {
    border-radius: 2px;
}

.asp-pg-shape-icon--custom {
    /* A soft blob shape to hint at die-cut */
    background: currentColor;
    border-radius: 40% 60% 50% 70% / 60% 40% 70% 50%;
    transform: rotate(-5deg);
}

/* ══════════════════════════════════════════════════════════════════════
   SIZE — preset tiles primary, custom inputs secondary (the in | cm switch is Centro_Unit_Switch)
   ══════════════════════════════════════════════════════════════════════ */

.asp-size-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.asp-size-preset {
    flex: 1 1 auto;
    min-width: 60px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #111;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.asp-size-preset:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.asp-size-preset--active {
    background: #111;
    color: #fff;
    border-color: #111;
}

.asp-size-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 13px;
}

.asp-size-custom__label {
    color: #6b7280;
    font-size: 12px;
    margin-right: 2px;
}

.asp-size-custom__input {
    width: 70px;
    padding: 5px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
}

.asp-size-custom__x {
    color: #6b7280;
    font-size: 13px;
}

/* ══════════════════════════════════════════════════════════════════════
   TURNAROUND — inline two-button layout
   ══════════════════════════════════════════════════════════════════════ */

.asp-studio-rush-btns--inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.asp-studio-rush-btns--inline .asp-studio-rush-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 12px;
    margin: 0;
    width: auto;
}

.asp-rush-meta {
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
    margin-top: 2px;
}

.asp-studio-rush-btn--active .asp-rush-meta {
    color: rgba(255, 255, 255, 0.7);
}

/* ════════════════════════════════════════════════════════════════════
   Canvas legend — what the dashed lines mean
   ════════════════════════════════════════════════════════════════════
   Sits over the canvas rather than beside it: the canvas fills the panel
   and anything placed outside it would be pushed below the fold on a
   laptop, which is exactly where a customer is when they approve.

   The swatches are drawn with a repeating gradient rather than a border
   dash, so the dash rhythm matches the canvas instead of merely
   suggesting it. */
.scg-legend {
    position: absolute;
    left: 14px;
    bottom: 14px;
    z-index: 3;
    margin: 0;
    padding: 9px 12px;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 5px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    max-width: 340px;
    pointer-events: none;   /* never steal a click meant for the canvas */
}

.asp-studio--night .scg-legend {
    background: rgba(28, 28, 30, .86);
    border-color: rgba(255, 255, 255, .12);
}

.scg-legend__row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    line-height: 1.35;
}

.scg-legend__key {
    flex: 0 0 auto;
    width: 26px;
    height: 2px;
    margin-top: 6px;
    border-radius: 1px;
}

/* Dash rhythm mirrors the canvas: 6/4 for the cut, 4/4 for the bleed. */
.scg-legend__key--cut {
    background: repeating-linear-gradient(90deg,
        #00AEEF 0 6px, transparent 6px 10px);
}
.scg-legend__key--bleed {
    height: 1px;
    margin-top: 7px;
    background: repeating-linear-gradient(90deg,
        rgba(220, 38, 38, .8) 0 4px, transparent 4px 8px);
}

.scg-legend__text {
    font-size: 11.5px;
    color: var(--st-text-mid);
}
.scg-legend__text strong {
    font-weight: 600;
    color: var(--st-text);
}
.scg-legend__text strong::after {
    content: " — ";
    font-weight: 400;
    opacity: .5;
}

/* ── Sheet diagram ────────────────────────────────────────────────────────
   Shown only for same-design sheets. The main canvas is about one sticker;
   this is about what the sheet becomes.                                    */
.asp-sheet-panel{
    margin: 14px 0 0; padding: 12px;
    border: 1px solid var(--st-border-mid); border-radius: 8px;
    background: var(--st-surface, transparent);
}
.asp-sheet-panel__head{
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 8px; margin-bottom: 8px; font-size: 13px; color: var(--st-text);
}
.asp-sheet-panel__count{ font-size: 12px; color: var(--st-text-muted); font-variant-numeric: tabular-nums; }
.asp-sheet-panel__canvas{ display: block; width: 100%; height: auto; border-radius: 4px; }
.asp-sheet-panel__note{ margin: 8px 0 0; font-size: 12px; line-height: 1.45; color: var(--st-text-muted); }
.asp-sheet-panel__note--warn{ color: #b4531a; }
.asp-sheet-panel__key{ list-style: none; margin: 10px 0 0; padding: 0; font-size: 11px; color: var(--st-text-muted); }
.asp-sheet-panel__key li{ display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.asp-sheet-panel__sw{ width: 14px; height: 0; border-top: 2px solid currentColor; flex: 0 0 14px; }
.asp-sheet-panel__sw--kiss{ color: #e000e0; }
.asp-sheet-panel__sw--through{ color: #0096ff; border-top-style: dashed; }

/* ── Cut size ─────────────────────────────────────────────────────────────
   The ordered box and the finished sticker agree on one axis only.          */
.asp-cut-size{
    margin: 12px 0 0; padding: 9px 11px;
    border: 1px solid var(--st-border-mid); border-left: 3px solid #1ab0e0;
    border-radius: 6px; font-size: 12px; line-height: 1.5;
    color: var(--st-text); font-variant-numeric: tabular-nums;
}
.asp-cut-size strong{ font-weight: 700; }
.asp-cut-size em{ font-style: normal; color: var(--st-text-muted); }
