/* Fragrance Finder — ビューティEC アプリUI（参照ピンのピンクを明るいグリーンに置換）
 *
 * 参照: Pinterest「Beauty Products Mobile App UI Design」(pin/166844361191838236)
 * 借りたのは**構造**:
 *   丸い検索バー / ヒーローカード（セリフ見出し＋斜体アクセント＋pillボタン）
 *   カテゴリのアイコン列 / 「◯◯」+「すべて見る」の節見出し
 *   白い商品カード（画像→ブランド→名前→価格＋丸い＋ボタン）
 *   帯のプロモカード / 下タブ5つ
 *   詳細: 大きい商品画像＋サイズpill＋全幅の大きなCTA＋アコーディオン
 * 色だけ明るいグリーンに置き換える。ピンクは1色も使わない。
 *
 * コントラスト: 文字に使う色は --ink / --ink-mid / --brand-ink の3つだけ。
 * --brand（塗り）の上には白文字しか置かない。_selftest.html が全色を実測する。
 */

:root {
  /* 明るいグリーン基調 */
  --bg:         #f2f8f3;   /* アプリの地 */
  --card:       #ffffff;
  --tint:       #e4f1e7;   /* ヒーロー・プロモの淡い面 */
  --tint-2:     #f0f7f1;   /* 商品画像の背景 */
  /* 白文字を載せる塗り。#3f8f5f だと白との比が 3.96 で AA に届かなかったので暗くした */
  --brand:      #3a8354;
  /* --brand-soft の上に置く文字色。#2f7d4f だと比 4.11 だったので暗くした（→5.59） */
  --brand-ink:  #266641;
  --brand-soft: #d9edde;   /* 選択中のpillの地 */
  --ink:        #16241b;
  --ink-mid:    #566159;
  --line:       #e2ebe4;

  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --shadow: 0 1px 2px rgba(22,36,27,.05), 0 8px 20px rgba(22,36,27,.05);
  --shadow-s: 0 1px 2px rgba(22,36,27,.05), 0 3px 10px rgba(22,36,27,.04);
  --maxw: 460px;           /* スマホアプリの幅で組み、PCでは中央に置く */
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: #e9f1eb;
  color: var(--ink);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-text-size-adjust: 100%;
}
a { color: inherit; }
button { font: inherit; color: inherit; }

/* アプリの筐体。PCでも横幅を広げず、スマホアプリのまま中央に置く */
.app {
  max-width: var(--maxw);
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  padding-bottom: 86px;           /* 下タブぶん */
  box-shadow: 0 0 40px rgba(22,36,27,.07);
}

/* ---------- 上部 ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  padding: 14px 18px 10px;
}
.topbar-row { display: flex; align-items: center; gap: 10px; }
.appname {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 19px; letter-spacing: .04em;
}
.appname-sub {
  font-size: 11px; color: var(--ink-mid); letter-spacing: .08em; flex: 1;
}
.daytag {
  font-size: 10.5px; letter-spacing: .1em; color: var(--brand-ink);
  background: var(--brand-soft); border-radius: 999px; padding: 2px 10px;
}

.searchbar {
  display: flex; align-items: center; gap: 9px;
  background: var(--card); border-radius: 999px;
  padding: 0 8px 0 15px; margin-top: 11px; box-shadow: var(--shadow-s);
}
.searchbar svg { flex: none; color: var(--ink-mid); }
.searchbar input {
  flex: 1; border: 0; outline: 0; background: none;
  font: inherit; font-size: 14.5px; padding: 12px 0; color: var(--ink);
}
.searchbar input::placeholder { color: #94a29a; }
.sb-clear {
  border: 0; background: var(--tint); color: var(--brand-ink);
  border-radius: 999px; width: 30px; height: 30px; cursor: pointer; font-size: 15px;
}

/* ---------- ヒーロー ---------- */

.hero {
  margin: 4px 18px 0; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(135deg, var(--tint) 0%, #f6fbf7 62%);
  display: flex; align-items: stretch; box-shadow: var(--shadow-s);
}
.hero-txt { padding: 20px 4px 20px 20px; flex: 1 1 58%; min-width: 0; }
.hero-h {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 23px; line-height: 1.42; margin: 0; letter-spacing: .01em;
}
.hero-h em { font-style: italic; color: var(--brand-ink); display: block; }
.hero-p { margin: 8px 0 14px; font-size: 12px; color: var(--ink-mid); line-height: 1.6; }
.hero-btn {
  border: 0; background: var(--brand); color: #fff; cursor: pointer;
  border-radius: 999px; padding: 9px 22px; font-size: 13.5px;
  box-shadow: 0 4px 12px rgba(58,131,84,.28);
}
.hero-img {
  flex: 0 0 40%; position: relative; display: grid; place-items: center; padding: 10px 10px 10px 0;
}
.hero-img img { max-width: 100%; max-height: 152px; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(22,36,27,.14)); }

/* ---------- カテゴリのアイコン列 ---------- */

.cats { display: flex; gap: 4px; padding: 16px 12px 4px; overflow-x: auto; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cat {
  border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  padding: 4px 4px; min-width: 72px;
}
/* 線画のアイコンでは香調が伝わらないので、実際の商品写真を丸く出す */
.cat-ic {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--card); box-shadow: var(--shadow-s);
  display: grid; place-items: center; overflow: hidden;
  border: 2px solid transparent; transition: border-color .15s;
  padding: 3px;
}
.cat-ic img { width: 100%; height: 100%; object-fit: contain; }
.cat.is-on .cat-ic { border-color: var(--brand); background: var(--tint); }
.cat-all {
  font-family: "Hiragino Mincho ProN", serif; font-size: 20px;
  color: var(--brand-ink); font-variant-numeric: tabular-nums;
}
.cat.is-on .cat-all { color: var(--brand-ink); }
.cat-t { font-size: 11px; color: var(--ink); white-space: nowrap; line-height: 1.3; }
.cat.is-on .cat-t { color: var(--brand-ink); }
.cat-n { font-size: 9.5px; color: var(--ink-mid); font-variant-numeric: tabular-nums; }

.cat-note { margin: 2px 18px 0; font-size: 10.5px; color: var(--ink-mid); line-height: 1.6; }

/* ---------- 節の見出し ---------- */

.sec {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 18px 18px 10px; gap: 10px;
}
.sec-t { font-size: 16.5px; font-weight: 600; letter-spacing: .01em; }
.sec-a { font-size: 12px; color: var(--brand-ink); border: 0; background: none; cursor: pointer; }
.sec-n { font-size: 11.5px; color: var(--ink-mid); }

.sec--work { align-items: center; gap: 9px; }
.work-face {
  width: 30px; height: 30px; flex: none; border-radius: 8px;
  background: var(--tint-2); display: grid; place-items: center; overflow: hidden;
}
.work-face img { width: 88%; height: 88%; object-fit: contain; }
.work-face .noimg { font-size: 8px; color: var(--ink-mid); }

/* ---------- 横スクロールの商品カード ---------- */

.rail { display: flex; gap: 11px; padding: 2px 18px 6px; overflow-x: auto; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }

.pcard {
  flex: 0 0 143px; border: 0; cursor: pointer; text-align: left;
  background: var(--card); border-radius: var(--r-md); padding: 10px;
  box-shadow: var(--shadow-s); position: relative;
  display: flex; flex-direction: column; gap: 3px;
}
.pcard-img {
  height: 108px; border-radius: var(--r-sm); background: var(--tint-2);
  display: grid; place-items: center; overflow: hidden; margin-bottom: 7px;
}
.pcard-img img { max-width: 88%; max-height: 96px; object-fit: contain; }
.pcard-img .noimg { font-size: 10.5px; color: var(--ink-mid); }
.pcard-brand {
  font-size: 10px; letter-spacing: .06em; color: var(--ink-mid);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pcard-name { font-size: 12.5px; line-height: 1.45; min-height: 2.9em; }
.pcard-price { font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.pcard-permlt { font-size: 10.5px; color: var(--brand-ink); font-variant-numeric: tabular-nums; }
.pcard-named {
  margin-top: 4px; align-self: flex-start; font-size: 9.5px;
  color: #fff; background: var(--brand); border-radius: 999px; padding: 1px 8px;
}
.pcard-go {
  position: absolute; right: 10px; bottom: 10px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 15px;
}

/* カタログの一覧はグリッドで見せる（横スクロールだと数が多すぎて追えない） */
.catgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 18px 6px; }
.catgrid .pcard { flex: none; }
.more {
  display: block; margin: 12px 18px 0; width: calc(100% - 36px);
  border: 1px solid var(--line); background: var(--card); color: var(--brand-ink);
  border-radius: 999px; padding: 11px; font-size: 13.5px; cursor: pointer;
}
.more:hover { border-color: var(--brand); }

/* ---------- 人のカード ---------- */

.plist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 18px 6px; }
.person {
  border: 0; cursor: pointer; text-align: left;
  background: var(--card); border-radius: var(--r-md); padding: 12px;
  box-shadow: var(--shadow-s); display: flex; flex-direction: column; gap: 4px;
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-ink);
  display: grid; place-items: center; font-size: 16px;
  font-family: "Hiragino Mincho ProN", serif; margin-bottom: 3px;
}
.person-n { font-size: 14.5px; line-height: 1.4; }
.person-s { font-size: 10.5px; color: var(--ink-mid); line-height: 1.5; }
.tag-cheap {
  align-self: flex-start; margin-top: 3px; font-size: 10px;
  color: #fff; background: var(--brand); border-radius: 999px; padding: 1px 8px;
}
/* ブランドカードの「出典つきで名前が挙がっている本数」。
   楽天のカタログ（誰が使っているかは分からない）と区別するための印。 */
.tag-named {
  align-self: flex-start; margin-top: 4px; font-size: 10px;
  color: var(--brand-ink); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px;
}


/* 人カードの写真枠。**本人の写真ではなく、その人の香水の商品画像**を並べる。
   肖像権・パブリシティ権・写真の著作権に触れずに、人ごとの見た目の差を出すための形。 */
.person-shots {
  display: flex; gap: 5px; margin-bottom: 7px;
}
.person-shot {
  flex: 1 1 0; min-width: 0; height: 62px;
  border-radius: var(--r-sm); background: var(--tint-2);
  display: grid; place-items: center; overflow: hidden;
}
.person-shot img { max-width: 86%; max-height: 54px; object-fit: contain; }
.person-shot .noimg { font-size: 9px; color: var(--ink-mid); }

/* ---------- ブランド ---------- */

.brandlist { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 2px 18px 6px; }
.brandcard {
  border: 0; cursor: pointer; text-align: left;
  background: var(--card); border-radius: var(--r-md); padding: 12px;
  box-shadow: var(--shadow-s); display: flex; flex-direction: column; gap: 3px;
}
.brandcard:hover { box-shadow: var(--shadow); }
.brandcard-img {
  height: 76px; border-radius: var(--r-sm); background: var(--tint-2);
  display: grid; place-items: center; overflow: hidden; margin-bottom: 6px;
}
.brandcard-img img { max-width: 82%; max-height: 68px; object-fit: contain; }
.brandcard-img .noimg { font-size: 10px; color: var(--ink-mid); }
.brandcard-name { font-size: 14px; line-height: 1.35; letter-spacing: .02em; }
.brandcard-meta { font-size: 10.5px; color: var(--ink-mid); line-height: 1.5; }

.brand-rail { display: flex; gap: 8px; padding: 2px 18px 6px; overflow-x: auto; scrollbar-width: none; }
.brand-rail::-webkit-scrollbar { display: none; }
.brand-pill {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 5px 14px 5px 5px; font-size: 13px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
/* ロゴは使えないので商品写真を丸く小さく置く */
.brand-pill-img {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  background: var(--tint-2); display: grid; place-items: center; overflow: hidden;
}
.brand-pill-img img { width: 84%; height: 84%; object-fit: contain; }
.brand-pill-img .noimg { font-size: 8px; color: var(--ink-mid); }
.brand-pill-t { letter-spacing: .02em; }
.brand-pill:hover { border-color: var(--brand); color: var(--brand-ink); }
.brand-pill b { font-size: 11px; color: var(--ink-mid); font-weight: 400; }

/* ---------- 詳細 ---------- */

.detail { padding: 0 0 8px; }
.dhead { display: flex; align-items: center; gap: 6px; padding: 4px 12px 8px; }
.iconbtn {
  border: 0; background: var(--card); cursor: pointer;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: var(--shadow-s); color: var(--ink);
}
.dhead-t { flex: 1; text-align: center; font-size: 14.5px; padding-right: 34px; }

.dhero {
  margin: 0 18px; border-radius: var(--r-lg); background: var(--tint);
  height: 218px; display: grid; place-items: center; position: relative; overflow: hidden;
}
.dhero::after {
  content: ""; position: absolute; width: 190px; height: 190px; border-radius: 50%;
  background: rgba(255,255,255,.6);
}
.dhero img { max-width: 74%; max-height: 182px; object-fit: contain; position: relative; z-index: 1;
  filter: drop-shadow(0 10px 18px rgba(22,36,27,.16)); }
.dhero .noimg { color: var(--ink-mid); font-size: 12px; position: relative; z-index: 1; }

.dbody { padding: 16px 18px 0; }
.d-brand { font-size: 11.5px; letter-spacing: .1em; color: var(--brand-ink); }
.d-name {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 22px; line-height: 1.4; margin: 3px 0 6px;
}
.d-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--ink-mid); }
.d-price { font-size: 25px; font-variant-numeric: tabular-nums; margin: 10px 0 2px; }
.d-permlt { font-size: 12.5px; color: var(--brand-ink); font-variant-numeric: tabular-nums; }

.pillrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 0; }
.pill {
  border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 6px 15px; font-size: 12.5px; color: var(--ink-mid);
}
.pill.is-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }

.cta {
  display: block; width: 100%; text-align: center; text-decoration: none;
  background: var(--brand); color: #fff; border: 0; cursor: pointer;
  border-radius: 999px; padding: 15px; font-size: 15px; margin: 16px 0 4px;
  box-shadow: 0 6px 18px rgba(58,131,84,.3);
}
.cta-note { font-size: 11px; color: var(--ink-mid); text-align: center; margin: 0 0 4px; }

/* 芯: 同じ香りで安いもの */
.cheap {
  margin: 16px 0 0; border-radius: var(--r-md); overflow: hidden;
  border: 1.5px solid var(--brand); background: var(--card);
}
.cheap-h {
  background: var(--brand); color: #fff; font-size: 11.5px;
  letter-spacing: .05em; padding: 7px 14px;
}
.cheap-b { padding: 13px 14px; display: flex; align-items: center; gap: 12px; }
.cheap-img {
  width: 62px; height: 62px; flex: none; border-radius: var(--r-sm);
  background: var(--tint-2); display: grid; place-items: center; overflow: hidden;
}
.cheap-img img { max-width: 88%; max-height: 56px; object-fit: contain; }
.cheap-txt { flex: 1; min-width: 0; }
.cheap-brand { font-size: 10.5px; letter-spacing: .06em; color: var(--ink-mid); }
.cheap-name { font-size: 14.5px; line-height: 1.4; }
.cheap-price { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; }
.cheap-yen { font-size: 18px; font-variant-numeric: tabular-nums; }
.cheap-times {
  font-size: 11.5px; color: #fff; background: var(--brand);
  border-radius: 999px; padding: 1px 9px; white-space: nowrap;
}
.cheap-diff { padding: 0 14px 12px; margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--ink-mid); }
.cheap-diff b { color: var(--ink); }

/* アコーディオン */
.acc { border-top: 1px solid var(--line); }
.acc summary {
  list-style: none; cursor: pointer; padding: 14px 2px;
  display: flex; align-items: center; justify-content: space-between; font-size: 14px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "⌄"; color: var(--ink-mid); font-size: 15px; }
.acc[open] summary::after { content: "⌃"; }
.acc-body { padding: 0 2px 14px; font-size: 13px; color: var(--ink-mid); line-height: 1.8; }

.chiprow { display: flex; gap: 6px; flex-wrap: wrap; }
.nchip {
  font-size: 11.5px; color: var(--ink-mid);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; background: var(--card);
}
.nchip--hit { border-color: var(--brand); color: var(--brand-ink); background: var(--brand-soft); }

.srcrow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.srcrow-h { font-size: 10.5px; letter-spacing: .06em; color: var(--ink-mid); }
.srcpill {
  font-size: 11px; color: var(--ink-mid); text-decoration: none;
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; background: var(--card);
}
.srcpill:hover { border-color: var(--brand); color: var(--brand-ink); }

/* ---------- 下タブ ---------- */

.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--maxw); z-index: 40;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
  /* タブの数を CSS に書かない。書くと数を変えたときに右が1列空く（実際に空いた）。 */
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 7px 0 max(9px, env(safe-area-inset-bottom));
  backdrop-filter: saturate(160%) blur(8px);
}
.tabb {
  border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--ink-mid); padding: 3px 0;
}
.tabb.is-on { color: var(--brand-ink); }
.tabb span { font-size: 9.5px; }

/* ---------- 共通の小物 ---------- */

.lead { font-size: 12.5px; color: var(--ink-mid); padding: 0 18px; margin: 0 0 10px; }
.empty {
  margin: 8px 18px; background: var(--card); border-radius: var(--r-md);
  padding: 22px; box-shadow: var(--shadow-s);
}
.empty p { margin: 0; font-size: 14px; }
.empty .sub { margin-top: 6px; font-size: 12.5px; color: var(--ink-mid); }

.note-legal {
  margin: 18px 18px 0; padding: 13px 15px; border-radius: var(--r-md);
  background: var(--tint-2); font-size: 11.5px; color: var(--ink-mid); line-height: 1.75;
}
.note-legal b { color: var(--ink); }

.foot { padding: 22px 18px 10px; font-size: 11px; color: var(--ink-mid); line-height: 1.8; }
.foot-link {
  border: 0; background: none; cursor: pointer; padding: 0 0 0 8px;
  font-size: 11px; color: var(--brand-ink); text-decoration: underline;
}
.foot b { color: var(--ink); }
.foot p { margin: 0 0 7px; }

/* 「読み方」 */
.about { padding: 0 18px; }
.about-card {
  background: var(--card); border-radius: var(--r-md); padding: 16px;
  box-shadow: var(--shadow-s); margin-bottom: 11px;
}
.about-card h2 { font-size: 15px; margin: 0 0 8px; }
.about-card p, .about-card li { font-size: 12.5px; line-height: 1.8; color: var(--ink-mid); margin: 0 0 7px; }
.about-card ul { margin: 0; padding-left: 1.1em; }
.about-card b { color: var(--ink); }
