/* 規約・ポリシーなどの公開ページ（tools/build_site.py が作る HTML から読む）。色はアプリ（app/lib/theme/app_colors.dart）に合わせる */
:root {
  --bg: #f5f5f8;
  --sf: #ffffff;
  --line: #e2e2ea;
  --tx: #13131b;
  --tx2: #4e4e5e;
  --link: #b8255f;
  --sel: #13131b;
  --sel-tx: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d12;
    --sf: #17171f;
    --line: #262632;
    --tx: #eeeef3;
    --tx2: #b4b4c4;
    --link: #ff8ec0;
    --sel: #eeeef3;
    --sel-tx: #0d0d12;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.site-header,
main,
.site-footer {
  max-width: 42rem;
  margin: 0 auto;
  padding: 0 16px;
}

.site-header {
  padding-top: 16px;
  padding-bottom: 8px;
}

.site-header a {
  color: var(--tx);
  font-weight: 700;
  text-decoration: none;
}

main {
  padding-bottom: 32px;
}

h1 {
  font-size: 1.6rem;
  line-height: 1.4;
  margin: 16px 0 24px;
}

h2 {
  font-size: 1.15rem;
  line-height: 1.5;
  margin: 40px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

h3 {
  font-size: 1rem;
  margin: 24px 0 8px;
}

p,
ul,
ol {
  margin: 0 0 16px;
}

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

li + li {
  margin-top: 6px;
}

a {
  color: var(--link);
}

strong {
  font-weight: 700;
}

/* 段落にリンクが1つだけのとき（お問い合わせのフォームなど）はボタンにする */
p.action a {
  display: block;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--sel);
  color: var(--sel-tx);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.table {
  margin: 0 0 16px;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--sf);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.6;
}

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

th {
  color: var(--tx2);
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: 0;
}

/* スマホでは表を1行ずつのカードにして、横にスクロールさせない */
@media (max-width: 640px) {
  table {
    border: 0;
    background: none;
  }

  thead {
    display: none;
  }

  tr {
    display: block;
    margin-bottom: 12px;
    padding: 4px 0;
    background: var(--sf);
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  td {
    display: block;
    border-bottom: 0;
    padding: 6px 14px;
  }

  td::before {
    content: attr(data-label);
    display: block;
    color: var(--tx2);
    font-size: 0.8rem;
    font-weight: 600;
  }
}

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

.cards li + li {
  margin-top: 12px;
}

.cards a {
  display: block;
  padding: 16px;
  background: var(--sf);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--tx);
  text-decoration: none;
}

.cards span {
  display: block;
  color: var(--tx2);
  font-size: 0.9rem;
}

.site-footer {
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--tx2);
  font-size: 0.85rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-bottom: 8px;
}

.site-footer a {
  color: var(--tx2);
}

.site-footer a[aria-current="page"] {
  color: var(--tx);
  font-weight: 600;
  text-decoration: none;
}

/* ---- トップ（アプリの紹介・LP・#411）。中身は tools/site_lp.py が作る ---- */
main.lp,
body:has(main.lp) .site-header,
body:has(main.lp) .site-footer {
  max-width: 60rem;
}

.lp h1,
.lp h2 {
  word-break: auto-phrase;
}

.lp section {
  margin: 0 0 40px;
}

.lp h2 {
  border-top: 0;
  padding-top: 0;
  margin: 0 0 12px;
}

.lp-hero {
  padding: 24px 0 8px;
}

.lp-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--tx2);
  font-size: 0.85rem;
  font-weight: 600;
}

.lp-hero h1 {
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  line-height: 1.35;
  margin: 0 0 12px;
}

.lp-sub {
  color: var(--tx2);
  font-weight: 600;
}

/* App Store のバッジ。高さ 40px 以上・まわりに高さの 1/4 以上の余白（Apple のマーケティングの決まり） */
.lp-badge {
  margin: 20px 0 16px;
}

.lp-badge a {
  display: inline-block;
  text-decoration: none;
}

.lp-badge img {
  display: block;
  width: auto;
  height: 50px;
}

.shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8.5% / 3.9%;
  box-shadow: 0 0 0 1px var(--line), 0 12px 32px rgba(0, 0, 0, 0.12);
  background: var(--sf);
}

.lp-note,
.lp-small {
  color: var(--tx2);
  font-size: 0.85rem;
}

.lp-box {
  padding: 20px;
  background: var(--sf);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.lp-box ul:last-child,
.lp-box p:last-child {
  margin-bottom: 0;
}

/* 画面を横にめくる */
.lp-strip {
  display: flex;
  gap: 16px;
  margin: 0 -16px 8px;
  padding: 8px 16px 20px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 16px;
}

.lp-strip li {
  flex: 0 0 min(62vw, 230px);
  scroll-snap-align: start;
}

.lp-strip li + li {
  margin-top: 0;
}

.lp-strip figure {
  margin: 0;
}

.lp-strip figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.5;
}

@media (min-width: 760px) {
  .lp-strip {
    margin: 0 0 8px;
    padding: 8px 0 20px;
  }
}
