:root { --ink: #121826; --muted: #586174; --line: #E1E4EB; --bg: #F3F4F7; --accent: #B8401A; --accent-soft: #FFF4EE; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 15px; line-height: 1.45; }
[hidden] { display: none !important; }
h1 { font-size: 26px; margin: 0; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 15px; margin: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 0; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-main { background: var(--accent); color: #fff; }
.btn-line { background: #fff; color: var(--accent); border: 2px solid var(--accent); }
.btn-plain { background: #fff; color: var(--ink); border: 2px solid #C9CEDA; font-weight: 600; }
.btn-dark { background: var(--ink); color: #fff; font-weight: 600; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 6px 4px; }
.linkbtn.light { color: #C9CEDA; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], textarea { font: inherit; padding: 10px 12px; border: 1px solid #C9CEDA; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 3px solid #F6A58A; outline-offset: 1px; }
label { font-weight: 600; font-size: 14px; }
.err { color: #A3221B; font-weight: 600; min-height: 1em; margin: 6px 0 0; }
.ok { color: #14532D; font-weight: 600; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--ink); }
.login-box { background: #fff; border-radius: 14px; padding: 28px; width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 8px; }
.login-box .logo { color: var(--ink); margin-bottom: 8px; }
.login-box .btn { margin-top: 10px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.logo small { display: block; font-weight: 400; color: #A9B0C0; font-size: 12px; }

.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.side { flex: 1 1 220px; max-width: 260px; min-width: 200px; background: var(--ink); color: #E6E8EE; padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; }
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side nav button { min-height: 44px; border: 0; border-radius: 8px; padding: 0 12px; text-align: left; font: inherit; font-weight: 500; background: transparent; color: #C9CEDA; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.side nav button[aria-current="page"] { background: #2A3348; color: #fff; }
.side nav em { font-style: normal; font-size: 12px; color: #FFB59C; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.stripe-state { background: #1C2433; border-radius: 10px; padding: 10px 12px; font-size: 13px; color: #C9CEDA; }
.stripe-state b { color: #fff; display: flex; align-items: center; gap: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.content { flex: 999 1 640px; min-width: 0; padding: 26px 26px 48px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 720px) { .side { max-width: none; flex-basis: 100%; } .content { padding: 18px 14px 40px; } }

.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 38px; padding: 0 14px; border-radius: 999px; border: 2px solid #C9CEDA; background: #fff; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: #7A2A0C; }
.split { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.list { flex: 1 1 320px; min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.detail { flex: 1.5 1 440px; min-width: 0; }
.row { width: 100%; border: 0; border-bottom: 1px solid #EEF0F4; background: #fff; padding: 13px 15px; display: flex; justify-content: space-between; gap: 10px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.row[aria-current="true"] { background: var(--accent-soft); }
.row .l { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row .l b { font-size: 15px; }
.row .l span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { align-self: center; flex-shrink: 0; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.st-ready { background: #DCFCE7; color: #14532D; }
.st-on_hold { background: #FEF3C7; color: #713F12; }
.st-shipped { background: #E6E8EE; color: #2A3142; }
.st-canceled { background: #FDE2E1; color: #7F1D1D; }
.empty { padding: 26px; color: var(--muted); text-align: center; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.oitem { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.oitem .pv { width: 170px; height: 170px; flex-shrink: 0; }
.oitem .pv svg { width: 100%; height: 100%; }
.oitem .info { flex: 1 1 220px; display: flex; flex-direction: column; gap: 6px; }
.oitem .words { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.btns { display: flex; flex-wrap: wrap; gap: 8px; }
.help { border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.help.ready { background: #F0FDF4; color: #14532D; }
.help.on_hold { background: #FFFBEB; color: #5B3A0E; }
.help.shipped, .help.canceled { background: var(--bg); color: #2A3142; }
.events { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.dcard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.dcard .pv { aspect-ratio: 1; }
.dcard .pv svg { width: 100%; height: 100%; }
.toggle { min-height: 40px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer; }
.toggle[aria-pressed="true"] { border: 2px solid #15803D; background: #F0FDF4; color: #14532D; }
.toggle[aria-pressed="false"] { border: 2px solid #C9CEDA; background: #fff; color: #2A3142; }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form .f { display: flex; flex-direction: column; gap: 5px; }
.small { font-size: 13px; color: var(--muted); }
.colors { display: flex; flex-direction: column; gap: 8px; }
.crow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.crow input[type=text] { width: 140px; }
.crow input[type=color] { width: 44px; height: 40px; border: 1px solid #C9CEDA; border-radius: 8px; padding: 2px; background: #fff; }
.crow .sample { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.check input { width: 18px; height: 18px; }
code.embed { display: block; background: var(--ink); color: #FFD0BF; border-radius: 8px; padding: 10px 12px; font-size: 13px; overflow-x: auto; white-space: nowrap; }
.notice { background: #FFFBEB; border: 1px solid #F5D98B; color: #5B3A0E; border-radius: 10px; padding: 12px 14px; }
dialog { border: 0; border-radius: 14px; padding: 22px; max-width: 480px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(18,24,38,.5); }
dialog .btns { margin-top: 12px; justify-content: flex-end; }
.oitem .pv img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.dcard .cimg { display: flex; align-items: center; justify-content: center; background: var(--bg); border-radius: 8px; overflow: hidden; }
.dcard .cimg img { width: 100%; height: 100%; object-fit: contain; }
.dcard .cprice { margin-top: 4px; }
.ttable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ttable th, .ttable td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #EEF0F4; white-space: nowrap; }
.ttable th { color: var(--muted); font-weight: 600; }
.pbar { height: 10px; background: var(--bg); border-radius: 999px; overflow: hidden; margin-top: 4px; }
.pbar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
select { font: inherit; padding: 8px 10px; border: 1px solid #C9CEDA; border-radius: 8px; background: #fff; color: var(--ink); }
.plan-card { max-width: 640px; }
.ticks { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.mk-top input { max-width: 460px; }
.mk-sec { margin: 10px 0; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mk-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.mk-img { aspect-ratio: 5 / 4; background: var(--bg); }
.mk-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-info { padding: 10px 12px 0; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.mk-info b { font-size: 14px; line-height: 1.3; }
.mk-buy { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 12px; gap: 8px; }
.mk-price { font-weight: 800; font-size: 17px; }
.mk-buy .btn { min-height: 38px; }
.mk-files { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; }
.mk-file { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; overflow-wrap: anywhere; }
.ttable.sell td { white-space: normal; vertical-align: middle; }
.ttable.sell .th img, .ttable.sell .nocover { width: 64px; height: 52px; object-fit: cover; border-radius: 6px; display: flex; align-items: center; justify-content: center; background: var(--bg); font-size: 11px; color: var(--muted); }
.ttable.sell .tt input { min-width: 220px; }
.ttable.sell .tt .small { display: block; margin-top: 2px; }
details ol { margin: 6px 0 0; padding-left: 20px; }
.selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.selbar .btn { min-height: 38px; }
.dcard .selbox { font-size: 13px; }
dialog h3 { margin: 8px 0 6px; }
.setup { border-left: 6px solid var(--accent); border-radius: 0; }
.steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.steps li.done { color: var(--muted); }
.steps .tick { color: #15803D; font-weight: 800; }
.login a { color: var(--accent); }

.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.acard { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.acard img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #F6F1E9; border-radius: 8px; }
.acard .nm { font-weight: 600; font-size: 13px; line-height: 1.25; }
.acard.off img { opacity: .35; }

.kstrip { display: flex; gap: 8px; overflow-x: auto; margin-top: 10px; }
.kstrip img { width: 84px; height: 84px; object-fit: contain; background: #F3F4F7; border-radius: 8px; flex: 0 0 auto; }
.kpiece { border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; }
.kp-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kp-label { max-width: 220px; }
.kp-colors .chips { margin: 6px 0; }
.chip .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.kcard { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 6px; background: #fff; }
.kcard img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #F3F4F7; border-radius: 8px; }

/* design studio */
.sstrip-card { padding: 12px; }
.sstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.sstrip.signs { display: flex; flex-direction: column; gap: 10px; }
.sbar { display: flex; gap: 8px; flex-wrap: wrap; }
.sbar input { flex: 1 1 220px; width: auto; }
.sbar select, .sfield select { font: inherit; padding: 10px 12px; border: 1px solid #C9CEDA; border-radius: 8px; background: #fff; color: var(--ink); }
.slist { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 8px; max-height: 300px; overflow: auto; flex: none; padding: 2px; }
.slist .scard { justify-content: center; padding: 8px 10px; }
.slist .scard .snm, .slist .scard .small { overflow-wrap: anywhere; }
.scard { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px; font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; color: var(--ink); min-height: 44px; }
.scard:hover { border-color: #C9CEDA; }
.scard[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.sthumb { height: 96px; width: 100%; display: flex; align-items: center; justify-content: center; }
.sthumb img { max-width: 100%; max-height: 96px; }
.snm { font-weight: 700; font-size: 14px; }
.scard .small { font-size: 12px; }
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .studio { grid-template-columns: 1fr; } }
.seg { display: inline-flex; border: 2px solid #C9CEDA; border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: #fff; font: inherit; font-weight: 600; padding: 8px 12px; cursor: pointer; min-height: 40px; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.sstage { background: #F7F2EA; border-radius: 12px; min-height: 380px; padding: 24px; display: flex; align-items: center; justify-content: center;
  background-image: linear-gradient(#ECE4D6 1px, transparent 1px), linear-gradient(90deg, #ECE4D6 1px, transparent 1px); background-size: 24px 24px; }
.sstage svg { width: 100%; max-height: 520px; height: auto; }
.sparts { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--muted); }
.skey { margin: 0; } .skey i { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; }
.skey .kcut { background: #FF0000; } .skey .keng { background: #3A2313; height: 8px; }
.sform { gap: 0; display: flex; flex-direction: row; flex-wrap: wrap; column-gap: 10px; }
.sfield { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; flex: 1 1 100%; min-width: 0; }
.sfield.half { flex: 1 1 calc(50% - 10px); }
.sfield .lbl { font-weight: 600; font-size: 14px; }
.cust { font-weight: 600; font-size: 11px; color: #7A2A0C; background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; margin-left: 4px; }
.stog { flex: 1 1 100%; display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); cursor: pointer; min-height: 44px; }
.stog input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.stog .sw { width: 42px; height: 24px; border-radius: 12px; background: #C9CEDA; position: relative; transition: background .15s; flex: none; }
.stog .sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.stog input:checked + .sw { background: var(--accent); }
.stog input:checked + .sw::after { left: 21px; }
.stog input:focus-visible + .sw { outline: 3px solid #F6A58A; outline-offset: 2px; }
.sart { display: flex; align-items: center; gap: 10px; }
.sart img { width: 48px; height: 48px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.spick { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.spgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-height: 240px; overflow: auto; }
.spgrid button { border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 4px; cursor: pointer; aspect-ratio: 1; }
.spgrid button:hover { border-color: var(--accent); }
.spgrid img { width: 100%; height: 100%; object-fit: contain; }
.sbtns { flex: 1 1 100%; display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.ssell { flex: 1 1 100%; margin-top: 12px; padding: 14px; border-radius: 10px; background: var(--bg); display: flex; flex-wrap: wrap; column-gap: 10px; }
.ssell .btn { flex: 1 1 100%; }
.sform > .small { flex: 1 1 100%; }

.card.soon { align-items: flex-start; padding: 28px; }
.card.soon h2 { color: var(--accent); }

/* design studio (gallery + editor) */
.st-hero { background: linear-gradient(120deg, #1F3330 0%, #2B3A33 55%, #6B4A2F 100%); color: #fff; border-radius: 18px; padding: 34px 38px; }
.st-hero h1 { font-size: 38px; line-height: 1.08; margin: 6px 0 12px; letter-spacing: -0.5px; }
.st-hero p { margin: 0; max-width: 560px; color: #E3E6EA; }
.st-kicker { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #F2B37C !important; }
.st-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.st-bar h2 { font-size: 22px; }
.st-bar input { max-width: 280px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.st-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.st-img { position: relative; aspect-ratio: 1 / 0.82; background: linear-gradient(160deg, #EFE6D8, #DCC9AE); display: flex; align-items: center; justify-content: center; padding: 14px; cursor: pointer; }
.st-img img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(60,35,15,.25)); }
.st-badge { position: absolute; top: 10px; left: 10px; background: #FFF8EF; color: #6B3D1B; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.st-badge.on { background: #E7F6EC; color: #14532D; }
.st-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.st-body h3 { font-size: 15px; }
.st-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.st-go { border: 0; background: #F1E6D7; color: #5A3518; font: inherit; font-weight: 700; font-size: 13px; padding: 8px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; min-height: 36px; }
.st-go:hover { background: #E8D6BE; }
.st-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.st-title { text-align: center; flex: 1; min-width: 200px; }
.st-title h1 { font-size: 20px; }
.st-title p { margin: 2px 0 0; }
.st-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.st-ed { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 1000px) { .st-ed { grid-template-columns: 1fr; } }
.st-stage-wrap { display: flex; flex-direction: column; gap: 10px; }
.st-stage-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-stage { background: linear-gradient(160deg, #F4ECDF, #E3D2BA); border: 1px solid #E2D3BE; border-radius: 16px; min-height: 420px; padding: 28px; display: flex; align-items: center; justify-content: center; }
.st-stage.cut { background: #fff; background-image: linear-gradient(#EEF0F3 1px, transparent 1px), linear-gradient(90deg, #EEF0F3 1px, transparent 1px); background-size: 24px 24px; }
.st-stage svg { width: 100%; max-height: 560px; height: auto; filter: drop-shadow(0 8px 14px rgba(60,35,15,.25)); }
.st-stage.cut svg { filter: none; }
.st-legend { display: flex; gap: 18px; align-items: center; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.st-legend i { display: inline-block; width: 16px; height: 3px; margin-right: 6px; vertical-align: middle; }
.st-legend .kcut { background: #FF0000; } .st-legend .keng { background: #3A2313; height: 7px; }
.st-size { margin-left: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 3px 10px; font-weight: 600; color: var(--ink); }
.st-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; }
.st-panel h2 { font-size: 22px; }
.st-panel > .small { margin: 2px 0 8px; }
.st-sec { font-size: 11px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin: 6px 0 10px; }
.st-panel .sfield select, .st-panel .sfield input { font: inherit; padding: 10px 12px; border: 1px solid #C9CEDA; border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
.st-mats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-mats button { display: flex; align-items: center; gap: 8px; border: 2px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 9px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-height: 40px; color: var(--ink); }
.st-mats button[aria-pressed="true"] { border-color: var(--accent); }
.st-mats span { width: 20px; height: 20px; border-radius: 5px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.st-sellcard { max-width: 520px; }

/* products: compact rows, tabs, mockup photo */
.prow { flex-direction: row; align-items: center; gap: 14px; padding: 12px 14px; }
.pthumb { width: 64px; height: 64px; border-radius: 10px; background: var(--bg); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; font-size: 12px; color: var(--muted); font-weight: 700; }
.pthumb img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pprice { white-space: nowrap; }
.ptabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.ptabs button { border: 0; background: none; font: inherit; font-weight: 600; padding: 8px 12px; border-radius: 8px; cursor: pointer; color: var(--muted); min-height: 40px; }
.ptabs button[aria-pressed="true"] { background: var(--accent-soft); color: #7A2A0C; }
.mock { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .mock { grid-template-columns: 1fr; } }
.mock-stage { position: relative; background: var(--bg); border-radius: 12px; overflow: hidden; min-height: 240px; max-width: 560px; }
.mock-stage img { display: block; width: 100%; height: auto; }
.mock-empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.mock-box { position: absolute; border: 2px dashed #FF6B3D; background: rgba(255,107,61,.12); transform-origin: center; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; font-weight: 700; color: #B8401A; }
.mock-side input[type=range] { width: 100%; }
.cph { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cph img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.cph .dot { width: 14px; height: 14px; }
/* Design Studio: upload, shop switch, set-up of an uploaded design */
.st-hero { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: flex-end; }
.st-hero-side { display: flex; flex-direction: column; gap: 12px; align-items: stretch; min-width: 240px; }
.st-upbtn { background: #fff; color: #1F3330; border: 0; font-weight: 700; min-height: 44px; }
.st-pub { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.st-pub span { font-size: 13px; color: #E3E6EA; }
.st-upcard { margin-top: 16px; }
.st-upgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.st-upgrid input[type=file] { width: 100%; }
.st-setup { border: 1px solid #DCE0E8; border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; background: #FAFBFC; }
.st-setup summary { font-weight: 700; cursor: pointer; padding: 4px 0; }
.st-setup[open] summary { margin-bottom: 8px; }
.st-note { background: #FFF7E6; border-radius: 8px; padding: 8px 10px; color: #6B4A12; }
.st-sl { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 8px; margin-bottom: 4px; }
.st-sl label { font-size: 13px; }
.st-sl input { width: 100%; }
.st-panel .del { margin-top: 14px; color: #B42318; }
/* Design Studio editor */
.st-newbtn { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); min-height: 40px; }
.st-tabs { margin-top: 6px; }
.ed { display: grid; grid-template-columns: 48px minmax(0, 1fr) 300px; border: 1px solid #DCE0E8; border-radius: 14px; overflow: hidden; background: #fff; height: calc(100vh - 190px); min-height: 560px; }
.ed-tools { background: #F6F7F9; border-right: 1px solid #E3E6EC; display: flex; flex-direction: column; gap: 4px; padding: 8px 6px; }
.ed-tool { width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: #4A5263; font-size: 19px; cursor: pointer; display: grid; place-items: center; }
.ed-tool:hover { background: #E9ECF1; }
.ed-tool[aria-pressed="true"] { background: #E3EDFF; color: #1F5BD1; }
.ed-main { display: flex; flex-direction: column; min-width: 0; }
.ed-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid #E3E6EC; }
.ed-grp { display: flex; gap: 2px; padding-right: 6px; border-right: 1px solid #E3E6EC; }
.ed-grp:last-of-type { border-right: 0; }
.ed-top button { min-width: 32px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: #2A3142; font: inherit; font-size: 13px; cursor: pointer; padding: 0 8px; }
.ed-top button i { font-size: 18px; }
.ed-top button:hover:not(:disabled) { background: #EEF1F5; }
.ed-top button:disabled { opacity: .35; cursor: default; }
.ed-top button[aria-pressed="true"] { background: #E3EDFF; color: #1F5BD1; }
.ed-status { margin-left: auto; font-size: 12px; color: #6B7385; }
.ed-status.bad { color: #B42318; font-weight: 600; }
.ed-canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.ed-canvas svg { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; user-select: none; }
.ed-size { position: absolute; right: 10px; bottom: 10px; background: #fff; border: 1px solid #DCE0E8; border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 600; }
.ed-side { border-left: 1px solid #E3E6EC; overflow-y: auto; background: #FAFBFC; }
.ed-sec { padding: 12px 14px; border-bottom: 1px solid #E8EBF0; }
.ed-sh { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.ed-layer { display: flex; align-items: center; gap: 6px; padding: 5px 6px; border-radius: 8px; cursor: pointer; }
.ed-layer:hover { background: #EEF1F5; }
.ed-layer.on { background: #E3EDFF; }
.ed-layer button { border: 0; background: transparent; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; color: #4A5263; }
.ed-layer button:hover { background: #fff; }
.ed-sw { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.2); flex: none; }
.ed-ln { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-ln small { display: block; font-weight: 400; color: #6B7385; font-size: 11px; }
.ed-side .sfield { margin-bottom: 8px; }
.ed-side .sfield label { font-size: 12px; }
.ed-side input[type=text], .ed-side select, .ed-side input[type=number] { width: 100%; }
.ed-grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.ed-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.ed-num label { display: block; font-size: 12px; margin-bottom: 2px; }
.ed-num input { width: 100%; min-height: 34px; }
.ed-chk { display: flex; gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; cursor: pointer; }
.ed-cust { background: #EEF6EE; border: 1px solid #CFE6D0; border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.ed-fonts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; font-size: 12px; max-height: 150px; overflow-y: auto; }
.ed-fonts label { display: flex; gap: 5px; align-items: center; }
.ed-tip { color: #6B7385; margin: 4px 0 8px; }
.ed-btns { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 8px; }
.ed-pop { position: absolute; left: 56px; z-index: 30; background: #fff; border: 1px solid #DCE0E8; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; display: grid; min-width: 210px; }
.ed-pop button { display: flex; gap: 10px; align-items: center; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.ed-pop button:hover { background: #EEF1F5; }
.ed-pop i { font-size: 18px; color: #4A5263; }
#edRoot, #stBody { position: relative; }
.ed-scrim { position: fixed; inset: 0; background: rgba(15,20,30,.45); z-index: 50; display: grid; place-items: center; padding: 16px; }
.ed-dialog { background: #fff; border-radius: 16px; width: min(860px, 100%); max-height: 85vh; overflow-y: auto; padding: 18px; }
.ed-dhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.ed-dhead h2 { margin: 0; }
.ed-dialog input[type=search] { width: 100%; margin-bottom: 12px; }
.ed-artgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ed-art { border: 1px solid #E3E6EC; border-radius: 10px; background: #fff; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; font-size: 12px; text-align: left; }
.ed-art:hover { border-color: #2F6FDB; }
.ed-art img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.ed-art span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .ed { grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto; height: auto; }
  .ed-canvas { height: 60vh; }
  .ed-side { grid-column: 1 / -1; border-left: 0; border-top: 1px solid #E3E6EC; }
}
.ed-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ed-layer .ed-ic { width: 16px; height: 16px; }
.ed-top button { display: inline-flex; align-items: center; justify-content: center; }
