/* The customer design studio (/studio/{id}). Light and quiet so the card is the brightest thing on screen; brand
   blue for what is on or chosen. Phones get the tools along the bottom and panels as sheets, like an app. */

.st-root {
    --st-blue: #0e7fa8;
    --st-blue-soft: #e6f3f8;
    --st-ink: #1f2937;
    --st-mute: #5b6472;
    --st-line: #e3e6eb;
    --st-desk: #eef0f3;
    --st-radius: 12px;
    --st-shadow: 0 6px 24px rgba(15, 23, 42, .10), 0 1px 3px rgba(15, 23, 42, .08);
    position: fixed; inset: 0;
    display: flex; flex-direction: column;
    background: var(--st-desk); color: var(--st-ink);
    font-size: 14px; line-height: 1.35;
    -webkit-tap-highlight-color: transparent;
}
.st-root svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:where(.st-root) button { font: inherit; color: inherit; cursor: pointer; }
.st-root button:disabled { cursor: default; opacity: .4; }
:where(.st-root) input, :where(.st-root) textarea { font: inherit; color: var(--st-ink); }

/* ── Top bar ── */
.st-top {
    height: 56px; flex: none; display: flex; align-items: center; gap: 16px;
    padding: 0 16px; background: #fff; border-bottom: 1px solid var(--st-line); z-index: 30;
}
.st-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #000; }
.st-brand-word { font-weight: 900; font-size: 17px; letter-spacing: -.04em; text-transform: uppercase; }
.st-brand-squares { display: grid; grid-template-columns: 7px 7px; gap: 2px; }
.st-brand-squares i { width: 7px; height: 7px; display: block; }
.st-top-name { display: flex; flex-direction: column; min-width: 0; padding-left: 16px; border-left: 1px solid var(--st-line); }
.st-top-product { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.st-top-save { font-size: 12px; color: var(--st-mute); min-height: 15px; }
.st-top-tools { display: flex; gap: 2px; }
.st-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.st-icon-btn {
    width: 36px; height: 36px; border-radius: 10px; border: 0; background: transparent;
    display: inline-flex; align-items: center; justify-content: center; transition: background .15s;
}
.st-icon-btn:not(:disabled):hover { background: #f1f3f6; }
.st-ghost-btn {
    height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--st-line); background: #fff;
    display: inline-flex; align-items: center; gap: 6px; font-weight: 500; white-space: nowrap; transition: border-color .15s, background .15s;
}
.st-ghost-btn:hover { border-color: #c9ced6; background: #fafbfc; }
.st-ghost-btn svg { width: 18px; height: 18px; }
.st-price {
    height: 36px; padding: 0 12px; border-radius: 10px; border: 0; background: transparent;
    display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 15px;
}
.st-price:hover { background: #f1f3f6; }
.st-price svg { width: 18px; height: 18px; color: var(--st-mute); }
.st-next {
    height: 40px; padding: 0 26px; border-radius: 999px; border: 0; background: var(--st-blue); color: #fff !important;
    font-weight: 700; letter-spacing: .01em; box-shadow: 0 2px 8px rgba(14, 127, 168, .35); transition: transform .12s, box-shadow .15s, background .15s;
}
.st-next:not(:disabled):hover { background: #0b6c90; box-shadow: 0 4px 14px rgba(14, 127, 168, .4); }
.st-next:not(:disabled):active { transform: scale(.97); }
.st-wide { width: 100%; height: 48px; font-size: 16px; }

/* ── Body ── */
.st-body { flex: 1; min-height: 0; display: flex; position: relative; }

.st-rail {
    width: 84px; flex: none; background: #fff; border-right: 1px solid var(--st-line);
    display: flex; flex-direction: column; align-items: stretch; padding: 8px 6px; gap: 2px; z-index: 20;
    overflow-y: auto; scrollbar-width: none;
}
.st-rail-btn {
    border: 0; background: transparent; border-radius: 12px; padding: 9px 2px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--st-mute); white-space: nowrap; letter-spacing: -.01em;
    transition: background .15s, color .15s;
}
.st-rail-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s; }
.st-rail-icon svg { width: 24px; height: 24px; stroke-width: 1.75; }
.st-rail-btn:hover .st-rail-icon { background: #f1f3f6; }
.st-rail-btn.is-on { color: var(--st-blue); }
.st-rail-btn.is-on .st-rail-icon { background: var(--st-blue); color: #fff; box-shadow: 0 3px 10px rgba(14, 127, 168, .3); }

.st-panel {
    width: 320px; flex: none; background: #fff; border-right: 1px solid var(--st-line);
    display: flex; flex-direction: column; z-index: 15; animation: st-slide-in .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes st-slide-in { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
.st-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 6px 18px; }
.st-panel-head h2 { font-size: 17px; font-weight: 700; margin: 0; }
.st-panel-body { flex: 1; overflow-y: auto; padding: 6px 18px 24px; overscroll-behavior: contain; }

.st-primary-wide {
    width: 100%; height: 44px; border-radius: 12px; border: 0; background: var(--st-blue); color: #fff !important;
    display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; margin-top: 4px;
    transition: background .15s, transform .12s;
}
.st-primary-wide:hover { background: #0b6c90; }
.st-primary-wide:active { transform: scale(.98); }
.st-hint { color: var(--st-mute); font-size: 12.5px; margin: 10px 0 14px; }
.st-hint-blue { color: var(--st-blue); font-weight: 500; }
.st-fit-note { margin: 4px 0 10px; background: #eef6fb; color: #0b4f69; border: 1px solid #bfe0ee; border-radius: 12px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.st-empty { color: var(--st-mute); font-size: 13px; text-align: center; padding: 18px 0; }
.st-error { color: #b42318; font-size: 13px; margin: 8px 0; }
.st-subhead { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--st-mute); margin: 18px 0 8px; }
.st-link-btn { border: 0; background: none; color: var(--st-blue) !important; font-weight: 600; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
.st-center { display: flex; margin: 10px auto 0; justify-content: center; }

/* Text panel */
.st-field { padding: 8px 10px 10px; margin: 0 -10px 4px; border-radius: 12px; transition: background .15s; }
.st-field.is-on { background: var(--st-blue-soft); }
.st-field label { display: block; font-size: 12px; font-weight: 600; color: var(--st-mute); margin-bottom: 4px; }
.st-field-row { display: flex; gap: 6px; align-items: flex-start; }

/* Text panel, two or more sides: index-card tabs. The side on the card sits in front, joined to its words. */
.st-tabs { display: flex; align-items: flex-end; gap: 4px; margin: 0 0 -1px; padding: 6px 2px 0; overflow-x: auto; scrollbar-width: none; position: relative; z-index: 1; }
.st-tabs::-webkit-scrollbar { display: none; }
.st-tab {
    flex: none; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--st-line);
    border-radius: 11px 11px 0 0; background: #f1f3f6; color: var(--st-mute); font-size: 12.5px; font-weight: 600; white-space: nowrap;
    padding: 7px 11px 6px; position: relative; transition: background .15s, color .15s, padding .18s;
}
.st-tab:hover { background: #e8ebef; color: var(--st-ink); }
.st-tab.is-on {
    background: #fff; color: var(--st-ink); padding: 10px 13px 8px; border-bottom-color: #fff; z-index: 2;
    box-shadow: 0 -3px 10px rgba(15, 23, 42, .06);
}
.st-tab.is-on::before { content: ""; position: absolute; left: 10px; right: 10px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--st-blue); }
.st-tab-n {
    min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #dde2e8; color: var(--st-mute);
    font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center;
}
.st-tab.is-on .st-tab-n { background: var(--st-blue); color: #fff; }
.st-tabs-many { gap: 3px; }
.st-tabs-many .st-tab { padding: 7px 8px 6px; font-size: 12px; gap: 4px; }
.st-tabs-many .st-tab.is-on { padding: 10px 9px 8px; }
.st-tabs-many .st-tab-n { min-width: 16px; height: 16px; font-size: 10.5px; padding: 0 4px; }
.st-tabpanel {
    border: 1px solid var(--st-line); border-radius: 0 12px 12px 12px; background: #fff; padding: 10px 12px 6px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .05); animation: st-tab-in .22s ease-out;
}
@keyframes st-tab-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .st-tabpanel { animation: none; } }
.st-field input, .st-field textarea {
    flex: 1; min-width: 0; border: 1px solid #d5d9e0; border-radius: 10px; padding: 9px 11px; background: #fff;
    outline: none; transition: border-color .15s, box-shadow .15s; resize: vertical;
}
.st-field input:focus, .st-field textarea:focus { border-color: var(--st-blue); box-shadow: 0 0 0 3px rgba(14, 127, 168, .15); }
.st-field input::placeholder, .st-field textarea::placeholder { color: #9aa1ab; }
.st-field-x { width: 34px; height: 38px; border: 0; background: transparent; border-radius: 10px; color: var(--st-mute); display: flex; align-items: center; justify-content: center; }
.st-field-x:not(:disabled):hover { background: #fdecea; color: #b42318; }
.st-field-x svg { width: 18px; height: 18px; }

/* Grids of pictures */
.st-search { position: relative; margin: 2px 0 12px; }
.st-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #8a919c; }
.st-search input { width: 100%; height: 40px; border: 1px solid #d5d9e0; border-radius: 10px; padding: 0 12px 0 36px; outline: none; background: #fff; }
.st-search input:focus { border-color: var(--st-blue); box-shadow: 0 0 0 3px rgba(14, 127, 168, .15); }
.st-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.st-grid-art { grid-template-columns: repeat(3, 1fr); }
.st-tile {
    border: 1px solid var(--st-line); border-radius: 10px; background: #f6f7f9; padding: 0; overflow: hidden; aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center; transition: border-color .15s, transform .12s, box-shadow .15s;
}
.st-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-tile-art { background: #fff; padding: 8px; }
.st-tile-art img { object-fit: contain; }
.st-tile-tpl { aspect-ratio: auto; background: #eceef2; padding: 8px; }
.st-tile-tpl img { height: auto; object-fit: contain; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); border-radius: 3px; }
.st-tile:hover { border-color: var(--st-blue); box-shadow: 0 3px 10px rgba(15, 23, 42, .12); }
.st-tile:active { transform: scale(.97); }
/* An upload's tile with its delete button in the corner (always there, so it is found, and on a phone) */
.st-tile-wrap { position: relative; }
.st-tile-wrap > .st-tile { width: 100%; }
.st-tile-x {
    position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0;
    background: rgba(255, 255, 255, .92); color: #374151; box-shadow: 0 1px 4px rgba(15, 23, 42, .25);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.st-tile-x svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.st-tile-x:hover { background: #fee2e2; color: #b91c1c; }
.st-more { height: 1px; }
.st-loading { display: flex; justify-content: center; padding: 16px; }
.st-progress { height: 6px; border-radius: 3px; background: #e7eaee; overflow: hidden; margin: 6px 0 12px; }
.st-progress span { display: block; height: 100%; background: var(--st-blue); transition: width .2s; }

.st-shapes { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.st-shape { aspect-ratio: 1; border: 1px solid var(--st-line); border-radius: 10px; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--st-ink); transition: border-color .15s, background .15s; }
.st-shape svg { width: 24px; height: 24px; fill: #cfd5dd; }
.st-shape:hover { border-color: var(--st-blue); background: var(--st-blue-soft); }

.st-swatches { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.st-swatch { aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); padding: 0; transition: transform .12s, box-shadow .15s; position: relative; }
.st-swatch:hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.st-swatch-custom { background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red); cursor: pointer; overflow: hidden; }
.st-swatch-custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

.st-choices { display: flex; flex-direction: column; gap: 6px; }
.st-choice { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 11px 13px; border-radius: 10px; border: 1px solid #d5d9e0; background: #fff; transition: border-color .15s, background .15s; }
.st-choice strong { font-weight: 700; white-space: nowrap; }
.st-choice:hover { border-color: #aeb5bf; }
.st-choice.is-on { border-color: var(--st-blue); background: var(--st-blue-soft); box-shadow: inset 0 0 0 1px var(--st-blue); }
.st-total { display: flex; align-items: baseline; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--st-line); font-size: 15px; }
.st-total strong { font-size: 20px; }
.st-total span { color: var(--st-mute); font-size: 12px; }

/* ── Stage ── */
.st-stage { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; }
.st-ctx {
    position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50;
    display: flex; align-items: center; gap: 4px; padding: 6px 8px; min-height: 50px; max-width: calc(100% - 24px);
    background: #fff; border-radius: 14px; box-shadow: var(--st-shadow);
}
.st-ctx-hint { color: var(--st-mute); font-size: 13px; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The opening hint: long enough to read, then it fades away (the page then hides the empty bar). */
.st-ctx-gone { display: none !important; }
.st-sep { width: 1px; height: 24px; background: var(--st-line); margin: 0 4px; flex: none; }
.st-tog {
    width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; flex: none;
    display: inline-flex; align-items: center; justify-content: center; font-size: 16px; transition: background .15s, color .15s;
}
.st-tog:hover { background: #f1f3f6; }
.st-tog.is-on { background: var(--st-blue-soft); color: var(--st-blue); }
.st-tog svg { width: 19px; height: 19px; }
.st-danger:hover { background: #fdecea; color: #b42318; }
.st-font-btn {
    height: 36px; width: 168px; border: 1px solid #d5d9e0; border-radius: 9px; background: #fff; padding: 0 8px 0 11px;
    display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 15px;
}
.st-font-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-font-btn svg { width: 16px; height: 16px; color: var(--st-mute); }
.st-size { display: flex; align-items: center; border: 1px solid #d5d9e0; border-radius: 9px; height: 36px; overflow: hidden; flex: none; }
.st-size .st-icon-btn { width: 30px; height: 34px; border-radius: 0; }
.st-size .st-icon-btn svg { width: 15px; height: 15px; }
.st-size input { width: 46px; height: 34px; border: 0; text-align: center; outline: none; -moz-appearance: textfield; }
.st-size input::-webkit-outer-spin-button, .st-size input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.st-colour-btn { width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; flex: none; }
.st-colour-btn:hover { background: #f1f3f6; }
.st-colour-a { font-weight: 700; font-size: 16px; line-height: 1; }
.st-colour-bar { width: 20px; height: 5px; border-radius: 2px; border: 1px solid rgba(0, 0, 0, .15); }
.st-dot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); display: inline-block; }
.st-dot-ring { background: transparent; border-width: 3px; }
.st-dpi { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 0 8px; white-space: nowrap; }
.st-dpi i { width: 9px; height: 9px; border-radius: 50%; display: block; }
.st-dpi.is-good i { background: #16a34a; } .st-dpi.is-ok i { background: #d97706; } .st-dpi.is-poor { color: #b42318; } .st-dpi.is-poor i { background: #dc2626; }

/* Pop-overs from the toolbar */
.st-pop-anchor { position: relative; flex: none; }
.st-pop {
    position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); z-index: 60;
    background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(15, 23, 42, .18), 0 1px 3px rgba(15, 23, 42, .1);
    padding: 14px; width: 270px; animation: st-pop .14s ease-out;
}
@keyframes st-pop { from { opacity: 0; transform: translateX(-50%) translateY(-4px) scale(.98); } to { opacity: 1; transform: translateX(-50%); } }
.st-pop-font { width: 300px; left: 0; transform: none; animation: none; padding: 12px 8px 8px; }
.st-pop-font .st-search { margin: 0 4px 8px; }
.st-font-list { height: 340px; overflow-y: auto; overscroll-behavior: contain; }
.st-font-row { width: 100%; height: 40px; border: 0; background: transparent; border-radius: 8px; padding: 0 10px; display: flex; align-items: center; text-align: left; font-size: 17px; }
.st-font-row:hover { background: #f1f3f6; }
.st-font-row.is-on { background: var(--st-blue-soft); }
.st-font-row img { height: 24px; max-width: 100%; object-fit: contain; object-position: left center; }
.st-font-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-pop-curve { width: 260px; display: flex; flex-direction: column; gap: 12px; }
.st-pop-menu { width: 210px; padding: 6px; display: flex; flex-direction: column; }
.st-pop-menu button { border: 0; background: transparent; text-align: left; padding: 9px 12px; border-radius: 8px; }
.st-pop-menu button:hover { background: #f1f3f6; }
.st-pop-menu hr { border: 0; border-top: 1px solid var(--st-line); margin: 4px 6px; }
.st-switch { display: flex; align-items: center; gap: 10px; font-weight: 600; cursor: pointer; }
.st-switch input { width: 18px; height: 18px; accent-color: var(--st-blue); }
.st-range { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--st-mute); }
.st-range input { width: 100%; accent-color: var(--st-blue); }
.st-seg { display: inline-flex; background: #f1f3f6; border-radius: 10px; padding: 3px; gap: 2px; }
.st-seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; color: var(--st-mute); }
.st-seg button.is-on { background: #fff; color: var(--st-ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

.st-canvas-wrap {
    flex: 1; min-height: 0; position: relative; overflow: hidden; margin: 64px 0 50px;
    display: grid; grid-template-columns: 0 minmax(0, 1fr); grid-template-rows: 0 minmax(0, 1fr);
}
.st-canvas-wrap.has-rulers { grid-template-columns: 16px minmax(0, 1fr); grid-template-rows: 16px minmax(0, 1fr); }
.st-canvas-cell { grid-column: 2; grid-row: 2; position: relative; overflow: hidden; min-width: 0; min-height: 0; background: #eef0f3; container-type: size; }
/* Turn the card: the canvas's box takes the cell's height as its width and turns a quarter; the rulers go while it is turned. */
.st-turn-box { position: absolute; inset: 0; }
.st-turn-box.is-turned { inset: auto; left: 50%; top: 50%; width: 100cqh; height: 100cqw; transform: translate(-50%, -50%) rotate(var(--st-turn, 90deg)); }
.st-canvas-wrap.is-turned, .st-canvas-wrap.has-rulers.is-turned { grid-template-columns: 0 minmax(0, 1fr); grid-template-rows: 0 minmax(0, 1fr); }
.st-canvas-cell canvas { display: block; width: 100%; height: 100%; }
.st-ruler-corner { grid-column: 1; grid-row: 1; background: #f0f0f0; }
.st-ruler-h { grid-column: 2; grid-row: 1; position: relative; overflow: hidden; }
.st-ruler-v { grid-column: 1; grid-row: 2; position: relative; overflow: hidden; }
.st-ruler-h canvas, .st-ruler-v canvas { position: absolute; top: 0; left: 0; }
.st-canvas-wrap.st-drop::after {
    content: 'Drop to add it to your card'; position: absolute; inset: 14px; border: 2.5px dashed var(--st-blue); border-radius: 18px;
    background: rgba(14, 127, 168, .08); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--st-blue); font-size: 18px; pointer-events: none;
}
.st-canvas-loading { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: var(--st-desk); color: var(--st-mute); font-weight: 500; }

.st-legend { position: absolute; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; z-index: 10; max-width: calc(100% - 220px); }
.st-chip { height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--st-line); background: #fff; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; color: var(--st-mute); white-space: nowrap; }
.st-chip.is-on { color: var(--st-ink); }
.st-chip i { width: 14px; height: 10px; border-radius: 2px; display: block; }
.st-chip-safe { border: 2px dashed #16a34a; }
.st-turn-chip { display: none; }
.st-turn-chip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.st-turn-chip.is-on { color: var(--st-blue); background: var(--st-blue-soft); border-color: var(--st-blue); }
.st-chip-bleed { background: repeating-linear-gradient(-45deg, rgba(220, 38, 38, .75) 0 1.5px, rgba(255, 255, 255, .6) 1.5px 5px); border: 1.5px dashed #dc2626; }
.st-chip-bleed.is-mask { background: rgba(0, 0, 0, .5); border: 0; }
.st-legend-help { font-size: 12px; color: var(--st-mute); max-width: 360px; line-height: 1.3; }
.st-legend-help strong { color: var(--st-ink); font-weight: 600; }

.st-zoom { position: absolute; right: 14px; bottom: 14px; display: flex; align-items: center; background: #fff; border-radius: 12px; box-shadow: var(--st-shadow); padding: 3px; z-index: 10; }
.st-zoom .st-icon-btn { width: 32px; height: 32px; }
.st-zoom .st-icon-btn svg { width: 16px; height: 16px; }
.st-zoom-pct { border: 0; background: transparent; min-width: 54px; font-weight: 600; font-size: 13px; height: 32px; border-radius: 8px; }
.st-zoom-pct:hover { background: #f1f3f6; }
.st-zoom .st-icon-btn.is-on { background: var(--st-blue-soft); color: var(--st-blue); }

/* QR codes (More panel) */
.st-qr-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.st-qr-kinds button { border: 1px solid var(--st-line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--st-mute); }
.st-qr-kinds button.is-on { border-color: var(--st-blue); background: var(--st-blue-soft); color: #0a6587; }
.st-qr-form { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.st-qr-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; }
.st-qr-field input, .st-qr-field textarea { border: 1px solid #c9ced6; border-radius: 10px; padding: 9px 11px; font-weight: 400; font-size: 14px; resize: vertical; }
.st-qr-field input:focus, .st-qr-field textarea:focus { outline: 2px solid var(--st-blue); outline-offset: -1px; border-color: transparent; }

/* Tables */
.st-cell-input { width: 160px; height: 36px; border: 1.5px solid var(--st-blue); border-radius: 10px; padding: 0 11px; font-size: 14px; flex: none; }
.st-cell-input:focus { outline: 3px solid rgba(14, 127, 168, .2); }
.st-pop-table { width: 300px; max-height: min(70vh, 560px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.st-pop-table .st-link-btn { text-align: left; padding: 0; }
.st-table-row { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--st-mute); }
.st-table-row .st-swatches { grid-template-columns: repeat(13, 1fr); gap: 3px; }
.st-table-ask { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px 16px; margin: 4px 0 20px; }
.st-table-ask > span { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.st-table-ask .st-size input { width: 52px; }
.st-table-actions { display: flex; gap: 10px; }
.st-table-actions .st-primary-wide { flex: 1; margin: 0; }
.st-table-actions .st-ghost-btn { height: 44px; padding: 0 20px; }

/* View settings, above the zoom bar */
.st-settings {
    position: absolute; right: 14px; bottom: 62px; width: 280px; background: #fff; border-radius: 16px; box-shadow: var(--st-shadow);
    padding: 14px 16px 10px; z-index: 20; animation: st-fade .12s ease-out;
}
.st-settings-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -6px 6px 0; font-size: 16px; }
.st-settings-head .st-icon-btn { width: 30px; height: 30px; }
.st-settings-head .st-icon-btn svg { width: 16px; height: 16px; }
.st-settings-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; font-size: 14px; cursor: pointer; }
.st-settings-row input { width: 20px; height: 20px; accent-color: var(--st-blue); cursor: pointer; }
.st-settings hr { border: 0; border-top: 1px solid var(--st-line); margin: 6px 0; }
.st-settings-link { width: 100%; border: 0; background: none; padding: 0; color: var(--st-ink); text-align: left; }
.st-settings-link span { display: inline-flex; align-items: center; gap: 10px; }
.st-settings-link svg { width: 18px; height: 18px; color: var(--st-mute); }

/* Keyboard shortcuts */
.st-modal-keys { width: min(720px, 100%); min-height: min(460px, calc(100dvh - 40px)); padding: 28px 30px 24px; }
.st-modal-keys h2 { font-size: 23px; font-weight: 800; margin: 0 40px 18px 0; }
.st-keys-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--st-line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.st-keys-tabs button { border: 0; background: none; padding: 8px 0 10px; font-weight: 600; font-size: 14.5px; color: var(--st-mute); border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.st-keys-tabs button.is-on { color: var(--st-ink); border-bottom-color: var(--st-blue); }
.st-keys { display: grid; grid-template-columns: minmax(150px, 1fr) 1.4fr; gap: 10px 16px; margin: 0; align-items: center; }
.st-keys dt { font-size: 14px; }
.st-keys dd { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.st-keys kbd {
    min-width: 30px; height: 30px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #c9ced6;
    border-bottom-width: 2px; border-radius: 6px; background: #f7f8fa; font-family: inherit; font-weight: 600; font-size: 12.5px; line-height: 1; color: var(--st-ink);
}
.st-keys-or { font-size: 12.5px; color: var(--st-mute); margin: 0 3px; }

/* Front and back */
.st-sides { width: 112px; flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 12px 10px; }
.st-side { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--st-mute); padding: 0; }
.st-side-pic { width: 84px; max-height: 120px; display: block; border-radius: 6px; overflow: hidden; background: #fff; border: 2px solid transparent; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); transition: border-color .15s, transform .12s; }
.st-side-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-side:hover .st-side-pic { transform: translateY(-1px); }
.st-side.is-on { color: #0a6587; }  /* darker than the brand blue: on the grey desk that is 3.98:1, under WCAG AA */
.st-side.is-on .st-side-pic { border-color: var(--st-blue); box-shadow: 0 0 0 3px rgba(14, 127, 168, .18); }

/* ── Modals ── */
.st-modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; padding: 20px; animation: st-fade .15s ease-out; }
@keyframes st-fade { from { opacity: 0; } to { opacity: 1; } }
.st-modal { position: relative; background: #fff; border-radius: 20px; box-shadow: 0 24px 70px rgba(15, 23, 42, .3); max-height: calc(100dvh - 40px); overflow: auto; animation: st-rise .2s cubic-bezier(.2, .9, .3, 1.1); }
@keyframes st-rise { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.st-modal-x { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: #f1f3f6; display: flex; align-items: center; justify-content: center; z-index: 2; }
.st-modal-x:hover { background: #e5e8ec; }
.st-modal-small { width: 520px; padding: 28px 28px 22px; }
.st-modal-small h2 { font-size: 21px; font-weight: 800; margin: 0 40px 6px 0; }
.st-modal-small > p { color: var(--st-mute); margin: 0 0 18px; }
.st-back-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.st-back-options button { border: 1px solid #d5d9e0; border-radius: 14px; background: #fff; padding: 18px 12px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 600; transition: border-color .15s, background .15s, transform .12s; }
.st-back-options button svg { width: 28px; height: 28px; color: var(--st-blue); }
.st-back-options button:hover { border-color: var(--st-blue); background: var(--st-blue-soft); }
.st-back-options button:active { transform: scale(.98); }

/* Upload your design */
.st-modal-import { width: min(560px, 100%); padding: 28px 28px 20px; display: flex; flex-direction: column; gap: 10px; }
.st-modal-import h2 { font-size: 23px; font-weight: 800; margin: 0 40px 6px 0; }
.st-modal-import .st-review-sub { margin: -4px 0 4px; }
.st-import-zone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 180px; border: 2px dashed #c9ced6; border-radius: 16px; padding: 28px 16px; cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.st-import-zone:hover, .st-import-zone.is-over { border-color: var(--st-blue); background: var(--st-blue-soft); }
.st-import-zone.is-busy { cursor: default; border-style: solid; }
.st-import-zone > svg { width: 38px; height: 38px; color: var(--st-blue); }
.st-import-zone .st-progress { width: 70%; }
.st-import-title { font-size: 15px; font-weight: 600; }
.st-import-btn { color: var(--st-blue); text-decoration: underline; text-underline-offset: 3px; }
.st-import-small { font-size: 12.5px; color: var(--st-mute); }
.st-import-tips { font-size: 13px; }
.st-canva-link { margin-top: 12px; display: grid; gap: 6px; font-size: 13px; }
.st-canva-link label { font-weight: 700; color: #1f2937; }
.st-canva-link input { width: 100%; height: 40px; border: 1.5px solid #d5dbe3; border-radius: 10px; padding: 0 12px; font: inherit; font-size: 14px; }
.st-canva-link input:focus { outline: none; border-color: #0e7fa8; }
.st-canva-link p { margin: 0; color: #374151; line-height: 1.45; }
.st-canva-link a { color: #0a6587; font-weight: 700; text-decoration: underline; }
.st-canva-link-bad { color: #b91c1c !important; }
.st-note { position: absolute; top: 72px; left: 50%; transform: translateX(-50%); z-index: 12; width: max-content; max-width: min(560px, calc(100% - 32px)); display: flex; align-items: flex-start; gap: 10px; background: #eef6fb; color: #0b4f69; border: 1px solid #bfe0ee; border-radius: 12px; padding: 10px 12px; font-size: 13px; box-shadow: var(--st-shadow); }
.st-note button { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; padding: 0 2px; }

.st-modal-review { width: min(1060px, 100%); display: grid; grid-template-columns: 1.35fr 1fr; }
.st-review-pic { background: var(--st-desk); padding: 40px 32px 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; perspective: 1600px; }
/* The card to turn over: it swings in when the review opens; designPicker.spinCard turns it as it is dragged. */
.st-flip-in { width: min(100%, 520px, calc(60dvh * var(--card-ar, 1))); transform-style: preserve-3d; animation: st-card-in 1s cubic-bezier(.2, .8, .2, 1); }
@keyframes st-card-in { 0% { transform: rotateY(-40deg) rotateX(14deg) translateY(18px) scale(.9); opacity: 0; } 45% { opacity: 1; } 100% { transform: none; } }
.st-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.3, .8, .3, 1); user-select: none; }
.st-blank-back { color: #9aa1ab; font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.st-drag-hint { font-size: 12px; color: var(--st-mute); margin-top: -8px; }
.st-flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #fff; box-shadow: 0 18px 40px rgba(15, 23, 42, .25), 0 2px 6px rgba(15, 23, 42, .15); }
.st-flip-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-face-2 { transform: rotateY(180deg); }
.st-face-3, .st-face-4, .st-face-5 { display: none; }
.st-review-side { padding: 32px 28px 24px; display: flex; flex-direction: column; gap: 12px; }
.st-review-side h2 { font-size: 23px; font-weight: 800; margin: 0 40px 0 0; }
.st-review-sub { color: var(--st-mute); margin: -6px 0 4px; }
.st-issues { display: flex; flex-direction: column; gap: 8px; }
.st-issue { display: flex; gap: 10px; align-items: flex-start; background: #fff8eb; border: 1px solid #f5d9a8; border-radius: 12px; padding: 10px 12px; }
.st-issue svg { color: #b45309; margin-top: 1px; }
.st-issue div { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.st-issue strong { font-size: 13.5px; }
.st-issue .st-link-btn { padding: 0; }
.st-allgood { display: flex; gap: 10px; align-items: flex-start; background: #ecfdf3; border: 1px solid #b7ebc9; color: #14532d; border-radius: 12px; padding: 10px 12px; font-size: 13px; }
.st-allgood svg { color: #16a34a; }
.st-checklist { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; color: var(--st-mute); font-size: 13.5px; }
.st-checklist li { padding-left: 24px; position: relative; }
.st-checklist li::before { content: ''; position: absolute; left: 3px; top: 3px; width: 11px; height: 6px; border-left: 2px solid var(--st-blue); border-bottom: 2px solid var(--st-blue); transform: rotate(-45deg); }
.st-approve { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: #f6f7f9; cursor: pointer; font-weight: 500; margin-top: 4px; }
.st-approve input { width: 20px; height: 20px; accent-color: var(--st-blue); flex: none; margin-top: 1px; }

.st-print-canvas { position: fixed; left: -10000px; top: 0; width: 600px; height: 400px; visibility: hidden; pointer-events: none; }

.st-message { height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 20px; }
.st-message h1 { font-size: 22px; font-weight: 800; }
.st-message a { color: #0e7fa8; text-decoration: underline; }
.st-spinner { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #d9e8ee; border-top-color: #0e7fa8; animation: st-spin .8s linear infinite; }
@keyframes st-spin { to { transform: rotate(360deg); } }

/* ── Smaller screens ── */
@media (max-width: 1100px) {
    .st-legend-long { display: none; }
    .st-panel { position: absolute; left: 84px; top: 0; bottom: 0; box-shadow: var(--st-shadow); }
}

/* Phones: the app layout. Tools along the bottom, panels as sheets over the card, the toolbar for the selected
   item a row that slides sideways, front and back as two tabs. */
@media (max-width: 767px) {
    .st-top { height: 52px; gap: 8px; padding: 0 8px 0 12px; }
    .st-brand-word { display: none; }
    .st-top-name { border-left: 0; padding-left: 4px; }
    .st-top-product { max-width: 34vw; font-size: 13px; }
    .st-top-save { font-size: 11px; }
    .st-hide-phone { display: none !important; }
    .st-price { padding: 0 6px; font-size: 14px; }
    .st-price svg { display: none; }
    .st-next { padding: 0 18px; height: 38px; }
    .st-body { flex-direction: column; }
    .st-rail {
        order: 3; width: auto; height: 64px; flex-direction: row; justify-content: space-around; padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
        border-right: 0; border-top: 1px solid var(--st-line); box-sizing: content-box;
    }
    .st-rail-btn { flex: 1 1 auto; min-width: 0; padding: 4px 0; font-size: 10px; letter-spacing: -.02em; gap: 2px; }
    .st-rail-icon { width: 36px; height: 30px; border-radius: 9px; }
    .st-rail-icon svg { width: 22px; height: 22px; }
    .st-panel {
        position: absolute; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 58%; border-radius: 18px 18px 0 0;
        border-right: 0; box-shadow: 0 -10px 30px rgba(15, 23, 42, .18); z-index: 40; animation: st-sheet .22s cubic-bezier(.2, .9, .3, 1);
    }
    .st-panel::before { content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; border-radius: 2px; background: #d5d9e0; }
    @keyframes st-sheet { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
    .st-stage { order: 1; flex: 1; }
    .st-ctx { top: auto; bottom: 10px; left: 8px; right: 8px; transform: none; max-width: none; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
    .st-ctx::-webkit-scrollbar { display: none; }
    .st-ctx-hint { white-space: normal; font-size: 12.5px; }
    .st-ctx:has(.st-ctx-hint) { display: none; }
    .st-root:not(.st-panel-closed) .st-ctx { display: none; }
    .st-pop { position: fixed; left: 8px; right: 8px; bottom: 76px; top: auto; transform: none; width: auto; animation: none; }
    .st-pop-font { left: 8px; }
    .st-font-list { height: 46dvh; }
    .st-legend { top: 10px; bottom: auto; left: 10px; max-width: calc(100% - 150px); flex-wrap: wrap; row-gap: 4px; }
    .st-legend-help { flex-basis: 100%; font-size: 11px; }
    .st-chip { height: 26px; font-size: 11px; padding: 0 9px; }
    .st-zoom { display: none; }
    .st-turn-chip { display: inline-flex; }
    /* With no side pictures at the top right the chips have the width for one row; a turned card reaches the top, so the note goes. */
    .st-root:not(:has(.st-sides)) .st-legend { max-width: calc(100% - 20px); }
    .st-canvas-wrap.is-turned ~ .st-legend .st-legend-help { display: none; }
    .st-canvas-wrap, .st-canvas-wrap.has-rulers { margin: 44px 0 66px; grid-template-columns: 0 minmax(0, 1fr); grid-template-rows: 0 minmax(0, 1fr); }
    .st-sides { position: absolute; top: 8px; right: 8px; width: auto; flex-direction: row; gap: 6px; padding: 4px; background: #fff; border-radius: 12px; box-shadow: var(--st-shadow); z-index: 12; }
    .st-side { flex-direction: row; padding: 4px 8px; border-radius: 9px; }
    .st-side.is-on { background: var(--st-blue-soft); }
    .st-side-pic { display: none; }
    .st-modal-back { padding: 0; align-items: flex-end; }
    .st-modal { border-radius: 20px 20px 0 0; max-height: 94dvh; width: 100%; }
    .st-modal-review { grid-template-columns: 1fr; }
    .st-review-pic { padding: 48px 20px 16px; }
    .st-review-side { padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
    .st-modal-small { padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
    .st-modal-import { padding: 24px 18px calc(18px + env(safe-area-inset-bottom)); }
    .st-import-zone { min-height: 140px; }
    .st-note { top: 64px; }
}

/* Picture tools: an icon over or beside a short word, as Vistaprint's toolbar */
.st-tool {
    height: 36px; padding: 0 9px; border-radius: 9px; border: 0; background: transparent; flex: none;
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background .15s, color .15s;
}
.st-tool svg { width: 18px; height: 18px; }
.st-tool:hover, .st-tool.is-on { background: #f1f3f6; }
.st-tool-primary { background: var(--st-blue); color: #fff !important; padding: 0 14px; }
.st-tool-primary:hover { background: #0b6c90; }
.st-busy { display: inline-flex; align-items: center; gap: 10px; padding: 0 12px; font-weight: 600; color: var(--st-blue); white-space: nowrap; }
.st-spinner-sm { width: 18px; height: 18px; border-width: 2.5px; }
.st-tool-error { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #fdecea; color: #b42318; border: 1px solid #f5c2bd; border-radius: 10px; padding: 7px 12px; font-size: 13px; font-weight: 500; white-space: nowrap; box-shadow: var(--st-shadow); }
@media (min-width: 768px) {
    .st-ctx { overflow-x: auto; scrollbar-width: thin; }
    .st-ctx:has(.st-pop), .st-ctx:has(.st-tool-error) { overflow: visible; }
}
.st-dot-cell { width: 18px; height: 18px; border-radius: 4px; border: 1px solid #c9ced6; display: block; }
.st-table-row > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.st-table-row .st-link-btn, .st-pop-links .st-link-btn { padding: 0; font-size: 12.5px; }
.st-pop-links { display: flex; gap: 14px; margin-top: 10px; }

/* Colour picker (studioColour in studio.js) */
.st-cp { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.st-pop-colour { width: 272px; }
.cp-sv { position: relative; height: 150px; border-radius: 10px; cursor: crosshair; touch-action: none; }
.cp-knob { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 1px 4px rgba(0, 0, 0, .3); pointer-events: none; }
.st-cp input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 12px; border-radius: 999px; margin: 0; cursor: pointer; }
.st-cp input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 1px 4px rgba(0, 0, 0, .3); }
.st-cp input[type=range]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.cp-hue { background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.cp-alpha-row { display: grid; grid-template-columns: auto 1fr 34px; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--st-mute); }
.cp-alpha-n { font-size: 12px; text-align: right; color: var(--st-ink); }
.cp-alpha {
    background: linear-gradient(to right, var(--cp-solid, #000), transparent),
                repeating-conic-gradient(#d4d7dc 0% 25%, #fff 0% 50%) 0 0 / 8px 8px;
}
.cp-hex-row { display: flex; gap: 8px; }
.cp-hex { flex: 1; min-width: 0; height: 36px; border: 1px solid #c9ced6; border-radius: 9px; padding: 0 10px; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; text-transform: uppercase; }
.cp-hex:focus { outline: 2px solid var(--st-blue); outline-offset: -1px; }
.cp-drop { width: 38px; height: 36px; border: 1px solid #c9ced6; border-radius: 9px; background: #fff; display: flex; align-items: center; justify-content: center; }
.cp-drop:hover, .st-cp.is-dropping .cp-drop { border-color: var(--st-blue); color: var(--st-blue); background: var(--st-blue-soft); }
.cp-drop svg { width: 17px; height: 17px; }
.cp-tabs { display: flex; gap: 18px; border-bottom: 1px solid var(--st-line); }
.cp-tabs button { border: 0; background: none; padding: 4px 0 7px; font-size: 13px; font-weight: 600; color: var(--st-mute); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cp-tabs button.is-on { color: var(--st-ink); border-bottom-color: var(--st-blue); }
.cp-pane h4 { font-size: 12px; font-weight: 600; margin: 4px 0 7px; color: var(--st-ink); text-transform: none; letter-spacing: 0; }
.cp-dots { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; margin-bottom: 6px; }
.cp-dot {
    aspect-ratio: 1; border-radius: 50%; padding: 0; border: 1px solid rgba(0, 0, 0, .14); cursor: pointer;
    background: linear-gradient(var(--c), var(--c)), repeating-conic-gradient(#d4d7dc 0% 25%, #fff 0% 50%) 0 0 / 8px 8px;
    transition: transform .1s;
}
.cp-dot:hover { transform: scale(1.12); }
.st-table-chip { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--st-line); background: #fff; border-radius: 9px; padding: 6px 8px 6px 10px; font-size: 13px; font-weight: 600; color: var(--st-ink); }
.st-table-chip.is-on { border-color: var(--st-blue); }
.st-table-chip i { width: 26px; height: 18px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .15); background: linear-gradient(var(--c), var(--c)), repeating-conic-gradient(#d4d7dc 0% 25%, #fff 0% 50%) 0 0 / 8px 8px; }
.cp-pane-cmyk:not([hidden]) { display: flex; flex-direction: column; gap: 12px; padding-top: 4px; }
.cp-cmyk-row { display: grid; grid-template-columns: 16px 1fr 46px 12px; align-items: center; gap: 8px; }
.cp-cmyk-row b { font-size: 12.5px; }
.cp-cmyk-row input[type=number] { width: 100%; height: 28px; border: 0; border-bottom: 1px solid #c9ced6; text-align: right; font-size: 13px; padding: 0 2px; -moz-appearance: textfield; background: transparent; }
.cp-cmyk-row input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; }
.cp-cmyk-row i { font-style: normal; font-size: 12px; color: var(--st-mute); }
.cp-cmyk-C input[type=range] { background: linear-gradient(to right, #fff, #00aeef); }
.cp-cmyk-M input[type=range] { background: linear-gradient(to right, #fff, #ec008c); }
.cp-cmyk-Y input[type=range] { background: linear-gradient(to right, #fff, #fff200); }
.cp-cmyk-K input[type=range] { background: linear-gradient(to right, #fff, #000); }
.cp-cmyk-row input[type=range] { box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.cp-pane-cmyk p { margin: 0; font-size: 11.5px; color: var(--st-mute); }
/* Tablets and small laptops: the panel floats over the card, so the selected item's bar starts beside it. */
@media (min-width: 768px) and (max-width: 1100px) {
    .st-root:has(.st-panel) .st-ctx { left: 332px; transform: none; max-width: calc(100% - 344px); }
}
/* Text effects panel */
.st-fx { border-top: 1px solid var(--st-line); padding: 14px 0 6px; display: flex; flex-direction: column; gap: 12px; }
.st-fx:first-of-type { border-top: 0; padding-top: 4px; }
.st-fx-range span { display: flex; justify-content: space-between; }
.st-fx-range b { color: var(--st-ink); font-weight: 600; }
/* Right-click menu on the card (studio.js _showMenu) */
.st-menu {
    position: fixed; z-index: 120; min-width: 230px; background: #fff; border-radius: 12px; padding: 6px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .2), 0 1px 3px rgba(15, 23, 42, .12); font-family: inherit; animation: st-fade .1s ease-out;
}
.st-menu button {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 0; background: none;
    padding: 8px 10px; border-radius: 8px; font-size: 13.5px; color: #1f2937; text-align: left; cursor: pointer; font-family: inherit;
}
.st-menu button:hover:not(:disabled), .st-menu button:focus-visible { background: #e6f3f8; outline: none; }
.st-menu button:disabled { color: #5b6472; opacity: .6; cursor: default; }
.st-menu button.is-danger { color: #b42318; }
.st-menu kbd { font-family: inherit; font-size: 12px; color: #5b6472; }
.st-menu hr { border: 0; border-top: 1px solid #e3e6eb; margin: 4px 6px; }
.st-fx-pos { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--st-mute); }
.st-fx-pos .st-seg { display: flex; }
.st-fx-pos .st-seg button { flex: 1; }
/* Mock-ups in the review */
.st-mock-big { width: 100%; max-width: 560px; aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 12px 40px rgba(15, 23, 42, .18); }
.st-mock-big > div { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.st-mock-strip { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; max-width: 100%; }
.st-mock-strip button { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 84px; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--st-mute); }
.st-mock-strip button > img, .st-mock-thumb { width: 84px; height: 64px; border-radius: 10px; border: 2px solid transparent; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); object-fit: contain; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.st-mock-thumb > span { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.st-mock-strip button.is-on > img, .st-mock-strip button.is-on .st-mock-thumb { border-color: var(--st-blue); }
.st-mock-strip button.is-on { color: #0a6587; }
.st-mock-strip span:last-child { max-width: 84px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Check your design for a card that opens (ArtworkSidesPreview's turning book) */
.st-book { position: relative; width: 100%; max-width: 620px; border-radius: 16px; overflow: hidden; background: #f3f4f6; display: flex; align-items: center; justify-content: center; }
.st-mock-opts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; max-width: 100%; }
.st-mock-opts-name { font-size: 12px; font-weight: 700; color: var(--st-ink); margin-right: 2px; }
.st-mock-opts button { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid #d5dbe3; background: #fff; border-radius: 999px; padding: 3px 12px 3px 3px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--st-ink); cursor: pointer; }
.st-mock-opts button:not(:has(img)) { padding-left: 12px; }
.st-mock-opts button img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #f1f3f6; }
.st-mock-opts button.is-on { border-color: var(--st-blue); background: #eef7fb; color: #0a6587; }
.st-staff { display: flex; align-items: center; gap: 14px; margin-right: 6px; }
.st-staff:not(:has(*)) { display: none; }

/* Save to my account (signed-in customers) */
.st-save-btn.is-saved { color: #15803d; border-color: #86efac; background: #f0fdf4; }
.st-save-note {
    position: fixed; top: 70px; right: 18px; z-index: 60; display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid var(--st-line); border-left: 4px solid #16a34a; border-radius: 12px;
    padding: 10px 14px; font-size: 13.5px; color: var(--st-ink); box-shadow: 0 10px 30px rgba(15, 23, 42, .15);
    animation: st-note-in .25s cubic-bezier(.2, .8, .2, 1);
}
.st-save-note svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #16a34a; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.st-save-note a { color: var(--st-blue); font-weight: 700; white-space: nowrap; }
.st-save-note.is-error { border-left-color: #b42318; }
@keyframes st-note-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) { .st-save-note { left: 12px; right: 12px; top: 62px; flex-wrap: wrap; } }

/* Phones on their side (short screens): the card gets the height. A slimmer top bar, no rulers or hint bar,
   the canvas from edge to edge, and the guides key and zoom floating over the desk beside the card. */
@media (max-height: 500px) and (orientation: landscape) {
    .st-top { height: 44px; }
    .st-next { height: 34px; }
    .st-brand-word { display: none; }
    .st-canvas-wrap, .st-canvas-wrap.has-rulers { margin: 0; grid-template-columns: 0 minmax(0, 1fr); grid-template-rows: 0 minmax(0, 1fr); }
    .st-ruler-corner, .st-ruler-h, .st-ruler-v { display: none; }
    .st-ctx:has(.st-ctx-hint) { display: none; }
    .st-ctx { top: 6px; }
    .st-legend { left: 8px; bottom: 8px; top: auto; }
    .st-legend-help { display: none; }
    .st-chip { height: 26px; font-size: 11px; padding: 0 9px; }
    .st-zoom { right: 8px; bottom: 8px; }
}
@media (max-height: 500px) and (orientation: landscape) and (min-width: 768px) {
    .st-rail { width: 64px; padding: 4px; overflow-y: auto; scrollbar-width: none; }
    .st-rail-btn { padding: 5px 2px 4px; gap: 2px; font-size: 10px; }
    .st-rail-icon { width: 32px; height: 30px; border-radius: 9px; }
    .st-rail-icon svg { width: 20px; height: 20px; }
    .st-panel { left: 64px; }
    .st-sides { width: 76px; gap: 8px; padding: 6px; }
    .st-side-pic { width: 60px; }
}
/* Phones upright and on their side below 768px wide keep the app layout; on their side the card has no gaps. */
@media (max-width: 767px) and (max-height: 500px) and (orientation: landscape) {
    .st-top { height: 44px; }
    .st-rail { height: 50px; }
    .st-rail-btn span:not(.st-rail-icon) { display: none; }
    .st-legend { top: auto; }
}
/* A long press on a tool should not select its word (phones). */
.st-rail, .st-sides, .st-zoom, .st-legend { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }

/* A bound product (a wire notebook): its wire (drawn once, designPicker.wireOverlay) over the card in Check your design. */
.bp-wired .st-flip-face::after { content: ""; position: absolute; inset: 0; background: var(--bp-wire) 0 0 / 100% 100% no-repeat; pointer-events: none; }
.bp-wired.bp-wire-mirror .st-face-2::after { transform: scaleX(-1); }
