/* find SPA — Figmaモック「UI v3」準拠のデザイントークン
   白地 / ピンクグラデCTA / EC別CTA / フルブリードカード+黒スクリム / 浮遊✕↺♥ / 下タブ3つ */
:root {
  --pink: #ff5c93;
  --pink-soft: #ff8fb5;
  --pink-bg: #fdf0f5;
  --pink-grad: linear-gradient(135deg, #ff8fb5, #ff5c93);
  --rakuten: #bf0000;
  --yahoo: #ff0033;
  --ink: #16161a;
  --sub: #8a8a93;
  --line: #eeeaee;
  --like: #34c77b;
  --nope: #ff5f4d;
  --radius: 20px;
  --tabbar-h: 62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP", sans-serif;
  background: #f6f2f4;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

.view { display: none; min-height: 100dvh; }
body[data-view="loading"] #view-loading,
body[data-view="auth"] #view-auth,
body[data-view="onboarding"] #view-onboarding,
body[data-view="v4"] #view-v4,
body[data-view="main"] #view-main { display: block; }

/* 画面はスマホ幅に固定（PCでは中央にアプリ枠） */
#view-auth, #view-onboarding, #view-v4, #view-main, .boot {
  max-width: 430px;
  margin: 0 auto;
  background: #fff;
  min-height: 100dvh;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.06);
}

.logo { font-weight: 800; letter-spacing: -0.02em; font-size: 22px; color: var(--ink); }
.logo .dot { color: var(--pink); font-size: 12px; vertical-align: 4px; margin-left: 1px; }
.logo-lg { font-size: 40px; }
.boot { display: grid; place-items: center; }

/* ---------- 認証 ---------- */
.auth { padding: 96px 28px 24px; display: flex; flex-direction: column; }
.tagline { color: var(--sub); font-size: 13px; margin: 10px 0 40px; }
.auth-tabs { display: flex; background: #f4eef1; border-radius: 12px; padding: 4px; margin-bottom: 24px; }
.auth-tab {
  flex: 1; border: 0; background: transparent; padding: 10px 0; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--sub); cursor: pointer;
}
.auth-tab.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.auth-tabs { flex-wrap: wrap; }
.auth-tab-wide { flex-basis: 100%; margin-top: 4px; }
.auth-tab-wide[hidden] { display: none; }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; font-weight: 600; color: var(--sub); margin-bottom: 6px; }
.field small { font-weight: 400; margin-left: 4px; }
.field input {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font-size: 16px; background: #fff; color: var(--ink); outline: none;
}
.field input:focus { border-color: var(--pink-soft); }
.form-error { color: #d43c3c; font-size: 13px; margin: 4px 0 8px; }
.cta {
  width: 100%; border: 0; cursor: pointer; margin-top: 8px;
  background: var(--pink-grad); color: #fff; font-size: 16px; font-weight: 700;
  padding: 16px 0; border-radius: 999px; box-shadow: 0 6px 18px rgba(255,92,147,.35);
  transition: transform .12s, opacity .12s;
}
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .4; box-shadow: none; cursor: default; }
.cta-sm { width: auto; padding: 12px 28px; font-size: 14px; }
.provider-button { border-radius: 14px; }
.provider-button.provider-rakuten { background: var(--rakuten); box-shadow: 0 6px 18px rgba(191,0,0,.28); }
.provider-button.provider-yahoo { background: var(--yahoo); box-shadow: 0 6px 18px rgba(255,0,51,.25); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 12px; color: #b9b3b8; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.google-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14px; font-weight: 600; padding: 13px 0; border-radius: 999px; cursor: pointer;
  transition: background .12s;
}
.google-btn:active { background: #f6f2f4; }
.auth-note { font-size: 11px; color: var(--sub); margin-top: 18px; line-height: 1.7; text-align: center; }
.auth-note a { color: var(--sub); }
.legal-foot {
  position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  font-size: 10px; color: #b9b3b8;
}
.legal-foot a { color: #b9b3b8; }

/* ---------- オンボーディング ---------- */
.onb { padding: 40px 28px 40px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.onb-step { display: flex; flex-direction: column; align-items: center; width: 100%; }
.onb-step[hidden] { display: none; }
.onb-progress { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 22px; }
.onb-progress-bar { flex: 1; height: 5px; background: #f3eef1; border-radius: 99px; overflow: hidden; }
#onb-progress-fill { height: 100%; width: 33%; background: var(--pink-grad); border-radius: 99px; transition: width .3s; }
#onb-step-label { font-size: 12px; font-weight: 700; color: var(--sub); }
.onb-label { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--sub); margin: 18px 0 8px; }
.onb-note { font-size: 11px; color: var(--pink); margin-top: 10px; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.chip-group-center { justify-content: center; margin-top: 8px; }
.chip-opt {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer;
  font-size: 13px; font-weight: 600; padding: 10px 16px; border-radius: 999px;
}
.chip-opt.on { border-color: var(--pink); background: var(--pink-bg); color: var(--pink); }
.onb-chip {
  margin-top: 20px; background: var(--pink-bg); color: var(--pink);
  font-size: 12px; font-weight: 600; padding: 6px 14px; border-radius: 999px;
}
.onb-title { font-size: 26px; line-height: 1.4; margin-top: 18px; letter-spacing: .01em; }
.onb-sub { color: var(--sub); font-size: 13px; line-height: 1.8; margin: 12px 0 24px; }
.onb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
.onb-item {
  display: flex; align-items: center; gap: 8px; padding: 13px 14px; cursor: pointer;
  border: 1.5px solid var(--line); border-radius: 14px; background: #fff;
  font-size: 13px; font-weight: 600; color: var(--ink); text-align: left;
}
.onb-item .swatch { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.onb-item.on { border-color: var(--pink); background: var(--pink-bg); color: var(--pink); }
.onb .cta { margin-top: 24px; }
.link-btn { border: 0; background: none; color: var(--sub); font-size: 13px; margin-top: 16px; cursor: pointer; text-decoration: underline; }

/* ---------- メイン ---------- */
.app-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 8px;
}
.pr-badge {
  font-size: 10px; color: var(--sub); border: 1px solid var(--line);
  padding: 3px 8px; border-radius: 999px; background: #fff;
}
.tab-panel { padding-bottom: calc(var(--tabbar-h) + 12px); }

/* スワイプ */
.deck {
  position: relative; margin: 4px 8px 0; height: min(66dvh, 620px);
  touch-action: none;
}
.card {
  position: absolute; inset: 0; border-radius: var(--radius); overflow: hidden;
  background: #eee; box-shadow: 0 10px 30px rgba(0,0,0,.12);
  will-change: transform; user-select: none;
}
.card img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.card.image-missing::before, .sheet-img.image-missing::before, .fimg.image-missing::before {
  content: "画像を表示できません";
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--sub); background: #f3eef1; font-size: 12px;
}
.card.image-missing::before { color: #fff; background: #b9b3b8; }
.card .scrim {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.62) 0%, rgba(0,0,0,.18) 30%, transparent 55%);
  pointer-events: none;
}
.card.behind { transform: scale(.955) translateY(12px); filter: brightness(.97); }
.card.flying { transition: transform .32s ease-in, opacity .32s; opacity: 0; }
.card.spring { transition: transform .26s cubic-bezier(.2,.9,.3,1.3); }
.stamp {
  position: absolute; top: 24px; font-size: 30px; font-weight: 800; letter-spacing: .06em;
  padding: 4px 16px; border: 4px solid; border-radius: 10px; opacity: 0;
  pointer-events: none; background: rgba(255,255,255,.12); backdrop-filter: blur(1px);
}
.stamp-like { left: 18px; color: var(--like); border-color: var(--like); transform: rotate(-14deg); }
.stamp-nope { right: 18px; color: var(--nope); border-color: var(--nope); transform: rotate(14deg); }
.explore-badge {
  position: absolute; top: 18px; right: 16px; font-size: 11px; font-weight: 600;
  color: #fff; background: rgba(0,0,0,.4); padding: 4px 10px; border-radius: 999px;
  backdrop-filter: blur(2px); pointer-events: none;
}
.card .info { position: absolute; left: 16px; right: 16px; bottom: 14px; color: #fff; pointer-events: none; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag {
  font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.22); color: #fff; backdrop-filter: blur(2px);
}
.card .price-row { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.card .price { font-size: 26px; font-weight: 800; }
.card .price-time { font-size: 10px; color: rgba(255,255,255,.75); }
.card .shop-row { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; }
.card .shop { font-size: 12px; color: rgba(255,255,255,.85); }
.provider-badge { font-size: 10px; font-weight: 700; color: #fff; padding: 3px 8px; border-radius: 4px; }
.provider-badge.provider-rakuten { background: var(--rakuten); }
.provider-badge.provider-yahoo { background: var(--yahoo); }
.deck-empty { text-align: center; padding: 90px 30px 40px; color: var(--sub); font-size: 14px; }
.deck-empty-emoji { font-size: 44px; margin-bottom: 12px; }
.deck-empty .cta { margin-top: 18px; }

.swipe-actions {
  display: flex; justify-content: center; align-items: center; gap: 22px;
  margin-top: 14px;
}
.fab {
  border: 0; cursor: pointer; border-radius: 50%; background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.14); display: grid; place-items: center;
  transition: transform .12s;
}
.fab:active { transform: scale(.9); }
.fab-nope { width: 56px; height: 56px; color: var(--nope); font-size: 24px; font-weight: 700; }
.fab-undo { width: 44px; height: 44px; color: #b9a83c; font-size: 20px; }
.fab-like { width: 64px; height: 64px; background: var(--pink-grad); color: #fff; font-size: 26px; box-shadow: 0 6px 20px rgba(255,92,147,.45); }
.legal-line { text-align: center; font-size: 10px; color: #b9b3b8; margin-top: 12px; }
.legal-line a { color: #b9b3b8; }

/* お気に入り */
.fav-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 20px 0; }
.fav-head h2 { font-size: 20px; }
.fav-note { font-size: 11px; color: var(--sub); padding: 6px 20px 14px; }
.fav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 0 16px; }
.fav-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.fav-card .fimg { position: relative; aspect-ratio: 11/10; background: #f3eef1; }
.fav-card .fimg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-card .fbody { padding: 10px; }
.fav-card .ftag { font-size: 10px; color: var(--pink); font-weight: 600; }
.fav-card .fprice { font-size: 15px; font-weight: 800; margin: 3px 0 8px; }
.fav-btn {
  width: 100%; border: 0; background: var(--rakuten); color: #fff; font-size: 12px; font-weight: 700;
  padding: 8px 0; border-radius: 8px; cursor: pointer;
}
.fav-btn.provider-yahoo { background: var(--yahoo); }

/* 設定 */
.set-title { font-size: 20px; padding: 8px 20px 14px; }
.set-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; margin: 0 16px 14px; padding: 16px; }
.set-label { font-size: 11px; font-weight: 700; color: var(--sub); margin-bottom: 8px; }
.set-email { font-size: 14px; font-weight: 600; margin-bottom: 12px; word-break: break-all; }
.guest-note { margin-bottom: 12px; }
.ghost-btn {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 999px; cursor: pointer;
}
.taste-bars .bar-row { display: flex; align-items: center; gap: 8px; margin: 7px 0; font-size: 12px; }
.taste-bars .bar-label { width: 130px; color: var(--ink); font-weight: 600; }
.taste-bars .bar-wrap { flex: 1; background: #f3eef1; border-radius: 6px; height: 8px; overflow: hidden; }
.taste-bars .bar { height: 100%; border-radius: 6px; transition: width .4s; }
.taste-bars .bar-pct { width: 38px; text-align: right; color: var(--sub); font-variant-numeric: tabular-nums; }
.set-links { list-style: none; }
.set-links li { border-bottom: 1px solid var(--line); }
.set-links li:last-child { border-bottom: 0; }
.set-links a { display: block; padding: 10px 2px; font-size: 13px; color: var(--ink); text-decoration: none; }
.muted { color: var(--sub); font-size: 12px; line-height: 1.7; }

/* タブバー */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; height: var(--tabbar-h);
  background: rgba(255,255,255,.94); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar-btn {
  border: 0; background: none; cursor: pointer; font-size: 10px; color: var(--sub);
  display: flex; flex-direction: column; align-items: center; gap: 3px; font-weight: 600;
  min-width: 72px;
}
.tabbar-btn .tabbar-icon { font-size: 19px; line-height: 1; filter: grayscale(1) opacity(.55); }
.tabbar-btn.active { color: var(--pink); }
.tabbar-btn.active .tabbar-icon { filter: none; }

/* 詳細シート */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(20,16,20,.5); }
.sheet {
  position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px; max-height: 86dvh; overflow-y: auto;
  background: #fff; border-radius: 22px 22px 0 0;
  animation: sheet-up .28s cubic-bezier(.2,.9,.3,1);
}
@keyframes sheet-up { from { transform: translate(-50%, 40%); opacity: .6; } to { transform: translate(-50%, 0); opacity: 1; } }
.sheet-close {
  position: absolute; top: 14px; left: 14px; z-index: 2; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink);
  font-size: 17px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.sheet-img { position: relative; aspect-ratio: 39/32; background: #f3eef1; }
.sheet-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-body { padding: 18px 20px calc(24px + env(safe-area-inset-bottom)); }
.pr-label { font-size: 10px; color: var(--sub); margin-bottom: 6px; }
.sheet-body h3 { font-size: 16px; line-height: 1.5; }
.sheet-price { margin: 10px 0 2px; display: flex; align-items: baseline; gap: 8px; }
.sheet-price span { font-size: 26px; font-weight: 800; }
.sheet-price small { font-size: 11px; color: var(--sub); }
.sheet-shop { font-size: 13px; color: var(--sub); margin-bottom: 10px; }
.sheet .tags { margin-bottom: 18px; }
.sheet .tag { background: var(--pink-bg); color: var(--pink); }
.sheet-disclosure { font-size: 10px; color: #b9b3b8; text-align: center; margin-top: 10px; line-height: 1.6; }

/* トースト */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 24px); transform: translateX(-50%);
  background: rgba(22,22,26,.92); color: #fff; font-size: 13px; padding: 10px 18px;
  border-radius: 999px; z-index: 60; max-width: 88vw; text-align: center;
}
#set-profile { white-space: pre-line; }

/* ---------- オンボーディング v4（要件定義31 C-0〜C-7・Figma「find UIデザイン v3」18:2） ----------
   このブロックは #view-v4 の中だけに効かせる。ONBOARDING_V4=off では描画されない＝旧画面は無傷。 */
#view-v4 {
  --v4-ink: #1a1a1a;
  --v4-gray: #8a8a8a;
  --v4-pink: #ff6b95;
  --v4-pink-bg: #ffe9f1;
  --v4-chip-line: #f1e6ea;
  --v4-track: #f6e5ec;
}
.v4 { padding: 20px 22px calc(32px + env(safe-area-inset-bottom)); color: var(--v4-ink); }
.v4-screen { display: flex; flex-direction: column; }
.v4-screen[hidden] { display: none; }
.v4-center { align-items: center; text-align: center; padding-top: 56px; }

/* 進捗ヘッダ（C-1〜C-6） */
.v4-head { display: flex; align-items: center; gap: 12px; padding: 6px 0 22px; }
.v4-head[hidden] { display: none; }
.v4-back {
  border: 0; background: none; cursor: pointer; padding: 4px 2px;
  font-size: 14px; font-weight: 600; color: var(--v4-gray);
}
.v4-progress { flex: 1; height: 6px; background: var(--v4-track); border-radius: 99px; overflow: hidden; }
#v4-progress-fill {
  height: 100%; width: 16.7%; border-radius: 99px;
  background: linear-gradient(90deg, #ff6b95, #ff9fc0); transition: width .3s;
}
#v4-step-label { font-size: 12px; font-weight: 700; color: var(--v4-gray); font-variant-numeric: tabular-nums; }

/* 見出し・理由・注記 */
.v4-q { font-size: 28px; font-weight: 900; line-height: 1.35; letter-spacing: .01em; }
.v4-why { font-size: 13px; font-weight: 400; color: var(--v4-gray); line-height: 1.8; margin: 12px 0 22px; }
.v4-hero { font-size: 28px; font-weight: 900; line-height: 1.4; margin-top: 20px; }
.v4-lede { font-size: 14px; color: var(--v4-gray); line-height: 1.9; margin: 14px 0 8px; }
.v4-note { font-size: 11px; color: var(--v4-gray); line-height: 1.7; margin-top: 12px; text-align: center; }
.v4-minor { font-size: 12px; color: var(--v4-pink); margin-top: 14px; }
.v4-label { font-size: 13px; font-weight: 700; color: var(--v4-gray); margin: 26px 0 10px; }
.v4-pill {
  margin-top: 14px; background: var(--v4-pink-bg); color: var(--v4-pink);
  font-size: 12px; font-weight: 700; padding: 7px 16px; border-radius: 999px;
}
.v4-badge {
  align-self: flex-start; background: var(--v4-pink-bg); color: var(--v4-pink);
  font-size: 12px; font-weight: 700; padding: 7px 14px; border-radius: 999px; margin-top: 32px;
}

/* 主CTA（ピル・グラデ・白Bold 17px） */
#view-v4 .cta {
  background: linear-gradient(135deg, #ff6b95, #ff9fc0);
  color: #fff; font-size: 17px; font-weight: 700; border-radius: 999px;
  padding: 17px 0; margin-top: 26px; box-shadow: 0 6px 18px rgba(255,107,149,.35);
}
#view-v4 .cta-sm { padding: 12px 28px; font-size: 15px; }
#view-v4 .link-btn { margin-top: 18px; align-self: center; }
#view-v4 .google-btn { margin-top: 26px; }

/* 選択肢カード（C-1〜C-3・タップで即次へ） */
.v4-cards { display: flex; flex-direction: column; gap: 10px; }
.v4-opt {
  display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; text-align: left;
  padding: 18px; border: 1.5px solid var(--v4-chip-line); border-radius: 16px; background: #fff;
  font-size: 16px; font-weight: 700; color: var(--v4-ink);
  transition: border-color .12s, background .12s, transform .12s;
}
.v4-opt:active { transform: scale(.99); }
.v4-opt.on { border-color: var(--v4-pink); background: var(--v4-pink-bg); color: var(--v4-pink); }
.v4-opt .v4-emoji { font-size: 22px; line-height: 1; }
.v4-opt.v4-opt-quiet { color: var(--v4-gray); font-weight: 600; font-size: 15px; }

/* C-4 写真グリッド（2列×8） */
.v4-looks { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v4-look {
  position: relative; padding: 0; border: 0; background: #f3eef1; cursor: pointer;
  border-radius: 14px; overflow: hidden; aspect-ratio: 3/4;
  outline: 2.5px solid transparent; outline-offset: -2.5px;
}
.v4-look img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v4-look.on { outline-color: var(--v4-pink); }
.v4-look.image-missing::before {
  content: "画像を準備中"; position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--v4-gray); font-size: 12px;
}
.v4-look-no {
  position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px;
  display: none; place-items: center; border-radius: 999px;
  background: var(--v4-pink); color: #fff; font-size: 12px; font-weight: 700;
}
.v4-look.on .v4-look-no { display: grid; }
.v4-count { text-align: center; font-size: 13px; font-weight: 700; color: var(--v4-gray); margin-top: 16px; }

/* 広告（PR）表記は本文と同じ行に置く（カードだけだと出典が読み取れない） */
.v4-swipe-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.v4-swipe-meta .v4-why, .v4-swipe-meta .v4-sub { margin-bottom: 0; }
.v4-swipe-meta .pr-badge { flex: none; align-self: center; }
#view-v4 .legal-line { margin-top: 18px; }

/* C-5 スワイプ */
.deck-v4 { margin: 4px 0 0; height: min(52dvh, 460px); }
.v4-hint { text-align: center; font-size: 12px; color: var(--v4-gray); margin-top: 14px; }
#view-v4 .swipe-actions { gap: 28px; margin-top: 12px; }
#v4-deck-done { padding: 60px 20px 20px; }

/* C-6 結果 */
.v4-card {
  border: 1px solid var(--v4-chip-line); border-radius: 20px; background: #fff;
  padding: 22px 18px; text-align: center; box-shadow: 0 6px 22px rgba(0,0,0,.05);
}
.v4-avatar {
  width: 92px; height: 92px; margin: 0 auto 14px; border-radius: 50%; overflow: hidden;
  background: var(--v4-pink-bg); display: grid; place-items: center;
}
.v4-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v4-style-name { font-size: 22px; font-weight: 900; }
.v4-style-catch { font-size: 13px; color: var(--v4-gray); line-height: 1.8; margin: 8px 0 18px; }
.v4-card .taste-bars { text-align: left; }
.v4-card .taste-bars .bar-label { width: 120px; font-size: 12px; }
.v4-sub { font-size: 15px; font-weight: 800; margin: 28px 0 12px; }
.v4-swipe-meta .v4-sub { margin: 28px 0 12px; }
.v4-items { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.v4-item { border: 1px solid var(--v4-chip-line); border-radius: 12px; overflow: hidden; background: #fff; }
.v4-item .v4-item-img { position: relative; aspect-ratio: 3/4; background: #f3eef1; }
.v4-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.v4-item .v4-item-price { font-size: 12px; font-weight: 800; padding: 6px 6px 8px; text-align: center; }

/* C-7 登録フォーム */
.v4-form { width: 100%; margin-top: 18px; }
.v4-form[hidden] { display: none; }
#view-v4 .chip-group-center { margin-top: 0; }
#view-v4 .chip-opt { border-color: var(--v4-chip-line); }
#view-v4 .chip-opt.on { border-color: var(--v4-pink); background: var(--v4-pink-bg); color: var(--v4-pink); }
#view-v4 .auth-note { margin-top: 26px; }

/* ---------- v4 差し戻し2周目（B7〜B12） ---------- */

/* B11: ボタンの無い画面（C-1〜C-3）に操作の説明を出す */
.v4-tap-hint { text-align: center; font-size: 12px; color: var(--v4-gray); margin-top: 14px; }

/* B7: 未成年の注意は「次の画面の上部」に置く（即遷移と両立させる） */
#v4-budget .v4-minor { margin: 0 0 14px; }

/* B10: C-0 のヒーロー（重ねた3枚のカード＋👗・Figma 18:3） */
.v4-hero-art { position: relative; width: 100%; height: 260px; margin: 26px 0 6px; }
.v4-hero-card {
  position: absolute; left: 50%; top: 50%; width: 150px; height: 200px;
  margin: -100px 0 0 -75px; border-radius: 18px; display: grid; place-items: center;
  font-size: 56px; box-shadow: 0 10px 30px rgba(0,0,0,.10);
}
.v4-hero-card-a { background: #f5f5f5; transform: rotate(-11deg) translateX(-34px); }
.v4-hero-card-b { background: var(--v4-chip-line); transform: rotate(9deg) translateX(34px); }
.v4-hero-card-c { background: var(--v4-pink-bg); }

/* B8: C-4 は写真だけスクロールし、カウンタとCTAは画面下に貼り付ける */
.v4-looks-foot {
  position: sticky; bottom: 0; z-index: 2; display: flex; flex-direction: column;
  padding: 14px 0 calc(8px + env(safe-area-inset-bottom));
  background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 22px);
}
.v4-looks-foot .v4-count { margin-top: 0; }
#view-v4 .v4-looks-foot .cta { margin-top: 10px; }
#view-v4 .v4-looks-foot .link-btn { margin-top: 10px; }
/* 無効なCTAは「押せない」と分かる灰色にする（白抜き40%は読みにくい） */
#view-v4 .cta:disabled { background: #f1e6ea; color: #b9a7ae; opacity: 1; }

/* B2: スワイプの保存失敗をその場に出す */
.v4-swipe-error { text-align: center; margin: 12px 0 0; }
.v4-swipe-retry { align-self: center; }
#view-v4 .v4-swipe-retry { margin-top: 12px; }
#v4-budget-retry { margin-top: 14px; }

/* B9: v4 はタブバーが無いので、トーストを本文に食い込ませない */
body[data-view="v4"] #toast { bottom: calc(24px + env(safe-area-inset-bottom)); }

/* B12: 結果の%バーは順位を濃さで表す（系統色を持ち込まない） */
.v4-card .taste-bars .bar-label { color: var(--v4-ink); }
.v4-card .taste-bars .bar-pct { color: var(--v4-gray); }
.v4-card .taste-bars .bar-wrap { background: var(--v4-track); }

/* B12: C-7 は全体を中央寄せに揃える（左右の混在をやめる） */
#v4-register { align-items: center; text-align: center; }
#v4-register .v4-badge { align-self: center; }
#v4-register .v4-label { align-self: center; }
#v4-register .v4-form { text-align: left; }
#view-v4 #v4-source .chip-opt { padding: 10px 12px; font-size: 12px; }
