/* TrimsPackaging pages/design.css (from static design.html) */

:root{
  --brand:#1890FF; --brand-600:#0E7AE6; --brand-700:#0A5FB8; --brand-50:#E8F4FF;
  --brand-grad:linear-gradient(180deg,#3AA0FF 0%,var(--brand) 55%,var(--brand-600) 100%);
  --brand-glow:rgba(24,144,255,.22); --brand-glow-soft:rgba(24,144,255,.10);
  --ink:#1D2129; --ink-2:#2A2F38; --body:#4E5969; --muted:#86909C;
  --line:#E5E6EB; --bg:#F5F7FA; --card:#FFFFFF; --surface-2:#FAFCFF;
  --orange:#FF7D00; --red:#F53F3F; --green:#00B42A;
  --radius:8px;
  --shadow:0 12px 32px -8px rgba(29,33,41,.08);
  --shadow-lg:0 24px 56px -16px rgba(29,33,41,.16);
  --hairline:linear-gradient(90deg,transparent,rgba(229,230,235,0) 6%,#E5E6EB 22%,#E5E6EB 78%,rgba(229,230,235,0) 94%,transparent);
  --font-display:'Outfit',system-ui,sans-serif;
  --font-body:'Inter',system-ui,sans-serif;
}
*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{font-family:var(--font-body);color:var(--ink);background:#F5F7FA;background-image:linear-gradient(180deg,#EDF4FC 0%,#F5F7FA 340px,#F5F7FA 100%);background-repeat:no-repeat;font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer;border:none;background:none}
.num{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1}
.wrap{max-width:none;margin:0;padding:0}
h1,h2,h3,.display{font-family:var(--font-display)}

/* PDP 按钮体系：蓝渐变主按钮 + 蓝投影；白底蓝边次按钮 */
.btn-outline{height:42px;padding:0 24px;background:#fff;color:var(--brand);border:1.5px solid var(--brand)}
.btn-outline:hover{background:var(--brand-50);transform:translateY(-1px)}
/* ---------- Toast（PDP 体系） ---------- */
#toast{position:fixed;left:50%;bottom:28px;transform:translate(-50%,16px);background:var(--ink);color:#fff;font-size:13px;font-weight:600;padding:11px 18px;border-radius:var(--radius);box-shadow:0 12px 32px -8px rgba(29,33,41,.35);opacity:0;pointer-events:none;transition:all .25s;z-index:99;max-width:min(86vw,480px);text-align:center;line-height:1.5}
#toast.show{opacity:1;transform:translate(-50%,0)}

/* ---------- 通用小组件（PDP 语言） ---------- */
@keyframes rot{to{transform:rotate(360deg)}}
.btn-ghost-sm{height:40px;padding:0 18px;border-radius:var(--radius);border:1px solid var(--line);background:#fff;color:var(--body);font-size:13px;font-weight:600;transition:all .15s;display:inline-flex;align-items:center;gap:7px}
.btn-ghost-sm:hover{border-color:var(--brand);color:var(--brand)}
.btn-ghost-sm svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:1.8}
.qty{display:inline-flex;align-items:center;border:1.5px solid var(--line);border-radius:var(--radius);overflow:hidden;height:38px;background:#fff}
.q-btn{width:34px;height:100%;display:grid;place-items:center;color:var(--body);font-size:16px;transition:background .15s,color .15s}
.q-btn:hover{background:var(--brand-50);color:var(--brand)}
.q-in{width:56px;height:100%;border:none;border-left:1px solid var(--line);border-right:1px solid var(--line);text-align:center;font-size:13.5px;font-weight:600;color:var(--ink);outline:none;font-family:var(--font-body);background:#fff}
.q-in:focus{background:var(--surface-2)}

/* ---------- Design Studio v2 (workbench layout, ref figma design/1) ---------- */
.studio-main{padding:0}
.studio{background:var(--card);overflow:hidden;display:flex;flex-direction:column;height:100vh;height:100dvh}
.mono{font-family:'JetBrains Mono',ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:600}
.gdot{width:7px;height:7px;border-radius:50%;background:var(--green);display:inline-block;flex:none}
/* studio top bar */
.ds-top{display:flex;align-items:center;gap:11px;height:50px;padding:0 16px 0 12px;border-bottom:1px solid var(--line);background:#fff}
.ds-back{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:var(--body);flex:none;transition:all .15s}
.ds-back:hover{background:var(--brand-50);color:var(--brand)}
.ds-back svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.ds-badge{width:27px;height:27px;border-radius:50%;background:var(--brand-grad);color:#fff;display:grid;place-items:center;flex:none;box-shadow:0 2px 6px rgba(24,144,255,.30)}
.ds-badge svg{width:13px;height:13px;fill:#fff;stroke:none}
.ds-title{font-family:var(--font-display);font-size:13px;font-weight:800;letter-spacing:.03em;color:var(--ink);white-space:nowrap}
.ds-prodname{font-size:12.5px;color:var(--muted);display:flex;align-items:center;white-space:nowrap}
.ds-prodname::before{content:"";width:1px;height:14px;background:var(--line);margin-right:11px}
.ds-proof{margin-left:auto;display:flex;align-items:center;gap:7px;font-size:11.5px;color:var(--body);white-space:nowrap}
/* body grid */
.ds-body{display:grid;grid-template-columns:264px minmax(0,1fr);flex:1;min-height:0}
/* left panel */
.ds-panel{border-right:1px solid var(--line);padding:20px 16px 16px;display:flex;flex-direction:column;min-width:0;overflow-y:auto}
.ds-kicker{font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;font-weight:600;font-size:10px;letter-spacing:.22em;color:var(--muted)}
.ds-panel h2{font-family:var(--font-display);font-size:22px;font-weight:800;letter-spacing:-.01em;margin:6px 0 16px;color:var(--ink)}
.act-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.act-card{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;border:1.5px solid var(--line);border-radius:12px;padding:14px 12px 12px;background:#fff;transition:all .15s;color:var(--ink)}
.act-card .ic{width:22px;height:22px;stroke:var(--ink);fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.act-card b{font-family:var(--font-display);font-size:13px;font-weight:700;line-height:1.2}
.act-card>span{font-size:11px;line-height:1.45;color:var(--muted)}
.act-card:hover{border-color:var(--brand-glow);transform:translateY(-1px);box-shadow:0 6px 14px -8px rgba(29,33,41,.18)}
.act-card.on{border-color:var(--brand);background:var(--brand-50);box-shadow:0 0 0 2.5px var(--brand-glow-soft)}
.act-card.on .ic{stroke:var(--brand)}
.act-card.ai{width:100%;margin-top:10px;flex-direction:row;align-items:center;gap:11px;padding:11px 12px}
.act-card.ai .ai-ic{width:34px;height:34px;border-radius:9px;background:var(--brand-50);display:grid;place-items:center;flex:none}
.act-card.ai .ai-ic svg{width:18px;height:18px;stroke:var(--brand);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.act-card.ai .ai-txt{flex:1;min-width:0}
.act-card.ai .ai-txt span{display:block;font-size:11px;color:var(--muted);margin-top:2px;line-height:1.4}
.prod-chip{display:flex;gap:11px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:11px;margin-top:14px;background:var(--surface-2)}
.prod-chip img{width:46px;height:46px;border-radius:9px;object-fit:cover;border:1px solid var(--line);background:#fff;flex:none}
.prod-chip b{display:block;font-family:var(--font-display);font-size:12.5px;font-weight:700;line-height:1.3;color:var(--ink)}
.prod-chip .rate{display:block;font-size:10.5px;color:var(--brand);margin-top:3px}
.prod-chip .lead{display:block;font-size:10.5px;color:var(--muted);margin-top:2px}
.panel-foot{margin-top:auto;padding-top:18px}
.ds-buy{width:100%;height:44px;border-radius:var(--radius);background:var(--brand-grad);color:#fff;font-family:var(--font-display);font-size:13.5px;font-weight:800;letter-spacing:.03em;box-shadow:0 2px 6px rgba(24,144,255,.28);transition:all .16s;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.ds-buy:hover{transform:translateY(-1px);box-shadow:0 6px 14px rgba(24,144,255,.34)}
.ds-buy:active{transform:translateY(0)}
.ds-buy:disabled{opacity:.75;cursor:default;transform:none}
.ds-buy .chev{width:6px;height:6px;border-right:1.8px solid #fff;border-bottom:1.8px solid #fff;transform:rotate(-45deg);margin-left:2px;flex:none}
.ds-buy-note{margin-top:9px;text-align:center;font-size:10.5px;line-height:1.55;color:var(--muted)}
/* tool views inside panel */
.tool-head{display:flex;align-items:center;gap:9px;margin-bottom:14px}
.tool-back{display:flex;align-items:center;gap:5px;font-size:12px;font-weight:600;color:var(--muted);padding:5px 9px 5px 6px;border-radius:8px;transition:all .15s}
.tool-back:hover{color:var(--brand);background:var(--brand-50)}
.tool-back svg{width:13px;height:13px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.tool-head b{font-family:var(--font-display);font-size:15px;font-weight:800}
.tool-view p.note{font-size:11.5px;line-height:1.6;color:var(--muted);margin-top:12px}
.tool-view p.note b{color:var(--brand)}
.f-label{display:block;font-size:12px;font-weight:600;color:var(--ink);margin:14px 0 7px}
.f-input,.f-area{width:100%;border:1.5px solid var(--line);border-radius:var(--radius);font-size:13px;font-family:var(--font-body);color:var(--ink);outline:none;background:#fff;transition:border-color .15s,box-shadow .15s}
.f-input{height:40px;padding:0 12px}
.f-area{height:76px;padding:9px 12px;resize:none;line-height:1.5}
.f-input:focus,.f-area:focus{border-color:var(--brand);box-shadow:0 0 0 3.5px var(--brand-glow-soft)}
.f-input::placeholder,.f-area::placeholder{color:var(--muted)}
.sw-row{display:flex;gap:7px;flex-wrap:wrap}
.sw{width:25px;height:25px;border-radius:50%;border:2px solid #fff;box-shadow:0 0 0 1px var(--line);cursor:pointer;transition:transform .15s,box-shadow .15s;padding:0;flex:none}
.sw:hover{transform:scale(1.1)}
.sw.on{box-shadow:0 0 0 2px var(--brand);transform:scale(1.08)}
.mini-ctl{display:flex;align-items:center;gap:10px;margin-top:12px}
.mini-ctl .lbl{font-size:12px;color:var(--body)}
.qty{display:inline-flex;align-items:center;border:1.5px solid var(--line);border-radius:var(--radius);overflow:hidden;height:34px;background:#fff}
.q-btn{width:32px;height:100%;display:grid;place-items:center;color:var(--body);font-size:15px;transition:background .15s,color .15s}
.q-btn:hover{background:var(--brand-50);color:var(--brand)}
.q-in{width:48px;height:100%;border:none;border-left:1px solid var(--line);border-right:1px solid var(--line);text-align:center;font-size:12.5px;font-weight:600;color:var(--ink);outline:none;font-family:var(--font-body);background:#fff}
.q-in:focus{background:var(--surface-2)}
.dropzone{border:1.5px dashed #B8C7DA;border-radius:12px;padding:26px 14px;text-align:center;background:var(--surface-2);cursor:pointer;transition:all .15s}
.dropzone:hover{border-color:var(--brand);background:var(--brand-50)}
.dropzone svg{width:28px;height:28px;stroke:var(--brand);fill:none;stroke-width:1.7;margin:0 auto 8px;display:block}
.dropzone b{display:block;font-size:12.5px}
.dropzone span{display:block;font-size:11px;color:var(--muted);margin-top:3px;line-height:1.5}
.art-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.art-btn{aspect-ratio:1/1;border:1.5px solid var(--line);border-radius:10px;display:grid;place-items:center;background:#fff;transition:all .15s;color:var(--muted);font-size:14px;font-weight:700;font-family:var(--font-display)}
.art-btn svg{width:21px;height:21px;fill:currentColor;stroke:none}
.art-btn:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-50)}
.art-btn.on{border-color:var(--brand);color:var(--brand);background:var(--brand-50);box-shadow:0 0 0 2.5px var(--brand-glow-soft)}
.tpl{display:flex;align-items:center;gap:10px;border:1.5px solid var(--line);border-radius:10px;padding:9px 10px;margin-bottom:8px;cursor:pointer;background:#fff;transition:all .15s;width:100%;text-align:left}
.tpl:hover{border-color:var(--brand);box-shadow:0 6px 14px -8px rgba(29,33,41,.18)}
.tpl .tp-sw{width:34px;height:34px;border-radius:50%;flex:none;border:3px solid var(--tpl-thread);background:var(--tpl-fabric);box-shadow:inset 0 0 0 2px rgba(255,255,255,.12)}
.tpl b{display:block;font-family:var(--font-display);font-size:12.5px;font-weight:700;color:var(--ink)}
.tpl span{display:block;font-size:10.5px;color:var(--muted);margin-top:1px}
/* center stage */
.ds-center{display:flex;flex-direction:column;min-width:0;min-height:0;background:#F1F2F4}
.ds-toolbar{height:46px;flex:none;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:3px;padding:0 12px}
.tb-btn{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;color:var(--body);transition:all .15s}
.tb-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.tb-btn:hover{background:var(--brand-50);color:var(--brand)}
.tb-btn:disabled{opacity:.35;cursor:default}
.tb-btn:disabled:hover{background:none;color:var(--body)}
.tb-btn.on{background:var(--brand-50);color:var(--brand);box-shadow:inset 0 0 0 1.5px var(--brand)}
.tb-sep{width:1px;height:20px;background:var(--line);margin:0 7px}
.prod-ref{margin-left:auto;display:flex;align-items:center;gap:9px;font-size:12px;font-weight:600;color:var(--body)}
.prod-ref img{width:30px;height:30px;border-radius:8px;object-fit:cover;border:1px solid var(--line)}
.ds-stage{position:relative;flex:1;min-height:0;display:grid;place-items:center;overflow:hidden}
.ds-stage.gridted{background-image:radial-gradient(circle,#D9DDE3 1px,transparent 1px);background-size:18px 18px}
.print-area{position:relative;padding:clamp(18px,3vw,34px);border:1.5px dashed #AEBBC9;border-radius:6px}
.pa-tag{position:absolute;top:-8px;left:14px;background:#F1F2F4;padding:0 8px;font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;font-weight:600;font-size:10px;letter-spacing:.18em;color:var(--muted)}
.ds-canvas{transition:transform .2s ease;will-change:transform;position:relative;z-index:1}
.start-ov{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background:rgba(255,255,255,.88);backdrop-filter:blur(3px);border-radius:8px;cursor:pointer;text-align:center;padding:20px;transition:opacity .2s}
.start-ov svg{width:26px;height:26px;stroke:var(--brand);fill:none;stroke-width:1.8}
.start-ov b{font-family:var(--font-display);font-size:17px;font-weight:800;color:var(--ink)}
.start-ov span{font-size:11.5px;color:var(--muted);line-height:1.5}
.start-ov.hide{opacity:0;pointer-events:none}
.stage-status{position:absolute;left:0;right:0;bottom:0;display:flex;align-items:center;justify-content:center;gap:9px;padding:10px 0 12px;font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;font-weight:600;font-size:10.5px;color:#98A2B3;pointer-events:none}
.stage-status .sep{width:3px;height:3px;border-radius:50%;background:#C3C9D1}
.stage-status b{color:var(--body);font-weight:600}
.zoom-ctl{position:absolute;right:14px;bottom:42px;display:flex;align-items:center;gap:2px;background:#fff;border:1px solid var(--line);border-radius:9px;padding:3px;box-shadow:0 6px 16px -8px rgba(29,33,41,.25);z-index:3}
.zoom-ctl button{width:28px;height:28px;border-radius:7px;display:grid;place-items:center;color:var(--body);transition:all .15s}
.zoom-ctl button:hover{background:var(--brand-50);color:var(--brand)}
.zoom-ctl button svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.zoom-ctl .zv{min-width:44px;text-align:center;font-family:'JetBrains Mono',ui-monospace,Consolas,monospace;font-weight:600;font-size:11px;color:var(--ink)}
.zoom-ctl .zv.fit{cursor:pointer;border-radius:7px;transition:all .15s}
.zoom-ctl .zv.fit:hover{color:var(--brand);background:var(--brand-50)}
/* patch mock */
.patch{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;background-color:var(--fx-fabric,#24365C);border:13px solid var(--fx-thread,#C9A227);border-radius:50%;box-shadow:0 24px 48px -20px rgba(29,33,41,.45),inset 0 2px 10px rgba(255,255,255,.10);transition:width .25s,height .25s,background-color .25s,border-color .25s}
.patch::before{content:"";position:absolute;inset:0;border-radius:inherit;background:repeating-linear-gradient(45deg,rgba(255,255,255,.05) 0 2px,transparent 2px 5px);pointer-events:none}
.p-emblem{display:block;color:#fff;opacity:.95;line-height:0}
.p-emblem svg{width:54px;height:54px;fill:currentColor;stroke:none;display:block}
.p-text{font-family:var(--font-display);font-weight:800;font-size:32px;letter-spacing:.02em;color:var(--fx-tcolor,#fff);line-height:1.1;text-align:center;max-width:82%;word-break:break-word}
/* bottom bar */
.ds-bottom{display:flex;align-items:center;gap:14px;padding:10px 14px;border-top:1px solid var(--line);background:#fff}
.ds-designers{display:flex;align-items:center;gap:8px;font-size:11.5px;color:var(--brand);font-weight:500;min-width:0}
.ds-bottom-actions{margin-left:auto;display:flex;align-items:center;gap:8px;flex:none}
.ds-buy.sm{width:auto;height:38px;padding:0 16px;font-size:12.5px}
/* pricing modal */
.modal-mask{position:fixed;inset:0;background:rgba(29,33,41,.45);backdrop-filter:blur(2px);z-index:90;display:grid;place-items:center;padding:20px;opacity:0;visibility:hidden;transition:all .2s}
.modal-mask.open{opacity:1;visibility:visible}
.modal{width:100%;max-width:440px;max-height:calc(100vh - 40px);overflow-y:auto;background:#fff;border-radius:14px;box-shadow:var(--shadow-lg);transform:translateY(12px) scale(.98);transition:transform .2s}
.modal-mask.open .modal{transform:none}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:15px 18px;border-bottom:1px solid var(--line)}
.modal-head b{font-family:var(--font-display);font-size:16px;font-weight:800}
.modal-x{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;color:var(--muted);transition:all .15s}
.modal-x:hover{background:var(--bg);color:var(--ink)}
.modal-x svg{width:15px;height:15px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round}
.modal-body{padding:4px 18px 18px}
.modal-body .f-label:first-child{margin-top:14px}
.pills{display:flex;flex-wrap:wrap;gap:6px}
.pill{height:30px;padding:0 12px;border-radius:var(--radius);border:1.5px solid var(--line);background:#fff;font-size:12px;font-weight:600;color:var(--body);transition:all .15s}
.pill:hover{border-color:var(--brand);color:var(--brand)}
.pill.on{border-color:var(--brand);background:var(--brand-50);color:var(--brand);box-shadow:0 0 0 2.5px var(--brand-glow-soft)}
.tiers{margin:2px 0 12px}
.tier{display:flex;align-items:center;justify-content:space-between;gap:8px;border:1.5px solid var(--line);border-radius:var(--radius);padding:9px 12px;margin-bottom:6px;cursor:pointer;transition:all .15s;background:#fff}
.tier:hover{border-color:var(--brand-glow)}
.tier.on{border-color:var(--brand);background:var(--brand-50);box-shadow:0 0 0 2.5px var(--brand-glow-soft)}
.tier .tr{font-size:12.5px;font-weight:600;color:var(--body)}
.tier.on .tr{color:var(--brand)}
.tier .tp{font-family:var(--font-display);font-size:14px;font-weight:800;color:var(--ink)}
.tier .tag{font-size:9.5px;font-weight:700;letter-spacing:.06em;color:#fff;background:var(--green);border-radius:999px;padding:2px 7px}
.qty-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}
.qty-row .f-label{margin:0}
.total-row{display:flex;align-items:flex-end;justify-content:space-between;padding:12px 0 14px;border-top:1px solid var(--line);margin-top:12px}
.total-row span{font-size:13px;font-weight:600;color:var(--ink)}
.total-row b{font-family:var(--font-display);font-size:24px;font-weight:800;letter-spacing:-.4px;color:var(--ink);line-height:1.1}
.total-row small{display:block;text-align:right;font-size:11px;color:var(--muted);margin-top:2px}
.spin{width:15px;height:15px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:rot .7s linear infinite;display:inline-block}
/* responsive */
@media(max-width:1080px){
  .studio{height:auto;min-height:100vh;min-height:100dvh}
  .ds-body{grid-template-columns:1fr}
  .ds-panel{border-right:none;border-bottom:1px solid var(--line)}
  .ds-stage{min-height:440px}
  .ds-prodname{display:none}
}
@media(max-width:640px){
  .studio-main{padding:12px 0 48px}
  .ds-stage{min-height:340px}
  .act-card>span{display:none}
  .ds-proof{display:none}
  .ds-bottom{flex-wrap:wrap;row-gap:8px}
  .ds-designers{flex-basis:100%}
  .ds-bottom-actions{margin-left:0}
  .prod-ref span{display:none}
}


/* ########## template extensions: real artwork layer + drag state ########## */
.patch .p-artwork{position:absolute;inset:10%;width:80%;height:80%;object-fit:contain;border-radius:8px;z-index:1}
.patch .p-emblem,.patch .p-text{position:relative;z-index:2}
.dropzone.drag{border-color:var(--brand,#165DFF);background:rgba(22,93,255,.06)}
