/* === 帝国入境所 - Immigration Checkpoint Theme === */
/* Color Palette: stamp-ink reds + passport-navy blues on light official bg */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700;900&family=Noto+Serif+SC:wght@400;600;700;900&display=swap');

:root {
  --bg: #faf8f5;
  --bg-card: #ffffff;
  --bg-alt: #f5f2ec;
  --text: #1a1a2e;
  --text-soft: #4a4a5e;
  --text-muted: #7a7a8e;
  --ink-red: #c41e3a;
  --ink-red-dark: #8b1a2b;
  --ink-red-light: #e8505b;
  --navy: #1a1a3e;
  --navy-dark: #0d0d26;
  --navy-mid: #2a2a5e;
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --border-light: #e8e4dc;
  --border-mid: #d4cec4;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Noto Serif SC', 'SimSun', 'STSong', serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(26, 26, 62, 0.08);
  --shadow-md: 0 4px 12px rgba(26, 26, 62, 0.1);
  --shadow-lg: 0 8px 24px rgba(26, 26, 62, 0.12);
  --header-h: 64px;
  --max-w: 1200px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    linear-gradient(rgba(196, 30, 58, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 30, 58, 0.015) 1px, transparent 1px);
  background-size: 40px 40px;
}

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

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* === Links === */
a {
  color: var(--ink-red);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--ink-red-dark);
}

/* === Header === */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--navy);
  border-bottom: 3px solid var(--ink-red);
  height: var(--header-h);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo img {
  height: 36px;
  width: auto;
  border-radius: 4px;
}

.logo span {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 22px;
  background: var(--ink-red);
  color: #fff;
  font-weight: 700;
  font-size: 0.92rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  letter-spacing: 0.03em;
}

.header-cta:hover {
  background: var(--ink-red-light);
  color: #fff;
  transform: translateY(-1px);
}

.header-cta::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* === Nav === */
nav.main-nav {
  background: var(--navy-mid);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-inner a {
  display: block;
  padding: 10px 18px;
  color: rgba(255,255,255,0.78);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-inner a:hover,
.nav-inner a.active {
  color: #fff;
  border-bottom-color: var(--ink-red);
}

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-mid) 100%);
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(201,168,76,0.04) 0px, rgba(201,168,76,0.04) 1px, transparent 1px, transparent 30px),
    repeating-linear-gradient(90deg, rgba(201,168,76,0.04) 0px, rgba(201,168,76,0.04) 1px, transparent 1px, transparent 30px);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 4px;
  background: var(--gold);
  border-radius: 0 0 4px 4px;
  box-shadow: 0 0 20px rgba(201,168,76,0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--gold-light);
  font-weight: 400;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.hero-tagline {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 24px;
  opacity: 0.9;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.hero-meta span {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 20px;
  color: var(--gold-light);
  font-size: 0.85rem;
  background: rgba(201,168,76,0.08);
}

.hero-meta-hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--ink-red);
  border-radius: 20px;
  color: var(--ink-red-light);
  font-size: 0.85rem;
  background: rgba(196,30,58,0.12);
}

/* === Hero Image (sub-pages) === */
.hero-sub {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-mid) 100%);
  padding: 48px 24px 36px;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-sub::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 0 16px rgba(201,168,76,0.35);
}

.hero-sub .hero-title {
  font-size: 2.2rem;
}

/* === Main Content === */
main {
  flex: 1;
}

.content-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
}

.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.content-section .section-lead {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: 36px;
  max-width: 700px;
}

/* === Feature Cards === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin: 36px 0;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--ink-red);
  transition: box-shadow 0.25s, transform 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-card .fc-icon {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
}

.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* === Screenshot Gallery === */
.gallery {
  margin: 40px 0;
}

.gallery h2 {
  margin-bottom: 20px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.gallery-grid a {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-grid a:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}

.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* === Lightbox === */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 2;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.3);
}

/* === CTA Banner (index only) === */
.cta-banner {
  margin: 48px 0;
  padding: 48px 32px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2);
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(196,30,58,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(201,168,76,0.1) 0%, transparent 50%);
}

.cta-banner h2 {
  position: relative;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.cta-banner p {
  position: relative;
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.cta-banner .btn-download {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 40px;
  background: var(--ink-red);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(196,30,58,0.3);
}

.cta-banner .btn-download:hover {
  background: var(--ink-red-light);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(196,30,58,0.45);
}

/* === Player Reviews === */
.reviews {
  margin: 40px 0;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.review-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--gold);
}

.review-card .review-stars {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.review-card .review-text {
  color: var(--text-soft);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.65;
  margin-bottom: 12px;
}

.review-card .review-author {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.review-card .review-source {
  color: var(--text-muted);
  font-size: 0.78rem;
  opacity: 0.7;
}

/* === Game Info Cards === */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin: 36px 0;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.info-card .info-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.info-card .info-value {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}

/* === Guide Page === */
.guide-intro {
  color: var(--text-soft);
  margin-bottom: 16px;
  line-height: 1.75;
}

.guide-section {
  margin-bottom: 36px;
}

.guide-section h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 10px;
}

.guide-section h3::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--ink-red);
  border-radius: 50%;
  flex-shrink: 0;
}

.tip-box {
  background: var(--bg-alt);
  border-left: 4px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin: 16px 0;
}

.tip-box strong {
  color: var(--navy);
}

.route-heading {
  font-family: var(--font-serif);
  color: var(--navy);
  margin: 24px 0 10px;
  font-size: 1.1rem;
  font-weight: 700;
}

.route-desc {
  color: var(--text-soft);
  margin-bottom: 16px;
  line-height: 1.7;
}

/* === Story Page === */
.chapter-title {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--navy);
  font-size: 1.1rem;
  margin-top: 16px;
  margin-bottom: 6px;
}

.story-intro {
  color: var(--text-soft);
  line-height: 1.75;
  margin-bottom: 20px;
  font-size: 1rem;
}

.story-block {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 20px 0;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--ink-red);
}

.story-block h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}

.story-block p {
  color: var(--text-soft);
  line-height: 1.7;
}

/* === Characters Page === */
.chars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin: 36px 0;
}

.char-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.25s, transform 0.2s;
}

.char-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.char-card .char-avatar {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: var(--bg-alt);
}

.char-card .char-body {
  padding: 20px;
}

.char-card .char-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}

.char-card .char-role {
  font-size: 0.82rem;
  color: var(--ink-red);
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.char-card .char-desc {
  color: var(--text-soft);
  font-size: 0.9rem;
  line-height: 1.65;
  margin-bottom: 12px;
}

.char-card .char-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.char-card .char-trait {
  font-size: 0.75rem;
  padding: 3px 10px;
  background: var(--bg-alt);
  border: 1px solid var(--border-mid);
  border-radius: 12px;
  color: var(--text-soft);
}

/* === FAQ Accordion === */
.faq-list {
  margin: 36px 0;
}

.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  background: var(--bg-card);
}

.faq-question {
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--bg-alt);
}

.faq-question::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--ink-red);
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq-item.open .faq-question::after {
  content: '−';
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.7;
}

/* === System Requirements Table === */
.sys-req {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
}

.sys-req thead th {
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.sys-req tbody td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-soft);
}

.sys-req tbody tr:nth-child(even) {
  background: var(--bg-alt);
}

.sys-req tbody td:first-child {
  font-weight: 600;
  color: var(--navy);
  white-space: nowrap;
}

/* === Footer === */
footer.site-footer {
  background: var(--navy-dark);
  padding: 24px;
  text-align: center;
  border-top: 2px solid var(--ink-red);
}

footer.site-footer p {
  color: rgba(255,255,255,0.55);
  font-size: 0.82rem;
}

/* === Game Intro Section (index) === */
.game-intro {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 36px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.game-intro p {
  color: var(--text-soft);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* === Typography helpers === */
p.lead-text {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 16px;
}

hr.section-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 36px 0;
}

/* === Responsive === */
@media (max-width: 768px) {
  :root {
    --header-h: 56px;
  }

  .hero {
    padding: 56px 20px 40px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-sub .hero-title {
    font-size: 1.6rem;
  }

  .content-section h2 {
    font-size: 1.6rem;
  }

  .features-grid,
  .chars-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .cta-banner {
    padding: 32px 20px;
  }

  .cta-banner h2 {
    font-size: 1.3rem;
  }

  .cta-banner .btn-download {
    padding: 12px 32px;
    font-size: 0.95rem;
  }

  .nav-inner {
    gap: 2px;
  }

  .nav-inner a {
    padding: 8px 12px;
    font-size: 0.82rem;
  }

  .logo span {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .hero-sub .hero-title {
    font-size: 1.3rem;
  }

  .content-section {
    padding: 32px 16px;
  }

  .content-section h2 {
    font-size: 1.35rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    padding: 0 12px;
  }

  .header-cta {
    padding: 6px 14px;
    font-size: 0.8rem;
  }
}
