:root {
  --bg: #faf6f4;
  --card: #ffffff;
  --ink: #3d3330;
  --sub: #8c7d78;
  --line: #ecdfda;
  --accent: #b07d86;
  --accent-soft: #f6eaec;
  --err: #c0394b;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.8 "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; -webkit-text-size-adjust: 100%; }
a { color: var(--accent); }
.wrap { max-width: 720px; margin: 0 auto; padding: 24px 16px 48px; }
.hero { text-align: center; padding: 32px 8px 16px; }
.eyebrow { letter-spacing: .2em; font-size: 12px; color: var(--accent); text-transform: uppercase; margin: 0 0 8px; }
.hero h1 { font-size: clamp(22px, 5vw, 30px); font-weight: 500; line-height: 1.5; margin: 0 0 20px; }
.gift { background: var(--accent-soft); padding: 12px 16px; border-radius: 8px; }
.warn { color: var(--err); font-size: 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px 20px; margin: 20px 0; }
.card h2, .uploads h2 { font-size: 18px; font-weight: 500; margin: 0 0 12px; }
.info ul { padding-left: 0; list-style: none; }
.info li { margin: 6px 0; }
.loading { color: var(--sub); text-align: center; }

.field { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; font-family: "Hiragino Sans", "Noto Sans JP", sans-serif; font-size: 15px; }
.field legend { font-weight: 600; padding: 0; margin-bottom: 8px; line-height: 1.6; }
.req, .opt { display: inline-block; font-size: 11px; font-weight: 600; padding: 0 6px; border-radius: 3px; margin-left: 6px; vertical-align: 2px; }
.req { background: var(--accent); color: #fff; }
.opt { background: #eee; color: #888; }
.note { color: var(--sub); font-size: 13px; margin: -4px 0 8px; }
input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid #d9cbc6; border-radius: 6px; padding: 10px 12px; appearance: none;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.mt { margin-top: 8px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inline { display: flex; align-items: center; gap: 8px; }
.inline select { width: auto; min-width: 160px; }
.choices { display: grid; gap: 6px; }
.choice { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input[type=radio], .choice input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; margin: 0; }
.choice.other { flex-wrap: wrap; }
.choice.other input[type=text] { flex: 1 1 200px; padding: 6px 10px; }
.field.invalid input, .field.invalid select, .field.invalid textarea, .field.invalid .choice { border-color: var(--err); }
.err { color: var(--err); font-size: 13px; margin: 4px 0 0; min-height: 0; font-family: "Hiragino Sans", sans-serif; }
.err:empty { display: none; }
.err.big { font-size: 15px; text-align: center; margin: 12px 0; }

.uploads { margin: 8px 0 28px; padding-top: 20px; border-top: 1px solid var(--line); font-family: "Hiragino Sans", "Noto Sans JP", sans-serif; font-size: 15px; }
.uploads small { color: var(--sub); }
.drop { display: block; border: 2px dashed #d9cbc6; border-radius: 10px; padding: 28px 16px; text-align: center; cursor: pointer; background: #fffdfc; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-in { display: flex; flex-direction: column; gap: 2px; color: var(--accent); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-top: 12px; }
.thumb { position: relative; margin: 0; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #f0e8e5; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { padding: 8px; font-size: 11px; word-break: break-all; color: var(--sub); }
.thumb .bar { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 5px; background: rgba(255,255,255,.7); border-radius: 3px; overflow: hidden; }
.thumb .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.thumb.done .bar { display: none; }
.thumb.done::after { content: "✓"; position: absolute; left: 6px; bottom: 4px; color: #fff; background: #5a9a6e; width: 20px; height: 20px; border-radius: 50%; font-size: 12px; display: grid; place-items: center; }
.thumb.error { outline: 2px solid var(--err); }
.thumb .rm { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.thumb .retry { position: absolute; left: 6px; right: 6px; bottom: 6px; font-size: 11px; border: 0; border-radius: 4px; background: var(--err); color: #fff; padding: 4px; cursor: pointer; }

.hp { position: absolute; left: -9999px; }
.submit { display: block; width: 100%; max-width: 360px; margin: 8px auto 0; padding: 16px; font: inherit; font-size: 17px; letter-spacing: .1em; color: #fff; background: var(--accent); border: 0; border-radius: 999px; cursor: pointer; }
.submit:disabled { opacity: .6; cursor: wait; }
.thanks { text-align: center; }
.thanks h2 { line-height: 1.6; }
.foot { text-align: center; font-size: 12px; color: var(--sub); margin-top: 32px; }
@media (max-width: 480px) { .card { padding: 20px 16px; } }

/* ---- 共通追加：見出し・選択肢2列・同意・柄選び・ヘッダー・ギフト ---- */
.sec-h { font-size: 18px; font-weight: 500; margin: 36px 0 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
#fields > .sec-h:first-child { margin-top: 0; }
.sec-note { color: var(--sub); font-size: 14px; margin: 0 0 18px; font-family: "Hiragino Sans", "Noto Sans JP", sans-serif; }
::placeholder { color: #b8aaa5; }
@media (min-width: 640px) { .choices.cols { grid-template-columns: 1fr 1fr; } .choices.cols .choice.other { grid-column: 1 / -1; } }
.consent-box { font-size: 13px; color: var(--ink); background: #faf6f4; border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-bottom: 8px; line-height: 1.8; }
.field.invalid .consent-box { border-color: var(--err); }
.req.cond[hidden], .cond-opt[hidden] { display: none; }

.hero-img { display: block; width: 100%; height: auto; border-radius: 12px; margin: 0 0 20px; }
.gift-card { display: flex; gap: 16px; align-items: center; background: var(--accent-soft); border-radius: 12px; padding: 16px; margin: 16px 0; text-align: left; font-family: "Hiragino Sans", "Noto Sans JP", sans-serif; }
.gift-card .gc { flex: none; width: 132px; aspect-ratio: 1.586; border-radius: 10px; color: #fff; padding: 10px 12px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #232f3e 0%, #37475a 100%); box-shadow: 0 6px 14px rgba(0,0,0,.18); position: relative; overflow: hidden; }
.gift-card .gc::after { content: ""; position: absolute; right: -18px; top: -18px; width: 64px; height: 64px; border-radius: 50%; background: rgba(255,153,0,.9); }
.gift-card .gc b { font-size: 10px; white-space: nowrap; letter-spacing: .04em; position: relative; z-index: 1; }
.gift-card .gc span { font-size: 20px; font-weight: 700; letter-spacing: .02em; }
.gift-card p { margin: 0; font-size: 14px; line-height: 1.7; }
.gift-card p strong { font-size: 16px; }
@media (max-width: 420px) { .gift-card { flex-direction: column; text-align: center; } }
.site-link { display: inline-block; margin-top: 8px; font-size: 14px; font-family: "Hiragino Sans", sans-serif; }

.pat-sel { position: sticky; top: 0; z-index: 2; background: #fff; padding: 8px 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; border-bottom: 1px solid var(--line); }
.pat-count { font-weight: 700; color: var(--accent); font-size: 18px; }
.pat-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.pat-chip { position: relative; width: 40px; height: 40px; padding: 0; border: 2px solid var(--accent); border-radius: 6px; overflow: hidden; background: none; cursor: pointer; color: #fff; font-size: 14px; }
.pat-chip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pat-chip::after { content: "×"; position: absolute; right: 0; top: 0; width: 14px; height: 14px; line-height: 14px; font-size: 11px; background: rgba(0,0,0,.6); }
.pat-chip { font-size: 0; }
.flash { width: 100%; margin: 0; color: var(--err); font-size: 13px; }
.pat-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.pat-tab { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 14px; cursor: pointer; color: var(--ink); }
.pat-tab small { margin-left: 4px; color: var(--sub); font-size: 11px; }
.pat-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pat-tab.on small { color: #fff; }
.pat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; max-height: 560px; overflow-y: auto; padding: 2px; -webkit-overflow-scrolling: touch; }
@media (min-width: 700px) { .pat-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); } }
.pat-item { position: relative; display: flex; flex-direction: column; gap: 4px; border: 2px solid transparent; border-radius: 8px; padding: 3px; background: none; cursor: pointer; font: inherit; text-align: left; color: var(--ink); }
.pat-item[hidden] { display: none; }
.pat-item img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 5px; background: #f0e8e5; display: block; }
.pat-item span { font-size: 11px; line-height: 1.35; }
.pat-item.on { border-color: var(--accent); background: var(--accent-soft); }
.pat-item.on::before { content: attr(data-n); position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.pat-more { font-size: 12px; margin: 8px 0 0; }
.uploads .sec-h { margin-top: 8px; }
.gift-card .gc.coupon { background: linear-gradient(135deg, #1e7f7a 0%, #e0607e 100%); }
.gift-card .gc.coupon::after { background: rgba(255,255,255,.18); }
.gift-card .gc.coupon span { font-size: 24px; line-height: 1; }
.gift-card .gc.coupon span small { font-size: 14px; }
.gift-card .gc em { font-style: normal; font-size: 10px; opacity: .9; }
.gift-card .gc.coupon { width: 150px; }
.gift-card .gc.coupon span { white-space: nowrap; font-size: 26px; position: relative; z-index: 1; }
.gift-card .gc.coupon em { position: relative; z-index: 1; white-space: nowrap; }
