/* サポートサイトの配色は mobile/src/theme/tokens.ts の light / dark をそのまま使う。
   アプリと同じ見た目にして、サポートページに来た保護者が別サービスだと感じないようにするため。
   フォントはアプリと違いWeb用に Zen Kaku Gothic New(本文) / Zen Old Mincho(見出し)。 */

:root {
  /* tokens.ts の light */
  --bg-base:   #f4efe6;
  --bg-warm:   #fff8ea;
  --bg-card:   #ffffff;
  --bg-inset:  #fff5df;
  --border:    #ede3cd;
  --accent:    #e07b1a;
  --accent-deep: #b95d10;
  --accent-warm: #c96a2b;
  --text:      #2b2a26;
  --text-2:    #5b5548;
  --text-muted:#8a8272;
  --success:   #3e7a4a;
  --success-bg:#e8f5e6;

  --body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --display: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* tokens.ts の dark */
    --bg-base:   #1e1a15;
    --bg-warm:   #241f18;
    --bg-card:   #2a241c;
    --bg-inset:  #33291f;
    --border:    #3a3226;
    --accent:    #f5b962;
    --accent-deep: #c07a1a;
    --accent-warm: #f5b962;
    --text:      #f0e8d6;
    --text-2:    #c9bd9a;
    --text-muted:#8a8272;
    --success:   #7ab884;
    --success-bg:#1e2d1f;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- header ---------- */
.masthead {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
  padding: 52px 0 40px;
  margin-bottom: 44px;
}
.eyebrow {
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--accent-warm);
  font-weight: 700;
}
.masthead h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(28px, 6vw, 38px);
  line-height: 1.3;
  margin: 0 0 14px;
  text-wrap: balance;
}
.standfirst {
  margin: 0;
  color: var(--text-2);
  font-size: 15.5px;
  max-width: 60ch;
}

/* ---------- sections ---------- */
main { padding-bottom: 72px; }
section { margin-bottom: 52px; }
h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  line-height: 1.4;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  text-wrap: balance;
}
p { margin: 0 0 14px; max-width: 62ch; }
.lede { color: var(--text-2); }
ul { margin: 0 0 16px; padding-left: 1.35em; max-width: 60ch; }
li { margin-bottom: 8px; }
strong { font-weight: 700; }

a { color: var(--accent-deep); }
@media (prefers-color-scheme: dark) { a { color: var(--accent); } }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ---------- FAQ ---------- */
details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
}
summary {
  cursor: pointer;
  list-style: none;
  padding: 15px 46px 15px 18px;
  font-weight: 700;
  font-size: 15.5px;
  position: relative;
  line-height: 1.6;
  min-height: 44px;
  display: flex;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s ease;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.answer {
  padding: 0 18px 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  color: var(--text-2);
  font-size: 15px;
}
.answer p:last-child { margin-bottom: 0; }

/* ---------- 問い合わせ ---------- */
.contact-card {
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 0 0 18px;
}
.contact-label {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--text-muted);
}
.contact-address {
  margin: 0 0 10px;
  font-size: clamp(17px, 4.5vw, 21px);
  font-weight: 700;
  word-break: break-all;
}
.contact-address a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.contact-note { margin: 0; font-size: 14px; color: var(--text-2); }

/* ---------- プライバシーの要約 ---------- */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.summary-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
}
.summary-verdict {
  margin: 0 0 2px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  color: var(--success);
  line-height: 1.3;
}
.summary-label { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

/* ---------- 表 ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  margin: 0 0 16px;
  display: block;
  overflow-x: auto;
  white-space: normal;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.7;
}
.data-table th {
  font-size: 12.5px;
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* ---------- 更新の記録 ---------- */
.changelog {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  font-size: 15px;
}
.changelog dt { font-weight: 700; color: var(--text-2); white-space: nowrap; }
.changelog dd { margin: 0; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-bottom: 12px;
}
.footer-nav a {
  font-size: 15px;
  font-weight: 700;
  padding: 6px 0;
  display: inline-block;
}
.footer-meta { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* 研究の出典。本文より一段落として読ませる */
.refs {
  font-size: 13px;
  line-height: 1.75;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 14px;
}
.answer u { text-decoration-color: var(--accent); text-underline-offset: 2px; }

/* ---------- トップ(受験漢字): アプリ一覧 ---------- */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 24px;
  margin: 0 0 16px;
}
.app-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20px;
  margin: 0 0 2px;
  line-height: 1.4;
}
.app-target {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--accent-warm);
  font-weight: 700;
}
.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.app-links a {
  font-size: 14.5px;
  font-weight: 700;
  padding: 6px 0;
  display: inline-block;
}
