/* =========================================================
   JapanMedTech — base stylesheet
   ========================================================= */
:root {
  --ground: #F6F7F4;
  --surface: #FFFFFF;
  --surface-2: #F1F3F0;
  --ink: #13201C;
  --ink-2: #3A4743;
  --muted: #4A5752;
  --line: #D5DCD8;
  --line-soft: #E4E8E6;
  --accent: #0E6B58;
  --accent-ink: #0A4F41;
  --accent-soft: #E3F1EC;
  --amber: #9A4A08;
  --amber-ink: #6B3A10;
  --amber-soft: #FBEBDD;
  --blue: #1D4ED8;
  --blue-soft: #E4EBFB;
  --red: #B42318;
  --red-soft: #FBE4E0;
  --dark: #10231E;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 18px 40px -24px rgba(19, 32, 28, .35);
  --font: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  --font-en: "Inter", var(--font);
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  font-feature-settings: "palt" 0;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid #F2B36B; outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }

/* ---------- PR bar / header ---------- */
.pr-bar { background: var(--ink); color: #C9D3CF; font-size: 12px; text-align: center; padding: 5px 16px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: var(--font-en); font-weight: 800; font-size: 20px; letter-spacing: -.01em; line-height: 1.2; display: block; }
.brand-tag { display: block; font-size: 11px; color: var(--muted); line-height: 1.2; }
.gnav { display: flex; gap: 4px 22px; font-weight: 700; font-size: 15px; }
.gnav a { color: var(--ink); text-decoration: none; padding: 10px 0; border-bottom: 2px solid transparent; }
.gnav a:hover, .gnav a[aria-current="page"] { border-color: var(--accent); color: var(--ink); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.menu-btn { display: none; background: var(--ink); border-color: var(--ink); color: #fff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 16px; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.4; text-align: center; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }
.btn-amber { background: var(--amber); color: #fff; }
.btn-amber:hover { background: var(--amber-ink); color: #fff; }
.btn-sm { min-height: 44px; padding: 10px 16px; font-size: 14px; }
.btn-block { width: 100%; }

.mobile-cats { display: none; }
@media (max-width: 900px) {
  .gnav, .header-actions .btn { display: none; }
  .menu-btn { display: inline-flex; }
  .brand-tag { display: none; }
  .mobile-cats { display: flex; gap: 8px; padding: 10px 16px; overflow-x: auto; background: var(--surface); border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .mobile-cats a { flex-shrink: 0; font-size: 13px; font-weight: 700; text-decoration: none; color: var(--ink); background: var(--surface-2); border-radius: 999px; padding: 8px 14px; }
  .mobile-cats a[aria-current="page"] { background: var(--accent); color: #fff; }
}

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 90; display: none; }
.drawer.is-open { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(16, 35, 30, .5); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(86vw, 340px); background: var(--surface); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.drawer-panel a.dlink { display: block; padding: 14px 6px; border-bottom: 1px solid var(--line-soft); color: var(--ink); text-decoration: none; font-weight: 700; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }

/* search */
.search-box { display: none; background: var(--surface); border-bottom: 1px solid var(--line); }
.search-box.is-open { display: block; }
.search-box .wrap { padding-block: 14px; }
.search-box input { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; }
.search-results { list-style: none; margin: 8px 0 0; padding: 0; }
.search-results li a { display: block; padding: 10px 4px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: var(--ink); font-weight: 700; }
.search-results li span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }

/* ---------- Common blocks ---------- */
.section { padding-block: 64px; }
.section-tight { padding-block: 40px; }
.section-white { background: var(--surface); border-block: 1px solid var(--line); }
.section-dark { background: var(--dark); color: #fff; }
.eyebrow { font-family: var(--font-en); font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.section-dark .eyebrow { color: #8FD3C1; }
.h2 { margin: 0; font-size: clamp(24px, 3vw, 30px); font-weight: 900; line-height: 1.4; }
.lead { font-size: 17px; color: var(--ink-2); margin: 0; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.more { font-weight: 700; font-size: 15px; text-decoration: none; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 999px; padding: 5px 12px; color: var(--accent); background: var(--accent-soft); }
.tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 4px; padding: 1px 8px; line-height: 1.7; }
.tag-exam { color: var(--accent); background: var(--accent-soft); }
.tag-dx { color: var(--amber); background: var(--amber-soft); }
.tag-career { color: var(--blue); background: var(--blue-soft); }
.tag-pr { color: var(--ink-2); background: #ECEDEA; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; }

/* ---------- Hero ---------- */
.hero { padding-block: 64px 40px; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 48px; align-items: center; }
.hero h1 { margin: 0; font-size: clamp(34px, 4.6vw, 58px); font-weight: 900; line-height: 1.22; letter-spacing: .01em; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 600px) {
  .hero { padding-block: 32px 24px; gap: 28px; }
  .hero-actions { width: 100%; flex-direction: column; }
  .hero-actions .btn { width: 100%; }
}

/* ---------- Quiz ---------- */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); }
.quiz-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quiz-label { font-size: 14px; font-weight: 900; color: var(--accent); }
.quiz-chapter { font-size: 12px; color: var(--muted); background: var(--surface-2); border-radius: 6px; padding: 3px 8px; }
.quiz-q { font-size: 18px; font-weight: 700; line-height: 1.6; margin: 0; }
.quiz-opts { display: flex; flex-direction: column; gap: 10px; }
.quiz-opt { display: flex; gap: 10px; align-items: center; width: 100%; min-height: 48px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-family: inherit; font-size: 15px; color: var(--ink); cursor: pointer; line-height: 1.5; }
.quiz-opt:hover:not([disabled]) { border-color: var(--accent); }
.quiz-opt .k { font-family: var(--font-en); font-weight: 700; width: 22px; flex-shrink: 0; }
.quiz-opt.is-correct { background: var(--accent-soft); border-color: var(--accent); font-weight: 700; }
.quiz-opt.is-wrong { background: var(--red-soft); border-color: var(--red); }
.quiz-opt[disabled] { cursor: default; }
.quiz-result { border-radius: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.7; }
.quiz-result.ok { background: var(--accent-soft); color: var(--accent-ink); }
.quiz-result.ng { background: var(--amber-soft); color: var(--amber-ink); }
.quiz-result strong { display: block; font-size: 15px; margin-bottom: 2px; }
.quiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.quiz-next { background: none; border: none; color: var(--accent); font: inherit; font-weight: 700; cursor: pointer; padding: 10px 0; }
.quiz-score { color: var(--muted); font-size: 13px; }

/* ---------- Stats ---------- */
.stats { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px 32px; }
.stat-num { font-family: var(--font-en); font-size: 38px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; line-height: 1.2; }
.stat-num small { font-size: 18px; margin-left: 4px; }
.stat-label { font-size: 14px; color: var(--ink-2); }
.stat-src { display: flex; align-items: flex-end; font-size: 12px; color: var(--muted); }
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 18px 14px; gap: 10px; text-align: center; }
  .stat-num { font-size: 22px; }
  .stat-num small { font-size: 12px; margin-left: 2px; }
  .stat-label { font-size: 11px; line-height: 1.4; }
  .stat-src { grid-column: 1 / -1; justify-content: center; border-top: 1px solid var(--line-soft); padding-top: 8px; font-size: 11px; }
}

/* ---------- Pillars ---------- */
.pillar { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 12px; transition: border-color .15s, transform .15s; }
.pillar:hover { border-color: var(--accent); color: var(--ink); transform: translateY(-2px); }
.pillar-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.pillar-icon.blue { background: var(--blue-soft); color: var(--blue); }
.pillar-icon.amber { background: var(--amber-soft); color: var(--amber); }
.pillar-title { font-size: 20px; font-weight: 900; }
.pillar-desc { font-size: 15px; color: var(--ink-2); flex-grow: 1; }
.pillar-more { font-size: 14px; font-weight: 700; color: var(--accent); }

/* ---------- Chapter list ---------- */
.chapters { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: none; }
.chapter { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: var(--ground); }
.chapter:hover { border-color: var(--accent); color: var(--ink); }
.chapter-no { font-family: var(--font-en); font-size: 22px; font-weight: 800; color: var(--accent); width: 28px; flex-shrink: 0; }
.chapter-name { flex-grow: 1; font-weight: 700; }
.chapter-q { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- App band ---------- */
.app-mock { display: flex; justify-content: center; align-items: flex-end; gap: 28px; }
.phone { width: 220px; height: 420px; border-radius: 36px; background: #1C3A32; border: 6px solid #2C4F46; padding: 22px 16px; display: flex; flex-direction: column; gap: 14px; }
.phone-chip { font-size: 12px; color: #8FD3C1; font-weight: 700; }
.flash { flex-grow: 1; background: #fff; color: var(--ink); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 10px; text-align: center; }
.flash small { font-size: 12px; color: var(--muted); }
.flash b { font-size: 16px; font-weight: 900; line-height: 1.4; }
.flash hr { border: 0; height: 1px; background: var(--line); margin: 6px 0; width: 100%; }
.flash em { font-style: normal; font-weight: 700; color: var(--accent); font-size: 14px; }
.phone-btns { display: flex; gap: 8px; }
.phone-btns span { flex: 1; height: 38px; border-radius: 10px; background: #2C4F46; }
.phone-btns span + span { background: var(--accent); }
.watch { width: 132px; height: 158px; border-radius: 34px; background: #1C3A32; border: 5px solid #2C4F46; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; margin-bottom: 40px; }
.watch small { font-size: 10px; color: #8FD3C1; }
.watch b { font-size: 15px; }
.watch i { font-style: normal; font-size: 11px; color: #C9D3CF; }
@media (max-width: 600px) {
  .phone { width: 150px; height: 290px; border-radius: 28px; padding: 16px 12px; border-width: 5px; }
  .flash { padding: 12px; }
  .flash b { font-size: 13px; }
  .watch { width: 96px; height: 116px; border-radius: 26px; margin-bottom: 30px; }
  .app-mock { gap: 16px; }
}

/* ---------- DX / service ---------- */
.link-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.link-list a { display: flex; justify-content: space-between; gap: 16px; padding: 18px 2px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; }
.link-list a:hover { color: var(--accent); }
.link-list .meta { font-size: 12px; color: var(--muted); white-space: nowrap; font-weight: 400; }
.service-card { background: var(--amber-soft); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.service-card .label { font-size: 13px; font-weight: 900; color: var(--amber); }
.service-card .title { font-size: 24px; font-weight: 900; line-height: 1.45; }
.checks { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; }
.checks svg { flex-shrink: 0; margin-top: 4px; }
.price-row { display: flex; gap: 28px; flex-wrap: wrap; padding: 14px 0; border-block: 1px solid #EBC9A8; width: 100%; }
.price-row .k { font-size: 12px; color: var(--amber-ink); }
.price-row .v { font-size: 20px; font-weight: 900; }

/* ---------- Article cards ---------- */
.acard { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; transition: border-color .15s; }
.acard:hover { border-color: var(--accent); color: var(--ink); }
.acard-thumb { aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; font-weight: 900; font-size: 18px; line-height: 1.45; }
.thumb-exam { background: linear-gradient(0deg, var(--accent-soft), var(--accent-soft)); color: var(--accent-ink); }
.thumb-dx { background: var(--amber-soft); color: var(--amber-ink); }
.thumb-career { background: var(--blue-soft); color: #1E3A8A; }
.acard-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.acard-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.acard-title { font-weight: 700; font-size: 16px; line-height: 1.55; }
.acard-date { font-size: 12px; color: var(--muted); }
@media (max-width: 600px) {
  .grid-3.cards-compact { grid-template-columns: 1fr; gap: 12px; }
  .cards-compact .acard { flex-direction: row; align-items: center; padding: 12px; gap: 12px; border-radius: 14px; }
  .cards-compact .acard-thumb { width: 92px; flex-shrink: 0; aspect-ratio: 1 / 1; border-radius: 10px; font-size: 11px; padding: 8px; }
  .cards-compact .acard-body { padding: 0; gap: 4px; }
  .cards-compact .acard-title { font-size: 14px; }
}

/* ---------- Author box ---------- */
.author { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.avatar { width: 88px; height: 88px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 30px; flex-shrink: 0; font-family: var(--font-en); }
.author-body { flex: 1 1 360px; display: flex; flex-direction: column; gap: 6px; }
.author-role { font-size: 13px; font-weight: 700; color: var(--muted); }
.author-name { font-size: 20px; font-weight: 900; }
.author-body p { margin: 0; font-size: 15px; color: var(--ink-2); }

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: 13px; color: var(--muted); padding-block: 16px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 8px; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; color: #8A9792; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }

/* ---------- Category page ---------- */
.cat-hero { padding-block: 24px 40px; display: flex; flex-direction: column; gap: 12px; max-width: 820px; }
.cat-hero h1 { margin: 0; font-size: clamp(28px, 4vw, 40px); font-weight: 900; line-height: 1.35; }
.subcats { display: flex; flex-wrap: wrap; gap: 8px; }
.subcats a { font-size: 14px; font-weight: 700; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; }
.subcats a:hover { border-color: var(--accent); }
.pillar-feature { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; text-decoration: none; color: var(--ink); }
.pillar-feature:hover { border-color: var(--accent); color: var(--ink); }
.pillar-feature .acard-thumb { border-radius: 14px; font-size: 22px; }

/* ---------- Article layout ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; padding-bottom: 72px; }
@media (max-width: 1000px) { .article-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.article { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 48px clamp(18px, 5vw, 56px); min-width: 0; }
@media (max-width: 600px) { .article { border-radius: 0; border-inline: 0; margin-inline: -16px; padding: 28px 16px; } }
.article-header { display: flex; flex-direction: column; gap: 14px; margin-bottom: 28px; }
.article-header h1 { margin: 0; font-size: clamp(25px, 3.4vw, 34px); font-weight: 900; line-height: 1.45; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); align-items: center; }
.article-meta .who { display: flex; align-items: center; gap: 8px; }
.article-meta .mini-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-en); font-weight: 900; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.pr-note { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 10px 14px; }

.summary-box { border: 2px solid var(--accent); border-radius: 16px; padding: 20px 22px; margin: 0 0 32px; background: #FBFDFC; }
.summary-box .summary-title { font-weight: 900; color: var(--accent); font-size: 15px; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.summary-box ul { margin: 0; padding-left: 1.2em; }
.summary-box li { margin: 4px 0; }

.toc { background: var(--surface-2); border-radius: 14px; padding: 18px 22px; margin: 0 0 36px; }
.toc-title { font-weight: 900; font-size: 15px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.toc ol { margin: 0; padding-left: 1.4em; }
.toc li { margin: 6px 0; font-size: 15px; }
.toc li li { font-size: 14px; }
.toc ol ol { padding-left: 1.2em; margin-top: 4px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* prose */
.prose { font-size: 17px; line-height: 1.85; letter-spacing: .02em; }
@media (max-width: 600px) { .prose { font-size: 17px; line-height: 1.8; } }
.prose > * + * { margin-top: 1.2em; }
.prose p { margin: 0; }
.prose h2 { margin: 2.6em 0 .9em; font-size: clamp(21px, 2.6vw, 25px); font-weight: 900; line-height: 1.5; padding: 14px 18px; background: var(--accent-soft); border-radius: 12px; color: var(--accent-ink); }
.prose h3 { margin: 2.2em 0 .7em; font-size: 19px; font-weight: 900; line-height: 1.5; padding-bottom: 8px; border-bottom: 2px solid var(--line); }
.prose h4 { margin: 1.8em 0 .5em; font-size: 17px; font-weight: 900; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .35em 0; }
.prose strong { font-weight: 900; background: linear-gradient(transparent 62%, #FCE7C8 62%); }
.prose a { text-underline-offset: 3px; }
.prose blockquote { margin-inline: 0; padding: 14px 18px; border-left: 4px solid var(--line); background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--ink-2); }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose code { font-size: .92em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; margin-top: 1.4em; }
.prose table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; line-height: 1.6; }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.prose thead th { background: var(--surface-2); font-weight: 900; white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
.prose tbody th { background: #FAFBF9; font-weight: 700; white-space: nowrap; }

/* callouts: > [!POINT] etc */
.callout { border-radius: 14px; padding: 16px 18px 16px 18px; border: 1.5px solid; }
.callout-title { font-weight: 900; font-size: 15px; display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.callout > *:last-child { margin-bottom: 0; }
.callout p { margin: 0; }
.callout p + p, .callout ul, .callout ol { margin-top: .6em; }
.callout-point { background: #F4FAF7; border-color: #A9D6C8; }
.callout-point .callout-title { color: var(--accent); }
.callout-memo { background: #FFF9F1; border-color: #EBC9A8; }
.callout-memo .callout-title { color: var(--amber); }
.callout-caution { background: #FFF5F3; border-color: #F0B7AE; }
.callout-caution .callout-title { color: var(--red); }
.callout-field { background: #F4F7FD; border-color: #B9C8F0; }
.callout-field .callout-title { color: var(--blue); }

/* inline mini quiz in articles */
.prose .quiz { box-shadow: none; margin-top: 1.6em; }

/* CTA blocks inside articles */
.cta-box { border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cta-box .cta-label { font-size: 12px; font-weight: 900; letter-spacing: .04em; }
.cta-box .cta-title { font-size: 19px; font-weight: 900; line-height: 1.5; }
.cta-box p { margin: 0; font-size: 15px; }
.cta-app { background: var(--dark); color: #fff; }
.cta-app .cta-label { color: #8FD3C1; }
.cta-app .btn { background: #fff; color: var(--dark); }
.cta-service { background: var(--amber-soft); }
.cta-service .cta-label { color: var(--amber); }
.cta-pr { background: var(--surface); border: 1.5px solid var(--line); }
.cta-pr .cta-label { color: var(--muted); }

/* comparison table */
.compare td.good { color: var(--accent-ink); font-weight: 700; }

/* FAQ */
.faq { margin-top: 48px; }
.faq h2 { margin-bottom: 16px; }
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq details + details { margin-top: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; list-style: none; display: flex; gap: 10px; align-items: flex-start; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; font-family: var(--font-en); font-weight: 800; color: var(--accent); flex-shrink: 0; }
.faq .a { padding: 0 18px 16px 40px; color: var(--ink-2); font-size: 15px; line-height: 1.85; }

/* article footer */
.article-foot { margin-top: 48px; display: flex; flex-direction: column; gap: 24px; }
.sources { font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.sources b { color: var(--ink-2); }
.sources ul { margin: 6px 0 0; padding-left: 1.2em; }
.share { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--muted); }
.share a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700; font-size: 13px; }
.author-card { background: var(--ground); border-radius: 16px; padding: 22px; }

/* prev/next in series */
.series-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.series-nav a { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--surface); }
.series-nav a:hover { border-color: var(--accent); }
.series-nav small { color: var(--muted); font-size: 12px; }
.series-nav b { font-size: 15px; }
.series-nav .next { text-align: right; }

/* sidebar */
.sidebar { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 88px; }
@media (max-width: 1000px) { .sidebar { position: static; } .sidebar .side-toc { display: none; } }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.side-title { font-weight: 900; font-size: 15px; margin-bottom: 10px; }
.side-toc ol { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.side-toc a { display: block; font-size: 14px; padding: 6px 10px; border-left: 2px solid var(--line-soft); color: var(--ink-2); text-decoration: none; line-height: 1.5; }
.side-toc a.is-active { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list a { display: block; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; line-height: 1.55; }
.side-list li:last-child a { border-bottom: 0; }
.side-app { background: var(--dark); color: #fff; border: 0; }
.side-app p { font-size: 14px; color: #C9D3CF; margin: 0 0 12px; }

/* progress bar */
.read-progress { position: fixed; left: 0; top: 0; height: 3px; background: var(--accent); width: 0; z-index: 60; }

/* ---------- Page (static) ---------- */
.page-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 48px clamp(18px, 5vw, 56px); max-width: 860px; margin: 0 auto 72px; }
@media (max-width: 600px) { .page-body { border-radius: 0; border-inline: 0; margin-inline: -16px; padding: 28px 16px; } }
.page-body h1 { margin: 0 0 24px; font-size: clamp(26px, 3.4vw, 34px); font-weight: 900; line-height: 1.4; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 18px; }
.form label { font-weight: 700; font-size: 15px; display: flex; flex-direction: column; gap: 6px; }
.form input, .form select, .form textarea { font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.form textarea { min-height: 160px; resize: vertical; }
.form .req { color: var(--red); font-size: 12px; margin-left: 6px; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 1.4em; }
.plan { border: 1.5px solid var(--line); border-radius: 16px; padding: 22px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.plan.featured { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-soft); }
.plan-name { font-weight: 900; font-size: 17px; }
.plan-price { font-family: var(--font-en); font-size: 26px; font-weight: 800; }
.plan-price small { font-size: 14px; font-family: var(--font); font-weight: 700; color: var(--muted); }
.plan ul { margin: 6px 0 0; padding-left: 1.2em; font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #C9D3CF; }
.site-footer .wrap { padding-block: 48px 28px; display: flex; flex-direction: column; gap: 32px; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 28px; font-size: 14px; }
.footer-cols div { display: flex; flex-direction: column; gap: 8px; }
.footer-cols b { color: #fff; }
.footer-cols a { color: #C9D3CF; text-decoration: none; }
.footer-cols a:hover { color: #fff; text-decoration: underline; }
.footer-brand { font-family: var(--font-en); font-size: 18px; font-weight: 800; color: #fff; }
.footer-bottom { border-top: 1px solid #2C3A36; padding-top: 18px; font-size: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; line-height: 1.7; }

/* ads (AdSense placeholder) */
.ad-slot { margin: 2em 0; text-align: center; min-height: 100px; }
.ad-slot::before { content: "スポンサーリンク"; display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }

@media print {
  .site-header, .pr-bar, .sidebar, .site-footer, .mobile-cats, .share, .cta-box { display: none !important; }
  .article-layout { display: block; }
  .article { border: 0; padding: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Practice page ---------- */
.practice-controls { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.seg legend { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; padding: 0; }
.seg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.seg-btn { min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; }
.seg-btn.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.progress-wrap { margin-bottom: 18px; }
.progress-text { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.progress-bar { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .25s; }
.copied { font-size: 13px; color: var(--accent); margin-left: 6px; }

/* tables fit the phone width instead of scrolling sideways */
@media (max-width: 600px) {
  .prose table { min-width: 0; font-size: 14px; }
  .prose th, .prose td { padding: 9px 10px; }
  .prose thead th, .prose tbody th { white-space: normal; }
  .prose td:first-child, .prose th:first-child { min-width: 4.5em; }
}
