:root {
  --paper: #f1ecdf;
  --paper-light: #fbf8f0;
  --ink: #172421;
  --ink-soft: #52605b;
  --red: #b72b22;
  --red-dark: #8f1a14;
  --gold: #b98b50;
  --line: rgba(23, 36, 33, .17);
  --white: #fffdf8;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 12% 15%, rgba(183,43,34,.05) 0 1px, transparent 1.4px) 0 0 / 19px 19px, var(--paper); font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif; -webkit-font-smoothing: antialiased; }
.shape-clip-definitions { position: absolute; width: 0; height: 0; overflow: hidden; pointer-events: none; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { color: #fff; background: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

.utility-bar { min-height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 7px clamp(20px,5vw,76px); color: #e8e5dc; background: var(--ink); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.utility-bar p { margin: 0; }
.utility-bar a { color: #ef9a92; }
.site-header { position: sticky; top: 0; z-index: 30; min-height: 90px; display: flex; align-items: center; justify-content: space-between; padding: 16px clamp(20px,5vw,76px); border-bottom: 1px solid var(--line); background: rgba(241,236,223,.94); backdrop-filter: blur(18px); }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 52px; height: 52px; display: grid; place-items: center; color: var(--paper-light); background: var(--red); border-radius: 5px; font-family: "Noto Serif TC", "PMingLiU", serif; font-size: 28px; font-weight: 900; box-shadow: inset 0 0 0 2px rgba(255,255,255,.24), 3px 3px 0 rgba(143,26,20,.18); }
.brand strong { display: block; font-size: 19px; letter-spacing: .15em; }
.brand small { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 9px; letter-spacing: .2em; }
nav { display: flex; align-items: center; gap: clamp(18px,2.7vw,40px); font-size: 13px; font-weight: 900; }
nav > a:not(.nav-cta) { padding: 12px 0; border-bottom: 1px solid transparent; }
nav > a:not(.nav-cta):hover { color: var(--red); border-color: var(--red); }
.nav-cta { min-width: 120px; padding: 13px 20px; color: #fff; background: var(--red); border-radius: 3px; text-align: center; box-shadow: 4px 4px 0 var(--ink); }

.intro { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 70px; padding: clamp(58px,7vw,96px) clamp(24px,7vw,110px) 46px; }
.intro > div { max-width: 830px; }
.eyebrow { display: flex; align-items: center; gap: 11px; margin: 0 0 22px; color: var(--red-dark); font-family: ui-monospace, monospace; font-size: 11px; font-weight: 900; letter-spacing: .22em; }
.eyebrow span { width: 30px; height: 2px; background: var(--red); }
h1, h2 { font-family: "Noto Serif TC", "PMingLiU", serif; }
h1 { margin: 0; font-size: clamp(46px,5.5vw,82px); line-height: 1.13; letter-spacing: -.055em; }
h1 em { display: block; color: var(--red); font-style: normal; }
.intro > div > p:last-child { max-width: 700px; margin: 25px 0 0; color: var(--ink-soft); font-size: 16px; line-height: 1.85; }
.steps { display: flex; margin: 0; padding: 0; list-style: none; }
.steps li { position: relative; min-width: 94px; padding-top: 34px; color: #87908d; font-size: 11px; font-weight: 900; text-align: center; }
.steps li::before { content: ""; position: absolute; top: 12px; left: 0; width: 100%; height: 1px; background: var(--line); }
.steps li:first-child::before { left: 50%; width: 50%; }
.steps li:last-child::before { width: 50%; }
.steps span { position: absolute; z-index: 1; top: 0; left: 50%; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); transform: translateX(-50%); font: 800 10px ui-monospace, monospace; }
.steps .active { color: var(--red); }
.steps .active span { color: #fff; border-color: var(--red); background: var(--red); }

.studio { display: grid; grid-template-columns: minmax(0,1.17fr) minmax(370px,.83fr); gap: 34px; padding: 0 clamp(24px,7vw,110px) 90px; }
.config-panel, .preview-panel { border: 1px solid var(--line); background: rgba(251,248,240,.8); box-shadow: 0 22px 70px rgba(23,36,33,.07); }
.panel-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding: 30px 32px; border-bottom: 1px solid var(--line); }
.panel-heading span, .preview-heading > span { color: var(--red); font: 900 9px ui-monospace, monospace; letter-spacing: .2em; }
.panel-heading h2 { margin: 7px 0 0; font-size: 28px; }
.panel-heading p { max-width: 220px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; text-align: right; }
fieldset { min-width: 0; margin: 0; padding: 28px 32px 31px; border: 0; border-bottom: 1px solid var(--line); }
fieldset:last-child { border-bottom: 0; }
legend { width: 100%; margin: 0 0 18px; padding: 0; font-size: 14px; font-weight: 900; }
legend b { margin-right: 8px; color: var(--red); font: 900 10px ui-monospace, monospace; }
.option-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.option-card { min-height: 93px; display: grid; place-items: center; align-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); cursor: pointer; font-size: 12px; font-weight: 900; }
.option-card:hover, .option-card.selected, .segmented button:hover, .segmented button.selected { border-color: var(--red); background: rgba(183,43,34,.06); }
.option-card.selected { box-shadow: inset 0 0 0 1px var(--red); }
.shape-icon { width: 31px; height: 24px; display: block; border: 2px solid var(--ink); }
.shape-icon.circle { width: 28px; height: 28px; border-radius: 50%; }
.shape-icon.oval { width: 38px; border-radius: 50%; }
.shape-icon.custom { width: auto; height: auto; color: var(--red); border: 0; font-style: normal; font-size: 23px; }
.size-row { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: end; gap: 10px; }
.size-row label, .select-row label { display: grid; gap: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.size-row label > span { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 12px; }
input, select { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 2px; color: var(--ink); background: var(--white); }
input { padding: 0 13px; font-size: 18px; font-weight: 900; }
select { padding: 0 38px 0 13px; font-size: 12px; font-weight: 800; }
.times { align-self: end; height: 48px; display: grid; place-items: center; color: var(--ink-soft); }
.field-note { margin: 12px 0 0; color: var(--ink-soft); font-size: 10px; }
.material-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.material-card { position: relative; min-height: 82px; display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 3px; text-align: left; background: var(--white); cursor: pointer; }
.material-card:hover, .material-card.selected { border-color: var(--red); }
.material-card.selected { box-shadow: inset 0 0 0 1px var(--red); }
.swatch { width: 42px; height: 42px; border: 1px solid rgba(23,36,33,.18); background: #f7f4ea; }
.swatch.synthetic { background: linear-gradient(135deg,#fff,#dbe8e5); }
.swatch.clear { background: repeating-conic-gradient(#e8e5dc 0 25%,#fff 0 50%) 0 / 12px 12px; }
.swatch.kraft { background: #bd8e57; }
.material-card strong, .material-card small { display: block; }
.material-card strong { font-size: 12px; }
.material-card small { margin-top: 5px; color: var(--ink-soft); font-size: 9px; }
.material-card em { position: absolute; top: 8px; right: 8px; padding: 3px 5px; color: #fff; background: var(--red); border-radius: 2px; font-size: 8px; font-style: normal; }
.segmented { display: grid; grid-template-columns: repeat(3,1fr); }
.segmented button { min-height: 67px; padding: 11px; border: 1px solid var(--line); border-right: 0; background: var(--white); cursor: pointer; font-size: 12px; font-weight: 900; }
.segmented button:last-child { border-right: 1px solid var(--line); }
.segmented small { display: block; margin-top: 4px; color: var(--ink-soft); font-size: 8px; font-weight: 600; }
.select-row { display: grid; grid-template-columns: .8fr 1.2fr; gap: 12px; }

.preview-panel { position: sticky; top: 112px; align-self: start; overflow: hidden; background: var(--ink); }
.preview-heading { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.13); }
.preview-heading strong { font-size: 13px; }
.preview-stage { position: relative; min-height: 380px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at center,rgba(255,255,255,.09),transparent 52%), linear-gradient(145deg,#20322d,#101816); }
.preview-stage::before { content: ""; position: absolute; inset: 27px; border: 1px dashed rgba(255,255,255,.16); }
.sticker-preview { width: 190px; height: 190px; border: 9px double rgba(255,247,233,.82); outline: 4px solid var(--red); background: var(--red); box-shadow: 0 24px 55px rgba(0,0,0,.35); transition: width .25s,height .25s,border-radius .25s,clip-path .25s; }
.sticker-preview.circle { border-radius: 50%; }
.sticker-preview.oval { width: 225px; height: 150px; border-radius: 50%; }
.sticker-preview.custom { clip-path: polygon(50% 0,61% 30%,96% 35%,69% 56%,78% 91%,50% 72%,22% 91%,31% 56%,4% 35%,39% 30%); outline: 0; border: 0; }
.measure { position: absolute; color: #b9c2bf; font: 700 9px ui-monospace,monospace; letter-spacing: .08em; }
.width-measure { bottom: 31px; left: 50%; transform: translateX(-50%); }
.height-measure { right: 26px; top: 50%; transform: rotate(90deg) translateY(-50%); }
.quote-card { padding: 27px 28px 25px; color: var(--ink); background: var(--paper-light); }
.quote-label { display: flex; align-items: center; justify-content: space-between; }
.quote-label span { font-size: 12px; font-weight: 900; }
.quote-label small { color: var(--ink-soft); font-size: 9px; }
.price { margin: 10px 0 0; color: var(--red); }
.price small { font: 900 12px ui-monospace,monospace; }
.price strong { font: 950 clamp(42px,4vw,58px) ui-monospace,monospace; letter-spacing: -.07em; }
.unit-price { margin: -2px 0 18px; color: var(--ink-soft); font-size: 10px; }
dl { margin: 0; border-top: 1px solid var(--line); }
dl div { display: grid; grid-template-columns: 48px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
dt { color: var(--ink-soft); }
dd { margin: 0; font-weight: 800; text-align: right; }
.continue-button { width: 100%; min-height: 55px; display: flex; align-items: center; justify-content: space-between; margin-top: 20px; padding: 0 18px; border: 0; border-radius: 3px; color: #fff; background: var(--red); box-shadow: 4px 4px 0 var(--ink); cursor: pointer; font-weight: 900; }
.continue-button:hover { background: var(--red-dark); }
.trust-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 14px; margin: 20px 0 0; padding: 0; color: var(--ink-soft); list-style: none; font-size: 8px; font-weight: 800; }

footer { min-height: 150px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; padding: 35px clamp(24px,5vw,76px); color: #e5e8e4; background: #101816; }
footer > p { margin: 0; color: #89938f; font-size: 10px; letter-spacing: .08em; }
footer > p:last-child { text-align: right; }
.footer-brand .brand-mark { width: 45px; height: 45px; font-size: 24px; }
.footer-brand small { color: #89938f; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media (max-width: 1040px) {
  nav > a:not(.nav-cta) { display: none; }
  .intro { grid-template-columns: 1fr; gap: 38px; }
  .steps { max-width: 350px; width: 100%; }
  .steps li { flex: 1; min-width: 0; }
  .studio { grid-template-columns: 1fr; }
  .preview-panel { position: static; display: grid; grid-template-columns: 1fr 1fr; }
  .preview-heading { grid-column: 1 / -1; }
  .preview-stage { min-height: 430px; }
}
@media (max-width: 720px) {
  .utility-bar { justify-content: center; text-align: center; }
  .utility-bar p { display: none; }
  .site-header { min-height: 72px; padding-block: 11px; }
  .brand-mark { width: 44px; height: 44px; font-size: 23px; }
  .brand strong { font-size: 16px; }
  .nav-cta { min-width: 92px; padding: 11px 13px; font-size: 11px; }
  .intro { padding-top: 47px; }
  h1 { font-size: clamp(41px,13vw,62px); }
  .intro > div > p:last-child { font-size: 14px; }
  .studio { padding-inline: 14px; }
  .panel-heading { align-items: start; padding: 24px 20px; }
  .panel-heading p { display: none; }
  fieldset { padding: 25px 20px; }
  .option-grid { grid-template-columns: 1fr 1fr; }
  .material-list, .select-row { grid-template-columns: 1fr; }
  .segmented button { padding-inline: 4px; }
  .preview-panel { display: block; }
  .preview-stage { min-height: 350px; }
  footer { grid-template-columns: 1fr; gap: 20px; }
  footer > p:last-child { text-align: left; }
}

/* Sticker system: official-code quote, upload, cart and subpages */
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
textarea { font: inherit; }
input:disabled, select:disabled, button:disabled { cursor: not-allowed; opacity: .5; }
code { padding: 2px 6px; color: var(--red-dark); background: rgba(183,43,34,.08); border-radius: 3px; font: 800 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.field-label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.field-gap { margin-top: 20px; }
.product-hint { display: flex; align-items: center; gap: 9px; margin-top: 11px; color: var(--ink-soft); font-size: 10px; line-height: 1.5; }
.product-hint strong { flex: 0 0 auto; padding: 5px 7px; color: #fff; background: var(--ink); border-radius: 2px; font: 900 10px ui-monospace, monospace; }
.shape-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.shape-options button { min-height: 68px; padding: 10px 6px; color: var(--ink); border: 1px solid var(--line); border-radius: 2px; background: var(--white); cursor: pointer; }
.shape-options button:hover, .shape-options button.selected { color: var(--red-dark); border-color: var(--red); background: rgba(183,43,34,.07); box-shadow: inset 0 -3px 0 var(--red); }
.shape-options strong, .shape-options small { display: block; }
.shape-options strong { font-size: 13px; }
.shape-options small { margin-top: 5px; color: var(--ink-soft); font: 700 8px ui-monospace,monospace; }
.size-search-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; }
.size-search-row input { height: 46px; font-size: 13px; }
.size-search-row span { min-width: 80px; color: var(--ink-soft); font-size: 10px; text-align: right; }
#sizeCode { font-family: ui-monospace, "Microsoft JhengHei", monospace; }
.dynamic-options { grid-template-columns: repeat(auto-fit,minmax(90px,1fr)); gap: 8px; }
.dynamic-options button { min-height: 62px; border: 1px solid var(--line); border-radius: 2px; }
.dynamic-options button:last-child { border-right: 1px solid var(--line); }
.dynamic-options strong, .dynamic-options small { display: block; }
.dynamic-options small { margin-top: 5px; color: var(--ink-soft); font-size: 8px; font-weight: 600; }
.loading-line { grid-column: 1 / -1; min-height: 54px; display: grid; place-items: center; color: var(--ink-soft); border: 1px dashed var(--line); font-size: 10px; }
.select-row input { height: 48px; font-size: 15px; }
.select-row label small { display: block; min-height: 16px; color: var(--ink-soft); font-size: 8px; font-weight: 600; line-height: 1.5; }
.is-loading { position: relative; }
.is-loading::after { content: ""; position: absolute; z-index: 5; top: 0; right: 0; width: 3px; height: 25%; background: var(--red); animation: quote-load 1s ease-in-out infinite alternate; }
@keyframes quote-load { to { height: 100%; } }
.sticker-preview.heart { width: 200px; height: 185px; -webkit-clip-path: url(#sticker-heart-clip); clip-path: url(#sticker-heart-clip); border: 0; outline: 0; }
.sticker-preview.special { clip-path: polygon(50% 0,62% 27%,96% 34%,70% 56%,78% 94%,50% 74%,22% 94%,30% 56%,4% 34%,38% 27%); border: 0; outline: 0; }
.quote-error { margin: 0 0 16px; padding: 11px 12px; color: #8b211a; border: 1px solid rgba(183,43,34,.28); background: rgba(183,43,34,.08); border-radius: 3px; font-size: 10px; line-height: 1.6; }

.upload-workspace, .cart-workspace { scroll-margin-top: 105px; padding: 74px clamp(24px,7vw,110px) 90px; border-top: 1px solid var(--line); background: var(--paper-light); }
.cart-workspace { background: #e7e1d3; }
.workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 35px; margin-bottom: 34px; }
.workspace-heading span { color: var(--red); font: 900 9px ui-monospace, monospace; letter-spacing: .2em; }
.workspace-heading h2 { margin: 7px 0 0; font: 900 clamp(28px,3vw,42px) "Noto Serif TC","PMingLiU",serif; }
.workspace-heading > p { max-width: 450px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.7; text-align: right; }
.upload-layout { display: grid; grid-template-columns: minmax(280px,.7fr) minmax(0,1.3fr); gap: 26px; }
.upload-controls, .canvas-column { min-width: 0; border: 1px solid var(--line); background: #fffdf8; }
.upload-controls { padding: 24px; }
.drop-zone { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 8px; padding: 25px; color: var(--ink); border: 1px dashed rgba(23,36,33,.35); background: linear-gradient(135deg,rgba(183,43,34,.035),transparent); cursor: pointer; text-align: center; transition: .2s ease; }
.drop-zone:hover, .drop-zone.dragging { color: var(--red); border-color: var(--red); background: rgba(183,43,34,.06); }
.drop-zone.uploading { pointer-events: none; opacity: .6; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { font: 900 19px "Noto Serif TC","PMingLiU",serif; }
.drop-zone small { color: var(--ink-soft); font-size: 9px; }
.upload-icon { width: 45px; height: 45px; display: grid; place-items: center; color: #fff; background: var(--red); border-radius: 50%; font-size: 25px; }
.upload-progress { margin: 15px 0 0; padding: 14px; border: 1px solid var(--line); }
.upload-progress span { display: block; width: 38%; height: 3px; background: var(--red); animation: upload-progress 1s ease-in-out infinite alternate; }
.upload-progress p { margin: 8px 0 0; color: var(--ink-soft); font-size: 9px; }
@keyframes upload-progress { to { width: 88%; } }
.file-info { margin-top: 14px; padding: 13px 14px; color: #fff; background: var(--ink); }
.file-info span, .file-info strong, .file-info small { display: block; }
.file-info span { color: #ef9a92; font: 900 8px ui-monospace,monospace; letter-spacing: .15em; }
.file-info strong { margin-top: 5px; overflow-wrap: anywhere; font-size: 11px; }
.file-info small { margin-top: 4px; color: #aeb8b4; font-size: 8px; }
.editor-controls { display: grid; gap: 17px; margin-top: 19px; padding-top: 19px; border-top: 1px solid var(--line); }
.editor-controls[aria-disabled="true"] { pointer-events: none; opacity: .42; }
.editor-controls label { display: grid; gap: 8px; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.editor-controls label > span { display: flex; align-items: center; gap: 10px; }
.editor-controls input[type="range"] { height: 22px; padding: 0; }
.editor-controls input[type="color"] { width: 54px; height: 38px; padding: 3px; }
.editor-controls output { min-width: 48px; color: var(--ink); font: 900 10px ui-monospace,monospace; }
.editor-controls input[type="text"], .editor-controls label > input:not([type]) { height: 43px; font-size: 12px; }
.control-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.control-row button, .back-button { min-height: 43px; border: 1px solid var(--line); background: transparent; cursor: pointer; font-size: 10px; font-weight: 900; }
.control-row button:hover, .back-button:hover { border-color: var(--red); color: var(--red); }
.preflight-card { margin-top: 20px; padding: 17px; border: 1px solid var(--line); background: #f5f1e7; }
.preflight-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.preflight-card span { color: var(--red); font: 900 8px ui-monospace,monospace; letter-spacing: .14em; }
.preflight-card strong { font-size: 10px; text-align: right; }
.preflight-card ul { margin: 12px 0 0; padding-left: 17px; color: var(--ink-soft); font-size: 9px; line-height: 1.7; }
.canvas-column { overflow: hidden; background: var(--ink); }
.canvas-toolbar { min-height: 51px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 18px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.12); }
.canvas-toolbar span { color: #f2d478; font: 900 10px ui-monospace,monospace; }
.canvas-toolbar small { color: #aeb8b4; font-size: 8px; }
.canvas-shell { position: relative; min-height: 480px; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at center,#253c35,#101816 70%); }
#artCanvas { display: block; width: 100%; max-width: 760px; height: auto; touch-action: none; cursor: grab; }
#artCanvas:active { cursor: grabbing; }
.canvas-shell > p { position: absolute; color: #9ca7a3; font-size: 10px; }
.canvas-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; padding: 13px; color: #b9c2bf; border-top: 1px solid rgba(255,255,255,.11); font-size: 8px; }
.canvas-legend span { display: flex; align-items: center; gap: 6px; }
.canvas-legend i { width: 22px; border-top: 2px solid #f2d478; }
.canvas-legend i.safe { border-color: #e64b40; border-top-style: dashed; }
.canvas-legend i.bleed { border-color: #7bbec1; border-top-style: dotted; }
.screen-note { margin: 0; padding: 0 18px 17px; color: #8d9994; font-size: 8px; line-height: 1.6; text-align: center; }
.workspace-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 22px; }
.workspace-actions .back-button { min-width: 160px; padding: 0 18px; }
.workspace-actions .add-cart-button { width: min(390px,100%); margin: 0; }

.cart-layout { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(290px,.65fr); gap: 26px; align-items: start; }
.cart-items { display: grid; gap: 11px; }
.cart-items article { display: grid; grid-template-columns: 108px 1fr auto; gap: 17px; align-items: center; min-height: 128px; padding: 12px; border: 1px solid var(--line); background: #fffdf8; }
.cart-items img { width: 108px; height: 102px; object-fit: cover; background: #ebe7dc; }
.cart-items span { color: var(--red); font: 900 8px ui-monospace,monospace; letter-spacing: .09em; }
.cart-items strong { display: block; margin-top: 7px; font-size: 14px; }
.cart-items p { margin: 6px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.cart-items small { display: block; margin-top: 6px; color: var(--ink-soft); font-size: 9px; }
.cart-item-side { display: grid; justify-items: end; gap: 20px; }
.cart-item-side b { color: var(--red); font: 900 16px ui-monospace,monospace; }
.cart-item-side button { border: 0; color: var(--ink-soft); background: transparent; cursor: pointer; font-size: 9px; text-decoration: underline; }
.cart-summary { position: sticky; top: 110px; padding: 28px; color: #fff; background: var(--ink); }
.cart-summary > span { color: #ef9a92; font: 900 9px ui-monospace,monospace; letter-spacing: .18em; }
.cart-summary > p:first-of-type { display: flex; align-items: end; justify-content: space-between; margin: 25px 0; }
.cart-summary p small { display: block; color: #aab4b0; font-size: 9px; }
.cart-summary p strong { font: 900 26px "Noto Serif TC","PMingLiU",serif; }
.cart-summary p strong b { color: #ef9a92; }
.cart-summary dl { border-color: rgba(255,255,255,.14); }
.cart-summary dl div { grid-template-columns: 80px 1fr; border-color: rgba(255,255,255,.14); }
.checkout-button { min-height: 53px; display: grid; place-items: center; margin-top: 22px; padding: 10px; color: #fff; background: var(--red); text-align: center; font-size: 11px; font-weight: 900; }
.make-another { width: 100%; min-height: 44px; margin-top: 10px; color: #fff; border: 1px solid rgba(255,255,255,.2); background: transparent; cursor: pointer; font-size: 10px; font-weight: 800; }
.cart-summary > p:last-child { margin: 18px 0 0; color: #99a5a0; font-size: 8px; line-height: 1.6; }

.material-guide { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 620px; background: #fffdf8; }
.material-photo { min-height: 520px; overflow: hidden; }
.material-photo img { width: 100%; height: 100%; display: block; object-fit: cover; }
.material-copy { align-self: center; padding: 65px clamp(35px,6vw,90px); }
.material-copy h2, .faq-section h2 { margin: 0; font: 900 clamp(34px,4vw,56px) "Noto Serif TC","PMingLiU",serif; line-height: 1.2; }
.material-copy > p:not(.eyebrow), .faq-section > div:first-child > p:last-child { color: var(--ink-soft); font-size: 12px; line-height: 1.8; }
.material-copy ul { margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.material-copy li { display: flex; justify-content: space-between; gap: 15px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 10px; }
.material-copy li span { color: var(--red); font: 800 9px ui-monospace,monospace; }
.faq-section { display: grid; grid-template-columns: .75fr 1.25fr; gap: 70px; padding: 90px clamp(24px,7vw,110px); }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 22px 42px 22px 0; cursor: pointer; font-size: 13px; font-weight: 900; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 4px; color: var(--red); font-size: 20px; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { margin: -7px 0 22px; color: var(--ink-soft); font-size: 11px; line-height: 1.75; }
.mobile-action { display: none; }

/* Checkout, tracking and order status */
.subpage-main { min-height: 70vh; padding: 65px clamp(24px,7vw,110px) 95px; }
.subpage-heading { max-width: 850px; margin-bottom: 42px; }
.subpage-heading.compact { max-width: 650px; margin-inline: auto; text-align: center; }
.subpage-heading .eyebrow { justify-content: center; }
.subpage-heading h1, .success-heading h1, .empty-state h1 { margin: 0; font: 900 clamp(42px,5.3vw,74px) "Noto Serif TC","PMingLiU",serif; line-height: 1.12; }
.subpage-heading h1 em, .success-heading h1 em { display: block; color: var(--red); font-style: normal; }
.subpage-heading > p:last-child, .success-heading > p:last-of-type { color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.checkout-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); gap: 28px; align-items: start; }
.checkout-form, .checkout-summary, .track-form, .order-status-card, .lookup-help { border: 1px solid var(--line); background: var(--paper-light); }
.form-section { padding: 28px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.form-section-title { display: flex; gap: 15px; align-items: start; margin-bottom: 23px; }
.form-section-title > span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: var(--red); font: 900 9px ui-monospace,monospace; }
.form-section-title h2 { margin: 0; font: 900 23px "Noto Serif TC","PMingLiU",serif; }
.form-section-title p { margin: 4px 0 0; color: var(--ink-soft); font-size: 9px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid .full { grid-column: 1 / -1; }
.checkout-form label, .track-form label { display: grid; gap: 8px; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.checkout-form input, .checkout-form select, .track-form input { height: 47px; padding-inline: 12px; font-size: 13px; }
.checkout-form textarea { width: 100%; padding: 12px; color: var(--ink); border: 1px solid var(--line); background: #fff; resize: vertical; }
.checkout-form label small { font-size: 8px; }
.check-row { grid-template-columns: 20px 1fr !important; align-items: start; margin-top: 20px; line-height: 1.7; }
.check-row input { width: 18px; height: 18px; }
.submit-order { min-height: 52px; display: inline-flex; align-items: center; justify-content: center; gap: 20px; margin-top: 21px; padding: 0 22px; color: #fff; border: 0; background: var(--red); cursor: pointer; font-size: 11px; font-weight: 900; }
.checkout-summary { position: sticky; top: 110px; }
.summary-title { display: flex; justify-content: space-between; padding: 22px; color: #fff; background: var(--ink); }
.summary-title span { color: #ef9a92; font: 900 8px ui-monospace,monospace; }
.summary-title strong { font-size: 11px; }
.summary-items article, .order-items article { display: grid; grid-template-columns: 68px 1fr auto; gap: 11px; align-items: center; padding: 13px; border-bottom: 1px solid var(--line); }
.summary-items img, .order-items img { width: 68px; height: 68px; object-fit: cover; background: #eee9dd; }
.summary-items strong, .order-items strong { display: block; font-size: 10px; }
.summary-items p, .order-items p { margin: 4px 0; color: var(--ink-soft); font-size: 8px; line-height: 1.45; }
.summary-items small, .order-items small { color: var(--ink-soft); font-size: 8px; }
.summary-items b, .order-items b { color: var(--red); font: 900 10px ui-monospace,monospace; }
.summary-totals { padding: 15px 20px; }
.summary-totals div { grid-template-columns: 90px 1fr; }
.summary-totals .grand-total { font-size: 13px; }
.summary-totals .grand-total dd { color: var(--red); }
.summary-note { margin: 0; padding: 0 20px 22px; color: var(--ink-soft); font-size: 8px; line-height: 1.6; }
.form-alert { max-width: 900px; margin: 0 0 22px; padding: 14px 16px; color: #8b211a; border: 1px solid rgba(183,43,34,.3); background: rgba(183,43,34,.08); font-size: 10px; }
.track-form { max-width: 680px; display: grid; grid-template-columns: 1fr .55fr auto; align-items: end; gap: 12px; margin: 0 auto 25px; padding: 24px; }
.track-form button { min-height: 47px; padding: 0 20px; color: #fff; border: 0; background: var(--red); cursor: pointer; font-size: 10px; font-weight: 900; }
.track-alert { max-width: 680px; margin-inline: auto; }
.lookup-help { max-width: 680px; display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; margin: 25px auto 0; padding: 20px; }
.lookup-help span { color: var(--red); font-weight: 900; }
.lookup-help p { margin: 0; color: var(--ink-soft); font-size: 9px; line-height: 1.6; }
.lookup-help a { font-size: 9px; font-weight: 900; }
.success-heading { max-width: 900px; margin: 0 auto 45px; text-align: center; }
.success-heading .eyebrow { justify-content: center; }
.success-mark { width: 64px; height: 64px; display: grid; place-items: center; margin: 0 auto 24px; color: #fff; background: var(--red); border-radius: 50%; font-size: 28px; }
.success-actions { display: flex; justify-content: center; align-items: center; gap: 25px; margin-top: 24px; }
.success-actions .submit-order { margin: 0; }
.success-actions > a:last-child { font-size: 10px; font-weight: 900; text-decoration: underline; }
.order-status-card { max-width: 1000px; margin: 0 auto; }
.order-status-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 23px 26px; color: #fff; background: var(--ink); }
.order-status-head span { color: #ef9a92; font: 900 8px ui-monospace,monospace; letter-spacing: .15em; }
.order-status-head h2 { margin: 5px 0 0; font: 900 23px ui-monospace,monospace; }
.status-pill { padding: 8px 11px; color: #fff; background: var(--red); border-radius: 999px; font-size: 9px; }
.order-meta-grid { display: grid; grid-template-columns: repeat(4,1fr); border-bottom: 1px solid var(--line); }
.order-meta-grid p { margin: 0; padding: 18px; border-right: 1px solid var(--line); }
.order-meta-grid p:last-child { border-right: 0; }
.order-meta-grid small, .order-meta-grid strong { display: block; }
.order-meta-grid small { color: var(--ink-soft); font-size: 8px; }
.order-meta-grid strong { margin-top: 5px; font-size: 10px; }
.status-timeline { margin: 0; padding: 25px 30px 25px 48px; list-style: none; }
.status-timeline li { position: relative; display: grid; grid-template-columns: 12px 1fr; gap: 16px; padding-bottom: 23px; }
.status-timeline li::before { content: ""; position: absolute; left: 5px; top: 8px; bottom: -5px; width: 1px; background: var(--line); }
.status-timeline li:last-child { padding-bottom: 0; }
.status-timeline li:last-child::before { display: none; }
.status-timeline li > span { z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 2px solid var(--red); border-radius: 50%; background: var(--paper-light); }
.status-timeline strong { font-size: 10px; }
.status-timeline p { margin: 5px 0; color: var(--ink-soft); font-size: 9px; }
.status-timeline small { color: #87908d; font-size: 8px; }
.empty-state { max-width: 700px; margin: 50px auto; text-align: center; }
.empty-state > span { color: var(--red); font: 900 13px ui-monospace,monospace; }
.empty-state p { color: var(--ink-soft); }

@media (max-width: 1040px) {
  .upload-layout, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-summary, .checkout-summary { position: static; }
  .material-guide { grid-template-columns: 1fr; }
  .material-photo { min-height: 450px; max-height: 650px; }
  .faq-section { grid-template-columns: 1fr; gap: 35px; }
}

@media (max-width: 720px) {
  body { padding-bottom: 70px; }
  .intro { padding-bottom: 32px; }
  .intro h1 { font-size: clamp(39px,12vw,55px); }
  .studio { padding-bottom: 65px; }
  .dynamic-options { grid-template-columns: repeat(2,1fr); }
  .shape-options { grid-template-columns: repeat(2,1fr); }
  .size-search-row { grid-template-columns: 1fr; }
  .size-search-row span { text-align: left; }
  .preview-stage { min-height: 320px; }
  .upload-workspace, .cart-workspace { padding: 52px 14px 70px; }
  .workspace-heading { display: block; }
  .workspace-heading > p { margin-top: 12px; text-align: left; }
  .upload-controls { padding: 14px; }
  .canvas-shell { min-height: 300px; }
  .workspace-actions { flex-direction: column-reverse; }
  .workspace-actions .back-button, .workspace-actions .add-cart-button { width: 100%; }
  .cart-items article { grid-template-columns: 75px 1fr; }
  .cart-items img { width: 75px; height: 78px; }
  .cart-item-side { grid-column: 2; grid-template-columns: 1fr auto; justify-items: start; align-items: center; gap: 12px; }
  .material-photo { min-height: 360px; }
  .material-copy { padding: 50px 24px; }
  .faq-section { padding: 65px 24px; }
  .mobile-action { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 9px 12px max(9px,env(safe-area-inset-bottom)); color: #fff; background: var(--ink); box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
  .mobile-action span small { display: block; color: #aeb8b4; font-size: 8px; }
  .mobile-action span strong { color: #fff; font: 900 18px ui-monospace,monospace; }
  .mobile-action button { min-width: 108px; min-height: 46px; color: #fff; border: 0; background: var(--red); font-weight: 900; }
  .subpage-main { padding: 45px 14px 75px; }
  .subpage-heading h1, .success-heading h1, .empty-state h1 { font-size: 42px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .form-section { padding: 22px 17px; }
  .track-form { grid-template-columns: 1fr; }
  .lookup-help { grid-template-columns: 1fr; }
  .order-meta-grid { grid-template-columns: 1fr 1fr; }
  .order-meta-grid p:nth-child(2) { border-right: 0; }
  .summary-items article, .order-items article { grid-template-columns: 58px 1fr; }
  .summary-items img, .order-items img { width: 58px; height: 58px; }
  .summary-items b, .order-items b { grid-column: 2; }
  .success-actions { flex-direction: column; }
}
