:root {
  --bg: #fffaf5; --card: #fff; --ink: #1f2430; --muted: #6b7080; --line: #ece4dc;
  --accent: #ff6b4a; --accent-ink: #fff; --accent-soft: #ffe8e1; --ok: #15803d; --warn: #b45309; --bad: #b91c1c;
  --radius: 16px; --shadow: 0 1px 2px rgba(31,36,48,.06), 0 6px 20px rgba(31,36,48,.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { font: inherit; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; background: rgba(255,250,245,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.brand { font-weight: 800; font-size: 19px; text-decoration: none; letter-spacing: -.01em; }
.cart-btn { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; text-decoration: none; }
.cart-btn:hover { background: var(--accent-soft); }
.badge { position: absolute; top: 2px; right: 0; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.event-banner { background: var(--ink); color: #fff; text-align: center; padding: 8px 16px; font-size: 14px; }
.view { max-width: 980px; margin: 0 auto; padding: 20px 18px 120px; }
h1 { font-size: clamp(26px, 6vw, 38px); line-height: 1.1; letter-spacing: -.02em; margin: 10px 0 6px; }
h2 { font-size: 21px; margin: 24px 0 10px; }
.lead { color: var(--muted); margin: 0 0 22px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 13px 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-weight: 600; cursor: pointer; text-decoration: none; min-height: 48px; }
.btn:hover { border-color: #d8ccc0; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(.96); }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.sm { padding: 7px 12px; min-height: 36px; font-size: 14px; border-radius: 10px; }
.linkbtn { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 4px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.product { display: flex; flex-direction: column; cursor: pointer; transition: transform .15s; }
.product:hover { transform: translateY(-2px); }
.product .art { aspect-ratio: 16/9; display: grid; place-items: center; background: linear-gradient(135deg, #ffe8e1, #fff3d6 60%, #e3f1ff); }
.product .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product .name { font-weight: 700; font-size: 17px; }
.product .price { font-weight: 800; font-size: 18px; margin-top: auto; padding-top: 8px; }
.mini-set { display: grid; gap: 6px; }
.mini-set i { display: block; width: 34px; height: 34px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,.12); border: 3px solid #fff; }
.mini-set.round i { border-radius: 50%; }

/* editor */
.editor-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 10px; margin: 14px 0; }
.slot { aspect-ratio: 1; border-radius: 12px; border: 2px dashed #d9cdc1; background: #fff; display: grid; place-items: center; cursor: pointer; overflow: hidden; position: relative; padding: 0; }
.slot.round, .slot.round img { border-radius: 50%; }
.slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slot.filled { border-style: solid; border-color: transparent; }
.slot.active { outline: 3px solid var(--accent); outline-offset: 2px; }
.slot .plus { font-size: 26px; color: #b9ab9d; }
.slot .warn-dot { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.stage-wrap { display: grid; grid-template-columns: minmax(0, 420px) 1fr; gap: 24px; align-items: start; }
@media (max-width: 720px) { .stage-wrap { grid-template-columns: 1fr; } }
.stage { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; margin: 0 auto; touch-action: none; user-select: none; border-radius: 10px; overflow: hidden; background: #eee; box-shadow: var(--shadow); }
.stage canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.stage canvas:active { cursor: grabbing; }
.stage .empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 20px; background: #fff; cursor: pointer; }
.controls { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
input[type=range] { width: 100%; accent-color: var(--accent); }
.hint { font-size: 13px; color: var(--muted); }
.alert { padding: 10px 12px; border-radius: 10px; font-size: 14px; }
.alert.warn { background: #fff4e0; color: var(--warn); }
.alert.bad { background: #fde8e8; color: var(--bad); }
.alert.ok { background: #e7f6ec; color: var(--ok); }
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); }
.sticky-bar .inner { max-width: 980px; margin: 0 auto; display: flex; gap: 12px; align-items: center; justify-content: space-between; }

/* cart & checkout */
.line { display: flex; gap: 14px; padding: 14px; align-items: center; }
.line + .line { border-top: 1px solid var(--line); }
.thumbs { display: flex; flex-wrap: wrap; gap: 4px; width: 112px; flex: none; }
.thumbs img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; }
.thumbs.round img { border-radius: 50%; }
.line .info { flex: 1; min-width: 0; }
.total-row { display: flex; justify-content: space-between; padding: 6px 0; }
.total-row.big { font-weight: 800; font-size: 19px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
form .field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
label { font-weight: 600; font-size: 14px; }
input[type=text], input[type=tel], input[type=email], textarea, select { font: inherit; padding: 12px 14px; border-radius: 12px; border: 1px solid #ddd2c6; background: #fff; width: 100%; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; margin-bottom: 10px; }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #fffaf8; }
.choice input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }
.choice .t { font-weight: 700; }
.pay-logos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.pay-logos span { font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; background: #f2ede8; color: #554; }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .two { grid-template-columns: 1fr; } }
.pad { padding: 18px; }

/* order page */
.status-hero { text-align: center; padding: 26px 18px; }
.code { font-size: 34px; font-weight: 800; letter-spacing: .08em; font-family: ui-monospace, Menlo, Consolas, monospace; }
.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: #eee; }
.pill.paid { background: #e7f6ec; color: var(--ok); }
.pill.unpaid { background: #fff4e0; color: var(--warn); }
.pill.failed { background: #fde8e8; color: var(--bad); }
.qr-pay { max-width: 240px; width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.progress { height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 50; font-size: 14px; max-width: 90vw; }
.steps { display: flex; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; flex-wrap: wrap; }
.steps b { color: var(--ink); }

/* product art */
.sample { width: 96px; height: 96px; background: #fff; display: grid; place-items: center; clip-path: polygon(23% 0, 77% 0, 100% 23%, 100% 77%, 77% 100%, 23% 100%, 0 77%, 0 23%); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.sample i { width: 72px; height: 72px; background: linear-gradient(135deg, #ff9b85, #ffd166 55%, #8ecae6); border-radius: 3px; }
.sample.round { clip-path: circle(50%); } .sample.round i { border-radius: 50%; }
.product .price { line-height: 1.3; }

/* product page */
.tier { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; background: #faf7f4; }
.tier.on { border-color: var(--accent); background: var(--accent-soft); }
.tag { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .03em; padding: 2px 7px; border-radius: 5px; margin-left: 6px; text-transform: uppercase; }
.total-box { margin-top: 10px; padding: 12px; border: 1px dashed #e0d3c7; border-radius: 10px; background: #fffdfb; }
.drop { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; border: 2px dashed #d9b9a8; border-radius: 14px; padding: 26px 16px; margin: 12px 0; cursor: pointer; background: #fffcfa; }
.drop.over { background: var(--accent-soft); border-color: var(--accent); }
.drop-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 26px; font-weight: 800; margin-bottom: 6px; }
.tips { background: #eef4ff; color: #2b4a8b; border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.tips ul { margin: 4px 0 0; padding-left: 18px; }
.notice { background: #fff8e1; border: 1px solid #f3dc8b; color: #7a5200; border-radius: 12px; padding: 10px 14px; font-size: 14px; margin: 14px 0 10px; }
.pc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.photo-card { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; align-items: flex-start; }
.thumb-lg { width: 86px; height: 86px; object-fit: cover; border-radius: 8px; flex: none; background: #eee; }
.thumb-lg.round { border-radius: 50%; }
.pc-body { flex: 1; min-width: 0; }
.qty { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.qty button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 18px; cursor: pointer; line-height: 1; }
.qty input { width: 52px; text-align: center; padding: 6px; border-radius: 8px; border: 1px solid #ddd2c6; font: inherit; }
.btn.danger { color: var(--bad); background: #fdecec; border-color: #f8d4d4; }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.row .btn { min-height: 40px; }

/* cart */
.cart-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.ct { position: relative; display: block; width: 72px; height: 72px; }
.ct img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; display: block; }
.ct.round img { border-radius: 50%; }
.ct span { position: absolute; right: -4px; bottom: -4px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 1px 6px; }
.two-btn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 480px) { .two-btn { grid-template-columns: 1fr; } }

/* checkout */
.sect { margin-bottom: 16px; }
.sect h2 { margin-top: 0; }
h3 { font-size: 16px; margin: 18px 0 10px; }
.chip-r { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 600; background: #fff; }
.chip-r:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.chip-r input { accent-color: var(--accent); }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.method { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; padding: 18px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; }
.method:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #fffaf8; }
.method input { position: absolute; top: 10px; left: 10px; accent-color: var(--accent); }
.mi { font-size: 26px; }
.form2 { display: grid; grid-template-columns: 1fr 1.6fr; gap: 12px; }
.alert.info { background: #f6efe9; color: #6b4a3a; }

.top-actions { display: flex; gap: 4px; }
.check-line { display: flex; gap: 8px; align-items: center; font-weight: 500; font-size: 15px; margin-top: 4px; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--accent); }
.order-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; text-decoration: none; border-bottom: 1px solid var(--line); }
.order-row:last-child { border-bottom: 0; }
.order-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }

@media (max-width: 480px) { .sticky-bar .inner .row { flex-wrap: nowrap; } .sticky-bar .btn { padding: 12px 14px; } }

/* footer + policy pages */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 22px 18px 120px; }
.site-footer .inner { max-width: 980px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; font-size: 14px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); }
.policy { max-width: 760px; padding-bottom: 40px; }
.policy h2 { font-size: 18px; margin: 26px 0 6px; }
.policy p, .policy li { color: #3a3f4b; }
