/* ポイカレ サイトv1 共通スタイル
   設計条件（2026-11-15 本人指示）:
   - 本文 16px以上、コントラスト強め、タップ領域 44px以上
   - 主要な導線と経済圏の切り替えは画面下部（片手の親指の範囲）
   - 重要な移動手段を隠しメニューに入れない
   - 文字を画像の中に埋めない（情報はすべてテキストで出す）
   - 言葉は中学生にも伝わる平たい言葉で、専門用語には一言の説明を添える
*/
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --ink: #1f1f1f;
  --ink-soft: #444;
  --muted: #5c5546;
  --paper: #fdf6ec;
  --card: #ffffff;
  --line: #e3d3b8;
  --gold: #8a5a00;
  --gold-soft: #fff3d6;
  --star: #b8860b;
  --rakuten: #bf0000;
  --yahoo: #7b0099;
  --amazon: #8a5a00;
  --au: #d94f04;
  --nav-h: 68px;
  --radius: 14px;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 17px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--paper);
  padding-bottom: calc(var(--nav-h) + 24px);
}

a { color: #0b5fa5; }
a:visited { color: #5a3d99; }

h1 { font-size: 30px; line-height: 1.45; }
h2 { font-size: 23px; line-height: 1.5; margin: 40px 0 12px; }
h3 { font-size: 19px; line-height: 1.55; margin: 28px 0 8px; }
p { margin: 0 0 14px; }
ul, ol { margin: 0 0 14px 1.3em; }
li { margin-bottom: 8px; }
small { font-size: 15px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 18px; }

/* ヘッダー */
.site-head {
  background: #fff;
  border-bottom: 2px solid var(--line);
  padding: 18px 0 14px;
}
.site-head .brand { font-size: 26px; font-weight: 700; line-height: 1.3; }
.site-head .brand small {
  display: block;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
.site-head .today-line { margin-top: 10px; font-size: 16px; }

/* 経済圏バッジ */
.badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}
.badge.rakuten { background: var(--rakuten); }
.badge.yahoo { background: var(--yahoo); }
.badge.amazon { background: var(--amazon); }
.badge.au { background: var(--au); }
.badge.multi { background: #333; }

/* 星 */
.stars { color: var(--star); font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; }
.stars .n { color: var(--ink-soft); font-weight: 400; font-size: 15px; }

/* カード */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin: 0 0 16px;
}
.card h3 { margin-top: 0; }
.note {
  background: var(--gold-soft);
  border: 1px solid #ecd28f;
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 16px;
  font-size: 16px;
}
.note strong { color: var(--gold); }

/* カレンダー */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 20px 0 12px;
}
.cal-head h2 { margin: 0; }
.cal-nav {
  min-width: 48px;
  min-height: 48px;
  font-size: 17px;
  font-weight: 700;
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 12px;
  color: var(--gold);
  cursor: pointer;
}
.cal-nav:disabled { opacity: 0.35; cursor: default; }
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cal-dow {
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--muted);
  padding: 8px 0;
}
.cal-dow.sun { color: var(--rakuten); }
.cal-dow.sat { color: #0b5fa5; }
.cal-cell {
  min-height: 72px;
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px 4px 4px;
  text-align: center;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.cal-cell .d { font-size: 17px; font-weight: 700; line-height: 1.3; }
.cal-cell .s { font-size: 8px; color: var(--star); font-weight: 700; line-height: 1.2; letter-spacing: -1px; white-space: nowrap; max-width: 100%; overflow: hidden; }
.cal-cell .t {
  font-size: 11px;
  line-height: 1.25;
  color: var(--ink-soft);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-cell.sun .d { color: var(--rakuten); }
.cal-cell.sat .d { color: #0b5fa5; }
.cal-cell.today { border: 2px solid var(--gold); background: var(--gold-soft); }
.cal-cell.selected { outline: 3px solid var(--gold); outline-offset: -1px; }
.cal-cell.empty { background: transparent; border: none; cursor: default; }
.cal-cell.has-star { background: #fffdf5; }

/* 経済圏フィルター（下部・親指の範囲） */
.econ-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + 8px);
  z-index: 20;
  background: rgba(255,255,255,0.97);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin: 18px 0 0;
  box-shadow: 0 4px 16px rgba(90, 60, 10, 0.15);
}
.econ-bar button {
  flex: 1 0 auto;
  min-height: 48px;
  min-width: 64px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  border: 2px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px 14px;
}
.econ-bar button[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }

/* ジャンルフィルター（マイカレンダー。カレンダーの上に置き、選択は端末に保存される） */
.genre-label { font-size: 16px; font-weight: 700; margin: 16px 0 8px; }
.genre-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}
.genre-bar button {
  flex: 1 1 auto;
  min-height: 48px;
  min-width: 96px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 8px 16px;
}
.genre-bar button[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); color: var(--gold); }

/* 日の詳細 */
.day-detail { margin-top: 18px; }
.day-detail .when { font-size: 15px; color: var(--muted); }
.four { margin: 10px 0 0; padding-left: 0; list-style: none; }
.four li { margin-bottom: 6px; }
.four li b { display: inline-block; min-width: 7em; }
.deadline { font-weight: 700; color: var(--rakuten); }

/* 商品リスト（ベストバイ） */
.item-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.item-head h3 { margin: 0; flex: 1 1 60%; }
.item-price { font-size: 19px; font-weight: 700; white-space: nowrap; }
.item-meta { font-size: 15px; color: var(--muted); margin: 4px 0 10px; }
.benefit { border-top: 1px dashed var(--line); margin-top: 12px; padding-top: 12px; }
.benefit .row { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; }
.benefit .row + .row { margin-top: 4px; }

/* 順位リスト（最も得な日） */
.rank { display: flex; gap: 12px; align-items: flex-start; }
.rank .no {
  flex: 0 0 44px;
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  background: var(--gold-soft);
  border: 1px solid #ecd28f;
  border-radius: 50%;
}
.rank .body { flex: 1; min-width: 0; }
.rank .body h3 { margin: 0 0 4px; }

/* 下部ナビ（主要導線はここだけ。隠しメニューなし） */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #fff;
  border-top: 2px solid var(--line);
  display: flex;
  height: var(--nav-h);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-soft);
  text-decoration: none;
  line-height: 1.2;
}
.bottom-nav a[aria-current="page"] { color: var(--gold); }
.bottom-nav a .ico { font-size: 20px; line-height: 1; }

footer.site-foot {
  margin-top: 44px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  h1 { font-size: 26px; }
  h2 { font-size: 21px; }
  .cal-cell { min-height: 64px; }
  .cal-cell .t { display: none; }
}
