:root {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .72; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.svg-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.page, .header-inner { max-width: 1200px; width: calc(100% - 96px); margin-inline: auto; }
.header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; }





.help-button { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); font-size: 13px; font-weight: 650; padding: 9px 13px; }
.help-button .icon { width: 17px; height: 17px; color: var(--primary); }
.help-button:hover, .icon-button:hover { background: var(--wash); }
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 310px; background: linear-gradient(110deg,#fff0e7 2%,#fbe0d9 56%,#f9d8cc 100%); border: 1px solid var(--line); border-radius: 25px; margin: 29px 0 27px; display: flex; align-items: center; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background-image: radial-gradient(#ab6e4633 .7px, transparent .7px); background-size: 7px 7px; mask-image: linear-gradient(90deg,transparent 43%,#000 100%); opacity: .57; pointer-events: none; }
.hero-copy { padding: 24px 0 26px 53px; position: relative; z-index: 1; }
.hero-eyebrow { color: var(--primary); font-size: 12px; font-weight: 750; letter-spacing: .12em; display: flex; align-items: center; gap: 7px; }
.hero-eyebrow .icon { width: 15px; height: 15px; fill: var(--blush); }
.hero h1 { font-size: clamp(36px, 4vw, 56px); line-height: 1.16; letter-spacing: -.06em; font-weight: 900; margin: 12px 0; }
.hero h1 span { color: var(--primary); }
.hero-description { color: var(--muted); font-size: 14px; line-height: 1.6; letter-spacing: .02em; }
.hero-link { display: inline-flex; align-items: center; gap: 9px; border-bottom: 1px solid var(--active-line); margin-top: 14px; padding-bottom: 4px; color: var(--primary); font-size: 13px; font-weight: 780; }
.hero-link:hover { color: #73402f; }
.hero-link .icon { width: 15px; height: 15px; }
.hero-visual { position: absolute; inset: 0 3.5% 0 auto; width: 52%; display: grid; place-items: center; }
.hero-orbits { position: absolute; top: 50%; left: 50%; width: 94%; height: auto; color: #ae735d70; transform: translate(-50%, -50%); }
.hero-image { position: relative; width: min(84%, 500px); aspect-ratio: 3 / 2; align-self: center; transform: translate(3%, 1%); }
.portrait-sheet {
  position: absolute; width: 58%; aspect-ratio: 1.05; top: 8%; right: 7%;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; padding: 3.1%; gap: 4%;
  background: #fffaf4; border: 2px solid #fff; border-radius: 9%; transform: rotate(9deg);
  box-shadow: 1px 4px 0 #e5c6b8, 3px 10px 16px #80523c24;
}
.portrait-sheet::before {
  content: ""; position: absolute; top: -4%; left: 33%; width: 34%; height: 9%; transform: rotate(-4deg);
  background: repeating-linear-gradient(70deg,#f6d697 0 4px,#ffebba 4px 8px); opacity: .94;
}
.portrait-sheet img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; padding: 14% 16% 18%; background: center / contain no-repeat; }
.portrait-sheet .sample-rose { background-image: url('/assets/motifs/rose-heart-small.png'); }
.portrait-sheet .sample-mint { background-image: url('/assets/motifs/teal-heart-small.png'); }
.portrait-sheet .sample-plaid { background-image: url('/assets/motifs/mint-plaid-heart-small.png'); }
.portrait-sheet .sample-stars { background-image: url('/assets/motifs/pink-star-heart-small.png'); }
.portrait-cutout {
  position: absolute; width: 55%; left: 0; bottom: 1%; transform: rotate(-10deg);
  filter: drop-shadow(3px 0 0 white) drop-shadow(-3px 0 0 white) drop-shadow(0 3px 0 white) drop-shadow(0 -3px 0 white) drop-shadow(1px 5px 3px #80523c38);
}
.portrait-star { position: absolute; right: 4%; bottom: 4%; width: 15%; transform: rotate(12deg); filter: drop-shadow(1px 3px 1px #80523c2e); }
.hero-spark { position: absolute; color: #aa7557; font-family: system-ui, sans-serif; font-size: 31px; line-height: 1; }
.hero-spark-one { top: 18%; left: 15%; }
.hero-spark-two { top: 22%; right: 11%; font-size: 20px; color: #75999e; }
.hero-spark-three { bottom: 20%; right: 10%; font-size: 25px; }
.studio { display: grid; grid-template-columns: minmax(355px, 4.15fr) minmax(0, 6fr); gap: 23px; align-items: start; scroll-margin-top: 18px; }
.controls { display: grid; gap: 18px; }
.card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 21px; box-shadow: 0 2px 3px #40213c05; }
.control-card { padding: 22px; }
.section-heading { display: flex; gap: 12px; align-items: flex-start; }
.section-heading h2 { font-size: 19px; line-height: 1.24; font-weight: 820; letter-spacing: -.025em; }
.section-heading p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.step { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--butter); color: #704c34; font: 750 13px/1 ui-monospace, monospace; flex: 0 0 auto; }
.dropzone { display: flex; align-items: center; gap: 13px; justify-content: center; background: var(--wash); width: 100%; min-height: 89px; border: 1px dashed #d99884; border-radius: 13px; color: var(--primary); margin-top: 16px; padding: 10px; }
.dropzone:hover, .dropzone.is-dragging { background: var(--blush); border-color: var(--active-line); }
.upload-icon { display: grid; place-items: center; width: 36px; height: 36px; background: var(--blush); border-radius: 10px; color: var(--primary); }
.upload-icon .icon { width: 19px; height: 19px; }
.upload-copy { display: grid; text-align: left; gap: 5px; }
.upload-copy strong { font-size: 13px; }
.upload-copy small { color: var(--muted); font-size: 11px; }
.photo-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; min-height: 33px; margin-top: 11px; }
.photo-row img { background: var(--blush); object-fit: cover; border-radius: 9px; }
.photo-row span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.text-button { margin-left: auto; white-space: nowrap; border: 0; background: transparent; padding: 5px 0 5px 5px; color: var(--primary); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 16px; padding: 4px; border-radius: 11px; background: var(--stage); }
.mode-button { border: 1px solid transparent; border-radius: 8px; padding: 8px 3px; display: flex; justify-content: center; align-items: center; gap: 7px; background: transparent; font-size: 13px; font-weight: 680; color: var(--muted); }
.mode-button .icon { width: 16px; height: 16px; }
.mode-button.is-active { background: white; color: var(--primary); border-color: var(--line); box-shadow: 0 1px 2px #45263d0d; }
.mode-button:hover { color: var(--primary); }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.template { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 5px 5px 8px; text-align: left; min-width: 0; }
.template:hover { border-color: #d99884; }
.template.is-active { color: var(--primary); border-color: var(--active-line); box-shadow: inset 0 0 0 1px #e0917949; background: var(--wash); }
.template-art { position: relative; display: grid; place-items: center; height: 65px; overflow: hidden; border-radius: 8px; }
.template-art canvas { height: 54px; width: auto; transform: rotate(-10deg); box-shadow: 1px 3px 6px #4f322733; border-radius: 1px; }
.template strong { display: block; white-space: nowrap; font-size: 11px; padding: 7px 2px 0; overflow: hidden; text-overflow: ellipsis; }
.template-check { display: none; align-items: center; justify-content: center; position: absolute; top: 4px; right: 4px; width: 17px; height: 17px; border-radius: 50%; color: white; background: var(--primary); }
.template-check .icon { width: 11px; height: 11px; stroke-width: 2.4; }
.template.is-active .template-check { display: inline-flex; }
.custom-panel { display: grid; gap: 10px; margin-top: 13px; }
.setting { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.setting select { color: var(--ink); border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 6px 20px 6px 8px; width: 145px; }
.swatches { display: flex; gap: 8px; }
.swatch { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #47304f26; color: var(--ink); padding: 0; }
.swatch .icon { visibility: hidden; width: 14px; height: 14px; }
.swatch[aria-pressed="true"] { border-color: #875b48; }
.swatch[aria-pressed="true"] .icon { visibility: visible; }
.preview-card { padding: 20px; display: grid; gap: 14px; }
.preview-heading, .preview-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.preview-heading { padding: 1px 2px 0; }
.preview-stage { position: relative; display: grid; place-items: center; min-height: 389px; background-color: var(--stage); background-image: radial-gradient(#ddc8b6 1px, transparent 1px); background-size: 14px 14px; border: 1px solid var(--line); border-radius: 13px; padding: 21px 15px; overflow: hidden; }
.stage-label { position: absolute; top: 12px; left: 12px; padding: 4px 7px; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 5px; font: 700 11px/1.2 ui-monospace, monospace; }
.paper-wrap { width: min(100%, 245px); aspect-ratio: 70 / 99; box-shadow: 0 5px 18px #4f322725,0 1px 3px #4f32271b; }
.paper-wrap canvas { display: block; width: 100%; height: auto; background: #fffdfb; }
.icon-button { display: grid; place-items: center; width: 35px; height: 35px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--primary); flex: none; }
.icon-button .icon { width: 17px; height: 17px; }
.preview-footer { padding: 0 1px; }
.preview-footer p { color: var(--muted); font-size: 12px; white-space: nowrap; }
.live-dot { display: inline-block; background: var(--primary); width: 6px; height: 6px; border-radius: 50%; margin: 0 4px 2px 0; }
.separator { margin: 0 2px; color: #ae8975; }
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 11px; border: 1px solid transparent; border-radius: 10px; background: var(--coral); color: #542f26; padding: 11px 15px; min-height: 43px; font-size: 13px; font-weight: 760; white-space: nowrap; box-shadow: 0 2px 0 #cb8976; border-color: #cf8472; }
.primary:hover { background: #f58f83; border-color: #b96853; }
.primary .icon { width: 16px; height: 16px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; padding: 19px 1px 25px; color: var(--muted); font-size: 12px; }
.site-footer span { display: inline-flex; align-items: center; gap: 5px; }
.site-footer .icon { width: 16px; height: 16px; color: var(--coral); }
.site-footer a:hover { color: var(--primary); text-decoration: underline; }
.modal { width: min(435px, calc(100% - 30px)); padding: 24px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink); background: #fff; box-shadow: 0 16px 60px #57352646; }
.modal::backdrop { background: #48332666; backdrop-filter: blur(3px); }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.dialog-heading h2, .success-modal h2 { font-size: 22px; letter-spacing: -.035em; }
.guide-list { padding-left: 22px; margin: 0 0 18px; color: var(--primary); }
.guide-list li { padding: 6px; }
.guide-list p, .form-note, .success-modal > p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.full-width { width: 100%; margin-top: 14px; }
.zoom-modal { width: fit-content; max-width: calc(100% - 30px); background: var(--paper); }
.zoom-modal canvas { display: block; width: auto; height: min(72vh, 790px); max-width: 100%; object-fit: contain; background: white; }
.order-summary { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; background: var(--wash); margin-bottom: 16px; }
.order-summary img { object-fit: contain; border-radius: 4px; }
.order-summary strong, .order-summary small { display: block; }
.order-summary small { margin-top: 4px; color: var(--muted); }
.field-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 730; }
.field-label span { margin-left: 5px; color: var(--primary); font-size: 11px; }
input[type="text"], input[type="password"] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: white; }
.feedback { margin-top: 7px; color: var(--primary); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.success-modal { text-align: center; }
.success-modal .dialog-heading { margin-bottom: 1px; }
.success-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: var(--blush); color: var(--primary); }
.success-icon .icon { width: 25px; height: 25px; }
.order-number { padding: 12px; margin-top: 15px; background: var(--wash); border: 1px dashed #d99884; border-radius: 11px; }
.order-number small, .order-number strong { display: block; }
.order-number small { color: var(--muted); margin-bottom: 5px; }
.order-number strong { color: var(--primary); font: 750 clamp(15px, 4vw, 20px)/1.4 ui-monospace, monospace; overflow-wrap: anywhere; }
.merchant { width: min(550px, calc(100% - 32px)); margin: 42px auto; padding: 24px; }
.merchant h1 { font-size: 25px; }
.merchant > p { margin: 8px 0 20px; color: var(--muted); font-size: 14px; }
.merchant form .field-label { margin-top: 12px; }
.merchant dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; font-size: 14px; margin-top: 20px; }
.merchant dd { margin: 0; overflow-wrap: anywhere; }
.merchant-preview { display: block; width: min(100%, 245px); margin: 17px auto; box-shadow: 0 2px 10px #4f322725; }
.merchant-actions { display: flex; flex-wrap: wrap; gap: 9px; }
@media (max-width: 1000px) {
  .page, .header-inner { width: calc(100% - 56px); }
  .hero-copy { padding-left: 34px; }
  .hero { min-height: 275px; }
  .studio { gap: 16px; grid-template-columns: minmax(305px, 4.15fr) minmax(0, 6fr); }
  .control-card { padding: 17px; }
  .preview-card { padding: 16px; }
}
@media (max-width: 680px) {
  .page, .header-inner { width: calc(100% - 32px); }
  .header-inner { height: 61px; }




  .help-button { padding: 7px 9px; font-size: 12px; }
  .hero { min-height: 220px; margin: 17px 0 16px; border-radius: 19px; }
  .hero-copy { padding: 19px 0 19px 19px; }
  .hero h1 { font-size: clamp(27px, 6.6vw, 40px); margin: 8px 0; }
  .hero-eyebrow { font-size: 10px; gap: 4px; letter-spacing: .06em; }
  .hero-eyebrow .icon { width: 12px; height: 12px; }
  .hero-description { font-size: 11px; width: min(54vw, 235px); }
  .hero-link { margin-top: 11px; font-size: 11px; }
  .hero-visual { inset-inline-end: -7%; width: 62%; }
  .hero-image { width: 95%; transform: translate(4%, 3%); }
  .hero-spark-one { left: 22%; top: 22%; font-size: 19px; }
  .hero-spark-two { right: 15%; top: 28%; font-size: 16px; }
  .hero-spark-three { right: 18%; bottom: 20%; font-size: 17px; }
  .studio { grid-template-columns: minmax(0, 1fr); }
  .controls { gap: 13px; }
  .card { border-radius: 16px; }
  .preview-stage { min-height: 328px; padding: 24px 12px; }
  .paper-wrap { width: min(82%, 205px); }
}
@media (max-width: 470px) {
  .hero { min-height: 229px; align-items: flex-start; }
  .hero-copy { padding-top: 20px; }
  .hero-description { width: min(48vw, 174px); }
  .hero-visual { inset: auto 2% 2% auto; width: 48%; height: auto; aspect-ratio: 5 / 4; }
  .hero-image { width: 99%; transform: translate(0, 0); }
  .hero-spark-one { left: 0; top: 11%; font-size: 14px; }
  .hero-spark-two { right: 5%; top: 10%; font-size: 13px; }
  .hero-spark-three { right: 2%; bottom: 4%; font-size: 15px; }
}
@media (max-width: 365px) {
  .page, .header-inner { width: calc(100% - 24px); }
  .hero-copy { padding-left: 13px; }
  .preview-footer p { font-size: 10px; }
  .primary { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.custom-panel { gap: 18px; }
.custom-stage { display: grid; gap: 9px; min-width: 0; }
.custom-stage + .custom-stage { border-top: 1px solid var(--line); padding-top: 15px; }
.custom-stage h3 { font-size: 15px; margin: 0 0 3px; }
.custom-stage h3 span { font-size: 12px; color: var(--primary); font-weight: 650; margin-left: 5px; }
.custom-stage input[type=text] { width: 145px; }
.custom-stage input[type=number] { width: 66px; padding: 5px 7px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); }
.custom-note { font-size: 12px; line-height: 1.5; color: var(--muted); }
.avatar-controls { font-size: 13px; color: var(--ink); padding: 9px; border: 1px solid var(--line); border-radius: 9px; }
.avatar-controls summary { cursor: pointer; }
.avatar-controls label { display: grid; grid-template-columns: 32px minmax(0, 1fr) 40px; gap: 8px; align-items: center; margin-top: 8px; }
.avatar-controls input { accent-color: var(--primary); width: 100%; }
.avatar-controls output { text-align: right; color: var(--muted); }
.avatar-controls .help-button { margin-top: 8px; }
.design-editor-actions, .layout-actions, .sheet-tabs, .layout-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.layout-title-row { justify-content: space-between; }
.custom-stage .full-width { margin-top: 3px; }
.saved-styles { display: grid; gap: 6px; }
.saved-style { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 7px; padding: 4px; background: var(--wash); border-radius: 8px; }
.saved-style canvas { width: 42px; height: 42px; }
.saved-style strong { font-size: 12px; }
.saved-style .help-button, .layout-actions .help-button, .sheet-tabs .help-button { padding: 5px 7px; font-size: 11px; }
.sheet-tabs .help-button[aria-pressed=true] { border-color: var(--active-line); background: var(--blush); color: var(--primary); }
.region-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.region-list label { display: grid; gap: 4px; font-size: 11px; color: var(--muted); min-width: 0; }
.region-list select { background: var(--wash); border: 1px solid var(--line); border-radius: 6px; padding: 4px; min-width: 0; color: var(--ink); }
.region-list label.is-targeted { color: var(--primary); }
.sticker-stage { display: grid; place-items: center; gap: 8px; padding: 22px; min-height: 280px; background-color: var(--stage); background-image: radial-gradient(#ddc8b6 1px, transparent 1px); background-size: 14px 14px; border-radius: 13px; }
.sticker-stage canvas { width: min(100%, 250px); height: auto; touch-action: none; cursor: grab; }
.sticker-stage canvas:active { cursor: grabbing; }
.sticker-stage p { color: var(--muted); font-size: 12px; }
.paper-wrap { position: relative; }
#paper-zones { position: absolute; z-index: 1; inset: 0; }
.paper-zone { position: absolute; display: grid; place-items: center; padding: 0; border: 1px dashed #d99884; border-radius: 6px; background: transparent; color: var(--primary); font-weight: 700; font-size: 9px; }
.paper-zone:hover, .paper-zone:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; background: #facebf55; }
.paper-zone.is-empty { background: var(--wash); }
.paper-zone:not(.is-empty) { color: transparent; }
.merchant-pages { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.merchant-pages select { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 5px 7px; color: var(--ink); }
@media (min-width: 681px) {
  .studio.is-custom .preview-card { position: sticky; top: 12px; }
}
@media (max-width: 680px) {
  .studio.is-custom.is-designing .preview-card { grid-row: 1; position: sticky; top: 0; z-index: 3; gap: 6px; padding: 9px 12px; }
  .studio.is-custom.is-designing .sticker-stage { min-height: 112px; padding: 2px; gap: 1px; }
  .studio.is-custom.is-designing .sticker-stage canvas { width: 96px; }
  .studio.is-custom.is-designing .section-heading h2 { font-size: 15px; }
  .studio.is-custom.is-designing .section-heading p { margin-top: 2px; }
  .studio.is-custom:not(.is-designing) .preview-card { grid-row: 1; }
}
.swatch-check { visibility: hidden; font-size: 15px; }
.swatch[aria-pressed=true] .swatch-check { visibility: visible; }
.copies-stepper { display: flex; gap: 4px; align-items: center; }
.copies-stepper .help-button { padding: 5px 7px; }

.arrangement { display: grid; gap: 15px; margin: 24px 0; }
.arrange-heading, .arrange-row, .arrange-checkout { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.arrange-heading h1 { font-size: clamp(24px, 4vw, 33px); }
.arrange-heading p { margin-top: 5px; font-size: 13px; color: var(--muted); }
.arrangement h2 { margin: 0; font-size: 16px; }
.arrangement h2 span { color: var(--primary); font-size: 12px; margin-left: 5px; }
.arrange-assets { padding: 14px 17px; }
.arrange-tiles { display: flex; gap: 8px; overflow: auto; margin-top: 10px; padding-bottom: 3px; }
.arrange-tile { display: grid; grid-template-rows: 52px auto auto; align-content: start; justify-items: center; background: var(--wash); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); min-width: 78px; max-width: 93px; padding: 7px 5px; }
.arrange-tile canvas, .arrange-tile img { width: 52px; height: 52px; object-fit: contain; }
.arrange-tile strong { margin-top: 4px; font-size: 11px; overflow-wrap: anywhere; }
.arrange-tile small { color: var(--muted); font-size: 10px; }
.arrange-tile .text-button { margin: 2px auto 0; padding: 1px; }
.arrange-tabs { flex-wrap: nowrap; overflow-x: auto; padding: 3px; }
.arrange-tabs button { flex: 0 0 auto; }
.arrange-workspace { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(265px, 1fr); gap: 22px; padding: 17px; }
.arrange-preview, .arrange-options { display: grid; align-content: start; gap: 10px; min-width: 0; }
.arrange-paper-stage { min-height: min(520px, 70vh); padding: 17px; }
.arrange-paper-stage .paper-wrap { width: min(88%, 340px); }
.arrange-options select { background: var(--wash); border: 1px solid var(--line); border-radius: 8px; padding: 6px; color: var(--ink); min-width: 0; }
.layout-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.layout-option { display: grid; place-items: center; gap: 4px; padding: 7px 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); min-width: 0; }
.layout-option[aria-pressed=true], .arrange-tile[aria-pressed=true] { background: var(--blush); border-color: var(--active-line); box-shadow: inset 0 0 0 1px #bd654669; }
.layout-option canvas { max-width: 100%; width: 39px; height: auto; box-shadow: 0 1px 4px #7f634961; }
.layout-option strong { font-size: 11px; }
.layout-option small { font-size: 10px; color: var(--muted); }
.arrangement .paper-zone { width: 100%; left: 0; border: 0; border-top: 1px dashed #d99884; border-radius: 0; background: transparent; font-size: 11px; outline-offset: -2px; color: var(--ink); }
.arrangement .paper-zone:hover { background: #f4cbb932; }
.arrangement .paper-zone.is-empty { background: #faebe073; }
.zone-size, .zone-prompt { background: var(--wash); border: 1px solid var(--line); padding: 2px 6px; border-radius: 5px; }
.zone-size { position: absolute; left: 4px; top: 4px; font-weight: 600; font-size: 9px; }
.paper-zone:not(.is-empty) .zone-prompt { opacity: 0; }
.paper-zone:hover .zone-prompt, .paper-zone:focus-visible .zone-prompt { opacity: 1; }
.copies-row { border-top: 1px solid var(--line); padding-top: 11px; font-size: 13px; }
.copies-row input { width: 58px; padding: 5px; border: 1px solid var(--line); border-radius: 7px; text-align: center; }
.arrange-checkout { position: sticky; bottom: 8px; z-index: 2; padding: 12px 16px; }
.arrange-modal { width: min(540px, calc(100% - 26px)); }
.zone-options { grid-template-columns: repeat(auto-fit,minmax(72px,1fr)); margin-top: 10px; }
.zone-options .arrange-tile { max-width: none; }
.modal.is-multi-sheet { width: min(660px, calc(100% - 26px)); }
.review-pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px,1fr)); gap: 8px; max-height: 43vh; overflow: auto; margin-bottom: 10px; }
.review-page { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 6px; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; }
.review-page canvas { width: min(100%, 94px); height: auto; box-shadow: 0 1px 4px #7f634980; }
.review-page strong { font-size: 11px; }
.review-page small { font-size: 10px; color: var(--muted); text-align: center; }
#review-design-total { margin: 0 0 10px; }
@media (max-width: 680px) {
  .arrange-workspace { grid-template-columns: 1fr; gap: 16px; padding: 11px; }
  .arrange-paper-stage { min-height: 0; padding: 13px; }
  .arrange-paper-stage .paper-wrap { width: min(82%, 270px); }
  .arrange-checkout { bottom: 4px; }
  #design-title { scroll-margin-top: 177px; }
}

.background-controls { display: grid; gap: 8px; margin: 3px 0; min-width: 0; }
.background-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.background-heading output { color: var(--muted); font-size: 11px; }
.background-controls .swatches { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.background-controls .swatch { width: 100%; height: 27px; min-width: 0; border-radius: 7px; }
.pattern-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.pattern-choice { display: grid; gap: 4px; justify-items: center; min-width: 0; padding: 4px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 7px; font-size: 10px; }
.pattern-choice canvas { width: 100%; height: 26px; display: block; border-radius: 4px; }
.pattern-choice[aria-pressed=true] { border-color: var(--active-line); color: var(--primary); background: var(--wash); box-shadow: inset 0 0 0 1px #bd654655; }
.swatch:hover, .pattern-choice:hover { outline: 1px solid var(--active-line); outline-offset: 1px; }
.background-upload { padding: 7px; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; background: var(--wash); border: 1px solid var(--line); border-radius: 8px; }
.background-upload .help-button { padding: 6px 8px; font-size: 12px; gap: 5px; }
.background-upload .icon { width: 14px; height: 14px; }
.background-upload small, .background-file-row { color: var(--muted); font-size: 11px; }
.background-file-row { display: flex; align-items: center; gap: 7px; width: 100%; min-width: 0; }
.background-file-row canvas { flex: none; width: 30px; height: 24px; border-radius: 4px; }
.background-file-row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.background-upload .feedback { flex-basis: 100%; margin-top: 0; }

.custom-color-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; font-size: 12px; }
.custom-color-row input[type=color] { width: 38px; height: 27px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); cursor: pointer; }
.custom-color-row .help-button { margin-left: auto; font-size: 11px; padding: 5px 7px; }
#sample-color[aria-pressed=true] { border-color: var(--active-line); color: var(--primary); background: var(--wash); }
.sticker-stage.is-sampling canvas { cursor: crosshair; }
.pattern-choice canvas { width: 100%; height: auto; aspect-ratio: 1.35; background: var(--stage); }

.original-color { justify-self: start; font-size: 12px; padding: 5px 10px; }
.original-color[aria-pressed=true] { background: var(--wash); border-color: var(--active-line); color: var(--primary); }
.pattern-filters { display: grid; grid-template-columns: minmax(88px,.85fr) minmax(110px,1.15fr); gap: 6px; }
.pattern-filters select, .pattern-filters input { width: 100%; min-width: 0; padding: 6px 8px; font-size: 12px; color: var(--ink); border: 1px solid var(--line); background: var(--paper); border-radius: 7px; }
.pattern-pages { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pattern-pages .help-button { font-size: 11px; padding: 4px 8px; }
.pattern-pages button:disabled { opacity: .45; cursor: default; }
.pattern-pages span { font-size: 11px; color: var(--muted); }
#motif-avatar { accent-color: var(--primary); }
.more-colors { font-size: 12px; }
.more-colors summary { cursor: pointer; color: var(--primary); }
.more-colors[open] .swatches { margin-top: 7px; }

@font-face { font-family: "Long Cang"; src: url("/assets/sheets/LongCang-Regular.ttf") format("truetype"); font-display: swap; }
.preset-pages { margin-top: 9px; }
.template-art img { height: 88%; max-width: 92%; width: auto; object-fit: contain; box-shadow: 0 1px 4px #4f322720; }
.template-art { background: var(--stage); }
.template strong { white-space: normal; line-height: 1.4; }
.preset-copy { display: grid; gap: 6px; margin-top: 13px; font-size: 13px; }
.preset-copy textarea { resize: vertical; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.preset-load { display: grid; justify-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
#preset-paper-wrap.landscape { width: min(100%, 420px); aspect-ratio: 210 / 148; }

.preset-instruction { margin: 12px 0 -4px; color: var(--muted); font-size: 12px; }
.template { display: flex; flex-direction: column; padding-bottom: 5px; }
.template-view { display: block; width: 100%; flex: 1; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.template-select { width: 100%; margin-top: 6px; min-height: 30px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--primary); font-size: 12px; }
.template-select[aria-pressed=true] { background: var(--blush); border-color: #d99884; }
.preset-selection { border-top: 1px solid var(--line); padding-top: 11px; margin-top: 12px; font-size: 13px; }
#preset-selected:not(:empty) { margin-top: 8px; }
#preset-selected .help-button[aria-current=true] { color: var(--primary); border-color: #d99884; background: var(--wash); }
#preset-edit { display: grid; gap: 9px; }
#preset-toggle-current { justify-self: start; }
.preset-adjust { display: grid; grid-template-columns: minmax(85px, 30%) 1fr; align-items: center; gap: 10px; }
#preset-detail { width: 100%; max-width: 160px; aspect-ratio: 1; touch-action: none; cursor: grab; border: 1px solid var(--line); border-radius: 10px; }
#preset-detail:active { cursor: grabbing; }
.preset-adjust .avatar-controls { min-width: 0; }
.preset-adjust .custom-note { margin-top: 6px; }
.preset-copy { margin: 0; }
.preset-review { grid-template-columns: repeat(auto-fit, minmax(144px, 1fr)); }
.preset-review .review-page { padding: 10px; gap: 5px; }
.preset-review canvas { width: 100%; height: 90px; object-fit: contain; box-shadow: none; }
.preset-review strong { font-size: 13px; }
.review-copies { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.review-copies input { width: 54px; height: 32px; text-align: center; border-radius: 6px; border: 1px solid var(--line); color: var(--ink); }
.review-edit { background: transparent; border: 0; color: var(--primary); font-size: 12px; padding: 5px 8px; }
@media (max-width: 450px) {
  .preset-review { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preset-adjust { grid-template-columns: minmax(72px, 26%) 1fr; gap: 6px; }
}
.studio-home-link{margin-left:auto;margin-right:8px}
#preset-avatars{margin-top:8px}#avatar-tabs{margin:7px 0}#avatar-tabs button{display:inline-flex;align-items:center;gap:4px}#avatar-tabs img{width:24px;height:24px;object-fit:contain}#avatar-tabs [aria-pressed=true]{background:var(--blush);border-color:var(--active-line)}#order-remark-field{margin-top:10px}#order-remark{font-weight:400}
.group-letter{display:flex;align-items:center;gap:9px;font-size:13px}.group-letter input{width:39px;height:30px;border:1px solid var(--line);border-radius:6px;background:white}

.motif-filters { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; margin:12px 0 8px; }
.motif-filters label { color:var(--muted); font-size:12px; }
.motif-filters select,.motif-search { display:block; width:100%; margin-top:4px; padding:7px 4px; border:1px solid var(--line); border-radius:7px; background:white; color:var(--ink); }
.motif-search { padding-inline:9px; margin-bottom:12px; }
.chosen-motif { color:var(--primary); font-size:13px; margin:10px 0; font-weight:700; }
.mark-editor { margin:12px 0; }
.mark-list,#mark-tools:not([hidden]) { display:flex; align-items:center; flex-wrap:wrap; gap:5px; margin-top:5px; }
.mark-list button[aria-pressed=true] { background:var(--blush); border-color:var(--active-line); }
#mark-tools label { display:flex; gap:5px; align-items:center; font-size:12px; }
#mark-tools input { width:76px; }
