/* ==========================================================================
   JAPAN — A LIVING MUSEUM (日本の生きた博物館)
   Design System & Styling Architecture
   Aesthetics: Rich Japanese Heritage meets Modern Cyber/Neon Precision
   Aspect Ratio: Optimized for 16:9 with full responsive adaptation
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. CSS Variables & Theme Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Core Geometry & Typography */
  --font-serif: 'Noto Serif JP', 'Zen Old Mincho', serif;
  --font-display: 'Cinzel', 'Syne', serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Traditional Japanese Palette (Nippon Colors) */
  --color-shinku: #a61b29;      /* 深紅 Crimson vermilion */
  --color-aizome: #162238;      /* 藍染 Deep Indigo */
  --color-kin: #d4af37;         /* 金箔 Gold leaf */
  --color-kin-light: #f5d77f;   /* Light Gold */
  --color-washi: #f7f4ec;       /* 和紙 Washi paper cream */
  --color-shiraki: #d9c8b4;     /* 白木 Light Hinoki wood */
  --color-sumi: #0d0f12;        /* 墨 Sumi ink black */
  --color-urushi: #1c0a0c;      /* 漆 Black lacquer */
  --color-sakura: #ffb7c5;      /* 桜 Cherry blossom pink */
  --color-momiji: #c73e1d;      /* 紅葉 Autumn Maple */
  --color-matsu: #1b4d3e;       /* 松 Pine dark green */
  --color-fuyu: #8ec5fc;        /* 冬 Icy snow blue */

  /* Modern Contemporary Neon Accents */
  --neon-purple: #b537f2;
  --neon-pink: #ff2a85;
  --neon-cyan: #00f2fe;
  --neon-gold: #ffbe3b;

  /* UI Surface Colors */
  --bg-primary: #0a0c10;
  --bg-surface: rgba(18, 22, 30, 0.78);
  --bg-surface-elevated: rgba(26, 32, 44, 0.88);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(212, 175, 55, 0.35);
  
  --text-main: #f0f2f5;
  --text-muted: #9ba3b4;
  --text-light: #ffffff;

  --panel-width: 35%;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --header-height: 72px;
  --footer-height: 64px;
}

/* --------------------------------------------------------------------------
   1. Reset & Global Base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dynamic Interactive Canvas & Ambient Lighting */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

.ambient-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 80vw;
  height: 80vh;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(166, 27, 41, 0.12) 0%, rgba(22, 34, 56, 0.08) 50%, transparent 80%);
  z-index: 1;
  pointer-events: none;
  transition: background 1s ease;
}

/* --------------------------------------------------------------------------
   2. Museum Header Navigation
   -------------------------------------------------------------------------- */
.museum-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  user-select: none;
}

.kanji-logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--color-kin);
  background: linear-gradient(135deg, var(--color-kin-light), var(--color-shinku));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #ffffff;
}

.brand-sub {
  font-size: 0.68rem;
  letter-spacing: 1.5px;
  color: var(--color-kin);
  font-weight: 500;
}

/* 5 Worlds Quick Portal Bar */
.world-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.3rem 0.5rem;
  border-radius: 40px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-pill {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 30px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.nav-pill .p-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--color-kin);
  opacity: 0.8;
}

.nav-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.nav-pill.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(166, 27, 41, 0.8), rgba(212, 175, 55, 0.6));
  border: 1px solid rgba(212, 175, 55, 0.5);
  box-shadow: 0 4px 15px rgba(166, 27, 41, 0.35);
}

/* Utility Control Buttons */
.museum-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ctrl-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--color-kin);
  color: #fff;
}

.ctrl-btn.active {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--color-kin);
  color: var(--color-kin-light);
}

.ctrl-btn.active-gold {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(166, 27, 41, 0.35));
  border-color: var(--color-kin);
  color: #fff;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

.ctrl-btn.active-gold:hover {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.4), rgba(166, 27, 41, 0.5));
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.5);
}

/* --------------------------------------------------------------------------
   3. Main Stage Container (16:9 Responsive Viewport)
   -------------------------------------------------------------------------- */
.museum-stage {
  position: absolute;
  top: var(--header-height);
  bottom: var(--footer-height);
  left: 0;
  right: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.museum-world {
  position: absolute;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 1.5rem 2.5rem;
}

.museum-world.active {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.world-inner {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Section Sub-Navigation Wings */
.section-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  flex-shrink: 0;
}

.subnav-title .wing-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-kin);
  background: rgba(212, 175, 55, 0.12);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  margin-bottom: 0.2rem;
}

.subnav-title h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 1px;
}

.wing-toggle-buttons {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wing-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-muted);
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.wing-btn:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.wing-btn.active {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(166, 27, 41, 0.2));
  border-color: var(--color-kin);
  color: #fff;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

.action-pill-btn {
  background: rgba(181, 55, 242, 0.15);
  border: 1px solid var(--neon-purple);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.action-pill-btn:hover {
  background: var(--neon-purple);
  box-shadow: 0 0 15px rgba(181, 55, 242, 0.6);
}

/* Standard Information Panel - fills 100% of designated column/container */
.museum-info-panel {
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 5;
}

.wafuku-layout > .museum-info-panel,
.signature-layout > .museum-info-panel {
  width: 380px;
  min-width: 340px;
  max-width: 420px;
  flex-shrink: 0;
}

.museum-info-panel::-webkit-scrollbar {
  width: 5px;
}
.museum-info-panel::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.panel-header {
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.8rem;
}

.curator-badge {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-kin);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}

.panel-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.panel-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 400;
  display: block;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  font-size: 0.92rem;
  color: #d1d5db;
}

/* Presentation Visual Mode: Hide bulky reading paragraphs on slides (presenters speak from memory or use Notes drawer N) */
.panel-desc {
  display: none;
}

body.show-reading-mode .panel-desc {
  display: block;
  line-height: 1.65;
}

.feature-checklist h4, 
.cultural-significance-box h4,
.dialect-keypoints h4 {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  color: var(--color-kin);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.clean-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.clean-bullets li {
  position: relative;
  padding-left: 1.2rem;
  line-height: 1.5;
  color: #e5e7eb;
}

.clean-bullets li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: var(--color-kin);
}

.cultural-significance-box {
  background: rgba(212, 175, 55, 0.06);
  border-left: 3px solid var(--color-kin);
  padding: 0.8rem 1rem;
  border-radius: 0 8px 8px 0;
}

.interactive-btn-group, .dish-btn-trio, .song-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.panel-action-btn, .dish-action-btn, .song-btn {
  flex: 1;
  min-width: 140px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-align: center;
}

.panel-action-btn:hover, .dish-action-btn:hover, .song-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--color-kin);
}

.panel-action-btn.primary, .dish-action-btn.highlight-btn, .song-btn.primary {
  background: linear-gradient(135deg, rgba(166, 27, 41, 0.8), rgba(212, 175, 55, 0.8));
  border-color: var(--color-kin);
}

.curator-citation {
  margin-top: auto;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-style: italic;
}


/* --------------------------------------------------------------------------
   4. WORLD 0: MAIN HALL STYLING
   -------------------------------------------------------------------------- */
.hall-inner {
  justify-content: center;
  align-items: center;
}

.hall-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  filter: blur(2px);
  z-index: 1;
}

.hall-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(10, 12, 16, 0.5) 0%, rgba(10, 12, 16, 0.92) 100%);
  z-index: 2;
}

/* Torii Graphic Silhouette */
.torii-portal-container {
  position: absolute;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 480px;
  pointer-events: none;
  opacity: 0.25;
  z-index: 2;
}

.torii-beam-top {
  width: 100%;
  height: 22px;
  background: var(--color-shinku);
  border-radius: 4px;
  transform: perspective(300px) rotateX(15deg);
  box-shadow: 0 0 30px rgba(166, 27, 41, 0.6);
}

.torii-beam-sub {
  width: 86%;
  height: 14px;
  background: #73131c;
  margin: 25px auto 0;
}

.torii-pillar {
  position: absolute;
  top: 45px;
  width: 24px;
  height: 380px;
  background: linear-gradient(to bottom, #73131c, #4a0d13);
}

.torii-pillar.left { left: 18%; }
.torii-pillar.right { right: 18%; }

.torii-tablet {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  width: 44px;
  height: 55px;
  background: #111;
  border: 1px solid var(--color-kin);
  color: var(--color-kin);
  font-family: var(--font-serif);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hall Hero Content */
.hall-hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
}

.hall-tag {
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 4px;
  color: var(--color-kin);
  margin-bottom: 0.5rem;
}

.hall-main-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1rem;
}

.hall-main-title .title-jp {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 6px;
  font-weight: 400;
}

.hall-main-title .title-en {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  letter-spacing: 8px;
  color: #fff;
  text-shadow: 0 0 30px rgba(255, 255, 255, 0.4);
  line-height: 1;
}

.hall-main-title .title-sub {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 4px;
  color: var(--color-kin);
  margin-top: 0.3rem;
}

.hall-lead {
  font-size: 1.05rem;
  color: #c9d1d9;
  max-width: 650px;
  margin: 0 auto 1.5rem;
}

.enter-btn-wrap {
  margin-bottom: 2rem;
}

.btn-enter-museum {
  background: linear-gradient(135deg, rgba(166, 27, 41, 0.95), rgba(212, 175, 55, 0.9));
  border: 1px solid var(--color-kin-light);
  color: #ffffff;
  padding: 1rem 2.5rem;
  border-radius: 40px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(166, 27, 41, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.3);
  transition: var(--transition-smooth);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.btn-enter-museum:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 40px rgba(166, 27, 41, 0.7), 0 0 30px rgba(212, 175, 55, 0.6);
}

.btn-decor-kanji {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--color-kin-light);
}

.btn-subtext {
  font-size: 0.72rem;
  font-weight: 400;
  opacity: 0.9;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* 5 Portal Doorways Grid */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  width: 100%;
}

.portal-card {
  position: relative;
  height: 180px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.portal-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.portal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(10, 12, 16, 0.95) 0%, rgba(10, 12, 16, 0.4) 60%, transparent 100%);
  transition: background 0.4s ease;
}

.portal-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.9rem;
  text-align: left;
  z-index: 3;
}

.portal-info .p-num {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--color-kin);
  font-weight: 700;
}

.portal-info h3 {
  font-family: var(--font-display);
  font-size: 0.88rem;
  color: #fff;
  margin: 0.1rem 0;
  letter-spacing: 1px;
}

.portal-info .p-jp {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.6);
  display: block;
  margin-bottom: 0.3rem;
}

.portal-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-info .p-cta {
  font-size: 0.72rem;
  color: var(--color-kin-light);
  font-weight: 600;
  display: inline-block;
  margin-top: 0.3rem;
  opacity: 0;
  transform: translateX(-5px);
  transition: var(--transition-smooth);
}

.portal-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-kin);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(212, 175, 55, 0.3);
}

.portal-card:hover .portal-img {
  transform: scale(1.08);
}

.portal-card:hover .portal-info .p-cta {
  opacity: 1;
  transform: translateX(0);
}

.hall-footer-hints {
  margin-top: 1.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.hall-footer-hints kbd, .keyboard-helper kbd {
  background: rgba(255, 255, 255, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}


/* --------------------------------------------------------------------------
   5. WORLD 1: THREADS OF JAPAN (WAFUKU & YŌFUKU)
   -------------------------------------------------------------------------- */
.costume-wing {
  width: 100%;
  height: calc(100% - 60px);
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.costume-wing.active {
  display: block;
  opacity: 1;
}

.wafuku-layout {
  display: flex;
  gap: 1.8rem;
  height: 100%;
  position: relative;
}

/* Center Stage: 3D Mannequins */
.mannequins-stage {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  height: 100%;
}

.mannequin-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.mannequin-visual {
  flex: 1;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0f12;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mannequin-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.mannequin-aura {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 12px;
  pointer-events: none;
  transition: var(--transition-smooth);
}

/* Hotspots on Mannequin */
.mannequin-hotspot {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.85);
  border: 2px solid #fff;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.9);
  animation: pulse-hotspot 2s infinite;
  display: none;
}

@keyframes pulse-hotspot {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 12px rgba(212, 175, 55, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.mannequin-card.inspecting .mannequin-hotspot {
  display: block;
}

.mannequin-label {
  padding-top: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.mannequin-label .m-id {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--color-kin);
}

.mannequin-label h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 1px;
}

.mannequin-label .m-jp {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.m-discover-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.mannequin-card:hover {
  transform: translateY(-5px);
  border-color: rgba(212, 175, 55, 0.4);
}

/* Light up active mannequin, dim others according to doc */
.mannequin-card.active {
  border-color: var(--color-kin);
  box-shadow: 0 0 30px rgba(212, 175, 55, 0.25);
  background: var(--bg-surface-elevated);
}

.mannequin-card.active .mannequin-aura {
  border-color: var(--color-kin);
}

.mannequin-card.active .m-discover-btn {
  background: var(--color-kin);
  color: #000;
  border-color: var(--color-kin);
}

.mannequin-card.spinning .mannequin-img {
  animation: spin-model 5s linear infinite;
}

@keyframes spin-model {
  0% { transform: rotateY(0deg); }
  50% { transform: rotateY(180deg) scale(1.05); }
  100% { transform: rotateY(360deg); }
}

/* Compare Mode Overlay */
.compare-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 16, 0.94);
  backdrop-filter: blur(25px);
  border-radius: 16px;
  border: 1px solid var(--border-gold);
  z-index: 20;
  display: none;
  flex-direction: column;
  padding: 1.5rem;
}

.compare-overlay.active {
  display: flex;
}

.compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.8rem;
  margin-bottom: 1rem;
}

.compare-header h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-kin);
}

.btn-close-compare {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
}

.compare-side-by-side {
  display: flex;
  flex: 1;
  gap: 1.5rem;
  align-items: stretch;
}

.compare-col {
  flex: 1;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

.compare-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-kin);
}

.cmp-selector select {
  width: 100%;
  background: #1a202c;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
  border-radius: 6px;
  margin-bottom: 0.8rem;
}

.cmp-media {
  height: 200px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.cmp-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Wing 2: Yōfuku Contemporary Pedestals Gallery */
.yofuku-gallery {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
}

.yofuku-intro-bar {
  margin-bottom: 1rem;
}

.neon-pill {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 2px;
  color: var(--neon-pink);
  background: rgba(255, 42, 133, 0.15);
  border: 1px solid var(--neon-pink);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.yofuku-intro-bar h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
  margin-top: 0.3rem;
}

.yofuku-intro-bar p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.yofuku-pedestals-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}

.pedestal-card {
  background: rgba(18, 20, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.pedestal-stage {
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: #090b10;
}

.pedestal-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.neon-ring {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--neon-pink);
  box-shadow: 0 0 15px var(--neon-pink);
}

.neon-ring.dark-ring { background: var(--neon-purple); box-shadow: 0 0 15px var(--neon-purple); }
.neon-ring.pastel-ring { background: var(--color-sakura); box-shadow: 0 0 15px var(--color-sakura); }
.neon-ring.cyan-ring { background: var(--neon-cyan); box-shadow: 0 0 15px var(--neon-cyan); }

.pedestal-info {
  padding-top: 0.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pedestal-info .p-code {
  font-family: var(--font-display);
  font-size: 0.7rem;
  color: var(--neon-purple);
  font-weight: 700;
}

.pedestal-info h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: #fff;
}

.pedestal-info .p-tagline {
  font-size: 0.78rem;
  color: var(--neon-pink);
  font-style: italic;
  margin-bottom: 0.4rem;
}

.pedestal-info p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.8rem;
}

.btn-pedestal-inspect {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.75rem;
  padding: 0.4rem;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pedestal-card:hover {
  transform: translateY(-5px);
  border-color: var(--neon-purple);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(181, 55, 242, 0.3);
}

.pedestal-card:hover .pedestal-img {
  transform: scale(1.06);
}

/* Yofuku Drawer Flyout */
.yofuku-drawer {
  position: absolute;
  top: 0;
  right: -100%;
  width: 480px;
  height: 100%;
  background: rgba(14, 16, 22, 0.95);
  backdrop-filter: blur(25px);
  border-left: 1px solid var(--neon-purple);
  z-index: 30;
  padding: 2rem;
  overflow-y: auto;
  transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.8);
}

.yofuku-drawer.active {
  right: 0;
}


/* --------------------------------------------------------------------------
   6. WORLD 2: A TASTE OF JAPAN (SIGNATURE & ICHIJŪ-SANSAI)
   -------------------------------------------------------------------------- */
.taste-wing {
  width: 100%;
  height: calc(100% - 60px);
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.taste-wing.active {
  display: block;
  opacity: 1;
}

.signature-layout {
  display: flex;
  gap: 1.8rem;
  height: 100%;
}

.dish-showcase-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.dish-walls-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.wall-nav-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.wall-nav-btn.active, .wall-nav-btn:hover {
  background: rgba(166, 27, 41, 0.25);
  border-color: var(--color-shinku);
  color: #fff;
}

.dish-3d-pedestal-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(30, 36, 48, 0.6) 0%, rgba(10, 12, 16, 0.8) 70%);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.dish-floating-container {
  width: 320px;
  height: 320px;
  position: relative;
  z-index: 5;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.dish-floating-container.spinning {
  animation: dish-spin 6s linear infinite;
}

@keyframes dish-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.active-dish-3d {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.2);
  border: 4px solid rgba(255, 255, 255, 0.1);
}

/* Steam particle simulation */
.steam-particle {
  position: absolute;
  top: 10%;
  width: 14px;
  height: 40px;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.4) 0%, transparent 80%);
  border-radius: 50%;
  filter: blur(4px);
  animation: steam-rise 3s infinite ease-out;
}
.steam-particle.s1 { left: 35%; animation-delay: 0s; }
.steam-particle.s2 { left: 50%; animation-delay: 1s; }
.steam-particle.s3 { left: 65%; animation-delay: 2s; }

@keyframes steam-rise {
  0% { transform: translateY(0) scaleX(1); opacity: 0; }
  50% { opacity: 0.6; }
  100% { transform: translateY(-70px) scaleX(2.5); opacity: 0; }
}

.pedestal-base {
  position: absolute;
  bottom: 12%;
  width: 360px;
  height: 25px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8) 0%, transparent 70%);
  z-index: 2;
}

/* Map Beam Indicator */
.origin-beam-indicator {
  position: absolute;
  bottom: 1.5rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(10, 12, 16, 0.8);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--color-kin);
}

.beam-tag {
  font-size: 0.8rem;
  color: var(--color-kin-light);
  font-weight: 600;
}

/* 7 Dishes Carousel Bar */
.dishes-carousel-bar {
  display: flex;
  gap: 0.8rem;
  overflow-x: auto;
  padding: 0.8rem 0;
  margin-top: 0.8rem;
}

.dish-chip {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.dish-chip.active {
  background: rgba(166, 27, 41, 0.3);
  border-color: var(--color-kin);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.25);
}

.dish-chip .d-title {
  font-weight: 700;
  color: #fff;
}
.dish-chip .d-region {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* 3.2: Ichijū-sansai (一汁三菜) Experience */
.ichiju-experience-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 1.8rem;
  height: 100%;
}

.ichiju-guide-pane {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.6rem;
  overflow-y: auto;
}

.ichiju-formula-card {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin: 1.2rem 0;
}

.f-row {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
}

.f-jp {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--color-kin);
  font-weight: 700;
  width: 50px;
}

.f-info strong {
  color: #fff;
}
.f-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.extra-dining-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--color-shiraki);
  padding: 0.8rem;
  border-radius: 0 8px 8px 0;
}

.extra-dining-box h4 {
  font-size: 0.75rem;
  letter-spacing: 1px;
  color: var(--color-shiraki);
  margin-bottom: 0.3rem;
}

.interactive-tray-game {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.game-instruction-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.game-text h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--color-kin);
}

.game-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.btn-reset-tray {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Lacquer Tray Simulation */
.traditional-tray {
  flex: 1;
  background: linear-gradient(135deg, #2b1114, #120608);
  border-radius: 20px;
  border: 4px solid #521920;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6);
  padding: 1.2rem;
  position: relative;
  margin-bottom: 1rem;
}

.tray-rim {
  width: 100%;
  height: 100%;
  position: relative;
}

.tray-slot {
  position: absolute;
  width: 130px;
  height: 100px;
  border: 2px dashed rgba(212, 175, 55, 0.4);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.4rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.tray-slot:hover {
  border-color: var(--color-kin);
  background: rgba(212, 175, 55, 0.1);
}

.slot-label {
  font-size: 0.68rem;
  color: var(--color-kin-light);
  text-align: center;
}

.slot-content {
  font-size: 0.75rem;
  color: #fff;
  font-weight: 600;
  text-align: center;
}

.slot-bottom-left { bottom: 15%; left: 8%; }
.slot-bottom-right { bottom: 15%; right: 8%; }
.slot-top-right { top: 12%; right: 8%; }
.slot-top-left { top: 12%; left: 8%; }
.slot-center-top { top: 18%; left: 50%; transform: translateX(-50%); }

.chopstick-rest {
  position: absolute;
  bottom: 2%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  height: 8px;
  background: #3e2723;
  border-radius: 4px;
}

.food-pantry-rack {
  margin-bottom: 0.8rem;
}

.pantry-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-kin);
  display: block;
  margin-bottom: 0.4rem;
}

.pantry-items-list {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pantry-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.pantry-btn:hover {
  background: var(--color-kin);
  color: #000;
}

.tray-feedback-box {
  background: rgba(212, 175, 55, 0.08);
  border-left: 3px solid var(--color-kin);
  padding: 0.6rem 0.9rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.78rem;
}


/* --------------------------------------------------------------------------
   7. WORLD 3: VOICES OF JAPAN (DIALECTS & MAP)
   -------------------------------------------------------------------------- */
.voices-interactive-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 1.5rem;
  width: 100%;
  flex: 1;
  min-height: 0;
  height: calc(100% - 60px);
}

#dialect-info-panel {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1;
}

.map-interactive-stage {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
}

.map-visual-container {
  flex: 1;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #080c14;
}

.map-bg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
}

.map-station-pin {
  position: absolute;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate(-50%, -50%);
  transition: var(--transition-smooth);
}

.pin-marker {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-shinku);
  border: 2px solid #fff;
  box-shadow: 0 0 10px rgba(166, 27, 41, 0.8);
}

.pin-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  margin-top: 3px;
  white-space: nowrap;
}

.map-station-pin.active .pin-marker {
  background: var(--color-kin);
  box-shadow: 0 0 20px rgba(212, 175, 55, 1);
  transform: scale(1.3);
}

.map-station-pin.active .pin-name {
  color: var(--color-kin-light);
  border: 1px solid var(--color-kin);
}

/* Specific Pin Coordinates on Map Image */
.pin-tokyo { top: 48%; left: 62%; }
.pin-osaka { top: 58%; left: 48%; }
.pin-kyoto { top: 52%; left: 47%; }
.pin-tohoku { top: 30%; left: 70%; }
.pin-fukuoka { top: 68%; left: 32%; }
.pin-okinawa { top: 86%; left: 20%; }

.map-stations-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}

.station-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.72rem;
  padding: 0.35rem 0.7rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.station-chip.active, .station-chip:hover {
  background: var(--color-kin);
  color: #000;
  font-weight: 600;
}

/* Listen & Compare Panel */
.listen-compare-panel {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.audio-badge {
  font-family: var(--font-display);
  font-size: 0.72rem;
  color: var(--neon-cyan);
  font-weight: 700;
  letter-spacing: 1.5px;
}

.phrase-compare-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 1rem;
}

.phrase-compare-card.dialect-card {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(212, 175, 55, 0.06);
}

.phrase-tag {
  font-size: 0.68rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.phrase-text {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.phrase-text.highlight {
  color: var(--color-kin-light);
}

.phrase-romaji {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.phrase-meaning {
  font-size: 0.82rem;
  color: #d1d5db;
  margin: 0.3rem 0 0.8rem;
  font-style: italic;
}

.btn-play-voice {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-play-voice.primary {
  background: var(--color-kin);
  color: #000;
  border-color: var(--color-kin);
}

.audio-compare-slider-wrap {
  margin-top: auto;
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 10px;
}

.audio-compare-slider-wrap label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.slider-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0;
}

.slider-controls input[type="range"] {
  flex: 1;
}

.btn-replay-all {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

.ryukyu-special-box {
  background: rgba(0, 242, 254, 0.06);
  border-left: 3px solid var(--neon-cyan);
  padding: 0.8rem;
  border-radius: 0 8px 8px 0;
  margin-top: 1rem;
}
.ryukyu-special-box h4 {
  color: var(--neon-cyan);
  font-size: 0.75rem;
  margin-bottom: 0.3rem;
}


/* --------------------------------------------------------------------------
   8. WORLD 4: THE FOUR SEASONS OF JAPAN (FESTIVALS & DANCE)
   -------------------------------------------------------------------------- */
.four-seasons-pills {
  display: flex;
  gap: 0.6rem;
}

.season-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.season-pill[data-s="spring"].active { background: rgba(255, 183, 197, 0.3); border-color: var(--color-sakura); }
.season-pill[data-s="summer"].active { background: rgba(230, 81, 0, 0.35); border-color: #ff9800; }
.season-pill[data-s="autumn"].active { background: rgba(199, 62, 29, 0.35); border-color: var(--color-momiji); }
.season-pill[data-s="winter"].active { background: rgba(142, 197, 252, 0.3); border-color: var(--color-fuyu); }

.seasons-stage-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.8rem;
  width: 100%;
  flex: 1;
  min-height: 0;
  height: calc(100% - 60px);
}

#festival-info-panel {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1;
}

.season-pavilion-stage {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pavilion-visual-frame {
  flex: 1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.pavilion-bg-art {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: background-image 0.8s ease;
}

.pavilion-lighting {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 12, 16, 0.9) 0%, rgba(10, 12, 16, 0.2) 60%, transparent 100%);
}

.floating-season-kanji {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-family: var(--font-serif);
  font-size: 6rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.15);
  pointer-events: none;
}

.virtual-stage-box {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  right: 2rem;
  z-index: 5;
}

.stage-tag-badge {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--color-kin);
  margin-bottom: 0.3rem;
}

.virtual-stage-box h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 0.3rem;
}

.virtual-stage-box p {
  font-size: 0.88rem;
  color: #d1d5db;
  font-style: italic;
  margin-bottom: 1rem;
}

.stage-actions {
  display: flex;
  gap: 0.8rem;
}

.stage-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.stage-btn:hover {
  background: var(--color-kin);
  color: #000;
}

.dance-steps-interactive {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.8rem 1.2rem;
  margin-top: 1rem;
}

.dance-guide-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-kin);
  display: block;
  margin-bottom: 0.5rem;
}

.dance-steps-strip {
  display: flex;
  gap: 0.8rem;
}

.dance-step-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.dance-step-card:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: var(--color-kin);
}

.st-num {
  font-size: 0.8rem;
  font-weight: 900;
  color: var(--color-kin);
  display: block;
}

.st-name {
  font-size: 0.75rem;
  color: #fff;
  font-weight: 600;
  display: block;
}

.dance-step-card small {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.sub-fest-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}

.sub-chip {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-size: 0.72rem;
  color: #e5e7eb;
}


/* --------------------------------------------------------------------------
   9. WORLD 5: ECHOES OF JAPAN (TRADITIONAL & MODERN MUSIC)
   -------------------------------------------------------------------------- */
.music-wing {
  width: 100%;
  height: calc(100% - 60px);
  display: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.music-wing.active {
  display: block;
  opacity: 1;
}

/* Wing 1: Traditional Music */
.trad-music-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.8rem;
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.trad-music-grid > .museum-info-panel {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1;
}

.trad-stations-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.trad-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.trad-thumb {
  height: 130px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  margin-bottom: 0.6rem;
}

.trad-info .t-num {
  font-size: 0.7rem;
  color: var(--color-kin);
  font-weight: 700;
}

.trad-info h4 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  color: #fff;
}

.trad-info .t-tagline {
  font-size: 0.75rem;
  color: var(--color-kin-light);
  font-style: italic;
  display: block;
  margin-bottom: 0.3rem;
}

.trad-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 0.6rem;
}

.btn-listen-sample {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.72rem;
  cursor: pointer;
}

.trad-card.active {
  border-color: var(--color-kin);
  background: var(--bg-surface-elevated);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.2);
}

.trad-visualizer-pane {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
}

.sound-wave-container {
  height: 140px;
  background: #080a0e;
  border-radius: 12px;
  margin: 1.2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

#music-wave-canvas {
  width: 100%;
  height: 100%;
}

.player-controls-bar {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-player-play {
  background: linear-gradient(135deg, var(--color-shinku), var(--color-kin));
  border: none;
  color: #fff;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Wing 2: Modern Music (City Pop / J-Pop / J-Rock / Vocaloid) */
.mod-music-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.8rem;
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.mod-music-grid > .museum-info-panel {
  width: 100% !important;
  max-width: 100% !important;
  flex: 1;
}

.mod-stations-carousel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.station-card {
  background: rgba(18, 20, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.station-artwork {
  height: 140px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  position: relative;
  margin-bottom: 0.6rem;
}

.genre-tag {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.8);
  color: var(--neon-pink);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--neon-pink);
}

.station-card.active {
  border-color: var(--neon-pink);
  box-shadow: 0 0 25px rgba(255, 42, 133, 0.3);
}

.vinyl-spinning-disc {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, #222 20%, #111 22%, #000 60%);
  border: 4px solid #333;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.8);
}

.vinyl-spinning-disc.playing {
  animation: disc-spin 3s linear infinite;
}

@keyframes disc-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.disc-label {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 2px solid #555;
}


/* --------------------------------------------------------------------------
   10. Modals & Presenter Drawer
   -------------------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  width: 600px;
  max-width: 90vw;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
}

.modal-media {
  height: 320px;
}

.modal-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-info {
  padding: 1.5rem;
}

.modal-info h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--color-kin);
  margin-bottom: 0.5rem;
}

/* Presenter Notes Drawer */
.presenter-drawer {
  position: fixed;
  top: var(--header-height);
  bottom: var(--footer-height);
  right: -500px;
  width: 480px;
  background: rgba(14, 18, 25, 0.96);
  backdrop-filter: blur(20px);
  border-left: 1px solid var(--border-gold);
  z-index: 90;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -15px 0 40px rgba(0, 0, 0, 0.7);
}

.presenter-drawer.active {
  right: 0;
}

.drawer-header {
  padding: 1.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-badge {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 2px;
  color: var(--color-kin);
}

.drawer-header h3 {
  font-size: 1.05rem;
  color: #fff;
}

.drawer-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

.drawer-content {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  line-height: 1.6;
}

.drawer-footer {
  padding: 0.8rem 1.2rem;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   11. Museum Footer Timeline & Controls
   -------------------------------------------------------------------------- */
.museum-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: var(--footer-height);
  background: rgba(10, 12, 16, 0.9);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.timeline-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-progress {
  height: 100%;
  width: 16.66%;
  background: linear-gradient(90deg, var(--color-shinku), var(--color-kin));
  transition: width 0.4s ease;
}

.footer-inner {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.world-nav-buttons {
  display: flex;
  gap: 0.5rem;
}

.nav-arrow-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0.45rem 1rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-arrow-btn.highlight {
  background: var(--color-kin);
  color: #000;
  border-color: var(--color-kin);
}

.current-world-indicator {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--color-kin-light);
}

.keyboard-helper {
  font-size: 0.75rem;
  color: var(--text-muted);
}


/* --------------------------------------------------------------------------
   12. Responsive Adaptation (Mobile & Tablet)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  :root {
    --panel-width: 42%;
  }
  .portal-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  html, body {
    overflow-y: auto;
  }
  .museum-stage {
    position: relative;
    top: var(--header-height);
    bottom: auto;
    height: auto;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
  }
  .museum-world {
    position: relative;
    height: auto;
    padding: 1rem;
  }
  .wafuku-layout, .signature-layout, .ichiju-experience-grid, .voices-interactive-grid, .seasons-stage-grid, .trad-music-grid, .mod-music-grid {
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .museum-info-panel {
    width: 100%;
    height: auto;
  }
  .world-nav {
    display: none;
  }
}
