:root {
  --bg: #faf7f0;
  --surface: #ffffff;
  --ink: #1c1c20;
  --muted: #5f5f68;
  --line: #e3dccd;
  --accent: #b52a2a;
  --accent-ink: #ffffff;
  --soft: #f2ece0;
  --ok: #2a7a4b;
  --sans: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", "Times New Roman", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17171a;
    --surface: #202024;
    --ink: #ecebe6;
    --muted: #a3a3ad;
    --line: #34343b;
    --accent: #e0605a;
    --accent-ink: #17171a;
    --soft: #26262b;
    --ok: #62c28a;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.85;
}
img { max-width: 100%; height: auto; display: block; }
p, li, blockquote { text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* language switch: elements carry .ja or .en */
html[data-lang="ja"] .en { display: none !important; }
html[data-lang="en"] .ja { display: none !important; }
html[data-lang="en"] body { line-height: 1.7; }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; letter-spacing: .04em; color: var(--ink); text-decoration: none; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font-size: .92rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 6px 2px; }
.nav a:hover { color: var(--accent); }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; margin-left: 6px; }
.lang button { font: inherit; font-size: .82rem; border: 0; background: transparent; color: var(--muted); padding: 5px 12px; cursor: pointer; min-height: 32px; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* hero */
.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .12em; font-size: .85rem; margin: 0 0 14px; }
.hero h1 { font-family: var(--serif); font-size: clamp(1.9rem, 5.4vw, 3.1rem); line-height: 1.45; margin: 0 0 22px; font-weight: 700; }
.hero p.lead { max-width: 34em; font-size: 1.05rem; color: var(--muted); margin: 0 0 30px; }
.hero .kanji { position: absolute; right: -10px; top: 8px; font-family: var(--serif); font-size: clamp(9rem, 24vw, 17rem); line-height: 1; color: var(--soft); user-select: none; pointer-events: none; z-index: 0; }
.hero .wrap { position: relative; z-index: 1; }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 700; text-decoration: none; border: 2px solid var(--accent); font-size: .98rem; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { color: var(--accent); background: transparent; }
.btn:hover { filter: brightness(1.08); }

/* sections */
section { padding: 56px 0; border-top: 1px solid var(--line); }
h2 { font-family: var(--serif); font-size: clamp(1.5rem, 3.6vw, 2rem); margin: 0 0 8px; line-height: 1.4; }
.sub { color: var(--muted); margin: 0 0 32px; max-width: 40em; }
h3 { font-size: 1.1rem; margin: 0 0 8px; line-height: 1.5; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px 22px 20px; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; line-height: 1.8; }
.card .num { font-family: var(--serif); color: var(--accent); font-size: 1.3rem; font-weight: 700; display: block; margin-bottom: 4px; }

/* samples */
.sample { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; margin-bottom: 26px; }
.sample .tag { display: inline-block; background: var(--soft); border-radius: 999px; padding: 2px 12px; font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.sample h3 { font-family: var(--serif); font-size: 1.35rem; }
.sample > p { color: var(--muted); font-size: .97rem; margin: 0 0 18px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare figure { margin: 0; }
.compare img { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.compare figcaption { font-size: .85rem; color: var(--muted); margin-top: 8px; text-align: center; }
.note, .sample > p.note { font-size: .88rem; color: var(--muted); border-left: 3px solid var(--line); padding: 2px 0 2px 14px; margin: 20px 0 0; }

.result { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; background: var(--bg); margin-bottom: 18px; }
.result .big { font-family: var(--serif); font-size: clamp(3.4rem, 10vw, 5rem); line-height: 1.1; }
.result dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; font-size: .95rem; }
.result dt { color: var(--muted); }
.result dd { margin: 0; }
.result .ok { color: var(--ok); font-weight: 700; }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.table-scroll { overflow-x: auto; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pair blockquote { margin: 0; padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; font-size: .95rem; line-height: 1.85; }
.pair blockquote[lang="en"] { font-family: var(--serif); line-height: 1.7; }
.pair .label { font-size: .78rem; color: var(--muted); display: block; margin-bottom: 6px; letter-spacing: .05em; }

.article-card { display: block; text-decoration: none; color: inherit; }
.article-card h3 { color: var(--accent); }
.article-card:hover h3 { text-decoration: underline; }

/* process */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; font-size: .95rem; }
.steps li::before { content: counter(s); display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-ink); border-radius: 50%; font-weight: 700; margin-bottom: 8px; }
.steps b { display: block; margin-bottom: 4px; }
.honest { background: var(--soft); border-radius: 14px; padding: 20px 24px; }
.honest h3 { margin-bottom: 6px; }
.honest p { margin: 0 0 8px; font-size: .96rem; }
.honest p:last-child { margin: 0; }

/* contact + footer */
.contact .btns { margin-top: 14px; }
.contact p { max-width: 38em; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: .85rem; }

/* article pages */
.article { max-width: 720px; margin: 0 auto; padding: 36px 20px 72px; }
.article .banner { background: var(--soft); border-radius: 10px; padding: 12px 16px; font-size: .88rem; color: var(--muted); margin-bottom: 28px; }
.article h1 { font-family: var(--serif); font-size: clamp(1.6rem, 4.6vw, 2.2rem); line-height: 1.5; margin: 0 0 24px; }
.article h2 { margin-top: 2.2em; padding-top: .3em; border-top: 1px solid var(--line); font-size: 1.45rem; }
.article h3 { margin-top: 1.8em; font-size: 1.15rem; }
.article hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.article ul, .article ol { padding-left: 1.4em; }
.article li { margin: .3em 0; }
.article table { margin: 1.2em 0; }
.article .back { display: inline-block; margin-bottom: 18px; font-size: .9rem; }

@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 44px; }
  .hero .kanji { opacity: .7; right: -22px; }
  .compare, .pair { grid-template-columns: 1fr; }
  .sample { padding: 20px; }
  .result { grid-template-columns: 1fr; text-align: left; }
  .site-header .wrap { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .nav { font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-header, .hero .kanji { display: none; } }

/* 表は、狭い画面では横にスライドして読む（列が1文字ずつ折り返されないように） */
.table-scroll table { min-width: 560px; }
.table-scroll { -webkit-overflow-scrolling: touch; }
.article hr + h2 { border-top: 0; margin-top: 1.2em; }
