/* ---------------- self-hosted fonts (SIL OFL 1.1, from @fontsource) ---------------- */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/bricolage-grotesque-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/bricolage-grotesque-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url(assets/fonts/bricolage-grotesque-latin-800-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 800; font-display: swap; src: url(assets/fonts/bricolage-grotesque-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/inter-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/inter-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/inter-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url(assets/fonts/inter-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/inter-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url(assets/fonts/inter-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/inter-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/inter-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root, [data-theme="light"] {
  --bg: #F7F2F0; --stage: #F4EFEC; --grid: #E9DEDA;
  --panel: #FFFFFF; --panel2: #F7F2F0; --line: #EBDFDA;
  --text: #24160F; --muted: #6B5A52;
  --accent: #D62D5A; --accent-ink: #FFFFFF; --accent-soft: #FFF1F4;
  --ok: #1F7A50; --ok-bg: #DDF3E8;
  --sel: #24160F; --sel-ink: #FFFFFF;
  --shadow: 0 10px 30px rgba(36,22,15,0.10);
  --head: "Bricolage Grotesque", Inter, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #121019; --stage: #121019; --grid: #1F1C2B;
  --panel: #1D1A27; --panel2: #272336; --line: #2E2A3D;
  --text: #F5F2FA; --muted: #B9B1CB;
  --accent: #FF6FA3; --accent-ink: #1A0F18; --accent-soft: #2A2440;
  --ok: #5FE3B4; --ok-bg: #203A33;
  --sel: #F5F2FA; --sel-ink: #121019;
  --shadow: 0 10px 30px rgba(0,0,0,0.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 Inter, system-ui, sans-serif; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px solid var(--line); background: var(--panel); padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none; color: var(--text); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 30%, transparent); }
.btn.primary svg { stroke: var(--accent-ink); }
.btn:hover { filter: brightness(1.05); }
.ghost { background: transparent; border: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.icon-btn:hover { background: var(--panel2); }

/* ---------------- start ---------------- */
.start { min-height: 100%; display: flex; flex-direction: column; }
.start-top { max-width: 1200px; width: 100%; margin: 0 auto; padding: 22px 28px; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--text); }
.logo-mark { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.logo-mark svg { width: 24px; height: 24px; stroke: var(--accent-ink); stroke-width: 3.2; }
.logo-word { font-family: var(--head); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.logo-word b { color: var(--accent); }
.theme-btn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--line); }
.hero { flex: 1; max-width: 860px; width: 100%; margin: 0 auto; padding: 30px 24px 60px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.pill-badge { background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 999px; }
.hero h1 { margin: 0; font-family: var(--head); font-weight: 800; font-size: clamp(38px, 6vw, 72px); line-height: 1; letter-spacing: -0.035em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin: 0; font-size: 18px; color: var(--muted); max-width: 600px; }
.drop { width: 100%; max-width: 680px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 18px 18px 18px 22px; border: 2px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--panel); border-radius: 26px; cursor: pointer; text-align: left; transition: transform .15s, border-color .15s; }
.drop.over { transform: scale(1.02); border-color: var(--accent); }
.drop-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; color: var(--accent); }
.drop-icon svg { width: 26px; height: 26px; }
.drop-text { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; }
.drop-text span { color: var(--muted); font-size: 14px; }
.shapes { display: flex; flex-direction: column; gap: 10px; align-items: center; }
.shape-list { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.shape-list button { border: 1.5px solid var(--line); background: var(--panel); padding: 10px 16px; border-radius: 999px; font-weight: 600; }
.shape-list button:hover { border-color: var(--accent); }

/* ---------------- editor ---------------- */
.editor { position: fixed; inset: 0; overflow: hidden; background: var(--stage);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px; }
.stage { position: absolute; inset: 0; }
.stage canvas { display: block; outline: none; }
.float { position: absolute; z-index: 2; }
.top-left { left: 18px; top: 18px; display: flex; gap: 10px; align-items: center; }
.logo-btn { width: 48px; height: 48px; border-radius: 15px; background: var(--accent); display: flex; align-items: center; justify-content: center; }
.logo-btn svg { width: 24px; height: 24px; stroke: var(--accent-ink); stroke-width: 3.2; }
.file-chip { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 15px; background: var(--panel); border: 1px solid var(--line); font-size: 14px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { left: 50%; top: 18px; transform: translateX(-50%); list-style: none; margin: 0; padding: 5px; display: flex; gap: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; }
.steps li { padding: 9px 16px; border-radius: 999px; color: var(--muted); }
.steps li.done { color: var(--ok); }
.steps li.active { background: var(--sel); color: var(--sel-ink); }
.top-right { right: 18px; top: 18px; display: flex; gap: 8px; align-items: center; }
.top-right .icon-btn { width: 48px; height: 48px; border-radius: 15px; }
.top-right .btn { height: 48px; border-radius: 15px; }

.pip { left: 18px; bottom: 18px; width: 300px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); transition: width .2s; }
.pip.big { width: min(600px, calc(100vw - 460px)); }
.pip-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 2px 4px; font-size: 13px; }
.pip-actions { display: flex; gap: 4px; }
.mini { border: 1px solid var(--line); background: var(--panel2); border-radius: 10px; padding: 6px 9px; font-size: 12px; font-weight: 600; }
.mini[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
#img2d { width: 100%; aspect-ratio: 1; border-radius: 14px; background: #FFFFFF; }
#img2d.picking { cursor: crosshair; outline: 3px solid var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--muted); padding: 0 4px 2px; }
.legend i { display: inline-block; width: 12px; height: 4px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.lg-red { background: #E8365F; } .lg-blue { background: #2E7BE6; } .lg-pink { background: #F6B5C6; }

.dock { left: calc(50% - 170px); bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.dock button { border: none; background: transparent; padding: 10px 14px; border-radius: 13px; font-weight: 600; font-size: 13px; }
.dock button.on { background: var(--accent); color: var(--accent-ink); }
.status { left: calc(50% - 170px); top: 82px; transform: translateX(-50%); display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chip { font-size: 12px; font-weight: 600; background: var(--panel); border: 1px solid var(--line); padding: 7px 12px; border-radius: 999px; }
.chip.busy { display: inline-flex; gap: 8px; align-items: center; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
.toasts { left: calc(50% - 170px); top: 124px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 6px; align-items: center; max-width: 520px; }
.toast { background: var(--sel); color: var(--sel-ink); padding: 10px 14px; border-radius: 14px; font-size: 13px; box-shadow: var(--shadow); }
.toast.warn { background: #FFB347; color: #2A1A00; }

.settings { right: 18px; top: 82px; bottom: 18px; width: 340px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 18px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.settings h2 { margin: 0 0 9px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.settings h2 label { cursor: pointer; }
.types { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.types button { height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel2); display: flex; align-items: center; justify-content: center; }
.types button svg { width: 26px; height: 26px; stroke: var(--muted); stroke-width: 2.6; }
.types button.on { border-color: var(--accent); background: var(--accent-soft); }
.types button.on svg { stroke: var(--accent); }
.type-name { font-family: var(--head); font-weight: 800; font-size: 20px; margin-top: 10px; }
.type-desc { font-size: 13px; color: var(--muted); }
.size-row { display: flex; align-items: center; gap: 10px; }
.size-val { flex: 1; text-align: center; color: var(--muted); }
.size-val b { font-family: var(--head); font-size: 36px; color: var(--text); letter-spacing: -0.03em; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.toggle-row { margin-top: 12px; }
select, input[type=text] { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel2); }
.row-between select { width: auto; }
.seg { display: flex; gap: 4px; padding: 4px; background: var(--panel2); border-radius: 14px; }
.seg button { flex: 1; border: none; background: transparent; padding: 9px 4px; border-radius: 10px; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--sel); color: var(--sel-ink); }
.switch { width: 50px; height: 30px; flex: none; border-radius: 999px; border: none; background: var(--line); padding: 3px; display: flex; justify-content: flex-start; transition: background .15s; }
.switch span { width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch[aria-pressed="true"] { background: var(--accent); justify-content: flex-end; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches button { width: 40px; height: 40px; border-radius: 50%; border: 3px solid var(--panel); box-shadow: 0 0 0 1.5px var(--line); }
.swatches button.on { box-shadow: 0 0 0 3px var(--text); }
details { border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.opts { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; font-size: 13px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field output { float: right; font-weight: 700; }

/* ---------------- checkout ---------------- */
.checkout { border: none; border-radius: 28px; padding: 0; width: min(560px, 94vw); background: var(--panel); color: var(--text); box-shadow: 0 40px 90px rgba(0,0,0,.35); }
.checkout::backdrop { background: rgba(20,12,10,.5); }
.ck { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.ck-head { display: flex; justify-content: space-between; gap: 12px; }
.ck-head h2 { margin: 0; font-family: var(--head); font-size: 30px; letter-spacing: -0.02em; }
.ck-head p { margin: 4px 0 0; }
.ck-summary { display: flex; flex-direction: column; gap: 2px; background: var(--accent-soft); padding: 14px 16px; border-radius: 16px; }
.ck-opts { border: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ck-opts legend { font-weight: 700; margin-bottom: 8px; }
.ck-opt { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; }
.ck-opt:has(input:checked) { border-color: var(--accent); }
.ck-opt input { accent-color: var(--accent); width: 18px; height: 18px; }
.ck-opt span { flex: 1; display: flex; flex-direction: column; }
.ck-opt small { color: var(--muted); }
.ck-opt i { font-style: normal; font-size: 11px; color: var(--accent); margin-left: 6px; }
.ck-opt em { font-style: normal; font-family: var(--head); font-weight: 800; font-size: 20px; }
.ck-label { font-weight: 700; }
.ck-pay { display: flex; flex-direction: column; gap: 8px; }
.ck-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ck-methods button { padding: 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel2); font-weight: 700; opacity: .7; cursor: not-allowed; }
.ck-methods button.on { border-color: var(--text); }
.ck-note { background: var(--ok-bg); border-radius: 14px; padding: 12px 14px; font-size: 13px; }
.ck-pay-btn { justify-content: center; font-size: 17px; padding: 16px; }
.ck-pay-btn[disabled] { opacity: .6; cursor: progress; }
.ck-trust { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.ck-methods-line { font-weight: 700; font-size: 13px; }
.ck-code { border-top: 1px solid var(--line); padding-top: 12px; }
.ck-code summary { font-size: 13px; }
.ck-code-row { display: flex; gap: 8px; margin-top: 10px; }
.ck-code-row input { font-family: ui-monospace, Consolas, monospace; letter-spacing: .06em; text-transform: uppercase; }
.ck-code-row .btn { white-space: nowrap; border-radius: 12px; padding: 10px 14px; }
.ord-body { display: flex; flex-direction: column; gap: 14px; }
.ord-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ord-dl .btn { justify-content: center; }
.ord-code { background: var(--accent-soft); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.ord-code-row { display: flex; gap: 8px; align-items: center; }
.ord-code-row code { flex: 1; font: 800 22px/1 ui-monospace, Consolas, monospace; letter-spacing: .08em; color: var(--accent); }
.ord-mb { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; background: var(--panel2); border-radius: 16px; padding: 14px 16px; }
.ord-mb dt { color: var(--muted); }
.ord-mb dd { margin: 0; font: 700 18px/1.2 ui-monospace, Consolas, monospace; }
.ord-link { font-size: 12px; color: var(--muted); word-break: break-all; }
.ord-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ord-spin { display: flex; justify-content: center; padding: 12px; }
.ord-spin .spin { width: 28px; height: 28px; border-width: 3px; }

/* ---------------- language ---------------- */
.top-tools { display: flex; gap: 8px; align-items: center; }
.lang-select { width: auto; height: 44px; padding: 0 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); font-weight: 700; font-size: 13px; cursor: pointer; }
.top-right .lang-select { height: 48px; border-radius: 15px; }

@media (max-width: 900px) {
  .steps { display: none; }
  .settings { left: 10px; right: 10px; top: auto; bottom: 10px; width: auto; max-height: 46vh; }
  .pip { display: none; }
  .dock, .status, .toasts { left: 50%; }
  .dock { bottom: calc(46vh + 20px); }
  .top-right .btn { padding: 0 12px; font-size: 13px; }
  .file-chip { display: none; }
}

/* ---------------- home (all products) ---------------- */
.home-nav { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; padding: 0 16px; }
.home-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 999px; }
.home-nav a:hover { background: var(--panel); color: var(--text); }
.hero { flex: none; padding: 26px 24px 28px; gap: 18px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 64px); }
.products { max-width: 1160px; width: 100%; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.product { background: var(--panel); border: 1px solid var(--line); border-radius: 28px; padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); scroll-margin-top: 20px; }
.product-head { display: flex; gap: 14px; align-items: flex-start; }
.product-head h2 { margin: 0 0 4px; font-family: var(--head); font-size: 26px; letter-spacing: -0.02em; }
.product-head p { margin: 0; font-size: 14px; }
.product-icon { flex: none; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.product-icon svg { width: 28px; height: 28px; stroke-width: 2.6; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px; background: var(--panel2); color: var(--muted); }
.product .drop { max-width: none; padding: 14px 14px 14px 16px; border-radius: 20px; }
.product .drop-icon { width: 44px; height: 44px; }
.product .shapes { align-items: flex-start; gap: 8px; }
.product .shape-list { justify-content: flex-start; }
.product .shape-list button { padding: 8px 13px; font-size: 13px; }
.topper-start { display: flex; gap: 8px; }
.topper-start input { flex: 1; min-width: 0; font-size: 17px; padding: 14px 16px; border-radius: 16px; }
.topper-start .btn { border-radius: 16px; white-space: nowrap; }
.font-strip { display: flex; flex-wrap: wrap; gap: 4px 16px; justify-content: center; padding: 10px 6px 2px; color: var(--accent); font-size: 30px; line-height: 1.2; min-height: 90px; }
.font-strip span { white-space: nowrap; }
.home-sec { max-width: 1160px; width: 100%; margin: 0 auto; padding: 56px 24px 0; scroll-margin-top: 10px; }
.home-sec > h2 { font-family: var(--head); font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.02em; margin: 0 0 20px; text-align: center; }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.how li, .feats li { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 20px; }
.how b { display: inline-flex; width: 36px; height: 36px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); align-items: center; justify-content: center; font-family: var(--head); font-size: 18px; }
.how h3, .feats h3 { margin: 12px 0 4px; font-size: 17px; }
.feats h3 { margin-top: 0; }
.how p, .feats p { margin: 0; font-size: 14px; }
.feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prices { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.price-card { width: 280px; background: var(--panel); border: 2px solid var(--line); border-radius: 24px; padding: 22px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.price-card.best { border-color: var(--accent); }
.price-card i { font-style: normal; color: var(--accent); font-weight: 700; font-size: 12px; }
.price-card b { font-family: var(--head); font-size: 44px; letter-spacing: -0.03em; }
.price-card p { margin: 0; }
.pay-line { text-align: center; margin: 18px 0 0; }
.soon { text-align: center; margin: 48px 24px 0; font-weight: 600; color: var(--accent); }
.home-foot { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; padding: 28px 24px 36px; }

/* ---------------- topper editor ---------------- */
textarea { width: 100%; resize: vertical; font: inherit; font-size: 17px; color: inherit; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel2); }
.hint { margin: 6px 0 0; }
.font-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.font-grid button { height: 58px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel2); font-size: 24px; line-height: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.font-grid button small { font: 600 10px/1 Inter, sans-serif; color: var(--muted); }
.font-grid button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.font-grid button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

@media (max-width: 900px) {
  .products, .how, .feats { grid-template-columns: minmax(0, 1fr); }
  .product { padding: 18px; border-radius: 22px; }
  .home-sec { padding-top: 40px; }
  .topper-start { flex-direction: column; }
}
.topper-img-btn { justify-content: center; border-radius: 16px; border-style: dashed; }
.img-pick { width: 100%; justify-content: center; border-radius: 14px; }

/* clear way back home / new design */
.home-btn { height: 48px; display: inline-flex; align-items: center; gap: 6px; padding: 0 16px 0 10px; border-radius: 15px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 700; font-size: 14px; }
.home-btn:hover { background: var(--panel2); }
.home-btn svg { width: 22px; height: 22px; stroke-width: 2.4; }
.dock .dock-new { color: var(--accent); }
.dock .dock-new b { font-size: 16px; }
.accent-row { display: flex; gap: 8px; align-items: center; }
.accent-row .icon-btn { width: 40px; height: 40px; flex: none; }
.accent-row + .accent-row { margin-top: 6px; }
.accent-lbl { width: 66px; flex: none; font-size: 12px; font-weight: 600; color: var(--muted); }
.accent-row .icon-btn { width: 36px; height: 36px; font-size: 17px; }

/* ---------------- history of paid designs + free edit mode ---------------- */
.center { text-align: center; margin-top: -8px; }
.hist-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.hist-card { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; display: flex; flex-direction: column; }
.hist-card img, .hist-card .noimg { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--stage); display: block; }
.hist-card .noimg { display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--accent); }
.hist-info { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.hist-info b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.hist-actions .btn { padding: 8px 12px; font-size: 13px; border-radius: 12px; }
.edit-chip { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.locked-note { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); font-size: 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
textarea[readonly] { opacity: .7; cursor: not-allowed; }
.seg button[disabled], .img-pick[disabled] { opacity: .45; cursor: not-allowed; }

/* checkout consent (digital content: no 14-day withdrawal once the download starts) */
.ck-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; background: var(--panel2); }
.ck-consent input { width: 18px; height: 18px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.ck-consent a { color: var(--accent); }
.ck-code-row .btn[disabled] { opacity: .45; cursor: not-allowed; }
.home-foot a { color: inherit; }
.ck-pay-btn[aria-disabled] { opacity: .5; }
