/*
  収納スタイリスト サポートサイトの見た目。

  方針：
   - 明るい背景を基本にし、ダークモードでも読めるようにする。
   - 日本語の本文を小さくしない（16px 以上・行間 1.9）。
   - 文字と背景のコントラストは WCAG AA（本文 4.5:1 以上）を満たす値を選ぶ。
   - 外部フォントを読み込まない。端末にあるものだけを使う。
   - 動きは最小限にし、prefers-reduced-motion では止める。
*/

:root {
  color-scheme: light dark;

  /* 明るい配色（既定） */
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #1c1f24;          /* #f7f8fa 上で 14.8:1 */
  --text-muted: #4a5159;    /* #ffffff 上で 8.0:1 */
  --accent: #1f5f8b;        /* #ffffff 上で 6.2:1 */
  --accent-strong: #16455f;
  --border: #d8dde3;
  --note-bg: #eef4f8;
  --note-border: #9dbdd2;
  --focus: #0b4a6f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171b;
    --surface: #1d2126;
    --text: #eceff3;        /* #14171b 上で 14.6:1 */
    --text-muted: #b6bec7;  /* #1d2126 上で 8.4:1 */
    --accent: #82c2e8;      /* #1d2126 上で 8.6:1 */
    --accent-strong: #a9d7f2;
    --border: #333a42;
    --note-bg: #1b2731;
    --note-border: #3e6076;
    --focus: #9ad2f0;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    "Noto Sans JP", system-ui, -apple-system, sans-serif;
  /* ブラウザの既定文字サイズを尊重する（px 固定にしない）。 */
  font-size: 1.0625rem;
  line-height: 1.9;
  word-break: normal;
  overflow-wrap: anywhere;
  line-break: strict;
}

/* キーボードだけで本文へ飛べるようにする。 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text);
  padding: 0.75rem 1rem;
  border: 2px solid var(--focus);
  border-radius: 0 0 8px 0;
  z-index: 10;
}

.skip-link:focus {
  left: 0;
}

/* フォーカスは必ず見えるようにする（見えないと keyboard 操作が成り立たない）。 */
a:focus-visible,
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ヘッダー */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
  justify-content: space-between;
}

.site-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover,
.site-title a:focus-visible {
  text-decoration: underline;
}

.site-title .en {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 0.5rem;
  font-size: 0.9375rem;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  font-size: 0.9375rem;
}

/* 本文 */
main {
  padding: 2rem 0 1rem;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.3125rem;
  line-height: 1.6;
  margin: 2.5rem 0 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin: 1.75rem 0 0.5rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1.1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-strong);
}

.lead {
  font-size: 1.0625rem;
  color: var(--text);
}

.meta {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 2rem;
}

/* 注記 */
.note {
  background: var(--note-bg);
  border-left: 4px solid var(--note-border);
  border-radius: 0 8px 8px 0;
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.5rem;
}

.note > :last-child {
  margin-bottom: 0;
}

/* 問い合わせ先 */
.contact-address {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

/* よくある質問 */
.faq {
  margin: 0 0 1.5rem;
}

.faq h3 {
  margin-top: 1.5rem;
}

.faq h3:first-of-type {
  margin-top: 0.5rem;
}

/* 次に読むもの */
.link-list {
  list-style: none;
  padding: 0;
}

.link-list li {
  margin-bottom: 0.6rem;
}

/* フッター */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 3rem;
  padding: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.site-footer p {
  margin: 0 0 0.4rem;
}

.site-footer ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0 0 0.75rem;
  padding: 0;
}

/* 小さい画面 */
@media (max-width: 30rem) {
  /* **本文は小さくしない。** 画面が狭いほど読みにくくなる。
     縮めるのは見出しと余白だけにする。 */
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.1875rem;
  }

  .wrap {
    padding: 0 1rem;
  }
}

/* 動きを減らす設定を尊重する。 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 印刷（問い合わせ時に紙で残す人がいる） */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .skip-link {
    display: none;
  }
}
