/* ===================================================================
   Vùng Đất Linh Thú — trang chủ
   =================================================================== */

.spine-layer { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }
.hero-pick-cards, .dex-grid, .type-panel, .bento { position: relative; }
.spine-live { visibility: hidden; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.home { background: var(--bronze-900); }

/* ---------- Tải trang ---------- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 18px;
  background: radial-gradient(600px 400px at 50% 45%, #4a2e16, var(--bronze-950));
  transition: opacity 0.7s var(--ease), visibility 0s 0.7s;
}
.preloader-drum { position: absolute; width: min(520px, 90vw); opacity: 0.22; animation: spin 18s linear infinite; will-change: transform; }
.preloader-logo { position: relative; width: min(220px, 50vw); filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.5)); }
.preloader-logo img { display: block; width: 100%; animation: preLogo 1.6s var(--ease) infinite alternate; }
body.is-loading:not(.main-ready) main { content-visibility: hidden; }
body.is-loading main *, body.is-loading main *::before, body.is-loading main *::after { animation-play-state: paused !important; }
.preloader-text { position: relative; font-family: var(--font-head); font-weight: 700; font-size: 17px; color: var(--gold-hi); letter-spacing: 0.02em; }
.preloader-text span { animation: dot 1.2s infinite; }
.preloader-text span:nth-child(2) { animation-delay: 0.2s; }
.preloader-text span:nth-child(3) { animation-delay: 0.4s; }
body:not(.is-loading) .preloader { opacity: 0; visibility: hidden; pointer-events: none; }
@keyframes preLogo { from { transform: scale(0.96); } to { transform: scale(1.04); } }
@keyframes dot { 0%, 100% { opacity: 0.2; } 50% { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Khung chung ---------- */
.section { position: relative; padding: 118px 0 110px; }
.section-head { text-align: center; max-width: 780px; margin: 0 auto 54px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lacquer);
  margin-bottom: 10px;
}
.eyebrow::before, .eyebrow::after {
  content: "";
  width: 22px; height: 22px;
  background: url("../assets/brand/drum.svg?v=202610061208") center / contain no-repeat;
  filter: sepia(1) saturate(4) hue-rotate(-20deg) brightness(0.75);
}
.eyebrow.light { color: var(--gold-hi); }
.eyebrow.light::before, .eyebrow.light::after { filter: none; }

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.005em;
  color: #fff8e8;
  text-shadow: 0 3px 0 #2a1709, 0 0 2px #2a1709, 2px 2px 0 #2a1709, -2px 2px 0 #2a1709, 2px -1px 0 #2a1709, -2px -1px 0 #2a1709, 0 10px 24px rgba(0, 0, 0, 0.35);
}
.section-title.dark { color: var(--bronze-700); text-shadow: 0 2px 0 rgba(255, 250, 235, 0.8); }
.section-title .grad-text, .section-title.dark em { text-shadow: none; }
.section-title .grad-text { filter: drop-shadow(2px 0 0 #2a1709) drop-shadow(-2px 0 0 #2a1709) drop-shadow(0 2px 0 #2a1709) drop-shadow(0 -2px 0 #2a1709) drop-shadow(0 4px 0 #2a1709); }
.section-title.dark em {
  font-style: normal;
  background: linear-gradient(180deg, #5fdcff 0%, #22a4e6 55%, #1567b0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 0 #0d3a66);
}
.section-lead { color: #e9d4ae; font-size: 17.5px; margin-top: 16px; }
.section-lead.dark { color: #6b4a2a; }

.parchment {
  color: #4a2f17;
  background:
    linear-gradient(180deg, rgba(255, 246, 225, 0.35), rgba(255, 246, 225, 0) 20%, rgba(255, 246, 225, 0) 80%, rgba(120, 80, 40, 0.18)),
    url("../assets/brand/parchment-tile.webp?v=202610061208") center top / 1080px auto repeat,
    var(--parch-200);
}
.parchment::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 18px 30px -18px rgba(60, 35, 12, 0.55), inset 0 -18px 30px -18px rgba(60, 35, 12, 0.45);
}

.band {
  position: absolute;
  left: 0; right: 0;
  height: 26px;
  z-index: 3;
  background: var(--band-zigzag) repeat-x left center / auto 100%, var(--bronze-700);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3), 0 -2px 0 rgba(255, 220, 150, 0.15);
}
.band--top { top: 0; }

.starters, .types, .features {
  color: var(--text);
  background:
    radial-gradient(900px 600px at 50% 30%, rgba(122, 79, 39, 0.35), transparent 70%),
    url("../assets/brand/drum-faint.svg?v=202610061208") 50% 55% / min(1300px, 170vw) no-repeat,
    linear-gradient(180deg, var(--bronze-800), var(--bronze-900));
}

/* ===================== HERO ===================== */
.hero {
  position: relative;
  min-height: max(720px, 100svh);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}
.hero-scene { position: absolute; inset: 0; z-index: -1; }
.hero-art { position: absolute; inset: 0; }
.hero-art.fit {
  -webkit-mask-image: linear-gradient(180deg, #000 calc(var(--img-bottom, 100%) - 90px), transparent var(--img-bottom, 100%));
  mask-image: linear-gradient(180deg, #000 calc(var(--img-bottom, 100%) - 90px), transparent var(--img-bottom, 100%));
}
.hero-art picture { position: absolute; inset: 0; }
.hero-bg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 0%; }
.hero-art:has(.hero-water.on) .hero-bg { visibility: hidden; transition: visibility 0s 1.3s; }
.hero-water { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.hero-water.on { opacity: 1; }
.hero-sun {
  position: absolute;
  left: 50%; top: -18%;
  width: 1100px; height: 900px;
  margin-left: -550px;
  background: radial-gradient(closest-side, rgba(255, 244, 200, 0.75), rgba(255, 214, 120, 0.25) 45%, transparent 75%);
  mix-blend-mode: screen;
  animation: sunPulse 7s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes sunPulse { from { opacity: 0.55; } to { opacity: 0.9; } }
.hero-rays {
  position: absolute;
  left: 50%; top: -60%;
  width: 2200px; height: 2200px;
  margin-left: -1100px;
  background: repeating-conic-gradient(from 0deg, rgba(255, 240, 200, 0.14) 0deg 4deg, transparent 4deg 14deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 10%, transparent 62%);
  mask-image: radial-gradient(closest-side, #000 10%, transparent 62%);
  mix-blend-mode: screen;
  animation: spin 160s linear infinite;
  pointer-events: none;
}
.hero-shade { z-index: 1; }
.hero-shade {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 48% at 50% 64%, rgba(24, 14, 6, 0.55), transparent 70%),
    linear-gradient(180deg, rgba(24, 14, 6, 0.3) 0%, rgba(24, 14, 6, 0) 16%, rgba(24, 14, 6, 0) 50%, rgba(29, 18, 10, 0.78) 86%, var(--bronze-900) 100%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 88px;
  padding-bottom: 104px;
}
.hero-emblem {
  position: relative;
  width: min(400px, 72vw, 36svh);
  margin-bottom: 0;
  transform: translate3d(var(--ex, 0), var(--ey, 0), 0);
  transition: transform 0.25s linear;
}
.hero-drum {
  position: absolute;
  left: 50%; top: 52%;
  width: 150%;
  max-width: none;
  margin: -75% 0 0 -75%;
  opacity: 0.4;
  filter: drop-shadow(0 0 18px rgba(255, 200, 90, 0.55));
  animation: spin 90s linear infinite;
  pointer-events: none;
}
.hero-logo-wrap {
  position: relative;
  filter: drop-shadow(0 14px 22px rgba(20, 10, 2, 0.55));
  transition: transform 0.45s var(--ease), filter 0.45s var(--ease);
  cursor: pointer;
}
.hero-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 8% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 213, 84, 0.55), rgba(255, 170, 60, 0.18) 55%, transparent 75%);
  filter: blur(10px);
  animation: breatheGlow 2.6s ease-in-out infinite alternate;
  pointer-events: none;
}
.hero-logo { position: relative; width: 100%; height: auto; }
.hero-logo, .hero-logo-shine { transform-origin: 50% 55%; animation: breathe 2.6s ease-in-out infinite alternate; }
.hero-logo-wrap:hover {
  transform: scale(1.08);
  filter: brightness(1.12) saturate(1.1) drop-shadow(0 0 18px rgba(255, 213, 84, 0.7)) drop-shadow(0 20px 34px rgba(0, 0, 0, 0.45));
}
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.045); } }
@keyframes breatheGlow { from { opacity: 0.35; transform: scale(0.94); } to { opacity: 0.9; transform: scale(1.06); } }
.hero-logo-shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  -webkit-mask: url("../assets/brand/logo.webp?v=202610061208") center / contain no-repeat;
  mask: url("../assets/brand/logo.webp?v=202610061208") center / contain no-repeat;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.hero-logo-shine::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 250%;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.75) 48%, transparent 58%);
  transform: translateX(-90%);
  animation: shine 5.5s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { transform: translateX(-90%); } 85%, 100% { transform: translateX(36%); } }

.hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.1;
  color: #fffaf0;
  text-shadow: 0 3px 0 #2a1709, 2px 2px 0 #2a1709, -2px 2px 0 #2a1709, 2px -2px 0 #2a1709, -2px -2px 0 #2a1709, 0 12px 30px rgba(0, 0, 0, 0.45);
}
.hero-title .line { display: block; opacity: 0; transform: translateY(20px); }
.hero-title em { font-style: normal; color: var(--gold-hi); }
.hero-sub {
  max-width: 660px;
  margin: 16px auto 0;
  font-size: 17.5px;
  font-weight: 500;
  color: #fff3dc;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  opacity: 0;
}
.hero-cta { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 24px; opacity: 0; }
.hero-stores { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: min(560px, 100%); }
.hero-stores .store-btn {
  min-width: 0;
  padding: 14px 22px 14px 18px;
  gap: 14px;
  border-radius: 18px;
  border-width: 2.5px;
  background: linear-gradient(180deg, rgba(66, 42, 21, 0.94), rgba(29, 18, 10, 0.96));
  border-color: rgba(255, 217, 122, 0.6);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, 0.22), 0 5px 0 rgba(0, 0, 0, 0.4), 0 12px 26px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
}
.hero-stores .store-ico { width: 36px; height: 36px; flex-basis: 36px; }
.hero-stores .store-txt small { font-size: 12.5px; }
.hero-stores .store-txt b { font-size: 22px; }
.hero-pay { min-width: min(560px, 100%); padding-top: 15px; padding-bottom: 13px; }

.hero-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
  opacity: 0;
}
.hero-badges li {
  min-width: 124px;
  padding: 10px 14px 9px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(58, 36, 19, 0.82), rgba(29, 18, 10, 0.82));
  border: 1.5px solid rgba(255, 217, 122, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, 0.18), 0 8px 20px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}
.hero-badges b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 30px; line-height: 1; color: var(--gold-hi); }
.hero-badges span { font-size: 12.5px; color: #e9d4ae; font-weight: 600; }

.hero-loaded .hero-title .line, .hero-loaded .hero-sub, .hero-loaded .hero-cta, .hero-loaded .hero-badges { opacity: 1; transform: none; }
.hero-loaded .hero-title .line { animation: rise 0.9s var(--ease) backwards; }
.hero-loaded .hero-title .line:nth-child(2) { animation-delay: 0.12s; }
.hero-loaded .hero-sub { animation: rise 0.9s 0.28s var(--ease) backwards; }
.hero-loaded .hero-cta { animation: rise 0.9s 0.42s var(--ease) backwards; }
.hero-loaded .hero-badges { animation: rise 0.9s 0.56s var(--ease) backwards; }
.hero-loaded .hero-emblem { animation: emblemIn 1.3s var(--ease-back) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes emblemIn { from { opacity: 0; transform: scale(0.7) rotate(-6deg); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 42px;
  z-index: 2;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f5e3bd;
}
.hero-scroll-ball { width: 34px; height: 34px; animation: ballBounce 1.8s var(--ease) infinite; }
.hero-scroll-ball img { width: 100%; height: 100%; object-fit: contain; }
@keyframes ballBounce { 0%, 100% { transform: translateY(0) rotate(0); } 45% { transform: translateY(10px) rotate(160deg); } 60% { transform: translateY(6px) rotate(200deg); } }
.band--hero { bottom: 0; }

/* ===================== THẾ GIỚI ===================== */
.world { padding-top: 130px; }
.world-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 64px; align-items: start; }
.world-text { padding-top: 24px; }
.world-text .section-title { text-align: left; margin-bottom: 18px; }
.world-text > p { font-size: 17px; line-height: 1.75; color: #573a1d; }
.world-text > p + p { margin-top: 14px; }
.world-text strong { color: var(--bronze-700); }
.world-quote {
  position: relative;
  margin: 22px 0;
  padding: 22px 26px 18px 64px;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf0, #f5e7cb);
  border: 2px solid #b98c55;
  box-shadow: 0 4px 0 #a4773f, 0 16px 30px rgba(90, 56, 20, 0.18);
}
.world-quote::before {
  content: "“";
  position: absolute;
  left: 16px; top: -6px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 82px;
  line-height: 1;
  color: var(--lacquer);
}
.world-quote p { font-size: 18.5px; font-weight: 600; font-style: italic; color: #4a2f17; line-height: 1.6; }
.world-quote cite { display: block; margin-top: 8px; font-style: normal; font-size: 14px; font-weight: 700; color: #9b6a33; }

.world-side { display: flex; flex-direction: column; gap: 26px; }
.hero-pick {
  border-radius: 22px;
  background: linear-gradient(180deg, #3d2613, #2a190c);
  border: 2px solid #1b0f06;
  box-shadow: 0 6px 0 #140b05, 0 20px 40px rgba(60, 35, 12, 0.35);
  overflow: hidden;
}
.hero-pick-title {
  padding: 12px 20px 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  font-style: italic;
  color: #fff8e8;
  text-shadow: 0 2px 0 #1b0f06;
  background: var(--band-zigzag) repeat-x left bottom / auto 12px, #4a2e16;
  padding-bottom: 20px;
}
.hero-pick-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 20px; }
.hero-card {
  position: relative;
  border-radius: 18px;
  padding: 10px 10px 12px;
  background: repeating-linear-gradient(135deg, #4d2f15 0 10px, #452a13 10px 20px);
  border: 3px solid #2a190c;
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s var(--ease-back), border-color 0.3s, box-shadow 0.3s;
}
.hero-card img { width: auto; max-width: 100%; height: 190px; object-fit: contain; margin: 0 auto; filter: saturate(0.85) brightness(0.9); transition: filter 0.3s, transform 0.4s var(--ease-back); }
.hero-card figcaption { margin-top: 4px; font-family: var(--font-head); font-weight: 800; font-size: 18px; color: #f2dcb2; }
.hero-card.is-on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 184, 61, 0.35), 0 0 30px rgba(245, 184, 61, 0.35); transform: translateY(-4px); }
.hero-card.is-on img { filter: none; transform: scale(1.04); }
.hero-card img { --spine-tint: 0.72; }
.hero-card.is-on img { --spine-tint: 1; }
.hero-card.is-on figcaption { color: var(--gold-hi); }

.journey { list-style: none; position: relative; display: grid; gap: 4px; counter-reset: j; }
.journey::before {
  content: "";
  position: absolute;
  left: 21px; top: 22px; bottom: 22px;
  width: 4px;
  background: repeating-linear-gradient(180deg, #a4773f 0 8px, transparent 8px 14px);
  border-radius: 2px;
}
.journey li { position: relative; display: flex; gap: 16px; align-items: center; padding: 8px 0; }
.journey li div { display: flex; flex-direction: column; }
.journey b { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--bronze-700); line-height: 1.2; }
.journey small { font-size: 14px; color: #7a5a37; }
.journey-dot {
  position: relative;
  flex: 0 0 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 19px;
  color: #fff8e8;
  background: radial-gradient(circle at 35% 30%, #d58a3c, #8a4d1b);
  border: 3px solid #fff3dc;
  box-shadow: 0 3px 0 #6b3c12, 0 0 0 2px #8a5a28;
  transition: transform 0.4s var(--ease-back), background 0.3s;
}
.journey li.lit .journey-dot { background: radial-gradient(circle at 35% 30%, #ffe08a, #e08e22); color: #3a1f08; transform: scale(1.08); }

/* ===================== BẠN ĐỒNG HÀNH ===================== */
.starters { overflow: hidden; isolation: isolate; }
.starters::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 520px at 32% 62%, color-mix(in srgb, var(--el, #f5b83d) 32%, transparent), transparent 70%);
  transition: background 0.6s;
  pointer-events: none;
  z-index: -1;
}
.starters .container { position: relative; }

.starter-picker { display: flex; justify-content: center; gap: 18px; margin-bottom: 36px; flex-wrap: wrap; }
.starter-tab {
  --tc: var(--gold);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #e9d4ae;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  transition: transform 0.35s var(--ease-back), color 0.25s;
}
.starter-tab-ring {
  position: relative;
  width: 92px; height: 92px;
  border-radius: 50%;
  padding: 5px;
  background: conic-gradient(from 200deg, var(--tc), #fff3c4, var(--tc), #7a4f27, var(--tc));
  box-shadow: 0 5px 0 #140b05, 0 10px 20px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.3s, transform 0.35s var(--ease-back);
}
.starter-tab-ring span {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 35%, #fff6e2, #e4c897 70%, #b8905a);
  overflow: hidden;
}
.starter-tab-ring img { width: 86%; height: 86%; object-fit: contain; transition: transform 0.35s var(--ease-back); }
.starter-tab-el {
  position: absolute;
  right: -4px; bottom: -2px;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tc);
  border: 3px solid #2a190c;
}
.starter-tab-el svg { width: 16px; height: 16px; fill: #fff; }
.starter-tab:focus-visible { outline: none; }
.starter-tab:focus-visible .starter-tab-ring { outline: 3px solid var(--gold-hi); outline-offset: 3px; }
.starter-tab:hover .starter-tab-ring { transform: translateY(-4px); }
.starter-tab:hover img { transform: scale(1.08) rotate(-4deg); }
.starter-tab.is-on { color: #fff8e8; transform: translateY(-6px); }
.starter-tab.is-on .starter-tab-ring { box-shadow: 0 5px 0 #140b05, 0 0 0 4px rgba(255, 217, 122, 0.55), 0 0 36px var(--tc); transform: scale(1.1); }
.starter-tab.is-on::after {
  content: "";
  position: absolute;
  bottom: -14px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gold-hi);
  box-shadow: 0 0 12px var(--gold);
}

.starter-body { display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.starter-stage-wrap { position: relative; }
.starter-stage {
  position: relative;
  aspect-ratio: 1 / 0.76;
  perspective: 900px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.stage-glow {
  position: absolute;
  left: 50%; top: 44%;
  width: 72%; aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--el, #f5b83d) 55%, #fff 10%), transparent 70%);
  opacity: 0.55;
  filter: blur(8px);
  animation: glowPulse 3.2s ease-in-out infinite alternate;
}
@keyframes glowPulse { from { transform: scale(0.92); opacity: 0.4; } to { transform: scale(1.06); opacity: 0.7; } }
.stage-pedestal {
  position: absolute;
  left: 50%; bottom: 3%;
  width: 84%;
  aspect-ratio: 1;
  translate: -50% 0;
  transform: rotateX(74deg);
  transform-origin: 50% 100%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 210, 120, 0.35), rgba(122, 79, 39, 0.5) 70%, rgba(40, 24, 10, 0.2));
  box-shadow: 0 0 0 6px rgba(201, 145, 74, 0.55), 0 0 60px color-mix(in srgb, var(--el, #f5b83d) 60%, transparent);
}
.stage-pedestal img { width: 100%; height: 100%; animation: spin 50s linear infinite; opacity: 0.9; }
.stage-canvas { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.stage-fallback { position: absolute; left: 50%; bottom: 20%; max-height: 64%; max-width: 76%; translate: -50% 0; display: none; }
.no-webgl .stage-fallback { display: block; }
.stage-flash {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fff, rgba(255, 250, 220, 0.85) 30%, color-mix(in srgb, var(--el, #f5b83d) 50%, transparent) 55%, transparent 72%);
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
  z-index: 3;
}
.starter-stage.evolving .stage-flash { animation: evoFlash 1s var(--ease) forwards; }
@keyframes evoFlash { 0% { opacity: 0; transform: scale(0.3); } 40% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.25); } }
.stage-sparks { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.spark {
  position: absolute;
  left: 50%; top: 52%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, var(--c, #ffd97a) 60%, transparent 70%);
  animation: sparkFly 0.9s var(--ease) forwards;
}
@keyframes sparkFly { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.2); opacity: 0; } }
.stage-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  color: var(--gold-hi);
  text-shadow: 0 2px 0 rgba(20, 10, 2, 0.8);
  text-align: center;
}
.stage-hint-dot {
  position: relative;
  isolation: isolate;
  flex: 0 0 12px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--gold-hi);
}
.stage-hint-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(255, 217, 122, 0.7); z-index: -1; animation: hintPulse 1.8s infinite; }
@keyframes hintPulse { 0% { transform: scale(1); opacity: 1; } 70%, 100% { transform: scale(3); opacity: 0; } }

.evo-steps { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.evo-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px 8px 8px;
  border-radius: 999px;
  background: rgba(29, 18, 10, 0.7);
  border: 2px solid rgba(255, 217, 122, 0.25);
  color: #e9d4ae;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.3s var(--ease-back), color 0.25s;
}
.evo-step img { width: 50px; height: 50px; object-fit: contain; border-radius: 50%; background: radial-gradient(circle, #fff6e2, #d8b985); padding: 2px; }
.evo-step:hover { transform: translateY(-2px); border-color: rgba(255, 217, 122, 0.6); }
.evo-step.is-on { background: linear-gradient(180deg, #ffe7a3, #f2b23c); color: #3a1f08; border-color: #6b3c12; box-shadow: 0 3px 0 #6b3c12; }
.evo-arrow { width: 28px; height: 15px; background: var(--gold); clip-path: polygon(0 35%, 60% 35%, 60% 0, 100% 50%, 60% 100%, 60% 65%, 0 65%); opacity: 0.7; }

.skill-bar { margin-top: 22px; padding: 14px 16px 12px; border-radius: 20px; background: rgba(20, 12, 5, 0.55); border: 1.5px solid rgba(255, 217, 122, 0.22); }
.skill-bar-title { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: #fff3dc; margin-bottom: 10px; }
.skill-bar-title small { font-family: var(--font-body); font-weight: 600; font-size: 13px; color: #bfa47d; margin-left: 6px; }
.skill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.skill-btn {
  position: relative;
  width: 56px; height: 56px;
  padding: 3px;
  border-radius: 14px;
  border: 2px solid rgba(255, 217, 122, 0.45);
  background: linear-gradient(180deg, #4a2e16, #24150a);
  cursor: pointer;
  transition: transform 0.25s var(--ease-back), border-color 0.2s, box-shadow 0.2s;
  animation: petIn 0.4s var(--ease-back) both;
}
.skill-btn img { width: 100%; height: 100%; border-radius: 10px; object-fit: cover; }
.skill-btn .lv { position: absolute; left: 50%; bottom: -7px; translate: -50% 0; padding: 0 6px; border-radius: 6px; font: 800 10.5px/1.5 var(--font-body); color: #3a1f08; background: var(--gold); border: 1.5px solid #3a1f08; white-space: nowrap; }
.skill-btn .el { position: absolute; right: -5px; top: -5px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--c); border: 2px solid #1d120a; }
.skill-btn .el svg { width: 10px; height: 10px; fill: #fff; }
.skill-btn:hover { transform: translateY(-3px) scale(1.06); border-color: var(--gold-hi); }
.skill-btn.is-on { border-color: #fff3c4; box-shadow: 0 0 0 3px rgba(255, 217, 122, 0.45), 0 0 18px var(--c); }
.skill-btn.loading::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.25); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.skill-btn:disabled { cursor: progress; }
.skill-info { min-height: 22px; margin-top: 14px; font-size: 14.5px; color: #e9d4ae; }
.skill-info b { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--gold-hi); }
.stage-dmg {
  position: absolute;
  z-index: 6;
  translate: -50% -100%;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 28px;
  color: #fff;
  -webkit-text-stroke: 5px #7a1606;
  paint-order: stroke fill;
  pointer-events: none;
  animation: dmgUp 1s var(--ease) forwards;
}
.stage-dmg.buff { color: #d6ffb0; -webkit-text-stroke-color: #1d4a0a; font-size: 22px; }
@keyframes dmgUp { 0% { opacity: 0; transform: translateY(10px) scale(0.6); } 18% { opacity: 1; transform: translateY(-6px) scale(1.2); } 30% { transform: translateY(-10px) scale(1); } 100% { opacity: 0; transform: translateY(-46px); } }
.stage-pedestal, .stage-glow { transition: left 0.6s var(--ease); }
.starter-stage.battle .stage-pedestal, .starter-stage.battle .stage-glow { left: 34%; }

.starter-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px 4px 6px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  color: #fff;
  background: var(--c, var(--bronze-500));
  border: 2px solid rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.chip svg { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: rgba(0, 0, 0, 0.22); fill: #fff; }
.chip.plain { padding-left: 13px; background: rgba(255, 217, 122, 0.14); color: var(--gold-hi); border-color: rgba(255, 217, 122, 0.4); text-shadow: none; }
.starter-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1.05;
  color: #fff8e8;
  text-shadow: 0 3px 0 #2a1709, 2px 2px 0 #2a1709, -2px 2px 0 #2a1709, 2px -1px 0 #2a1709, -2px -1px 0 #2a1709;
}
.starter-name.swap { animation: nameSwap 0.5s var(--ease-back); }
@keyframes nameSwap { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
.starter-desc { margin: 14px 0 22px; font-size: 16.5px; color: #ecd8b4; line-height: 1.7; min-height: 3.4em; }
.starter-note { margin-top: 16px; font-size: 13px; color: #a88e69; }

.stat-list { display: grid; gap: 10px; }
.stat-row { display: grid; grid-template-columns: 92px 1fr 44px; align-items: center; gap: 12px; }
.stat-row span { font-size: 14px; font-weight: 700; color: #e9d4ae; }
.stat-row b { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: #fff3dc; text-align: right; }
.stat-bar { position: relative; height: 14px; border-radius: 999px; background: rgba(10, 6, 2, 0.55); box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 220, 150, 0.12); overflow: hidden; }
.stat-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c, #f5b83d) 60%, #fff), var(--c, #f5b83d) 55%, color-mix(in srgb, var(--c, #f5b83d) 70%, #000));
  transition: width 0.9s var(--ease);
}
.stat-bar i::after { content: ""; position: absolute; inset: 2px 6px auto; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.55); }
.stat-list.light .stat-row span { color: #6b4a2a; }
.stat-list.light .stat-row b { color: var(--bronze-700); }
.stat-list.light .stat-bar { background: rgba(92, 60, 26, 0.18); box-shadow: inset 0 2px 3px rgba(60, 35, 12, 0.25); }

/* ===================== THU PHỤC ===================== */
.catch-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; }
.catch-scene {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 26px;
  overflow: hidden;
  border: 4px solid #3d2613;
  box-shadow: 0 0 0 4px #c9914a, 0 8px 0 #6b3c12, 0 24px 44px rgba(60, 35, 12, 0.35);
  background: url("../assets/brand/hero.webp?v=202610061208") 57% 9% / 330% auto no-repeat, #7cbf3c;
}
.catch-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 250, 230, 0.08), transparent 40%, rgba(40, 60, 10, 0.25));
  pointer-events: none;
}
.catch-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; }
.catch-fallback { position: absolute; inset: auto 0 12% 0; display: none; justify-content: space-around; align-items: flex-end; z-index: 3; }
.catch-fallback img { height: 160px; }
.no-webgl .catch-fallback { display: flex; }
.catch-meadow { z-index: 1; }
.catch-ring {
  position: absolute;
  left: 0; top: 0;
  width: 200px; height: 200px;
  margin: -100px 0 0 -100px;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}
.catch-ring i {
  display: block;
  width: 100%; height: 100%;
  background: #ffd46d;
  -webkit-mask: url("../assets/items/catch-ring.webp?v=202610061208") center / contain no-repeat;
  mask: url("../assets/items/catch-ring.webp?v=202610061208") center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(255, 200, 80, 0.9));
}
.catch-glow {
  position: absolute;
  left: 0; top: 0;
  width: 160px; height: 160px;
  margin: -80px 0 0 -80px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 224, 0.95), rgba(255, 189, 36, 0.75) 45%, rgba(255, 170, 30, 0) 75%);
  mix-blend-mode: screen;
  opacity: 0;
  z-index: 4;
  pointer-events: none;
}
.catch-noodles { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 4; pointer-events: none; overflow: visible; }
.catch-noodles path { fill: none; stroke: #ffd35a; stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 5px #ffb21a); }
.catch-pct {
  position: absolute;
  left: 0; top: 0;
  translate: -50% -50%;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  color: #ffd46d;
  -webkit-text-stroke: 5px #1a0d02;
  paint-order: stroke fill;
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}
.catch-hit { z-index: 5; }
.catch-hp { z-index: 7; }
.catch-toast { z-index: 8; }
.catch-hp {
  position: absolute;
  right: 6%; top: 8%;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px 12px 10px;
  min-width: 190px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(61, 38, 19, 0.92), rgba(36, 22, 11, 0.92));
  border: 2px solid #1b0f06;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35);
  z-index: 3;
  transition: opacity 0.4s;
}
.catch-hp-name { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: #fff3dc; }
.catch-hp-bar { position: relative; height: 12px; border-radius: 999px; background: rgba(0, 0, 0, 0.5); overflow: hidden; }
.catch-hp-bar i { position: absolute; inset: 0 auto 0 0; width: 100%; border-radius: inherit; background: linear-gradient(180deg, #b9f06f, #5ea825); transition: width 0.35s var(--ease), background 0.35s; }
.catch-hp-bar i.mid { background: linear-gradient(180deg, #ffe27a, #e0a51c); }
.catch-hp-bar i.low { background: linear-gradient(180deg, #ff9a7a, #d8452a); }
.catch-hit {
  position: absolute;
  left: 63%; top: 58%;
  width: 150px; height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fff 0 20%, rgba(255, 230, 150, 0.8) 35%, transparent 70%);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
}
.catch-toast {
  position: absolute;
  left: 50%; top: 18%;
  translate: -50% 0;
  padding: 10px 22px 8px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: #3a1f08;
  background: linear-gradient(180deg, #ffe7a3, #f2b23c);
  border: 2px solid #6b3c12;
  box-shadow: 0 4px 0 #6b3c12, 0 12px 26px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: scale(0.6);
  z-index: 7;
  white-space: nowrap;
  pointer-events: none;
}
.catch-toast.show { animation: toastIn 1.6s var(--ease-back) forwards; }
@keyframes toastIn { 0% { opacity: 0; transform: scale(0.6); } 18% { opacity: 1; transform: scale(1.08); } 28% { transform: scale(1); } 82% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
.catch-meadow {
  position: absolute;
  left: -10%; right: -10%; bottom: -2px;
  height: 44%;
  border-radius: 50% 50% 0 0 / 22% 22% 0 0;
  background:
    radial-gradient(circle at 12% 40%, rgba(255, 255, 255, 0.85) 0 2.5px, transparent 3.5px) 7px 3px / 53px 37px,
    radial-gradient(circle at 60% 70%, rgba(255, 214, 232, 0.9) 0 3px, transparent 4px) 21px 11px / 97px 61px,
    radial-gradient(circle at 30% 20%, rgba(255, 236, 140, 0.9) 0 2px, transparent 3px) 40px 19px / 71px 43px,
    radial-gradient(ellipse 120% 60% at 50% 100%, rgba(60, 110, 20, 0.35), transparent 60%),
    radial-gradient(ellipse at 50% 0%, #b4e35c, #7cc03a 45%, #5a9f28 100%);
  box-shadow: 0 -6px 18px rgba(40, 70, 10, 0.25);
  z-index: 0;
}
.catch-grass {
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 14%;
  background: radial-gradient(18px 34px at 10px 100%, #6ab52f 60%, transparent 62%) 0 100% / 22px 100% repeat-x,
    radial-gradient(14px 26px at 8px 100%, #4f9a22 60%, transparent 62%) 11px 100% / 26px 80% repeat-x;
  opacity: 0.85;
  z-index: 6;
  pointer-events: none;
}

.catch-steps { list-style: none; display: grid; gap: 12px; }
.catch-steps li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255, 250, 236, 0.55);
  border: 2px solid rgba(164, 119, 63, 0.35);
  transition: background 0.35s, border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease);
}
.catch-steps li.is-active { background: #fffaf0; border-color: #c9914a; box-shadow: 0 4px 0 #b98c55, 0 16px 30px rgba(90, 56, 20, 0.16); transform: translateX(6px); }
.catch-step-num {
  flex: 0 0 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  color: #fff8e8;
  background: radial-gradient(circle at 35% 30%, #e25a3c, #9b2c16);
  border: 3px solid #fff3dc;
  box-shadow: 0 3px 0 #6e1d0c;
}
.catch-steps b { display: block; font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--bronze-700); line-height: 1.25; }
.catch-steps p { font-size: 15px; color: #6b4a2a; margin-top: 2px; }

.ball-shelf { margin-top: 26px; }
.ball-shelf-title { font-family: var(--font-head); font-weight: 800; font-size: 18px; color: var(--bronze-700); margin-bottom: 10px; }
.ball-list { list-style: none; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ball-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px 8px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf0, #f0e0bf);
  border: 2px solid #c9a06a;
  cursor: default;
  transition: transform 0.3s var(--ease-back), box-shadow 0.3s;
}
.ball-item img { width: 36px; height: 36px; object-fit: contain; transition: transform 0.5s var(--ease-back); }
.ball-item b { font-family: var(--font-head); font-weight: 800; font-size: 15px; color: var(--bronze-700); line-height: 1; }
.ball-item small { font-size: 10.5px; font-weight: 700; color: #8a6a44; text-align: center; line-height: 1.2; }
.ball-item:hover { transform: translateY(-4px); box-shadow: 0 8px 18px rgba(90, 56, 20, 0.2); }
.ball-item:hover img { transform: rotate(-25deg) scale(1.15); }

/* ===================== KHẮC HỆ ===================== */
.types-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.type-wheel-wrap { position: relative; max-width: 600px; width: 100%; margin: 0 auto; }
.type-wheel { width: 100%; height: auto; display: block; overflow: visible; }
.tw-bg { opacity: 0.25; transform-origin: 300px 300px; animation: spin 120s linear infinite; }
.tw-arrow { fill: none; stroke: rgba(255, 217, 122, 0.45); stroke-width: 4; stroke-linecap: round; transition: stroke 0.3s, opacity 0.3s, stroke-width 0.3s; }
.tw-arrow.strong { stroke: #ffd24a; stroke-width: 6; stroke-dasharray: 14 10; animation: dash 0.9s linear infinite; filter: drop-shadow(0 0 6px rgba(255, 210, 74, 0.8)); }
.tw-arrow.weak { stroke: #ff6a4a; stroke-width: 6; stroke-dasharray: 14 10; animation: dash 0.9s linear infinite; filter: drop-shadow(0 0 6px rgba(255, 106, 74, 0.7)); }
.tw-arrow.dim { opacity: 0.5; }
@keyframes dash { to { stroke-dashoffset: -24; } }
.tw-head { fill: rgba(255, 217, 122, 0.6); transition: fill 0.3s, opacity 0.3s; }
.tw-head.strong { fill: #ffd24a; }
.tw-head.weak { fill: #ff6a4a; }
.tw-head.dim { opacity: 0.5; }
.tw-node { cursor: pointer; transition: transform 0.35s var(--ease-back), opacity 0.3s; transform-origin: 0 0; }
.tw-node:hover { transform: scale(1.08); }
.tw-node.is-on { transform: scale(1.18); }
.tw-node.dim { opacity: 0.55; }
.tw-node circle.ring { fill: #1d120a; stroke: #f5d08a; stroke-width: 3; }
.tw-node.is-on circle.ring { stroke: #fff; stroke-width: 4; filter: drop-shadow(0 0 14px var(--c)); }
.tw-node text { font-family: var(--font-head); font-weight: 800; font-size: 19px; fill: #fff3dc; text-anchor: middle; paint-order: stroke; stroke: #1d120a; stroke-width: 5px; }
.tw-center-title { font-family: var(--font-head); font-weight: 800; font-size: 15px; fill: var(--gold-hi); text-anchor: middle; }
.tw-center-sub { font-family: var(--font-body); font-weight: 600; font-size: 11px; fill: #d9bf96; text-anchor: middle; }

.type-panel {
  border-radius: 24px;
  padding: 26px;
  color: #4a2f17;
  background: linear-gradient(180deg, #fff8ea, #f1dfbd);
  border: 3px solid #2a190c;
  box-shadow: 0 0 0 3px #c9914a inset, 0 8px 0 #140b05, 0 26px 50px rgba(0, 0, 0, 0.4);
}
.type-panel-head { display: flex; align-items: center; gap: 16px; }
.type-kicker { font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: #9b6a33; }
.type-panel h3 { font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1; color: var(--bronze-700); }
.type-badge {
  flex: 0 0 72px;
  width: 72px; height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--c, #f0512f) 55%, #fff), var(--c, #f0512f) 60%, color-mix(in srgb, var(--c, #f0512f) 70%, #000));
  border: 4px solid #2a190c;
  box-shadow: 0 4px 0 #140b05;
}
.type-badge svg { width: 38px; height: 38px; fill: #fff; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.25)); }
.type-badge.small { flex-basis: 48px; width: 48px; height: 48px; border-width: 3px; }
.type-badge.small svg { width: 24px; height: 24px; }
.type-badge.pop { animation: badgePop 0.5s var(--ease-back); }
@keyframes badgePop { from { transform: scale(0.6) rotate(-30deg); } to { transform: none; } }
/* ---------- Hiệu ứng riêng từng hệ ---------- */
.fx-ico { transform-box: fill-box; transform-origin: 50% 50%; }
.fx-fire { transform-origin: 50% 100%; animation: fxFire 0.9s ease-in-out infinite; filter: drop-shadow(0 0 3px #ffd07a); }
.fx-water { animation: fxWater 1.8s ease-in-out infinite; }
.fx-grass { transform-origin: 25% 90%; animation: fxGrass 2.2s ease-in-out infinite; }
.fx-ground { transform-origin: 50% 100%; animation: fxGround 1.8s ease-in-out infinite; }
.fx-electric { animation: fxZap 1.2s linear infinite; }
.fx-ice { animation: spin 7s linear infinite; filter: drop-shadow(0 0 3px #e2fcff); }
.fx-flying { animation: fxFly 1.3s ease-in-out infinite; }
.fx-steel { animation: fxSteel 2.8s ease-in-out infinite; }
@keyframes fxFire { 0%, 100% { transform: scale(1, 1); } 25% { transform: scale(0.93, 1.12); } 50% { transform: scale(1.06, 0.95); } 75% { transform: scale(0.96, 1.08); } }
@keyframes fxWater { 0%, 100% { transform: translateY(0) scale(1, 1); } 50% { transform: translateY(2px) scale(0.95, 1.05); } }
@keyframes fxGrass { 0%, 100% { transform: rotate(-11deg); } 50% { transform: rotate(9deg); } }
@keyframes fxGround { 0%, 55%, 100% { transform: translate(0, 0); } 65% { transform: translate(0, -4px); } 75% { transform: translate(0, 0) scale(1.08, 0.92); } 82% { transform: translate(-1.5px, 0); } 88% { transform: translate(1.5px, 0); } 94% { transform: translate(0, 0); } }
@keyframes fxZap { 0%, 38%, 62%, 100% { opacity: 1; transform: none; filter: drop-shadow(0 0 4px #fff38a); } 42% { opacity: 0.4; transform: translate(1px, -1px); } 46% { opacity: 1; transform: translate(-1px, 1px); filter: drop-shadow(0 0 8px #fff38a); } 50% { opacity: 0.55; } 54% { opacity: 1; transform: none; } }
@keyframes fxFly { 0%, 100% { transform: translateY(0) scaleX(1) rotate(0); } 50% { transform: translateY(-3px) scaleX(0.86) rotate(-6deg); } }
@keyframes fxSteel { 0%, 68%, 100% { filter: brightness(1); } 78% { filter: brightness(1.9) drop-shadow(0 0 6px #fff); } 86% { filter: brightness(1.2); } }
.tw-wave { fill: none; stroke: var(--c); stroke-width: 3; opacity: 0; transform-box: fill-box; transform-origin: center; animation: twWave 2.6s ease-out infinite; }
.tw-wave.w2 { animation-delay: 1.3s; }
.tw-node.is-on .tw-wave { stroke-width: 4; animation-duration: 1.6s; }
.tw-node.dim .tw-wave { animation: none; }
@keyframes twWave { 0% { opacity: 0.8; transform: scale(0.95); } 100% { opacity: 0; transform: scale(1.55); } }

/* ---------- Thẻ đối đầu ---------- */
.type-duel { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 18px; }
.duel-card {
  position: relative;
  padding: 26px 12px 12px;
  border-radius: 18px;
  text-align: center;
  overflow: hidden;
  border: 2px solid rgba(90, 55, 20, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 4px 0 rgba(120, 80, 30, 0.35);
}
.duel-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 18px;
  background: var(--band-zigzag) repeat-x left center / auto 100%, var(--bronze-700);
  opacity: 0.95;
}
.duel-card.strong { background: radial-gradient(160px 90px at 50% 70%, rgba(255, 214, 110, 0.55), transparent 70%), linear-gradient(180deg, #fff6dc, #f4dc9f); }
.duel-card.weak { background: radial-gradient(160px 90px at 50% 70%, rgba(255, 140, 110, 0.45), transparent 70%), linear-gradient(180deg, #fff1e8, #f3c9b2); }
.duel-title { position: absolute; left: 50%; top: 0; translate: -50% 0; white-space: nowrap; padding: 0 12px; font-family: var(--font-head); font-weight: 800; font-size: 14px; line-height: 18px; letter-spacing: 0.06em; text-transform: uppercase; color: #fff3dc; background: var(--bronze-700); border-radius: 0 0 10px 10px; }
.duel-flow { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 76px; }
.duel-side { display: flex; gap: 4px; }
.duel-el { display: flex; flex-direction: column; align-items: center; gap: 2px; animation: petIn 0.45s var(--ease-back) both; }
.duel-el .type-badge { flex-basis: 50px; width: 50px; height: 50px; border-width: 3px; }
.duel-el .type-badge svg { width: 26px; height: 26px; overflow: visible; }
.duel-el small { font-family: var(--font-head); font-weight: 800; font-size: 13px; color: var(--bronze-700); }
.duel-arrow { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; width: 46px; }
.duel-arrow b { font-family: var(--font-head); font-weight: 800; font-size: 20px; line-height: 1; color: #b36b06; text-shadow: 0 1px 0 #fff; }
.duel-card.weak .duel-arrow b { color: #b7361c; }
.duel-arrow i {
  position: relative;
  display: block;
  width: 46px; height: 14px;
  color: #e39a1e;
  clip-path: polygon(0 30%, 72% 30%, 72% 0, 100% 50%, 72% 100%, 72% 70%, 0 70%);
  filter: drop-shadow(0 0 4px rgba(255, 190, 60, 0.8));
}
.duel-arrow i::before { content: ""; position: absolute; top: 0; bottom: 0; left: -12px; right: 0; background: repeating-linear-gradient(90deg, currentColor 0 7px, transparent 7px 12px); animation: duelFlow 0.6s linear infinite; }
.duel-card.weak .duel-arrow i { color: #d8452a; filter: drop-shadow(0 0 4px rgba(255, 90, 60, 0.7)); }
@keyframes duelFlow { from { transform: translateX(0); } to { transform: translateX(12px); } }
.duel-cap { margin-top: 4px; font-size: 12.5px; font-weight: 700; color: #7a5a37; }
.type-badge { position: relative; }
.type-badge::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--c, #f0512f); opacity: 0; animation: badgeWave 2.2s ease-out infinite; pointer-events: none; }
@keyframes badgeWave { 0% { opacity: 0.8; transform: scale(0.95); } 100% { opacity: 0; transform: scale(1.35); } }
.type-rel { margin: 20px 0; display: grid; gap: 10px; }
.type-rel-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; }
.type-rel-row.strong { background: rgba(245, 184, 61, 0.2); border: 2px solid rgba(201, 131, 28, 0.4); }
.type-rel-row.weak { background: rgba(210, 74, 46, 0.12); border: 2px solid rgba(210, 74, 46, 0.35); }
.type-rel-label { font-family: var(--font-head); font-weight: 800; font-size: 16px; min-width: 104px; }
.type-rel-row.strong .type-rel-label { color: #9a5b0c; }
.type-rel-row.weak .type-rel-label { color: #a02f18; }
.type-rel-val { display: flex; gap: 8px; flex-wrap: wrap; }
.type-pets-title { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--bronze-700); margin-bottom: 8px; }
.type-pets { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.type-pet {
  display: block;
  min-width: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  background: radial-gradient(circle at 50% 40%, #fffaf0, #e8d2a8);
  border: 2px solid #c9a06a;
  padding: 4px;
  cursor: pointer;
  transition: transform 0.3s var(--ease-back), border-color 0.25s;
  animation: petIn 0.45s var(--ease-back) both;
}
.type-pet img { display: block; width: 100%; height: 100%; min-width: 0; object-fit: contain; }
.type-pet:hover { transform: translateY(-4px) scale(1.06); border-color: var(--c, #c9914a); }
@keyframes petIn { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

/* ===================== BÁCH THÚ ===================== */
.dex-tools { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 28px; }
.dex-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.dex-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px 5px 7px;
  border-radius: 999px;
  border: 2px solid #b98c55;
  background: #fffaf0;
  color: var(--bronze-700);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-back), background 0.25s, color 0.25s, border-color 0.25s;
}
.dex-filter .dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--bronze-500)); }
.dex-filter .dot svg { width: 14px; height: 14px; fill: #fff; }
.dex-filter small { font-family: var(--font-body); font-size: 12px; font-weight: 700; opacity: 0.6; }
.dex-filter:hover { transform: translateY(-2px); }
.dex-filter.is-on { background: var(--c, var(--bronze-600)); border-color: #2a190c; color: #fff; box-shadow: 0 3px 0 #2a190c; }
.dex-filter.is-on .dot { background: rgba(0, 0, 0, 0.22); }
.dex-search input {
  width: min(280px, 80vw);
  padding: 11px 16px 11px 42px;
  border-radius: 999px;
  border: 2px solid #b98c55;
  background: #fffaf0 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a4f27' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M20 20l-4.6-4.6'/%3E%3C/svg%3E") 14px 50% / 18px no-repeat;
  font: 600 15px var(--font-body);
  color: var(--bronze-700);
}
.dex-search input:focus { outline: none; border-color: var(--bronze-600); box-shadow: 0 0 0 4px rgba(201, 145, 74, 0.25); }

.dex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 18px; }
.dex-card {
  --c: var(--bronze-500);
  position: relative;
  border-radius: 20px;
  padding: 12px 12px 14px;
  background: linear-gradient(180deg, #fffaf0 0%, #f2e2c3 100%);
  border: 2px solid #b98c55;
  box-shadow: 0 4px 0 #a4773f, 0 12px 24px rgba(90, 56, 20, 0.12);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  transition: transform 0.35s var(--ease-back), box-shadow 0.35s;
  animation: cardIn 0.5s var(--ease-back) both;
}
.dex-card::before {
  content: "";
  position: absolute;
  left: 50%; top: 18px;
  width: 150px; height: 150px;
  margin-left: -75px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 45%, transparent), transparent 72%);
  transition: transform 0.4s var(--ease);
}
.dex-card::after {
  content: "";
  position: absolute;
  left: 50%; top: 8px;
  width: 170px; height: 170px;
  margin-left: -85px;
  background: url("../assets/brand/drum-dark.svg?v=202610061208") center / contain no-repeat;
  opacity: 0.55;
  transition: transform 1.2s var(--ease);
  pointer-events: none;
}
.dex-card:hover { transform: translateY(-6px); box-shadow: 0 6px 0 #a4773f, 0 22px 34px rgba(90, 56, 20, 0.2); }
.dex-card:hover::before { transform: scale(1.15); }
.dex-card:hover::after { transform: rotate(60deg); }
.dex-art { position: relative; z-index: 1; height: 136px; display: grid; place-items: end center; }
.dex-art img { grid-area: 1 / 1; max-width: 100%; max-height: 132px; object-fit: contain; transition: opacity 0.35s, transform 0.45s var(--ease-back); filter: drop-shadow(0 6px 4px rgba(60, 35, 12, 0.25)); }
.dex-art img.off { opacity: 0; transform: scale(0.85); }
.dex-no { position: absolute; left: 12px; top: 10px; z-index: 2; font: 700 11px var(--font-body); color: #9b7a52; }
.dex-el { position: absolute; right: 10px; top: 8px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--c); border: 2px solid #2a190c; }
.dex-el svg { width: 15px; height: 15px; fill: #fff; }
.dex-name { position: relative; z-index: 1; margin-top: 8px; font-family: var(--font-head); font-weight: 800; font-size: 17px; line-height: 1.2; color: var(--bronze-700); }
.dex-form { position: relative; z-index: 1; font-size: 12.5px; font-weight: 700; color: #8a6a44; }
.dex-dots { position: relative; z-index: 1; display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.dex-dots i { width: 7px; height: 7px; border-radius: 50%; background: #d4b88c; transition: background 0.25s, transform 0.25s; }
.dex-dots i.on { background: var(--c); transform: scale(1.3); }
.dex-card[hidden] { display: none; }
.dex-more-wrap { display: flex; justify-content: center; margin-top: 30px; }
.dex-more-wrap[hidden] { display: none; }
.dex-more .count { font-family: var(--font-body); font-weight: 700; font-size: 13px; opacity: 0.7; text-transform: none; }
.dex-empty { text-align: center; margin-top: 26px; font-weight: 700; color: #7a5a37; }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(0.94); } to { opacity: 1; transform: none; } }

.dex-modal { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 20px; }
.dex-modal[hidden] { display: none; }
.dex-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 8, 3, 0.72); backdrop-filter: blur(4px); animation: fadeIn 0.25s; }
.dex-modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: calc(100svh - 40px);
  overflow: auto;
  padding: 26px 26px 24px;
  border-radius: 26px;
  color: #4a2f17;
  background: linear-gradient(180deg, #fffaf0, #f0dfbd);
  border: 3px solid #2a190c;
  box-shadow: inset 0 0 0 3px #c9914a, 0 10px 0 #140b05, 0 30px 60px rgba(0, 0, 0, 0.5);
  animation: modalIn 0.4s var(--ease-back);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px) scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dex-modal-close {
  position: absolute;
  right: 14px; top: 12px;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 2px solid #2a190c;
  background: linear-gradient(180deg, #ff8a6a, #d8452a);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 0 #6e1d0c;
}
.dex-modal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; padding-right: 48px; }
.dex-modal-head h3 { font-family: var(--font-head); font-weight: 800; font-size: 32px; color: var(--bronze-700); line-height: 1.1; }
.dex-modal-forms-wrap { position: relative; }
.dex-modal-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.dex-modal-forms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px; }
.dex-modal-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px 10px;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 38%, #fffdf6, #ead6ae);
  border: 2px solid #c9a06a;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.3s var(--ease-back);
}
.dex-modal-form img { height: 130px; width: 100%; object-fit: contain; }
.dex-modal-form b { font-family: var(--font-head); font-weight: 800; font-size: 16px; color: var(--bronze-700); text-align: center; line-height: 1.15; }
.dex-modal-form small { font-size: 12px; font-weight: 700; color: #8a6a44; }
.dex-modal-form.is-on { border-color: var(--c, #c9914a); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, #c9914a) 40%, transparent); transform: translateY(-3px); }

/* ===================== TÍNH NĂNG ===================== */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 22px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(74, 46, 22, 0.92), rgba(38, 24, 12, 0.95));
  border: 2px solid #1b0f06;
  box-shadow: inset 0 0 0 1.5px rgba(255, 217, 122, 0.2), 0 6px 0 #120903, 0 20px 36px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s;
}
.bento-card:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1.5px rgba(255, 217, 122, 0.45), 0 8px 0 #120903, 0 28px 44px rgba(0, 0, 0, 0.45); }
.bento-card h3 { position: relative; font-family: var(--font-head); font-weight: 800; font-size: 23px; line-height: 1.2; color: #fff3dc; margin-top: 14px; }
.bento-card p { position: relative; font-size: 15px; color: #d6bf98; margin-top: 6px; line-height: 1.6; }
.bento-art {
  position: relative;
  height: 180px;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(260px 160px at 50% 65%, rgba(255, 210, 120, 0.25), transparent 70%), repeating-linear-gradient(135deg, rgba(255, 217, 122, 0.04) 0 12px, transparent 12px 24px), rgba(15, 8, 3, 0.45);
  border: 1.5px solid rgba(255, 217, 122, 0.16);
}
.b-fuse, .b-mount, .b-boss, .b-pvp { grid-column: span 2; }

.star-art { display: flex; align-items: flex-end; justify-content: center; gap: 30px; }
.star-row { position: absolute; top: 18px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.star-row svg { width: 34px; height: 34px; fill: #5a4027; stroke: #2a190c; stroke-width: 1.5; animation: starLit 6s infinite; }
.star-row svg:nth-child(2) { animation-delay: 0.6s; }
.star-row svg:nth-child(3) { animation-delay: 1.2s; }
.star-row svg:nth-child(4) { animation-delay: 1.8s; }
.star-row svg:nth-child(5) { animation-delay: 2.4s; }
@keyframes starLit { 0%, 8% { fill: #5a4027; transform: scale(1); } 12% { fill: #ffe27a; transform: scale(1.35); filter: drop-shadow(0 0 8px #ffd24a); } 16%, 78% { fill: #ffc93a; transform: scale(1); filter: drop-shadow(0 0 5px rgba(255, 210, 74, 0.7)); } 90%, 100% { fill: #5a4027; filter: none; } }
.star-pet { height: 120px; margin-bottom: 8px; animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

.evo-art img { position: absolute; left: 0; right: 0; margin: 0 auto; bottom: 10px; max-height: 150px; max-width: 86%; opacity: 0; animation: evoCycle 9s infinite; }
.evo-art img:nth-child(2) { animation-delay: 3s; }
.evo-art img:nth-child(3) { animation-delay: 6s; }
@keyframes evoCycle { 0% { opacity: 0; transform: scale(0.8); } 5% { opacity: 1; transform: scale(1.06); } 9%, 30% { opacity: 1; transform: scale(1); } 34%, 100% { opacity: 0; transform: scale(0.9); } }
.evo-flash { position: absolute; inset: 0; background: radial-gradient(closest-side, #fff, rgba(255, 240, 200, 0.6) 40%, transparent 75%); opacity: 0; animation: evoFlashLoop 3s infinite; mix-blend-mode: screen; }
@keyframes evoFlashLoop { 0%, 90% { opacity: 0; } 95% { opacity: 0.95; } 100% { opacity: 0; } }

.fuse-art { height: 200px; }
.fuse-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
.fuse-fallback { position: absolute; inset: 0; display: none; align-items: flex-end; justify-content: center; gap: 24px; padding-bottom: 10px; }
.fuse-fallback img { height: 150px; }
.no-webgl .fuse-fallback { display: flex; }
.fuse-aura {
  position: absolute;
  left: 36%; bottom: 6px;
  width: 190px; height: 190px;
  margin-left: -95px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 255, 150, 0.55), rgba(69, 178, 70, 0.3) 45%, transparent 72%);
  opacity: 0;
  transform: scale(0.4);
  z-index: 1;
  transition: opacity 0.4s, transform 0.6s var(--ease-back);
}
.fuse-aura.a2 { background: conic-gradient(from 0deg, transparent, rgba(160, 255, 140, 0.55), transparent 25%, rgba(255, 240, 150, 0.5), transparent 55%, rgba(160, 255, 140, 0.55), transparent 80%); filter: blur(6px); }
.fuse-art.fused .fuse-aura { opacity: 1; transform: scale(1); }
.fuse-art.fused .fuse-aura.a2 { animation: spin 2.4s linear infinite; }
.fuse-beam { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; overflow: visible; opacity: 0; transition: opacity 0.35s; pointer-events: none; }
.fuse-art.linking .fuse-beam { opacity: 1; }
.fuse-beam path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fuse-beam .glow { stroke: rgba(140, 255, 120, 0.35); stroke-width: 16; filter: blur(6px); }
.fuse-beam .helix { stroke: url(#fuseBeamGrad); stroke-width: 2.4; opacity: 0.9; filter: drop-shadow(0 0 4px #9dff80); }
.fuse-beam .helix.h2 { opacity: 0.7; }
.fuse-beam .core { stroke: #fffbe0; stroke-width: 3.2; stroke-dasharray: 3 14; filter: drop-shadow(0 0 6px #c8ff9a); animation: beamFlow 0.45s linear infinite; }
@keyframes beamFlow { to { stroke-dashoffset: -17; } }
.fuse-node { position: absolute; top: 45%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; background: radial-gradient(circle, #fff 0 20%, #b8ff9a 40%, rgba(120, 230, 110, 0) 70%); box-shadow: 0 0 16px 4px rgba(150, 255, 130, 0.7); opacity: 0; z-index: 4; transition: opacity 0.3s; }
.fuse-node.n1 { left: calc(36% + 18px); }
.fuse-node.n2 { left: calc(72% - 26px); top: 50%; }
.fuse-art.linking .fuse-node { opacity: 1; animation: nodePulse 0.6s ease-in-out infinite alternate; }
@keyframes nodePulse { from { transform: scale(0.8); } to { transform: scale(1.25); } }
.fuse-orb {
  position: absolute;
  left: 72%; bottom: 60px;
  width: 30px; height: 30px;
  margin: 0 0 0 -15px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #c8ffb0 40%, rgba(80, 200, 90, 0) 72%);
  box-shadow: 0 0 22px 8px rgba(160, 255, 140, 0.8);
  opacity: 0;
  z-index: 4;
}
.fuse-art.absorbing .fuse-orb { animation: orbFly 0.9s cubic-bezier(.5, 0, .3, 1) forwards; }
@keyframes orbFly { 0% { opacity: 0; left: 72%; transform: translateY(0) scale(0.4); } 20% { opacity: 1; transform: translateY(-30px) scale(1.2); } 100% { opacity: 1; left: 36%; transform: translateY(-10px) scale(0.7); } }
.fuse-flash {
  position: absolute;
  left: 36%; bottom: -30px;
  width: 260px; height: 260px;
  margin-left: -130px;
  border-radius: 50%;
  background: radial-gradient(closest-side, #fff, rgba(230, 255, 210, 0.9) 30%, rgba(120, 230, 120, 0.4) 55%, transparent 72%);
  opacity: 0;
  z-index: 5;
  pointer-events: none;
}
.fuse-art.flash .fuse-flash { animation: fuseFlash 0.7s var(--ease) forwards; }
@keyframes fuseFlash { 0% { opacity: 0; transform: scale(0.3); } 30% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.3); } }
.fuse-ring { position: absolute; left: 36%; bottom: 60px; width: 70px; height: 70px; margin: 0 0 -35px -35px; border-radius: 50%; border: 3px solid rgba(170, 255, 150, 0.95); box-shadow: 0 0 18px rgba(150, 255, 140, 0.9); opacity: 0; z-index: 5; }
.fuse-art.flash .fuse-ring { animation: fuseRing 1s ease-out forwards; }
.fuse-art.flash .fuse-ring.r2 { animation-delay: 0.18s; }
@keyframes fuseRing { 0% { opacity: 1; transform: scale(0.3); } 100% { opacity: 0; transform: scale(3.4); } }
.fuse-badge {
  position: absolute;
  right: 6%; top: 18px;
  padding: 6px 16px 4px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: #173a08;
  background: linear-gradient(180deg, #e9ffb8, #8fd045 60%, #5da426);
  border: 2px solid #1b3a09;
  box-shadow: 0 3px 0 #1b3a09, 0 0 22px rgba(150, 255, 120, 0.7);
  opacity: 0;
  transform: scale(0.4) rotate(-8deg);
  z-index: 6;
  transition: opacity 0.3s, transform 0.5s var(--ease-back);
}
.fuse-plus {
  position: absolute;
  right: 6%; top: 62px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  color: #d5ffb8;
  text-shadow: 0 2px 0 #10280a, 0 0 10px rgba(150, 255, 120, 0.8);
  opacity: 0;
  transform: translateY(10px);
  z-index: 6;
  transition: opacity 0.4s 0.15s, transform 0.5s 0.15s var(--ease);
}
.fuse-stats {
  position: absolute;
  right: 6%; top: 88px;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 5px 6px;
  z-index: 6;
}
.fuse-stat {
  padding: 3px 9px 2px;
  border-radius: 8px;
  font: 700 12.5px var(--font-body);
  color: #fff3dc;
  background: rgba(10, 20, 6, 0.62);
  border: 1px solid color-mix(in srgb, var(--c) 60%, transparent);
  opacity: 0;
  transform: translateY(8px) scale(0.9);
  transition: opacity 0.35s, transform 0.45s var(--ease-back);
}
.fuse-stat b { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--c); }
.fuse-art.fused .fuse-badge { opacity: 1; transform: scale(1) rotate(-4deg); }
.fuse-art.fused .fuse-plus, .fuse-art.fused .fuse-stat { opacity: 1; transform: none; }

.hatch-still { position: absolute; left: 50%; top: 56%; height: 50%; transform: translate(-50%, -50%); transform-origin: 50% 90%; animation: wobble 2.4s ease-in-out infinite; }
.egg-art.hatch-on .hatch-still { display: none; }
.hatch-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.hatch-pet { position: absolute; left: 50%; top: 56%; width: 120px; height: 120px; object-fit: contain; opacity: 0; transform: translate(-50%, -50%) scale(0); pointer-events: none; }
.hatch-label { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); padding: 3px 12px 2px; border-radius: 999px; background: rgba(15, 8, 3, 0.55); border: 1px solid rgba(255, 217, 122, 0.25); font-family: var(--font-head); font-weight: 800; font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: var(--c, #ffd98a); opacity: 0; transition: opacity 0.3s; z-index: 2; }
.hatch-label.show { opacity: 1; }
@keyframes wobble { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-9deg); } 84% { transform: rotate(8deg); } 92% { transform: rotate(-4deg); } }
@keyframes wobbleHard { 0%, 50%, 100% { transform: rotate(0) scale(1); } 58% { transform: rotate(-12deg) scale(1.04); } 66% { transform: rotate(11deg); } 74% { transform: rotate(-7deg) scale(1.06); } 82% { transform: rotate(5deg); } }

.mount-art { background: linear-gradient(180deg, rgba(255, 210, 120, 0.12), transparent 60%), rgba(15, 8, 3, 0.45); }
.mount-art::before { content: ""; position: absolute; left: 0; bottom: 0; width: calc(100% + 160px); height: 20px; background: repeating-linear-gradient(90deg, rgba(255, 217, 122, 0.08) 0 40px, transparent 40px 80px) 0 0 / 160px 20px repeat-x; animation: road 0.6s linear infinite; pointer-events: none; }
@keyframes road { from { transform: translateX(0); } to { transform: translateX(-80px); } }
.mount-track { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; animation: gallop 0.45s ease-in-out infinite alternate; }
.mount-track img { height: 140px; max-width: 86%; object-fit: contain; object-position: bottom; }
@keyframes gallop { from { transform: translateY(0) rotate(-1deg); } to { transform: translateY(-7px) rotate(1deg); } }
.speed-lines { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(255, 240, 200, 0.35) 22px 24px, transparent 24px 46px); -webkit-mask: linear-gradient(90deg, #000, transparent 45%); mask: linear-gradient(90deg, #000, transparent 45%); animation: speed 0.5s linear infinite; }
@keyframes speed { from { transform: translateX(40px); } to { transform: translateX(-40px); } }

.team-art { display: flex; align-items: flex-end; justify-content: center; gap: 2px; padding-bottom: 12px; }
.team-art { padding: 0 8px 12px; }
.team-art img { flex: 1 1 0; min-width: 0; height: 110px; object-fit: contain; object-position: bottom; animation: bob 2.4s ease-in-out infinite; }
.team-art img:nth-child(2) { height: 132px; animation-delay: 0.4s; }
.team-art img:nth-child(3) { animation-delay: 0.8s; }

.boss-art { display: grid; place-items: end center; background: radial-gradient(300px 170px at 50% 80%, rgba(210, 60, 30, 0.45), transparent 70%), rgba(15, 8, 3, 0.55); }
.boss-art img { position: relative; height: 164px; max-width: 86%; object-fit: contain; object-position: bottom; margin-bottom: 4px; animation: bossBreath 3s ease-in-out infinite; }
.boss-aura { position: absolute; left: 50%; bottom: 0; width: 280px; height: 280px; margin-left: -140px; margin-bottom: -120px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(255, 90, 40, 0.5), transparent 30%, rgba(255, 170, 60, 0.45), transparent 60%, rgba(255, 90, 40, 0.5), transparent); filter: blur(10px); animation: spin 6s linear infinite; }
@keyframes bossBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04) translateY(-3px); } }

.pvp-art { display: flex; align-items: flex-end; justify-content: center; }
.pvp-drum { position: absolute; left: 50%; top: 50%; width: 320px; margin: -160px 0 0 -160px; opacity: 0.35; animation: spin 30s linear infinite; }
.pvp-a, .pvp-b { position: relative; height: 130px; max-width: 40%; object-fit: contain; object-position: bottom; margin-bottom: 14px; }
.pvp-a { animation: clashL 2.2s ease-in-out infinite; }
.pvp-b { transform: scaleX(-1); animation: clashR 2.2s ease-in-out infinite; }
.pvp-vs { position: relative; align-self: center; font-family: var(--font-head); font-weight: 800; font-size: 44px; color: #ffe27a; text-shadow: 0 3px 0 #6b1d0c, 0 0 20px rgba(255, 120, 60, 0.9); margin: 0 6px 20px; animation: vs 2.2s ease-in-out infinite; }
@keyframes clashL { 0%, 100% { transform: translateX(-10px); } 45% { transform: translateX(14px); } 55% { transform: translateX(-2px); } }
@keyframes clashR { 0%, 100% { transform: scaleX(-1) translateX(-10px); } 45% { transform: scaleX(-1) translateX(14px); } 55% { transform: scaleX(-1) translateX(-2px); } }
@keyframes vs { 0%, 40%, 100% { transform: scale(1); } 48% { transform: scale(1.35) rotate(-6deg); } }
.pvp-bolt { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pvp-vs.zap { color: #fffbe8; text-shadow: 0 3px 0 #6b1d0c, 0 0 14px #bfe6ff, 0 0 30px #6fa8ff, 0 0 52px rgba(120, 160, 255, 0.8); }

/* ===================== BÍ CẢNH ===================== */
.dungeon-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 36px; align-items: start; }
.dungeon-map {
  position: relative;
  border-radius: 24px;
  padding: 12px;
  background: linear-gradient(180deg, #4a2e16, #2a190c);
  border: 3px solid #1b0f06;
  box-shadow: inset 0 0 0 2px rgba(255, 217, 122, 0.25), 0 8px 0 #140b05, 0 26px 50px rgba(60, 35, 12, 0.35);
}
.dungeon-map-inner { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 1920 / 1216; background: #2a3a1c; }
.dungeon-base { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.dungeon-props { position: absolute; inset: 0; }
.dungeon-prop { position: absolute; width: 6.2%; translate: -50% -82%; filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.35)); opacity: 0; transform: translateY(-14px) scale(0.8); transition: opacity 0.5s, transform 0.6s var(--ease-back); }
.dungeon-map.on .dungeon-prop { opacity: 1; transform: none; }
.dungeon-fog { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.dungeon-sonar { position: absolute; left: 50.8%; top: 59.2%; width: 0; height: 0; pointer-events: none; }
.dungeon-sonar i { position: absolute; left: 0; top: 0; width: 900px; height: 540px; margin: -270px 0 0 -450px; border-radius: 50%; border: 3px solid rgba(120, 230, 255, 0.75); box-shadow: 0 0 18px rgba(120, 230, 255, 0.6), inset 0 0 18px rgba(120, 230, 255, 0.35); opacity: 0; transform: scale(0.02); }
.dungeon-map.on .dungeon-sonar i { animation: sonar 4.5s var(--ease) infinite; }
.dungeon-sonar i:nth-child(2) { animation-delay: 1.5s !important; }
.dungeon-sonar i:nth-child(3) { animation-delay: 3s !important; }
@keyframes sonar { 0% { opacity: 0; transform: scale(0.02); } 10% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1); } }
.dungeon-pins { position: absolute; inset: 0; }
.dungeon-pin {
  position: absolute;
  width: 34px; height: 34px;
  translate: -50% -50%;
  border-radius: 50%;
  border: 3px solid #fff3dc;
  background: radial-gradient(circle at 35% 30%, #ffd97a, #c9831c);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.4);
  cursor: pointer;
  padding: 0;
}
.dungeon-pin::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: rgba(255, 217, 122, 0.6); z-index: -1; animation: pinPulse 2.4s infinite; animation-delay: inherit; pointer-events: none; }
.dungeon-pin::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #3d2613; }
.dungeon-pin.icon { width: 44px; height: 44px; border: none; background: none; box-shadow: none; animation: pinFloat 2.4s ease-in-out infinite; }
.dungeon-pin.icon::after, .dungeon-pin.icon::before { display: none; }
.dungeon-pin.icon img { width: 100%; height: 100%; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }
.dungeon-pin.bld { width: 6.4%; height: auto; aspect-ratio: 1; border-radius: 50%; animation: none; background: none; border: 2px solid transparent; transition: border-color 0.25s, background 0.25s; }
.dungeon-pin.bld img { display: none; }
.dungeon-pin.bld::after { display: block; content: ""; position: absolute; left: 50%; top: auto; right: auto; bottom: -8px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #ffd97a; border: 2px solid #3d2613; }
.dungeon-pin.bld::before { inset: auto; left: 50%; bottom: -8px; width: 16px; height: 16px; margin-left: -8px; --pulse-scale: 2.75; }
.dungeon-pin.bld:hover, .dungeon-pin.bld.is-on { border-color: rgba(127, 224, 255, 0.9); background: radial-gradient(closest-side, rgba(127, 224, 255, 0.25), transparent); }
.dungeon-pin.icon.is-on img { filter: drop-shadow(0 0 8px #7fe0ff) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); transform: scale(1.15); }
.dungeon-pin.is-on { background: radial-gradient(circle at 35% 30%, #fff, #7fe0ff); }
@keyframes pinPulse { 0% { transform: scale(1); opacity: 1; } 70%, 100% { transform: scale(var(--pulse-scale, 1.82)); opacity: 0; } }
@keyframes pinFloat { 0%, 100% { translate: -50% -50%; } 50% { translate: -50% calc(-50% - 6px); } }
.dungeon-tip {
  position: absolute;
  z-index: 3;
  translate: -50% calc(-100% - 26px);
  padding: 8px 14px 7px;
  border-radius: 12px;
  background: #fffaf0;
  border: 2px solid #2a190c;
  box-shadow: 0 4px 0 #2a190c;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 15px;
  color: var(--bronze-700);
  white-space: nowrap;
  pointer-events: none;
  animation: tipIn 0.3s var(--ease-back);
}
.dungeon-tip::after { content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; margin-left: -6px; background: #fffaf0; border-right: 2px solid #2a190c; border-bottom: 2px solid #2a190c; transform: rotate(45deg); }
@keyframes tipIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dungeon-caption { margin-top: 12px; min-height: 48px; padding: 0 6px; font-size: 15px; color: #f2dcb2; line-height: 1.55; }
.dungeon-caption b { font-family: var(--font-head); font-weight: 800; font-size: 17px; color: var(--gold-hi); }

.dungeon-facts { list-style: none; display: grid; gap: 12px; }
.dungeon-facts li {
  display: grid;
  grid-template-columns: 118px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 250, 236, 0.6);
  border: 2px solid rgba(164, 119, 63, 0.35);
}
.dungeon-facts b { font-family: var(--font-head); font-weight: 800; font-size: 25px; line-height: 1.05; color: var(--lacquer); }
.dungeon-facts span { font-size: 14.5px; color: #5a3d20; line-height: 1.5; }

/* ===================== TẢI GAME ===================== */
.download { position: relative; padding: 130px 0 120px; overflow: hidden; isolation: isolate; color: var(--text); }
.download::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px; z-index: 3; background: var(--band-zigzag) repeat-x left center / auto 100%, var(--bronze-700); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }
.download-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(29, 18, 10, 0.94) 0%, rgba(29, 18, 10, 0.72) 42%, rgba(29, 18, 10, 0.3) 100%),
    linear-gradient(0deg, var(--bronze-900) 0%, rgba(29, 18, 10, 0.4) 35%, transparent 60%),
    url("../assets/brand/hero.webp?v=202610061208") 52% 4% / max(250%, 2400px) auto no-repeat;
}
.download-inner { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.download-logo-wrap { display: inline-block; margin-bottom: 12px; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5)); }
.download-logo { display: block; width: min(280px, 64vw); height: auto; transform-origin: 50% 55%; animation: breathe 2.6s ease-in-out infinite alternate; }
.download-text .section-title { font-size: clamp(32px, 4vw, 50px); }
.download-text > p { margin-top: 10px; font-size: 17px; color: #ecd8b4; }
.store-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 250px)); gap: 12px; margin-top: 26px; }
.toast {
  position: fixed;
  left: 50%; bottom: 28px;
  z-index: 600;
  translate: -50% 0;
  max-width: calc(100vw - 32px);
  padding: 12px 20px 11px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf0, #f1dfbd);
  border: 2px solid #2a190c;
  box-shadow: 0 4px 0 #2a190c, 0 16px 34px rgba(0, 0, 0, 0.4);
  font-weight: 700;
  font-size: 15px;
  color: var(--bronze-700);
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.35s var(--ease-back);
}
.toast.show { opacity: 1; transform: none; }
.download-rating { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.rating-badge { flex: 0 0 auto; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 14px; background: linear-gradient(180deg, #5a3a1c, #3a2412); border: 2px solid rgba(255, 217, 122, 0.45); font-family: var(--font-head); font-weight: 800; font-size: 28px; color: var(--gold-hi); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35); }
.download-rating p { font-size: 13.5px; color: #cdb38c; max-width: 280px; }
.download-stage { position: relative; height: 460px; }
.download-ledge {
  position: absolute;
  left: 4%; right: 4%; bottom: 20px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(245, 184, 61, 0.45), rgba(122, 79, 39, 0.5) 60%, transparent 72%);
  filter: blur(2px);
}
.download-ledge::after { content: ""; position: absolute; inset: 18% 12%; border-radius: 50%; background: url("../assets/brand/drum.svg?v=202610061208") center / 100% 100% no-repeat; opacity: 0.45; }
.download-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.download-fallback { position: absolute; left: 0; right: 0; bottom: 50px; display: none; justify-content: center; align-items: flex-end; gap: 6px; }
.download-fallback img { height: 220px; max-width: 33%; object-fit: contain; }
.no-webgl .download-fallback { display: flex; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1100px) {
  .world-grid, .starter-body, .catch-grid, .types-grid, .dungeon-grid, .download-inner { grid-template-columns: 1fr; }
  .world-grid { gap: 40px; }
  .starter-info { max-width: 640px; margin: 0 auto; width: 100%; }
  .starter-stage { max-width: 620px; margin: 0 auto; }
  .catch-scene { max-width: 680px; width: 100%; margin: 0 auto; }
  .bento { grid-template-columns: repeat(2, 1fr); }
  .download-text { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .download-stage { height: 360px; max-width: 640px; width: 100%; margin: 0 auto; }
}

@media (max-width: 720px) {
  .section { padding: 96px 0 84px; }
  .section-head { margin-bottom: 36px; }
  .hero-inner { padding-top: 84px; padding-bottom: 110px; }
  .hero-sub { font-size: 15.5px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 12px rgba(0, 0, 0, 0.8); }
  .hero-shade { background: radial-gradient(ellipse 90% 45% at 50% 58%, rgba(24, 14, 6, 0.62), transparent 75%), linear-gradient(180deg, rgba(24, 14, 6, 0.32) 0%, rgba(24, 14, 6, 0.1) 22%, rgba(24, 14, 6, 0.25) 50%, rgba(29, 18, 10, 0.85) 86%, var(--bronze-900) 100%); }
  .hero-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 360px; }
  .hero-badges li { min-width: 0; }
  .hero-stores { max-width: 380px; gap: 10px; }
  .hero-stores .store-btn { padding: 11px 12px; gap: 9px; border-radius: 15px; }
  .hero-stores .store-ico { width: 28px; height: 28px; flex-basis: 28px; }
  .hero-stores .store-txt b { font-size: 16.5px; }
  .hero-stores .store-txt small { font-size: 10.5px; }
  .hero-pay { min-width: 0; width: 100%; max-width: 380px; }
  .nav-pay { display: none; }
  .main-nav .nav-mobile-only { display: block; color: var(--gold-hi); }
  .starter-picker { flex-wrap: nowrap; justify-content: space-between; gap: 4px; padding: 10px 0 24px; margin-bottom: 14px; overflow: visible; }
  .starter-tab { flex: 1 1 0; min-width: 0; font-size: 12px; line-height: 1.2; text-align: center; }
  .starter-tab-ring { width: min(62px, 16vw); height: min(62px, 16vw); padding: 4px; }
  .starter-tab-el { width: 22px; height: 22px; right: -3px; bottom: -2px; border-width: 2px; }
  .starter-tab-el svg { width: 12px; height: 12px; }
  .starter-tab.is-on .starter-tab-ring { transform: scale(1.06); }
  .evo-steps { gap: 6px; flex-wrap: nowrap; }
  .evo-step { padding: 5px 11px 5px 5px; gap: 6px; font-size: 14px; }
  .evo-step img { width: 34px; height: 34px; }
  .stage-hint { font-size: 16px; margin-top: 12px; }
  .skill-bar { padding: 12px 12px 10px; }
  .skill-btn { width: 50px; height: 50px; }
  .evo-arrow { display: none; }
  .stat-row { grid-template-columns: 78px 1fr 38px; gap: 10px; }
  .ball-list { grid-template-columns: repeat(4, 1fr); }
  .type-pets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .type-duel { gap: 8px; }
  .duel-el .type-badge { flex-basis: 42px; width: 42px; height: 42px; }
  .duel-arrow { width: 34px; }
  .duel-arrow i { width: 34px; }
  .type-panel { padding: 20px; }
  .bento { grid-template-columns: 1fr; }
  .b-fuse, .b-mount, .b-boss, .b-pvp { grid-column: auto; }
  .fuse-art { height: 220px; }
  .fuse-badge { font-size: 18px; top: 12px; }
  .fuse-plus { font-size: 13px; top: 50px; }
  .fuse-stats { top: 72px; }
  .dex-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .dex-art { height: 112px; }
  .dex-art img { max-height: 108px; }
  .dex-tools { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .dex-filters { min-width: 0; max-width: 100%; }
  .eyebrow { letter-spacing: 0.08em; font-size: 12.5px; gap: 8px; }
  .eyebrow::after { display: none; }
  .dex-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .dex-filter { flex: 0 0 auto; }
  .dex-search input { width: 100%; }
  .dex-modal-forms { gap: 6px; }
  .dex-modal-form img { height: 88px; }
  .dex-modal-head h3 { font-size: 24px; }
  .dungeon-facts li { grid-template-columns: 1fr; gap: 2px; }
  .dungeon-pin { width: 24px; height: 24px; border-width: 2px; }
  .dungeon-pin::after { inset: 6px; }
  .dungeon-pin.icon { width: 30px; height: 30px; }
  .dungeon-pin.bld { width: 6.4%; height: auto; }
  .dungeon-pin.bld::after { width: 9px; height: 9px; margin-left: -4.5px; bottom: -6px; }
  .store-grid { grid-template-columns: 1fr 1fr; width: 100%; }
  .store-btn { min-width: 0; padding: 10px 12px; gap: 8px; }
  .store-txt b { font-size: 15px; }
  .download-stage { height: 280px; }
  .download-rating { flex-direction: column; text-align: center; }
  .world-quote { padding: 18px 18px 16px 50px; }
  .world-quote::before { font-size: 64px; left: 10px; }
  .world-quote p { font-size: 16.5px; }
}

@media (max-width: 440px) {
  .type-duel { gap: 6px; }
  .duel-card { padding: 24px 6px 10px; }
  .duel-flow { gap: 3px; }
  .duel-el .type-badge { flex-basis: 38px; width: 38px; height: 38px; }
  .duel-el .type-badge svg { width: 21px; height: 21px; }
  .duel-el small { font-size: 12px; }
  .duel-arrow { width: 28px; }
  .duel-arrow i { width: 28px; }
  .duel-arrow b { font-size: 17px; }
}
@media (max-width: 360px) {
  .type-duel { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Máy yếu / điện thoại: bỏ các hiệu ứng CSS nặng GPU, giữ nguyên bố cục ---------- */
@media (pointer: coarse), (max-width: 760px) {
  .tw-arrow.strong, .tw-arrow.weak, .fuse-beam .core { animation-timing-function: steps(6); }
  .hero-rays { display: none; }
  .hero-sun { mix-blend-mode: normal; opacity: 0.45; animation: none; }
  .site-header.scrolled, .hero-badges li, .hero-stores .store-btn, .dex-modal-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .stage-glow { filter: none; animation: none; opacity: 0.5; }
  .boss-aura { filter: none; animation-duration: 10s; opacity: 0.6; }
  .fuse-aura.a2 { filter: none; }
  .speed-lines { -webkit-mask: none; mask: none; opacity: 0.35; }
  .tw-bg { animation: none; }
  .tw-node:not(.is-on) .tw-wave { animation: none; opacity: 0; }
  .tw-node:not(.is-on) .fx-ico { animation: none; }
  .type-badge::after { animation: none; opacity: 0; }
  .dex-card::after { transition: none; }
  .dex-card:hover::after { transform: none; }
}

/* Mục đã cuộn khỏi màn hình: dừng mọi hoạt ảnh CSS (không thì trình duyệt vẫn tính lại style/layout mỗi khung) */
.is-offscreen, .is-offscreen *, .is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }
.is-scrolling main *, .is-scrolling main *::before, .is-scrolling main *::after, .is-scrolling .preloader * { animation-play-state: paused !important; }
