/* Duoyindian materials studio — warm paper, soft light and a little shop-keeping joy. */
:root {
  --orange: #f47c20;
  --orange-deep: #bd4910;
  --orange-button: #c85113;
  --ink: #403128;
  --muted: #78695e;
  --line: #edddcc;
  --paper: #fffdfa;
  --cream: #fff7eb;
  --soft: #fff2e2;
  --radius: 22px;
  --font: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 180px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: #fffcf8;
  color: var(--ink);
  font: 16px/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: wait; opacity: .65; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.35; }
img, canvas { display: block; max-width: 100%; }
svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #9a4a20; outline-offset: 4px; }
button, a { transition: color .2s, background .2s, border-color .2s, box-shadow .2s, transform .2s; }
.wrap { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: white;
}

/* Warm, quiet navigation. */
.material-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid #edddccb8;
  background: #fffaf3ed;
  backdrop-filter: blur(18px);
}
.header-content { height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font-size: 24px; font-weight: 800; letter-spacing: -.8px; }
.brand img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 17px;
  border: 1px solid #e7d4c0;
  border-radius: 999px;
  background: #fffdfa;
  color: #69574a;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}
.back-link span { margin-right: 8px; color: var(--orange-deep); font-size: 17px; }
.back-link:hover { border-color: #dba77e; background: #fff1e1; transform: translateX(-2px); }

/* Warm introduction with everyday merchant scenes. */
.materials-hero { position: relative; overflow: hidden; background: linear-gradient(120deg, #fff9f0 10%, #fff2df 100%); }
.hero-grid { position: relative; display: grid; width: min(1320px, calc(100% - 80px)); grid-template-columns: .78fr 1.22fr; align-items: center; min-height: 610px; gap: 56px; padding-block: 48px 92px; }
.hero-copy { position: relative; z-index: 2; padding-bottom: 4px; animation: copy-in .65s ease-out both; }
.section-label { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 25px; color: #a35d31; font-size: 11px; font-weight: 650; letter-spacing: 1px; }
.small-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px #f47c201c; }
h1 { font-size: clamp(44px, 4.3vw, 58px); font-weight: 800; letter-spacing: -2px; line-height: 1.3; }
h1 span { display: inline-block; color: #c55420; }
.hero-description { max-width: 480px; margin-top: 24px; color: #725f51; font-size: 15px; line-height: 2; }
.primary-button, .secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  gap: 12px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.45;
  white-space: nowrap;
}
.primary-button { background: var(--orange-button); color: white; box-shadow: 0 9px 22px #c8511326, inset 0 1px #ffffff26; }
.primary-button:hover { background: #ad3f0c; box-shadow: 0 12px 28px #b9471733; transform: translateY(-2px); }
.primary-button:active { background: #913309; transform: translateY(0); }
.primary-button svg { width: 19px; height: 19px; transition: transform .2s; }
.primary-button:hover svg { transform: translateX(3px); }
.secondary-button { border-color: #dcbf9f; background: #fffaf3; color: #864116; }
.secondary-button:hover { background: #ffedd8; border-color: #ca8e5d; }
.hero-copy > .primary-button { margin-top: 28px; min-width: 196px; }
.hero-benefits { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 20px; color: #6f5e50; }
.hero-benefits span { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
.hero-benefits svg { width: 15px; height: 15px; padding: 2px; border-radius: 50%; background: #f8dfc4; color: #a74713; stroke-width: 2.4; }
.hero-note { display: flex; align-items: center; gap: 7px; margin-top: 25px; color: #8a7462; font-size: 11px; }
.hero-note > span { color: #dc791f; font-size: 16px; }
/* Large editorial photography, with quiet controls below the image. */
.hero-scenes { min-width: 0; --scene-duration: 3000ms; }
.hero-scene-frame { position: relative; overflow: hidden; border-radius: 26px; background: #ddc9b2; box-shadow: 0 22px 45px -22px #71442450; isolation: isolate; touch-action: pan-y pinch-zoom; }
.hero-scene-track { display: flex; transform: translateX(0); transition: transform 650ms cubic-bezier(.22,.68,.19,1); }
.hero-scene-track.is-resetting { transition: none; }
.hero-scene { position: relative; flex: 0 0 100%; min-width: 0; margin: 0; overflow: hidden; }
.hero-scene::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg, transparent 48%, #261a0e26 66%, #261a0edb 100%); }
.hero-scene > img { width: 100%; height: auto; aspect-ratio: 1.5; object-fit: cover; background: #ddc9b2; }
.hero-scene figcaption { position: absolute; z-index: 2; right: 28px; bottom: 26px; left: 28px; display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; color: #fffdf7; }
.hero-scene figcaption > div { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.hero-scene figcaption strong { align-self: flex-start; font-size: 11px; font-weight: 500; letter-spacing: 3px; color: #ffdfb0; }
.hero-scene figcaption div > span { font-size: 20px; font-weight: 650; line-height: 1.5; letter-spacing: -.4px; text-wrap: balance; }
.hero-scene-navigation { display: flex; align-items: center; gap: 22px; margin-top: 14px; }
.hero-scene-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; flex: 1; min-width: 0; }
.hero-scene-switch button { position: relative; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 12px 0 11px; border: 0; background: transparent; color: #947b67; font-size: 11px; text-align: left; }
.hero-scene-switch button > span { font-size: 9px; opacity: .6; font-variant-numeric: tabular-nums; }
.hero-scene-switch button::before, .hero-scene-switch button::after { content: ""; position: absolute; right: 0; bottom: 0; left: 0; height: 2px; border-radius: 2px; background: #dfcdb9; }
.hero-scene-switch button::after { background: #c75b22; transform: scaleX(0); transform-origin: left; }
.hero-scene-switch button[aria-pressed="true"] { color: #a24314; font-weight: 750; }
.hero-scene-switch button[aria-pressed="true"]::after { animation: scene-progress var(--scene-duration) linear both; }
.hero-scenes.is-paused .hero-scene-switch button::after { animation-play-state: paused; }
.hero-scenes.is-manual .hero-scene-switch button[aria-pressed="true"]::after { animation: none; transform: scaleX(1); }
.hero-scene-toggle { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; color: #936549; background: transparent; border-radius: 50%; }
.hero-scene-toggle:hover { color: #a24314; background: #f1dfcb; }
.hero-scene-toggle svg { width: 17px; height: 17px; stroke-width: 2; }
.hero-scene-note { margin-top: 12px; color: #947d69; font-size: 9px; line-height: 1.8; }
@keyframes scene-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Three simple steps, floating between the hero and catalogue. */
.workflow {
  position: relative;
  z-index: 6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-top: -43px;
  padding: 25px 30px;
  border: 1px solid #ecd9c4;
  border-radius: 22px;
  background: #fffdfa;
  box-shadow: 0 16px 40px #87562612;
}
.workflow > div { display: flex; align-items: center; gap: 14px; }
.workflow > div > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1px solid #f0cfaa;
  border-radius: 14px;
  background: #ffecd5;
  color: #a64310;
  font-size: 14px;
  font-weight: 850;
  box-shadow: inset 0 1px #fff;
}
.workflow strong { display: block; font-size: 13px; }
.workflow small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.workflow > svg { width: 16px; color: #d2b395; }

/* Template collection. */
.template-section { padding-block: 76px 72px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-kicker { margin-bottom: 9px; color: #b4531b; font-size: 11px; font-weight: 750; letter-spacing: 1.6px; }
.section-heading h2 { font-size: 34px; font-weight: 800; letter-spacing: -1.2px; }
.section-heading div > p:last-child { margin-top: 10px; color: var(--muted); font-size: 13px; }
.template-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 4px;
  padding: 8px 13px;
  border: 1px solid #ebd3b9;
  border-radius: 999px;
  background: #fff6e9;
  color: #8b4c25;
  font-size: 11px;
  white-space: nowrap;
}
.template-count > span { color: #dc791f; }
.catalog-toolbar {
  position: sticky;
  top: 78px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 28px;
  padding: 12px;
  border: 1px solid #edddcc;
  border-radius: 18px;
  background: #fffaf3ed;
  backdrop-filter: blur(18px);
  box-shadow: 0 7px 20px #77503209;
}
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #756456;
  font-size: 13px;
  white-space: nowrap;
}
.filters button:hover { background: #fff0df; color: #8f3c11; }
.filters button.active { border-color: #efc69e; background: #ffe5c7; color: #913b0e; font-weight: 750; }
.filters button span { display: grid; place-items: center; min-width: 21px; height: 21px; padding-inline: 4px; border-radius: 7px; background: #f2e7da; color: #7e6653; font-size: 10px; }
.filters button.active span { background: #fffaf3; color: #a54410; }
.template-search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 1 286px;
  min-width: 200px;
  min-height: 46px;
  padding-inline: 14px;
  border: 1px solid #e4d2bf;
  border-radius: 13px;
  background: #fffdfa;
  color: #9b806a;
}
.template-search svg { width: 17px; height: 17px; }
.template-search input { width: 100%; min-width: 0; min-height: 44px; margin: 0; padding: 9px 0; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 12px; }
.template-search input::placeholder { color: #968373; }
.template-search:focus-within { outline: 2px solid #b65a25; outline-offset: 2px; border-color: transparent; }
.template-search input:focus-visible { outline: none; }
.results-summary { margin: 15px 2px 22px; color: #887465; font-size: 11px; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.template-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #ecddce;
  border-radius: 24px;
  background: #fffdfa;
  box-shadow: 0 5px 18px #78513208;
  scroll-margin-top: 190px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.template-card:hover, .template-card:focus-within { border-color: #ddb88f; box-shadow: 0 18px 40px #89552516; transform: translateY(-6px); }
.card-art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
  padding: 50px 30px 28px;
  overflow: hidden;
  background: #fff0dd;
  isolation: isolate;
}
.card-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 42px;
  left: 50%;
  width: 235px;
  height: 235px;
  border-radius: 50%;
  background: #ffffff50;
  transform: translateX(-50%);
}
.card-art::after {
  content: "✦";
  position: absolute;
  right: 23px;
  bottom: 18px;
  color: #b7763d45;
  font-size: 20px;
}
.card-art canvas {
  position: relative;
  z-index: 1;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  border: 3px solid #fffdfa;
  border-radius: 2px;
  box-shadow: 0 13px 25px #69421f25, 0 2px 5px #69421f14;
  transition: transform .3s ease;
}
.template-card:hover .card-art canvas { transform: translateY(-5px) rotate(-.6deg); }
.card-art.poster, .card-art.services { background: #ffead3; }
.card-art.bold { background: #f7e5d8; }
.card-art.campus { background: #fff0cf; }
.card-art.photo { background: #fbe7df; }
.card-art.window { background: #ffebd5; }
.card-art.prices { background: #f4ebdf; }
.card-art.notice { background: #fff0d8; }
.card-art.guide { background: #f3e8dc; }
.card-art.counter { background: #ffedd8; }
.card-art.hours { background: #f8ecdc; }
.card-art.maintenance { background: #f2e8df; }
.card-art.checklist { background: #fff1df; }
.card-art.window canvas, .card-art.notice canvas, .card-art.hours canvas, .card-art.maintenance canvas { width: 100%; height: auto; }
.card-tag, .card-size {
  position: absolute;
  top: 16px;
  z-index: 2;
  padding: 5px 9px;
  border: 1px solid #ffffffa6;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
  backdrop-filter: blur(8px);
}
.card-tag { left: 16px; background: #fffdf5d9; color: #855b3d; }
.card-size { right: 16px; background: #fffdf59c; color: #836d5a; }
.card-info { display: flex; flex: 1; flex-direction: column; padding: 23px 24px 20px; }
.card-info h3 { font-size: 20px; font-weight: 780; letter-spacing: -.45px; }
.card-meta { display: flex; align-items: center; gap: 5px; margin-top: 8px; color: #8a7463; font-size: 11px; }
.card-meta svg { width: 13px; height: 13px; color: #bc6b34; }
.card-description { min-height: 49px; margin: 14px 0 20px; color: #76675b; font-size: 13px; line-height: 1.9; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 15px; border-top: 1px solid #f0e5da; }
.card-bottom > span { color: #8b796a; font-size: 10px; }
.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #efcda9;
  border-radius: 12px;
  background: #fff1df;
  color: #9a3e0e;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}
.card-action svg { width: 16px; height: 16px; transition: transform .2s; }
.card-action:hover { border-color: var(--orange-button); background: var(--orange-button); color: white; }
.card-action:hover svg { transform: translateX(2px); }
.empty-search { padding: 60px 20px; border: 1px dashed #d9b890; border-radius: 24px; background: #fff8ed; text-align: center; }
.empty-search > svg { width: 44px; height: 44px; margin: 0 auto 18px; color: #b98554; }
.empty-search h3 { font-size: 20px; }
.empty-search p { margin: 9px 0 23px; color: var(--muted); font-size: 13px; }

/* A deep cocoa closing note balances the light catalogue. */
.print-tips {
  position: relative;
  overflow: hidden;
  margin-bottom: 58px;
  padding: 36px;
  border: 1px solid #5b4335;
  border-radius: 30px;
  background:
    radial-gradient(circle at 95% 0%, #a557272e, transparent 36%),
    #433127;
  color: #fff9f1;
  box-shadow: 0 18px 45px #4b2f1c16;
}
.print-tips::after { content: "✦"; position: absolute; top: 25px; right: 32px; color: #e99c59; font-size: 29px; opacity: .75; }
.tips-title { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.tips-icon { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #80614d; border-radius: 15px; background: #ffffff09; color: #ffc183; }
.tips-icon svg { width: 25px; height: 25px; }
.tips-title p { margin-bottom: 2px; color: #e8a76f; font-size: 10px; letter-spacing: 1.4px; }
.tips-title h2 { font-size: 23px; letter-spacing: -.5px; }
.tips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.tips-grid > div { padding: 21px; border: 1px solid #ffffff14; border-radius: 17px; background: #ffffff07; }
.tip-number { display: block; margin-bottom: 12px; color: #f3a667; font-size: 11px; font-weight: 800; letter-spacing: 1px; }
.tips-grid h3 { margin-bottom: 8px; color: #fff8ee; font-size: 14px; }
.tips-grid p { color: #dccbbf; font-size: 12px; line-height: 1.9; }
.material-footer { border-top: 1px solid var(--line); background: #fff8ef; padding: 28px 0; }
.material-footer > .wrap { display: flex; align-items: center; gap: 24px; }
.material-footer .brand { font-size: 20px; }
.material-footer .brand img { width: 30px; height: 30px; }
.material-footer p, .material-footer > .wrap > a:last-child { color: var(--muted); font-size: 11px; }
.material-footer > .wrap > a:last-child { margin-left: auto; }
.material-footer > .wrap > a:last-child:hover { color: var(--orange-deep); }

/* Customizer: the same warm paper language, with tools kept quiet and clear. */
body:has(dialog[open]) { overflow: hidden; }
dialog {
  width: min(1240px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #f5e4d2;
  border-radius: 26px;
  background: #fffdfa;
  color: var(--ink);
  box-shadow: 0 30px 100px #321b1366;
}
dialog[open] { display: flex; flex-direction: column; }
dialog::backdrop { background: #2d1c16a8; backdrop-filter: blur(7px); }
.editor-top { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 16px; min-height: 86px; padding: 18px 28px; border-bottom: 1px solid var(--line); background: #fffaf3; }
.editor-label { display: block; margin-bottom: 3px; color: #ad5a29; font-size: 10px; font-weight: 700; letter-spacing: 1px; }
.editor-top h2 { font-size: 23px; font-weight: 780; letter-spacing: -.5px; }
.icon-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; border: 1px solid #e6d3bf; border-radius: 50%; background: #fffdfa; color: #755a46; }
.icon-button:hover { background: #ffead4; border-color: #d9aa7c; transform: rotate(4deg); }
.editor-body { display: grid; grid-template-columns: 405px minmax(0, 1fr); height: min(700px, calc(100dvh - 216px)); min-height: 0; flex: 1 1 auto; }
.editor-form { overflow-y: auto; padding: 25px 28px; border-right: 1px solid var(--line); background: #fffdfa; scrollbar-width: thin; scrollbar-color: #d8bda2 transparent; scroll-padding-block: 20px; }
fieldset { min-width: 0; margin: 0 0 26px; padding: 0 0 22px; border: 0; border-bottom: 1px solid #f0e3d6; }
legend { display: block; width: 100%; margin-bottom: 16px; padding: 0; color: #543c2d; font-size: 14px; font-weight: 800; }
.legend-note { float: right; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
label { display: block; margin-bottom: 7px; color: #6c5140; font-size: 12px; font-weight: 650; }
.required { margin-left: 5px; color: #b54313; font-size: 10px; font-weight: 500; }
input, select { width: 100%; min-height: 44px; margin-bottom: 15px; padding: 10px 12px; border: 1px solid #dfcdba; border-radius: 10px; background: #fffaf4; color: var(--ink); font-size: 13px; transition: border-color .18s, box-shadow .18s, background .18s; }
input::placeholder { color: #948071; }
input:focus, select:focus { outline: 2px solid #d68b5366; outline-offset: 1px; border-color: #b96a34; background: white; }
.field-row, .price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.price-inputs label { font-size: 11px; }
.field-help { margin: -3px 0 13px; color: #806e60; font-size: 10px; line-height: 1.8; }
.upload-box { position: relative; display: flex; align-items: center; gap: 12px; padding: 18px 13px; border: 1px dashed #ce9b6b; border-radius: 13px; background: #fff1df; }
.upload-box > svg { width: 30px; height: 30px; color: #b4662e; }
.upload-box label { margin: 0 0 3px; font-size: 12px; }
.upload-box span { display: block; max-width: 235px; color: #806c5b; font-size: 10px; overflow-wrap: anywhere; }
.upload-box input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.upload-box:focus-within { outline: 3px solid #9a4a20; outline-offset: 3px; }
.qr-options { display: flex; align-items: start; justify-content: space-between; gap: 8px; margin-top: 9px; }
.qr-options small { color: var(--muted); font-size: 10px; }
.qr-options button { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--orange-deep); font-size: 11px; white-space: nowrap; }
.field-error { margin-top: 6px; color: #a52719; font-size: 12px; }
.field-error:empty { display: none; }
.theme-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.theme-options button { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 12px; border: 1px solid #e2d1bf; border-radius: 11px; background: #fffdfa; color: #6f5948; font-size: 12px; }
.theme-options button.selected { border-color: #b96c36; box-shadow: inset 0 0 0 1px #b96c36; background: #ffedda; color: #84370f; }
.swatch { width: 14px; height: 14px; flex-shrink: 0; border-radius: 5px; box-shadow: inset 0 0 0 1px #0000000a; }
.swatch.orange { background: #ff801d; }
.swatch.green { background: #287958; }
.swatch.blue { background: #3468a0; }
.swatch.mono { background: #222b24; }
.local-note { color: #806e60; font-size: 10px; }
.preview-panel { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding: 20px 26px 17px; background: #f4e8da; }
.preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.preview-heading strong { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.preview-heading strong::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d2712d; box-shadow: 0 0 0 3px #d2712d1c; }
.preview-heading > span { padding: 5px 10px; border: 1px solid #dec8b2; border-radius: 999px; background: #fff9f0; color: #765d49; font-size: 10px; text-align: right; }
.layout-control { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.layout-control label { margin: 0; color: #75604f; font-size: 10px; white-space: nowrap; }
.layout-control select { min-height: 38px; margin: 0; padding-block: 7px; background: #fffaf3; font-size: 11px; }
.preview-stage { display: flex; flex: 1 1 auto; align-items: center; justify-content: center; min-height: 0; padding: 20px 22px; border: 1px solid #dfc8b0; border-radius: 16px; background-color: #edddcc; background-image: radial-gradient(#c8aa8e .7px, transparent .7px); background-size: 16px 16px; box-shadow: inset 0 1px 5px #7951330a; }
.preview-stage canvas { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border: 3px solid #fffdfa; box-shadow: 0 14px 32px #5f3c2530, 0 2px 5px #5f3c251a; }
.preview-caption { margin-top: 11px; color: #756252; font-size: 10px; line-height: 1.7; text-align: center; }
.preview-caption + .preview-caption { margin-top: 2px; }
.editor-bottom { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; gap: 24px; min-height: 94px; padding: 18px 28px; border-top: 1px solid var(--line); background: #fffaf3; }
.export-summary { min-width: 0; max-width: 770px; }
#editor-status { color: #654c3b; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.download-help { margin-top: 4px; color: #806e60; font-size: 10px; line-height: 1.65; }
.export-actions { display: flex; flex-shrink: 0; }
.export-actions button { min-width: 190px; }

@keyframes copy-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .wrap { width: calc(100% - 56px); }
  .hero-grid { gap: 30px; min-height: 530px; }
  h1 { font-size: 48px; }
  .workflow { padding-inline: 22px; gap: 14px; }
  .workflow > div { gap: 10px; }
  .workflow small { font-size: 10px; }
  .catalog-toolbar { gap: 10px; }
  .filters { gap: 3px; }
  .filters button { padding-inline: 10px; font-size: 12px; }
  .template-search { flex-basis: 238px; }
  .template-grid { gap: 20px; }
  .card-art { height: 282px; padding-inline: 22px; }
  .card-info { padding: 20px; }
  .card-info h3 { font-size: 18px; }
  .card-description { min-height: 70px; }
  .card-action { gap: 5px; padding-inline: 10px; font-size: 11px; }
  .card-bottom > span { font-size: 9px; }
  .print-tips { padding: 30px; }
  .tips-grid > div { padding: 18px; }
  .editor-body { grid-template-columns: 360px minmax(0, 1fr); }
  .editor-form { padding: 24px; }
  .preview-panel { padding: 18px; }
  .preview-stage { padding: 15px; }
  .editor-bottom { padding-inline: 24px; }
}

@media (max-width: 850px) and (min-width: 761px) {
  .hero-grid { grid-template-columns: .9fr 1.1fr; gap: 20px; }
  h1 { font-size: 40px; letter-spacing: -1.8px; }
  .hero-description { font-size: 13px; }
  .hero-note { align-items: flex-start; }
  .workflow { padding: 20px 16px; }
  .workflow small { display: none; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-description { min-height: 48px; }
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .template-search { flex-basis: auto; }
  .tips-grid { gap: 10px; }
  .tips-grid > div { padding: 15px; }
}

@media (max-width: 760px) {
  html { scroll-padding-top: 225px; }
  .wrap { width: calc(100% - 36px); }
  .header-content { height: 66px; gap: 15px; }
  .brand { font-size: 21px; }
  .brand img { width: 33px; height: 33px; }
  .back-link { min-height: 42px; padding-inline: 13px; font-size: 12px; }
  .hero-grid { grid-template-columns: 1fr; gap: 34px; min-height: 0; padding-block: 38px 84px; }
  .section-label { margin-bottom: 17px; font-size: 11px; }
  h1 { font-size: 43px; letter-spacing: -1.8px; }
  .hero-description { margin-top: 21px; font-size: 14px; }
  .hero-copy > .primary-button { margin-top: 24px; }
  .hero-benefits { gap: 15px; margin-top: 18px; }
  .hero-note { margin-top: 21px; }
  .workflow { align-items: flex-start; gap: 8px; margin-top: -40px; padding: 20px 12px; border-radius: 18px; }
  .workflow > div { display: block; flex: 1; text-align: center; }
  .workflow > div > span { width: 34px; height: 34px; margin: 0 auto 9px; border-radius: 11px; font-size: 12px; }
  .workflow strong { font-size: 11px; }
  .workflow small { display: none; }
  .workflow > svg { width: 12px; margin-top: 10px; }
  .template-section { padding-block: 54px 44px; }
  .section-heading { align-items: flex-start; gap: 12px; }
  .section-kicker { font-size: 10px; }
  .section-heading h2 { font-size: 27px; }
  .section-heading div > p:last-child { margin-top: 9px; font-size: 12px; }
  .template-count { display: none; }
  .catalog-toolbar { top: 66px; align-items: stretch; flex-direction: column-reverse; gap: 9px; margin-top: 23px; padding: 10px; border-radius: 16px; }
  .template-search { flex-basis: auto; min-width: 0; }
  .template-search input { font-size: 16px; }
  .filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .filters button { gap: 4px; min-width: 0; padding: 8px 3px; font-size: 11px; }
  .filters button span { min-width: 17px; height: 18px; padding-inline: 2px; font-size: 9px; }
  .results-summary { margin: 13px 2px 17px; font-size: 10px; }
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
  .template-card { border-radius: 18px; scroll-margin-top: 230px; }
  .card-art { height: 235px; padding: 44px 18px 22px; }
  .card-tag, .card-size { top: 11px; padding: 3px 6px; font-size: 9px; }
  .card-tag { left: 10px; }
  .card-size { right: 10px; }
  .card-info { padding: 17px; }
  .card-info h3 { font-size: 17px; }
  .card-meta { font-size: 10px; }
  .card-description { min-height: 66px; margin: 11px 0 15px; font-size: 11px; }
  .card-bottom { flex-wrap: wrap; gap: 6px; }
  .card-action { flex: 1; min-height: 44px; font-size: 11px; }
  .print-tips { margin-bottom: 32px; padding: 25px; border-radius: 24px; }
  .tips-title { align-items: flex-start; margin-bottom: 22px; }
  .tips-title h2 { font-size: 20px; }
  .tips-grid { grid-template-columns: 1fr; gap: 12px; }
  .tips-grid > div { padding: 19px; }
  .material-footer > .wrap { flex-wrap: wrap; gap: 12px; }
  .material-footer p { display: none; }
  .material-footer > .wrap > a:last-child { font-size: 10px; }
  dialog { width: 100%; max-height: 100dvh; height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .editor-top { min-height: 77px; padding: 13px 18px; }
  .editor-top h2 { font-size: 20px; }
  .editor-body { display: flex; flex-direction: column; height: auto; overflow-y: auto; flex: 1 1 auto; }
  .editor-form { order: 2; overflow: visible; flex-shrink: 0; padding: 23px 18px; border-right: 0; }
  .editor-form input, .editor-form select { font-size: 16px; }
  .preview-panel { flex-shrink: 0; height: 440px; padding: 17px 18px; overflow: visible; }
  .preview-stage { padding: 16px; }
  .layout-control select { font-size: 12px; }
  .theme-options button { font-size: 13px; }
  .editor-bottom { flex-direction: column; align-items: stretch; min-height: 132px; gap: 9px; padding: 11px 18px max(12px, env(safe-area-inset-bottom)); }
  #editor-status { font-size: 11px; }
  .download-help { font-size: 9px; }
  .export-actions { width: 100%; }
  .export-actions button { width: 100%; min-width: 0; min-height: 47px; font-size: 13px; }
}

@media (max-width: 480px) {
  .desktop-break { display: none; }
  h1 { font-size: 40px; }
  .template-grid { grid-template-columns: 1fr; gap: 20px; }
  .card-art { height: 310px; padding: 48px 34px 26px; }
  .card-info { padding: 22px; }
  .card-info h3 { font-size: 20px; }
  .card-meta { font-size: 12px; }
  .card-description { min-height: 0; margin: 12px 0 18px; font-size: 13px; }
  .card-tag, .card-size { top: 14px; padding: 4px 8px; font-size: 10px; }
  .card-tag { left: 14px; }
  .card-size { right: 14px; }
  .card-bottom > span { font-size: 11px; }
  .card-action { flex: 0 0 auto; padding-inline: 14px; font-size: 13px; }
  .print-tips { padding: 22px; }
  .tips-icon { width: 43px; height: 43px; }
  .tips-title h2 { font-size: 18px; }
}

@media (max-width: 360px) {
  .filters button span { display: none; }
  .hero-benefits { gap: 10px; }
  h1 { font-size: 35px; }
  .hero-note { font-size: 10px; }
}

/* Keep the main photograph spacious on narrow screens. */
@media (max-width: 1100px) {
  .hero-scene figcaption { right: 22px; bottom: 22px; left: 22px; align-items: flex-start; flex-direction: column; gap: 12px; }
  .hero-scene figcaption div > span { font-size: 19px; }
}
@media (max-width: 760px) {
  .hero-scenes { width: 100%; max-width: 580px; margin-inline: auto; }
  .hero-scene-frame { border-radius: 20px; }
  .hero-scene > img { aspect-ratio: 1.32; }
  .hero-scene figcaption { right: 19px; bottom: 19px; left: 19px; gap: 10px; }
  .hero-scene figcaption > div { gap: 6px; }
  .hero-scene figcaption strong { font-size: 10px; }
  .hero-scene figcaption div > span { font-size: 17px; }
  .hero-scene-navigation { gap: 15px; margin-top: 9px; }
  .hero-scene-switch { gap: 13px; }
  .hero-scene-switch button { min-height: 44px; font-size: 10px; }
  .hero-scene-note { margin-top: 9px; font-size: 8px; }
}

.price-device { margin: 14px 0; padding: 15px; border: 1px solid #e2c7ab; border-radius: 14px; background: #fffcf7; }
.price-device-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.editor-form .device-selection { display: flex; align-items: center; gap: 8px; margin: 0; min-height: 44px; }
.editor-form .device-selection input { width: 20px; height: 20px; margin: 0; accent-color: #b84513; }
.remove-price-device { min-width: 44px; min-height: 44px; border: 0; background: transparent; color: #9c4019; cursor: pointer; }
.price-device input:disabled { opacity: .5; }
#add-price-device { width: 100%; min-height: 44px; }
.price-pagination { display: flex; align-items: center; justify-content: center; gap: 16px; flex-shrink: 0; margin-top: 10px; font-size: 13px; }
.price-pagination[hidden], #download-current-page[hidden] { display: none; }
.price-pagination button { min-width: 66px; min-height: 44px; border: 1px solid #d6b89b; border-radius: 10px; background: #fffaf2; color: #633d27; cursor: pointer; }
.price-pagination button:disabled { opacity: .45; cursor: default; }
.price-device input:focus-visible, .price-pagination button:focus-visible, .remove-price-device:focus-visible { outline: 3px solid #b84513; outline-offset: 2px; }
@media (max-width: 760px) {
  .preview-panel:has(.price-pagination:not([hidden])) { height: 500px; }
  .export-actions:has(#download-current-page:not([hidden])) { display: flex; gap: 8px; }
  .export-actions:has(#download-current-page:not([hidden])) button { flex: 1; }
  .price-device { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
