/* JM Soft Pleasant Team — 共通スタイル（案B：スタジオ・クリーン）
   ロゴの「青い帯」と細いジオメトリック書体を軸にした、白地のライトテーマ1本構成。
   ロゴ画像が白地のため、あえてダークテーマは用意しない。 */

:root {
  --ink: #10182b;        /* 本文・見出し */
  --ink-soft: #4d5870;   /* 補足テキスト */
  --paper: #ffffff;      /* 地 */
  --mist: #f2f5fa;       /* 帯状セクションの地（青寄りのグレー） */
  --line: #e1e6ef;       /* 罫線 */
  --blue: #0a4fd1;       /* JM ブルー（ロゴの帯） */
  --blue-deep: #0837a0;  /* ホバー */
  --sky: #3f8cff;        /* ロゴ左パネルの明るい青 */
  --todo: #b45309;       /* 未確定の差し替え箇所 */
  --night: #0b1326;      /* プロフィールの帯（X のヘッダー画像の夜景） */
  --amber: #f2b33d;      /* 同・強調の黄色（端末の文字色） */
  /* ブログの分類の色 */
  --cat-info: #0a4fd1;   /* お知らせ（JM ブルー） */
  --cat-pm: #e0457b;     /* P麻雀（ポップなピンク） */
  --cat-zg: #13806b;     /* ZAGBIS（樹海の緑） */
  --cat-dev: #b45309;    /* 制作の裏側 */
  --cat-cc: #c96442;     /* Claude Code */
  --cat-md: #6d4bd8;     /* MD Pro */
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --latin: "Josefin Sans", "Futura", "Avenir Next", "Segoe UI", sans-serif;
  --jp: "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Meiryo", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--jp);
  font-size: 16px;
  line-height: 1.85;
  font-feature-settings: "palt" 0;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }

:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

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

h1, h2, h3 { line-height: 1.35; text-wrap: balance; margin: 0; font-weight: 700; }
p { margin: 0; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; font-family: var(--latin); }
.brand-text small { font-size: 11px; letter-spacing: .2em; font-weight: 600; }
.brand-text span { font-size: 17px; letter-spacing: .12em; font-weight: 300; }

.site-nav ul { display: flex; gap: clamp(14px, 3vw, 32px); list-style: none; margin: 0; padding: 0; }
.site-nav a { white-space: nowrap; color: var(--ink); text-decoration: none; font-size: 14.5px; font-weight: 500; padding-block: 6px; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: var(--blue); color: var(--ink); }

@media (max-width: 560px) {
  .brand-text span { font-size: 14px; }
  .site-nav a { font-size: 13.5px; }
  .site-nav ul { gap: 14px; }
}
/* タブが 5 つになったので、狭い画面ではロゴの下に 1 段で並べ、はみ出すぶんは横にスクロール */
@media (max-width: 720px) {
  .site-header .wrap { flex-wrap: wrap; row-gap: 0; min-height: 0; padding-block: 8px 0; }
  .site-nav { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav ul { gap: 20px; padding-block: 6px 8px; }
}

/* ---------- 青い帯（ロゴ由来のシグネチャー） ---------- */
.bar-title { display: flex; align-items: center; gap: 16px; font-size: clamp(20px, 2.4vw, 26px); }
.bar-title::before { content: ""; flex: 0 0 auto; width: 56px; height: 8px; background: var(--blue); }

.section { padding-block: clamp(56px, 8vw, 96px); }
.section--mist { background: var(--mist); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.section-head p { color: var(--ink-soft); max-width: 38em; }

/* ---------- トップ：ヒーロー ---------- */
.hero { padding-block: clamp(48px, 7vw, 88px) clamp(32px, 5vw, 56px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 40px; align-items: end; }
.hero-team { display: flex; align-items: center; gap: 18px; font-family: var(--latin); font-size: 13px; letter-spacing: .24em; font-weight: 600; }
.hero-team::before { content: ""; width: 96px; height: 10px; background: var(--blue); }
.hero h1 { margin-top: 22px; font-size: clamp(30px, 5.2vw, 58px); font-weight: 700; letter-spacing: .02em; line-height: 1.25; }
.hero-lead { margin-top: 20px; color: var(--ink-soft); max-width: 30em; font-size: 17px; }
@media (max-width: 720px) { .hero-grid { grid-template-columns: 1fr; } }

/* ロゴ：JS が動くときは、ロゴの色を拾った光の粒で組み立てる（js/top-motion.js） */
.logo-stage { position: relative; aspect-ratio: 2 / 1; width: clamp(240px, 30vw, 380px); max-width: 100%; }
.hero-grid:has(.logo-stage) h1 { font-size: clamp(30px, 4.4vw, 50px); }
.logo-stage img, .logo-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.logo-stage canvas { display: none; }
.motion .logo-stage canvas { display: block; }
.motion .logo-stage.is-drawn img { opacity: 0; }
/* 粒が集まりきったら本物のロゴに切り替える（粒のままだと細い文字が途切れて読めないため） */
.logo-stage img, .logo-stage canvas { transition: opacity .6s ease; }
.motion .logo-stage.is-drawn.is-settled img { opacity: 1; }
.motion .logo-stage.is-settled canvas { opacity: 0; }

/* ---------- トップ：発売告知（オープニングムービーの背景） ---------- */
.show { background: var(--mist); }
.show-pin { padding-block: clamp(56px, 8vw, 96px); }
.release-date { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 20px; }
.release-date strong { font-family: var(--latin); font-weight: 300; font-size: clamp(34px, 5vw, 52px); letter-spacing: .06em; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
.release-date span { font-weight: 700; }
.release-date em { font-style: normal; color: var(--ink-soft); font-size: 14px; }
.release-date .countdown { font-family: var(--latin); font-weight: 400; font-size: 14px; letter-spacing: .08em; color: var(--blue); }

.show-frame { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .show-frame { grid-template-columns: 1fr; } }
.stage { position: relative; overflow: hidden; border-radius: 4px; aspect-ratio: 16 / 10; color: #fff; isolation: isolate; background: #10182b; }
.stage-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: translateX(var(--bx, 0)) scale(var(--bs, 1)); transform-origin: 50% 40%; }
.stage::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8, 20, 50, .1) 30%, rgba(8, 20, 50, .82) 100%); }
.stage-logo { position: absolute; left: 50%; top: 40%; width: 62%; max-width: 560px; transform: translate(-50%, -50%) translateY(var(--ly, 0px)) scale(var(--ls, 1)); filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .3)); pointer-events: none; }
.stage-meta { position: absolute; left: 20px; right: 20px; bottom: 16px; display: flex; justify-content: space-between; align-items: end; gap: 12px; flex-wrap: wrap; }
/* 作品名のリンクは面全体に広げ、どこを押しても作品ページへ */
.stage-link { color: #fff; text-decoration: none; display: flex; flex-direction: column; line-height: 1.5; }
.stage-link::before { content: ""; position: absolute; inset: 0; z-index: 0; }
.stage-link b { font-size: 18px; }
.stage-link span { font-size: 13px; opacity: .92; }
.stage-link:hover, .movie-btn:hover { color: #fff; }
.movie-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 16px 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .55); color: #fff; font-size: 13.5px; font-weight: 700; text-decoration: none; backdrop-filter: blur(6px); }
.movie-btn::before { content: ""; width: 0; height: 0; border-block: 6px solid transparent; border-left: 10px solid currentColor; margin-left: 4px; }
.movie-btn:hover { background: rgba(255, 255, 255, .28); }
.show-progress { display: none; }
@media (max-width: 560px) {
  .stage-logo { top: 36%; width: 54%; }
  .stage-meta { left: 14px; right: 14px; bottom: 12px; }
  .stage-link span { display: none; }
}

/* スクロール中に固定して P麻雀 → ZAGBIS へ切り替える（JS が .pin を付けたときだけ） */
.pin .show { height: 300vh; }
.pin .show-pin { position: sticky; top: 68px; height: calc(100vh - 68px); display: flex; flex-direction: column; padding-block: 28px 24px; }
.pin .show-frame { position: relative; display: block; flex: 1; min-height: 0; }
.pin .stage { position: absolute; inset: 0; aspect-ratio: auto; }
.pin .stage--zg { clip-path: inset(0 0 0 var(--clip, 100%)); }
.pin .stage-logo { width: min(44%, 520px); }
/* 幕が開くにつれて P麻雀の文字とロゴを消し、ZAGBIS と重ならないようにする */
.pin .stage--pm .stage-logo, .pin .stage--pm .stage-meta { opacity: var(--fade, 1); }
.pin .stage-meta { left: 28px; right: 28px; bottom: 22px; }
.pin .stage-link b { font-size: 22px; }
.pin .show-progress { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.show-progress span { flex: 1; height: 3px; background: var(--line); position: relative; overflow: hidden; }
.show-progress span::after { content: ""; position: absolute; inset: 0; background: var(--blue); transform: scaleX(var(--p, 0)); transform-origin: left; }
.show-progress small { font-family: var(--latin); font-size: 12px; letter-spacing: .12em; color: var(--ink-soft); white-space: nowrap; }

/* オープニング本編の再生窓 */
.movie-dialog { width: min(1100px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 6px; background: #000; overflow: visible; }
.movie-dialog::backdrop { background: rgba(8, 14, 30, .82); }
.movie-dialog video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; }
.movie-dialog form { position: absolute; right: 0; top: -48px; }
.movie-close { width: 40px; height: 40px; border: 0; border-radius: 50%; background: #fff; color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }

/* ---------- トップ：流れる帯（スクロールが速いほど速く流れる） ---------- */
.ticker { background: var(--blue); color: #fff; overflow: hidden; padding-block: 16px; }
.ticker-track { display: flex; width: max-content; font-family: var(--latin); font-weight: 300; font-size: clamp(26px, 4.4vw, 52px); letter-spacing: .12em; white-space: nowrap; line-height: 1.2; }
.ticker-track span { padding-right: .9em; }
.ticker-track b { font-weight: 600; }

/* ---------- 作品一覧（カタログ表） ---------- */
.catalog { border-top: 2px solid var(--ink); }
.catalog-group + .catalog-group { margin-top: 44px; }
.catalog-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.catalog-head small { color: var(--ink-soft); font-size: 13px; font-weight: 500; }
.catalog-head .tag { font-family: var(--latin); letter-spacing: .1em; font-size: 12px; font-weight: 600; padding: 3px 10px 1px; border: 1px solid var(--ink); border-radius: 999px; color: var(--ink); }
.catalog-head .tag--free { border-color: var(--blue); background: var(--blue); color: #fff; }
.work-row { display: grid; grid-template-columns: 64px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 10em; gap: 20px; align-items: center; padding-block: 18px; border-bottom: 1px solid var(--line); }
.work-row img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; }
.work-name a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 18px; }
.work-name a:hover { color: var(--blue); }
.work-name p { color: var(--ink-soft); font-size: 14px; line-height: 1.6; margin-top: 2px; }
.work-cell { font-size: 14px; }
.work-cell small { display: block; color: var(--ink-soft); font-size: 12px; }
.work-row .price { font-family: var(--latin); letter-spacing: .08em; font-size: 13px; font-weight: 600; }
@media (max-width: 760px) {
  .work-row { grid-template-columns: 56px minmax(0, 1fr); row-gap: 8px; }
  .work-row img { width: 56px; height: 56px; }
  .work-row .work-cell, .work-row .work-action { grid-column: 2; }
}

.mark-icon { width: 64px; height: 64px; border-radius: 14px; display: grid; place-items: center; }

/* ---------- ボタン ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 20px; border: 1.5px solid var(--blue); border-radius: 2px; color: var(--blue); background: var(--paper); text-decoration: none; font-weight: 700; font-size: 14.5px; line-height: 1.3; white-space: nowrap; }
.btn:hover { background: var(--blue); color: #fff; }
.btn--fill { background: var(--blue); color: #fff; }
.btn--fill:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn[aria-disabled="true"] { border-color: var(--line); color: var(--ink-soft); background: var(--mist); pointer-events: none; }

/* ---------- ダウンロード表 ---------- */
.dl { border-top: 2px solid var(--ink); }
.dl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding-block: 16px; border-bottom: 1px solid var(--line); }
.dl-os { font-weight: 700; font-size: 16px; }
.dl-os small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 13px; }
.dl-meta { font-variant-numeric: tabular-nums; }
.dl-note { margin-top: 10px; font-size: 13px; color: var(--ink-soft); }

/* ---------- 作品詳細ページ ---------- */
.back { display: inline-block; margin-top: 28px; font-size: 14px; text-decoration: none; }
.work-hero { padding-block: 20px 0; }
.work-kv { border-radius: 4px; overflow: hidden; background: var(--mist); position: relative; aspect-ratio: 21 / 9; }
.work-kv > img { width: 100%; height: 100%; object-fit: cover; }
.work-kv .kv-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(54%, 560px); height: auto; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .22)); }
@media (max-width: 640px) { .work-kv { aspect-ratio: 4 / 3; } .work-kv .kv-logo { width: 78%; } }

.work-intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr); gap: clamp(28px, 5vw, 64px); padding-block: 44px 8px; }
@media (max-width: 820px) { .work-intro { grid-template-columns: 1fr; } }
.work-intro h1 { font-size: clamp(30px, 4.4vw, 46px); letter-spacing: .02em; }
.work-intro h1 small { display: block; font-family: var(--latin); font-weight: 300; font-size: 15px; letter-spacing: .24em; color: var(--ink-soft); margin-top: 6px; }
.work-intro .lead { margin-top: 20px; font-size: 17px; max-width: 40em; }
.work-intro .lead + p { margin-top: 14px; color: var(--ink-soft); max-width: 40em; }

.facts { border-top: 2px solid var(--ink); margin: 0; }
.facts div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding-block: 12px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.facts dt { color: var(--ink-soft); }
.facts dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; }

.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px 40px; }
.point h3 { font-size: 18px; padding-top: 14px; border-top: 3px solid var(--blue); }
.point p { margin-top: 8px; color: var(--ink-soft); font-size: 15px; }

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.shots figure { margin: 0; }
.shots img { border-radius: 4px; border: 1px solid var(--line); width: 100%; }
.shots figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
@media (max-width: 640px) { .shots { grid-template-columns: 1fr; } }

.cast { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 12px; }
@media (max-width: 720px) { .cast { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.cast figure { margin: 0; }
.cast .portrait { background: var(--c, var(--mist)); border-radius: 4px; aspect-ratio: 3 / 4; overflow: hidden; display: flex; align-items: flex-end; justify-content: center; }
.cast .portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.cast figcaption { margin-top: 8px; font-size: 14px; line-height: 1.5; }
.cast figcaption b { display: block; }
.cast figcaption span { color: var(--ink-soft); font-size: 13px; }

.notice { border-left: 4px solid var(--blue); background: var(--mist); padding: 14px 18px; font-size: 14.5px; }

/* ---------- 文書ページ（プロフィール・サポート・プライバシー） ---------- */
.doc { max-width: 760px; }
.doc-head { padding-block: clamp(40px, 6vw, 72px) 24px; }
.doc-head h1 { font-size: clamp(28px, 4vw, 40px); }
.doc-head p { margin-top: 14px; color: var(--ink-soft); }
.doc h2 { font-size: 20px; margin-top: 44px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 16.5px; margin-top: 24px; }
.doc p, .doc ul, .doc ol, .doc dl { margin-top: 12px; }
.doc ul, .doc ol { padding-left: 1.4em; }
.doc li + li { margin-top: 4px; }
.lang-switch { display: flex; gap: 8px; margin-top: 18px; }
.lang-switch a { font-size: 13px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 2px; text-decoration: none; }
.lang-switch a:hover { border-color: var(--blue); }
.doc section[lang="en"] h1, .doc section[lang="en"] h2 { font-family: var(--latin); letter-spacing: .01em; }
.doc section[lang="en"] { margin-top: 72px; padding-top: 8px; border-top: 2px solid var(--ink); }
.meta-line { font-size: 13.5px; color: var(--ink-soft); }

.contact-card { display: grid; gap: 6px; padding: 22px 24px; border: 1px solid var(--line); border-left: 6px solid var(--blue); margin-top: 20px; }
.contact-card .addr { font-family: var(--latin); font-size: 20px; letter-spacing: .03em; word-break: break-all; }

/* 公開前に差し替える箇所 */
.todo { color: var(--todo); }

.profile { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 12px; }
@media (max-width: 600px) { .profile { grid-template-columns: 1fr; } }
.profile img { width: 180px; }

/* ---------- ニュース ---------- */
.news-list { border-top: 2px solid var(--ink); margin-top: 8px; }
.news-item { padding-block: 24px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.news-meta { display: flex; align-items: center; gap: 12px; margin: 0; }
.news-meta time { font-family: var(--latin); font-size: 15px; letter-spacing: .06em; color: var(--blue); font-variant-numeric: tabular-nums; }
.news-tag { font-size: 12px; padding: 0 10px; border: 1px solid var(--blue); border-radius: 2px; color: var(--blue); line-height: 1.8; }
.doc .news-item h2 { margin-top: 8px; padding-top: 0; border-top: 0; font-size: 20px; }

/* トップ：ヒーロー下の新着情報（ニュースとブログを新しい順に） */
.whatsnew { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 28px; align-items: start; margin-top: clamp(28px, 4vw, 44px); padding: 16px 20px; border: 1px solid var(--line); border-left: 6px solid var(--blue); }
.whatsnew h2 { font-family: var(--jp); font-size: 15px; line-height: 1.9; white-space: nowrap; }
.whatsnew ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.whatsnew li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; font-size: 14.5px; line-height: 1.7; }
.whatsnew time { font-family: var(--latin); letter-spacing: .06em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.whatsnew li a { color: var(--ink); font-weight: 700; text-decoration: none; }
.whatsnew li a:hover { color: var(--blue); text-decoration: underline; }
.kind { font-size: 11.5px; padding: 0 8px; border-radius: 2px; line-height: 1.8; border: 1px solid currentColor; }
.kind--news { color: var(--blue); }
.kind--blog { color: var(--ink-soft); }
.is-new::after { content: "NEW"; margin-left: 8px; padding: 0 6px; border-radius: 2px; background: var(--blue); color: #fff; font-family: var(--latin); font-size: 10.5px; font-weight: 600; letter-spacing: .1em; vertical-align: 2px; }
.whatsnew-more { display: flex; gap: 16px; font-size: 13.5px; white-space: nowrap; line-height: 1.9; }
@media (max-width: 720px) {
  .whatsnew { grid-template-columns: 1fr; padding: 14px 16px; }
  .whatsnew-more { justify-content: flex-end; }
}

/* ---------- プロフィールカード（X のヘッダー画像の雰囲気を帯で再現） ---------- */
.pcard { border: 1px solid var(--line); border-radius: 4px; overflow: hidden; background: var(--paper); margin-top: 8px; }
.pcard-banner { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 28px; align-items: end; padding: 22px 26px; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 3px), radial-gradient(120% 140% at 85% 0%, #1d3a7a 0%, var(--night) 60%); color: #c9d4ea; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; letter-spacing: .04em; }
.pcard-banner p { margin: 0; }
.pcard-banner b { color: var(--amber); font-weight: 400; }
.pcard-term { grid-row: span 2; }
.pcard-rides { border: 1px solid rgba(201, 212, 234, .45); padding: 2px 10px; justify-self: start; }
.pcard-body { padding: 22px 26px 26px; display: grid; gap: 12px; }
/* X と同じく、丸いアイコンを帯に半分重ねる（帯の下側はアイコンのぶん空けておく） */
.pcard:has(.pcard-avatar) .pcard-banner { padding-bottom: 60px; }
.pcard-avatar { position: relative; width: 104px; height: 104px; margin-top: -78px; border-radius: 50%; border: 4px solid var(--paper); box-shadow: 0 6px 18px rgba(11, 19, 38, .25); background: var(--paper); }
.pcard-body h2, .pcard-name { margin: 0; padding: 0; border: 0; font-size: 24px; font-weight: 700; }
.pcard-body h2 small, .pcard-name small { font-family: var(--latin); font-weight: 400; font-size: 15px; color: var(--ink-soft); margin-left: 6px; letter-spacing: .04em; }
.pcard-body > p { margin: 0; max-width: 60ch; }
.pcard-facts { margin: 4px 0 0; border-top: 1px solid var(--line); }
.pcard-facts div { display: grid; grid-template-columns: 7em minmax(0, 1fr); gap: 12px; padding-block: 9px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.pcard-facts dt { color: var(--ink-soft); }
.pcard-facts dd { margin: 0; }
.pcard-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
@media (max-width: 600px) {
  .pcard-banner { grid-template-columns: 1fr; padding: 18px; font-size: 11.5px; }
  .pcard-term { grid-row: auto; }
  .pcard-body { padding: 18px; }
  .pcard:has(.pcard-avatar) .pcard-banner { padding-bottom: 50px; }
  .pcard-avatar { width: 84px; height: 84px; margin-top: -60px; }
}

/* ---------- フッター ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 48px calc(40px + env(safe-area-inset-bottom, 0px)); margin-top: 24px; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand img { width: 200px; }
.footer-brand p { margin-top: 12px; color: var(--ink-soft); }
.site-footer h2 { font-size: 13px; color: var(--ink-soft); font-weight: 500; margin-bottom: 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { color: var(--blue); text-decoration: underline; }
.copyright { margin-top: 36px; color: var(--ink-soft); font-family: var(--latin); letter-spacing: .06em; font-size: 12.5px; }
.visit-counter { margin-left: 1.5em; font-family: var(--jp); font-size: 11.5px; letter-spacing: 0; opacity: .8; }

/* ---------- トップ：一覧の出現（JS が .motion を付けたときだけ） ---------- */
.motion .catalog .work-row { transform: translateY(22px); transition: transform .7s cubic-bezier(.2, .7, .2, 1) var(--d, 0s), background-size .45s ease; }
.motion .catalog .work-row.in { transform: none; }
.motion #works .bar-title::before { width: 0; transition: width .9s cubic-bezier(.2, .7, .2, 1); }
.motion #works .bar-title.in::before { width: 56px; }
.catalog .work-row { background: linear-gradient(90deg, var(--mist), var(--mist)) no-repeat 0 0 / 0% 100%; }
.catalog .work-row:hover { background-size: 100% 100%; }
.catalog .work-row img { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.catalog .work-row:hover img { transform: rotate(-6deg) scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 一覧のボタンは列幅いっぱいにそろえる */
.work-action .btn { width: 100%; }
@media (max-width: 760px) { .work-action .btn { width: auto; } }

/* ---------- ブログ（記事は tools/build-blog.py が posts/ から組み立てる） ---------- */
.doc--wide { max-width: none; }
.cat { font-size: 12px; padding: 0 10px; border-radius: 999px; color: #fff; background: var(--c, var(--cat-info)); line-height: 1.9; font-weight: 700; white-space: nowrap; }
.cat--info { --c: var(--cat-info); } .cat--pm { --c: var(--cat-pm); } .cat--zg { --c: var(--cat-zg); }
.cat--dev { --c: var(--cat-dev); } .cat--cc { --c: var(--cat-cc); } .cat--md { --c: var(--cat-md); }
.post-meta { display: flex; align-items: center; gap: 10px; margin: 0; }
.post-meta time { font-family: var(--latin); font-size: 14.5px; letter-spacing: .06em; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* 一覧：カード */
.post-list, .doc .post-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px 24px; }
.post-card a { display: grid; gap: 10px; color: var(--ink); text-decoration: none; }
.post-card-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; background: var(--mist); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.post-card a:hover .post-card-img img { transform: scale(1.05); }
.post-card b { font-size: 17.5px; line-height: 1.55; }
.post-card a:hover b { color: var(--blue); }
.post-card-lead { font-size: 14px; color: var(--ink-soft); line-height: 1.75; }
.post-list li:first-child { grid-column: 1 / -1; }
@media (min-width: 760px) {
  .post-list li:first-child a { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 28px; align-items: start; }
  .post-list li:first-child .post-card-img { grid-row: 1 / 4; }
  .post-list li:first-child b { font-size: 24px; }
}

/* 記事 */
.post { max-width: 760px; margin-inline: auto; }
.post-head { padding-block: clamp(32px, 5vw, 60px) 20px; }
.post-head h1 { margin-top: 12px; font-size: clamp(24px, 4.2vw, 36px); line-height: 1.45; }
.post-lead { margin-top: 14px; color: var(--ink-soft); font-size: 16.5px; }
.post-cover { margin: 0 calc(var(--gutter) * -1); }
@media (min-width: 840px) { .post-cover { margin-inline: -40px; } }
.post-cover img { width: 100%; border-radius: 0; }
@media (min-width: 840px) { .post-cover img { border-radius: 8px; } }
.post-body { font-size: 16.5px; line-height: 1.95; }
.post-body > * + * { margin-top: 18px; }
.post-body h2 { margin-top: 52px; font-size: clamp(20px, 3vw, 24px); line-height: 1.5; padding-left: 14px; border-left: 6px solid var(--blue); }
.post-body h3 { margin-top: 32px; font-size: 18px; }
.post-body ul, .post-body ol { padding-left: 1.4em; }
.post-body li + li { margin-top: 6px; }
.post-body figure { margin-inline: 0; }
.post-body figure img, .post-body video { width: 100%; border-radius: 6px; background: var(--mist); display: block; }
.post-body figcaption { margin-top: 8px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }
.post-body .wide { margin-inline: calc(var(--gutter) * -1); }
@media (min-width: 840px) { .post-body .wide { margin-inline: -40px; } }
.post-body code { font-family: var(--mono); font-size: .88em; background: var(--mist); padding: 1px 6px; border-radius: 3px; }
.post-body pre { background: var(--night); color: #dfe6f5; padding: 16px 18px; border-radius: 6px; overflow-x: auto; font-size: 13.5px; line-height: 1.7; }
.post-body pre code { background: none; padding: 0; color: inherit; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.post-body th, .post-body td { border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.post-body th { background: var(--mist); font-weight: 700; }
.table-scroll { overflow-x: auto; }

/* 並べる写真（スマホでは 2 列） */
.gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 10px; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: var(--ratio, auto); object-fit: cover; }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gallery--2 { --cols: 2; } .gallery--4 { --cols: 4; }
/* 縦長の画面（スマホのスクリーンショット）は細めに並べる */
.gallery--phone { --cols: 3; max-width: 640px; }
.gallery--phone img { border-radius: 14px; box-shadow: 0 6px 20px rgba(16, 24, 43, .14); }

/* キャラクター・項目の紹介カード（絵と文を横に） */
.chara { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px; border-radius: 10px; background: color-mix(in srgb, var(--c, var(--mist)) 14%, #fff); border: 1px solid color-mix(in srgb, var(--c, var(--line)) 35%, #fff); }
.chara img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 8px; background: #fff; }
.chara h3 { margin: 0; font-size: 20px; }
.chara h3 small { font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-left: 8px; }
.chara p { margin: 8px 0 0; font-size: 15px; line-height: 1.8; }
.chara .say { margin-top: 10px; padding: 8px 14px; background: #fff; border-radius: 16px 16px 16px 4px; font-weight: 700; display: inline-block; }
.chara--wide img { aspect-ratio: 16 / 10; object-position: center; }
@media (max-width: 560px) { .chara { grid-template-columns: 110px minmax(0, 1fr); gap: 14px; padding: 14px; } .chara h3 { font-size: 17px; } .chara--wide { grid-template-columns: 1fr; } }

/* ひとことメモ・ポイント */
.point { padding: 16px 20px; border-radius: 10px; background: var(--mist); border: 2px dashed color-mix(in srgb, var(--blue) 35%, #fff); }
.point b:first-child { display: block; color: var(--blue); font-size: 14px; letter-spacing: .04em; }
/* 大きな数字 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stats div { padding: 16px; border-radius: 10px; background: var(--mist); text-align: center; }
.stats b { display: block; font-family: var(--latin); font-size: clamp(30px, 6vw, 42px); line-height: 1.2; color: var(--blue); }
.stats span { font-size: 13.5px; color: var(--ink-soft); }
/* 手順 */
.steps { list-style: none; padding: 0 !important; counter-reset: step; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 12px 16px 12px 58px; border-radius: 10px; background: var(--mist); margin: 0 !important; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font-family: var(--latin); font-weight: 600; display: grid; place-items: center; line-height: 1; padding-top: 3px; }
/* 棒グラフ（割合） */
.bars { display: grid; gap: 10px; }
.bars div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr) 4em; align-items: center; gap: 10px; font-size: 14px; }
.bars i { display: block; height: 22px; border-radius: 4px; background: var(--c, var(--blue)); width: var(--w); }
.bars em { font-style: normal; font-family: var(--latin); text-align: right; font-variant-numeric: tabular-nums; }

.post-foot { margin-top: 56px; padding-top: 24px; border-top: 2px solid var(--ink); display: grid; gap: 20px; }
.post-share { margin: 0; font-size: 14.5px; }
.post-note { margin: 0; font-size: 13px; color: var(--ink-soft); }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.post-nav a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14.5px; line-height: 1.6; }
.post-nav a:hover { border-color: var(--blue); }
.post-nav small { color: var(--ink-soft); font-size: 12px; }
.post-nav-next { grid-column: 2; text-align: right; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav-next { grid-column: auto; } }
