/* ============================================================
   ui-overlays.css — Shattered Nexus
   Settings panel, save slot overlay, party swap sheet,
   save toast, overlay nav buttons, reaction popup,
   bestiary, gauntlet/boss mode, controls overlay, hint bar.
   ============================================================ */
/* ══════════════════════════════════════════════════════
   MUTE BUTTON
   ══════════════════════════════════════════════════════ */
#mute-btn,
#tts-btn,
#settings-btn {
  position: static;
  z-index: 9999;
  background: rgba(5, 4, 20, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid hsl(260, 40%, 30%);
  border-radius: 4px;
  color: hsl(260, 40%, 65%);
  font-size: 14px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  flex-shrink: 0;
}

#settings-btn {
  color: hsl(260, 50%, 75%);
  border-color: hsl(260, 40%, 45%);
}

#mute-btn:hover,
#tts-btn:hover,
#settings-btn:hover,
#mute-btn.kb-focus,
#tts-btn.kb-focus,
#settings-btn.kb-focus {
  color: hsl(215, 100%, 80%);
  border-color: hsl(255, 45%, 65%);
  background: hsla(255, 50%, 40%, 0.25);
  box-shadow: 0 0 12px hsla(255, 60%, 60%, 0.4);
  transform: translateY(-1px);
}

#tts-btn.tts-active {
  color: hsl(280, 95%, 75%);
  border-color: hsl(280, 60%, 50%);
  background: hsla(280, 70%, 30%, 0.35);
  box-shadow: 0 0 8px hsla(280, 60%, 50%, 0.4);
}

#zoom-btn,
#reset-zoom-btn {
  position: absolute;
  z-index: 9999;
  background: rgba(5, 4, 20, 0.7);
  border: 1px solid #2a1860;
  border-radius: 4px;
  color: #6050a0;
  font-size: 16px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s, border-color .2s, background .2s;
  padding: 0;
}

#zoom-btn {
  top: 10px;
  right: 162px;
}

#reset-zoom-btn {
  top: 10px;
  right: 198px;
}

#zoom-btn:hover,
#reset-zoom-btn:hover {
  color: #a090d0;
  border-color: #5040a0;
}

#quality-btn {
  position: absolute;
  z-index: 9999;
  top: 10px;
  right: 206px;
  height: 30px;
  padding: 0 10px;
  background: rgba(5, 4, 20, 0.7);
  border: 1px solid #2a1860;
  border-radius: 4px;
  color: #6050a0;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
}

#quality-btn:hover {
  color: #a090d0;
  border-color: #5040a0;
  background: rgba(15, 10, 40, 0.8);
}

/* ══════════════════════════════════════════════════════
   TITLE SCREEN — CONTINUE SLOT
   ══════════════════════════════════════════════════════ */
.title-continue-btn {
  background: linear-gradient(180deg, #0d1a30, #081220) !important;
  border-color: #3a6090 !important;
  color: #80c0f0 !important;
}

.title-continue-btn:hover {
  border-color: #60a8e0 !important;
  box-shadow: 0 0 20px #3a608060 !important;
  color: #b0d8ff !important;
}

.title-save-info {
  font-size: 13px;
  color: #405870;
  z-index: 1;
  letter-spacing: 1px;
  margin-top: -6px;
}

/* ══════════════════════════════════════════════════════
   SAVE SLOT OVERLAY
   ══════════════════════════════════════════════════════ */
.slot-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 800;
  opacity: 0;
  transition: opacity 0.3s;
}

.slot-overlay.open {
  opacity: 1;
}

.slot-overlay-bg {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, 0.92);
  backdrop-filter: blur(12px);
}

.slot-overlay-panel {
  position: relative;
  z-index: 1;
  width: min(1000px, 94vw);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(24px) scale(0.98);
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slot-overlay.open .slot-overlay-panel {
  transform: translateY(0) scale(1);
}

.slot-overlay-header {
  text-align: center;
}

.slot-overlay-title {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  letter-spacing: 8px;
  color: #e0f0ff;
  text-shadow: 0 0 20px rgba(120, 180, 255, 0.4);
  text-transform: uppercase;
}

.slot-overlay-sub {
  font-family: 'VT323', monospace;
  font-size: 14px;
  color: #507090;
  letter-spacing: 3px;
  margin-top: 6px;
}

/* ── Slot Cards Grid ── */
.slot-overlay-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  perspective: 1000px;
}

.sc {
  background: rgba(10, 18, 30, 0.5);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(60, 100, 150, 0.2);
  border-radius: 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.2, 0.6, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sc:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(100, 160, 255, 0.5);
  background: rgba(15, 25, 45, 0.7);
  box-shadow: 0 20px 50px rgba(0, 80, 200, 0.3), 0 0 2px rgba(100, 160, 255, 0.5) inset;
}

.sc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(60, 100, 150, 0.1);
}

.sc-num {
  font-family: 'Press Start 2P', cursive;
  font-size: 8px;
  color: rgba(120, 160, 200, 0.6);
  letter-spacing: 1px;
}

.sc-status {
  font-family: 'VT323', monospace;
  font-size: 12px;
  letter-spacing: 1.5px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(40, 60, 80, 0.4);
  color: #70a0c0;
}

.sc-filled .sc-status {
  color: #70d0ff;
  background: rgba(40, 120, 200, 0.15);
}

/* ── Card Body ── */
.sc-body {
  padding: 20px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sc-arc-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sc-arc-name {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: #aac0f0;
  letter-spacing: 1px;
}

.sc-meta {
  font-family: 'VT323', monospace;
  font-size: 16px;
  color: #5078a0;
  letter-spacing: 0.5px;
}

/* ── Party Row ── */
.sc-party-row {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.sc-hero-wrap {
  width: 44px;
  height: 52px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(120, 160, 200, 0.1);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.sc-hero-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

/* ── Empty Slot ── */
.sc-empty {
  opacity: 0.7;
}

.sc-empty-visual {
  font-size: 40px;
  color: rgba(60, 80, 120, 0.3);
  text-align: center;
  margin-top: 10px;
}

.sc-empty-label {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: #405870;
  letter-spacing: 3px;
  text-align: center;
  margin-top: 8px;
}

/* ── Footer ── */
.sc-footer {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(60, 100, 150, 0.1);
}

.sc-action {
  flex: 1;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 2px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid;
  cursor: pointer;
  transition: all 0.2s;
}

.sc-action.primary {
  background: linear-gradient(135deg, #1040a0, #082060);
  border-color: #2a68d0;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.sc-action.primary:hover {
  border-color: #50a0ff;
  box-shadow: 0 0 15px rgba(80, 160, 255, 0.4);
}

.sc-action.warn {
  background: rgba(120, 60, 20, 0.1);
  border-color: #80401a;
  color: #e09060;
}

.sc-action.warn:hover {
  background: rgba(120, 60, 20, 0.2);
  border-color: #c06020;
  color: #ffa080;
}

.sc-utility {
  display: flex;
  gap: 6px;
}

.sc-icon-btn {
  background: rgba(20, 35, 50, 0.5);
  border: 1px solid rgba(120, 160, 200, 0.2);
  color: #7090b0;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.sc-icon-btn:hover {
  background: rgba(40, 70, 100, 0.6);
  border-color: rgba(120, 160, 200, 0.6);
  color: #c0d8ff;
}

.sc-icon-btn.danger:hover {
  background: rgba(120, 40, 40, 0.4);
  border-color: #ff6060;
  color: #fff;
}

/* ── Back Button ── */
.slot-overlay-back {
  background: none;
  border: none;
  font-family: 'Cinzel', serif;
  color: #406080;
  font-size: 12px;
  letter-spacing: 4px;
  cursor: pointer;
  align-self: center;
  padding: 10px 40px;
  transition: color 0.3s;
}

.slot-overlay-back:hover {
  color: #80a0ff;
}

/* ── Landscape Mobile Optimization (iPhone SE/XR, etc.) ── */
@media (orientation: landscape) and (max-height: 520px) {
  .slot-overlay {
    align-items: flex-start;
    padding: 2.5vh 0;
  }

  .slot-overlay-panel {
    gap: 12px;
    max-height: 95vh;
    overflow-y: auto;
    width: min(1100px, 94vw);
    padding-right: 4px; /* Space for scrollbar */
  }

  /* Custom scrollbar for premium look */
  .slot-overlay-panel::-webkit-scrollbar {
    width: 4px;
  }
  .slot-overlay-panel::-webkit-scrollbar-track {
    background: transparent;
  }
  .slot-overlay-panel::-webkit-scrollbar-thumb {
    background: rgba(120, 160, 200, 0.2);
    border-radius: 10px;
  }

  .slot-overlay-title {
    font-size: 18px;
    letter-spacing: 4px;
  }

  .slot-overlay-sub {
    font-size: 11px;
    margin-top: 2px;
  }

  .slot-overlay-cards {
    grid-template-columns: repeat(3, 1fr); /* Force 3 columns on landscape */
    gap: 10px;
  }

  .sc-header {
    padding: 6px 12px;
  }

  .sc-status {
    font-size: 10px;
    padding: 1px 6px;
  }

  .sc-body {
    padding: 12px 12px;
    gap: 10px;
  }

  .sc-arc-name {
    font-size: 15px;
  }

  .sc-meta {
    font-size: 13px;
  }

  .sc-hero-wrap {
    width: 36px;
    height: 44px;
  }

  .sc-empty-visual {
    font-size: 24px;
    margin-top: 0;
  }

  .sc-empty-label {
    font-size: 11px;
    margin-top: 4px;
  }

  .sc-footer {
    padding: 10px 12px;
    gap: 8px;
  }

  .sc-action {
    padding: 8px;
    font-size: 10px;
    letter-spacing: 1px;
  }

  .sc-icon-btn {
    width: 28px;
    height: 28px;
  }

  .slot-overlay-back {
    padding: 6px 40px;
    margin-top: 4px;
  }
}

/* ── Save Toast ──────────────────────────────────────── */
#save-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: #08121eee;
  border: 1px solid #1e3850;
  color: #5898d0;
  font-size: 12px;
  padding: 7px 20px;
  border-radius: 20px;
  letter-spacing: 1px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 9999;
}

#save-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
   WORLD MAP SCREEN
   ══════════════════════════════════════════════════════ */
#map-screen {
  min-height: 480px;
  background:
    radial-gradient(ellipse 70% 60% at 50% 20%, #100830 0%, transparent 65%),
    radial-gradient(ellipse 50% 70% at 20% 80%, #060428 0%, transparent 55%),
    #03020c;
  align-items: stretch;
}

.map-header {
  padding: 18px 20px 10px;
  text-align: center;
  border-bottom: 1px solid #1a1050;
}

.map-title-label {
  font-family: var(--px);
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 4px;
  text-shadow: 0 0 20px var(--gold-glow);
}

.map-arc-label {
  font-family: var(--vt);
  font-size: 20px;
  color: #6050a0;
  margin-top: 4px;
  letter-spacing: 2px;
}

/* Map canvas area */
.map-area {
  flex: 1;
  position: relative;
  margin: 10px 16px 0;
  min-height: 260px;
}

.map-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Map nodes */
.map-node {
  position: absolute;
  width: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: default;
  transition: transform .2s;
}

.mn-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #2a1860;
  background: rgba(5, 4, 20, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  transition: border-color .3s, box-shadow .3s;
}

.mn-num {
  font-family: var(--px);
  font-size: 7px;
  color: #3a2870;
  letter-spacing: 1px;
  text-align: center;
  white-space: nowrap;
}

.mn-name {
  font-family: var(--vt);
  font-size: 13px;
  color: #5040a0;
  text-align: center;
  white-space: nowrap;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Node states */
.map-node.done .mn-icon {
  border-color: #4a3890;
  background: rgba(30, 20, 60, 0.9);
  box-shadow: 0 0 10px #4a389040;
}

.map-node.done .mn-num {
  color: #7060a0;
}

.map-node.current .mn-icon {
  border-color: var(--gold);
  background: rgba(40, 28, 80, 0.95);
  box-shadow: 0 0 18px var(--gold-glow), 0 0 32px #f5d06020;
  animation: glowPulse 2s ease-in-out infinite;
}

.map-node.current .mn-num {
  color: var(--gold);
}

.map-node.next .mn-icon {
  border-color: #5080b0;
  background: rgba(10, 20, 40, 0.9);
  box-shadow: 0 0 12px #508090;
  animation: glowPulse 2.5s ease-in-out infinite;
}

.map-node.next .mn-num {
  color: #6090c0;
}

.map-node.locked .mn-icon {
  opacity: 0.35;
  filter: grayscale(1);
}

.map-node.locked .mn-num {
  color: #2a2040;
}

/* Map info bar */
.map-info-bar {
  padding: 10px 20px 6px;
  text-align: center;
  min-height: 52px;
}

.map-info-name {
  font-family: var(--px);
  font-size: 11px;
  color: #c0b0e8;
  letter-spacing: 2px;
}

.map-info-loc {
  font-family: var(--vt);
  font-size: 17px;
  color: #5040a0;
  margin-top: 3px;
  letter-spacing: 1px;
}

/* ── Map bottom bar (PARTY + TRAVEL buttons) ── */
.map-bottom-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px 14px;
  align-self: stretch;
}

.map-bottom-bar .big-btn {
  flex: 1;
  margin: 0;
}

.map-party-btn {
  flex-shrink: 0;
  background: linear-gradient(135deg, #1a1040, #0d0828);
  border: 1px solid #3a2880;
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--px);
  font-size: 9px;
  padding: 12px 16px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all .15s;
  white-space: nowrap;
}

.map-party-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 12px var(--gold-glow);
}

/* ── Party swap overlay ── */
.party-swap-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none;
  align-items: flex-end;
  z-index: 200;
}

.party-swap-overlay.open {
  display: flex;
}

.party-swap-panel {
  width: 100%;
  background: linear-gradient(180deg, #0e0830 0%, #06041a 100%);
  border-top: 2px solid #3a2880;
  border-radius: 12px 12px 0 0;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 80vh;
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.22, .68, 0, 1.2);
}

.party-swap-overlay.open .party-swap-panel {
  transform: translateY(0);
}

.party-swap-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.party-swap-title {
  font-family: var(--px);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 2px;
  flex: 1;
}

.party-swap-counter {
  font-family: var(--vt);
  font-size: 16px;
  color: var(--text-dim);
}

.party-swap-close {
  background: none;
  border: 1px solid #3a2880;
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 14px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}

.party-swap-close:hover {
  border-color: var(--red);
  color: var(--red);
}

.party-swap-hint {
  font-family: var(--vt);
  font-size: 15px;
  color: var(--text-dim);
  text-align: center;
}

.party-swap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  overflow-y: auto;
  max-height: 50vh;
}

.party-swap-footer {
  padding-top: 4px;
}

.party-swap-footer .big-btn {
  margin: 0;
  width: 100%;
}

/* Party swap card — reuses .char-card but with slot number overlay */
.swap-card {
  background: linear-gradient(135deg, #0b0b2a, #07071c);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition: all .15s;
  display: flex;
  gap: 10px;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.swap-card:hover {
  border-color: var(--border-hi);
  background: linear-gradient(135deg, #12123a, #0b0b28);
}

.swap-card.active {
  border-color: var(--gold);
  background: linear-gradient(135deg, #1a1848, #0f0f30);
  box-shadow: 0 0 14px var(--gold-glow);
}

.swap-card.locked {
  opacity: .4;
  cursor: not-allowed;
}

.swap-card-badge {
  position: absolute;
  top: 5px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--gold);
  color: #060418;
  font-family: var(--px);
  font-size: 9px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px var(--gold-glow);
}

.swap-icon {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.swap-info {
  flex: 1;
  min-width: 0;
}

.swap-name {
  font-size: 17px;
  color: #ede8ff;
}

.swap-title {
  font-size: 12px;
  color: var(--text-dim);
}

.swap-stats {
  font-size: 12px;
  color: var(--cyan);
  margin-top: 2px;
}

   REACTION POPUP ANIMATION
   ══════════════════════════════════════════════════════════════════════════ */
.reaction-pop {
  position: absolute;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 24px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px #00f2ff;
  pointer-events: none;
  z-index: 1000;
  white-space: nowrap;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s ease;
}

.reaction-pop.pop-burst {
  transform: translate(-50%, -100%) scale(1.2);
  opacity: 1;
}

/* ══════════════════════════════════════════════════════════════════════════
   SETTINGS OVERLAY
   ══════════════════════════════════════════════════════════════════════════ */
.settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
}

.settings-panel {
  width: 90%;
  max-width: 480px;
  background: var(--bg-panel);
  border: 1px solid var(--border-hi);
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease-out;
}

.settings-header {
  font-size: 24px;
  color: var(--cyan);
  text-align: center;
  margin-bottom: 25px;
  letter-spacing: 2px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 15px;
}

.setting-label {
  color: var(--text);
  font-size: 14px;
  letter-spacing: 1px;
}

.setting-control {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.settings-footer {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

/* Custom range slider */
input[type=range].setting-slider {
  -webkit-appearance: none;
  width: 100%;
  background: transparent;
}

input[type=range].setting-slider:focus {
  outline: none;
}

input[type=range].setting-slider::-webkit-slider-runnable-track {
  width: 100%;
  height: 4px;
  background: rgba(78, 207, 255, 0.2);
  border-radius: 2px;
}

input[type=range].setting-slider::-webkit-slider-thumb {
  height: 16px;
  width: 16px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  box-shadow: 0 0 8px var(--cyan);
}

.bestiary-overlay {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bestiary-bg {
  position: absolute;
  inset: 0;
  background: rgba(4, 2, 12, 0.85);
  backdrop-filter: var(--blur);
}

.bestiary-panel {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border-hi);
  border-radius: var(--r);
  width: min(840px, 95vw);
  height: min(640px, 90vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--glow-soft);
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.bestiary-header {
  padding: 24px 30px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bestiary-title {
  font-family: var(--px);
  font-size: var(--fs-h3);
  color: var(--gold);
  letter-spacing: 2px;
}

.bestiary-tabs {
  display: flex;
  gap: 10px;
  background: rgba(0, 0, 0, 0.2);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.b-tab {
  background: none;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-family: var(--vt);
  font-size: 14px;
  transition: 0.2s;
  letter-spacing: 1px;
}

.b-tab:hover {
  color: var(--text);
}

.b-tab.active {
  background: var(--glass-hi);
  color: var(--gold);
  border-color: rgba(255, 207, 92, 0.3);
  box-shadow: 0 0 10px rgba(255, 207, 92, 0.1);
}

.bestiary-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 28px;
  cursor: pointer;
  transition: 0.2s;
}

.bestiary-close:hover {
  color: #ff5050;
}

.bestiary-body {
  flex: 1;
  display: flex;
  min-height: 0;
}

.bestiary-sidebar {
  width: 240px;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.2);
}

.bestiary-row {
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.bestiary-row.discovered:hover {
  background: rgba(96, 80, 184, 0.15);
  border-color: rgba(96, 80, 184, 0.3);
}

.bestiary-row.undiscovered {
  opacity: 0.4;
  cursor: default;
}

.br-icon {
  font-size: 20px;
}

.br-name {
  font-family: var(--vt);
  font-size: 18px;
  letter-spacing: 1px;
}

.bestiary-detail {
  flex: 1;
  overflow-y: auto;
  padding: 30px;
  background: radial-gradient(circle at top right, rgba(96, 80, 184, 0.05) 0%, transparent 70%);
}

/* Quest overlay & controls overlay use this instead of bestiary-body/detail */
.bestiary-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.bestiary-content::-webkit-scrollbar {
  width: 4px;
}
.bestiary-content::-webkit-scrollbar-track {
  background: transparent;
}
.bestiary-content::-webkit-scrollbar-thumb {
  background: rgba(144, 128, 255, 0.25);
  border-radius: 10px;
}

.bestiary-empty-hint {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-style: italic;
  font-size: 18px;
}

.bd-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 30px;
}

.bd-icon-wrap {
  width: 80px;
  height: 80px;
  background: rgba(0, 0, 0, 0.3);
  border: 2px solid var(--gold-dim);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

.bd-name {
  font-family: var(--px);
  font-size: var(--fs-lg);
  color: var(--gold);
}

.bd-tier {
  font-family: var(--vt);
  font-size: 18px;
  color: var(--text-dim);
  margin-top: 4px;
}

.bd-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 30px;
}

.bd-stat {
  background: rgba(255, 255, 255, 0.03);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--vt);
  font-size: 18px;
}

.bd-stat span {
  color: var(--text-dim);
}

.bd-stat strong {
  color: var(--cyan);
}

.bd-section {
  margin-bottom: 24px;
}

.bd-section-label {
  font-family: var(--px);
  font-size: 11px;
  color: var(--purple);
  letter-spacing: 2px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(184, 100, 255, 0.2);
  padding-bottom: 4px;
}

.bd-weakness-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.weakness-tag {
  background: rgba(78, 207, 255, 0.1);
  border: 1px solid var(--cyan);
  color: var(--cyan);
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--px);
  font-size: 9px;
}

.undiscovered-text {
  color: var(--text-dim);
  font-style: italic;
  font-size: 14px;
}

.bd-desc {
  line-height: 1.6;
  color: var(--text);
  font-size: 18px;
  font-style: italic;
}

.bd-abilities {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bd-ab {
  font-size: 16px;
  color: var(--text-dim);
}

.bd-ab strong {
  color: var(--gold-dim);
}

/* ── Relic Cards (Modern Grid) ───────────────────────────────────────── */
.relic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px 0;
}

.relic-card {
  position: relative;
  background: rgba(144, 128, 255, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(144, 128, 255, 0.15);
  border-radius: 12px;
  padding: 16px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: default;
}

.relic-card:hover {
  transform: translateY(-4px);
  background: rgba(144, 128, 255, 0.08);
  border-color: rgba(144, 128, 255, 0.4);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}

.relic-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: rotate(45deg);
  transition: 0.5s;
  pointer-events: none;
}

.relic-card:hover::before {
  left: 100%;
}

.relic-icon {
  font-size: 32px;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
}

.relic-name {
  font-family: var(--px);
  font-size: 14px;
  color: var(--text);
  letter-spacing: 1px;
}

.relic-desc {
  font-family: var(--vt);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
  flex: 1;
}

/* Rarity Glows */
.relic-card.legendary {
  border-color: #ffcf5c60;
  box-shadow: inset 0 0 15px #ffcf5c15;
}

.relic-card.legendary .relic-name {
  color: #ffcf5c;
  text-shadow: 0 0 8px #ffcf5c40;
}

.relic-card.legendary:hover {
  box-shadow: 0 0 25px #ffcf5c20;
  border-color: #ffcf5c;
}

.relic-card.epic {
  border-color: #a080ff60;
  box-shadow: inset 0 0 15px #a080ff15;
}

.relic-card.epic .relic-name {
  color: #a080ff;
  text-shadow: 0 0 8px #a080ff40;
}

.relic-card.epic:hover {
  box-shadow: 0 0 25px #a080ff20;
  border-color: #a080ff;
}

.relic-card.rare {
  border-color: #5ccfff60;
  box-shadow: inset 0 0 15px #5ccfff15;
}

.relic-card.rare .relic-name {
  color: #5ccfff;
  text-shadow: 0 0 8px #5ccfff40;
}

.relic-card.rare:hover {
  box-shadow: 0 0 25px #5ccfff20;
  border-color: #5ccfff;
}

.active-tag {
  font-size: 10px;
  background: var(--cyan);
  color: #000;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
  position: absolute;
  top: 12px;
  right: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* -- CREDITS OVERLAY -- */
#credits-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: black;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  font-family: var(--px);
}

#credits-background {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, #1a0a3a 0%, black 100%);
  opacity: 0.6;
  z-index: 1;
}

#credits-scroller {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 600px;
  transform: translateY(100vh);
}

.credits-header {
  font-size: 32px;
  color: var(--gold);
  margin-bottom: 200px;
  letter-spacing: 4px;
}

.credits-role {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 40px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.credits-name {
  font-size: 24px;
  margin-bottom: 20px;
}

.credits-party-card {
  display: inline-block;
  margin: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.credits-thanks {
  font-size: 40px;
  margin-top: 300px;
  margin-bottom: 50vh;
  color: white;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

#credits-close-btn {
  position: absolute;
  bottom: 40px;
  z-index: 3;
  background: transparent;
  border: 1px solid white;
  color: white;
  padding: 10px 30px;
  cursor: pointer;
  font-family: var(--px);
}

#credits-close-btn:hover {
  background: white;
  color: black;
}

/* ══════════════════════════════════════════════════════
/* ══════════════════════════════════════════════════════
   BOSS GAUNTLET (BOSS MODE)
   ══════════════════════════════════════════════════════ */
.gauntlet-overlay {
  position: absolute;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 0, 12, 0.92);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.gauntlet-bg {
  position: absolute;
  inset: 0;
}

.gauntlet-panel {
  position: relative;
  width: 90%;
  max-width: 1000px;
  max-height: 85vh;
  background: linear-gradient(135deg, #100a20, #0a0614);
  border: 1px solid rgba(245, 208, 96, 0.2);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(245, 208, 96, 0.1);
}

.gauntlet-header {
  padding: 24px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.gauntlet-title {
  font-family: var(--px);
  font-size: var(--fs-h2);
  color: var(--gold);
  text-shadow: 0 0 10px rgba(245, 208, 96, 0.4);
}

.gauntlet-sub {
  font-family: var(--px);
  font-size: var(--fs-xs);
  color: #7878a8;
  margin-top: 4px;
  letter-spacing: 1px;
}

.gauntlet-grid {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.gauntlet-grid::-webkit-scrollbar {
  width: 6px;
}

.gauntlet-grid::-webkit-scrollbar-thumb {
  background: rgba(245, 208, 96, 0.2);
  border-radius: 3px;
}

.gauntlet-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.gauntlet-card:hover {
  transform: translateY(-4px);
  border-color: rgba(245, 208, 96, 0.4);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(245, 208, 96, 0.1);
}

.gc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-family: var(--px);
  font-size: var(--fs-xxs);
}

.gc-tier {
  color: var(--gold);
  background: rgba(245, 208, 96, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.gc-element {
  color: #fff;
  text-shadow: 0 0 8px currentColor;
}

.gc-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.gc-sprite-container {
  width: 140px;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

.gauntlet-sprite {
  max-width: 100%;
  max-height: 100%;
  filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.gc-name {
  font-family: var(--px);
  font-size: var(--fs-h3);
  color: #fff;
}

.gc-subtitle {
  font-family: var(--px);
  font-size: var(--fs-xxs);
  color: #7878a8;
  text-align: center;
  font-style: italic;
}

.gc-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}

.gc-stat {
  display: flex;
  justify-content: space-between;
  font-family: var(--px);
  font-size: var(--fs-xs);
  color: #aaa;
}

.gc-stat span {
  color: #fff;
}

.gc-fight-btn {
  margin-top: 10px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: var(--gold);
  color: #000;
  font-family: var(--px);
  font-weight: bold;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.gc-fight-btn:hover {
  filter: brightness(1.2);
}

.gauntlet-back {
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: none;
  border-top: 2px solid rgba(255, 255, 255, 0.05);
  color: #7878a8;
  font-family: var(--px);
  cursor: pointer;
  transition: color 0.2s ease;
}

.gauntlet-back:hover {
  color: #fff;
}

/* Element Borders */
.element-fire {
  border-left: 4px solid #ff440050;
}

.element-water {
  border-left: 4px solid #0088ff50;
}

.element-ice {
  border-left: 4px solid #00ffff50;
}

.element-wind {
  border-left: 4px solid #00ff8850;
}

.element-holy {
  border-left: 4px solid #ffff0050;
}

.element-dark {
  border-left: 4px solid #aa00ff50;
}

.gauntlet-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: #7878a8;
  font-family: var(--px);
  font-size: var(--fs-sm);
}

/* Save Selection Styling */
.save-select-card {
  border-color: rgba(64, 192, 255, 0.2);
  background: linear-gradient(135deg, rgba(20, 30, 60, 0.4), rgba(10, 15, 30, 0.4));
}

.save-select-card:hover {
  border-color: rgba(64, 192, 255, 0.6);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(64, 192, 255, 0.2);
}

.save-select-card .gc-tier {
  background: rgba(64, 192, 255, 0.1);
  color: #40c0ff;
}

.save-select-card .gc-fight-btn {
  background: #40c0ff;
  color: #000;
}

/* ══════════════════════════════════════════════════════
   CONTROLS OVERLAY
   ══════════════════════════════════════════════════════ */
.ctrl-section-title {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ctrl-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.03);
  transition: background 0.15s;
}
.ctrl-row.remapping {
  background: rgba(200,164,90,0.12);
  border: 1px solid rgba(200,164,90,0.4);
}
.ctrl-row-gp { opacity: 0.7; }

.ctrl-label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

.binding-keys {
  font-size: 11px;
  font-family: monospace;
  color: var(--gold);
  background: rgba(200,164,90,0.1);
  border: 1px solid rgba(200,164,90,0.25);
  border-radius: 3px;
  padding: 2px 8px;
  white-space: nowrap;
}
.binding-keys.custom { color: #7dd3fc; border-color: rgba(125,211,252,0.3); background: rgba(125,211,252,0.08); }
.binding-keys.gp-key { color: rgba(255,255,255,0.45); border-color: rgba(255,255,255,0.1); background: transparent; }

.ctrl-remap-btn {
  font-size: 10px;
  padding: 3px 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  color: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.ctrl-remap-btn:hover { background: rgba(200,164,90,0.15); border-color: var(--gold); color: var(--gold); }

/* ══════════════════════════════════════════════════════
   CONTROL HINTS BAR
   ══════════════════════════════════════════════════════ */
#control-hints-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 16px;
  background: rgba(5,4,20,0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease;
  pointer-events: none;
  white-space: nowrap;
}
#control-hints-bar.visible { transform: translateX(-50%) translateY(0); }

.hint-item {
  font-size: 10px;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  gap: 4px;
}
.hint-item kbd {
  font-family: monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 3px;
  padding: 1px 5px;
}
.hint-sep { color: rgba(255,255,255,0.15); font-size: 10px; }

@media (pointer: coarse) { #control-hints-bar { display: none; } }

/* ------------------------------------------------------
   QUEST MENU (ECHO LOG)
   ------------------------------------------------------ */
.quest-card {
  background: rgba(10, 8, 25, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(200, 164, 90, 0.3);
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 8px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.quest-card:hover {
  background: rgba(20, 16, 45, 0.85);
  border-color: rgba(200, 164, 90, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.quest-title {
  color: var(--gold);
  font-family: var(--px);
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 8px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quest-type-badge {
  font-family: var(--vt);
  font-size: 9px;
  font-weight: normal;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 3px;
  padding: 1px 5px;
  text-transform: uppercase;
  flex-shrink: 0;
}

.quest-desc {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 12px;
}

.quest-progress-wrap {
  height: 8px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 10px rgba(200, 164, 90, 0.3);
}

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

.quest-meta {
  font-family: var(--vt);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}

.quest-reward {
  font-family: var(--vt);
  font-size: 14px;
  color: var(--cyan);
  font-weight: bold;
  text-shadow: 0 0 8px rgba(45, 212, 191, 0.3);
}

.quest-claimed-header {
  font-family: var(--px);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.3);
  margin: 24px 0 12px;
  letter-spacing: 3px;
  text-align: center;
}

.quest-card.completed {
  background: rgba(10, 8, 25, 0.4);
  border-color: rgba(74, 222, 128, 0.2);
  opacity: 0.8;
}

.quest-status-done {
  color: #4ade80;
  font-family: var(--px);
  font-size: 10px;
}

/* ── Touch: disable hover lift (prevents stuck-highlight on tap) ── */
@media (pointer: coarse) {
  .quest-card:hover {
    transform: none;
    background: rgba(10, 8, 25, 0.75);
    border-color: rgba(200, 164, 90, 0.3);
    box-shadow: none;
  }
}

/* ── Bestiary/Quest panel chrome — compact for landscape phones ── */
@media (orientation: landscape) and (max-height: 520px) {
  .bestiary-overlay {
    padding: 6px 12px;
  }
  .bestiary-panel {
    height: min(520px, 96vh);
  }
  .bestiary-header {
    padding: 10px 18px;
  }
  .bestiary-title {
    font-size: 14px;
    letter-spacing: 1px;
  }
  .bestiary-close {
    font-size: 20px;
  }
  .bestiary-content {
    padding: 10px 12px;
  }
}

/* ── Landscape phones (h ≤ 520px): compact cards to fit panel ── */
@media (orientation: landscape) and (max-height: 520px) {
  .quest-card {
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 6px;
  }
  .quest-title {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .quest-desc {
    font-size: 12px;
    margin-bottom: 8px;
  }
  .quest-progress-wrap {
    height: 5px;
    margin-bottom: 8px;
  }
  .quest-footer {
    padding-top: 6px;
  }
  .quest-meta,
  .quest-reward {
    font-size: 11px;
  }
  .quest-claimed-header {
    margin: 14px 0 8px;
    font-size: 9px;
  }
}

/* ── Small portrait phones (≤ 480px): tighten font sizes ── */
@media (max-width: 480px) {
  .quest-card {
    padding: 12px;
    margin-bottom: 12px;
  }
  .quest-title {
    font-size: 12px;
  }
  .quest-desc {
    font-size: 13px;
  }
  .quest-meta,
  .quest-reward {
    font-size: 12px;
  }
}
