/* ==========================================================================
   /legal/* — 規約・法務・サポート
   読むための紙面。本文は 1 段 42em、左に文書の切り替えと目次。
   ========================================================================== */

.legal-head { position: relative; padding-top: calc(var(--header-h) + clamp(40px, 6vw, 88px)); padding-bottom: clamp(36px, 5vw, 64px); border-bottom: 1px solid var(--rule); overflow: hidden; }
.legal-head .ruled { top: var(--header-h); -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--ink-3); margin-bottom: 26px; }
.crumbs a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.crumbs a:hover { color: var(--thread); }
.legal-head .label {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: .74rem; letter-spacing: .14em; color: var(--thread); margin-bottom: 16px;
}
.legal-head .label::before { content: ""; width: 8px; height: 8px; background: currentColor; border-radius: 2px; }
.legal-head h1 {
  font-family: var(--serif); font-weight: 800; font-feature-settings: "palt" 1;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.6rem); line-height: 1.3; letter-spacing: .01em;
}
.updated { margin-top: 16px; font-family: var(--mono); font-size: .78rem; color: var(--ink-3); letter-spacing: .04em; }

.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding-top: clamp(40px, 5vw, 72px); padding-bottom: clamp(88px, 10vw, 140px); align-items: start; }
.legal-grid > *, .legal-rail > * { min-width: 0; }
.legal-rail { position: sticky; top: calc(var(--header-h) + 32px); display: grid; gap: 36px; max-height: calc(100vh - var(--header-h) - 64px); overflow-y: auto; }
.legal-rail p { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; color: var(--ink-3); margin-bottom: 10px; }
.docs a { display: block; padding: 8px 0 8px 14px; border-left: 2px solid var(--rule); font-size: .88rem; color: var(--ink-2); line-height: 1.5; }
.docs a:hover { color: var(--ink); border-left-color: var(--ink-3); }
.docs a[aria-current="page"] { color: var(--ink); font-weight: 700; border-left-color: var(--thread); }
.toc-list { counter-reset: none; }
.toc-list a { display: block; padding: 5px 0; font-size: .82rem; color: var(--ink-3); line-height: 1.5; }
.toc-list a:hover, .toc-list a[aria-current="true"] { color: var(--thread-2); }

.doc { max-width: 44em; color: var(--ink-2); font-size: 1rem; line-height: 2; }
.doc > .lead { font-size: 1.06rem; color: var(--ink); margin-bottom: 8px; }
.doc h2 {
  font-family: var(--serif); font-weight: 800; color: var(--ink); font-feature-settings: "palt" 1;
  font-size: clamp(1.2rem, 1.05rem + .5vw, 1.45rem); line-height: 1.5;
  margin-top: 56px; padding-top: 22px; border-top: 1px solid var(--rule); margin-bottom: 14px;
  scroll-margin-top: calc(var(--header-h) + 24px);
  position: relative;
}
/* 見出しの頭に、赤ペンで引いた短い印（動かさない。手の跡だけ残す） */
.doc h2::before {
  content: ""; position: absolute; left: 0; top: -1.5px; width: 34px; height: 3px; border-radius: 3px;
  background: var(--shu); transform: rotate(-2deg); transform-origin: left;
}
.doc p + p { margin-top: .9em; }
.doc ul, .doc ol { margin: 12px 0; }
.doc ul li { position: relative; padding-left: 1.3em; margin: 6px 0; }
.doc ul li::before { content: ""; position: absolute; left: .2em; top: .95em; width: 6px; height: 6px; border-radius: 50%; background: var(--thread); }
.doc ol { counter-reset: step; }
.doc ol li { counter-increment: step; position: relative; padding-left: 2.4em; margin: 10px 0; }
.doc ol li::before {
  content: counter(step); position: absolute; left: 0; top: .15em; width: 1.7em; height: 1.7em; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--paper); font-family: var(--mono); font-size: .76rem; line-height: 1;
}
.doc a { color: var(--thread-2); text-decoration: underline; text-underline-offset: 3px; }
.doc a:hover { color: var(--thread); }
.callout { margin: 16px 0; padding: 18px 20px; border-left: 3px solid var(--thread); background: var(--thread-tint); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--ink); font-size: .95rem; }
.contact {
  margin-top: 14px; padding: 20px 24px; border: 1px solid var(--rule); border-radius: var(--r-md); background: var(--surface);
  color: var(--ink); line-height: 2;
}

/* 特商法の表 */
.tokusho { width: 100%; border-top: 1.5px solid var(--ink); font-size: .95rem; line-height: 1.9; }
.tokusho th, .tokusho td { text-align: left; vertical-align: top; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.tokusho th { width: 11em; padding-right: 24px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.tokusho td { color: var(--ink-2); }
.tokusho .sub { display: block; font-size: .84rem; color: var(--ink-3); margin-top: 4px; }

/* サポート: 窓口カード */
.support-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center;
  margin-top: 14px; padding: clamp(22px, 3vw, 32px); border-radius: var(--r-lg); background: var(--ink); color: var(--on-night);
}
.support-card .who { font-family: var(--mono); font-size: .72rem; letter-spacing: .12em; color: var(--on-night-3); }
.support-card .mail { display: block; font-family: var(--serif); font-weight: 800; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); color: #fff; text-decoration: none; margin-top: 4px; }
.support-card .tel { font-size: .9rem; color: var(--on-night-2); margin-top: 4px; }
.support-card .btn { text-decoration: none; color: var(--ink); }

@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; }
  .legal-rail { position: static; max-height: none; overflow: visible; grid-template-columns: 1fr; gap: 20px; }
  .toc-block { display: none; }
  .docs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .docs::-webkit-scrollbar { display: none; }
  .docs a { flex-shrink: 0; border: 1px solid var(--rule); border-radius: 999px; padding: 6px 14px; white-space: nowrap; font-size: .8rem; }
  .docs a[aria-current="page"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
}
@media (max-width: 600px) {
  .tokusho th, .tokusho td { display: block; width: auto; padding: 0; border: 0; }
  .tokusho th { padding-top: 16px; font-size: .84rem; color: var(--thread-2); }
  .tokusho td { padding: 4px 0 16px; border-bottom: 1px solid var(--rule); }
  .support-card { grid-template-columns: 1fr; }
  .support-card .mail { word-break: break-all; }
}
