  /* Layout: 暦帳 — 入力の帯 → 命式の四本柱と格局 → 大運表 → 年齢を横軸にした三色の人生グラフ */
  :root {
    --paper: #f1f3f2;
    --surface: #ffffff;
    --ink: #1b252e;
    --muted: #5d6a72;
    --line: #d3dadc;
    --band: #e6ebec;
    --ai: #284a78;          /* 藍：操作・見出し・いま */
    --ai-ink: #ffffff;
    --blue: #3b78b3;        /* 日干と地支の力 */
    --yellow: #d6a31f;      /* 大運天干の喜忌 */
    --red: #c24a5a;         /* 大運の蔵干の喜忌 */
    --good: #2f7a4f;        /* 用神・喜神 */
    --kotoki: #b5651d;      /* 比べる画面の古暦の線 */
    --bad: #a3302a;         /* 仇神・忌神 */
    --kango: #7a4f9a;       /* 干合の印 */
    --wood: #3d8558; --fire: #c4473d; --earth: #a8832a; --metal: #8a8f98; --water: #2b4b78;
    --error: #a3302a;
    --font-display: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
    --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
    --step-0: 0.9375rem; --step-1: 1.125rem; --step-2: 1.5rem; --step-3: 2.25rem; --small: 0.8125rem;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #11161b; --surface: #182027; --ink: #e3e8ea; --muted: #98a5ac; --line: #2b3640; --band: #1f2830;
      --ai: #8fb0e0; --ai-ink: #0f1a2a; --blue: #6ea6db; --yellow: #e5c15a; --red: #e07a87; --kango: #c39be3;
      --wood: #6cbf87; --fire: #e8776c; --earth: #d4ae55; --metal: #b2b7bf; --water: #7ea4d8; --error: #f08a80; --good: #74c69a; --bad: #f08a80; --kotoki: #e3a15e;
      color-scheme: dark;
    }
  }
  :root[data-theme="dark"] {
    --paper: #11161b; --surface: #182027; --ink: #e3e8ea; --muted: #98a5ac; --line: #2b3640; --band: #1f2830;
    --ai: #8fb0e0; --ai-ink: #0f1a2a; --blue: #6ea6db; --yellow: #e5c15a; --red: #e07a87; --kango: #c39be3;
    --wood: #6cbf87; --fire: #e8776c; --earth: #d4ae55; --metal: #b2b7bf; --water: #7ea4d8; --error: #f08a80; --good: #74c69a; --bad: #f08a80; --kotoki: #e3a15e;
    color-scheme: dark;
  }

  [hidden] { display: none !important; }
  * { box-sizing: border-box; }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: var(--step-0);
    line-height: 1.7;
    -webkit-text-size-adjust: 100%;
  }
  .page {
    max-width: 880px;
    margin: 0 auto;
    padding-block: 28px 56px;
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
    display: grid;
    gap: 36px;
  }
  .result { display: grid; gap: 36px; min-width: 0; }

  header { display: grid; gap: 4px; }
  .eyebrow { font-size: var(--small); letter-spacing: 0.18em; color: var(--muted); }
  h1 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--step-3);
    line-height: 1.25;
    letter-spacing: 0.06em;
    text-wrap: balance;
  }
  .subtitle { margin: 0; color: var(--muted); }

  h2 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--step-2);
    letter-spacing: 0.08em;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    text-wrap: balance;
  }
  h2 small { font-family: var(--font-body); font-weight: 400; font-size: var(--small); letter-spacing: 0.04em; color: var(--muted); }
  section { display: grid; gap: 14px; min-width: 0; }

  /* 入力 */
  form {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 14px;
    align-items: end;
  }
  .field { display: grid; gap: 4px; min-width: 0; }
  label { font-size: var(--small); font-weight: 700; letter-spacing: 0.06em; color: var(--muted); }
  input, select {
    width: 100%;
    font: inherit;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 8px 10px;
    min-height: 42px;
  }
  input:focus-visible, select:focus-visible, button:focus-visible, .bar:focus-visible, summary:focus-visible {
    outline: 2px solid var(--ai);
    outline-offset: 2px;
  }
  button {
    font: inherit;
    font-weight: 700;
    letter-spacing: 0.12em;
    min-height: 42px;
    padding: 8px 14px;
    white-space: nowrap;
    border: 0;
    border-radius: 4px;
    background: var(--ai);
    color: var(--ai-ink);
    cursor: pointer;
  }
  button:hover { filter: brightness(1.08); }
  .form-error { grid-column: 1 / -1; margin: 0; color: var(--error); font-size: var(--small); }

  /* 結果の見出し行 */
  .summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
  .summary .who { font-size: var(--step-1); font-weight: 700; font-variant-numeric: tabular-nums; }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chip {
    font-size: var(--small);
    padding: 1px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface);
    white-space: nowrap;
  }
  .note { margin: 0; font-size: var(--small); color: var(--muted); }

  /* 命式：四本柱 */
  .pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .pillar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px 6px 14px;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 2px;
    text-align: center;
  }
  .pillar.is-day { border-color: var(--ai); box-shadow: inset 0 0 0 1px var(--ai); }
  .pillar-name { font-size: var(--small); letter-spacing: 0.2em; color: var(--muted); margin-bottom: 4px; }
  .glyph {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.25rem, 9vw, 3.25rem);
    line-height: 1.15;
  }
  .gtag { display: inline-flex; align-items: center; gap: 5px; font-size: var(--small); color: var(--muted); margin-bottom: 4px; }
  .dot { width: 8px; height: 8px; border-radius: 2px; background: currentColor; flex: none; }
  .g-木 { color: var(--wood); } .g-火 { color: var(--fire); } .g-土 { color: var(--earth); } .g-金 { color: var(--metal); } .g-水 { color: var(--water); }
  .gtag .label { color: var(--muted); }
  /* 天干の通変星 */
  .tsu {
    display: inline-block;
    margin: 2px 0 8px;
    padding: 1px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    white-space: nowrap;
  }
  .tsu.self { background: var(--ai); border-color: var(--ai); color: var(--ai-ink); }
  /* 地支の蔵干 */
  .zk { justify-self: stretch; display: grid; gap: 2px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
  .zk-head { font-size: 0.6875rem; letter-spacing: 0.2em; color: var(--muted); margin-bottom: 2px; }
  .zk-row {
    display: grid;
    grid-template-columns: auto auto minmax(0, auto);
    justify-content: center;
    align-items: baseline;
    gap: 0 6px;
    padding: 2px 4px;
    border-radius: 4px;
    white-space: nowrap;
  }
  .zk-row .lab { font-size: 0.625rem; color: var(--muted); }
  .zk-row .k { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
  .zk-row .t { font-size: 0.8125rem; }
  .zk-row.is-genmei { background: var(--band); box-shadow: inset 0 0 0 1px var(--ai); }
  .zk-row.is-genmei .t { font-weight: 700; }
  .pillars-note { margin: 0; font-size: var(--small); color: var(--muted); }
  .pillars-note .key { display: inline-block; width: 1.6em; height: 0.9em; vertical-align: -1px; border-radius: 3px; background: var(--band); box-shadow: inset 0 0 0 1px var(--ai); margin-right: 4px; }

  /* 格局 */
  .kaku {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 28px;
    align-items: center;
  }
  .kaku-main { display: grid; gap: 0; }
  .k-label { font-size: var(--small); letter-spacing: 0.2em; color: var(--muted); }
  .k-name { font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.25; letter-spacing: 0.1em; }
  .kaku dl { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 6px 20px; }
  .kaku dl div { min-width: 0; }
  .kaku dt { font-size: var(--small); color: var(--muted); letter-spacing: 0.06em; }
  .kaku dd { margin: 0; font-weight: 500; }
  .kaku dd .sub { color: var(--muted); font-size: var(--small); font-weight: 400; }
  .kg-text { color: var(--kango); font-weight: 700; }
  .kaku-note { grid-column: 1 / -1; margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: var(--small); color: var(--ink); }
  .pillar.is-unknown { background: transparent; border-style: dashed; }
  .pillar.is-unknown .glyph { color: var(--muted); font-weight: 500; }


  /* license: __LICENSE_CODE__ */
  /* 購入者表示 */
  .license { margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: var(--small); color: var(--muted); }
  .license b { color: var(--ink); }
  .nojs { margin: 0; padding: 12px 14px; border: 1px solid var(--error); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: var(--small); line-height: 1.7; }
  .nojs b { color: var(--error); }

  /* 方式の切り替え */
  .modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--band); }
  .modes button { background: transparent; color: var(--ink); letter-spacing: 0.06em; display: grid; gap: 0; line-height: 1.3; padding: 8px 6px; min-height: 48px; }
  .modes button small { font-weight: 400; font-size: 0.6875rem; color: var(--muted); letter-spacing: 0; }
  .modes button[aria-selected="true"] { background: var(--ai); color: var(--ai-ink); }
  .modes button[aria-selected="true"] small { color: var(--ai-ink); opacity: 0.85; }
  .mode-chip { border-color: var(--ai) !important; color: var(--ai) !important; font-weight: 700; }

  /* 比べる画面 */
  .cmp-table { border: 1px solid var(--line); }
  .cmp-table th, .cmp-table td { text-align: center; vertical-align: middle; }
  .cmp-table th[scope="row"] { text-align: left; white-space: nowrap; }
  .cmp-table .ks { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.06em; }
  .cmp-table .ks small { display: block; font-family: var(--font-body); font-weight: 400; font-size: 0.6875rem; color: var(--muted); letter-spacing: 0; }
  .cmp-table td.diff { background: var(--band); box-shadow: inset 0 0 0 2px var(--kotoki); }
  .cmp-table tr.diff th[scope="row"]::after { content: "違い"; margin-left: 6px; padding: 0 5px; border-radius: 3px; font-size: 0.625rem; color: var(--surface); background: var(--kotoki); vertical-align: 1px; }
  .cmp-table .num { font-variant-numeric: tabular-nums; }
  #c-daiun { min-width: 460px; }
  #c-daiun td, #c-daiun th { white-space: nowrap; }
  .cmp-table .delta { font-size: 0.75rem; color: var(--muted); }
  .cmp-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--small); color: var(--muted); }
  .cmp-legend span { display: inline-flex; align-items: center; gap: 6px; }
  .ln { display: inline-block; width: 22px; height: 0; border-top: 3px solid var(--ai); }
  .ln.k { border-top: 3px dashed var(--kotoki); }
  svg .l-normal { fill: none; stroke: var(--ai); stroke-width: 2.5; }
  svg .l-kotoki { fill: none; stroke: var(--kotoki); stroke-width: 2.5; stroke-dasharray: 6 4; }
  svg .seg-hit { fill: transparent; cursor: pointer; }
  svg .seg-hit.is-active { fill: var(--band); opacity: 0.6; }

  /* 用神・喜神・忌神 */
  .role { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid currentColor; border-radius: 3px; font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.04em; line-height: 1.5; vertical-align: 1px; white-space: nowrap; }
  .role.r-用神, .role.r-喜神 { color: var(--good); }
  .role.r-用神 { color: var(--surface); background: var(--good); border-color: var(--good); }
  .role.r-閑神 { color: var(--muted); }
  .role.r-仇神, .role.r-忌神 { color: var(--bad); }
  .role.r-忌神 { color: var(--surface); background: var(--bad); border-color: var(--bad); }
  table.roles { background: transparent; font-size: 0.875rem; }
  table.roles th { background: transparent; border-bottom: 1px solid var(--line); padding: 4px 8px; }
  table.roles td { padding: 5px 8px; vertical-align: middle; }
  table.roles td:first-child .role { margin-left: 0; }
  table.roles .num { text-align: right; font-variant-numeric: tabular-nums; }
  table.roles .el { font-family: var(--font-display); font-size: 1.0625rem; }
  table.roles .gtag { margin: 0 4px 0 0; vertical-align: 1px; }
  table.roles .sub { color: var(--muted); font-size: 0.75rem; }
  table.roles tr.is-yojin td { font-weight: 700; }

  /* 身旺・身弱 */
  .st-main .k-name { white-space: nowrap; }
  .st-main .st-score { font-size: var(--small); color: var(--muted); font-variant-numeric: tabular-nums; }
  .st-main .st-score b { color: var(--ink); font-size: var(--step-1); font-weight: 700; }
  .st-body { display: grid; gap: 12px; min-width: 0; }
  .meter { position: relative; height: 10px; border-radius: 999px; background: var(--band); margin-top: 6px; }
  .meter .half { position: absolute; top: -4px; bottom: -4px; left: 50%; width: 1px; background: var(--muted); }
  .meter .range { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: var(--ai); opacity: 0.22; }
  .meter .mark { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--ai); }
  .meter-labels { display: grid; grid-template-columns: 1fr auto 1fr; font-size: 0.75rem; color: var(--muted); }
  .meter-labels span:last-child { text-align: right; }
  .kaku dl.st-rows { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 0; }
  .st-row { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) 4.6em; gap: 2px 10px; align-items: center; }
  .st-row dt { font-weight: 700; font-size: 0.875rem; color: var(--ink); }
  .st-row .pts { text-align: right; font-variant-numeric: tabular-nums; font-size: 0.875rem; }
  .st-row .pts small { color: var(--muted); }
  .sb { height: 6px; border-radius: 3px; background: var(--band); overflow: hidden; }
  .sb i { display: block; height: 100%; background: var(--ai); }
  .st-row dd { margin: 0; grid-column: 2 / -1; font-size: 0.75rem; line-height: 1.55; color: var(--muted); }
  .st-row dd .help { color: var(--ink); font-weight: 700; }

  /* 大運表 */
  .scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { width: 100%; border-collapse: collapse; background: var(--surface); font-variant-numeric: tabular-nums; }
  .daiun { min-width: 600px; border: 1px solid var(--line); }
  th, td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
  th { font-size: var(--small); font-weight: 700; letter-spacing: 0.06em; color: var(--muted); background: var(--band); white-space: nowrap; }
  .daiun td { font-size: 0.875rem; }
  .run { white-space: nowrap; }
  .run b { font-weight: 700; }
  .run .age { display: block; color: var(--muted); font-size: var(--small); }
  .kanshi { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; line-height: 1.3; letter-spacing: 0.06em; white-space: nowrap; }
  .kg {
    display: block;
    margin-top: 2px;
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.45;
    color: var(--kango);
    white-space: nowrap;
  }
  .kg-badge {
    display: inline-grid;
    place-items: center;
    width: 1.35em; height: 1.35em;
    margin-right: 4px;
    border: 1px solid var(--kango);
    border-radius: 50%;
    font-size: 0.625rem;
    vertical-align: 1px;
  }
  .stack { display: grid; gap: 1px; white-space: nowrap; }
  .stack .len { color: var(--muted); font-size: var(--small); margin-left: 6px; }
  .pill {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 0 7px;
    margin-left: 6px;
    border-radius: 3px;
    vertical-align: 2px;
  }
  .pill.ritsun { color: var(--ai); border: 1px solid var(--ai); }
  .pill.now { color: var(--ai-ink); background: var(--ai); }
  tr.is-now td { background: var(--band); background: color-mix(in srgb, var(--ai) 8%, var(--surface)); }

  /* グラフ */
  .legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--small); color: var(--muted); }
  .legend span { display: inline-flex; align-items: center; gap: 6px; }
  .sw { width: 12px; height: 12px; border-radius: 2px; flex: none; }
  .sw.blue { background: var(--blue); } .sw.yellow { background: var(--yellow); } .sw.red { background: var(--red); }
  .chart-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 8px 0 4px; }
  .chart-inner { position: relative; }
  svg { display: block; font-family: var(--font-body); }
  svg .grid { stroke: var(--line); stroke-width: 1; }
  svg .axis { stroke: var(--muted); stroke-width: 1; }
  svg .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
  svg .total { fill: var(--ink); font-size: 10px; font-variant-numeric: tabular-nums; }
  svg .b-blue { fill: var(--blue); }
  svg .b-yellow { fill: var(--yellow); }
  svg .b-red { fill: var(--red); }
  svg .hit { fill: transparent; cursor: pointer; }
  svg .bar { outline: none; }
  svg .bar.is-active rect:not(.hit) { filter: brightness(1.12); }
  svg.has-active .bar:not(.is-active) rect:not(.hit) { opacity: 0.45; }
  svg .band { fill: var(--band); }
  svg .band-run { fill: var(--muted); font-size: 10px; }
  svg .band-kg { fill: var(--kango); font-size: 10px; font-weight: 700; }
  svg .band-ks { fill: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 13px; }
  svg .now-line { stroke: var(--ai); stroke-width: 1.5; stroke-dasharray: 4 3; }
  svg .now-label { fill: var(--ai); font-size: 11px; font-weight: 700; }
  .tip {
    position: absolute;
    top: 36px;
    z-index: 2;
    width: 272px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 16%, transparent);
    font-size: var(--small);
    line-height: 1.5;
    pointer-events: none;
    font-variant-numeric: tabular-nums;
  }
  .tip .t-label { font-weight: 700; margin-bottom: 6px; }
  .tip .row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; margin-bottom: 4px; }
  .tip .row .sw { grid-row: 1; }
  .tip .row .name { color: var(--muted); }
  .tip .row .val { font-weight: 700; text-align: right; }
  .tip .row .why { grid-column: 2 / -1; color: var(--muted); font-size: 0.6875rem; }
  .tip .sum { display: flex; justify-content: space-between; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; font-weight: 700; }
  .hint { margin: 0; font-size: var(--small); color: var(--muted); }

  details { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
  summary { cursor: pointer; padding: 10px 14px; font-size: var(--small); font-weight: 700; color: var(--muted); letter-spacing: 0.04em; }
  .points { min-width: 720px; }
  .points td:nth-child(n+2):nth-child(-n+5), .points th:nth-child(n+2):nth-child(-n+5) { text-align: right; }
  .points .why { font-size: 0.75rem; color: var(--muted); line-height: 1.5; }
  .rules { padding: 0 18px 14px; display: grid; gap: 10px; font-size: 0.875rem; }
  .rules p { margin: 0; max-width: 65ch; }
  .rules b { font-weight: 700; }

  footer { border-top: 1px solid var(--line); padding-top: 14px; font-size: var(--small); color: var(--muted); display: grid; gap: 4px; }
  footer p { margin: 0; max-width: 65ch; }

  @media (max-width: 480px) {
    .pillar { padding-inline: 2px; }
    .gtag { font-size: 0.6875rem; gap: 3px; }
    .kaku { grid-template-columns: 1fr; }
    table.roles .sub { display: none; }
    table.roles td, table.roles th { padding-inline: 5px; }
    .pillars { gap: 6px; }
    .tsu { padding: 1px 6px; font-size: 0.6875rem; letter-spacing: 0; }
    .zk-row { gap: 0 3px; padding-inline: 2px; }
    .zk-row .k { font-size: 0.9375rem; }
    .zk-row .t { font-size: 0.75rem; }
  }
  @media (prefers-reduced-motion: no-preference) {
    .result-fade { animation: fade 0.25s ease-out; }
    @keyframes fade { from { opacity: 0.4; } to { opacity: 1; } }
  }

  /* ===== ここからサイト共通（診断ツールの見た目に足すもの） ===== */
  a { color: var(--ai); text-underline-offset: 3px; }
  .site-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
  .brand { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; color: var(--ink); text-decoration: none; padding: 6px 0; }
  .brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.375rem; letter-spacing: 0.1em; }
  .brand small { font-family: var(--font-body); font-weight: 400; font-size: 0.75rem; letter-spacing: 0.02em; color: var(--muted); }
  .site-nav { display: flex; flex-wrap: wrap; gap: 0 16px; font-size: var(--small); }
  .site-nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
  .site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ai); text-decoration: underline; }
  .hero { display: grid; gap: 4px; }

  /* 点の受け止め方 */
  .reframe { margin: 0; padding: 10px 14px; border-left: 3px solid var(--ai); background: var(--surface); border-radius: 0 6px 6px 0; font-size: var(--small); line-height: 1.8; max-width: 72ch; }

  /* 第4運から先（無料版では見せない） */
  svg .lock-veil { fill: var(--surface); opacity: 0.35; }
  svg .band-ks.is-locked { fill: var(--muted); }
  .lock-cta { position: absolute; display: grid; place-items: center; pointer-events: none; }
  .lock-cta[hidden] { display: none; }
  .lock-card { pointer-events: auto; display: grid; gap: 8px; justify-items: center; max-width: 290px; margin: 0 10px; padding: 14px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); box-shadow: 0 6px 20px color-mix(in srgb, var(--ink) 16%, transparent); font-size: var(--small); line-height: 1.6; }
  .lock-card b { font-size: 0.9375rem; color: var(--ink); }
  .lock-card small { font-size: 0.6875rem; color: var(--muted); }
  tr.locked td { color: var(--muted); }
  td.lock-cell { font-size: var(--small); vertical-align: middle; }

  /* ボタン型のリンク */
  .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 18px; border-radius: 4px; background: var(--ai); color: var(--ai-ink); font-weight: 700; letter-spacing: 0.08em; text-decoration: none; }
  .btn:hover { filter: brightness(1.08); }
  .btn.is-off { background: var(--band); color: var(--muted); cursor: default; filter: none; }

  /* 有料版の案内 */
  .cta { display: grid; gap: 12px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
  .cta h2 { margin: 0; }
  .cta ul { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
  .cta p { margin: 0; }

  /* 読みもの */
  .reads { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
  .reads a { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; color: var(--ink); text-decoration: none; }
  .reads a:hover { border-color: var(--ai); }
  .reads a b { color: var(--ai); }
  .reads a span { font-size: var(--small); color: var(--muted); }

  /* 記事 */
  .article { display: grid; gap: 14px; min-width: 0; }
  .article header { display: grid; gap: 6px; }
  .article p { margin: 0; max-width: 68ch; }
  .article .lead { font-size: 1.0625rem; }
  .article h2 { margin-top: 14px; }
  .article ul { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; max-width: 68ch; }
  .article table { border: 1px solid var(--line); }
  .article td .sw { display: inline-block; vertical-align: -1px; }
  .article th small { font-weight: 400; letter-spacing: 0; }
  .article td.num, .article th.num { text-align: right; }

  /* フッター */
  .site-foot nav { display: flex; flex-wrap: wrap; gap: 0 16px; }
  .site-foot nav a { color: var(--muted); padding: 8px 0; }
  .lock-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: var(--small); line-height: 1.6; }
  .lock-note[hidden] { display: none; }
  .lock-note span { display: grid; gap: 2px; }
  .lock-note b { color: var(--ink); }
  .lock-note small { font-size: 0.6875rem; color: var(--muted); }
  .article h1 { font-size: clamp(1.625rem, 7vw, 2.25rem); }

  /* 通常／古暦の切り替え（比べるは有料版）と、方式の切り替え */
  .modes.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .method-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--band); }
  .method-tabs a { display: grid; gap: 0; justify-items: center; padding: 8px 6px; min-height: 48px; border-radius: 4px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: 0.06em; line-height: 1.3; text-align: center; }
  .method-tabs a small { font-weight: 400; font-size: 0.6875rem; letter-spacing: 0; color: var(--muted); }
  .method-tabs a:hover { background: var(--surface); }
  .method-tabs a[aria-current="page"] { background: var(--ai); color: var(--ai-ink); }
  .method-tabs a[aria-current="page"] small { color: var(--ai-ink); opacity: 0.85; }
  .cta h2 small { font-family: var(--font-body); font-weight: 400; font-size: var(--small); letter-spacing: 0.04em; color: var(--muted); }
  .mode-box { display: grid; gap: 6px; }
  .tabs-cap { margin: 0; font-size: var(--small); color: var(--muted); letter-spacing: 0.04em; }
  .hero .tabs-cap { margin: 10px 0 0; }
  .hero .method-tabs { margin-top: 0; }
