/* Ayurpedia — アーユルヴェーダ用語事典
   カラーはすべて CSS 変数。デザイン刷新時はここだけ差し替えればよい。 */
:root {
  --bg: #FAF5EC;
  --surface: #FFFFFF;
  --surface-2: #F3EADB;
  --ink: #2C271F;
  --ink-soft: #6E6355;
  --line: #E7DDCB;
  --gold: #C0892C;
  --gold-deep: #97671A;
  --green: #5B6B47;
  --green-deep: #45532F;
  --terracotta: #B4552F;
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;
  --shadow: 0 6px 22px rgba(60, 45, 20, 0.07);
  --serif: "Noto Serif JP", "Cormorant Garamond", serif;
  --sans: "Noto Sans JP", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.85;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

/* ---------------- header ---------------- */
.site-header {
  background: rgba(250, 245, 236, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: none; width: 100%; margin: 0; padding: 16px 48px;
  display: flex; flex-direction: column; gap: 12px;
}
.brand { display: flex; flex-direction: column; line-height: 1.2; }
.brand-en {
  font-family: "Cormorant Garamond", var(--serif);
  font-size: 1.7rem; font-weight: 600; letter-spacing: .02em; color: var(--green-deep);
}
.brand-ja { font-size: .72rem; color: var(--ink-soft); letter-spacing: .14em; }
.cat-nav {
  display: flex; width: 100%; align-items: center;
  justify-content: space-between; gap: 10px 20px; flex-wrap: wrap;
}
.cat-nav a { color: var(--ink-soft); font-size: .92rem; font-weight: 500; }
.cat-nav a:hover { color: var(--gold-deep); text-decoration: none; }
.nav-glossary {
  background: var(--gold); border-radius: 999px; padding: 6px 20px;
  color: #fff !important; font-weight: 600; box-shadow: 0 2px 8px rgba(192,137,44,.28);
}
.nav-glossary:hover { background: var(--gold-deep); text-decoration: none; }

/* ---------------- layout ---------------- */
.site-main { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 72px; }
.narrow { max-width: 760px; margin: 0 auto; }
.section-title {
  font-family: var(--serif); font-weight: 600; font-size: 1.32rem;
  margin: 46px 0 20px; display: flex; align-items: baseline; gap: 12px;
}
.section-title .en {
  font-family: "Cormorant Garamond", serif; font-size: .95rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold); font-weight: 600;
}

/* ---------------- hero ---------------- */
.hero {
  background: linear-gradient(135deg, var(--surface-2), #EFE3CE);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 52px 44px; text-align: center; box-shadow: var(--shadow);
}
.hero-en {
  font-family: "Cormorant Garamond", serif; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold-deep); font-size: .9rem; font-weight: 600;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: 2rem; margin: 14px 0 16px; line-height: 1.5;
}
.hero .lead { color: var(--ink-soft); max-width: 640px; margin: 0 auto; font-size: .98rem; }

/* ---------------- category grid ---------------- */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.cat-tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: block; transition: transform .18s, box-shadow .18s;
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.cat-thumb { width: 100%; aspect-ratio: 640/336; object-fit: cover; display: block; }
.cat-tile-body { padding: 18px 22px 20px; }
.cat-tile .en {
  font-family: "Cormorant Garamond", serif; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); font-size: .82rem; font-weight: 600;
}
.cat-tile h3 { font-family: var(--serif); margin: 4px 0 0; font-size: 1.14rem; color: var(--ink); }
.cat-tile p { color: var(--ink-soft); font-size: .84rem; margin: 0; line-height: 1.7; }
.cat-tile .count { color: var(--gold-deep); font-size: .78rem; margin-top: 12px; font-weight: 500; }

/* ---------------- term cards ---------------- */
.term-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px;
}
.term-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 18px 20px; transition: border-color .18s, box-shadow .18s;
}
.term-card:hover { border-color: var(--gold); box-shadow: var(--shadow); text-decoration: none; }
.term-card .cat-tag { font-size: .72rem; color: var(--gold-deep); letter-spacing: .04em; }
.term-card h3 { font-family: var(--serif); margin: 5px 0 6px; font-size: 1.12rem; color: var(--ink); }
.term-card .reading { font-size: .74rem; color: var(--ink-soft); font-style: italic; }
.term-card p { color: var(--ink-soft); font-size: .84rem; margin: 8px 0 0; line-height: 1.7; }

/* ---------------- term page ---------------- */
.term-header { margin-bottom: 8px; }
.breadcrumb { font-size: .8rem; color: var(--ink-soft); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-soft); }
.term-title {
  font-family: var(--serif); font-weight: 600; font-size: 2.1rem; margin: 0 0 4px; line-height: 1.35;
}
.term-reading { color: var(--ink-soft); font-style: italic; font-size: .95rem; margin: 0 0 18px; }
.cat-tag-pill {
  display: inline-block; background: var(--green-deep); color: #fff; font-size: .74rem;
  padding: 3px 12px; border-radius: 999px; letter-spacing: .03em;
}
.definition-box {
  background: var(--surface); border-left: 4px solid var(--gold); border-radius: var(--radius-sm);
  padding: 20px 24px; margin: 22px 0 30px; box-shadow: var(--shadow); font-size: 1.02rem;
}
.definition-box .def-label {
  font-family: "Cormorant Garamond", serif; letter-spacing: .12em; text-transform: uppercase;
  color: var(--gold); font-size: .78rem; font-weight: 600; margin: 0 0 6px;
}
.definition-box p { margin: 0; }

/* ---------------- article / prose body ---------------- */
.article-body, .page-body, .term-body { font-size: 1rem; }
.article-body h2, .term-body h2, .page-body h2 {
  font-family: var(--serif); font-weight: 600; font-size: 1.4rem;
  margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.article-body h3, .term-body h3, .page-body h3 {
  font-family: var(--serif); font-weight: 600; font-size: 1.12rem; margin: 26px 0 10px; color: var(--green-deep);
}
.article-body p, .term-body p, .page-body p { margin: 0 0 16px; }
.article-body ul, .article-body ol, .term-body ul, .term-body ol { margin: 0 0 18px; padding-left: 1.3em; }
.article-body li, .term-body li { margin: 6px 0; }
.article-body blockquote, .term-body blockquote {
  margin: 20px 0; padding: 4px 20px; border-left: 3px solid var(--green); background: var(--surface-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-soft);
}
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 30px 0; }
.article-header h1 { font-family: var(--serif); font-weight: 600; font-size: 1.9rem; line-height: 1.45; margin: 8px 0 12px; }
.article-meta { display: flex; gap: 12px; align-items: center; font-size: .8rem; color: var(--ink-soft); margin-bottom: 8px; }
.genre-tag, .cat-tag-inline {
  background: var(--surface-2); color: var(--gold-deep); font-size: .74rem;
  padding: 3px 11px; border-radius: 999px; border: 1px solid var(--line);
}

/* ---------------- summary / faq ---------------- */
.summary-box {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin: 24px 0;
}
.summary-label { font-weight: 700; font-size: .9rem; color: var(--green-deep); margin: 0 0 8px; }
.summary-box ul { margin: 0; padding-left: 1.2em; }
.summary-box li { margin: 5px 0; }
.faq-section { margin-top: 40px; }
.faq-item { border-top: 1px solid var(--line); padding: 16px 0; }
.faq-q { font-weight: 700; margin: 0 0 6px; }
.faq-q::before { content: "Q. "; color: var(--gold); }
.faq-a { margin: 0; color: var(--ink-soft); }
.faq-a::before { content: "A. "; color: var(--green); font-weight: 700; }

/* ---------------- related / see also ---------------- */
.related-section { margin-top: 44px; }
.see-also { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.see-also a {
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px; font-size: .84rem; color: var(--gold-deep);
}
.see-also a:hover { border-color: var(--gold); text-decoration: none; }

/* ---------------- glossary index ---------------- */
.glossary-cat { margin-bottom: 34px; }
.glossary-cat h2 {
  font-family: var(--serif); font-size: 1.24rem; border-bottom: 1px solid var(--line);
  padding-bottom: 8px; margin: 0 0 14px;
}
.glossary-list { columns: 2; column-gap: 32px; }
.glossary-list a { display: block; padding: 5px 0; border-bottom: 1px dotted var(--line); }
.glossary-list .rd { color: var(--ink-soft); font-size: .76rem; font-style: italic; }

/* ---------------- misc ---------------- */
.btn-primary {
  display: inline-block; background: var(--green-deep); color: #fff; padding: 12px 26px;
  border-radius: 999px; font-weight: 500; font-size: .92rem; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--green); text-decoration: none; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.article-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.article-card:hover { box-shadow: var(--shadow); }
.article-thumb img { width: 100%; aspect-ratio: 1200/630; object-fit: cover; }
.article-card h3 { font-family: var(--serif); font-size: 1.04rem; margin: 4px 14px 8px; }
.article-card .genre-tag { margin: 12px 14px 0; display: inline-block; }
.article-card .excerpt { color: var(--ink-soft); font-size: .82rem; margin: 0 14px 8px; }
.article-card .date { color: var(--ink-soft); font-size: .74rem; margin: 0 14px 14px; display: block; }

/* ---------------- footer ---------------- */
.site-footer { border-top: 1px solid var(--line); background: var(--surface-2); margin-top: 40px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 34px 24px; text-align: center; }
.footer-brand { font-family: "Cormorant Garamond", serif; font-size: 1.3rem; color: var(--green-deep); margin: 0 0 4px; }
.footer-brand span { display: block; font-family: var(--sans); font-size: .72rem; color: var(--ink-soft); letter-spacing: .1em; }
.footer-nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.footer-nav a { color: var(--ink-soft); font-size: .84rem; }
.copyright { color: var(--ink-soft); font-size: .74rem; margin: 6px 0 0; }

/* ---------------- dosha quiz CTA box ---------------- */
.quiz-cta {
  background: linear-gradient(135deg, var(--green-deep), var(--green));
  color: #fff; border-radius: var(--radius); padding: 30px 30px 32px;
  margin: 36px 0; text-align: center; box-shadow: var(--shadow);
}
.quiz-cta .cta-label {
  font-family: "Cormorant Garamond", serif; letter-spacing: .16em; text-transform: uppercase;
  font-size: .8rem; color: #F3E6C8; font-weight: 600;
}
.quiz-cta h2 { font-family: var(--serif); font-size: 1.4rem; margin: 8px 0 6px; color: #fff; border: none; padding: 0; }
.quiz-cta p { color: #EFE7D4; font-size: .9rem; margin: 0 0 18px; }
.quiz-cta .btn-primary { background: var(--gold); color: #2C271F; }
.quiz-cta .btn-primary:hover { background: #D9A24A; }

/* ---------------- quiz page ---------------- */
.quiz-shell { max-width: 640px; margin: 0 auto; }
.quiz-panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px 36px; box-shadow: var(--shadow); text-align: center;
}
.quiz-genre-label, .result-type {
  font-family: "Cormorant Garamond", serif; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); font-size: .82rem; font-weight: 600;
}
.quiz-panel h1 { font-family: var(--serif); font-size: 1.6rem; margin: 10px 0 14px; }
.quiz-catch { font-size: 1rem; color: var(--ink); margin: 0 0 10px; }
.quiz-desc { font-size: .88rem; color: var(--ink-soft); margin: 0 0 26px; }
.hidden { display: none; }
.progress-track { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 22px; }
.progress-fill { height: 100%; background: var(--gold); width: 0; transition: width .25s; }
.q-number { font-family: "Cormorant Garamond", serif; color: var(--gold-deep); font-weight: 600; margin: 0 0 8px; }
.q-text { font-family: var(--serif); font-size: 1.24rem; margin: 0 0 24px; line-height: 1.5; }
.q-options { display: flex; flex-direction: column; gap: 12px; }
.q-option {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 15px 18px; font-size: .96rem; font-family: var(--sans); color: var(--ink);
  cursor: pointer; transition: all .16s; text-align: left;
}
.q-option:hover { border-color: var(--gold); background: var(--surface-2); transform: translateY(-1px); }
.result-headline { font-family: var(--serif); font-size: 1.7rem; font-weight: 600; margin: 12px 0 16px; color: var(--green-deep); }
.result-body { font-size: 1rem; color: var(--ink); margin: 0 0 14px; text-align: left; }
.result-advice {
  font-size: .94rem; color: var(--ink-soft); text-align: left; background: var(--surface-2);
  border-radius: var(--radius-sm); padding: 14px 18px; margin: 0 0 8px;
}
.lead-box { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.lead-text { font-size: .95rem; color: var(--ink); margin: 0 0 16px; }
.line-wrap { text-align: center; }
.btn-line {
  display: inline-block; background: #06C755; color: #fff; font-weight: 700; font-size: 1rem;
  padding: 14px 30px; border-radius: 999px; box-shadow: 0 4px 14px rgba(6,199,85,.28);
}
.btn-line:hover { background: #05b34c; text-decoration: none; }
.line-note { font-size: .8rem; color: var(--ink-soft); margin: 12px 0 0; }

/* ---------------- responsive ---------------- */
@media (max-width: 640px) {
  .quiz-panel { padding: 30px 22px; }
  .q-text { font-size: 1.1rem; }
  .hero { padding: 38px 22px; }
  .hero h1 { font-size: 1.55rem; }
  .term-title { font-size: 1.7rem; }
  .glossary-list { columns: 1; }
  .header-inner { padding: 12px 18px; }
  .site-main { padding: 28px 18px 56px; }
}
