:root {
  --paper: #f0ece4; --card: #ffffff; --ink: #111620; --navy: #1a2335; --slate: #3d5578; --sky: #7a9ec0; --line: #c8bfb2;
  --good: #1f6b3a; --warn: #8a5a00; --bad: #a32020;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 Inter, system-ui, sans-serif; }
h1, h2, .brand { font-family: Merriweather, Georgia, serif; }
h2 { font-size: 1.15rem; margin: 0 0 12px; }
.top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 18px 24px; background: var(--navy); color: var(--paper); }
.brand { font-size: 1.25rem; font-weight: 700; }
.client { font-size: 0.95rem; opacity: 0.85; }
main { max-width: 1120px; margin: 0 auto; padding: 24px 16px 64px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 24px; align-items: start; }
.side { position: sticky; top: 16px; display: grid; gap: 16px; }
.step, .cart, .panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 12px; }
.card { display: grid; gap: 6px; padding: 8px; overflow-wrap: anywhere; background: var(--card); border: 2px solid var(--line); border-radius: 8px; cursor: pointer; font: inherit; color: inherit; text-align: center; min-height: 44px; }
.card img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.card.on, .chip.on { border-color: var(--slate); background: #eef3f9; }
.checker, .card.logo img { background: repeating-conic-gradient(#e9e6e0 0% 25%, #ffffff 0% 50%) 50% / 16px 16px; border-radius: 6px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chip { min-height: 44px; padding: 8px 14px; border: 2px solid var(--line); border-radius: 22px; background: var(--card); font: inherit; color: inherit; cursor: pointer; }
.drop { display: block; padding: 18px; border: 2px dashed var(--sky); border-radius: 8px; text-align: center; cursor: pointer; }
.drop input { display: block; margin: 10px auto 0; font-size: 16px; max-width: 100%; }
.uploaded img { display: block; max-width: 220px; max-height: 160px; margin-top: 12px; }
.field { display: grid; gap: 4px; margin: 10px 0; }
.field input, .size input { font: inherit; font-size: 16px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: #fff; color: var(--ink); }
.field input[type="range"] { padding: 0; }
.err { color: var(--bad); font-size: 0.9rem; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; min-height: 44px; }
.check input { width: 22px; height: 22px; }
.sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin-bottom: 14px; }
.size { display: grid; gap: 4px; text-align: center; font-weight: 600; }
.primary { min-height: 48px; padding: 10px 20px; border: 0; border-radius: 8px; background: var(--slate); color: #fff; font: inherit; font-weight: 600; cursor: pointer; width: 100%; }
.primary:disabled, .chip:disabled { opacity: 0.6; cursor: default; }
.link { border: 0; background: none; color: var(--slate); text-decoration: underline; font: inherit; cursor: pointer; min-height: 44px; }
.stage { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.layout > div > .stage { margin-bottom: 16px; }
.stage.empty { padding: 48px 16px; text-align: center; color: var(--slate); }
.photo { display: block; width: 100%; height: auto; }
.overlay { position: absolute; display: none; }
.overlay.light { mix-blend-mode: multiply; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.line img { width: 72px; border-radius: 6px; }
.totals { margin: 12px 0; display: grid; gap: 4px; }
.totals div { display: flex; justify-content: space-between; }
.totals .grand { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 6px; }
.totals .pay { font-weight: 700; font-size: 1.1rem; }
.muted { color: #5b6470; font-size: 0.92rem; }
.notice { padding: 10px 12px; border-radius: 8px; margin: 10px 0; background: #f6f3ee; }
.notice:empty { display: none; }
.notice.good { color: var(--good); background: #eaf5ee; }
.notice.warn { color: var(--warn); background: #fdf3df; }
.notice.bad { color: var(--bad); background: #fbeaea; }
.quote { border-left: 4px solid var(--navy); padding: 10px 14px; background: var(--card); margin: 12px 0; }
.foot { text-align: center; padding: 24px; color: #5b6470; font-size: 0.85rem; }
.mockup { max-width: 1120px; margin: 0 auto; }
.mockup .step { max-width: 860px; margin-left: auto; margin-right: auto; }
.mockup .tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mockup .tile { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.mockup .tile img { display: block; width: 100%; height: auto; }
.mockup .tile figcaption { display: grid; gap: 2px; padding: 8px 10px 10px; text-align: center; font-size: 0.95rem; line-height: 1.3; overflow-wrap: anywhere; }
.mockup .download, .mockup > .notice { max-width: 860px; margin: 12px auto 16px; }
.mockup .download a { display: inline-flex; align-items: center; min-height: 44px; color: var(--slate); }
.mockup .sheet, .cart .sheet { display: block; width: 100%; height: auto; margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
ul.plain { margin: 0 0 16px; padding-left: 20px; }
a.primary { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.previews { display: grid; gap: 12px; }
.previews.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stage .tag { position: absolute; top: 8px; left: 8px; padding: 2px 10px; border-radius: 12px; background: #ffffffd9; color: var(--ink); font-size: 0.85rem; }
.card.pick { position: relative; }
.card.pick input { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; margin: 0; }
.placement { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 8px; }
.step .placement:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.field textarea { font: inherit; font-size: 16px; min-height: 96px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: #fff; color: var(--ink); resize: vertical; }
.share { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.share input { flex: 1; min-width: 0; font: inherit; font-size: 16px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); }
.row.ink { align-items: center; }
.overlay.ink-black { filter: brightness(0); }
.overlay.ink-white { filter: brightness(0) invert(1); }
.intro { margin: 0 0 16px; }
.color-sizes { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.step .color-sizes:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.color-sizes h3 { margin: 0 0 8px; font-size: 1rem; }
.size .price { font-weight: 400; font-size: 0.85rem; color: #5b6470; }
.sent .share, .sent .totals { margin: 12px 0; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.transfer-stage { padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.transfer-box { width: calc(var(--w, 1) * 100%); margin: 0 auto 8px; outline: 3px solid #4a4a4a; background: repeating-conic-gradient(#cdcdcd 0% 25%, #aaaaaa 0% 50%) 50% / 16px 16px; }
.transfer-box img { display: block; width: 100%; height: 100%; object-fit: fill; }
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .sizes { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .mockup .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
main.checkout { max-width: 680px; }
.checkout .sheet { display: block; width: 100%; height: auto; margin: 0 0 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.field select { font: inherit; font-size: 16px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: #fff; color: var(--ink); }
