/* Yunoca — アプリ別 法務ページ共通スタイル
   既存の /privacy.html・/tokushoho.html のデザイントークンとレイアウトを踏襲しつつ、
   長文の法務文書(見出し階層・表・番号付きリスト)に対応させたもの。
   既存ページには読み込まれないため、既存ページの表示には影響しない。 */

:root {
  color-scheme: light dark;
  --bg: #FFF8ED;
  --surface: #FFF2DE;
  --surface-2: #FFE9C9;
  --text: #222222;
  --muted: #625B52;
  --accent: #7867E8;
  --accent-rgb: 120, 103, 232;
  --coral: #FF6B6B;
  --border: rgba(34, 34, 34, .11);
  --shadow: 0 18px 48px rgba(77, 54, 34, .11);
  --max: 980px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #211D1B;
    --surface: #2B2522;
    --surface-2: #352C27;
    --text: #FFF8ED;
    --muted: #C9BEB3;
    --accent: #9386F0;
    --accent-rgb: 147, 134, 240;
    --coral: #FF7D78;
    --border: rgba(255, 248, 237, .13);
    --shadow: 0 20px 50px rgba(0, 0, 0, .24);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: break-word;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: .18;
  mask-image: linear-gradient(to bottom, black, transparent 58%);
}

a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 10px; }
.nowrap { white-space: nowrap; }
@supports (word-break: auto-phrase) { h2, h3, p, li, th, td, dd { word-break: auto-phrase; } }

/* ヘッダー */
.site-header {
  width: min(calc(100% - 40px), var(--max));
  height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 1.05rem;
  font-weight: 760;
  letter-spacing: -.03em;
  text-decoration: none;
}
.brand::before {
  content: "";
  width: 24px;
  height: 24px;
  border: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--coral);
  transform: rotate(-7deg);
}

/* タイトル帯 */
.page-intro { position: relative; overflow: hidden; border-block: 1px solid var(--border); }
.page-intro::after {
  content: "";
  position: absolute;
  width: 48%;
  height: 10px;
  right: -3%;
  top: 48%;
  border-top: 4px solid var(--coral);
  border-radius: 50%;
  transform: rotate(-13deg);
}
.page-intro-inner {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), var(--max));
  margin: auto;
  padding: clamp(64px, 9vw, 104px) 0;
}
.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 20px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 850;
  letter-spacing: .04em;
}
.page-eyebrow::before { content: "✦"; color: var(--coral); font-size: 1.05rem; }
h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(1.35rem, 6.2vw, 4.4rem);
  font-weight: 850;
  line-height: 1.14;
  letter-spacing: -.07em;
  white-space: nowrap;
}
h1::after {
  content: "";
  display: block;
  width: 66px;
  height: 5px;
  margin-top: 25px;
  border-radius: 99px;
  background: var(--accent);
}

/* 本文 */
main {
  width: min(calc(100% - 40px), var(--max));
  margin: auto;
  padding: clamp(48px, 8vw, 84px) 0 80px;
}
.card {
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.updated { margin: 0 0 26px; color: var(--muted); font-size: .82rem; font-weight: 700; }
.lead { margin: 0 0 4px; color: var(--muted); }
section { margin-top: 34px; padding-top: 34px; border-top: 1px solid var(--border); }
h2 { margin: 0 0 14px; font-size: 1.12rem; font-weight: 820; letter-spacing: -.01em; }
h3 { margin: 30px 0 10px; font-size: .96rem; font-weight: 800; }
p, ul, ol { margin: 0; color: var(--muted); }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 8px; }
li > ul, li > ol { margin-top: 8px; }
.card :is(p, ul, ol, .table-wrap) + :is(p, ul, ol, .table-wrap) { margin-top: 15px; }
strong { color: var(--text); font-weight: 760; }
code {
  padding: .1em .4em;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .86em;
}
.card a { color: var(--accent); font-weight: 650; text-underline-offset: 4px; overflow-wrap: anywhere; }

/* 表 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 13px 16px; border: 1px solid var(--border); text-align: left; vertical-align: top; color: var(--muted); }
thead th { background: var(--surface-2); color: var(--text); font-size: .76rem; font-weight: 760; letter-spacing: .02em; white-space: nowrap; }
tbody th { color: var(--text); font-weight: 720; }
.table-wrap.wide table { min-width: 580px; }

/* ページ下部のナビゲーション */
.doc-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.doc-nav a, .back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: .82rem;
  font-weight: 620;
  text-decoration: none;
  transition: .2s ease;
}
.doc-nav a:hover, .back:hover { color: var(--text); border-color: rgba(var(--accent-rgb), .38); }
.back { margin-top: 12px; }
.back:hover { transform: translateX(-2px); }

footer {
  width: min(calc(100% - 40px), var(--max));
  min-height: 110px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .78rem;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
footer a { text-underline-offset: 4px; }

@media (max-width: 640px) {
  .site-header { height: 66px; }
  .page-intro-inner { padding: 58px 0 66px; }
  .page-eyebrow { font-size: .76rem; margin-bottom: 16px; }
  .card { padding: 24px; border-radius: 18px; }
  th, td { padding: 11px 13px; }
  footer { min-height: 150px; flex-direction: column; justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .doc-nav a, .back { transition: none; }
  .back:hover { transform: none; }
}
