:root {
  --ink: #17221d;
  --paper: #f7f8f3;
  --white: #ffffff;
  --sage: #94ab9b;
  --sage-deep: #315c49;
  --line: #d9dfd8;
  --mist: #e8eee8;
  --signal: #e85536;
  --muted: #68736d;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.site-header { position: sticky; z-index: 10; top: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 68px; padding: 0 clamp(18px, 4vw, 64px); border-bottom: 1px solid rgba(23,34,29,.12); background: rgba(247,248,243,.94); backdrop-filter: blur(14px); }
.brand { display: inline-flex; align-items: center; gap: 10px; width: max-content; font-family: Georgia, "Yu Mincho", serif; font-weight: 700; }
.brand-dot { width: 13px; height: 13px; border: 4px solid var(--sage-deep); border-radius: 50%; box-shadow: 7px 0 0 var(--signal); }
.site-header nav { display: flex; gap: 30px; font-size: 12px; font-weight: 700; }
.site-header nav a:hover { color: var(--signal); }
.header-cta { justify-self: end; padding: 10px 17px; border-radius: 3px; background: var(--ink); color: white; font-size: 12px; font-weight: 800; }

.customizer { display: grid; grid-template-columns: minmax(430px, .86fr) minmax(540px, 1.14fr); min-height: calc(100vh - 68px); }
.editor-panel { padding: clamp(46px, 6vw, 88px) clamp(24px, 6vw, 88px); border-right: 1px solid var(--line); }
.eyebrow, .section-heading > p { margin: 0 0 18px; color: var(--signal); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Yu Mincho", serif; font-weight: 500; }
h1 { margin-bottom: 24px; font-size: clamp(40px, 4vw, 60px); line-height: 1.18; }
h1 span { white-space: nowrap; }
.intro { max-width: 560px; margin-bottom: 36px; color: var(--muted); font-size: 15px; line-height: 1.85; }
.mobile-product { display: none; }
.design-form { display: grid; gap: 18px; max-width: 580px; }
.design-form > label { display: grid; gap: 7px; }
.design-form label > span, legend { font-size: 12px; font-weight: 800; }
.design-form input[type="text"], .design-form input[type="url"], .design-form > label input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink); outline: none; }
.design-form input:focus { border-color: var(--sage-deep); box-shadow: 0 0 0 3px rgba(49,92,73,.09); }
.design-form small { color: var(--muted); font-size: 10px; }
fieldset { margin: 0; padding: 0; border: 0; }
legend { margin-bottom: 10px; }
.swatches { display: flex; gap: 10px; }
.swatch-option { position: relative; display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 3px; background: white; font-size: 11px; cursor: pointer; }
.swatch-option input { position: absolute; opacity: 0; }
.swatch-option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.swatch { width: 17px; height: 17px; border: 1px solid #cdd3ce; border-radius: 50%; }
.swatch.clear { background: #f7f9f7; }
.swatch.sage { background: #b8c9bc; }
.swatch.smoke { background: #555d59; }
.order-bar { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 18px; margin-top: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.order-bar > div { display: grid; gap: 2px; }
.order-bar span { color: var(--muted); font-size: 10px; }
.order-bar strong { font: 30px Georgia, serif; }
.primary-button, .square-button { min-height: 50px; padding: 0 22px; border: 0; border-radius: 3px; background: var(--signal); color: white; font-size: 13px; font-weight: 900; }
.primary-button:hover, .square-button:hover { background: #c94329; }

.visual-panel { position: relative; min-height: 760px; overflow: hidden; background: #dfe8e1; }
.photo-stage { position: absolute; inset: 0; }
.photo-stage::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(23,34,29,.08), transparent 32%); content: ""; }
.photo-stage img { width: 100%; height: 100%; object-fit: cover; }
.photo-stage > p { position: absolute; z-index: 1; right: 22px; bottom: 18px; margin: 0; color: white; font-size: 10px; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.photo-stage p span { margin-right: 10px; font-weight: 900; }
.live-preview-wrap { position: absolute; z-index: 2; left: 28px; bottom: 28px; width: min(310px, calc(100% - 56px)); padding: 16px; border: 1px solid rgba(255,255,255,.75); background: rgba(247,248,243,.92); box-shadow: 0 18px 60px rgba(23,34,29,.2); backdrop-filter: blur(18px); }
.preview-meta { display: flex; justify-content: space-between; margin-bottom: 12px; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.sign-preview { display: grid; justify-items: center; min-height: 325px; padding: 35px 26px 28px; border: 1px solid rgba(23,34,29,.25); background: rgba(255,255,255,.72); box-shadow: inset 0 0 18px rgba(255,255,255,.8); text-align: center; transition: background .2s, color .2s; }
.sign-preview.sage { background: rgba(174,198,181,.88); }
.sign-preview.smoke { border-color: #777f7a; background: rgba(55,65,60,.88); color: white; }
.sign-preview p { width: 100%; margin-bottom: 17px; padding-bottom: 13px; border-bottom: 1px solid currentColor; font-family: "Yu Mincho", serif; font-size: 17px; }
.sign-preview strong { margin-top: 18px; font: 16px Georgia, "Yu Mincho", serif; letter-spacing: .14em; overflow-wrap: anywhere; }
#qrPreview { padding: 7px; background: white; }
#qrPreview img, #qrPreview canvas { display: block; width: 132px !important; height: 132px !important; }
.preview-note { margin: 10px 0 0; color: var(--muted); font-size: 9px; line-height: 1.5; }

.proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 clamp(18px, 5vw, 72px); background: var(--ink); color: white; }
.proof-strip div { display: flex; align-items: center; gap: 14px; min-height: 88px; padding: 0 20px; border-right: 1px solid rgba(255,255,255,.13); }
.proof-strip div:last-child { border-right: 0; }
.proof-strip b { color: var(--sage); font: 19px Georgia, serif; }
.proof-strip span { font-size: 11px; font-weight: 700; }
.example-section, .flow-section { padding: clamp(72px, 9vw, 130px) clamp(20px, 8vw, 130px); }
.section-heading { display: grid; grid-template-columns: .65fr 1.35fr; align-items: start; margin-bottom: 56px; }
.section-heading h2 { margin: 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.16; }
.use-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--ink); }
.use-grid article { min-height: 220px; padding: 30px 28px; border-right: 1px solid var(--line); }
.use-grid article:last-child { border-right: 0; }
.use-grid span { color: var(--signal); font-size: 9px; font-weight: 900; letter-spacing: .16em; }
.use-grid h3 { margin: 38px 0 12px; font: 25px Georgia, "Yu Mincho", serif; }
.use-grid p, .flow-section li p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.flow-section { background: var(--mist); }
.flow-section ol { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; }
.flow-section li { display: grid; grid-template-columns: auto 1fr; gap: 18px; padding: 24px; border-left: 1px solid #cbd4cc; }
.flow-section li b { font: 26px Georgia, serif; }
.flow-section h3 { margin-bottom: 9px; font-size: 15px; }
footer { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; min-height: 130px; padding: 25px clamp(20px, 5vw, 72px); background: var(--ink); color: white; }
footer > p { margin: 0; color: #b7c3bb; text-align: center; font-size: 11px; }
footer > div { display: flex; justify-content: flex-end; gap: 18px; color: #b7c3bb; font-size: 10px; }

dialog { width: min(520px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 4px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 100px rgba(0,0,0,.32); }
dialog::backdrop { background: rgba(23,34,29,.63); backdrop-filter: blur(6px); }
.dialog-shell { position: relative; padding: 38px; }
.dialog-close { position: absolute; top: 13px; right: 15px; border: 0; background: transparent; color: var(--muted); font-size: 25px; }
.dialog-shell h2 { margin-bottom: 24px; font-size: 35px; }
.dialog-shell dl { display: grid; grid-template-columns: 120px 1fr; margin: 0; border-top: 1px solid var(--line); }
.dialog-shell dt, .dialog-shell dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; overflow-wrap: anywhere; }
.dialog-shell dt { color: var(--muted); }
.dialog-total { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px; padding: 21px 0; }
.dialog-total span { font-size: 11px; font-weight: 800; }
.dialog-total strong { grid-row: span 2; font: 32px Georgia, serif; }
.dialog-total small { color: var(--muted); font-size: 9px; }
.square-button, .copy-button { width: 100%; }
.copy-button { min-height: 44px; margin-top: 9px; border: 1px solid var(--ink); border-radius: 3px; background: transparent; font-size: 12px; font-weight: 800; }
.dialog-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center; }

.legal-main { max-width: 900px; min-height: 70vh; margin: 0 auto; padding: 90px 24px; }
.legal-main h1 { font-size: clamp(36px, 6vw, 64px); }
.legal-table { display: grid; grid-template-columns: 190px 1fr; margin-top: 40px; border-top: 1px solid var(--line); }
.legal-table dt, .legal-table dd { margin: 0; padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 12px; line-height: 1.7; }
.legal-table dt { font-weight: 800; }

.checkout-main { max-width: 1080px; min-height: 72vh; margin: 0 auto; padding: 72px 24px 100px; }
.checkout-heading { max-width: 860px; margin-bottom: 38px; }
.checkout-heading h1 { margin-bottom: 18px; font-size: clamp(34px, 5vw, 56px); }
.checkout-heading .intro { margin-bottom: 0; }
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr); gap: 42px; align-items: start; }
.checkout-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.checkout-form label { display: grid; gap: 7px; }
.checkout-form label > span, .checkout-form legend { font-size: 12px; font-weight: 800; }
.checkout-form .full { grid-column: 1 / -1; }
.checkout-form input, .checkout-form select, .checkout-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 3px; background: var(--white); color: var(--ink); outline: none; }
.checkout-form input, .checkout-form select { height: 48px; padding: 0 13px; }
.checkout-form textarea { min-height: 92px; padding: 13px; resize: vertical; }
.checkout-form input:focus, .checkout-form select:focus, .checkout-form textarea:focus { border-color: var(--sage-deep); box-shadow: 0 0 0 3px rgba(49,92,73,.09); }
.checkout-form small { color: var(--muted); font-size: 10px; line-height: 1.6; }
.checkout-form .honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.consent-row { display: flex !important; grid-column: 1 / -1; grid-template-columns: auto 1fr !important; align-items: start; gap: 10px !important; font-size: 11px; line-height: 1.7; }
.consent-row input { width: 17px; height: 17px; margin-top: 2px; }
.consent-row a { text-decoration: underline; }
.checkout-submit { grid-column: 1 / -1; min-height: 54px; border: 0; border-radius: 3px; background: var(--signal); color: white; font-size: 13px; font-weight: 900; }
.checkout-submit:hover { background: #c94329; }
.checkout-submit:disabled { cursor: wait; opacity: .65; }
.form-status { grid-column: 1 / -1; min-height: 22px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.form-status.error { color: #b33220; }
.order-card { padding: 26px; border: 1px solid var(--line); background: white; }
.order-card h2 { margin-bottom: 20px; font-size: 28px; }
.order-card dl { display: grid; grid-template-columns: 110px 1fr; margin: 0; border-top: 1px solid var(--line); }
.order-card dt, .order-card dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.order-card dt { color: var(--muted); }
.order-total { display: flex; justify-content: space-between; align-items: end; margin: 20px 0 0; }
.order-total span { font-size: 11px; font-weight: 800; }
.order-total strong { font: 30px Georgia, serif; }
.order-card-note { margin: 16px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.completion-panel { max-width: 720px; margin: 70px auto 100px; padding: 42px; border: 1px solid var(--line); background: white; text-align: center; }
.completion-mark { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 22px; border-radius: 50%; background: var(--sage-deep); color: white; font-size: 24px; }
.completion-panel h1 { font-size: clamp(32px, 5vw, 48px); }
.completion-panel p { color: var(--muted); font-size: 13px; line-height: 1.9; }
.order-number { margin: 25px 0; padding: 18px; background: var(--mist); }
.order-number span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 10px; }
.order-number strong { font: 21px Georgia, monospace; letter-spacing: .04em; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; padding: 0 18px; border: 1px solid var(--ink); border-radius: 3px; font-size: 12px; font-weight: 800; }

@media (max-width: 960px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .customizer { grid-template-columns: 1fr; }
  .editor-panel { border-right: 0; }
  .visual-panel { min-height: 720px; }
  .proof-strip { grid-template-columns: repeat(2, 1fr); }
  .proof-strip div:nth-child(2) { border-right: 0; }
  .flow-section ol { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .site-header { min-height: 60px; }
  .header-cta { padding: 9px 12px; }
  .editor-panel { padding: 42px 18px; }
  h1 { font-size: 34px; line-height: 1.24; }
  .intro { margin-bottom: 22px; }
  .mobile-product { position: relative; display: block; height: 190px; margin: 0 0 28px; overflow: hidden; border: 1px solid var(--line); }
  .mobile-product img { width: 100%; height: 100%; object-fit: cover; object-position: 67% 50%; }
  .mobile-product figcaption { position: absolute; right: 9px; bottom: 8px; padding: 5px 7px; background: rgba(255,255,255,.88); color: var(--ink); font-size: 8px; font-weight: 800; }
  .order-bar { grid-template-columns: 1fr; align-items: stretch; }
  .primary-button { width: 100%; }
  .swatches { display: grid; grid-template-columns: repeat(3, 1fr); }
  .swatch-option { justify-content: center; padding: 9px 4px; }
  .visual-panel { min-height: 620px; }
  .live-preview-wrap { left: 16px; bottom: 16px; width: calc(100% - 32px); }
  .sign-preview { min-height: 300px; }
  .proof-strip { grid-template-columns: 1fr; }
  .proof-strip div { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.13); }
  .section-heading { grid-template-columns: 1fr; gap: 12px; }
  .use-grid, .flow-section ol { grid-template-columns: 1fr; }
  .use-grid article { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  footer { grid-template-columns: 1fr; gap: 18px; text-align: left; }
  footer > p { text-align: left; }
  footer > div { justify-content: flex-start; flex-wrap: wrap; }
  .dialog-shell { padding: 34px 22px 25px; }
  .legal-table { grid-template-columns: 1fr; }
  .legal-table dt { padding-bottom: 3px; border-bottom: 0; }
  .legal-table dd { padding-top: 3px; }
  .checkout-main { padding: 46px 18px 72px; }
  .checkout-layout, .checkout-form { grid-template-columns: 1fr; }
  .checkout-form .full, .consent-row, .checkout-submit, .form-status { grid-column: 1; }
  .order-card { grid-row: 1; }
  .completion-panel { margin: 45px 18px 70px; padding: 34px 20px; }
}
