/*
 * WorkApp 製品紹介サイト
 * 色はアプリ本体 (work-app/apps/web/src/styles/tokens.css) に揃えている。
 *   --accent-now  現在の状態 (深い青緑)
 *   --accent-past 過去の状態 (くすんだ金茶)
 */
:root {
  --ink: #16202b;
  --ink-2: #4a5663;
  --ink-3: #7b8792;
  --paper: #f4f6f7;
  --surface: #ffffff;
  --line: #dde2e7;
  --line-strong: #bcc5cd;
  --accent: #0b6e5f;
  --accent-deep: #08574b;
  --accent-soft: #e4f1ee;
  --past: #8a6a2f;
  --past-soft: #f8f0dd;
  --night: #16202b;

  /* 日本語のフォントを system-ui より先に置く。system-ui を先にすると
     環境によって中国語の字形 (簡体字のフォント) で漢字が出るため */
  --font: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Hiragino Sans",
    "BIZ UDPGothic", "Yu Gothic UI", Meiryo, system-ui, sans-serif;
  --font-data: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1180px;
  --radius: 6px;
  --shadow: 0 1px 2px rgb(22 32 43 / 6%), 0 12px 32px -12px rgb(22 32 43 / 22%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface);
  line-height: 1.8;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.4; margin: 0; letter-spacing: 0.01em; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 820px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--surface); padding: 8px 12px; }
.sp { display: none; }
/* 日本語の見出しを語のまとまりで折り返す */
.nw { display: inline-block; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-weight: 700; font-size: 15px; text-decoration: none;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); }
.btn-ghost { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--accent-deep); }
.btn-light:hover { background: var(--accent-soft); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 92%);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 20px; color: var(--ink); text-decoration: none; letter-spacing: 0.01em;
}
.brand-mark {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 8px 0 0 -3px var(--past);
  margin-right: 6px;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600; }
.site-nav a:not(.btn):hover { color: var(--accent); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 500px at 85% -10%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--paper) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 88px;
}
.eyebrow {
  font-size: 13px; font-weight: 800; letter-spacing: 0.14em;
  color: var(--accent); margin-bottom: 12px;
}
.hero h1 { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: 0; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 24px; color: var(--ink-2); font-size: 16px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-points {
  display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 28px 0 0; padding: 0; list-style: none;
  font-size: 14px; color: var(--ink-2);
}
.hero-points li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 6px; }

.hero-visual { position: relative; padding-bottom: 40px; }
.frame { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.frame-bar {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  background: #eef1f3; border-bottom: 1px solid var(--line);
}
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.frame-bar span { margin-left: 10px; font-size: 11px; color: var(--ink-3); font-family: var(--font-data); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame-phone {
  position: absolute; right: -8px; bottom: 0; width: 26%;
  border: 6px solid var(--night); border-radius: 26px;
}
.hero-visual .frame-browser { margin-right: 12%; }

/* ---------- Stats ---------- */
.stats { background: var(--night); color: #fff; }
.stats-inner { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-inner > div { display: flex; align-items: center; gap: 14px; padding: 28px 16px; }
.stats-inner > div + div { border-left: 1px solid rgb(255 255 255 / 12%); }
.stats b { font-family: var(--font-data); font-size: 38px; line-height: 1; color: #7fd1c2; font-weight: 700; }
.stats span { font-size: 13px; line-height: 1.6; color: rgb(255 255 255 / 78%); }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-alt { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section h2 { font-size: clamp(26px, 2.8vw, 36px); font-weight: 800; }
.section-lead { margin-top: 16px; color: var(--ink-2); }

/* ---------- Features ---------- */
.feature {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px; align-items: center;
}
.feature + .feature { margin-top: 112px; }
.feature-rev .feature-copy { order: 2; }
.feature-no { font-family: var(--font-data); font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; }
.feature h3 { font-size: 26px; font-weight: 800; margin: 8px 0 20px; }
.feature p { color: var(--ink-2); }
.chip { display: inline-block; padding: 0 8px; border-radius: 3px; font-size: 13px; font-weight: 700; line-height: 1.8; }
.chip-past { background: var(--past-soft); color: var(--past); border: 1px solid #e5d3a6; }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 28px; font-size: 15px; }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%230b6e5f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat;
}

.perm-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); background: var(--surface); }
.perm-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.perm-table th, .perm-table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: center; }
.perm-table thead th { background: var(--paper); font-size: 13px; color: var(--ink-2); }
.perm-table tbody th { text-align: left; font-weight: 600; }
.perm-table tbody tr:last-child > * { border-bottom: 0; }
.perm-table td { color: var(--ink-3); }
.perm-table td.ok { color: var(--accent); font-weight: 800; }
.perm-table td.self { color: var(--past); font-size: 12px; font-weight: 700; }

/* ---------- Modules ---------- */
.module-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.module {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 28px 30px;
  transition: border-color .15s, transform .15s;
}
.module:hover { border-color: var(--accent); }
.module svg {
  width: 40px; height: 40px; padding: 8px; border-radius: 8px;
  background: var(--accent-soft); stroke: var(--accent); fill: none; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.module h3 { font-size: 18px; margin: 16px 0 8px; }
.module p { font-size: 14px; color: var(--ink-2); line-height: 1.85; }

/* ---------- Gallery ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.tabs button {
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  min-height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2);
}
.tabs button:hover { border-color: var(--ink); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 28px; }
.gallery li[hidden] { display: none; }
.gallery h3 { font-size: 17px; margin: 16px 0 4px; }
.gallery p { font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.shot {
  display: block; width: 100%; padding: 0; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--paper);
  box-shadow: 0 1px 2px rgb(22 32 43 / 6%);
  transition: box-shadow .2s, transform .2s;
}
.shot:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.shot img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; width: 100%; }
/* スマホの画面は縦長なので、端末の枠の上半分だけを見せる */
.gallery li.is-phone .shot {
  aspect-ratio: 16 / 10; padding-top: 18px;
  background: linear-gradient(180deg, var(--accent-soft), var(--paper));
}
.gallery li.is-phone .shot img {
  width: 44%; margin: 0 auto; aspect-ratio: auto; object-fit: initial;
  border: 5px solid var(--night); border-bottom: 0; border-radius: 18px 18px 0 0;
}
.note { margin-top: 40px; font-size: 13px; color: var(--ink-3); }

/* ---------- Lightbox ---------- */
.lightbox {
  border: 0; padding: 0; background: transparent; max-width: min(1280px, 94vw); max-height: 94vh; width: 100%;
  overflow: visible;
}
.lightbox::backdrop { background: rgb(10 16 22 / 82%); }
.lightbox figure { margin: 0; }
.lightbox img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 6px; background: #fff; }
.lightbox figcaption { color: #fff; text-align: center; margin-top: 12px; font-size: 14px; }
.lightbox-close {
  position: absolute; top: -44px; right: 0; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: rgb(255 255 255 / 14%); color: #fff; font-size: 22px; cursor: pointer;
}
.lightbox-close:hover { background: rgb(255 255 255 / 26%); }

/* ---------- Security ---------- */
.section-dark { background: var(--night); color: #fff; }
.section-dark .eyebrow { color: #7fd1c2; }
.section-dark .section-lead { color: rgb(255 255 255 / 72%); }
.sec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgb(255 255 255 / 12%); border: 1px solid rgb(255 255 255 / 12%); border-radius: var(--radius); overflow: hidden; }
.sec { background: var(--night); padding: 32px 28px; }
.sec h3 { font-size: 17px; margin-bottom: 12px; }
.sec h3::before { content: ""; display: block; width: 24px; height: 3px; background: #7fd1c2; margin-bottom: 16px; }
.sec p { font-size: 14px; color: rgb(255 255 255 / 72%); line-height: 1.85; }

/* ---------- Tech ---------- */
.tech-inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.tech-list { margin: 0; border-top: 1px solid var(--line); }
.tech-list > div { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.tech-list dt { font-size: 13px; font-weight: 700; color: var(--ink-3); }
.tech-list dd { margin: 0; font-weight: 600; }

/* ---------- Flow ---------- */
.flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.flow li { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 24px; }
.flow li:not(:last-child)::after {
  content: ""; position: absolute; right: -14px; top: 50%; width: 8px; height: 8px;
  border-top: 2px solid var(--line-strong); border-right: 2px solid var(--line-strong);
  transform: translateY(-50%) rotate(45deg);
}
.flow-no { font-family: var(--font-data); font-size: 12px; font-weight: 700; color: var(--accent); letter-spacing: 0.1em; }
.flow h3 { font-size: 17px; margin: 8px 0 10px; }
.flow p { font-size: 14px; color: var(--ink-2); line-height: 1.85; }

/* ---------- FAQ ---------- */
.faq { border-bottom: 1px solid var(--line); }
.faq:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative;
  font-weight: 700; font-size: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--accent); font-weight: 400;
}
.faq[open] summary::after { content: "−"; }
.faq p { padding: 0 0 24px; color: var(--ink-2); font-size: 15px; }

/* ---------- CTA / Footer ---------- */
.cta { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%); color: #fff; }
.cta-inner { text-align: center; padding-top: 96px; padding-bottom: 96px; }
.cta h2 { font-size: clamp(24px, 2.8vw, 34px); font-weight: 800; }
.cta p { margin-top: 16px; color: rgb(255 255 255 / 82%); }
.cta .hero-cta { justify-content: center; }
.site-footer { background: var(--night); color: rgb(255 255 255 / 60%); font-size: 13px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px; padding-top: 28px; padding-bottom: 28px; }
.site-footer .brand { color: #fff; font-size: 17px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .module-grid, .gallery { grid-template-columns: repeat(2, 1fr); }
  .sec-grid { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow li::after { display: none; }
  .site-nav { gap: 18px; }
}

@media (max-width: 860px) {
  .pc { display: none; }
  .sp { display: inline; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  }
  .nav-toggle span[aria-hidden],
  .nav-toggle span[aria-hidden]::before,
  .nav-toggle span[aria-hidden]::after {
    display: block; width: 22px; height: 2px; background: var(--ink); position: relative; content: "";
  }
  .nav-toggle span[aria-hidden]::before { position: absolute; top: -7px; }
  .nav-toggle span[aria-hidden]::after { position: absolute; top: 7px; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
  .site-nav .btn { margin-top: 12px; }

  .wrap { padding: 0 16px; }
  .hero-inner, .feature, .tech-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-inner { padding-top: 48px; padding-bottom: 56px; }
  .feature-rev .feature-copy { order: 0; }
  .feature + .feature { margin-top: 80px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .stats-inner { grid-template-columns: repeat(2, 1fr); }
  .stats-inner > div:nth-child(3) { border-left: 0; }
  .stats-inner > div:nth-child(n + 3) { border-top: 1px solid rgb(255 255 255 / 12%); }
  .stats b { font-size: 30px; }
}

@media (max-width: 600px) {
  body { font-size: 15px; }
  .module-grid, .gallery, .sec-grid, .flow { grid-template-columns: 1fr; }
  .tech-list > div { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .hero-cta .btn { flex: 1 1 auto; }
  .lightbox-close { top: -48px; }
}

/* ==========================================================
 * 料金ページ (pricing.html)
 * ========================================================== */
.btn-outline-light { border-color: rgb(255 255 255 / 60%); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgb(255 255 255 / 10%); }
.site-nav a[aria-current="page"] { color: var(--accent); }

.page-head {
  text-align: center; padding: 80px 0 56px;
  background:
    radial-gradient(900px 400px at 50% -20%, var(--accent-soft), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}
.page-head h1 { font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; }
.page-head .lead { max-width: 720px; margin: 20px auto 0; }
.draft-note {
  display: table; margin: 24px auto 0; padding: 10px 16px;
  background: var(--past-soft); color: var(--past); border: 1px solid #e5d3a6; border-radius: var(--radius);
  font-size: 14px;
}
.billing {
  display: inline-flex; margin-top: 32px; padding: 4px; gap: 4px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
}
.billing button {
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  min-height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2);
}
.billing button[aria-checked="true"] { background: var(--ink); color: #fff; }
.billing .save { font-size: 11px; margin-left: 4px; padding: 1px 6px; border-radius: 3px; background: var(--accent-soft); color: var(--accent); }

.plans-section { background: var(--paper); padding: 8px 0 96px; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 36px 32px;
}
.plan-featured { border: 2px solid var(--accent); box-shadow: var(--shadow); }
.plan-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 14px; border-radius: 999px;
}
.plan h2 { font-size: 22px; font-weight: 800; }
.plan-for { margin-top: 6px; font-size: 14px; color: var(--ink-2); }
.price { margin-top: 24px; display: flex; align-items: baseline; gap: 4px; line-height: 1; }
.price .yen { font-size: 22px; font-weight: 700; }
.price .amount { font-size: 48px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.price .unit { font-size: 14px; color: var(--ink-2); margin-left: 4px; }
.price-quote { font-size: 36px; font-weight: 800; }
.price-sub { margin-top: 10px; font-size: 13px; color: var(--ink-3); min-height: 1.8em; }
.plan-cta { margin-top: 24px; width: 100%; }
.plan-plus { margin-top: 28px; font-size: 13px; font-weight: 700; color: var(--accent); }
.plan-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; font-size: 14px; }
.plan-cta + .plan-list { margin-top: 28px; }
.plan-list li { position: relative; padding-left: 24px; line-height: 1.7; }
.plan-list li::before {
  content: ""; position: absolute; left: 2px; top: 0.4em; width: 12px; height: 7px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}
.plans-section .note { text-align: center; }

.sim {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 40px;
}
.sim-input label { font-weight: 700; }
.sim-row { display: flex; align-items: center; gap: 20px; margin-top: 12px; }
.sim-row input { flex: 1; accent-color: var(--accent); height: 32px; }
.sim-row output { min-width: 88px; text-align: right; font-size: 15px; }
.sim-row output b { font-size: 30px; font-variant-numeric: tabular-nums; }
.sim-hint { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.sim-result { margin: 0; display: grid; gap: 12px; }
.sim-result > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius);
}
.sim-result > div.is-featured { border-color: var(--accent); background: var(--accent-soft); }
.sim-result dt { font-weight: 700; }
.sim-result dd { margin: 0; text-align: right; }
.sim-result b { font-size: 28px; font-variant-numeric: tabular-nums; }
.sim-result span { margin-left: 6px; font-size: 13px; color: var(--ink-2); }

.cmp-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.cmp { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.cmp th, .cmp td { padding: 14px 20px; border-bottom: 1px solid var(--line); }
.cmp thead th { position: sticky; top: 0; background: var(--surface); font-size: 15px; text-align: center; border-bottom: 2px solid var(--ink); }
.cmp thead th:first-child { text-align: left; }
.cmp thead th.is-featured { color: var(--accent); }
.cmp tbody th { text-align: left; font-weight: 500; }
.cmp td { text-align: center; color: var(--accent); font-weight: 800; font-size: 17px; width: 16%; }
.cmp td:nth-child(3) { background: rgb(228 241 238 / 45%); }
.cmp td.no { color: var(--line-strong); font-weight: 400; }
.cmp .cmp-group th { background: var(--paper); font-size: 13px; font-weight: 800; color: var(--ink-2); padding-top: 10px; padding-bottom: 10px; }
.cmp tbody tr:last-child > * { border-bottom: 0; }

.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.option { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.option h3 { font-size: 17px; }
.option-price { margin: 12px 0; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.option-price span { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.option p:last-child { font-size: 14px; color: var(--ink-2); line-height: 1.85; }

@media (max-width: 1080px) {
  .plans { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}
@media (max-width: 860px) {
  .page-head { padding: 56px 0 40px; }
  .sim { grid-template-columns: 1fr; padding: 28px 20px; }
  .options { grid-template-columns: 1fr; }
  .plan { padding: 32px 24px; }
}

/* ==========================================================
 * 規約・申込ページ (terms / conditions / privacy / tokushoho / apply)
 * ========================================================== */
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer-links a { color: rgb(255 255 255 / 75%); text-decoration: none; }
.footer-links a:hover { color: #fff; text-decoration: underline; }

.doc-head {
  padding: 64px 0 40px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}
.doc-head h1 { font-size: clamp(26px, 3vw, 36px); font-weight: 800; }
.doc-head .draft-note { display: block; margin: 20px 0 0; }
.doc-section { padding: 48px 0 96px; }
.doc-layout.has-toc { max-width: var(--wrap); display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-toc { position: sticky; top: 88px; font-size: 13px; max-height: calc(100vh - 110px); overflow-y: auto; }
.doc-toc p { font-weight: 800; color: var(--ink-3); letter-spacing: 0.1em; margin-bottom: 8px; }
.doc-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.doc-toc a { display: block; padding: 5px 0 5px 14px; color: var(--ink-2); text-decoration: none; line-height: 1.6; }
.doc-toc a:hover { color: var(--accent); }

.doc { max-width: 760px; font-size: 15px; line-height: 1.95; }
.doc > p { margin: 0 0 16px; }
.doc h2 {
  font-size: 19px; font-weight: 800; margin: 44px 0 14px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line); scroll-margin-top: 84px;
}
.doc h2:first-child { margin-top: 0; }
.doc ol, .doc ul { margin: 0 0 16px; padding-left: 1.6em; }
.doc ol > li, .doc ul > li { margin: 6px 0; }
.doc ol.sub { list-style: none; counter-reset: sub; padding-left: 0.4em; margin: 6px 0; }
.doc ol.sub > li { counter-increment: sub; padding-left: 2.2em; position: relative; }
.doc ol.sub > li::before { content: "(" counter(sub) ")"; position: absolute; left: 0; color: var(--ink-2); }
.doc .ph { background: var(--past-soft); color: var(--past); padding: 0 3px; border-radius: 2px; font-weight: 600; }
.doc-end { text-align: right; margin-top: 32px !important; }
.doc-date { text-align: right; color: var(--ink-2); font-size: 14px; }

.doc-table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 14px; line-height: 1.8; }
.doc-table th, .doc-table td { border: 1px solid var(--line); padding: 10px 14px; vertical-align: top; text-align: left; }
.doc-table thead th { background: var(--paper); font-size: 13px; color: var(--ink-2); }
.doc-table tbody th { background: var(--surface-2, #fafbfc); font-weight: 700; white-space: nowrap; }
.doc-table-kv tbody th { width: 30%; white-space: normal; }
.doc-table small { color: var(--ink-3); }
.doc-dl { margin: 0; border-top: 1px solid var(--line); }
.doc-dl > div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.doc-dl dt { font-weight: 700; color: var(--ink-2); font-size: 14px; }
.doc-dl dd { margin: 0; }

.apply-steps { list-style: none; padding: 0 !important; margin: 0 0 40px !important; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.apply-steps li { margin: 0 !important; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
.apply-steps span {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 800;
}
.apply-steps b { display: block; margin-top: 8px; font-size: 15px; }
.apply-steps p { margin-top: 4px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.apply-form { margin-top: 8px; }
.apply-pending { padding: 24px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper); text-align: center; }
.apply-help { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.apply-form iframe { display: block; width: 100%; height: 1400px; margin-top: 24px; border: 1px solid var(--line); border-radius: var(--radius); }

@media (max-width: 960px) {
  .doc-layout.has-toc { grid-template-columns: 1fr; gap: 24px; }
  .doc-toc { position: static; max-height: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
  .doc-toc ol { columns: 2; column-gap: 24px; border-left: 0; }
  .doc-toc a { padding-left: 0; }
}
@media (max-width: 600px) {
  .doc-toc ol { columns: 1; }
  .doc-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .apply-steps { grid-template-columns: 1fr 1fr; }
  .doc-table tbody th { white-space: normal; }
  .footer-links { gap: 4px 16px; }
}
