@font-face {
  font-family: "Lilita One";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/i7dPIFZ9Zz-WBtRtedDbYEF8RQ.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/XRXV3I6Li01BKofINeaB.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/XRXV3I6Li01BKofINeaB.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("/assets/fonts/XRXV3I6Li01BKofINeaB.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("/assets/fonts/XRXV3I6Li01BKofINeaB.woff2") format("woff2");
}
@font-face {
  font-family: "Press Start 2P";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/e3t4euO8T-267oIAQAu6jDQyK3nVivM.woff2") format("woff2");
}

:root {
  --cream: #efe2c4;
  --cream-2: #f4ead0;
  --card: #f8efd8;
  --card-2: #fbf5e6;
  --well: #efe0bf;
  --ink: #38291a;
  --ink-soft: #7a6244;
  --line: #d8be8e;
  --line-strong: #c39a5d;
  --wood-1: #4a3320;
  --wood-2: #341f0f;
  --wood-3: #5c4026;
  --gold-1: #ffd34d;
  --gold-2: #f6a623;
  --gold-3: #e8851a;
  --gold-edge: #9c5a14;
  --navy-1: #15253c;
  --navy-2: #0d1828;
  --navy-line: #273a55;
  --navy-text: #b7c4d6;
  --common: #9a7c52;
  --rare: #3f86d6;
  --uncommon: #5aa845;
  --epic: #6b5bd4;
  --lime: #00c805;
  --lime-2: #7fe312;
  --lime-deep: #008c04;
  --maxw: 1160px;
  --radius: 18px;
  --shadow-mon: drop-shadow(0 8px 6px rgba(40, 25, 10, 0.35));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
body {
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.045;
  background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(80, 50, 20, 0.08) 3px);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
h1, h2, h3, h4, .brand-name, .hero-sign-text, .btn { font-family: "Lilita One", cursive; }
.section-title, .eyebrow, .feature-name, .phase-tag, .join-title, .footer-title, .rarity, .rewards-label, .intro-eyebrow, .intro-hint {
  font-family: "Press Start 2P", monospace;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-size: 1.02rem;
  letter-spacing: 0.4px;
  color: #5a3406;
  padding: 0.62em 1.25em;
  border-radius: 999px;
  background: linear-gradient(#ffe07a, var(--gold-2) 55%, var(--gold-3));
  border: 2px solid var(--gold-edge);
  box-shadow: 0 4px 0 var(--gold-edge), 0 8px 14px rgba(120, 70, 10, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  position: relative;
  overflow: hidden;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--gold-edge), 0 12px 20px rgba(120, 70, 10, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.55); }
.btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gold-edge), 0 4px 8px rgba(120, 70, 10, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.55); }
.btn .arr { font-family: "Nunito"; font-weight: 900; font-size: 1.25em; line-height: 0; }
.btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-18deg);
  pointer-events: none;
}
.btn:hover::after { animation: shine 0.85s ease; }
@keyframes shine { from { left: -130%; } to { left: 170%; } }

.btn-play, .ready-btn {
  color: #06240a;
  background: linear-gradient(#b8ff6a, var(--lime) 55%, var(--lime-deep));
  border-color: #146b12;
  box-shadow: 0 4px 0 #146b12, 0 8px 14px rgba(0, 80, 10, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.45);
}
.btn-play:hover, .ready-btn:hover {
  box-shadow: 0 6px 0 #146b12, 0 12px 20px rgba(0, 80, 10, 0.4), inset 0 2px 0 rgba(255, 255, 255, 0.45);
}

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: transparent;
  padding: 14px 0;
}
.nav-shell { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.navbar {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(var(--card-2), var(--card));
  border: 2px solid var(--line-strong);
  border-radius: 14px;
  padding: 8px 12px 8px 14px;
  box-shadow: inset 0 1px 0 #fff8e6, 0 6px 20px rgba(0, 0, 0, 0.45);
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mon { width: 34px; height: 34px; object-fit: contain; filter: var(--shadow-mon); }
.brand-name { font-size: 1.5rem; letter-spacing: 0.5px; color: var(--ink); line-height: 1; }
.nav-links { display: flex; gap: 26px; list-style: none; margin-left: 14px; }
.nav-links a {
  font-weight: 800;
  font-size: 0.96rem;
  color: var(--ink-soft);
  padding: 6px 2px;
  position: relative;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--lime-deep); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  border-radius: 3px;
  background: var(--lime);
}
.nav-play { margin-left: auto; font-size: 0.95rem; padding: 0.5em 1.15em; }
.nav-toggle { display: none; }

.hero {
  position: relative;
  background: #1a1209;
  border-bottom: 4px solid #20120a;
  overflow: hidden;
  transform-origin: 50% 42%;
}
.hero-bg { width: 100%; height: auto; display: block; transform: scale(1.045); transition: transform 0.3s ease-out; will-change: transform; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 60% at 50% 18%, rgba(20, 10, 0, 0.5), transparent 55%);
  pointer-events: none;
  z-index: 1;
}
.hero-stage {
  position: absolute;
  z-index: 2;
  top: 14%;
  left: 0; right: 0;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hero-sign {
  background: linear-gradient(#fbf3df, #f1e3c2);
  border: 4px solid #8a5a2b;
  outline: 3px solid #c89b5f;
  outline-offset: -9px;
  border-radius: 16px;
  padding: 0.5em 1.3em;
  box-shadow: 0 10px 0 rgba(0, 0, 0, 0.25), 0 16px 30px rgba(0, 0, 0, 0.45), inset 0 2px 0 #fff;
  transform: rotate(-0.5deg);
}
.hero-sign-text {
  font-size: clamp(1.9rem, 5.4vw, 3.6rem);
  color: #46301a;
  letter-spacing: 1px;
  line-height: 1;
  text-shadow: 0 2px 0 #d8b87f;
}
.hero-sub {
  margin-top: 18px;
  font-family: "Lilita One";
  letter-spacing: 3px;
  font-size: clamp(1rem, 2.4vw, 1.5rem);
  color: #fff3d6;
  text-shadow: 0 2px 0 #6a3d12, 0 4px 10px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  gap: 0.6em;
}
.dot-mon { width: 1.5em; height: 1.5em; object-fit: contain; filter: var(--shadow-mon); }
body.entered .hero { animation: heroArrive 1.4s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes heroArrive {
  0% { transform: scale(1.09); opacity: 0.2; }
  100% { transform: scale(1); opacity: 1; }
}

.section { padding: 64px 0; }
.section-head { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 40px; }
.section-title {
  font-size: clamp(0.78rem, 2.2vw, 1.35rem);
  color: var(--ink);
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 #d9c294;
  text-align: center;
}
.flourish { color: var(--line-strong); font-size: 1.2rem; transform: translateY(-2px); }
.showcase, .gameplay, .roadmap, .how, .shopkeeper, .events { border-top: 3px solid #d7bd8c; }

.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.mon-card {
  background: linear-gradient(var(--card-2), var(--card));
  border: 3px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 22px 16px 24px;
  text-align: center;
  box-shadow: 0 6px 0 #d8bd88, 0 10px 22px rgba(120, 80, 20, 0.18), inset 0 2px 0 #fff8e7;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  will-change: transform;
}
.mon-card:hover { transform: translateY(-6px); box-shadow: 0 12px 0 #d8bd88, 0 18px 30px rgba(120, 80, 20, 0.25), inset 0 2px 0 #fff8e7; }
.mon-card.tilt, .event.tilt { transform: perspective(760px) rotateX(var(--rx, 0)) rotateY(var(--ry, 0)) translateY(-6px); }
.mon-well {
  width: 128px; height: 128px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 38%, #fcf6e6, var(--well));
  border: 3px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 4px 10px rgba(120, 80, 30, 0.25);
}
.mon-well img { width: 88px; height: 88px; object-fit: contain; filter: var(--shadow-mon); animation: bob 3.6s ease-in-out infinite; }
.mon-card:nth-child(2) .mon-well img { animation-delay: 0.5s; }
.mon-card:nth-child(3) .mon-well img { animation-delay: 1s; }
.mon-card:nth-child(4) .mon-well img { animation-delay: 1.5s; }
@keyframes bob { 50% { transform: translateY(-8px); } }
.mon-name { font-size: 1.5rem; color: var(--ink); line-height: 1; margin-bottom: 8px; }
.rarity { display: inline-block; font-size: 0.5rem; letter-spacing: 0.5px; padding: 5px 9px; border-radius: 6px; color: #fff; }
.rarity-common { background: var(--common); }
.rarity-rare { background: var(--rare); }
.rarity-uncommon { background: var(--uncommon); }
.rarity-epic { background: var(--epic); }
.mon-desc { margin-top: 12px; color: var(--ink-soft); font-weight: 700; font-size: 0.95rem; min-height: 2.4em; }

.gameplay-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.52rem; letter-spacing: 1.5px; color: var(--lime-deep); margin-bottom: 14px;
}
.eb-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #b8ff6a, var(--lime));
  box-shadow: 0 0 0 2px #fff inset;
}
.gameplay-title { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.05; color: var(--ink); margin-bottom: 30px; }
.steps { list-style: none; display: flex; gap: 14px; }
.step {
  flex: 1; text-align: center; position: relative;
  background: var(--card-2); border: 2px solid var(--line); border-radius: 14px;
  padding: 30px 8px 16px;
  box-shadow: 0 4px 0 #e0c897, inset 0 1px 0 #fff;
}
.step-num {
  position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(#ffd34d, var(--gold-3));
  border: 2px solid var(--gold-edge);
  color: #5a3406; font-family: "Lilita One"; font-size: 1rem;
  display: grid; place-items: center;
  box-shadow: 0 3px 6px rgba(120, 70, 10, 0.35);
}
.step-icon { display: block; height: 62px; margin-bottom: 10px; }
.step-icon img { height: 100%; margin: 0 auto; object-fit: contain; filter: var(--shadow-mon); }
.step-label { font-family: "Lilita One"; font-size: 1.05rem; color: var(--ink); line-height: 1.1; display: block; }
.gameplay-right { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.track-card img { width: 100%; height: auto; display: block; filter: drop-shadow(0 12px 18px rgba(60, 40, 10, 0.45)); border-radius: 8px; }

.map-wrap { position: relative; max-width: 1000px; margin: 0 auto; border-radius: 18px; overflow: visible; }
.map-img {
  width: 100%; border-radius: 16px;
  border: 4px solid #cdb079;
  box-shadow: 0 12px 26px rgba(90, 60, 20, 0.28), inset 0 0 0 2px #f4e8cf;
}
.phase {
  position: absolute; top: var(--top); left: var(--left);
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 130px; text-align: center;
}
.phase-tag {
  font-size: 0.42rem; letter-spacing: 0.5px; color: #5a3406;
  background: linear-gradient(#fbf0d6, #efdcb4);
  border: 2px solid var(--line-strong); border-radius: 7px; padding: 5px 8px;
  box-shadow: 0 3px 0 #c8a86a, 0 5px 10px rgba(80, 50, 10, 0.3);
  white-space: nowrap;
}
.phase-text {
  font-family: "Lilita One"; font-size: 0.82rem; color: var(--ink); line-height: 1.05;
  background: rgba(250, 243, 225, 0.86); padding: 3px 8px; border-radius: 6px;
  text-shadow: 0 1px 0 #fff;
}
.phase-list { display: none; }

.join {
  position: relative; padding: 72px 0;
  background: url("/assets/gate.jpg") center/cover no-repeat;
  border-top: 4px solid #20120a; border-bottom: 4px solid #20120a;
  overflow: hidden;
}
.join-overlay { position: absolute; inset: 0; background: linear-gradient(rgba(10, 20, 35, 0.42), rgba(10, 20, 35, 0.30)); }
.join-inner { position: relative; z-index: 2; text-align: center; }
.join-title {
  font-size: clamp(0.78rem, 2.4vw, 1.35rem); color: #fff; letter-spacing: 1px; margin-bottom: 34px;
  text-shadow: 0 3px 0 #1a3050, 0 5px 14px rgba(0, 0, 0, 0.6);
}
.join-flourish { color: #ffd98a; }
.social-row { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; }
.social {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: "Lilita One"; font-size: 1.15rem; color: #fff;
  padding: 0.7em 1.5em; border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.28), 0 10px 18px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.3);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
}
.social:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 8px 0 rgba(0, 0, 0, 0.28), 0 14px 22px rgba(0, 0, 0, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.3); }
.social-x { background: linear-gradient(#2c2c2e, #050505); border-color: rgba(255, 255, 255, 0.22); }
.social-x:disabled { opacity: 0.72; cursor: not-allowed; }
.social-play { background: linear-gradient(#7fe312, var(--lime-deep)); border-color: rgba(255, 255, 255, 0.35); color: #06240a; }
.social-ca { background: linear-gradient(#3a2a18, #20140c); }

.site-footer { background: linear-gradient(var(--navy-1), var(--navy-2)); color: var(--navy-text); }
.footer-top { display: grid; grid-template-columns: 0.85fr 1.4fr; gap: 54px; padding-top: 60px; padding-bottom: 50px; }
.footer-title { font-size: 0.72rem; color: #fff; letter-spacing: 1px; margin-bottom: 20px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4); }
.about-text { color: var(--navy-text); font-size: 0.98rem; line-height: 1.65; max-width: 42ch; }
.about-img { margin-top: 22px; border-radius: 14px; overflow: hidden; border: 2px solid var(--navy-line); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.about-img img { width: 100%; height: 160px; object-fit: cover; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.feature { position: relative; padding-left: 2px; }
.feature::before { content: ""; position: absolute; left: -13px; top: 6px; bottom: 6px; width: 1px; background: var(--navy-line); }
.feature:first-child::before { display: none; }
.feature-icon { display: block; height: 58px; margin-bottom: 14px; }
.feature-icon img { height: 100%; object-fit: contain; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.5)); }
.feature-name { font-size: 0.7rem; letter-spacing: 0.5px; margin-bottom: 12px; }
.fn-collect { color: var(--gold-1); }
.fn-upgrade { color: #a98bff; }
.fn-race { color: #54c0ee; }
.fn-win { color: var(--lime-2); }
.feature p { font-size: 0.92rem; line-height: 1.55; color: var(--navy-text); }

.ready-card {
  position: relative; margin-top: 40px; overflow: hidden;
  display: flex; align-items: center; gap: 22px;
  padding: 22px 26px; border-radius: 16px;
  background: linear-gradient(rgba(20, 14, 6, 0.62), rgba(20, 14, 6, 0.74)), url("/assets/landscape.jpg") center 60% / cover no-repeat;
  border: 3px solid var(--gold-2);
  box-shadow: 0 0 0 2px #6a4112, inset 0 0 30px rgba(0, 0, 0, 0.5), 0 10px 26px rgba(0, 0, 0, 0.4);
}
.ready-flag { flex: none; width: 64px; height: 64px; display: grid; place-items: center; }
.ready-flag img { height: 60px; filter: drop-shadow(0 6px 5px rgba(0, 0, 0, 0.6)); }
.ready-copy { flex: 1; }
.ready-title { font-size: 1.7rem; color: #ffdf9a; letter-spacing: 0.5px; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); line-height: 1; }
.ready-copy p { color: #f1e6d2; font-weight: 700; margin-top: 6px; }
.ready-btn { flex: none; }

.footer-bar { background: var(--navy-2); border-top: 1px solid var(--navy-line); }
.footer-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-top: 18px; padding-bottom: 18px; }
.brand-sm .brand-name { font-size: 1.25rem; color: #fff; }
.brand-sm .brand-mon { width: 26px; height: 26px; }
.footer-nav { display: flex; gap: 26px; list-style: none; }
.footer-nav a { color: var(--navy-text); font-weight: 800; font-size: 0.92rem; transition: color 0.15s; }
.footer-nav a:hover { color: #fff; }
.copyright { font-size: 0.82rem; color: #6f819a; }

.flourish-l, .flourish-r { font-family: "Lilita One"; font-size: 1.4rem; color: var(--line-strong); letter-spacing: -2px; }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; position: relative; }
.how-step { position: relative; text-align: center; padding: 0 4px; }
.how-num {
  width: 38px; height: 38px; display: grid; place-items: center; margin: 0 auto 14px;
  font-family: "Lilita One"; font-size: 1.15rem; color: #23420f;
  background: linear-gradient(#a7d957, #5a9e2f);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
  box-shadow: 0 4px 8px rgba(40, 70, 10, 0.35); position: relative;
}
.how-num::before { content: ""; position: absolute; inset: 3px; clip-path: inherit; border: 2px solid rgba(255, 255, 255, 0.5); }
.how-step:not(:last-child)::after {
  content: ""; position: absolute; top: 17px; right: -19px; width: 30px; height: 0;
  border-top: 3px dashed var(--line-strong);
}
.how-art { height: 170px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 16px; }
.how-art img { max-height: 170px; width: auto; border-radius: 10px; filter: drop-shadow(0 8px 7px rgba(40, 25, 10, 0.3)); animation: bob 4s ease-in-out infinite; }
.how-step:nth-child(2) .how-art img { animation-delay: 0.5s; }
.how-step:nth-child(3) .how-art img { animation-delay: 1s; }
.how-step:nth-child(4) .how-art img { animation-delay: 1.5s; }
.how-title { font-family: "Lilita One"; font-size: 1.2rem; color: var(--ink); margin-bottom: 7px; line-height: 1.05; }
.how-step p { color: var(--ink-soft); font-weight: 700; font-size: 0.9rem; line-height: 1.4; }

.keeper-panel {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 3px solid #46301a;
  background: url("/assets/keeper.jpg") center / cover no-repeat;
  min-height: clamp(320px, 42vw, 460px);
  box-shadow: 0 14px 30px rgba(50, 30, 10, 0.4), inset 0 0 0 2px rgba(255, 220, 150, 0.15);
}
.keeper-panel::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 30%, rgba(12, 8, 4, 0.55) 52%, rgba(12, 8, 4, 0.78) 100%);
}
.keeper-sign {
  position: absolute; top: 22px; left: 24px; z-index: 3;
  background: linear-gradient(#e7b75c, #c98f3d);
  border: 3px solid #5b3c1c; border-radius: 10px;
  padding: 9px 15px; transform: rotate(-2deg);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.4);
}
.keeper-sign span { font-family: "Lilita One"; color: #43290f; font-size: 1.02rem; line-height: 1.06; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35); text-align: center; display: block; }
.keeper-sign::before { content: ""; position: absolute; top: -14px; left: 50%; width: 2px; height: 14px; background: #3a2913; }
.keeper-copy {
  position: absolute; z-index: 4; right: 0; top: 0; bottom: 0; width: 56%;
  padding: clamp(22px, 3.4vw, 40px) clamp(24px, 3.4vw, 42px);
  display: flex; flex-direction: column; justify-content: center;
}
.keeper-copy h3 { font-family: "Lilita One"; color: #fff4dd; font-size: clamp(1.2rem, 2.1vw, 1.65rem); line-height: 1.12; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.keeper-list { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 15px; }
.keeper-list li { display: flex; align-items: center; gap: 14px; }
.keeper-ic {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  background: rgba(255, 240, 210, 0.08); border: 1px solid rgba(255, 225, 170, 0.22); border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.keeper-ic img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5)); animation: bob 3.6s ease-in-out infinite; }
.keeper-list li:nth-child(2) .keeper-ic img { animation-delay: 0.6s; }
.keeper-list li:nth-child(3) .keeper-ic img { animation-delay: 1.2s; }
.keeper-list li span:last-child { color: #ecdfc6; font-weight: 700; font-size: 0.98rem; line-height: 1.35; }

.events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.event {
  text-align: center; padding: 18px 16px 20px;
  background: linear-gradient(var(--card-2), var(--card));
  border: 2px solid var(--line); border-radius: 16px;
  box-shadow: 0 5px 0 #e0c897, 0 9px 18px rgba(120, 80, 20, 0.14), inset 0 1px 0 #fff8e7;
  will-change: transform;
}
.event-img { margin-bottom: 12px; }
.event-img img { display: block; width: 100%; max-width: 280px; height: auto; margin: 0 auto; filter: drop-shadow(0 8px 9px rgba(40, 25, 10, 0.3)); }
.event-title { font-family: "Lilita One"; font-size: 1.35rem; color: var(--ink); line-height: 1; margin-bottom: 9px; }
.event p { color: var(--ink-soft); font-weight: 700; font-size: 0.93rem; line-height: 1.4; min-height: 2.8em; padding: 0 4px; }
.rewards { margin-top: 14px; padding-top: 13px; border-top: 1px dashed var(--line-strong); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rewards-label { font-size: 0.45rem; letter-spacing: 1px; color: var(--ink-soft); }
.reward-icons { display: flex; gap: 14px; align-items: center; }
.reward-icons img { width: 27px; height: 27px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.22)); }
.events-banner {
  margin-top: 34px; display: flex; align-items: center; gap: 22px;
  background: linear-gradient(#f6ead0, #ecdcb6);
  border: 2px solid var(--line-strong); border-radius: 14px;
  padding: 14px 26px;
  box-shadow: 0 5px 0 #d8bd88, 0 10px 20px rgba(120, 80, 20, 0.16), inset 0 1px 0 #fff8e7;
}
.banner-star { width: 96px; height: auto; flex: none; filter: drop-shadow(0 5px 6px rgba(40, 25, 10, 0.4)); }
.banner-copy { flex: 1; }
.banner-copy h3 { font-family: "Lilita One"; font-size: 1.4rem; color: var(--ink); line-height: 1; letter-spacing: 0.3px; }
.banner-copy p { color: var(--ink-soft); font-weight: 700; margin-top: 3px; }
.banner-mon { width: 64px; height: auto; flex: none; filter: var(--shadow-mon); animation: bob 3.2s ease-in-out infinite; }

.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; transition-delay: var(--rd, 0s); }
html.js .reveal.in { opacity: 1; transform: none; }

html.intro-open, html.intro-open body { overflow: hidden; height: 100%; }
.intro { position: fixed; inset: 0; z-index: 9998; overflow: hidden; cursor: pointer; background: #0a0d09; transition: opacity 0.6s ease 0.5s; }
.intro-scene {
  position: absolute; inset: -2%;
  background: url("/assets/gate.jpg") center 40% / cover no-repeat;
  transform-origin: 50% 41%;
  will-change: transform, opacity;
  animation: introIn 1.3s ease-out both;
}
.intro::after {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(6, 9, 6, 0.4), transparent 24%, transparent 48%, rgba(6, 9, 6, 0.8));
}
.intro-content {
  position: absolute; left: 0; right: 0; bottom: 6.5%; z-index: 3;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 0 24px; pointer-events: none;
}
.intro-eyebrow { font-size: 0.5rem; letter-spacing: 2px; color: #ffd98a; margin-bottom: 14px; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85); }
.intro-title { font-size: clamp(2rem, 5.2vw, 3.4rem); color: #ffe9b8; line-height: 1; text-shadow: 0 3px 0 #5b3310, 0 7px 22px rgba(0, 0, 0, 0.75); }
.intro-sub { max-width: 580px; margin: 14px 0 24px; color: #f4e8d0; font-weight: 700; font-size: clamp(0.95rem, 1.7vw, 1.16rem); line-height: 1.5; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.92); }
.intro-sub b { color: #b8ff6a; }
.intro-btn { border: none; background: none; padding: 0; cursor: pointer; pointer-events: auto; animation: introBob 2s ease-in-out infinite; transition: transform 0.15s ease; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.55)); }
.intro-btn:hover { transform: scale(1.06); }
.intro-btn:active { transform: scale(0.96); }
.wood-btn {
  display: inline-block;
  font-family: "Lilita One", cursive;
  font-size: clamp(1.05rem, 2.4vw, 1.45rem);
  letter-spacing: 2px;
  color: #f4ead0;
  background: linear-gradient(#6a4324, #3d2412);
  border: 4px solid #c9a36a;
  border-radius: 12px;
  padding: 0.55em 1.4em;
  text-shadow: 0 2px 0 #1a0e06;
  box-shadow: inset 0 2px 0 rgba(255, 220, 160, 0.25), 0 6px 0 #241408;
}
.intro-hint { margin-top: 18px; font-size: 0.46rem; letter-spacing: 1.5px; color: #fff; opacity: 0.8; animation: introBlink 1.5s steps(1, end) infinite; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); }
@keyframes introIn { from { transform: scale(1.14); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes introBob { 50% { transform: translateY(-6px); } }
@keyframes introBlink { 50% { opacity: 0.22; } }
.intro.leaving { opacity: 0; pointer-events: none; }
.intro.leaving .intro-scene { transition: transform 1.25s cubic-bezier(0.4, 0, 0.5, 1), opacity 1s ease-in 0.25s, filter 1.2s ease-in; transform: scale(3.2); filter: blur(8px) brightness(1.12); opacity: 0; }
.intro.leaving .intro-content { transition: opacity 0.3s ease, transform 0.5s ease; opacity: 0; transform: translateY(14px) scale(0.96); }
.intro-bloom {
  position: absolute; left: 50%; top: 41%; width: 14px; height: 14px; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0); opacity: 0; z-index: 2; pointer-events: none;
  background: radial-gradient(circle, rgba(184, 255, 106, 0.98), rgba(0, 200, 5, 0.45) 35%, transparent 72%);
}
.intro.leaving .intro-bloom { animation: introBloom 1.2s ease-out forwards; }
@keyframes introBloom {
  0% { transform: translate(-50%, -50%) scale(0); opacity: 0; }
  30% { opacity: 0.85; }
  100% { transform: translate(-50%, -50%) scale(70); opacity: 0; }
}

.firefly {
  position: absolute; width: 7px; height: 7px; border-radius: 50%; z-index: 1; pointer-events: none;
  background: radial-gradient(circle, #fff4b8, rgba(255, 214, 110, 0) 70%);
  animation: rise linear infinite;
}
@keyframes rise {
  0% { transform: translateY(10px) scale(0.5); opacity: 0; }
  15% { opacity: 0.95; }
  85% { opacity: 0.6; }
  100% { transform: translateY(-130px) scale(1.1); opacity: 0; }
}

.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; background: linear-gradient(180deg, #f2e6c9, #ece0c0 45%, #efe3c6); }
.bg-orb { position: absolute; border-radius: 50%; filter: blur(55px); opacity: 0.5; will-change: transform; }
.orb1 { width: 46vw; height: 46vw; left: -10vw; top: 3vh; background: radial-gradient(circle, #fff6dd, transparent 68%); animation: drift1 30s ease-in-out infinite; }
.orb2 { width: 38vw; height: 38vw; right: -9vw; top: 24vh; background: radial-gradient(circle, #ffe8bd, transparent 68%); animation: drift2 37s ease-in-out infinite; }
.orb3 { width: 34vw; height: 34vw; left: 16vw; top: 60vh; background: radial-gradient(circle, #e8f1c9, transparent 70%); animation: drift3 33s ease-in-out infinite; }
.orb4 { width: 40vw; height: 40vw; right: 5vw; top: 74vh; background: radial-gradient(circle, #fde7d0, transparent 70%); animation: drift1 43s ease-in-out infinite reverse; }
.orb5 { width: 30vw; height: 30vw; left: 42vw; top: 38vh; background: radial-gradient(circle, #fff7e2, transparent 72%); animation: drift2 27s ease-in-out infinite; }
@keyframes drift1 { 50% { transform: translate(10vw, 8vh); } }
@keyframes drift2 { 50% { transform: translate(-9vw, 7vh); } }
@keyframes drift3 { 50% { transform: translate(8vw, -9vh); } }
.bg-mote {
  position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 238, 196, 0.85), rgba(255, 222, 150, 0) 70%);
  animation: moteFloat linear infinite;
}
@keyframes moteFloat {
  0% { transform: translateY(40px) translateX(0); opacity: 0; }
  12% { opacity: 0.7; }
  88% { opacity: 0.45; }
  100% { transform: translateY(-150px) translateX(26px); opacity: 0; }
}

.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%);
  z-index: 10000;
  font-family: "Press Start 2P", monospace;
  font-size: 0.55rem;
  letter-spacing: 1px;
  color: #06240a;
  background: var(--lime);
  border: 3px solid #146b12;
  border-radius: 10px;
  padding: 12px 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.toast[hidden] { display: none; }

.play-note { font-weight: 800; color: var(--ink-soft); margin: -12px 0 18px; }
.gameplay-left .btn-play { margin-bottom: 28px; }

.x-gate {
  position: fixed; inset: 0; z-index: 10020;
  background: rgba(10, 8, 6, 0.72);
  display: grid; place-items: center;
  padding: 24px;
}
.x-gate[hidden], .race[hidden], .race-end[hidden], .x-handle-form[hidden] { display: none; }
.x-card {
  position: relative;
  width: min(420px, 100%);
  background: linear-gradient(var(--card-2), var(--card));
  border: 3px solid var(--line-strong);
  border-radius: 18px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 10px 0 #d8bd88, 0 22px 40px rgba(0, 0, 0, 0.45), inset 0 2px 0 #fff8e7;
}
.x-close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; font-size: 1.6rem; color: var(--ink-soft); cursor: pointer; line-height: 1;
}
.x-mascot { width: 88px; height: 88px; margin: 0 auto 12px; filter: var(--shadow-mon); animation: bob 3.2s ease-in-out infinite; }
.x-kicker { font-family: "Press Start 2P", monospace; font-size: 0.48rem; letter-spacing: 1.5px; color: var(--lime-deep); margin-bottom: 10px; }
.x-card h2 { font-family: "Lilita One", cursive; font-size: 1.8rem; color: var(--ink); line-height: 1.05; }
.x-copy { font-weight: 800; color: var(--ink-soft); margin: 10px 0 18px; }
.x-connect-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  font-family: "Lilita One", cursive; font-size: 1.15rem; color: #fff;
  background: linear-gradient(#2c2c2e, #050505);
  border: 2px solid #111;
  border-radius: 12px;
  padding: 0.75em 1em;
  cursor: pointer;
  box-shadow: 0 4px 0 #000, 0 8px 16px rgba(0, 0, 0, 0.3);
}
.x-connect-btn:hover { transform: translateY(-1px); }
.x-handle-form { text-align: left; }
.x-handle-form label { display: block; font-weight: 800; font-size: 0.85rem; margin-bottom: 8px; color: var(--ink); }
.x-handle-row {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 2px solid var(--line-strong); border-radius: 10px;
  padding: 8px 12px; margin-bottom: 12px;
  font-family: "Lilita One", cursive; font-size: 1.15rem;
}
.x-handle-row input {
  flex: 1; border: none; outline: none; font: inherit; min-width: 0; background: transparent; color: var(--ink);
}
.x-fine { margin-top: 14px; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); }

.race {
  position: fixed; inset: 0; z-index: 10010;
  background: #1a1209;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.race-hud {
  position: absolute; top: 12px; left: 12px; right: 12px; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  font-family: "Press Start 2P", monospace; font-size: 0.55rem; color: #ffe9b8;
}
.race-hud span { background: rgba(0, 0, 0, 0.45); padding: 8px 10px; border-radius: 8px; }
#race-exit {
  margin-left: auto; font-family: "Lilita One", cursive; font-size: 0.95rem;
  background: #3a2a18; color: #fff; border: 2px solid #c89b5f; border-radius: 8px; padding: 6px 12px; cursor: pointer;
}
#race-canvas {
  width: min(420px, 100vw); height: min(78vh, 720px);
  background: #5a3a1c; border: 4px solid #c89b5f; border-radius: 12px;
  image-rendering: pixelated;
}
.race-help { margin-top: 10px; color: #f1e6d2; font-weight: 800; }
.race-end {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(8, 6, 4, 0.72);
}
.race-end > div, .race-end {
  text-align: center; padding: 24px;
}
.race-end h3 { font-family: "Lilita One", cursive; font-size: 2.2rem; color: #ffdf9a; }
.race-end p { color: #f1e6d2; font-weight: 800; margin: 10px 0 18px; }
.race-end .btn { margin: 6px; }

.navbar.open .nav-play { display: inline-flex; }

@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 26px; }
  .feature:nth-child(3)::before { display: none; }
  .gameplay-grid { grid-template-columns: 1fr; gap: 36px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .how-step:not(:last-child)::after { display: none; }
  .how-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 24px; }
  .events-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 860px) {
  .nav-links, .nav-play { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; margin-left: auto;
    background: none; border: none; cursor: pointer; padding: 6px;
  }
  .nav-toggle span { width: 26px; height: 3px; border-radius: 3px; background: var(--ink); transition: 0.25s; }
  .navbar.open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .navbar.open .nav-toggle span:nth-child(2) { opacity: 0; }
  .navbar.open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .navbar { flex-wrap: wrap; }
  .navbar.open .nav-links {
    display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 8px 0 4px;
    border-top: 2px solid var(--line); padding-top: 10px;
  }
  .navbar.open .nav-play { display: inline-flex; margin: 0 0 6px; }
  .navbar.open .nav-links a { padding: 8px 4px; }
  .map-wrap { display: none; }
  .phase-list {
    display: block; max-width: 520px; margin: 0 auto; list-style: none;
    border-left: 3px dashed var(--line-strong); padding-left: 24px;
  }
  .phase-list li {
    position: relative; margin: 0 0 22px; font-family: "Lilita One"; font-size: 1.2rem; color: var(--ink);
    display: flex; align-items: center; gap: 12px;
  }
  .phase-list li::before {
    content: ""; position: absolute; left: -32px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--lime); border: 2px solid #146b12;
  }
}
@media (max-width: 760px) {
  .keeper-panel { min-height: clamp(440px, 96vw, 580px); background-position: center top; display: flex; flex-direction: column; justify-content: flex-end; }
  .keeper-panel::after { background: linear-gradient(transparent 24%, rgba(12, 8, 4, 0.82) 62%); }
  .keeper-copy { position: relative; width: 100%; padding: 26px 24px 28px; }
}
@media (max-width: 560px) {
  .section { padding: 48px 0; }
  .card-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .mon-well { width: 104px; height: 104px; }
  .mon-well img { width: 72px; height: 72px; }
  .steps { flex-direction: column; }
  .gameplay-right { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 24px 18px; }
  .ready-card { flex-direction: column; text-align: center; }
  .footer-bar-inner { flex-direction: column; text-align: center; }
  .hero-sub { flex-wrap: wrap; justify-content: center; }
  .how-grid { grid-template-columns: 1fr; gap: 8px; }
  .how-step { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 14px; text-align: left; padding: 14px 6px; border-bottom: 1px dashed var(--line); }
  .how-num { grid-row: 1; grid-column: 1; margin: 0 auto 8px; }
  .how-art { grid-row: 2; grid-column: 1; height: auto; margin: 0; }
  .how-art img { max-height: 128px; }
  .how-title { grid-column: 2; grid-row: 1; margin: 0; }
  .how-step p { grid-column: 2; grid-row: 2; }
  .events-grid { grid-template-columns: 1fr; gap: 18px; }
  .events-banner { flex-direction: column; text-align: center; gap: 12px; }
  .intro-scene { background-position: center 37%; }
  .intro-content { bottom: 5%; }
  .hero-stage { top: 10%; }
}

@media (prefers-reduced-motion: reduce) {
  html.js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
  .intro-scene, .intro-btn, .banner-mon, .how-art img, .keeper-ic img, .mon-well img { animation: none; }
  .hero-bg { transform: none; }
  .intro.leaving .intro-scene { transition: opacity 0.4s; transform: none; filter: none; }
  .btn:hover::after { animation: none; }
  .firefly, .bg-orb, .bg-mote { display: none; animation: none; }
  body.entered .hero { animation: none; }
  .intro.leaving .intro-bloom { animation: none; }
}
