/* =========================================================
   AMK Web展示室（museum.html）専用スタイル
   ホット沖縄総合研究所 2026-10-08

   ★考え方：夜の紺の地に、灯りに照らされた「和紙のパネル」が並ぶ。
     パネルの中は、現地パネル v1.1 明るい版 b2（生成りの地・紺の字・朱の帯・金の罫）を継ぐ。
   ★色は生成り・墨藍・首里朱・王国金の4色＋紙の陰だけ（feedback_amk_washi_taste）。
     ネオン・蛍光・ポップな原色は使わない
   ★style.css の地雷表をそのまま守る（body に overflow を書かない／斜体は欧文だけ／
     登場の動きは translate 系・ホバーは transform）。スマホ調整はこのファイルの末尾に置く
   ========================================================= */

.theme-night {
  --paper: #F6F0E2;
  --paper-2: #EDE3CC;
  --ink: #0B1830;
  --ink-2: #33415A;
  --gold-ink: #9A6E12;   /* 生成りの地に載せる金の字（#D9A441 だと沈む） */
}

/* ---------- 入口 ---------- */
.museum-head { padding-bottom: clamp(2rem, 5vw, 3rem); }
.museum-head .sec-head p { max-width: 40em; }
.museum-note { margin-top: 1.4rem; }
.m-gold {
  font-style: normal; font-weight: 700; color: var(--gold-lit);
  background: linear-gradient(transparent 62%, var(--marker) 62%);
}

/* 部屋の一覧 */
.room-index {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(9.2rem, 1fr)); gap: .7rem;
  margin-top: 1.6rem;
}
.room-index a {
  position: relative; display: grid; gap: .1rem; text-decoration: none;
  padding: .95rem 1rem .85rem; min-height: 44px;
  border: 1px solid var(--line); border-radius: 12px;
  background: color-mix(in srgb, var(--bg-2) 70%, transparent);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}
.room-index a:hover { border-color: var(--accent); box-shadow: 0 0 24px -12px var(--accent); }
.room-index .ri-kanji {
  position: absolute; right: .4rem; top: -.3rem;
  font-family: var(--font-brush); font-size: 3.2rem; line-height: 1;
  color: var(--kanji); opacity: .22;
}
.room-index b { font-family: var(--font-display); font-weight: 900; font-size: 1.02rem; position: relative; }
.room-index small { font-size: .76rem; color: var(--muted); letter-spacing: .08em; position: relative; }
.room-index a.is-open { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.room-index a.is-open small { color: var(--accent-lit); }
.room-index a.is-open small::before { content: "● "; color: var(--accent); }
.room-index a.is-locked { opacity: .72; }
.room-index a.is-locked small { color: #E8A396; }

/* ---------- 部屋 ---------- */
.m-room { padding: clamp(3rem, 8vw, 5.5rem) 0; }
/* 読みやすい幅に絞る（PCで1段が横に広がりすぎないように） */
.m-room > .wrap { max-width: 800px; }
.m-room-head { position: relative; margin-bottom: 1.6rem; padding-left: .2rem; }
.m-kanji {
  position: absolute; right: 0; top: -1.6rem; z-index: 0;
  font-family: var(--font-brush); font-size: clamp(6rem, 18vw, 10rem); line-height: 1;
  color: var(--kanji); opacity: .16; pointer-events: none;
}
.m-room-no {
  position: relative; display: block;
  font-family: var(--font-en); font-weight: 700; letter-spacing: .22em; font-size: .82rem; color: var(--accent);
}
.m-room-head h2 {
  position: relative; margin: .2rem 0 .3rem;
  font-family: var(--font-display); font-weight: 900; font-size: clamp(1.9rem, 5vw, 2.8rem); line-height: 1.25;
}
.m-room-place { position: relative; color: var(--muted); font-size: .92rem; }
.m-room.is-landing .m-room-head h2 { text-shadow: 0 0 28px color-mix(in srgb, var(--kingdom-gold) 60%, transparent); }
.m-sealed { margin-top: .4rem; }

/* LINEへ知らせる */
.m-line {
  display: flex; align-items: center; gap: .9rem; text-decoration: none;
  margin: 0 0 1.6rem; padding: .95rem 1.15rem; min-height: 56px;
  border: 1px solid color-mix(in srgb, var(--kingdom-gold) 60%, var(--line)); border-radius: 14px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--kingdom-gold) 20%, transparent), color-mix(in srgb, var(--bg-2) 80%, transparent));
  box-shadow: 0 14px 40px -26px var(--kingdom-gold);
}
a.m-line:hover { border-color: var(--gold-lit); }
.m-line b { display: block; font-size: 1.04rem; color: var(--text); }
.m-line small { display: block; font-size: .8rem; color: var(--muted); line-height: 1.5; }
.m-line-mark {
  flex: none; display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: 12px;
  background: var(--kingdom-gold); color: var(--ink);
  font-family: var(--font-en); font-weight: 900; font-size: .78rem; letter-spacing: .04em;
}
.m-line--manual { border-style: dashed; box-shadow: none; }

/* ---------- パネル（和紙） ---------- */
.m-panel {
  position: relative; isolation: isolate;
  margin: 0 0 1.6rem; overflow: hidden;
  background: var(--paper); color: var(--ink);
  border-radius: 6px;
  /* 夜の灯りに照らされた紙：上から光が当たり、下に影が落ちる */
  box-shadow: 0 0 0 1px rgba(217, 164, 65, .55), 0 0 0 6px rgba(246, 240, 226, .06),
              0 30px 70px -36px rgba(243, 216, 150, .55), 0 18px 40px -20px rgba(0, 0, 0, .7);
}
.m-panel::before {
  /* 和紙の繊維と焼け（SVGノイズを乗算） */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% 0%, transparent 55%, rgba(154, 110, 18, .10) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' seed='4'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .36 0 0 0 0 .2 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* 上の朱の帯（番号と見る場所） */
.m-band {
  display: flex; flex-wrap: wrap; align-items: center; gap: .3rem 1rem;
  padding: .7rem 1.2rem; background: var(--shuri-red); color: #FBF3E4;
  border-bottom: 2px solid var(--kingdom-gold);
}
.m-num { font-family: var(--font-display); font-weight: 900; font-size: 1.1rem; letter-spacing: .06em; }
.m-place { font-size: .84rem; line-height: 1.5; }
.m-place i { font-style: normal; color: var(--gold-lit); margin-right: .3em; }

/* 図版：主図版を大きく、副図版は横に小さく */
.m-figs { display: grid; gap: 2px; background: var(--paper-2); }
.m-figs--2 { grid-template-columns: 2fr 1fr; }
.m-figs img { width: 100%; height: 100%; object-fit: cover; }
.m-figs--1 .m-img-main { aspect-ratio: 3 / 2; }
.m-figs--2 .m-img-main { aspect-ratio: 3 / 2; }
.m-figs--2 .m-img-sub { aspect-ratio: auto; }

.m-body { padding: clamp(1.3rem, 4vw, 2.2rem) clamp(1.2rem, 4.4vw, 2.6rem) clamp(1.6rem, 4vw, 2.4rem); }
.m-name { display: grid; gap: .1rem; margin-bottom: .9rem; padding-bottom: .9rem; border-bottom: 1px solid rgba(154, 110, 18, .45); }
.m-ruby { font-size: .82rem; letter-spacing: .14em; color: var(--ink-2); }
.m-name h3 {
  margin: 0; font-family: var(--font-display); font-weight: 900; color: var(--ink);
  font-size: clamp(1.9rem, 6.4vw, 2.7rem); line-height: 1.2; letter-spacing: .02em;
}
.m-en { font-family: var(--font-en); font-style: italic; font-weight: 500; font-size: 1.02rem; color: var(--gold-ink); }
.m-sub { font-size: .86rem; color: var(--ink-2); }
.m-catch {
  margin: 0 0 1rem; padding-left: .8rem; border-left: 4px solid var(--shuri-red);
  font-family: var(--font-display); font-weight: 900; font-size: clamp(1.12rem, 3.6vw, 1.32rem); line-height: 1.6; color: var(--ink);
}
.m-text { margin: 0 0 .85rem; font-size: 1.02rem; line-height: 2; color: #1E2A3C; }
/* 金字：謎で使う言葉。生成りの地では濃い金＋マーカー */
.m-panel .m-gold {
  color: var(--gold-ink); font-weight: 900;
  background: linear-gradient(transparent 60%, rgba(217, 164, 65, .45) 60%);
}

/* ---------- 付属の図 ---------- */
.m-extra { margin: 1.3rem 0 0; }
.m-extra figcaption { font-size: .8rem; letter-spacing: .12em; color: var(--ink-2); margin-bottom: .55rem; }
.m-extra--map figcaption { margin: .4rem 0 0; text-align: center; }
.m-mapwrap { position: relative; }
.m-map { width: 100%; border-radius: 4px; border: 1px solid rgba(154, 110, 18, .5); }
.m-pins { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-pins .mp-road { fill: none; stroke: var(--paper); stroke-width: 14; opacity: .85; }
.m-pins .mp-dash { fill: none; stroke: var(--shuri-red); stroke-width: 6; stroke-dasharray: 22 14; }
.m-pins .mp-dot { fill: var(--kingdom-gold); stroke: var(--ink); stroke-width: 5; }
.m-pins .mp-dot.is-shop { fill: var(--ink); stroke: var(--paper); }
.m-pins .mp-no { font-family: var(--font-en); font-weight: 900; font-size: 44px; fill: var(--ink); }
.m-pins .mp-no.is-shop { fill: var(--paper); }
.m-pins .mp-label { font-family: var(--font-display); font-weight: 900; font-size: 74px; fill: var(--ink); stroke: var(--paper); stroke-width: 16px; paint-order: stroke; }
.m-route { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .45rem; }
.m-route li { display: grid; grid-template-columns: 2.2rem 4.2rem 1fr; align-items: center; gap: .6rem; font-size: .96rem; }
.m-route-no {
  display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-weight: 700;
}
.m-route li:last-child .m-route-no { background: var(--shuri-red); }
.m-route b { font-family: var(--font-display); font-weight: 900; font-size: 1.08rem; }
.m-scale { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.m-scale span {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: clamp(.82rem, 3vw, 1rem);
}
.m-scale span.is-blank { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 2px var(--ink-2); }
.m-chars { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; }
.m-chars span {
  display: grid; place-items: center; aspect-ratio: 1;
  border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 900; font-size: clamp(1.05rem, 4.4vw, 1.5rem);
}
.m-chars span.is-long { font-size: clamp(.78rem, 3vw, 1rem); }
.m-pairs { display: grid; grid-template-columns: repeat(2, 1fr); gap: .45rem; }
.m-pairs span {
  display: flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .55rem; border: 1px solid rgba(11, 24, 48, .25); border-radius: 6px; background: rgba(255, 255, 255, .35);
}
.m-pairs i { font-style: normal; font-family: var(--font-display); font-weight: 900; font-size: 1.12rem; }
.m-pairs b { color: var(--shuri-red); }
.m-timeline { list-style: none; padding: 0; border-left: 2px solid var(--kingdom-gold); margin-left: .4rem; }
.m-timeline li { position: relative; padding: 0 0 .9rem 1.1rem; }
.m-timeline li::before {
  content: ""; position: absolute; left: -.42rem; top: .55rem; width: .7rem; height: .7rem; border-radius: 50%;
  background: var(--shuri-red); box-shadow: 0 0 0 3px var(--paper);
}
.m-timeline b { font-family: var(--font-display); font-weight: 900; font-size: 1.06rem; }
.m-timeline p { margin: .1rem 0 0; font-size: .98rem; line-height: 1.9; color: #1E2A3C; }
.m-copies { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.m-copies li { display: grid; grid-template-columns: 5rem 1fr; gap: .6rem; padding: .55rem .7rem; border: 1px solid rgba(154, 110, 18, .45); border-radius: 6px; }
.m-copies b { font-family: var(--font-display); font-weight: 900; color: var(--shuri-red); }

/* 沖縄本島の簡略図 */
.m-okinawa { width: 100%; height: auto; display: block; }
.m-okinawa .mk-land { fill: var(--paper-2); stroke: var(--ink); stroke-width: 4; stroke-linejoin: round; }
.m-okinawa .mk-lead { stroke: #6B6253; stroke-width: 2; }
.m-okinawa .mk-dot { fill: var(--shuri-red); stroke: var(--paper); stroke-width: 4; }
.m-okinawa .mk-dot2 { fill: #6B6253; stroke: var(--paper); stroke-width: 4; }
.m-okinawa .mk-name { font-family: var(--font-display); font-weight: 900; font-size: 52px; fill: var(--ink); }
.m-okinawa .mk-name.is-small { font-size: 40px; }
.m-okinawa .mk-sub { font-family: var(--font); font-size: 32px; fill: #6B6253; }
.m-okinawa .mk-ring { fill: none; stroke: #6B6253; stroke-width: 2; }
.m-okinawa .mk-needle { fill: var(--shuri-red); }
.m-okinawa .mk-dir { font-family: var(--font-display); font-weight: 900; font-size: 44px; fill: var(--ink); }

/* 演出：パネルの登場は style.css の [data-reveal]／.in-view（main.js）にまかせる。ここでは足さない */

/* =========================================================
   ▼スマホ調整（ベース定義より後に置く）
   ========================================================= */
@media (max-width: 640px) {
  .room-index { grid-template-columns: repeat(2, 1fr); }
  .m-figs--2 { grid-template-columns: 1fr; }
  .m-figs--2 .m-img-sub { aspect-ratio: 3 / 2; }
  .m-route li { grid-template-columns: 2rem 3.6rem 1fr; font-size: .9rem; }
  .m-copies li { grid-template-columns: 4.2rem 1fr; font-size: .94rem; }
  .m-band { padding: .6rem 1rem; }
}

/* =========================================================
   Ｃ案（古地図）のトーン（10/13 デザインMTG：現地の入口パネル v4.0 と同じトーンにそろえる）
   日焼けした和紙・墨茶の字・朱の破線と押印・羅針盤。夜の藍の地はそのまま、パネルだけ古地図にする
   ========================================================= */
.m-panel {
  background:
    radial-gradient(ellipse at 50% 38%, #F6EBCF 0%, #EEDDB5 52%, #DCC08A 88%, #C9A468 100%);
  color: #2A1C0E;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(90, 62, 30, .55), 0 0 0 7px rgba(246, 235, 207, .08),
              0 30px 70px -36px rgba(243, 216, 150, .5), 0 18px 40px -20px rgba(0, 0, 0, .7);
}
.m-panel::after {
  content: ""; position: absolute; inset: 10px; z-index: 2; pointer-events: none;
  border: 1.5px dashed rgba(199, 62, 46, .7); border-radius: 2px;
}
.m-band {
  background: transparent !important; color: #C73E2E !important;
  border-bottom: 1px solid rgba(90, 62, 30, .35);
}
.m-band .m-num {
  display: inline-block; padding: .1rem .6rem; border: 3px double #C73E2E; transform: rotate(-3deg);
  font-family: "Zen Old Mincho", serif; color: #C73E2E;
}
.m-band .m-place { color: #5A3E1E; }
.m-band .m-place i { color: #C73E2E; }
.m-figs { background: #E4CB95; }
.m-figs img { filter: sepia(.35) saturate(.9) contrast(1.02); }
.m-name { border-bottom: 1.5px dashed rgba(199, 62, 46, .6); }
.m-name h3 { font-family: "Yuji Syuku", "Zen Old Mincho", serif; font-weight: 400; color: #2A1C0E; letter-spacing: .04em; }
.m-ruby, .m-sub { color: #5A3E1E; }
.m-en { color: #8A5A1E; }
.m-catch { color: #2A1C0E; border-left-color: #C73E2E !important; }
.m-text { color: #2A1C0E; }
.m-panel .m-gold { color: #9A2E1E; background: linear-gradient(transparent 62%, rgba(199, 62, 46, .18) 62%); }

/* =========================================================
   v2（2026-10-23 ウェブ展示室のUI MTG）
   ・1部屋ずつ横に移る（museum.js の show()）。登場は translate 系（地雷表 #19）
   ・部屋の上に、その展示場の図版を「展示室の入口」として敷き、下はスポットライトの当たる壁にする
   ・一覧は2段：上＝展示場（誰でも）、下＝周遊プログラム専用（朱）
   ・一覧のデザイン3案：body[data-ui=a] 札／b 扉／c 掛け札
   ========================================================= */
.museum { position: relative; }
.m-stage { position: relative; overflow-x: clip; }
.m-room { padding: 0 0 clamp(3rem, 8vw, 5rem); position: relative; isolation: isolate; }
/* 展示室の壁：上からスポットライト、柱の目地、足元に床の陰 */
.m-room::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 34% at 50% 0%, rgba(243, 216, 150, .10), transparent 70%),
    radial-gradient(42% 60% at 18% 40%, rgba(243, 216, 150, .05), transparent 70%),
    radial-gradient(42% 60% at 82% 70%, rgba(243, 216, 150, .05), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 140px),
    linear-gradient(180deg, #0B1830 0%, #0A1426 60%, #070E1B 100%);
}
.m-room > .m-room-body { max-width: 800px; }
.m-room-hero {
  position: relative; margin-bottom: clamp(1rem, 3vw, 1.6rem);
  padding: clamp(5.5rem, 22vw, 11rem) 0 clamp(1.2rem, 4vw, 2rem);
  background:
    linear-gradient(180deg, rgba(6, 15, 30, .15) 0%, rgba(6, 15, 30, .35) 45%, #0B1830 100%),
    var(--room-bg, none) center 60% / cover no-repeat,
    #0E2039;
}
.m-room-hero::after {
  /* 額縁の金の細線（入口の看板の見立て） */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 164, 65, .7), transparent);
}
.m-room-hero .wrap { max-width: 800px; }
.m-room-hero .m-room-head { margin-bottom: 0; }
.m-room-hero .m-room-head h2 { text-shadow: 0 2px 18px rgba(0, 0, 0, .8); }
.m-room-hero .m-room-place { color: #E6EEF7; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.m-room-hero .m-kanji { opacity: .3; top: -2.4rem; text-shadow: 0 0 30px rgba(0, 0, 0, .6); }
.m-tourtag {
  position: relative; display: inline-block; margin-bottom: .5rem; padding: .18rem .7rem;
  border: 1px solid #E8A396; border-radius: 999px; background: rgba(199, 62, 46, .82);
  color: #FFF4EC; font-size: .74rem; letter-spacing: .12em;
}
.m-room.is-locked .m-room-hero { background: linear-gradient(180deg, rgba(199, 62, 46, .12), #0B1830), #0E2039; }

/* 横に移る動き */
@keyframes mSlideR { from { opacity: 0; translate: 42px 0; } to { opacity: 1; translate: 0 0; } }
@keyframes mSlideL { from { opacity: 0; translate: -42px 0; } to { opacity: 1; translate: 0 0; } }
.m-room.slide-from-right { animation: mSlideR .38s var(--ease-out) both; }
.m-room.slide-from-left { animation: mSlideL .38s var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .m-room.slide-from-right, .m-room.slide-from-left { animation: none; } }

/* 前へ・次へ */
.m-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: .6rem; margin: 0 0 1.4rem; }
.m-pager--bottom { margin: 2rem 0 0; }
.m-pg {
  display: grid; gap: .05rem; min-height: 56px; padding: .6rem .9rem; cursor: pointer;
  border: 1px solid color-mix(in srgb, var(--kingdom-gold) 55%, var(--line)); border-radius: 12px;
  background: color-mix(in srgb, var(--bg-2) 85%, transparent); color: var(--text); font: inherit;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.m-pg:hover { border-color: var(--gold-lit); box-shadow: 0 0 22px -10px var(--kingdom-gold); }
.m-pg:active { transform: scale(.98); }
.m-pg--prev { text-align: left; }
.m-pg--next { text-align: right; }
.m-pg small { font-size: .72rem; letter-spacing: .1em; color: var(--accent-lit); }
.m-pg b { font-family: var(--font-display); font-weight: 900; font-size: .98rem; line-height: 1.35; }
.m-pg.is-tour { border-color: rgba(232, 163, 150, .7); }
.m-pg.is-tour small { color: #F0B3A6; }
.m-pg.is-empty { border: 0; background: none; cursor: default; }
.m-pg-count { align-self: center; font-family: var(--font-en); font-size: .82rem; letter-spacing: .12em; color: var(--muted); }

/* 4つの展示場の中の「周遊プログラムに参加中の方へ」 */
.m-tourbox {
  margin: 0 0 1.6rem; padding: .9rem 1rem 1rem;
  border: 1px dashed rgba(232, 163, 150, .55); border-radius: 14px; background: rgba(199, 62, 46, .07);
}
.m-tourbox-h { margin: 0 0 .6rem; font-size: .82rem; letter-spacing: .06em; color: #F0B3A6; }
.m-tourbox-h span::before { content: "◆ "; color: var(--shuri-red); }
.m-tourbox .m-line { margin: 0; }
.m-sealed-note { font-size: .84rem; color: var(--muted); margin-top: .8rem; }

/* ---------- 一覧（2段） ---------- */
.room-index { display: grid; gap: 1.6rem; grid-template-columns: 1fr; }
.ri-group { display: grid; gap: .7rem; }
.ri-h { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.ri-h b { font-family: var(--font-display); font-weight: 900; font-size: 1.12rem; color: var(--gold-lit); }
.ri-h span { font-size: .8rem; color: var(--muted); letter-spacing: .06em; }
.ri-group--tour { padding: 1rem 1rem 1.1rem; border-radius: 14px; border: 1px solid rgba(232, 163, 150, .35); background: rgba(199, 62, 46, .06); }
.ri-group--tour .ri-h b { color: #F0B3A6; }
.ri-note { margin: -.2rem 0 0; font-size: .82rem; line-height: 1.7; color: var(--muted); }
.ri-list { display: grid; gap: .7rem; grid-template-columns: repeat(4, 1fr); }
.ri-group--tour .ri-list { grid-template-columns: repeat(3, 1fr); }
.room-index a.ri { position: relative; display: grid; align-content: end; gap: .1rem; min-height: 5.2rem; text-decoration: none; overflow: hidden; }
.room-index a.ri[aria-current="page"] { box-shadow: 0 0 0 2px var(--gold-lit), 0 0 26px -8px var(--kingdom-gold); }
.room-index a.ri--tour.is-open small { color: #F6C6BB; }
.room-index a.ri--tour.is-open small::before { color: var(--shuri-red); }
.ri-door { display: none; }

/* 案A：札（既定）— 現行のカードを踏襲。周遊は朱の札 */
[data-ui="a"] .room-index a.ri { padding: .95rem 1rem .85rem; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--bg-2) 70%, transparent); }
[data-ui="a"] .room-index a.ri--all { border-color: color-mix(in srgb, var(--kingdom-gold) 55%, var(--line)); }
[data-ui="a"] .room-index a.ri--tour { border-color: rgba(232, 163, 150, .55); background: linear-gradient(160deg, rgba(199, 62, 46, .28), rgba(14, 32, 57, .7)); }

/* 案B：扉 — 下の「v2.1 扉（画像パーツ）」で描く */

/* 案C：掛け札 — 縄に吊るした木札。縦書きの部屋名。周遊は朱の札 */
[data-ui="c"] .ri-list { gap: .5rem; padding-top: 1rem; position: relative; }
[data-ui="c"] .ri-list::before { content: ""; position: absolute; left: 0; right: 0; top: .35rem; height: 3px; border-radius: 3px; background: repeating-linear-gradient(90deg, #8A6A3C 0 6px, #6B4E28 6px 9px); }
[data-ui="c"] .room-index a.ri {
  min-height: 10rem; padding: 1rem .3rem .7rem; justify-items: center; align-content: start; text-align: center;
  border-radius: 6px 6px 10px 10px; border: 1px solid rgba(90, 62, 30, .8);
  background: linear-gradient(90deg, rgba(0, 0, 0, .12), transparent 30%, transparent 70%, rgba(0, 0, 0, .14)),
    repeating-linear-gradient(180deg, #D9BE8C 0 7px, #CFB07A 7px 9px);
  color: #2A1C0E; box-shadow: 0 10px 18px -10px rgba(0, 0, 0, .8); transform-origin: 50% -1rem;
  transition: rotate .4s var(--ease-spring);
}
[data-ui="c"] .room-index a.ri::before { content: ""; position: absolute; top: .35rem; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #2A1C0E; box-shadow: inset 0 0 0 2px #8A6A3C; }
[data-ui="c"] .room-index a.ri:hover { rotate: 3deg; }
[data-ui="c"] .room-index a.ri .ri-kanji { position: relative; right: auto; top: auto; font-size: 2rem; opacity: .9; color: #5A3E1E; margin-top: .5rem; }
[data-ui="c"] .room-index a.ri b { writing-mode: vertical-rl; font-size: .95rem; letter-spacing: .12em; color: #2A1C0E; margin: .3rem 0; }
[data-ui="c"] .room-index a.ri small { color: #5A3E1E; font-size: .68rem; }
[data-ui="c"] .room-index a.ri.is-open small::before { color: #2E7D4F; }
[data-ui="c"] .room-index a.ri.is-locked { opacity: .85; filter: grayscale(.35); }
[data-ui="c"] .room-index a.ri.is-locked small { color: #9A2E1E; }
[data-ui="c"] .room-index a.ri--tour { background: linear-gradient(90deg, rgba(0, 0, 0, .14), transparent 30%, transparent 70%, rgba(0, 0, 0, .16)), repeating-linear-gradient(180deg, #B8452F 0 7px, #A83C28 7px 9px); border-color: #6E1F14; }
[data-ui="c"] .room-index a.ri--tour b, [data-ui="c"] .room-index a.ri--tour .ri-kanji, [data-ui="c"] .room-index a.ri--tour small { color: #FFF1E6; }

/* デザイン案の切り替え（?preview=amk2026 か ?ui= で来たときだけ出す） */
.ui-switch { position: fixed; right: .6rem; bottom: 4.6rem; z-index: 60; display: flex; gap: .3rem; padding: .35rem; border-radius: 999px; background: rgba(6, 15, 30, .92); border: 1px solid var(--line); }
.ui-switch a { padding: .3rem .7rem; border-radius: 999px; font-size: .75rem; color: var(--text); text-decoration: none; border: 1px solid transparent; }
.ui-switch a[aria-current="true"] { border-color: var(--kingdom-gold); color: var(--gold-lit); }

/* クイックナビ：今いる部屋・周遊専用の部屋 */
.quicknav a[aria-current="page"] { border-color: var(--accent); color: var(--accent-lit); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.quicknav a.is-tour { border-color: rgba(232, 163, 150, .45); }
.quicknav a.is-locked { opacity: .6; }

@media (max-width: 640px) {
  .ri-list { grid-template-columns: repeat(2, 1fr); }
  .ri-group--tour .ri-list { grid-template-columns: repeat(3, 1fr); }
  [data-ui="c"] .ri-list { grid-template-columns: repeat(4, 1fr); }
  [data-ui="c"] .room-index a.ri { min-height: 9rem; }
  [data-ui="c"] .room-index a.ri b { font-size: .84rem; }
  [data-ui="c"] .room-index a.ri small { font-size: .6rem; letter-spacing: 0; white-space: nowrap; }
  [data-ui="c"] .ri-group--tour .ri-list { grid-template-columns: repeat(3, 1fr); }
  .m-pg { padding: .5rem .65rem; min-height: 52px; }
  .m-pg b { font-size: .86rem; }
}

/* =========================================================
   v2.1 扉（画像パーツ）— 10/23 白石「扉が良い。チープすぎる。画像生成でパーツを作ってよい」
   パーツ：assets/doors/（生成過程資料/web_museum/door_parts/ の gen_door_parts.mjs → cut_door_parts.py）
     gate＝朱の柱と瓦屋根の門（開口部は透過）／leaf_kuro_*＝黒漆に金具の扉（展示場）／leaf_shu_*＝朱漆の扉（周遊専用）／plaque＝扁額
   開口部の位置（門の画像に対する割合）：左 18.95%・上 33.1%・幅 62.09%・高さ 66.9%（door_parts.json）
   ========================================================= */
[data-ui="b"] .ri-list { gap: 1.1rem .9rem; }
[data-ui="b"] .ri-group--all .ri-list { grid-template-columns: repeat(4, 1fr); }
[data-ui="b"] .room-index a.ri {
  min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; overflow: visible;
  display: grid; align-content: start; justify-items: center; gap: .15rem; text-align: center;
}
[data-ui="b"] .room-index a.ri > .ri-kanji { display: none; }
[data-ui="b"] .room-index a.ri[aria-current="page"] { box-shadow: none; }
[data-ui="b"] .room-index a.ri b { margin-top: .35rem; font-size: .95rem; position: relative; }
[data-ui="b"] .room-index a.ri small { position: relative; font-size: .72rem; white-space: nowrap; }
[data-ui="b"] .ri-door {
  display: block; position: relative; width: 100%; aspect-ratio: 1013 / 1432; container-type: inline-size;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55));
  transition: transform .4s var(--ease-out), filter .4s;
}
[data-ui="b"] .room-index a.ri:hover .ri-door { transform: translateY(-3px); filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .6)) drop-shadow(0 0 18px rgba(243, 216, 150, .25)); }
[data-ui="b"] .room-index a.ri[aria-current="page"] .ri-door { filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .55)) drop-shadow(0 0 16px rgba(243, 216, 150, .55)); }
[data-ui="b"] .room-index a.ri[aria-current="page"] b { color: var(--gold-lit); }

/* 扉の奥：部屋の図版＋灯り */
.ri-door .dr-open {
  position: absolute; left: 18.95%; top: 33.1%; width: 62.09%; height: 66.9%;
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  background:
    radial-gradient(70% 55% at 50% 72%, rgba(255, 214, 140, .55), rgba(255, 190, 110, .12) 60%, transparent 75%),
    var(--room-bg, none) center 55% / cover no-repeat,
    linear-gradient(180deg, #2A1A0C, #120B05);
}
.ri-door .dr-open::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 18px 6px rgba(10, 6, 2, .75); }
/* 扉：門の開口部より少し大きくして、ふちを門の枠の下にもぐらせる */
.ri-door .dr-leaf {
  position: absolute; top: 27.6%; width: 32.05%; height: 72.4%;
  background-size: 100% 100%; background-repeat: no-repeat;
  transition: transform .7s var(--ease-out), filter .7s;
  backface-visibility: hidden;
}
.ri-door .dr-l { left: 17.95%; transform-origin: 0 50%; background-image: url("doors/leaf_kuro_l.webp"); transform: perspective(520px) rotateY(0); }
.ri-door .dr-r { left: 50%; transform-origin: 100% 50%; background-image: url("doors/leaf_kuro_r.webp"); transform: perspective(520px) rotateY(0); }
.ri--tour .ri-door .dr-l { background-image: url("doors/leaf_shu_l.webp"); }
.ri--tour .ri-door .dr-r { background-image: url("doors/leaf_shu_r.webp"); }
/* 開いている部屋：扉が少し開き、中の灯りが漏れる。触れるともう少し開く */
.ri.is-open .ri-door .dr-l { transform: perspective(520px) rotateY(48deg); filter: brightness(.82); }
.ri.is-open .ri-door .dr-r { transform: perspective(520px) rotateY(-48deg); filter: brightness(.82); }
.ri.is-open:hover .ri-door .dr-l, .ri.is-open[aria-current="page"] .ri-door .dr-l { transform: perspective(520px) rotateY(66deg); }
.ri.is-open:hover .ri-door .dr-r, .ri.is-open[aria-current="page"] .ri-door .dr-r { transform: perspective(520px) rotateY(-66deg); }
.ri.is-locked .ri-door .dr-open { background: linear-gradient(180deg, #1A1008, #0B0704); }
/* 門の枠（いちばん上に重ねる） */
.ri-door .dr-gate { position: absolute; inset: 0; background: url("doors/gate.webp") center / 100% 100% no-repeat; pointer-events: none; }
/* 扁額：門の欄間に掛け、展示場の一字を金の筆文字で入れる */
.ri-door .dr-plaque {
  position: absolute; left: 34%; top: 19.6%; width: 32%; aspect-ratio: 1.656;
  display: grid; place-items: center;
  background: url("doors/plaque.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}
.ri-door .dr-plaque b {
  margin: 0 !important; font-family: var(--font-brush); font-weight: 400; font-size: 13cqw !important; line-height: 1;
  color: #F3D896; text-shadow: 0 0 6px rgba(217, 164, 65, .7), 0 1px 0 #6E4A12;
}
/* 封印：まだ開かない部屋の扉の合わせ目に、封の札を貼る */
.ri-door .dr-seal {
  position: absolute; left: 50%; top: 57%; translate: -50% 0; rotate: -5deg;
  width: 26%; padding: 3cqw 0; text-align: center;
  background: linear-gradient(180deg, #F7F0DE, #E9DDBF); border: 1px solid rgba(90, 62, 30, .5);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
  font-family: var(--font-brush); font-size: 11cqw; line-height: 1; color: #B3261C;
}
.ri-door .dr-seal::after { content: ""; position: absolute; left: 50%; top: 50%; width: 150%; height: 1.4cqw; translate: -50% -50%; background: rgba(199, 62, 46, .55); z-index: -1; }
.ri.is-locked > b, .ri.is-locked > small { opacity: .85; }

@media (max-width: 640px) {
  [data-ui="b"] .ri-group--all .ri-list { grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.4rem; padding: 0 .8rem; }
  [data-ui="b"] .ri-group--tour .ri-list { grid-template-columns: repeat(3, 1fr); gap: .9rem .7rem; }
  [data-ui="b"] .ri-group--tour .room-index a.ri b, [data-ui="b"] .ri-group--tour a.ri b { font-size: .78rem; }
}
@media (prefers-reduced-motion: reduce) { .ri-door .dr-leaf { transition: none; } }
/* PCで扉が大きくなりすぎないように */
[data-ui="b"] .room-index a.ri { width: 100%; max-width: 230px; justify-self: center; }
[data-ui="b"] .ri-group--tour .ri-list { max-width: 640px; margin: 0 auto; width: 100%; }
[data-ui="b"] .ri-group--tour .room-index a.ri, [data-ui="b"] .ri-group--tour a.ri { max-width: 180px; }

/* =========================================================
   v2.2 — 10/23 白石「方向性はいいが、もう少し控えめで厳かに。展示室の後ろの背景は薄い赤テイストに」
   ・地：夜の藍から、朱を薄く刷いた弁柄（べんがら）の暗い赤へ。博物館の赤い展示室の壁の見立て
   ・扉：彩度と明るさを落とし、金のぎらつき・発光・浮き上がる動きをやめる。扉の開きも小さく、ゆっくり
   ========================================================= */
body.theme-night[data-page="museum"] {
  --bg: #2A1412; --bg-2: #3A1B17;
  --line: rgba(226, 170, 150, .22);
  --spot: #B4553F;
  --muted: #C9B3A8; --body: #E6D6CC;
  background: #2A1412;
}
/* 展示室の壁：薄い朱の壁に、上からの控えめな灯り */
.m-room::before {
  background:
    radial-gradient(56% 30% at 50% 0%, rgba(243, 216, 170, .08), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 230, 210, .016) 0 1px, transparent 1px 160px),
    linear-gradient(180deg, #5A251D 0%, #47201A 45%, #2A1412 100%);
}
.m-room-hero {
  background:
    linear-gradient(180deg, rgba(30, 17, 16, .2) 0%, rgba(42, 20, 18, .45) 50%, #5A251D 100%),
    var(--room-bg, none) center 60% / cover no-repeat,
    #47201A;
}
.m-room.is-locked .m-room-hero { background: linear-gradient(180deg, rgba(150, 50, 36, .3), #5A251D), #47201A; }
.m-room-hero::after { background: linear-gradient(90deg, transparent, rgba(217, 164, 65, .45), transparent); }
.ri-group--tour { background: rgba(120, 40, 30, .14); border-color: rgba(226, 170, 150, .28); }
.m-tourbox { background: rgba(120, 40, 30, .14); }
.m-pg { background: rgba(58, 27, 23, .85); }
.quicknav { background: rgba(42, 20, 18, .92) !important; }
.site-header { background: rgba(42, 20, 18, .88) !important; }

/* 扉：控えめで厳かに */
[data-ui="b"] .ri-door {
  filter: saturate(.62) brightness(.86) sepia(.14) contrast(1.04) drop-shadow(0 8px 12px rgba(0, 0, 0, .55));
  transition: filter .9s ease;
}
[data-ui="b"] .room-index a.ri:hover .ri-door,
[data-ui="b"] .room-index a.ri[aria-current="page"] .ri-door {
  transform: none;
  filter: saturate(.7) brightness(.94) sepia(.12) contrast(1.04) drop-shadow(0 8px 12px rgba(0, 0, 0, .55));
}
[data-ui="b"] .room-index a.ri b { font-weight: 700; letter-spacing: .08em; color: #EFE3D2; }
[data-ui="b"] .room-index a.ri[aria-current="page"] b { color: #EFE3D2; }
[data-ui="b"] .room-index a.ri[aria-current="page"] b::after {
  content: ""; display: block; width: 1.6em; height: 1px; margin: .3rem auto 0; background: rgba(217, 164, 65, .8);
}
[data-ui="b"] .room-index a.ri small { color: #BFA99C; letter-spacing: .1em; }
[data-ui="b"] .room-index a.ri.is-open small::before { color: #B8891F; }
.ri-door .dr-open {
  background:
    radial-gradient(70% 55% at 50% 75%, rgba(255, 214, 150, .22), transparent 70%),
    var(--room-bg, none) center 55% / cover no-repeat,
    linear-gradient(180deg, #2A1A0C, #120B05);
}
.ri-door .dr-open::after { box-shadow: inset 0 0 22px 8px rgba(10, 6, 2, .82); }
.ri-door .dr-leaf { transition: transform 1.6s cubic-bezier(.22, .8, .3, 1), filter 1.6s; }
.ri.is-open .ri-door .dr-l { transform: perspective(520px) rotateY(30deg); filter: brightness(.78); }
.ri.is-open .ri-door .dr-r { transform: perspective(520px) rotateY(-30deg); filter: brightness(.78); }
.ri.is-open:hover .ri-door .dr-l, .ri.is-open[aria-current="page"] .ri-door .dr-l { transform: perspective(520px) rotateY(44deg); }
.ri.is-open:hover .ri-door .dr-r, .ri.is-open[aria-current="page"] .ri-door .dr-r { transform: perspective(520px) rotateY(-44deg); }
.ri-door .dr-plaque b { color: #E2C98E; text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }
.ri-door .dr-seal { background: linear-gradient(180deg, #E9E0CB, #D9CCAE); color: #8E2318; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
.ri-door .dr-seal::after { background: rgba(142, 35, 24, .45); }
