:root {
  color-scheme: dark;
  --bg: #000;
  --ink: #f7f7f5;
  --muted: #b9b7b1;
  --muted-2: #77746e;
  --line: #2b2b2f;
  --line-soft: #ded9ce;
  --panel: #09090b;
  --panel-2: #131316;
  --paper: #f5f2ea;
  --paper-2: #e4dfd5;
  --paper-ink: #171717;
  --paper-muted: #55514c;
  --accent: #d94756;
  --accent-dark: #8e2531;
  --accent-2: #c2b08a;
  --shell: 1180px;
  --wide: 1060px;
  --measure: 760px;
  --silver: 1.414;
  --gold: 1.618;
  /* サイト全体のフォントは Noto Sans 系に統一（フォールバックは system） */
  --font-sans: "Noto Sans JP", "Noto Sans", system-ui, -apple-system,
    "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.78;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  min-height: 64px;
  padding: 6px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* backdrop-filter 非対応環境では紙色セクションの本文が透けるため不透明にする */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: #000;
  }
}

.brand {
  grid-column: 2;
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 52px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: block;
  height: 30px;
  width: auto;
}

.header-actions {
  grid-column: 3;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-entry,
.nav-toggle,
.secondary-button,
.text-button,
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 4px;
  padding: 0 13px;
  text-decoration: none;
  cursor: pointer;
}

.admin-entry,
.nav-toggle,
.secondary-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--panel-2);
}

.admin-entry {
  color: var(--muted);
  font-size: 13px;
}

.nav-toggle {
  min-width: 72px;
}

/* 全ページ一覧の Menu（スライドナビ＋検索）は管理者ログイン時のみ表示する。
   公開サイトには出さず、admin に入ったときのクイックナビとして使う
   （app.js が認証時に body.is-admin を付与する）。 */
.nav-toggle {
  display: none;
}

body.is-admin .nav-toggle {
  display: inline-flex;
}

body:not(.is-admin) .nav-panel {
  display: none;
}

.admin-entry:hover,
.nav-toggle:hover,
.secondary-button:hover,
.text-button:hover {
  color: #fff;
  border-color: var(--accent);
}

.site-shell {
  flex: 1 0 auto;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
}

main {
  min-width: 0;
}

main:focus {
  outline: none;
}

.nav-panel {
  position: fixed;
  inset: 64px auto auto 0;
  z-index: 25;
  width: min(384px, 100%);
  max-height: calc(100svh - 64px);
  overflow: auto;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #050506;
  padding: 20px;
  transform: translateX(-110%);
  transition: transform 0.22s ease;
}

.nav-panel.open {
  transform: translateX(0);
}

.search-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

#siteSearch {
  width: 100%;
  height: 42px;
  margin: 7px 0 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #0f0f12;
  padding: 0 12px;
}

.nav-group {
  margin: 0 0 20px;
}

.nav-group-title {
  margin: 0 0 8px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-link {
  display: block;
  border-radius: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  padding: 8px 10px;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: var(--ink);
  background: var(--panel-2);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hero {
  display: grid;
  justify-items: center;
}

.home-hero {
  min-height: calc(100svh - 148px);
  padding: 30px 20px 38px;
  align-content: center;
  gap: 22px;
}

/* HERO: 3作品のキービジュアルを app.js が3秒おきにフェード切替 */
.hero-rotator {
  position: relative;
  width: min(100%, 622px);
  height: min(64svh, 540px);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hero-art.is-active {
  opacity: 1;
}

.hero-copy {
  display: grid;
  justify-items: center;
  gap: 12px;
  max-width: 760px;
  padding: 0 8px;
  text-align: center;
}

.hero-copy .eyebrow {
  margin: 0;
  letter-spacing: 0.2em;
}

.hero-title {
  font-size: clamp(30px, 5vw, 46px);
  letter-spacing: 0.08em;
  line-height: 1.15;
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 2;
  overflow-wrap: anywhere;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.news-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.news-row {
  display: grid;
  grid-template-columns: 96px 92px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  padding: 16px 6px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.news-date {
  color: var(--muted-2);
  font-size: 13px;
}

.news-tag {
  justify-self: start;
  border: 1px solid rgba(194, 176, 138, 0.5);
  border-radius: 3px;
  color: var(--accent-2);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  text-transform: uppercase;
}

.news-text {
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

a.news-row:hover .news-text {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.home-about-section {
  background: #020203;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  margin-top: 24px;
}

.about-copy {
  color: #cfccc4;
  font-size: 15px;
  line-height: 2.1;
}

.about-copy p {
  margin: 0 0 1.3em;
  overflow-wrap: anywhere;
}

.about-copy p:last-child {
  margin-bottom: 0;
}

.about-cards {
  display: grid;
  gap: 12px;
}

.section-inner {
  width: min(100% - 40px, var(--shell));
  margin: 0 auto;
}

.home-section,
.related-section,
.contact-section {
  padding: 52px 0;
  background: var(--bg);
}

.home-section + .home-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #070708;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.24;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: 54px;
}

h2 {
  margin: 0 0 18px;
  font-size: 34px;
}

h3 {
  margin: 0 0 12px;
  font-size: 25px;
}

.page-view {
  background: var(--bg);
}

.page-hero {
  position: relative;
  padding: 58px 0 46px;
  background: #0b0b0c;
  overflow: hidden;
}

.page-hero.has-visual {
  padding: 84px 0 62px;
}

.page-hero-bg {
  position: absolute;
  inset: 0;
}

.page-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) saturate(1.15);
  opacity: 0.3;
  transform: scale(1.2);
}

.page-hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(11, 11, 12, 0.25), rgba(11, 11, 12, 0.9));
}

.page-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.page-header {
  position: relative;
  width: min(100% - 40px, var(--wide));
  margin: 0 auto;
}

.page-title {
  max-width: calc(var(--measure) * 1.1);
  margin-top: 8px;
  overflow-wrap: anywhere;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #050506;
  padding: 2px 10px;
  overflow-wrap: anywhere;
}

.media-band {
  padding: 34px 0 42px;
  background: var(--bg);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  align-items: start;
  gap: 14px;
  width: min(100% - 40px, var(--wide));
  margin: 0 auto;
}

.gallery[data-count="1"] {
  width: min(100% - 40px, 680px);
}

.gallery figure {
  display: grid;
  place-items: center;
  align-self: start;
  margin: 0;
  border-radius: 10px;
  background: #0b0b0e;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
}

.gallery img {
  display: block;
  width: 100%;
  max-height: 620px;
  object-fit: contain;
}

.story-band {
  background: var(--paper);
  color: var(--paper-ink);
  padding: 60px 0 74px;
}

.content {
  width: min(100% - 40px, var(--measure));
  margin: 0 auto;
}

.story-content {
  font-family: var(--font-sans);
  font-size: 16.5px;
  font-weight: 400;
  line-height: 2.05;
  letter-spacing: 0.01em;
}

.content-block {
  padding: 0;
}

.content-block + .content-block {
  margin-top: 34px;
}

.content-block-copy + .content-block-heading {
  margin-top: 48px;
}

/* 見出しは Wix の原文レイアウトに合わせてセンター揃えの太字 */
.content-block-heading {
  text-align: center;
  /* アンカージャンプ時に固定ヘッダーへ隠れないようにする */
  scroll-margin-top: 84px;
}

.content-block-heading h2,
.content-block-heading h3 {
  margin: 0;
  color: var(--paper-ink);
  font-weight: 800;
}

.story-content .content-block-heading h2 {
  font-size: 30px;
}

.story-content .content-block-heading h3 {
  font-size: 20px;
}

.content-block-heading + .content-block-copy {
  margin-top: 18px;
}

.content-block-copy p {
  margin: 0 0 1.4em;
  overflow-wrap: anywhere;
}

.content-block-copy p:last-child {
  margin-bottom: 0;
}

/* 音声プレイヤー（例: マネージャーのノートPC の「鮮血の旋律」）。紙色バンド上に置く */
.audio-player {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 36px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: #fffdf8;
}

.audio-cover {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  background: #0b0b0e;
  overflow: hidden;
}

.audio-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}

.audio-body {
  display: grid;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.audio-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--paper-ink);
  overflow-wrap: anywhere;
}

.audio-artist {
  font-size: 12px;
  color: var(--paper-muted);
}

.audio-el {
  width: 100%;
  margin-top: 6px;
}

/* キャラクターシートのページ内アンカー（Wix の黒ボタン導線を踏襲） */
.sheet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.sheet-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  min-width: 168px;
  padding: 0 22px;
  border-radius: 4px;
  background: #111;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: background-color 0.18s ease;
}

.sheet-link:hover {
  background: var(--accent-dark);
}

/* 隠し文字: 原文Wixで白文字にされていた語。紙色と同化させ、選択すると読める */
.secret-text {
  color: var(--paper);
}

.story-band-intro .secret-text,
.story-band-continued .secret-text {
  text-shadow: none;
}

/* かるた系ページ: 中央揃え + カード画像2枚並び */
.layout-centered .story-content {
  text-align: center;
}

.layout-centered .gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(100% - 40px, 620px);
}

.layout-centered .gallery[data-count="1"] {
  grid-template-columns: 1fr;
  width: min(100% - 40px, 420px);
}

.layout-centered .gallery figure {
  background: transparent;
  box-shadow: none;
}

/* キャラクター名のキーカラー表示（色は render.js の CHARA_PALETTES で管理） */
.chara {
  font-weight: 700;
}

/* 白石: キーカラーが白のため、紙色背景でも読めるよう縁取りをつける */
.chara-white {
  color: #fff;
  -webkit-text-stroke: 0.5px #5c5952;
  text-shadow: 0 0 2px rgba(60, 58, 52, 0.55);
}

/* 虹村: 虹のグラデーション。background-clip 非対応環境は金茶色で表示 */
.chara-rainbow {
  color: #b5651d;
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .chara-rainbow {
    background: linear-gradient(105deg, #d33a3a 0%, #d68f1e 22%, #a89f00 42%, #2e9e3f 60%, #2b8bc4 78%, #7d3bb5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  padding: 18px;
}

.story-band .notice {
  border-color: var(--line-soft);
  background: #fffdf8;
  color: var(--paper-muted);
}

/* COMING SOON ダイアログ (SOL / SORMM4 導線。app.js が生成) */
.coming-soon-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  padding: 30px 26px;
  width: min(100% - 40px, 340px);
  text-align: center;
}

.coming-soon-dialog::backdrop {
  background: rgba(5, 5, 6, 0.66);
}

.coming-soon-title {
  margin: 8px 0 6px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.coming-soon-text {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 13px;
}

/* 保護ページのロックフォーム。紙色バンド上に置くカード */
.page-lock {
  width: min(100%, 460px);
  margin: 0 auto;
  padding: 26px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fffdf8;
}

.page-lock-note {
  margin: 0 0 18px;
  color: var(--paper-muted);
  font-size: 14px;
}

.page-lock-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--paper-muted);
  font-size: 13px;
}

.page-lock-form input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--paper-ink);
  background: #fff;
  padding: 10px 12px;
  /* 16px 未満だと iOS Safari がフォーカス時に自動ズームする */
  font-size: 16px;
}

.page-lock-form .form-status {
  color: var(--paper-muted);
}

.page-grid,
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(238px, 100%), 1fr));
  gap: 14px;
  margin-top: 24px;
}

.page-card {
  display: grid;
  min-height: 142px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
}

.page-card:hover {
  border-color: var(--accent);
}

.page-card-media {
  display: grid;
  place-items: center;
  min-width: 0;
  width: 100%;
  aspect-ratio: var(--silver) / 1;
  border-bottom: 1px solid var(--line);
  background: #050506;
  padding: 8px;
  overflow: hidden;
}

.page-card-media img {
  width: 100%;
  height: 100%;
  min-width: 0;
  object-fit: contain;
}

.page-card-body {
  display: grid;
  align-content: start;
  min-width: 0;
  width: 100%;
  gap: 8px;
  padding: 15px;
}

.page-card small {
  display: block;
  color: var(--accent-2);
  font-size: 12px;
}

.page-card strong {
  display: block;
  font-size: 16px;
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.home-topic-section {
  background: #020203;
}

.home-shop-section {
  background: #070708;
  padding-bottom: 76px;
}

.home-contact-section {
  padding-top: 78px;
  background: #050506;
}

.home-topic-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-shop-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-link-card {
  min-height: 0;
}

.home-link-card .page-card-body {
  min-height: 150px;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.home-topic-grid .page-card-media {
  aspect-ratio: var(--gold) / 1;
}

.home-shop-grid .page-card-media {
  aspect-ratio: 1 / 1;
}

.page-card-note {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.page-card-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.page-card-action::after {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.related-section {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-form {
  display: grid;
  gap: 13px;
  width: min(100%, 760px);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.contact-form input,
.contact-form textarea,
.admin-toolbar input,
.admin-toolbar select,
.admin-login input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #050506;
  padding: 10px 12px;
  /* 16px 未満だと iOS Safari がフォーカス時に自動ズームする */
  font-size: 16px;
}

.contact-form input,
.admin-toolbar input,
.admin-toolbar select,
.admin-login input {
  height: 42px;
}

.contact-form textarea {
  min-height: 154px;
  resize: vertical;
}

.submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button {
  border: 1px solid var(--accent);
  color: #fff;
  background: var(--accent);
  min-height: 42px;
  padding: 0 18px;
}

.primary-button:hover {
  background: var(--accent-dark);
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.form-status {
  color: var(--muted);
  font-size: 13px;
}

.admin-layout {
  width: min(100% - 40px, var(--shell));
  margin: 0 auto;
  padding: 54px 0 68px;
}

.admin-login,
.admin-panel,
.stat-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.admin-login,
.admin-panel {
  padding: 26px;
}

.admin-login {
  width: min(100%, 460px);
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-toolbar label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat-box {
  padding: 14px;
}

.stat-box small {
  display: block;
  color: var(--muted);
}

.stat-box strong {
  display: block;
  margin-top: 4px;
  font-size: 25px;
  line-height: 1.2;
}

.transition-list {
  display: grid;
  gap: 8px;
}

.transition-row {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(120px, 0.5fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #050506;
  padding: 12px;
}

.transition-title {
  min-width: 0;
}

.transition-title strong,
.transition-path {
  overflow-wrap: anywhere;
}

.transition-title small,
.transition-category {
  color: var(--muted);
  font-size: 13px;
}

.transition-path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.route-link {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted);
  background: var(--panel-2);
  padding: 4px 8px;
  font-size: 12px;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.route-link:hover,
.primary-route {
  color: var(--ink);
  border-color: var(--accent);
}

.transition-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.text-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 30px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #111112;
  color: var(--muted);
  font-size: 14px;
}

/* SUISHIN ロゴ = 管理画面 (/admin) への入口 */
.footer-logo {
  display: inline-flex;
  color: #d3d4d8;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-logo svg {
  display: block;
  height: 24px;
  width: auto;
}

.footer-logo:hover {
  color: #fff;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .site-header {
    min-height: 58px;
    padding: 5px 14px;
  }

  .brand {
    min-width: 48px;
    height: 48px;
  }

  .brand-mark {
    height: 26px;
  }

  .admin-entry {
    display: none;
  }

  .nav-toggle {
    min-width: 56px;
    padding: 0 10px;
  }

  .nav-panel {
    inset: 58px 0 auto 0;
    width: 100%;
    max-height: calc(100svh - 58px);
    border-right: 0;
    transform: translateY(-110%);
  }

  .nav-panel.open {
    transform: translateY(0);
  }

  .home-hero {
    min-height: auto;
    padding: 24px 16px 32px;
  }

  .hero-rotator {
    height: min(52svh, 400px);
  }

  .section-inner,
  .page-header,
  .gallery,
  .gallery[data-count="1"],
  .content,
  .admin-layout {
    width: min(100% - 32px, var(--shell));
  }

  .home-section,
  .related-section,
  .contact-section {
    padding: 40px 0;
  }

  .page-hero {
    padding: 42px 0 34px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 27px;
  }

  h3 {
    font-size: 22px;
  }

  .story-band {
    padding: 42px 0 54px;
  }

  .story-content {
    font-size: 15.5px;
    line-height: 2.05;
  }

  .story-content .content-block-heading h2 {
    font-size: 22px;
  }

  .story-content .content-block-heading h3 {
    font-size: 18px;
  }

  .content-block + .content-block {
    margin-top: 28px;
  }

  .content-block-copy + .content-block-heading {
    margin-top: 40px;
  }

  .page-hero.has-visual {
    padding: 58px 0 44px;
  }

  .hero-lead {
    font-size: 14px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .news-row {
    grid-template-columns: 88px 84px minmax(0, 1fr);
    gap: 10px;
  }

  .field-grid,
  .admin-toolbar,
  .transition-row {
    grid-template-columns: 1fr;
  }

  .home-topic-grid {
    grid-template-columns: 1fr;
  }

  .home-shop-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-shop-section {
    padding-bottom: 50px;
  }

  .home-contact-section {
    padding-top: 54px;
  }

  .home-link-card .page-card-body {
    min-height: 0;
  }

  .admin-login,
  .admin-panel {
    padding: 18px;
  }

  .transition-actions {
    justify-content: flex-start;
  }
}

/* ---------------------------------------------------------------- */
/* Brush-up additions: a11y / motion / share / 404 / back-to-top     */
/* ---------------------------------------------------------------- */

.skip-link {
  position: fixed;
  top: -56px;
  left: 12px;
  z-index: 60;
  padding: 10px 16px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus-visible {
  top: 12px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.admin-entry,
.nav-toggle,
.secondary-button,
.text-button,
.primary-button,
.nav-link,
.route-link {
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.page-card {
  transition: border-color 0.18s ease, transform 0.22s ease, box-shadow 0.22s ease;
}

.page-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.page-card-media img {
  transition: transform 0.3s ease;
}

.page-card:hover .page-card-media img {
  transform: scale(1.03);
}

.reveal-init {
  opacity: 0;
  transform: translateY(16px);
}

.reveal-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.back-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(9, 9, 11, 0.92);
  color: var(--muted);
  font-size: 17px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.back-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-top:hover {
  color: #fff;
  border-color: var(--accent);
}

.notfound-view {
  display: grid;
  align-content: center;
  min-height: calc(100svh - 240px);
  padding: 72px 0;
  background: var(--bg);
}

.notfound-view .section-inner {
  display: grid;
  justify-items: center;
  text-align: center;
}

.notfound-title {
  font-size: 44px;
}

.notfound-note {
  margin: 14px 0 26px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.notfound-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* タッチ端末ではタップターゲットを 44px 基準に引き上げる */
@media (pointer: coarse) {
  .admin-entry,
  .nav-toggle,
  .secondary-button,
  .text-button,
  .primary-button {
    min-height: 44px;
  }

  .nav-link {
    padding: 11px 12px;
  }

  .news-row {
    padding: 18px 6px;
  }

  .back-top {
    width: 48px;
    height: 48px;
  }
}

/* モバイルのメニュー展開中は背景スクロールを止める（app.js が body.nav-open を付与） */
@media (max-width: 900px) {
  body.nav-open {
    overflow: hidden;
  }

  /* モバイルはぼかし負荷を抑える */
  .page-hero-bg img {
    filter: blur(14px) saturate(1.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal-init {
    opacity: 1;
    transform: none;
  }

  .page-card,
  .page-card-media img,
  .back-top,
  .skip-link,
  .reveal-in,
  .nav-panel,
  .hero-art {
    transition: none;
  }

  .page-card:hover {
    transform: none;
  }

  .page-card:hover .page-card-media img {
    transform: none;
  }
}

@media (max-width: 520px) {
  .header-actions {
    gap: 6px;
  }

  .nav-toggle {
    min-width: 48px;
    font-size: 13px;
  }

  .page-grid,
  .related-grid,
  .gallery {
    grid-template-columns: 1fr;
  }

  .home-shop-grid {
    grid-template-columns: 1fr;
  }

  .home-topic-grid .page-card-media,
  .home-shop-grid .page-card-media {
    aspect-ratio: var(--silver) / 1;
  }

  .page-card {
    min-height: 0;
  }

  .footer-meta {
    gap: 14px;
  }

  .notfound-title {
    font-size: 32px;
  }

  .back-top {
    right: 14px;
    bottom: 14px;
  }

  .news-row {
    grid-template-columns: auto auto;
    row-gap: 6px;
  }

  .news-text {
    grid-column: 1 / -1;
  }
}

/*
 * レスポンシブ規約（S.O.L LP と共通・変更時は 390px 幅で全状態確認）:
 * - 日本語長文に word-break: keep-all を使わない（iOS Safari は読点で折り返さず突き破る）
 * - grid / flex の子要素には min-width: 0 を付ける
 * - 固定 px 幅を使わない（min() / clamp() / % を使う）
 * - 横スクロールは overflow-x: auto のラッパーだけに許可する
 * - 画像は WebP を参照し、PNG/JPG 原本はリポジトリに残す
 */
