/* Layout: an engraver's catalog — photo plates on a cool paper ground, catalog numbers in mono,
   long reads set in mincho at a comfortable measure. */
:root {
  --bg: #f4f7f6;          /* cool paper, slightly teal-biased */
  --surface: #ffffff;
  --ink: #142120;
  --muted: #586967;
  --line: #d6e0de;
  --accent: #0f6f69;      /* deep teal: links, buttons */
  --accent-soft: #dff1ee;
  --miku: #39c5bb;        /* bright teal: small marks only */
  --plate: #1b2423;       /* photo backdrop */

  --f-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", sans-serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  --f-read: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "Consolas", monospace;

  --step--1: 0.8125rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: clamp(1.8rem, 1.2rem + 2.4vw, 2.6rem);
  --radius: 10px;
  --wrap: 72rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1413; --surface: #141d1c; --ink: #e3ecea; --muted: #97aaa7; --line: #263432;
    --accent: #5fd3c8; --accent-soft: #15302d; --miku: #39c5bb; --plate: #0a0f0e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0d1413; --surface: #141d1c; --ink: #e3ecea; --muted: #97aaa7; --line: #263432;
  --accent: #5fd3c8; --accent-soft: #15302d; --miku: #39c5bb; --plate: #0a0f0e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: var(--step-0); line-height: 1.8;
  font-feature-settings: "palt" 0;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { text-wrap: balance; line-height: 1.4; word-break: auto-phrase; } /* 日本語を文節で折り返す */
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: max(16px, 4vw); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 0.5em 1em; z-index: 10; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 0.7rem; }
.brand { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; letter-spacing: 0.01em; }
.brand-star { color: var(--miku); margin-left: 0.15em; }
.nav { display: flex; gap: 0.2rem 1.1rem; flex-wrap: wrap; font-size: var(--step--1); }
.nav a { color: var(--muted); text-decoration: none; letter-spacing: 0.04em; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); }
.nav .nav-ext { color: var(--accent); font-weight: 500; }
.nav .nav-booth { display: inline-flex; align-items: center; }
.nav .nav-booth img { height: 1.35rem; width: auto; border-radius: 3px; }

/* buttons, chips */
.btn {
  display: inline-flex; align-items: center; gap: 0.4em; padding: 0.6em 1.15em;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  color: var(--ink); text-decoration: none; font-size: 0.92rem; font-weight: 500;
  transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn-primary:hover { filter: brightness(1.08); }

/* hero */
.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.eyebrow { font-family: var(--f-mono); font-size: var(--step--1); color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.8rem; }
.hero-title { font-family: var(--f-body); font-size: clamp(1rem, 0.9rem + 0.5vw, 1.25rem); font-weight: 400; line-height: 1.9; margin: 0 0 1.4rem; letter-spacing: 0.04em; }
.hero-title span { display: block; }
.hero-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.hero-figure { margin: 0; justify-self: center; width: min(100%, 26rem); position: relative; }

/* サークルロゴの登場演出: Tt. が上からフェードインで降りてきて、★ が右半分だけ見えた状態から右へニュッと出る */
.hero-logo {
  position: absolute; right: 0; bottom: 0; z-index: 2; margin: 0; display: flex; align-items: flex-start;
  font-family: "Zen Maru Gothic", var(--f-display); font-weight: 700; line-height: 1; letter-spacing: -0.02em;
  font-size: clamp(2.6rem, 1.5rem + 4vw, 5rem); color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.45); pointer-events: none;
}
.hero-logo .lg-tt { display: inline-block; animation: lg-drop 1.1s cubic-bezier(.2, .75, .25, 1) .4s both; }
.lg-star-clip { display: inline-block; overflow: hidden; padding: 0.05em 0.05em 0.1em 0; margin-left: 0.04em; }
.hero-logo .lg-star { display: inline-block; color: var(--miku); animation: lg-peek 1.6s cubic-bezier(.34, 1.56, .64, 1) .4s both; }
@keyframes lg-drop { from { transform: translateY(-1.5em); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes lg-peek {
  0%, 62% { transform: translateX(-50%); }   /* Tt. が降りきるまでは右半分だけ */
  100% { transform: none; }
}
/* SVGロゴ版: 部品ごとに自分の大きさ基準で動かす */
.hero-logo .tt-logo { width: 2.3em; height: auto; overflow: visible; filter: drop-shadow(0 2px 14px rgba(0,0,0,.45)); }
.hero-logo .tt-logo .lg-tt, .hero-logo .tt-logo .lg-star { transform-box: fill-box; }
.hero-logo .tt-logo .lg-tt { animation-name: lg-drop-svg; }
@keyframes lg-drop-svg { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
.tt-logo .lg-star { fill: var(--miku); }
@media (prefers-reduced-motion: reduce) { .lg-tt, .lg-star, .hero-logo .tt-logo .lg-tt { animation: none; } }
.hero-figure img {
  width: 100%; aspect-ratio: 1; object-fit: cover; object-position: 42% 55%;
  border-radius: 50%;
  box-shadow: 0 0 0 6px var(--bg), 0 0 0 7px var(--miku), 0 24px 50px -24px rgba(0,0,0,.45);
}

/* sections */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.section-head h2 { font-family: var(--f-display); font-size: var(--step-2); margin: 0; }
.section-head .more, .section-head .count { font-size: var(--step--1); color: var(--muted); margin: 0; }
.section-head .lede { color: var(--muted); margin: 0; font-size: 0.92rem; flex-basis: 100%; }
.news, .projects, .sanpo { padding-block: clamp(1.5rem, 4vw, 3rem); }

/* news */
.news-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.news-list li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.2rem 1rem; padding-block: 0.75rem; border-bottom: 1px solid var(--line); }
.news-list time { font-family: var(--f-mono); font-size: 0.88rem; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 0.1em; }
.news-page { padding-block: 2rem 4rem; }

/* filters + grid */
.project-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem 1.5rem; margin-bottom: 1.5rem; }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
/* 並べ方の切り替え */
.view-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.view-btn { font: inherit; font-size: 0.85rem; border: 0; background: transparent; color: var(--muted); padding: 0.35em 1.1em; border-radius: 999px; cursor: pointer; }
.view-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.card-meta time { font-variant-numeric: tabular-nums; }
/* 製品ライン別の棚 */
.shelf + .shelf { margin-top: clamp(2rem, 5vw, 3rem); }
.shelf-head { display: flex; align-items: baseline; gap: 0.5rem 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--line); }
.shelf-head h3 { margin: 0; font-family: var(--f-display); font-size: var(--step-1); }
.shelf-meta { margin: 0; font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.chip {
  font: inherit; font-size: 0.88rem; padding: 0.35em 1em; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--muted);
}
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15.5rem), 1fr)); gap: clamp(1rem, 2.4vw, 1.75rem); }
.card a { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.card-img { aspect-ratio: 4 / 3; background: var(--plate); border-radius: var(--radius); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.card a:hover .card-img img { transform: scale(1.035); }
.card-body { padding: 0.8rem 0.15rem 0; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.75rem; margin: 0 0 0.3rem; font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.03em; }
.card-meta .no { color: var(--accent); font-weight: 500; }
.card-title { font-family: var(--f-display); font-weight: 500; font-size: 1.02rem; margin: 0; line-height: 1.55; }
.card a:hover .card-title { color: var(--accent); }
.card-insp { margin: 0.35rem 0 0; font-size: 0.82rem; color: var(--muted); }

/* ボカロさんぽ */
.sanpo { background: var(--surface); border-block: 1px solid var(--line); }
.sanpo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.sanpo-list a {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 1rem; align-items: center;
  padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius);
  color: inherit; text-decoration: none; background: var(--bg);
}
.sanpo-list a:hover { border-color: var(--accent); }
.sanpo-no { font-family: var(--f-mono); font-size: 0.85rem; color: var(--accent); }
.sanpo-main { display: grid; min-width: 0; }
.sanpo-song { font-family: var(--f-read); font-weight: 600; font-size: 1.12rem; }
.sanpo-catch { color: var(--muted); font-size: 0.9rem; }

/* project page */
.project { padding-block: 1.5rem 3.5rem; }
.crumb { margin: 0 0 1.2rem; font-size: var(--step--1); }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.project-head { display: grid; gap: clamp(1.5rem, 4vw, 3rem); margin-bottom: 2.5rem; }
.project-head.has-gallery { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; }
.has-gallery .gallery { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.5rem); }
.project-info > .prose { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.gallery-main { margin: 0; background: var(--plate); border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; aspect-ratio: 4 / 3; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { list-style: none; margin: 0.75rem 0 0; padding: 0; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--plate); width: 5.5rem; aspect-ratio: 1; }
.gallery-thumbs button[aria-current] { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.project-info { min-width: 0; }
.project-title { font-family: var(--f-display); font-size: var(--step-2); font-weight: 700; margin: 0.2rem 0 0.6rem; }
.project-catch { color: var(--muted); margin: 0 0 1.2rem; }
.series { color: var(--ink); }
.credit { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.9rem; margin: 0 0 1.2rem; padding: 0.8rem 1rem; border-left: 3px solid var(--miku); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.credit dt { font-family: var(--f-mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.04em; padding-top: 0.2em; }
.credit dd { margin: 0; font-weight: 500; }
.tags { list-style: none; padding: 0; margin: 0 0 1.4rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0.05em 0.6em; }
.project-links { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1rem; }

.project-content { display: grid; gap: 2.5rem; }
.project-content.with-toc { grid-template-columns: 15rem minmax(0, 1fr); align-items: start; }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 4.5rem); font-size: 0.86rem; max-height: calc(100vh - 6rem); overflow: auto; }
.toc-h { font-family: var(--f-mono); font-size: 0.78rem; color: var(--accent); letter-spacing: 0.08em; margin: 0 0 0.5rem; }
.toc ol { margin: 0; padding-left: 1.2em; display: grid; gap: 0.45rem; color: var(--muted); }
.toc a { color: var(--muted); text-decoration: none; line-height: 1.5; display: block; }
.toc a:hover { color: var(--accent); }

.prose { max-width: 42rem; min-width: 0; overflow-wrap: anywhere; }
.prose p { margin: 0 0 1.2em; }
.prose h2 { font-family: var(--f-display); font-size: var(--step-1); margin: 2.4em 0 0.8em; padding-top: 0.6em; border-top: 1px solid var(--line); scroll-margin-top: 5rem; }
.prose h3 { font-size: 1.05rem; margin: 1.8em 0 0.6em; }
.prose img { border-radius: 8px; }
/* 歌詞などの引用 */
.prose blockquote { margin: 1.6em 0; padding: 0.9em 1.3em; border-left: 3px solid var(--miku); background: var(--accent-soft); border-radius: 0 6px 6px 0; }
.prose blockquote p { margin: 0; }
.prose blockquote + blockquote { margin-top: -0.6em; }
.longform .prose blockquote { font-size: 0.98em; line-height: 1.95; }
.prose strong { font-weight: 700; color: var(--ink); }
/* 場面転換（Markdown の * * *） */
.prose hr { border: 0; margin: 2.6em 0; text-align: center; height: auto; }
.prose hr::before { content: "＊　＊　＊"; color: var(--muted); letter-spacing: 0.3em; font-size: 0.9em; }
.longform .prose p { margin-bottom: 1em; }

/* 本文の下に置く配布物（折本PDFなど） */
.downloads { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; max-width: 42rem; margin-top: 3rem; padding: 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.downloads > div { display: grid; gap: 0.6rem; min-width: 0; }
.download-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; }
.download-url { font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.downloads img { width: 7rem; height: auto; border-radius: 6px; }
.downloads-h { margin: 0; font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.06em; }

.longform .project-head { max-width: 46rem; }
.longform .prose { font-family: var(--f-read); font-size: 1.06rem; line-height: 2.05; letter-spacing: 0.02em; }
.longform .prose h2, .longform .prose h3 { font-family: var(--f-display); letter-spacing: 0; }
.longform-cover { margin: 0 0 2.5rem; max-width: 46rem; }
/* 課題曲の動画（クリックで YouTube を読み込む） */
.video { margin: 0 0 2.5rem; max-width: 46rem; }
.video-facade, .video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--plate); }
.video-facade img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.video-facade:hover img { opacity: 1; }
.video-play { position: absolute; left: 50%; top: 50%; width: 68px; height: 48px; transform: translate(-50%, -50%); border-radius: 12px; background: rgba(0,0,0,.72); }
.video-play::after { content: ""; position: absolute; left: 27px; top: 14px; border-style: solid; border-width: 10px 0 10px 17px; border-color: transparent transparent transparent #fff; }
.video-facade:hover .video-play { background: #f00; }
.video-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem 1rem 0.8rem; color: #fff; font-size: 0.9rem; background: linear-gradient(transparent, rgba(0,0,0,.75)); }
.longform-cover img { border-radius: var(--radius); max-height: 28rem; width: auto; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { display: grid; gap: 0.2rem; color: var(--ink); text-decoration: none; font-family: var(--f-display); font-size: 0.95rem; line-height: 1.5; min-width: 0; }
.pager a span { font-family: var(--f-mono); font-size: 0.78rem; color: var(--accent); }
.pager .next { text-align: right; }
.pager a:hover { color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem 3rem; color: var(--muted); font-size: 0.88rem; }
.footer-inner { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; }
.footer-poem p { font-family: var(--f-read); line-height: 2; margin: 0 0 0.8rem; }
.footer-logo { width: 6rem; margin-bottom: 0.8rem; color: var(--ink); }
.footer-logo svg { width: 100%; height: auto; display: block; }
.footer-name { font-family: var(--f-display); font-weight: 700; color: var(--ink); margin: 0 0 0.5rem; }
.footer-links { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.ai-notice, .copy { margin: 0 0 0.3rem; font-size: 0.8rem; }

@media (max-width: 52rem) {
  .has-gallery .gallery { position: static; }
  .hero-inner, .project-head.has-gallery, .footer-inner, .project-content.with-toc { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { order: -1; width: min(70%, 18rem); }
  .toc { position: static; max-height: none; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
}
@media (max-width: 30rem) {
  .news-list li { grid-template-columns: minmax(0, 1fr); }
  .sanpo-list a { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager .next { text-align: left; }
}

/* poem archive: 詩ごとに色を変えたカード */
.poems { padding-block: 1.5rem 3.5rem; }
.poems-head { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 2.5rem); align-items: center; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.poems-cover { margin: 0; }
.poems-cover img { width: 100%; height: auto; border-radius: var(--radius); } /* 描き下ろしなので切り抜かず全体を見せる */
.poems-index { list-style: none; margin: 1.2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.poems-index a {
  display: inline-block; padding: 0.3em 0.9em; border-radius: 999px; font-size: 0.85rem; text-decoration: none; color: var(--ink);
  background: color-mix(in srgb, var(--tint) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--tint) 35%, var(--line));
}
.poems-index a:hover { border-color: var(--tint); }
.poem {
  max-width: 44rem; margin: 0 auto clamp(1.5rem, 4vw, 2.5rem); padding: clamp(1.5rem, 5vw, 3rem) clamp(1.25rem, 5vw, 3.5rem);
  background: color-mix(in srgb, var(--tint) 9%, var(--surface)); border-radius: var(--radius);
  border-top: 3px solid var(--tint); scroll-margin-top: 5rem;
}
.poem-head { margin-bottom: 1.8rem; }
.poem-head h2 { font-family: var(--f-display); font-size: var(--step-1); margin: 0; }
.poem-insp { margin: 0.35rem 0 0; font-family: var(--f-mono); font-size: 0.78rem; color: var(--muted); letter-spacing: 0.02em; }
.poem-block { font-family: var(--f-read); font-size: 1.04rem; line-height: 2.05; letter-spacing: 0.03em; }
.stanza { margin: 0 0 1.6em; }
.stanza:last-child { margin-bottom: 0; }
.poem-trans { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px dashed color-mix(in srgb, var(--tint) 45%, var(--line)); color: var(--muted); font-size: 0.97rem; }
.poem-label { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.08em; color: var(--tint); margin: 0 0 0.8rem; }
.poem-note { margin: 2rem 0 0; padding-top: 1.2rem; border-top: 1px solid color-mix(in srgb, var(--tint) 25%, var(--line)); font-size: 0.85rem; color: var(--muted); line-height: 1.8; }
.poem-prose .stanza { margin-bottom: 1.1em; }
.poem-prose .poem-block { font-size: 1rem; line-height: 2; }
@media (max-width: 34rem) {
  .poems-head { grid-template-columns: minmax(0, 1fr); }
  .poems-cover { max-width: 20rem; }
}

/* ```cards ブロック（No.21 の曲とブレンドなど） */
.prose .cards { list-style: none; padding: 0; margin: 1.5em 0 2em; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 0.9rem; font-family: var(--f-body); }
.info-card { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); line-height: 1.6; }
.prose .info-card p { margin: 0; }
.info-card-meta { display: flex; gap: 0.6rem; font-family: var(--f-mono); font-size: 0.75rem; color: var(--muted); }
.info-card-meta .no { color: var(--accent); font-weight: 500; }
.info-card-title { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; }
.info-card-sub { font-size: 0.82rem; color: var(--muted); }
.info-card-text { margin-top: 0.4rem !important; font-size: 0.9rem; flex: 1; }
.info-card-badge { align-self: flex-start; margin-top: 0.4rem !important; font-size: 0.72rem; padding: 0.1em 0.6em; border-radius: 999px; color: var(--accent); background: var(--accent-soft); }

/* トップ「すぐ使えるツール」 */
.tools { padding-block: clamp(1rem, 3vw, 2rem); }
.tool-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); gap: 0.9rem; }
.tool-links a {
  display: grid; gap: 0.25rem; height: 100%; padding: 1rem 1.2rem; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--miku); border-radius: var(--radius);
}
.tool-links a:hover { border-color: var(--accent); }
.tool-name { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; }
.tool-desc { color: var(--muted); font-size: 0.9rem; }
.tool-host { font-family: var(--f-mono); font-size: 0.75rem; color: var(--accent); }

/* ギャラリー: 黒い展示室。写真を主役に、壁一面に並べる。ダーク固定のデザイン。
   base.css のダーク用セレクタより強くするため :root を重ねている */
:root:root:root {
  --bg: #0a0c0c; --surface: #121616; --ink: #ecf1f0; --muted: #8d9b99; --line: #232b2a;
  --accent: #4fd8cb; --accent-soft: #10302c; --miku: #39c5bb; --plate: #000;
  --f-display: "Murecho", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-body: "Murecho", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-read: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Consolas", monospace;
  --radius: 0px;
  --wrap: 90rem;
  color-scheme: dark;
}
body { font-weight: 300; letter-spacing: 0.02em; }
.site-header { background: color-mix(in srgb, var(--bg) 80%, transparent); border-bottom-color: transparent; }
.brand { font-family: "Zen Maru Gothic", var(--f-display); font-weight: 700; letter-spacing: 0.01em; } /* ロゴはカタログ版 */
.nav a { text-transform: uppercase; letter-spacing: 0.12em; }

/* hero: 写真を全面に、文字をその上に */
.hero { padding-block: 0 2rem; }
.hero-inner { grid-template-columns: minmax(0, 1fr); max-width: none; padding-inline: 0; position: relative; }
.hero-figure, .hero-text { grid-area: 1 / 1; }
.hero-figure { width: 100%; max-width: 100%; order: 0; position: relative; }
.hero-figure img { aspect-ratio: 16 / 7; border-radius: 0; box-shadow: none; object-position: 50% 58%; min-height: 22rem; }
.hero-figure::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(0,0,0,.88)); }
.hero-text { z-index: 1; align-self: end; padding: 0 max(16px, 4vw) clamp(1.5rem, 4vw, 3rem); max-width: 64rem; }
.hero-title { color: #f2f6f5; text-shadow: 0 1px 12px rgba(0,0,0,.5); }
.hero-logo { right: max(16px, 4vw); bottom: clamp(1.5rem, 4vw, 3rem); font-size: clamp(3rem, 1.5rem + 6vw, 7.5rem); }
@media (max-width: 52rem) { .hero-logo { top: 1rem; bottom: auto; } }
.eyebrow { color: var(--miku); }

.section-head h2 { font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; font-size: var(--step-1); }
.btn { border-radius: 0; background: transparent; }
.btn-primary { background: var(--accent); color: #031614; }
.chip { border-radius: 0; background: transparent; text-transform: uppercase; letter-spacing: 0.06em; }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #031614; }

/* 壁一面のグリッド：文字は写真の上に重ねる */
.grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 4px; }
.card a { position: relative; }
.card-img { aspect-ratio: 1; }
.card-img img { filter: saturate(0.9); }
.card a:hover .card-img img { transform: scale(1.06); filter: none; }
.card-body { position: absolute; inset: auto 0 0 0; padding: 3rem 1rem 0.9rem; background: linear-gradient(180deg, transparent, rgba(0,0,0,.9)); }
.card-title { color: #fff; font-weight: 600; font-size: 0.98rem; }
.card a:hover .card-title { color: #fff; }
.card-meta, .card-insp { color: #b3c0be; }
.card-meta .no { color: var(--miku); }

.news-list li { border-bottom-color: var(--line); }
.sanpo { background: var(--surface); border-color: transparent; }
.sanpo-list a { border-radius: 0; background: transparent; border-color: var(--line); }
.sanpo-song { font-weight: 400; }

.gallery-main { aspect-ratio: 1; }
.gallery-thumbs button { border-radius: 0; }
.credit { border-radius: 0; background: transparent; border: 1px solid var(--line); border-left: 3px solid var(--miku); }
.project-title { font-weight: 800; }
.longform-cover img { border-radius: 0; }
.prose blockquote { background: transparent; border: 1px solid var(--line); border-left: 3px solid var(--miku); border-radius: 0; }
.view-switch { border-radius: 0; background: transparent; }
.view-btn { border-radius: 0; }
.view-btn[aria-pressed="true"] { background: var(--accent); color: #031614; }
.shelf-head h3 { font-weight: 600; }
