:root {
  --green-900: #1b4d2e;
  --green-700: #2e7d46;
  --green-500: #43a047;
  --green-100: #e8f5e9;
  --green-50: #f4faf4;
  --sand: #faf7f0;
  --ink: #263228;
  --ink-soft: #5c6b5e;
  --card: #ffffff;
  --line: #e3ece3;
  --accent: #e57339;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(27, 77, 46, 0.05), 0 8px 24px rgba(27, 77, 46, 0.08);
  --shadow-lift: 0 2px 4px rgba(27, 77, 46, 0.06), 0 14px 34px rgba(27, 77, 46, 0.16);
  --border: 1px solid rgba(27, 77, 46, 0.07);
  --font-head: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  background: #dce6dc;
  color: var(--ink);
  line-height: 1.7;
}

h1, h2, h3, .brand-name, .featured-name {
  font-family: var(--font-head);
}

/* ページ表示アニメーション */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.view > * { animation: fadeUp .45s ease both; }
.view > *:nth-child(2) { animation-delay: .05s; }
.view > *:nth-child(3) { animation-delay: .1s; }
.view > *:nth-child(4) { animation-delay: .15s; }
.view > *:nth-child(5) { animation-delay: .2s; }
/* #paperModalRoot（や他のモーダル用コンテナ）はアニメーションを与えない。
   animation-fill-mode:both だと終了後も transform:translateY(0) が
   要素に残り続け、position:fixed の子要素がビューポートではなく
   この要素基準で配置される（CSSの仕様上、transformを持つ要素は
   fixed子孫の基準点になる）ため、モーダルが画面中の変な位置に
   表示されてしまう不具合の原因だった。 */
.view > #paperModalRoot { animation: none; transform: none; }

/* 実写真（絵文字プレースホルダーの上に重ねる） */
img.ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--sand);
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.15);
}

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(40, 106, 61, 0.86);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  color: #fff;
}

.brand { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.brand-icon { display: flex; }
.brand-icon svg { width: 38px; height: 38px; filter: drop-shadow(0 2px 5px rgba(10, 30, 18, .35)); }

/* SVGアイコン共通 */
.ic { display: inline-flex; vertical-align: -4px; }
.ic svg { width: 21px; height: 21px; }
.page-title .ic svg { width: 25px; height: 25px; }
.eb-title .ic svg { width: 19px; height: 19px; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.chip-icon { display: inline-flex; vertical-align: -3.5px; margin-right: 4px; }
.chip-icon svg { width: 15px; height: 15px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-size: 18px; font-weight: 900; letter-spacing: .1em; text-shadow: 0 1px 4px rgba(10, 30, 18, .3); }
.brand-accent { color: #ffd45c; margin-left: 1px; }
.brand-sub { font-size: 8.5px; font-weight: 600; letter-spacing: .26em; opacity: .78; }

.ec-chip {
  flex-shrink: 0;
  background: linear-gradient(135deg, #f0975f, var(--accent));
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 3px 10px rgba(198, 90, 32, .35);
}
.ec-chip:active { transform: scale(.96); }

/* ---------- Main view ---------- */
.view {
  flex: 1;
  padding: 16px 16px 118px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 10px;
}
.section-title h2 {
  font-size: 17px;
  color: var(--green-900);
}
.section-title .more {
  font-size: 12px;
  color: var(--green-700);
  text-decoration: none;
  font-weight: 600;
}

.page-title { font-size: 20px; color: var(--green-900); margin: 4px 0 4px; }
.page-lead { font-size: 13px; color: var(--ink-soft); margin-bottom: 14px; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}

/* ---------- Home ---------- */
.hero {
  background-color: var(--green-700);
  background-image:
    linear-gradient(96deg, rgba(16, 52, 30, .90) 0%, rgba(22, 66, 38, .72) 42%, rgba(22, 66, 38, .18) 78%, rgba(16, 52, 30, .30) 100%),
    url("../img/hero_taiyounoha.jpg");
  background-size: cover;
  background-position: center 32%;
  border-radius: var(--radius);
  color: #fff;
  padding: 26px 18px;
  min-height: 258px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}
.hero h1, .hero p { text-shadow: 0 1px 10px rgba(10, 30, 18, .5); }
.hero h1 { font-size: 21px; line-height: 1.45; margin-bottom: 6px; }
.hero p { font-size: 13px; opacity: .95; }
.hero .concept {
  display: inline-block;
  margin-top: 12px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.feature-cell {
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 6px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.feature-cell .fi { display: flex; justify-content: center; margin-bottom: 5px; }
.feature-cell .fi svg { width: 34px; height: 34px; }
.feature-cell { transition: transform .2s ease, box-shadow .2s ease; }
.feature-cell:active { transform: scale(.97); }
@media (hover: hover) {
  .feature-cell:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
  .column-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
}
.column-card { transition: transform .2s ease, box-shadow .2s ease; }

/* recipe cards */
.recipe-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 2px;
}
.recipe-scroll .recipe-card { scroll-snap-align: start; }
.recipe-scroll::-webkit-scrollbar { display: none; }

.recipe-card {
  flex: 0 0 158px;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease;
}
.recipe-card:active { transform: scale(.97); }
@media (hover: hover) {
  .recipe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
}
.recipe-thumb {
  height: 104px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  position: relative;
  overflow: hidden;
}
.recipe-card .rc-body { padding: 8px 10px 10px; }
.recipe-card .rc-name { font-size: 13px; font-weight: 700; line-height: 1.4; }
.recipe-card .rc-meta { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }

/* recipe list (recipes page) */
.recipe-row {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  margin-bottom: 10px;
}
.recipe-row { transition: transform .2s ease, box-shadow .2s ease; }
.recipe-row:active { transform: scale(.985); }
@media (hover: hover) {
  .recipe-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
}
.recipe-row .thumb {
  flex: 0 0 96px;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  position: relative;
  overflow: hidden;
}
.recipe-row .body { padding: 10px 12px 10px 0; flex: 1; min-width: 0; }
.recipe-row .name { font-size: 14px; font-weight: 700; }
.recipe-row .catch { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }
.recipe-row .meta { font-size: 11px; color: var(--green-700); margin-top: 5px; font-weight: 600; }
.recipe-row .fav-mark { color: #e5486a; }

/* ---------- Recipe detail ---------- */
.detail-hero {
  border-radius: var(--radius);
  height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}

/* ---------- 今週のおすすめ（大型カード） ---------- */
.featured-card {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
  margin-top: 16px;
  text-decoration: none;
  height: 210px;
  transition: transform .2s ease;
}
.featured-card:active { transform: scale(.98); }
@media (hover: hover) {
  .featured-card:hover .featured-media img.ph { transform: scale(1.05); }
}
.featured-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}
.featured-media img.ph { transition: transform .5s ease; }
.featured-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(15, 40, 24, .82) 0%, rgba(15, 40, 24, .25) 55%, transparent 100%);
  color: #fff;
}
.featured-label {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, .22);
  border: 1px solid rgba(255, 255, 255, .45);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 7px;
}
.featured-name { font-size: 17px; font-weight: 700; line-height: 1.45; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.featured-meta { font-size: 12px; opacity: .95; margin-top: 3px; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.detail-head h1 { font-size: 20px; color: var(--green-900); line-height: 1.4; }
.fav-btn {
  flex-shrink: 0;
  border: 1.5px solid #e5486a;
  background: #fff;
  color: #e5486a;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 7px 13px;
  cursor: pointer;
}
.fav-btn.on { background: #e5486a; color: #fff; }

.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--green-100);
  color: var(--green-900);
  border-radius: 999px;
  padding: 3px 10px;
}
.badge.warm { background: #fdeee2; color: #a9541f; }

.detail-section h3 {
  font-size: 15px;
  color: var(--green-900);
  border-left: 4px solid var(--green-500);
  padding-left: 8px;
  margin: 20px 0 8px;
}

ul.ingredients { list-style: none; }
ul.ingredients li {
  padding: 8px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}

ol.steps { list-style: none; counter-reset: step; }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding: 0 0 14px 38px;
  font-size: 13.5px;
}
ol.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-500);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.point-box {
  background: var(--green-100);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
}
.point-box strong { color: var(--green-900); }

.guide-inline-link {
  display: block;
  margin-top: 10px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-700);
  text-decoration: none;
  background: #fff;
  border: var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: var(--shadow);
}
.guide-inline-link:active { transform: scale(.98); }
.guide-inline-link .ic svg { width: 17px; height: 17px; }

/* 食べられるお店 */
.shops-banner {
  display: block;
  text-decoration: none;
  color: #fff;
  background:
    radial-gradient(circle at 88% 10%, rgba(255, 212, 92, .35), transparent 45%),
    linear-gradient(135deg, var(--green-900), var(--green-700));
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-lift);
  transition: transform .2s ease;
}
.shops-banner:active { transform: scale(.98); }
.shops-banner .sb-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; }
.shops-banner .sb-sub { font-size: 12px; opacity: .92; margin-top: 3px; }
.shops-banner .sb-cta {
  display: inline-block;
  margin-top: 10px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 16px;
}

#shops-map {
  height: 320px;
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  position: relative;
  z-index: 0;
  background: #e9efe9;
}
.shop-pin {
  background: var(--green-700);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
}
.shop-addr { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }
.shop-menu {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 999px;
  padding: 2px 10px;
  margin-top: 4px;
}
.shop-card.tappable { cursor: pointer; transition: transform .15s ease, box-shadow .2s ease; }
.shop-card.tappable:active { transform: scale(.985); }
@media (hover: hover) {
  .shop-card.tappable:hover { box-shadow: var(--shadow-lift); }
}
.shop-actions {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}
.visit-btn {
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 5px 10px;
  border: 1.5px solid var(--green-500);
  background: #fff;
  color: var(--green-700);
  cursor: pointer;
  text-align: center;
  font-family: inherit;
}
.visit-btn.on {
  background: linear-gradient(135deg, #56b45c, var(--green-700));
  border-color: transparent;
  color: #fff;
}
.visit-progress {
  background: var(--green-100);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--green-900);
  margin-bottom: 10px;
  text-align: center;
}
.visit-progress strong { font-family: var(--font-head); font-size: 16px; }

/* 地図の現在地ボタンと現在地ピン */
.locate-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff;
  border: 2px solid rgba(0, 0, 0, .2);
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
  display: flex;
  align-items: center;
  justify-content: center;
}
.user-pin {
  background: #2e86ab;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(46, 134, 171, .35), 0 2px 6px rgba(0, 0, 0, .3);
}
.shop-map-btn {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--green-900);
  background: var(--green-100);
  border-radius: 999px;
  padding: 6px 13px;
  text-decoration: none;
}
.shop-map-btn:active { transform: scale(.95); }

.shop-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 13px 15px;
  margin-bottom: 9px;
}
.shop-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-900);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shop-thumb {
  position: relative;
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--green-100);
}
.shop-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-thumb .shop-num {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  font-size: 12px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.shop-body { min-width: 0; }
.shop-name { font-size: 14px; font-weight: 700; }
.shop-note { font-size: 11.5px; color: var(--ink-soft); margin-top: 2px; }

/* 作り方動画（縦型ショート埋め込み） */
.video-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.video-frame {
  width: min(64%, 250px);
  aspect-ratio: 9 / 16;
  border: none;
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  background: #000;
}
.video-link {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-700);
  text-decoration: none;
  background: var(--green-100);
  border-radius: 999px;
  padding: 6px 16px;
}

/* 栄養価ビジュアル（レシピ詳細） */
.nutri-visual {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 14px;
}
.nv-kcal {
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nv-kcal-inner {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
}
.nv-num { font-family: var(--font-head); font-size: 21px; font-weight: 900; color: var(--green-900); }
.nv-unit { font-size: 10px; color: var(--ink-soft); font-weight: 700; }
.nv-pct { font-size: 8.5px; color: var(--green-700); font-weight: 700; margin-top: 1px; }
.nv-bars { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.nv-row { display: flex; align-items: center; gap: 7px; }
.nv-label { flex: 0 0 58px; font-size: 10.5px; font-weight: 700; color: var(--ink-soft); }
.nv-track { flex: 1; height: 8px; border-radius: 999px; background: #eef3ee; overflow: hidden; }
.nv-fill { height: 100%; border-radius: 999px; animation: nvGrow .8s cubic-bezier(.2,.7,.3,1) both; }
@keyframes nvGrow { from { width: 0; } }
.nv-val { flex: 0 0 52px; text-align: right; line-height: 1.25; font-size: 11.5px; font-weight: 700; color: var(--ink); }
.nv-val small { font-size: 9px; color: var(--ink-soft); font-weight: 600; margin-left: 1px; }
.nv-val em { display: block; font-style: normal; font-size: 9px; font-weight: 700; color: var(--green-700); }

.note { font-size: 11px; color: var(--ink-soft); margin-top: 8px; }

/* ---------- EC banner ---------- */
.ec-banner {
  display: block;
  text-decoration: none;
  background: linear-gradient(135deg, #e57339, #f0975f);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin: 14px 0;
}
.ec-banner .eb-title { font-size: 15px; font-weight: 700; }
.ec-banner .eb-sub { font-size: 12px; opacity: .95; margin-top: 3px; }
.ec-banner .eb-cta {
  display: inline-block;
  margin-top: 10px;
  background: #fff;
  color: #c65a20;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 16px;
}
.ec-banner:active { transform: scale(.98); }

/* ---------- Guide ---------- */
.guide-card { margin-bottom: 12px; }
.guide-card h3 { font-size: 15px; color: var(--green-900); margin-bottom: 8px; }
.guide-card p { font-size: 13.5px; margin-bottom: 6px; }

details.faq {
  background: var(--card);
  border-radius: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 8px;
  overflow: hidden;
}
details.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 14px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--green-900);
  display: flex;
  gap: 8px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before { content: "Q."; color: var(--green-500); font-weight: 800; }
details.faq .answer {
  padding: 0 14px 13px 36px;
  font-size: 13px;
  color: var(--ink);
}

/* ---------- Nutrition ---------- */
.nutri-bar-row { margin-bottom: 14px; }
.nutri-bar-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.nutri-bar-head .v { font-weight: 700; color: var(--green-900); }
.nutri-bar-track { background: var(--green-100); border-radius: 999px; height: 10px; overflow: hidden; }
.nutri-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--green-500), var(--green-700)); }
.nutri-bar-note { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

.supervisor-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #eef4fb;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 12.5px;
}
.supervisor-box .si { font-size: 22px; }

/* ---------- News & Papers（外部API連携） ---------- */
.news-row {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.news-row:active { transform: scale(.985); }
.news-row-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 5px;
}
.news-row-title { font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.news-row-meta { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }

.news-updated {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-bottom: 4px;
}
.news-updated-notice {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.news-tabs { display: flex; gap: 8px; margin: 4px 0 14px; }
.news-tab-btn {
  flex: 1;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 0;
  border-radius: 999px;
  border: var(--border);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
}
.news-tab-btn.active { background: var(--green-700); color: #fff; border-color: transparent; }

.news-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border: var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.news-card.clickable { cursor: pointer; }
.news-card:active { transform: scale(.985); }
.news-card-kw {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 6px;
}
.news-card-title { font-size: 14px; font-weight: 700; line-height: 1.5; }
.news-card-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; font-size: 11px; color: var(--ink-soft); margin-top: 7px; }
.detail-hint { font-weight: 700; color: var(--green-700); }
.news-card-abstract { font-size: 12.5px; color: var(--ink); margin-top: 6px; line-height: 1.7; }
.news-card-abstract.muted { color: var(--ink-soft); font-style: italic; }

/* AI要約ブロック（一覧・詳細モーダル共通） */
.ai-summary {
  margin: 8px 0 2px;
  padding: 10px 12px;
  background: var(--green-100);
  border-left: 3px solid var(--green-500);
  border-radius: 8px;
  font-size: 12.5px;
  line-height: 1.75;
}
.ai-summary .ai-tag {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green-900);
  margin-bottom: 4px;
}
.ai-summary.generating { color: var(--ink-soft); }
.retry-btn {
  margin-left: 8px;
  padding: 3px 12px;
  border: 1px solid var(--green-500);
  background: #fff;
  color: var(--green-700);
  border-radius: 999px;
  cursor: pointer;
  font-size: 11.5px;
  font-family: inherit;
}

/* 論文詳細モーダル */
.paper-modal {
  position: fixed;
  inset: 0;
  background: rgba(30, 40, 25, .5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.paper-modal-inner {
  background: var(--sand);
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  padding: 20px 20px 26px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3);
}
.modal-close {
  float: right;
  border: var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 11.5px;
  font-family: inherit;
  color: var(--ink-soft);
}
.modal-title { font-size: 15.5px; line-height: 1.55; margin: 10px 0 8px; clear: both; }
/* 英語原題（日本語タイトルの直下に控えめに併記） */
.modal-title-en { font-size: 11.5px; line-height: 1.5; color: var(--ink-soft); margin: -4px 0 10px; }
.modal-meta { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 8px; }
.modal-links { font-size: 12px; margin-bottom: 6px; display: flex; gap: 14px; flex-wrap: wrap; }
.modal-links a { color: var(--green-700); }
.modal-h3 { font-size: 13px; margin: 16px 0 6px; color: var(--green-900); }
.modal-abstract { font-size: 12.5px; line-height: 1.8; color: var(--ink); }
.modal-abstract.muted { color: var(--ink-soft); }

/* 英語原文の折りたたみ（初期状態は閉じる） */
.abstract-original { margin-top: 16px; }
.abstract-original > summary {
  cursor: pointer;
  font-size: 12.5px;
  color: var(--green-700);
  padding: 8px 0;
  list-style: none;
  user-select: none;
}
.abstract-original > summary::-webkit-details-marker { display: none; }
.abstract-original > summary::before { content: "▼ "; font-size: 10px; }
.abstract-original[open] > summary::before { content: "▲ "; }
.abstract-original > .modal-abstract { padding-top: 4px; }

/* ---------- エビデンス評価 ---------- */
/* 一覧カード：タイトルと🌵AI要約を圧迫しないよう1行に収める */
.evidence-compact {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.5;
}
.evidence-compact .evidence-score { font-weight: 700; color: var(--green-700); white-space: nowrap; }
.evidence-compact .evidence-label { color: var(--ink-soft); }

/* 詳細画面 */
.evidence-box {
  margin: 16px 0 4px;
  padding: 12px 14px;
  background: var(--green-50);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.evidence-head { font-size: 13px; color: var(--green-900); }
.evidence-head strong { font-size: 15px; color: var(--green-700); }
.evidence-type { font-size: 12.5px; color: var(--ink); margin-top: 2px; }
.evidence-reason { margin-top: 8px; }
.evidence-reason > summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--green-700);
  padding: 4px 0;
  list-style: none;
  user-select: none;
}
.evidence-reason > summary::-webkit-details-marker { display: none; }
.evidence-reason > summary::before { content: "▼ "; font-size: 10px; }
.evidence-reason[open] > summary::before { content: "▲ "; }
.evidence-reason-body { font-size: 12px; line-height: 1.8; color: var(--ink); padding-top: 2px; }
.evidence-note { margin-top: 8px; font-size: 10.5px; line-height: 1.6; color: var(--ink-soft); }

/* ---------- Columns ---------- */
.column-card {
  display: block;
  text-decoration: none;
  color: var(--ink);
  background: var(--card);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.column-card:active { transform: scale(.985); }
.column-card .cat {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  padding: 2px 9px;
}
.column-card h3 { font-size: 14.5px; margin: 7px 0 4px; line-height: 1.5; }
.column-card .lead { font-size: 12px; color: var(--ink-soft); }
.column-card .date { font-size: 10.5px; color: var(--ink-soft); margin-top: 6px; }

.article h1 { font-size: 19px; color: var(--green-900); line-height: 1.5; margin: 6px 0 4px; }
.article .meta { font-size: 11.5px; color: var(--ink-soft); margin-bottom: 14px; }
.article p { font-size: 14px; margin-bottom: 12px; }

/* ---------- Misc ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--green-700);
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 10px;
}

.empty {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 30px 0;
}

.app-footer {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 10.5px;
  color: var(--ink-soft);
  line-height: 1.8;
}

/* ---------- ミニゲーム「かめはめ葉！」 ---------- */
.game-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #4a3a10;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 255, 255, .5), transparent 45%),
    linear-gradient(135deg, #ffe9a8, #f7c86b);
  border: var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.game-banner:active { transform: scale(.98); }
@media (hover: hover) {
  .game-banner:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
}
.gb-emoji { font-size: 34px; }
.gb-body { flex: 1; min-width: 0; }
.gb-title { font-family: var(--font-head); font-size: 15px; font-weight: 700; }
.gb-sub { font-size: 11.5px; opacity: .85; margin-top: 2px; }
.gb-arrow { font-size: 18px; font-weight: 700; }

.game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--green-900);
  padding: 4px 6px 8px;
}
.game-hud strong { font-family: var(--font-head); font-size: 20px; }
#g-combo { color: var(--accent); }

.game-field {
  position: relative;
  height: 320px;
  border-radius: var(--radius);
  border: var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: linear-gradient(#dff0fa 0%, #f3ead2 62%, #ecd9a8 62%, #e2c98f 100%);
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.g-ground {
  position: absolute;
  left: 0; right: 0;
  top: 62%;
  height: 2px;
  background: rgba(138, 106, 42, .35);
}

/* 背景の砂漠デコレーション（ゲームの邪魔にならない薄めの彩度） */
.g-bg { position: absolute; inset: 0; pointer-events: none; }
.g-sun {
  position: absolute;
  top: 14px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffefb8, #f7c86b);
  box-shadow: 0 0 26px rgba(247, 200, 107, .6);
}
.g-cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  opacity: .75;
}
.g-cloud.c1 {
  top: 36px;
  left: 14%;
  width: 62px;
  height: 15px;
  box-shadow: 18px -8px 0 2px #fff, 36px -2px 0 0 #fff;
  animation: clouddrift 26s ease-in-out infinite alternate;
}
.g-cloud.c2 {
  top: 74px;
  left: 56%;
  width: 44px;
  height: 12px;
  box-shadow: 14px -7px 0 1px #fff;
  opacity: .55;
  animation: clouddrift 34s ease-in-out infinite alternate-reverse;
}
@keyframes clouddrift {
  from { transform: translateX(-24px); }
  to { transform: translateX(36px); }
}
.g-cactus { position: absolute; }
.g-cactus.gc1 { right: 26px; bottom: 38%; width: 38px; opacity: .55; }
.g-cactus.gc2 { left: 45%; bottom: 38%; width: 34px; opacity: .5; }
.g-cactus.gc3 { right: 100px; bottom: 38%; width: 21px; opacity: .42; }
.g-rock {
  position: absolute;
  background: #cbb387;
  border-radius: 50%;
  box-shadow: inset -2px -2px 3px rgba(122, 94, 41, .35);
}
.g-rock.r1 { width: 17px; height: 9px; bottom: 29%; left: 38%; }
.g-rock.r2 { width: 11px; height: 6px; bottom: 20%; right: 64px; }
.g-kame {
  position: absolute;
  left: 6px;
  bottom: 42px;
  width: 110px;
  transition: transform .1s ease;
}
.g-kame.chomp { animation: chomp .22s ease; }
@keyframes chomp {
  0% { transform: translateX(0); }
  40% { transform: translateX(9px) rotate(-2deg); }
  100% { transform: translateX(0); }
}
.kame-svg { width: 100%; height: auto; display: block; }
.g-hitzone {
  position: absolute;
  left: 100px;
  bottom: 76px;
  width: 46px;
  height: 46px;
  border: 3px dashed rgba(46, 125, 70, .55);
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
}
.g-note {
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 48px;
  will-change: transform;
  filter: drop-shadow(0 3px 4px rgba(27, 77, 46, .3));
}
.g-note svg {
  width: 100%;
  height: 100%;
  display: block;
  animation: leafsway .7s ease-in-out infinite alternate;
}
@keyframes leafsway {
  from { transform: rotate(-7deg); }
  to { transform: rotate(7deg); }
}

/* あごの開閉 */
.kame-jaw-up, .kame-jaw-low {
  transform-box: fill-box;
  transform-origin: left center;
  transition: transform .12s ease;
}
.g-kame.open .kame-jaw-up { transform: rotate(-14deg); }
.g-kame.open .kame-jaw-low { transform: rotate(15deg); }
.g-note.eaten { animation: eaten .25s ease forwards; }
@keyframes eaten {
  to { opacity: 0; scale: .2; }
}
.g-note.dropped { animation: dropped .4s ease forwards; }
@keyframes dropped {
  to { opacity: 0; translate: 0 46px; rotate: 40deg; }
}
.g-judge {
  position: absolute;
  left: 78px;
  bottom: 138px;
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 900;
  text-shadow: 0 1px 0 #fff, 0 2px 6px rgba(0, 0, 0, .12);
  pointer-events: none;
}
.g-judge.pop { animation: judgepop .5s ease; }
@keyframes judgepop {
  0% { transform: translateY(6px) scale(.7); opacity: 0; }
  30% { transform: translateY(0) scale(1.12); opacity: 1; }
  100% { transform: translateY(-8px) scale(1); opacity: .9; }
}
.g-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  background: rgba(250, 247, 240, .88);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  padding: 20px;
  font-size: 13.5px;
}
.g-title { font-family: var(--font-head); font-size: 24px; font-weight: 900; color: var(--green-900); }
.g-rank { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--green-900); }
.g-stats { font-size: 13px; line-height: 1.9; }
.g-stats strong { font-family: var(--font-head); font-size: 19px; color: var(--green-900); }
.g-start {
  font-family: var(--font-head);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #56b45c, var(--green-700));
  border: none;
  border-radius: 999px;
  padding: 11px 30px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(46, 125, 70, .35);
}
.g-start:active { transform: scale(.96); }
.g-start.coupon-link { background: linear-gradient(135deg, #f2a25c, var(--accent)); margin-top: 2px; }

/* パーフェクト達成時のクーポン画面 */
.coupon-confetti { font-size: 26px; animation: confettiPop .6s ease; }
@keyframes confettiPop {
  0% { transform: scale(.4) rotate(-8deg); opacity: 0; }
  60% { transform: scale(1.15) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}
.coupon-card {
  position: relative;
  width: 100%;
  max-width: 280px;
  background: linear-gradient(150deg, #fffdf4, #fdf0d5);
  border: 2px dashed #d9a94a;
  border-radius: 16px;
  padding: 16px 14px 12px;
  box-shadow: var(--shadow-lift);
  animation: couponIn .35s ease;
}
@keyframes couponIn {
  from { transform: scale(.9) translateY(8px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}
.coupon-card::before, .coupon-card::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 16px;
  height: 16px;
  background: var(--sand);
  border-radius: 50%;
  transform: translateY(-50%);
}
.coupon-card::before { left: -9px; }
.coupon-card::after { right: -9px; }
.coupon-ribbon {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  color: #fff;
  background: linear-gradient(135deg, #f2a25c, var(--accent));
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 8px;
}
.coupon-head {
  font-family: var(--font-head);
  font-size: 16.5px;
  font-weight: 900;
  color: var(--green-900);
  line-height: 1.5;
}
.coupon-dash {
  border-top: 2px dashed #d9a94a;
  margin: 10px 0;
}
.coupon-note { font-size: 13px; line-height: 1.7; color: var(--ink); }
.coupon-note strong { color: var(--accent); }
.coupon-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ink-soft);
  margin-top: 10px;
  font-family: "Courier New", monospace;
}

/* ---------- Tab bar（フローティングドック） ---------- */
.tabbar {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 402px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(27, 77, 46, 0.10);
  border-radius: 28px;
  box-shadow: 0 12px 34px rgba(27, 77, 46, 0.20);
  display: flex;
  z-index: 30;
  padding: 6px;
}
.tabbar a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: #93a396;
  font-size: 10px;
  font-weight: 700;
  padding: 7px 0 6px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  border-radius: 22px;
  transition: color .2s ease, background .25s ease;
}
.tabbar a .tab-icon { display: flex; justify-content: center; filter: grayscale(1) opacity(.55); transition: transform .25s ease, filter .2s ease; }
.tabbar a .tab-icon svg { width: 23px; height: 23px; }
.tabbar a.active { color: var(--green-900); background: var(--green-100); }
.tabbar a.active .tab-icon { filter: none; transform: translateY(-1px) scale(1.08); }

/* ---------- モダン化の仕上げ ---------- */
.card, .recipe-card, .recipe-row, .news-card, .column-card, details.faq, .feature-cell {
  border: var(--border);
}
.fav-btn.on {
  background: linear-gradient(135deg, #f06a8a, #e5486a);
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(229, 72, 106, .35);
}
.section-title h2 { letter-spacing: .02em; }
.page-title { letter-spacing: .02em; }
