#vdbanner {
  display: block;
  width: 100%;
  max-width: 468px;
  max-height: 60px;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  z-index: 10;
}

/* ===== VARIABLES ===== */
:root {
  --navy:      #0d1b2a;
  --deep-sea:  #112240;
  --sea:       #1a3a5c;
  --sea-light: #1e4976;
  --gold:      #c9922a;
  --gold-light:#e8b84b;
  --gold-pale: #f5d98b;
  --parchment: #f2e8c9;
  --parchment-dark: #d9c99a;
  --red:       #c0392b;
  --cream:     #fdf6e3;
  --text-dark: #2c1a0e;
  --shadow:    rgba(0,0,0,0.5);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== BODY / BACKGROUND ===== */
body {
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--cream);
  min-height: 100vh;
  background: var(--navy);
  overflow-x: hidden;
  position: relative;
}

/* 海の背景 */
.ocean-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 60%, #0a2a4a 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, #102038 0%, transparent 50%),
    linear-gradient(170deg, #0d1b2a 0%, #1a3a5c 50%, #0d2137 100%);
  z-index: 0;
}

/* 波テクスチャ */
.waves {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 180px;
  background:
    repeating-linear-gradient(
      -8deg,
      transparent,
      transparent 18px,
      rgba(255,255,255,0.03) 18px,
      rgba(255,255,255,0.03) 20px
    );
  z-index: 0;
  pointer-events: none;
}

/* ===== LAYOUT ===== */
header, main { position: relative; z-index: 1; }

header {
  text-align: center;
  padding: 32px 20px 16px;
  border-bottom: 2px solid rgba(201,146,42,0.3);
}

main {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== TYPOGRAPHY ===== */
.skull {
  font-size: 2rem;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px rgba(201,146,42,0.6));
}

h1 {
  font-family: 'Pirata One', 'Noto Serif JP', serif;
  font-size: clamp(1.6rem, 6vw, 2.4rem);
  letter-spacing: 0.12em;
  color: var(--gold-light);
  text-shadow:
    0 0 20px rgba(232,184,75,0.5),
    2px 2px 0 var(--navy);
  margin-bottom: 4px;
}

.subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--parchment-dark);
  opacity: 0.8;
}

h2 {
  font-family: 'Pirata One', 'Noto Serif JP', serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--gold-light);
  margin-bottom: 12px;
}

/* ===== BUTTON ===== */
.btn-treasure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-family: 'Pirata One', 'Noto Serif JP', serif;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 60%, #a07020 100%);
  border: 2px solid var(--gold-pale);
  border-radius: 8px;
  cursor: pointer;
  box-shadow:
    0 4px 0 #6b4000,
    0 6px 20px rgba(201,146,42,0.3),
    inset 0 1px 0 rgba(255,255,255,0.3);
  transition: all 0.15s;
  position: relative;
  overflow: hidden;
}

.btn-treasure::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.4s;
}

.btn-treasure:hover::before { left: 150%; }

.btn-treasure:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #6b4000, 0 2px 8px rgba(201,146,42,0.2);
}

.btn-icon { font-size: 1.2em; }

/* ===== LOCATION CARD ===== */
.location-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,146,42,0.25);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--parchment-dark);
  letter-spacing: 0.05em;
}
.no-spot {
  color: #e8603c;
  font-size: 0.82rem;
  letter-spacing: 0.05em;
}

/* ===== PANEL（海図） ===== */
.panel {
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,0.01),
      rgba(255,255,255,0.01) 2px,
      transparent 2px,
      transparent 12px
    ),
    linear-gradient(160deg, #1a3352 0%, #0f2035 100%);
  border: 2px solid rgba(201,146,42,0.4);
  border-radius: 14px;
  padding: 16px;
  box-shadow:
    0 8px 32px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.06);
}

/* ===== MAP ===== */
.map-container {
  width: 100%;
  height: 280px;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid rgba(201,146,42,0.5);
  position: relative;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.map-inner {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-origin: center;
  transition: transform 0.2s;
}

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

/* ===== STAMPS ===== */
.stamp {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  opacity: 0.45;
  filter: grayscale(100%) brightness(0.7);
  transition: opacity 0.4s, filter 0.4s;
  cursor: default;
}

.stamp-frame {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: 3px dashed rgba(201,146,42,0.6);
  background: rgba(13,27,42,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 4px;
}

/* nami.pngが非正方形でもはみ出さないよう object-fit で統一 */
.stamp-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  display: block;
}

.spot-name {
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--parchment-dark);
  background: rgba(13,27,42,0.75);
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* 取得済み */
.stamp.active {
  opacity: 1;
  filter: none;
}

.stamp.active .stamp-frame {
  border-style: solid;
  border-color: var(--gold-light);
  background: rgba(201,146,42,0.12);
  box-shadow:
    0 0 12px rgba(232,184,75,0.5),
    inset 0 0 8px rgba(232,184,75,0.15);
  animation: stampGlow 2s ease-in-out infinite alternate;
}

@keyframes stampGlow {
  from { box-shadow: 0 0 10px rgba(232,184,75,0.4), inset 0 0 6px rgba(232,184,75,0.1); }
  to   { box-shadow: 0 0 22px rgba(232,184,75,0.7), inset 0 0 12px rgba(232,184,75,0.2); }
}

/* 位置 */
.island1  { top:  8%; left: 18%; }
.island2  { top: 23%; left:  8%; }
.island3  { top: 43%; left: 22%; }
.island4  { top:  0%; left: 42%; }
.island5  { top:  0%; left: 65%; }
.island6  { top: 18%; left: 75%; }
.island7  { top: 38%; left: 80%; }
.island8  { top: 56%; left: 62%; }
.island9  { top: 60%; left: 38%; }
.island10 { top: 63%; left: 18%; }
.island11 { top: 73%; left:  5%; }

.treasure-shadow {
  position: absolute;
  top: 45%;
  left: 55%;
  transform: translate(-50%, -50%);
  width: 90px;
  opacity: 0.25;
  filter: grayscale(100%) brightness(0.4);
  transition: opacity 0.8s, filter 0.8s, transform 0.8s;
}

.treasure-shadow img {
  width: 100%;
}

.treasure-shadow.revealed {
  opacity: 1;
  filter: none;
  transform: translate(-50%, -50%) scale(1.4);
  filter: drop-shadow(0 0 16px rgba(232,184,75,0.9));
  animation: treasureReveal 1s cubic-bezier(.175,.885,.32,1.4) forwards;
}

@keyframes treasureReveal {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: 0.25; }
  60%  { transform: translate(-50%, -50%) scale(1.6); }
  100% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
}


/* ===== ZOOM ===== */
.zoom-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.zoom-controls button {
  width: 36px;
  height: 36px;
  font-size: 1.2rem;
  line-height: 1;
  background: rgba(201,146,42,0.15);
  border: 1px solid rgba(201,146,42,0.4);
  border-radius: 6px;
  color: var(--gold-light);
  cursor: pointer;
  transition: background 0.15s;
}

.zoom-controls button:hover {
  background: rgba(201,146,42,0.3);
}

/* ===== RANK ===== */
.rank-card {
  text-align: center;
  padding: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,146,42,0.2);
  border-radius: 10px;
}

#rank {
  font-family: 'Pirata One', 'Noto Serif JP', serif;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  color: var(--gold-pale);
  text-shadow: 0 0 10px rgba(232,184,75,0.4);
}

/* ===== COMPLETE ===== */
.complete {
  text-align: center;
  padding: 20px;
  border-radius: 12px;
  font-family: 'Pirata One', 'Noto Serif JP', serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #7a4f00, #c9922a, #7a4f00);
  border: 2px solid var(--gold-pale);
  color: var(--cream);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
  box-shadow: 0 0 30px rgba(201,146,42,0.5);
  animation: completePulse 2s ease-in-out infinite;
}

@keyframes completePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(201,146,42,0.4); }
  50%       { box-shadow: 0 0 40px rgba(201,146,42,0.8); }
}

/* ===== TREASURE POPUP ===== */
.treasure {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 999;
  text-align: center;
  pointer-events: none;
}

.treasure-inner {
  background: linear-gradient(135deg, #1a3352, #0d1b2a);
  border: 2px solid var(--gold-light);
  border-radius: 16px;
  padding: 24px 32px;
  box-shadow: 0 0 40px rgba(232,184,75,0.5);
}

.treasure-emoji {
  font-size: 3rem;
  margin-bottom: 8px;
}

.treasure-inner p {
  font-family: 'Pirata One', 'Noto Serif JP', serif;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  color: var(--gold-light);
}

.treasure.show {
  animation: pop 0.6s cubic-bezier(.175,.885,.32,1.4) forwards;
}

@keyframes pop {
  0%   { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1);   opacity: 1; }
}

/* ===== UTILITY ===== */
.hidden { display: none !important; }


/* =====================================================
   スプラッシュスクリーン
   ===================================================== */

/* オーバーレイ全体 */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* JS で .splash-hidden を付与してフェードアウト */
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.splash.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* 背景 - 炎の国らしく海軍ネイビー ＋ 赤のグラデーション */
.splash-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(192, 57, 43, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(13, 27, 42, 0.9) 0%, transparent 50%),
    linear-gradient(170deg, #0a1520 0%, #1a0808 40%, #0d1b2a 100%);
  animation: splashBgPulse 3s ease-in-out infinite alternate;
}

@keyframes splashBgPulse {
  from { opacity: 0.85; }
  to   { opacity: 1; }
}

/* 炎のリング装飾 */
.splash-flame-ring {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto 0;
}

.splash-flame-ring span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 3px solid transparent;
  animation: flameRingRotate 4s linear infinite;
}

/* 各リングをずらしてフレアっぽく */
.splash-flame-ring span:nth-child(1) {
  border-top-color: var(--red);
  border-right-color: var(--red);
  animation-duration: 3.5s;
  opacity: 0.9;
}
.splash-flame-ring span:nth-child(2) {
  border-bottom-color: var(--gold-light);
  border-left-color: var(--gold);
  animation-duration: 2.8s;
  animation-direction: reverse;
  width: 160px;
  height: 160px;
  opacity: 0.7;
}
.splash-flame-ring span:nth-child(3) {
  border-top-color: rgba(192, 57, 43, 0.5);
  border-right-color: var(--gold-pale);
  animation-duration: 5s;
  width: 196px;
  height: 196px;
  opacity: 0.5;
}
.splash-flame-ring span:nth-child(4) {
  border-bottom-color: var(--red);
  animation-duration: 4.5s;
  animation-direction: reverse;
  width: 210px;
  height: 210px;
  opacity: 0.3;
}
.splash-flame-ring span:nth-child(5) {
  border-left-color: var(--gold);
  animation-duration: 6s;
  width: 220px;
  height: 220px;
  opacity: 0.2;
}
.splash-flame-ring span:nth-child(6) {
  border-top-color: rgba(192, 57, 43, 0.4);
  animation-duration: 7s;
  animation-direction: reverse;
  width: 230px;
  height: 230px;
  opacity: 0.15;
}

@keyframes flameRingRotate {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

/* コンテンツ（アイコン + テキスト） */
.splash-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  max-width: 360px;
  padding: 0 24px;
}

/* アイコン - リングの上に重なるよう負のマージン */
.splash-icon-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  margin: 0;
  z-index: 2;
}

.splash-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--gold-light);
  box-shadow:
    0 0 0 4px rgba(192, 57, 43, 0.5),
    0 0 30px rgba(192, 57, 43, 0.6),
    0 0 60px rgba(201, 146, 42, 0.3);
  animation: iconGlow 2s ease-in-out infinite alternate;
}

@keyframes iconGlow {
  from { box-shadow: 0 0 0 4px rgba(192,57,43,0.4), 0 0 24px rgba(192,57,43,0.5), 0 0 48px rgba(201,146,42,0.2); }
  to   { box-shadow: 0 0 0 4px rgba(192,57,43,0.8), 0 0 40px rgba(192,57,43,0.8), 0 0 80px rgba(201,146,42,0.4); }
}

/* タイトルブロック - アイコン分のスペースを確保 */
.splash-title-block {
  margin-top: 90px; /* flame-ring の半分(90px) 程度 */
  text-align: center;
  padding-top: 56px; /* アイコン下端から文字まで */
}

/* 上部サブタイトル（ローマ字） */
.splash-subtitle-top {
  font-family: 'Pirata One', serif;
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  color: var(--red);
  opacity: 0.9;
  margin-bottom: 4px;
  text-shadow: 0 0 10px rgba(192, 57, 43, 0.6);
}

/* メインタイトル */
.splash-title {
  font-family: 'Pirata One', 'Noto Serif JP', serif;
  font-size: clamp(2rem, 8vw, 2.8rem);
  letter-spacing: 0.1em;
  color: var(--gold-light);
  text-shadow:
    0 0 30px rgba(232, 184, 75, 0.7),
    0 0 60px rgba(192, 57, 43, 0.4),
    2px 3px 0 rgba(0, 0, 0, 0.6);
  line-height: 1.1;
  margin-bottom: 6px;
  animation: titleFlicker 4s ease-in-out infinite;
}

@keyframes titleFlicker {
  0%, 95%, 100% { opacity: 1; }
  96%           { opacity: 0.85; }
  97%           { opacity: 1; }
}

/* サブタイトル（火の国復興ラリー） */
.splash-subtitle-mid {
  font-family: 'Noto Serif JP', serif;
  font-size: clamp(1rem, 4.5vw, 1.3rem);
  letter-spacing: 0.2em;
  color: var(--cream);
  text-shadow:
    0 0 16px rgba(192, 57, 43, 0.6),
    1px 1px 0 rgba(0, 0, 0, 0.5);
  margin-bottom: 8px;
}

/* エディションテキスト */
.splash-edition {
  font-family: 'Pirata One', serif;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--parchment-dark);
  opacity: 0.6;
  margin-bottom: 32px;
}

/* ローディングバー */
.splash-loader {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(201, 146, 42, 0.2);
}

.splash-loader-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--red) 0%, var(--gold-light) 60%, var(--gold-pale) 100%);
  border-radius: 2px;
  animation: loaderFill 2s ease-out forwards;
  box-shadow: 0 0 10px rgba(192, 57, 43, 0.6);
}

@keyframes loaderFill {
  0%   { width: 0; }
  100% { width: 100%; }
}

/* ローディングテキスト */
.splash-loading-text {
  font-family: 'Pirata One', serif;
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  color: var(--gold-pale);
  opacity: 0.5;
  animation: loadingBlink 1.2s step-end infinite;
}

@keyframes loadingBlink {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 0.15; }
}


/* =====================================================
   赤アクセント追加（既存デザインに統合）
   ===================================================== */

/* ヘッダーにサブタイトル行を追加 */
.header-sub {
  display: block;
  font-size: 0.75em;
  color: var(--red);
  letter-spacing: 0.15em;
  text-shadow:
    0 0 12px rgba(192, 57, 43, 0.6),
    1px 1px 0 var(--navy);
  margin-top: 2px;
}

/* ヘッダーのドクロに赤グロー */
.skull {
  color: var(--cream);
  text-shadow: 0 0 10px rgba(192, 57, 43, 0.5), 0 0 20px rgba(201, 146, 42, 0.4);
}

/* ボタンに赤ボーダーアクセント */
.btn-treasure {
  border-color: var(--gold-pale);
  box-shadow:
    0 4px 0 #6b4000,
    0 6px 20px rgba(192, 57, 43, 0.25),
    0 6px 20px rgba(201, 146, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-treasure:hover {
  box-shadow:
    0 4px 0 #8b2000,
    0 6px 24px rgba(192, 57, 43, 0.4),
    0 8px 24px rgba(201, 146, 42, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* パネルボーダーに赤を混ぜる */
.panel {
  border-color: rgba(192, 57, 43, 0.3);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(201, 146, 42, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* マップコンテナに赤ライン */
.map-container {
  border-color: rgba(192, 57, 43, 0.5);
}

/* コンプリートメッセージに赤グロー */
.complete {
  background: linear-gradient(135deg, #5a0a00, #c9392b 30%, #c9922a 60%, #7a4f00);
  box-shadow:
    0 0 30px rgba(192, 57, 43, 0.5),
    0 0 60px rgba(201, 146, 42, 0.3);
}

/* 宝箱ポップアップに赤グロー */
.treasure-inner {
  box-shadow:
    0 0 40px rgba(192, 57, 43, 0.4),
    0 0 40px rgba(232, 184, 75, 0.3);
  border-color: var(--red);
}
