/* レニー 公開ページ共通スタイル
 * アプリ(Tonari/Core/DesignSystem.swift)の色に合わせる。ライトテーマのみ。
 * 読みやすさ優先: 本文16px以上、行間はゆったり。スマートフォンの幅から組む。
 */

:root {
  color-scheme: light;
  --ink: #2c3540;
  --text-2: #535e6a;
  --bg: #fbfbfa;
  --surface: #ffffff;
  --surface-dim: #f0f1f2;
  --border: #e6e9e8;
  --danger: #b04a3a;
  --notice-bg: #fff6df;
  --notice-border: #e3bf62;
  --ph-bg: #fff0a8;
  --gradient: linear-gradient(135deg, #d4f1e3 0%, #d9e9f8 36%, #e9e4f6 70%, #f6f2f9 100%);
  --radius: 18px;
  --wrap: 44rem;
  --font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", Meiryo, system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.9;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  word-break: normal;
  line-break: strict;
}

@media (min-width: 48rem) {
  body {
    font-size: 1.0625rem;
  }
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--text-2);
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid #4b83c8;
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 48rem) {
  .wrap {
    padding: 0 24px;
  }
}

/* 本文へ移動(キーボード操作用) */
.skip {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  font-size: 0.875rem;
  text-decoration: none;
}

.skip:focus {
  top: 8px;
  color: #fff;
}

/* ヘッダー */
.site-header {
  background: var(--gradient);
  border-bottom: 1px solid rgba(44, 53, 64, 0.06);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.18em;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 1px 3px rgba(20, 27, 34, 0.12);
}

.header-link {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-2);
  text-decoration: none;
}

/* 文書ページ */
main {
  display: block;
}

.doc {
  padding-top: 28px;
  padding-bottom: 56px;
}

h1,
h2,
h3 {
  line-height: 1.5;
  letter-spacing: 0.03em;
  font-weight: 700;
}

h1 {
  font-size: 1.75rem;
  margin: 0.4em 0 0.5em;
}

@media (min-width: 48rem) {
  h1 {
    font-size: 2rem;
  }
}

h2 {
  font-size: 1.25rem;
  margin: 2.4em 0 0.7em;
  padding-top: 0.2em;
  scroll-margin-top: 16px;
}

h3 {
  font-size: 1.0625rem;
  margin: 1.8em 0 0.4em;
  scroll-margin-top: 16px;
}

p {
  margin: 0 0 1em;
}

.lead {
  color: var(--text-2);
}

.meta {
  color: var(--text-2);
  font-size: 0.875rem;
}

ul,
ol {
  margin: 0 0 1em;
  padding-left: 1.5em;
}

li {
  margin: 0.3em 0;
}

li > ul,
li > ol {
  margin-top: 0.3em;
  margin-bottom: 0.3em;
}

/* 号の番号 (1)(2)… */
ol.paren {
  list-style: none;
  padding-left: 2.4em;
  counter-reset: paren;
}

ol.paren > li {
  position: relative;
  counter-increment: paren;
}

ol.paren > li::before {
  content: "(" counter(paren) ")";
  position: absolute;
  left: -2.4em;
  width: 2.1em;
  text-align: right;
}

/* 弁護士確認前の注意書き(確認後に運営が削除する) */
.draft-notice {
  margin: 0 0 20px;
  padding: 12px 16px;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-left-width: 6px;
  border-radius: 12px;
  font-weight: 700;
}

/* 未確定の値(運営が埋める) */
.ph {
  background: var(--ph-bg);
  border-radius: 4px;
  padding: 0 0.2em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* カード類 */
.card,
.summary,
.toc,
.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 0 0 20px;
}

.summary h2,
.toc h2,
.card h2,
.callout h2 {
  margin-top: 0;
  font-size: 1.0625rem;
}

.card h3 {
  margin: 0 0 4px;
}

.summary ul {
  margin-bottom: 0.4em;
}

.summary p:last-child,
.card p:last-child,
.callout p:last-child {
  margin-bottom: 0;
}

.toc {
  background: var(--surface-dim);
  border-color: transparent;
  font-size: 0.9375rem;
}

.toc ol,
.toc ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.toc ul ul {
  padding-left: 1.2em;
  margin-top: 0.15em;
}

.toc li {
  margin: 0.15em 0;
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

.callout {
  background: var(--gradient);
  border-color: transparent;
}

/* 項目と内容の組(特定商取引法の表記・運営者情報など) */
.spec {
  margin: 0 0 24px;
  border-top: 1px solid var(--border);
}

.spec > div {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.spec dt {
  font-weight: 700;
  margin: 0 0 4px;
}

.spec dd {
  margin: 0;
}

.spec dd p:last-child {
  margin-bottom: 0;
}

@media (min-width: 40rem) {
  .spec > div {
    display: grid;
    grid-template-columns: 11em 1fr;
    gap: 16px;
  }

  .spec dt {
    margin: 0;
  }
}

/* 表 */
.table-wrap {
  overflow-x: auto;
  margin: 0 0 24px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.7;
  background: var(--surface);
}

caption {
  text-align: left;
  font-weight: 700;
  padding: 0 0 8px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border: 1px solid var(--border);
}

thead th {
  background: var(--surface-dim);
}

/* 表を縦に積む(狭い画面向け) */
@media (max-width: 39.99rem) {
  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack th,
  table.stack td {
    display: block;
    width: 100%;
  }

  table.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  table.stack tr {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 0 0 12px;
    overflow: hidden;
  }

  table.stack th,
  table.stack td {
    border: none;
    border-bottom: 1px solid var(--border);
  }

  table.stack tr > :last-child {
    border-bottom: none;
  }

  table.stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-2);
  }
}

/* ○ / ✕ の対比 */
.compare th {
  width: 50%;
}

.compare .ok {
  color: #1a7a61;
}

.compare .ng {
  color: var(--danger);
}

/* 相談窓口 */
.resources {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.resource {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 0 0 12px;
}

.resource h3 {
  margin: 0 0 4px;
  font-size: 1.0625rem;
}

.resource p {
  margin: 0 0 6px;
}

.resource .hours {
  font-weight: 700;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.resource .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin: 10px 0 0;
}

.tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.tel:hover {
  color: #fff;
  opacity: 0.9;
}

.resource.urgent {
  border-color: rgba(176, 74, 58, 0.35);
}

.resource.urgent .tel {
  background: var(--danger);
}

/* トップページ */
.home {
  position: relative;
}

/* ヘッダーをヒーローのグラデーションに重ねて、継ぎ目を出さない */
.home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: 0;
}

.hero {
  background: var(--gradient);
  padding: 40px 0 44px;
}

.home .hero {
  padding-top: 88px;
}

.hero .app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: 0 6px 18px rgba(20, 27, 34, 0.12);
}

.hero h1 {
  margin: 18px 0 6px;
  letter-spacing: 0.2em;
  font-size: 1.25rem;
}

.hero .tagline {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.55;
  margin: 0 0 14px;
}

@media (min-width: 48rem) {
  .hero .tagline {
    font-size: 2.25rem;
  }
}

.hero .lead {
  color: var(--text-2);
  max-width: 34em;
}

.store-badge {
  display: inline-block;
  margin: 8px 0 12px;
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 12px;
}

@media (min-width: 40rem) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.features li {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.features h3 {
  margin: 0 0 4px;
}

.features p {
  margin: 0;
  color: var(--text-2);
}

.doc-list {
  list-style: none;
  padding: 0;
}

.doc-list li {
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.doc-list a {
  display: block;
  padding: 12px 2px;
  text-decoration: none;
}

.doc-list a strong {
  display: block;
}

.doc-list a span {
  display: block;
  color: var(--text-2);
  font-size: 0.9375rem;
}

.doc-list a:hover strong {
  text-decoration: underline;
}

/* お知らせ */
.news {
  list-style: none;
  padding: 0;
}

.news li {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

/* 手順 */
ol.steps {
  padding-left: 1.6em;
}

/* フッター */
.site-footer {
  background: var(--surface-dim);
  padding: 28px 0 36px;
  font-size: 0.9375rem;
  color: var(--text-2);
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}

.site-footer li {
  margin: 0;
}

.site-footer a {
  color: var(--ink);
  display: inline-block;
  padding: 6px 0;
}

.site-footer a[aria-current="page"] {
  font-weight: 700;
  text-decoration: none;
}

.site-footer p {
  margin: 0 0 4px;
}

/* 印刷 */
@media print {
  .skip,
  .site-header,
  .toc,
  .site-footer nav {
    display: none;
  }

  body {
    background: #fff;
    font-size: 11pt;
    line-height: 1.7;
  }

  .callout,
  .hero {
    background: none;
  }

  a {
    text-decoration: none;
  }
}
