/* ================================================================
   原田英語の超絶名画ミュージアム — style.css
   昼（day）と夜＝ナイトミュージアム（night）の2つのテーマ。色はすべて :root のトークン
   ================================================================ */
:root {
  --bg: #f7f2e8;
  --bg2: #efe7d6;
  --wall: #e9dfcb;
  --card: #fffdf8;
  --ink: #1d1a26;
  --ink2: #3b3646;
  --muted: #6e6878;
  --line: #e2d6bf;
  --gold: #b8892e;
  --gold2: #e3c06d;
  --gold-ink: #8a6418;
  --crimson: #9b1d33;
  --navy: #1b2a52;
  --moon: #5c7bd9;
  --ok: #1e9b62;
  --ng: #d6334d;
  --hl: #fff0b3;
  --shadow: 0 1px 2px rgba(40, 28, 10, 0.06), 0 10px 30px -12px rgba(40, 28, 10, 0.25);
  --shadow-lg: 0 2px 6px rgba(40, 28, 10, 0.08), 0 30px 60px -20px rgba(40, 28, 10, 0.45);
  --r: 18px;
  --jp: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Noto Sans JP', 'Yu Gothic UI', Meiryo, system-ui, sans-serif;
  --mincho: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --en: 'Cormorant Garamond', 'Georgia', serif;
  --round: 'Zen Maru Gothic', var(--jp);
  --frame: linear-gradient(135deg, #7a5313 0%, #e9c46a 18%, #a87a22 34%, #f7dc8f 50%, #9c6d1c 66%, #e2b955 82%, #6b470f 100%);
  color-scheme: light;
}
:root[data-mode='night'] {
  --bg: #070913;
  --bg2: #0d1124;
  --wall: #10152c;
  --card: #121834;
  --ink: #f1ecdf;
  --ink2: #d8d2c2;
  --muted: #9a97ab;
  --line: #262d50;
  --gold: #e6c069;
  --gold2: #ffe3a1;
  --gold-ink: #f3d389;
  --crimson: #ff6b81;
  --navy: #9fb4ff;
  --moon: #b9c8ff;
  --hl: #4a3d12;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 10px 30px -12px rgba(0, 0, 0, 0.8);
  --shadow-lg: 0 30px 70px -20px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--jp);
  font-size: 16px;
  line-height: 1.85;
  overflow-x: hidden;
  transition: background 0.6s, color 0.6s;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}
.wrap {
  width: min(1180px, 100% - 32px);
  margin-inline: auto;
}
.wrap-n {
  width: min(820px, 100% - 32px);
  margin-inline: auto;
}
.en {
  font-family: var(--en);
  font-weight: 600;
  letter-spacing: 0.01em;
}
.mincho {
  font-family: var(--mincho);
}
.muted {
  color: var(--muted);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- ヘッダー ---------- */
.hd {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.hd-in {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}
.logo img {
  width: 44px;
  height: 44px;
  flex: none;
  transition: transform 0.4s cubic-bezier(0.2, 1.6, 0.4, 1);
}
.logo:hover img {
  transform: rotate(-8deg) scale(1.08);
}
.logo b {
  display: block;
  font-family: var(--mincho);
  font-size: 17px;
  line-height: 1.15;
  white-space: nowrap;
}
.logo small {
  display: block;
  font-family: var(--en);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--gold-ink);
  font-weight: 700;
}
.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
}
.nav a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 8px 11px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav a:hover,
.nav a[aria-current] {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
}
.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 6px 12px 6px 8px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.mode-btn .ic {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #ffd56b, #ff9f43);
  font-size: 15px;
  transition: transform 0.6s cubic-bezier(0.3, 1.5, 0.4, 1), background 0.6s;
}
:root[data-mode='night'] .mode-btn .ic {
  background: linear-gradient(135deg, #2b3a7a, #0d1330);
  transform: rotate(360deg);
}
.menu-btn {
  display: none;
  border: 0;
  background: none;
  font-size: 24px;
  padding: 6px;
}
@media (max-width: 1060px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg);
    padding: 10px 16px 18px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  .nav.open {
    display: flex;
  }
  .menu-btn {
    display: block;
    margin-left: auto;
  }
  .logo b {
    font-size: 15px;
  }
}
@media (max-width: 480px) {
  .mode-btn span:last-child {
    display: none;
  }
  .logo b {
    font-size: 13px;
    white-space: normal;
  }
}

/* ---------- 英語のレベル・言語の切りかえ ---------- */
.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  background: var(--card);
  gap: 2px;
}
.seg button {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.seg button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
}
/* 英語のレベル：やさしい（easy）・ふつう（std） */
html[data-lv='easy'] .lv-std,
html:not([data-lv='easy']) .lv-easy {
  display: none !important;
}
/* 言語：ja だけ・en だけ・両方 */
html[data-lang='ja'] .t-en,
html[data-lang='en'] .t-ja {
  display: none !important;
}
.t-en {
  font-family: var(--en);
  font-size: 1.12em;
  line-height: 1.6;
  color: var(--ink2);
}
html[data-lang='both'] .t-en {
  margin-top: 0.35em;
  padding-left: 0.9em;
  border-left: 3px solid color-mix(in srgb, var(--gold) 60%, transparent);
}

/* ---------- ボタン ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 800;
  text-decoration: none;
  font-size: 15px;
  line-height: 1.3;
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(1px) scale(0.98);
}
.btn-gold {
  background: var(--frame);
  color: #2a1a00;
  box-shadow: 0 8px 24px -8px rgba(184, 137, 46, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-ink {
  background: var(--ink);
  color: var(--bg);
}
.btn-line {
  background: transparent;
  border: 1.5px solid currentColor;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
  color: var(--gold-ink);
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- 金の額縁と展示ラベル ---------- */
.frame {
  position: relative;
  padding: clamp(10px, 1.6vw, 22px);
  background: var(--frame);
  border-radius: 4px;
  box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255, 240, 200, 0.5), inset 0 0 18px rgba(80, 50, 0, 0.6);
}
.frame::before {
  content: '';
  position: absolute;
  inset: clamp(5px, 0.8vw, 11px);
  border: 2px solid rgba(90, 60, 10, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 235, 170, 0.6);
  pointer-events: none;
}
.frame-in {
  position: relative;
  background: #111;
  box-shadow: inset 0 0 0 4px #f4ecd8, 0 0 0 1px rgba(0, 0, 0, 0.5);
  padding: 4px;
  overflow: hidden;
}
.frame-in > img {
  width: 100%;
}
.frame.thin {
  padding: 6px;
}
.frame.thin::before {
  inset: 3px;
  border-width: 1px;
}
.frame.thin .frame-in {
  padding: 2px;
  box-shadow: inset 0 0 0 2px #f4ecd8;
}
/* 彫刻・絵巻は額なしで台座風 */
.frame.bare {
  background: none;
  padding: 0;
  box-shadow: var(--shadow-lg);
}
.frame.bare::before {
  display: none;
}
.frame.bare .frame-in {
  padding: 0;
  box-shadow: none;
}
.plaque {
  background: linear-gradient(180deg, #fbf7ee, #efe6d2);
  color: #2a2318;
  border-radius: 3px;
  padding: 14px 18px;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(150, 120, 60, 0.4);
  font-size: 13px;
  line-height: 1.6;
}
.plaque h2,
.plaque h1 {
  margin: 0 0 2px;
  font-family: var(--mincho);
  font-size: 20px;
  line-height: 1.35;
}
.plaque .en {
  font-size: 17px;
  color: #5a4a2a;
  font-style: italic;
}
.plaque dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  margin: 10px 0 0;
}
.plaque dt {
  color: #8a7650;
  font-weight: 700;
  font-size: 12px;
}
.plaque dd {
  margin: 0;
}

/* ---------- セクション見出し ---------- */
.sec {
  padding: clamp(56px, 8vw, 110px) 0;
  position: relative;
}
.sec-h {
  text-align: center;
  margin-bottom: clamp(26px, 4vw, 48px);
}
.sec-h .kicker {
  display: inline-block;
  font-family: var(--en);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.32em;
  color: var(--gold-ink);
  text-transform: uppercase;
}
.sec-h h2 {
  font-family: var(--mincho);
  font-size: clamp(26px, 4.2vw, 44px);
  line-height: 1.3;
  margin: 6px 0 8px;
}
.sec-h p {
  color: var(--muted);
  margin: 0 auto;
  max-width: 640px;
}
.ornament {
  display: block;
  width: 120px;
  height: 14px;
  margin: 10px auto 0;
  background: radial-gradient(circle, var(--gold) 3px, transparent 3.5px) center/14px 14px no-repeat, linear-gradient(90deg, transparent, var(--gold) 30%, transparent 46%, transparent 54%, var(--gold) 70%, transparent) center/100% 1px no-repeat;
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 920px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  perspective: 1200px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -3;
  background: #050711 center/cover no-repeat;
  transform: scale(1.06);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, transparent 20%, rgba(5, 7, 17, 0.55) 70%), linear-gradient(90deg, rgba(5, 7, 17, 0.88) 0%, rgba(5, 7, 17, 0.5) 45%, rgba(5, 7, 17, 0.1) 75%);
}
:root:not([data-mode='night']) .hero-bg::after {
  background: linear-gradient(90deg, rgba(20, 14, 4, 0.78) 0%, rgba(20, 14, 4, 0.42) 45%, rgba(20, 14, 4, 0.05) 75%);
}
.hero-art {
  position: absolute;
  inset: 0;
  z-index: -2;
  transform-style: preserve-3d;
  pointer-events: none;
}
.hero-art .fl {
  position: absolute;
  width: var(--w, 180px);
  transform-style: preserve-3d;
  will-change: transform;
}
.hero-art .fl .frame {
  padding: 7px;
}
.hero-art .fl .frame::before {
  inset: 3px;
}
.hero-art .fl .frame-in {
  padding: 2px;
}
.hero-in {
  padding: 120px 0 90px;
  max-width: 640px;
}
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--en);
  letter-spacing: 0.3em;
  font-weight: 700;
  font-size: 14px;
  color: var(--gold2);
  text-transform: uppercase;
}
.hero h1 {
  font-family: var(--mincho);
  font-size: clamp(38px, 6.6vw, 78px);
  line-height: 1.18;
  margin: 14px 0 6px;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6);
}
.hero h1 .gold {
  background: linear-gradient(100deg, #fff1c7, #e6b64c 40%, #fff6dc 55%, #d79f2e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .h1-en {
  font-family: var(--en);
  font-size: clamp(19px, 2.4vw, 28px);
  font-style: italic;
  color: #f2e6c8;
  margin: 0 0 18px;
}
.hero-lead {
  font-size: clamp(15px, 1.6vw, 17px);
  color: rgba(255, 255, 255, 0.9);
  max-width: 560px;
}
.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 26px 0 30px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.hero-stats li {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(8px);
  border-radius: 14px;
  padding: 8px 14px;
  line-height: 1.2;
}
.hero-stats b {
  display: block;
  font-family: var(--en);
  font-size: 28px;
  color: var(--gold2);
}
.hero-stats small {
  font-size: 12px;
  opacity: 0.85;
}
.hero-owl {
  position: absolute;
  right: max(16px, 4vw);
  bottom: 28px;
  width: clamp(110px, 14vw, 190px);
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5));
}
.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 18px;
  translate: -50% 0;
  font-size: 12px;
  letter-spacing: 0.2em;
  opacity: 0.7;
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob {
  50% {
    transform: translateY(6px);
  }
}
/* 星（夜） */
.stars {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ---------- 作品カード ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: clamp(16px, 2.4vw, 30px);
}
.wcard {
  display: block;
  text-decoration: none;
  position: relative;
}
.wcard .frame {
  padding: 7px;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2), box-shadow 0.35s;
}
.wcard .frame::before {
  inset: 3px;
  border-width: 1px;
}
.wcard .frame-in {
  padding: 2px;
  aspect-ratio: 4 / 3.4;
  display: grid;
  place-items: center;
  background: #1a1612;
}
.wcard .frame-in img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s;
}
.wcard:hover .frame {
  transform: translateY(-6px) rotate(-0.6deg);
}
.wcard:hover .frame-in img {
  transform: scale(1.05);
}
.wcard .cap {
  margin-top: 10px;
  line-height: 1.45;
}
.wcard .cap b {
  display: block;
  font-family: var(--mincho);
  font-size: 15px;
}
.wcard .cap .en {
  display: block;
  font-size: 15px;
  color: var(--muted);
  font-style: italic;
}
.wcard .cap small {
  color: var(--muted);
  font-size: 12px;
}
.wcard .badge {
  position: absolute;
  top: -8px;
  right: -6px;
  z-index: 2;
  background: var(--crimson);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

/* ---------- 汎用カード・パネル ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(18px, 3vw, 30px);
  box-shadow: var(--shadow);
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}
.tile {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}
.tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.tile .tile-img {
  aspect-ratio: 16 / 9;
  background: #222 center/cover;
  position: relative;
}
.tile .tile-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7));
}
.tile .tile-b {
  padding: 14px 16px 16px;
}
.tile h3 {
  margin: 0;
  font-family: var(--mincho);
  font-size: 18px;
  line-height: 1.4;
}
.tile p {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
}
.tile .over {
  position: absolute;
  left: 14px;
  bottom: 10px;
  z-index: 1;
  color: #fff;
  font-family: var(--en);
  font-size: 22px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  line-height: 1.1;
}

/* ---------- 展示室（ルーム）の入口 ---------- */
.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.room-door {
  --c: var(--gold);
  position: relative;
  display: grid;
  text-decoration: none;
  border-radius: 120px 120px 12px 12px;
  overflow: hidden;
  min-height: 300px;
  background: #111 center/cover;
  color: #fff;
  box-shadow: var(--shadow), inset 0 0 0 3px color-mix(in srgb, var(--c) 70%, #fff);
  isolation: isolate;
  transition: transform 0.4s;
}
.room-door::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 30%, transparent), rgba(0, 0, 0, 0.82) 70%);
  transition: opacity 0.4s;
}
.room-door:hover {
  transform: translateY(-6px);
}
.room-door .rd-b {
  align-self: end;
  padding: 18px;
}
.room-door .rd-en {
  font-family: var(--en);
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold2);
}
.room-door h3 {
  margin: 2px 0 4px;
  font-family: var(--mincho);
  font-size: 22px;
  line-height: 1.3;
}
.room-door p {
  margin: 0;
  font-size: 13px;
  opacity: 0.88;
  line-height: 1.6;
}
.room-door .rd-n {
  position: absolute;
  top: 16px;
  left: 50%;
  translate: -50% 0;
  font-size: 12px;
  font-weight: 800;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 2px 10px;
  border-radius: 999px;
}

/* ---------- ふくろう館長（ガイド） ---------- */
.owl-guide {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 60;
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.owl-guide > * {
  pointer-events: auto;
}
.owl-guide .owl-btn {
  width: 86px;
  height: 86px;
  border: 0;
  background: none;
  padding: 0;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.35));
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.4, 1);
}
.owl-guide .owl-btn:hover {
  transform: scale(1.08) rotate(-4deg);
}
.owl-guide .owl-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.owl-bubble {
  max-width: min(320px, calc(100vw - 120px));
  background: var(--card);
  color: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 18px 18px 18px 4px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.65;
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
  position: relative;
}
.owl-bubble b {
  color: var(--gold-ink);
}
.owl-bubble .x {
  position: absolute;
  top: -10px;
  right: -8px;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px;
  line-height: 24px;
  padding: 0;
}
.owl-bubble .acts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
@media (max-width: 600px) {
  .owl-guide .owl-btn {
    width: 64px;
    height: 64px;
  }
}

/* ---------- 作品ページ ---------- */
.stage {
  position: relative;
  padding: clamp(30px, 6vw, 70px) 0 clamp(30px, 5vw, 60px);
  background: radial-gradient(ellipse 60% 70% at 50% 35%, color-mix(in srgb, var(--wall) 60%, #fff 0%), var(--bg2) 75%);
  overflow: hidden;
}
:root[data-mode='night'] .stage {
  background: radial-gradient(ellipse 50% 60% at 50% 30%, #1a2245 0%, #070913 75%);
}
.stage::before {
  /* 天井のスポットライト */
  content: '';
  position: absolute;
  left: 50%;
  top: -10%;
  width: 70%;
  height: 120%;
  translate: -50% 0;
  background: conic-gradient(from 180deg at 50% 0%, transparent 160deg, rgba(255, 244, 214, 0.22) 175deg, rgba(255, 244, 214, 0.32) 180deg, rgba(255, 244, 214, 0.22) 185deg, transparent 200deg);
  pointer-events: none;
  filter: blur(6px);
}
.stage-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(20px, 3vw, 44px);
  align-items: start;
}
@media (max-width: 900px) {
  .stage-grid {
    grid-template-columns: 1fr;
  }
}
.viewer {
  position: relative;
  max-width: 100%;
  margin-inline: auto;
}
.viewer .frame-in {
  cursor: zoom-in;
  touch-action: pan-y;
}
.viewer .frame-in img {
  user-select: none;
  -webkit-user-drag: none;
}
.viewer.scroll .frame-in {
  overflow-x: auto;
  cursor: grab;
}
.viewer.scroll .frame-in img {
  max-width: none;
  height: min(60vh, 420px);
  width: auto;
}
.lp-gl,
.lp-fx {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}
.lp-gl {
  opacity: 0;
  transition: opacity 0.4s;
}
.frame-in .pic-box {
  position: relative;
}
.hotspot {
  position: absolute;
  translate: -50% -50%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: color-mix(in srgb, var(--gold) 80%, transparent);
  color: #2a1a00;
  font-weight: 900;
  font-size: 15px;
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 4px rgba(230, 192, 105, 0.35), 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 3;
  padding: 0;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 10px rgba(230, 192, 105, 0), 0 4px 12px rgba(0, 0, 0, 0.5);
  }
}
.hotspots-off .hotspot {
  display: none;
}
.viewer-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: var(--shadow);
  text-decoration: none;
}
.tool[aria-pressed='true'] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.tool.live[aria-pressed='true'] {
  background: var(--frame);
  color: #2a1a00;
  border-color: transparent;
}
/* ルーペ */
.loupe {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  border: 4px solid #e9c46a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  background-repeat: no-repeat;
  translate: -50% -50%;
  z-index: 5;
  display: none;
}
.loupe-on .loupe {
  display: block;
}
.loupe-on .frame-in {
  cursor: none;
}
/* 見どころツアー（ズーム） */
.zoom-tour {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #05060c;
  display: grid;
  grid-template-rows: 1fr auto;
}
.zoom-tour .zt-view {
  position: relative;
  overflow: hidden;
}
.zoom-tour .zt-view img {
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  max-width: none;
  transition: transform 1.4s cubic-bezier(0.65, 0, 0.2, 1);
}
.zoom-tour .zt-ring {
  position: absolute;
  border: 3px solid #ffe3a1;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45), 0 0 30px #ffe3a1;
  transition: all 1.4s cubic-bezier(0.65, 0, 0.2, 1);
  pointer-events: none;
}
.zoom-tour .zt-card {
  background: #0d1124;
  color: #f1ecdf;
  padding: 16px clamp(16px, 4vw, 40px) 22px;
  border-top: 2px solid #e6c069;
}
.zoom-tour .zt-card h3 {
  margin: 0 0 4px;
  font-family: var(--mincho);
  font-size: 20px;
}
.zoom-tour .zt-card .t-en {
  color: #cfc7b0;
}
.zoom-tour .zt-nav {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.zoom-tour .zt-x {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
}

/* 展示ラベルの横の情報 */
.side {
  display: grid;
  gap: 14px;
}
.owl-says {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.owl-says img {
  width: 64px;
  flex: none;
}
.owl-says p {
  margin: 0;
  background: var(--card);
  border: 1.5px solid var(--gold);
  border-radius: 4px 16px 16px 16px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.65;
  position: relative;
}
.night-voice {
  display: none;
  background: linear-gradient(135deg, #141b3d, #0b0f24);
  color: #f6eed6;
  border: 1px solid #3a4580;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 14.5px;
  box-shadow: 0 0 30px rgba(120, 140, 255, 0.25);
}
:root[data-mode='night'] .night-voice {
  display: block;
}
.night-voice .lab {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #b9c8ff;
  font-weight: 800;
}

/* 作品ページの本文 */
.article {
  padding: 40px 0 70px;
}
.toolbar {
  position: sticky;
  top: 64px;
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.toolbar .lab {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}
.blk {
  margin: 0 0 54px;
}
.blk-h {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  border-bottom: 2px solid var(--line);
  padding-bottom: 8px;
}
.blk-h h2 {
  margin: 0;
  font-family: var(--mincho);
  font-size: clamp(22px, 3vw, 28px);
}
.blk-h .en {
  font-size: 18px;
  color: var(--gold-ink);
  font-style: italic;
}
.story p {
  margin: 0 0 1.1em;
  font-size: 16.5px;
}
.catch {
  font-family: var(--mincho);
  font-size: clamp(19px, 2.5vw, 24px);
  line-height: 1.6;
  margin: 0 0 22px;
  padding: 16px 20px;
  border-left: 5px solid var(--gold);
  background: color-mix(in srgb, var(--gold) 8%, transparent);
  border-radius: 0 12px 12px 0;
}
/* 裏ネタ（めくるカード） */
.secrets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.flip {
  perspective: 1000px;
  min-height: 230px;
  border: 0;
  background: none;
  padding: 0;
  text-align: left;
}
.flip-in {
  position: relative;
  height: 100%;
  min-height: 230px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.3, 1.3, 0.4, 1);
}
.flip.open .flip-in {
  transform: rotateY(180deg);
}
.flip-f,
.flip-b {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  padding: 18px;
  overflow: auto;
}
.flip-f {
  background: linear-gradient(145deg, #2b1f5e, #6a1f4a 60%, #b5562a);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.flip-f .q {
  font-family: var(--en);
  font-size: 54px;
  line-height: 1;
  color: #ffe3a1;
}
.flip-f h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
}
.flip-f .tap {
  font-size: 12px;
  opacity: 0.8;
}
.flip-b {
  transform: rotateY(180deg);
  background: var(--card);
  border: 2px solid var(--gold);
  font-size: 14.5px;
  line-height: 1.7;
}
.flip-b h3 {
  margin: 0 0 6px;
  font-size: 15px;
  color: var(--gold-ink);
}
/* 単語カード */
.words {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.word {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}
.word b {
  font-family: var(--en);
  font-size: 26px;
  line-height: 1.1;
}
.word .pos {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-ink);
  margin-left: 6px;
}
.word .mean {
  font-weight: 700;
  margin: 2px 0 6px;
}
.word .ex {
  font-family: var(--en);
  font-size: 16px;
  line-height: 1.45;
  margin: 0;
}
.word .exja {
  font-size: 12.5px;
  color: var(--muted);
  margin: 2px 0 0;
}
/* 英語で語ろう */
.phrase-box {
  background: linear-gradient(135deg, color-mix(in srgb, var(--navy) 12%, var(--card)), var(--card));
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px 22px;
}
.phrase-box .big {
  font-family: var(--en);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.1;
}
/* ミニクイズ */
.quiz {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  margin-bottom: 14px;
}
.quiz .qq {
  font-weight: 800;
  font-size: 17px;
  margin: 0 0 12px;
}
.quiz .opts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}
.quiz .opt {
  border: 2px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  line-height: 1.45;
  transition: transform 0.15s, border-color 0.2s;
}
.quiz .opt:hover:not([disabled]) {
  border-color: var(--gold);
  transform: translateY(-2px);
}
.quiz .opt.ok {
  border-color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, var(--bg));
}
.quiz .opt.ng {
  border-color: var(--ng);
  background: color-mix(in srgb, var(--ng) 12%, var(--bg));
}
.quiz .ex {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 10%, transparent);
  font-size: 14.5px;
}
.tf-btns {
  display: flex;
  gap: 10px;
}
.tf-btns .opt {
  flex: 1;
  text-align: center;
  font-size: 18px;
}
/* 出典 */
.credit {
  font-size: 13px;
  color: var(--muted);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  line-height: 1.75;
}
.credit h3 {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--ink);
}
.credit a {
  word-break: break-all;
}
.credit .pd {
  display: inline-block;
  font-weight: 800;
  color: #fff;
  background: #2f7d4f;
  border-radius: 6px;
  padding: 0 7px;
  font-size: 12px;
  margin-right: 6px;
}

/* 前後の作品へ歩く */
.walk {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.walk a {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
}
.walk a img {
  width: 70px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
}
.walk a.next {
  flex-direction: row-reverse;
  text-align: right;
}
.walk small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- コレクション（絞りこみ） ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 22px;
}
.filters input[type='search'] {
  flex: 1 1 260px;
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 11px 18px;
  font: inherit;
  color: inherit;
}
.filters select {
  border: 1.5px solid var(--line);
  background: var(--card);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  color: inherit;
}
.count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 700;
}

/* ---------- 年表 ---------- */
.tl {
  position: relative;
  overflow-x: auto;
  padding: 20px 0 30px;
  scrollbar-width: thin;
}
.tl-track {
  position: relative;
  height: 430px;
}
.tl-axis {
  position: absolute;
  left: 0;
  right: 0;
  top: 240px;
  height: 2px;
  background: var(--gold);
}
.tl-y {
  position: absolute;
  top: 248px;
  font-family: var(--en);
  font-weight: 700;
  font-size: 15px;
  translate: -50% 0;
  color: var(--gold-ink);
}
.tl-w {
  position: absolute;
  width: 74px;
  translate: -50% 0;
  text-decoration: none;
  font-size: 10.5px;
  line-height: 1.25;
  text-align: center;
}
.tl-w img {
  width: 74px;
  height: 58px;
  object-fit: cover;
  border: 3px solid var(--gold2);
  border-radius: 4px;
  box-shadow: var(--shadow);
  margin-bottom: 3px;
  background: #222;
  transition: transform 0.25s;
}
.tl-w:hover img {
  transform: scale(1.5);
  position: relative;
  z-index: 3;
}
.tl-band {
  position: absolute;
  height: 26px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  padding: 4px 8px;
  white-space: nowrap;
  overflow: hidden;
  color: #fff;
}

/* ---------- フッター ---------- */
.ft {
  margin-top: 40px;
  padding: 50px 0 120px;
  background: #0b0d18;
  color: #d9d4c4;
  font-size: 13.5px;
}
.ft a {
  color: #f2d48a;
}
.ft-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 30px;
}
@media (max-width: 760px) {
  .ft-grid {
    grid-template-columns: 1fr;
  }
}
.ft h3 {
  color: #fff;
  font-family: var(--mincho);
  font-size: 16px;
  margin: 0 0 8px;
}
.ft ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}

/* ---------- ナイトモードの懐中電灯 ---------- */
.torch {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: radial-gradient(circle 230px at var(--mx, 50%) var(--my, 50%), transparent 0%, transparent 35%, rgba(3, 4, 12, 0.55) 70%, rgba(3, 4, 12, 0.82) 100%);
  opacity: 0;
  transition: opacity 0.8s;
}
:root[data-mode='night'] body.torch-on .torch {
  opacity: 1;
}
/* 閉館アニメーション（ライトが消える） */
.lights-out {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  background: #000;
  opacity: 0;
}

/* ---------- 小さな画面 ---------- */
@media (max-width: 600px) {
  body {
    font-size: 15.5px;
  }
  .hero-in {
    padding: 90px 0 150px;
  }
  .walk {
    grid-template-columns: 1fr;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
  .wcard .cap b {
    font-size: 13.5px;
  }
}

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 印刷（ワークシート以外のページ） ---------- */
@media print {
  .hd,
  .ft,
  .owl-guide,
  .toolbar,
  .viewer-tools,
  .torch,
  .no-print {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}

/* 見どころの吹き出し */
.hs-pop {
  position: absolute;
  z-index: 6;
  width: min(300px, 80vw);
  translate: -50% 22px;
  background: rgba(10, 12, 26, 0.94);
  color: #f3ecd8;
  border: 1.5px solid #e6c069;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.6;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}
.hs-pop.up {
  translate: -50% calc(-100% - 22px);
}
.hs-pop b {
  color: #ffe3a1;
}
.hs-pop .en {
  color: #cfc7b0;
  font-size: 16px;
}
.hs-pop p {
  margin: 6px 0 0;
}
.hs-pop .t-en {
  color: #d9d2bf;
  font-size: 15px;
}
.hs-pop .x {
  position: absolute;
  top: 4px;
  right: 6px;
  border: 0;
  background: none;
  color: #fff;
  font-size: 16px;
}

/* ---------- 裏ネタのカード（見出しを押すと下にひらく。中でスクロールさせない） ---------- */
.secrets {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 14px;
  align-items: start;
}
.sc {
  background: var(--card);
  border: 2px solid var(--gold);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.sc-h {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 12px;
  align-items: center;
  text-align: left;
  border: 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fff8e4, #ffefc6);
  color: #1d1a26;
  line-height: 1.5;
}
:root[data-mode='night'] .sc-h {
  background: linear-gradient(135deg, #1e2650, #141a38);
  color: #f6f0de;
}
.sc-q {
  grid-row: span 2;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--en);
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, #ff8a7a, #d6334d);
  box-shadow: 0 4px 12px rgba(214, 51, 77, 0.35);
  transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.4, 1);
}
.sc.open .sc-q {
  transform: rotate(-12deg) scale(1.08);
}
.sc-t .t-ja {
  display: block;
  font-weight: 900;
  font-size: 16.5px;
}
.sc-t .t-en,
html[data-lang='both'] .sc-t .t-en {
  display: block;
  border: 0;
  padding: 0;
  margin: 2px 0 0;
  font-size: 17px;
  color: #4a4258;
}
:root[data-mode='night'] .sc-t .t-en {
  color: #d8d0ba;
}
html[data-lang='en'] .sc-t .t-en {
  font-weight: 700;
  color: inherit;
}
.sc-open {
  grid-column: 2;
  font-size: 12px;
  font-weight: 800;
  color: var(--gold-ink);
}
.sc-b {
  padding: 14px 16px 16px;
  border-top: 1px dashed var(--line);
  font-size: 15px;
  line-height: 1.8;
}
.sc-b p {
  margin: 0 0 8px;
}
.sc-b .t-en {
  font-size: 17px;
  color: var(--ink2);
}

/* ---------- ヘッダー：検索・ハンバーガー・スマホのメニュー ---------- */
.search-btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  padding: 0;
  flex: none;
}
.search-btn img {
  width: 26px;
  height: 26px;
}
.nav-search,
.nav-night {
  display: none !important;
}
.menu-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  position: relative;
  flex: none;
}
.menu-btn span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.2s, top 0.3s;
}
.menu-btn span:nth-child(1) {
  top: 14px;
}
.menu-btn span:nth-child(2) {
  top: 21px;
}
.menu-btn span:nth-child(3) {
  top: 28px;
}
.menu-btn.open span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}
.menu-btn.open span:nth-child(2) {
  opacity: 0;
}
.menu-btn.open span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}
body.menu-open {
  overflow: hidden;
}
@media (max-width: 1060px) {
  .hd-in {
    gap: 8px;
  }
  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 16px 20px 40px;
    overflow-y: auto;
    gap: 4px;
    background: var(--bg);
    border-top: 1px solid var(--line);
  }
  .nav a {
    font-size: 18px;
    padding: 14px 16px;
    border-radius: 14px;
    border-bottom: 1px solid var(--line);
  }
  .nav .nav-search {
    display: flex !important;
    gap: 8px;
    margin-bottom: 8px;
  }
  .nav .nav-search input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid var(--line);
    background: var(--card);
    color: inherit;
    border-radius: 999px;
    padding: 12px 16px;
    font: inherit;
  }
  .nav .nav-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 18px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 800;
  }
  .nav .nav-night {
    display: block !important;
    background: linear-gradient(135deg, #141b3d, #0b0f24);
    color: #ffe3a1;
    margin-top: 8px;
  }
  .mode-btn {
    padding: 6px;
  }
  .mode-btn span:last-child {
    display: none;
  }
}
/* ---------- サイト内検索のパネル ---------- */
.search-panel {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(5, 7, 15, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: grid;
  place-items: start center;
  padding: 70px 12px 20px;
}
.search-panel[hidden] {
  display: none !important;
}
.sp-in {
  width: min(720px, 100%);
  max-height: calc(100svh - 100px);
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--gold);
  overflow: hidden;
}
.sp-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.sp-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-size: 17px;
  outline: none;
}
.sp-x {
  border: 0;
  background: var(--ink);
  color: var(--bg);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  flex: none;
}
.sp-res {
  overflow-y: auto;
  padding: 8px 10px 14px;
}
.sp-hit {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  padding: 8px;
  border-radius: 12px;
}
.sp-hit:hover,
.sp-hit:focus {
  background: color-mix(in srgb, var(--gold) 14%, transparent);
}
.sp-hit img,
.sp-noimg {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
  background: var(--bg2);
}
.sp-hit b {
  display: block;
  line-height: 1.35;
}
.sp-hit small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  font-weight: 700;
}
.sp-hit .en {
  display: block;
  font-size: 15px;
  color: var(--gold-ink);
}
/* ---------- 上へ戻る ---------- */
.to-top {
  position: fixed;
  right: 14px;
  bottom: 18px;
  z-index: 59;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 0;
  animation: bob 2.4s ease-in-out infinite;
}
.to-top img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}
.to-top span {
  line-height: 1;
  font-family: var(--en);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--gold-ink);
}
.to-top[hidden] {
  display: none;
}
body.is-game .to-top {
  display: none;
}
/* ---------- 横スクロールをなくす ---------- */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
.room-wall {
  overflow: visible !important;
}
.wall-track {
  display: grid !important;
  width: auto !important;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 220px), 1fr));
  gap: clamp(16px, 3vw, 36px) !important;
  padding: 0 16px !important;
  max-width: 1180px;
  margin: 0 auto;
  align-items: end;
}
.wall-track .wcard,
.wall-track .wcard:nth-child(n) {
  width: auto !important;
}
.toolbar {
  padding-inline: 12px;
}
@media (max-width: 600px) {
  .toolbar .lab {
    display: none;
  }
  .toolbar .seg button {
    padding: 6px 9px;
  }
  .viewer-tools .tool {
    padding: 7px 11px;
    font-size: 12.5px;
  }
}

/* ---------- スマホをコンパクトに ---------- */
.more-hide {
  display: none !important;
}
.more-btn {
  display: flex;
  margin: 18px auto 0;
}
.more-btn[hidden] {
  display: none;
}
.mtabs {
  display: none;
}
@media (max-width: 760px) {
  .sec {
    padding: 38px 0;
  }
  .sec-h {
    margin-bottom: 18px;
  }
  .sec-h p {
    font-size: 14px;
  }
  .sec-h .ornament {
    display: none;
  }
  .rooms {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .room-door {
    min-height: 190px;
    border-radius: 70px 70px 10px 10px;
  }
  .room-door h3 {
    font-size: 16px;
  }
  .room-door p,
  .room-door .rd-en {
    display: none;
  }
  .room-door .rd-b {
    padding: 10px;
  }
  .cards {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .tile h3 {
    font-size: 14.5px;
  }
  .tile p {
    display: none;
  }
  .tile .tile-b {
    padding: 8px 10px 10px;
  }
  .tile .over {
    font-size: 15px;
  }
  .article {
    padding: 20px 0 40px;
  }
  .blk {
    margin-bottom: 26px;
  }
  .stage {
    padding: 16px 0 18px;
  }
  .side {
    gap: 10px;
  }
  .catch {
    font-size: 17px;
    padding: 10px 14px;
    margin-bottom: 14px;
  }
  /* 本文のタブ */
  .mtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    position: sticky;
    top: 108px;
    z-index: 25;
    background: var(--bg);
    padding: 8px 0;
    margin: 0 0 14px;
    border-bottom: 1px solid var(--line);
  }
  .mtabs::-webkit-scrollbar {
    display: none;
  }
  .mtabs button {
    flex: none;
    border: 1.5px solid var(--line);
    background: var(--card);
    border-radius: 999px;
    padding: 7px 13px;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
  }
  .mtabs button[aria-selected='true'] {
    background: var(--ink);
    color: var(--bg);
    border-color: var(--ink);
  }
  .blk-h {
    display: none;
  }
  .toolbar {
    top: 64px;
    padding: 6px 8px;
    gap: 6px;
  }
  .room-wall {
    padding: 20px 0 24px;
  }
  .hero {
    min-height: 0;
  }
  .hero-in {
    padding: 70px 0 120px;
  }
  .hero-stats b {
    font-size: 22px;
  }
  .gacha-reel {
    height: 140px;
  }
  .gacha-strip img {
    height: 110px;
  }
  .pillars {
    gap: 10px;
  }
  .pillar {
    padding: 14px;
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 2px 12px;
    text-align: left;
    align-items: center;
  }
  .pillar .pi {
    grid-row: span 2;
    font-size: 34px;
  }
  .pillar h3 {
    margin: 0;
    font-size: 19px;
  }
  .pillar p {
    font-size: 13px;
  }
}
/* スマホのメニュー：ヘッダーのすりガラス（backdrop-filter）の中では fixed の bottom:0 がヘッダー基準になり、
   高さが 58px しかなくなっていた（2026-11-01「ハンバーガー壊れているの？」）→ 高さを画面基準で指定 */
@media (max-width: 1060px) {
  .nav {
    bottom: auto !important;
    height: calc(100vh - 64px);
    height: calc(100dvh - 64px);
  }
  body.menu-open .hd {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--bg);
  }
}
/* 展示室の扉：昼は絵をはっきり見せ、文字の下だけ暗くする（2026-11-01「なんか暗いよね…ナイトミュージアムでもないのに」） */
.room-door::before {
  background: linear-gradient(180deg, transparent 0%, transparent 45%, rgba(10, 8, 4, 0.72) 100%);
}
:root[data-mode='night'] .room-door::before {
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 25%, transparent), rgba(0, 0, 0, 0.82) 75%);
}
.room-door h3,
.room-door p {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.room-door .rd-n {
  background: rgba(255, 255, 255, 0.92);
  color: #2a1a00;
  border-color: var(--gold);
}
/* 昼のタイルの絵も暗くしすぎない */
.tile .tile-img::after {
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.55));
}

/* 見どころの吹き出し：位置は work.js が px で決める */
.hs-pop {
  translate: none;
  width: auto;
}
.hs-pop.up {
  translate: 0 -100%;
}

/* Codex が描いたアイコン（2026-11-01「アイコンも全部codexに描かせて」） */
.ic {
  display: inline-block;
  width: 1.35em;
  height: 1.35em;
  object-fit: contain;
  vertical-align: -0.32em;
  flex: none;
}
.btn .ic {
  width: 1.5em;
  height: 1.5em;
}
.mode-btn .ic img {
  width: 26px;
  height: 26px;
  display: block;
}
.mode-btn .ic {
  background: none !important;
}
img.pi {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}
.sb img.pi {
  margin: 0;
}
.g-ic {
  position: absolute;
  right: 10px;
  bottom: 8px;
  z-index: 1;
  width: 58px;
  height: 58px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s cubic-bezier(0.3, 1.6, 0.4, 1);
}
.tile:hover .g-ic {
  transform: scale(1.15) rotate(-6deg);
}
@media (max-width: 760px) {
  img.pi {
    width: 44px;
    height: 44px;
  }
  .g-ic {
    width: 40px;
    height: 40px;
  }
}

/* カードの絵の切り抜き：人物の頭が切れないよう、上寄りを基準にする（2026-11-01「頭が隠れてたりする」） */
.tile .tile-img {
  background-position: center 15%;
}
.room-door {
  background-position: center 18%;
}
/* 検索：著作権がまだ切れていない画家の説明カード */
.sp-nopd {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  margin: 4px 0 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--gold) 12%, var(--bg2));
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}
.sp-nopd-ic {
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font: 700 22px/1 serif;
  background: var(--gold);
  color: #2a1d08;
}
.sp-nopd b { display: block; margin: 2px 0 4px; }
.sp-nopd b .en { font-weight: 500; opacity: 0.75; font-size: 0.9em; }
.sp-nopd-tx { font-size: 0.88rem; line-height: 1.7; }
.sp-nopd-tx b { display: inline; margin: 0; }
.sp-nopd-go { display: inline-block; margin-top: 6px; font-weight: 700; font-size: 0.88rem; color: var(--gold-ink); }
/* パンくず（SEO・現在地） */
.bc { padding-top: 10px; padding-bottom: 0; font-size: 12.5px; color: var(--ink2); }
.bc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 0; }
.bc li { display: inline-flex; align-items: center; min-width: 0; }
.bc li + li::before { content: '›'; margin: 0 7px; opacity: 0.6; }
.bc a { color: inherit; text-decoration: none; }
.bc a:hover { text-decoration: underline; }
.bc [aria-current] { max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media print { .bc { display: none; } }
/* 「はじめに」ボタン（初心者マーク） */
.guide-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: none;
  padding: 5px 12px 5px 7px;
  border-radius: 999px;
  border: 1.5px solid #3aa54a;
  background: linear-gradient(#fffef2, #f3fbe9);
  color: #1d6b2a;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
}
.guide-btn img { width: 24px; height: 24px; }
.guide-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
:root[data-mode='night'] .guide-btn { background: #14223a; color: #b9f0a8; border-color: #5cc46b; }
.btn-wakaba { background: linear-gradient(#ffffff, #eefbe6); color: #1d6b2a; border: 2px solid #3aa54a; }
@media (max-width: 1060px) {
  .guide-btn { margin-left: auto; }
  .guide-btn ~ .search-btn { margin-left: 6px; }
  .guide-btn ~ .menu-btn { margin-left: 2px; }
}
@media (max-width: 480px) {
  .guide-btn { padding: 4px 8px 4px 5px; font-size: 11.5px; gap: 2px; }
  .guide-btn img { width: 20px; height: 20px; }
}
/* 「はじめに」ボタンが入って、パソコンの中くらいの幅でロゴとメニューが重なった → 少しつめる */
@media (min-width: 1061px) {
  .hd-in { gap: 8px; }
  .nav a { padding: 8px 7px; font-size: 13.5px; }
  .logo b { font-size: 15px; }
  .mode-btn span:last-child { display: none; }
  .mode-btn { padding: 6px; }
}
/* スマホ：「はじめに」ボタンが入ったぶん、ヘッダーの部品を小さくしてロゴの文字を守る */
@media (max-width: 480px) {
  .hd-in { gap: 6px; }
  .logo { gap: 5px; min-width: 0; flex: 1 1 auto; }
  .logo img { width: 34px; height: 34px; }
  .logo small { display: none; }
  .logo b { font-size: 11.5px; line-height: 1.25; white-space: normal; }
  .guide-btn { margin-left: 0; }
  .search-btn, .mode-btn { width: 34px; height: 34px; padding: 0; justify-content: center; }
  .search-btn img { width: 22px; height: 22px; }
  .mode-btn .ic { width: 24px; height: 24px; }
  .menu-btn { margin-left: 0; padding: 4px; }
}
/* タブレット・小さめのパソコン（761〜1060px）：コーナーへのリンクを「≡」にしまわず、ヘッダーの2段目にいつも並べる（2026-11-01 ユーザー「コーナー紹介リンクは？」） */
@media (min-width: 761px) and (max-width: 1060px) {
  .hd-in { flex-wrap: wrap; height: auto; padding: 8px 0 0; row-gap: 4px; }
  .nav,
  .nav.open {
    display: flex;
    order: 10;
    position: static;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
    background: transparent;
    padding: 0 0 6px;
    border: 0;
    box-shadow: none;
    height: auto;
  }
  .nav a { padding: 6px 10px; font-size: 13.5px; }
  .menu-btn { display: none; }
}
/* 481〜760px：ロゴの文字が長くてボタンが画面の外に出ないように */
@media (min-width: 481px) and (max-width: 760px) {
  .hd-in { gap: 8px; }
  .logo { min-width: 0; flex: 1 1 auto; }
  .logo b { font-size: 13.5px; white-space: normal; line-height: 1.25; }
  .logo small { display: none; }
  .guide-btn { margin-left: 0; }
  .mode-btn span:last-child { display: none; }
  .mode-btn { padding: 6px; }
}
@media (min-width: 761px) and (max-width: 1060px) {
  .hd .nav { overflow: visible; border-top: 0; }
  .hd .nav .nav-search,
  .hd .nav .nav-night { display: none !important; }
  .hd .nav a { font-size: 13.5px; padding: 6px 10px; border-radius: 999px; border-bottom: 0; }
}

/* ===== 作品のサムネイルは「全体」を見せる（2026-11-01 ユーザー「縮小して全身を見せて。他の作品も全て」）
   絵は切り抜かず（contain）、あいたところは同じ絵をぼかして敷く（::before に background-image: inherit） ===== */
.tile .tile-img,
.gacha-strip .gt,
.tv-img,
.st-it span,
.th-img,
.tf-img,
.mm-img,
.tl-im,
.so-im,
.ex-im,
.g-st-img {
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-color: #15120e !important;
  isolation: isolate;
  overflow: hidden;
}
.tile .tile-img,
.gacha-strip .gt,
.tv-img,
.st-it span,
.th-img,
.tf-img,
.tl-im,
.so-im,
.ex-im,
.g-st-img {
  position: relative;
}
.tile .tile-img::before,
.gacha-strip .gt::before,
.tv-img::before,
.st-it span::before,
.th-img::before,
.tf-img::before,
.mm-img::before,
.tl-im::before,
.so-im::before,
.ex-im::before,
.g-st-img::before {
  content: '';
  position: absolute;
  inset: -16px;
  z-index: -1;
  background-image: inherit;
  background-size: cover;
  background-position: center;
  filter: blur(14px) brightness(0.5) saturate(1.1);
  pointer-events: none;
}
.tile .tile-img::after {
  background: linear-gradient(180deg, transparent 70%, rgba(0, 0, 0, 0.45));
}
/* <img> のサムネイルも切り抜かない */
.expo-collage img,
.gacha-card img,
.tlv-w img,
.walk a img,
.tl-w img,
.g-review img,
.sp-hit img {
  object-fit: contain !important;
  background: #15120e;
}
/* 作品カード：縦長の絵でも必ず全体が額の中に収まるように（高さが決まらず下が切れていた） */
.wcard .frame-in {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.wcard .frame-in img {
  position: absolute;
  inset: 2px;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  object-fit: contain;
}
.wcard .frame-in::before {
  content: '';
  position: absolute;
  inset: -16px;
  z-index: -1;
  background: var(--art) center / cover no-repeat;
  filter: blur(14px) brightness(0.45) saturate(1.1);
}
/* 展示室の壁の並びは、絵そのものの縦横比で見せる（今までどおり） */
.wall-track .wcard .frame-in img {
  position: static;
  width: 100%;
  height: auto;
}
/* 展示室の扉：時代と点数の札が2行に折れて絵をふさいでいた（2026-11-01）→ 札は点数だけの小さな札、時代は下の説明へ */
.room-door .rd-n {
  top: 12px;
  font-size: 11.5px;
  padding: 1px 9px;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.45) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.45) !important;
  backdrop-filter: blur(4px);
}
.room-door .rd-p {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  margin: 2px 0 2px;
}
/* 絵をもっと見せる：暗くするのは文字のある下の部分だけ */
:root:not([data-mode='night']) .room-door::before {
  background: linear-gradient(180deg, transparent 0%, transparent 55%, rgba(10, 8, 4, 0.35) 70%, rgba(10, 8, 4, 0.7) 100%);
}
/* ぼかした絵（::before）が要素自身の背景より上に描かれ、くっきりした絵を隠していた（2026-11-01 ユーザー「暗くなっている」）
   → くっきりした絵を ::after に描き、ぼかし（::before）の上・文字の下に置く */
.tile .tile-img::after,
.gacha-strip .gt::after,
.tv-img::after,
.st-it span::after,
.th-img::after,
.tf-img::after,
.mm-img::after,
.tl-im::after,
.so-im::after,
.ex-im::after,
.g-st-img::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: none;
  background-image: inherit;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}
.tile .tile-img .over {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 12px rgba(0, 0, 0, 0.8);
}
/* トップの宙に浮かぶ名画：クリックでその作品のページへ（2026-11-01 ユーザー） */
.hero .wrap,
.hero-bg,
.hero .stars { pointer-events: none; }
.hero-in,
.hero-owl { pointer-events: auto; }
.hero-art .fl {
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
}
.hero-art .fl .frame { transition: box-shadow 0.3s, filter 0.3s; }
.hero-art .fl:hover .frame,
.hero-art .fl:focus-visible .frame {
  filter: brightness(1.12);
  box-shadow: 0 0 0 3px var(--gold), 0 18px 40px rgba(0, 0, 0, 0.45);
}
.hero-art .fl-name {
  position: absolute;
  left: 50%;
  bottom: -26px;
  translate: -50% 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.hero-art .fl:hover .fl-name,
.hero-art .fl:focus-visible .fl-name { opacity: 1; }
.hero-in { pointer-events: none; }
.hero-in a,
.hero-in button { pointer-events: auto; }
/* 「美術館アンテナ」がナビに入って1文字長くなった分（1061〜1180px）をつめる */
@media (min-width: 1061px) and (max-width: 1180px) {
  .nav a { padding: 8px 5px; font-size: 13px; }
  .logo b { font-size: 14px; }
}
/* 完全無料のバッジ（2026-11-01 ユーザー） */
.free-badge { display: inline-flex; align-items: center; gap: 10px; margin: 10px 0 4px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); border: 1.5px solid rgba(255, 224, 150, 0.7); backdrop-filter: blur(6px); color: #fff; }
.free-badge b { display: inline-block; padding: 4px 12px; border-radius: 999px; background: linear-gradient(135deg, #ffe08a, #e6a92e); color: #3a2400; font-size: 15px; font-weight: 900; letter-spacing: 0.08em; box-shadow: 0 2px 10px rgba(230, 169, 46, 0.6); }
.free-badge span { font-size: 13.5px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.ft-free b { color: var(--gold2, #e6c069); font-size: 1.1em; }
@media (max-width: 480px) { .free-badge span { font-size: 12px; } }
