/* style.css - Forest of Life Interactive Walking Portfolio */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg-deep: #0a0f1d;
  --panel-bg: rgba(13, 20, 36, 0.78);
  --panel-border: 1px solid rgba(255, 255, 255, 0.12);
  --panel-blur: blur(20px);
  --gold-glow: #ffd15c;
  --gold-accent: #f59e0b;
  --cyan-accent: #38bdf8;
  --emerald-accent: #10b981;
  --ruby-accent: #f43f5e;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --font-display: 'Plus Jakarta Sans', 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-body);
}

#canvas3d {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 1;
}

/* -------------------------------------------------------------
   HUD OVERLAYS
------------------------------------------------------------- */
#hud {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

/* Header Controls & Quest Tracker */
.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

/* Active Quest Card */
.quest-card {
  pointer-events: auto;
  background: var(--panel-bg);
  border: var(--panel-border);
  backdrop-filter: var(--panel-blur);
  -webkit-backdrop-filter: var(--panel-blur);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  max-width: 360px;
  transition: var(--transition-smooth);
}

.quest-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 209, 92, 0.3);
}

.quest-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.quest-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-glow);
  background: rgba(255, 209, 92, 0.15);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 209, 92, 0.3);
}

.quest-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.quest-objective {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.quest-progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quest-progress-bar-bg {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  overflow: hidden;
}

.quest-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f59e0b, #ffd15c);
  box-shadow: 0 0 12px rgba(255, 209, 92, 0.8);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.quest-progress-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-glow);
  font-family: var(--font-display);
}

/* Top Right Radar & Quick Actions */
.hud-top-right {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

/* Glassmorphic Action Pills */
.hud-action-pills, .quick-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.pill-btn, .icon-btn {
  background: rgba(13, 20, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f8fafc;
  padding: 8px 14px;
  border-radius: 24px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  outline: none;
  user-select: none;
}

.pill-btn:hover, .icon-btn:hover {
  background: rgba(26, 38, 64, 0.95);
  border-color: rgba(255, 209, 92, 0.6);
  color: var(--gold-glow);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), 0 0 14px rgba(255, 209, 92, 0.3);
}

.pill-btn:active, .icon-btn:active {
  transform: translateY(0);
}

.pill-btn.highlight-pill {
  border-color: rgba(255, 209, 92, 0.45);
  background: linear-gradient(135deg, rgba(20, 28, 48, 0.9) 0%, rgba(35, 48, 76, 0.85) 100%);
  color: #ffd15c;
}

.pill-btn.highlight-pill:hover {
  border-color: #ffd15c;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(255, 209, 92, 0.35) 100%);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(255, 209, 92, 0.4);
}

.pill-icon {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Circular Minimap Radar */
.minimap-container, .radar-box {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: rgba(10, 16, 32, 0.88);
  border: 2px solid rgba(255, 209, 92, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 209, 92, 0.2);
  margin-top: 4px;
  transition: var(--transition-smooth);
}

.minimap-container:hover, .radar-box:hover {
  border-color: #ffd15c;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.7), 0 0 25px rgba(255, 209, 92, 0.35);
}

#minimap-canvas, #radar-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.compass-label, .radar-compass-n {
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  font-weight: 800;
  color: #f43f5e;
  font-family: var(--font-display);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  pointer-events: none;
}

/* -------------------------------------------------------------
   STAMINA GAUGE (ZELDA / GENSHIN RING)
------------------------------------------------------------- */
#stamina-wheel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(25px, -25px);
  width: 48px;
  height: 48px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  z-index: 15;
}

#stamina-wheel.visible {
  opacity: 1;
}

.stamina-svg {
  transform: rotate(-90deg);
}

.stamina-bg {
  stroke: rgba(0, 0, 0, 0.4);
  stroke-width: 4.5;
  fill: none;
}

.stamina-bar {
  stroke: #10b981;
  stroke-width: 4.5;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 125.6;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.8));
  transition: stroke-dashoffset 0.1s linear;
}

/* -------------------------------------------------------------
   INTERACTION PROMPT BANNER (BOTTOM CENTER)
------------------------------------------------------------- */
.interaction-prompt-container {
  align-self: center;
  pointer-events: auto;
  margin-bottom: 24px;
}

.prompt-banner {
  background: var(--panel-bg);
  border: 1px solid rgba(255, 209, 92, 0.5);
  backdrop-filter: var(--panel-blur);
  -webkit-backdrop-filter: var(--panel-blur);
  padding: 12px 24px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 209, 92, 0.2);
  cursor: pointer;
  animation: promptPulse 2s infinite ease-in-out;
  transition: var(--transition-smooth);
}

.prompt-banner:hover {
  transform: scale(1.04);
  border-color: var(--gold-glow);
}

@keyframes promptPulse {
  0%, 100% { box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 15px rgba(255, 209, 92, 0.2); }
  50% { box-shadow: 0 12px 30px rgba(0,0,0,0.5), 0 0 25px rgba(255, 209, 92, 0.4); }
}

.key-badge {
  background: #ffffff;
  color: #0f172a;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.prompt-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
}

/* Bottom Controls Guide */
.hud-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
}

.controls-guide {
  background: rgba(13, 20, 36, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

.controls-guide span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.controls-guide kbd {
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 11px;
  color: #ffffff;
}

/* -------------------------------------------------------------
   MOBILE TOUCH CONTROLS
------------------------------------------------------------- */
.mobile-touch-controls {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

@media (max-width: 900px), (pointer: coarse) {
  .mobile-touch-controls {
    display: block;
  }
  .controls-guide {
    display: none;
  }
}

.joystick-zone {
  position: absolute;
  bottom: 40px;
  left: 40px;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
}

.joystick-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 50px;
  height: 50px;
  margin-top: -25px;
  margin-left: -25px;
  background: var(--gold-glow);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(255, 209, 92, 0.6);
}

.mobile-action-buttons {
  position: absolute;
  bottom: 40px;
  right: 40px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}

.touch-action-btn {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--panel-bg);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: var(--panel-blur);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.touch-action-btn:active {
  background: var(--gold-glow);
  color: #0f172a;
  transform: scale(0.92);
}

/* -------------------------------------------------------------
   MODALS (INTRO, DIALOGUE, ART INSPECTION, GALLERY)
------------------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(8, 12, 22, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 24px;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Intro Title Screen */
.intro-modal-card {
  background: var(--panel-bg);
  border: var(--panel-border);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 209, 92, 0.15);
  border-radius: 24px;
  max-width: 680px;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.intro-banner-container {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
}

.intro-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
}

.intro-banner-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(0deg, rgba(13, 20, 36, 1) 0%, rgba(13, 20, 36, 0.2) 60%, transparent 100%);
}

.intro-content {
  padding: 28px 36px 36px;
}

.intro-title-jp {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 4px;
  color: var(--gold-glow);
  margin-bottom: 4px;
}

.intro-title-main {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffffff;
  margin-bottom: 12px;
  text-shadow: 0 0 20px rgba(255, 209, 92, 0.3);
}

.intro-artist-byline {
  font-size: 15px;
  font-weight: 500;
  color: var(--cyan-accent);
  margin-bottom: 18px;
}

.intro-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}

.intro-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.primary-btn {
  background: linear-gradient(135deg, #f59e0b, #ffd15c);
  color: #0f172a;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 34px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
  transition: var(--transition-smooth);
}

.primary-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 30px rgba(245, 158, 11, 0.6);
}

/* Language Selection Pill Group */
.lang-selector {
  display: flex;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.lang-btn.active {
  background: #ffffff;
  color: #0f172a;
}

/* -------------------------------------------------------------
   RPG DIALOGUE MODAL (BOTTOM OF SCREEN)
------------------------------------------------------------- */
#dialogue-modal, .dialogue-overlay {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  width: min(92vw, 760px);
  background: rgba(10, 16, 32, 0.94);
  border: 1px solid rgba(255, 209, 92, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 30px rgba(255, 209, 92, 0.15);
  padding: 22px 26px;
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#dialogue-modal.active, .dialogue-overlay.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dialogue-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}

.dialogue-portrait-box {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 209, 92, 0.4);
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.dialogue-portrait {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dialogue-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.dialogue-speaker {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-glow);
  margin-bottom: 6px;
}

.dialogue-text {
  font-size: 14px;
  line-height: 1.6;
  color: #e2e8f0;
  margin-bottom: 16px;
  min-height: 44px;
}

.dialogue-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.dialogue-btn, .secondary-btn {
  padding: 8px 20px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dialogue-btn.primary-action {
  background: linear-gradient(135deg, #ffd15c 0%, #f59e0b 100%);
  color: #0a0f1d;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.dialogue-btn.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.5);
}

.dialogue-btn.secondary-action, .secondary-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.dialogue-btn.secondary-action:hover, .secondary-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* -------------------------------------------------------------
   ART INSPECTION LIGHTBOX (FULLSCREEN MUSEUM VIEW)
------------------------------------------------------------- */
.artwork-modal-card, .artwork-lightbox-card {
  background: rgba(10, 16, 32, 0.95);
  border: 1px solid rgba(255, 209, 92, 0.35);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 209, 92, 0.15);
  border-radius: 24px;
  width: min(92vw, 1080px);
  max-height: 90dvh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  animation: modalAppear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.artwork-modal-body {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  height: 100%;
  max-height: 90dvh;
  overflow: hidden;
}

.artwork-visual-column, .lightbox-visual-pane {
  background: #050811;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  position: relative;
}

.artwork-img-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.artwork-display-img, .lightbox-img, .artwork-display-video, .lightbox-video {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.artwork-info-column, .lightbox-details-pane {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  text-align: left;
  background: rgba(13, 20, 36, 0.6);
}

.artwork-header {
  margin-bottom: 20px;
}

.artwork-title, .lightbox-art-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  text-shadow: 0 0 15px rgba(255, 209, 92, 0.2);
}

.artwork-meta, .lightbox-art-meta {
  font-size: 13px;
  color: var(--gold-glow);
  font-family: var(--font-display);
  font-weight: 600;
}

.artwork-description-scroll {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 24px;
  padding-right: 8px;
}

.curatorial-label, .lightbox-section-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--cyan-accent);
  margin-bottom: 8px;
}

.artwork-paragraph, .lightbox-art-desc {
  font-size: 14px;
  line-height: 1.65;
  color: #cbd5e1;
  margin-bottom: 18px;
}

.curatorial-quote, .lightbox-curator-box {
  background: rgba(255, 255, 255, 0.04);
  border-left: 3px solid var(--gold-glow);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #e2e8f0;
  font-style: italic;
}

.artwork-actions-row, .lightbox-action-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.action-btn {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-btn.primary-action {
  background: linear-gradient(135deg, #f59e0b 0%, #ffd15c 100%);
  color: #0a0f1d;
  border-color: #ffd15c;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.action-btn.primary-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
}

.action-btn.secondary-action {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.15);
}

.action-btn.secondary-action:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

.close-modal-btn, .lightbox-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  transition: var(--transition-smooth);
  z-index: 20;
  backdrop-filter: blur(8px);
}

.close-modal-btn:hover, .lightbox-close-btn:hover {
  background: #ef4444;
  border-color: #ef4444;
  transform: rotate(90deg);
}

/* -------------------------------------------------------------
   GALLERY CATALOG MODAL ([M] KEY)
------------------------------------------------------------- */
.catalog-modal-card, .catalog-card {
  background: var(--panel-bg);
  border: var(--panel-border);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
  border-radius: 24px;
  width: 90%;
  max-width: 960px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 32px;
  position: relative;
}

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

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.artwork-thumb-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
}

.artwork-thumb-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-glow);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

.artwork-thumb-card.locked {
  filter: grayscale(1) opacity(0.5);
  cursor: not-allowed;
}

.thumb-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.thumb-info {
  padding: 12px;
}

.thumb-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thumb-status {
  font-size: 11px;
  color: var(--gold-glow);
}

.catalog-counter-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--gold-glow);
  background: rgba(255, 209, 92, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 209, 92, 0.3);
}

.artist-bio-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}

.bio-heading {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cyan-accent);
  margin-bottom: 8px;
}

.bio-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: #94a3b8;
}

.btn-catalog-jump-world {
  transition: all 0.2s ease;
}

.btn-catalog-jump-world:hover {
  background: rgba(168, 85, 247, 0.6) !important;
  transform: translateY(-1px);
}

/* Notification Toast */
#notification-toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: var(--panel-bg);
  border: 1px solid var(--gold-glow);
  backdrop-filter: var(--panel-blur);
  padding: 12px 24px;
  border-radius: 30px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 209, 92, 0.3);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

#notification-toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* -------------------------------------------------------------
   MULTI-STAGE STORY INTRO & RED DOOR BUTTON (Mebae PPTX Flow)
------------------------------------------------------------- */
.story-step {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.7s ease;
  z-index: 10;
}

.story-step.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.story-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(10, 15, 29, 0.68) 0%, rgba(5, 8, 16, 0.94) 100%);
  backdrop-filter: blur(8px);
}

.story-content-box {
  position: relative;
  z-index: 2;
  max-width: 680px;
  width: 90%;
  padding: 3rem 2.5rem;
  background: rgba(15, 23, 42, 0.80);
  border: 1px solid rgba(255, 209, 92, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 35px rgba(255, 209, 92, 0.18);
  border-radius: 24px;
  backdrop-filter: blur(24px);
  text-align: center;
  animation: modalAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-content-box.wide-box {
  max-width: 840px;
}

.story-kanji-title {
  font-family: 'Cinzel', 'Noto Serif JP', serif;
  font-size: 2.2rem;
  letter-spacing: 0.3em;
  color: #ffd15c;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 20px rgba(255, 209, 92, 0.5);
}

.story-main-title {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: 0.6rem;
}

.story-subtitle {
  font-size: 1rem;
  color: #94a3b8;
  letter-spacing: 0.05em;
  margin-bottom: 2rem;
}

.story-instruction {
  font-size: 0.95rem;
  color: #cbd5e1;
  margin-bottom: 1.2rem;
}

.intro-lang-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.2rem;
}

.intro-lang-btn {
  padding: 0.7rem 1.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.intro-lang-btn:hover, .intro-lang-btn.active {
  background: #ffd15c;
  border-color: #ffd15c;
  color: #0a0f1d;
  box-shadow: 0 0 20px rgba(255, 209, 92, 0.45);
  transform: translateY(-2px);
}

.btn-story-primary {
  padding: 0.9rem 2.5rem;
  background: linear-gradient(135deg, #ffd15c 0%, #f59e0b 100%);
  border: none;
  border-radius: 50px;
  color: #0a0f1d;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.4);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-story-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px rgba(245, 158, 11, 0.6);
}

.btn-story-primary.glow-gold {
  animation: pulseGlow 2s infinite alternate;
}

/* Quote Screen */
.quote-symbol {
  font-size: 3.5rem;
  line-height: 1;
  color: #ffd15c;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.story-quote-heading {
  font-family: 'Cinzel', 'Noto Serif JP', serif;
  font-size: 1.75rem;
  line-height: 1.4;
  color: #f8fafc;
  margin-bottom: 1.4rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.story-quote-paragraph {
  font-size: 1.02rem;
  line-height: 1.8;
  color: #cbd5e1;
  font-style: italic;
  margin-bottom: 1.5rem;
}

.story-quote-author {
  display: block;
  font-size: 0.95rem;
  color: #ffd15c;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Golden Puzzle Button (Step 3) */
.center-puzzle-box {
  background: transparent;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
}

.golden-puzzle-button {
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  padding: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.golden-puzzle-button:hover {
  transform: scale(1.08) rotate(-2deg);
}

.puzzle-shape {
  position: relative;
  width: 220px;
  height: 220px;
  background: url('./assets/puzzle_piece_gold.png') no-repeat center center;
  background-size: contain;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 15px 30px rgba(255, 209, 92, 0.6));
}

.puzzle-glow-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 209, 92, 0.4) 0%, transparent 70%);
  animation: pulseGlow 2.5s infinite;
}

.puzzle-btn-text {
  font-family: 'Cinzel', 'Outfit', serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #451a03;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
  line-height: 1.25;
  text-align: center;
}

.puzzle-caption {
  font-size: 1rem;
  color: #f1f5f9;
  margin-top: 1.8rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* Video Step (Step 4) */
.video-step {
  background: #000;
}

.intro-fullscreen-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-skip-container {
  position: absolute;
  bottom: 40px;
  right: 40px;
  z-index: 10;
}

.btn-skip {
  padding: 0.6rem 1.4rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.25s ease;
}

.btn-skip:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #ffd15c;
  color: #ffd15c;
}

/* Owl Prompt & Red Door Button (Step 5 & 6) */
.dialogue-prompt-box {
  max-width: 640px;
}

.owl-speech-bubble {
  background: rgba(15, 23, 42, 0.88);
  border: 2px solid #ffd15c;
  border-radius: 20px;
  padding: 1.8rem 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  text-align: left;
}

.owl-title-badge {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffd15c;
  background: rgba(255, 209, 92, 0.15);
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.8rem;
}

.owl-speech-text {
  font-family: 'Cinzel', 'Noto Serif JP', serif;
  font-size: 1.3rem;
  line-height: 1.5;
  color: #ffffff;
}

/* Iconic Red Door Button as specified in PPTX */
.btn-red-door {
  padding: 1rem 2.2rem;
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  border: 2px solid #ffd15c;
  border-radius: 14px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(220, 38, 38, 0.5), 0 0 15px rgba(255, 209, 92, 0.4);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-red-door:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 15px 40px rgba(220, 38, 38, 0.7), 0 0 25px rgba(255, 209, 92, 0.6);
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

.door-icon {
  font-size: 1.4rem;
}

/* Blue Door Button for Rest Room (PPTX Slide 6) */
.btn-blue-door {
  padding: 0.9rem 2.2rem;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 2px solid #7dd3fc;
  border-radius: 14px;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.45), 0 0 15px rgba(125, 211, 252, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-blue-door:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 15px 40px rgba(2, 132, 199, 0.65), 0 0 25px rgba(125, 211, 252, 0.55);
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

/* Toast Notifications */
.hud-toast {
  position: fixed;
  top: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid #ffd15c;
  border-radius: 30px;
  padding: 0.7rem 1.6rem;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 209, 92, 0.3);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 100;
  backdrop-filter: blur(12px);
  animation: toastFade 0.4s ease;
}

@keyframes toastFade {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes pulseGlow {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.15); opacity: 1; }
}

/* -------------------------------------------------------------
   INDIE UI/UX POLISH: COLLAPSIBLE QUEST CARD & ATELIER MODAL
------------------------------------------------------------- */
.quest-toggle-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.quest-toggle-btn:hover {
  background: rgba(255, 209, 92, 0.2);
  border-color: var(--gold-glow);
  color: var(--gold-glow);
}

.quest-card.collapsed {
  padding: 10px 14px;
  max-width: 240px;
}

.quest-card.collapsed #quest-card-body {
  display: none;
}

.quest-card.collapsed .quest-title {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
}

/* Wardrobe Atelier Modal */
.wardrobe-modal-box {
  max-width: 780px;
  border-color: #ffd15c;
  background: rgba(10, 16, 32, 0.94);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8), 0 0 40px rgba(255, 209, 92, 0.2);
}

.wardrobe-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
  text-align: left;
}

.wardrobe-tabs {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.8rem;
}

.wardrobe-tab-btn {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #cbd5e1;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.wardrobe-tab-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 209, 92, 0.4);
}

.wardrobe-tab-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(255, 209, 92, 0.35) 100%);
  border-color: #ffd15c;
  color: #ffd15c;
  box-shadow: 0 0 16px rgba(255, 209, 92, 0.3);
}

.wardrobe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 8px 12px 2px;
  margin-bottom: 1.4rem;
}

.wardrobe-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
  position: relative;
}

.wardrobe-item-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 209, 92, 0.35);
  transform: translateY(-2px);
}

.wardrobe-item-card.equipped {
  border-color: #ffd15c;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 0 20px rgba(255, 209, 92, 0.2);
}

.wardrobe-item-card.locked {
  opacity: 0.55;
  filter: grayscale(0.4);
}

.wardrobe-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.wardrobe-card-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.wardrobe-card-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
}

.wardrobe-card-desc {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.45;
  margin-bottom: 12px;
  flex: 1;
}

.wardrobe-card-action {
  width: 100%;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-display);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  border: none;
}

.wardrobe-card-action.btn-equip {
  background: linear-gradient(135deg, #ffd15c 0%, #f59e0b 100%);
  color: #0a0f1d;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.wardrobe-card-action.btn-equip:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.5);
}

.wardrobe-card-action.btn-equipped {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid #10b981;
  cursor: default;
}

.wardrobe-card-action.btn-locked {
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.76rem;
  cursor: not-allowed;
}

.wardrobe-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-wrap: wrap;
  gap: 8px;
}

/* Sleek Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 15, 29, 0.6);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 209, 92, 0.35);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 209, 92, 0.6);
}

/* Cosmetic Reward Highlight Banner */
.cosmetic-reward-banner {
  display: flex;
  margin: 1.2rem 0;
  padding: 12px 18px;
  background: rgba(255, 209, 92, 0.12);
  border: 1px solid rgba(255, 209, 92, 0.4);
  border-radius: 16px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: pulseGlow 2s infinite alternate;
}

/* -------------------------------------------------------------
   RESPONSIVE DESIGN (PC, TABLET, MOBILE, LANDSCAPE)
------------------------------------------------------------- */
@media (max-width: 1024px) {
  #hud {
    padding: 16px;
  }
  .quest-card {
    max-width: 320px;
  }
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
  }
  .wardrobe-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  }
  .story-content-box.wide-box {
    max-width: 720px;
    padding: 2.2rem 1.8rem;
  }
}

@media (max-width: 768px) {
  #hud {
    padding: 12px;
  }
  .hud-top-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .quest-card {
    max-width: 100%;
    width: 100%;
    padding: 12px 16px;
  }
  .hud-top-right {
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .hud-action-pills {
    justify-content: flex-start;
    gap: 6px;
    flex: 1;
    overflow-x: auto;
    padding-bottom: 2px;
  }
  .pill-btn {
    padding: 6px 11px;
    font-size: 11.5px;
    border-radius: 18px;
  }
  .minimap-container {
    width: 76px;
    height: 76px;
    min-width: 76px;
    margin-top: 0;
  }
  .controls-guide, #desktop-controls-guide {
    display: none !important;
  }
  .mobile-touch-controls {
    display: block !important;
  }
  
  /* Modals on Mobile */
  .modal-backdrop {
    padding: 12px;
  }
  .artwork-modal-card {
    width: 96vw;
    max-height: 92dvh;
    border-radius: 18px;
  }
  .artwork-modal-body {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .artwork-visual-column {
    padding: 14px;
    max-height: 38vh;
    min-height: 180px;
  }
  .artwork-display-img, .artwork-display-video {
    max-height: 34vh;
  }
  .artwork-info-column {
    padding: 20px 18px;
  }
  .artwork-title {
    font-size: 20px;
  }
  .catalog-modal-card {
    width: 96vw;
    max-height: 92dvh;
    padding: 20px 16px;
    border-radius: 18px;
  }
  .catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .thumb-img {
    height: 105px;
  }
  .dialogue-overlay, #dialogue-modal {
    width: 95vw;
    bottom: 16px;
    padding: 16px;
    border-radius: 16px;
  }
  .dialogue-box {
    gap: 12px;
  }
  .dialogue-portrait-box {
    width: 56px;
    height: 56px;
    border-radius: 12px;
  }
  .dialogue-speaker {
    font-size: 14px;
  }
  .dialogue-text {
    font-size: 13px;
    min-height: 36px;
    margin-bottom: 12px;
  }
  
  /* Story Intro on Mobile */
  .story-content-box {
    width: 95%;
    padding: 2rem 1.4rem;
    border-radius: 18px;
  }
  .story-main-title {
    font-size: 2rem;
    letter-spacing: 0.04em;
  }
  .story-kanji-title {
    font-size: 1.6rem;
    letter-spacing: 0.2em;
  }
  .story-quote-heading {
    font-size: 1.35rem;
  }
  .story-quote-paragraph {
    font-size: 0.92rem;
    line-height: 1.65;
  }
  .puzzle-shape {
    width: 170px;
    height: 170px;
  }
  .puzzle-btn-text {
    font-size: 1.15rem;
  }
  .owl-speech-bubble {
    padding: 1.2rem 1.4rem;
  }
  .owl-speech-text {
    font-size: 1.05rem;
  }
  .btn-red-door, .btn-blue-door {
    padding: 0.75rem 1.2rem;
    font-size: 0.95rem;
  }
  .intro-lang-btn {
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
  }
  .btn-story-primary {
    padding: 0.75rem 1.8rem;
    font-size: 0.95rem;
  }

  /* Wardrobe on Mobile */
  .wardrobe-modal-box {
    width: 96vw;
    padding: 20px 16px;
    max-height: 92dvh;
  }
  .wardrobe-grid {
    grid-template-columns: 1fr;
    max-height: 280px;
  }
  .wardrobe-tabs {
    gap: 0.4rem;
  }
  .wardrobe-tab-btn {
    padding: 6px 12px;
    font-size: 0.82rem;
  }
}

@media (max-width: 480px) {
  #hud {
    padding: 8px;
  }
  .quest-card {
    padding: 10px 12px;
  }
  .quest-title {
    font-size: 14px;
  }
  .quest-desc {
    font-size: 12px;
  }
  .hud-action-pills {
    gap: 4px;
  }
  .pill-btn {
    padding: 5px 8px;
    font-size: 10.5px;
    gap: 4px;
  }
  .pill-icon {
    font-size: 12px;
  }
  .minimap-container {
    width: 64px;
    height: 64px;
    min-width: 64px;
  }
  .joystick-zone {
    width: 100px;
    height: 100px;
    bottom: 25px;
    left: 20px;
  }
  .joystick-knob {
    width: 42px;
    height: 42px;
    margin-top: -21px;
    margin-left: -21px;
  }
  .mobile-action-buttons {
    bottom: 25px;
    right: 20px;
    gap: 10px;
  }
  .touch-action-btn {
    width: 52px;
    height: 52px;
    font-size: 12px;
  }
}

@media (max-height: 520px) and (orientation: landscape) {
  .story-content-box {
    max-height: 88vh;
    overflow-y: auto;
    padding: 1.2rem 1.6rem;
  }
  .story-main-title {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
  }
  .story-kanji-title {
    font-size: 1.3rem;
  }
  .story-subtitle {
    margin-bottom: 0.8rem;
    font-size: 0.85rem;
  }
  .intro-lang-row {
    margin-bottom: 1rem;
  }
  .story-quote-heading {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
  }
  .story-quote-paragraph {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1rem;
  }
  .puzzle-shape {
    width: 130px;
    height: 130px;
  }
  .puzzle-btn-text {
    font-size: 0.95rem;
  }
  .owl-speech-bubble {
    padding: 0.9rem 1.2rem;
  }
  .owl-speech-text {
    font-size: 0.95rem;
  }
  .artwork-modal-card {
    max-height: 94vh;
  }
  .artwork-visual-column {
    max-height: 50vh;
  }
  .artwork-display-img {
    max-height: 45vh;
  }
}
