/* ==========================================================================
   ヨンサン ポートフォリオ（/portfolio/）
   - 土台は fourthplace43.com と同じ（白・濃い文字・6色の光・Zen Kaku Gothic New + Space Grotesk）
   - 作品が主役。飾りは光と線だけに使う
   - 動きは prefers-reduced-motion で止まる。JavaScript が無くても全部読める
   - このファイルは手で直してよい（build.py が ?v= を付けて配る）
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-2: #f7f8fc;
  --bg-3: #eef0f7;
  --ink: #12141c;
  --ink-2: #3a4052;
  --ink-3: #555b6e;
  --line: #e6e8f0;
  --line-2: #d6d9e5;
  --card: #ffffff;

  --c-blue: #3b6bff;
  --c-violet: #8b5cf6;
  --c-pink: #ec4899;
  --c-orange: #f97316;
  --c-yellow: #facc15;
  --c-green: #10b981;
  --aurora: linear-gradient(100deg, #3b6bff 0%, #8b5cf6 22%, #ec4899 44%, #f97316 64%, #facc15 82%, #10b981 100%);
  --ink-gradient: linear-gradient(95deg, #2a4fe0 0%, #6d3be0 38%, #c0267a 72%, #b3400c 100%);

  --acc: #3b6bff;
  --acc-ink: #2446c9;
  --acc-soft: #eef2ff;

  --r-s: 10px; --r-m: 16px; --r-l: 22px; --r-xl: 32px;
  --shadow-1: 0 1px 2px rgba(18, 20, 28, .05), 0 4px 16px rgba(18, 20, 28, .05);
  --shadow-2: 0 2px 6px rgba(18, 20, 28, .06), 0 18px 48px rgba(40, 50, 120, .12);

  --f-ja: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic UI", "Meiryo", sans-serif;
  --f-en: "Space Grotesk", "Zen Kaku Gothic New", sans-serif;

  --wrap: 1200px;
  --top-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* 暗い色の組（端末の設定に合わせる。ボタンで切り替えたらそちらを優先） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d0f15; --bg-2: #141720; --bg-3: #1b1f2b; --card: #12151d;
    --ink: #eef0f6; --ink-2: #c6cbd8; --ink-3: #9ca3b5;
    --line: #262a37; --line-2: #343a4a;
    --acc: #7c9cff; --acc-ink: #a9bcff; --acc-soft: #1a2240;
    --ink-gradient: linear-gradient(95deg, #8fa8ff 0%, #b49bff 38%, #ff8ccb 72%, #ffb27a 100%);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 48px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d0f15; --bg-2: #141720; --bg-3: #1b1f2b; --card: #12151d;
  --ink: #eef0f6; --ink-2: #c6cbd8; --ink-3: #9ca3b5;
  --line: #262a37; --line-2: #343a4a;
  --acc: #7c9cff; --acc-ink: #a9bcff; --acc-soft: #1a2240;
  --ink-gradient: linear-gradient(95deg, #8fa8ff 0%, #b49bff 38%, #ff8ccb 72%, #ffb27a 100%);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .25);
  --shadow-2: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 48px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

/* ページ間の移動をなめらかに（対応ブラウザだけ。作品カードの絵が詳細ページの絵へつながる） */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .28s; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--top-h) + 24px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-ja);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: .02em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--acc-ink); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--c-violet) 28%, transparent); }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }

.en { font-family: var(--f-en); letter-spacing: .04em; }
.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--f-en); font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink-3);
}
.kicker::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--aurora); }
.grad-text { background: var(--ink-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- ボタン・札 */
.btn {
  --b: var(--ink); --t: var(--bg);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 1px solid var(--b);
  background: var(--b); color: var(--t); font-weight: 700; font-size: .95rem; line-height: 1.3;
  text-decoration: none; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-2); text-decoration: none; }
.btn.ghost { --b: var(--line-2); --t: var(--ink); background: var(--card); }
.btn.ghost:hover { border-color: var(--ink-3); }
.btn .arr { transition: transform .2s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn.small { min-height: 38px; padding: 6px 16px; font-size: .86rem; }

.chip {
  display: inline-flex; align-items: center; gap: .35em;
  padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: .76rem; font-weight: 700; color: var(--ink-2); background: var(--card); line-height: 1.7; white-space: nowrap;
}
.chip.status { border-color: transparent; background: var(--bg-3); }
.chip.status[data-s="live"] { background: #e8f7f0; color: #0a6b4b; }
.chip.status[data-s="sale"] { background: #fff4e6; color: #a2420c; }
.chip.status[data-s="dev"] { background: #eef2ff; color: #2c45b8; }
.chip.status[data-s="demo"] { background: #f4eeff; color: #5b2bc4; }
:root[data-theme="dark"] .chip.status[data-s="live"] { background: #10301f; color: #6ee7b7; }
:root[data-theme="dark"] .chip.status[data-s="sale"] { background: #3a220c; color: #fdba74; }
:root[data-theme="dark"] .chip.status[data-s="dev"] { background: #172045; color: #a5b8ff; }
:root[data-theme="dark"] .chip.status[data-s="demo"] { background: #2a1a4a; color: #c4b5fd; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .chip.status[data-s="live"] { background: #10301f; color: #6ee7b7; }
  :root:not([data-theme="light"]) .chip.status[data-s="sale"] { background: #3a220c; color: #fdba74; }
  :root:not([data-theme="light"]) .chip.status[data-s="dev"] { background: #172045; color: #a5b8ff; }
  :root:not([data-theme="light"]) .chip.status[data-s="demo"] { background: #2a1a4a; color: #c4b5fd; }
}
.tool {
  display: inline-flex; align-items: center; gap: .4em; padding: 1px 9px 1px 7px; border-radius: 6px;
  font-family: var(--f-en); font-size: .72rem; font-weight: 700; letter-spacing: .02em; color: var(--ink-2);
  background: var(--bg-2); border: 1px solid var(--line); white-space: nowrap;
}
.tool i { width: 7px; height: 7px; border-radius: 2px; background: var(--tc, var(--acc)); flex: none; }

/* ---------------------------------------------------------------- 上の帯 */
.top {
  position: sticky; top: 0; z-index: 40; height: var(--top-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--aurora); opacity: .55; }
.top .wrap { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 900; }
.brand .mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none; position: relative; overflow: hidden;
  background: conic-gradient(from 200deg, #3b6bff, #8b5cf6, #ec4899, #f97316, #facc15, #10b981, #3b6bff);
}
.brand .mark::after { content: ""; position: absolute; inset: 7px; border-radius: 4px; background: var(--bg); }
.brand b { font-family: var(--f-en); letter-spacing: .08em; font-size: .95rem; }
.brand small { display: block; font-size: .66rem; font-weight: 700; color: var(--ink-3); letter-spacing: .06em; line-height: 1.1; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a { padding: 6px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: .9rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--bg-2); color: var(--ink); }
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--ink-3); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.search-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink-3); cursor: pointer; font-size: .86rem; }
.search-btn kbd { font-family: var(--f-en); font-size: .7rem; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--ink-3); }
.search-btn svg { width: 16px; height: 16px; }
@media (max-width: 860px) {
  .nav a.hide-sm, .search-btn .lbl, .search-btn kbd { display: none; }
  .search-btn { width: 40px; padding: 0; justify-content: center; }
}
@media (max-width: 520px) { .brand small { display: none; } .nav { gap: 6px; } .nav a { display: none; } }
.brand b, .nav a { white-space: nowrap; }
.d-clip { margin-top: 8px; border-radius: var(--r-l); overflow: hidden; border: 1px solid var(--line); background: #000; }
.d-clip video { width: 100%; height: auto; display: block; }

/* ---------------------------------------------------------------- 最初の画面 */
.hero { position: relative; padding: clamp(36px, 6vw, 80px) 0 clamp(36px, 5vw, 64px); overflow: clip; }
.hero::before, .hero::after {
  content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none;
}
.hero::before { width: 520px; height: 520px; left: -160px; top: -200px; background: radial-gradient(circle, rgba(59, 107, 255, .45), transparent 65%); animation: float1 18s ease-in-out infinite alternate; }
.hero::after { width: 460px; height: 460px; right: -120px; top: 40px; background: radial-gradient(circle, rgba(236, 72, 153, .32), transparent 65%); animation: float2 22s ease-in-out infinite alternate; }
@keyframes float1 { to { transform: translate(80px, 60px) scale(1.1); } }
@keyframes float2 { to { transform: translate(-70px, 50px) scale(1.15); } }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 {
  margin: 18px 0 18px; font-weight: 900; line-height: 1.22; letter-spacing: .01em;
  font-size: clamp(2.1rem, 1.2rem + 3.1vw, 3.75rem);
}
.hero h1 .line { display: block; word-break: keep-all; overflow-wrap: anywhere; }
.hero .lead { margin: 0 0 26px; color: var(--ink-2); font-size: clamp(1rem, .95rem + .3vw, 1.12rem); max-width: 34em; }
.hero .acts { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .who { margin-top: 26px; display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: .86rem; }
.hero .who img { width: 44px; height: 44px; border-radius: 50%; background: var(--bg-2); object-fit: cover; }
.hero .who b { color: var(--ink); }

/* 作品の壁（ゆっくり流れる3列）。動きを減らす設定では止まる */
.wall {
  position: relative; height: clamp(420px, 56vw, 600px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.wall .col { display: flex; flex-direction: column; gap: 14px; animation: drift var(--d, 46s) linear infinite; will-change: transform; }
.wall .col:nth-child(2) { --d: 58s; animation-direction: reverse; margin-top: -40px; }
.wall .col:nth-child(3) { --d: 52s; }
.wall:hover .col { animation-play-state: paused; }
@keyframes drift { from { transform: translateY(0); } to { transform: translateY(-50%); } }
.tile {
  position: relative; display: block; border-radius: var(--r-m); overflow: hidden; background: var(--tile-bg, var(--bg-3));
  box-shadow: var(--shadow-1); aspect-ratio: var(--ar, 4 / 5); text-decoration: none; isolation: isolate;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile span {
  position: absolute; left: 8px; bottom: 8px; right: 8px; padding: 4px 9px; border-radius: 9px;
  background: rgba(13, 15, 21, .62); color: #fff; font-size: .72rem; font-weight: 700; line-height: 1.5;
  backdrop-filter: blur(6px); opacity: 0; transform: translateY(4px); transition: opacity .25s, transform .25s;
}
.tile:hover span, .tile:focus-visible span { opacity: 1; transform: none; }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .wall { height: auto; display: block; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%); overflow: hidden; }
  .wall .col { flex-direction: row; width: max-content; animation-name: drift-x; }
  .wall .col + .col { display: none; }
  .tile { width: 168px; flex: none; aspect-ratio: 4 / 5; }
  @keyframes drift-x { from { transform: translateX(0); } to { transform: translateX(-50%); } }
}

/* 数字の帯 */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--card); box-shadow: var(--shadow-1); overflow: hidden; }
.stat { padding: 20px 22px; position: relative; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font-family: var(--f-en); font-size: clamp(1.8rem, 1.3rem + 1.6vw, 2.6rem); line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.stat b small { font-family: var(--f-ja); font-size: .9rem; font-weight: 700; margin-left: .15em; color: var(--ink-2); }
.stat .lbl { display: block; margin-top: 6px; font-size: .82rem; color: var(--ink-3); font-weight: 700; }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------------------------------------------------------------- 節 */
.section { padding: clamp(56px, 8vw, 104px) 0; position: relative; }
.section.tint { background: var(--bg-2); }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 30px; }
.sec-head h2 { margin: 10px 0 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 900; line-height: 1.3; letter-spacing: .01em; }
.sec-head p { margin: 8px 0 0; color: var(--ink-2); max-width: 40em; }

/* 注目の作品（大きい3枚） */
.featured { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.feat { grid-column: span 4; }
.feat.big { grid-column: span 8; grid-row: span 2; }
@media (max-width: 960px) { .feat, .feat.big { grid-column: span 12; grid-row: auto; } }
.feat a.card { height: 100%; }
.feat.big .card .media { aspect-ratio: auto; flex: 1 1 auto; min-height: 340px; }
.feat.big .card .body { flex: none; }
@media (max-width: 960px) { .feat.big .card .media { aspect-ratio: 16 / 10; min-height: 0; flex: none; } }
.feat.big h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); }

/* 作品カード */
.card {
  display: flex; flex-direction: column; height: 100%; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-l); overflow: hidden; color: inherit; text-decoration: none; position: relative;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); border-color: var(--line-2); text-decoration: none; }
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0;
  background: var(--aurora); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); transition: opacity .35s;
}
.card:hover::before, .card:focus-visible::before { opacity: 1; }
.card .media { position: relative; aspect-ratio: 16 / 10; background: var(--tile-bg, var(--bg-3)); overflow: hidden; }
.card .media img, .card .media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease), opacity .4s; }
.card:hover .media img { transform: scale(1.04); }
.card .media video { opacity: 0; }
.card.playing .media video { opacity: 1; }
.card .media .play {
  position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px;
  border-radius: 999px; background: rgba(13, 15, 21, .66); color: #fff; font-size: .72rem; font-weight: 700; backdrop-filter: blur(6px);
}
.card .media .play svg { width: 12px; height: 12px; }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.card .cat { font-family: var(--f-en); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.card h3 { margin: 0; font-size: 1.12rem; line-height: 1.45; font-weight: 900; }
.card p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.75; }
.card .nums { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 2px; }
.card .nums div { display: flex; align-items: baseline; gap: 6px; }
.card .nums b { font-family: var(--f-en); font-size: 1.05rem; }
.card .nums span { font-size: .74rem; color: var(--ink-3); font-weight: 700; }
.card .tools { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; gap: 5px; }

/* 絞り込み */
.filters {
  position: sticky; top: var(--top-h); z-index: 30; padding: 12px 0; margin-bottom: 18px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.filters .row { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.filters .row::-webkit-scrollbar { display: none; }
.f-btn {
  flex: none; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); cursor: pointer; font-weight: 700; font-size: .88rem; color: var(--ink-2);
  transition: background .2s, color .2s, border-color .2s;
}
.f-btn small { font-family: var(--f-en); font-size: .74rem; color: var(--ink-3); }
.f-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.f-btn[aria-pressed="true"] small { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.f-sep { flex: none; width: 1px; height: 22px; background: var(--line-2); margin: 0 4px; }
.f-tool { height: 32px; padding: 0 11px; font-size: .78rem; font-family: var(--f-en); }
.f-tool i { width: 8px; height: 8px; border-radius: 2px; background: var(--tc); }
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink-3); font-size: .86rem; margin: 2px 2px 14px; }
.result-line button { border: 0; background: none; color: var(--acc-ink); font-weight: 700; cursor: pointer; padding: 4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.grid .card[hidden] { display: none; }
.empty { padding: 40px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line-2); border-radius: var(--r-l); }

/* ---------------------------------------------------------------- 作り方（AIのチーム） */
.how { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .how { grid-template-columns: minmax(0, 1fr); } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 18px 20px 18px 66px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--card); }
.steps li::before {
  content: counter(s, decimal-leading-zero); position: absolute; left: 18px; top: 17px; font-family: var(--f-en); font-weight: 700; font-size: 1.15rem;
  background: var(--ink-gradient); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.steps h3 { margin: 0 0 4px; font-size: 1.02rem; }
.steps p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.75; }
.team { position: relative; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--card); padding: 22px; box-shadow: var(--shadow-1); }
.team .center {
  margin: 0 auto 18px; width: max-content; max-width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 16px 10px 10px;
  border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line);
}
.team .center img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.team .center b { display: block; font-size: .95rem; }
.team .center span { display: block; font-size: .78rem; color: var(--ink-3); }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .team-grid { grid-template-columns: minmax(0, 1fr); } }
.member {
  text-align: left; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 14px; border-radius: var(--r-m);
  border: 1px solid var(--line); background: var(--card); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.member:hover { border-color: var(--tc); transform: translateY(-2px); }
.member[aria-pressed="true"] { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 9%, var(--card)); }
.member i { grid-row: span 2; width: 12px; height: 12px; border-radius: 4px; background: var(--tc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--tc) 18%, transparent); }
.member b { font-family: var(--f-en); font-size: .92rem; }
.member span { grid-column: 2; font-size: .78rem; color: var(--ink-3); line-height: 1.5; }
.member em { grid-row: span 2; grid-column: 3; font-style: normal; font-family: var(--f-en); font-size: .8rem; font-weight: 700; color: var(--ink-3); }
.team-note { margin: 14px 2px 0; font-size: .8rem; color: var(--ink-3); }

/* 数字で見る制作（実測） */
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 30px; }
@media (max-width: 860px) { .proof { grid-template-columns: minmax(0, 1fr); } }
.proof div { padding: 20px 22px; border-radius: var(--r-l); border: 1px solid var(--line); background: var(--card); }
.proof b { display: block; font-family: var(--f-en); font-size: 2rem; line-height: 1.15; }
.proof b small { font-family: var(--f-ja); font-size: .95rem; margin-left: .15em; }
.proof span { display: block; margin-top: 6px; font-weight: 700; }
.proof p { margin: 6px 0 0; color: var(--ink-3); font-size: .84rem; line-height: 1.7; }

/* ---------------------------------------------------------------- プロフィール・連絡 */
.profile { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
@media (max-width: 760px) { .profile { grid-template-columns: minmax(0, 1fr); } }
.profile figure { margin: 0; position: relative; border-radius: var(--r-xl); background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--c-violet) 18%, transparent), transparent 70%), var(--bg-2); border: 1px solid var(--line); padding: 18px 18px 0; max-width: 300px; }
.profile figure img { width: 100%; height: auto; }
.profile h3 { margin: 0; font-size: 1.5rem; font-weight: 900; }
.profile .role { margin: 4px 0 14px; color: var(--ink-3); font-weight: 700; font-size: .9rem; }
.profile ul.facts { margin: 0 0 16px; padding: 0; list-style: none; display: grid; gap: 6px; }
.profile ul.facts li { padding-left: 18px; position: relative; color: var(--ink-2); }
.profile ul.facts li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 7px; height: 7px; border-radius: 2px; background: var(--aurora); }
.links { display: flex; flex-wrap: wrap; gap: 8px; }
.contact {
  position: relative; border-radius: var(--r-xl); padding: clamp(28px, 4vw, 48px); overflow: hidden; color: #fff;
  background: radial-gradient(circle at 15% 20%, rgba(59, 107, 255, .55), transparent 45%), radial-gradient(circle at 90% 80%, rgba(236, 72, 153, .45), transparent 50%), #12141c;
}
.contact h2 { margin: 8px 0 10px; font-size: clamp(1.5rem, 1.1rem + 1.5vw, 2.2rem); font-weight: 900; line-height: 1.35; }
.contact p { margin: 0 0 22px; color: rgba(255, 255, 255, .82); max-width: 40em; }
.contact .kicker { color: rgba(255, 255, 255, .72); }
.contact .btn { --b: #fff; --t: #12141c; }
.contact .btn.ghost { --b: rgba(255, 255, 255, .35); --t: #fff; background: transparent; }

/* ---------------------------------------------------------------- 下の帯・重さのメーター */
.foot { padding: 40px 0 56px; color: var(--ink-3); font-size: .84rem; border-top: 1px solid var(--line); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: center; justify-content: space-between; }
.foot a { color: var(--ink-2); }
.meter { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: .78rem; color: var(--ink-2); }
.meter .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-green) 22%, transparent); }
.meter b { font-family: var(--f-en); }

/* ---------------------------------------------------------------- 詳細ページ */
.crumb { margin: 22px 0 0; font-size: .82rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 6px; }
.crumb a { color: var(--ink-3); text-decoration: none; }
.crumb a:hover { color: var(--ink); text-decoration: underline; }
.d-head { padding: 18px 0 26px; display: grid; gap: 12px; }
.d-head h1 { margin: 0; font-size: clamp(2rem, 1.3rem + 2.8vw, 3.4rem); line-height: 1.2; font-weight: 900; }
.d-head .one { margin: 0; font-size: clamp(1.02rem, .95rem + .35vw, 1.2rem); color: var(--ink-2); max-width: 44em; }
.d-head .acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.d-media { border-radius: var(--r-xl); overflow: hidden; background: var(--tile-bg, var(--bg-3)); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.d-media img, .d-media video { width: 100%; height: auto; }
.d-body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(28px, 4vw, 56px); padding: clamp(36px, 5vw, 64px) 0; align-items: start; }
@media (max-width: 960px) { .d-body { grid-template-columns: minmax(0, 1fr); } }
.prose h2 { font-size: 1.3rem; font-weight: 900; margin: 40px 0 12px; line-height: 1.45; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; color: var(--ink-2); }
.prose ul.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.prose ul.points li { position: relative; padding: 14px 16px 14px 46px; border-radius: var(--r-m); background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-2); line-height: 1.75; }
.prose ul.points li::before { content: ""; position: absolute; left: 16px; top: 19px; width: 16px; height: 16px; border-radius: 5px; background: var(--aurora); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); display: grid; gap: 18px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -29px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--c-violet); }
.timeline time { font-family: var(--f-en); font-size: .78rem; font-weight: 700; color: var(--ink-3); letter-spacing: .04em; }
.timeline h3 { margin: 2px 0 4px; font-size: 1rem; }
.timeline p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.75; }
.timeline blockquote { margin: 8px 0 0; padding: 8px 12px; border-left: 3px solid var(--line-2); color: var(--ink-3); font-size: .86rem; background: var(--bg-2); border-radius: 0 8px 8px 0; }
.side { position: sticky; top: calc(var(--top-h) + 20px); display: grid; gap: 14px; }
@media (max-width: 960px) { .side { position: static; } }
.box { border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 18px 16px; background: var(--card); }
.box h2 { margin: 0 0 12px; font-family: var(--f-en); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.box dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: .88rem; }
.box dt { color: var(--ink-3); font-weight: 700; }
.box dd { margin: 0; }
.box .nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.box .nums b { display: block; font-family: var(--f-en); font-size: 1.35rem; line-height: 1.2; }
.box .nums span { font-size: .76rem; color: var(--ink-3); font-weight: 700; }
.box .tools { display: flex; flex-wrap: wrap; gap: 6px; }
.box .links { display: grid; gap: 8px; }
.box .links .btn { width: 100%; justify-content: space-between; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; margin-top: 8px; }
.gallery button { padding: 0; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; cursor: zoom-in; background: var(--tile-bg, var(--bg-3)); aspect-ratio: 16 / 10; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery button:hover img { transform: scale(1.04); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: clamp(40px, 6vw, 72px); }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-l); text-decoration: none; color: inherit; background: var(--card); transition: border-color .2s, transform .2s var(--ease); }
.pager a:hover { border-color: var(--ink-3); transform: translateY(-2px); }
.pager small { display: block; color: var(--ink-3); font-size: .76rem; font-weight: 700; }
.pager b { display: block; margin-top: 2px; }
.pager .next { text-align: right; grid-column: 2; }

/* 拡大表示と検索（dialog） */
dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(8, 10, 16, .72); backdrop-filter: blur(4px); }
.lightbox { width: min(96vw, 1400px); }
.lightbox img { width: 100%; max-height: 86vh; object-fit: contain; border-radius: var(--r-m); background: #000; }
.lightbox .close { position: fixed; top: 16px; right: 16px; }
.palette { width: min(94vw, 620px); margin-top: 10vh; border-radius: var(--r-l); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-2); overflow: hidden; }
.palette .q { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.palette .q svg { width: 18px; height: 18px; color: var(--ink-3); flex: none; }
.palette input { flex: 1; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.02rem; color: var(--ink); }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 56vh; overflow: auto; }
.palette li a { display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; color: inherit; text-decoration: none; }
.palette li a[aria-selected="true"], .palette li a:hover { background: var(--bg-2); }
.palette li img { width: 52px; height: 38px; border-radius: 8px; object-fit: cover; background: var(--bg-3); }
.palette li b { display: block; font-size: .95rem; }
.palette li span { display: block; font-size: .78rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette .hint { padding: 10px 16px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--ink-3); display: flex; gap: 14px; }

/* 現れる動き（対応ブラウザだけ。未対応ではそのまま見える） */
/* 現れる動き：JS が動くときだけ隠してから見せる（JS なし・印刷・検索では最初から見える） */
.js-rv .rv:not(.in) { opacity: 0; transform: translateY(22px); }
.js-rv .rv { transition: opacity .6s var(--ease), transform .6s var(--ease); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .wall .col { transform: none !important; }
  @view-transition { navigation: none; }
}
@media print {
  .top, .filters, .wall, .foot .meter, .contact .acts { display: none; }
  .card { break-inside: avoid; }
}
