* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Hiragino Sans','Noto Sans JP',-apple-system,sans-serif; background:#fafafa; color:#1f2937; min-height:100vh; }
.container { max-width:520px; margin:0 auto; padding:16px; }
.header { text-align:center; padding:24px 0 16px; }
.logo { font-size:24px; font-weight:700; }
.subtitle { font-size:13px; color:#6b7280; margin-top:4px; }
.step { background:#fff; border-radius:16px; box-shadow:0 1px 4px rgba(0,0,0,0.06); margin-bottom:16px; overflow:hidden; }
.step.hidden { display:none; }
.step-header { padding:16px 20px 0; }
.step-indicator { display:flex; gap:8px; justify-content:center; }
.step-dot { width:10px; height:10px; border-radius:50%; background:#e5e7eb; transition:background 0.2s; }
.step-dot.active { background:#4f46e5; }
.step-dot.done { background:#10b981; }
.step-body { padding:20px; }
.step-desc { font-size:13px; color:#6b7280; margin-bottom:16px; line-height:1.6; }
.section-title { font-size:15px; font-weight:700; margin-bottom:12px; padding-bottom:6px; border-bottom:1px solid #f3f4f6; }
.label { display:block; font-size:12px; font-weight:600; color:#374151; margin:12px 0 4px; }
.required { color:#ef4444; }
.input { width:100%; padding:10px 12px; border:1px solid #d1d5db; border-radius:8px; font-size:16px; outline:none; transition:border-color 0.15s; }
.input:focus { border-color:#4f46e5; }
.input.error { border-color:#ef4444; }
.input.small { width:60px; text-align:center; }
.row { display:flex; align-items:center; gap:8px; }
.col { flex:1; }
.radio-group { display:flex; gap:16px; margin-top:4px; }
.radio { font-size:13px; display:flex; align-items:center; gap:4px; cursor:pointer; }
.input-suffix { display:flex; align-items:center; gap:6px; }
.input-suffix span { font-size:13px; color:#6b7280; }
.checkbox-label { font-size:12px; display:flex; align-items:center; gap:6px; margin:8px 0; cursor:pointer; }
.btn-primary { width:100%; padding:12px; background:#4f46e5; color:#fff; border:none; border-radius:10px; font-size:14px; font-weight:600; cursor:pointer; margin-top:16px; transition:background 0.15s; }
.btn-primary:hover { background:#4338ca; }
.btn-primary:disabled { background:#9ca3af; cursor:not-allowed; }
.btn-secondary { padding:8px 16px; background:#fff; color:#374151; border:1px solid #d1d5db; border-radius:8px; font-size:12px; cursor:pointer; white-space:nowrap; }
.btn-back { padding:10px 20px; background:none; color:#6b7280; border:1px solid #d1d5db; border-radius:10px; font-size:13px; cursor:pointer; }
.btn-row { display:flex; justify-content:space-between; align-items:center; margin-top:20px; gap:12px; }
.btn-row .btn-primary { width:auto; flex:1; margin-top:0; }
.btn-link { background:none; border:none; color:#4f46e5; font-size:12px; cursor:pointer; text-decoration:underline; padding:4px 0; }
.error-msg { color:#ef4444; font-size:12px; margin:6px 0; min-height:16px; }

/* コード入力 */
.code-inputs { display:flex; gap:8px; justify-content:center; margin:16px 0; }
.code-input { width:44px; height:52px; text-align:center; font-size:22px; font-weight:700; border:2px solid #d1d5db; border-radius:10px; outline:none; }
.code-input:focus { border-color:#4f46e5; }

/* 犬種 */
.breed-select { position:relative; }
.breed-dropdown { position:absolute; top:100%; left:0; right:0; max-height:200px; overflow-y:auto; background:#fff; border:1px solid #d1d5db; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,0.1); z-index:10; }
.breed-dropdown.hidden { display:none; }
.breed-option { padding:8px 12px; font-size:13px; cursor:pointer; }
.breed-option:hover { background:#f3f4f6; }
select.input { appearance:auto; }

/* ============ Step3: 商品選択 2x2グリッド ============ */
.product-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:16px 0; }
.product-tile { border:2px solid #e5e7eb; border-radius:14px; overflow:hidden; cursor:pointer; transition:all 0.2s; position:relative; }
.product-tile:hover { border-color:#a5b4fc; }
.product-tile.selected { border-color:#4f46e5; box-shadow:0 0 0 3px rgba(79,70,229,0.15); }
.product-tile.disabled { opacity:0.35; pointer-events:none; }
.product-tile-img { width:100%; aspect-ratio:1; object-fit:cover; display:block; }
.product-tile-name { padding:8px; text-align:center; font-size:13px; font-weight:600; background:#fff; }
.product-tile-check { position:absolute; top:8px; right:8px; width:26px; height:26px; border-radius:50%; background:#4f46e5; color:#fff; font-size:15px; display:flex; align-items:center; justify-content:center; }

/* ============ バリエーション選択 ============ */
/* 画像ギャラリー（メイン+サムネイル） */
.gallery { margin-bottom:16px; }
.gallery-main-wrap { position:relative; overflow:hidden; border-radius:12px; touch-action:pan-y; }
.gallery-main { width:100%; aspect-ratio:1; object-fit:cover; display:block; }
.gallery-thumbs { display:flex; gap:6px; margin-top:8px; overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none; padding:2px 0; }
.gallery-thumbs::-webkit-scrollbar { display:none; }
.gallery-thumb { width:56px; height:56px; object-fit:cover; border-radius:6px; border:2px solid transparent; cursor:pointer; flex-shrink:0; opacity:0.6; transition:all 0.15s; }
.gallery-thumb:hover { opacity:0.9; }
.gallery-thumb.active { border-color:#4f46e5; opacity:1; }

/* バリエーション選択（プルダウン + 画像 左右配置） */
.variant-row { display:flex; gap:16px; align-items:flex-start; }
.variant-selects { flex:1; min-width:0; }
.variant-images { width:200px; flex-shrink:0; display:flex; flex-direction:column; gap:8px; align-items:center; justify-content:center; align-self:center; }
.var-img { width:190px; height:190px; object-fit:cover; border-radius:12px; border:1px solid #e5e7eb; }
.var-img-placeholder { width:190px; height:190px; display:flex; align-items:center; justify-content:center; background:#f9fafb; border-radius:12px; border:1px dashed #d1d5db; font-size:10px; color:#9ca3af; text-align:center; padding:12px; }

.select-group { margin-bottom:10px; }
.select-group label { display:block; font-size:12px; font-weight:600; color:#374151; margin-bottom:3px; }
.var-select { width:100%; padding:10px 12px; border:1px solid #d1d5db; border-radius:8px; font-size:16px; background:#fff; appearance:auto; }

/* マルチセレクト（パーツ/アイテム選択用） */
.multi-select { width:100%; padding:10px 12px; border:1px solid #d1d5db; border-radius:8px; font-size:14px; background:#fff; cursor:pointer; display:flex; justify-content:space-between; align-items:center; }
.multi-select .arrow { font-size:10px; color:#9ca3af; }
.multi-dropdown { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #d1d5db; border-radius:8px; box-shadow:0 4px 12px rgba(0,0,0,0.1); z-index:10; padding:6px 0; }
.multi-dropdown.hidden { display:none; }
.dd-option { display:flex; align-items:center; gap:8px; padding:8px 12px; font-size:14px; cursor:pointer; }
.dd-option:hover { background:#f3f4f6; }
.dd-option input[type="checkbox"] { width:18px; height:18px; accent-color:#4f46e5; }
.select-group { position:relative; }

@media (max-width:400px) { .variant-row { flex-direction:column; } .variant-images { width:100%; align-self:auto; } .var-img,.var-img-placeholder { width:160px; height:160px; } }

/* 犬カード */
.dog-card { background:#f9fafb; border-radius:12px; padding:16px; margin-bottom:12px; border:1px solid #e5e7eb; }
.dog-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.btn-remove { background:none; border:none; color:#ef4444; font-size:12px; cursor:pointer; }
.btn-add { width:100%; padding:10px; background:#fff; border:1px dashed #d1d5db; border-radius:10px; font-size:13px; color:#6b7280; cursor:pointer; margin:8px 0 16px; }
.btn-add:hover { background:#f9fafb; border-color:#9ca3af; }

/* 確認画面のバリエーション画像 */
.confirm-var-img { width:80px; height:80px; object-fit:cover; border-radius:8px; border:1px solid #e5e7eb; vertical-align:middle; margin-right:8px; }

/* 確認 */
.confirm-section { margin-bottom:16px; }
.confirm-section h3 { font-size:13px; font-weight:600; margin-bottom:6px; padding-bottom:4px; border-bottom:1px solid #f3f4f6; }
.confirm-row { font-size:13px; padding:3px 0; color:#374151; }
.confirm-item { background:#f9fafb; border-radius:8px; padding:8px 12px; margin:4px 0; font-size:12px; }

/* 完了 */
.post-info { background:#f0fdf4; border-radius:12px; padding:16px; margin-top:20px; text-align:left; }
.post-info p { font-size:13px; color:#374151; margin-bottom:8px; }
.post-tag { font-size:14px; padding:6px 0; }

/* 規約 */
.terms-row { margin:16px 0; padding:12px; background:#f9fafb; border-radius:8px; }
.terms-row a { color:#4f46e5; }
.modal-overlay { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.4); display:flex; align-items:center; justify-content:center; z-index:100; }
.modal-overlay.hidden { display:none; }
.modal { background:#fff; border-radius:16px; width:90%; max-width:480px; max-height:80vh; display:flex; flex-direction:column; }
.modal-header { display:flex; justify-content:space-between; align-items:center; padding:16px 20px; border-bottom:1px solid #e5e7eb; }
.modal-header h3 { font-size:15px; }
.modal-close { background:none; border:none; font-size:24px; color:#9ca3af; cursor:pointer; }
.modal-body { padding:20px; overflow-y:auto; font-size:13px; line-height:1.8; }
.modal-body h4 { margin:16px 0 6px; font-size:13px; }
.modal-body ol { padding-left:20px; }
.modal-footer { padding:12px 20px; border-top:1px solid #e5e7eb; text-align:right; }

@media (max-width:360px) { .color-options { grid-template-columns:repeat(3,1fr); } }
