/* ======================================================================
   Art Space 2015 - 共通スタイル
   ----------------------------------------------------------------------
   このファイルは「全ページで共通する見た目」をまとめる場所。
   PROFILEだけの特殊な見た目は下の「PROFILE」欄にまとめている。
   将来ページが増えたら、ページ固有CSSへ分けることもできる。
   ====================================================================== */

/* ---------- 基本設定 ---------- */
:root {
  --page-width: 1000px;
  --nav-width: 230px;
  --text: #595758;
  --orange: #f08000;
  --green: #b4d464;
  --footer: #DCEFF3;
  --profile: #bd829c;
  --white: #fff;

  /* v0.28：トップイラストの水色～紫＋ロゴのコーラルを、細い線ナビへ引用 */
  --nav-cyan: #74c1d0;
  --nav-lavender: #b69fc9;
  --nav-purple: #765696;
  --nav-coral: #d9657b;
  --nav-text: #626273;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: .018em;
}

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

a {
  color: inherit;
}

/* キーボード操作時に、今どこを選択しているか見えるようにする */
a:focus-visible,
button:focus-visible {
  outline: 3px solid #2766d8;
  outline-offset: 3px;
}

/* ---------- サイト全体 ---------- */
.site-shell {
  width: min(100%, var(--page-width));
  margin: 0 auto;
}

.site-hero-link {
  display: block;
}

.site-hero picture,
.site-hero img {
  width: 100%;
}

/* ---------- PC：左ナビ＋右コンテンツ ---------- */
.site-body {
  display: grid;
  grid-template-columns: var(--nav-width) minmax(0, 1fr);
  gap: 0;
  align-items: start;
  /*
     旧サイトでは #Navi 自体に8px、その中の ul にブラウザ標準の約16pxの上余白があり、
     最初に見えるメニューボタンはトップ画像から約24px下がっていた。
     新サイトではその見た目の余白を明示的に24pxとして左右共通にする。
  */
  padding-top: 24px;
  padding-bottom: 54px;
}

.site-nav {
  width: var(--nav-width);
  background: #fff;
  padding-right: 0;
  z-index: 30;
}

.site-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav-list li {
  margin: 0 0 5px;
}

.nav-image-link {
  position: relative;
  display: block;
  overflow: hidden;
}

.nav-image-link img {
  width: 100%;
  transition: filter .16s ease;
}

/* 画像メニューは位置も画像自体の色調も変えない。
   ホバー時は白を薄く重ね、テーマカラーの水色で内側にラインを出す。 */
.nav-image-link::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(255, 255, 255, .28);
  box-shadow: inset 0 0 0 3px rgba(116, 193, 208, .82);
  opacity: 0;
  transition: opacity .16s ease;
}

.nav-image-link:hover::after,
.nav-image-link:focus-visible::after {
  opacity: 1;
}

/* 文字ナビ：v0.28。
   形は「細い色線」を維持し、トップイラストの水色～紫を少量だけ引用する。
   通常＝水色、ホバー＝コーラル、現在地＝紫。背景は白のまま。
   細線の左端は上の画像ナビの左端とぴったり揃える。 */
.nav-text-item {
  margin-bottom: 0 !important;
}

.nav-text-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 39px;
  padding: 5px 12px 5px 0;
  border: 0;
  background: transparent;
  color: var(--nav-text);
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: .08em;
  line-height: 1.25;
  text-decoration: none;
  transition: color .16s ease;
}

.nav-text-link::before {
  content: "";
  flex: 0 0 auto;
  width: 3px;
  height: 18px;
  margin-right: 22px;
  border-radius: 2px;
  background: var(--nav-cyan);
  transition: height .16s ease, background-color .16s ease;
}

/* 現在地：紫の線を少し長くし、文字も同系色にする。 */
.nav-text-link[aria-current="page"] {
  color: var(--nav-purple);
}

.nav-text-link[aria-current="page"]::before {
  height: 25px;
  background: var(--nav-purple);
}

/* ホバー／キーボードフォーカス：背景を塗らず、線と文字をコーラルへ大きく変化させる。 */
.nav-text-link:hover,
.nav-text-link:focus-visible {
  color: var(--nav-coral);
  background: transparent;
}

.nav-text-link:hover::before,
.nav-text-link:focus-visible::before {
  height: 25px;
  background: var(--nav-coral);
}

/* 現在地はホバーしても現在地の濃い紫を維持する。 */
.nav-text-link[aria-current="page"]:hover,
.nav-text-link[aria-current="page"]:focus-visible {
  color: var(--nav-purple);
}

.nav-text-link[aria-current="page"]:hover::before,
.nav-text-link[aria-current="page"]:focus-visible::before {
  background: var(--nav-purple);
}

.nav-copyright-note {
  margin: 12px 0 0;
  padding: 0 4px;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: .62rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .005em;
  color: #707070;
  opacity: .94;
  text-align: left;
}

/* ---------- スマホ用のメニューボタン ---------- */
.mobile-bar {
  display: none;
}

.nav-backdrop {
  display: none;
}

/* ---------- メイン領域 ---------- */
/*
   PC版では、左ナビの「最初に見えるメニューボタン」と右コンテンツの上端を揃える。
   旧サイトの見た目ではトップ画像から約24px空いていたため、.site-body の24pxを左右共通で使う。
*/
.page-main {
  min-width: 0;
  padding: 0 0 0 10px;
}

/* ---------- PROFILE ---------- */
/*
   PC版PROFILEは「文章がイラストの形に収まる」ことまで旧サイトを再現する。
   花束が左へ張り出す高さに「【PC環境】 / Windows」のような短い行が来るため、
   PCでは文字サイズ・行間・段落余白・イラスト位置を旧ページと同じ条件に固定する。
*/
.page-profile .page-main {
  padding: 0;
}

/*
   PC版では、ヘッダー下→メニュー上の24pxと、
   メニュー右端→ピンク背景左端の24pxを同じ幅にする。
   右側領域770px - 24px = 746pxなので、背景だけ左へ46px広げる。
   本文とイラストは完成位置を維持するため、背景の拡張分46pxだけ右へ補正する。
*/
.profile-panel {
  position: relative;
  width: 746px;
  height: 730px;
  min-height: 730px;
  margin-left: auto;
  overflow: hidden;
  background: var(--profile);
  color: #fff;
}

.profile-copy {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 46px;
  margin: 1em 0 1em 2.8em;
  max-width: none;
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: .015em;
}

.profile-name,
.profile-label {
  font-family: "Klee One", "Zen Kaku Gothic New", sans-serif;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: .025em;
}

/* PROFILE内の各セクション間は「本文2.6行分」に少し広げる。
   特定箇所だけを動かさず、全体の縦リズムを一定にして花束との噛み合わせを調整する。 */
.profile-section-gap {
  display: block;
  height: 3.12em; /* 旧ブラウザ向けフォールバック：1.2 × 2.6行 */
  height: 2.6lh;
}

.profile-copy a {
  color: #fff;
  text-decoration: underline;
}

.profile-copy a:hover {
  text-decoration-thickness: 2px;
}

.profile-illustration {
  position: absolute;
  z-index: 1;
  left: 116px;
  bottom: 40px;
  width: 590px;
  max-width: none;
  pointer-events: none;
}

.contact-link {
  display: inline;
  margin: 0;
}

/* ---------- フッター ---------- */
.site-footer {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 28px;
  padding: 6px 12px;
  background: var(--footer);
  color: #666;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: .66rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .005em;
  opacity: .95;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

/* サイトの公開バージョン表示。
   本番で非表示にしたい場合は display: none; にするだけで全ページから消せます。 */
.site-version {
  display: inline;
  margin-left: .75em;
  font-size: .88em;
  letter-spacing: .02em;
  opacity: .58;
  white-space: nowrap;
}

/* ======================================================================
   タブレット・スマホ
   ----------------------------------------------------------------------
   PROFILEは一般的な「文字→画像」の縦並びにはしない。
   ・タブレット：PC版700×730pxの誌面そのものを縮小し、文字とイラストの位置関係を維持。
   ・スマホ：文字は読みやすい大きさを保ち、花束が「【PC環境】/ Windows」の位置に来るよう
             JavaScriptでイラストの上下位置だけ自動調整する。
   ====================================================================== */
@media (max-width: 760px) {
  body.nav-open {
    overflow: hidden;
  }

  .site-shell {
    width: 100%;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 6px 12px;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid #eee;
    backdrop-filter: blur(8px);
  }

  .menu-button {
    font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    color: var(--nav-text);
    font-size: inherit;
    line-height: inherit;
    font-weight: 400;
    cursor: pointer;
  }

  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }

  .menu-icon {
    position: relative;
  }

  .menu-icon::before,
  .menu-icon::after {
    position: absolute;
    left: 0;
    content: "";
  }

  .menu-icon::before { top: -7px; }
  .menu-icon::after  { top: 7px; }

  .site-body {
    display: block;
    padding: 0 0 42px;
  }

  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 70;
    width: min(82vw, 310px);
    height: 100dvh;
    padding: 18px 16px 40px;
    overflow-y: auto;
    box-shadow: 8px 0 30px rgba(0,0,0,.18);
    transform: translateX(-105%);
    transition: transform .22s ease;
  }

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

  .nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    background: rgba(0,0,0,.42);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
  }

  body.nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .nav-image-link img {
    width: 100%;
  }

  .nav-text-link {
    min-height: 44px;
    font-size: 1.05rem;
  }

  .nav-copyright-note {
    font-size: .7rem;
  }

  .page-main,
  .page-profile .page-main {
    padding: 0;
  }

  .page-profile .page-main {
    overflow: hidden;
  }

  /* 701～760px：700pxのPC誌面を原寸のまま中央に置ける */
  .profile-panel {
    left: 50%;
    width: 700px;
    height: 730px;
    min-height: 730px;
    margin-left: -350px;
    transform-origin: top center;
  }

  /* PCだけの背景拡張補正を解除し、完成済みのタブレット配置を維持する。 */
  .profile-copy {
    left: 0;
  }

  .profile-illustration {
    left: 70px;
  }

  .site-footer {
    position: static;
    min-height: 0;
  }
}

/* 小さめタブレット：PC誌面を丸ごと縮小するので噛み合わせは変わらない */
@media (min-width: 641px) and (max-width: 700px) {
  .profile-panel {
    transform: scale(.90);
    margin-bottom: -73px;
  }
}

@media (min-width: 600px) and (max-width: 640px) {
  .profile-panel {
    transform: scale(.84);
    margin-bottom: -117px;
  }
}

/* ----------------------------------------------------------------------
   スマホ：PC誌面の単純縮小では文字が小さくなりすぎるので、
   文字サイズは維持したまま同じ「文字とイラストが噛み合う」構図を再構成する。
   イラストの縦位置は site.js が「PC環境 / Windows」の実際の位置から決める。
   ---------------------------------------------------------------------- */
@media (max-width: 599px) {
  .profile-panel {
    left: auto;
    width: 100%;
    height: 880px; /* JS実行後に内容量に合わせて上書きされる */
    min-height: 0;
    margin: 0;
    transform: none;
    overflow: hidden;
  }

  .profile-copy {
    position: absolute;
    z-index: 2;
    top: 18px;
    left: 16px;
    right: 12px;
    margin: 0;
    max-width: none;
    font-size: clamp(12.5px, 3.55vw, 14px);
    line-height: 1.52;
    text-shadow: 0 1px 2px rgba(91, 48, 72, .22);
  }

  .desktop-only-spacer {
    display: none;
  }

  .profile-name,
  .profile-label {
    font-size: inherit;
    font-weight: 400;
  }

  .profile-pc-block {
    display: inline-block;
    position: relative;
    z-index: 3;
  }

  .profile-illustration {
    position: absolute;
    z-index: 1;
    left: clamp(54px, 18vw, 78px);
    top: 190px; /* JSが実測して調整するまでの予備値 */
    bottom: auto;
    width: min(92vw, 380px);
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 360px) {
  .profile-copy {
    left: 14px;
    right: 10px;
    font-size: 12.5px;
    line-height: 1.48;
  }

  .profile-illustration {
    left: 52px;
    width: 92vw;
  }
}

/* 動きを減らす設定をOSで有効にしている人にはアニメーションしない */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}


/* ======================================================================
   GALLERY：作品を主役にする独立レイアウト
   ----------------------------------------------------------------------
   ギャラリー内ではサイト共通ヘッダー／左ナビを表示しない。
   作品そのものへ視線が向くよう、見出し・説明・移動UIは静かにまとめる。
   ====================================================================== */
.gallery-standalone-page {
  margin: 0;
  background: #fff;
}

.gallery-standalone-main {
  width: 100%;
  padding: 34px 16px 42px;
}

.gallery-index-panel {
  width: 700px;
  max-width: 100%;
  margin: 0 auto;
}

/* 大見出し：GALLERY番号は小さく、日本語テーマを主役にする */
.gallery-index-title {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 0 30px;
  padding: 0 0 14px;
  color: var(--nav-text);
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  line-height: 1.35;
  text-align: center;
}

.gallery-index-kicker {
  color: var(--nav-lavender);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .19em;
}

.gallery-index-heading {
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: .07em;
}

/* 作品より目立たせない短い区切り線。通常メニューと同じ水色を使う。 */
.gallery-index-title::after {
  content: "";
  display: block;
  width: 54px;
  height: 1px;
  margin: 10px auto 0;
  background: var(--nav-cyan);
}

.gallery-index-list {
  width: 650px;
  max-width: calc(100% - 24px);
  margin: 0 auto;
}

/* カテゴリ同士は線ではなく余白で分ける */
.gallery-index-item {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  min-height: 180px;
  padding: 20px 0;
}

.gallery-index-item + .gallery-index-item {
  margin-top: 14px;
}

.gallery-index-thumb {
  display: block;
  width: 266px;
  max-width: 100%;
  margin: 0 auto;
  text-decoration: none;
}

.gallery-index-thumb img {
  display: block;
  width: 100%;
  height: auto;
  transition: opacity .15s ease;
}

/* 絵そのものは動かさず、クリックできることだけ静かに伝える */
.gallery-index-thumb:hover img,
.gallery-index-thumb:focus-visible img {
  opacity: .88;
}

.gallery-index-copy h2 {
  margin: 0 0 10px;
  color: var(--nav-text);
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: .01em;
}

.gallery-index-copy h2 a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
  transition: color .15s ease, text-decoration-color .15s ease;
}

/*
  画像とサブタイトルは同じ詳細ページへの入口。
  どちらか一方に触れたとき、もう一方も同時に反応させて関係を伝える。
  :has() 非対応環境でも、それぞれ単独のhoverは通常どおり機能する。
*/
.gallery-index-copy h2 a:hover,
.gallery-index-copy h2 a:focus-visible,
.gallery-index-item:has(.gallery-index-thumb:hover) .gallery-index-copy h2 a,
.gallery-index-item:has(.gallery-index-thumb:focus-visible) .gallery-index-copy h2 a,
.gallery-index-item:has(.gallery-index-copy h2 a:hover) .gallery-index-copy h2 a,
.gallery-index-item:has(.gallery-index-copy h2 a:focus-visible) .gallery-index-copy h2 a {
  color: var(--nav-coral);
  text-decoration-color: var(--nav-coral);
}

.gallery-index-item:has(.gallery-index-copy h2 a:hover) .gallery-index-thumb img,
.gallery-index-item:has(.gallery-index-copy h2 a:focus-visible) .gallery-index-thumb img {
  opacity: .88;
}

.gallery-index-thumb:focus-visible,
.gallery-index-copy h2 a:focus-visible,
.gallery-footer-nav a:focus-visible {
  outline: 2px solid var(--nav-cyan);
  outline-offset: 3px;
}

/* 説明文は一段薄くして、画像→見出し→説明の順に視線が流れるようにする */
.gallery-index-copy p {
  margin: 0;
  color: #747677;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.85;
}

.gallery-index-copy p a {
  color: var(--nav-coral);
  text-decoration: none;
}

.gallery-index-copy p a:hover {
  text-decoration: underline;
}

/* 最下部ナビ：通常メニューと同じ「水色／コーラル／紫」の役割分担で統一する。 */
.gallery-footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  width: 650px;
  max-width: calc(100% - 24px);
  margin: 48px auto 8px;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .08em;
}

.gallery-footer-nav a {
  position: relative;
  padding: 6px 15px 5px;
  border: 1px solid #d6e5e8;
  border-radius: 999px;
  background: #fff;
  color: #747677;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.gallery-footer-nav a:hover {
  border-color: var(--nav-coral);
  background: #fff7f8;
  color: #747677;
}

.gallery-footer-nav a[aria-current="page"] {
  border-color: var(--nav-purple);
  background: #f5f2f7;
  color: #747677;
  font-weight: 500;
}

.gallery-site-footer {
  margin-top: 0;
}

@media (max-width: 760px) {
  .gallery-standalone-main {
    padding: 28px 14px 30px;
  }

  .gallery-index-panel {
    width: 100%;
  }

  .gallery-index-title {
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .gallery-index-kicker {
    font-size: .65rem;
  }

  .gallery-index-heading {
    font-size: clamp(1.05rem, 4.8vw, 1.2rem);
    letter-spacing: .055em;
  }

  .gallery-index-title::after {
    width: 48px;
    margin-top: 8px;
  }

  .gallery-index-list {
    width: 100%;
    max-width: 100%;
  }

  .gallery-index-item {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    padding: 27px 0;
  }

  .gallery-index-item + .gallery-index-item {
    margin-top: 10px;
  }

  .gallery-index-thumb {
    width: min(100%, 320px);
  }

  .gallery-index-copy {
    width: min(100%, 520px);
    margin: 0 auto;
  }

  .gallery-index-copy h2 {
    margin-bottom: 8px;
    font-size: 17px;
    line-height: 1.5;
    text-align: center;
  }

  .gallery-index-copy p {
    font-size: 13px;
    line-height: 1.8;
  }

  .gallery-index-copy p br {
    display: none;
  }

  .gallery-footer-nav {
    width: 100%;
    max-width: 100%;
    margin-top: 34px;
    font-size: 11px;
  }

  .gallery-footer-nav a {
    padding: 6px 12px 5px;
  }
}

@media (max-width: 420px) {
  .gallery-index-heading {
    letter-spacing: .035em;
  }
}


/* ======================================================================
   GALLERY DETAIL：作品一覧ページ
   ----------------------------------------------------------------------
   作品を主役にする詳細ビュー。将来、作品情報をFirestore等から取得する
   構成へ差し替えても、表示UI側を極力そのまま使えるよう独立させている。
   ====================================================================== */
.gallery-detail-main {
  padding-top: 28px;
}

.gallery-detail-panel {
  width: 760px;
  max-width: 100%;
  margin: 0 auto;
}

.gallery-detail-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin: 0 0 20px;
  color: var(--nav-text);
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  line-height: 1.35;
  text-align: center;
}

.gallery-detail-kicker {
  color: var(--nav-lavender);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .17em;
}

.gallery-detail-heading {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .48em;
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  font-size: 1.18rem;
  font-weight: 500;
  letter-spacing: .08em;
}

/* I は上下に小さなセリフが見える書体で、ローマ数字らしさを残しつつ主張を抑える。 */
.gallery-detail-roman {
  color: #777481;
  font-family: "Noto Serif", Georgia, "Times New Roman", serif;
  font-size: .96em;
  font-weight: 400;
  letter-spacing: 0;
}

.gallery-detail-title::after {
  content: "";
  width: 52px;
  height: 1px;
  margin-top: 9px;
  background: var(--nav-cyan);
}

.gallery-viewer {
  width: 700px;
  max-width: 100%;
  margin: 0 auto;
}

.gallery-stage {
  display: grid;
  grid-template-columns: 42px minmax(0, 600px) 42px;
  justify-content: center;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.gallery-stage-figure {
  width: min(600px, 100%);
  margin: 0;
  text-align: center;
}

.gallery-stage-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #fff;
}

.gallery-stage-count {
  margin-top: 6px;
  color: #9a9d9e;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: .08em;
}

.gallery-stage-arrow {
  display: grid;
  place-items: center;
  width: 36px;
  height: 54px;
  padding: 0 0 4px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #a3a7a8;
  font-family: Arial, sans-serif;
  font-size: 36px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  transition: color .15s ease;
}

/* ホバーは背景を主張させず、通常メニューと同じコーラルへ矢印自体を変化させる。 */
.gallery-stage-arrow:hover {
  color: var(--nav-coral);
}

.gallery-stage-arrow:focus-visible {
  outline: 2px solid var(--nav-cyan);
  outline-offset: 2px;
  color: var(--nav-coral);
}

.gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(10, 46px);
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin: 22px auto 0;
}

.gallery-thumb-button {
  width: 46px;
  height: 46px;
  padding: 2px;
  border: 1px solid transparent;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, opacity .15s ease, background-color .15s ease;
}

.gallery-thumb-button img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

.gallery-thumb-button:hover {
  border-color: #b8d9df;
  background: #f7fbfc;
}

.gallery-thumb-button[aria-current="true"] {
  border-color: var(--nav-purple);
  background: #f5f2f7;
}

.gallery-thumb-button:focus-visible {
  outline: 2px solid var(--nav-cyan);
  outline-offset: 2px;
}

.gallery-category-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  width: 700px;
  max-width: 100%;
  margin: 42px auto 0;
  color: #747677;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .04em;
}

.gallery-category-nav a,
.gallery-category-nav span {
  min-height: 30px;
  padding: 5px 9px;
}

.gallery-category-nav a {
  text-decoration: none;
}

.gallery-category-nav a:first-child {
  text-align: left;
}

.gallery-category-nav a:last-child {
  text-align: right;
}

.gallery-category-nav a:hover {
  color: #747677;
  text-decoration: underline;
  text-decoration-color: var(--nav-coral);
  text-underline-offset: .2em;
}

/* 現在地は通常メニュー同様「紫」、左右リンクのホバーは「コーラル」で役割を分ける。 */
.gallery-category-nav span[aria-current="page"] {
  color: #747677;
  font-weight: 400;
  text-align: center;
  text-decoration-line: underline;
  text-decoration-color: var(--nav-purple);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .28em;
}

.gallery-detail-page .gallery-footer-nav {
  margin-top: 28px;
}

@media (max-width: 760px) {
  .gallery-detail-main {
    padding: 24px 10px 30px;
  }

  .gallery-detail-title {
    margin-bottom: 15px;
  }

  .gallery-detail-heading {
    font-size: clamp(1.05rem, 4.8vw, 1.18rem);
    letter-spacing: .055em;
  }

  .gallery-stage {
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    gap: 3px;
  }

  .gallery-stage-arrow {
    width: 30px;
    height: 48px;
    font-size: 31px;
  }

  .gallery-thumbnails {
    grid-template-columns: repeat(auto-fit, 46px);
    max-width: 360px;
    gap: 6px;
    margin-top: 18px;
  }

  .gallery-category-nav {
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    margin-top: 36px;
    font-size: 11px;
  }

  .gallery-category-nav span[aria-current="page"] {
    grid-column: 1 / -1;
    grid-row: 1;
    justify-self: center;
  }

  .gallery-category-nav a:first-child {
    grid-column: 1;
    grid-row: 2;
  }

  .gallery-category-nav a:last-child {
    grid-column: 2;
    grid-row: 2;
  }
}

@media (max-width: 390px) {
  .gallery-thumbnails {
    grid-template-columns: repeat(6, 42px);
    gap: 5px;
  }

  .gallery-thumb-button {
    width: 42px;
    height: 42px;
  }

  .gallery-thumb-button img {
    width: 36px;
    height: 36px;
  }
}



/* ======================================================================
   GALLERY ORIGINAL：画廊感と一覧性を両立するオリジナル作品ページ
   ----------------------------------------------------------------------
   作品ごとの額装感は残しつつ、PCは3列・スマホは2列を基本にして、
   多数の作品を見渡しやすくする。原画の縦横比は変えない。
   ====================================================================== */
.original-gallery-page {
  background: #faf9f7;
}

.original-gallery-main {
  padding-top: 34px;
  padding-bottom: 48px;
}

.original-gallery-panel {
  width: 1020px;
  max-width: 100%;
  margin: 0 auto;
}

.original-gallery-header {
  width: min(760px, 100%);
  margin: 0 auto 58px;
  text-align: center;
}

.original-gallery-kicker {
  margin: 0 0 3px;
  color: var(--nav-lavender);
  font-family: "Zen Kaku Gothic New", "Noto Sans JP", sans-serif;
  font-size: .68rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .18em;
}

.original-gallery-title {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: .5em;
  margin: 0;
  color: var(--nav-text);
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .09em;
}

.original-gallery-lead {
  position: relative;
  margin: 17px 0 0;
  padding-top: 18px;
  color: #8b8989;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 12px;
  line-height: 1.8;
  letter-spacing: .08em;
}

.original-gallery-lead::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 52px;
  height: 1px;
  transform: translateX(-50%);
  background: var(--nav-cyan);
}

.original-collection-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 9px;
  margin-top: 20px;
  color: #aaa4a8;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 10.5px;
  line-height: 1.7;
}

.original-collection-jump a {
  color: #837e82;
  text-decoration: none;
  text-underline-offset: 3px;
}

.original-collection-jump a:hover,
.original-collection-jump a:focus-visible {
  color: var(--nav-cyan-dark);
  text-decoration: underline;
}

.original-collection + .original-collection {
  margin-top: 84px;
}

.original-collection-header {
  width: min(620px, 100%);
  margin: 0 auto 38px;
  text-align: center;
}

.original-collection-header h2 {
  scroll-margin-top: 20px;
}

.original-collection-number {
  display: block;
  margin-bottom: 6px;
  color: #b0abad;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 9px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: .2em;
}

.original-collection-header h2 {
  position: relative;
  margin: 0;
  padding-bottom: 15px;
  color: #666270;
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  font-size: 19px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .08em;
}

.original-collection-header h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 26px;
  height: 1px;
  transform: translateX(-50%);
  background: #d8d1d6;
}

.original-collection-header p {
  margin: 12px 0 0;
  color: #8c898a;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 11.5px;
  line-height: 1.8;
  letter-spacing: .025em;
}

.original-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 42px 34px;
  width: 960px;
  max-width: calc(100% - 24px);
  margin: 0 auto;
  align-items: center;
}

.original-work {
  display: grid;
  place-items: center;
  min-width: 0;
  margin: 0;
}

.original-work-button {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}

.original-work-mat {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 250px;
  padding: 18px;
  border: 1px solid #ebe6e2;
  background: #fff;
  box-shadow: 0 7px 20px rgba(74, 68, 70, .05);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.original-work-mat img {
  width: auto;
  max-width: 100%;
  max-height: 390px;
  object-fit: contain;
}

.original-work-button:hover .original-work-mat {
  border-color: #dcd3d7;
  box-shadow: 0 10px 27px rgba(74, 68, 70, .08);
  transform: translateY(-2px);
}

.original-work-button:focus-visible {
  outline: 2px solid var(--nav-cyan);
  outline-offset: 6px;
}

.original-wall-animals .original-work-mat img {
  max-height: 350px;
}

.original-category-nav {
  margin-top: 86px;
}

.original-gallery-page .gallery-footer-nav {
  margin-top: 30px;
}


/* 上部にも Gallery 1 内の前後移動を置き、長いページでも入口で現在位置を把握しやすくする。 */
.original-category-nav-top {
  margin-top: -18px;
  margin-bottom: 58px;
}

/* 各展示セクションにも同じカテゴリー移動を置く。現在地だけ紫の下線＋淡い背景で示す。 */
.original-collection {
  scroll-margin-top: 24px;
}

.original-collection-jump-section {
  margin-top: 15px;
}

.original-collection-jump a[aria-current="location"],
.original-collection-jump a.is-current {
  padding: 1px 5px 2px;
  border-radius: 4px;
  background: rgba(182, 164, 204, .12);
  color: #6d6873;
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-color: var(--nav-purple);
  text-decoration-thickness: 1.5px;
  text-underline-offset: .28em;
}

/* 追従する「TOP」。上部では隠し、少しスクロールしたら表示する。 */
.original-back-to-top {
  position: fixed;
  right: max(16px, calc((100vw - 1160px) / 2));
  bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 58px;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #ded8dc;
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 5px 18px rgba(73, 67, 72, .09);
  color: #747077;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 9.5px;
  line-height: 1;
  letter-spacing: .08em;
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .18s ease, border-color .18s ease, color .18s ease;
}

.original-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.original-back-to-top:hover,
.original-back-to-top:focus-visible {
  border-color: var(--nav-cyan);
  color: var(--nav-cyan-dark);
}

.original-back-to-top:focus-visible {
  outline: 2px solid var(--nav-cyan);
  outline-offset: 3px;
}

.original-back-to-top-arrow {
  font-size: 14px;
  line-height: 1;
}

/* 拡大鑑賞：外部ライブラリを使わず、ブラウザ標準のdialogで表示する。 */
.original-lightbox {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
}

.original-lightbox::backdrop {
  background: rgba(38, 35, 38, .90);
}

.original-lightbox-shell {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 46px 24px 32px;
}

.original-lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  margin: 0;
}

.original-lightbox-figure img {
  width: auto;
  max-width: min(1120px, 100%);
  max-height: calc(100vh - 112px);
  object-fit: contain;
  background: #fff;
  box-shadow: 0 18px 55px rgba(0, 0, 0, .26);
}

.original-lightbox-figure figcaption {
  min-height: 20px;
  margin-top: 10px;
  color: #d6d0d3;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .08em;
}

.original-lightbox-close,
.original-lightbox-arrow {
  border: 0;
  background: transparent;
  color: #d8d2d5;
  cursor: pointer;
}

.original-lightbox-close {
  position: absolute;
  top: 14px;
  right: 20px;
  z-index: 2;
  width: 42px;
  height: 42px;
  font-family: Arial, sans-serif;
  font-size: 31px;
  font-weight: 200;
  line-height: 1;
}

.original-lightbox-arrow {
  display: grid;
  place-items: center;
  width: 48px;
  height: 68px;
  font-family: Arial, sans-serif;
  font-size: 42px;
  font-weight: 200;
  line-height: 1;
}

.original-lightbox-close:hover,
.original-lightbox-arrow:hover {
  color: #fff;
}

.original-lightbox-close:focus-visible,
.original-lightbox-arrow:focus-visible {
  outline: 2px solid var(--nav-cyan);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .original-category-nav-top {
    margin-top: -12px;
    margin-bottom: 46px;
  }

  .original-back-to-top {
    right: 10px;
    bottom: calc(54px + env(safe-area-inset-bottom, 0px));
    min-width: 52px;
    min-height: 36px;
    padding: 6px 9px;
    font-size: 9px;
  }

  .original-gallery-main {
    padding: 28px 10px 34px;
  }

  .original-gallery-header {
    margin-bottom: 48px;
  }

  .original-gallery-title {
    font-size: clamp(1.08rem, 5vw, 1.22rem);
  }

  .original-collection-jump {
    margin-top: 17px;
    padding: 0 8px;
    font-size: 10px;
  }

  .original-collection + .original-collection {
    margin-top: 68px;
  }

  .original-collection-header {
    margin-bottom: 28px;
  }

  .original-collection-header h2 {
    font-size: 18px;
  }

  .original-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 16px;
    width: min(600px, 100%);
    max-width: 100%;
  }

  .original-work {
    width: 100%;
  }

  .original-work-button {
    width: 100%;
  }

  .original-work-mat {
    min-width: 0;
    min-height: 170px;
    width: 100%;
    padding: clamp(10px, 3.4vw, 16px);
  }

  .original-work-mat img,
  .original-wall-animals .original-work-mat img {
    max-height: 300px;
  }

  .original-category-nav {
    margin-top: 64px;
  }

  .original-lightbox-shell {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    padding: 52px 5px 24px;
  }

  .original-lightbox-arrow {
    width: 34px;
    height: 54px;
    font-size: 34px;
  }

  .original-lightbox-close {
    top: 7px;
    right: 8px;
  }

  .original-lightbox-figure img {
    max-height: calc(100vh - 104px);
  }
}

@media (max-width: 350px) {
  .original-wall {
    grid-template-columns: 1fr;
    width: min(310px, 100%);
  }

  .original-work-mat {
    min-height: 0;
    padding: 18px;
  }
}


/* v0.87 : Firestore作品台帳が空のカテゴリー表示 */
.gallery-loading-note,
.original-loading-note,
.gallery-empty-note,
.original-empty-note {
  margin: 34px auto;
  color: #8d898c;
  font-family: "Noto Sans JP", "Yu Gothic", "YuGothic", Meiryo, sans-serif;
  font-size: 12px;
  line-height: 1.8;
  text-align: center;
}
.original-loading-note,
.original-empty-note { grid-column: 1 / -1; }


/* ---------- キーボード操作用スキップリンク ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 6px;
  background: #fff;
  color: #2766d8;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .22);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ---------- 404 ---------- */
.not-found-main {
  width: min(92%, 760px);
  margin: 0 auto;
  padding: 48px 24px 88px;
  text-align: center;
}

.not-found-main h1 {
  margin: 22px 0 10px;
  color: var(--nav-purple);
  font-family: "Kiwi Maru", "Zen Kaku Gothic New", sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
}

.not-found-main p {
  margin: 0 auto 28px;
}

.not-found-home {
  display: inline-block;
  min-width: 190px;
  padding: 12px 24px;
  border: 2px solid var(--nav-cyan);
  border-radius: 999px;
  color: var(--nav-purple);
  font-weight: 700;
  text-decoration: none;
}

.not-found-home:hover,
.not-found-home:focus-visible {
  background: #eef8fa;
}


/* 視覚上は隠しつつ、読み上げと見出し構造には残す。 */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.profile-name {
  display: inline;
  margin: 0;
  line-height: inherit;
}

