/* ============================================================
   いくらラボ 共通デザインシステム v2
   ------------------------------------------------------------
   コンセプト：シンプル・おしゃれ・かわいい・清潔感・親しみやすい
   白70% / 薄ミント20% / メインミント10%。ミント一色で塗らず、
   白い余白を積極的に使う。大面積の濃い色背景・強い影・原色は禁止。

   使い方: <link rel="stylesheet" href="/assets/css/ikura-lab.css">
   ============================================================ */

:root{
  /* ---- ベース ---- */
  --bg:        #FFFFFF;   /* ページ背景は白 */
  --bg-sub:    #F4FBF9;   /* ごく薄いミント（セクション区切り等） */
  --card:      #FFFFFF;

  /* ---- ブランドミント ---- */
  --mint-50:   #F4FBF9;
  --mint-100:  #DDF5EF;   /* 薄いミント */
  --mint-500:  #55BFA9;   /* メインミント */
  --mint-600:  #43A793;   /* ホバー・押した時 */
  --mint-700:  #2F8A78;   /* 濃いめの文字・見出し */
  --mint-900:  #1F6358;   /* もっとも濃い（ごく一部にのみ使用） */

  /* ---- テキスト ---- */
  --ink:    #263238;
  --muted:  #75827F;
  --line:   #E6F1EE;      /* 非常に薄いミントグレーの枠線 */

  /* ---- 強調色（控えめに） ---- */
  --gold:      #E3A93B;   /* 淡いゴールド。1位マーク等ごく一部にのみ */
  --gold-bg:   #FBF1DD;
  --warn-bg:   #FFF8EE;
  --warn-line: #F0DDBB;
  --warn-text: #8A6116;

  /* ---- モール表記（原色を避け、控えめなグレー系＋わずかな色差） ---- */
  --mall-rakuten: #B23B3B;
  --mall-yahoo:   #6B4FA0;
  --mall-amazon:  #3A3A3A;

  /* ---- 角丸 ---- */
  --r-lg: 22px;     /* 大型カード */
  --r-search: 26px; /* 検索窓・ボタン */
  --r-md: 16px;     /* 小型カード */
  --r-sm: 12px;
  --r-pill: 999px;

  /* ---- 影（ごく控えめ） ---- */
  --shadow-sm: 0 1px 2px rgba(38,50,56,.05);
  --shadow: 0 2px 10px rgba(38,50,56,.06);
}

*{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Hiragino Maru Gothic ProN", -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 78px; /* 下部ナビの高さぶん確保 */
}
a{ color: var(--mint-700); text-decoration: none; }
a:hover{ text-decoration: underline; }
img{ max-width: 100%; display:block; }
button{ font-family: inherit; }
svg{ display:block; }

.wrap{ max-width: 600px; margin: 0 auto; padding: 0 18px; }
.wrap-wide{ max-width: 860px; margin: 0 auto; padding: 0 18px; }

/* ------------------------------------------------------------
   ヘッダー（低め・シンプル）
   ------------------------------------------------------------ */
.il-header{
  display:flex; align-items:center; justify-content:space-between;
  padding: 13px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top:0; z-index: 30;
}
.il-header .brand{
  display:flex; align-items:center; gap:8px;
  font-weight:800; font-size:15.5px; color: var(--ink);
}
.il-header .brand .flask-ic{
  width:32px; height:32px; border-radius: 50%;
  flex:none; object-fit:contain;
}
.menu-sheet a .flask-ic{ display:none; }
.il-header .brand small{
  display:block; font-size:9.5px; font-weight:600; color: var(--muted); letter-spacing:.03em; margin-top:1px;
}

.menu-btn{
  width:38px; height:38px; border-radius: var(--r-sm);
  border:1px solid var(--line); background:#fff; color: var(--ink);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
}
.menu-btn svg{ width:19px; height:19px; }

.menu-panel{
  position: fixed; inset: 0; z-index: 50;
  background: rgba(38,50,56,.32);
  display:none;
}
.menu-panel.open{ display:block; }
.menu-sheet{
  position:absolute; top:0; right:0; bottom:0; width: min(78vw, 300px);
  background:#fff; box-shadow: -8px 0 24px rgba(38,50,56,.10);
  padding: 18px; display:flex; flex-direction:column; gap:4px;
}
.menu-sheet .close-btn{
  align-self:flex-end; width:36px;height:36px;border-radius:var(--r-sm);
  border:1px solid var(--line); background:#fff; display:flex;align-items:center;justify-content:center;
  margin-bottom: 10px; cursor:pointer;
}
.menu-sheet .close-btn svg{ width:16px;height:16px; }
.menu-sheet a{
  padding: 13px 10px; border-radius: var(--r-sm); color: var(--ink); font-weight:700; font-size:14.5px;
  display:flex; align-items:center; gap:10px;
}
.menu-sheet a:hover{ background: var(--mint-50); text-decoration:none; }
.menu-sheet a svg{ width:18px;height:18px; color: var(--mint-600); flex:none; }

/* ------------------------------------------------------------
   ファーストビュー（白ベース・軽い）
   ------------------------------------------------------------ */
.il-hero{
  background: var(--bg);
  padding: 26px 0 8px;
}
.hero-top-row{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.hero-copy{ flex:1; min-width:0; }
.il-hero h1{
  font-size: 25px; font-weight:800; letter-spacing:0; line-height:1.4; color: var(--ink);
  margin:0;
}
.il-hero .sub{ margin-top:8px; font-size:12.5px; color: var(--muted); line-height:1.6; max-width: 30em; }
.hero-mascot{ width: 92px; flex:none; margin-top:-4px; }
.hero-mascot img{ width:100%; }

/* ------------------------------------------------------------
   カード / セクション
   ------------------------------------------------------------ */
.card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px 18px;
  margin-bottom: 18px;
}
.card h2{
  font-size: 16.5px; font-weight:800; margin: 0 0 12px;
  color: var(--ink);
}
.section-lead{ font-size: 12.5px; color: var(--muted); margin-bottom: 16px; }

section{ margin: 26px 0; }

/* ------------------------------------------------------------
   ボタン
   ------------------------------------------------------------ */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 15px 22px;
  border-radius: var(--r-search);
  font-weight: 700; font-size: 15.5px;
  border: 0; cursor: pointer;
  font-family: inherit;
  text-decoration:none;
  transition: filter .12s;
  min-height: 52px;
}
.btn:hover{ text-decoration:none; filter: brightness(0.97); }
.btn-block{ display:flex; width:100%; }
.btn-primary{ background: var(--mint-500); color:#fff; }
.btn-primary:hover{ background: var(--mint-600); }
.btn-outline{ background:#fff; color: var(--mint-700); border: 1.5px solid var(--mint-500); }
.btn-sm{ padding: 10px 16px; font-size: 13px; min-height:auto; border-radius: var(--r-sm); }

/* ------------------------------------------------------------
   検索カード
   ------------------------------------------------------------ */
.search-card{
  background:#fff; border:1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow); padding: 20px 18px; margin-top: 18px;
}
.search-bar{
  display:flex; align-items:center; gap:10px;
  background: var(--mint-50); border: 1.5px solid var(--line);
  border-radius: var(--r-search);
  padding: 14px 18px;
}
.search-bar svg{ width:18px; height:18px; color: var(--muted); flex:none; }
.search-bar input{
  flex:1; border:0; outline:0; font-size: 15px; font-family:inherit; color: var(--ink); background:transparent;
  min-width:0;
}
.search-bar input::placeholder{ color:#9BAAA6; }
.search-bar button.clear{
  border:0; background:none; color: var(--muted); cursor:pointer; padding:2px; display:flex;
}
.example-hint{ font-size:11.5px; color:var(--muted); margin-top:8px; padding-left:4px; }

/* ------------------------------------------------------------
   使い方ステップ
   ------------------------------------------------------------ */
.steps-row{ display:flex; align-items:center; justify-content:space-between; gap:6px; }
.step{ flex:1; text-align:center; }
.step .ic{
  width:46px; height:46px; margin:0 auto 8px; border-radius: 50%;
  background: var(--mint-50); color: var(--mint-700);
  display:flex; align-items:center; justify-content:center;
}
.step .ic svg{ width:20px; height:20px; }
.step .t{ font-size:12px; font-weight:700; color: var(--ink); line-height:1.4; }
.step-arrow{ color: var(--line); flex:none; width:16px; }
.step-arrow svg{ width:16px; height:16px; }

/* ------------------------------------------------------------
   マスコット（いくらちゃん）
   ------------------------------------------------------------
   登場OK: トップ / 検索中 / 最安値発見 / 0件 / エラー / お気に入り /
          各ツールカード（案内役） / 計算結果への短い一言リアクション
   注意: 使い方ステップなど「説明」の場では基本的に使わない（案内カード内は除く）
   ------------------------------------------------------------ */
.mascot-sm{ width: 52px; flex:none; }
.mascot-md{ width: 76px; flex:none; }

.mascot-line{ display:flex; align-items:center; gap:12px; margin: 4px 0 16px; }
.speech-bubble{
  position:relative;
  background: var(--mint-50); border:1px solid var(--mint-100);
  border-radius: var(--r-md);
  padding: 10px 15px;
  font-size: 13px; font-weight:700; color: var(--mint-900);
}
.save-callout{
  display:flex; align-items:center; gap:12px;
  background: var(--gold-bg); border:1px solid var(--warn-line);
  border-radius: var(--r-md); padding: 12px 15px; margin: 0 0 16px;
}
.save-callout img{ width:44px; flex:none; }
.save-callout b{ font-size:16px; color:#8A6116; }
.save-callout .note{ font-size:11px; color:#9A7A3B; display:block; margin-top:1px; }

/* ------------------------------------------------------------
   下部ナビ（控えめ）
   ------------------------------------------------------------ */
.bottom-nav{
  position: fixed; left:0; right:0; bottom:0; z-index: 30;
  background: #fff; border-top: 1px solid var(--line);
  display:flex;
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav a{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:3px;
  color: #A7B2AF; font-size: 10px; font-weight:700; padding: 6px 2px;
}
.bottom-nav a svg{ width:20px; height:20px; stroke-width:1.7; }
.bottom-nav a.active{ color: var(--mint-600); }

/* ------------------------------------------------------------
   検索結果カード
   ------------------------------------------------------------ */
.result-list{ margin-top: 4px; }
.result-card{
  background:#fff; border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 16px; margin-bottom: 12px;
}
.result-card.rank-1{
  border: 1.5px solid var(--mint-500);
  box-shadow: var(--shadow);
}
.result-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:8px; }
.medal{ font-size: 20px; line-height:1; }
.best-tag{
  display:inline-flex; align-items:center; gap:4px;
  background: var(--gold-bg); color:#8A6116;
  font-size:10.5px; font-weight:800; padding:3px 10px; border-radius: var(--r-pill);
  margin-bottom:6px;
}
.mall-name{ font-weight:800; font-size:12.5px; color: var(--muted); }

.fav-btn{
  border: none; background:none; cursor:pointer; color:#C7D0CE; padding:2px;
  display:flex; align-items:center; justify-content:center;
}
.fav-btn svg{ width:21px; height:21px; }
.fav-btn.active{ color:#E08A9A; }

.item-name{
  font-size: 12.5px; color: var(--muted); margin: 8px 0 10px; line-height:1.55;
}

.price-effective{
  font-size: 27px; font-weight:800; color: var(--ink); letter-spacing:-.01em; line-height:1.15;
}
.price-effective small{ font-size:13px; font-weight:700; color:var(--muted); margin-left:2px; }

.price-detail{ width:100%; font-size:12.5px; margin: 12px 0 14px; border-collapse:collapse; }
.price-detail td{ padding: 4px 0; color: var(--muted); }
.price-detail td:last-child{ text-align:right; font-variant-numeric: tabular-nums; color: var(--ink); }
.price-detail tr.ref td{ color:#9AA6A3; font-size:11.5px; }
.price-detail tr.ref td:last-child{ color:#9AA6A3; }

.ship-badge{
  display:inline-flex; align-items:center; gap:4px;
  font-size: 10.5px; font-weight:700; padding: 2px 9px; border-radius: var(--r-pill);
  background: var(--mint-50); color: var(--mint-700);
}
.ship-badge.extra{ background:#F5F2EC; color:#8A7A5A; }

/* ------------------------------------------------------------
   ゆるく探す（同一商品比較ではない、候補一覧）
   ------------------------------------------------------------ */
.loose-toggle{
  width:100%; display:flex; align-items:center; justify-content:space-between;
  gap:14px; text-align:left;
  background:linear-gradient(135deg, #FFF7ED 0%, #F0FBF8 100%);
  border:1px solid rgba(85,191,169,.25); border-radius:18px;
  padding:14px 14px 14px 10px; margin:0;
  color:var(--ink); cursor:pointer; font-family:inherit;
  box-shadow:0 6px 18px rgba(47,99,88,.07);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.loose-toggle:hover{ transform:translateY(-1px); box-shadow:0 9px 22px rgba(47,99,88,.10); border-color:var(--mint-500); }
.loose-toggle:focus-visible{ outline:3px solid rgba(233,130,103,.28); outline-offset:3px; }
.loose-mascot{ width:70px; flex:none; filter:drop-shadow(0 6px 6px rgba(47,99,88,.12)); }
.loose-copy{ display:flex; flex:1; min-width:0; flex-direction:column; line-height:1.45; }
.loose-kicker{ color:var(--coral-dark); font-size:12px; font-weight:800; margin-bottom:3px; }
.loose-copy strong{ color:var(--ink); font-size:16px; font-weight:800; }
.loose-help{ color:var(--muted); font-size:12.5px; margin-top:3px; }
.loose-action{
  display:flex; flex:none; align-items:center; gap:7px;
  color:var(--mint-700); font-size:12px; font-weight:800;
  background:rgba(255,255,255,.85); border:1px solid rgba(85,191,169,.22);
  border-radius:var(--r-pill); padding:7px 9px 7px 11px;
}
.loose-plus{ width:18px; height:18px; position:relative; border-radius:50%; background:var(--mint-100); }
.loose-plus::before,.loose-plus::after{ content:""; position:absolute; left:5px; right:5px; top:8px; height:2px; border-radius:2px; background:var(--mint-700); }
.loose-plus::after{ transform:rotate(90deg); transition:transform .15s ease; }
.loose-toggle.open .loose-plus::after{ transform:rotate(0); }
.loose-toggle.open .loose-action-label{ font-size:0; }
.loose-toggle.open .loose-action-label::after{ content:"閉じる"; font-size:12px; }
.loose-card{ padding:12px !important; }
#looseBody{ margin-top:14px; padding-top:14px; border-top:1px solid var(--line); }
.sort-tabs{ display:flex; gap:6px; margin-top:12px; flex-wrap:wrap; }
.sort-tab{
  flex:1; min-width:88px; padding:9px 6px; border-radius:var(--r-pill);
  border:1.5px solid var(--line); background:#fff; color:var(--muted);
  font-size:12px; font-weight:700; cursor:pointer; font-family:inherit; text-align:center;
}
.sort-tab.active{ background:var(--mint-500); border-color:var(--mint-500); color:#fff; }
.loose-rating{ font-size:11px; color:var(--muted); font-weight:700; }

/* ------------------------------------------------------------
   Amazon（検索リンクのみ） / 状態表示
   ------------------------------------------------------------ */
.amazon-card{
  background:#fff; border:1px dashed var(--line); border-radius: var(--r-lg);
  padding:18px; text-align:center; margin-top: 6px;
}
/* ------------------------------------------------------------
   よくある質問（FAQ）
   ------------------------------------------------------------ */
.card details{
  border:1px solid var(--line); border-radius: var(--r-md);
  padding:14px 16px; margin-bottom:10px; background:#fff;
}
.card details:last-child{ margin-bottom:0; }
.card summary{ font-weight:700; cursor:pointer; font-size:14.5px; color:var(--ink); }
.card details p{ font-size:13.5px; margin-top:10px; color:var(--muted); }
.status-card{
  text-align:center; padding: 32px 16px; color: var(--muted); font-size:13.5px;
  background:#fff; border:1px solid var(--line); border-radius: var(--r-lg);
}
.spinner{
  width:22px; height:22px; margin:0 auto 12px; border-radius:50%;
  border: 3px solid var(--mint-100); border-top-color: var(--mint-500);
  animation: spin 0.8s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }
.hint-suggest{ font-size:12px; color:var(--muted); margin-top:8px; }

/* ------------------------------------------------------------
   注意書き
   ------------------------------------------------------------ */
.note{ font-size:11.5px; color: var(--muted); }
.warn-box{
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--r-md);
  padding: 13px 16px; font-size: 12.5px; color: var(--warn-text); margin: 14px 0;
  line-height:1.6;
}

/* ------------------------------------------------------------
   フッター
   ------------------------------------------------------------ */
.il-footer{
  text-align:center; font-size:11.5px; color: var(--muted);
  padding: 26px 18px; border-top:1px solid var(--line); margin-top: 16px;
}
.il-footer a{ margin:0 8px; color: var(--muted); }

/* ------------------------------------------------------------
   ユーティリティ
   ------------------------------------------------------------ */
.center{ text-align:center; }
.flex{ display:flex; }
.gap-8{ gap:8px; } .gap-12{ gap:12px; }
.hidden{ display:none !important; }

@media (min-width: 640px){
  .il-hero h1{ font-size: 28px; }
  .card{ padding: 26px; }
}

/* ------------------------------------------------------------
   Mobile readability & Ikura-chan character polish (v3)
   ------------------------------------------------------------ */
:root{
  --cream: #FFF9F2;
  --peach: #FFE6D4;
  --coral: #E98267;
  --coral-dark: #C9654F;
  --ink: #283632;
  --muted: #5F706B;
  --line: #DCECE7;
  --shadow-sm: 0 4px 14px rgba(47,99,88,.07);
  --shadow: 0 10px 28px rgba(47,99,88,.10);
}

body{
  font-size:16px;
  background:
    radial-gradient(circle at 8% 9%, rgba(255,230,212,.65) 0 38px, transparent 39px),
    radial-gradient(circle at 94% 32%, rgba(221,245,239,.85) 0 54px, transparent 55px),
    linear-gradient(180deg, var(--cream) 0, #fff 340px);
}

.il-header{
  min-height:64px;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  box-shadow:0 2px 16px rgba(47,99,88,.05);
}
.il-header .brand{ font-size:17px; letter-spacing:.02em; }
.il-header .brand .flask-ic{ width:40px; height:40px; }
.il-header .brand small{ font-size:11px; }
.menu-btn{ width:44px; height:44px; background:var(--mint-50); }
.menu-sheet a{ min-height:50px; font-size:16px; }

.il-hero{
  position:relative;
  overflow:hidden;
  background:linear-gradient(145deg, #FFF7ED 0%, #F1FBF8 100%);
  border-bottom:1px solid rgba(85,191,169,.14);
  padding:30px 0 22px;
}
.il-hero::after{
  content:"●  ●  ●";
  position:absolute;
  right:18%; bottom:4px;
  color:rgba(233,130,103,.16);
  font-size:14px;
  letter-spacing:9px;
  transform:rotate(-12deg);
}
.il-hero h1{ font-size:clamp(27px, 7.5vw, 34px); line-height:1.35; }
.il-hero .sub{ font-size:15px; line-height:1.85; max-width:36em; }
.hero-top-row{ align-items:center; gap:14px; }
.hero-mascot{ width:112px; filter:drop-shadow(0 10px 10px rgba(47,99,88,.12)); }
.mascot-hero-bubble{
  position:relative;
  border:0 !important;
  border-radius:18px 18px 4px 18px !important;
  padding:10px 12px !important;
  font-size:12.5px !important;
  box-shadow:var(--shadow-sm);
}

section{ margin:22px 0; }
.card,
.search-card,
.result-card{
  border-color:rgba(85,191,169,.24);
  box-shadow:var(--shadow-sm);
}
.card{ padding:24px 20px; }
.card h2{ font-size:20px; line-height:1.5; }
.section-lead,
.card p,
.card li,
.note{ font-size:15px !important; line-height:1.85; }
.page-title h1{ font-size:25px !important; line-height:1.45; }
.tool{
  border-color:rgba(85,191,169,.26) !important;
  border-radius:20px !important;
  padding:20px !important;
  box-shadow:0 4px 15px rgba(47,99,88,.06);
}
.tool .t{ font-size:17px !important; line-height:1.5; }
.tool .d{ font-size:15px !important; line-height:1.8 !important; }
.tool .go{ font-size:14px !important; }
.tool-mascot .say{ font-size:14px !important; line-height:1.6; }
.tool-mascot img{ width:44px !important; filter:drop-shadow(0 5px 5px rgba(47,99,88,.10)); }
.policy div{ padding:18px !important; border:1px solid rgba(85,191,169,.18); }
.policy h3{ font-size:16px !important; }
.policy p{ font-size:14.5px !important; }

.btn{ font-size:16px; min-height:54px; box-shadow:0 5px 12px rgba(47,138,120,.14); }
.btn-sm{ font-size:15px; min-height:46px; }
input, select, textarea{ font-size:16px !important; min-height:48px; }

.bottom-nav{
  padding-top:8px;
  background:rgba(255,255,255,.96);
  box-shadow:0 -5px 20px rgba(47,99,88,.08);
}
.bottom-nav a{ min-height:56px; font-size:11.5px; gap:5px; }
.bottom-nav a svg{ width:23px; height:23px; }
.bottom-nav a.active{ color:var(--coral-dark); }

.il-footer{ font-size:13px; line-height:1.8; }

@media (max-width: 639px){
  .wrap, .wrap-wide{ padding-left:16px; padding-right:16px; }
  .hero-copy{ min-width:0; }
  .hero-mascot{ width:104px; }
  .card{ border-radius:20px; }
}

@media (max-width: 390px){
  .hero-top-row{ align-items:flex-end; }
  .hero-mascot{ width:92px; }
  .il-hero h1{ font-size:26px; }
  .mascot-hero-bubble{ max-width:108px !important; font-size:11.5px !important; }
  .loose-toggle{ gap:9px; padding:12px 10px 12px 6px; }
  .loose-mascot{ width:58px; }
  .loose-copy strong{ font-size:15px; }
  .loose-kicker{ font-size:11px; }
  .loose-help{ font-size:11.5px; }
  .loose-action{ padding:7px; }
  .loose-action-label{ display:none; }
}
