:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #5f6368;
  --line: #e3e0d9;
  --accent: #1f5fbf;
  --en: #4a4f57;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --surface: #1b1d21;
    --text: #ececec;
    --muted: #a3a8b0;
    --line: #2e3137;
    --accent: #8ab4f8;
    --en: #b9bec6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.02em;
  /* 日本語は語句のまとまりで折り返す（「3」と「階」を分けない）。長い英数字だけは途中で折る */
  word-break: auto-phrase;
  overflow-wrap: break-word;
  line-break: strict;
}
a { color: var(--accent); text-underline-offset: 0.2em; }
img { max-width: 100%; height: auto; }

/* 英語は日本語のすぐ下に、少し控えめに出す */
[lang="en"] { color: var(--en); letter-spacing: 0; }
h1 [lang="en"], h2 [lang="en"] { font-size: 0.6em; font-weight: 500; margin-left: 0.4em; }
p[lang="en"] { margin-top: -0.6em; }

.site-header, main, .site-footer { max-width: 44rem; margin: 0 auto; padding: 0 16px; }
.site-header {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px; padding-top: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; font-size: 1.25rem; color: var(--text); text-decoration: none; letter-spacing: 0.04em; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.site-header nav a { color: var(--text); text-decoration: none; font-size: 0.95rem; line-height: 1.3; }
.site-header nav a span { display: block; font-size: 0.7rem; }
.site-header nav a[aria-current="page"] { color: var(--accent); }

main { padding-top: 24px; padding-bottom: 48px; }
h1 { font-size: 1.75rem; line-height: 1.4; margin: 0.4em 0 0.6em; }
h2 { font-size: 1.2rem; line-height: 1.5; margin: 2em 0 0.6em; padding-bottom: 0.3em; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: 2.4rem; margin-bottom: 0.2em; letter-spacing: 0.04em; }
.lead { font-size: 1.1rem; margin: 0.2em 0; }
.lead[lang="en"] { margin-top: 0; }

/* 事業者情報の表。狭い画面では見出しを上に積む */
.facts, .footer-facts { margin: 0; }
.facts > div {
  display: grid; grid-template-columns: 9rem 1fr; gap: 4px 16px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.facts dt { font-weight: 600; line-height: 1.5; }
.facts dt span { display: block; font-weight: 400; font-size: 0.8rem; }
.facts dd { margin: 0; }
@media (max-width: 560px) {
  .facts > div { grid-template-columns: 1fr; }
}

.app-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.app-card {
  display: flex; gap: 16px; align-items: center; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  color: var(--text); text-decoration: none;
}
.app-card img { border-radius: 14px; flex: none; }
.app-card > span { display: flex; flex-direction: column; line-height: 1.6; }
.app-card strong { font-size: 1.1rem; }
.app-head { display: flex; gap: 20px; align-items: center; }
.app-head img { border-radius: 20px; flex: none; }
.app-head h1 { margin: 0; }
@media (max-width: 420px) { .app-head { flex-direction: column; align-items: flex-start; } }

.links { padding-left: 1.2em; }
.contact-mail { font-size: 1.2rem; font-weight: 600; }
.note { color: var(--muted); font-size: 0.9rem; }

/* 特商法の表 */
.legal-table { width: 100%; border-collapse: collapse; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 12px 8px; border-bottom: 1px solid var(--line); }
.legal-table th { width: 30%; font-weight: 600; line-height: 1.5; }
.legal-table th span { display: block; font-weight: 400; font-size: 0.8rem; }
.legal-table td p { margin: 0 0 0.4em; }
.price-table { border-collapse: collapse; margin: 0.2em 0 0.6em; width: 100%; }
.price-table td { padding: 4px 0; border: 0; border-bottom: 1px dashed var(--line); vertical-align: baseline; }
.price-table td:last-child { text-align: right; padding-left: 12px; font-size: 0.9em; }
.price-table .amount { white-space: nowrap; font-weight: 600; font-size: 1.1em; }
@media (max-width: 560px) {
  /* 外側の表だけ縦積みにする。内側の価格表は「名前｜価格」の横並びを保つ */
  .legal-table, .legal-table > tbody, .legal-table > tbody > tr,
  .legal-table > tbody > tr > th, .legal-table > tbody > tr > td { display: block; width: 100%; }
  .legal-table > tbody > tr > th { border-bottom: 0; padding-bottom: 0; }
}

.site-footer { border-top: 1px solid var(--line); padding-top: 24px; padding-bottom: 32px; font-size: 0.85rem; color: var(--muted); }
.footer-name { font-weight: 700; color: var(--text); margin: 0 0 8px; }
.footer-facts > div { display: grid; grid-template-columns: 8rem 1fr; gap: 0 12px; padding: 2px 0; }
.footer-facts dd { margin: 0; }
.footer-facts [lang="en"] { color: var(--muted); }
@media (max-width: 560px) { .footer-facts > div { grid-template-columns: 1fr; padding: 4px 0; } }
.copyright { margin-top: 16px; }
