/* =================================================
   Wenguo 文国 · Land of the Living Script
   Classical Chinese (古风) aesthetic
   Ink wash · Rice paper · Vermillion seals · Distant mountains
   ================================================= */

/* =================================================
   Password gate (team-only preview)
   Shown over everything; removed once correct password entered.
   ================================================= */
.gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(184, 51, 42, 0.18) 0%, transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(184, 134, 11, 0.12) 0%, transparent 60%),
    #0e0a18;
  animation: gate-in 0.4s ease;
  transition: opacity 0.5s ease;
  font-family: "Cormorant Garamond", serif;
}
.gate.is-leaving { opacity: 0; pointer-events: none; }
.gate.is-wrong .gate-card { animation: gate-shake 0.45s ease; }
@keyframes gate-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20%      { transform: translateX(-10px); }
  40%      { transform: translateX(10px); }
  60%      { transform: translateX(-6px); }
  80%      { transform: translateX(6px); }
}
/* Hidden entirely after the instant-skip head script for returning visitors */
html.gate-unlocked .gate { display: none; }
body.gate-locked { overflow: hidden; }

.gate-card {
  width: 380px;
  max-width: 90vw;
  text-align: center;
  padding: 3rem 2.4rem;
  background: rgba(244, 236, 216, 0.04);
  border: 1px solid rgba(244, 236, 216, 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.gate-mark {
  font-family: "Ma Shan Zheng", serif;
  font-size: 3.6rem;
  color: #b8332a;
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(184, 51, 42, 0.5);
}

.gate-eyebrow {
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #d4a84b;
  margin-bottom: 0.7rem;
}

.gate-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2.1rem;
  font-style: italic;
  font-weight: 500;
  color: #f4ecd8;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.gate-desc {
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(244, 236, 216, 0.55);
  margin: 0 0 2rem;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.gate-input {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.1rem;
  padding: 0.9rem 1.2rem;
  background: rgba(244, 236, 216, 0.06);
  border: 1px solid rgba(244, 236, 216, 0.18);
  color: #f4ecd8;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  text-align: center;
  letter-spacing: 0.15em;
}
.gate-input::placeholder {
  color: rgba(244, 236, 216, 0.3);
  font-style: italic;
  letter-spacing: 0.05em;
}
.gate-input:focus {
  border-color: #b8332a;
  background: rgba(244, 236, 216, 0.1);
}

.gate-submit {
  font-family: "Cinzel", serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  padding: 0.95rem 1.2rem;
  background: #b8332a;
  color: #f4ecd8;
  border: 1px solid #8b1a1a;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 3px 3px 0 #1a1714;
}
.gate-submit:hover {
  background: #8b1a1a;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #1a1714;
}
.gate-submit:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #1a1714;
}

.gate-error {
  font-style: italic;
  font-size: 0.95rem;
  color: #d4574e;
  margin: 1.2rem 0 0;
}

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

:root {
  /* 墨 — Ink */
  --ink:        #1a1714;
  --ink-2:      #2a241e;
  --ink-soft:   #3d342a;
  /* 宣纸 — Rice paper */
  --paper:      #f4ecd8;
  --paper-2:    #ead9b8;
  --paper-aged: #d4c5a0;
  --paper-deep: #c5b48a;
  /* 朱砂 — Vermillion (cinnabar) */
  --vermillion:      #b8332a;
  --vermillion-deep: #8b1a1a;
  --vermillion-soft: #d4574e;
  /* 古金 — Aged gold */
  --gold:      #b8860b;
  --gold-soft: #d4a84b;
  /* 远山 — Distant mountain */
  --mist:    #a89c83;
  --mist-2:  #877a62;
  /* 青 — Jade */
  --jade:    #5e6b4d;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Cormorant Garamond", "Noto Serif SC", Georgia, serif;
  font-size: 17px;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Subtle paper grain across whole site */
  background-image:
    radial-gradient(ellipse at 30% 20%, rgba(184, 51, 42, 0.04) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 80%, rgba(184, 134, 11, 0.05) 0%, transparent 50%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.3  0 0 0 0 0.2  0 0 0 0.05 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

img, video { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; color: var(--vermillion); font-weight: inherit; }

/* =================================================
   Buttons
   ================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 1rem 2.4rem;
  font-family: "Cinzel", "Cormorant Garamond", serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
}

.btn-primary {
  background: var(--vermillion);
  color: var(--paper);
  border: 1px solid var(--vermillion-deep);
  box-shadow: 4px 4px 0 var(--ink);
}
.btn-primary:hover {
  background: var(--vermillion-deep);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--ink);
}
.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(244, 236, 216, 0.4);
}
.btn-ghost:hover {
  background: rgba(244, 236, 216, 0.1);
  border-color: var(--paper);
}
.practice .btn-ghost {
  color: var(--ink);
  border: 1px solid var(--ink);
}
.practice .btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  font-family: "Ma Shan Zheng", serif;
  background: var(--paper);
  color: var(--vermillion);
  font-size: 1rem;
  border: 1px solid var(--paper);
}

/* =================================================
   Navigation
   ================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 3rem;
  background: rgba(244, 236, 216, 0);
  transition: all 0.4s ease;
}
.nav.scrolled {
  padding: 0.8rem 3rem;
  background: rgba(244, 236, 216, 0.93);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(26, 23, 20, 0.1);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.logo-mark {
  font-family: "Ma Shan Zheng", serif;
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--vermillion);
  line-height: 1;
  text-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}
.logo-text {
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.4em;
  color: var(--paper);
  transition: color 0.4s;
}
.nav.scrolled .logo-text { color: var(--ink); }

.nav-links {
  display: flex;
  gap: 2.4rem;
  align-items: center;
}
.nav-links a {
  font-family: "Cinzel", serif;
  color: rgba(244, 236, 216, 0.85);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: color 0.3s;
  position: relative;
}
.nav.scrolled .nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--vermillion); }
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--vermillion);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }

.nav-links a.nav-cta {
  background: var(--vermillion);
  color: var(--paper) !important;
  padding: 0.55rem 1.4rem;
  letter-spacing: 0.2em;
  border: 1px solid var(--vermillion-deep);
}
.nav-links a.nav-cta:hover {
  background: var(--vermillion-deep);
}
.nav-links a.nav-cta::after { display: none; }

/* =================================================
   HERO
   ================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 7rem;
  overflow: hidden;
  color: var(--paper);
  background: var(--ink);
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(0.95) saturate(0.7) sepia(0.15);
}
.hero-video-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(40,30,20,0.4) 0%, var(--ink) 80%),
    radial-gradient(ellipse 900px 500px at 30% 55%, rgba(184, 51, 42, 0.18) 0%, transparent 70%),
    radial-gradient(ellipse 700px 400px at 75% 45%, rgba(184, 134, 11, 0.12) 0%, transparent 70%),
    var(--ink);
}
/* Hide placeholder text — pure ink wash backdrop instead */
.hero-video-fallback span,
.hero-video-fallback small { display: none; }

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(26, 23, 20, 0.55) 0%,
      rgba(26, 23, 20, 0.25) 30%,
      rgba(26, 23, 20, 0.55) 70%,
      rgba(26, 23, 20, 0.95) 100%),
    radial-gradient(ellipse at top, transparent 0%, rgba(26, 23, 20, 0.6) 100%);
  z-index: 1;
}

/* Mountain silhouettes */
.hero-mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  pointer-events: none;
}
.hero-mountains.far  { height: 35vh; opacity: 0.7; }
.hero-mountains.near { height: 22vh; opacity: 0.95; }

/* ===== Ink wash decorations ===== */
.ink-deco {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  height: auto;
  filter: blur(2.5px);
}
.ink-tr {
  top: 6%;
  right: -10%;
  width: 60%;
  max-width: 820px;
  opacity: 0.32;
  transform: rotate(-3deg);
  animation: inkDriftTR 14s ease-in-out infinite;
}
.ink-bl {
  bottom: 26%;
  left: -10%;
  width: 55%;
  max-width: 760px;
  opacity: 0.55;
  transform: scaleX(-1) rotate(2deg);
  animation: inkDriftBL 16s ease-in-out infinite;
}
@keyframes inkDriftTR {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50%      { transform: rotate(-3deg) translateY(-10px); }
}
@keyframes inkDriftBL {
  0%, 100% { transform: scaleX(-1) rotate(2deg) translateY(0); }
  50%      { transform: scaleX(-1) rotate(2deg) translateY(8px); }
}

.ink-splatter {
  position: absolute;
  pointer-events: none;
  z-index: 2;
  filter: blur(1.5px);
}
.ink-sp-1 {
  top: 18%;
  left: 8%;
  width: 90px;
  height: 90px;
  opacity: 0.45;
  transform: rotate(-25deg);
}
.ink-sp-2 {
  top: 14%;
  right: 14%;
  width: 70px;
  height: 70px;
  opacity: 0.5;
  transform: rotate(40deg);
}
.ink-sp-3 {
  bottom: 30%;
  right: 12%;
  width: 110px;
  height: 110px;
  opacity: 0.7;
  transform: rotate(15deg);
}

/* Vertical Chinese banners on the sides */
.vertical-banner {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: "Ma Shan Zheng", serif;
  font-size: 1.6rem;
  color: rgba(244, 236, 216, 0.45);
  writing-mode: vertical-rl;
  letter-spacing: 0.3em;
  pointer-events: none;
}
.vertical-banner.left  { left: 3rem; }
.vertical-banner.right { right: 3rem; }
.vertical-banner span {
  display: inline-block;
  padding: 0.1rem 0;
}
.vertical-banner span:nth-child(odd) { color: rgba(184, 51, 42, 0.5); }

.hero-content {
  position: relative;
  z-index: 4;
  text-align: center;
  max-width: 880px;
}

.hero-pill {
  display: inline-block;
  padding: 0.4rem 1.4rem;
  border: 1px solid rgba(244, 236, 216, 0.3);
  border-radius: 0;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  color: rgba(244, 236, 216, 0.85);
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.8rem;
}
.hero-title-cn {
  font-family: "Ma Shan Zheng", serif;
  font-size: clamp(7rem, 18vw, 16rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  line-height: 1;
  color: var(--paper);
  text-shadow:
    0 0 40px rgba(184, 51, 42, 0.4),
    3px 3px 0 rgba(0, 0, 0, 0.3);
  position: relative;
}
.hero-title-cn::before {
  content: "";
  position: absolute;
  inset: -40% -25%;
  background:
    radial-gradient(ellipse 50% 70% at 50% 55%, rgba(184, 51, 42, 0.45) 0%, transparent 60%),
    radial-gradient(ellipse 70% 45% at 30% 70%, rgba(40, 20, 10, 0.6) 0%, transparent 70%),
    radial-gradient(ellipse 45% 50% at 70% 35%, rgba(212, 168, 75, 0.18) 0%, transparent 70%);
  z-index: -1;
  filter: blur(40px);
  pointer-events: none;
}
.hero-title-en {
  font-family: "Cinzel", serif;
  font-size: clamp(0.9rem, 1.5vw, 1.3rem);
  letter-spacing: 1em;
  font-weight: 400;
  color: rgba(244, 236, 216, 0.7);
  margin-top: 1.2rem;
  padding-left: 1em;
}

.hero-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
  color: rgba(244, 236, 216, 0.4);
}
.divider-line {
  display: block;
  width: 80px;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(244, 236, 216, 0.6), transparent);
}
.hero-divider .divider-line:first-child {
  background: linear-gradient(to left, rgba(244, 236, 216, 0.6), transparent);
}
.hero-divider .divider-line:last-child {
  background: linear-gradient(to right, rgba(244, 236, 216, 0.6), transparent);
}
.divider-mark {
  font-size: 1.2rem;
  color: var(--vermillion-soft);
}

.hero-subtitle {
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold-soft);
  margin-bottom: 1.6rem;
  text-shadow:
    0 4px 24px rgba(0, 0, 0, 0.55),
    0 0 50px rgba(212, 168, 75, 0.25);
}

.hero-tagline {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.4rem, 2.6vw, 2.1rem);
  font-style: italic;
  font-weight: 500;
  color: var(--paper);
  margin-bottom: 1.5rem;
  letter-spacing: 0.05em;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 2;
  color: rgba(244, 236, 216, 0.8);
  margin-bottom: 3rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-desc em {
  color: var(--gold-soft);
  font-style: italic;
}

.hero-actions {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  z-index: 5;
  color: rgba(244, 236, 216, 0.5);
}
.scroll-line {
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, transparent, rgba(244, 236, 216, 0.7));
  animation: scrollLine 2s ease-in-out infinite;
}
.scroll-text {
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0.3); transform-origin: top; }
  50%  { transform: scaleY(1);   transform-origin: top; }
  51%  { transform: scaleY(1);   transform-origin: bottom; }
  100% { transform: scaleY(0.3); transform-origin: bottom; }
}

/* =================================================
   Brush divider between sections
   ================================================= */
.brush-divider {
  height: 60px;
  background:
    radial-gradient(ellipse 70% 100% at 50% 0%, rgba(26, 23, 20, 0.06) 0%, transparent 70%),
    var(--paper);
  position: relative;
}
.brush-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--ink-soft), transparent);
}
.brush-divider::after {
  content: "❖";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.9rem;
  color: var(--vermillion);
  background: var(--paper);
  padding: 0 1rem;
}
.brush-divider.dark {
  background: var(--ink);
}
.brush-divider.dark::before {
  background: linear-gradient(to right, transparent, rgba(244, 236, 216, 0.3), transparent);
}
.brush-divider.dark::after {
  background: var(--ink);
  color: var(--gold-soft);
}

/* =================================================
   Section heads (shared)
   ================================================= */
.section-head {
  text-align: center;
  margin-bottom: 4.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-eyebrow {
  display: inline-block;
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--vermillion);
  margin-bottom: 1.4rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(184, 51, 42, 0.3);
}
.section-eyebrow.gold {
  color: var(--gold-soft);
  border-bottom-color: rgba(212, 168, 75, 0.4);
}

.section-title {
  font-family: "Cormorant Garamond", "Noto Serif SC", serif;
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 1.2rem;
}
.section-title.light { color: var(--paper); }
.section-title em {
  font-style: italic;
  color: var(--vermillion);
  font-weight: 600;
}
.section-title.light em { color: var(--gold-soft); }

.section-desc {
  font-size: 1.1rem;
  line-height: 1.9;
  color: var(--ink-soft);
  font-style: italic;
}

/* =================================================
   FEATURES
   ================================================= */
.features {
  padding: 6rem 2rem 7rem;
  background: var(--paper);
  position: relative;
}

.feature-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.feature-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(234, 217, 184, 0.4) 100%);
  padding: 3rem 2.2rem 2.5rem;
  border: 1px solid rgba(26, 23, 20, 0.12);
  transition: all 0.4s ease;
  overflow: hidden;
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(to right, var(--vermillion), var(--gold-soft));
  opacity: 0;
  transition: opacity 0.4s;
}
.feature-card:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(234, 217, 184, 0.6) 100%);
  border-color: var(--vermillion);
  box-shadow: 8px 8px 0 var(--ink);
  transform: translate(-4px, -4px);
}
.feature-card:hover::before { opacity: 1; }

.feature-num {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  font-family: "Ma Shan Zheng", serif;
  font-size: 2rem;
  color: rgba(184, 51, 42, 0.2);
  line-height: 1;
}

.feature-glyph {
  font-family: "Ma Shan Zheng", serif;
  font-size: 5rem;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 0 rgba(184, 51, 42, 0.15);
}

.feature-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 600;
  font-style: italic;
  color: var(--ink);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.feature-card p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.85;
}
.feature-card p em {
  color: var(--vermillion);
  font-style: italic;
}

/* =================================================
   SHOWCASE — Map / Story sections
   ================================================= */
.showcase {
  padding: 7rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
  position: relative;
}

#world {
  background:
    radial-gradient(ellipse at top right, rgba(184, 134, 11, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(94, 107, 77, 0.08) 0%, transparent 50%),
    var(--paper-2);
  max-width: none;
  width: 100%;
}

#story {
  background:
    radial-gradient(ellipse at top left, rgba(184, 51, 42, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse at bottom right, rgba(184, 134, 11, 0.12) 0%, transparent 60%),
    var(--ink);
  color: var(--paper);
  max-width: none;
  width: 100%;
}

.showcase > * {
  max-width: 600px;
  margin: 0 auto;
}

.showcase-text .section-eyebrow { margin-bottom: 1.5rem; }

.showcase-desc {
  font-size: 1.08rem;
  line-height: 1.95;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
#story .showcase-desc {
  color: rgba(244, 236, 216, 0.85);
}
.showcase-desc b {
  font-family: "Ma Shan Zheng", serif;
  font-size: 1.3em;
  font-weight: 400;
  color: var(--vermillion);
  letter-spacing: 0.05em;
  padding: 0 0.1em;
}
#story .showcase-desc b {
  color: var(--gold-soft);
}

.showcase-list {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.showcase-list li {
  font-size: 1rem;
  padding: 0.8rem 1.2rem;
  display: flex;
  gap: 0.8rem;
  align-items: baseline;
  border-left: 2px solid var(--vermillion);
  background: rgba(255, 255, 255, 0.3);
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--ink);
}
.li-mark {
  color: var(--vermillion);
  font-weight: 700;
  font-style: normal;
}

.story-quote {
  margin-top: 2.5rem;
  padding: 1.5rem 0 1.5rem 2rem;
  border-left: 2px solid var(--gold-soft);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.85;
  color: var(--gold-soft);
  letter-spacing: 0.02em;
  position: relative;
}
.quote-mark {
  font-family: "Ma Shan Zheng", serif;
  font-style: normal;
  font-size: 1.6rem;
  color: var(--vermillion-soft);
  margin: 0 0.2em;
  vertical-align: middle;
}

/* Scroll-painting frame for video */
.showcase-media {
  position: relative;
}
.showcase-video-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--ink);
}
.scroll-frame {
  border: 1px solid rgba(26, 23, 20, 0.2);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.2) inset,
    20px 20px 0 -10px rgba(184, 51, 42, 0.1),
    20px 20px 60px rgba(0, 0, 0, 0.15);
  padding: 12px;
  background:
    linear-gradient(135deg, var(--paper-aged) 0%, var(--paper-2) 50%, var(--paper-aged) 100%);
}
#story .scroll-frame {
  background:
    linear-gradient(135deg, #4a3a28 0%, #2d2218 50%, #4a3a28 100%);
  border-color: rgba(184, 134, 11, 0.4);
  box-shadow:
    20px 20px 0 -10px rgba(184, 134, 11, 0.15),
    20px 20px 60px rgba(0, 0, 0, 0.4);
}

.showcase-video {
  position: absolute;
  inset: 12px;
  width: calc(100% - 24px);
  height: calc(100% - 24px);
  object-fit: cover;
  filter: contrast(0.95) saturate(0.85);
}

.showcase-video-fallback {
  position: absolute;
  inset: 12px;
  background:
    radial-gradient(ellipse at center, rgba(40, 30, 20, 0.8) 0%, var(--ink) 100%),
    radial-gradient(ellipse 500px 300px at 35% 60%, rgba(184, 51, 42, 0.15) 0%, transparent 70%),
    repeating-linear-gradient(45deg, rgba(184, 51, 42, 0.04) 0 30px, transparent 30px 60px);
}
.showcase-video-fallback span,
.showcase-video-fallback small { display: none; }

/* Vermillion seal stamp */
.seal-stamp {
  position: absolute;
  bottom: -15px;
  right: 20px;
  width: 70px;
  height: 80px;
  background: var(--vermillion);
  border: 2px solid var(--vermillion-deep);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "Ma Shan Zheng", serif;
  color: var(--paper);
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  transform: rotate(-6deg);
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 5;
}
.seal-stamp::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.seal-stamp.gold {
  background: var(--gold);
  border-color: #6b4f08;
}

/* =================================================
   CORE GAMEPLAY  (the new unified writer + video panel)
   ================================================= */
.gameplay {
  padding: 6rem 2rem 7rem;
  background: var(--paper);
  /* Default accent — JS overrides per element */
  --gp-accent: #C9A961;
}

.gameplay .section-head { margin-bottom: 3.5rem; }

.gameplay-grid {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: 3rem;
  align-items: stretch;     /* both columns equal height — bottoms align */
}

/* ─── LEFT column ────────────────────── */
.gp-left {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.gp-elements {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.6rem;
}
.gp-el-btn {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-2);
  color: var(--ink);
  border: 1px solid rgba(26, 23, 20, 0.18);
  cursor: pointer;
  transition: all 0.2s ease;
}
.gp-el-btn:hover {
  border-color: var(--gp-accent);
  transform: translateY(-2px);
}
.gp-el-btn.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 4px 4px 0 var(--gp-accent);
}
.gp-el-char {
  font-family: "Ma Shan Zheng", serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  color: var(--gp-accent);
  transition: color 0.2s ease;
}
.gp-el-btn.is-active .gp-el-char { color: var(--gp-accent); }

/* Canvas with 田字格 grid */
.gp-canvas-wrap {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 6px 6px 0 var(--gp-accent), 0 0 0 0 transparent;
  transition: box-shadow 0.5s ease;
}
/* Successful cast — pulse the canvas */
.gp-canvas-wrap.is-cast {
  box-shadow: 8px 8px 0 var(--gp-accent), 0 0 50px 4px var(--gp-accent);
}
.gp-canvas-wrap canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  z-index: 2;
  touch-action: none;
}

/* HanziWriter mounts an SVG inside this div */
.hanzi-target {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}
.hanzi-target.is-fading { opacity: 0; }
.hanzi-target svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}
/* Apply the ink-brush filter to every drawn path — makes edges feel like
   brush hairs on paper rather than vector geometry */
.hanzi-target svg path {
  filter: url(#inkBrush);
}

/* 田字格 dashed cross + diagonals */
.gp-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.gp-grid-v, .gp-grid-h, .gp-grid-d1, .gp-grid-d2 {
  position: absolute;
  display: block;
}
.gp-grid-v {
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(26, 23, 20, 0.35);
}
.gp-grid-h {
  top: 50%; left: 0; right: 0;
  height: 1px;
  border-top: 1px dashed rgba(26, 23, 20, 0.35);
}
.gp-grid-d1, .gp-grid-d2 {
  top: 50%; left: 50%;
  width: 141.4%;
  height: 1px;
  border-top: 1px dashed rgba(26, 23, 20, 0.15);
  transform-origin: 0 0;
}
.gp-grid-d1 { transform: translate(-50%, -50%) rotate(45deg); }
.gp-grid-d2 { transform: translate(-50%, -50%) rotate(-45deg); }

/* Small corner clear button */
.gp-redo {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(26, 23, 20, 0.2);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}
.gp-redo:hover {
  background: var(--gp-accent);
  color: var(--paper);
  border-color: var(--gp-accent);
  transform: rotate(-30deg);
}
.gp-redo svg { display: block; }

/* Status bar — shows recognition state */
.gp-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.gp-status {
  flex: 1;
  min-width: 200px;
  margin: 0;
  padding: 0.85rem 1.1rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.55);
  border-left: 3px solid var(--gp-accent);
  transition: all 0.3s ease;
}
.gp-status b {
  font-family: "Ma Shan Zheng", serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.4em;
  color: var(--gp-accent);
  vertical-align: middle;
  padding: 0 0.05em;
}
.gp-status em {
  color: var(--gp-accent);
  font-style: italic;
}
.gp-status.is-pending {
  color: var(--gold);
  border-left-color: var(--gold);
}
.gp-status.is-pending b { color: var(--gold); }
.gp-status.is-error {
  color: var(--vermillion);
  border-left-color: var(--vermillion);
  background: rgba(184, 51, 42, 0.06);
}
.gp-status.is-error b { color: var(--vermillion); }
.gp-status.is-success {
  color: #2d7a2d;
  font-weight: 600;
  border-left-color: #2d7a2d;
  background: rgba(45, 122, 45, 0.08);
}
.gp-status.is-success b { color: #2d7a2d; }

.gp-skip {
  position: absolute;
  bottom: 0.7rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gp-accent);
  background: rgba(244, 236, 216, 0.92);
  border: 1px solid var(--gp-accent);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
.gp-skip:hover {
  background: var(--gp-accent);
  color: var(--paper);
}
.gp-skip[hidden] { display: none; }

/* ─── RIGHT column ─────────────────── */
.gp-right {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Video frame fills the right column entirely (no aspect-ratio
   constraint — the column height is set by the left column's canvas
   so both bottoms align) */
.gp-video-frame {
  position: relative;
  flex: 1;
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--ink);
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--gp-accent);
  transition: box-shadow 0.4s ease;
}
.gp-video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--ink);
  display: block;
}
.gp-video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(40, 30, 20, 0.85) 0%, var(--ink) 100%),
    repeating-linear-gradient(45deg, rgba(184, 51, 42, 0.04) 0 30px, transparent 30px 60px);
  transition: opacity 0.3s;
}
.gp-video-fallback.is-hidden { opacity: 0; }
.gp-fb-char {
  font-family: "Ma Shan Zheng", serif;
  font-size: clamp(5rem, 12vw, 9.5rem);
  color: var(--gp-accent);
  line-height: 1;
  text-shadow:
    0 4px 30px rgba(0, 0, 0, 0.4),
    0 0 60px var(--gp-accent);
  opacity: 0.85;
}
.gp-fb-label {
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(244, 236, 216, 0.35);
}
.gp-video-corner {
  position: absolute;
  top: -1px; left: -1px;
  width: 28px;
  height: 28px;
  border-top: 2px solid var(--gp-accent);
  border-left: 2px solid var(--gp-accent);
  z-index: 3;
  pointer-events: none;
}

/* Meta strip under video */
.gp-meta {
  padding: 1.2rem 1.4rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
  border: 1px solid rgba(26, 23, 20, 0.1);
  border-left: 3px solid var(--gp-accent);
}
.gp-meta-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.gp-meta-char {
  font-family: "Ma Shan Zheng", serif;
  font-size: 2.6rem;
  color: var(--gp-accent);
  line-height: 1;
}
.gp-meta-name {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}
#gp-meta-en {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  color: var(--ink);
}
.gp-meta-name small {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.gp-meta-desc {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* Responsive */
@media (max-width: 880px) {
  .gameplay-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .gp-left { max-width: 480px; margin: 0 auto; width: 100%; }
  .gp-right { width: 100%; }
}

/* =================================================
   FIVE ELEMENTS showcase  (unused — kept for reference)
   ================================================= */
.elements {
  padding: 7rem 2rem;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(184, 51, 42, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(184, 134, 11, 0.06) 0%, transparent 50%),
    var(--paper);
  /* Default accent — overridden by JS per element */
  --el-accent: var(--vermillion);
}

/* Element selector pills */
.el-selector {
  max-width: 900px;
  margin: 0 auto 3.5rem;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.8rem;
}
.el-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.2rem 0.6rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(26, 23, 20, 0.18);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}
.el-tab:hover {
  border-color: var(--el-accent);
  transform: translateY(-3px);
  box-shadow: 4px 4px 0 var(--ink);
}
.el-tab.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 5px 5px 0 var(--el-accent);
  transform: translateY(-3px);
}
.el-tab-char {
  font-family: "Ma Shan Zheng", serif;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--el-accent);
  transition: color 0.25s ease;
}
.el-tab.is-active .el-tab-char { color: var(--el-accent); }
.el-tab-en {
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.el-tab.is-active .el-tab-en { color: rgba(244, 236, 216, 0.85); }

/* Display: video left, info right */
.el-display {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3.5rem;
  align-items: start;
}

/* Video panel */
.el-video-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.el-video-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--ink);
  border: 1px solid var(--ink);
  box-shadow:
    8px 8px 0 var(--el-accent),
    0 20px 40px rgba(0, 0, 0, 0.15);
  transition: box-shadow 0.4s ease;
}
.el-video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--ink);
}
.el-video-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background:
    radial-gradient(ellipse at center, rgba(40, 30, 20, 0.85) 0%, var(--ink) 100%),
    repeating-linear-gradient(45deg, rgba(184, 51, 42, 0.04) 0 30px, transparent 30px 60px);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s;
}
.el-video-fallback.is-hidden { opacity: 0; }
.el-fb-char {
  font-family: "Ma Shan Zheng", serif;
  font-size: clamp(6rem, 14vw, 11rem);
  color: var(--el-accent);
  line-height: 1;
  text-shadow:
    0 4px 30px rgba(0, 0, 0, 0.5),
    0 0 60px var(--el-accent);
  opacity: 0.85;
}
.el-fb-label {
  font-family: "Cinzel", serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(244, 236, 216, 0.35);
}

/* Decorative inner corner accent (frame top-left) */
.el-video-corner {
  position: absolute;
  top: -1px;
  left: -1px;
  width: 30px;
  height: 30px;
  border-top: 2px solid var(--el-accent);
  border-left: 2px solid var(--el-accent);
  z-index: 3;
  pointer-events: none;
}

/* Variant strip */
.el-variants {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.el-variants:empty { display: none; }
.el-variant {
  flex: 1;
  min-width: 80px;
  padding: 0.6rem 0.8rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(26, 23, 20, 0.15);
  font-family: "Cinzel", serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.el-variant:hover {
  border-color: var(--el-accent);
  color: var(--el-accent);
}
.el-variant.is-active {
  background: var(--el-accent);
  color: var(--paper);
  border-color: var(--el-accent);
}

/* Info panel */
.el-info {
  padding: 2rem 2.2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, transparent 100%);
  border: 1px solid rgba(26, 23, 20, 0.1);
  border-top: 3px solid var(--el-accent);
  position: relative;
}
.el-info-head {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(26, 23, 20, 0.08);
}
.el-info-char {
  font-family: "Ma Shan Zheng", serif;
  font-size: 4.5rem;
  line-height: 1;
  color: var(--el-accent);
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.05);
}
.el-info-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.el-info-title small {
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.el-info-subtitle {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--el-accent);
  margin-top: 0.3rem;
}
.el-info-desc {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 1.6rem;
}
.el-info-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}
.el-info-stats li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.7rem 1rem;
  background: rgba(255, 255, 255, 0.4);
  border-left: 2px solid var(--el-accent);
}
.el-info-stats .k {
  font-family: "Cinzel", serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.el-info-stats .v {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.el-info-hint {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-top: 1rem;
  border-top: 1px dashed rgba(26, 23, 20, 0.15);
}
.el-info-hint a {
  color: var(--el-accent);
  border-bottom: 1px dashed var(--el-accent);
}

/* =================================================
   JOURNEY — Timeline
   ================================================= */
.journey {
  padding: 7rem 2rem;
  background: var(--paper);
}

.timeline {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding-left: 2.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(to bottom, var(--vermillion) 0%, var(--gold) 50%, var(--mist) 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-dot {
  position: absolute;
  left: -2.85rem;
  top: 1.1rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--vermillion);
  box-shadow: 0 0 0 4px var(--paper);
}

.timeline-item.current .timeline-dot {
  background: var(--vermillion);
  animation: pulseRing 2s infinite;
}
@keyframes pulseRing {
  0%, 100% { box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px rgba(184, 51, 42, 0.4); }
  50%      { box-shadow: 0 0 0 4px var(--paper), 0 0 0 14px rgba(184, 51, 42, 0); }
}

.timeline-content {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.4) 0%, transparent 100%);
  padding: 1.4rem 1.8rem;
  border: 1px solid rgba(26, 23, 20, 0.1);
  transition: all 0.3s ease;
}
.timeline-content:hover {
  border-color: var(--vermillion);
  background: rgba(255, 255, 255, 0.7);
  transform: translateX(4px);
}

.timeline-date {
  display: inline-block;
  font-family: "Cinzel", serif;
  color: var(--vermillion);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.timeline-content h3 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-style: italic;
  font-weight: 600;
  margin: 0.3rem 0 0.7rem;
  color: var(--ink);
}

.timeline-content p {
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.8;
}

/* =================================================
   PRACTICE
   ================================================= */
.practice {
  padding: 7rem 2rem;
  background:
    radial-gradient(ellipse at top, rgba(184, 134, 11, 0.06) 0%, transparent 60%),
    var(--paper-2);
}

.practice .section-head { margin-bottom: 3.5rem; }

.practice-container {
  max-width: 1100px;
  margin: 0 auto;
}

.char-selector {
  text-align: center;
  margin-bottom: 3rem;
}

.selector-label {
  font-family: "Cinzel", serif;
  font-size: 0.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.char-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem;
}

.char-btn {
  width: 84px;
  height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(26, 23, 20, 0.2);
  transition: all 0.25s ease;
  padding: 0.4rem;
}
.char-btn .cn {
  font-family: "Ma Shan Zheng", serif;
  font-size: 2.2rem;
  line-height: 1;
  margin-bottom: 0.3rem;
}
.char-btn .en {
  font-family: "Cinzel", serif;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.char-btn:hover {
  border-color: var(--vermillion);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink);
}
.char-btn.active {
  background: var(--vermillion);
  color: var(--paper);
  border-color: var(--vermillion-deep);
  box-shadow: 4px 4px 0 var(--ink);
}
.char-btn.active .en { color: rgba(244, 236, 216, 0.8); }

.canvas-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--paper);
  padding: 3rem;
  border: 1px solid rgba(26, 23, 20, 0.15);
  box-shadow: 8px 8px 0 var(--ink);
  position: relative;
}
.canvas-area::before,
.canvas-area::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid var(--vermillion);
}
.canvas-area::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.canvas-area::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}

.canvas-wrapper {
  position: relative;
  width: 360px;
  height: 360px;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at center, var(--paper) 0%, var(--paper-2) 100%);
  border: 2px solid var(--ink);
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.05),
    0 0 0 8px var(--paper),
    0 0 0 9px var(--vermillion);
}

#character-target {
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.grid-line { position: absolute; }
.grid-line.vertical {
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  border-left: 1px dashed rgba(184, 51, 42, 0.4);
}
.grid-line.horizontal {
  top: 50%; left: 0; right: 0;
  height: 1px;
  border-top: 1px dashed rgba(184, 51, 42, 0.4);
}
.grid-line.diagonal-1,
.grid-line.diagonal-2 {
  top: 50%; left: 50%;
  width: 141.4%; height: 1px;
  border-top: 1px dashed rgba(184, 51, 42, 0.2);
  transform-origin: 0 0;
}
.grid-line.diagonal-1 { transform: translate(-50%, -50%) rotate(45deg); }
.grid-line.diagonal-2 { transform: translate(-50%, -50%) rotate(-45deg); }

.canvas-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.control-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.control-buttons .btn {
  flex: 1;
  min-width: 100px;
  padding: 0.85rem 1rem;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
}

.feedback-box {
  background: var(--paper-2);
  border: 1px solid rgba(26, 23, 20, 0.15);
  padding: 1.5rem;
}
.feedback-status {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 1.2rem;
  line-height: 1.7;
  min-height: 3em;
}
.feedback-status em {
  color: var(--vermillion);
  font-style: italic;
}
.feedback-status #target-char-display {
  font-family: "Ma Shan Zheng", serif;
  color: var(--vermillion);
  font-size: 1.6rem;
  font-style: normal;
  vertical-align: middle;
}
.feedback-status.success { color: #2d5e2d; font-weight: 600; }
.feedback-status.error   { color: var(--vermillion); }

.feedback-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}
.stat {
  text-align: center;
  padding: 0.8rem 0.4rem;
  background: var(--paper);
  border: 1px solid rgba(26, 23, 20, 0.08);
}
.stat-label {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 0.65rem;
  color: var(--ink-soft);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.stat-value {
  display: block;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.6rem;
  font-weight: 700;
  font-style: italic;
  color: var(--vermillion);
}

.practice-hint {
  text-align: center;
  margin-top: 2.5rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ===== Practice tabs ===== */
.practice-tabs {
  max-width: 720px;
  margin: 0 auto 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.practice-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 1.2rem 1.4rem;
  background: var(--paper);
  border: 1px solid rgba(26, 23, 20, 0.18);
  text-align: left;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}
.practice-tab:hover {
  border-color: var(--vermillion);
  transform: translateY(-2px);
}
.practice-tab.is-active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  box-shadow: 6px 6px 0 var(--vermillion);
}
.tab-mark {
  font-family: "Ma Shan Zheng", serif;
  font-size: 1.6rem;
  color: var(--vermillion);
  line-height: 1;
}
.practice-tab.is-active .tab-mark { color: var(--gold-soft); }
.tab-label {
  font-family: "Cinzel", serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.tab-sub {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-soft);
}
.practice-tab.is-active .tab-sub { color: rgba(244, 236, 216, 0.7); }

/* ===== Tab panels ===== */
.tab-panel { display: none; }
.tab-panel.is-active {
  display: block;
  animation: panelFade 0.5s ease;
}
@keyframes panelFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Free Writing area ===== */
.free-writing-area {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 3rem;
  align-items: center;
  background: var(--paper);
  padding: 3rem;
  border: 1px solid rgba(26, 23, 20, 0.15);
  box-shadow: 8px 8px 0 var(--ink);
  position: relative;
}
.free-writing-area::before,
.free-writing-area::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 30px;
  border: 1px solid var(--vermillion);
}
.free-writing-area::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.free-writing-area::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}

.free-info-title {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.8rem;
  font-style: italic;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}
.free-info-desc {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.free-info-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.4rem;
}
.free-info-list li {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink);
  padding: 0.4rem 0.8rem;
  border-left: 2px solid var(--vermillion);
  background: rgba(184, 51, 42, 0.04);
}
.free-info-list .li-mark { color: var(--vermillion); margin-right: 0.5rem; }
.free-info-hint {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding: 0.8rem 1rem;
  background: rgba(212, 168, 75, 0.1);
  border-left: 2px solid var(--gold-soft);
}

/* ===== Wenguo Recognizer plugin styles ===== */
.wgr-root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-family: "Cormorant Garamond", serif;
  color: var(--ink);
}
.wgr-instruction { display: none; } /* duplicated in info column */

.wgr-canvas-wrap {
  position: relative;
  margin: 0 auto;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow:
    inset 0 0 30px rgba(0, 0, 0, 0.05),
    0 0 0 8px var(--paper),
    0 0 0 9px var(--vermillion);
}
.wgr-canvas {
  display: block;
  position: relative;
  z-index: 2;
  cursor: crosshair;
}
.wgr-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.wgr-grid-v,
.wgr-grid-h,
.wgr-grid-d1,
.wgr-grid-d2 { position: absolute; display: block; }
.wgr-grid-v {
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  border-left: 1px dashed var(--wgr-grid, rgba(184, 51, 42, 0.35));
}
.wgr-grid-h {
  top: 50%; left: 0; right: 0;
  height: 1px;
  border-top: 1px dashed var(--wgr-grid, rgba(184, 51, 42, 0.35));
}
.wgr-grid-d1,
.wgr-grid-d2 {
  top: 50%; left: 50%;
  width: 141.4%; height: 1px;
  border-top: 1px dashed rgba(184, 51, 42, 0.18);
  transform-origin: 0 0;
}
.wgr-grid-d1 { transform: translate(-50%, -50%) rotate(45deg); }
.wgr-grid-d2 { transform: translate(-50%, -50%) rotate(-45deg); }

.wgr-controls {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.wgr-btn {
  font-family: "Cinzel", serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.8rem 1.4rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: all 0.2s ease;
}
.wgr-btn:hover {
  background: var(--ink);
  color: var(--paper);
}
.wgr-btn-primary {
  background: var(--vermillion);
  color: var(--paper);
  border-color: var(--vermillion-deep);
  box-shadow: 3px 3px 0 var(--ink);
}
.wgr-btn-primary:hover {
  background: var(--vermillion-deep);
  color: var(--paper);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--ink);
}

.wgr-results {
  background: var(--paper-2);
  border: 1px solid rgba(26, 23, 20, 0.12);
  padding: 1rem 1.2rem;
}
.wgr-status {
  font-style: italic;
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin-bottom: 0.9rem;
  min-height: 1.5em;
}
.wgr-status.is-working { color: var(--gold); }
.wgr-status.is-error   { color: var(--vermillion); font-weight: 600; }
.wgr-status.is-ready,
.wgr-status.is-selected { color: var(--ink); }
.wgr-status strong {
  font-family: "Ma Shan Zheng", serif;
  font-style: normal;
  font-size: 1.6em;
  color: var(--vermillion);
  vertical-align: middle;
  margin-left: 0.2em;
}

.wgr-candidates {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.wgr-candidate {
  font-family: "Ma Shan Zheng", serif;
  font-size: 1.7rem;
  width: 54px;
  height: 54px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid rgba(26, 23, 20, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}
.wgr-candidate:hover {
  border-color: var(--vermillion);
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--ink);
}
.wgr-candidate.is-top {
  background: var(--paper-2);
  border-color: var(--vermillion);
  position: relative;
}
.wgr-candidate.is-top::after {
  content: "✦";
  position: absolute;
  top: -8px;
  right: -6px;
  font-size: 0.7rem;
  color: var(--gold);
  font-family: serif;
}
.wgr-candidate.is-selected {
  background: var(--vermillion);
  color: var(--paper);
  border-color: var(--vermillion-deep);
  box-shadow: 3px 3px 0 var(--ink);
}

/* =================================================
   CONTACT
   ================================================= */
.contact {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 8rem 2rem 0;
  overflow: hidden;
}

.contact-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(184, 51, 42, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(184, 134, 11, 0.18) 0%, transparent 50%),
    radial-gradient(circle at 50% 100%, rgba(110, 40, 30, 0.3) 0%, transparent 60%);
  pointer-events: none;
}

/* Aura particle canvas — gentle glowing sparkle around the title and button */
.contact-aura-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.contact-mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 38vh;
  min-height: 240px;
  max-height: 380px;
  pointer-events: none;
}
/* Three layers of depth — far ridge soft & purple-tinted, near ridge near-black */
.contact-mountains .mtn-far  { fill: rgba(22, 16, 32, 0.55); }
.contact-mountains .mtn-mid  { fill: rgba(12, 8, 20, 0.82); }
.contact-mountains .mtn-near { fill: rgba(3, 2, 10, 0.96); }

.contact-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.contact-text {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.15rem;
  font-style: italic;
  line-height: 1.95;
  color: rgba(244, 236, 216, 0.8);
  margin: 1.8rem 0 3rem;
}

.discord-button {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 3rem;
  background: #5865F2;
  color: white !important;
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  border: 1px solid #4752C4;
  box-shadow: 6px 6px 0 var(--paper);
  transition: all 0.3s ease;
}
.discord-button:hover {
  transform: translate(-3px, -3px);
  box-shadow: 9px 9px 0 var(--paper);
  background: #4752C4;
}
.discord-button:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--paper);
}
.discord-icon { flex-shrink: 0; }

.contact-extra {
  margin-top: 3rem;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: rgba(244, 236, 216, 0.7);
}
.contact-extra a {
  color: var(--gold-soft);
  border-bottom: 1px dashed var(--gold-soft);
  transition: color 0.3s;
}
.contact-extra a:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.footer {
  position: relative;
  z-index: 2;
  margin-top: 6rem;
  padding: 2.5rem 0;
  border-top: 1px solid rgba(244, 236, 216, 0.1);
  text-align: center;
}
.footer-logo {
  font-family: "Ma Shan Zheng", serif;
  font-size: 1.3rem;
  letter-spacing: 0.25em;
  color: var(--vermillion-soft);
  margin-bottom: 0.4rem;
}
.footer p {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  color: rgba(244, 236, 216, 0.4);
  font-size: 0.9rem;
  letter-spacing: 0.05em;
}

/* =================================================
   Reveal animations
   ================================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =================================================
   Responsive
   ================================================= */
@media (max-width: 980px) {
  .nav { padding: 1rem 1.5rem; }
  .nav-links { gap: 1.4rem; }
  .nav-links li:not(:last-child):not(:first-child):nth-child(n+4) { display: none; }
  .vertical-banner { display: none; }
  .ink-tr, .ink-bl { opacity: 0.25; width: 80%; max-width: 600px; }
  .ink-sp-1, .ink-sp-2, .ink-sp-3 { width: 60px; height: 60px; opacity: 0.4; }

  .showcase {
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 5rem 1.5rem;
  }
  .showcase-right .showcase-text { order: 2; }
  .showcase-right .showcase-media { order: 1; }

  .canvas-area {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }
  .canvas-wrapper { width: 100%; max-width: 360px; }

  .practice-tabs { grid-template-columns: 1fr; gap: 0.6rem; }
  .free-writing-area {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }

  .el-display { grid-template-columns: 1fr; gap: 2rem; }
  .el-selector { grid-template-columns: repeat(5, 1fr); gap: 0.4rem; }
  .el-tab { padding: 0.8rem 0.3rem; }
  .el-tab-char { font-size: 2rem; }
  .el-tab-en { font-size: 0.65rem; letter-spacing: 0.12em; }
}

@media (max-width: 600px) {
  .hero { padding: 7rem 1.2rem 5rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .btn { width: 100%; }

  .features, .journey, .practice, .contact { padding: 5rem 1.2rem; }
  .contact { padding-top: 5rem; padding-bottom: 0; }

  .feature-grid { gap: 1.5rem; }
  .feature-card { padding: 2.4rem 1.6rem 2rem; }
  .feature-glyph { font-size: 4rem; }

  .timeline { padding-left: 2rem; }
  .timeline-dot { left: -2.4rem; }

  .char-btn { width: 70px; height: 78px; }
  .char-btn .cn { font-size: 1.8rem; }

  .nav-links a:not(.nav-cta) { font-size: 0.75rem; letter-spacing: 0.1em; }
  .nav-links { gap: 0.8rem; }
}
