/* ==================================================
   生態系ウォーズ LP - Main stylesheet
   ================================================== */

:root {
  --bg: #F5EFE0;
  --bg-alt: #EBE2CB;
  --paper: #FAF6EA;
  --ink: #0F0B07;
  --ink-soft: #2A2419;
  --muted: #5A4F3F;
  --line: #0F0B07;
  --card-bg: #FFFFFF;
  --accent-yellow: #FFC21A;
  --accent-orange: #FF7A1A;
  --accent-red: #E6421A;
  --forest: #0B3D2E;
  --forest-soft: #1E6B4F;
  --ocean: #0B2E4B;
  --ocean-soft: #1A6FBF;
  --sunset: #FF7A1A;
  --shadow-hard: 4px 4px 0 var(--line);
  --shadow-hard-lg: 8px 8px 0 var(--line);
  --halftone-color: rgba(26, 22, 18, 0.18);
}

html[data-theme="bright"] {
  --bg: #FFF8DC;
  --bg-alt: #FFE9A8;
  --paper: #FFFFFF;
  --halftone-color: rgba(230, 66, 26, 0.22);
}

html[data-theme="dark"] {
  --bg: #14100C;
  --bg-alt: #1F1812;
  --paper: #1F1812;
  --ink: #F5EFE0;
  --ink-soft: #D8CCB4;
  --muted: #8F8472;
  --line: #000000;
  --card-bg: #251E16;
  --halftone-color: rgba(255, 194, 26, 0.22);
}

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

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Zen Kaku Gothic New', system-ui, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body { overflow-x: hidden; }

.mono { font-family: 'DotGothic16', monospace; letter-spacing: 0.02em; }

.pop-heading { font-family: 'Zen Antique', serif; font-weight: 400; line-height: 1.15; }

.halftone { background-image: radial-gradient(var(--halftone-color) 1.4px, transparent 1.8px); background-size: 8px 8px; }

.section { position: relative; padding: 120px 6vw; }
.container { max-width: 1280px; margin: 0 auto; }

.pop-btn {
  font-family: 'Zen Antique', serif;
  font-size: 20px;
  font-weight: 700;
  color: #0F0B07;
  background: var(--accent-yellow);
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 16px 32px;
  cursor: pointer;
  box-shadow: var(--shadow-hard);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.pop-btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--line); }
.pop-btn:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); }
.pop-btn.orange { background: var(--accent-orange); color: #fff; }
.pop-btn.ghost { background: transparent; color: var(--ink); }
.pop-btn.dark { background: var(--ink); color: var(--accent-yellow); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DotGothic16', monospace; font-size: 12px;
  padding: 4px 10px; background: var(--ink); color: var(--accent-yellow);
  border-radius: 4px; letter-spacing: 0.1em;
}

.section-label {
  display: inline-block; font-family: 'DotGothic16', monospace;
  font-size: 14px; padding: 6px 14px; border: 2px solid var(--line);
  border-radius: 999px; background: var(--paper); color: var(--ink);
  margin-bottom: 24px;
}

.section-title {
  font-family: 'Zen Antique', serif;
  font-size: clamp(40px, 6vw, 72px);
  color: var(--ink); line-height: 1.05; margin-bottom: 20px;
}

.section-subtitle {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--ink-soft); max-width: 600px; line-height: 1.7;
}

/* Navigation */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 4vw;
  background: rgba(245, 239, 224, 0.85);
  backdrop-filter: blur(8px); border-bottom: 2px solid var(--line);
}

html[data-theme="dark"] .nav { background: rgba(20, 16, 12, 0.85); }
html[data-theme="bright"] .nav { background: rgba(255, 248, 220, 0.9); }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a { color: var(--ink); font-weight: 700; text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: var(--accent-orange); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* Hero */
.hero {
  position: relative; min-height: 100vh;
  padding: 140px 6vw 80px; overflow: hidden; background: var(--bg);
}

.hero-halftone-top {
  position: absolute; top: 0; left: 0; right: 0; height: 50%;
  background-image: radial-gradient(var(--halftone-color) 2px, transparent 2.4px);
  background-size: 10px 10px;
  -webkit-mask: linear-gradient(180deg, black 0%, transparent 100%);
          mask: linear-gradient(180deg, black 0%, transparent 100%);
  pointer-events: none;
}

.hero-grid {
  position: relative; display: grid;
  grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  max-width: 1280px; margin: 0 auto;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }

.hero-catch {
  font-family: 'Zen Antique', serif;
  font-size: clamp(28px, 4.5vw, 52px); line-height: 1.2;
  color: var(--ink); margin: 24px 0 16px;
}

.hero-catch .hl {
  background: linear-gradient(180deg, transparent 60%, var(--accent-yellow) 60%);
  padding: 0 4px;
}

.hero-sub {
  font-size: 17px; line-height: 1.8; color: var(--ink-soft);
  max-width: 520px; margin-bottom: 28px;
}

.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stage {
  position: relative; height: 500px; display: grid; place-items: center;
  overflow: hidden;
  width: 100%;
}

.hero-card-stack {
  position: relative;
  width: 460px; height: 420px;
  margin: 0 auto;
  /* The shared hinge sits well below the cards — gives a true fan arc */
  perspective: 1200px;
}

.hero-card {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 220px; height: 308px;
  margin-left: -110px;
  transform-origin: 50% 140%;     /* pivot below the card → arches the fan */
  transition: transform 0.55s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}

/* Symmetric fan: −22° / 0° / +22° around a shared hinge */
.hero-card:nth-child(1) { transform: rotate(-17deg); z-index: 1; }
.hero-card:nth-child(2) { transform: rotate(  0deg); z-index: 2; }
.hero-card:nth-child(3) { transform: rotate( 17deg); z-index: 3; }

/* Lift the hovered card straight up & flatten its angle */
.hero-card:hover { transform: rotate(0deg) translateY(-24px) scale(1.04); z-index: 10; }

.hero-card-back,
.hero-card-real {
  width: 100%; aspect-ratio: 5/7;
  border: 3px solid var(--line);
  border-radius: 14px;
  box-shadow: 5px 5px 0 var(--line);
  overflow: hidden;
  background: #0B2E4B;
}
.hero-card-real { background: #fff; }
.hero-card-back img,
.hero-card-real img,
.hero-card-real video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.hero-stamp {
  position: absolute; top: 40px; right: -10px;
  width: 130px; height: 130px; border-radius: 50%;
  background: var(--accent-red); color: #fff;
  font-family: 'Zen Antique', serif;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  font-size: 17px; line-height: 1;
  border: 3px solid var(--line); transform: rotate(-12deg);
  box-shadow: var(--shadow-hard); z-index: 10;
}
.hero-stamp span { display: block; }
.hero-stamp span + span { margin-top: -1px; }

/* TCG Card */
.tcg-card {
  width: 100%; aspect-ratio: 5/7;
  background: var(--card-bg);
  border: 3px solid var(--line); border-radius: 6px;
  box-shadow: 5px 5px 0 var(--line);
  overflow: hidden; position: relative;
  display: flex; flex-direction: column;
  cursor: pointer; transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tcg-card:hover { transform: translate(-3px, -5px); box-shadow: 8px 10px 0 var(--line); }

.tcg-card-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 10px 4px; font-family: 'DotGothic16', monospace; font-size: 12px;
  border-bottom: 2px solid var(--line);
}

.tcg-card-name { font-family: 'Zen Antique', serif; font-size: 14px; line-height: 1; }

.tcg-card-art {
  flex: 1; position: relative; overflow: hidden;
  display: grid; place-items: center;
  background-size: cover; background-position: center;
}

.tcg-card-art-placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  font-family: 'DotGothic16', monospace; font-size: 11px;
  color: rgba(255,255,255,0.9); text-align: center; padding: 8px;
}

.tcg-card-stats {
  background: var(--paper); padding: 10px;
  border-top: 2px solid var(--line);
  font-size: 12px; color: var(--ink); line-height: 1.4;
}

.tcg-card-tag {
  position: absolute; top: 0; right: 0; padding: 4px 8px;
  font-family: 'DotGothic16', monospace; font-size: 10px;
  background: var(--ink); color: var(--accent-yellow);
  border-bottom-left-radius: 8px;
}

.tcg-card .rarity { display: flex; gap: 3px; align-items: center; }
.tcg-card .rarity-star {
  width: 12px; height: 12px; background: var(--accent-yellow);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* Gameplay */
.gameplay {
  position: relative; background: var(--forest);
  color: #fff; padding: 120px 6vw; overflow: hidden;
}
.gameplay .section-title { color: #fff; }
.gameplay .section-subtitle { color: rgba(255,255,255,0.75); }
.gameplay .section-label { background: rgba(255,255,255,0.1); border-color: #fff; color: #fff; }

.gameplay-halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,194,26,0.15) 1.2px, transparent 1.8px);
  background-size: 14px 14px; pointer-events: none;
}

.step-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px; margin-top: 60px;
}
@media (max-width: 860px) { .step-grid { grid-template-columns: 1fr; } }

.step-card {
  background: var(--paper); color: var(--ink);
  border: 3px solid var(--line); border-radius: 16px;
  padding: 28px 24px; box-shadow: var(--shadow-hard-lg);
  position: relative; transform: rotate(var(--rot, 0deg));
  transition: transform 0.25s ease;
}
.step-card:hover { transform: rotate(0) translate(-2px, -4px); }

.step-number {
  position: absolute; top: -24px; left: -12px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-orange); color: #fff;
  font-family: 'Zen Antique', serif; font-size: 28px;
  display: grid; place-items: center;
  border: 3px solid var(--line); box-shadow: var(--shadow-hard);
}

.step-title { font-family: 'Zen Antique', serif; font-size: 24px; margin-bottom: 10px; }
.step-desc { font-size: 14px; line-height: 1.7; color: var(--ink-soft); }

/* Gallery */
.gallery-filter {
  display: flex; gap: 10px; flex-wrap: wrap; margin: 32px 0 40px;
}
.gallery-filter button {
  font-family: 'Zen Antique', serif; font-size: 14px; font-weight: 700;
  padding: 8px 18px; background: #FFFFFF; color: #0F0B07;
  border: 2px solid var(--line); border-radius: 999px;
  cursor: pointer; transition: all 0.15s ease;
  box-shadow: 3px 3px 0 var(--line);
}
.gallery-filter button:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); }
.gallery-filter button.active { background: var(--ink); color: var(--accent-yellow); }

.gallery-filter-series { margin-top: -24px; margin-bottom: 40px; }
.gallery-filter-series button.series-pill {
  border-color: #0F0B07;
}
.gallery-filter-series .series-pill-starter { background: #FFD93D; color: #0F0B07; }
.gallery-filter-series .series-pill-promo   { background: #FF5A4E; color: #FFFFFF; }
.gallery-filter-series .series-pill-v1      { background: #4FA3D1; color: #FFFFFF; }
.gallery-filter-series .series-pill-v2      { background: #6FB76A; color: #FFFFFF; }
.gallery-filter-series .series-pill-v3      { background: #B279C7; color: #FFFFFF; }
.gallery-filter-series button.active {
  outline: 3px solid #0F0B07; outline-offset: 2px;
}

/* Series badge color variants */
.flip-back .series-badge.series-starter { background: #FFD93D; color: #0F0B07; }
.flip-back .series-badge.series-promo   { background: #FF5A4E; color: #FFFFFF; }
.flip-back .series-badge.series-v1      { background: #4FA3D1; color: #FFFFFF; }
.flip-back .series-badge.series-v2      { background: #6FB76A; color: #FFFFFF; }
.flip-back .series-badge.series-v3      { background: #B279C7; color: #FFFFFF; }

.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 28px; perspective: 1500px;
}

.gallery-cell { position: relative; }
.gallery-cell:nth-child(4n+1) { transform: rotate(-1.5deg); }
.gallery-cell:nth-child(4n+2) { transform: rotate(1deg); }
.gallery-cell:nth-child(4n+3) { transform: rotate(-0.5deg); }

/* Faded preview row + gradient + "もっと見る" CTA */
.gallery-grid-wrap { position: relative; }
.gallery-cell.is-faded {
  filter: blur(2px) saturate(0.85);
  opacity: 0.45;
  pointer-events: none;
  user-select: none;
}
.gallery-cell.is-faded:nth-child(n) { transform: rotate(0); }
.gallery-fade {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 320px;
  pointer-events: none;
  background: linear-gradient(180deg,
    transparent 0%,
    var(--bg) 75%,
    var(--bg) 100%);
  z-index: 2;
}
.gallery-more {
  position: absolute; left: 0; right: 0; bottom: 24px;
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
  padding: 0 20px;
}
.gallery-more-meta {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.gallery-more-count {
  font-family: 'Zen Antique', serif;
  font-size: 32px;
  color: var(--accent-orange);
  letter-spacing: 0.02em;
}
.gallery-more-sub {
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.gallery-more-btn { font-size: 14px; }
@media (max-width: 720px) {
  .gallery-fade { height: 220px; }
  .gallery-more-count { font-size: 24px; }
}

.flip-card {
  position: relative; width: 100%; aspect-ratio: 5/7;
  perspective: 1500px; cursor: pointer;
}
.flip-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.6s cubic-bezier(.22,1,.36,1);
  transform-style: preserve-3d;
}

.flip-face {
  position: absolute; inset: 0;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border-radius: 6px; overflow: hidden;
}

.flip-back {
  transform: rotateY(180deg);
  background: #0F0B07; color: var(--accent-yellow);
  border: 3px solid #0F0B07; padding: 12px 14px 14px;
  font-family: 'DotGothic16', monospace; font-size: 12px; line-height: 1.6;
  box-shadow: 5px 5px 0 #0F0B07;
  display: flex; flex-direction: column; gap: 6px;
}

.flip-back h4 { font-family: 'Zen Antique', serif; font-size: 20px; color: #FFFFFF; line-height: 1.2; }
.flip-back .kanji { color: var(--accent-orange); font-size: 11px; }
.flip-back .desc-body { color: #FFFFFF; }
.flip-back .meta { color: var(--accent-orange); }
.flip-back .series-badge {
  align-self: flex-start;
  font-family: 'DotGothic16', monospace; font-size: 8px;
  letter-spacing: 0.1em;
  padding: 2px 6px;
  background: var(--accent-yellow); color: #0F0B07;
  border: 1.5px solid #FFFFFF;
  border-radius: 2px;
  margin: -2px 0 -4px;
}

.flip-hint {
  position: absolute; bottom: 10px; right: 10px;
  font-family: 'DotGothic16', monospace; font-size: 10px;
  color: rgba(255,255,255,0.7); letter-spacing: 0.15em;
}

/* Lineup */
.lineup {
  background: var(--bg-alt); padding: 120px 6vw;
  border-top: 3px solid var(--line); border-bottom: 3px solid var(--line);
  position: relative;
}

.lineup-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 28px; margin-top: 60px;
}
@media (max-width: 900px) { .lineup-grid { grid-template-columns: 1fr; } }

.product-card {
  background: var(--paper); border: 3px solid var(--line);
  border-radius: 18px; padding: 28px;
  box-shadow: var(--shadow-hard-lg); position: relative;
  transition: transform 0.2s ease;
}
.product-card:hover { transform: translate(-2px, -4px); }
.product-card.featured { background: var(--ink); color: #fff; }
.product-card.featured .product-name, .product-card.featured .product-price { color: #fff; }
.product-card.featured .product-spec { color: rgba(255,255,255,0.7); }

.product-flag {
  position: absolute; top: -16px; right: 20px;
  padding: 6px 14px; background: var(--accent-red); color: #fff;
  font-family: 'Zen Antique', serif; font-size: 14px;
  border: 2px solid var(--line); border-radius: 4px;
  transform: rotate(3deg);
}

.product-visual {
  aspect-ratio: 4/3; background: var(--bg);
  border: 2px solid var(--line); border-radius: 12px;
  margin-bottom: 20px; position: relative; overflow: hidden;
}

.product-card.featured .product-visual { background: var(--forest); }

.product-name { font-family: 'Zen Antique', serif; font-size: 26px; line-height: 1.2; margin-bottom: 8px; }
.product-spec { font-family: 'DotGothic16', monospace; font-size: 13px; color: var(--muted); margin-bottom: 14px; line-height: 1.6; }
.product-price { font-family: 'Zen Antique', serif; font-size: 32px; color: var(--ink); }
.product-price .tax { font-size: 13px; color: var(--muted); margin-left: 6px; font-family: 'DotGothic16', monospace; }

.release-bar {
  margin-top: 60px; padding: 32px;
  background: var(--ink); color: var(--accent-yellow);
  border: 3px solid var(--line); border-radius: 20px;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 20px;
  box-shadow: var(--shadow-hard-lg); position: relative; overflow: hidden;
}

.release-bar::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,194,26,0.12) 1px, transparent 1.6px);
  background-size: 10px 10px; pointer-events: none;
}

.release-bar-date {
  font-family: 'Zen Antique', serif;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--accent-yellow); line-height: 1;
}

.release-bar-date small {
  display: block; font-size: 14px; color: #fff;
  margin-top: 8px; font-family: 'DotGothic16', monospace;
}

/* Gym Leaders */
.leaders {
  position: relative;
  background: #0F0B07;
  color: #F5EFE0;
  padding: 130px 6vw 120px;
  overflow: hidden;
}
.leaders .container { position: relative; z-index: 2; }
.leaders-halftone {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,194,26,0.10) 1.2px, transparent 1.8px);
  background-size: 14px 14px;
  pointer-events: none;
  z-index: 1;
}
.leaders .section-header { color: #F5EFE0; }
.leaders .section-header h2 { color: #F5EFE0; }
.leaders .section-header .label { color: #FFC21A; }
.leaders .section-header .subtitle { color: rgba(245,239,224,0.78); }
.hide-sp { }
@media (max-width: 720px) { .hide-sp { display: none; } }

.leaders-stage {
  position: relative;
  margin-top: 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}
.leaders-arrow {
  width: 56px; height: 56px;
  border: 3px solid #FFC21A;
  background: transparent;
  color: #FFC21A;
  font-family: 'DotGothic16', monospace;
  font-size: 22px; line-height: 1;
  cursor: pointer;
  z-index: 4;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.leaders-arrow:hover:not(:disabled) {
  background: #FFC21A; color: #0F0B07;
  transform: translateY(-2px);
}
.leaders-arrow:disabled { opacity: 0.25; cursor: not-allowed; }

.leaders-track {
  display: flex; gap: 28px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 12px 4px 28px;
  scroll-padding: 0 calc(50% - 280px);
}
.leaders-track::-webkit-scrollbar { display: none; }

.leader-card {
  flex: 0 0 560px;
  scroll-snap-align: center;
  background: transparent;
  color: #0F0B07;
  border: none;
  box-shadow: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.6;
  transform: scale(0.96);
  perspective: 2000px;
  cursor: pointer;
}
.leader-card.is-active {
  opacity: 1;
  transform: scale(1);
}
.leader-card:focus-visible { outline: 3px solid var(--accent-yellow); outline-offset: 4px; }

.leader-flip {
  display: grid;
  grid-template-columns: 1fr;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(.7,-0.05,.3,1.05);
  transform: rotateY(0deg);
}
.leader-card.is-flipped .leader-flip { transform: rotateY(180deg); }

.leader-face {
  grid-column: 1; grid-row: 1;
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
  background: #FAF6EA;
  border: 3px solid #FFC21A;
  box-shadow: 8px 8px 0 #E6421A;
  transition: box-shadow 0.3s ease;
}
.leader-card.is-active .leader-face { box-shadow: 12px 12px 0 #E6421A; }

.leader-face-front {
  display: grid;
  grid-template-columns: 280px 1fr;
}
.leader-face-back {
  transform: rotateY(180deg);
  display: grid;
  grid-template-columns: 1fr;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.leader-back-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: rgba(0,0,0,0.25);
}
.leader-back-image-full {
  aspect-ratio: auto;
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: #0F0B07;
}
.leader-back-image-full img {
  width: 100%; height: 100%; object-fit: contain; display: block;
}
.leader-back-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.leader-back-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: 'DotGothic16', monospace; font-size: 12px;
  color: rgba(255,255,255,0.7); letter-spacing: 0.18em;
}

.leader-back-body {
  padding: 22px 22px 48px;
  display: flex; flex-direction: column; gap: 12px;
  background: rgba(15, 11, 7, 0.78);
}
.leader-back-tag {
  font-family: 'DotGothic16', monospace; font-size: 11px;
  letter-spacing: 0.18em; color: var(--accent-yellow);
}
.leader-back-name { display: flex; flex-direction: column; gap: 4px; line-height: 1.1; }
.leader-back-name .leader-class {
  font-family: 'DotGothic16', monospace; font-size: 12px;
  letter-spacing: 0.16em; color: rgba(255,255,255,0.7);
}
.leader-back-name .leader-given {
  font-family: 'Zen Antique', serif; font-size: 30px;
  color: var(--accent-yellow);
}
.leader-story {
  margin-top: 6px;
  border-top: 1.5px dashed rgba(255,255,255,0.25);
  padding-top: 12px;
}
.leader-story-heading {
  font-family: 'Zen Antique', serif; font-size: 14px;
  color: var(--accent-yellow);
  margin-bottom: 8px;
  letter-spacing: 0.08em;
}
.leader-story-body {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 12px; line-height: 1.85; color: rgba(255,255,255,0.92);
}

.leader-flip-hint {
  position: absolute; bottom: 10px; left: 14px;
  font-family: 'DotGothic16', monospace; font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.85);
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  z-index: 2;
  pointer-events: none;
}
.leader-flip-hint-back {
  bottom: 14px; left: auto; right: 16px;
  color: rgba(255,255,255,0.7);
}

.leader-portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.leader-portrait img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.leader-portrait-placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,0.85);
}
.leader-portrait-glyph {
  font-family: 'Zen Antique', serif;
  font-size: 96px;
  line-height: 1;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.leader-portrait-note {
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  background: rgba(0,0,0,0.4);
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.4);
}

.leader-body {
  padding: 22px 22px 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.leader-tag {
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: #E6421A;
}
.leader-name {
  margin: 0; font-family: 'Zen Antique', serif;
  display: flex; flex-direction: column; gap: 4px;
  line-height: 1.1;
}
.leader-class {
  font-size: 14px;
  font-family: 'DotGothic16', monospace;
  letter-spacing: 0.08em;
  color: #2A2419;
}
.leader-given {
  font-size: 36px;
  letter-spacing: 0.04em;
  color: #0F0B07;
}
.leader-desc {
  margin: 4px 0 0;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 13px;
  line-height: 1.7;
  color: #2A2419;
}
.leader-card-empty .leader-desc { color: #6F6557; font-style: italic; }
.leader-rewards {
  margin: 12px 0 0;
  display: flex; flex-direction: column; gap: 8px;
  border-top: 2px dashed #0F0B07;
  padding-top: 12px;
}
.leader-rewards > div {
  display: grid; grid-template-columns: 110px 1fr; gap: 10px;
  font-family: 'DotGothic16', monospace; font-size: 11px;
  align-items: baseline;
}
.leader-rewards dt {
  color: #E6421A;
  letter-spacing: 0.1em;
}
.leader-rewards dd {
  margin: 0; color: #0F0B07;
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-size: 12px;
}

.leaders-dots {
  margin-top: 32px;
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
}
.leaders-dot {
  display: flex; align-items: center; gap: 6px;
  background: transparent;
  color: rgba(245,239,224,0.5);
  border: 2px solid rgba(245,239,224,0.25);
  padding: 6px 10px;
  font-family: 'DotGothic16', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.15s ease;
}
.leaders-dot:hover {
  color: #FFC21A;
  border-color: rgba(255,194,26,0.5);
}
.leaders-dot.is-active {
  background: #FFC21A;
  color: #0F0B07;
  border-color: #FFC21A;
}
.leaders-dot-no { font-weight: bold; }

.leaders-counter {
  margin-top: 18px;
  text-align: center;
  font-family: 'DotGothic16', monospace;
  color: rgba(245,239,224,0.55);
  font-size: 12px; letter-spacing: 0.12em;
}
.leaders-counter-cur { color: #FFC21A; font-size: 18px; }
.leaders-counter-sep { margin: 0 6px; }
.leaders-counter-total { color: rgba(245,239,224,0.7); }
.leaders-counter-hint { display: block; margin-top: 6px; font-size: 10px; opacity: 0.7; }

@media (max-width: 720px) {
  .leaders { padding: 80px 4vw 70px; }
  .leaders-stage { grid-template-columns: 1fr; gap: 12px; }
  .leaders-arrow { display: none; }
  .leader-card {
    flex-basis: 86vw;
  }
  .leader-card .leader-face {
    box-shadow: 6px 6px 0 var(--accent-orange);
  }
  .leader-card.is-active .leader-face { box-shadow: 8px 8px 0 var(--accent-orange); }
  .leader-face-front, .leader-face-back { grid-template-columns: 1fr; }
  .leaders-track { scroll-padding: 0 7vw; gap: 16px; }
  .leader-portrait { aspect-ratio: 4 / 5; }
  .leader-given { font-size: 28px; }
}

/* Events */
.events { background: var(--bg); padding: 120px 6vw; }

.event-list {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 28px; margin-top: 60px;
}
@media (max-width: 780px) { .event-list { grid-template-columns: 1fr; } }

.event-card {
  background: var(--paper); border: 3px solid var(--line);
  border-radius: 16px; overflow: hidden; display: flex;
  box-shadow: var(--shadow-hard); transition: transform 0.2s ease;
}
.event-card:hover { transform: translate(-2px, -3px); box-shadow: var(--shadow-hard-lg); }

.event-date {
  width: 140px; flex-shrink: 0; background: var(--accent-orange); color: #fff;
  padding: 20px; display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 4px;
  border-right: 3px solid var(--line); text-align: center;
}
.event-date-day { font-family: 'Zen Antique', serif; font-size: 42px; line-height: 1; }
.event-date-month { font-family: 'DotGothic16', monospace; font-size: 12px; letter-spacing: 0.15em; }

.event-body { padding: 20px; flex: 1; }
.event-title { font-family: 'Zen Antique', serif; font-size: 20px; margin-bottom: 8px; line-height: 1.3; }
.event-meta { font-family: 'DotGothic16', monospace; font-size: 12px; color: var(--muted); margin-bottom: 10px; line-height: 1.6; }
.event-desc { font-size: 13px; line-height: 1.6; color: var(--ink-soft); }

.event-tag {
  display: inline-block; padding: 2px 8px;
  background: var(--accent-yellow); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 4px;
  font-family: 'DotGothic16', monospace; font-size: 10px; margin-bottom: 6px;
}

/* Story */
.story {
  background: var(--ocean); color: #fff;
  padding: 140px 6vw; position: relative; overflow: hidden;
}
.story .section-title { color: #fff; }
.story .section-subtitle { color: rgba(255,255,255,0.8); }

.story-halftone {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(rgba(255,194,26,0.14) 1.4px, transparent 2px);
  background-size: 12px 12px; pointer-events: none;
  -webkit-mask: linear-gradient(180deg, transparent 0%, black 50%, transparent 100%);
          mask: linear-gradient(180deg, transparent 0%, black 50%, transparent 100%);
}

.story-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center; position: relative;
}
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; } }

.story-quote {
  font-family: 'Zen Antique', serif;
  font-size: clamp(28px, 3vw, 36px); line-height: 1.4;
  color: var(--accent-yellow); margin: 30px 0;
}

.story-body { font-size: 15px; line-height: 1.9; color: rgba(255,255,255,0.9); max-width: 520px; }

.story-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.story-stat {
  background: rgba(255,255,255,0.05);
  border: 2px solid rgba(255,194,26,0.4);
  border-radius: 14px; padding: 24px;
}

.story-stat-num { font-family: 'Zen Antique', serif; font-size: 48px; color: var(--accent-yellow); line-height: 1; }
.story-stat-num small { font-size: 20px; }
.story-stat-label { font-family: 'DotGothic16', monospace; font-size: 12px; margin-top: 10px; color: rgba(255,255,255,0.8); line-height: 1.5; }

/* FAQ */
.faq { padding: 120px 6vw; background: var(--bg); }
.faq-list { max-width: 880px; margin: 60px auto 0; display: flex; flex-direction: column; gap: 16px; }

.faq-item {
  background: var(--paper); border: 3px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-hard); overflow: hidden;
}

.faq-q {
  width: 100%; text-align: left; padding: 20px 24px;
  font-family: 'Zen Antique', serif; font-size: 17px;
  background: transparent; border: none; cursor: pointer;
  color: var(--ink); display: flex; align-items: center; gap: 14px;
}

.faq-q .q-mark {
  display: grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; background: var(--accent-yellow); color: var(--line);
  font-size: 18px; flex-shrink: 0; border: 2px solid var(--line);
}

.faq-q .plus { margin-left: auto; font-size: 24px; transition: transform 0.25s ease; }
.faq-item.open .plus { transform: rotate(45deg); }

.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px; font-size: 15px; line-height: 1.8; color: var(--ink-soft);
}

.faq-item.open .faq-a { max-height: 400px; padding: 0 24px 22px 70px; }

/* News / Footer */
.news { padding: 120px 6vw 60px; background: var(--bg-alt); border-top: 3px solid var(--line); }
.news-list { margin-top: 40px; max-width: 840px; }

.news-item {
  display: grid; grid-template-columns: 120px 100px 1fr;
  gap: 20px; padding: 18px 0;
  border-bottom: 1.5px dashed var(--line); align-items: center;
}
@media (max-width: 640px) { .news-item { grid-template-columns: 1fr; gap: 4px; } }

.news-date { font-family: 'DotGothic16', monospace; font-size: 13px; color: var(--muted); }
.news-cat {
  display: inline-block; font-family: 'DotGothic16', monospace;
  font-size: 11px; padding: 4px 10px; background: var(--ink);
  color: var(--accent-yellow); border-radius: 4px;
  text-align: center; justify-self: start;
}
.news-title { font-size: 14px; color: var(--ink); font-weight: 700; }

.footer { background: var(--ink); color: var(--bg); padding: 60px 6vw 28px; }
html[data-theme="dark"] .footer { background: #000; }

.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; max-width: 1280px; margin: 0 auto;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

.footer h5 { font-family: 'Zen Antique', serif; font-size: 14px; margin-bottom: 14px; color: var(--accent-yellow); }
.footer a { display: block; color: rgba(255,255,255,0.8); text-decoration: none; font-size: 13px; margin-bottom: 8px; }
.footer a:hover { color: var(--accent-yellow); }

.footer-copy {
  font-family: 'DotGothic16', monospace; font-size: 11px;
  color: rgba(255,255,255,0.5); margin-top: 40px; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1); text-align: center;
}

/* Tweaks panel */
.tweaks-panel {
  position: fixed; bottom: 24px; right: 24px; width: 280px;
  background: var(--paper); border: 3px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-hard-lg);
  padding: 18px; z-index: 100;
}

.tweaks-panel h3 {
  font-family: 'Zen Antique', serif; font-size: 18px;
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}

.tweaks-label {
  font-family: 'DotGothic16', monospace; font-size: 11px;
  color: var(--muted); display: block; margin: 10px 0 6px; letter-spacing: 0.1em;
}

.tweaks-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tweaks-row button {
  font-size: 12px; font-weight: 700; padding: 8px 10px;
  border: 2px solid var(--line); border-radius: 8px;
  background: var(--bg); color: var(--ink);
  cursor: pointer; flex: 1; min-width: 0; white-space: nowrap;
}
.tweaks-row button.active { background: var(--ink); color: var(--accent-yellow); }
.tweaks-row button:hover:not(.active) { background: var(--accent-yellow); }

/* Animations */
@keyframes pulse-glow {
  0%, 100% { opacity: 0.8; transform: scale(1) rotate(-12deg); }
  50% { opacity: 1; transform: scale(1.06) rotate(-8deg); }
}


/* Art gradients */
.art-forest   { background: linear-gradient(135deg, #0B3D2E 0%, #1E6B4F 100%); }
.art-ocean    { background: linear-gradient(135deg, #0B2E4B 0%, #1A6FBF 100%); }
.art-river    { background: linear-gradient(135deg, #1E6B4F 0%, #4FB58B 100%); }
.art-sky      { background: linear-gradient(135deg, #FF7A1A 0%, #FFC21A 100%); }
.art-tundra   { background: linear-gradient(135deg, #6F8FA8 0%, #B8D0E0 100%); }
.art-desert   { background: linear-gradient(135deg, #C97B3A 0%, #F1C16A 100%); }
.art-wetland  { background: linear-gradient(135deg, #4A5C3A 0%, #8BA86B 100%); }
.art-reef     { background: linear-gradient(135deg, #1A6FBF 0%, #FF7A8F 100%); }

.art-stripes {
  background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.08) 0, rgba(255,255,255,0.08) 8px, transparent 8px, transparent 16px);
}
