/* ============================================================
   Luminous Re:Chord — グローバルスタイル
   ============================================================ */

:root {
  --bg-deep:    #07071a;
  --bg-dark:    #0d0d2b;
  --bg-card:    #12123a;
  --bg-card2:   #1a1a45;
  --primary:    #c97aff;
  --primary2:   #ff6fc8;
  --gold:       #ffd700;
  --text:       #e8e8ff;
  --text-muted: #8888bb;
  --border:     #2a2a5a;
  --radius:     12px;
  --radius-sm:  8px;
  --nav-h:      64px;
}

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

html, body {
  height: 100%;
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Segoe UI', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}

/* ============================================================
   レイアウト
   ============================================================ */
#wrapper {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  background: var(--bg-deep);
}

#app {
  padding-bottom: calc(var(--nav-h) + 12px);
  min-height: calc(100vh - var(--nav-h));
}

/* ============================================================
   ナビゲーション
   ============================================================ */
#nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background: linear-gradient(180deg, #0d0d2bee, #07071aee);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.2s;
  background: none;
  border: none;
  font-size: 11px;
}
.nav-item .nav-icon { font-size: 20px; line-height: 1; }
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon { filter: drop-shadow(0 0 4px var(--primary)); }

/* ============================================================
   汎用
   ============================================================ */
.screen { padding: 16px; }
.screen-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.screen-header h2 { font-size: 20px; color: var(--primary); }
.section-title {
  font-size: 13px; color: var(--text-muted);
  margin: 16px 0 8px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}
.empty-msg { color: var(--text-muted); text-align: center; padding: 24px; }
.warn-msg { color: #ff8c00; font-size: 12px; margin-top: 8px; }
.back-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); padding: 6px 12px; border-radius: 20px;
  cursor: pointer; margin-bottom: 12px; font-size: 13px;
}
.back-btn:hover { color: var(--primary); border-color: var(--primary); }

/* ============================================================
   通知バナー
   ============================================================ */
#notif {
  position: fixed; top: -60px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  color: #fff; padding: 12px 24px; border-radius: 24px;
  font-size: 14px; font-weight: bold;
  transition: top 0.3s ease; z-index: 999;
  white-space: pre-line; text-align: center;
  box-shadow: 0 4px 20px rgba(201, 122, 255, 0.5);
  max-width: 360px; width: 90%;
}
#notif.show { top: 16px; }

/* ============================================================
   ホーム画面
   ============================================================ */
.home-screen { padding: 0; overflow: hidden; }

.home-header {
  text-align: center; padding: 20px 16px 0;
  background: linear-gradient(180deg, #1a0a3a, transparent);
}
.home-title {
  font-size: 22px; font-weight: bold;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home-subtitle { font-size: 12px; color: var(--text-muted); letter-spacing: 4px; }

.home-char-area {
  position: relative; height: 300px; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.home-char-bg {
  position: absolute; inset: 0; pointer-events: none;
}
.home-char-img {
  height: 280px; object-fit: contain; position: relative; z-index: 2;
}
.home-char-placeholder {
  height: 280px; width: 200px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 16px; gap: 8px; position: relative; z-index: 2;
}
.home-char-speech {
  position: absolute; bottom: 12px; left: 16px; right: 16px; z-index: 3;
  background: rgba(7,7,26,0.85); border-radius: 12px;
  padding: 10px 14px; border: 1px solid var(--border);
  backdrop-filter: blur(4px);
}
.speech-name { font-size: 11px; font-weight: bold; display: block; margin-bottom: 2px; }
.speech-text { font-size: 13px; color: var(--text); }

.home-status-bar {
  display: flex; justify-content: center; gap: 32px;
  padding: 10px 16px; background: rgba(13,13,43,0.8);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.status-item { display: flex; align-items: center; gap: 6px; }
.status-icon { font-size: 18px; }
.status-val { font-size: 16px; font-weight: bold; color: var(--gold); }
.status-label { font-size: 11px; color: var(--text-muted); }

.home-menu {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 10px; padding: 16px;
}
.menu-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: all 0.2s; color: var(--text);
}
.menu-btn:hover, .menu-btn:active { background: var(--bg-card2); border-color: var(--primary); }
.menu-btn.large { grid-column: span 1; }
.menu-icon { font-size: 28px; }
.menu-label { font-size: 12px; color: var(--text-muted); }

/* ============================================================
   アイドル一覧
   ============================================================ */
.idol-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.idol-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px;
  cursor: pointer; transition: all 0.2s; position: relative; overflow: hidden;
}
.idol-card:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(201,122,255,0.2); }
.idol-card-bg { position: absolute; inset: 0; pointer-events: none; }
.idol-card-attr { font-size: 11px; font-weight: bold; margin-bottom: 6px; position: relative; }
.idol-card-img-wrap {
  width: 100%; aspect-ratio: 2/3; overflow: hidden; border-radius: 8px;
  margin-bottom: 8px; position: relative; background: #0a0a1a;
}
.idol-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.idol-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 8px;
}
.idol-card-name { font-size: 14px; font-weight: bold; margin-bottom: 2px; }
.idol-card-role { font-size: 11px; margin-bottom: 6px; }
.stat-bar-mini { display: flex; align-items: center; gap: 4px; margin-bottom: 3px; }
.stat-bar-mini span { font-size: 9px; color: var(--text-muted); width: 24px; }
.stat-bar-mini .bar {
  flex: 1; height: 4px; background: #2a2a4a; border-radius: 2px; overflow: hidden;
}
.stat-bar-mini .bar div { height: 100%; border-radius: 2px; transition: width 0.5s; }

/* ============================================================
   アイドル詳細
   ============================================================ */
.idol-detail-hero {
  position: relative; min-height: 360px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: 16px;
}
.idol-detail-img { height: 300px; object-fit: contain; }
.idol-detail-placeholder {
  height: 300px; width: 200px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 16px;
}
.idol-detail-name-block { text-align: center; margin-top: 8px; }
.idol-detail-attr { font-size: 13px; font-weight: bold; margin-bottom: 4px; }
.idol-detail-name { font-size: 24px; font-weight: bold; }
.idol-detail-name-en { font-size: 12px; color: var(--text-muted); letter-spacing: 2px; }

.idol-detail-body { padding: 16px; }
.detail-section { margin-bottom: 20px; }
.detail-title {
  font-size: 13px; color: var(--text-muted); margin-bottom: 8px;
  padding-left: 8px; border-left: 3px solid var(--primary);
}
.detail-catchphrase {
  font-size: 15px; font-style: italic; color: var(--gold);
  text-align: center; padding: 12px; border-radius: 8px;
  background: rgba(255,215,0,0.08); border: 1px solid rgba(255,215,0,0.2);
}
.detail-row {
  display: flex; justify-content: space-between;
  padding: 6px 0; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.detail-text { font-size: 13px; line-height: 1.7; margin-bottom: 8px; color: var(--text); }
.detail-text.weak { color: var(--text-muted); font-size: 12px; }
.detail-text.theme { font-weight: bold; font-size: 15px; }

.stat-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.stat-label { font-size: 12px; color: var(--text-muted); width: 64px; }
.stat-bar-wrap {
  flex: 1; height: 8px; background: #2a2a4a; border-radius: 4px; overflow: hidden;
}
.stat-bar-fill { height: 100%; border-radius: 4px; transition: width 0.6s ease; }
.stat-val { font-size: 12px; width: 28px; text-align: right; }

.card-list-small { display: flex; flex-direction: column; gap: 8px; }
.card-small {
  background: var(--bg-card2); border: 1px solid; border-radius: 8px; padding: 10px;
}
.card-small-rar { font-size: 11px; font-weight: bold; margin-bottom: 2px; }
.card-small-name { font-size: 13px; font-weight: bold; margin-bottom: 2px; }
.card-small-attr { font-size: 11px; margin-bottom: 4px; }
.card-small-cost { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.card-small-desc { font-size: 11px; color: var(--text-muted); line-height: 1.5; }

/* ============================================================
   デッキ編成
   ============================================================ */
.deck-count { font-size: 13px; color: var(--text-muted); }
.deck-list { display: flex; flex-direction: column; gap: 6px; }
.deck-card-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
  display: flex; align-items: center; gap: 8px;
}
.deck-card-item.add-card { cursor: pointer; }
.deck-card-item.add-card:hover { background: var(--bg-card2); }
.rar-badge { font-size: 10px; font-weight: bold; min-width: 28px; }
.deck-card-name { flex: 1; font-size: 13px; }
.deck-card-cost { font-size: 12px; color: var(--text-muted); }
.deck-remove-btn {
  background: rgba(255,60,60,0.2); border: 1px solid rgba(255,60,60,0.4);
  color: #ff6060; width: 24px; height: 24px; border-radius: 50%;
  cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center;
}
.deck-add-btn {
  background: rgba(100,255,100,0.1); border: 1px solid rgba(100,255,100,0.3);
  color: #60ff60; width: 24px; height: 24px; border-radius: 50%;
  cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   ステージ選択
   ============================================================ */
.stage-list { display: flex; flex-direction: column; gap: 12px; }
.stage-card {
  position: relative; height: 140px; border-radius: var(--radius);
  overflow: hidden; cursor: pointer; border: 1px solid var(--border);
  transition: transform 0.2s;
}
.stage-card:hover:not(.locked) { transform: translateY(-2px); }
.stage-card.locked { opacity: 0.5; cursor: not-allowed; }
.stage-card.cleared { border-color: #2ecc7155; }
.stage-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.stage-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7,7,26,0.9) 0%, rgba(7,7,26,0.5) 100%);
}
.stage-info {
  position: relative; z-index: 2; padding: 14px 16px;
}
.stage-chapter { font-size: 11px; color: var(--text-muted); }
.stage-title { font-size: 18px; font-weight: bold; margin: 4px 0; }
.stage-subtitle { font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.stage-stats { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.stage-status {
  position: absolute; bottom: 12px; right: 14px; z-index: 2;
  font-size: 12px; color: var(--gold);
}

/* ============================================================
   バトル前プレビュー
   ============================================================ */
.battle-preview {
  position: relative; height: 180px; border-radius: var(--radius);
  overflow: hidden; margin-bottom: 16px;
  background-size: cover; background-position: center;
}
.battle-preview-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent, rgba(7,7,26,0.9));
}
.battle-preview-info {
  position: absolute; bottom: 14px; left: 16px; z-index: 2;
}
.bp-chapter { font-size: 11px; color: var(--text-muted); }
.bp-title { font-size: 20px; font-weight: bold; }
.bp-enemy { font-size: 13px; color: var(--primary); margin-top: 4px; }

.battle-info-section { margin-bottom: 12px; }
.bi-row {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.bi-enemy-effects, .bi-deck-info { margin-bottom: 16px; }
.bi-title { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.bi-eff { font-size: 12px; padding: 4px 0; color: #ff8c00; }
.bi-deck-count { font-size: 24px; font-weight: bold; color: var(--primary); }

.start-battle-btn {
  width: 100%; padding: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 18px; font-weight: bold;
  cursor: pointer; transition: all 0.2s;
  box-shadow: 0 4px 20px rgba(201,122,255,0.4);
}
.start-battle-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(201,122,255,0.6); }
.start-battle-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============================================================
   バトル画面（アクティブ）
   ============================================================ */
.battle-screen { padding: 10px; }

.battle-top-bar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; padding: 8px 12px;
  background: var(--bg-card); border-radius: 8px;
}
.bt-turn { font-size: 12px; color: var(--gold); font-weight: bold; }
.bt-stage { font-size: 12px; color: var(--text-muted); }

.enemy-section {
  background: linear-gradient(135deg, #1a003a, #0d0d2b);
  border: 1px solid #4a008055; border-radius: var(--radius);
  padding: 12px; margin-bottom: 10px; text-align: center;
}
.enemy-icon { font-size: 36px; margin-bottom: 4px; }
.enemy-name { font-size: 13px; color: var(--primary); font-weight: bold; margin-bottom: 8px; }

.gauge-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 6px;
}
.gauge-row span:first-child { font-size: 11px; color: var(--text-muted); min-width: 60px; }
.gauge {
  flex: 1; height: 12px; background: #1a1a3a; border-radius: 6px;
  overflow: hidden; border: 1px solid var(--border);
}
.gauge-fill { height: 100%; border-radius: 6px; transition: width 0.4s ease; }
.gauge-val { font-size: 11px; color: var(--text-muted); min-width: 70px; text-align: right; }

.player-status {
  background: var(--bg-card); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
}
.tension-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.tension-row span:first-child { font-size: 11px; color: var(--text-muted); min-width: 72px; }
.tension-pips { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.pip { width: 14px; height: 14px; border-radius: 50%; background: #2a2a4a; border: 1px solid var(--border); }
.pip.active { background: #ffd700; border-color: #ffd700; box-shadow: 0 0 6px #ffd70088; }
.voltage-row { font-size: 12px; color: var(--primary); margin-top: 4px; }

.battle-log {
  background: rgba(0,0,0,0.4); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 10px; margin-bottom: 8px;
  max-height: 80px; overflow-y: auto;
}
.log-line { font-size: 11px; color: var(--text-muted); padding: 1px 0; }

.hand-area { margin-bottom: 8px; }
.hand-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.hand-cards {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px;
}
.battle-card {
  min-width: 90px; flex-shrink: 0;
  background: var(--bg-card); border: 2px solid; border-radius: 10px;
  padding: 8px 6px; cursor: pointer; transition: all 0.15s;
  display: flex; flex-direction: column; gap: 3px;
}
.battle-card.playable:hover { transform: translateY(-4px); box-shadow: 0 4px 16px rgba(255,255,255,0.15); }
.battle-card.unplayable { filter: grayscale(0.5); opacity: 0.6; cursor: not-allowed; }
.bc-rar { font-size: 9px; font-weight: bold; }
.bc-attr { font-size: 16px; text-align: center; }
.bc-name { font-size: 10px; font-weight: bold; text-align: center; line-height: 1.3; }
.bc-cost { font-size: 11px; color: var(--gold); text-align: center; }
.bc-desc { font-size: 9px; color: var(--text-muted); text-align: center; line-height: 1.3; }

.battle-actions { display: flex; justify-content: flex-end; }
.end-turn-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #2a2a6a, #1a1a4a);
  border: 1px solid var(--primary);
  color: var(--primary); font-size: 14px; font-weight: bold;
  border-radius: 24px; cursor: pointer; transition: all 0.2s;
}
.end-turn-btn:hover { background: linear-gradient(135deg, #3a3a8a, #2a2a6a); }

/* ============================================================
   バトル結果
   ============================================================ */
.result-screen {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 60vh; gap: 12px; text-align: center;
}
.result-icon { font-size: 72px; }
.result-title { font-size: 28px; font-weight: bold; }
.result-title.win { color: var(--gold); text-shadow: 0 0 20px rgba(255,215,0,0.6); }
.result-title.lose { color: #ff6060; }
.result-stage { font-size: 14px; color: var(--text-muted); }
.result-rewards {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px; width: 100%; max-width: 320px;
}
.rew-title { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.rew-item { font-size: 16px; padding: 4px 0; }
.result-hint { font-size: 14px; color: var(--text-muted); max-width: 260px; }
.result-btns { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 280px; }
.result-btn {
  padding: 14px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  border: none; color: #fff; font-size: 15px; font-weight: bold;
  cursor: pointer; transition: all 0.2s;
}
.result-btn.secondary {
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text);
}
.result-btn:hover { opacity: 0.9; transform: translateY(-1px); }

/* ============================================================
   ストーリー
   ============================================================ */
.story-list { display: flex; flex-direction: column; gap: 8px; }
.story-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px; cursor: pointer;
  transition: all 0.2s;
}
.story-item:hover:not(.locked) { background: var(--bg-card2); border-color: var(--primary); }
.story-item.locked { opacity: 0.5; cursor: default; }
.story-icon { font-size: 20px; min-width: 24px; }
.story-title { font-size: 14px; }
.story-title.unread { font-weight: bold; color: var(--primary); }
.story-arrow { color: var(--text-muted); margin-left: auto; }

.story-screen {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0; cursor: pointer; user-select: none;
}
.story-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center;
}
.story-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 70%);
}
.story-char {
  position: absolute; bottom: 180px; left: 50%; transform: translateX(-50%);
  height: 380px; object-fit: contain; z-index: 2;
}
.story-text-box {
  position: relative; z-index: 3; margin: 16px;
  background: rgba(7,7,26,0.9); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px;
  backdrop-filter: blur(8px);
  margin-bottom: 60px;
}
.story-speaker {
  font-size: 13px; font-weight: bold; color: var(--primary); margin-bottom: 6px;
}
.story-text { font-size: 15px; line-height: 1.8; }
.story-progress {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  font-size: 11px; color: rgba(255,255,255,0.5);
}
.story-tap-hint, .story-end-hint {
  position: absolute; bottom: 20px; right: 20px; z-index: 3;
  font-size: 11px; color: rgba(255,255,255,0.5); animation: blink 1.5s infinite;
}
@keyframes blink { 0%,100%{opacity:0.5} 50%{opacity:1} }

/* ============================================================
   ガチャ
   ============================================================ */
.gacha-screen { }
.gacha-banner {
  background: linear-gradient(135deg, #1a0a3a, #0a1a3a);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: center; margin-bottom: 16px;
}
.gacha-stars { font-size: 20px; margin-bottom: 6px; }
.gacha-name { font-size: 18px; font-weight: bold; color: var(--gold); margin-bottom: 4px; }
.gacha-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.gacha-rates { font-size: 11px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }

.gacha-currency {
  text-align: center; font-size: 14px; margin-bottom: 16px;
}
.currency-val { font-size: 20px; font-weight: bold; color: var(--gold); margin-left: 4px; }

.gacha-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.gacha-btn {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
  cursor: pointer; transition: all 0.2s; text-align: center;
}
.gacha-btn:hover { border-color: var(--primary); background: var(--bg-card2); }
.gacha-btn.ten { border-color: var(--gold); }
.gacha-btn-title { font-size: 18px; font-weight: bold; margin-bottom: 4px; }
.gacha-btn-cost { font-size: 13px; color: var(--gold); }
.gacha-btn-note { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

.gacha-single-result {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
  position: relative; overflow: hidden;
  animation: fadeInUp 0.4s ease;
}
.gr-flash {
  position: absolute; inset: 0; pointer-events: none;
  animation: flashPulse 0.6s ease;
}
@keyframes flashPulse { 0%{opacity:1} 100%{opacity:0} }
@keyframes fadeInUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:none} }
.gr-rarity { font-size: 22px; font-weight: bold; margin-bottom: 6px; }
.gr-attr { font-size: 16px; margin-bottom: 6px; }
.gr-name { font-size: 18px; font-weight: bold; margin-bottom: 8px; }
.gr-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.gr-remain { font-size: 13px; color: var(--text-muted); }

.gacha-ten-results {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px;
  animation: fadeInUp 0.4s ease;
}
.gt-card {
  background: var(--bg-card); border: 1px solid; border-radius: 8px;
  padding: 6px; text-align: center; position: relative;
}
.gt-card.highlight {
  box-shadow: 0 0 12px rgba(255,215,0,0.5);
  animation: sparkle 0.6s ease;
}
@keyframes sparkle { 0%{transform:scale(1.2)} 50%{transform:scale(0.95)} 100%{transform:scale(1)} }
.gt-rar { font-size: 9px; font-weight: bold; }
.gt-attr { font-size: 18px; }
.gt-name { font-size: 8px; color: var(--text-muted); margin-top: 2px; line-height: 1.2; }
.gt-new {
  position: absolute; top: -4px; right: -4px;
  background: var(--primary2); color: #fff; font-size: 8px; font-weight: bold;
  padding: 1px 4px; border-radius: 8px;
}

/* ============================================================
   ミッション
   ============================================================ */
.mission-list { display: flex; flex-direction: column; gap: 8px; }
.mission-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 14px;
}
.mission-item.done { opacity: 0.6; }
.mission-icon { font-size: 22px; }
.mission-info { flex: 1; }
.mission-title { font-size: 14px; font-weight: bold; }
.mission-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.mission-reward { font-size: 13px; color: var(--gold); }

/* ============================================================
   設定
   ============================================================ */
.setting-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.setting-item label { color: var(--text-muted); }
.setting-item select {
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); padding: 6px 10px; border-radius: 8px;
}
.danger-btn {
  background: rgba(255,60,60,0.1); border: 1px solid rgba(255,60,60,0.4);
  color: #ff6060; padding: 8px 16px; border-radius: 8px; cursor: pointer;
}
.danger-btn:hover { background: rgba(255,60,60,0.2); }

/* ============================================================
   スクロールバー
   ============================================================ */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ============================================================
   ホーム画面 v2（スクショ再現レイアウト）
   ============================================================ */
.home-screen-v2 {
  position: relative; width: 100%; min-height: calc(100vh - 64px);
  overflow: hidden; padding: 0; color: #fff;
}
.home-stage-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: saturate(0.9) brightness(0.85);
  z-index: 0;
}
.home-stage-overlay { position: absolute; inset: 0; z-index: 1; pointer-events: none; }

/* 上部バー：ランクバッジ + ロゴ + 攻略 */
.home-topbar {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 10px 12px 0;
}
.rank-badge {
  --accent: #c97aff;
  background: linear-gradient(150deg, rgba(255,255,255,0.07), rgba(0,0,0,0.35));
  border: 1px solid var(--accent);
  border-radius: 14px;
  padding: 6px 12px 7px;
  text-align: center;
  box-shadow: 0 0 14px var(--accent)55, inset 0 0 8px rgba(255,255,255,0.06);
  backdrop-filter: blur(4px);
  min-width: 76px;
}
.rank-badge-label {
  font-size: 8px; letter-spacing: 1.6px; color: #d8c4ff;
  font-weight: 700;
}
.rank-badge-tier {
  font-size: 28px; font-weight: 900; line-height: 1;
  color: var(--accent); text-shadow: 0 0 8px var(--accent)cc;
  font-family: 'Impact','Arial Black',sans-serif; letter-spacing: 0;
}
.rank-num { font-size: 18px; margin-left: 2px; color: #fff; }
.home-logo-area {
  text-align: right; line-height: 1;
}
.home-logo-main {
  font-size: 19px; font-weight: 900; letter-spacing: 2px;
  background: linear-gradient(180deg,#fff,#c97aff);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  font-style: italic;
}
.home-logo-sub {
  font-size: 22px; font-weight: 900; letter-spacing: 1px;
  margin-top: 2px;
  text-shadow: 0 0 10px rgba(201,122,255,0.55);
}
.home-guide-btn {
  margin-top: 5px;
  background: linear-gradient(180deg,#ff6fc8,#c97aff);
  border: none; color: #fff; padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  box-shadow: 0 0 8px #c97aff77;
  cursor: pointer;
}

/* 通貨チップ */
.home-currency-row {
  position: relative; z-index: 3;
  display: flex; gap: 6px; justify-content: flex-end;
  padding: 8px 12px 0;
}
.cur-chip {
  background: rgba(7,7,26,0.7);
  border: 1px solid rgba(201,122,255,0.4);
  border-radius: 999px;
  padding: 3px 10px 3px 6px;
  font-size: 11px; color: #e8d8ff;
  display: flex; align-items: center; gap: 4px;
}
.cur-chip b { font-size: 13px; color: #fff; font-weight: 700; }
.cur-chip-gold { border-color: rgba(255,215,0,0.55); }
.cur-chip-gold b { color: var(--gold); }

/* 中央メインキャラ */
.home-main-stage {
  position: relative; z-index: 2;
  height: 56vh; min-height: 380px;
  display: flex; align-items: flex-end; justify-content: center;
}
.home-char-frame {
  --accent: #c97aff;
  position: relative; width: 78%; height: 100%;
  display: flex; align-items: flex-end; justify-content: center;
}
.home-main-img {
  max-height: 100%; max-width: 100%; object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(0,0,0,0.6));
}
.home-main-placeholder {
  width: 240px; height: 320px; border-radius: 24px;
  border: 1px solid var(--accent);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  box-shadow: 0 0 28px var(--accent)55, inset 0 0 30px rgba(0,0,0,0.4);
}
.ph-attr-icon { font-size: 92px; filter: drop-shadow(0 0 14px rgba(255,255,255,0.4)); }
.ph-attr-name { font-size: 22px; font-weight: 800; letter-spacing: 1px; color: #fff; }
.ph-attr-tag { font-size: 12px; letter-spacing: 2px; }

/* セリフバブル */
.home-speech-bubble {
  position: absolute; left: 12px; top: 28%;
  max-width: 56%;
  background: rgba(255,255,255,0.95);
  color: #2a1a3a;
  border-radius: 14px;
  padding: 8px 12px 10px;
  font-size: 12px; line-height: 1.5;
  box-shadow: 0 4px 16px rgba(0,0,0,0.35);
  z-index: 4;
}
.speech-tail {
  position: absolute; right: -10px; top: 18px;
  width: 0; height: 0;
  border: 6px solid transparent;
  border-right: 0;
  border-left: 10px solid #fff;
}
.speech-name-tag { font-size: 10px; font-weight: 800; letter-spacing: 1px; margin-bottom: 3px; }
.speech-body { font-weight: 600; }

/* 右縦アイコン */
.home-side-icons {
  position: absolute; right: 6px; top: 6px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 4;
}
.side-icon {
  position: relative;
  width: 52px; padding: 6px 0 5px;
  background: rgba(7,7,26,0.75);
  border: 1px solid rgba(201,122,255,0.5);
  border-radius: 12px;
  color: #fff; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  box-shadow: 0 0 10px rgba(201,122,255,0.25);
}
.side-icon:active { transform: scale(0.95); }
.side-icon-emoji { font-size: 22px; }
.side-icon-label { font-size: 9px; letter-spacing: 0.5px; color: #d8c4ff; }
.side-icon-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ff3366; color: #fff;
  font-size: 8px; font-weight: 800;
  padding: 1px 5px; border-radius: 999px;
  box-shadow: 0 0 8px #ff336688;
}

/* 下段アクション */
.home-action-deck {
  position: relative; z-index: 3;
  display: flex; align-items: flex-end; gap: 8px;
  padding: 0 10px 12px;
  margin-top: -8px;
}
.home-mini-roster {
  flex: 1; min-width: 0;
  background: linear-gradient(180deg, rgba(20,10,40,0.85), rgba(7,7,26,0.95));
  border: 1px solid rgba(201,122,255,0.4);
  border-radius: 14px;
  padding: 8px 8px 10px;
}
.mini-roster-row {
  display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px;
}
.mini-roster-row::-webkit-scrollbar { display: none; }
.home-mini-avatar {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  background: rgba(7,7,26,0.8);
  border: 1.5px solid #c97aff;
  border-radius: 10px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2px;
}
.mini-avatar-icon { font-size: 18px; line-height: 1; }
.mini-avatar-name { font-size: 7px; color: #c8b8ff; margin-top: 2px; text-overflow: ellipsis; overflow: hidden; max-width: 100%; }
.mini-sub-actions { display: flex; gap: 6px; margin-top: 6px; }
.sub-action-btn {
  position: relative;
  flex: 1;
  background: linear-gradient(180deg, #ff6fc8, #c97aff);
  border: none; color: #fff;
  padding: 6px 4px; border-radius: 10px;
  font-size: 11px; font-weight: 800; letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(201,122,255,0.5);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.sub-action-btn span { font-size: 14px; }
.sub-action-btn .new-dot {
  position: absolute; top: -6px; right: -4px;
  background: #ff3366; color: #fff;
  font-size: 8px; font-weight: 800; font-style: normal;
  padding: 1px 5px; border-radius: 999px;
  box-shadow: 0 0 8px #ff336688;
}

/* ライブ大円ボタン */
.home-live-orb-wrap {
  flex: 0 0 auto;
}
.home-live-orb {
  --accent: #ff6fc8;
  width: 116px; height: 116px;
  border-radius: 50%;
  border: 3px solid #fff;
  background:
    radial-gradient(circle at 50% 35%, #fff 0%, var(--accent) 35%, #6a1a9a 85%);
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  cursor: pointer;
  box-shadow:
    0 0 24px var(--accent)cc,
    0 0 48px var(--accent)55,
    inset 0 4px 12px rgba(255,255,255,0.4),
    inset 0 -8px 18px rgba(0,0,0,0.35);
  animation: liveOrbPulse 2.2s ease-in-out infinite;
}
.home-live-orb:active { transform: scale(0.96); }
.orb-mic { font-size: 38px; filter: drop-shadow(0 0 6px rgba(0,0,0,0.5)); }
.orb-label { font-size: 18px; font-weight: 900; letter-spacing: 2px; text-shadow: 0 1px 3px rgba(0,0,0,0.6); }
.orb-sub { font-size: 8px; letter-spacing: 2px; color: #fff; opacity: 0.85; }
@keyframes liveOrbPulse {
  0%,100% { box-shadow: 0 0 24px var(--accent)cc, 0 0 48px var(--accent)55, inset 0 4px 12px rgba(255,255,255,0.4), inset 0 -8px 18px rgba(0,0,0,0.35); }
  50%     { box-shadow: 0 0 32px var(--accent)ff, 0 0 72px var(--accent)88, inset 0 4px 12px rgba(255,255,255,0.5), inset 0 -8px 18px rgba(0,0,0,0.35); }
}

/* ホームナビ強調 */
.nav-item.nav-home {
  position: relative;
}
.nav-item.nav-home .nav-icon {
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(201,122,255,0.7));
}

/* レスポンシブ（狭幅） */
@media (max-width: 360px) {
  .home-live-orb { width: 100px; height: 100px; }
  .orb-mic { font-size: 32px; }
  .orb-label { font-size: 15px; }
  .home-main-stage { height: 50vh; min-height: 320px; }
}

/* ============================================================
   育成タブ（編成/レッスン）
   ============================================================ */
.lesson-tabs {
  display: flex; gap: 6px; padding: 8px 12px 0;
}
.lesson-tab {
  flex: 1; background: rgba(20,10,40,0.8);
  border: 1px solid rgba(201,122,255,0.35); color: #c8b8ff;
  padding: 9px 6px; border-radius: 12px 12px 0 0;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: all .15s;
}
.lesson-tab.active {
  background: linear-gradient(180deg, #c97aff, #6a1a9a);
  color: #fff; border-color: #c97aff;
  box-shadow: 0 0 10px rgba(201,122,255,0.5);
}
.lesson-desc {
  font-size: 11px; color: var(--text-muted);
  padding: 8px 12px 4px;
  line-height: 1.5;
}
.lesson-list { padding: 4px 10px 80px; display: flex; flex-direction: column; gap: 6px; }
.lesson-row {
  display: flex; align-items: center; gap: 8px;
  background: rgba(20,10,40,0.7);
  border-left-width: 3px; border-left-style: solid;
  border-radius: 8px;
  padding: 8px 8px 8px 10px;
}
.lesson-row-main { flex: 1; min-width: 0; }
.lesson-row-name {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lesson-row-name b { font-weight: 700; color: #fff; }
.lesson-row-meta { font-size: 10px; color: var(--text-muted); margin-top: 3px; letter-spacing: 0.5px; }
.lesson-do-btn {
  flex: 0 0 auto;
  min-width: 64px;
  background: linear-gradient(180deg, #ff6fc8, #c97aff);
  border: none; color: #fff;
  padding: 6px 8px; border-radius: 10px;
  font-size: 12px; font-weight: 800; line-height: 1.1;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 6px rgba(201,122,255,0.4);
}
.lesson-do-btn:active { transform: scale(0.95); }
.lesson-do-btn.maxed {
  background: linear-gradient(180deg, #ffd700, #c98a00);
  cursor: default; color: #2a1a00;
}
.lesson-do-btn.disabled {
  background: #3a2a55; color: #88779b;
  box-shadow: none;
}
.lesson-cost { font-size: 10px; font-weight: 700; color: #ffe4b5; }
.card-lv-pill {
  display: inline-block;
  font-style: normal; font-size: 9px; font-weight: 800;
  background: rgba(255,215,0,0.15);
  color: #ffd700;
  border: 1px solid rgba(255,215,0,0.4);
  border-radius: 999px;
  padding: 1px 6px;
  margin-left: 4px;
  letter-spacing: 0.5px;
}

/* ============================================================
   s006 グランドフィナーレ・クリア演出
   ============================================================ */
.result-screen.finale-clear {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(255,215,0,0.18) 0%, transparent 60%),
    radial-gradient(ellipse at 50% 80%, rgba(255,111,200,0.18) 0%, transparent 65%),
    linear-gradient(180deg, #0a0030 0%, #1a0030 50%, #07071a 100%);
}
.finale-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.08) 0%, transparent 8%),
    radial-gradient(circle at 80% 30%, rgba(255,215,0,0.1) 0%, transparent 10%),
    radial-gradient(circle at 30% 75%, rgba(201,122,255,0.12) 0%, transparent 12%),
    radial-gradient(circle at 75% 85%, rgba(255,111,200,0.1) 0%, transparent 10%);
  animation: finaleBgPulse 4s ease-in-out infinite;
  z-index: 0;
}
@keyframes finaleBgPulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}
.finale-badge {
  position: relative; z-index: 2;
  margin-top: 14px;
  font-size: 11px; font-weight: 900; letter-spacing: 4px;
  color: #ffd700;
  text-shadow: 0 0 14px rgba(255,215,0,0.7);
  animation: finaleBadgeFade 1.2s ease-out;
}
@keyframes finaleBadgeFade {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.finale-sparkles {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
}
.finale-sparkles span {
  position: absolute;
  color: #fff; font-size: 18px;
  text-shadow: 0 0 8px rgba(255,255,255,0.8);
  animation: finaleSparkle 2.4s ease-in-out infinite;
}
.finale-sparkles span:nth-child(1) { top: 18%; left: 12%; animation-delay: 0s; }
.finale-sparkles span:nth-child(2) { top: 24%; right: 14%; animation-delay: 0.4s; }
.finale-sparkles span:nth-child(3) { top: 50%; left: 6%;  animation-delay: 0.8s; color: #ffd700; }
.finale-sparkles span:nth-child(4) { top: 56%; right: 8%; animation-delay: 1.2s; color: #ff6fc8; }
.finale-sparkles span:nth-child(5) { bottom: 22%; left: 18%; animation-delay: 1.6s; }
.finale-sparkles span:nth-child(6) { bottom: 18%; right: 16%; animation-delay: 2.0s; color: #c97aff; }
@keyframes finaleSparkle {
  0%, 100% { opacity: 0; transform: scale(0.7) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1.2) rotate(180deg); }
}
.result-title.finale {
  font-size: 22px;
  background: linear-gradient(90deg, #ffd700, #ff6fc8, #c97aff);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  letter-spacing: 1.5px;
  animation: finaleTitleGlow 2.6s ease-in-out infinite;
}
@keyframes finaleTitleGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(255,215,0,0.4)); }
  50%      { filter: drop-shadow(0 0 14px rgba(255,111,200,0.7)); }
}
.finale-message {
  position: relative; z-index: 2;
  margin: 14px 24px 8px;
  padding: 14px 16px;
  background: rgba(7,7,26,0.6);
  border: 1px solid rgba(255,215,0,0.35);
  border-radius: 12px;
  font-size: 13px; line-height: 1.7;
  color: #ffe9c2;
  text-align: center;
  box-shadow: 0 0 16px rgba(255,215,0,0.15);
}
.finale-message-sub {
  display: block; margin-top: 8px;
  font-size: 11px; color: #c8b8ff;
  letter-spacing: 1px;
}

/* ============================================================
   タイトル画面（OP）
   ============================================================ */
.title-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, #1a0d3a 0%, #07071a 70%);
  padding-bottom: 40px;
}

/* 星空背景 */
.title-starfield {
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20% 30%, #ffffff88, transparent),
    radial-gradient(1px 1px at 40% 70%, #ffd70066, transparent),
    radial-gradient(2px 2px at 60% 20%, #c97aff55, transparent),
    radial-gradient(1px 1px at 80% 50%, #ffffffaa, transparent),
    radial-gradient(1.5px 1.5px at 10% 80%, #ff6fc855, transparent),
    radial-gradient(1px 1px at 90% 90%, #ffd70077, transparent),
    radial-gradient(2px 2px at 30% 50%, #ffffff66, transparent),
    radial-gradient(1px 1px at 70% 40%, #c97aff77, transparent);
  background-size: 600px 600px;
  animation: starDrift 60s linear infinite;
}
.title-starfield-2 {
  background-size: 400px 400px;
  opacity: 0.5;
  animation-duration: 90s;
  animation-direction: reverse;
}
@keyframes starDrift {
  from { transform: translateY(0); }
  to   { transform: translateY(-600px); }
}

/* ライトビーム */
.title-beam {
  position: absolute;
  width: 60px;
  height: 100vh;
  top: 0;
  background: linear-gradient(180deg, transparent, #c97aff44 30%, #ff6fc844 60%, transparent);
  filter: blur(10px);
  transform-origin: top;
  pointer-events: none;
  animation: beamSway 8s ease-in-out infinite;
}
.title-beam-1 { left: 20%; animation-delay: 0s; transform: rotate(-15deg); }
.title-beam-2 { left: 50%; animation-delay: 2s; transform: rotate(0deg); }
.title-beam-3 { left: 75%; animation-delay: 4s; transform: rotate(15deg); }
@keyframes beamSway {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.7; }
}

/* 5人シルエット */
.title-silhouettes {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 55vh;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 2;
  pointer-events: none;
}
.title-silhouette {
  flex: 1;
  max-width: 100px;
  height: 100%;
  opacity: 0;
  animation: silhouetteIn 1.2s ease-out forwards;
  position: relative;
  margin: 0 -10px;
}
.title-silhouette img {
  position: absolute;
  bottom: -10%;
  left: 50%;
  transform: translateX(-50%);
  height: 90%;
  width: auto;
  filter: brightness(0) drop-shadow(0 0 20px #c97affaa);
  opacity: 0.85;
}
.title-silhouette-1 img { filter: brightness(0.15) drop-shadow(0 0 18px #ffd70088); }
.title-silhouette-2 img { filter: brightness(0.15) drop-shadow(0 0 18px #4a90e288); }
.title-silhouette-3 img { filter: brightness(0.15) drop-shadow(0 0 18px #ff9bc488); }
.title-silhouette-4 img { filter: brightness(0.15) drop-shadow(0 0 18px #ff603088); }
.title-silhouette-5 img { filter: brightness(0.15) drop-shadow(0 0 18px #ff9bc488); }
@keyframes silhouetteIn {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* オーバーレイ */
.title-overlay-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(7,7,26,0.3) 0%,
    rgba(7,7,26,0.6) 40%,
    rgba(7,7,26,0.95) 100%);
  z-index: 3;
  pointer-events: none;
}

/* ロゴ */
.title-logo-wrap {
  position: relative;
  z-index: 10;
  padding: 60px 20px 16px;
  text-align: center;
  animation: logoFadeIn 1.6s 0.2s ease-out both;
}
@keyframes logoFadeIn {
  from { opacity: 0; transform: translateY(-30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.title-logo-main {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 6px;
  background: linear-gradient(135deg, #fff7e0 0%, #ffd700 30%, #ff6fc8 65%, #c97aff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(255,111,200,0.5));
  line-height: 1;
  animation: shimmerFlow 6s linear infinite;
  background-size: 200% 200%;
}
@keyframes shimmerFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.title-logo-sub {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: 4px;
  color: #fff;
  margin-top: 4px;
  filter: drop-shadow(0 0 16px rgba(201,122,255,0.6));
}
.title-logo-accent {
  background: linear-gradient(135deg, #ff6fc8, #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title-logo-sub-jp {
  font-size: 12px;
  letter-spacing: 6px;
  color: #c8b8ff;
  margin-top: 10px;
  opacity: 0.8;
}

/* キャッチコピー */
.title-tagline {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: 22vh;
  animation: taglineFadeIn 1.4s 1.4s ease-out both;
}
@keyframes taglineFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.title-tagline-main {
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(0,0,0,0.8), 0 0 24px rgba(201,122,255,0.5);
  line-height: 1.7;
}
.title-tagline-sub {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 4px;
  color: #ffd700;
  opacity: 0.9;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

/* スタートボタン */
.title-cta-wrap {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: 40px;
  opacity: 0;
  animation: ctaFadeIn 1s 2.2s ease-out forwards;
}
@keyframes ctaFadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
.title-cta-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 60px;
  background: linear-gradient(135deg, #c97aff, #ff6fc8);
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 4px;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(255,255,255,0.3);
  position: relative;
  z-index: 20;
  box-shadow:
    0 0 30px rgba(255,111,200,0.6),
    0 0 60px rgba(201,122,255,0.4),
    inset 0 1px 0 rgba(255,255,255,0.5);
  animation: ctaPulse 2.4s ease-in-out infinite;
  transition: transform 0.15s;
}
.title-cta-btn:active { transform: scale(0.96); }
.title-cta-btn.is-first {
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  box-shadow:
    0 0 30px rgba(255,215,0,0.7),
    0 0 60px rgba(255,111,200,0.5),
    inset 0 1px 0 rgba(255,255,255,0.5);
}
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 0 30px rgba(255,111,200,0.6), 0 0 60px rgba(201,122,255,0.4); }
  50%      { box-shadow: 0 0 50px rgba(255,111,200,0.9), 0 0 90px rgba(201,122,255,0.7); }
}
.title-cta-icon { font-size: 14px; }
.title-cta-label { font-size: 18px; }
.title-cta-sub {
  font-size: 10px;
  letter-spacing: 2px;
  opacity: 0.85;
  margin-top: 2px;
}

/* フッター */
.title-footer {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: 30px;
  font-size: 10px;
  color: #6666a0;
  letter-spacing: 2px;
}

/* ============================================================
   オンボーディング画面
   ============================================================ */
.ob-screen {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(180deg, #0d0625 0%, #1a0d3a 50%, #07071a 100%);
  overflow-x: hidden;
}
.ob-bg {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 30% 20%, #ffffff66, transparent),
    radial-gradient(1px 1px at 70% 50%, #ffd70066, transparent),
    radial-gradient(2px 2px at 20% 80%, #c97aff66, transparent);
  background-size: 500px 500px;
  animation: starDrift 80s linear infinite;
  opacity: 0.6;
}
.ob-content {
  position: relative;
  z-index: 2;
  padding: 40px 24px 60px;
  animation: obFadeIn 0.6s ease-out;
}
.ob-content-wide { padding: 30px 16px 60px; }
@keyframes obFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ob-step-tag {
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #c97aff44, #ff6fc844);
  border: 1px solid #c97aff;
  border-radius: 999px;
  color: #ffd9f0;
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 700;
}
.ob-headline {
  margin-top: 16px;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.4;
  color: #fff;
  text-shadow: 0 0 14px rgba(201,122,255,0.4);
}
.ob-lead {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.9;
  color: #c8b8ff;
}
.ob-lead-accent {
  color: #ffd700;
  font-weight: 700;
}

/* 入力欄 */
.ob-input-wrap {
  margin-top: 28px;
  padding: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,122,255,0.3);
  border-radius: 14px;
}
.ob-label {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  color: #c8b8ff;
  margin-bottom: 8px;
}
.ob-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(7,7,26,0.6);
  border: 1px solid rgba(201,122,255,0.5);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ob-input:focus {
  border-color: #ff6fc8;
  box-shadow: 0 0 0 3px rgba(255,111,200,0.2);
}
.ob-hint {
  margin-top: 8px;
  font-size: 11px;
  color: #7878aa;
}

/* 次へボタン */
.ob-next-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  margin-top: 32px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #c97aff, #ff6fc8);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 3px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255,111,200,0.4);
  transition: transform 0.15s, box-shadow 0.2s;
}
.ob-next-btn:active { transform: scale(0.97); }
.ob-next-btn:hover { box-shadow: 0 0 36px rgba(255,111,200,0.6); }
.ob-arrow { font-size: 20px; }

/* キャラ選択 */
.ob-char-list {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.ob-char-card {
  position: relative;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.3));
  border: 2px solid;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.ob-char-card:active { transform: scale(0.97); }
.ob-char-card:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 0 24px var(--accent);
}
.ob-char-num {
  position: absolute;
  top: 8px; left: 8px;
  font-size: 10px;
  letter-spacing: 2px;
  color: #ffffff77;
  font-weight: 700;
}
.ob-char-attr {
  position: absolute;
  top: 8px; right: 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}
.ob-char-img-wrap {
  height: 140px;
  margin: 14px -12px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.ob-char-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 90%, var(--accent) 0%, transparent 50%);
  opacity: 0.4;
  pointer-events: none;
}
.ob-char-img-wrap img {
  height: 130%;
  width: auto;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.5));
  position: relative;
  z-index: 1;
}
.ob-char-name {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  text-align: center;
  margin-top: 6px;
}
.ob-char-role {
  font-size: 11px;
  color: #c8b8ff;
  text-align: center;
  margin-top: 2px;
}
.ob-char-catch {
  margin-top: 8px;
  padding: 6px 8px;
  background: rgba(7,7,26,0.5);
  border-radius: 8px;
  font-size: 11px;
  color: #ffd9f0;
  text-align: center;
  font-style: italic;
  line-height: 1.4;
}
.ob-char-theme {
  margin-top: 6px;
  font-size: 10px;
}
.ob-char-theme span {
  display: block;
  font-size: 9px;
  letter-spacing: 1px;
  font-weight: 700;
  opacity: 0.8;
}
.ob-char-theme p {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.4;
  color: #e8e8ff;
}

/* SSR演出画面 */
.ob-ssr-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0;
  background: #000;
}
.ssr-stage {
  position: relative;
  width: 100%;
  height: 80vh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 50%, var(--accent) 0%, #0a0030 60%, #000 100%);
}
.ssr-rays {
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg,
    transparent 0deg, #ffd700aa 10deg, transparent 20deg,
    transparent 40deg, #ffd700aa 50deg, transparent 60deg,
    transparent 80deg, #ffd700aa 90deg, transparent 100deg,
    transparent 120deg, #ffd700aa 130deg, transparent 140deg,
    transparent 160deg, #ffd700aa 170deg, transparent 180deg,
    transparent 200deg, #ffd700aa 210deg, transparent 220deg,
    transparent 240deg, #ffd700aa 250deg, transparent 260deg,
    transparent 280deg, #ffd700aa 290deg, transparent 300deg,
    transparent 320deg, #ffd700aa 330deg, transparent 340deg);
  animation: rayBurst 12s linear infinite;
  mix-blend-mode: screen;
  opacity: 0.5;
  filter: blur(2px);
}
@keyframes rayBurst {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.ssr-burst {
  position: absolute;
  inset: 30% 30% 30% 30%;
  background: radial-gradient(circle, #fff 0%, var(--accent) 30%, transparent 70%);
  animation: burstScale 3s ease-out forwards;
  filter: blur(20px);
}
@keyframes burstScale {
  0%   { transform: scale(0); opacity: 1; }
  60%  { transform: scale(2); opacity: 0.5; }
  100% { transform: scale(3); opacity: 0; }
}
.ssr-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  animation: flashOut 1.5s ease-out forwards;
}
@keyframes flashOut {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}
.ssr-char-wrap {
  position: relative;
  z-index: 5;
  height: 95%;
  display: flex;
  align-items: flex-end;
  animation: ssrCharIn 1.6s 0.8s ease-out both;
}
@keyframes ssrCharIn {
  from { opacity: 0; transform: translateY(60px) scale(0.7); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.ssr-char-img {
  height: 100%;
  width: auto;
  filter: drop-shadow(0 0 40px var(--accent)) drop-shadow(0 0 80px #ffd70088);
}
.ssr-info {
  position: absolute;
  bottom: 30px;
  left: 0; right: 0;
  text-align: center;
  z-index: 6;
  animation: ssrInfoIn 0.8s 2s ease-out both;
}
@keyframes ssrInfoIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ssr-rarity {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #ffd700;
  text-shadow: 0 0 12px #ffd700, 0 0 24px #ff6fc8;
}
.ssr-cardname {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 16px var(--accent);
  letter-spacing: 2px;
}
.ssr-charname {
  margin-top: 6px;
  font-size: 14px;
  color: #ffd9f0;
  letter-spacing: 3px;
}
.ssr-attr {
  margin-top: 6px;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
}
.ob-next-btn-ssr {
  margin: 16px 24px 24px;
  width: calc(100% - 48px);
  animation: ssrInfoIn 0.6s 2.5s ease-out both;
}

/* 最終画面 */
.ob-final-screen .ob-content { text-align: center; }
.ob-final-img-wrap {
  margin: 20px auto 14px;
  width: 180px;
  height: 240px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.ob-final-img-wrap::before {
  content: '';
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.4;
  animation: ctaPulse 3s ease-in-out infinite;
}
.ob-final-img-wrap img {
  height: 100%;
  width: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.5));
  position: relative;
  z-index: 1;
}
.ob-rewards {
  margin: 24px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ob-reward-item {
  padding: 14px 6px;
  background: linear-gradient(180deg, rgba(255,215,0,0.12), rgba(255,111,200,0.06));
  border: 1px solid rgba(255,215,0,0.35);
  border-radius: 12px;
  text-align: center;
}
.ob-reward-icon {
  display: block;
  font-size: 22px;
  margin-bottom: 4px;
}
.ob-reward-item b {
  display: block;
  font-size: 18px;
  color: #ffd700;
  font-weight: 800;
}
.ob-reward-item span {
  display: block;
  font-size: 9px;
  color: #c8b8ff;
  letter-spacing: 1px;
  margin-top: 2px;
}
.ob-next-btn-final {
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  box-shadow: 0 0 30px rgba(255,215,0,0.5);
}

/* ============================================================
   ホーム画面: 次にやること CTA
   ============================================================ */
.next-action-card {
  position: relative;
  z-index: 2;
  margin: 10px 16px 0;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(201,122,255,0.18), rgba(255,111,200,0.15));
  border: 1px solid #c97aff;
  border-radius: 14px;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 0 18px rgba(201,122,255,0.35);
  animation: nextActionGlow 2.8s ease-in-out infinite;
  transition: transform 0.15s;
}
.next-action-card:active { transform: scale(0.98); }
@keyframes nextActionGlow {
  0%, 100% { box-shadow: 0 0 14px rgba(201,122,255,0.3); }
  50%      { box-shadow: 0 0 28px rgba(255,111,200,0.6); }
}
.next-action-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 0% 50%, rgba(255,215,0,0.15) 0%, transparent 60%);
  pointer-events: none;
}
.next-action-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: linear-gradient(135deg, #c97aff, #ff6fc8);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(255,111,200,0.4), inset 0 1px 0 rgba(255,255,255,0.3);
}
.next-action-body {
  flex: 1;
  min-width: 0;
}
.next-action-tag {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffd700;
  text-shadow: 0 0 6px rgba(255,215,0,0.4);
}
.next-action-title {
  margin-top: 2px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-action-arrow {
  font-size: 14px;
  color: #ff6fc8;
  animation: arrowSlide 1.4s ease-in-out infinite;
}
@keyframes arrowSlide {
  0%, 100% { transform: translateX(0); }
  50%      { transform: translateX(4px); }
}

/* ============================================================
   ガチャ ドラマチック演出
   ============================================================ */
.gacha-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  overflow: hidden;
  cursor: pointer;
  animation: gachaOverlayIn 0.3s ease-out;
}
.gacha-overlay.fading { animation: gachaOverlayOut 0.4s ease-in forwards; }
@keyframes gachaOverlayIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes gachaOverlayOut { to   { opacity: 0; } }

.gacha-overlay-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%, var(--accent) 0%, #1a0030 40%, #000 80%);
  animation: gachaBgPulse 3s ease-in-out infinite;
}
@keyframes gachaBgPulse {
  0%, 100% { filter: brightness(0.8); }
  50%      { filter: brightness(1.2); }
}

.gacha-overlay-rays {
  position: absolute;
  inset: -50%;
  background: conic-gradient(from 0deg,
    transparent 0deg, var(--accent) 8deg, transparent 16deg,
    transparent 28deg, var(--accent) 36deg, transparent 44deg,
    transparent 56deg, var(--accent) 64deg, transparent 72deg,
    transparent 84deg, var(--accent) 92deg, transparent 100deg,
    transparent 112deg, var(--accent) 120deg, transparent 128deg,
    transparent 140deg, var(--accent) 148deg, transparent 156deg,
    transparent 168deg, var(--accent) 176deg, transparent 184deg,
    transparent 196deg, var(--accent) 204deg, transparent 212deg,
    transparent 224deg, var(--accent) 232deg, transparent 240deg,
    transparent 252deg, var(--accent) 260deg, transparent 268deg,
    transparent 280deg, var(--accent) 288deg, transparent 296deg,
    transparent 308deg, var(--accent) 316deg, transparent 324deg,
    transparent 336deg, var(--accent) 344deg, transparent 352deg);
  animation: gachaRaysSpin 10s linear infinite;
  mix-blend-mode: screen;
  opacity: 0.4;
  filter: blur(3px);
}
@keyframes gachaRaysSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.gacha-overlay-burst {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, #fff 0%, var(--accent) 25%, transparent 60%);
  animation: gachaBurst 1.6s ease-out forwards;
  filter: blur(30px);
  mix-blend-mode: screen;
}
@keyframes gachaBurst {
  0%   { transform: scale(0); opacity: 1; }
  50%  { transform: scale(2); opacity: 0.8; }
  100% { transform: scale(4); opacity: 0; }
}

.gacha-overlay-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  animation: gachaFlash 1.2s ease-out forwards;
}
@keyframes gachaFlash {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  60%  { opacity: 0.5; }
  100% { opacity: 0; }
}

.gacha-overlay-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 80px;
  z-index: 5;
}
.gacha-overlay-char {
  height: 65vh;
  width: auto;
  filter: drop-shadow(0 0 40px var(--accent)) drop-shadow(0 0 80px #ffd70066);
  animation: gachaCharIn 1.4s 0.8s ease-out both;
}
@keyframes gachaCharIn {
  from { opacity: 0; transform: translateY(60px) scale(0.7); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.gacha-overlay-info {
  margin-top: 16px;
  text-align: center;
  animation: gachaInfoIn 0.8s 2s ease-out both;
}
@keyframes gachaInfoIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.gacha-overlay-rarity {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 6px;
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent), 0 0 32px #ffd700;
}
.gacha-overlay-cardname {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
  text-shadow: 0 0 18px var(--accent);
}
.gacha-overlay-charname {
  margin-top: 6px;
  font-size: 14px;
  color: #ffd9f0;
  letter-spacing: 4px;
}
.gacha-overlay-new {
  margin-top: 10px;
  display: inline-block;
  padding: 4px 14px;
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 3px;
  animation: newBounce 1.2s ease-in-out infinite;
}
@keyframes newBounce {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.1); }
}
.gacha-overlay-skip {
  position: absolute;
  bottom: 24px; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  padding: 8px 20px;
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
  cursor: pointer;
  letter-spacing: 2px;
  animation: gachaInfoIn 0.6s 3s ease-out both;
}

/* 短縮版（N/R用） */
.gacha-overlay-quick {
  background: transparent;
  pointer-events: none;
}
.gacha-quick-flash {
  position: absolute;
  inset: 0;
  animation: gachaQuickFlash 0.6s ease-out forwards;
}
@keyframes gachaQuickFlash {
  0%   { opacity: 0; transform: scale(0.5); }
  40%  { opacity: 1; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(2); }
}

/* ============================================================
   バトル画面V2 — ライブ感UP
   ============================================================ */
.battle-stage-screen {
  position: relative;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
}
.battle-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.5) saturate(1.2);
  z-index: 0;
}
.battle-bg-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7,7,26,0.3) 0%, transparent 30%, rgba(7,7,26,0.85) 80%, rgba(7,7,26,0.95) 100%);
  z-index: 1;
}

/* スポットライト */
.battle-spotlight {
  position: absolute;
  width: 220px;
  height: 100vh;
  top: 0;
  background: linear-gradient(180deg, transparent, var(--accent) 30%, transparent 80%);
  filter: blur(40px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 2;
  mix-blend-mode: screen;
  transform-origin: top;
}
.battle-spotlight-1 {
  left: 15%;
  animation: spotlightSwing1 7s ease-in-out infinite;
}
.battle-spotlight-2 {
  right: 15%;
  animation: spotlightSwing2 9s ease-in-out infinite;
}
@keyframes spotlightSwing1 {
  0%, 100% { transform: rotate(-12deg); opacity: 0.3; }
  50%      { transform: rotate(8deg); opacity: 0.5; }
}
@keyframes spotlightSwing2 {
  0%, 100% { transform: rotate(12deg); opacity: 0.3; }
  50%      { transform: rotate(-8deg); opacity: 0.5; }
}

/* 音符パーティクル */
.battle-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.note-particle {
  position: absolute;
  font-size: 18px;
  color: rgba(255,215,0,0.6);
  text-shadow: 0 0 8px rgba(255,111,200,0.5);
  animation: noteFloat 8s linear infinite;
  opacity: 0;
}
.note-particle:nth-child(1) { left: 10%;  animation-delay: 0s;    }
.note-particle:nth-child(2) { left: 25%;  animation-delay: 1s;    }
.note-particle:nth-child(3) { left: 40%;  animation-delay: 2s;    }
.note-particle:nth-child(4) { left: 55%;  animation-delay: 3s;    }
.note-particle:nth-child(5) { left: 70%;  animation-delay: 4s;    }
.note-particle:nth-child(6) { left: 85%;  animation-delay: 5s;    }
.note-particle:nth-child(7) { left: 30%;  animation-delay: 6s;    }
.note-particle:nth-child(8) { left: 65%;  animation-delay: 7s;    }
@keyframes noteFloat {
  0%   { transform: translateY(100vh) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.7; }
  90%  { opacity: 0.7; }
  100% { transform: translateY(-10vh) translateX(30px) rotate(360deg); opacity: 0; }
}

/* 上部HUD */
.battle-top-bar-v2 {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  background: linear-gradient(180deg, rgba(7,7,26,0.85), transparent);
}
.bt-turn-v2 {
  display: flex;
  align-items: baseline;
  gap: 4px;
  background: rgba(0,0,0,0.5);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,215,0,0.4);
  font-size: 11px;
  color: #c8b8ff;
  letter-spacing: 1px;
}
.bt-turn-v2 b {
  font-size: 18px;
  color: #ffd700;
  font-weight: 800;
  text-shadow: 0 0 6px rgba(255,215,0,0.6);
}
.bt-stage-v2 {
  font-size: 12px;
  color: #fff;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

/* 敵セクションV2 */
.enemy-section-v2 {
  position: relative;
  z-index: 10;
  padding: 8px 16px;
}
.enemy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(74,0,128,0.4);
  border: 1px solid rgba(155,89,182,0.5);
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
.enemy-icon-v2 {
  font-size: 32px;
  filter: drop-shadow(0 0 12px rgba(155,89,182,0.8));
  animation: enemyPulse 2.4s ease-in-out infinite;
}
@keyframes enemyPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}
.enemy-info { flex: 1; }
.enemy-name-v2 {
  font-size: 12px;
  color: #d8c8ff;
  font-weight: 700;
  margin-bottom: 4px;
}
.gauge-v2 {
  position: relative;
  height: 16px;
  background: rgba(0,0,0,0.6);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15);
}
.gauge-v2-fill {
  height: 100%;
  background: linear-gradient(90deg, #9b59b6, #4a0080);
  transition: width 0.5s cubic-bezier(.2,.8,.2,1);
  box-shadow: inset 0 0 8px rgba(255,255,255,0.2);
}
.noise-gauge-v2 .gauge-v2-fill {
  background: linear-gradient(90deg, #ff6fc8, #9b59b6, #4a0080);
}
.gauge-v2-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
  text-shadow: 0 0 4px #000, 0 1px 2px rgba(0,0,0,0.8);
}

/* アイドル立ち絵 */
.battle-idol-area {
  position: relative;
  z-index: 5;
  height: 30vh;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.battle-idol-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
  opacity: 0.35;
  filter: blur(30px);
  animation: idolGlowPulse 3s ease-in-out infinite;
}
@keyframes idolGlowPulse {
  0%, 100% { opacity: 0.25; transform: scale(0.9); }
  50%      { opacity: 0.5;  transform: scale(1.1); }
}
.battle-idol-img {
  position: relative;
  height: 100%;
  width: auto;
  z-index: 2;
  animation: idolSway 4s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.6));
}
@keyframes idolSway {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-6px) rotate(0.5deg); }
}
.battle-idol-name {
  position: absolute;
  bottom: 8px;
  z-index: 3;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 4px;
  text-shadow: 0 0 8px rgba(0,0,0,0.9);
  background: rgba(0,0,0,0.6);
  padding: 4px 12px;
  border-radius: 999px;
}

/* バトルログV2 */
.battle-log-v2 {
  position: relative;
  z-index: 10;
  margin: 6px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.log-line-v2 {
  padding: 4px 10px;
  background: rgba(0,0,0,0.5);
  border-left: 3px solid #ffd700;
  border-radius: 4px;
  font-size: 11px;
  color: #e8e8ff;
  animation: logSlideIn 0.4s ease-out both;
  backdrop-filter: blur(4px);
}
@keyframes logSlideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ボルテージバー */
.voltage-bar-v2 {
  position: relative;
  z-index: 10;
  margin: 6px 16px;
  padding: 8px 12px;
  background: rgba(7,7,26,0.7);
  border: 1px solid rgba(255,215,0,0.4);
  border-radius: 10px;
}
.vb-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #ffd700;
  margin-bottom: 4px;
  font-weight: 700;
}
.vb-track {
  position: relative;
  height: 14px;
  background: rgba(0,0,0,0.6);
  border-radius: 999px;
  overflow: hidden;
}
.vb-fill {
  height: 100%;
  background: linear-gradient(90deg, #ffd700, #ff6fc8, #c97aff);
  background-size: 200% 100%;
  animation: voltageShimmer 2s linear infinite;
  transition: width 0.6s cubic-bezier(.2,.8,.2,1);
  box-shadow: 0 0 8px rgba(255,215,0,0.6);
}
@keyframes voltageShimmer {
  from { background-position: 0% 50%; }
  to   { background-position: 200% 50%; }
}
.vb-val {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 4px #000;
}

/* プレイヤーステータス */
.player-status-v2 {
  position: relative;
  z-index: 10;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ps-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ps-icon { font-size: 16px; width: 22px; text-align: center; }
.tension-row-v2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tension-pips-v2 {
  flex: 1;
  display: flex;
  gap: 4px;
}
.pip-v2 {
  flex: 1;
  height: 10px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: all 0.3s;
}
.pip-v2.active {
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  box-shadow: 0 0 8px rgba(255,215,0,0.7);
  border-color: #fff;
}
.tension-val {
  font-size: 14px;
  font-weight: 800;
  color: #ffd700;
  min-width: 24px;
  text-align: right;
}

/* 手札エリアV2 */
.hand-area-v2 {
  position: relative;
  z-index: 10;
  padding: 12px 8px 6px;
}
.hand-cards-v2 {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 8px 8px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.hand-cards-v2::-webkit-scrollbar { height: 4px; }
.hand-cards-v2::-webkit-scrollbar-thumb { background: rgba(201,122,255,0.4); border-radius: 999px; }
.hand-area-v2 .battle-card {
  scroll-snap-align: start;
  position: relative;
  min-width: 110px;
  width: 110px;
  padding: 8px;
  background: linear-gradient(180deg, rgba(7,7,26,0.7), rgba(20,10,50,0.85));
  border: 2px solid;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  backdrop-filter: blur(4px);
  overflow: hidden;
}
.hand-area-v2 .battle-card .bc-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, var(--rar)44 0%, transparent 60%);
  pointer-events: none;
}
.hand-area-v2 .battle-card.playable {
  cursor: pointer;
  animation: cardFloat 3s ease-in-out infinite;
}
.hand-area-v2 .battle-card.playable:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 8px 20px var(--rar);
}
.hand-area-v2 .battle-card.playable:active {
  transform: scale(0.95);
}
.hand-area-v2 .battle-card.card-rar-SSR.playable,
.hand-area-v2 .battle-card.card-rar-UR.playable {
  animation: cardFloat 3s ease-in-out infinite, cardRarPulse 2s ease-in-out infinite;
}
@keyframes cardFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
@keyframes cardRarPulse {
  0%, 100% { box-shadow: 0 0 8px var(--rar); }
  50%      { box-shadow: 0 0 24px var(--rar), 0 0 40px var(--rar); }
}

/* ターン終了ボタンV2 */
.battle-actions-v2 {
  position: relative;
  z-index: 10;
  padding: 6px 16px 16px;
}
.end-turn-btn-v2 {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #c97aff, #ff6fc8);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 3px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(255,111,200,0.5), inset 0 1px 0 rgba(255,255,255,0.3);
  transition: transform 0.15s, box-shadow 0.2s;
}
.end-turn-btn-v2:active {
  transform: scale(0.97);
  box-shadow: 0 2px 8px rgba(255,111,200,0.5);
}
.etb-icon { font-size: 18px; }

/* ============================================================
   バトル演出: カードプレイフラッシュ & ダメージポップ
   ============================================================ */
.card-play-flash {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  animation: cardFlashFade 0.6s ease-out forwards;
  mix-blend-mode: screen;
}
@keyframes cardFlashFade {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}

.damage-pop {
  position: fixed;
  top: 30vh;
  left: 50%;
  transform: translateX(-50%);
  z-index: 998;
  pointer-events: none;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow:
    0 0 12px currentColor,
    0 2px 4px rgba(0,0,0,0.9),
    -2px -2px 0 #fff,
    2px -2px 0 #fff,
    -2px 2px 0 #fff,
    2px 2px 0 #fff;
  animation: damagePopUp 1.2s ease-out forwards;
}
@keyframes damagePopUp {
  0%   { opacity: 0; transform: translateX(-50%) translateY(20px) scale(0.5); }
  20%  { opacity: 1; transform: translateX(-50%) translateY(-10px) scale(1.3); }
  50%  { opacity: 1; transform: translateX(-50%) translateY(-30px) scale(1);   }
  100% { opacity: 0; transform: translateX(-50%) translateY(-80px) scale(0.9); }
}

/* ============================================================
   共通: ボタン押し込みフィードバック
   ============================================================ */
button:active {
  transform: scale(0.97);
}
button {
  transition: transform 0.1s ease-out;
}

/* Achievement Pop（汎用） */
.achievement-pop {
  position: fixed;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  padding: 16px 24px;
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  color: #fff;
  border-radius: 16px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 2px;
  box-shadow: 0 8px 32px rgba(255,215,0,0.5);
  animation: achievementPop 2.5s ease-out forwards;
  pointer-events: none;
}
@keyframes achievementPop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0) rotate(-15deg); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1.2) rotate(5deg); }
  35%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  80%  { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(0.95); }
}

/* ============================================================
   バトル結果画面V2
   ============================================================ */
.result-screen-v2 {
  position: relative;
  min-height: 100vh;
  padding-bottom: 40px;
  overflow: hidden;
}

/* 紙吹雪 */
.confetti-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
}
.confetti {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  animation: confettiFall 3s linear infinite;
}
.confetti-0 { background: #ffd700; }
.confetti-1 { background: #ff6fc8; }
.confetti-2 { background: #c97aff; }
.confetti-3 { background: #4a90e2; }
.confetti-4 { background: #2ecc71; }
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ヒーローセクション */
.result-hero {
  position: relative;
  height: 38vh;
  min-height: 280px;
  overflow: hidden;
}
.result-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.45) saturate(1.3);
}
.result-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 80%, var(--accent) 0%, transparent 50%),
    linear-gradient(180deg, rgba(7,7,26,0.3) 0%, transparent 30%, rgba(7,7,26,0.9) 100%);
}
.result-hero-char {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 95%;
  width: auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.6)) drop-shadow(0 0 40px var(--accent));
  animation: heroCharIn 1s 0.3s ease-out both, idolSway 4s 1.5s ease-in-out infinite;
}
@keyframes heroCharIn {
  from { opacity: 0; transform: translateX(-50%) translateY(40px) scale(0.9); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.result-hero-content {
  position: absolute;
  bottom: 16px;
  left: 0; right: 0;
  text-align: center;
  z-index: 5;
}

/* ランク表示 */
.result-rank-wrap {
  display: inline-block;
  padding: 6px 24px;
  background: rgba(0,0,0,0.7);
  border: 2px solid var(--rcolor);
  border-radius: 8px;
  margin-bottom: 12px;
  animation: rankPopIn 0.6s 0.8s ease-out both;
  box-shadow: 0 0 24px var(--rcolor);
}
@keyframes rankPopIn {
  0%   { opacity: 0; transform: scale(0) rotate(-20deg); }
  60%  { opacity: 1; transform: scale(1.2) rotate(8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
.result-rank-label {
  font-size: 9px;
  letter-spacing: 4px;
  color: #c8b8ff;
  font-weight: 700;
}
.result-rank-grade {
  font-size: 38px;
  font-weight: 900;
  color: var(--rcolor);
  text-shadow: 0 0 16px var(--rcolor), 0 2px 4px rgba(0,0,0,0.8);
  letter-spacing: 2px;
  line-height: 1;
}

.result-title-v2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 16px var(--accent), 0 2px 8px rgba(0,0,0,0.9);
  animation: titlePopIn 0.5s 0.2s ease-out both;
}
@keyframes titlePopIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-title-v2.lose {
  color: #c8b8ff;
  text-shadow: 0 0 16px #4a4a8a;
}
.result-stage-v2 {
  margin-top: 6px;
  font-size: 13px;
  color: #ffd9f0;
  letter-spacing: 2px;
  text-shadow: 0 0 8px rgba(0,0,0,0.8);
}

/* ステータスサマリー */
.result-stats {
  margin: 20px 16px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  animation: titlePopIn 0.5s 1s ease-out both;
}
.rs-item {
  text-align: center;
  padding: 12px 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,122,255,0.25);
  border-radius: 12px;
}
.rs-val {
  font-size: 22px;
  font-weight: 800;
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255,215,0,0.5);
}
.rs-label {
  font-size: 9px;
  color: #c8b8ff;
  letter-spacing: 2px;
  margin-top: 2px;
}

/* 報酬 */
.result-rewards-v2 {
  margin: 20px 16px 0;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,111,200,0.06));
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 14px;
  animation: titlePopIn 0.5s 1.2s ease-out both;
}
.rew-title {
  font-size: 11px;
  letter-spacing: 4px;
  color: #ffd700;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
}
.rew-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
}
.rew-item-v2 {
  text-align: center;
  padding: 10px 6px;
  background: rgba(7,7,26,0.6);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
}
.rew-icon { font-size: 24px; }
.rew-val {
  font-size: 16px;
  font-weight: 800;
  color: #ffd700;
  margin-top: 4px;
}
.rew-label {
  font-size: 9px;
  color: #c8b8ff;
  margin-top: 2px;
  letter-spacing: 1px;
}

/* 敗北時 */
.result-hint-v2 {
  margin: 24px 16px;
  padding: 20px;
  background: rgba(74,74,138,0.15);
  border: 1px solid rgba(201,122,255,0.3);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.rhint-icon { font-size: 36px; }
.rhint-text {
  font-size: 12px;
  line-height: 1.7;
  color: #c8b8ff;
}

/* シェアエリア */
.result-share {
  margin: 20px 16px 0;
  padding: 14px;
  background: rgba(0,0,0,0.3);
  border: 1px dashed rgba(201,122,255,0.4);
  border-radius: 14px;
  animation: titlePopIn 0.5s 1.4s ease-out both;
}
.result-share-label {
  font-size: 11px;
  letter-spacing: 3px;
  color: #c8b8ff;
  text-align: center;
  margin-bottom: 10px;
  font-weight: 700;
}
.result-share-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* 共通シェアボタン */
.share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, #1a1a3a, #2a2a5a);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.share-btn:active { transform: scale(0.97); }
.share-btn-x {
  background: linear-gradient(135deg, #1a1a1a, #000);
  border-color: #fff;
}
.share-btn-x:hover { box-shadow: 0 0 16px rgba(255,255,255,0.3); }
.share-btn-x .share-icon {
  font-size: 16px;
  font-weight: 900;
}
.share-btn-copy {
  background: linear-gradient(135deg, #c97aff44, #ff6fc844);
  border-color: #c97aff;
}
.share-btn-copy:hover { box-shadow: 0 0 16px rgba(201,122,255,0.5); }
.gr-share {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
}

/* アクションボタン */
.result-btns-v2 {
  margin: 24px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: titlePopIn 0.5s 1.6s ease-out both;
}
.result-btn-v2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 3px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}
.result-btn-v2.primary {
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255,215,0,0.4);
}
.result-btn-v2.primary:hover { box-shadow: 0 6px 24px rgba(255,215,0,0.6); }
.result-btn-v2.secondary {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(201,122,255,0.4);
  color: #c8b8ff;
}
.result-btn-v2:active { transform: scale(0.98); }

/* ============================================================
   設定画面: 紹介URL
   ============================================================ */
.setting-section {
  margin: 12px 16px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,122,255,0.2);
  border-radius: 14px;
}
.setting-section-share {
  background: linear-gradient(135deg, rgba(255,215,0,0.08), rgba(255,111,200,0.06));
  border-color: rgba(255,215,0,0.35);
}
.setting-section-title {
  font-size: 12px;
  letter-spacing: 3px;
  color: #ffd700;
  font-weight: 800;
  margin-bottom: 10px;
}
.setting-share-desc {
  font-size: 12px;
  line-height: 1.7;
  color: #c8b8ff;
  margin: 8px 0 12px;
}
.setting-share-url {
  margin: 8px 0;
}
.setting-share-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

/* 音量スライダー */
.setting-item-slider {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.setting-item-slider label {
  font-size: 12px;
  color: #c8b8ff;
}
.setting-item-slider label span {
  color: #ffd700;
  font-weight: 800;
  margin-left: 6px;
}
.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #c97aff, #ff6fc8);
  border-radius: 999px;
  outline: none;
  cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  background: radial-gradient(circle, #fff 0%, #ffd700 60%, #ff6fc8 100%);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(255,215,0,0.7);
}
.vol-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: radial-gradient(circle, #fff 0%, #ffd700 60%, #ff6fc8 100%);
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 10px rgba(255,215,0,0.7);
}

/* ============================================================
   Google 認証 UI（設定画面）
   ============================================================ */
.google-auth-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.75);
  margin: 0 0 14px;
  line-height: 1.6;
}
.google-signin-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 20px;
  background: #fff;
  color: #3c4043;
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  justify-content: center;
  transition: box-shadow .2s;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.google-signin-btn:hover { box-shadow: 0 4px 16px rgba(0,0,0,.4); }
.google-auth-logged {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
}
.google-auth-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4, #34A853);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.google-auth-info { flex: 1; min-width: 0; }
.google-auth-label { font-size: .75rem; color: rgba(255,255,255,.5); }
.google-auth-email {
  font-size: .85rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.google-auth-status { font-size: .78rem; color: #4ade80; margin-top: 2px; }
.google-signout-btn {
  width: 100%;
  padding: 10px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  font-size: .85rem;
  cursor: pointer;
  transition: background .2s;
}
.google-signout-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ============================================================
   プレイヤーID・引き継ぎコード UI（設定画面）
   ============================================================ */
.player-id-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.player-id-text {
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: .08em;
}
.copy-id-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .15s;
}
.copy-id-btn:hover { background: rgba(255,255,255,.1); }
.restore-desc {
  font-size: .82rem;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
  margin: 6px 0 0;
}
.restore-code-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.restore-code-input {
  flex: 1;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: #fff;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 10px 12px;
  outline: none;
  transition: border-color .2s;
}
.restore-code-input:focus { border-color: #ffd700; }
.restore-code-input::placeholder { font-family: inherit; letter-spacing: normal; color: rgba(255,255,255,.35); }
.restore-code-btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity .2s;
}
.restore-code-btn:disabled { opacity: .5; cursor: default; }
.restore-code-btn:not(:disabled):hover { opacity: .85; }
.restore-code-result {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
}
.restore-code-ok {
  background: rgba(74,222,128,.15);
  color: #4ade80;
  border: 1px solid rgba(74,222,128,.3);
}
.restore-code-error {
  background: rgba(248,113,113,.12);
  color: #f87171;
  border: 1px solid rgba(248,113,113,.25);
}

/* ============================================================
   Welcome Pack — 限定オファーモーダル
   ============================================================ */
.wp-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: wpOverlayIn 0.4s ease-out;
}
.wp-overlay.closing { animation: wpOverlayOut 0.3s ease-in forwards; }
@keyframes wpOverlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes wpOverlayOut { to { opacity: 0; } }

.wp-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 18px 16px;
  background: linear-gradient(180deg, #1a0d3a 0%, #0d0625 100%);
  border: 2px solid var(--accent);
  border-radius: 18px;
  box-shadow: 0 0 40px var(--accent), inset 0 0 32px rgba(255,215,0,0.1);
  animation: wpModalIn 0.5s cubic-bezier(.2,.8,.2,1.4) both;
}
@keyframes wpModalIn {
  from { opacity: 0; transform: scale(0.7) translateY(40px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.wp-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  z-index: 10;
}
.wp-close:hover { background: rgba(255,255,255,0.1); }

.wp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.wp-badge {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  box-shadow: 0 0 12px rgba(255,215,0,0.5);
  animation: wpBadgePulse 2s ease-in-out infinite;
}
.wp-badge.is-final {
  background: linear-gradient(135deg, #ff3030, #ff6030);
  box-shadow: 0 0 16px rgba(255,48,48,0.6);
}
@keyframes wpBadgePulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.05); }
}
.wp-time-remaining {
  font-size: 11px;
  color: #ffd700;
  letter-spacing: 1px;
}
.wp-time-remaining b {
  font-size: 16px;
  color: #fff;
  text-shadow: 0 0 8px #ffd700;
}

/* キャラクターセクション */
.wp-char-cut {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  padding: 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 12px;
}
.wp-char-cut img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  border: 2px solid var(--accent);
  flex-shrink: 0;
}
.wp-speech {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.wp-speech-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.wp-speech-body {
  font-size: 12px;
  line-height: 1.6;
  color: #ffd9f0;
  font-style: italic;
}

/* タイトル・価格 */
.wp-title {
  text-align: center;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 20px rgba(255,215,0,0.4);
  filter: drop-shadow(0 0 12px rgba(255,215,0,0.6));
}
.wp-subtitle {
  text-align: center;
  font-size: 10px;
  letter-spacing: 3px;
  color: #c8b8ff;
  margin-bottom: 12px;
}
.wp-pricing {
  text-align: center;
  margin: 8px 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
}
.wp-price-strike {
  font-size: 14px;
  color: #888;
  text-decoration: line-through;
}
.wp-price-now {
  font-size: 32px;
  font-weight: 900;
  color: #ffd700;
  text-shadow: 0 0 16px rgba(255,215,0,0.6);
  letter-spacing: 1px;
}
.wp-discount-tag {
  text-align: center;
  display: inline-block;
  width: auto;
  margin: 0 auto 14px;
  padding: 6px 18px;
  background: linear-gradient(135deg, #ff3030, #ff6030);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  border-radius: 999px;
  box-shadow: 0 0 16px rgba(255,48,48,0.5);
  animation: wpBadgePulse 1.2s ease-in-out infinite;
}
.wp-discount-tag {
  display: block;
  text-align: center;
}

/* アイテム一覧 */
.wp-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 14px 0;
  padding: 10px;
  background: rgba(0,0,0,0.3);
  border: 1px dashed rgba(255,215,0,0.3);
  border-radius: 12px;
}
.wp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 8px;
  font-size: 12px;
}
.wp-item-hi {
  background: linear-gradient(135deg, rgba(255,215,0,0.18), rgba(255,111,200,0.15));
  border: 1px solid rgba(255,215,0,0.4);
  box-shadow: 0 0 10px rgba(255,215,0,0.2);
}
.wp-item-icon { font-size: 18px; width: 24px; text-align: center; }
.wp-item-name { flex: 1; color: #e8e8ff; }
.wp-item-val {
  font-weight: 800;
  color: #ffd700;
  font-size: 14px;
}

/* 購入ボタン */
.wp-cta-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  margin-top: 4px;
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255,215,0,0.5), inset 0 1px 0 rgba(255,255,255,0.4);
  animation: wpCtaPulse 2s ease-in-out infinite;
  transition: transform 0.15s;
}
.wp-cta-btn:active { transform: scale(0.96); }
@keyframes wpCtaPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(255,215,0,0.5); }
  50%      { box-shadow: 0 0 40px rgba(255,215,0,0.8), 0 0 60px rgba(255,111,200,0.5); }
}
.wp-cta-icon { font-size: 18px; }

.wp-legal {
  margin-top: 12px;
  padding: 10px;
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 8px;
  font-size: 10px;
  line-height: 1.6;
  color: #c8b8ff;
  text-align: center;
}
.wp-legal b { color: #ffd700; }

.wp-later-btn {
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  color: #888;
  font-size: 12px;
  cursor: pointer;
}
.wp-later-btn:hover {
  border-color: #c8b8ff;
  color: #c8b8ff;
}

/* 購入完了演出 */
.wp-thanks-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  animation: wpOverlayIn 0.5s ease-out;
}
.wp-thanks-overlay.closing { animation: wpOverlayOut 0.4s ease-in forwards; }
.wp-thanks-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.wp-thanks-modal {
  position: relative;
  width: 100%;
  max-width: 360px;
  padding: 24px 20px;
  background: linear-gradient(180deg, #1a0d3a 0%, #0d0625 100%);
  border: 2px solid var(--accent);
  border-radius: 20px;
  box-shadow: 0 0 60px var(--accent);
  text-align: center;
  animation: wpModalIn 0.6s cubic-bezier(.2,.8,.2,1.4);
}
.wp-thanks-char {
  width: 160px;
  height: 200px;
  object-fit: cover;
  object-position: top;
  border-radius: 16px;
  border: 3px solid var(--accent);
  margin-bottom: 16px;
  filter: drop-shadow(0 0 24px var(--accent));
  animation: heroCharIn 0.8s 0.3s ease-out both;
}
.wp-thanks-title {
  font-size: 20px;
  font-weight: 900;
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 2px;
  margin-bottom: 14px;
}
.wp-thanks-speech {
  padding: 14px;
  background: rgba(255,255,255,0.05);
  border-radius: 12px;
  margin-bottom: 16px;
}
.wp-thanks-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.wp-thanks-body {
  font-size: 13px;
  line-height: 1.7;
  color: #ffd9f0;
  font-style: italic;
}
.wp-thanks-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ffd700, #ff6fc8);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 3px;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(255,215,0,0.6);
  animation: wpCtaPulse 2s ease-in-out infinite;
}
.wp-thanks-btn:active { transform: scale(0.96); }

/* ============================================================
   法務文書ページ（特商法・規約・プライバシー）
   ============================================================ */
.legal-screen {
  padding: 14px 0 80px;
  background: linear-gradient(180deg, #0d0625, #07071a);
  min-height: 100vh;
}
.legal-tabs {
  display: flex;
  gap: 4px;
  padding: 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(201,122,255,0.25);
}
.legal-tab {
  flex: 1;
  padding: 10px 4px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #888aaa;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.legal-tab.active {
  color: #ffd700;
  border-bottom-color: #ffd700;
  text-shadow: 0 0 8px rgba(255,215,0,0.4);
}
.legal-body {
  padding: 0 16px;
  font-size: 12px;
  line-height: 1.8;
  color: #e8e8ff;
}
.legal-body h2 {
  font-size: 18px;
  font-weight: 800;
  color: #ffd700;
  margin: 14px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,215,0,0.3);
  letter-spacing: 1px;
}
.legal-body h3 {
  font-size: 13px;
  font-weight: 700;
  color: #c97aff;
  margin: 18px 0 8px;
  padding-left: 8px;
  border-left: 3px solid #c97aff;
}
.legal-body p {
  margin-bottom: 10px;
  color: #c8c8e8;
}
.legal-body ol,
.legal-body ul {
  padding-left: 22px;
  margin-bottom: 14px;
  color: #c8c8e8;
}
.legal-body li {
  margin-bottom: 6px;
}
.legal-body .legal-lead {
  padding: 10px 12px;
  background: rgba(255,215,0,0.06);
  border-left: 3px solid #ffd700;
  border-radius: 4px;
  color: #ffd9c8;
  font-size: 12px;
}
.legal-body a {
  color: #ff6fc8;
  text-decoration: underline;
}
.legal-body a:hover { color: #ffd700; }
.legal-body b {
  color: #ffd700;
}
.legal-dl {
  margin: 14px 0;
}
.legal-dl dt {
  font-size: 11px;
  font-weight: 800;
  color: #c97aff;
  margin-top: 12px;
  letter-spacing: 1px;
}
.legal-dl dd {
  margin: 4px 0 0 0;
  padding: 6px 10px;
  background: rgba(255,255,255,0.03);
  border-radius: 6px;
  font-size: 12px;
  color: #e8e8ff;
}
.legal-update {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: right;
  font-size: 10px;
  color: #888aaa;
}
.legal-back {
  padding: 16px;
  margin-top: 20px;
}

/* 設定画面のリーガルリンク */
.legal-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.legal-link-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,122,255,0.2);
  border-radius: 8px;
  color: #c8b8ff;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.legal-link-btn:hover {
  background: rgba(201,122,255,0.1);
  border-color: #c97aff;
  color: #fff;
}

/* ============================================================
   ガチャ排出率パネル（JOGA自主規制対応）
   ============================================================ */
.gacha-rates-panel {
  margin: 8px 16px 16px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(74,144,226,0.08), rgba(155,89,182,0.06));
  border: 1px solid rgba(74,144,226,0.4);
  border-radius: 12px;
}
.gacha-rates-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #4a90e2;
  margin-bottom: 10px;
}
.gacha-rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.gacha-rates-table th {
  text-align: center;
  padding: 6px;
  color: #c8b8ff;
  font-size: 10px;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-weight: 700;
}
.gacha-rates-table td {
  text-align: center;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: #e8e8ff;
}
.gacha-rates-table td:first-child {
  font-size: 14px;
}
.gacha-rates-notes {
  margin-top: 10px;
  padding-left: 14px;
  font-size: 10px;
  color: #888aaa;
  line-height: 1.7;
}
.gacha-rates-notes li {
  margin-bottom: 3px;
}
.gacha-rates-detail-btn {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: rgba(74,144,226,0.2);
  border: 1px solid #4a90e2;
  border-radius: 8px;
  color: #4a90e2;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 1px;
}
.gacha-rates-detail-btn:hover {
  background: rgba(74,144,226,0.35);
  color: #fff;
}

/* 個別カード提供割合（モーダル内） */
.gacha-detail-list {
  margin: 12px 0;
  max-height: 50vh;
  overflow-y: auto;
  padding: 6px;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
}
.gacha-detail-rar-header {
  padding: 8px 10px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  border-bottom: 1px solid currentColor;
}
.gacha-detail-rar-header:first-child { margin-top: 0; }
.gacha-detail-rar-header span {
  font-size: 10px;
  opacity: 0.8;
  letter-spacing: 1px;
}
.gacha-detail-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.gdc-name {
  flex: 1;
  color: #e8e8ff;
}
.gdc-pct {
  color: #ffd700;
  font-weight: 700;
}

/* ============================================================
   年齢確認・同意モーダル
   ============================================================ */
.age-consent-modal {
  max-width: 400px;
}
.age-consent-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffd700;
  letter-spacing: 2px;
  margin-bottom: 8px;
  text-align: center;
}
.age-consent-lead {
  font-size: 12px;
  color: #c8b8ff;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.7;
}
.age-consent-section {
  margin-bottom: 16px;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,122,255,0.25);
  border-radius: 10px;
}
.age-consent-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #ffd700;
  margin-bottom: 10px;
}
.age-options {
  display: flex;
  gap: 8px;
}
.age-option {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.age-option input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #ffd700;
  cursor: pointer;
}
.age-option-label {
  font-size: 13px;
  font-weight: 700;
  color: #e8e8ff;
}
.age-option:has(input:checked) {
  border-color: #ffd700;
  background: rgba(255,215,0,0.12);
}

.minor-warning {
  background: rgba(255,48,48,0.12) !important;
  border-color: #ff3030 !important;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.minor-warning-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.minor-warning-text {
  font-size: 11px;
  line-height: 1.7;
  color: #ffd9c8;
}
.minor-warning-text b {
  color: #ff6030;
}

.consent-checks {
  margin-bottom: 16px;
}
.consent-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px;
  margin-bottom: 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.consent-check:hover {
  background: rgba(255,255,255,0.04);
}
.consent-check input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #ffd700;
  cursor: pointer;
  flex-shrink: 0;
}
.consent-check span {
  font-size: 11px;
  line-height: 1.6;
  color: #c8b8ff;
}
.consent-check span a {
  color: #ff6fc8;
  text-decoration: underline;
}
.consent-check span a:hover { color: #ffd700; }
.consent-check span b { color: #ffd700; }

.wp-cta-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
  animation: none;
}
.wp-cta-btn.ready {
  animation: wpCtaPulse 2s ease-in-out infinite;
}

/* ============================================================
   オンボーディング規約同意ステップ
   ============================================================ */
.ob-legal-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 16px 0;
}
.ob-legal-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(74,144,226,0.1);
  border: 1px solid rgba(74,144,226,0.4);
  border-radius: 10px;
  color: #c8e8ff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.ob-legal-link:hover {
  background: rgba(74,144,226,0.2);
  color: #fff;
}
.ob-consents {
  margin: 14px 0;
  padding: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,122,255,0.2);
  border-radius: 10px;
}
.ob-next-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.5);
}
.ob-skip-note {
  margin-top: 10px;
  font-size: 10px;
  color: #888aaa;
  text-align: center;
  line-height: 1.6;
}

/* ============================================================
   お問い合わせフォーム
   ============================================================ */
.contact-body {
  padding: 14px 16px;
}
.contact-intro {
  padding: 12px;
  background: rgba(74,144,226,0.08);
  border-left: 3px solid #4a90e2;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.7;
  color: #c8e8ff;
  margin-bottom: 18px;
}
.contact-form {
  background: rgba(0,0,0,0.3);
  padding: 16px;
  border: 1px solid rgba(201,122,255,0.25);
  border-radius: 12px;
}
.form-row {
  margin-bottom: 14px;
}
.form-row label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #c8b8ff;
  margin-bottom: 6px;
}
.form-row label .required {
  margin-left: 6px;
  padding: 2px 6px;
  background: #ff3030;
  color: #fff;
  font-size: 9px;
  border-radius: 4px;
  letter-spacing: 1px;
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 10px 12px;
  background: rgba(7,7,26,0.6);
  border: 1px solid rgba(201,122,255,0.4);
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-row textarea {
  resize: vertical;
  min-height: 120px;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  border-color: #ff6fc8;
  box-shadow: 0 0 0 3px rgba(255,111,200,0.15);
}
.form-row select option {
  background: #1a1a3a;
  color: #fff;
}
.form-hint {
  margin-top: 4px;
  font-size: 10px;
  color: #888aaa;
}
.form-meta { display: none; }
.contact-privacy-note {
  padding: 10px;
  background: rgba(255,215,0,0.06);
  border-radius: 6px;
  font-size: 10px;
  line-height: 1.7;
  color: #c8b8ff;
  margin: 14px 0;
}
.contact-privacy-note a {
  color: #ff6fc8;
}
.contact-alt {
  margin-top: 24px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px dashed rgba(201,122,255,0.3);
  border-radius: 10px;
  text-align: center;
}
.contact-alt-title {
  font-size: 11px;
  letter-spacing: 2px;
  color: #c97aff;
  font-weight: 700;
  margin-bottom: 6px;
}
.contact-alt p {
  font-size: 12px;
  color: #c8b8ff;
  line-height: 1.7;
}
.contact-alt a {
  color: #ffd700;
  text-decoration: underline;
}
.wp-cta-btn.sending {
  opacity: 0.6;
  cursor: wait;
}

/* ============================================================
   月額上限モーダル
   ============================================================ */
.spend-status {
  margin: 16px 0;
  padding: 14px;
  background: rgba(255,48,48,0.08);
  border: 1px solid rgba(255,48,48,0.3);
  border-radius: 10px;
}
.spend-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
}
.spend-row:last-child { border-bottom: none; }
.spend-row span { color: #c8b8ff; }
.spend-row b {
  color: #fff;
  font-size: 16px;
}
.spend-row-remaining b {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255,215,0,0.4);
}
