/* ══════════════════════════════════════════════════════════════════
   門番クエスト 〜月曜から金曜を生き延びろ！〜
   Fullscreen Theater JRPG Theme (Bright, Immersive & Dynamic)
   ══════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700;900&family=Plus+Jakarta+Sans:wght@500;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --snes-bg: #e0f2fe;
  --snes-window-bg: #f8fafc;
  --snes-gold: #f59e0b;
  --snes-gold-light: #fef08a;
  --snes-gold-dark: #b45309;
  --snes-blue: #2563eb;
  --snes-blue-light: #60a5fa;
  --snes-blue-dark: #1d4ed8;
  --snes-text: #0f172a;
  --snes-text-dim: #64748b;
  --snes-green: #10b981;
  --snes-red: #ef4444;

  --font-main: 'Noto Sans JP', 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', sans-serif;
  --font-mono: 'JetBrains Mono', 'Share Tech Mono', Consolas, monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  max-height: 100dvh;
  overflow: hidden;
  background-color: #020617;
  font-family: var(--font-main);
  color: #f1f5f9;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.015em;
  margin: 0;
  padding: 0;
}

/* ── Fullscreen Game Application ─────────────────────────────── */
#game-app {
  width: 100%;
  height: 100%;
  height: 100dvh;
  height: -webkit-fill-available;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #020617;
  overflow: hidden;
}

/* ── Screen Shake & Strobe ────────────────────────────────────── */
.screen-shake {
  animation: snes-screen-shake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes snes-screen-shake {
  10%, 90% { transform: translate3d(-4px, 0, 0); }
  20%, 80% { transform: translate3d(6px, -3px, 0); }
  30%, 50%, 70% { transform: translate3d(-8px, 4px, 0); }
  40%, 60% { transform: translate3d(8px, -4px, 0); }
}

.encounter-flash {
  position: absolute;
  inset: 0;
  /* 目に優しいように、真っ白ではなく少し透明度を持たせた柔らかい色に変更 */
  background: rgba(255, 240, 245, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 950;
}

.encounter-flash.strobe {
  /* 少し時間を延ばしてチカチカ感を和らげる */
  animation: snes-strobe 1.2s ease-out forwards;
}

@keyframes snes-strobe {
  /* 透明度の上限を抑え、回数も減らしてマイルドな点滅にする */
  0%   { opacity: 0.6; }
  25%  { opacity: 0.1; }
  50%  { opacity: 0.5; }
  100% { opacity: 0; }
}

/* ── 💥 Sudden Incident Alert Cut-in Layer ───────────────────── */
.incident-cutin-layer {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(8px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  animation: cutin-bg-fade 1.0s ease-out forwards;
}

.incident-cutin-box {
  width: 90%;
  max-width: 800px;
  background: linear-gradient(180deg, #dc2626 0%, #991b1b 100%);
  border: 4px solid #fde047;
  border-radius: 16px;
  padding: 24px 32px;
  text-align: center;
  box-shadow: 0 10px 50px rgba(220, 38, 38, 0.7), inset 0 0 30px rgba(0,0,0,0.5);
  animation: cutin-box-slam 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes cutin-box-slam {
  0% { transform: scale(1.6) rotate(-4deg); opacity: 0; }
  70% { transform: scale(0.95) rotate(1deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.incident-alert-badge {
  background: #fde047;
  color: #7f1d1d;
  font-size: 14px;
  font-weight: 900;
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.incident-alert-title {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(254, 240, 138, 0.6);
  line-height: 1.4;
}

/* ── Header Bar (ダークサイバーHUDヘッダー) ───────────────────── */
header.rpg-header {
  background: rgba(11, 19, 43, 0.95);
  color: #ffffff;
  border-bottom: 2px solid #38bdf8;
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(56, 189, 248, 0.15);
  position: relative;
  z-index: 100;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
}

/* ── Main Game Stage Container (100%完全固定・はみ出しゼロ) ── */
.game-stage {
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--snes-gold-light);
  letter-spacing: 2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.header-stage-badge {
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 8px;
}

.header-mode-badge {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #fef08a;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 6px;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-day-tag {
  background: linear-gradient(180deg, var(--snes-gold-light) 0%, var(--snes-gold) 100%);
  color: #78350f;
  font-weight: 900;
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 6px;
}

.header-loc-tag {
  background: rgba(15, 23, 42, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 6px;
}

.header-controls { display: flex; gap: 10px; }

.rpg-ctrl-btn {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border: 1.5px solid #fef08a;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 900;
  padding: 5px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all 0.15s;
}

.rpg-ctrl-btn.ctrl-off {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #94a3b8;
  box-shadow: none;
}

.rpg-ctrl-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.sound-safety-note {
  font-size: 12px;
  color: #0284c7;
  font-weight: 700;
  margin-top: 4px;
}

/* ── 🖤 Cinematic Blackout Fade Overlay (2秒間の暗転トランジション) ── */
.cinematic-fade-overlay {
  position: absolute;
  inset: 0;
  z-index: 2000;
  background: #020617;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinematic-fade-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ── 🎬 0. Brand Logo & Cinematic Trailer Movie Screen ───────────── */
.branding-intro-screen {
  position: absolute;
  inset: 0;
  z-index: 1000;
  background: #020617;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
}

.movie-scenes-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.movie-scene {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.intro-skip-btn {
  position: absolute;
  top: 24px;
  right: 28px;
  z-index: 1100;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(148, 163, 184, 0.4);
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 9999px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.intro-skip-btn:hover {
  background: rgba(30, 41, 59, 0.95);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
}

/* Scene 0: Maker Brand Logo Container */
.scene-maker-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  animation: maker-appear-fade 3.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes maker-appear-fade {
  0% { opacity: 0; transform: scale(0.85); filter: blur(10px); }
  25% { opacity: 1; transform: scale(1); filter: blur(0px); }
  80% { opacity: 1; transform: scale(1.02); filter: blur(0px); }
  100% { opacity: 0; transform: scale(1.08); filter: blur(6px); }
}

.maker-emblem-glow {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hex-portal-icon {
  font-size: 84px;
  filter: drop-shadow(0 0 35px #38bdf8) drop-shadow(0 0 70px #0284c7);
  animation: emblem-pulse 2s ease-in-out infinite;
}

@keyframes emblem-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 35px #38bdf8); }
  50% { transform: scale(1.1); filter: drop-shadow(0 0 55px #60a5fa) drop-shadow(0 0 90px #38bdf8); }
}

.spark-orbits {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  border: 2.5px dashed rgba(56, 189, 248, 0.5);
  animation: orbit-spin 10s linear infinite;
}

@keyframes orbit-spin {
  100% { transform: rotate(360deg); }
}

.maker-brand-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 52px;
  font-weight: 900;
  letter-spacing: 0.18em;
  background: linear-gradient(135deg, #ffffff 0%, #93c5fd 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 45px rgba(56, 189, 248, 0.7);
}

.maker-sub-brand {
  font-size: 22px;
  font-weight: 800;
  color: #cbd5e1;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 14px;
}

.presents-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 8px;
  letter-spacing: 0.12em;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.6);
}

/* Scene 1: Peaceful Office Pan-Zoom */
.movie-bg-pan-zoom {
  position: absolute;
  inset: -5%;
  width: 110%;
  height: 110%;
  background-size: cover;
  background-position: center;
}

.bg-office-intro {
  background-image: radial-gradient(circle at center, rgba(15, 23, 42, 0.3) 0%, rgba(2, 6, 23, 0.85) 100%), url('assets/bg_office.jpg');
  animation: bg-pan-zoom-anim 4.5s ease-out forwards;
}

@keyframes bg-pan-zoom-anim {
  0% { transform: scale(1) translate(0, 0); filter: brightness(0.7); }
  100% { transform: scale(1.15) translate(-15px, -10px); filter: brightness(1); }
}

/* Subtitle & Caption Bar（映画風大迫力字幕） */
.movie-caption-bar {
  position: absolute;
  bottom: 45px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.94);
  border: 2.5px solid #38bdf8;
  border-radius: 18px;
  padding: 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.4);
  backdrop-filter: blur(14px);
  animation: caption-float-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  max-width: 92%;
  width: auto;
}

@keyframes caption-float-in {
  0% { opacity: 0; transform: translate(-50%, 30px); }
  100% { opacity: 1; transform: translate(-50%, 0); }
}

.movie-caption-tag {
  background: #0284c7;
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  padding: 3px 18px;
  border-radius: 9999px;
  letter-spacing: 0.12em;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

.movie-caption-text {
  font-size: 26px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.06em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(56, 189, 248, 0.3);
  line-height: 1.4;
  text-align: center;
}

/* Scene 2: Targeted Email Inbound Box */
.scene-email-incoming {
  background: radial-gradient(circle at center, rgba(30, 58, 138, 0.4) 0%, rgba(2, 6, 23, 0.95) 100%), url('assets/bg_office.jpg') center/cover;
}

.movie-email-popup-box {
  width: 90%;
  max-width: 720px;
  background: #ffffff;
  border: 3px solid #38bdf8;
  border-radius: 20px;
  padding: 24px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(56, 189, 248, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  animation: email-popup-anim 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes email-popup-anim {
  0% { opacity: 0; transform: scale(0.8) translateY(20px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.email-popup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 10px;
}

.email-alert-icon { font-size: 26px; }
.email-subject-text {
  font-size: 18px;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1.35;
}

.email-popup-body {
  font-size: 16px;
  line-height: 1.6;
  color: #334155;
  font-weight: 700;
}

.movie-caption-bar.warning-bar {
  border-color: #f59e0b;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 35px rgba(245, 158, 11, 0.4);
}
.warning-tag { background: #d97706 !important; }

/* Scene 3: Threat Breach */
.scene-threat-breach {
  background: radial-gradient(circle at center, rgba(220, 38, 38, 0.25) 0%, rgba(2, 6, 23, 0.95) 100%), url('assets/bg_office.jpg') center/cover;
}

.movie-glitch-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.6) 50%);
  background-size: 100% 4px;
  pointer-events: none;
  animation: glitch-scan 0.1s linear infinite;
}

@keyframes glitch-scan {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

.movie-threat-shadows {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: threat-alarm-shake 0.4s infinite;
}

@keyframes threat-alarm-shake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 2px); }
  75% { transform: translate(4px, -2px); }
}

.threat-icon-glow {
  font-size: 100px;
  filter: drop-shadow(0 0 40px #ef4444);
}

.threat-alert-text {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 900;
  color: #ef4444;
  letter-spacing: 0.18em;
  text-shadow: 0 0 25px #ef4444, 0 0 50px #dc2626;
}

.movie-caption-bar.danger-bar {
  border-color: #ef4444;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(239, 68, 68, 0.5);
}
.danger-tag { background: #dc2626 !important; }

/* Scene 4: Guardian Awakening */
.scene-guardian-awake {
  background: radial-gradient(circle at center, rgba(14, 165, 233, 0.3) 0%, rgba(2, 6, 23, 0.95) 100%), url('assets/bg_office.jpg') center/cover;
}

.guardian-awake-hero {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hero-surge 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes hero-surge {
  0% { opacity: 0; transform: scale(0.6) translateY(40px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.awake-chara-img {
  width: 260px;
  height: 260px;
  object-fit: cover;
  border-radius: 50%;
  border: 4.5px solid #38bdf8;
  box-shadow: 0 0 60px rgba(56, 189, 248, 0.9);
  background: #ffffff;
}

.awake-shield-glow {
  position: absolute;
  bottom: 0;
  right: 10px;
  font-size: 72px;
  filter: drop-shadow(0 0 35px #facc15);
  animation: emblem-pulse 1.2s infinite;
}

.movie-caption-bar.hero-bar {
  border-color: #facc15;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(250, 204, 21, 0.5);
}
.hero-tag { background: #ca8a04 !important; }

/* Scene 5: Game Title Epic Blast & Start Trigger Button */
.scene-title-blast {
  background: radial-gradient(circle at center, #0a192f 0%, #020617 100%);
  animation: title-blast-in 1.0s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.title-blast-fx-burst {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.45) 0%, transparent 70%);
  animation: burst-pulse 2s ease-out infinite;
}

@keyframes burst-pulse {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}

.cinematic-sub-tag {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
  color: #020617;
  font-size: 16px;
  font-weight: 900;
  padding: 6px 28px;
  border-radius: 9999px;
  letter-spacing: 0.18em;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.7);
}

.cinematic-main-logo {
  font-size: 68px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 
    0 0 35px rgba(56, 189, 248, 0.9),
    0 0 80px rgba(37, 99, 235, 0.9),
    0 4px 16px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.06em;
}
.cinematic-tagline {
  font-size: 30px;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 0 30px rgba(253, 224, 71, 0.8), 0 2px 10px rgba(0, 0, 0, 0.9);
  letter-spacing: 0.1em;
}

/* Interactive Start Trigger Button */
.cinematic-start-trigger-btn {
  margin-top: 32px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.95) 0%, rgba(217, 119, 6, 0.98) 100%);
  border: 3px solid #fef08a;
  border-radius: 9999px;
  padding: 16px 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.7), 0 12px 30px rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  animation: start-btn-pulse 1.8s ease-in-out infinite;
}

@keyframes start-btn-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 35px rgba(245, 158, 11, 0.7); }
  50% { transform: scale(1.05); box-shadow: 0 0 60px rgba(253, 224, 71, 0.95), 0 0 25px rgba(255, 255, 255, 0.9); }
}

.cinematic-start-trigger-btn:hover {
  transform: scale(1.08) translateY(-2px);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-color: #ffffff;
  box-shadow: 0 0 70px rgba(253, 224, 71, 1), 0 18px 40px rgba(0, 0, 0, 0.8);
}

.trigger-sparkle { font-size: 22px; }
.trigger-text {
  font-family: var(--font-main);
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.14em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* ── 🚀 Audio Init Entry Gate (入場サウンド選択ゲート) ──────────── */
.audio-gate-overlay {
  position: absolute;
  inset: 0;
  z-index: 1200;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.99) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.audio-gate-modal {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border: 3px solid #38bdf8;
  border-radius: 24px;
  padding: 36px 40px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6), 0 0 40px rgba(56, 189, 248, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  animation: modal-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.audio-gate-badge {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  padding: 4px 16px;
  border-radius: 9999px;
  letter-spacing: 0.08em;
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.3);
}

.audio-gate-title {
  font-size: 26px;
  font-weight: 900;
  color: #0f172a;
}

.audio-gate-desc {
  font-size: 15px;
  color: #475569;
  line-height: 1.6;
  font-weight: 600;
}

.audio-gate-sub-note {
  font-size: 13px;
  color: #0284c7;
  font-weight: 700;
}

.audio-gate-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}

.audio-gate-btn {
  background: #ffffff;
  border: 2.5px solid #cbd5e1;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.btn-gate-sound-on {
  border-color: #f59e0b;
  background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
}

.btn-gate-sound-on:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #d97706;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
}

.btn-gate-sound-mute {
  border-color: #94a3b8;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.btn-gate-sound-mute:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #475569;
  box-shadow: 0 10px 25px rgba(71, 85, 105, 0.25);
}

.gate-btn-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.gate-btn-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gate-btn-main {
  font-size: 16.5px;
  font-weight: 900;
  color: #0f172a;
}

.gate-btn-sub {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}

/* 🖥️ フルスクリーンモード推奨案内ボックス */
.fullscreen-recommend-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(56, 189, 248, 0.12) 100%);
  border: 2px solid #38bdf8;
  border-radius: 14px;
  padding: 14px 20px;
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.15);
}

.fullscreen-recommend-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.fullscreen-recommend-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.fullscreen-recommend-main {
  font-size: 16px;
  font-weight: 900;
  color: #0284c7;
}

.fullscreen-recommend-sub {
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
  line-height: 1.4;
}

.key-kbd-gate {
  display: inline-block;
  background: #0f172a;
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 5px;
  border: 1.5px solid #38bdf8;
  box-shadow: 0 2px 6px rgba(56, 189, 248, 0.3);
  margin: 0 2px;
}

/* ── 1. Super Stylish Cyber HUD Title Screen (大迫力スケールアップHUD) ── */
.title-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: 
    radial-gradient(circle at center, rgba(10, 25, 47, 0.88) 0%, rgba(2, 6, 23, 0.98) 100%),
    linear-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.05) 1px, transparent 1px),
    url('assets/bg_office.jpg') center/cover no-repeat;
  background-size: cover, 40px 40px, 40px 40px, cover;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 0;
  max-height: 100%;
}

.title-hud-layout {
  width: 96%;
  max-width: 1280px;
  max-height: 95vh;
  max-height: 95dvh;
  background: rgba(11, 19, 43, 0.92);
  border: 2.5px solid #38bdf8;
  border-radius: 24px;
  padding: 22px 36px;
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.75),
    0 0 45px rgba(56, 189, 248, 0.4),
    inset 0 0 35px rgba(56, 189, 248, 0.1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(16px);
  overflow-y: auto;
}

/* Top Banner */
.title-banner-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-bottom: 1.5px solid rgba(56, 189, 248, 0.35);
  padding-bottom: 12px;
}

.title-cyber-sub-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.18em;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 3px 18px;
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.title-logo-neo {
  font-size: 46px;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  text-shadow: 
    0 0 25px rgba(56, 189, 248, 0.9),
    0 0 50px rgba(37, 99, 235, 0.7),
    0 2px 6px rgba(0, 0, 0, 0.8);
  letter-spacing: 0.06em;
}

.title-logo-sub {
  font-size: 24px;
  font-weight: 800;
  color: #fde047;
  text-shadow: 0 0 18px rgba(253, 224, 71, 0.7);
}

.title-sub-quote {
  font-size: 15px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Center 2-Column Grid (ワイドレイアウト) */
.title-center-grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: stretch;
}

/* Left: Hero Card (新米門番 AIちゃんを大きくド迫力表示！) */
.title-hero-card {
  background: rgba(15, 23, 42, 0.88);
  border: 2px solid rgba(56, 189, 248, 0.45);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(56, 189, 248, 0.08);
}

.hero-card-status-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(2, 6, 23, 0.85);
  padding: 4px 16px;
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.status-live-dot {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 12px #10b981;
  animation: pulse-dot 1.5s infinite;
}

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

/* 🎨 大きく迫力あるAIちゃんイラストフレーム（175px × 175px） */
.title-hero-frame {
  position: relative;
  width: 175px;
  height: 175px;
  background: #0f172a !important;
  border: 3px solid #38bdf8;
  border-radius: 22px;
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.title-hero-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-badge-tag {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(2, 6, 23, 0.92);
  color: #38bdf8;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 900;
  padding: 3px 0;
  letter-spacing: 0.12em;
  border-top: 1px solid rgba(56, 189, 248, 0.35);
}

.hero-name-plate {
  font-size: 18px;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.5);
}

.hero-console-bubble {
  background: rgba(2, 6, 23, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.65;
  color: #cbd5e1;
  font-weight: 600;
  text-align: left;
  position: relative;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.5);
  flex: 1;
}

/* Right: Command Console */
.title-command-console {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: space-between;
}

/* Giant Mission Start Button */
.btn-mission-start {
  width: 100%;
  padding: 16px 32px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2.5px solid #fde047;
  color: #ffffff;
  box-shadow: 0 10px 35px rgba(245, 158, 11, 0.55), 0 0 25px rgba(253, 224, 71, 0.4);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.btn-mission-start:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 15px 45px rgba(245, 158, 11, 0.75), 0 0 35px rgba(253, 224, 71, 0.6);
}

.btn-start-icon {
  font-size: 36px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}

.btn-start-text-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.btn-start-main {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

.btn-start-sub {
  font-size: 13.5px;
  font-weight: 800;
  opacity: 0.95;
  letter-spacing: 0.12em;
  color: #fef3c7;
}

/* 💾 Continue Saved Game Button (エメラルド＆シアンの輝く再開ボタン) */
.btn-continue-pulse {
  background: linear-gradient(135deg, #059669 0%, #0d9488 50%, #0284c7 100%) !important;
  border: 2.5px solid #34d399 !important;
  box-shadow: 0 10px 35px rgba(16, 185, 129, 0.55), 0 0 25px rgba(52, 211, 153, 0.4) !important;
  animation: continue-btn-glow 2s infinite ease-in-out;
}

@keyframes continue-btn-glow {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 35px rgba(16, 185, 129, 0.55), 0 0 25px rgba(52, 211, 153, 0.4); }
  50% { transform: scale(1.02); box-shadow: 0 14px 45px rgba(16, 185, 129, 0.8), 0 0 35px rgba(52, 211, 153, 0.7); }
}

.btn-continue-pulse:hover {
  transform: translateY(-3px) scale(1.03) !important;
  box-shadow: 0 16px 50px rgba(16, 185, 129, 0.9), 0 0 40px rgba(52, 211, 153, 0.8) !important;
}

/* 💾 Header Return / Autosave Button */
.header-save-btn {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: rgba(52, 211, 153, 0.5) !important;
  color: #34d399 !important;
  font-weight: 800;
  transition: all 0.2s ease;
}

.header-save-btn:hover {
  background: rgba(16, 185, 129, 0.35) !important;
  border-color: #34d399 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
}

/* Console Panels */
.console-panel {
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.panel-label {
  font-size: 13px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.05em;
}

.mode-buttons-neo, .sound-buttons-neo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mode-btn-neo, .sound-btn-neo {
  background: rgba(2, 6, 23, 0.85);
  border: 1.5px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  color: #94a3b8;
  font-family: var(--font-main);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mode-btn-neo .mode-neo-desc, .sound-btn-neo .sound-sub-neo {
  font-size: 11.5px;
  color: #64748b;
  font-weight: 500;
}

.mode-btn-neo:hover, .sound-btn-neo:hover {
  border-color: #38bdf8;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.95);
}

.mode-btn-neo.active {
  background: rgba(14, 165, 233, 0.18);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}
.mode-btn-neo.active .mode-neo-desc { color: #93c5fd; font-weight: 700; }

.sound-btn-neo.active {
  background: rgba(245, 158, 11, 0.2);
  border-color: #f59e0b;
  color: #fde047;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.35);
}
.sound-btn-neo.active .sound-sub-neo { color: #fef08a; font-weight: 700; }

/* Creator Note Card Neo */
.console-creator-card {
  width: 100%;
}

.note-credit-link-neo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(6, 78, 59, 0.4);
  border: 1.5px solid #10b981;
  border-radius: 12px;
  padding: 8px 16px;
  color: #6ee7b7;
  text-decoration: none;
  transition: all 0.2s ease;
}

.note-credit-link-neo:hover {
  background: rgba(6, 78, 59, 0.6);
  border-color: #34d399;
  transform: translateY(-2px);
}

.note-credit-link-neo:hover .note-author-neo,
.note-credit-link-neo:hover .note-label-neo,
.note-credit-link-neo:hover .note-arrow-neo {
  color: #ffffff;
}

.note-icon-box { font-size: 18px; }
.note-info-box { display: flex; flex-direction: column; text-align: left; gap: 1px; }
.note-label-neo { font-size: 11px; font-weight: 700; color: #a7f3d0; }
.note-author-neo { font-size: 13.5px; font-weight: 900; color: #ffffff; }
.note-arrow-neo { font-size: 15px; font-weight: 900; color: #34d399; }

/* Bottom Guide */
.title-bottom-guide {
  font-size: 12.5px;
  color: #94a3b8;
  font-weight: 600;
  border-top: 1px dashed rgba(56, 189, 248, 0.25);
  padding-top: 10px;
}

/* ── 1.5 Prologue Screen (スター・ウォーズ風シネマティック・スクロールロール プロローグ) ── */
.prologue-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  background: 
    radial-gradient(circle at center, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 1) 100%),
    linear-gradient(rgba(245, 158, 11, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 158, 11, 0.04) 1px, transparent 1px),
    url('assets/bg_office.jpg') center/cover no-repeat;
  background-size: cover, 40px 40px, 40px 40px, cover;
  text-align: center;
  position: relative;
  z-index: 10;
}

.prologue-card {
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  height: 90dvh;
  background: rgba(11, 19, 43, 0.95);
  border: 2.5px solid #f59e0b;
  border-radius: 24px;
  padding: 24px 36px;
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(245, 158, 11, 0.35),
    inset 0 0 30px rgba(245, 158, 11, 0.06);
  display: flex;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(16px);
  animation: modal-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.prologue-badge {
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
  color: #ffffff;
  font-size: 16px;
  font-weight: 900;
  padding: 6px 30px;
  border-radius: 9999px;
  align-self: center;
  letter-spacing: 0.1em;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  border: 1.5px solid #fef08a;
  flex-shrink: 0;
}

.prologue-scroll-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: rgba(2, 6, 23, 0.85);
  border: 2px solid rgba(245, 158, 11, 0.4);
  border-radius: 16px;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  text-align: left;
  scroll-behavior: smooth;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.7);
}

.prologue-story-body {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 16px;
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 🌟 大きくて読みやすいスター・ウォーズ調シネマティックテキスト */
.prologue-p {
  font-size: 21px;
  line-height: 2.1;
  color: #fef08a;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-shadow: 0 0 10px rgba(254, 240, 138, 0.3), 0 2px 4px rgba(0, 0, 0, 0.8);
}

.prologue-highlight-p {
  font-size: 23px;
  color: #ffffff;
  font-weight: 900;
  line-height: 2.1;
  border-top: 2px dashed rgba(245, 158, 11, 0.5);
  padding-top: 20px;
  text-shadow: 
    0 0 20px rgba(245, 158, 11, 0.8),
    0 0 40px rgba(217, 119, 6, 0.6),
    0 2px 6px rgba(0, 0, 0, 0.9);
}

.roadmap-timeline {
  background: rgba(15, 23, 42, 0.95);
  border: 2px solid rgba(56, 189, 248, 0.4);
  border-radius: 16px;
  padding: 22px 26px;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.roadmap-header {
  margin-bottom: 16px;
  text-align: left;
}

.roadmap-title {
  font-size: 20px;
  font-weight: 900;
  color: #38bdf8;
  letter-spacing: 0.04em;
  text-shadow: 0 0 15px rgba(56, 189, 248, 0.6);
}

.roadmap-sub-note {
  font-size: 14.5px;
  font-weight: 600;
  color: #cbd5e1;
  margin-top: 4px;
}

.roadmap-grid-rich {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.roadmap-card {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.roadmap-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.roadmap-card.day-mon { border-color: #38bdf8; background: #f0f9ff; }
.roadmap-card.day-tue { border-color: #4ade80; background: #f0fdf4; }
.roadmap-card.day-wed { border-color: #facc15; background: #fefce8; }
.roadmap-card.day-thu { border-color: #c084fc; background: #faf5ff; }
.roadmap-card.day-fri { border-color: #f87171; background: #fef2f2; }

.roadmap-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid rgba(0, 0, 0, 0.08);
  padding-bottom: 5px;
}

.day-code-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.08);
  color: #0f172a;
}

.day-category {
  font-size: 12.5px;
  font-weight: 800;
  color: #1e40af;
}

.day-main-theme {
  font-size: 14.5px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.4;
  margin-top: 2px;
}

.day-learning-points {
  list-style: none;
  font-size: 12.5px;
  line-height: 1.55;
  color: #334155;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.prologue-actions {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.btn-start-monday-hero {
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: 2px solid #fef08a;
  border-radius: 9999px;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(245, 158, 11, 0.5), 0 0 20px rgba(253, 224, 71, 0.4);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  animation: start-btn-pulse 1.8s infinite;
}

.btn-start-monday-hero:hover {
  transform: scale(1.05) translateY(-2px);
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 15px 40px rgba(245, 158, 11, 0.7), 0 0 30px rgba(255, 255, 255, 0.8);
}

/* ── Generic Buttons ─────────────────────────────────────────── */
.rpg-btn {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border: 2px solid #60a5fa;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 900;
  padding: 12px 26px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.rpg-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}

.rpg-btn:active { transform: translateY(1px); }

.btn-gold {
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-color: #fde047;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-gold:hover {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-large {
  font-size: 16px;
  padding: 13px 30px;
}

.key-kbd {
  display: inline-block;
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  margin: 0 2px;
  vertical-align: middle;
  color: #0f172a;
}

/* ── 2. Fullscreen Stage Layout (100%画面完全フィット・スクロール不要HUD) ── */
#game-screen {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 10px 18px;
  overflow: hidden;
  z-index: 1;
  background: #020617;
  min-height: 0;
  height: 100%;
}

.scenario-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.65) saturate(1.1);
  opacity: 0.45;
  transition: background-image 0.6s ease;
  z-index: 0;
  pointer-events: none;
}

.stage-fullscreen-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

/* ── Left Column: Character & Status & Glossary (ワイド＆大迫力AIちゃん) ── */
.stage-left-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

/* 💬 会話欄のサイズを72pxで完全固定 */
.chara-speech-bubble {
  width: 100%;
  height: 72px;
  min-height: 72px;
  max-height: 72px;
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #f59e0b;
  border-radius: 12px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 800;
  color: #fef08a;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.25);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.chara-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #f59e0b transparent transparent transparent;
}

.bubble-pop { animation: bubble-pop-anim 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes bubble-pop-anim {
  0% { transform: scale(0.92); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* 🎨 大迫力のAIちゃんイラストフレーム（165px × 165px） */
.battle-chara-frame {
  width: 165px;
  height: 165px;
  min-width: 165px;
  min-height: 165px;
  max-width: 165px;
  max-height: 165px;
  background: #0f172a !important;
  border: 3px solid #38bdf8;
  border-radius: 20px;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

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

.battle-chara-name {
  font-size: 15px;
  font-weight: 900;
  color: #38bdf8;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
  flex-shrink: 0;
}

.bobbing { animation: chara-bob 2.4s ease-in-out infinite; }
@keyframes chara-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.jump { animation: chara-jump 0.5s ease-in-out 2; }
@keyframes chara-jump { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-16px) scale(1.05); } }
.chara-slump { animation: chara-slump-anim 0.6s ease-in-out forwards; }
@keyframes chara-slump-anim {
  0% { transform: translateY(0); }
  30% { transform: translateY(8px) rotate(-5deg); }
  100% { transform: translateY(6px) rotate(-4deg); }
}

.guardian-status-card {
  width: 100%;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.status-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 800;
}
.status-label { color: #94a3b8; }
.status-val { color: #fde047; font-weight: 900; text-shadow: 0 0 8px rgba(253, 224, 71, 0.4); }

/* 📖 門番の用語ミニ解説カード（左カラム一番下までどっしり最大領域を埋めて固定！） */
.chara-glossary-card {
  width: 100%;
  flex: 1;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  background: rgba(15, 23, 42, 0.95);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.chara-glossary-card:hover {
  border-color: #38bdf8;
  background: rgba(15, 23, 42, 0.98);
}

.glossary-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  flex-shrink: 0;
}

.glossary-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 3px 8px;
  border-radius: 5px;
}

.glossary-toggle-btn {
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
}

.glossary-content-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.glossary-item {
  background: rgba(2, 6, 23, 0.88);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #f1f5f9;
}

.glossary-term {
  font-weight: 900;
  color: #38bdf8;
  margin-bottom: 2px;
}

.glossary-desc {
  color: #cbd5e1;
  font-weight: 600;
}

/* ── Right Column: Visual Novel Stage Area ──────────────────── */
.stage-right-col {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

/* A. Peaceful Daily Scene Card (ビジュアルノベル完全表示レイアウト) */
.daily-scene-card {
  flex: 1;
  background: rgba(11, 19, 43, 0.90);
  border: 2px solid #38bdf8;
  border-radius: 16px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(56, 189, 248, 0.25);
  backdrop-filter: blur(12px);
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.daily-scene-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.daily-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 12px;
  border-radius: 9999px;
  border: 1px solid #10b981;
}

.daily-time-tag {
  font-size: 12.5px;
  font-weight: 700;
  color: #94a3b8;
}

/* 🎨 大迫力シネマティックビジュアルステージ（100%表示領域） */
.daily-scene-stage {
  flex: 1;
  position: relative;
  width: 100%;
  min-height: 0;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  background: #020617;
}

.daily-scene-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 上部に重ねられた美しい半透明メッセージウィンドウ（左テキスト ＋ 右ボタンの横並びスプリット！） */
.daily-story-novel-box {
  position: absolute;
  top: 24px;
  left: 20px;
  right: 20px;
  background: rgba(2, 6, 23, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 2px solid #38bdf8;
  border-radius: 14px;
  padding: 16px 24px;
  color: #ffffff;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.35);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  animation: modal-appear 0.3s ease;
  z-index: 10;
}

.daily-novel-text-col {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-tag {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 6px;
  align-self: flex-start;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.daily-story-content {
  font-size: 20px;
  line-height: 1.6;
  color: #f8fafc;
  white-space: pre-wrap;
  font-weight: 800;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  min-height: 64px;
  max-height: 96px;
  overflow-y: auto;
}

.daily-proceed-action-col {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.daily-proceed-action-col .rpg-btn {
  padding: 12px 24px;
  font-size: 15.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* B. Incident Scene Card (大迫力フルスクリーン対応・ボトムコマンド最下部固定) */
.incident-scene-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.investigation-window {
  flex: 1;
  min-height: 0;
  background: rgba(11, 19, 43, 0.92);
  border: 2.5px solid #38bdf8;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(56, 189, 248, 0.3);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
}

.investigation-header {
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 2px solid rgba(56, 189, 248, 0.35);
  padding: 8px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 900;
  color: #38bdf8;
}

.window-controls { display: flex; gap: 8px; }

.win-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  font-size: 9px;
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.8);
}

.investigation-body {
  flex: 1;
  min-height: 0;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(2, 6, 23, 0.75);
  overflow: hidden;
}

/* 1. 上部情報バー（シチュエーション文 ＆ メタパネル） */
.investigation-top-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.scene-story-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.5;
  color: #f8fafc;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.document-meta-panel {
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 8px;
  padding: 6px 14px;
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.meta-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
}

.meta-label { font-weight: 900; color: #38bdf8; font-size: 13px; }
.meta-value { color: #f1f5f9; font-weight: 700; font-size: 13.5px; word-break: break-all; }
.sender-highlight { color: #38bdf8; font-family: var(--font-mono); font-weight: 900; }
.recipient-highlight { color: #a5f3fc; font-family: var(--font-mono); font-weight: 700; }
.subject-highlight { color: #fde047; }

/* 2. メイン 2カラムエリア（左：本文、右：大迫力証拠画像） */
.investigation-main-split {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.25fr 0.95fr;
  gap: 12px;
  overflow: hidden;
}

/* 📄 メール/文書本文パネル（左側・スクロール対応） */
.document-body-panel {
  background: rgba(2, 6, 23, 0.9);
  border: 2px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #f1f5f9;
  white-space: pre-wrap;
  font-family: var(--font-main);
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  height: 100%;
  min-height: 0;
  overflow-y: auto;
}

/* 📄 メール本文パネル カスタムスクロールバー */
.document-body-panel::-webkit-scrollbar {
  width: 8px;
}
.document-body-panel::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 4px;
}
.document-body-panel::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.5);
  border-radius: 4px;
}
.document-body-panel::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.75);
}

/* 🔍 大迫力 現場証拠・資料プレビューカード（右側・ワイド表示） */
.scene-evidence-card {
  background: rgba(15, 23, 42, 0.92);
  border: 2px solid #38bdf8;
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.2);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.evidence-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.evidence-tag {
  font-size: 12px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.04em;
}

.evidence-img-wrapper {
  flex: 1;
  min-height: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  background: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ⚔️ ボトムコマンド（大迫力で最下部にピタッと完全固定！） */
.command-decision-box {
  background: rgba(15, 23, 42, 0.92);
  border: 2.5px solid #38bdf8;
  border-radius: 14px;
  padding: 10px 18px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6), 0 0 20px rgba(56, 189, 248, 0.25);
  flex-shrink: 0;
  height: 220px;
  min-height: 220px;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin-top: auto;
}

.command-decision-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 900;
  color: #38bdf8;
  flex-shrink: 0;
}

.key-hint { font-size: 12.5px; color: #94a3b8; font-weight: 700; }

.options-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
  justify-content: space-between;
}

.option-btn {
  background: rgba(2, 6, 23, 0.88);
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  padding: 8px 14px;
  color: #f1f5f9;
  font-family: var(--font-main);
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  overflow: hidden;
}

.option-btn .cursor { opacity: 0; color: #f59e0b; font-size: 14px; }
.option-btn .key-badge {
  background: rgba(30, 41, 59, 0.8);
  color: #38bdf8;
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 5px;
  flex-shrink: 0;
}

.option-btn:hover, .option-btn.selected {
  background: rgba(14, 165, 233, 0.25);
  border-color: #38bdf8;
  color: #ffffff;
  transform: translateX(4px);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.5);
}
.option-btn.selected .cursor { opacity: 1; color: #fde047; }
.option-btn.selected .key-badge { background: #f59e0b; color: #ffffff; border-color: #fde047; }

/* ── 💥 RPG Battle FX & Monster Overlay Layer ────────────────── */
.rpg-battle-fx-layer {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(2, 6, 23, 0.75);
}

.enemy-monster-card {
  width: 90%;
  max-width: 560px;
  background: rgba(15, 23, 42, 0.95);
  border: 3px solid #f43f5e;
  box-shadow: 0 0 40px rgba(244, 63, 94, 0.5), 0 15px 50px rgba(0, 0, 0, 0.7);
  border-radius: 18px;
  padding: 22px 28px;
  text-align: center;
  animation: monster-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes monster-appear {
  0% { transform: scale(0.6) translateY(-40px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}

.enemy-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 4px;
}

.enemy-tag {
  background: #f43f5e;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
}

.enemy-name { font-size: 20px; font-weight: 900; color: #fb7185; }
.enemy-title { font-size: 13px; color: #94a3b8; margin-bottom: 10px; }

.enemy-dialog {
  background: rgba(2, 6, 23, 0.8);
  border: 1.5px solid rgba(244, 63, 94, 0.4);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  color: #f1f5f9;
  font-weight: 700;
  margin-bottom: 10px;
}

.enemy-attack-banner {
  background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.15), transparent);
  color: #dc2626;
  font-size: 16px;
  font-weight: 900;
  padding: 6px;
}

/* ⚔️ バトル演出後の「詳細解説へ進む」決定ボタン */
.battle-proceed-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  border: 2px solid #38bdf8;
  color: #ffffff;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 900;
  padding: 8px 22px;
  border-radius: 9999px;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.5), 0 0 20px rgba(56, 189, 248, 0.4);
  cursor: pointer;
  animation: battle-btn-bounce 1.5s infinite ease-in-out;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

@keyframes battle-btn-bounce {
  0%, 100% { transform: translateY(0) scale(1); box-shadow: 0 4px 18px rgba(37, 99, 235, 0.5); }
  50% { transform: translateY(-3px) scale(1.04); box-shadow: 0 8px 25px rgba(56, 189, 248, 0.8); }
}

.battle-proceed-btn:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.9);
}

/* 成功時は敵カードの文言を残さない。盾の上に半端な文字が透けると、
   演出も本文も読めなくなるため、成功演出を一枚の画として見せる。 */
.rpg-battle-fx-layer.battle-success-active .enemy-monster-card {
  width: 0;
  max-width: none;
  min-height: 0;
  padding: 0;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  animation: none;
}

.rpg-battle-fx-layer.battle-success-active .enemy-header,
.rpg-battle-fx-layer.battle-success-active .enemy-title,
.rpg-battle-fx-layer.battle-success-active .enemy-dialog,
.rpg-battle-fx-layer.battle-success-active .enemy-attack-banner {
  display: none;
}

.rpg-battle-fx-layer.battle-success-active .battle-proceed-btn {
  position: absolute;
  left: 50%;
  bottom: 20px;
  z-index: 700;
  margin: 0;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: none;
}

.rpg-battle-fx-layer.battle-success-active .battle-proceed-btn:hover {
  transform: translateX(-50%) translateY(-2px) scale(1.04);
}

.slash-fx {
  position: absolute;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, transparent, #ffffff, #f43f5e, #ffffff, transparent);
  transform: rotate(-30deg) scaleX(1.4);
  box-shadow: 0 0 30px #f43f5e;
  animation: slash-anim 0.35s ease-out forwards;
}

@keyframes slash-anim {
  0% { transform: rotate(-30deg) scaleX(0.2); opacity: 1; }
  50% { transform: rotate(-30deg) scaleX(1.6); opacity: 1; }
  100% { transform: rotate(-30deg) scaleX(2.0); opacity: 0; }
}

/* ── 🛡️ Epic Super Holographic Shield & Parry FX ──────────────── */
.shield-fx {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 600;
  animation: shield-master-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes shield-master-pop {
  0% { transform: scale(0.2); opacity: 0; }
  50% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* Expanding Hologram Energy Ring */
.shield-energy-ring {
  position: absolute;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  border: 4px solid #38bdf8;
  box-shadow: 0 0 50px #38bdf8, inset 0 0 40px #0284c7;
  animation: energy-ring-expand 0.8s ease-out infinite;
}

@keyframes energy-ring-expand {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Hexagonal Matrix Core Shield */
.shield-hex-matrix {
  position: relative;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, rgba(37, 99, 235, 0.25) 70%, transparent 100%);
  border: 4px solid #67e8f9;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 0 60px rgba(56, 189, 248, 0.8),
    0 0 100px rgba(37, 99, 235, 0.6),
    inset 0 0 40px rgba(255, 255, 255, 0.6);
  transform: rotate(45deg);
  animation: hex-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes hex-pulse {
  0% { transform: rotate(45deg) scale(0.95); box-shadow: 0 0 40px rgba(56, 189, 248, 0.6); }
  100% { transform: rotate(45deg) scale(1.05); box-shadow: 0 0 80px rgba(56, 189, 248, 0.9); }
}

.hex-core {
  font-size: 110px;
  transform: rotate(-45deg);
  filter: drop-shadow(0 0 30px #ffffff) drop-shadow(0 0 60px #38bdf8);
}

.hex-glow-ring {
  position: absolute;
  inset: -12px;
  border: 2px dashed #fde047;
  border-radius: 30px;
  animation: rotate-dashed 4s linear infinite;
}

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

/* Electrified Sparks & Shock Burst */
.shield-sparks-burst {
  position: absolute;
  width: 500px;
  height: 500px;
  background: 
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, transparent 20%),
    radial-gradient(circle at 30% 70%, rgba(254, 240, 138, 0.8) 0%, transparent 15%),
    radial-gradient(circle at 70% 30%, rgba(56, 189, 248, 0.8) 0%, transparent 15%);
  animation: sparks-burst-anim 0.5s ease-out forwards;
}

@keyframes sparks-burst-anim {
  0% { transform: scale(0.1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.9; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* Huge Dramatic Gold & SkyBlue Text Banner */
.shield-text-banner {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: banner-slam 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes banner-slam {
  0% { transform: translateY(30px) scale(0.7); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.shield-sub-tag {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  padding: 3px 16px;
  border-radius: 20px;
  letter-spacing: 2px;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.5);
}

.shield-main-text {
  background: linear-gradient(180deg, #38bdf8 0%, #1d4ed8 100%);
  color: #ffffff;
  font-size: 26px;
  font-weight: 900;
  padding: 8px 28px;
  border: 3px solid #fde047;
  border-radius: 12px;
  box-shadow: 
    0 10px 30px rgba(37, 99, 235, 0.6),
    0 0 30px rgba(253, 224, 71, 0.8),
    inset 0 0 15px rgba(255, 255, 255, 0.5);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
  letter-spacing: 1px;
}

/* 小さめに収め、成功ボタンと安全な余白を確保する。 */
.rpg-battle-fx-layer.battle-success-active .shield-hex-matrix {
  width: 190px;
  height: 190px;
}

.rpg-battle-fx-layer.battle-success-active .hex-core {
  font-size: 88px;
}

.rpg-battle-fx-layer.battle-success-active .shield-text-banner {
  margin-top: 14px;
}

.rpg-battle-fx-layer.battle-success-active .shield-main-text {
  font-size: 22px;
  padding: 7px 22px;
}

.damage-popup {
  position: absolute;
  bottom: 25%;
  font-size: 30px;
  font-weight: 900;
  color: #ef4444;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: popup-float 0.8s ease-out forwards;
}

.damage-popup.block {
  color: #0284c7;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes popup-float {
  0% { transform: translateY(0) scale(0.8); opacity: 1; }
  50% { transform: translateY(-20px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-35px) scale(1); opacity: 0.9; }
}

/* ── 3. Final Result & Weekend Departure Screen (週末の退社判定リザルト) ── */
.ending-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.96) 0%, rgba(2, 6, 23, 0.98) 100%);
  text-align: center;
  position: relative;
  z-index: 10;
  overflow-y: auto;
}

.ending-content-box {
  width: 100%;
  max-width: 780px;
  background: rgba(11, 19, 43, 0.95);
  border: 3px solid #38bdf8;
  border-radius: 20px;
  padding: 22px 32px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  backdrop-filter: blur(12px);
  animation: modal-appear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.result-celebration-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.result-badge-top {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  padding: 3px 14px;
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.result-main-title {
  font-size: 22px;
  font-weight: 900;
  color: #f8fafc;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* 🎨 クリア・リザルトキャラクター丸枠（サイズ固定＆中央配置） */
.title-chara-box {
  width: 120px;
  height: 120px;
  min-width: 120px;
  min-height: 120px;
  max-width: 120px;
  max-height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #38bdf8;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  flex-shrink: 0;
}

#ending-chara-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ending-badge {
  font-size: 15px;
  font-weight: 900;
  color: #fde047;
  background: rgba(15, 23, 42, 0.8);
  border: 2px solid #f59e0b;
  padding: 6px 18px;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25);
}

.ending-score {
  font-size: 17px;
  font-weight: 900;
  color: #38bdf8;
}

.ending-message-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 12px;
  padding: 12px 18px;
  text-align: left;
  width: 100%;
}

.ending-message-label {
  font-size: 12px;
  font-weight: 900;
  color: #38bdf8;
  margin-bottom: 4px;
}

.ending-message {
  font-size: 13.5px;
  line-height: 1.65;
  color: #e2e8f0;
}

.ending-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  width: 100%;
}

.ending-actions .rpg-btn {
  font-size: 13.5px;
  padding: 9px 16px;
}

.btn-x-share {
  background: linear-gradient(180deg, #0f172a 0%, #020617 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #475569 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4) !important;
}

.btn-x-share:hover {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%) !important;
  border-color: #94a3b8 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
}

.btn-line-share {
  background: linear-gradient(180deg, #06c755 0%, #05a346 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #86efac !important;
  box-shadow: 0 4px 14px rgba(6, 199, 85, 0.35) !important;
}

.btn-line-share:hover {
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%) !important;
  border-color: #bbf7d0 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 199, 85, 0.55) !important;
}

.ending-note-credit {
  margin-top: 4px;
}

.note-credit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s;
  padding: 4px 12px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.note-credit-link:hover {
  color: #38bdf8;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
}

/* ── Feedback Modal (Marp 16:9 AI Assistant Slide - 完全修復) ────────── */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2500;
  padding: 16px;
}

.modal-content.modal-ai-slide {
  width: 960px;
  max-width: 94vw;
  aspect-ratio: 16 / 9;
  max-height: 86vh;
  max-height: 86dvh;
  background-color: #0b132b;
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  border: 2.5px solid #38bdf8;
  border-radius: 20px;
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(56, 189, 248, 0.4);
  padding: 20px 28px;
  display: flex;
  position: relative;
  overflow: hidden;
  animation: modal-appear 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-slide-left-content {
  width: 58%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  z-index: 2;
  min-height: 0;
}

.modal-slide-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(56, 189, 248, 0.4);
  padding-bottom: 8px;
  flex-shrink: 0;
}

.ai-badge {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  padding: 4px 12px;
  border-radius: 9999px;
  box-shadow: 0 0 15px rgba(14, 165, 233, 0.5);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.modal-header {
  font-size: 19px;
  font-weight: 900;
}
.modal-header.correct { color: #4ade80; text-shadow: 0 0 12px rgba(74, 222, 128, 0.5); }
.modal-header.wrong { color: #f87171; text-shadow: 0 0 12px rgba(248, 113, 113, 0.5); }

.ai-speech-card {
  background: rgba(15, 23, 42, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.5);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
  backdrop-filter: blur(8px);
}

.ai-speech-label {
  font-size: 12px;
  font-weight: 900;
  color: #38bdf8;
  margin-bottom: 2px;
}

.modal-comment {
  font-size: 14.5px;
  font-weight: 800;
  line-height: 1.45;
  color: #f8fafc;
}

.modal-explanation-box {
  background: rgba(15, 23, 42, 0.90);
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.modal-explanation-title {
  font-size: 13px;
  font-weight: 900;
  color: #fde047;
  flex-shrink: 0;
}

.modal-explanation-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
  font-weight: 600;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-start;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ══════════════════════════════════════════════════════════════════
   📝 Daily Summary & Debriefing Modal (1日の振り返り・防衛日報)
   ══════════════════════════════════════════════════════════════════ */
.modal-content.modal-daily-debrief {
  width: 920px;
  max-width: 95vw;
  max-height: 90vh;
  max-height: 90dvh;
  background: rgba(11, 19, 43, 0.96);
  border: 3px solid #38bdf8;
  border-radius: 20px;
  box-shadow: 
    0 25px 70px rgba(0, 0, 0, 0.85),
    0 0 40px rgba(56, 189, 248, 0.35);
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(16px);
  animation: modal-appear 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.daily-debrief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid rgba(56, 189, 248, 0.35);
  padding-bottom: 8px;
  flex-shrink: 0;
}

.debrief-badge {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  padding: 4px 14px;
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
}

.debrief-main-title {
  font-size: 18px;
  font-weight: 900;
  color: #f8fafc;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

/* AIちゃんスピーチカード */
.debrief-speech-card {
  display: flex;
  gap: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 14px;
  padding: 10px 16px;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.debrief-ai-avatar {
  width: 68px;
  height: 68px;
  min-width: 68px;
  min-height: 68px;
  border-radius: 50%;
  overflow: hidden;
  border: 2.5px solid #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4);
  background: #0f172a;
}

.debrief-ai-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.debrief-speech-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.debrief-speech-label {
  font-size: 12px;
  font-weight: 900;
  color: #38bdf8;
}

.debrief-speech-text {
  font-size: 13.5px;
  line-height: 1.5;
  color: #e2e8f0;
  font-weight: 600;
  white-space: pre-wrap;
}

/* 🎯 3つの鉄則カードリスト */
.debrief-takeaways-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.debrief-takeaways-title {
  font-size: 13.5px;
  font-weight: 900;
  color: #fde047;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.debrief-takeaways-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding-right: 4px;
}

.debrief-takeaways-list::-webkit-scrollbar {
  width: 6px;
}
.debrief-takeaways-list::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.4);
  border-radius: 3px;
}

.debrief-card-item {
  background: rgba(2, 6, 23, 0.88);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-left: 4px solid #38bdf8;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s ease;
}

.debrief-card-item:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #38bdf8;
  border-left-color: #fde047;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.25);
}

.debrief-card-item.expanded {
  border-color: #f59e0b;
  border-left-color: #f59e0b;
  background: rgba(11, 19, 43, 0.98);
}

.debrief-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.debrief-top-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.debrief-item-icon {
  font-size: 16px;
}

.debrief-item-tag {
  font-size: 12px;
  font-weight: 900;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.debrief-toggle-indicator {
  font-size: 11.5px;
  font-weight: 800;
  color: #94a3b8;
  transition: color 0.2s;
}

.debrief-card-item:hover .debrief-toggle-indicator {
  color: #fde047;
}

.debrief-card-item.expanded .debrief-toggle-indicator {
  color: #f59e0b;
}

.debrief-item-trap {
  font-size: 12.5px;
  color: #f87171;
  font-weight: 700;
}

.debrief-item-rule {
  font-size: 13px;
  color: #4ade80;
  font-weight: 800;
  line-height: 1.4;
}

/* 📖 クリックで展開する深掘り現場詳細パネル（メール本文風） */
.debrief-item-detail {
  display: none;
  margin-top: 8px;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.65;
  color: #e2e8f0;
  white-space: pre-wrap;
  animation: modal-appear 0.25s ease-out;
  cursor: text;
}

.debrief-card-item.expanded .debrief-item-detail {
  display: block;
}

/* 🌅 Epilogue Screen Styles (プロローグ準拠の大迫力シアター ＆ サンセットヒーロー) */
.epilogue-screen {
  background: radial-gradient(circle at center, #2e1065 0%, #1e1b4b 40%, #0f172a 80%, #020617 100%);
}

.epilogue-card {
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 60px rgba(245, 158, 11, 0.3), 0 25px 70px rgba(0, 0, 0, 0.95);
  background: rgba(15, 23, 42, 0.96);
}

.epilogue-header-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.epilogue-badge-sunset {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%) !important;
  color: #ffffff !important;
  border: 1px solid #fde047 !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.6);
  font-size: 13px !important;
  padding: 4px 18px !important;
}

.epilogue-title {
  font-size: 24px;
  font-weight: 900;
  color: #fef08a;
  text-shadow: 0 0 20px rgba(254, 240, 138, 0.6), 0 2px 8px rgba(0, 0, 0, 0.8);
  margin: 0;
  letter-spacing: 0.04em;
}

/* 🌇 サンセット・お疲れ様でした！ヒーローバナー */
.epilogue-hero-banner {
  position: relative;
  width: 100%;
  height: 140px;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 30px rgba(245, 158, 11, 0.2);
  margin-bottom: 14px;
  flex-shrink: 0;
}

.epilogue-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.epilogue-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(1.4) brightness(0.75);
}

.epilogue-sunset-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.75) 0%, rgba(124, 58, 237, 0.65) 60%, rgba(15, 23, 42, 0.85) 100%);
  mix-blend-mode: multiply;
}

.epilogue-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.1) 100%);
}

.epilogue-chara-glow {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  border: 3px solid #fde047;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 25px rgba(253, 224, 71, 0.8), 0 4px 14px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  animation: hero-glow-pulse 2s infinite ease-in-out;
}

@keyframes hero-glow-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(253, 224, 71, 0.8); }
  50% { transform: scale(1.04); box-shadow: 0 0 40px rgba(253, 224, 71, 1); }
}

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

.epilogue-hero-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.epilogue-cheer-tag {
  font-size: 11px;
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.15em;
  text-shadow: 0 0 8px rgba(253, 224, 71, 0.8);
}

.epilogue-cheer-main {
  font-size: 21px;
  font-weight: 900;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 20px rgba(245, 158, 11, 0.8);
  line-height: 1.3;
}

.epilogue-cheer-sub {
  font-size: 13px;
  font-weight: 600;
  color: #fde68a;
  margin: 0;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.epilogue-scroll-viewport {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(10, 15, 30, 0.7);
}

.epilogue-story-body {
  text-align: left;
  line-height: 1.85;
}

.epilogue-p-lead {
  font-size: 15.5px;
  font-weight: 700;
  color: #fef08a;
  border-left: 3.5px solid #f59e0b;
  padding-left: 14px;
}

.epilogue-highlight-p {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(234, 88, 12, 0.15) 100%) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
  font-size: 15.5px !important;
  font-weight: 700 !important;
  color: #fef08a !important;
  padding: 16px 20px !important;
  border-radius: 12px;
}

.epilogue-timeline {
  margin-top: 20px;
}

.btn-ending-hero {
  background: linear-gradient(135deg, #eab308 0%, #d97706 50%, #b45309 100%) !important;
  box-shadow: 0 0 35px rgba(234, 179, 8, 0.7), 0 8px 25px rgba(0, 0, 0, 0.7) !important;
  font-size: 19px !important;
  padding: 16px 40px !important;
}

.btn-ending-hero:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 0 50px rgba(254, 240, 138, 0.95), 0 12px 30px rgba(0, 0, 0, 0.8) !important;
}


/* 🏆 Ending Screen Fade-in & Personality Card */
.ending-screen {
  animation: ending-fade-in 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ending-fade-in {
  0% { opacity: 0; transform: scale(0.96) translateY(16px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.ending-personality-card {
  width: 100%;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  border: 2px solid #818cf8;
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  animation: personality-pop 0.6s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes personality-pop {
  0% { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}

.personality-card-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.personality-card-badge {
  font-size: 11px;
  font-weight: 900;
  color: #c7d2fe;
  background: rgba(99, 102, 241, 0.3);
  padding: 2px 10px;
  border-radius: 9999px;
  align-self: flex-start;
  border: 1px solid rgba(165, 180, 252, 0.4);
  letter-spacing: 0.05em;
}

.personality-type-title {
  font-size: 17px;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 0 12px rgba(253, 224, 71, 0.5);
  margin: 0;
}

.personality-feedback-text {
  font-size: 13px;
  line-height: 1.65;
  color: #f1f5f9;
  margin: 0;
}

/* Public distribution notice */
.public-use-notice {
  max-width: 720px;
  margin: 18px auto 0;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.72);
  color: #cbd5e1;
  font-size: 12px;
  line-height: 1.65;
  text-align: left;
}

.public-use-notice strong,
.public-use-notice span {
  display: block;
}

.public-use-notice strong {
  color: #f8fafc;
  margin-bottom: 3px;
}
