:root {
  --bg-dark: #151515;
  --bg-card: #1f1f1f;
  --bg-soft: #232323;
  --gold: #d4af37;
  --gold-soft: #e6c767;
  --vermillion: #e45555;
  --indigo: #2b355f;
  --white: #f7f3ea;
  --text-muted: #b7b1a5;
  --accent: #ff6a5e;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Noto Sans JP", sans-serif;
  background: radial-gradient(circle at top, #222 0%, #151515 45%, #101010 100%);
  color: var(--white);
  min-height: 100vh;
}

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 68px 18px 160px;
  position: relative;
  overflow: hidden;
}

.app::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0, rgba(255, 255, 255, 0.02) 2px, transparent 2px, transparent 8px);
  pointer-events: none;
}

.card {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.title {
  font-family: "Noto Serif JP", serif;
  font-size: 26px;
  letter-spacing: 0.04em;
}

.subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 6px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold), #f4d98a);
  color: #2a210f;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 20px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 8px 16px rgba(212, 175, 55, 0.3);
}

.input {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid rgba(212, 175, 55, 0.35);
  color: var(--white);
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 15px;
}

.entry-hero {
  width: 100%;
  max-width: 260px;
  margin: 0 auto 18px;
  display: block;
}

.float {
  animation: float 3.2s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.splash-screen {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 18px;
}

.splash-image {
  width: min(70vw, 280px);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.45));
  animation: splashIn 1.2s ease forwards;
}

.splash-text {
  color: var(--gold-soft);
  letter-spacing: 0.2em;
  font-size: 12px;
}

@keyframes splashIn {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.entry-screen {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.entry-badge {
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-soft);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  align-self: flex-start;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.top-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.level-chip {
  background: rgba(228, 85, 85, 0.2);
  color: #ff9b9b;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.character-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.character-card img {
  width: 200px;
  max-width: 70vw;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
}

.info-panel {
  background: var(--bg-soft);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  gap: 12px;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.quest-header {
  margin-bottom: 16px;
}

.quest-list {
  display: grid;
  gap: 14px;
}

.quest-card {
  display: grid;
  gap: 14px;
}

.quest-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.quest-status {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(212, 175, 55, 0.18);
  color: var(--gold-soft);
  white-space: nowrap;
}

.quest-reward {
  font-weight: 600;
  color: var(--accent);
}

.quest-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.quest-summary-card {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 4px;
  text-align: center;
}

.quest-summary-card span {
  font-size: 12px;
  color: var(--text-muted);
}

.quest-progress {
  display: grid;
  gap: 8px;
}

.quest-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.quest-progress-bar {
  width: 100%;
  height: 8px;
  background: #262626;
  border-radius: 999px;
  overflow: hidden;
}

.quest-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.quest-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.quest-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.quest-btn {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-soft);
  font-weight: 600;
  cursor: pointer;
}

.quest-btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.quest-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quest-status.success {
  background: rgba(80, 200, 120, 0.18);
  color: #8ef0b1;
  border: 1px solid rgba(80, 200, 120, 0.2);
}

.quest-status.progress {
  background: rgba(212, 175, 55, 0.2);
}

.quest-status.ready {
  background: rgba(120, 160, 255, 0.2);
  color: #9fb2ff;
}

.quest-status.idle {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.quest-detail {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}

.quest-detail-desc {
  color: var(--text-muted);
  font-size: 13px;
}

.quest-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  background: #1b1b1b;
  border-radius: 18px;
  padding: 20px;
  border: 1px solid rgba(212, 175, 55, 0.2);
  width: min(320px, 90%);
  display: grid;
  gap: 12px;
  text-align: center;
}

.level-picker {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.level-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.level-chip.mini {
  font-size: 11px;
  padding: 4px 10px;
}

.level-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.level-mini-card {
  background: #1b1b1b;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 6px;
  text-align: center;
  color: var(--white);
  cursor: pointer;
}

.level-mini-card img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-bottom: 6px;
}

.level-mini-card.active {
  border-color: var(--gold);
  box-shadow: 0 6px 12px rgba(212, 175, 55, 0.2);
}

.shop-header {
  margin-bottom: 16px;
}

.shop-wallet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.shop-wallet-item {
  background: var(--bg-soft);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.shop-wallet-item span {
  font-size: 12px;
  color: var(--text-muted);
}

.shop-grid {
  display: grid;
  gap: 14px;
}

.shop-card {
  display: grid;
  gap: 12px;
}

.shop-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shop-tag {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--gold-soft);
  white-space: nowrap;
}

.shop-price {
  font-weight: 600;
}

.shop-btn {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-soft);
  font-weight: 600;
  cursor: pointer;
}

.settings-header {
  margin-bottom: 16px;
}

.settings-card {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.language-toggle {
  display: flex;
  gap: 8px;
}

.lang-btn {
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.lang-btn.active {
  background: rgba(212, 175, 55, 0.2);
  color: var(--gold-soft);
  border-color: rgba(212, 175, 55, 0.4);
}

.toggle {
  min-width: 56px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
}

.toggle.on {
  background: rgba(80, 200, 120, 0.2);
  border-color: rgba(80, 200, 120, 0.3);
  color: #8ef0b1;
}

.upload-btn {
  border-radius: 12px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px dashed rgba(212, 175, 55, 0.4);
  color: var(--gold-soft);
  cursor: pointer;
  font-weight: 600;
}

.upload-btn input {
  display: none;
}

.profile-preview {
  background: #1b1b1b;
  border-radius: 16px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.profile-preview img {
  width: 90px;
  height: 90px;
  border-radius: 16px;
  object-fit: cover;
}

.profile-placeholder {
  font-size: 12px;
  color: var(--text-muted);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.xp-bar {
  width: 100%;
  height: 10px;
  background: #2b2b2b;
  border-radius: 999px;
  overflow: hidden;
}

.xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stat-card {
  background: #1b1b1b;
  border-radius: 14px;
  padding: 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-card p {
  font-size: 12px;
  color: var(--text-muted);
}

.stitch-loop {
  margin-top: 16px;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.stitch-track {
  display: flex;
  gap: 12px;
  padding: 10px 14px;
  animation: loop 16s linear infinite;
}

.stitch-chip {
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes loop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ---- Bottom Nav ---- */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    linear-gradient(180deg, #4a3e30 0%, #3a3228 50%, #2e2820 100%);
  border-top: 2px solid #8a7a5a;
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr 1fr 1fr;
  align-items: end;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
  z-index: 10;
  box-shadow:
    0 -4px 16px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 230, 160, 0.08);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  padding: 4px 2px 8px;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}

.nav-item:active .nav-icon-wrap {
  transform: scale(0.92);
}

.nav-icon-wrap {
  position: relative;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease;
  background: none !important;
  border: none !important;
}

.nav-item i {
  font-size: 18px;
  color: #9a8a70;
  transition: color 0.15s ease;
}

.nav-icon-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: brightness(0.95) saturate(0.85);
  transition: filter 0.15s ease;
}

.nav-item.active .nav-icon-img {
  filter: brightness(1.1) saturate(1) drop-shadow(0 0 5px rgba(255, 215, 0, 0.35));
}

.nav-label {
  font-size: 9px;
  font-weight: 700;
  color: #7a6a55;
  transition: color 0.15s ease;
  white-space: nowrap;
  line-height: 1;
  margin-top: -10px;
  position: relative;
  z-index: 1;
}

/* Active state */
.nav-item.active i {
  color: #ffd700;
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.4));
}

.nav-item.active .nav-label {
  color: #ffd700;
}

/* Center (Main) button - raised & prominent */
.nav-center {
  padding-top: 0;
}

.nav-center .nav-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  margin-top: -14px;
}

.nav-center i {
  font-size: 34px;
  color: #e8dcc0;
}

.nav-center.active .nav-icon-wrap {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.nav-center.active i {
  color: #fff;
  filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.5));
}

/* Badge */
.nav-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: #e53935;
  color: #fff;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #3a3228;
  box-shadow: 0 1px 4px rgba(229, 57, 53, 0.5);
  line-height: 1;
}

/* Loading overlay */
.nav-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.nav-loading-spinner {
  font-size: 32px;
  color: #ffd700;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

.nav-item:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.japan-ribbon {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  font-size: 13px;
  margin-top: 12px;
}

.btn-secondary {
  flex: 1;
  border-radius: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.12);
  color: var(--gold-soft);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}

.section-title {
  margin: 18px 0 10px;
  font-size: 15px;
  color: var(--text-muted);
}

.list-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.level-card,
.spot-card {
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  color: var(--white);
  cursor: pointer;
}

.level-card img {
  width: 86px;
  height: 86px;
  object-fit: contain;
  margin-bottom: 6px;
}

.level-card.active,
.spot-card.active {
  border-color: var(--gold);
  box-shadow: 0 8px 16px rgba(212, 175, 55, 0.25);
}

.detail-hero {
  display: flex;
  gap: 16px;
  align-items: center;
}

.detail-hero img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold-soft);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 14px;
  cursor: pointer;
}

.spot-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  background: rgba(212, 175, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--gold);
}

.spot-card-title {
  font-weight: 600;
  margin-bottom: 4px;
}

/* ============================================
   GAME MAIN SCREEN
   ============================================ */

.game-main {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 120px;
  height: calc(100vh - 170px);
  display: flex;
  flex-direction: column;
  background: #3a3020;
  overflow: hidden;
}

/* Dark background behind card */
.game-main::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #1e1a14;
  pointer-events: none;
  z-index: 0;
}

/* Remove vignette - moved to card */
.game-main::after {
  display: none;
}

/* ---- Cherry blossom petals ---- */
.game-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  overflow: hidden;
}

.petal {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffb7c5;
  border-radius: 50% 0 50% 50%;
  opacity: 0.6;
  animation: petalFall linear infinite;
}

.p1 { left: 8%; top: -10px; animation-duration: 7s; animation-delay: 0s; width: 8px; height: 8px; }
.p2 { left: 22%; top: -10px; animation-duration: 9s; animation-delay: 1s; opacity: 0.5; }
.p3 { left: 38%; top: -10px; animation-duration: 6s; animation-delay: 2.5s; width: 7px; height: 7px; }
.p4 { left: 55%; top: -10px; animation-duration: 8s; animation-delay: 0.5s; }
.p5 { left: 68%; top: -10px; animation-duration: 10s; animation-delay: 3s; width: 9px; height: 9px; opacity: 0.45; }
.p6 { left: 82%; top: -10px; animation-duration: 7.5s; animation-delay: 1.5s; width: 6px; height: 6px; }
.p7 { left: 45%; top: -10px; animation-duration: 11s; animation-delay: 4s; opacity: 0.4; }
.p8 { left: 92%; top: -10px; animation-duration: 8.5s; animation-delay: 2s; width: 8px; height: 8px; }

@keyframes petalFall {
  0% {
    transform: translateY(0) rotate(0deg) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(100vh) rotate(360deg) translateX(-30px);
    opacity: 0;
  }
}

/* ---- Top HUD Bar ---- */
.game-hud {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: rgba(15, 12, 8, 0.75);
  backdrop-filter: blur(6px);
  z-index: 5;
}

.hud-lv {
  background: #1a1510;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 215, 0, 0.35);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.hud-exp {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-exp-label {
  color: #bbb;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.hud-exp-bar {
  flex: 1;
  height: 14px;
  background: #2a2218;
  border-radius: 7px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 215, 0, 0.2);
}

.hud-exp-fill {
  height: 100%;
  background: linear-gradient(90deg, #6aaa3a, #8cc63f, #b5d85a);
  border-radius: 7px;
  transition: width 0.6s ease;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15);
}

.hud-exp-text {
  color: #ddd;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.hud-exp-text small {
  color: #999;
  font-weight: 400;
}

.hud-coins {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ffd700;
  font-weight: 700;
  font-size: 14px;
}

.hud-coins i {
  font-size: 16px;
}

.hud-plus-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: #4caf50;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

/* ---- Game Card ---- */
.game-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 6px 8px 0;
  border-radius: 18px;
  border: 3px solid #b89a60;
  overflow: visible;
  z-index: 1;
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 230, 160, 0.12);
}

/* Background card behind (depth / stacked card effect) */
.game-card::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  right: -7px;
  bottom: -7px;
  border-radius: 20px;
  background: linear-gradient(180deg, #d8c8a0, #c0b088);
  border: 2.5px solid #9a8460;
  z-index: -1;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Clipped background image inside card */
.game-card-bg {
  position: absolute;
  inset: 0;
  border-radius: 15px;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.game-card-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/images/bg-sendai.png") center top / cover no-repeat;
}

.game-card-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      180deg,
      transparent 0%,
      transparent 40%,
      rgba(30, 25, 18, 0.25) 65%,
      rgba(30, 25, 18, 0.5) 85%,
      rgba(30, 25, 18, 0.7) 100%
    );
}

/* ---- Feature Banner ---- */
.game-banner {
  position: absolute;
  top: 12px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(250, 242, 225, 0.88);
  backdrop-filter: blur(6px);
  border-radius: 14px;
  padding: 10px 16px 10px 12px;
  z-index: 4;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(200, 170, 120, 0.3);
}

.banner-icon {
  font-size: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

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

.banner-sub {
  font-size: 10px;
  color: #8a7a60;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.banner-main {
  font-size: 18px;
  font-weight: 800;
  color: #3a2a18;
  font-family: "Noto Serif JP", serif;
  letter-spacing: 0.04em;
}

/* ---- Game Scene Area ---- */
.game-scene {
  flex: 1;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 16px 16px;
  min-height: clamp(180px, 30vh, 320px);
  z-index: 2;
  overflow: visible;
}

/* ---- Floating Pickup ---- */
.game-pickup {
  position: absolute;
  left: 14px;
  bottom: 35%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  z-index: 3;
}

.pickup-bonus {
  background: rgba(10, 8, 5, 0.7);
  color: #8cc63f;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 10px;
  border: 1px solid rgba(140, 198, 63, 0.3);
}

.pickup-bottle {
  font-size: 40px;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35));
}

/* ---- Character Display ---- */
.game-character {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(clamp(5%, 2vh, 15%));
  transform-origin: center bottom;
  margin-bottom: clamp(-30px, -3vh, -15px);
}

.game-character img {
  height: clamp(200px, 50vh, 600px);
  width: auto;
  max-width: 90vw;
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.35));
}

.character-shadow {
  width: clamp(70px, 20vh, 250px);
  height: clamp(14px, 3vh, 35px);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.25) 0%, transparent 70%);
  margin-top: clamp(-10px, -1.5vh, -15px);
}

/* ---- Map Button ---- */
.game-map-btn {
  position: absolute;
  right: 14px;
  bottom: 25%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  z-index: 3;
  background: none;
  border: none;
  padding: 0;
}

.map-notif {
  position: absolute;
  top: -4px;
  right: -2px;
  width: 20px;
  height: 20px;
  background: #e53935;
  color: #fff;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  box-shadow: 0 2px 6px rgba(229, 57, 53, 0.5);
  border: 2px solid #fff;
}

.map-icon-circle {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(248, 238, 218, 0.92);
  border: 3px solid #c4a872;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #6b4c2a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.map-label {
  font-size: 12px;
  font-weight: 700;
  color: #f5e6c8;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* ---- Costume Change Button ---- */
.game-costume-btn {
  position: absolute;
  left: -20px;
  bottom: 8%;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  z-index: 3;
  background: none;
  border: none;
  padding: 0;
}

.costume-icon-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
  transition: transform 0.2s;
}

.game-costume-btn:active .costume-icon-img {
  transform: scale(0.92);
}

.costume-label {
  font-size: 12px;
  font-weight: 700;
  color: #f5e6c8;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  margin-top: -30px;
  position: relative;
  z-index: 1;
}

/* ---- Character Info Panel (Parchment Scroll) ---- */
.game-panel {
  position: relative;
  margin: 0;
  background:
    linear-gradient(180deg, #f7ebd0 0%, #eedcb4 30%, #e6d0a4 60%, #dcc898 100%);
  border-radius: 0 0 15px 15px;
  padding: 4px;
  z-index: 4;
  box-shadow:
    0 -2px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Outer ornate border */
.game-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0 0 15px 15px;
  border: 2px solid rgba(184, 154, 96, 0.4);
  border-top: 1px solid rgba(184, 154, 96, 0.2);
  pointer-events: none;
  z-index: 2;
}

/* Inner border line for double-border effect */
.game-panel::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 0 0 10px 10px;
  border: 1.5px solid rgba(160, 130, 70, 0.3);
  border-top: 1px solid rgba(160, 130, 70, 0.15);
  pointer-events: none;
  z-index: 2;
}

.panel-inner {
  position: relative;
  padding: 14px 20px 10px;
  text-align: center;
  z-index: 1;
  /* Parchment texture */
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 4px,
      rgba(160, 130, 80, 0.03) 4px,
      rgba(160, 130, 80, 0.03) 5px
    );
}

/* Scattered cherry blossoms */
.panel-sakura {
  position: absolute;
  font-size: 14px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.1));
}
.panel-sakura.s1 { top: 4px;   left: 8px;   font-size: 16px; opacity: 0.6; transform: rotate(-15deg); }
.panel-sakura.s2 { top: -2px;  left: 28%;   font-size: 12px; opacity: 0.4; transform: rotate(25deg); }
.panel-sakura.s3 { bottom: 6px; right: 12px; font-size: 15px; opacity: 0.55; transform: rotate(10deg); }
.panel-sakura.s4 { top: 2px;   right: 22%;  font-size: 11px; opacity: 0.35; transform: rotate(-30deg); }
.panel-sakura.s5 { bottom: 2px; left: 18%;  font-size: 10px; opacity: 0.3; transform: rotate(45deg); }

.panel-name {
  font-family: "Noto Serif JP", serif;
  font-size: 28px;
  font-weight: 900;
  color: #2e1e0a;
  letter-spacing: 0.12em;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.08);
  margin: 0;
  line-height: 1.2;
}

.panel-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
}

.panel-lv {
  font-weight: 800;
  font-size: 16px;
  color: #4a3520;
  letter-spacing: 0.02em;
}

.panel-plus {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #4caf50;
  background: linear-gradient(180deg, #5ec462, #3d9e40);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow:
    0 2px 6px rgba(76, 175, 80, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.panel-status {
  color: #7a5a30;
  font-size: 14px;
  font-weight: 700;
}

/* ---- Bottom Nav Game Screen Override ---- */
.game-main ~ .bottom-nav {
  background:
    linear-gradient(180deg, #5a4e3a 0%, #4a4030 40%, #3a3428 100%);
  border-top: 2.5px solid #a08a60;
  box-shadow:
    0 -4px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 230, 160, 0.15);
}

.game-main ~ .bottom-nav .nav-icon-wrap {
  background: rgba(255, 240, 200, 0.08);
  border-color: rgba(255, 240, 200, 0.12);
}

.game-main ~ .bottom-nav .nav-item.active .nav-icon-wrap {
  background: rgba(255, 215, 0, 0.18);
  border-color: rgba(255, 215, 0, 0.45);
}

/* ============================================
   MAP SCREEN
   ============================================ */

.map-screen {
  position: fixed;
  top: 50px; /* 上部広告バナー分 */
  left: 0;
  right: 0;
  bottom: 120px; /* 下部広告バナー(50px) + BottomNav(70px) = 120px */
  width: 100%;
  overflow: hidden;
  background: #b8ddb8;
  z-index: 1; /* 広告バナー(z-index: 15)より下に配置 */
  border-top: 1px solid rgba(0, 0, 0, 0.1); /* 広告との境界を明確化 */
  clip-path: inset(0 0 0 0); /* マップ要素が広告領域に侵入しないよう制限 */
}

.map-container {
  width: 100%;
  height: 100%;
}

/* Game-like color tint overlay */
.map-color-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(160, 220, 160, 0.08) 0%,
      transparent 30%,
      transparent 70%,
      rgba(30, 60, 30, 0.12) 100%
    );
  pointer-events: none;
  z-index: 1;
}

/* Cherry blossom petals on map */
.map-petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/* ---- Map HUD Top Bar ---- */
.map-hud-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: clamp(8px, 2vh, 14px) clamp(8px, 2vw, 12px);
  z-index: 5;
  pointer-events: none;
}

.map-hud-top > * {
  pointer-events: auto;
}

/* Compass Button */
.map-compass-btn {
  width: clamp(40px, 8vw, 48px);
  height: clamp(40px, 8vw, 48px);
  border-radius: 50%;
  background: rgba(25, 50, 100, 0.85);
  border: 2.5px solid rgba(100, 160, 255, 0.45);
  color: #fff;
  font-size: clamp(16px, 3.5vw, 20px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease;
}

.map-compass-btn:active {
  transform: scale(0.92);
}

.map-compass-btn i {
  transform: rotate(-45deg);
}

/* Coins HUD */
.map-coins-hud {
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 6px);
  background: rgba(255, 248, 230, 0.92);
  border-radius: 24px;
  padding: clamp(6px, 1.5vh, 8px) clamp(10px, 2.5vw, 14px);
  border: 2.5px solid #d4af37;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(6px);
}

.map-coins-amount {
  font-size: clamp(13px, 2.8vw, 16px);
  font-weight: 800;
  color: #5a4420;
  letter-spacing: 0.02em;
}

.map-coins-hud > i {
  font-size: clamp(15px, 3.2vw, 18px);
  color: #d4af37;
}

.map-coins-plus-btn {
  width: clamp(20px, 4vw, 24px);
  height: clamp(20px, 4vw, 24px);
  border-radius: 50%;
  border: none;
  background: linear-gradient(180deg, #5ec462, #3d9e40);
  color: #fff;
  font-size: clamp(13px, 2.8vw, 16px);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(76, 175, 80, 0.4);
}

/* ---- Landmark Markers ---- */
.map-screen .maplibregl-marker {
  will-change: transform;
  transition: none !important;
}

.map-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.map-marker:hover .map-marker-bubble {
  transform: scale(1.12);
}

.map-marker-bubble {
  width: clamp(38px, 8vw, 48px);
  height: clamp(38px, 8vw, 48px);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  border: 3px solid #d4af37;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.25),
    0 0 0 3px rgba(212, 175, 55, 0.15);
  transition: transform 0.2s ease;
}

.map-marker-icon {
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1;
  animation: markerFloat 3s ease-in-out infinite;
}

.map-marker-label {
  background: rgba(20, 15, 8, 0.8);
  color: #fff;
  padding: clamp(2px, 0.5vh, 3px) clamp(6px, 1.5vw, 8px);
  border-radius: 8px;
  font-size: clamp(9px, 1.8vw, 10px);
  font-weight: 700;
  white-space: nowrap;
  margin-top: 3px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.map-marker-pin {
  width: 3px;
  height: 10px;
  background: linear-gradient(180deg, #d4af37, #8a6e30);
  border-radius: 0 0 2px 2px;
  margin-top: -1px;
}

@keyframes markerFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ---- Visited Marker Styles ---- */
.map-marker.visited .map-marker-bubble {
  background: rgba(200, 200, 200, 0.7);
  border-color: #999;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.15),
    0 0 0 3px rgba(150, 150, 150, 0.15);
}

.map-marker.visited .map-marker-icon {
  opacity: 0.6;
  filter: grayscale(0.3);
}

.map-marker.visited .map-marker-label {
  background: rgba(80, 80, 80, 0.8);
  border-color: rgba(150, 150, 150, 0.3);
}

.map-marker-check {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: clamp(14px, 3vw, 18px);
  height: clamp(14px, 3vw, 18px);
  background: #4caf50;
  border-radius: 50%;
  color: white;
  font-size: clamp(10px, 2vw, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* ---- Character Avatar (fixed overlay) ---- */
.map-character-fixed {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 6;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.map-character-fixed .map-character-glow {
  position: absolute;
  bottom: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 200, 255, 0.25) 0%, transparent 70%);
  animation: glowPulse 2.5s ease-in-out infinite;
}

.map-character-fixed img {
  width: 200px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
  animation: charBob 3s ease-in-out infinite;
}

.map-character-fixed .map-character-shadow {
  width: 120px;
  height: 20px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.2) 0%, transparent 70%);
  margin-top: -8px;
  animation: shadowPulse 3s ease-in-out infinite;
}

/* ---- User Marker (on map) ---- */
.map-user-marker {
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 10;
}

.map-user-marker .map-character-glow {
  position: absolute;
  bottom: 0;
  width: clamp(100px, 20vw, 160px);
  height: clamp(100px, 20vw, 160px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100, 200, 255, 0.25) 0%, transparent 70%);
  animation: glowPulse 2.5s ease-in-out infinite;
}

.map-user-marker img {
  width: clamp(120px, 25vw, 200px);
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
  animation: charBob 3s ease-in-out infinite;
}

.map-user-marker .map-character-shadow {
  width: clamp(80px, 15vw, 120px);
  height: clamp(12px, 2.5vh, 20px);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.2) 0%, transparent 70%);
  margin-top: -8px;
  animation: shadowPulse 3s ease-in-out infinite;
}

/* ---- GPS Locating Badge ---- */
.map-locating-badge {
  position: absolute;
  top: 80%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 6;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: clamp(6px, 1.5vw, 8px);
  background: rgba(30, 50, 80, 0.85);
  border-radius: 20px;
  padding: clamp(8px, 2vh, 10px) clamp(14px, 3vw, 18px);
  border: 2px solid rgba(100, 200, 255, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px rgba(100, 200, 255, 0.15);
  backdrop-filter: blur(6px);
  animation: locatingPulse 1.8s ease-in-out infinite;
}

.map-locating-badge span {
  font-size: clamp(11px, 2.2vw, 13px);
  font-weight: 700;
  color: #d0e8ff;
  font-family: "Noto Sans JP", sans-serif;
  white-space: nowrap;
}

.map-locating-icon {
  font-size: clamp(14px, 2.8vw, 16px);
  color: #7ec8e3;
  animation: locatingIconSpin 2s linear infinite;
}

@keyframes locatingPulse {
  0%, 100% { opacity: 0.85; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 20px rgba(100, 200, 255, 0.15); }
  50% { opacity: 1; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3), 0 0 30px rgba(100, 200, 255, 0.3); }
}

@keyframes locatingIconSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes charBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.7; }
  50% { transform: scaleX(0.85); opacity: 0.5; }
}

/* ---- God Map Toggle Button ---- */
.map-godmap-btn {
  position: absolute;
  top: clamp(8px, 2vh, 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: clamp(4px, 1vw, 6px);
  background: rgba(60, 40, 20, 0.85);
  border-radius: 20px;
  padding: clamp(6px, 1.5vh, 8px) clamp(12px, 3vw, 16px);
  border: 2px solid #d4af37;
  color: #fff8e0;
  font-size: clamp(11px, 2.2vw, 13px);
  font-weight: 700;
  cursor: pointer;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.3),
    0 0 0 2px rgba(212, 175, 55, 0.15);
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease;
  font-family: "Noto Sans JP", sans-serif;
}

.map-godmap-btn:active {
  transform: translateX(-50%) scale(0.94);
}

.map-godmap-btn i {
  font-size: 14px;
  color: #d4af37;
}

/* ---- City Badge ---- */
/* ---- Spot Info Popup Bar ---- */
.map-popup-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 12px);
  background: rgba(255, 250, 240, 0.95);
  border-radius: 16px 16px 0 0;
  padding: clamp(10px, 2vh, 12px) clamp(12px, 3vw, 16px);
  border: 2px solid #d4af37;
  border-bottom: none;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.25);
  z-index: 6;
  animation: popupSlideUp 0.3s ease-out;
  backdrop-filter: blur(8px);
}

@keyframes popupSlideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.map-popup-icon {
  font-size: clamp(24px, 5vw, 32px);
  flex-shrink: 0;
}

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

.map-popup-name {
  font-size: clamp(13px, 2.8vw, 16px);
  font-weight: 800;
  color: #2e1e0a;
  font-family: "Noto Serif JP", serif;
}

.map-popup-sub {
  font-size: clamp(9px, 1.8vw, 11px);
  color: #8a7a60;
  margin-top: 2px;
}

.map-popup-checkin-btn {
  padding: clamp(6px, 1.5vh, 8px) clamp(12px, 3vw, 16px);
  border-radius: 12px;
  border: none;
  background: linear-gradient(180deg, #c4a050 0%, #a08030 100%);
  color: #1a1510;
  font-size: clamp(11px, 2.2vw, 13px);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
  transition: transform 0.15s ease;
}

.map-popup-checkin-btn:active {
  transform: scale(0.95);
}

.map-popup-close {
  width: clamp(26px, 5vw, 30px);
  height: clamp(26px, 5vw, 30px);
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  font-size: clamp(12px, 2.4vw, 14px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---- Bottom Nav Map Screen Override ---- */
.map-screen ~ .bottom-nav {
  background:
    linear-gradient(180deg, #3a4a3a 0%, #2e3e2e 40%, #243024 100%);
  border-top: 2.5px solid #6a8a5a;
  box-shadow:
    0 -4px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(200, 240, 180, 0.1);
}

.map-screen ~ .bottom-nav .nav-icon-wrap {
  background: rgba(200, 240, 180, 0.08);
  border-color: rgba(200, 240, 180, 0.12);
}

.map-screen ~ .bottom-nav .nav-item.active .nav-icon-wrap {
  background: rgba(140, 220, 100, 0.2);
  border-color: rgba(140, 220, 100, 0.45);
  box-shadow: 0 2px 10px rgba(140, 220, 100, 0.2);
}

.map-screen ~ .bottom-nav .nav-item.active i,
.map-screen ~ .bottom-nav .nav-item.active .nav-label,
.map-screen ~ .bottom-nav .nav-item.active .nav-shop-icon {
  color: #a0e080;
}

/* ============================================
   GOD MAP SCREEN (仙台神マップ)
   ============================================ */

.god-map-screen {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 125px;
  width: 100%;
  overflow: hidden;
  background: #4a7a3a;
}

/* ---- Background Image ---- */
.god-map-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.god-map-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---- Title Header ---- */
.god-map-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg,
    rgba(60, 40, 20, 0.85) 0%,
    rgba(60, 40, 20, 0.6) 70%,
    transparent 100%
  );
}

.god-map-title {
  font-family: "Noto Serif JP", serif;
  font-size: 22px;
  font-weight: 900;
  color: #fff8e0;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 0 12px rgba(212, 175, 55, 0.3);
  letter-spacing: 0.08em;
  text-align: center;
  margin: 0;
}

.god-map-title-en {
  display: block;
  font-size: 10px;
  font-weight: 600;
  font-family: "Noto Sans JP", sans-serif;
  color: rgba(255, 248, 224, 0.7);
  letter-spacing: 0.2em;
  margin-top: 2px;
}

/* ---- Switch to Real Map Button ---- */
.god-map-switch-btn {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 11;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(25, 50, 100, 0.85);
  border: 2.5px solid rgba(100, 160, 255, 0.45);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease;
}

.god-map-switch-btn:active {
  transform: scale(0.92);
}

/* ---- Checkpoints ---- */
.god-map-checkpoint {
  position: absolute;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
  transition: transform 0.2s ease;
  animation: godCheckpointFloat 3.5s ease-in-out infinite;
}

.god-map-checkpoint:nth-child(odd) {
  animation-delay: -1.2s;
}

.god-map-checkpoint:hover,
.god-map-checkpoint.active {
  transform: scale(1.12);
}

.god-map-checkpoint-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6a5e, #e04530);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(224, 69, 48, 0.5);
  border: 2px solid #fff;
}

.god-map-checkpoint-img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #d4af37;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 3px rgba(212, 175, 55, 0.2);
  background: rgba(255, 255, 255, 0.9);
}

.god-map-checkpoint-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.god-map-checkpoint-label {
  margin-top: 4px;
  background: rgba(20, 15, 8, 0.82);
  color: #fff;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.02em;
  border: 1.5px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

@keyframes godCheckpointFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ---- Central Character ---- */
.god-map-character {
  position: absolute;
  bottom: 5%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.god-map-character-glow {
  position: absolute;
  bottom: 0;
  width: clamp(300px, 40vh, 720px);
  height: clamp(300px, 40vh, 720px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 230, 100, 0.3) 0%, transparent 70%);
  animation: glowPulse 2.5s ease-in-out infinite;
}

.god-map-character img {
  height: clamp(350px, 50vh, 840px);
  width: auto;
  max-width: 85vw;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.45));
  animation: charBob 3s ease-in-out infinite;
}

.god-map-character-speech {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  color: #e04530;
  font-size: clamp(11px, 1.5vh, 16px);
  font-weight: 900;
  padding: clamp(3px, 0.5vh, 5px) clamp(10px, 1.2vh, 16px);
  border-radius: clamp(10px, 1.2vh, 14px);
  border: 2px solid #e04530;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  animation: speechBounce 2s ease-in-out infinite;
}

.god-map-character-shadow {
  width: clamp(220px, 30vh, 540px);
  height: clamp(44px, 6vh, 108px);
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.2) 0%, transparent 70%);
  margin-top: clamp(-15px, -2vh, -36px);
  animation: shadowPulse 3s ease-in-out infinite;
}

@keyframes speechBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}

/* ---- Recommended Route Button ---- */
.god-map-route-btn {
  position: absolute;
  bottom: 125px;
  left: 12px;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 248, 235, 0.92);
  border-radius: 20px;
  padding: 8px 14px;
  border: 2.5px solid #c4a872;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease;
  font-family: "Noto Sans JP", sans-serif;
}

.god-map-route-btn:active {
  transform: scale(0.94);
}

.god-map-route-btn i {
  font-size: 16px;
  color: #d4af37;
}

.god-map-route-btn span {
  font-size: 12px;
  font-weight: 800;
  color: #4a3520;
}

/* ---- Category Tabs ---- */
.god-map-categories {
  position: absolute;
  bottom: 68px;
  left: 0;
  right: 0;
  z-index: 9;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
}

.god-map-cat-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: 20px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  background: rgba(40, 30, 15, 0.75);
  color: rgba(255, 248, 224, 0.8);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: "Noto Sans JP", sans-serif;
}

.god-map-cat-tab i {
  font-size: 13px;
}

.god-map-cat-tab.active {
  background: rgba(212, 175, 55, 0.85);
  color: #2e1e0a;
  border-color: #d4af37;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.4);
}

.god-map-cat-tab:not(.active):hover {
  background: rgba(60, 45, 20, 0.85);
  border-color: rgba(212, 175, 55, 0.5);
}

/* ---- Selected Checkpoint Popup ---- */
.god-map-popup {
  position: absolute;
  bottom: 20px;
  left: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 250, 240, 0.95);
  border-radius: 16px;
  padding: 12px 16px;
  border: 2px solid #d4af37;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  z-index: 12;
  animation: popupSlideUp 0.3s ease-out;
  backdrop-filter: blur(8px);
}

.god-map-popup-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #d4af37;
  flex-shrink: 0;
}

.god-map-popup-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.god-map-popup-info {
  flex: 1;
  min-width: 0;
}

.god-map-popup-name {
  font-size: 16px;
  font-weight: 800;
  color: #2e1e0a;
  font-family: "Noto Serif JP", serif;
}

.god-map-popup-sub {
  font-size: 11px;
  color: #8a7a60;
  margin-top: 2px;
}

.god-map-popup-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  background: rgba(0, 0, 0, 0.06);
  color: #666;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.god-map-popup-checkin-btn {
  padding: 10px 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(238, 90, 111, 0.4);
  font-family: "Noto Sans JP", sans-serif;
  flex-shrink: 0;
}

.god-map-popup-checkin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(238, 90, 111, 0.5);
  background: linear-gradient(135deg, #ff7b7b 0%, #ff6a7f 100%);
}

.god-map-popup-checkin-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(238, 90, 111, 0.3);
}

/* ---- Bottom Nav God Map Override ---- */
.god-map-screen ~ .bottom-nav {
  background:
    linear-gradient(180deg, #3a3020 0%, #2e2518 40%, #241e12 100%);
  border-top: 2.5px solid #8a7a55;
  box-shadow:
    0 -4px 20px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(212, 175, 55, 0.1);
}

.god-map-screen ~ .bottom-nav .nav-icon-wrap {
  background: rgba(212, 175, 55, 0.08);
  border-color: rgba(212, 175, 55, 0.12);
}

.god-map-screen ~ .bottom-nav .nav-item.active .nav-icon-wrap {
  background: rgba(212, 175, 55, 0.2);
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.god-map-screen ~ .bottom-nav .nav-item.active i,
.god-map-screen ~ .bottom-nav .nav-item.active .nav-label {
  color: #e6c767;
}

/* ============================================
   AD BANNER
   ============================================ */

.ad-banner {
  position: fixed;
  left: 0;
  right: 0;
  height: 50px;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100; /* マップ要素より確実に上に配置 */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* 広告とマップの境界を明確化 */
  border-bottom: 2px solid #c0c0c0; /* 明確な境界線 */
}

.ad-banner-label {
  font-size: 14px;
  color: #888;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.ad-banner-top {
  top: 0;
}

.ad-banner-bottom {
  bottom: 70px;
  border-top: 2px solid #c0c0c0; /* 明確な境界線 */
  border-bottom: none;
}

/* ---- Small height screens ---- */
@media (max-height: 700px) {
  .map-screen {
    top: 45px;
    bottom: 115px;
  }

  .map-user-marker img {
    width: clamp(100px, 20vw, 160px);
  }

  .map-user-marker .map-character-glow {
    width: clamp(80px, 16vw, 120px);
    height: clamp(80px, 16vw, 120px);
  }

  .map-user-marker .map-character-shadow {
    width: clamp(60px, 12vw, 100px);
    height: clamp(10px, 2vh, 16px);
  }

  .map-hud-top {
    padding: clamp(6px, 1.5vh, 10px) clamp(6px, 1.5vw, 10px);
  }

  .map-popup-bar {
    bottom: 0;
  }
}

/* ---- Very small height screens ---- */
@media (max-height: 600px) {
  .map-screen {
    top: 40px;
    bottom: 105px;
    height: calc(100vh - 145px);
  }

  .map-user-marker img {
    width: clamp(80px, 18vw, 140px);
  }

  .map-compass-btn {
    width: clamp(36px, 7vw, 44px);
    height: clamp(36px, 7vw, 44px);
    font-size: clamp(14px, 3vw, 18px);
  }

  .map-coins-hud {
    padding: clamp(5px, 1vh, 7px) clamp(8px, 2vw, 12px);
  }

  .map-marker-bubble {
    width: clamp(32px, 6.5vw, 42px);
    height: clamp(32px, 6.5vw, 42px);
  }

  .map-marker-icon {
    font-size: clamp(16px, 3.5vw, 20px);
  }
}

/* ---- Landscape mode adjustments ---- */
@media (orientation: landscape) and (max-height: 500px) {
  .map-screen {
    top: 35px;
    bottom: 95px;
    height: calc(100vh - 130px);
  }

  .map-user-marker img {
    width: clamp(70px, 15vw, 120px);
  }

  .map-user-marker .map-character-glow {
    width: clamp(60px, 12vw, 100px);
    height: clamp(60px, 12vw, 100px);
  }

  .map-hud-top {
    padding: 5px 8px;
  }

  .map-compass-btn,
  .map-coins-hud,
  .map-godmap-btn,
  .map-popup-bar {
    transform: scale(0.9);
  }

  .map-compass-btn {
    transform-origin: top left;
  }

  .map-coins-hud {
    transform-origin: top right;
  }

  .map-godmap-btn {
    transform: translateX(-50%) scale(0.9);
    transform-origin: top center;
  }

  .map-city-badge {
    transform-origin: bottom right;
  }

  .map-popup-bar {
    transform-origin: bottom left;
  }
}

/* ---- Game Main Screen - Small Height ---- */
@media (max-height: 700px) {
  .game-main {
    top: 45px;
    bottom: 115px;
    height: calc(100vh - 160px);
  }

  .game-scene {
    min-height: clamp(160px, 25vh, 280px);
    padding: 0 12px 12px;
  }

  .game-character {
    transform: translateY(clamp(4%, 1.5vh, 12%));
    margin-bottom: clamp(-25px, -2.5vh, -12px);
  }

  .game-character img {
    height: clamp(180px, 45vh, 500px);
  }

  .game-hud {
    padding: 8px 10px;
    gap: 6px;
  }

  .game-panel .panel-inner {
    padding: 12px 16px 8px;
  }
}

/* ---- Game Main Screen - Very Small Height ---- */
@media (max-height: 600px) {
  .game-main {
    top: 40px;
    bottom: 105px;
    height: calc(100vh - 145px);
  }

  .game-scene {
    min-height: clamp(140px, 22vh, 240px);
    padding: 0 10px 10px;
  }

  .game-character {
    transform: translateY(clamp(3%, 1vh, 10%));
    margin-bottom: clamp(-20px, -2vh, -10px);
  }

  .game-character img {
    height: clamp(160px, 42vh, 450px);
  }

  .game-hud {
    padding: 6px 8px;
    gap: 5px;
  }

  .hud-lv {
    font-size: 12px;
    padding: 4px 8px;
  }

  .game-panel .panel-inner {
    padding: 10px 14px 6px;
  }

  .panel-name {
    font-size: clamp(16px, 3vmin, 20px);
  }
}

/* ---- Game Main Screen - Landscape Mode ---- */
@media (orientation: landscape) and (max-height: 500px) {
  .game-main {
    top: 35px;
    bottom: 95px;
    height: calc(100vh - 130px);
  }

  .game-scene {
    min-height: clamp(120px, 20vh, 200px);
    padding: 0 8px 8px;
  }

  .game-character {
    transform: translateY(clamp(2%, 0.8vh, 8%));
    margin-bottom: clamp(-18px, -1.5vh, -8px);
  }

  .game-character img {
    height: clamp(140px, 40vh, 400px);
  }

  .game-hud {
    padding: 5px 6px;
    gap: 4px;
  }

  .hud-lv,
  .hud-coins {
    font-size: 11px;
  }

  .game-panel .panel-inner {
    padding: 8px 12px 5px;
  }
}

/* ---- Small Width Screens ---- */
@media (max-width: 360px) {
  .game-scene {
    padding: 0 8px 12px;
  }

  .game-character {
    transform: translateY(clamp(4%, 2vh, 14%));
  }

  .game-character img {
    height: clamp(170px, 48vh, 550px);
  }

  .game-hud {
    gap: 5px;
    padding: 8px 8px;
  }

  .hud-exp {
    gap: 4px;
  }
}

@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
  }
  .app,
  .game-main,
  .map-screen,
  .god-map-screen {
    max-width: 420px;
  }
  .bottom-nav,
  .ad-banner {
    max-width: 420px;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ============================================
   COSTUME SCREEN
   ============================================ */
.costume-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 0 160px;
  position: relative;
  background:
    linear-gradient(180deg, #1a1510 0%, #2a2318 30%, #1e1a14 100%);
  overflow-y: auto;
  overflow-x: hidden;
}

.costume-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      135deg,
      rgba(212, 175, 55, 0.015) 0,
      rgba(212, 175, 55, 0.015) 2px,
      transparent 2px,
      transparent 10px
    );
  pointer-events: none;
}

/* ---- Header ---- */
.costume-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 58px 18px 14px;
  z-index: 1;
}

.costume-back-btn {
  position: absolute;
  left: 14px;
  top: 54px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  color: var(--gold-soft);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
}

.costume-title {
  font-family: "Noto Serif JP", serif;
  font-size: 20px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
  margin: 0;
}

/* ---- Preview Area ---- */
.costume-preview {
  position: relative;
  z-index: 1;
  padding: 10px 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.costume-preview-frame {
  position: relative;
  width: 100%;
  background:
    linear-gradient(180deg, rgba(40, 34, 24, 0.95) 0%, rgba(30, 26, 20, 0.98) 100%);
  border-radius: 18px;
  border: 2px solid rgba(212, 175, 55, 0.25);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 230, 160, 0.06);
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 16px;
  overflow: hidden;
}

.costume-preview-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(212, 175, 55, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.costume-preview-character {
  flex-shrink: 0;
  width: 100px;
  height: 120px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.costume-preview-character img {
  width: 100px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.costume-preview-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.costume-rarity {
  display: inline-block;
  width: fit-content;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 10px;
  border-radius: 8px;
  letter-spacing: 0.06em;
}

.rarity-common {
  color: #b0b0b0;
  background: rgba(176, 176, 176, 0.12);
  border: 1px solid rgba(176, 176, 176, 0.2);
}

.rarity-rare {
  color: #5eaeff;
  background: rgba(94, 174, 255, 0.1);
  border: 1px solid rgba(94, 174, 255, 0.2);
}

.rarity-legendary {
  color: var(--gold);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.costume-preview-name {
  font-family: "Noto Serif JP", serif;
  font-size: 20px;
  font-weight: 900;
  color: #f0e8d8;
  margin: 0;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.costume-preview-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Equip Button */
.costume-equip-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  background:
    linear-gradient(180deg, #c4a050 0%, #a08030 100%);
  color: #1a1510;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow:
    0 4px 16px rgba(212, 175, 55, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: transform 0.15s, box-shadow 0.15s;
}

.costume-equip-btn:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.costume-equipped-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.08);
  border: 2px solid rgba(212, 175, 55, 0.3);
  color: var(--gold);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

/* ---- List Header ---- */
.costume-list-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 8px 18px 10px;
}

.costume-list-header h3 {
  font-family: "Noto Serif JP", serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-soft);
  letter-spacing: 0.1em;
  margin: 0;
  white-space: nowrap;
}

.costume-list-ornament {
  flex: 1;
  height: 1px;
  background:
    linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
}

/* ---- Costume Grid ---- */
.costume-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0 18px;
}

.costume-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 8px 12px;
  background: rgba(30, 26, 20, 0.9);
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  overflow: hidden;
}

.costume-card:active {
  transform: scale(0.96);
}

.costume-selected {
  border-color: var(--gold);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
}

.costume-equipped-card {
  background: rgba(212, 175, 55, 0.04);
}

/* Rarity bar at top of card */
.costume-card-rarity-bar {
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 2px;
  border-radius: 0 0 2px 2px;
}

.costume-card-rarity-bar.rarity-common {
  background: linear-gradient(90deg, transparent, rgba(176, 176, 176, 0.4), transparent);
}

.costume-card-rarity-bar.rarity-rare {
  background: linear-gradient(90deg, transparent, rgba(94, 174, 255, 0.5), transparent);
}

.costume-card-rarity-bar.rarity-legendary {
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.6), transparent);
}

/* Equipped star dot */
.costume-card-equipped-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 10px;
  color: var(--gold);
}

.costume-card-icon {
  font-size: 32px;
  line-height: 1;
}

.costume-card-image {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.costume-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.costume-card-name {
  font-size: 11px;
  font-weight: 700;
  color: #ccc;
  text-align: center;
  line-height: 1.3;
}

/* ==========================
   Level Up Modal
   ========================== */
.level-up-modal {
  max-width: 420px;
  width: 90%;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2520 100%);
  border: 2px solid var(--gold);
  border-radius: 18px;
  padding: 32px 24px;
  box-shadow: 0 0 40px rgba(212, 175, 55, 0.4), 0 20px 60px rgba(0, 0, 0, 0.6);
  animation: levelUpAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 10000;
}

@keyframes levelUpAppear {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.level-up-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.level-up-title {
  font-family: "Noto Serif JP", serif;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold), #f4d98a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
}

.level-up-sparkles {
  font-size: 24px;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.2) rotate(180deg);
    opacity: 0.7;
  }
}

.level-up-badge {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.level-up-badge::before {
  content: "";
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.3) 0%, transparent 70%);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
}

.level-up-level {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--gold), #f4d98a);
  color: #2a210f;
  font-size: 18px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
  z-index: 2;
}

.level-up-character {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.4));
  animation: characterFloat 3s ease-in-out infinite;
}

@keyframes characterFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.level-up-info {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.level-up-rank {
  font-family: "Noto Serif JP", serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.level-up-mood {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.level-up-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.level-up-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(212, 175, 55, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.15);
}

.level-up-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.level-up-value {
  font-size: 14px;
  color: var(--white);
  font-weight: 600;
}

.level-up-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--gold), #f4d98a);
  color: #2a210f;
  font-weight: 700;
  font-size: 16px;
  padding: 14px 20px;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(212, 175, 55, 0.3);
  transition: all 0.2s ease;
}

.level-up-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(212, 175, 55, 0.4);
}

.level-up-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(212, 175, 55, 0.3);
}

/* ==========================
   Costume Lock Styles
   ========================== */
.costume-locked-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 12px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 600;
}

.costume-locked-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 20px;
  background: rgba(100, 100, 100, 0.3);
  border: 1px solid rgba(150, 150, 150, 0.3);
  border-radius: 16px;
  color: #888;
  font-size: 14px;
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.7;
}

.costume-card.costume-locked {
  cursor: not-allowed;
}

.costume-card.costume-locked .costume-card-image {
  opacity: 0.4;
  filter: grayscale(0.8) brightness(0.6);
}

.costume-card.costume-locked:hover {
  transform: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.costume-card-lock {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 10;
}

.costume-card-lock i {
  font-size: 24px;
  color: rgba(200, 200, 200, 0.6);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

.costume-card-lock-level {
  font-size: 10px;
  font-weight: 700;
  color: rgba(200, 200, 200, 0.6);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 6px;
  border-radius: 8px;
}
