/* fonorma.app（準備中の版）
   色は constants/tokens.ts の第1層から写した。外部の書体・解析の部品は読み込まない。 */

:root {
  color-scheme: light;
  --surface: #FFFFFF;
  --surface-sunk: #F5F5F7;
  --rule-weak: #E5E5EA;
  --rule-strong: #C7C7CC;
  --text-muted: #6E6E76;
  --text-secondary: #4A4A50;
  --text-primary: #17171A;

  --sleep: #216BA0;
  --habit: #B484D7;
  --food: #C03D3C;
  --mood: #E8B53F;
  --move: #37AE72;

  --radius: 12px;
  --measure: 640px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--sleep); }
a:focus-visible { outline: 2px solid var(--sleep); outline-offset: 3px; border-radius: 4px; }

/* 五角形の5色を細い帯にしたもの（ページの上端） */
.band {
  height: 4px;
  background: linear-gradient(90deg,
    var(--sleep) 0 20%, var(--habit) 20% 40%, var(--food) 40% 60%,
    var(--mood) 60% 80%, var(--move) 80% 100%);
}

/* ───── 準備中のトップ ───── */

.hero {
  min-height: calc(100vh - 4px);
  min-height: calc(100svh - 4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px 32px;
}

.hero-icon {
  width: 112px;
  height: 112px;
  border-radius: 25px;
  box-shadow: 0 1px 2px rgba(23, 23, 26, 0.08), 0 8px 24px rgba(23, 23, 26, 0.10);
}

.hero-name {
  margin: 20px 0 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.hero-title {
  margin: 28px 0 0;
  font-size: clamp(44px, 11vw, 88px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 30em;
  margin: 24px auto 0;
  color: var(--text-secondary);
  font-size: 18px;
}

.hero-lead strong { color: var(--text-primary); font-weight: 600; }

.button {
  display: inline-block;
  margin-top: 36px;
  padding: 14px 24px;
  border-radius: var(--radius);
  background: var(--text-primary);
  color: var(--surface);
  font-weight: 600;
  text-decoration: none;
}
.button:hover { color: var(--surface); background: #2C2C31; }
.hero-sub { margin-top: 20px; font-size: 15px; }
.hero-sub a { color: var(--text-secondary); }

.hero-foot {
  margin-top: auto;
  padding-top: 56px;
  color: var(--text-muted);
  font-size: 14px;
}

.lang { margin-top: 6px; }

/* ───── 本文のページ ───── */

.page {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  text-decoration: none;
}
.crumb img { width: 32px; height: 32px; border-radius: 7px; }

/* ページの上の行＝左に名前、右に言語の切り替え（2026-10-13） */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.lang-switch { font-size: 15px; color: var(--text-secondary); white-space: nowrap; }
.lang-switch a { color: inherit; padding: 6px 2px; }
.lang-switch [aria-current="page"] { color: var(--text-primary); font-weight: 600; }
.lang-switch .sep { margin: 0 6px; opacity: 0.6; }

h1 {
  margin: 40px 0 0;
  font-size: clamp(30px, 7vw, 40px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lead {
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 18px;
}

.facts {
  margin: 32px 0 0;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface-sunk);
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 8px 20px;
  font-size: 16px;
}
.facts dt { color: var(--text-muted); }
.facts dd { margin: 0; }

h2 {
  margin: 56px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--rule-weak);
  font-size: 22px;
  line-height: 1.3;
}

h2 + p, h2 + ul { margin-top: 16px; }

p { margin: 14px 0 0; }

ul { margin: 14px 0 0; padding-left: 1.25em; }
li { margin: 8px 0 0; }
li::marker { color: var(--text-muted); }

.note {
  margin-top: 20px;
  padding: 16px 20px;
  border-left: 3px solid var(--sleep);
  background: var(--surface-sunk);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.mail { font-weight: 600; }

footer.page-foot {
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-weak);
  color: var(--text-muted);
  font-size: 14px;
}
footer.page-foot p { margin: 4px 0 0; }

@media (max-width: 420px) {
  body { font-size: 16px; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 10px; }
}

/* ───── ホスト向けのページ（2026-10-06 に追加） ───── */

.updated { margin: 10px 0 0; color: var(--text-muted); font-size: 14px; }

.toc {
  margin: 28px 0 0;
  padding: 16px 20px;
  border: 1px solid var(--rule-weak);
  border-radius: var(--radius);
  font-size: 16px;
}
.toc p { margin: 0; color: var(--text-muted); font-size: 14px; }
.toc ol { margin: 8px 0 0; padding-left: 1.4em; }
.toc li { margin: 4px 0 0; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }

ol { margin: 14px 0 0; padding-left: 1.4em; }
ol li::marker { color: var(--text-muted); font-weight: 600; }

h3 {
  margin: 28px 0 0;
  font-size: 18px;
  line-height: 1.4;
}
h3 + p { margin-top: 8px; }

h2[id], h3[id] { scroll-margin-top: 16px; }

/* 番号つきの項（公の文書の形） */
.clause {
  display: grid;
  grid-template-columns: 3.1em 1fr; /* 2桁の章（10.1 など）でも番号と本文が離れる幅 */
  margin: 10px 0 0;
}
.clause > b { color: var(--text-muted); font-weight: 600; font-variant-numeric: tabular-nums; }

.defs { margin: 16px 0 0; }
.defs dt { margin: 12px 0 0; font-weight: 600; }
.defs dd { margin: 2px 0 0; color: var(--text-secondary); }

/* ───── 申し込みの欄（2026-10-24） ───── */
.apply { margin-top: 28px; padding: 22px; border: 1px solid var(--rule-weak); border-radius: var(--radius); }
.apply h3 { margin: 0; font-size: 18px; }
.field { display: block; margin: 18px 0 0; border: 0; padding: 0; min-width: 0; }
.label { display: block; font-weight: 600; font-size: 15px; }
.field input, .field select {
  margin-top: 8px; width: 100%; box-sizing: border-box; padding: 12px 14px; font: inherit; font-size: 16px;
  border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface); color: var(--text-primary);
}
.sns-row { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; }
.hint { display: block; margin-top: 6px; color: var(--text-muted); font-size: 14px; }
.text-button { margin-top: 10px; padding: 6px 0; border: 0; background: none; color: var(--text-secondary); font: inherit; font-size: 15px; text-decoration: underline; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 22px; font-size: 15px; }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.cf-turnstile { margin-top: 18px; }
.apply .button { border: 0; font: inherit; font-weight: 600; cursor: pointer; margin-top: 20px; }
.apply .button:disabled { opacity: 0.5; cursor: default; }
.form-error { margin-top: 14px; color: var(--food); font-size: 15px; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.done-title { margin: 0; font-weight: 700; font-size: 18px; }
.apply-done:focus { outline: none; }

/* ───── 規約とポリシー（2026-10-24） ───── */
.legal ol { margin: 14px 0 0; padding-left: 1.5em; }
.table-wrap { margin-top: 14px; overflow-x: auto; }
.legal table { border-collapse: collapse; font-size: 15px; min-width: 100%; }
.legal th, .legal td { border: 1px solid var(--rule-weak); padding: 8px 10px; text-align: left; vertical-align: top; }
.legal th { background: var(--surface-sunk); }
.legal td:nth-child(2) { white-space: nowrap; }
