  :root {
    --panel: #e6e8e3;      /* ラックのアルミ面 */
    --panel-deep: #d3d6cf;
    --ink: #23303b;        /* 刻印の濃紺グレー */
    --ink-soft: #5b6670;
    --jack: #2a3640;       /* RJ45の穴 */
    --led: #57b36b;        /* リンクLED */
    --c-social: #2f6fb5;   /* 青ケーブル */
    --c-made: #d9a521;     /* 黄ケーブル */
    --c-server: #3e8e5a;   /* 緑ケーブル */
    --c-dmz: #c45a3c;      /* 赤ケーブル（DMZ） */
    --bg: #f4f5f2;
    --bar: rgba(244,245,242,.88);
    --focus: #2f6fb5;
    --font: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", sans-serif;
    --mono: "Martian Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
    --bar-h: 56px;
    --metal-hi: #f3f4f1; --metal-lo: #c3c7c0; --pin: #c9a24a;
  }
  @media (prefers-color-scheme: dark) {
    :root {
      --panel: #2b3036; --panel-deep: #22262b; --ink: #e3e6e0; --ink-soft: #a3aab0;
      --jack: #15181b; --bg: #1b1e22; --bar: rgba(27,30,34,.88);
      --c-social: #5b95d6; --c-made: #e3b84a; --c-server: #5fb07c; --c-dmz: #e07a5c; --focus: #8fb8e8;
      --metal-hi: #4a5058; --metal-lo: #353a40; --pin: #b8933f;
    }
  }

  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); }
  body {
    margin: 0; background: var(--bg); color: var(--ink);
    font-family: var(--font); font-size: 16px; line-height: 1.75;
    font-feature-settings: "palt";
  }
  body.menu-open { overflow: hidden; }
  body.menu-open .bar { background: var(--panel); }
  a { color: inherit; }
  :focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
  .wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
  .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

  /* ---------- 上部バー ---------- */
  .bar {
    position: sticky; top: 0; z-index: 45; height: var(--bar-h);
    background: var(--bar); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--panel-deep);
  }
  .bar .wrap { height: 100%; display: flex; align-items: center; gap: 16px; }
  .brand { font-weight: 900; font-size: 18px; text-decoration: none; letter-spacing: -0.01em; }
  .where { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); flex: 1; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .where b { color: var(--ink); font-weight: 600; }

  .burger {
    width: 44px; height: 44px; margin-right: -8px; border: 0; background: none; color: var(--ink);
    cursor: pointer; border-radius: 6px; position: relative;
  }
  .burger span {
    position: absolute; left: 11px; width: 22px; height: 2px; border-radius: 1px; background: currentColor;
    transition: transform .25s ease, opacity .2s ease, top .25s ease;
  }
  .burger span:nth-child(1) { top: 15px; }
  .burger span:nth-child(2) { top: 21px; }
  .burger span:nth-child(3) { top: 27px; }
  .burger[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

  /* ---------- メニュー（全画面） ---------- */
  .menu {
    position: fixed; inset: 0; z-index: 40; background: var(--panel);
    display: grid; grid-template-rows: var(--bar-h) 1fr auto;
    visibility: hidden; opacity: 0; transition: opacity .2s ease, visibility 0s linear .2s;
    overflow-y: auto;
  }
  .menu.open { visibility: visible; opacity: 1; transition: opacity .2s ease; }
  .menu-inner { max-width: 880px; width: 100%; margin: 0 auto; padding: 24px 16px 32px;
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-content: start; }
  .menu h2 { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-soft); margin: 0 0 12px; }
  .menu-nav ol { list-style: none; margin: 0; padding: 0; }
  .menu-nav li { border-top: 1px solid var(--panel-deep); }
  .menu-nav li:last-child { border-bottom: 1px solid var(--panel-deep); }
  .menu-nav a {
    display: grid; grid-template-columns: 3.2em 1fr auto; align-items: center; gap: 12px;
    padding: 12px 4px; text-decoration: none; font-size: clamp(20px, 4.6vw, 28px); font-weight: 700; line-height: 1.3;
  }
  .menu-nav a .pn { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-soft); }
  .menu-nav a .led { justify-self: end; }
  .menu-nav a:hover .led, .menu-nav a[aria-current="true"] .led { background: var(--led); box-shadow: 0 0 6px var(--led); }
  .menu-nav a small { display: block; font-size: 12.5px; font-weight: 400; color: var(--ink-soft); margin-top: 2px; }
  .menu-side ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 6px; }
  .menu-side a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; }
  .menu-side a i { width: 14px; height: 4px; border-radius: 2px; background: var(--cable); }
  .menu-foot { max-width: 880px; width: 100%; margin: 0 auto; padding: 16px; font-family: var(--mono);
    font-size: 11px; color: var(--ink-soft); border-top: 1px solid var(--panel-deep); }
  .menu .menu-nav li { opacity: 0; transform: translateY(6px); }
  .menu.open .menu-nav li { animation: hop .3s ease-out forwards; animation-delay: calc(var(--i) * 45ms); }

  /* ---------- 経路（ヒーロー） ---------- */
  header.hero { padding-top: 56px; padding-bottom: 40px; }
  .route {
    list-style: none; margin: 0 0 40px; padding: 0;
    font-family: var(--mono); font-size: 12.5px; color: var(--ink-soft); display: grid; gap: 2px;
  }
  .route li {
    display: grid; grid-template-columns: 2ch 1fr; gap: 12px; align-items: baseline;
    opacity: 0; transform: translateX(-6px);
    animation: hop .35s ease-out forwards; animation-delay: calc(var(--i) * 280ms);
  }
  .route li span:first-child { text-align: right; }
  .route li.here { color: var(--ink); font-weight: 600; }
  @keyframes hop { to { opacity: 1; transform: none; } }
  h1 { margin: 0; font-weight: 900; letter-spacing: -0.01em; font-size: clamp(48px, 11vw, 104px); line-height: 1; }
  .who { margin: 18px 0 0; font-size: 18px; font-weight: 500; }
  .lead { margin: 10px 0 0; max-width: 34em; color: var(--ink-soft); }

  /* ---------- セクション共通 ---------- */
  main section { padding: 32px 0 40px; }
  h2.sec { font-size: 22px; font-weight: 700; margin: 0 0 6px; display: flex; align-items: baseline; gap: 12px; }
  h2.sec .pn { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-soft); }
  .sub { margin: 0 0 20px; color: var(--ink-soft); font-size: 14px; }

  /* ---------- パッチパネル ---------- */
  .panel {
    background: var(--panel); border: 1px solid var(--panel-deep); border-radius: 6px;
    padding: 18px 20px 20px; position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 1px 0 var(--panel-deep);
  }
  .panel::before, .panel::after {
    content: ""; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px;
    border-radius: 50%; background: var(--panel-deep); box-shadow: inset 0 1px 2px rgba(0,0,0,.25);
  }
  .panel::before { left: 6px; } .panel::after { right: 6px; }
  .panel-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin: 0 10px 14px; }
  .legend { display: flex; gap: 14px; flex-wrap: wrap; }
  .legend span { display: inline-flex; align-items: center; gap: 6px; }
  .legend i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
  .ports { list-style: none; margin: 0 10px; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .port a { display: grid; gap: 6px; text-decoration: none; padding: 10px 10px 12px;
    align-content: start; border-radius: 4px; height: 100%; }
  .port a:hover { background: rgba(255,255,255,.35); }
  @media (prefers-color-scheme: dark) { .port a:hover { background: rgba(255,255,255,.05); } }
  .port-top { display: flex; align-items: center; justify-content: space-between;
    font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
  .led { width: 7px; height: 7px; border-radius: 50%; background: var(--panel-deep);
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); transition: background .15s, box-shadow .15s; display: inline-block; }
  .port a:hover .led, .port a:focus-visible .led { background: var(--led); box-shadow: 0 0 6px var(--led); }
  /* ---- RJ45ジャック（正面から見た形） ---- */
  .jack {
    width: 72px; height: 54px; margin-bottom: 12px; position: relative;
    background: linear-gradient(180deg, var(--metal-hi), var(--metal-lo));   /* 金属のシールド枠 */
    border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18), 0 1px 0 rgba(255,255,255,.4);
  }
  .jack::before { /* 差し込み口。下のくぼみはツメ（ラッチ）の逃げ */
    content: ""; position: absolute; left: 9px; right: 9px; top: 8px; bottom: 7px;
    background:
      repeating-linear-gradient(90deg, var(--pin) 0 2px, transparent 2px 5px) 6px 4px / 41px 9px no-repeat,  /* 8本の接点 */
      var(--jack);
    clip-path: polygon(0 0, 100% 0, 100% 74%, 66% 74%, 66% 100%, 34% 100%, 34% 74%, 0 74%);
  }
  /* 差さっているケーブル（プラグ＋ブーツ＋線） */
  .plug {
    position: absolute; left: 11px; right: 11px; top: 11px; height: 58px; z-index: 1;
    background: linear-gradient(var(--cable), transparent) center 40px / 14px 18px no-repeat;          /* 下に垂れる線 */
  }
  .plug::before { /* 透明プラグの頭。金色の接点が透けて見える */
    content: ""; position: absolute; left: 1px; right: 1px; top: 0; height: 22px; border-radius: 2px 2px 0 0;
    background:
      repeating-linear-gradient(90deg, var(--pin) 0 2px, transparent 2px 5px) 4px 2px / 39px 7px no-repeat,
      linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.25)),
      var(--cable);
    opacity: .9;
  }
  .plug::after { /* ブーツ（ケーブルの付け根のカバー） */
    content: ""; position: absolute; left: -2px; right: -2px; top: 20px; height: 22px;
    background: var(--cable); border-radius: 3px 3px 6px 6px;
    box-shadow: inset 0 2px 0 rgba(255,255,255,.25), inset 0 -3px 0 rgba(0,0,0,.15);
  }
  .port a:hover .plug, .port a:focus-visible .plug { transform: translateY(-1px); }
  .plug { transition: transform .15s; }
  .label { font-weight: 700; font-size: 15px; line-height: 1.35; }
  .note { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
  .social { --cable: var(--c-social); }
  .made   { --cable: var(--c-made); }
  .server { --cable: var(--c-server); }
  .dmz    { --cable: var(--c-dmz); }

  /* ---------- 作ったもの（絞り込み） ---------- */
  .filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
  .filters button {
    font: inherit; font-size: 14px; color: var(--ink); background: transparent; cursor: pointer;
    border: 1px solid var(--panel-deep); border-radius: 999px; padding: 4px 14px;
    display: inline-flex; align-items: center; gap: 8px;
  }
  .filters button i { width: 10px; height: 4px; border-radius: 2px; background: var(--cable, var(--ink-soft)); }
  .filters button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .works { list-style: none; margin: 0; padding: 0; }
  .works li { display: grid; grid-template-columns: 4px 9.5em 1fr; gap: 16px;
    padding: 16px 0; border-top: 1px solid var(--panel-deep); }
  .works li:last-child { border-bottom: 1px solid var(--panel-deep); }
  .works li[hidden] { display: none; }
  .works .cable { background: var(--cable); border-radius: 2px; }
  .works h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
  .works p { margin: 0; color: var(--ink-soft); font-size: 15px; }
  .works .stack { display: block; margin-top: 4px; font-family: var(--mono); font-size: 11px; }

  /* ---------- ラボ構成（経路図） ---------- */
  .topo { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
  .topo > li { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; position: relative; padding: 10px 0; }
  .topo .tier { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); padding-top: 8px; text-align: right; }
  .topo .row { display: flex; flex-wrap: wrap; gap: 8px; position: relative; padding-left: 20px; }
  .topo .row::before { /* 縦の配線 */
    content: ""; position: absolute; left: 5px; top: -10px; bottom: -10px; width: 2px; background: var(--panel-deep);
  }
  .topo > li:first-child .row::before { top: 50%; }
  .topo > li:last-child .row::before { bottom: 50%; }
  .topo .row::after { content: ""; position: absolute; left: 1px; top: 50%; width: 10px; height: 10px;
    margin-top: -5px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-soft); }
  .node { background: var(--panel); border: 1px solid var(--panel-deep); border-radius: 4px;
    padding: 6px 12px; font-size: 14px; line-height: 1.45; }
  .node small { display: block; font-size: 11.5px; color: var(--ink-soft); }
  .node.split { border-left: 4px solid var(--cable); }

  /* ---------- Minecraft ---------- */
  .mc { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .mc-card { background: var(--panel); border: 1px solid var(--panel-deep); border-radius: 6px; padding: 16px 18px; }
  .mc-card h3 { margin: 0 0 8px; font-size: 15px; }
  .addr { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .addr code { font-family: var(--mono); font-size: 14px; background: var(--bg); padding: 4px 8px; border-radius: 4px; }
  .copy { font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); background: transparent;
    border: 1px solid var(--panel-deep); border-radius: 4px; padding: 3px 10px; }
  .copy[data-done] { border-color: var(--led); }
  .mc-card p { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-soft); }
  .worlds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

  /* ---------- 年表 ---------- */
  .timeline { list-style: none; margin: 24px 0 0; padding: 0; border-left: 2px solid var(--panel-deep); }
  .timeline li { position: relative; padding: 0 0 18px 20px; }
  .timeline li::before { content: ""; position: absolute; left: -6px; top: 8px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-soft); }
  .timeline li.next::before { border-style: dashed; }
  .timeline time { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); display: block; }
  .about p { margin: 0 0 12px; max-width: 36em; }

  /* ---------- FAQ ---------- */
  .faq details { border-top: 1px solid var(--panel-deep); }
  .faq details:last-child { border-bottom: 1px solid var(--panel-deep); }
  .faq summary { cursor: pointer; padding: 14px 32px 14px 0; font-weight: 700; list-style: none; position: relative; }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
    border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg);
    transition: transform .2s ease; }
  .faq details[open] summary::after { transform: rotate(225deg); margin-top: -2px; }
  .faq details p { margin: 0 0 16px; color: var(--ink-soft); max-width: 40em; }

  /* ---------- フッター ---------- */
  footer { margin-top: 24px; background: var(--panel); border-top: 1px solid var(--panel-deep); }
  .foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; padding-top: 32px; padding-bottom: 24px; font-size: 14px; }
  .foot h2 { font-family: var(--mono); font-size: 11px; font-weight: 400; color: var(--ink-soft); margin: 0 0 8px; }
  .foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
  .foot a { text-decoration: none; }
  .foot a:hover { text-decoration: underline; }
  .foot .brand { font-size: 22px; display: inline-block; margin-bottom: 4px; }
  .foot p { margin: 0; color: var(--ink-soft); font-size: 13px; }
  .copyright { padding-bottom: 32px; font-size: 12px; color: var(--ink-soft); }

  @media (max-width: 640px) {
    header.hero { padding-top: 36px; }
    .ports { grid-template-columns: repeat(2, 1fr); }
    .works li { grid-template-columns: 4px 1fr; gap: 4px 14px; }
    .works li h3 { grid-column: 2; } .works li p { grid-column: 2; }
    .works .cable { grid-row: 1 / span 2; }
    .topo > li { grid-template-columns: 1fr; gap: 2px; }
    .topo .tier { text-align: left; padding: 0 0 0 20px; }
    .topo .row::before { top: -33px; } /* 段の名前の行も配線をつなぐ */
    .mc { grid-template-columns: 1fr; }
    .menu-inner { grid-template-columns: 1fr; gap: 28px; }
    .foot { grid-template-columns: 1fr 1fr; }
    .foot > div:first-child { grid-column: 1 / -1; }
    .panel { padding: 14px 12px 16px; }
    .panel-head { margin: 0 6px 12px; } .ports { margin: 0 6px; }
    .where { display: none; }
    .bar .wrap { justify-content: space-between; }
  }
  /* JSが動かないときだけ、OSの「動きを減らす」設定に従う（JSが動くときは html.calm で切り替え） */
  @media (prefers-reduced-motion: reduce) {
    html:not(.js) { scroll-behavior: auto; }
    html:not(.js) .route li { animation: none; opacity: 1; transform: none; }
  }
  html.calm { scroll-behavior: auto; }
  html.calm .menu .menu-nav li, html.calm .menu.open .menu-nav li { animation: none; opacity: 1; transform: none; }
  html.calm .led, html.calm .burger span, html.calm .faq summary::after { transition: none; }

  /* ==================== ブログ ==================== */
  .more { margin: 16px 0 0; font-size: 14px; }
  .more a { text-decoration: none; border-bottom: 1px solid var(--panel-deep); }
  .more a:hover { border-color: var(--ink); }

  /* 記事一覧（ログの1行ずつ） */
  .posts { list-style: none; margin: 0; padding: 0; }
  .posts li { border-top: 1px solid var(--panel-deep); }
  .posts li:last-child { border-bottom: 1px solid var(--panel-deep); }
  .posts a { display: grid; grid-template-columns: 7.5em 1fr; gap: 4px 16px; padding: 16px 4px; text-decoration: none; }
  .posts a:hover h3 { text-decoration: underline; text-underline-offset: 3px; }
  .posts time { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); padding-top: 4px; }
  .posts h3 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.5; }
  .posts p { grid-column: 2; margin: 0; color: var(--ink-soft); font-size: 14px; }
  .tags { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
  .tag { font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft);
    border: 1px solid var(--panel-deep); border-radius: 999px; padding: 0 8px; line-height: 1.8; }
  .tag-filter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
  .tag-filter button { font-family: var(--mono); font-size: 12px; color: var(--ink); background: transparent; cursor: pointer;
    border: 1px solid var(--panel-deep); border-radius: 999px; padding: 2px 12px; }
  .tag-filter button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
  .posts li[hidden] { display: none; }

  /* ページ見出し */
  .page-head { padding-top: 48px; padding-bottom: 24px; }
  .crumb { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); margin: 0 0 16px; }
  .crumb a { text-decoration: none; } .crumb a:hover { text-decoration: underline; }
  .page-head h1 { font-size: clamp(28px, 5.4vw, 44px); line-height: 1.3; letter-spacing: 0; }
  .meta { margin: 14px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }

  /* 本文 */
  .article { max-width: 42em; padding-bottom: 48px; }
  .article > :first-child { margin-top: 0; }
  .article h2 { font-size: 21px; margin: 44px 0 10px; padding-top: 14px; border-top: 1px solid var(--panel-deep); }
  .article h3 { font-size: 17px; margin: 28px 0 8px; }
  .article p, .article ul, .article ol { margin: 0 0 16px; }
  .article li { margin: 4px 0; }
  .article a { text-underline-offset: 3px; }
  .article code { font-family: var(--mono); font-size: .82em; background: var(--panel); border: 1px solid var(--panel-deep);
    border-radius: 3px; padding: 1px 5px; }
  .article pre { background: var(--jack); color: #e3e6e0; border-radius: 6px; padding: 14px 16px; overflow-x: auto;
    font-size: 13px; line-height: 1.6; margin: 0 0 20px; }
  .article pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; }
  .article blockquote { margin: 0 0 16px; padding: 4px 0 4px 16px; border-left: 4px solid var(--c-made); color: var(--ink-soft); }
  .article img { max-width: 100%; height: auto; border-radius: 6px; border: 1px solid var(--panel-deep); }
  .article table { border-collapse: collapse; width: 100%; margin: 0 0 20px; font-size: 14px; display: block; overflow-x: auto; }
  .article th, .article td { border: 1px solid var(--panel-deep); padding: 6px 10px; text-align: left; }
  .article th { background: var(--panel); }
  .article hr { border: 0; border-top: 1px solid var(--panel-deep); margin: 32px 0; }

  .pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 48px; }
  .pager a { display: block; text-decoration: none; background: var(--panel); border: 1px solid var(--panel-deep);
    border-radius: 6px; padding: 12px 16px; font-size: 14px; }
  .pager a:hover { border-color: var(--ink-soft); }
  .pager small { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-soft); }
  .pager .next { text-align: right; grid-column: 2; }

  @media (max-width: 640px) {
    .posts a { grid-template-columns: 1fr; gap: 2px; }
    .posts p, .tags { grid-column: 1; }
    .page-head { padding-top: 32px; }
    .pager { grid-template-columns: 1fr; } .pager .next { grid-column: 1; }
  }

  /* 未接続のポート（準備中） */
  .port.off > div { display: grid; gap: 6px; padding: 10px 10px 12px; align-content: start; opacity: .5; cursor: default; }
  .menu-side .soon { display: inline-flex; align-items: center; gap: 10px; padding: 4px 0; color: var(--ink-soft); }
  .menu-side .soon i { width: 14px; height: 4px; border-radius: 2px; background: var(--panel-deep); }
  .menu-side .soon small { font-family: var(--mono); font-size: 10.5px; }
  .faq details p a { text-underline-offset: 3px; }

  /* ==================== 動き（JSが動いているときだけ。html.js） ==================== */
  @keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(87,179,107,.55); } 60% { box-shadow: 0 0 0 6px rgba(87,179,107,0); } }
  @keyframes blink { 50% { opacity: .85; } }
  @keyframes caret { 50% { opacity: 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(.45em) rotate(4deg); } to { opacity: 1; transform: none; } }
  @keyframes pop { 40% { transform: scale(1.08); } }
  @keyframes whereIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
  @keyframes linkup { /* 差した直後はオレンジで点滅して、つながったら緑 */
    0%, 30%, 60% { background: #e0a42a; box-shadow: 0 0 6px #e0a42a; }
    15%, 45% { background: var(--panel-deep); box-shadow: none; }
    80%, 100% { background: var(--led); box-shadow: 0 0 5px var(--led); }
  }

  /* スクロールしたら下からふわっと出る */
  .js .rv { opacity: 0; transform: translateY(16px);
    transition: opacity .6s ease, transform .7s cubic-bezier(.2,.75,.2,1);
    transition-delay: calc(var(--d, 0) * 70ms); }
  .js .rv.in { opacity: 1; transform: none; }
  .js .rv.out { opacity: 0; transform: scale(.98); transition: opacity .18s, transform .18s; transition-delay: 0s; }

  /* 上部バーの読み進み具合（リンクLEDの色の線） */
  .bar .progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--led);
    transform: scaleX(var(--p, 0)); transform-origin: left; opacity: .85; pointer-events: none; }
  #where.tick { display: inline-block; animation: whereIn .35s ease-out; }

  /* ---- ヒーロー：経路を1ホップずつ打ち込む ---- */
  .js .route { margin-bottom: 10px; }
  .js .route li { animation: none; opacity: 0; transform: translateX(-8px); transition: opacity .2s, transform .3s ease-out; }
  .js .route li.on { opacity: 1; transform: none; }
  .route li span:first-child { transition: color .2s; }
  .route li.cur span:first-child { color: var(--led); font-weight: 600; }
  .route .caret { display: inline-block; width: .55em; height: 1.1em; margin-left: 2px; vertical-align: -.2em;
    background: currentColor; animation: caret .8s steps(1) infinite; }
  .route li.arrived span:last-child::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px;
    border-radius: 50%; background: var(--led); vertical-align: .1em; animation: pulse 2.2s ease-out infinite; }
  .replay { font-family: var(--mono); font-size: 10.5px; color: var(--ink-soft); background: transparent; cursor: pointer;
    border: 1px solid var(--panel-deep); border-radius: 999px; padding: 2px 10px; margin: 0 0 30px; transition: opacity .3s, border-color .2s, color .2s; }
  .replay:hover { color: var(--ink); border-color: var(--ink-soft); }
  .replay:disabled { opacity: 0; cursor: default; }
  .js header.hero h1 .ch { display: inline-block; animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
    animation-delay: calc(var(--k) * 70ms + 80ms); }
  .js header.hero h1:hover .ch { animation: pop .4s ease both; animation-delay: calc(var(--k) * 40ms); }

  /* ---- 見出し：今いるセクションのLEDが点く ---- */
  h2.sec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; align-self: center;
    background: var(--panel-deep); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); transition: background .3s, box-shadow .3s; }
  section.active h2.sec::before { background: var(--led); box-shadow: 0 0 6px var(--led); }

  /* ---- パッチパネル：ケーブルが差さって、リンクが上がる ---- */
  .led { position: relative; }
  .led::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; background: #fff; opacity: 0; }
  .js .port .plug { transform: translateY(20px); opacity: 0;
    transition: transform .5s cubic-bezier(.3,1.5,.5,1), opacity .2s; transition-delay: calc(var(--d, 0) * 70ms + 150ms); }
  .js .port.in .plug { transform: none; opacity: 1; }
  .js .port.in .led { animation: linkup .9s linear forwards; animation-delay: calc(var(--d, 0) * 70ms + 500ms); }
  .js .panel.done .plug { transition-delay: 0s; }
  .js .port.in a:hover .plug, .js .port.in a:focus-visible .plug { transform: translateY(-3px); }
  .port.act .led::after { animation: blink .18s steps(1) 3; }
  .port a:hover .led::after { animation: blink .22s steps(1) infinite; }
  .port a { transition: background .2s, transform .2s; }
  .port a:hover { transform: translateY(-2px); }

  /* ---- 作ったもの ---- */
  .works li { transition: background .25s; }
  .works li:hover { background: linear-gradient(90deg, color-mix(in srgb, var(--cable) 10%, transparent), transparent 70%); }
  .works .cable { transition: box-shadow .25s; }
  .works li:hover .cable { box-shadow: 0 0 10px var(--cable); }
  .filters button { transition: background .2s, color .2s, border-color .2s, transform .15s; }
  .filters button:active { transform: scale(.96); }

  /* ---- ラボ構成：パケットが上から下へ流れる ---- */
  .topo { position: relative; }
  .topo .pkt { position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: var(--pc, var(--c-social)); box-shadow: 0 0 10px var(--pc, var(--c-social)); opacity: 0; z-index: 2;
    pointer-events: none; transition: opacity .25s; }
  .topo .pkt.show { opacity: 1; }
  .topo .row::after { transition: background .3s, border-color .3s, box-shadow .3s; }
  .topo > li.ping .row::after { background: var(--pc, var(--led)); border-color: var(--pc, var(--led)); box-shadow: 0 0 0 5px color-mix(in srgb, var(--pc, var(--led)) 25%, transparent); }
  .node { transition: transform .2s, box-shadow .2s, border-color .3s; }
  .topo > li.ping .node { border-color: var(--ink-soft); }
  .node:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }

  /* ---- Minecraft ---- */
  .mc-card { transition: transform .2s, box-shadow .2s; }
  .mc-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
  .copy[data-done] { animation: pop .3s ease; }
  .more a { transition: border-color .2s, padding .2s; }
  .more a:hover { padding-right: 6px; }

  /* ---- 年表：線が上から引かれる ---- */
  .js .timeline { border-left-color: transparent; position: relative; }
  .js .timeline::before { content: ""; position: absolute; left: -2px; top: 0; bottom: 0; width: 2px; background: var(--panel-deep);
    transform: scaleY(0); transform-origin: top; transition: transform 1.4s cubic-bezier(.4,0,.2,1); }
  .js .timeline.in::before { transform: none; }
  .timeline li.next::before { animation: pulse 2.4s ease-out infinite; }

  /* ---- FAQ：開閉をなめらかに ---- */
  .faq details { transition: background .2s; }
  .faq summary:hover { color: var(--ink-soft); }

  /* ---- メニュー：ハンバーガーの位置から円で広がる ---- */
  .menu { opacity: 1; clip-path: circle(0px at var(--mx, calc(100% - 30px)) var(--my, 28px));
    transition: clip-path .45s cubic-bezier(.6,0,.2,1), visibility 0s linear .45s; }
  .menu.open { opacity: 1; clip-path: circle(150vmax at var(--mx, calc(100% - 30px)) var(--my, 28px));
    transition: clip-path .6s cubic-bezier(.6,0,.2,1); }
  .menu.open .menu-nav li { animation-delay: calc(var(--i) * 55ms + 140ms); }
  .menu .menu-side li, .menu .menu-side h2 { opacity: 0; transform: translateY(6px); }
  .menu.open .menu-side li, .menu.open .menu-side h2 { animation: hop .3s ease-out forwards; animation-delay: calc(var(--i, 0) * 40ms + 300ms); }
  .menu-nav a { transition: padding .2s; }
  .menu-nav a:hover { padding-left: 12px; }

  /* 動きオフ（OSの「動きを減らす」設定、またはフッターの切り替え）：位置は動かさずフェードだけ */
  html.calm.js .rv, html.calm.js .rv.in, html.calm.js .route li, html.calm.js .port .plug { transform: none; }
  html.calm.js header.hero h1 .ch { animation: none; }
  html.calm .menu, html.calm .menu.open { clip-path: none; transition: opacity .2s, visibility 0s linear .2s; opacity: 0; }
  html.calm .menu.open { opacity: 1; transition: opacity .2s; }
  html.calm .menu .menu-side li, html.calm .menu .menu-side h2, html.calm .menu.open .menu-side li, html.calm .menu.open .menu-side h2 { animation: none; opacity: 1; transform: none; }
  html.calm .route li.arrived span:last-child::after, html.calm .timeline li.next::before { animation: none; }
  html.calm .port a:hover, html.calm .node:hover, html.calm .mc-card:hover { transform: none; }
  .motion-toggle { font: inherit; font-size: 12px; color: var(--ink-soft); background: none; border: 0; padding: 0;
    cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
  .motion-toggle:hover { color: var(--ink); }
