/* ポートフォリオ。PDF版 v6 の方向（白地×墨＋藍1色・制作画面が主役）を Web に移し、
   動きはスクロール連動・ページ間遷移・データの流れなど「意味のあるもの」に限る。
   動きを減らす設定と非対応ブラウザでは、すべて静止した状態で内容が読める。 */
/* フォントはこのサイトで使う文字だけに絞って自前で配信する（tools/subset_fonts.py） */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("fonts/inter-800.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2010-2027; }
@font-face { font-family: "Noto Sans JP"; font-weight: 400 700; font-display: swap; src: url("fonts/noto-sans-jp.woff2") format("woff2"); }

:root {
  --ink: #14171c;
  --ink-2: #3b4048;
  --muted: #5f646c;
  --line: #deddd8;
  --line-2: #ecebe7;
  --paper: #ffffff;
  --paper-2: #f5f4f0;
  --accent: #1c3f7a;
  --accent-tint: #e8edf6;
  --bezel: #1b1e23;
  --font: "Inter", "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;
  --gutter: 24px;
  --max: 1080px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceef1;
    --ink-2: #c9ccd2;
    --muted: #9da2aa;
    --line: #34383f;
    --line-2: #262a30;
    --paper: #15181d;
    --paper-2: #1d2026;
    --accent: #8fb0e6;
    --accent-tint: #1f2a3d;
    --bezel: #2b2f36;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 16px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--paper); padding: 8px 12px; }

/* ---------- ページ間の遷移（View Transitions） ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-group(*) { animation-duration: .5s; animation-timing-function: var(--ease); }
::view-transition-old(root) { animation: .25s ease both vt-fade-out; }
::view-transition-new(root) { animation: .35s ease .1s both vt-fade-in; }
@keyframes vt-fade-out { to { opacity: 0; } }
@keyframes vt-fade-in { from { opacity: 0; } }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  view-transition-name: site-header;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px; background: var(--accent); color: var(--paper);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: .01em; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; margin-right: -10px; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 10px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 6px;
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
@media (max-width: 600px) {
  .site-header { position: static; }
  .nav { margin: 0 0 4px -10px; }
}

/* ---------- 共通の見出し ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: .01em; }
.section-title .count { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 14px; }
.lead { margin-top: 16px; color: var(--ink-2); font-size: 17px; max-width: 46em; }
.sub-title { font-size: 20px; font-weight: 700; margin: 56px 0 16px; }
.eyebrow { font-size: 14px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.more { margin-top: 36px; }
.more a {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; font-size: 15px;
  text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--ink);
}
.more a::after { content: "→"; transition: transform .25s var(--ease); }
.more a:hover::after { transform: translateX(4px); }

/* ---------- ヒーロー ---------- */
.hero { padding: 112px 0 96px; }
.hero-name { font-size: clamp(64px, 12vw, 136px); font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.hero-role { margin-top: 20px; font-size: 20px; font-weight: 700; color: var(--ink-2); }
.hero-copy { margin-top: 48px; font-size: clamp(22px, 2.8vw, 30px); font-weight: 700; line-height: 1.6; }
.hero-text { margin-top: 20px; color: var(--ink-2); font-size: 17px; max-width: 44em; }
@media (max-width: 600px) { .br-wide { display: none; } .hero { padding: 72px 0 64px; } }

.profile, .meta {
  margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  border-top: 1px solid var(--line);
}
.profile { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.profile > div, .meta > div { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line); }
.profile dt, .meta dt { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.profile dd, .meta dd { font-size: 15px; font-weight: 600; margin-top: 4px; line-height: 1.6; }

/* ---------- 対応できること（工程を線でつなぐ） ---------- */
.process { margin-top: 48px; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.process::before {
  content: ""; position: absolute; left: 14px; right: calc(100% / 6 - 14px); top: 14px; height: 2px;
  background: var(--line);
}
.process li { position: relative; padding-right: 16px; display: grid; gap: 6px; align-content: start; }
.proc-dot {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper); border: 2px solid var(--accent); color: var(--accent);
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; position: relative; z-index: 1;
  margin-bottom: 10px;
}
.proc-name { font-size: 17px; font-weight: 700; }
.proc-desc { font-size: 14px; color: var(--ink-2); line-height: 1.7; }
@media (max-width: 860px) {
  .process { grid-template-columns: 1fr; gap: 20px; }
  .process::before { left: 14px; right: auto; top: 14px; bottom: 14px; width: 2px; height: auto; }
  .process li { grid-template-columns: 30px 1fr; column-gap: 16px; padding: 0; }
  .proc-dot { grid-row: span 2; margin: 0; }
}
@supports ((animation-timeline: view()) and (animation-range: 0% 100%)) {
  @media (prefers-reduced-motion: no-preference) {
    .process::after {
      content: ""; position: absolute; left: 14px; right: calc(100% / 6 - 14px); top: 14px; height: 2px;
      background: var(--accent); transform-origin: left;
      animation: draw linear both; animation-timeline: view(); animation-range: entry 40% cover 55%;
    }
    @media (max-width: 860px) {
      .process::after { right: auto; bottom: 14px; width: 2px; height: auto; transform-origin: top; animation-name: draw-v; }
    }
  }
}
@keyframes draw { from { transform: scaleX(0); } }
@keyframes draw-v { from { transform: scaleY(0); } }

.tools-label { margin-top: 48px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.tools { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.tools li { font-size: 14px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-2); }

/* ---------- 事例カード ---------- */
.cards { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 40px 24px; }
.card a { display: block; text-decoration: none; color: inherit; height: 100%; }
.card-visual {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 10px;
  border: 1px solid var(--line); background: var(--paper-2);
}
.card-img { position: absolute; inset: 0 0 auto; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.card-img.scrolls { height: auto; transition: transform 3.2s cubic-bezier(.45, 0, .2, 1); }
.card a:hover .card-img.scrolls, .card a:focus-visible .card-img.scrolls { transform: translateY(var(--travel)); }
.card-flow { position: absolute; inset: 0; display: grid; align-content: center; gap: 12px; padding: 28px; counter-reset: f; }
.card-flow li { counter-increment: f; font-size: 15px; font-weight: 700; display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: center; }
.card-flow li::before {
  content: counter(f); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--accent); color: var(--accent); font-size: 12px;
}
.card-body { padding-top: 18px; }
.card-title { margin-top: 6px; font-size: 19px; font-weight: 700; transition: color .2s; }
.card a:hover .card-title { color: var(--accent); }
.card-summary { margin-top: 4px; font-size: 14px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .card-img.scrolls { transition: none; transform: none !important; } }

/* ---------- 進め方 ---------- */
.workstyle { margin-top: 44px; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.workstyle > div { padding: 24px; background: var(--paper-2); border-radius: 10px; }
.workstyle dt { font-size: 16px; font-weight: 700; }
.workstyle dd { margin-top: 8px; font-size: 15px; color: var(--ink-2); line-height: 1.8; }
.promises { display: grid; border-top: 1px solid var(--line); }
.promises li { display: flex; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 600; }
.promises li::before {
  content: ""; flex: none; width: 18px; height: 10px; margin-top: -4px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg);
}

/* ---------- パンくず ---------- */
.crumbs { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 24px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a + a::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs + .section, .crumbs + .chapter { border-top: 0; padding-top: 48px; }

/* ---------- 事例ページ ---------- */
.case { padding: 40px 0 112px; }
.case-title { margin-top: 10px; font-size: clamp(28px, 4.2vw, 46px); font-weight: 700; letter-spacing: .01em; }
.case-summary { margin-top: 12px; color: var(--ink-2); font-size: 17px; }
.case .meta { margin-top: 32px; }

/* 枠内スクロールと端末の切り替え（A1・A2）。既定は「枠の中を直接スクロールできる」静的な形 */
.viewer { margin-top: 56px; }
.viewer-sticky { display: grid; justify-items: center; gap: 20px; padding: 0 var(--gutter); }
.viewer-switch {
  display: inline-flex; padding: 4px; border-radius: 10px; background: var(--paper-2); border: 1px solid var(--line);
}
.viewer-switch button {
  font: inherit; font-size: 14px; font-weight: 700; color: var(--muted);
  border: 0; background: transparent; padding: 0 18px; min-height: 40px; border-radius: 7px; cursor: pointer;
}
.viewer-switch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(20, 23, 28, .12); }
.device {
  --frame-max: min(1032px, 100%);
  width: var(--frame-max);
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper);
  box-shadow: 0 24px 60px -20px rgba(20, 23, 28, .25);
}
.device-bar { height: 30px; display: flex; gap: 6px; align-items: center; padding: 0 14px; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.device-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.device-screen { position: relative; aspect-ratio: 1 / var(--pc-frame); overflow-y: auto; overscroll-behavior: contain; }
.shot { width: 100%; height: auto; }
.shot-sp { display: none; }
.device[data-mode="sp"] {
  width: min(300px, 72vw); border: 10px solid var(--bezel); border-radius: 40px; background: var(--bezel);
  box-shadow: 0 24px 60px -20px rgba(20, 23, 28, .35);
}
.device[data-mode="sp"] .device-bar { display: none; }
.device[data-mode="sp"] .device-screen { aspect-ratio: 9 / 19.5; border-radius: 30px; }
.device[data-mode="sp"] .shot-pc { display: none; }
.device[data-mode="sp"] .shot-sp { display: block; }
.viewer-hint { display: none; font-size: 13px; color: var(--muted); }
::view-transition-group(*) { overflow: clip; }

@supports ((animation-timeline: view()) and (animation-range: 0% 100%)) {
  @media (prefers-reduced-motion: no-preference) {
    .viewer.moves { height: 280vh; view-timeline: --viewer block; }
    .viewer.moves .viewer-sticky { position: sticky; top: 64px; height: calc(100svh - 64px); align-content: center; }
    .viewer.moves .device-screen { overflow: hidden; }
    .viewer.moves .device[data-mode="pc"] { width: min(1032px, 100%, calc((100svh - 220px) / var(--pc-frame))); }
    .viewer.moves .device[data-mode="sp"] { width: min(300px, 72vw, calc((100svh - 240px) * 9 / 19.5)); }
    .viewer.moves .shot { will-change: transform; animation: linear both; animation-timeline: --viewer; animation-range: contain 4% contain 96%; }
    .viewer.moves .shot-pc { animation-name: travel-pc; }
    .viewer.moves .shot-sp { animation-name: travel-sp; }
    .viewer.moves .viewer-hint { display: block; }
  }
}
@keyframes travel-pc { to { transform: translateY(var(--pc-travel)); } }
@keyframes travel-sp { to { transform: translateY(var(--sp-travel)); } }
@media (max-width: 600px) {
  .viewer.moves .viewer-sticky { top: 0; height: 100svh; }
}

.slides { margin: 56px auto 0; max-width: var(--max); padding: 0 var(--gutter); display: grid; gap: 20px; }
.slides img { border: 1px solid var(--line); border-radius: 10px; }

/* 業務自動化の流れの図（B1） */
.diagram { margin: 56px auto 0; max-width: var(--max); padding: 0 var(--gutter); }
.diagram svg { width: 100%; height: auto; display: block; overflow: visible; }
.diagram figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); text-align: center; }
.node > rect:first-child { fill: var(--paper); stroke: var(--line); stroke-width: 1.5; }
.n2 > rect:first-child { stroke: var(--accent); stroke-width: 2; }
.row { fill: var(--line-2); }
.row.head { fill: var(--accent-tint); }
.node-label { fill: var(--ink); font-size: 17px; font-weight: 700; }
.node-sub { fill: var(--muted); font-size: 14px; font-weight: 600; }
.pipe { stroke: var(--line); stroke-width: 2; stroke-dasharray: 4 6; }
.loop { fill: none; stroke: var(--line); stroke-width: 2; stroke-dasharray: 4 6; }
.loop-label { fill: var(--muted); font-size: 14px; font-weight: 600; }
.gear-ring { fill: none; stroke: var(--accent); stroke-width: 9; stroke-dasharray: 7 5.6; }
.gear-core { fill: var(--accent); }
.dot { fill: var(--accent); offset-rotate: 0deg; opacity: 0; }
.dot-a { offset-path: path("M 240 176 L 380 176"); }
.dot-b { offset-path: path("M 580 176 L 720 176"); }
.dot-loop { offset-path: path("M 820 66 C 820 10, 140 10, 140 66"); }
@media (prefers-reduced-motion: no-preference) {
  .dot-a, .dot-b { animation: run 2.4s linear infinite; }
  .dot-loop { animation: run 4.8s linear infinite; }
  .gear-ring { transform-origin: 480px 150px; animation: spin 6s linear infinite; }
  .n1 .row, .n3 .row { animation: read 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * .3s); }
}
@keyframes run {
  0% { offset-distance: 0%; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}
@keyframes spin { to { rotate: 360deg; } }
@keyframes read { 0%, 100% { fill: var(--line-2); } 40% { fill: var(--accent-tint); } }
@supports ((animation-timeline: view()) and (animation-range: 0% 100%)) {
  @media (prefers-reduced-motion: no-preference) {
    .diagram .node { animation: rise linear both; animation-timeline: view(); }
    .diagram .n1 { animation-range: entry 10% cover 30%; }
    .diagram .n2 { animation-range: entry 25% cover 38%; }
    .diagram .n3 { animation-range: entry 40% cover 46%; }
  }
}
@keyframes rise { from { opacity: 0; translate: 0 24px; } }

.flow { margin-top: 56px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.flow > li { border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; gap: 8px; align-content: start; }
.flow-step {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  border: 2px solid var(--accent); color: var(--accent); font-size: 13px; font-weight: 700;
}
.flow h2 { font-size: 17px; font-weight: 700; }
.flow p { font-size: 15px; color: var(--ink-2); line-height: 1.8; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.tags li { font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 4px; background: var(--accent-tint); color: var(--accent); }

.story { margin-top: 80px; display: grid; border-top: 2px solid var(--ink); }
.story > div { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.story dt { font-size: 15px; font-weight: 700; color: var(--accent); }
.story dd { font-size: 17px; line-height: 1.9; }
@media (max-width: 600px) { .story > div { grid-template-columns: 1fr; gap: 6px; } }
.case-note { margin-top: 24px; font-size: 14px; color: var(--muted); }

.pager { margin-top: 64px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pager a {
  display: grid; gap: 4px; padding: 20px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink); font-weight: 700; font-size: 15px; line-height: 1.6;
  transition: border-color .2s;
}
.pager a span { font-size: 13px; color: var(--muted); font-weight: 600; }
.pager .next { text-align: right; }
.pager a:hover { border-color: var(--accent); }
@media (max-width: 600px) { .pager { grid-template-columns: 1fr; } .pager .next { text-align: left; } }

/* ---------- このサイトの作り方 ---------- */
.colophon-h { margin-top: 80px; font-size: clamp(22px, 2.6vw, 28px); }
.tech { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.tech li { border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; gap: 10px; align-content: start; }
.tech h3 { font-size: 17px; font-weight: 700; }
.tech p { font-size: 15px; color: var(--ink-2); line-height: 1.8; }
.tech .fallback { font-size: 14px; color: var(--muted); padding-top: 10px; border-top: 1px solid var(--line-2); }
.table-wrap { margin-top: 24px; overflow-x: auto; }
.weights { width: 100%; border-collapse: collapse; font-size: 15px; }
.weights th, .weights td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.weights thead th { font-size: 13px; color: var(--muted); font-weight: 700; }
.weights td { font-variant-numeric: tabular-nums; white-space: nowrap; }
.weights tbody th { font-weight: 600; }
.care { margin-top: 24px; display: grid; border-top: 1px solid var(--line); }
.care > div { display: grid; grid-template-columns: 180px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.care dt { font-weight: 700; font-size: 15px; }
.care dd { font-size: 15px; color: var(--ink-2); }
@media (max-width: 600px) { .care > div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0; background: var(--paper-2); }
.contact-note { font-size: 15px; color: var(--ink-2); }
.copy { margin-top: 24px; display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.copy a { color: var(--muted); }

/* =================================================================
   遊び心の層（2026-10-12）: 設計図モード・コマンドパレット・表示時間・カーソル追従の光
   ================================================================= */
:root { --bp: #2f6fd6; --bp-soft: rgba(47, 111, 214, .08); --bp-grid: rgba(28, 63, 122, .07); }
@media (prefers-color-scheme: dark) { :root { --bp: #7fa8ee; --bp-soft: rgba(127, 168, 238, .1); --bp-grid: rgba(143, 176, 230, .08); } }

/* ヘッダーの道具 */
.header-inner { gap: 8px 12px; }
.tools-bar { display: flex; gap: 8px; order: 2; }
.nav { order: 1; margin-left: auto; }
.bp-toggle, .pal-open {
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.bp-toggle:hover, .pal-open:hover { border-color: var(--accent); color: var(--ink); }
.bp-toggle[aria-pressed="true"] { background: var(--bp); border-color: var(--bp); color: #fff; }
.bp-icon {
  width: 14px; height: 14px; border: 1.5px solid currentColor; border-radius: 2px;
  background: linear-gradient(currentColor, currentColor) 50% 0 / 1.5px 100% no-repeat,
              linear-gradient(currentColor, currentColor) 0 50% / 100% 1.5px no-repeat;
}
kbd, .pal-key {
  font: inherit; font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--paper-2);
}
@media (max-width: 860px) {
  .tools-bar { order: 1; margin-left: auto; }
  .nav { order: 3; flex-basis: 100%; margin: 0 0 4px -10px; }
  .pal-key { display: none; }
}

/* ヒーロー: 設計図を連想させる方眼を、名前の周りにだけ薄く敷く */
.hero { position: relative; isolation: isolate; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(var(--bp-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 60% at 30% 30%, #000 20%, transparent 75%);
}
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.bp-cta {
  font: inherit; font-size: 15px; font-weight: 700; color: #fff; background: var(--accent);
  border: 0; border-radius: 10px; min-height: 48px; padding: 0 22px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px;
  box-shadow: 0 8px 24px -10px var(--accent);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.bp-cta::before {
  content: ""; width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 2px;
  background: linear-gradient(currentColor, currentColor) 50% 0 / 1.5px 100% no-repeat,
              linear-gradient(currentColor, currentColor) 0 50% / 100% 1.5px no-repeat;
}
.bp-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -10px var(--accent); }
.load-chip, .load-time { font-size: 13px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.load-chip { display: inline-flex; align-items: center; gap: 8px; }
.load-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 3px rgba(31, 157, 85, .18); }
.load-chip[hidden], .load-time[hidden] { display: none; }

/* カーソル追従の光（枠の縁だけをほのかに光らせる） */
.glow { position: relative; }
.glow::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
  background: radial-gradient(220px circle at var(--mx, -999px) var(--my, -999px), var(--bp), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .3s;
}
.glow:hover::after { opacity: 1; }
.card-visual.glow::after { z-index: 2; }
.workstyle > div.glow { border-radius: 10px; }

/* コマンドパレット */
.palette {
  width: min(560px, calc(100vw - 32px)); max-height: min(560px, 80vh); padding: 0; margin: 12vh auto auto;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 80px -20px rgba(10, 14, 20, .45);
}
.palette::backdrop { background: rgba(10, 14, 20, .35); backdrop-filter: blur(3px); }
.palette[open] { animation: pal-in .18s var(--ease); }
@keyframes pal-in { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .palette[open] { animation: none; } }
.pal-form { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.pal-input { flex: 1; font: inherit; font-size: 16px; border: 0; background: transparent; color: var(--ink); min-height: 40px; outline: none; }
.pal-close { font: inherit; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--paper-2); border: 1px solid var(--line); border-radius: 6px; min-height: 28px; padding: 0 8px; cursor: pointer; }
.pal-list { padding: 8px; overflow-y: auto; max-height: calc(min(560px, 80vh) - 64px); }
.pal-list a, .pal-list button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 12px;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; text-align: left;
  background: transparent; border: 0; border-radius: 8px; cursor: pointer;
}
.pal-list a:hover, .pal-list button:hover, .pal-list a:focus-visible, .pal-list button:focus-visible { background: var(--accent-tint); outline: none; }
.pal-list kbd { margin-left: auto; }
.pal-kind { flex: none; width: 3.5em; font-size: 12px; font-weight: 700; color: var(--muted); }
.pal-empty { padding: 16px 20px 20px; color: var(--muted); font-size: 14px; }

/* 設計図モード */
html.bp body { background-image: linear-gradient(var(--bp-grid) 1px, transparent 1px), linear-gradient(90deg, var(--bp-grid) 1px, transparent 1px); background-size: 24px 24px; }
html.bp .site-footer, html.bp .site-header { background-color: color-mix(in srgb, var(--paper) 80%, transparent); }
.bp-layer { position: absolute; top: 0; left: 0; width: 100%; overflow: hidden; pointer-events: none; z-index: 4; animation: bp-in .3s ease both; }
@keyframes bp-in { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bp-layer { animation: none; } }
.bp-box { position: absolute; outline: 1.5px solid var(--bp); background: var(--bp-soft); border-radius: 2px; }
.bp-pad {
  position: absolute; background: repeating-linear-gradient(-45deg, var(--bp-soft) 0 6px, transparent 6px 12px);
  border-block: 1px dashed var(--bp);
}
.bp-pad::after, .bp-cols::after {
  content: attr(data-size); position: absolute; right: 12px; top: 50%; translate: 0 -50%;
  font-size: 12px; font-weight: 700; color: var(--bp); font-variant-numeric: tabular-nums;
  background: var(--paper); padding: 1px 6px; border-radius: 4px;
}
.bp-cols { position: absolute; top: 0; bottom: 0; border-inline: 1px dashed var(--bp); }
.bp-cols::after { top: 120px; right: auto; left: 50%; translate: -50% 0; }
.bp-chip {
  position: absolute; white-space: nowrap; font-size: 12px; font-weight: 700; line-height: 1.6;
  color: #fff; background: var(--bp); padding: 2px 8px; border-radius: 4px; font-variant-numeric: tabular-nums;
}
.bp-pin {
  width: 24px; height: 24px; padding: 0; display: grid; place-items: center; border-radius: 50% 50% 50% 0;
  box-shadow: 0 0 0 3px var(--paper);
}
.bp-panel {
  position: fixed; right: 16px; bottom: 16px; z-index: 6; width: min(340px, calc(100vw - 32px)); max-height: 50vh; overflow-y: auto;
  background: var(--paper); border: 1.5px solid var(--bp); border-radius: 12px; padding: 14px 16px;
  box-shadow: 0 20px 50px -20px rgba(20, 23, 28, .35); animation: bp-in .3s ease both;
}
@media (prefers-reduced-motion: reduce) { .bp-panel { animation: none; } }
@media (max-width: 600px) { .bp-panel { max-height: 30vh; right: 8px; bottom: 8px; width: calc(100vw - 16px); } }
.bp-panel-title { font-size: 13px; font-weight: 700; color: var(--bp); margin-bottom: 8px; }
.bp-panel ol { list-style: none; counter-reset: n; display: grid; gap: 10px; }
.bp-panel li { counter-increment: n; display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 13px; line-height: 1.7; color: var(--ink-2); }
.bp-panel li::before {
  content: counter(n); width: 20px; height: 20px; margin-top: 2px; display: grid; place-items: center;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--bp); border-radius: 50% 50% 50% 0;
}
