:root {
  --bg: #f6f5f2;
  --surface: #ffffff;
  --text: #1f1d1a;
  --muted: #6b665e;
  --border: #e3dfd8;
  --accent: #d9622b;
  --accent-text: #ffffff;
  --accent-soft: #fbeee6;
  --radius: 12px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --surface: #211f1c;
    --text: #ece8e1;
    --muted: #a39d93;
    --border: #36322d;
    --accent: #f08a4b;
    --accent-text: #1b1a17;
    --accent-soft: #3a2a20;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 12px;
}

p {
  margin: 0;
}

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

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.button {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.button:hover {
  border-color: var(--muted);
}

.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.button.large {
  padding: 12px 24px;
  font-size: 1.05rem;
}

/* 新しいタブで開くリンクのアイコン */
.external {
  margin-left: 6px;
  vertical-align: -2px;
}

/* 画面には出さず、読み上げだけする */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.brand {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover {
  color: var(--text);
}

/* 右上の言語メニュー(details で開閉する) */
.lang-menu {
  position: relative;
}

.lang-menu summary {
  display: grid;
  place-items: center;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  color: var(--text);
  border-color: var(--border);
}

.lang-menu nav {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 160px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 6px 20px rgb(0 0 0 / 0.15);
}

.lang-menu nav a {
  padding: 6px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.lang-menu nav a:hover,
.lang-menu nav a:focus-visible {
  background: var(--accent-soft);
}

.lang-menu nav a[aria-current='page'] {
  color: var(--accent);
  font-weight: 600;
}

/* トップ上部のお知らせ(準備中の機能など) */
.notice-bar {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-weight: 600;
}

.notice-bar p {
  padding-top: 10px;
  padding-bottom: 10px;
}

/* ヒーロー */
.hero {
  padding: 64px 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.lead {
  color: var(--muted);
  font-size: 1.1rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* 通知の見え方の例 */
.demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.08);
}

.demo-channel {
  color: var(--muted);
  font-weight: 600;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.demo-message {
  display: flex;
  gap: 12px;
  padding: 8px 0;
}

.demo-avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  font-size: 1.2rem;
}

.demo-name {
  font-weight: 700;
  font-size: 0.9rem;
}

.demo-text {
  font-size: 0.95rem;
}

/* セクション */
.section {
  padding: 56px 0;
}

.section.alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
}

.cards,
.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.section.alt .card {
  background: var(--bg);
}

.card h2,
.card h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
}

.steps {
  counter-reset: step;
}

.steps li {
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 700;
}

.closing {
  text-align: center;
}

.closing p {
  color: var(--muted);
  margin-bottom: 24px;
}

/* 機能と料金 */
.page-head {
  padding: 56px 0 8px;
}

.page-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.table-wrap {
  overflow-x: auto;
}

.plan-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  background: var(--bg);
  border-radius: var(--radius);
}

.plan-table th,
.plan-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.plan-table th[scope='row'],
.plan-table thead th:first-child {
  text-align: left;
}

.price {
  display: block;
  color: var(--accent);
  font-size: 0.9rem;
}

.note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq details p {
  color: var(--muted);
  margin-top: 12px;
}

/* お知らせ */
.feed-link {
  margin-top: 12px;
}

.feed-link a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}

.news-list {
  display: grid;
  gap: 20px;
  max-width: 760px;
}

.news-list time {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.not-found {
  padding-bottom: 56px;
}

.not-found p {
  margin-bottom: 8px;
}

/* 法務ページ */
.legal {
  max-width: 760px;
}

.legal .lead {
  margin-bottom: 32px;
}

.legal section {
  margin-bottom: 28px;
}

.legal h2 {
  font-size: 1.15rem;
}

.legal p + p,
.legal ul + p,
.legal p + ul {
  margin-top: 8px;
}

.legal ul {
  margin: 0;
  padding-left: 1.4em;
}

.legal li + li {
  margin-top: 4px;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

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

.legal-table th {
  width: 30%;
  font-weight: 600;
}

.legal-dates {
  margin-top: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* フッター */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.languages {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.languages a {
  color: var(--muted);
  text-decoration: none;
}

.languages a[aria-current='page'] {
  color: var(--text);
  font-weight: 600;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.9rem;
}

.legal-links a {
  color: var(--muted);
}

.legal-links a[aria-current='page'] {
  color: var(--text);
}

.copyright {
  color: var(--muted);
  font-size: 0.9rem;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* 狭い画面 */
@media (max-width: 760px) {
  .hero {
    padding: 40px 0;
  }

  .hero-inner,
  .cards,
  .steps,
  .feature-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 8px 16px;
  }

  .lang-menu {
    margin-left: auto;
  }

  /* メニューは2段目に回す */
  .site-nav {
    order: 3;
    flex-wrap: wrap;
    gap: 4px 16px;
    width: 100%;
    margin-left: 0;
    font-size: 0.9rem;
  }

  .section {
    padding: 40px 0;
  }

  .legal-table th {
    width: 40%;
  }
}
