/* MONEY Gradient Core Stylesheet - Phase MG-P1.1R.2 Mobile Width Fix */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+JP:wght@400;500;700;900&family=Outfit:wght@600;700;800&display=swap');

:root {
  /* Design Tokens */
  --font-primary: 'Noto Sans JP', 'Inter', sans-serif;
  --font-display: 'Outfit', 'Noto Sans JP', sans-serif;

  /* Zone Colors */
  --zone-deep-blue: #1E3A8A;
  --zone-blue: #2563EB;
  --zone-green: #059669;
  --zone-yellow: #D97706;
  --zone-orange: #EA580C;
  --zone-red: #DC2626;

  /* Theme Colors - Quiet Editorial Dark Theme */
  --bg-dark: #0B132B;
  --bg-card: rgba(30, 41, 59, 0.75);
  --bg-card-hover: rgba(51, 65, 85, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.12);
  --border-active: rgba(255, 255, 255, 0.35);

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --accent-gold: #F59E0B;

  /* Layout */
  --container-max: 1360px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Global Text Word Wrap Safety */
h1, h2, h3, h4, p, span, div, strong, a, button {
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 3px solid #60A5FA;
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header & Compact Top Section */
.app-header {
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(11, 19, 43, 0.92);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  width: 100%;
}

.brand-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  min-width: 0;
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFF;
}

.brand-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

/* Main Container */
.main-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem 1rem 3rem;
  width: 100%;
}

/* Compact Hero Header - Prioritizing Map Position */
.hero-block-compact {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
}

.hero-titles {
  max-width: 800px;
  min-width: 0;
  flex: 1 1 280px;
}

.hero-main-copy-sm {
  font-size: clamp(1.25rem, 2.5vw, 1.85rem);
  font-weight: 900;
  line-height: 1.3;
  color: #FFF;
}

.hero-sub-copy-sm {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  line-height: 1.5;
}

.principle-pill-sm {
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: #F1F5F9;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Integrated Notice Banner in Map Section */
.integrated-notice-card {
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-left: 4px solid var(--accent-gold);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 0.82rem;
  color: #E2E8F0;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  width: 100%;
  box-sizing: border-box;
}

.integrated-notice-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.integrated-notice-text {
  min-width: 0;
  flex: 1;
  line-height: 1.5;
}

.integrated-notice-text strong {
  color: var(--accent-gold);
}

/* Modal Overlay Component */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 43, 0.88);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 1rem;
  box-sizing: border-box;
  width: 100vw;
}

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

.modal-card {
  background: #1E293B;
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(15px);
  transition: transform var(--transition-normal);
  padding: 1.5rem;
  position: relative;
  box-sizing: border-box;
  min-width: 0;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--text-primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
  z-index: 10;
}

.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.75rem 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  width: 100%;
}

.footer-disclaimer {
  font-size: 0.75rem;
  max-width: 750px;
  margin: 0.5rem auto 0;
  line-height: 1.5;
}

/* Responsive Overrides (<768px) */
@media (max-width: 768px) {
  .main-content {
    padding: 0.6rem 0.6rem 2rem;
  }
  .hero-block-compact {
    margin-bottom: 0.6rem;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
  }
  .hero-main-copy-sm {
    font-size: 1.25rem;
  }
  .integrated-notice-card {
    padding: 0.55rem 0.75rem;
    gap: 0.4rem;
  }
  .modal-overlay {
    padding: 0.5rem;
  }
  .modal-card {
    padding: 1rem 0.85rem;
    max-height: 92vh;
    border-radius: var(--radius-md);
  }
}
