  :root {
    --paper: #FFFFFF;
    --surface: #FFFFFF;
    --surface-2: #F4F8FD;
    --band-bg: #0E1E3A;
    --ink: #0F1B2E;
    --ink-soft: #4A5A72;
    --accent: #1856C7;
    --accent-deep: #0B3A8F;
    --accent-bright: #2E7BEA;
    --accent-soft: #E9F0FC;
    --line: #DBE3EF;
    --line-soft: #EDF1F8;
    --footer-bg: #0B1830;
    --shadow-sm: 0 1px 2px rgba(15, 27, 46, .06);
    --shadow-md: 0 6px 16px rgba(15, 27, 46, .08), 0 20px 44px rgba(15, 27, 46, .09);
    --font-display: "Zen Kaku Gothic New", "Noto Sans JP", system-ui, sans-serif;
    --font-body: "Noto Sans JP", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
    --maxw: 1120px;
    --head-h: 72px;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #0C1119;
      --surface: #141C28;
      --surface-2: #111925;
      --band-bg: #080D14;
      --ink: #E8ECF3;
      --ink-soft: #93A1B5;
      --accent: #5E9BEC;
      --accent-deep: #9CC4F2;
      --accent-bright: #7DB2F4;
      --accent-soft: #16273F;
      --line: #2B3644;
      --line-soft: #1E2732;
      --footer-bg: #070C14;
      --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
      --shadow-md: 0 6px 16px rgba(0, 0, 0, .34), 0 20px 44px rgba(0, 0, 0, .4);
    }
  }
  :root[data-theme="dark"] {
    --paper: #0C1119;
    --surface: #141C28;
    --surface-2: #111925;
    --band-bg: #080D14;
    --ink: #E8ECF3;
    --ink-soft: #93A1B5;
    --accent: #5E9BEC;
    --accent-deep: #9CC4F2;
    --accent-bright: #7DB2F4;
    --accent-soft: #16273F;
    --line: #2B3644;
    --line-soft: #1E2732;
    --footer-bg: #070C14;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, .34), 0 20px 44px rgba(0, 0, 0, .4);
  }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
  }

  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.8;
    letter-spacing: .01em;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  .inner { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.2rem, 5vw, 3rem); }

  a { color: var(--accent); text-underline-offset: 3px; }
  a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--accent); outline-offset: 3px;
  }
  h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }
  ::selection { background: var(--accent); color: #fff; }

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

  /* ---------- Header ---------- */
  header.site {
    position: sticky; top: 0; z-index: 40;
    background: color-mix(in srgb, var(--paper) 82%, transparent);
    backdrop-filter: blur(12px) saturate(1.4);
    border-bottom: 1px solid var(--line-soft);
  }
  .bar { display: flex; align-items: center; gap: 1.2rem; min-height: var(--head-h); }
  .brand { display: flex; align-items: baseline; gap: .55rem; text-decoration: none; color: var(--ink); margin-right: auto; white-space: nowrap; transition: opacity .18s; }
  .brand:hover { opacity: .82; }
  .brand::before { content: ""; align-self: center; width: 8px; height: 8px; background: var(--accent); flex: none; }
  .brand .mk { font-family: var(--font-mono); font-weight: 500; letter-spacing: .12em; font-size: 1.32rem; color: var(--ink); }
  .brand .jp { font-size: .72rem; color: var(--ink-soft); letter-spacing: .02em; }
  @media (max-width: 699px) { .brand .jp { display: none; } }
  nav.main { display: flex; align-items: center; gap: 0; padding-right: 1rem; margin-right: .1rem; border-right: 1px solid var(--line-soft); }
  nav.main a {
    position: relative; font-size: .8rem; letter-spacing: 0; color: var(--ink-soft); text-decoration: none;
    white-space: nowrap; padding: .5rem .6rem; transition: color .18s;
  }
  nav.main a::after {
    content: ""; position: absolute; left: .6rem; right: .6rem; bottom: .3rem; height: 2px;
    background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s cubic-bezier(.4,0,.2,1);
  }
  nav.main a:hover { color: var(--ink); }
  nav.main a:hover::after { transform: scaleX(1); }
  nav.main a.is-active { color: var(--ink); font-weight: 500; }
  nav.main a.is-active::after { transform: scaleX(1); }
  .tel-cta {
    font-family: var(--font-mono); font-size: .8rem; text-decoration: none; letter-spacing: .02em;
    color: #fff; background: var(--accent); padding: .55rem .95rem; white-space: nowrap; flex: none;
    transition: background .18s, transform .18s;
  }
  :root[data-theme="dark"] .tel-cta { color: #0b1220; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tel-cta { color: #0b1220; } }
  .tel-cta:hover { background: var(--accent-deep); transform: translateY(-1px); }
  @media (max-width: 559px) { .bar > .tel-cta { display: none; } }

  /* nav collapses generously early so it never has to squeeze/wrap */
  @media (max-width: 1220px) { nav.main { display: none; } }
  @media (min-width: 1221px) { .menu-btn, .mobile-nav { display: none !important; } }

  .menu-btn {
    display: flex; flex: none; width: 34px; height: 34px; align-items: center; justify-content: center;
    background: none; border: none; padding: 0; cursor: pointer; position: relative;
  }
  .menu-btn span {
    position: absolute; left: 6px; right: 6px; height: 2px; background: var(--ink);
    transition: transform .25s ease, opacity .2s ease, top .25s ease;
  }
  .menu-btn span:nth-child(1) { top: 12px; }
  .menu-btn span:nth-child(2) { top: 17px; }
  .menu-btn span:nth-child(3) { top: 22px; }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { top: 17px; transform: rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-btn[aria-expanded="true"] span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

  .mobile-nav {
    display: none; position: sticky; top: var(--head-h); z-index: 39;
    background: var(--paper); border-bottom: 1px solid var(--line-soft); box-shadow: var(--shadow-md);
  }
  .mobile-nav.is-open { display: block; }
  .mobile-nav nav { display: flex; flex-direction: column; }
  .mobile-nav nav a {
    padding: 1rem clamp(1.2rem, 5vw, 3rem); color: var(--ink-soft); text-decoration: none;
    font-size: .96rem; border-bottom: 1px solid var(--line-soft); transition: background .15s, color .15s;
  }
  .mobile-nav nav a:hover, .mobile-nav nav a.is-active { color: var(--ink); background: var(--surface-2); }
  .mobile-nav .tel-cta { display: block; text-align: center; margin: 1.1rem clamp(1.2rem, 5vw, 3rem) 1.3rem; }

  /* ---------- Hero (photo) ---------- */
  .hero-photo {
    position: relative; border-bottom: 1px solid var(--line-soft); background: var(--paper);
    display: flex; justify-content: center; padding: clamp(1.6rem, 4vw, 3rem) clamp(1.2rem, 5vw, 3rem);
  }
  .hero-photo-img {
    display: block; width: 80%; max-width: 1300px; height: auto;
    box-shadow: var(--shadow-md);
  }
  @media (max-width: 700px) { .hero-photo-img { width: 92%; } }
  .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;
  }

  .hero-cta-band { border-bottom: 1px solid var(--line-soft); background: var(--paper); }
  .hero-cta-inner {
    padding-top: clamp(1.8rem, 4vw, 2.6rem); padding-bottom: clamp(1.8rem, 4vw, 2.6rem);
    display: flex; flex-direction: column; gap: clamp(1.6rem, 4vw, 2.4rem);
  }
  .hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
  .btn {
    display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
    font-size: .92rem; font-weight: 500; padding: .82rem 1.5rem; border: 1px solid var(--accent);
    transition: background .18s, transform .18s, border-color .18s;
  }
  .btn.primary { background: var(--accent); color: #fff; }
  :root[data-theme="dark"] .btn.primary { color: #0b1220; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #0b1220; } }
  .btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
  .btn.ghost { color: var(--accent); background: transparent; }
  .btn.ghost:hover { background: var(--accent-soft); transform: translateY(-1px); }

  .spec-strip {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px;
    background: var(--line-soft); border: 1px solid var(--line-soft);
  }
  @media (min-width: 760px) { .spec-strip { grid-template-columns: repeat(4, 1fr); } }
  .spec-strip div { background: var(--paper); padding: 1.15rem 1.15rem; }
  .spec-strip dt { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
  .spec-strip dd { margin: .45rem 0 0; font-weight: 500; font-size: .95rem; letter-spacing: .01em; }

  /* ---------- Section scaffold ---------- */
  section.blk { padding: clamp(4rem, 9vw, 7rem) 0; border-bottom: 1px solid var(--line-soft); scroll-margin-top: calc(var(--head-h) + 8px); }
  section.blk.alt { background: var(--surface-2); }

  .sec-head { display: flex; align-items: flex-start; gap: clamp(1rem, 3vw, 2.4rem); margin-bottom: clamp(2rem, 5vw, 3.4rem); }
  .ghost-num {
    font-family: var(--font-mono); font-weight: 500; line-height: .9;
    font-size: clamp(2.4rem, 6.5vw, 4.4rem); color: var(--accent); opacity: .16;
    flex: none; letter-spacing: -.02em;
  }
  .sec-head > div { padding-top: .35rem; }
  .sec-kicker {
    font-family: var(--font-mono); font-size: .74rem; letter-spacing: .2em;
    text-transform: uppercase; color: var(--ink-soft); margin: 0 0 .7rem;
  }
  .sec-title { font-weight: 700; font-size: clamp(1.7rem, 3.6vw, 2.5rem); letter-spacing: -.012em; line-height: 1.32; margin: 0; }
  .sec-lead { max-width: 40rem; color: var(--ink-soft); margin: 0 0 clamp(2rem, 4vw, 2.8rem); font-size: 1rem; }

  /* ---------- Services ---------- */
  .svc { border-top: 1px solid var(--line); }
  .svc-row {
    display: grid; grid-template-columns: 1fr; gap: .5rem 1.8rem;
    padding: clamp(1.5rem, 3vw, 2.1rem) 0; border-bottom: 1px solid var(--line-soft);
    transition: background .2s;
  }
  @media (min-width: 780px) { .svc-row { grid-template-columns: 3.4rem 13rem 1fr; align-items: start; padding-left: 1rem; padding-right: 1rem; margin-left: -1rem; margin-right: -1rem; } }
  .svc-row:hover { background: var(--surface-2); }
  .svc-row .no { font-family: var(--font-mono); color: var(--accent); font-size: 1.05rem; }
  .svc-row h3 { margin: 0; font-weight: 700; font-size: 1.12rem; letter-spacing: -.005em; }
  .svc-row .body { color: var(--ink-soft); font-size: .96rem; }
  .svc-row .tags { margin-top: .9rem; display: flex; flex-wrap: wrap; gap: .45rem; }
  .svc-row .tags span {
    font-family: var(--font-mono); font-size: .7rem; letter-spacing: .03em;
    padding: .2rem .55rem; border: 1px solid var(--line); color: var(--ink-soft);
  }

  /* ---------- Cards ---------- */
  .tech-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
  @media (min-width: 800px) {
    .tech-grid { grid-template-columns: repeat(2, 1fr); }
    /* odd number of cards: the last one spans the full row so there is no empty half */
    .tech-grid .card:last-child:nth-child(odd) { grid-column: 1 / -1; }
  }
  .card {
    background: var(--surface); border: 1px solid var(--line); padding: 1.6rem;
    display: flex; flex-direction: column; gap: .6rem; transition: transform .2s, box-shadow .2s, border-color .2s;
  }
  .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line); }
  .card h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
  .card p { margin: 0; color: var(--ink-soft); font-size: .94rem; }
  .makers { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .3rem; }
  .makers span {
    font-family: var(--font-mono); font-size: .78rem; padding: .3rem .65rem;
    background: var(--accent-soft); color: var(--accent-deep); border: 1px solid var(--line-soft);
  }

  /* ---------- Dark band (Technology) ---------- */
  .blk.band { background: var(--band-bg); color: #EAF1FB; border-color: rgba(255,255,255,.10); }
  .blk.band .sec-kicker { color: rgba(255,255,255,.5); }
  .blk.band .sec-title { color: #fff; }
  .blk.band .ghost-num { color: #fff; opacity: .1; }
  .blk.band .sec-lead { color: rgba(255,255,255,.68); }
  .blk.band .card { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.12); box-shadow: none; }
  .blk.band .card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.24); box-shadow: none; }
  .blk.band .card h3 { color: #fff; }
  .blk.band .card p { color: rgba(255,255,255,.7); }
  .blk.band .makers span { background: rgba(255,255,255,.08); color: #d9e6fb; border-color: rgba(255,255,255,.14); }
  .blk.band .ph {
    background: repeating-linear-gradient(-45deg, transparent 0 11px, rgba(255,255,255,.05) 11px 12px), rgba(255,255,255,.03);
    border-color: rgba(255,255,255,.14); color: rgba(255,255,255,.6);
  }
  .blk.band .ph-cap { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); color: rgba(255,255,255,.78); }
  .blk.band .ph-art { color: #DCE9FB; }
  .blk.band .ph::before, .blk.band .ph::after { border-color: rgba(255,255,255,.4); }

  /* ---------- Clients ---------- */
  .clients { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
  @media (min-width: 680px) { .clients { grid-template-columns: repeat(2, 1fr); } }
  @media (min-width: 1000px) { .clients { grid-template-columns: repeat(4, 1fr); } }
  .cl-group { background: var(--surface); padding: 1.5rem 1.4rem 1.7rem; transition: background .2s; }
  .cl-group:hover { background: var(--surface-2); }
  .cl-group h3 { margin: 0 0 .9rem; font-size: .74rem; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
  .cl-group ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .6rem; }
  .cl-group li { font-size: .92rem; line-height: 1.5; }
  .cl-group li small { display: block; color: var(--ink-soft); font-size: .76rem; margin-top: .1rem; }

  /* ---------- Company ---------- */
  .co-wrap { display: grid; grid-template-columns: 1fr; gap: 2.6rem; }
  @media (min-width: 920px) { .co-wrap { grid-template-columns: 1.1fr .9fr; } }
  table.co { border-collapse: collapse; width: 100%; background: var(--surface); border: 1px solid var(--line); }
  table.co th, table.co td { text-align: left; padding: .95rem 1.1rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: .92rem; }
  table.co th {
    width: 8.5rem; font-family: var(--font-mono); font-weight: 500; font-size: .72rem;
    letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); background: var(--surface-2);
  }
  table.co tr:last-child th, table.co tr:last-child td { border-bottom: 0; }
  .philosophy { background: var(--accent-soft); border-left: 2px solid var(--accent); padding: 1.7rem 1.8rem; }
  .philosophy h3 { margin: 0 0 .8rem; font-size: 1.08rem; font-weight: 700; letter-spacing: -.005em; }
  .philosophy p { margin: 0 0 .9rem; font-size: .93rem; color: var(--ink-soft); }
  .philosophy p:last-child { margin-bottom: 0; }

  /* ---------- Topics / Column ---------- */
  .topics-list { display: grid; grid-template-columns: 1fr; gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); }
  @media (min-width: 860px) { .topics-list { grid-template-columns: repeat(3, 1fr); } }
  .topic { position: relative; background: var(--surface); padding: 1.7rem 1.5rem 1.5rem; display: flex; flex-direction: column; gap: .7rem; transition: background .2s; }
  .topic:hover { background: var(--surface-2); }
  .topics-list > .topic:only-child { grid-column: 1 / -1; }      /* a single article spans the full row */
  .topic-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; font-family: var(--font-mono); font-size: .71rem; }
  .topic-meta time { color: var(--ink-soft); letter-spacing: .04em; }
  .cat { color: var(--accent); border: 1px solid var(--line); padding: .12rem .5rem; letter-spacing: .04em; font-family: var(--font-mono); font-size: .71rem; text-decoration: none; }
  .topic h3 { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.5; letter-spacing: -.005em; }
  .topic h3 a { color: inherit; text-decoration: none; }
  .topic h3 a::after { content: ""; position: absolute; inset: 0; }   /* whole card is the link */
  .topic:hover h3 a { color: var(--accent); }
  .topic .excerpt { margin: 0; font-size: .89rem; color: var(--ink-soft); }
  .topic-more { margin-top: auto; padding-top: .4rem; font-family: var(--font-mono); font-size: .77rem; color: var(--accent); }
  .topics-more { margin: 1.4rem 0 0; font-family: var(--font-mono); font-size: .82rem; }
  .topics-more a { color: var(--accent); text-decoration: none; }
  .topics-more a:hover { text-decoration: underline; text-underline-offset: 3px; }
  .topics-empty { background: var(--surface); padding: 2rem 1.5rem; color: var(--ink-soft); font-size: .92rem; }

  /* ---------- Sub pages (column list / article) ---------- */
  .page-head { border-bottom: 1px solid var(--line-soft); background: var(--surface-2); padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(2rem, 4vw, 3rem); }
  .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1.6rem; font-family: var(--font-mono); font-size: .74rem; color: var(--ink-soft); }
  .crumbs a { color: var(--ink-soft); text-decoration: none; }
  .crumbs a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
  .page-title { margin: 0 0 .9rem; font-weight: 700; font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.012em; line-height: 1.3; }
  .page-lead { margin: 0; max-width: 40rem; color: var(--ink-soft); }
  .list-blk { padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(3.6rem, 8vw, 6rem); }

  .col-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .col-row {
    position: relative; display: grid; grid-template-columns: 1fr; gap: .5rem 2rem;
    padding: 1.5rem 0; border-bottom: 1px solid var(--line-soft); transition: background .2s;
  }
  @media (min-width: 760px) { .col-row { grid-template-columns: 11rem 1fr; padding-left: 1rem; padding-right: 1rem; margin-left: -1rem; margin-right: -1rem; } }
  .col-row:hover { background: var(--surface-2); }
  .col-meta { display: flex; align-items: center; flex-wrap: wrap; gap: .7rem; align-self: start; font-family: var(--font-mono); font-size: .76rem; color: var(--ink-soft); padding-top: .15rem; }
  .col-meta time { letter-spacing: .04em; }
  @media (min-width: 760px) { .col-meta { flex-direction: column; align-items: flex-start; gap: .5rem; } }
  .col-title { margin: 0 0 .4rem; font-size: 1.12rem; font-weight: 700; line-height: 1.5; }
  .col-title a { color: inherit; text-decoration: none; }
  .col-title a::after { content: ""; position: absolute; inset: 0; }
  .col-row:hover .col-title a { color: var(--accent); }
  .col-main .excerpt { margin: 0; font-size: .92rem; color: var(--ink-soft); max-width: 42rem; }
  .col-row.is-hidden { display: none; }
  .col-meta .cat { position: relative; z-index: 1; }

  .article { padding: clamp(2.2rem, 5vw, 3.6rem) 0 clamp(3.6rem, 8vw, 6rem); }
  .article .inner { max-width: 820px; }
  .article-head { margin-bottom: clamp(1.8rem, 4vw, 2.6rem); padding-bottom: clamp(1.4rem, 3vw, 2rem); border-bottom: 1px solid var(--line); }
  .article-title { margin: .9rem 0 0; font-weight: 700; font-size: clamp(1.6rem, 3.6vw, 2.3rem); letter-spacing: -.01em; line-height: 1.4; }
  .article .topic-meta .cat { text-decoration: none; }
  .article .topic-meta .cat:hover { background: var(--accent-soft); }

  .prose { font-size: 1.02rem; line-height: 2; }
  .prose > * { margin: 0; }
  .prose > * + * { margin-top: 1.3em; }
  .prose h2 { margin-top: 2.6em; padding-bottom: .45em; border-bottom: 1px solid var(--line-soft); font-size: 1.3rem; line-height: 1.5; letter-spacing: -.005em; }
  .prose h3 { margin-top: 2em; font-size: 1.1rem; line-height: 1.5; }
  .prose h2 + *, .prose h3 + * { margin-top: .9em; }
  .prose strong { font-weight: 700; }
  .prose a { color: var(--accent); text-underline-offset: 3px; }
  .prose ul, .prose ol { padding-left: 1.4em; }
  .prose li + li { margin-top: .4em; }
  .prose blockquote { padding: .9rem 1.2rem; border-left: 2px solid var(--accent); background: var(--accent-soft); color: var(--ink-soft); font-size: .93rem; line-height: 1.85; }
  .prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
  .prose code { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--line-soft); padding: .08em .35em; }
  .prose figure { margin: 2em 0; }
  .prose figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line-soft); }
  .prose figcaption { margin-top: .6rem; font-size: .82rem; color: var(--ink-soft); }

  .article-nav { display: grid; grid-template-columns: 1fr; gap: 1px; margin-top: clamp(2.6rem, 6vw, 4rem); background: var(--line-soft); border: 1px solid var(--line-soft); }
  @media (min-width: 640px) { .article-nav { grid-template-columns: 1fr 1fr; } }
  .article-nav a, .article-nav span { display: block; background: var(--surface); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); font-size: .92rem; line-height: 1.55; }
  .article-nav a:hover { background: var(--surface-2); color: var(--accent); }
  .article-nav small { display: block; margin-bottom: .3rem; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .06em; color: var(--ink-soft); }
  .article-nav .next { text-align: right; }
  .article-nav .none { color: var(--ink-soft); }
  .article-nav:not(:has(a)) { display: none; }      /* no previous/next article: hide the empty box */
  @media (max-width: 639px) { .article-nav .none { display: none; } .article-nav .next { text-align: left; } }
  .article-back { margin: 1.4rem 0 0; font-family: var(--font-mono); font-size: .82rem; }
  .article-back a { color: var(--accent); text-decoration: none; }
  .article-back a:hover { text-decoration: underline; text-underline-offset: 3px; }

  .article-cta { margin-top: clamp(2.6rem, 6vw, 4rem); padding: clamp(1.5rem, 4vw, 2.2rem); background: var(--accent-soft); border-left: 2px solid var(--accent); }
  .article-cta h2 { margin: 0 0 .5rem; font-size: 1.15rem; }
  .article-cta p { margin: 0 0 1.1rem; color: var(--ink-soft); font-size: .93rem; }

  .topic-filter { display: flex; flex-wrap: wrap; gap: clamp(1.2rem, 3vw, 2.1rem); margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
  .tf-btn {
    position: relative; font: inherit; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .05em;
    cursor: pointer; background: none; border: none; color: var(--ink-soft); padding: 0 0 .9rem; margin: 0;
    transition: color .2s;
  }
  .tf-btn::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
    transform: scaleX(0); transform-origin: left; transition: transform .28s cubic-bezier(.4,0,.2,1);
  }
  .tf-btn:hover { color: var(--ink); }
  .tf-btn.is-on { color: var(--ink); font-weight: 500; }
  .tf-btn.is-on::after { transform: scaleX(1); }
  .topic.is-hidden { display: none; }

  /* ---------- Credo ---------- */
  .credo { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
  .credo-row {
    display: grid; grid-template-columns: 2.6rem 1fr; gap: .1rem 1.3rem;
    padding: clamp(1.3rem, 3vw, 1.9rem) 0; border-bottom: 1px solid var(--line-soft); align-items: start;
  }
  @media (min-width: 760px) { .credo-row { grid-template-columns: 5rem 1fr; gap: .1rem 2.6rem; } }
  .credo-l {
    font-family: var(--font-display); font-weight: 700; line-height: .9;
    font-size: clamp(1.9rem, 5vw, 3.1rem); color: var(--accent); letter-spacing: -.02em;
  }
  .credo-en { margin: .3rem 0 .25rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
  .credo-jp { margin: 0 0 .5rem; font-size: 1.06rem; font-weight: 700; letter-spacing: -.005em; }
  .credo-d { margin: 0; color: var(--ink-soft); font-size: .95rem; max-width: 42rem; }

  /* ---------- News ---------- */
  .news { border-top: 1px solid var(--line); margin-top: clamp(3rem, 6vw, 4.5rem); }
  .news.news-solo { margin-top: 0; }
  .news-row { display: grid; grid-template-columns: 1fr; gap: .15rem .6rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
  @media (min-width: 640px) { .news-row { grid-template-columns: 8rem 1fr; } }
  .news-row time { font-family: var(--font-mono); font-size: .82rem; color: var(--accent); }
  .news-row p { margin: 0; font-size: .93rem; }

  /* ---------- Contact ---------- */
  .contact-wrap { display: grid; grid-template-columns: 1fr; gap: 2.6rem; }
  @media (min-width: 920px) { .contact-wrap { grid-template-columns: .78fr 1.22fr; } }
  .contact-info dl { margin: 0; display: flex; flex-direction: column; gap: 1.2rem; }
  .contact-info dt { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); }
  .contact-info dd { margin: .3rem 0 0; }
  .contact-info dd.big { font-family: var(--font-mono); font-size: 1.4rem; letter-spacing: .01em; }
  form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
  form .full { grid-column: 1 / -1; }
  label { display: block; font-size: .76rem; font-family: var(--font-mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: .4rem; }
  input, textarea, select {
    width: 100%; font: inherit; font-size: .92rem; color: var(--ink);
    background: var(--surface); border: 1px solid var(--line); padding: .7rem .8rem;
    transition: border-color .18s;
  }
  input:hover, textarea:hover, select:hover { border-color: var(--ink-soft); }
  textarea { min-height: 130px; resize: vertical; }
  .form-note { font-size: .78rem; color: var(--ink-soft); margin: .2rem 0 0; }
  .form-status { margin: 1rem 0 .4rem; padding: .8rem 1rem; font-size: .92rem; line-height: 1.7; border-left: 2px solid var(--accent); background: var(--accent-soft); }
  .form-status.is-error { border-left-color: #c0392b; background: color-mix(in srgb, #c0392b 10%, var(--paper)); }
  button.submit:disabled { opacity: .6; cursor: progress; transform: none; }
  /* honeypot field for bots: invisible to people, still in the form */
  .hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
  button.submit {
    font: inherit; font-weight: 500; font-size: .92rem; cursor: pointer; letter-spacing: .02em;
    background: var(--accent); color: #fff; border: 1px solid var(--accent); padding: .82rem 1.8rem;
    transition: background .18s, transform .18s;
  }
  :root[data-theme="dark"] button.submit { color: #0b1220; }
  @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) button.submit { color: #0b1220; } }
  button.submit:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }

  /* ---------- Photo placeholders (試作) ---------- */
  .ph {
    position: relative; display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); color: var(--ink-soft); overflow: hidden;
    background:
      repeating-linear-gradient(-45deg, transparent 0 12px, color-mix(in srgb, var(--accent) 6%, transparent) 12px 13px),
      var(--accent-soft);
  }
  .ph-art { position: relative; z-index: 1; width: min(52%, 220px); height: auto; color: var(--accent); flex: none; }
  .ph-cap {
    position: absolute; z-index: 1; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
    font-family: var(--font-mono); font-size: .68rem; letter-spacing: .02em; line-height: 1.4;
    background: var(--surface); border: 1px solid var(--line); color: var(--ink-soft);
    padding: .3rem .55rem;
  }
  .ph::before, .ph::after {
    content: ""; position: absolute; width: 16px; height: 16px;
    border: 1.5px solid var(--accent); opacity: .5; z-index: 1;
  }
  .ph::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
  .ph::after { right: 10px; bottom: 10px; border-left: 0; border-top: 0; }

  /* a placeholder slot that now holds a real photo */
  .ph.is-photo { background: none; }
  .ph.is-photo::before, .ph.is-photo::after { display: none; }
  .ph.is-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 0% 42%; z-index: 0; }
  .ph.is-photo .ph-cap {
    left: 0; right: 0; bottom: 0; max-width: none; text-align: left;
    background: linear-gradient(0deg, rgba(8,14,24,.72), transparent);
    border: none; color: #fff; padding: 1.6rem .8rem .6rem;
  }

  .photoband .ph { aspect-ratio: 21 / 8; max-height: 460px; border-left: 0; border-right: 0; }
  .photoband .ph-art { width: min(68%, 420px); }
  @media (max-width: 700px) { .photoband .ph { aspect-ratio: 3 / 2; } }
  .ph-row { display: grid; grid-template-columns: 1fr; gap: 1.1rem; margin-bottom: clamp(1.5rem, 3vw, 2.4rem); }
  @media (min-width: 720px) { .ph-row { grid-template-columns: repeat(3, 1fr); } }
  .ph-row .ph { aspect-ratio: 4 / 3; }
  .ph-card { aspect-ratio: 16 / 10; margin-top: .4rem; }
  .map-embed {
    position: relative; aspect-ratio: 3 / 2; margin-top: 1rem; border: 1px solid var(--line);
    overflow: hidden; background: var(--surface-2);
  }
  .map-embed::before {
    content: "地図が表示されない場合は、下の「Google マップで開く」からご覧ください";
    position: absolute; inset: 0; z-index: 0; display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 1.4rem; font-family: var(--font-mono); font-size: .78rem;
    line-height: 1.6; color: var(--ink-soft);
  }
  .map-embed iframe { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; }
  .map-link {
    display: inline-flex; align-items: center; gap: .4rem; margin-top: .7rem;
    font-family: var(--font-mono); font-size: .78rem; color: var(--accent); text-decoration: none;
  }
  .map-link:hover { text-decoration: underline; text-underline-offset: 3px; }

  /* ---------- Footer ---------- */
  footer.site { background: var(--footer-bg); color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0 2.4rem; }
  footer.site .inner { display: grid; grid-template-columns: 1fr; gap: 2.2rem; }
  @media (min-width: 640px) { footer.site .inner { grid-template-columns: 1fr 1fr; } }
  @media (min-width: 920px) { footer.site .inner { grid-template-columns: 1.3fr .85fr 1fr; } }
  footer .f-brand .mk { font-family: var(--font-mono); letter-spacing: .24em; font-size: 1.05rem; }
  footer .f-brand p { margin: .8rem 0 0; font-size: .82rem; opacity: .68; line-height: 1.8; }
  footer .f-heading { margin: 0 0 1rem; font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); }
  .f-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
  .f-links li { font-size: .82rem; }
  .f-links a {
    display: inline-flex; align-items: center; gap: .5rem; color: #fff; text-decoration: none;
    border: 1px solid rgba(255,255,255,.24); padding: .55rem .85rem; opacity: .94;
    transition: background .18s, border-color .18s, opacity .18s, transform .18s;
  }
  .f-links a::after { content: "↗"; font-size: .78em; opacity: .6; }
  .f-links a:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.48); opacity: 1; transform: translateY(-1px); }
  .f-links .pending {
    display: inline-flex; flex-direction: column; align-items: flex-start; gap: .15rem;
    border: 1px dashed rgba(255,255,255,.24); padding: .55rem .85rem; color: rgba(255,255,255,.55);
  }
  .f-links small { display: block; opacity: .8; font-size: .7rem; }
  footer nav { display: flex; flex-wrap: wrap; align-content: start; gap: .3rem 1.6rem; }
  footer nav a { color: #fff; opacity: .78; text-decoration: none; font-size: .86rem; transition: opacity .18s; }
  footer nav a:hover { opacity: 1; }
  footer .f-privacy { grid-column: 1 / -1; margin: .4rem 0 0; font-size: .74rem; line-height: 1.9; opacity: .62; max-width: 56rem; }
  footer .f-privacy a { color: #fff; text-underline-offset: 3px; }
  footer .copy { grid-column: 1 / -1; margin-top: 1rem; padding-top: 1.6rem; border-top: 1px solid rgba(255,255,255,.13); font-family: var(--font-mono); font-size: .72rem; opacity: .55; }

  /* ---------- Theme toggle ---------- */
  .themetoggle {
    position: fixed; bottom: 1rem; right: 1rem; z-index: 50;
    font-family: var(--font-mono); font-size: .64rem; letter-spacing: .12em;
    background: var(--surface); color: var(--ink-soft); border: 1px solid var(--line);
    padding: .45rem .7rem; cursor: pointer; box-shadow: var(--shadow-sm); transition: color .18s, border-color .18s;
  }
  .themetoggle:hover { color: var(--accent); border-color: var(--accent); }

  .draft-flag {
    background: color-mix(in srgb, var(--accent) 10%, var(--paper));
    color: var(--ink-soft); text-align: center; border-bottom: 1px solid var(--line-soft);
    font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; padding: .5rem 1rem;
  }
  .draft-flag b { color: var(--accent); font-weight: 500; }

  /* ---------- Reveal (thumbnail-safe: hidden only after JS opt-in) ---------- */
  html.js-reveal .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  html.js-reveal .reveal.in { opacity: 1; transform: none; }
  @media (prefers-reduced-motion: reduce) {
    html.js-reveal .reveal { opacity: 1; transform: none; }
  }
