/* WASecret Studio: editor layout on top of the shared Bloom theme (../shared/theme.css). */
:root { --rail: 76px; --side: 320px; --props: 292px; --barh: 57px; --checker: repeating-conic-gradient(#eceef6 0% 25%, #ffffff 0% 50%) 0 0 / 18px 18px; }
html, body { overflow: hidden; }
body.start { overflow: auto; }
.st-grow { flex: 1; }
.btn.small { padding: 5px 10px; font-size: 13px; border-radius: 9px; }
.btn.icon { min-width: 36px; padding: 6px 8px; font-size: 17px; line-height: 1; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { color: #be123c; }
.btn.danger:hover { background: #fff1f2; border-color: #fecdd3; }
.btn.chip { border-radius: 999px; padding: 6px 13px; font-size: 13px; }
.btn.chip.on { background: #efedff; border-color: var(--sel); color: var(--accent); font-weight: 650; }
.st-full { width: 100%; justify-content: center; }
.st-hint { color: var(--muted); font-size: 12.5px; margin: 6px 0 10px; line-height: 1.45; }
.st-empty { color: var(--muted); padding: 16px 4px; grid-column: 1 / -1; }
.st-status { font-size: 13px; color: var(--fg); min-height: 1.2em; margin: 8px 0; }
.st-status.warn { color: #9a3412; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 8px 10px; }
.st-toast { animation: toast .25s var(--ease); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }

/* ---------- top bar ---------- */
.st-bar { flex-wrap: nowrap; min-height: var(--barh); }
.st-brandname { font-size: 16px; }
body.start .st-edonly { display: none !important; }
.st-name { width: min(280px, 26vw); font-weight: 600; border-color: transparent; background: transparent; }
.st-name:hover, .st-name:focus { border-color: #d9dcea; background: #fff; }
.st-saved { color: var(--muted); font-size: 12px; white-space: nowrap; }
.st-tools { display: flex; align-items: center; gap: 6px; }
.st-zoom { display: inline-flex; align-items: center; gap: 2px; }
.st-zpct { min-width: 64px; font-variant-numeric: tabular-nums; font-size: 13px; }

/* ---------- start screen ---------- */
.st-start { max-width: 1240px; margin: 0 auto; padding: 18px 20px 80px; animation: rise .35s var(--ease); }
.st-hero { text-align: center; padding: 34px 16px 22px; background: radial-gradient(1200px 260px at 50% -40px, rgba(91, 76, 240, .16), transparent 70%); border-radius: 24px; }
.st-hero h1 { margin: 0 0 6px; font-size: clamp(26px, 4vw, 40px); letter-spacing: -.02em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.st-hero p { margin: 0 auto 18px; color: var(--muted); max-width: 560px; }
.st-bigsearch { width: min(620px, 100%); padding: 13px 16px; border-radius: 14px; font-size: 15px; box-shadow: var(--shadow); }
.st-groupchips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 14px 0 6px; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.st-block { margin-top: 26px; }
.st-blockhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.st-blockhead h2 { margin: 0; font-size: 19px; }
.st-pgroup { margin-bottom: 16px; }
.st-pgroup h3 { margin: 0 0 8px; font-size: 14px; display: flex; gap: 10px; align-items: baseline; }
.st-pgroup h3 small { color: var(--muted); font-weight: 400; }
.st-prow { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.st-preset { display: grid; grid-template-columns: 54px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 10px; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; cursor: pointer; font: inherit; color: var(--fg); transition: transform .18s var(--ease), box-shadow .18s, border-color .18s; }
.st-preset:hover, .st-preset:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfc9ff; outline: none; }
.st-pshape { grid-row: span 2; display: grid; place-items: center; width: 54px; height: 54px; background: #f5f4ff; border-radius: 10px; }
.st-pshape i { display: block; background: var(--grad); border-radius: 3px; opacity: .85; }
.st-plabel { font-weight: 600; font-size: 13.5px; line-height: 1.25; }
.st-preset small { color: var(--muted); font-size: 12px; }
.st-custom { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.st-custom .ad-input { width: 86px; padding: 6px 8px; }
.st-custom select.ad-input { width: auto; }
.st-recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.st-rcard { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; animation: pop .3s var(--ease); }
.st-rthumbbtn { border: 0; padding: 0; background: var(--checker); cursor: pointer; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; }
.st-rthumbbtn img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.st-noth { color: var(--muted); font-size: 12px; }
.st-rmeta { padding: 8px 10px 10px; display: grid; gap: 2px; }
.st-rmeta strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-rmeta small { color: var(--muted); font-size: 11.5px; }
.st-rmeta .btn { justify-self: start; margin-top: 4px; }
.st-emptystate { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 18px; border: 2px dashed #ddd9ff; border-radius: 16px; background: linear-gradient(180deg, #fff, #faf9ff); color: var(--muted); }
.st-emptystate p { margin: 0; }
.st-tgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-tgrid-lg { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.st-tcard { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--line); background: #fff; border-radius: 14px; cursor: pointer; text-align: left; font: inherit; color: var(--fg); transition: transform .18s var(--ease), box-shadow .18s, border-color .18s; }
.st-tcard:hover, .st-tcard:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfc9ff; outline: none; }
.st-tthumb { aspect-ratio: 1; display: grid; place-items: center; background: #f5f5fa; border-radius: 10px; overflow: hidden; }
.st-tthumb svg { max-width: 100%; max-height: 100%; width: auto; height: auto; display: block; box-shadow: 0 2px 10px rgba(27, 33, 51, .12); }
.st-tname { font-weight: 600; font-size: 13px; line-height: 1.25; }
.st-tmeta { color: var(--muted); font-size: 11.5px; }

/* ---------- editor layout ---------- */
.st-editor { display: grid; grid-template-columns: var(--rail) auto minmax(0, 1fr) var(--props); height: calc(100dvh - var(--barh)); }
.st-rail { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; gap: 2px; padding: 8px 6px; background: var(--bar); border-right: 1px solid var(--line); overflow-y: auto; scrollbar-width: none; }
.st-railbtn { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 2px; border: 0; background: none; border-radius: 12px; color: var(--muted); font: 600 11px/1.1 system-ui, sans-serif; cursor: pointer; transition: background .15s, color .15s; }
.st-railbtn:hover { background: var(--hover); color: var(--fg); }
.st-railbtn.on { background: #efedff; color: var(--accent); }
.st-railbtn[data-panel=edit] { display: none; }
.st-side { grid-column: 2; grid-row: 1; width: var(--side); background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; animation: slidein .2s var(--ease); }
@keyframes slidein { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.st-sidehead, .st-propshead { display: flex; align-items: center; gap: 6px; padding: 12px 14px 6px; }
.st-sidehead h2, .st-propshead h2 { margin: 0; font-size: 16px; flex: 1; }
.st-side-body, .st-props-body { overflow-y: auto; padding: 4px 14px 24px; min-height: 0; flex: 1; }
.st-props { grid-column: 4; grid-row: 1; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.st-props-close { display: none; }
.st-center { grid-column: 3; grid-row: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.st-viewport { position: relative; flex: 1; overflow: hidden; background: radial-gradient(circle at 50% 40%, #f7f7fc, #eceef6); touch-action: none; outline: none; cursor: default; user-select: none; -webkit-user-select: none; }
.st-viewport.can-pan, .st-viewport.panning { cursor: grab; }
.st-viewport.drop { box-shadow: inset 0 0 0 3px var(--sel); }
.st-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.st-page { position: relative; background: #fff; box-shadow: 0 2px 6px rgba(27, 33, 51, .08), 0 18px 50px rgba(27, 33, 51, .14); }
.st-page.transparent { background: var(--checker); }
.st-bg { position: absolute; inset: 0; pointer-events: none; }
.st-bg svg { display: block; }
.st-guides { position: absolute; left: 0; top: 0; pointer-events: none; }
.st-guides svg { overflow: visible; }
.st-layer { position: absolute; transform-origin: 50% 50%; cursor: move; }
.st-layer.locked { cursor: default; }
.st-layer > svg { display: block; overflow: visible; pointer-events: none; }
.st-layer[data-type=text] > svg text { font-kerning: none; }
.st-layer.editing { cursor: text; }
.st-layer.editing > svg { visibility: hidden; }
.st-layer.cropping { outline: 2px dashed var(--sel); }
.st-edit { position: absolute; inset: 0; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; cursor: text; font-kerning: none; font-variant-ligatures: none; user-select: text; -webkit-user-select: text; min-height: 100%; }
.st-overlay { position: absolute; inset: 0; pointer-events: none; }
.st-overlay > * { position: absolute; }
.st-hover { border: 1.5px solid #8b80f5; border-radius: 2px; transform-origin: 50% 50%; }
.st-multi { border-style: dashed; }
.st-selbox { border: 2px solid var(--sel); transform-origin: 50% 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .6); }
.st-selbox.locked { border-color: #94a3b8; border-style: dashed; }
.st-selbox.editing { border-style: dashed; }
.st-groupbox { border-style: dashed; }
.st-cropbox { border-color: #f59e0b; }
.st-handle { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--sel); border-radius: 50%; transform: translate(-50%, -50%); pointer-events: auto; box-shadow: 0 1px 4px rgba(27, 33, 51, .25); touch-action: none; }
.st-handle.h-n, .st-handle.h-s { width: 22px; height: 10px; border-radius: 6px; }
.st-handle.h-e, .st-handle.h-w { width: 10px; height: 22px; border-radius: 6px; }
.h-nw { left: 0; top: 0; cursor: nwse-resize; } .h-n { left: 50%; top: 0; cursor: ns-resize; } .h-ne { left: 100%; top: 0; cursor: nesw-resize; }
.h-e { left: 100%; top: 50%; cursor: ew-resize; } .h-se { left: 100%; top: 100%; cursor: nwse-resize; } .h-s { left: 50%; top: 100%; cursor: ns-resize; }
.h-sw { left: 0; top: 100%; cursor: nesw-resize; } .h-w { left: 0; top: 50%; cursor: ew-resize; }
.st-rot { position: absolute; left: 50%; top: calc(100% + 26px); width: 26px; height: 26px; transform: translate(-50%, -50%); border-radius: 50%; background: #fff; border: 2px solid var(--sel); pointer-events: auto; cursor: grab; box-shadow: 0 1px 4px rgba(27, 33, 51, .25); touch-action: none; }
.st-rot::after { content: "↻"; position: absolute; inset: 0; display: grid; place-items: center; color: var(--accent); font: 700 14px/1 system-ui; }
.st-lockbadge { position: absolute; right: -10px; top: -12px; font-size: 13px; background: #fff; border-radius: 8px; padding: 1px 3px; box-shadow: var(--shadow); }
.st-guide { background: #f43f5e; }
.st-guide.v { width: 1px; }
.st-guide.hz { height: 1px; }
.st-guide.center { background: #a64bf4; }
.st-band { border: 1px solid var(--sel); background: rgba(91, 76, 240, .08); }
.st-label { background: var(--fg); color: #fff; font: 600 11px/1 system-ui; padding: 5px 7px; border-radius: 7px; white-space: nowrap; }
.st-ghost { width: 60px; height: 60px; border-radius: 10px; background-size: cover; background-position: center; box-shadow: var(--shadow); opacity: .85; border: 2px solid #fff; }
.st-merchchip { position: absolute; right: 14px; top: 12px; z-index: 5; box-shadow: var(--shadow); border-radius: 999px; font-weight: 600; }
.st-pagebar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bar); border-top: 1px solid var(--line); min-height: 62px; }
.st-pthumbs { display: flex; gap: 8px; overflow-x: auto; flex: 1; padding: 2px; scrollbar-width: thin; }
.st-pthumb { position: relative; flex: none; padding: 3px; background: #fff; border: 2px solid var(--line); border-radius: 9px; cursor: pointer; display: grid; place-items: center; min-width: 40px; }
.st-pthumb.on { border-color: var(--sel); }
.st-pthumb svg { display: block; box-shadow: 0 1px 3px rgba(0, 0, 0, .1); pointer-events: none; }
.st-pnum { position: absolute; left: 3px; top: 2px; font: 700 10px/1 system-ui; color: #fff; background: rgba(27, 33, 51, .6); padding: 2px 4px; border-radius: 5px; z-index: 1; }
.st-pacts { display: flex; align-items: center; gap: 4px; flex: none; }
.st-pinfo { color: var(--muted); font-size: 12px; margin-right: 6px; }

/* ---------- panel contents ---------- */
.st-sec { padding: 10px 0 12px; border-bottom: 1px solid #f0f1f7; }
.st-sec:last-child { border-bottom: 0; }
.st-sec h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.st-sec h4 { font-size: 12px; color: var(--muted); margin: 10px 0 6px; font-weight: 600; }
.st-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.st-row.st-end { justify-content: flex-end; }
.st-wrap { flex-wrap: wrap; }
.st-lab { min-width: 74px; color: var(--fg); font-size: 13px; }
.st-slider { display: grid; grid-template-columns: 92px 1fr 46px; gap: 8px; align-items: center; margin: 6px 0; }
.st-slider input { width: 100%; accent-color: var(--accent); }
.st-slider output { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.st-field { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.st-field .ad-input { width: 100%; }
.st-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0; }
.st-grid2 .span2 { grid-column: span 2; }
.st-num { padding: 6px 8px; }
.st-color { width: 40px; height: 34px; padding: 2px; border: 1px solid #d9dcea; border-radius: 9px; background: #fff; cursor: pointer; }
.st-seg { display: inline-flex; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.st-seg .btn { border: 0; border-radius: 0; padding: 6px 10px; min-width: 34px; }
.st-seg .btn + .btn { border-left: 1px solid var(--line); }
.st-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 6px 0; cursor: pointer; }
.st-check input { accent-color: var(--accent); width: 16px; height: 16px; }
.st-check small { color: var(--muted); margin-left: auto; font-size: 11.5px; }
.st-sub { padding: 4px 0 6px 24px; }
.st-search { width: 100%; margin: 6px 0 4px; }
.st-egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 6px; }
.st-ebtn, .st-sbtn, .st-ubtn, .st-layout { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 6px; cursor: pointer; display: grid; place-items: center; transition: background .15s, border-color .15s, transform .15s var(--ease); }
.st-ebtn:hover, .st-sbtn:hover, .st-ubtn:hover, .st-layout:hover { background: #f5f4ff; border-color: #cfc9ff; transform: translateY(-1px); }
.st-ebtn.st-wide { grid-column: span 2; font: 600 12.5px/1.2 system-ui; color: var(--fg); padding: 10px 6px; }
.st-sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.st-sbtn svg { width: 44px; height: 44px; }
.st-textbtn { display: block; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; margin: 0 0 8px; cursor: pointer; color: var(--fg); transition: background .15s, border-color .15s; }
.st-textbtn:hover { background: #f5f4ff; border-color: #cfc9ff; }
.st-textbtn.h1 { font-size: 24px; } .st-textbtn.h2 { font-size: 17px; } .st-textbtn.h3 { font-size: 13.5px; }
.st-tstyles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-tstyle { border: 1px solid var(--line); background: #fafafe; border-radius: 12px; padding: 14px 6px; cursor: pointer; font-size: 18px; }
.st-tstyle:hover { border-color: #cfc9ff; background: #f5f4ff; }
.st-fontlist { display: grid; gap: 6px; }
.st-fontbtn { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 9px 12px; font-size: 15px; cursor: pointer; }
.st-fontbtn:hover { border-color: #cfc9ff; background: #f5f4ff; }
.st-dropzone { border: 2px dashed #d9d4ff; border-radius: 14px; padding: 18px 12px; text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0; background: #fbfaff; }
.st-dropzone.on { border-color: var(--sel); background: #f3f1ff; }
.st-ugrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0; }
.st-ubtn { padding: 0; overflow: hidden; aspect-ratio: 1; }
.st-ubtn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.st-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #d9dcea; cursor: pointer; padding: 0; transition: transform .15s var(--ease); }
.st-swatch:hover { transform: scale(1.1); }
.st-swatch.on { box-shadow: 0 0 0 2px var(--sel); }
.st-swatch.st-none { background: var(--checker) !important; }
.st-swwrap { position: relative; display: inline-flex; }
.st-swx { position: absolute; right: -6px; top: -6px; width: 17px; height: 17px; border-radius: 50%; border: 0; background: var(--fg); color: #fff; font-size: 11px; line-height: 1; cursor: pointer; display: none; padding: 0; }
.st-swwrap:hover .st-swx, .st-swwrap:focus-within .st-swx { display: block; }
.st-swadd { display: inline-flex; gap: 4px; align-items: center; }
.st-gradients { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.st-grad { aspect-ratio: 1.4; border-radius: 10px; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06); }
.st-layers { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.st-layerrow { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font-size: 13px; transition: transform .12s; }
.st-layerrow.on { border-color: var(--sel); background: #f5f4ff; }
.st-layerrow.hidden { opacity: .55; }
.st-layerrow.dragging { position: relative; z-index: 2; box-shadow: var(--shadow); transition: none; }
.st-layerrow.drop-before { box-shadow: 0 -3px 0 var(--sel); }
.st-grip { cursor: grab; color: #a3a9bb; padding: 0 2px; touch-action: none; letter-spacing: -2px; }
.st-lthumb { width: 36px; height: 28px; display: grid; place-items: center; background: #f5f5fa; border-radius: 6px; overflow: hidden; flex: none; }
.st-lname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-magic { display: grid; gap: 2px; width: 100%; text-align: left; padding: 12px 14px; margin: 0 0 8px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg, #fff, #faf9ff); cursor: pointer; font: inherit; color: var(--fg); transition: transform .15s var(--ease), border-color .15s, box-shadow .15s; }
.st-magic:hover { transform: translateY(-1px); border-color: #cfc9ff; box-shadow: var(--shadow); }
.st-magic strong { font-size: 14px; }
.st-magic span { font-size: 12.5px; color: var(--muted); }
.st-resize-list { max-height: 46vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px 10px; margin: 8px 0 12px; }
.st-resize-list h4 { margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
.st-results { display: grid; gap: 8px; }
.st-result { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 8px; animation: pop .3s var(--ease); }
.st-result small { display: block; color: var(--muted); font-size: 11.5px; }
.st-rthumb svg { display: block; max-width: 120px; max-height: 90px; width: auto; height: auto; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.st-progress { width: 100%; height: 8px; accent-color: var(--accent); }
.st-animlist { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); }
.st-mockimg { width: 100%; border-radius: 14px; margin: 10px 0; box-shadow: var(--shadow); background: #f3f2fb; min-height: 120px; }
.st-layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.st-layout.on { border-color: var(--sel); background: #f3f1ff; }
.st-mwgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.st-mw textarea { width: 100%; resize: vertical; }
.st-alignbar { display: flex; flex-wrap: wrap; gap: 4px; }
.st-filebtn { display: inline-flex; }
.st-filebtn .btn.st-full { width: 100%; }
.st-filebtn:has(.st-full) { display: flex; }

/* ---------- export dialog ---------- */
.st-dlg { display: grid; gap: 12px; padding: 22px; width: min(420px, calc(100vw - 32px)); }
.st-dlg h2 { margin: 0; }

/* ---------- present mode ---------- */
.st-present { position: fixed; inset: 0; z-index: 100; background: #0b0d14; display: grid; place-items: center; outline: none; animation: fadein .25s ease; touch-action: pan-y; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.st-present canvas { display: block; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.st-present-bar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: center; background: rgba(255, 255, 255, .12); backdrop-filter: blur(10px); padding: 6px 10px; border-radius: 999px; color: #fff; opacity: .35; transition: opacity .2s; }
.st-present:hover .st-present-bar, .st-present-bar:focus-within { opacity: 1; }
.pbtn { border: 0; background: transparent; color: #fff; font-size: 18px; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; }
.pbtn:hover { background: rgba(255, 255, 255, .15); }
.pcount { font: 600 13px/1 system-ui; min-width: 54px; text-align: center; }
button.pcount { border: 0; background: transparent; color: #fff; cursor: pointer; padding: 8px 6px; border-radius: 8px; }
button.pcount:hover { background: rgba(255, 255, 255, .15); }
.pbtn.on { background: #5b4cf0; }
.st-pstage { position: relative; display: grid; place-items: center; }
.st-pstage > canvas { grid-area: 1 / 1; }
.st-present .st-pink { box-shadow: none; position: relative; z-index: 2; cursor: pointer; touch-action: none; }
.st-present[data-pen] .st-pink { cursor: crosshair; }
.st-present[data-pen=""] .st-pink { cursor: pointer; }
.st-pold { z-index: 1; pointer-events: none; }
.st-pfx { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.st-present.fx-blur .st-pstage { filter: blur(14px); transition: filter .3s; }
.st-present.fx-curtain .st-pstage::after { content: ""; position: absolute; inset: -40px; z-index: 3; background: repeating-linear-gradient(90deg, #7f1d1d 0 28px, #991b1b 28px 56px); animation: curtain .6s ease both; }
@keyframes curtain { from { transform: scaleY(0); transform-origin: top; } to { transform: scaleY(1); transform-origin: top; } }
.fx-shh { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font: 800 64px/1 system-ui, sans-serif; color: #fff; background: rgba(15, 23, 42, .75); padding: 24px 40px; border-radius: 24px; }
.st-fx { position: absolute; inset: 0; }
.fx-confetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 2px; animation: confetti 3.2s linear forwards; }
@keyframes confetti { to { top: 110%; transform: rotate(720deg) translateX(40px); } }
.fx-bubbles i { position: absolute; bottom: -100px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .9), rgba(125, 211, 252, .35) 60%, rgba(125, 211, 252, .1)); animation: bubbles 3.6s ease-in forwards; }
@keyframes bubbles { to { bottom: 110%; opacity: .2; } }
.st-ptools { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); padding: 6px; border-radius: 999px; z-index: 6; }
.st-ptools .pbtn { width: auto; padding: 0 12px; font-size: 13px; border-radius: 999px; }
.st-pkeys { position: fixed; inset: auto auto 50% 50%; transform: translate(-50%, 50%); z-index: 7; background: #fff; color: #1b2133; border-radius: 16px; padding: 18px 22px; width: min(520px, 92vw); max-height: 80vh; overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .5); }
.st-pkeys h3 { margin: 0 0 10px; }
.st-pkeys dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; font-size: 14px; }
.st-pkeys dd { margin: 0; }
.st-pkeys .pbtn { color: #1b2133; background: #efedff; width: auto; padding: 0 16px; border-radius: 10px; font-size: 14px; }
.st-ptimer-big { position: fixed; top: 18px; right: 22px; z-index: 6; font: 700 34px/1 ui-monospace, monospace; color: #fff; background: rgba(15, 23, 42, .7); padding: 10px 16px; border-radius: 14px; }
.st-pgoto { position: fixed; bottom: 76px; left: 50%; transform: translateX(-50%); z-index: 7; display: flex; gap: 8px; align-items: center; background: #fff; color: #1b2133; padding: 10px 14px; border-radius: 14px; font: 600 14px system-ui, sans-serif; }
.st-pgoto input { width: 70px; margin-left: 8px; padding: 6px 8px; border: 1px solid #d9dcea; border-radius: 8px; }
.st-pgoto .pbtn { color: #fff; background: #5b4cf0; width: auto; padding: 0 14px; border-radius: 10px; font-size: 14px; }
.st-precdot { position: fixed; top: 18px; left: 22px; z-index: 6; color: #fff; font: 600 13px system-ui, sans-serif; background: rgba(190, 18, 60, .85); padding: 8px 12px; border-radius: 999px; }
.st-precdot::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #fff; margin-right: 8px; animation: ads-pulse 1s infinite; }
.st-present.presenter { grid-template-columns: 1fr min(420px, 32vw); gap: 24px; padding: 24px; place-items: center stretch; }
.st-present.presenter .st-pstage { justify-self: center; }
.st-pside { align-self: stretch; display: flex; flex-direction: column; gap: 10px; color: #e2e8f0; overflow: auto; padding-bottom: 80px; }
.st-pside h3 { margin: 8px 0 0; font: 700 12px/1 system-ui, sans-serif; text-transform: uppercase; letter-spacing: .08em; color: #94a3b8; }
.st-pside canvas { box-shadow: none; border-radius: 8px; max-width: 100%; }
.st-pclock { display: flex; align-items: center; gap: 10px; font: 700 30px/1 ui-monospace, monospace; color: #fff; }
.st-pnotes-view { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 12px 14px; font: 17px/1.5 system-ui, sans-serif; white-space: pre-wrap; flex: 1; min-height: 120px; }
.st-pmenu { position: fixed; z-index: 70; background: #fff; border: 1px solid #e4e6ef; border-radius: 14px; box-shadow: 0 14px 40px rgba(27, 33, 51, .18); padding: 6px; width: 290px; display: grid; gap: 2px; }
.st-pmenu-item { display: grid; gap: 2px; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: #1b2133; font: 14px/1.3 system-ui, sans-serif; }
.st-pmenu-item:hover, .st-pmenu-item:focus-visible { background: #f1f0fb; outline: none; }
.st-pmenu-item small { color: #657089; font-size: 12px; }
.st-pthumb.is-hidden svg { opacity: .35; }
/* Print option "Rounded corners": preview the die-cut corners on the page (1/8 in radius). */
.st-page.rounded-corners::after { content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 3;
  background: radial-gradient(circle at 100% 100%, transparent 11.5px, #ebedf3 12.5px) 0 0 / 12px 12px no-repeat, radial-gradient(circle at 0 100%, transparent 11.5px, #ebedf3 12.5px) 100% 0 / 12px 12px no-repeat,
    radial-gradient(circle at 100% 0, transparent 11.5px, #ebedf3 12.5px) 0 100% / 12px 12px no-repeat, radial-gradient(circle at 0 0, transparent 11.5px, #ebedf3 12.5px) 100% 100% / 12px 12px no-repeat; }
.st-palettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.st-palette { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line, #e4e6ef); border-radius: 12px; overflow: hidden; padding: 0; background: #fff; cursor: pointer; text-align: left; }
.st-palette i { display: block; height: 30px; }
.st-palette span { grid-column: 1 / -1; padding: 6px 8px; font: 600 12px/1.2 system-ui, sans-serif; color: #1b2133; }
.st-palette:hover { border-color: #cfc9ff; box-shadow: 0 4px 14px rgba(27, 33, 51, .08); }
.st-fontpairs { display: grid; gap: 6px; }
.st-fontpair { justify-content: flex-start; }
.st-layouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-layout { display: grid; gap: 4px; padding: 6px; text-align: left; font: 600 12px/1.2 system-ui, sans-serif; color: #1b2133; }
.st-layout svg { background: #f6f7fb; border-radius: 6px; display: block; }
.st-proof { display: grid; gap: 6px; margin: 6px 0 10px; }
.st-proofrow { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: #fff7ed; border: 1px solid #fed7aa; font-size: 12.5px; }
.st-proofrow[data-kind=lowres] { background: #fef2f2; border-color: #fecaca; }
.st-ok { padding: 10px 12px; border-radius: 10px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; font-size: 13px; margin: 6px 0; }
.st-hint.warn { color: #b91c1c; }
.st-pcam { position: absolute; right: 18px; bottom: 18px; width: 22%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid #fff; z-index: 4; pointer-events: none; }
.st-page.finish-gloss::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .45) 45%, rgba(255, 255, 255, 0) 60%); }
/* Print effect previews (screen only; the PDF stays normal ink). */
.st-page.fx-foil .st-layer[data-type=text] > svg { filter: sepia(1) saturate(3.4) hue-rotate(-12deg) brightness(1.08) drop-shadow(0 0 1.5px rgba(255, 214, 120, .9)) drop-shadow(0 1px 0 rgba(120, 80, 0, .45)); }
.st-page.fx-raised .st-layer[data-type=text] > svg { filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .75)) drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.st-mockgrid { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.st-mockgrid h4 { flex-basis: 100%; margin: 6px 0 0; font-size: 12px; color: var(--muted, #657089); }
.st-mockgrid .btn.on { background: #efedff; border-color: #8b80f5; color: #4338ca; }
.st-pthumb.is-hidden::after { content: "hidden"; position: absolute; right: 3px; bottom: 2px; font: 700 9px/1 system-ui; color: #fff; background: rgba(27, 33, 51, .7); padding: 2px 4px; border-radius: 4px; }
.st-present-more { min-width: 30px; padding: 0 4px; margin-left: -4px; }
@keyframes ads-pulse { 50% { opacity: .35; } }
.st-noscript { padding: 20px; text-align: center; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  :root { --barh: 52px; }
  .st-hide-sm { display: none !important; }
  .st-bar { gap: 6px; padding: 7px 10px; }
  .st-brandname { display: none; }
  body.editing .st-bar .ad-brand { display: none; }
  #homeBtn { padding: 6px 8px; }
  .st-name { width: 0; flex: 1; min-width: 60px; font-size: 13px; }
  .st-grow { display: none; }
  .st-tools { gap: 4px; }
  .st-tools .btn { padding: 6px 9px; }
  .st-editor { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--barh)); }
  .st-center { grid-column: 1; padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .st-rail { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; flex-direction: row; gap: 2px; padding: 6px 6px max(6px, env(safe-area-inset-bottom)); overflow-x: auto; overflow-y: hidden; border-right: 0; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .97); backdrop-filter: blur(12px); box-shadow: 0 -6px 20px rgba(27, 33, 51, .08); }
  .st-railbtn { flex: none; min-width: 60px; padding: 6px 4px; }
  .st-railbtn[data-panel=edit] { display: flex; }
  body:not(.has-sel) .st-railbtn[data-panel=edit] span::after { content: ""; }
  .st-side, .st-props { position: fixed; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); width: auto; height: min(58dvh, 520px); z-index: 35; border: 0; border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: 0 -14px 34px rgba(27, 33, 51, .18); animation: rise .22s var(--ease); }
  .st-sidehead::before, .st-propshead::before { content: ""; position: absolute; left: 50%; top: 6px; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: #d9dcea; }
  .st-sidehead, .st-propshead { position: relative; padding-top: 16px; }
  .st-props { display: none; }
  .st-props.open { display: flex; }
  .st-props-close { display: inline-flex; }
  .st-pagebar { min-height: 0; padding: 6px 8px; gap: 6px; }
  .st-pthumb svg { max-height: 40px; width: auto; }
  .st-pacts .btn { padding: 5px 8px; }
  .st-tgrid-lg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .st-prow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-recent { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-start { padding: 10px 12px 60px; }
  .st-hero { padding: 22px 10px 16px; }
  .st-custom { width: 100%; }
  .st-merchchip { top: 8px; right: 8px; font-size: 12.5px; padding: 6px 10px; }
  .ad-toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .st-handle { width: 18px; height: 18px; }
  .st-rot { width: 30px; height: 30px; }
}
@media (prefers-reduced-motion: reduce) { .st-start, .st-side, .st-rcard, .st-result { animation: none; } }

/* ---------- inside the shared editor frame (../shared/editor-shell.js) ---------- */
html.ad-shell-on .st-bar, html.ad-shell-on #rail, html.ad-shell-on #side { display: none !important; }
html.ad-shell-on #toast { z-index: 80; }
.st-shell .st-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; height: 100%; min-height: 0; }
.st-shell .st-center { grid-column: 1; }
.st-shell .st-props { grid-column: 2; width: var(--props); display: none; box-shadow: -8px 0 24px rgba(27, 33, 51, .08); }
.st-shell .st-props.open { display: flex; }
.st-shell .st-props-close { display: inline-flex; }
/* narrow canvas (small laptop with a side panel open): the right panel floats over the canvas instead of squeezing it */
.st-shell .st-editor { position: relative; }
@media (min-width: 760px) { .st-shell[data-cw="s"] .st-props.open { position: absolute; top: 0; right: 0; bottom: 0; z-index: 25; max-width: 100%; } }
.st-shell .st-viewport { background: transparent; }
.st-shell .st-pagebar { background: rgba(255, 255, 255, .72); backdrop-filter: blur(8px); border-top: 1px solid #e4e6ef; min-height: 0; padding: 6px 12px; }
.st-shell .st-pthumb { border-radius: 8px; }
.st-shell .st-pthumb.on { border-color: #5b4cf0; box-shadow: 0 0 0 2px rgba(91, 76, 240, .25); }
.st-shell .st-pacts [data-act=add] { border-radius: 10px; white-space: nowrap; }
.st-addmenu { display: none; }
/* Canva's top bar has no separate Download icon (it is in Share > Download and File > Download). */
html.ad-shell-on .ads-top #downloadBtn { display: none !important; }
/* Canva page strip (desktop): the page thumbnails centred above the bottom bar with a "+" tile and a ▾ page menu right
   after them; move/duplicate/delete show on hover (also in the ▾ menu and on right-click). */
@media (min-width: 760px) {
  .st-shell .st-pagebar { justify-content: center; background: transparent; backdrop-filter: none; border-top: 0; padding: 8px 12px 10px; gap: 8px; }
  .st-shell .st-pthumbs { flex: 0 1 auto; min-width: 0; }
  .st-shell .st-pacts { gap: 4px; }
  .st-shell .st-pacts .st-pinfo { display: none; }
  .st-shell .st-pacts [data-act=left], .st-shell .st-pacts [data-act=right], .st-shell .st-pacts [data-act=dup], .st-shell .st-pacts [data-act=del] { opacity: 0; transition: opacity .15s; }
  .st-shell .st-pagebar:hover .st-pacts [data-act], .st-shell .st-pagebar:focus-within .st-pacts [data-act] { opacity: 1; }
  .st-shell .st-pacts [data-act=add] { order: -2; display: grid; place-items: center; width: 64px; min-height: 46px; padding: 0; font-size: 0; border-radius: 10px 0 0 10px; background: #fff; color: #1b2133; border: 1px solid #d9dcea; box-shadow: none; }
  .st-shell .st-pacts [data-act=add]::before { content: "+"; font-size: 28px; font-weight: 300; line-height: 1; }
  .st-shell .st-pacts [data-act=add]:hover { background: #f4f3ff; }
  .st-shell .st-addmenu { order: -1; display: grid; place-items: center; width: 28px; min-height: 46px; padding: 0; margin-left: -5px; border-radius: 0 10px 10px 0; background: #fff; border: 1px solid #d9dcea; border-left: 0; color: #3d465c; }
  .st-shell .st-pacts { order: 0; }
}
/* Phones: the strip keeps only the thumbnails and the "+" (the other page actions are in the ▾ / long-press menu). */
@media (max-width: 759.98px) {
  .st-shell .st-pacts [data-act=left], .st-shell .st-pacts [data-act=right], .st-shell .st-pacts [data-act=dup], .st-shell .st-pacts [data-act=del] { display: none; }
  .st-shell .st-addmenu { display: grid; place-items: center; min-width: 30px; padding: 0; }
}
.st-shell .ads-pbody .st-sec h3 { font-size: 13px; text-transform: none; letter-spacing: 0; color: #1b2133; }
.st-backtools { margin: 0 0 6px -6px; }
.st-shell .st-undo:disabled { opacity: .45; cursor: default; }
.st-present-btn { gap: 6px; padding: 0 12px; border-radius: 10px; background: rgba(255, 255, 255, .16); font-weight: 600; }
.st-present-btn:hover { background: rgba(255, 255, 255, .26); }
.st-notes { width: 100%; min-height: 220px; resize: vertical; font: 14px/1.5 system-ui, sans-serif; }
body[data-mode=view] .st-pagebar .st-pacts, body[data-mode=comment] .st-pagebar .st-pacts { visibility: hidden; }

/* ---------- floating context toolbar (pill) ---------- */
.st-ctxbar { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; min-height: 40px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.st-ctxbar::-webkit-scrollbar { display: none; }
/* "More" stays at the right end of the floating toolbar even when the rest scrolls (narrow canvas, phones) */
.st-ctxbar #ctxMore { position: sticky; right: 0; z-index: 1; flex: none; background: #fff; box-shadow: -10px 0 10px -6px rgba(27, 33, 51, .18); }
@media (max-width: 759.98px) { .st-ctxbar #ctxComment { display: none; } }
.st-cx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 34px; height: 34px; padding: 0 7px; border: 0; border-radius: 8px; background: transparent; color: #1b2133; font: 600 13px/1 system-ui, sans-serif; cursor: pointer; white-space: nowrap; flex: none; }
.st-cx-btn:hover { background: #f1f0fb; }
.st-cx-btn.on { background: #ece9ff; color: #5b4cf0; }
.st-cx-btn b, .st-cx-btn i, .st-cx-btn u { font-size: 16px; }
.st-cx-txt { padding: 0 10px; }
.st-cx-sep { width: 1px; height: 22px; background: #e4e6ef; margin: 0 4px; flex: none; }
.st-cx-font { height: 34px; border: 1px solid #e4e6ef; border-radius: 8px; padding: 0 8px; background: #fff; min-width: 120px; flex: none; }
.st-cx-sizegrp { display: inline-flex; align-items: center; border: 1px solid #e4e6ef; border-radius: 8px; flex: none; }
.st-cx-sizegrp .st-cx-btn { min-width: 28px; height: 32px; }
.st-cx-size { width: 48px; height: 32px; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; background: transparent; }
.st-cx-size::-webkit-inner-spin-button { -webkit-appearance: none; }
.st-cx-color { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; flex: none; }
.st-cx-color:hover { background: #f1f0fb; }
.st-cx-sw { width: 22px; height: 22px; border-radius: 6px; background: var(--c, #000); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.st-cx-color input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; border: 0; padding: 0; }
.st-cx-info { color: #657089; font-size: 12.5px; padding: 0 8px; white-space: nowrap; }
.st-cx-pop { position: fixed; z-index: 60; background: #fff; border: 1px solid #e4e6ef; border-radius: 12px; box-shadow: 0 10px 30px rgba(27, 33, 51, .16); padding: 10px 12px; min-width: 260px; display: grid; gap: 8px; }
.st-cx-row { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 8px; font-size: 13px; }
.st-cx-row input[type=range] { width: 100%; accent-color: #5b4cf0; }
.st-cx-row output { font-size: 12px; color: #657089; text-align: right; }

/* ---------- present mode extras ---------- */
.st-ptimer { font: 600 13px/1 ui-monospace, monospace; padding: 0 6px; }
.st-pnotes { position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); width: min(720px, 92vw); max-height: 30vh; overflow: auto; background: rgba(15, 23, 42, .88); color: #f8fafc; border-radius: 14px; padding: 12px 16px; font: 16px/1.5 system-ui, sans-serif; white-space: pre-wrap; }
@media (max-width: 760px) {
  .st-shell .st-props.open { position: fixed; left: 0; right: 0; bottom: 0; width: auto; height: min(60dvh, 520px); z-index: 30; border-radius: 20px 20px 0 0; }
  .st-shell .st-pagebar .st-pinfo { display: none; }
  .st-cx-font { min-width: 92px; }
}
.st-addtext { margin: 2px 0 12px; }
.st-combos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.st-combo { display: grid; gap: 4px; text-align: center; border: 1px solid var(--line, #e4e6ef); background: #fafafe; border-radius: 12px; padding: 14px 8px; cursor: pointer; }
.st-combo:hover { border-color: #cfc9ff; background: #f5f4ff; }
.st-combo b { font-size: 17px; line-height: 1.1; }
.st-combo span { font-size: 12px; }
.st-drawlayer { position: absolute; inset: 0; z-index: 6; cursor: crosshair; touch-action: none; }
.st-drawlayer canvas { position: absolute; left: 0; top: 0; pointer-events: none; }
/* Shown while the editor's modules load on a first visit; hidden as soon as the editor or start screen is up. */
.st-boot { position: fixed; inset: 0; z-index: 1; display: grid; place-items: center; margin: 0; background: #f6f7fb; color: #657089; font: 500 15px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; }
.st-boot[hidden], body.editing .st-boot, html.ad-shell-on .st-boot { display: none; }
/* T-shirt / hoodie card: garment colour + size guide (garment.js). The canvas area takes the garment colour. */
.st-viewport.st-on-garment, .st-shell .st-viewport.st-on-garment { background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--garment, #fff) 70%, #ffffff), color-mix(in srgb, var(--garment, #fff) 82%, #9aa3b8)); }
.st-garment { position: absolute; left: 12px; bottom: 12px; z-index: 7; width: 272px; max-width: calc(100% - 24px); max-height: calc(100% - 24px); overflow: auto; display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: #ffffff; color: #1b2133; box-shadow: 0 6px 24px rgba(16, 24, 40, .16); font: 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif; cursor: default; }
.st-garment-head { display: flex; align-items: center; justify-content: space-between; }
.st-garment-x { border: 0; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; color: #657089; padding: 2px 6px; border-radius: 6px; }
.st-garment .st-lab { font-weight: 600; font-size: 12px; color: #4b5470; }
.st-garment .st-swatches { display: flex; flex-wrap: wrap; gap: 5px; }
.st-garment .st-swatch { width: 22px; height: 22px; }
.st-garment .st-seg { display: flex; flex-wrap: wrap; gap: 4px; }
.st-garment .st-seg .btn.on { background: #ede9fe; border-color: #7c3aed; color: #4c1d95; }
.st-garment-note { font-size: 11.5px; }
.st-sizetable { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.st-sizetable th, .st-sizetable td { text-align: left; padding: 3px 4px; border-bottom: 1px solid #eceef6; }
.st-sizetable tr.on td { background: #f5f3ff; font-weight: 600; }
@media (max-width: 760px) { .st-garment { left: 8px; bottom: 8px; width: auto; right: 8px; max-height: 45%; } }
/* Animate: motion path drawing + appear-on-click list. */
.st-viewport.st-pathdraw { cursor: crosshair; }
.st-pathink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 8; overflow: visible; }
.st-clicklist { margin: 6px 0 0; padding-left: 22px; display: grid; gap: 4px; }
.st-clicklist li span { display: inline-block; min-width: 120px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.st-clicklist .btn.small { min-width: 28px; padding: 2px 6px; }
/* ---------- round 3: Effects grid, gradients, lock menu, copy style ---------- */
.st-fxgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 8px; }
.st-fxbtn { display: grid; justify-items: center; gap: 2px; border: 1px solid var(--line); background: #fafafe; border-radius: 10px; padding: 4px 2px 6px; cursor: pointer; font-size: 11.5px; color: #3b4256; }
.st-fxbtn svg { width: 64px; height: 40px; border-radius: 6px; background: #fff; }
.st-fxbtn.on { border-color: var(--accent); box-shadow: 0 0 0 2px #e5e1ff; color: var(--accent); font-weight: 650; }
.st-fxbtn:focus-visible, .st-gradbtn:focus-visible, .st-fxpair:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.st-fxctl { display: grid; gap: 2px; }
.st-fxctl #fxRemove { justify-self: start; margin-top: 6px; }
.st-fxpair { width: 34px; height: 24px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; }
.st-gradpresets { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 8px; }
.st-gradbtn { aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); cursor: pointer; min-width: 0; }
.st-gradstops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 4px 0; }
.st-gradstop { position: relative; display: inline-flex; }
.st-stopdel { position: absolute; top: -7px; right: -7px; width: 16px; height: 16px; border-radius: 50%; border: 0; background: #1b2133; color: #fff; font-size: 11px; line-height: 16px; padding: 0; cursor: pointer; }
.st-cx-menuitem { display: grid !important; justify-items: start; text-align: left; gap: 1px; width: 100%; padding: 6px 8px; }
.st-cx-menuitem small { color: #6b7280; font-weight: 400; font-size: 11.5px; }
.st-cx-menuitem.on { background: #efedff; }
.st-cx-hint { margin: 2px 0 0; font-size: 11.5px; color: #6b7280; }
body.st-painting .st-viewport, body.st-painting .st-layer { cursor: copy !important; }
.st-pthumb.is-locked::after { content: "\1F512"; position: absolute; right: 2px; bottom: 2px; font-size: 10px; }
.fx-drum, .fx-mic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 8px; z-index: 6; }
.fx-drum b, .fx-mic b { font: 800 44px/1 system-ui, sans-serif; color: #fff; background: rgba(15, 23, 42, .75); padding: 12px 26px; border-radius: 16px; }
.fx-drum svg { animation: drumshake .11s linear 22 alternate; }
.fx-drum .stick { transform-origin: 50% 0; animation: drumhit .11s linear 22 alternate; }
@keyframes drumshake { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(3px) rotate(1deg); } }
@keyframes drumhit { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.fx-mic svg { animation: micdrop 1.3s cubic-bezier(.5, 0, 1, .6) forwards; }
.fx-mic b { opacity: 0; animation: fadein .3s 1.2s forwards; }
@keyframes micdrop { 0% { transform: translateY(-120vh) rotate(0); } 70% { transform: translateY(0) rotate(15deg); } 82% { transform: translateY(-30px) rotate(70deg); } 100% { transform: translateY(0) rotate(90deg); } }
.st-pagepick { display: grid; gap: 6px; margin: -2px 0 6px; }
.st-pagechecks { display: flex; flex-wrap: wrap; gap: 4px; max-height: 96px; overflow-y: auto; }
.st-pagecheck { display: inline-flex; align-items: center; gap: 3px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 6px; font-size: 12px; cursor: pointer; }
.st-pagecheck input { accent-color: var(--accent); }
.st-menu { position: fixed; z-index: 70; min-width: 236px; max-height: calc(100dvh - 12px); overflow-y: auto; background: #fff; border: 1px solid #e4e6ef; border-radius: 12px; box-shadow: 0 12px 32px rgba(27, 33, 51, .18); padding: 6px; display: grid; }
.st-menuitem { display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 0; background: none; border-radius: 8px; padding: 7px 10px; font: inherit; font-size: 13.5px; color: #1b2133; text-align: left; cursor: pointer; }
.st-menuitem:hover, .st-menuitem:focus-visible { background: #f1f0fe; outline: none; }
.st-menuitem[disabled] { color: #a0a6b8; cursor: default; background: none; }
.st-menuitem kbd { font: 11.5px/1 system-ui, sans-serif; color: #6b7280; background: none; border: 0; }
.st-menuhr { border: 0; border-top: 1px solid #eef0f6; margin: 4px 2px; }
.st-linkbox { width: 320px; padding: 12px; gap: 8px; }
.st-seg[aria-label="Chart type"] { display: flex; flex-wrap: wrap; }
.st-chartcolors .st-row { margin: 3px 0; }
.st-seg[aria-label="Frame shape"] { display: flex; flex-wrap: wrap; }
.st-importbox { width: min(440px, calc(100vw - 12px)); max-height: min(560px, calc(100dvh - 90px)); padding: 12px; gap: 10px; }
.st-importbox > .st-row:first-child { justify-content: space-between; }
.st-importlist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; overflow-y: auto; }
.st-importitem, .st-importpage { display: grid; gap: 4px; justify-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fafafe; padding: 6px; cursor: pointer; font-size: 12px; }
.st-importitem img, .st-importpage svg { max-width: 100%; height: auto; border-radius: 6px; }
.st-importpage input { justify-self: start; accent-color: var(--accent); }
.st-pthumb.picked { border-color: var(--accent); box-shadow: 0 0 0 3px #e5e1ff; }
