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

:root {
  /* 背景・紙 */
  --bg: #f7f5ef;
  --surface: #ffffff;
  --surface-soft: #faf8f2;

  /* 緑 */
  --green: #5b8468;
  --green-light: #7aa287;
  --green-pale: #edf3ec;
  --green-line: #e2e8dd;

  /* テキスト */
  --ink: #3a463c;
  --ink-soft: #4a6152;
  --ink-faint: #8b9784;
  --ink-ghost: #9aa595;

  /* アクセント(杏色) */
  --apricot: #dd9550;
  --apricot-pale: #faf0e2;
  --apricot-line: #eedbbd;

  /* 項目カラー */
  --c-water: #4d8494;  --c-water-bg: #e9f1f3;
  --c-sun:   #b5842e;  --c-sun-bg:   #faf0d4;
  --c-temp:  #c06a5e;  --c-temp-bg:  #f7e0dc;

  /* 季節色(既存) */
  --spring: #5a9e6f;
  --summer: #d47c2a;
  --autumn: #8a6e3a;
  --winter: #4a7c97;

  /* 形状 */
  --radius-card: 20px;
  --radius-inset: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 12px 28px -16px rgba(91,132,104,.5);

  /* フォント */
  --font-head: 'Zen Maru Gothic', 'Hiragino Sans', sans-serif;
  --font-body: 'M PLUS Rounded 1c', -apple-system, 'Hiragino Sans', sans-serif;
  --serif: 'Shippori Mincho', 'Hiragino Mincho ProN', Georgia, serif;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.8;
  font-weight: 500;
}

/* ── ヘッダー ── */
.header {
  background: linear-gradient(160deg, var(--green-light), var(--green));
  color: #fff;
  padding: 24px 18px 34px;
  position: relative;
  overflow: hidden;
}
.header-leaf {
  position: absolute; right: -14px; top: -16px;
  width: 150px; transform: rotate(24deg);
  pointer-events: none;
}
.header-inner {
  max-width: 720px; margin: 0 auto; position: relative;
  display: flex; align-items: center; gap: 14px;
  cursor: pointer;
}
.header-usune {
  width: 60px; height: 60px; object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.12));
  animation: float 4s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .header-usune { animation: none; } }
.brand {
  font-family: var(--serif);
  font-size: 13px; letter-spacing: 0.28em; opacity: 0.92; font-weight: 400;
}
.header h1 {
  font-family: var(--font-head);
  font-size: 23px; font-weight: 900; letter-spacing: 0.08em;
  margin-top: 1px; line-height: 1.3;
}
.tagline { font-size: 12px; opacity: 0.85; margin-top: 1px; letter-spacing: 0.05em; }

.main { max-width: 720px; margin: 0 auto; padding: 0 20px 40px; }

/* ── 検索 ── */
.search-section { position: relative; margin: -26px 0 16px; z-index: 40; }
.search-box { position: relative; }
.search-box::before {
  content: "";
  position: absolute; left: 17px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px; pointer-events: none;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="none" stroke="%239aa595" stroke-width="2.4" stroke-linecap="round" d="M10.5 4a6.5 6.5 0 1 1 0 13 6.5 6.5 0 0 1 0-13zM15.5 15.5 20 20"/></svg>') no-repeat center / contain;
}
.search-box input {
  width: 100%; padding: 15px 18px 15px 44px; font-size: 15px;
  font-family: var(--font-body); font-weight: 500;
  border: 1px solid var(--green-line); border-radius: var(--radius-pill);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  -webkit-appearance: none; appearance: none;
  color: var(--ink);
}
.search-box input:focus { outline: none; border-color: var(--green); }
.search-box input::placeholder { color: var(--ink-ghost); font-size: 13.5px; }

.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: var(--surface); border-radius: var(--radius-inset); overflow: hidden;
  box-shadow: 0 14px 34px -10px rgba(58,70,60,0.28);
  border: 1px solid var(--green-line);
}
.search-results:empty { display: none; }
.search-result-item {
  display: block; width: 100%; text-align: left;
  padding: 12px 17px; border: none; background: transparent;
  font-size: 14.5px; cursor: pointer; border-bottom: 1px solid #f1efe7;
  font-family: var(--font-body); font-weight: 500; color: var(--ink);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item:active { background: var(--green-pale); }
.search-result-item .sub { font-size: 11px; color: var(--ink-ghost); margin-left: 8px; }
.search-result-item.generic-item .name { color: var(--ink-soft); }
.search-result-item.faq-result .faq-q { display: block; font-size: 12.5px; color: var(--ink-faint); margin-top: 1px; }
.search-result-item.aspect-result { background: var(--green-pale); }
.search-result-item.aspect-result:hover, .search-result-item.aspect-result:active { background: #e2ece2; }
.search-result-item.aspect-result .flash { font-weight: 800; color: var(--ink-soft); }
.search-noresult { padding: 15px 17px; font-size: 13px; color: var(--ink-faint); }
.search-noresult button {
  color: var(--green); background: none; border: none; font-size: 13px;
  text-decoration: underline; cursor: pointer; padding: 0; font-family: var(--font-body); font-weight: 700;
}

/* ── 知りたいことから探す ── */
.aspect-row { margin: 18px 0 16px; }
.aspect-row-title { font-size: 12px; color: var(--ink-faint); font-weight: 700; letter-spacing: 0.08em; margin-bottom: 8px; }
.aspect-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.aspect-chip {
  padding: 8px 15px; border-radius: var(--radius-pill);
  border: 1px solid var(--green-line); background: var(--surface);
  font-size: 13px; font-weight: 700; color: var(--ink-soft);
  cursor: pointer; font-family: var(--font-body);
  box-shadow: 0 2px 8px -4px rgba(91,132,104,0.3);
}
.aspect-chip:active { background: var(--green-pale); }
.aspect-chip.warn { background: var(--apricot-pale); border-color: var(--apricot-line); color: #a5713a; }

/* ── ブロック共通 ── */
.section-block {
  background: var(--surface);
  border: 1px solid var(--green-line);
  border-radius: var(--radius-card);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.block-title {
  font-family: var(--font-head);
  font-size: 16px; font-weight: 700; color: var(--ink-soft);
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

/* ── みんなが調べてる ── */
.featured-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.featured-card {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 8px 12px;
  background: var(--surface-soft);
  border: 1px solid var(--green-line); border-radius: var(--radius-inset);
  cursor: pointer; font-family: var(--font-body);
}
.featured-card:active { background: var(--green-pale); }
.featured-thumb {
  width: 64px; height: 64px; border-radius: 50%;
  background: #eceae2; color: var(--ink-ghost);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; overflow: hidden;
}
.featured-thumb img { width: 100%; height: 100%; object-fit: cover; }
.featured-name { font-size: 12.5px; font-weight: 800; color: var(--ink); text-align: center; line-height: 1.4; }
.featured-sub { font-size: 10.5px; color: var(--ink-faint); }

/* ── トラブルリスト ── */
.trouble-list { display: flex; flex-direction: column; gap: 8px; }
.trouble-item {
  border: 1px solid var(--green-line); border-radius: var(--radius-inset); overflow: hidden;
  background: var(--surface);
}
.trouble-item.open { border-color: #cfdccb; background: var(--surface-soft); }
.trouble-q {
  display: block; width: 100%; text-align: left; padding: 12px 38px 12px 15px;
  background: transparent; border: none; font-size: 14px; font-weight: 700;
  color: var(--ink); cursor: pointer; font-family: var(--font-body); position: relative;
  line-height: 1.55;
}
.trouble-q::after {
  content: ""; position: absolute; right: 16px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--ink-faint); border-bottom: 2px solid var(--ink-faint);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s ease;
}
.trouble-item.open .trouble-q::after { transform: translateY(-30%) rotate(225deg); }
.trouble-a { display: none; padding: 2px 15px 14px; font-size: 13.5px; color: var(--ink); }
.trouble-item.open .trouble-a { display: block; }
.trouble-a p { margin-bottom: 7px; padding-left: 14px; position: relative; }
.trouble-a p::before { content: ""; position: absolute; left: 2px; top: 0.75em; width: 6px; height: 6px; border-radius: 50%; background: var(--green-light); }
.trouble-a .trouble-caveat { font-size: 12px; color: var(--ink-ghost); padding-left: 0; }
.trouble-a .trouble-caveat::before { content: none; }

/* ── 植物リスト ── */
.list-group { margin-bottom: 12px; }
.list-group-title {
  font-size: 12px; color: var(--ink-faint); font-weight: 700;
  letter-spacing: 0.1em; margin: 8px 0 8px;
}
.plant-list { display: flex; flex-wrap: wrap; gap: 8px; }
.plant-chip {
  padding: 8px 14px;
  border: 1px solid var(--green-line); border-radius: var(--radius-pill);
  background: var(--surface); font-size: 13px; font-weight: 500;
  cursor: pointer; font-family: var(--font-body); color: var(--ink);
}
.plant-chip:active { background: var(--green-pale); }
.plant-chip.generic { background: var(--green-pale); color: var(--ink-soft); font-weight: 700; }

/* ══ カード/答え先出しビュー 共通 ══ */
.card-view { margin-bottom: 16px; animation: rise 0.25s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.view-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0 10px;
}
.card-back-btn {
  background: none; border: none; color: var(--green); font-size: 13.5px;
  font-weight: 800; cursor: pointer; padding: 4px 0; font-family: var(--font-body);
}
.view-head .mini-logo { font-family: var(--serif); font-size: 12px; letter-spacing: 0.28em; color: var(--ink-faint); }

/* バッジ行 */
.badge-row { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 800; padding: 4px 12px;
  border-radius: var(--radius-pill); letter-spacing: 0.03em;
}
.badge.instant { background: var(--green-pale); color: var(--ink-soft); }
.badge.water { background: var(--c-water-bg); color: var(--c-water); }
.badge.sun   { background: var(--c-sun-bg);   color: var(--c-sun); }
.badge.temp  { background: var(--c-temp-bg);  color: var(--c-temp); }
.badge.repot, .badge.winter, .badge.fert { background: var(--green-pale); color: var(--ink-soft); }
.badge.winter { background: #e8eff4; color: var(--winter); }

/* タイトル */
.view-title {
  font-family: var(--font-head);
  font-size: 24px; font-weight: 900; color: var(--ink-soft);
  line-height: 1.35; letter-spacing: 0.03em;
}
.view-title .type-chip {
  display: inline-block; vertical-align: middle;
  font-size: 11px; font-weight: 700; padding: 3px 11px; margin-left: 8px;
  border-radius: var(--radius-pill); background: var(--green-pale); color: var(--ink-soft);
  font-family: var(--font-body); letter-spacing: 0.02em;
}
.view-sciname {
  font-family: var(--serif); font-style: italic;
  font-size: 12.5px; color: var(--ink-ghost); margin: 2px 0 12px; letter-spacing: 0.05em;
}

/* 季節チップ */
.season-chips { display: flex; gap: 7px; margin-bottom: 12px; flex-wrap: wrap; }
.season-chip {
  padding: 7px 15px; border-radius: var(--radius-pill);
  border: 1px solid var(--green-line); background: var(--surface);
  font-size: 12.5px; font-weight: 700; color: var(--ink-faint);
  cursor: pointer; font-family: var(--font-body);
}
.season-chip.selected { background: var(--green); border-color: var(--green); color: #fff; }
/* 選択中の季節はその季節の色に(春=緑/夏=橙/秋=茶/冬=青) */
.season-chip.selected.spring { background: var(--spring); border-color: var(--spring); }
.season-chip.selected.summer { background: var(--summer); border-color: var(--summer); }
.season-chip.selected.autumn { background: var(--autumn); border-color: var(--autumn); }
.season-chip.selected.winter { background: var(--winter); border-color: var(--winter); }
.season-chip.now { border-color: var(--apricot); color: #b06f2c; }
.season-chip.now.selected { color: #fff; }
.season-chip .now-mark { font-size: 10px; opacity: 0.9; margin-left: 2px; }

/* 本文インセット */
.answer-inset {
  background: var(--surface-soft); border-radius: var(--radius-inset);
  padding: 15px 16px; margin-bottom: 12px;
}
.answer-main { font-size: 15.5px; font-weight: 700; color: var(--ink); line-height: 1.9; }
.answer-others { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--green-line); }
.answer-others-title { font-size: 11.5px; font-weight: 800; color: var(--ink-faint); letter-spacing: 0.06em; margin-bottom: 4px; }

/* ケア行(ラベル+値) */
.care-row { display: flex; gap: 10px; font-size: 13.5px; padding: 3px 0; align-items: baseline; }
.care-label {
  flex-shrink: 0; width: 58px; font-weight: 800; font-size: 12.5px;
  color: var(--ink-faint);
}
.care-label.water { color: var(--c-water); }
.care-label.sun   { color: var(--c-sun); }
.care-label.temp  { color: var(--c-temp); }
.care-label.fert  { color: var(--green); }

/* FAQ添え・見分け */
.answer-faq {
  background: var(--surface-soft); border: 1px solid var(--green-line);
  border-radius: var(--radius-inset); padding: 12px 15px; margin-bottom: 12px;
}
.answer-faq-title { font-size: 11.5px; font-weight: 800; color: var(--ink-faint); letter-spacing: 0.06em; margin-bottom: 3px; }
.answer-faq .q { font-weight: 800; color: var(--ink-soft); font-size: 13.5px; }
.answer-faq .a { font-size: 13.5px; margin-top: 2px; }

/* 育て方全体を見るボタン */
.fullcare-btn {
  display: block; width: 100%; padding: 14px;
  background: var(--green); color: #fff; border: none; border-radius: 14px;
  font-size: 15px; font-weight: 800; cursor: pointer; font-family: var(--font-body);
  letter-spacing: 0.05em; margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.fullcare-btn:active { background: #4d7159; }

/* ══ 育て方全体ビュー ══ */
.care-card {
  background: var(--surface); border: 1px solid var(--green-line);
  border-radius: var(--radius-card); padding: 16px 17px;
  margin-bottom: 14px; box-shadow: var(--shadow-card);
}
.care-card-title {
  font-family: var(--font-head);
  font-size: 15px; font-weight: 700; color: var(--ink-soft);
  letter-spacing: 0.05em; margin-bottom: 10px;
}
.care-card.notes { background: #fdf9f3; border-color: var(--apricot-line); }
.care-card.notes .care-card-title { color: #a5713a; }
.care-card.flower .care-card-title { color: #8a6e9e; }

/* セクションチップ(アンカー) */
.section-chips { display: flex; gap: 7px; margin-bottom: 14px; flex-wrap: wrap; }
.section-chip {
  padding: 7px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--green-line); background: var(--surface);
  font-size: 12px; font-weight: 700; color: var(--ink-faint);
  cursor: pointer; font-family: var(--font-body);
}
.section-chip.selected { background: var(--green); border-color: var(--green); color: #fff; }

/* ポイント */
.point-list li {
  list-style: none; padding: 4px 0 4px 18px; position: relative; font-size: 14px;
}
.point-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.85em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
}
.care-card.notes .point-list li::before { background: var(--apricot); }
.care-card.flower .point-list li::before { background: #8a6e9e; }

/* 基本情報 */
.info-row { display: flex; gap: 10px; font-size: 13.5px; padding: 3px 0; }
.info-label { flex-shrink: 0; min-width: 5em; font-weight: 800; font-size: 12.5px; color: var(--ink-faint); }

/* 季節別ケア: デスクトップは2×2 */
.season-grid-wide { display: none; }
@media (min-width: 560px) {
  .season-single { display: none; }
  .season-grid-wide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .season-box { border-radius: 12px; overflow: hidden; border: 1px solid var(--green-line); }
  .season-box-header { color: #fff; font-weight: 800; font-size: 12.5px; padding: 5px 13px; font-family: var(--font-body); }
  .season-box.spring .season-box-header { background: var(--spring); }
  .season-box.summer .season-box-header { background: var(--summer); }
  .season-box.autumn .season-box-header { background: var(--autumn); }
  .season-box.winter .season-box-header { background: var(--winter); }
  .season-box-body { padding: 9px 12px; background: var(--surface); }
}

/* FAQアコーディオン(care-card内) */
.faq-highlight { animation: faqFlash 2s ease; }
@keyframes faqFlash { 0%, 35% { background: #fbf0cf; } 100% { background: transparent; } }

/* 関連リンク */
.links-card {
  background: #fdfcf8; border: 1px solid #eceadf;
  border-radius: 14px; padding: 14px 16px; margin-bottom: 14px;
}
.links-title { font-size: 12px; font-weight: 800; color: var(--ink-faint); letter-spacing: 0.06em; margin-bottom: 8px; }
.link-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; font-size: 13.5px; text-decoration: none; color: var(--ink-soft);
  border-bottom: 1px dashed #eceadf;
}
.link-item:last-child { border-bottom: none; }
.link-item .pr-badge {
  font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 6px;
  background: #f2f0e8; color: #a39f8d; flex-shrink: 0;
}

/* ══ AI相談セクション ══ */
.ai-section { background: linear-gradient(170deg, #f3f7f2 0%, var(--surface) 35%); }
.ai-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.ai-head .block-title { margin-bottom: 2px; }
.ai-head .ai-note { margin-bottom: 0; }
.ai-usune {
  width: 76px; height: 76px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,0.08));
}
.ai-section textarea {
  width: 100%; padding: 13px 15px; font-size: 15px;
  border: 1px solid var(--green-line); border-radius: var(--radius-inset);
  resize: vertical; font-family: var(--font-body); font-weight: 500; background: var(--surface);
  line-height: 1.7; color: var(--ink);
}
.ai-section textarea:focus { outline: none; border-color: var(--green); }
.ai-section textarea::placeholder { color: var(--ink-ghost); }
.ai-note { font-size: 12.5px; color: var(--ink-faint); margin-bottom: 10px; }
.ai-context-tag {
  display: inline-block; background: var(--green-pale); color: var(--ink-soft);
  font-size: 12px; font-weight: 800; padding: 4px 13px; border-radius: var(--radius-pill);
  margin-bottom: 10px;
}
.ai-btn {
  display: block; width: 100%; margin-top: 12px; padding: 14px;
  background: var(--green); color: #fff; border: none; border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 800; cursor: pointer; font-family: var(--font-body);
  letter-spacing: 0.1em; box-shadow: var(--shadow-card);
}
.ai-btn:disabled { background: #c3ccbf; box-shadow: none; }
.ai-btn:active:not(:disabled) { background: #4d7159; }
.ai-quota { font-size: 12px; color: var(--ink-ghost); margin-top: 8px; text-align: right; font-weight: 700; }
.ai-quota button {
  background: none; border: none; color: var(--green); font-size: 12px; font-weight: 700;
  text-decoration: underline; cursor: pointer; font-family: var(--font-body); padding: 0;
}
.ai-answer {
  margin-top: 14px; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--green-line);
  border-left: 4px solid var(--green);
  border-radius: var(--radius-inset); font-size: 14px; white-space: pre-wrap;
}
.ai-answer.error { background: #fdf3f2; border-color: #e9cbc7; border-left-color: #c06a5e; color: #9c4038; }
.ai-answer .ai-label {
  font-size: 11px; font-weight: 800; color: var(--ink-faint);
  display: block; margin-bottom: 5px; letter-spacing: 0.12em;
}

/* ── フッター ── */
.footer {
  text-align: center; padding: 24px 16px 40px; color: var(--ink-faint); font-size: 12px;
}
.brand-footer {
  font-family: var(--serif); font-weight: 400;
  letter-spacing: 0.28em; font-size: 14px; color: var(--ink-soft);
}
.footer-leafline {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px;
}
.footer-leafline::before, .footer-leafline::after {
  content: ""; height: 1px; width: 54px; background: var(--green-line);
}
.leaf-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-light); display: inline-block; }
