:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --paper-deep: #eee8db;
  --cream: #fffcf6;
  --ink: #2e4037;
  --forest: #345b4e;
  --sage: #778f7a;
  --moss: #dbe2d2;
  --rose: #cb8e7b;
  --clay: #aa6a55;
  --line: #dfded2;
  --muted: #7a8378;
  --heading: "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --body: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); line-height: 1.55; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, canvas:focus-visible { outline: 3px solid #c58d6c; outline-offset: 3px; }
a { color: inherit; }
.grain { position: fixed; inset: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.87' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.15'/%3E%3C/svg%3E"); opacity: .13; pointer-events: none; z-index: 20; }
.site-header { height: 78px; border-bottom: 1px solid var(--line); background: rgba(246,243,235,.92); }
.header-inner { max-width: 1250px; padding: 0 30px; margin: auto; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; text-decoration: none; gap: 11px; white-space: nowrap; }
.brand-symbol { width: 39px; height: 39px; }
.brand-name { font: 600 25px/1.1 var(--heading); letter-spacing: -.06em; }
.brand-name i { font: italic 23px Georgia, serif; letter-spacing: -.035em; margin-left: 1px; }
.main-nav { display: flex; align-items: center; gap: 35px; }
.nav-link { border: 0; background: transparent; font-size: 13px; color: var(--muted); padding: 26px 0; position: relative; white-space: nowrap; }
.nav-link.active, .nav-link:hover { color: var(--ink); }
.nav-link.active::after { content: ""; position: absolute; width: 20px; height: 2px; background: var(--clay); bottom: 17px; left: calc(50% - 10px); }
.nav-count { color: var(--clay); font-size: 10px; margin-left: 3px; }
.hero { max-width: 1250px; padding: 48px 30px 45px; margin: auto; display: grid; grid-template-columns: 1.03fr .97fr; align-items: center; min-height: 345px; gap: 60px; }
.eyebrow, .step-kicker { text-transform: uppercase; font: 600 10px/1.3 Georgia, var(--body); letter-spacing: .2em; color: var(--clay); }
.eyebrow { display: flex; align-items: center; gap: 12px; }
.eyebrow .small-star { font-size: 16px; line-height: .75; }
.line-decoration { width: 35px; border-top: 1px solid #c9b9a3; }
.hero h1 { font-family: var(--heading); font-weight: 500; letter-spacing: -.055em; font-size: clamp(39px, 4.1vw, 57px); line-height: 1.35; margin: 26px 0 15px; }
.hero h1 em { font-style: normal; color: var(--forest); }
.hero-copy p { color: #6e7c73; max-width: 440px; font-size: 14px; line-height: 2; margin: 0; }
.hero-link { display: inline-flex; margin-top: 26px; text-decoration: none; font-size: 13px; color: var(--forest); font-weight: 700; border-bottom: 1px solid var(--forest); gap: 26px; padding-bottom: 6px; }
.hero-link:hover { gap: 35px; }
.hero-scene { min-height: 295px; position: relative; isolation: isolate; background: #e8e7d9; overflow: hidden; border-radius: 160px 160px 8px 8px; border: 1px solid #dddecf; }
.hero-scene::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 64% 3%,rgba(255,255,255,.83),transparent 55%), repeating-linear-gradient(110deg, transparent 0 8px, rgba(99,119,94,.035) 8px 9px); }
.hero-scene-caption { position: absolute; top: 21px; left: 30px; font: 10px Georgia,serif; color: #738473; letter-spacing: .17em; z-index: 4; }
.hero-halo { width: 300px; height: 300px; border-radius: 50%; border: 1px solid #d5c5ab; position: absolute; right: 20px; top: 27px; opacity: .65; }
.hero-cloth { position: absolute; width: 245px; height: 205px; top: 70px; right: 135px; transform: rotate(-16deg); box-shadow: 13px 20px 25px rgba(63,78,62,.14); }
.hero-cloth-back { right: 101px; top: 55px; transform: rotate(10deg); background: repeating-linear-gradient(0deg,#bdc6a7 0 3px,#b6c1a1 3px 5px); border: 7px solid #d3d6c3; }
.hero-cloth-front { background: #e7c6aa; border: 8px solid #ecd8c2; overflow: hidden; background-image: radial-gradient(circle at 20% 15%, #d2b08f 1px,transparent 2px), repeating-linear-gradient(90deg, transparent 0 5px, rgba(255,255,255,.09) 5px 6px); background-size: 15px 15px, auto; }
.hero-flower { position: absolute; color: #9f6857; font-size: 55px; text-shadow: 2px 1px #f3ded0; }
.flower-a { top: 6px; left: 16px; }.flower-b { top: 98px; left: 112px; color: #8e9d79; }.flower-c { top: 105px; left: 8px; font-size: 30px; }.flower-d { top: 8px; right: 15px; font-size: 32px; color: #a7a16c; }
.hero-stitch { position: absolute; right: 85px; bottom: 35px; width: 130px; border-bottom: 2px dashed #cbab95; transform: rotate(-20deg); }
.hero-handnote { position: absolute; color: #907b65; font: italic 18px/1.6 var(--heading); left: 50px; bottom: 38px; transform: rotate(-7deg); }
.workspace { max-width: 1250px; margin: 0 auto 90px; padding: 0 30px; }
.workspace-heading { display: flex; justify-content: space-between; gap: 15px; align-items: end; padding: 0 0 21px; }
.eyebrow.subdued { color: #9b9786; }
.workspace-heading h2 { font: 500 28px/1.3 var(--heading); margin: 11px 0 0; letter-spacing: -.05em; }
.workspace-aside { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.journey { display: flex; align-items: center; margin: 0 0 12px; border-top: 1px solid #d7d9cb; border-bottom: 1px solid #d7d9cb; min-height: 69px; }
.journey-step { background: transparent; border: 0; color: #889086; display: flex; align-items: center; gap: 12px; padding: 19px 8px; min-width: 0; white-space: nowrap; }
.journey-step span { font: italic 17px Georgia,serif; color: #b3b7ac; }
.journey-step b { font-weight: 500; font-size: 13px; }
.journey-step.current, .journey-step.done { color: var(--forest); }
.journey-step.current b { font-weight: 700; }
.journey-step.current span { color: var(--clay); }
.journey-step.done span { color: var(--sage); }
.journey-connector { height: 1px; flex: 1; background: #d8dacb; min-width: 12px; margin: 0 9px; }
.step-panel { background: var(--cream); border: 1px solid #e6e3d9; min-height: 480px; padding: 39px 45px 42px; box-shadow: 0 9px 40px rgba(80,76,65,.035); }
.step-heading { display: flex; justify-content: space-between; gap: 30px; margin-bottom: 30px; align-items: center; }
.step-heading h3 { font: 500 31px/1.4 var(--heading); letter-spacing: -.05em; margin: 7px 0; }
.step-heading p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.8; }
.handwritten-note { color: #af9780; font: italic 18px/1.6 var(--heading); text-align: center; transform: rotate(6deg); white-space: nowrap; }
.fabric-editor-grid { display: grid; grid-template-columns: minmax(0,1.06fr) minmax(310px,.94fr); gap: 40px; }
.photo-column { min-width: 0; }
.photo-stage { height: 340px; position: relative; background: #e8e4d9; border: 1px solid #dcd7cb; display: grid; place-items: center; overflow: hidden; }
#crop-canvas { display: block; max-width: 100%; max-height: 340px; height: auto; width: auto; cursor: default; touch-action: none; }
.photo-stage.cropping { outline: 2px solid var(--sage); outline-offset: -2px; }
.photo-stage.cropping #crop-canvas { cursor: crosshair; }
.photo-stage-label { position: absolute; left: 11px; bottom: 11px; padding: 5px 11px; background: rgba(255,252,246,.93); color: var(--forest); font-size: 10px; display: flex; align-items: center; gap: 7px; pointer-events: none; }
.status-dot { display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--sage); }
.photo-actions { display: flex; flex-wrap: wrap; gap: 9px; padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.action-chip { border: 1px solid #dedfd4; background: #f9f8f2; color: var(--forest); font-size: 11px; padding: 9px 12px; border-radius: 2px; }
.action-chip:hover { border-color: var(--sage); background: #eef0e7; }
.action-chip.primary-chip { background: var(--moss); border-color: #cfdac8; }
.crop-help { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding-top: 16px; }
.crop-help strong { display: block; font-size: 12px; font-weight: 600; }
.crop-help p, .measure-tip { font-size: 11px; line-height: 1.85; color: var(--muted); margin: 5px 0 0; }
.crop-buttons { display: flex; flex-direction: column; flex-shrink: 0; align-items: end; gap: 3px; }
.text-button { color: var(--forest); background: transparent; border: 0; padding: 6px 0; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.text-button.quieter { color: #8b9285; }
.fabric-form { border: 1px solid var(--line); background: #fcfaf4; padding: 27px; position: relative; }
.form-topline { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--forest); font-weight: 600; margin-bottom: 25px; }
.round-number { display: inline-grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #e3e9dd; font: italic 13px Georgia,serif; }
.fabric-form label:not(.confirm-check), .save-form label { display: block; color: #52665a; font-size: 12px; font-weight: 600; margin-bottom: 10px; }
.fabric-form label small { color: #9da498; font-size: 10px; font-weight: 400; margin-left: 6px; }
.fabric-form input[type="text"], .save-form input { width: 100%; height: 43px; border: 1px solid #dddcd0; background: #fffdf8; border-radius: 2px; padding: 0 12px; color: var(--ink); font-size: 13px; }
.fabric-form input::placeholder, .save-form input::placeholder { color: #a9afa5; }
.measure-head { display: flex; align-items: center; justify-content: space-between; margin: 28px 0 9px; font-size: 12px; font-weight: 600; }
.measure-head small { color: #929b8f; font-size: 10px; font-weight: 400; }
.measure-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.unit-input { position: relative; }
.unit-input input { height: 54px; width: 100%; border: 1px solid #dddcd0; background: #fffdf8; color: var(--forest); padding: 0 34px 0 13px; font: 24px Georgia,serif; min-width: 0; }
.unit-input span { position: absolute; top: 19px; right: 11px; color: #a0a79c; font: 12px Georgia,serif; pointer-events: none; }
.measure-grid label { margin-bottom: 6px !important; font-size: 11px !important; }
.confirm-check { display: flex; align-items: start; gap: 9px; margin-top: 22px; color: #657566; font-size: 11px; cursor: pointer; line-height: 1.65; }
.confirm-check input { accent-color: var(--forest); margin: 3px 0; }
.fabric-form-bottom { display: flex; justify-content: space-between; align-items: end; gap: 11px; padding-top: 26px; }
.nature-mark { font-size: 25px; line-height: 1; display: flex; gap: 9px; align-items: center; color: var(--rose); }
.nature-mark span { font: 12px/1.5 var(--heading); color: #a5a08b; }
.solid-button, .ghost-button, .outline-button { display: inline-flex; align-items: center; justify-content: center; gap: 26px; border-radius: 2px; font-size: 12px; min-height: 45px; padding: 10px 19px; white-space: nowrap; transition: background-color .15s ease, transform .15s ease; }
.solid-button { background: var(--forest); color: #f9f6ed; border: 1px solid var(--forest); font-weight: 600; }
.solid-button:not(:disabled):hover { background: #27463b; transform: translateY(-1px); }
.ghost-button { border: 0; background: transparent; color: #7a8b7a; padding-left: 0; }
.ghost-button:hover { color: var(--ink); }
.outline-button { border: 1px solid #c9d0c0; background: #fcfaf4; color: var(--forest); }
.outline-button:not(:disabled):hover { background: var(--moss); }
.step-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 33px; border-top: 1px solid var(--line); padding-top: 22px; }
.pattern-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.pattern-card { border: 1px solid #dfe0d4; background: #f9f8f1; text-align: left; padding: 0; display: block; color: inherit; min-width: 0; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.pattern-card:hover { border-color: #899d87; }
.pattern-card.selected { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.pattern-card.unfit { opacity: .64; }
.pattern-art { height: 200px; display: grid; place-items: center; position: relative; overflow: hidden; background: #e9e2d6; }
.pattern-art.coaster { background: #e8e8d8; }.pattern-art.pouch { background: #eae1d5; }.pattern-art.placemat { background: #e5e8de; }
.pattern-art::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.5); left: 50%; top: 45%; transform: translate(-50%,-50%); }
.pattern-shape { background-color: #cabbae; background-position: center; background-size: cover; position: relative; z-index: 1; box-shadow: 8px 12px 19px rgba(69,75,61,.16); }
.pattern-shape::before { content: ""; position: absolute; inset: 9px; border: 2px dashed rgba(255,249,232,.88); }
.coaster .pattern-shape { width: 134px; height: 134px; border-radius: 16px; transform: rotate(-11deg); }
.pouch .pattern-shape { width: 112px; height: 145px; border-radius: 5px 5px 16px 16px; transform: rotate(9deg); }
.pouch .pattern-shape::after { content: ""; position: absolute; top: 21px; left: 0; right: 0; height: 2px; border-top: 3px solid rgba(255,255,255,.8); }
.placemat .pattern-shape { width: 171px; height: 119px; border-radius: 11px; transform: rotate(-6deg); }
.art-watermark { position: absolute; left: 15px; bottom: 12px; font: italic 12px Georgia,serif; letter-spacing: .08em; color: #7c8a76; z-index: 2; }
.pattern-card-body { padding: 20px 19px 22px; }
.card-meta { display: flex; justify-content: space-between; gap: 5px; align-items: center; font: 11px Georgia,serif; letter-spacing: .07em; color: #899889; }
.card-meta .fit-tag { font: 11px var(--body); color: var(--forest); background: #e3e9db; padding: 3px 7px; letter-spacing: 0; }
.unfit .fit-tag { background: #ede1d9; color: #a77a69; }
.pattern-card h4 { font: 500 22px var(--heading); letter-spacing: -.04em; margin: 12px 0 4px; }
.pattern-card p { font-size: 12px; color: #7e8b7c; min-height: 42px; margin: 0 0 11px; line-height: 1.7; }
.card-specs { padding-top: 13px; border-top: 1px solid var(--line); color: #6d7b70; font-size: 11px; line-height: 1.8; }
.card-bottom { margin-top: 12px; font-weight: 700; color: var(--forest); font-size: 11px; }
.step-note { margin-top: 19px; background: #f0f1e9; color: #7e887a; font-size: 11px; padding: 12px 16px; line-height: 1.8; }
.layout-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 30px; }
.layout-display { min-width: 0; }
.layout-canvas-wrap { height: 465px; background: #ece8da; border: 1px solid #dcdccf; display: flex; align-items: center; justify-content: center; padding: 14px; }
#layout-canvas { display: block; max-width: 100%; max-height: 436px; width: auto; height: auto; cursor: grab; touch-action: none; box-shadow: 0 7px 22px rgba(39,56,42,.16); }
#layout-canvas.dragging { cursor: grabbing; }
.layout-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-size: 10px; color: #909b90; }
.layout-legend span { display: flex; align-items: center; gap: 6px; }
.layout-legend i { display: block; width: 12px; height: 12px; border: 2px solid var(--forest); }
.layout-legend .legend-invalid { border-color: #b65349; }
.layout-controls { background: #f8f7f0; border: 1px solid var(--line); padding: 23px; }
.layout-controls .form-topline { margin-bottom: 14px; }
.layout-controls h4 { font: 500 24px var(--heading); margin: 0 0 8px; }
.quiet-copy { color: #849185; font-size: 11px; line-height: 1.85; }
.field-caption { margin-top: 25px; color: #657567; font-size: 12px; font-weight: 700; }
.piece-tabs { display: flex; gap: 7px; margin-top: 9px; }
.piece-tab { flex: 1; border: 1px solid #d9ded2; background: #fcfaf4; padding: 10px 7px; font-size: 11px; color: #6e7f72; }
.piece-tab.current { border-color: var(--forest); background: #dfe7da; color: var(--forest); font-weight: 700; }
.move-tools { margin-top: 23px; border-top: 1px solid var(--line); padding-top: 17px; }
.move-tools > span { font-size: 11px; font-weight: 600; }.move-tools > span small { color: #a2a99f; font-size: 10px; font-weight: 400; margin-left: 4px; }
.arrow-pad { display: grid; grid-template-columns: repeat(3,42px); grid-template-rows: repeat(2,36px); gap: 3px; width: 132px; margin: 12px auto 13px; justify-content: center; }
.arrow-pad button { color: var(--forest); border: 1px solid #d7ddcf; background: #fdfcf5; font-size: 17px; }
.arrow-pad button:hover { background: #e8eddf; }
.arrow-pad [data-nudge=up] { grid-column: 2; grid-row: 1; }
.arrow-pad [data-nudge=left] { grid-column: 1; grid-row: 2; }
.arrow-pad [data-nudge=down] { grid-column: 2; grid-row: 2; }
.arrow-pad [data-nudge=right] { grid-column: 3; grid-row: 2; }
.move-tools .outline-button { width: 100%; min-height: 38px; font-size: 11px; margin-top: 3px; }
.move-tools .text-button { display: block; margin: 7px auto 0; }
.layout-status { padding: 10px 12px; margin-top: 14px; min-height: 40px; background: #e6eddd; color: #4f6a54; font-size: 11px; line-height: 1.6; }
.layout-status.invalid { background: #f5e7df; color: #a75141; }
.precision-note { font-size: 10px; line-height: 1.8; color: #98a094; padding-top: 5px; margin-bottom: 0; }
.preview-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.finished-piece { margin: 0; background: #f0eee5; border: 1px solid #e0dfd2; padding: 22px 22px 14px; }
.finished-canvas-wrap { min-height: 255px; height: 310px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at center,#f9f6ec,#e9e6db); }
.finished-canvas-wrap canvas { display: block; max-width: 83%; max-height: 245px; height: auto; width: auto; filter: drop-shadow(8px 15px 12px rgba(54,63,53,.17)); }
.finished-piece figcaption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; color: var(--forest); font: 13px Georgia,var(--body); margin-top: 15px; }
.finished-piece figcaption small { color: #929b8c; font: 10px var(--body); }
.preview-footer-note { margin-top: 18px; font-size: 11px; background: #f1f2e9; color: #758373; padding: 13px 16px; line-height: 1.8; }
.save-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 35px; align-items: start; }
.saved-postcard { min-height: 375px; background: #ecece0; position: relative; border: 1px solid #d9dfd0; padding: 20px; text-align: center; }
.postcard-title { font: italic 15px Georgia,serif; color: #9ca69c; }
.postcard-preview { display: flex; align-items: center; justify-content: center; margin: 14px auto; min-height: 220px; max-width: 290px; }
.postcard-preview canvas { display: block; max-width: 100%; max-height: 220px; filter: drop-shadow(7px 13px 10px rgba(70,77,65,.15)); }
.postcard-caption { font-size: 12px; color: var(--forest); padding-bottom: 22px; }
.postcard-seal { position: absolute; right: 23px; bottom: 20px; font: italic 10px Georgia,serif; color: #a4ad9f; transform: rotate(-9deg); }
.save-form { border: 1px solid var(--line); background: #fbfaf4; padding: 29px; }
.save-form .quiet-copy { margin: 18px 0 26px; }
.full { width: 100%; }.save-form .outline-button { margin-top: 13px; }
.save-form .text-button { display: block; margin: 16px auto 0; }
.save-status { color: var(--forest); font-size: 11px; line-height: 1.7; margin-top: 12px; }
.site-footer { border-top: 1px solid #d8d9ca; padding: 36px 25px 43px; text-align: center; background: #edece2; }
.footer-brand { font: 500 21px var(--heading); }.footer-brand em { font: italic 20px Georgia,serif; }.footer-brand span { color: var(--clay); padding-left: 10px; }
.site-footer p { color: #788579; font-size: 12px; }.site-footer small { color: #a4aa9e; font: 10px Georgia,var(--body); letter-spacing: .06em; }
.library-dialog { border: 1px solid #d4dbce; background: #fcfaf4; color: var(--ink); width: min(580px,calc(100vw - 30px)); max-height: min(740px,85vh); padding: 0; box-shadow: 0 16px 70px #333d3255; }
.library-dialog::backdrop { background: rgba(35,54,44,.42); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 28px 30px 14px; }
.dialog-header h2 { font: 500 29px var(--heading); margin: 9px 0 0; }
.dialog-close { background: transparent; border: 0; color: var(--forest); font-size: 28px; padding: 0 5px; }
.library-tabs { display: flex; margin: 0 30px; border-bottom: 1px solid #d8ded4; }
.library-tabs button { flex: 1; border: 0; background: transparent; padding: 15px; font-size: 12px; color: #8e9a8d; }
.library-tabs button.on { border-bottom: 2px solid var(--forest); color: var(--forest); font-weight: 700; }
.library-content { padding: 24px 30px; overflow-y: auto; max-height: 430px; }
.collection-item { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 15px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.collection-item img { width: 88px; height: 83px; object-fit: cover; background: #e6e3d7; }
.collection-item h4 { margin: 0 0 4px; font: 500 16px var(--heading); }
.collection-item p { margin: 0 0 10px; font-size: 11px; color: #8d988b; }
.collection-actions { display: flex; gap: 18px; align-items: center; }
.collection-actions button { border: 0; background: transparent; color: var(--forest); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.collection-actions .delete-link { color: #ae8272; }
.empty-collection { padding: 45px 10px; text-align: center; color: #94a092; font: 14px/1.9 var(--heading); }
.library-footnote { border-top: 1px solid var(--line); margin: 0; padding: 17px 30px 22px; color: #a0a99e; font-size: 10px; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%,20px); opacity: 0; pointer-events: none; background: #39584b; color: #fcfaf4; padding: 11px 18px; font-size: 12px; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100vw - 30px); }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
@media (max-width: 980px) {
  .hero { gap: 30px; }.hero-cloth { right: 75px; }.hero-cloth-back { right: 45px; }
  .step-panel { padding: 30px 26px; }
  .fabric-editor-grid { gap: 20px; grid-template-columns: minmax(0,1fr) minmax(280px,.95fr); }
  .layout-grid { grid-template-columns: minmax(0,1fr) 265px; gap: 18px; }.layout-controls { padding: 17px; }
  .pattern-art { height: 165px; }.pattern-card-body { padding: 17px 14px; }
}
@media (max-width: 740px) {
  .site-header { height: 67px; }.header-inner { padding: 0 18px; }
  .brand-symbol { width: 33px; height: 33px; }.brand-name { font-size: 21px; }.brand-name i { font-size: 19px; }
  .main-nav { gap: 11px; }.nav-link { font-size: 11px; padding: 20px 0; }.nav-count { display: none; }.nav-link.active::after { bottom: 12px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 34px 21px 29px; min-height: 0; }
  .hero h1 { margin: 15px 0 9px; font-size: clamp(34px,8vw,46px); line-height: 1.28; }
  .hero-copy p { font-size: 12px; line-height: 1.8; }
  .hero-link { margin-top: 14px; font-size: 12px; }
  .hero-scene { height: 149px; min-height: 149px; border-radius: 90px 90px 3px 3px; overflow: hidden; }
  .hero-scene-caption { top: 15px; left: 17px; font-size: 8px; }
  .hero-halo { width: 170px; height: 170px; top: 0; right: 19px; }
  .hero-cloth { width: 152px; height: 132px; top: 19px; right: 78px; border-width: 5px; }.hero-cloth-back { top: 11px; right: 48px; }
  .hero-flower { font-size: 34px; }.flower-b { top: 53px; left: 65px; }.flower-c { top: 80px; }.flower-d { font-size: 22px; }
  .hero-handnote { left: 26px; bottom: 18px; font-size: 12px; }
  .workspace { padding: 0 12px; margin-bottom: 45px; }
  .workspace-heading { padding: 0 7px 14px; }.workspace-heading h2 { font-size: 24px; }
  .workspace-aside { display: none; }
  .journey { min-height: 54px; margin-bottom: 9px; }
  .journey-step { flex: 1; padding: 12px 0; flex-direction: column; gap: 2px; justify-content: center; }
  .journey-step span { font-size: 13px; }.journey-step b { font-size: 10px; }
  .journey-connector { min-width: 4px; margin: 0 2px; flex: .24; }
  .step-panel { padding: 24px 17px 28px; min-height: 0; }
  .step-heading { align-items: start; gap: 9px; margin-bottom: 21px; }
  .step-heading h3 { font-size: 25px; margin: 6px 0 5px; }
  .step-heading p { font-size: 11px; }
  .handwritten-note { display: none; }
  .fabric-editor-grid, .layout-grid, .save-layout { grid-template-columns: 1fr; gap: 19px; }
  .photo-stage { height: 300px; } #crop-canvas { max-height: 300px; }
  .fabric-form { padding: 21px; }
  .fabric-form-bottom { padding-top: 24px; }
  .pattern-grid { grid-template-columns: 1fr; gap: 10px; }
  .pattern-card { display: grid; grid-template-columns: 125px 1fr; }
  .pattern-art { height: auto; min-height: 188px; }
  .pattern-art::before { width: 130px; height: 130px; }
  .coaster .pattern-shape { width: 92px; height: 92px; }.pouch .pattern-shape { width: 70px; height: 100px; }.placemat .pattern-shape { width: 105px; height: 77px; }
  .pattern-card-body { padding: 14px; }.pattern-card h4 { font-size: 19px; margin-top: 7px; }
  .pattern-card p { min-height: 0; font-size: 10px; margin-bottom: 7px; }
  .card-specs { padding-top: 8px; font-size: 10px; }.card-bottom { margin-top: 5px; font-size: 10px; }
  .layout-canvas-wrap { height: 390px; } #layout-canvas { max-height: 358px; }
  .layout-controls { padding: 21px; }
  .arrow-pad { grid-template-columns: repeat(3,49px); grid-template-rows: repeat(2,40px); }
  .preview-gallery { grid-template-columns: 1fr; gap: 12px; }
  .finished-piece { padding: 13px; }.finished-canvas-wrap { height: 275px; min-height: 0; }
  .step-footer { margin-top: 22px; padding-top: 16px; }.solid-button, .ghost-button { gap: 9px; font-size: 11px; padding: 9px 13px; }
  .crop-help { flex-direction: column; }.crop-buttons { flex-direction: row; }
  .saved-postcard { min-height: 310px; }
  .save-form { padding: 22px; }
  .library-content { padding: 14px 19px; }.dialog-header { padding: 20px 19px 10px; }.library-tabs { margin: 0 19px; }
}
@media (max-width: 390px) {
  .header-inner { padding: 0 11px; }.brand { gap: 5px; }.brand-name { font-size: 19px; }.brand-name i { font-size: 17px; }
  .main-nav { gap: 7px; }.nav-link { font-size: 10px; }
  .hero { padding-inline: 17px; }.hero h1 { font-size: 32px; }
  .measure-grid { gap: 7px; }.fabric-form-bottom .nature-mark { display: none; }.fabric-form-bottom .solid-button { width: 100%; }
  .pattern-card { grid-template-columns: 105px 1fr; }.pattern-art { min-height: 175px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
