/* 結び桜 LP｜musubizakura_visual_design.md のトークン・寸法に基づく */
:root {
  --bg: #FAF4F4;
  --bg-alt: #F4E9EB;
  --card: #FFFFFF;
  --ink: #302C2A;
  --muted: #665E59;
  --accent: #873D4C;
  --accent-hover: #71313E;
  --selected: #FAEFF1;
  --rule: #DDD5CC;
  --control: #8B8178;
  --focus: #1755A6;
  --warn-ink: #8A2923;  --warn-bg: #FFF1EF;
  --info-ink: #664A19;  --info-bg: #FFF5DF;
  --ph: #EEE8E1;
  --header-h: 72px;
  --gutter: 24px;
  --sec-y: 96px;
  --sec-head-b: 40px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px; line-height: 1.8; -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4, .logo { font-family: "Shippori Mincho", "Hiragino Mincho ProN", serif; font-weight: 600; margin: 0; }
h1 { font-size: 44px; line-height: 1.5; font-weight: 700; }
h2 { font-size: 30px; line-height: 1.5; }
h3 { font-size: 22px; line-height: 1.5; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.wrap { max-width: calc(1080px + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }
.small { font-size: 13px; line-height: 1.65; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; height: var(--header-h); background: var(--bg); border-bottom: 1px solid var(--rule); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.logo { font-size: 24px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); letter-spacing: .08em; white-space: nowrap; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 14px; }
.nav a:not(.btn) { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; white-space: nowrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  background: var(--accent); color: #fff; border: 1.5px solid var(--accent); border-radius: 6px;
  font: inherit; font-weight: 700; font-size: 15px; line-height: 1.4; text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .15s, color .15s;
}
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 14px; }
.btn-lg { min-height: 56px; width: 360px; max-width: 100%; font-size: 16px; }
.btn-outline { background: transparent; color: var(--accent); }
.btn[aria-disabled="true"] { background: var(--ph); border-color: var(--control); color: var(--muted); cursor: not-allowed; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; min-height: 44px; padding: 0 12px; }
@media (hover: hover) {
  .btn:not(.btn-outline):not([aria-disabled="true"]):hover { background: var(--accent-hover); border-color: var(--accent-hover); }
  .btn-outline:not([aria-disabled="true"]):hover { background: var(--selected); }
  .link-btn:hover { color: var(--ink); }
}

/* ---------- photo placeholder ---------- */
.ph { margin: 0; display: grid; place-items: center; text-align: center; background: var(--ph); color: var(--muted); font-size: 13px; line-height: 1.5; border-radius: 4px; overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- hero ---------- */
.hero { padding: 72px 0; position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 440px minmax(0, 592px); gap: 48px; align-items: center; }
.eyebrow { margin: 0 0 12px; color: var(--muted); letter-spacing: .16em; font-size: 12px; line-height: 1.65; }
.lead { margin: 20px 0 28px; }
.lead span { display: block; }
.hero-photos { display: grid; grid-template-columns: minmax(0, 336px) minmax(0, 240px); grid-template-rows: 216px 216px; gap: 16px; }
.hero-photos .main { grid-row: 1 / 3; grid-column: 1; }
.hero-photos .sub1 { grid-column: 2; grid-row: 1; }
.hero-photos .sub2 { grid-column: 2; grid-row: 2; }
.hero-photos .main { aspect-ratio: 336 / 448; height: auto; width: 100%; }
.ai-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.ai-note span { display: block; word-break: auto-phrase; text-wrap: pretty; }

/* ---------- sections ---------- */
.section { padding: var(--sec-y) 0; }
.section.alt { background: var(--bg-alt); }
.section.white { background: var(--card); }
.section.ruled { border-top: 1px solid var(--rule); }
.sec-head { text-align: center; margin-bottom: var(--sec-head-b); }
.sec-head p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

/* ---------- search ---------- */
.group { border: 0; padding: 0; margin: 0 0 40px; min-width: 0; }
.group legend { font-family: "Shippori Mincho", serif; font-weight: 600; font-size: 18px; line-height: 1.5; padding: 0; margin-bottom: 16px; }
.cards { display: grid; gap: 16px; }
.cards-mood { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards-color { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }

.card {
  position: relative; display: flex; flex-direction: column; padding: 0; margin: 0;
  background: var(--card); color: var(--ink); font: inherit; text-align: center; cursor: pointer;
  border: 2px solid transparent; border-radius: 6px; overflow: hidden;
}
/* 枠線は重ね描きにして、選択で太さが変わってもレイアウトが動かない */
.card::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--control); border-radius: 4px; pointer-events: none; z-index: 2; transition: border-color .15s; }
.card .thumb { aspect-ratio: 3 / 4; display: grid; place-items: center; background: var(--ph); color: var(--muted); font-size: 13px; line-height: 1.5; text-align: center; }
.cards-color .card .thumb { aspect-ratio: 1 / 1; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .lab { display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--card); padding: 12px 8px; min-height: 56px; gap: 0; }
.cards-color .card .lab { min-height: 48px; padding: 8px 4px; }
.card .name { font-size: 14px; font-weight: 500; line-height: 1.45; }
.card .state { font-size: 13px; line-height: 18px; height: 18px; font-weight: 700; color: var(--accent); visibility: hidden; }
.card .check { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: none; place-items: center; font-size: 16px; line-height: 1; font-weight: 700; z-index: 3; }
.card[aria-pressed="true"]::before { border: 2px solid var(--accent); }
.card[aria-pressed="true"] .lab { background: var(--selected); }
.card[aria-pressed="true"] .name { font-weight: 700; }
.card[aria-pressed="true"] .state { visibility: visible; }
.card[aria-pressed="true"] .check { display: grid; }
@media (hover: hover) { .card:hover::before { border-color: var(--ink); } .card[aria-pressed="true"]:hover::before { border-color: var(--accent); } }

.msg { margin: 24px auto 0; min-height: 24px; max-width: 560px; font-size: 14px; line-height: 1.65; text-align: center; }
.msg.warn, .msg.info { padding: 10px 16px; border-radius: 6px; text-align: left; font-weight: 700; }
.msg.warn { color: var(--warn-ink); background: var(--warn-bg); }
.msg.info { color: var(--info-ink); background: var(--info-bg); }
.msg.warn::before { content: "⚠ "; }
.msg.info::before { content: "ℹ "; }
.actions { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 24px; }
.msg:empty + .actions { margin-top: 0; }

/* ---------- results ---------- */
.results { margin-top: 64px; padding-top: 64px; border-top: 1px solid var(--rule); }
.results h3:focus { outline: none; }
.results h3 { text-align: center; }
.results h3:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.cond { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 40px; }
.chip { display: inline-block; background: #fff; border: 1px solid var(--rule); border-radius: 999px; padding: 2px 14px; font-size: 13px; line-height: 1.65; }
.results > .btn { display: flex; margin: 32px auto 0; width: 240px; }
.best { display: grid; grid-template-columns: minmax(0, 448px) minmax(0, 1fr); gap: 32px; align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 32px; margin-bottom: 48px; }
.best .pic { aspect-ratio: 3 / 4; }
.best .badge { color: var(--accent); font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.best h4 { font-size: 24px; line-height: 1.5; margin: 0 0 12px; }
.best p { margin: 0 0 8px; font-size: 15px; }
.best .btn { margin-top: 16px; }
.more-btn { display: flex; margin: 32px auto 0; width: 280px; max-width: 100%; }
.sub-h { font-family: "Shippori Mincho", serif; font-size: 18px; font-weight: 600; margin: 0 0 20px; }

/* ---------- product card (検索結果・おすすめ共通) ---------- */
.grid { display: grid; gap: 24px; }
.grid-rec { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-rec.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-res { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product { display: flex; flex-direction: column; min-width: 0; }
.product .pic { aspect-ratio: 3 / 4; width: 100%; }
.product .body { padding: 12px 0 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product .name { font-weight: 700; font-size: 15px; line-height: 1.55; }
.product .meta { font-size: 13px; line-height: 1.65; color: var(--muted); }
.product .price { font-weight: 700; font-size: 15px; }
.product .btn { margin-top: auto; min-height: 44px; font-size: 14px; }
.product .btn { margin-top: 12px; }
.product .body > .btn { margin-top: auto; }
.product .body > .meta:last-of-type { margin-bottom: 12px; }
#recommendations { scroll-margin-top: -80px; }   /* ヘッダーのリンクで移動した時、見出しがヘッダー直下に来るよう上余白を相殺 */
/* おすすめ: 件数が変わっても最後の行を中央に寄せる */
.rec-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.rec-grid .product { flex: 0 0 calc((100% - 72px) / 4); max-width: calc((100% - 72px) / 4); }   /* PC: 4列 */
@media (max-width: 1023px) { .rec-grid { gap: 16px; } .rec-grid .product { flex-basis: calc((100% - 48px) / 4); max-width: calc((100% - 48px) / 4); } }   /* 840〜1023px: 4列 */
@media (max-width: 839px) { .rec-grid .product { flex-basis: calc((100% - 32px) / 3); max-width: calc((100% - 32px) / 3); } }   /* 761〜839px: 3列(3+3+2) */
.rec-card a.pic { display: block; }
.rec-card .name { text-decoration: none; color: var(--ink); }
@media (hover: hover) { .rec-card .name:hover { text-decoration: underline; } }
.draft-tag { font-size: 13px; line-height: 1.65; color: var(--info-ink); background: var(--info-bg); border-radius: 4px; padding: 0 8px; width: fit-content; }
.empty { text-align: center; background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 40px; }
.empty p { margin: 0; }
.grid > .empty { grid-column: 1 / -1; }
.empty .row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* ---------- about ---------- */
.about { display: grid; grid-template-columns: 540px minmax(0, 484px); gap: 56px; align-items: center; }
.about-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.about-photos figure { margin: 0; aspect-ratio: 1 / 1; border-radius: 4px; overflow: hidden; background: var(--ph); }
.about-photos figure.a2 { margin-top: 40px; }   /* 2枚目を少し下げて、並びに動きを出す */
.about-photos img { width: 100%; height: 100%; object-fit: cover; }
.about-cap { grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.65; color: var(--muted); }
.about-copy h2 { margin-bottom: 20px; }
.about-copy p { margin: 0; line-height: 1.9; color: var(--muted); }
.about-copy p + p { margin-top: 1em; }

/* ---------- proof ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 40px; }
.stat { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 24px; text-align: center; }
.stat .k { color: var(--muted); font-size: 14px; }
.stat .v { font-family: "Shippori Mincho", serif; font-size: 22px; margin-top: 4px; }
.reviews { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.review { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 24px; }
.review::before { content: "“"; display: block; font-family: "Shippori Mincho", serif; font-size: 32px; line-height: 1; color: var(--accent); }
.review p { margin: 8px 0 0; font-size: 15px; color: var(--muted); }
.todo { margin: 24px 0 0; padding: 12px 16px; border: 1px dashed #B08A3E; background: var(--info-bg); color: var(--info-ink); border-radius: 6px; font-size: 13px; line-height: 1.65; }
.todo[hidden] { display: none; }

/* ---------- faq ---------- */
.faq-wrap { max-width: 720px; margin-inline: auto; padding-inline: var(--gutter); }
details { border-bottom: 1px solid var(--rule); padding: 20px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 16px; line-height: 1.6; list-style: none; display: flex; justify-content: space-between; gap: 16px; min-height: 44px; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "＋"; flex: none; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: "－"; }
details p { margin: 12px 0 0; color: var(--muted); font-size: 15px; }
details p:first-of-type { margin-top: 12px; }
details ul { margin: 12px 0 0; padding-left: 1.4em; color: var(--muted); font-size: 15px; }
details li + li { margin-top: 6px; }
details p.note { font-size: 14px; }

/* ---------- final cta / footer ---------- */
.cta { text-align: center; padding: 80px 0; background: var(--selected); position: relative; overflow: hidden; }
.cta h2 { margin-bottom: 28px; word-break: auto-phrase; text-wrap: balance; }
.cta-actions { display: flex; gap: 16px; justify-content: center; }
.cta-actions .btn { width: 260px; }
.site-footer { padding: 40px 0; text-align: center; color: var(--muted); }
.site-footer .logo { font-size: 22px; color: var(--ink); margin: 0; }
.site-footer .small { margin: 8px 0 0; }
.footer-nav { margin-top: 4px; }
.footer-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 14px; color: var(--muted); text-decoration: underline; }
@media (hover: hover) { .footer-nav a:hover { color: var(--ink); } }


/* ---------- 桜の装飾（透過素材3種: コーナー／縦長／花びら。本文と分離、操作・読み上げ対象外） ----------
   コーナー: トップ・最下部など華やかに見せる角 / 縦長: 左右の端へ位置をずらして / 花びら: 余白や側面にふわっと散らす。
   反転(--fx/--fy)・軽い回転(--r)・透明度(--o)を場所ごとに変え、非対称にする。花も花びらも無い余白を残す。 */
.section { position: relative; overflow: hidden; }
.hero > .wrap, .cta > .wrap, .section > .wrap, .section > .faq-wrap { position: relative; z-index: 1; }
.deco { position: absolute; z-index: 0; pointer-events: none; width: var(--s, 150px); opacity: var(--o, .8);
  transform: scale(var(--fx, 1), var(--fy, 1)) rotate(var(--r, 0deg)); background: no-repeat center / contain; }
.deco.corner { background-image: url("assets/sakura-corner.webp"); aspect-ratio: 1 / 1; }
.deco.vert   { background-image: url("assets/sakura-vertical.webp"); aspect-ratio: 1 / 2; }
.deco.petal  { background-image: url("assets/sakura-petals.webp"); aspect-ratio: 1 / 2; }

/* PC(1240px以上) */
.c-hero-tl { left: 0; top: 0; --s: 170px; --o: .9; }
.c-hero-tr { display: none; right: 0; top: 0; --s: 150px; --o: .9; --fx: -1; }
.p-search  { right: -20px; top: 30px; --s: 150px; --o: .6; --fx: -1; --r: 8deg; }
.v-search  { left: -85px; top: 560px; --s: 170px; --o: .75; --r: -6deg; }
.v-rec     { right: -80px; top: 300px; --s: 170px; --o: .75; --fx: -1; --r: 5deg; }
.p-about   { right: -34px; bottom: 24px; --s: 130px; --o: .6; --r: -10deg; --fy: -1; }
.v-faq     { left: 20px; top: 60px; --s: 200px; --o: .7; --r: -4deg; }
.p-faq     { right: 40px; bottom: 40px; --s: 140px; --o: .6; --fx: -1; --fy: -1; }
.c-cta     { right: 0; bottom: 0; --s: 260px; --o: .9; --fx: -1; --fy: -1; }
.p-cta     { left: 60px; top: -20px; --s: 110px; --o: .55; --r: 12deg; }

.site-header .logo, .site-footer .logo { gap: 8px; }
.logo-img { height: 1.15em; width: auto; aspect-ratio: 1 / 1; flex: none; display: block; }
/* 1240px未満: 余白が狭いので、側面の縦長・花びらは出さず、角の桜を中心にする */
/* 左右の余白が狭くなる幅では、側面の縦長・花びらは出さない */
@media (max-width: 1279px) { .v-search, .v-rec, .p-search { display: none; } }
@media (max-width: 1239px) { .c-hero-tl, .p-about, .p-cta, .v-faq, .p-faq { display: none; } .c-cta { --s: 220px; } }

/* ---------- tablet 761–1023 ---------- */
@media (max-width: 1023px) {
  :root { --sec-y: 72px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .cards-color { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-rec, .grid-rec.cols-4, .grid-res { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .best { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .about { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .about-photos { max-width: 540px; }
  .reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .c-hero-tr { display: block; }
  .p-search { display: block; --s: 110px; right: -10px; top: 10px; }
  .p-about { display: block; --s: 100px; right: 30px; top: 10px; bottom: auto; --fy: 1; }
  .c-cta { --s: 140px; }
}

/* ---------- mobile ≤760 ---------- */
@media (max-width: 760px) {
  :root { --header-h: 64px; --gutter: 20px; --sec-y: 56px; --sec-head-b: 28px; }
  body { font-size: 15px; }
  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }
  .hide-sp { display: none !important; }
  .logo { font-size: 20px; letter-spacing: .04em; }
  .nav { gap: 8px; font-size: 13px; }
  .nav a:not(.btn) { padding: 0 4px; }
  .btn-sm { font-size: 13px; padding: 0 10px; }
  .hero { padding: 28px 0 40px; }
  .hero-inner { gap: 24px; }
  .btn-lg { width: 100%; }
  .lead { margin: 16px 0 24px; }
  .hero-photos { display: block; }
  .hero-photos .main { aspect-ratio: 4 / 5; }
  .small, .sec-head p, .product .meta { font-size: 13px; }
  .ai-note { margin-top: 12px; }
  .cards-mood { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .cards-color { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .group { margin-bottom: 32px; }
  .cards-color .card .name { font-size: 13px; letter-spacing: 0; }
  .cards-color .card .lab { padding-inline: 2px; }
  .results { margin-top: 48px; padding-top: 48px; }
  .best { grid-template-columns: minmax(0, 1fr); padding: 16px; gap: 24px; }
  .best h4 { font-size: 20px; }
  .grid { gap: 12px; }
  #recommendations { scroll-margin-top: -48px; }
  .rec-card .btn { padding: 0 6px; font-size: 13px; }
  .rec-grid { gap: 12px; }
  .rec-grid .product { flex-basis: calc((100% - 12px) / 2); max-width: calc((100% - 12px) / 2); }
  .grid-rec, .grid-rec.cols-4, .grid-res { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .product .name { font-size: 14px; }
  .empty { padding: 24px; }
  .empty .row { flex-direction: column; }
  .empty .row .btn { width: 100%; }
  .about-photos { gap: 12px; max-width: none; }
  .about-photos figure.a2 { margin-top: 24px; }
  .about-copy h2 { margin-top: 4px; }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .reviews { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  summary { font-size: 15px; }
  .cta { padding: 56px 0; }
  .cta { padding-bottom: 96px; }
  .c-hero-tr { --s: 100px; }
  .p-search { --s: 70px; left: -10px; right: auto; top: -10px; --fx: 1; --r: -8deg; --o: .55; }
  .v-rec { display: block; right: -30px; left: auto; top: auto; bottom: -120px; --s: 80px; --o: .7; }
  .p-about { --s: 56px; right: 8px; top: -56px; bottom: auto; --o: .55; --fy: 1; }
  .v-faq { display: block; left: -30px; top: auto; bottom: -120px; --s: 80px; --o: .7; --r: 6deg; }
  .c-cta { --s: 100px; }
  .cta-actions { flex-direction: column; gap: 12px; }
  .cta-actions .btn { width: 100%; }
}

/* 320px級では小見出しと桜が近すぎるので、ヒーローの桜は出さない */
@media (max-width: 360px) { .c-hero-tr, .p-search { display: none; } }
