/* Layout: áp phích hội đua đồng quê (banner vàng rơm, số áo đua, vạch đích caro)
   mở ra "chương trình đua": bảng xuất phát, đường đua, rồi tới studio. */
:root {
  /* Màu cố định của thế giới áp phích (giữ nguyên ở cả hai theme) */
  --hay: #ffc83d;
  --hay-deep: #f2a91c;
  --on-hay: #16231a;
  --barn: #d93a2b;
  --chalk: #f6f8f1;
  --night: #16231a;

  /* Màu theo theme */
  --paper: #f5f7f0;
  --card: #ffffff;
  --tint: #e9efe2;
  --ink: #16231a;
  --muted: #56675a;
  --line: #d6dfd0;
  --pasture: #2b7a4b;
  --focus: #1f6fd1;

  --font-display: "Bricolage Grotesque", "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --font-num: "Big Shoulders Display", "Bricolage Grotesque", Impact, "Arial Narrow", sans-serif;

  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-md: 1.0625rem;
  --t-lg: 1.3125rem;
  --t-xl: clamp(1.6rem, 1.1rem + 1.6vw, 2.25rem);
  --t-2xl: clamp(2.2rem, 1.3rem + 3.4vw, 3.75rem);
  --t-hero: clamp(3rem, 1.3rem + 6.2vw, 6.75rem);

  --wrap: 1220px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
  --section: clamp(72px, 9vw, 128px);
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1712;
    --card: #16211a;
    --tint: #1a271e;
    --ink: #e9efe5;
    --muted: #9fb2a3;
    --line: #2a3a2e;
    --pasture: #62c08a;
    --focus: #7db3ff;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1712;
  --card: #16211a;
  --tint: #1a271e;
  --ink: #e9efe5;
  --muted: #9fb2a3;
  --line: #2a3a2e;
  --pasture: #62c08a;
  --focus: #7db3ff;
}

/* ---------- Nền tảng ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-md);
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tint { background: var(--tint); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--night); color: var(--chalk); padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.eyebrow {
  font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--pasture);
}
.section-head { display: grid; gap: 16px; max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head h2 { font-size: var(--t-2xl); font-weight: 800; font-stretch: 85%; }
.lead { font-size: var(--t-lg); line-height: 1.55; color: var(--muted); max-width: 60ch; }

/* ---------- Nút ---------- */
.btn {
  --btn-bg: var(--ink); --btn-fg: var(--paper); --btn-bd: var(--ink); --btn-shadow: transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
  min-height: 52px; padding: 0.85em 1.45em;
  font: 700 var(--t-md)/1.1 var(--font-body);
  color: var(--btn-fg); background: var(--btn-bg);
  border: 2.5px solid var(--btn-bd); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--btn-shadow);
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--btn-shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--btn-shadow); }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); }
.btn--ghost:hover { --btn-bg: color-mix(in srgb, var(--ink) 8%, transparent); }

/* Nút trên nền vàng rơm: kiểu nhãn dán, bóng đổ cứng */
.on-hay .btn { --btn-bg: var(--chalk); --btn-fg: var(--on-hay); --btn-bd: var(--on-hay); --btn-shadow: var(--on-hay); }
.on-hay .btn--ghost { --btn-bg: transparent; --btn-shadow: transparent; }
.on-hay .btn--ghost:hover { --btn-bg: rgba(22, 35, 26, 0.08); --btn-shadow: transparent; }

/* ---------- Header ---------- */
.site-header {
  --hdr-fg: var(--on-hay);
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50;
  background: var(--hay); color: var(--hdr-fg);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  --hdr-fg: var(--ink);
  background: color-mix(in srgb, var(--paper) 90%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--hdr-fg); margin-right: auto; }
.logo__mark { width: 38px; height: 38px; flex: none; }
.logo__mark .mark-bg { fill: currentColor; }
.logo__mark .mark-spot { fill: var(--hay); }
.logo__text { display: grid; line-height: 1; }
.logo__name { font: 800 1.35rem/1 var(--font-display); letter-spacing: -0.01em; }
.logo__sub { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.8; margin-top: 3px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: var(--t-sm); font-weight: 600;
  transition: background-color 0.15s ease;
}
.nav a:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.site-header .btn { min-height: 44px; padding: 0.6em 1.15em; font-size: var(--t-sm); --btn-bg: var(--hdr-fg); --btn-bd: var(--hdr-fg); --btn-fg: var(--hay); }
.site-header.is-scrolled .btn { --btn-fg: var(--paper); }
.menu-btn {
  display: none; width: 44px; height: 44px; border: 2px solid currentColor; border-radius: 12px;
  background: transparent; color: var(--hdr-fg); cursor: pointer; place-items: center;
}
.menu-btn svg { width: 22px; height: 22px; }

@media (max-width: 980px) {
  .menu-btn { display: grid; }
  .site-header .btn--header { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; background: var(--paper); color: var(--ink);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12); border-top: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 4px; border-radius: 0; border-bottom: 1px solid var(--line); font-size: var(--t-md); }
  .nav .btn { display: inline-flex; margin-top: 16px; border-bottom: 0; --btn-bg: var(--ink); --btn-bd: var(--ink); --btn-fg: var(--paper); }
}
@media (min-width: 981px) { .nav .btn { display: none; } }

/* ---------- Hero (banner phát hành) ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--hay); color: var(--on-hay);
  padding-top: clamp(24px, 4vw, 56px);
}
.hero__spots { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.hero__spots path { fill: var(--on-hay); opacity: 0.06; }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: clamp(36px, 5vw, 72px); align-items: center;
  padding-bottom: clamp(48px, 6vw, 88px);
}
.hero__copy { display: grid; gap: 24px; justify-items: start; }

.chip-live {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: var(--on-hay); color: var(--hay);
  font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--barn); box-shadow: 0 0 0 0 rgba(217, 58, 43, 0.7); animation: pulse 1.8s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(217, 58, 43, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 58, 43, 0); } }

.hero__title {
  font-size: var(--t-hero); font-weight: 800; font-stretch: 78%;
  line-height: 1; letter-spacing: -0.035em;
}
.hero__title span { display: block; }
.hero__title .hl {
  display: inline-block; background: var(--on-hay); color: var(--hay);
  padding: 0.02em 0.16em 0.1em; margin-top: 0.12em; border-radius: 0.12em;
  transform: rotate(-1.5deg);
}
.hero__en {
  font: 800 clamp(1rem, 0.8rem + 0.8vw, 1.35rem)/1 var(--font-num);
  letter-spacing: 0.22em; text-transform: uppercase;
}
.hero__lead { font-size: var(--t-lg); line-height: 1.55; max-width: 34ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.countdown { display: grid; gap: 10px; }
.countdown__label { font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.countdown__grid { display: flex; flex-wrap: wrap; gap: 10px; }
.countdown__cell {
  display: grid; justify-items: center; min-width: 74px; padding: 8px 10px 9px;
  background: var(--chalk); border: 2.5px solid var(--on-hay); border-radius: 12px;
}
.countdown__num { font: 900 2.4rem/1 var(--font-num); font-variant-numeric: tabular-nums; }
.countdown__unit { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; }
.countdown__date { font-size: var(--t-sm); }
.countdown__date strong { font-weight: 700; }

/* Ảnh màn hình trong khung "TV truyền hình trực tiếp" */
.hero__visual { position: relative; padding: 28px 0 56px 28px; }
.screen {
  margin: 0; position: relative; overflow: hidden;
  border: 5px solid var(--on-hay); border-radius: 18px; background: var(--on-hay);
  box-shadow: 12px 12px 0 var(--on-hay);
}
.screen img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.screen--main { transform: rotate(1.6deg); animation: drop-in 0.8s cubic-bezier(0.2, 0.9, 0.25, 1.15) both; }
.screen--side {
  position: absolute; left: 0; bottom: 0; width: 46%;
  border-width: 4px; box-shadow: 8px 8px 0 var(--on-hay);
  transform: rotate(-4deg); animation: drop-in-side 0.9s 0.15s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}
@keyframes drop-in { from { transform: translateY(-18px) rotate(4deg); } to { transform: rotate(1.6deg); } }
@keyframes drop-in-side { from { transform: translateY(16px) rotate(-9deg); } to { transform: rotate(-4deg); } }
.screen__tag {
  position: absolute; left: 14px; top: 14px; display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px 6px 9px; border-radius: 8px; background: var(--barn); color: #fff;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
}
.screen__tag .live-dot { background: #fff; animation: none; }
.screen--side .screen__tag { background: var(--on-hay); color: var(--hay); left: 10px; top: 10px; }

.rosette {
  position: absolute; right: -6px; top: -8px; width: clamp(108px, 11vw, 148px);
  transform: rotate(10deg); filter: drop-shadow(4px 5px 0 rgba(22, 35, 26, 0.85));
}
.rosette text { font-family: var(--font-num); font-weight: 900; fill: var(--on-hay); }

.hero__finish {
  height: 22px;
  background: repeating-conic-gradient(var(--on-hay) 0 25%, var(--chalk) 0 50%) 0 0 / 22px 22px;
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__lead { max-width: 46ch; }
  .hero__visual { padding: 12px 8px 48px 16px; }
}
@media (max-width: 520px) {
  .countdown__cell { min-width: 64px; }
  .countdown__num { font-size: 2rem; }
  .hero__cta .btn { width: 100%; }
  .screen--side { width: 52%; }
}

/* ---------- Dải bình luận trực tiếp ---------- */
.ticker { display: flex; align-items: stretch; background: var(--night); color: var(--chalk); overflow: hidden; }
.ticker__label {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 14px 18px;
  background: var(--barn); color: #fff; z-index: 1;
  font-size: var(--t-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.ticker__viewport { overflow: hidden; flex: 1; display: flex; align-items: center; }
.ticker__track { display: flex; width: max-content; animation: ticker 70s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__list { display: flex; }
.ticker__list li { white-space: nowrap; padding-inline: 28px; font-weight: 500; font-size: var(--t-sm); position: relative; }
.ticker__list li::after {
  content: ""; position: absolute; right: -4px; top: 50%; width: 8px; height: 8px; margin-top: -4px;
  background: var(--hay); transform: rotate(45deg);
}
.ticker__list b { color: var(--hay); font-weight: 700; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Game ---------- */
.facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line);
  margin-bottom: clamp(56px, 7vw, 96px);
}
.facts li { padding: 22px 20px 24px 0; display: grid; gap: 4px; }
.facts li + li { padding-left: 20px; border-left: 1px solid var(--line); }
.facts__num { font: 900 clamp(2.6rem, 1.8rem + 2.6vw, 4rem)/1 var(--font-num); font-variant-numeric: tabular-nums; }
.facts__txt { font-size: var(--t-sm); color: var(--muted); }
@media (max-width: 760px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts li:nth-child(3) { padding-left: 0; border-left: 0; }
  .facts li:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

.howto { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(36px, 6vw, 88px); align-items: center; }
.steps { display: grid; gap: 28px; margin-top: 36px; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 56px 1fr; gap: 18px; align-items: start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 56px; height: 64px;
  border-radius: 8px 8px 14px 14px; background: var(--hay); color: var(--on-hay);
  font: 900 2rem/1 var(--font-num);
}
.steps h3 { font-size: var(--t-lg); font-weight: 700; margin-bottom: 6px; letter-spacing: -0.01em; }
.steps p { color: var(--muted); }
.steps strong { color: var(--ink); }

.shot { margin: 0; display: grid; gap: 12px; }
.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); box-shadow: 0 1px 0 var(--line), 0 24px 48px -24px rgba(22, 35, 26, 0.45); }
.shot figcaption { font-size: var(--t-sm); color: var(--muted); }
.shot figcaption b { color: var(--ink); font-weight: 700; }
.shot--zoom { cursor: zoom-in; }

.views { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); margin-top: clamp(64px, 8vw, 112px); }
.views__head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; }
.views__head h3 { font-size: var(--t-xl); font-weight: 800; font-stretch: 85%; }
.views__head p { color: var(--muted); max-width: 52ch; }
kbd {
  display: inline-block; min-width: 1.8em; padding: 0.05em 0.45em; text-align: center;
  font: 700 0.85em/1.5 var(--font-body); color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 6px;
}

.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: clamp(56px, 7vw, 96px); }
.features h3 { font-size: var(--t-md); font-weight: 700; letter-spacing: 0; font-family: var(--font-body); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; }
.features h3::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--hay); flex: none; box-shadow: 2px 2px 0 var(--ink); }
.features p { color: var(--muted); font-size: var(--t-sm); }

@media (max-width: 960px) {
  .howto { grid-template-columns: 1fr; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .views { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Bảng xuất phát ---------- */
.racecard { border-top: 3px solid var(--ink); }
.racecard__cols, .runner {
  display: grid; grid-template-columns: 64px 76px minmax(0, 1.25fr) minmax(0, 1fr) 150px;
  gap: 24px; align-items: center;
}
.racecard__cols {
  padding-block: 12px; border-bottom: 1px solid var(--line);
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
.racecard__cols span:first-child { grid-column: 1 / 3; }
.runner { padding-block: 22px; border-bottom: 1px solid var(--line); transition: background-color 0.2s ease; }
.runner:hover { background: color-mix(in srgb, var(--hay) 9%, transparent); }
.runner__no {
  display: grid; place-items: center; width: 60px; height: 70px;
  background: var(--cloth); color: var(--cloth-ink);
  border-radius: 8px 8px 16px 16px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.08);
  font: 900 2.5rem/1 var(--font-num);
}
.runner__cow { width: 76px; height: 76px; }
.runner__id { display: grid; gap: 4px; }
.runner__name { font-size: var(--t-xl); font-weight: 800; font-stretch: 85%; }
.runner__temper { font-size: var(--t-sm); font-weight: 600; color: var(--pasture); }
.runner__trait { font-size: var(--t-sm); color: var(--muted); max-width: 52ch; }
.runner__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
.stat { display: grid; grid-template-columns: 70px minmax(0, 1fr) 18px; align-items: center; gap: 8px; font-size: 0.8125rem; }
.stat__label { color: var(--muted); }
.stat__bar { height: 8px; border-radius: 99px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.stat__bar i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--ink); border-radius: inherit; }
.stat__val { font: 800 1rem/1 var(--font-num); text-align: right; font-variant-numeric: tabular-nums; }
.runner__meta { display: grid; gap: 8px; justify-items: start; }
.rarity {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); background: color-mix(in srgb, var(--rarity) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--rarity) 55%, transparent);
}
.rarity::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rarity); }
.runner__how { font-size: var(--t-sm); font-weight: 600; }
.racecard__note { margin-top: 20px; font-size: var(--t-sm); color: var(--muted); }

@media (max-width: 1060px) {
  .racecard__cols { display: none; }
  .runner { grid-template-columns: 60px 72px minmax(0, 1fr); gap: 14px 20px; align-items: start; }
  .runner__stats { grid-column: 3 / -1; }
  .runner__meta { grid-column: 3 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
}
@media (max-width: 600px) {
  .runner { grid-template-columns: 52px minmax(0, 1fr); }
  .runner__no { width: 52px; height: 60px; font-size: 2.1rem; }
  .runner__cow { display: none; }
  .runner__stats, .runner__meta { grid-column: 1 / -1; }
  .runner__stats { gap: 8px 16px; }
  .stat { grid-template-columns: 58px minmax(0, 1fr) 16px; gap: 6px; font-size: 0.75rem; }
}

/* ---------- Đường đua ---------- */
.tracks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 2.5vw, 32px); }
.track { display: grid; grid-template-rows: auto 1fr; background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.track__img { overflow: hidden; aspect-ratio: 16 / 10; background: var(--tint); }
.track__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.track:hover .track__img img { transform: scale(1.04); }
.track__body { display: grid; gap: 14px; align-content: start; padding: 22px 24px 26px; }
.track__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.track h3 { font-size: var(--t-xl); font-weight: 800; font-stretch: 85%; }
.track__len { font: 900 1.9rem/1 var(--font-num); white-space: nowrap; font-variant-numeric: tabular-nums; }
.track__len small { font-size: 0.55em; font-weight: 700; margin-left: 2px; }
.track p { color: var(--muted); font-size: var(--t-sm); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 4px 10px; border-radius: 8px; background: var(--tint); font-size: 0.8125rem; font-weight: 600; }
.track__rain { display: flex; align-items: center; gap: 12px; font-size: 0.8125rem; color: var(--muted); padding-top: 14px; border-top: 1px dashed var(--line); }
.track__rain .meter { flex: 1; height: 6px; border-radius: 99px; background: var(--tint); overflow: hidden; }
.track__rain .meter i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--pasture); }
.track__rain b { color: var(--ink); font: 800 1rem/1 var(--font-num); font-variant-numeric: tabular-nums; }
@media (max-width: 960px) { .tracks { grid-template-columns: 1fr; max-width: 640px; } }

/* ---------- Ảnh trong game ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: clamp(48px, 6vw, 72px); }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; display: grid; gap: 8px; text-align: left; color: inherit; font: inherit; }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; transition: transform 0.3s ease; }
.gallery button:hover img { transform: translateY(-3px); }
.gallery span { font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.lightbox { padding: 0; border: 0; background: transparent; max-width: min(1400px, 94vw); width: 100%; }
.lightbox::backdrop { background: rgba(10, 16, 12, 0.86); }
.lightbox img { width: 100%; border-radius: 14px; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 2px 0; color: #f6f8f1; font-size: var(--t-sm); }
.lightbox__close { min-height: 40px; padding: 0.4em 1em; border-radius: 999px; border: 1.5px solid #f6f8f1; background: transparent; color: #f6f8f1; font: 600 var(--t-sm)/1 var(--font-body); cursor: pointer; }

/* ---------- Studio ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.studio__intro { display: grid; gap: 20px; }
.studio__intro h2 { font-size: var(--t-2xl); font-weight: 800; font-stretch: 85%; }
.studio__intro .lead { color: var(--ink); }
.studio__intro p + p { color: var(--muted); }
.principles { display: grid; gap: 0; border-top: 3px solid var(--ink); }
.principles li { padding-block: 22px; border-bottom: 1px solid var(--line); display: grid; gap: 6px; }
.principles h3 { font-size: var(--t-lg); font-weight: 700; letter-spacing: -0.01em; }
.principles p { color: var(--muted); font-size: var(--t-sm); }

.spec { margin-top: clamp(56px, 7vw, 96px); background: var(--card); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.spec__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 28px; border-bottom: 1px dashed var(--line); }
.spec__head h3 { font-size: var(--t-lg); font-weight: 800; }
.spec__head span { font: 800 0.9rem/1 var(--font-num); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.spec dl { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spec dl > div { padding: 22px 28px 24px; display: grid; gap: 6px; align-content: start; border-bottom: 1px solid var(--line); }
.spec dl > div:not(:nth-child(4n + 1)) { border-left: 1px solid var(--line); }
.spec dl > div:nth-last-child(-n + 4) { border-bottom: 0; }
.spec dt { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; }
.spec dd small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-sm); }
@media (max-width: 960px) {
  .studio { grid-template-columns: 1fr; }
  .spec dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec dl > div:not(:nth-child(4n + 1)) { border-left: 0; }
  .spec dl > div:nth-child(2n) { border-left: 1px solid var(--line); }
  .spec dl > div:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .spec dl > div:nth-last-child(-n + 2) { border-bottom: 0; }
}
@media (max-width: 560px) {
  .spec dl { grid-template-columns: 1fr; }
  .spec dl > div:nth-child(2n) { border-left: 0; }
  .spec dl > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .spec dl > div:last-child { border-bottom: 0; }
  .spec dl > div, .spec__head { padding-inline: 20px; }
}

/* ---------- Lộ trình ---------- */
.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.phase { display: grid; gap: 18px; align-content: start; padding-top: 20px; border-top: 3px solid var(--phase, var(--line)); }
.phase--done { --phase: var(--pasture); }
.phase--next { --phase: var(--hay-deep); }
.phase--later { --phase: var(--muted); }
.phase__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.phase h3 { font-size: var(--t-lg); font-weight: 800; }
.phase__status { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--phase) 18%, transparent); }
.phase li { position: relative; padding-left: 28px; font-size: var(--t-sm); }
.phase li + li { margin-top: 10px; }
.phase li::before {
  content: ""; position: absolute; left: 0; top: 0.3em; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--phase);
}
.phase--done li::before { background: var(--phase) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.2l2.6 2.5L12 5.3' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat; }
@media (max-width: 860px) { .roadmap { grid-template-columns: 1fr; } }

/* ---------- Đăng ký trước ---------- */
.register {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: center;
  padding: clamp(32px, 5vw, 64px); border-radius: 28px; background: var(--night); color: var(--chalk);
}
.register::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 22px; z-index: -1;
  background: repeating-conic-gradient(var(--chalk) 0 25%, transparent 0 50%) 0 0 / 22px 22px; opacity: 0.9;
}
.register h2 { font-size: var(--t-2xl); font-weight: 800; font-stretch: 85%; color: var(--hay); }
.register__copy { display: grid; gap: 18px; }
.register__copy p { color: color-mix(in srgb, var(--chalk) 80%, transparent); max-width: 46ch; }
.register__actions { display: grid; gap: 22px; padding-right: 24px; }
.register .btn { --btn-bg: var(--hay); --btn-fg: var(--on-hay); --btn-bd: var(--hay); --btn-shadow: rgba(255, 200, 61, 0.35); justify-self: start; }
.signup { display: grid; gap: 10px; }
.signup label { font-size: var(--t-sm); font-weight: 600; }
.signup__row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input {
  flex: 1 1 180px; min-width: 0; min-height: 52px; padding: 0 18px; border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--chalk) 30%, transparent); background: rgba(255, 255, 255, 0.06); color: var(--chalk);
  font: 500 var(--t-md) var(--font-body);
}
.signup input::placeholder { color: color-mix(in srgb, var(--chalk) 55%, transparent); }
.signup input:focus-visible { outline: 3px solid var(--hay); outline-offset: 2px; border-color: var(--hay); }
.signup .btn { --btn-bg: transparent; --btn-fg: var(--chalk); --btn-bd: var(--chalk); --btn-shadow: transparent; }
.signup .btn:hover { --btn-bg: rgba(255, 255, 255, 0.08); }
.signup__note { font-size: 0.8125rem; color: color-mix(in srgb, var(--chalk) 65%, transparent); }
.signup__status { font-size: var(--t-sm); font-weight: 600; color: var(--hay); min-height: 1.5em; }
@media (max-width: 900px) { .register { grid-template-columns: 1fr; } .register__actions { padding-right: 16px; } }

/* ---------- Hỏi đáp ---------- */
.faq { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.faq .section-head { margin-bottom: 0; }
.faq__list { border-top: 3px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding-block: 20px; cursor: pointer; list-style: none;
  font: 700 var(--t-lg)/1.3 var(--font-body); letter-spacing: -0.01em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28'%3E%3Cpath d='M14 8v12M8 14h12' stroke='%2356675a' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: transform 0.25s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding-bottom: 22px; color: var(--muted); max-width: 62ch; }
@media (max-width: 860px) { .faq { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.site-footer .logo { --hdr-fg: var(--ink); }
.footer__about { display: grid; gap: 16px; align-content: start; }
.footer__about p { color: var(--muted); font-size: var(--t-sm); max-width: 40ch; }
.footer__col h2 { font: 700 0.75rem/1.2 var(--font-body); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer__col li { font-size: var(--t-sm); color: var(--muted); }
.footer__col li + li { margin-top: 8px; }
.footer__col a { text-decoration: none; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.footer__col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
@media (max-width: 860px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .footer__about { grid-column: 1 / -1; } }

/* ---------- Giảm chuyển động ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .ticker__viewport { overflow-x: auto; }
  .ticker__track { animation: none; }
  .ticker__list[aria-hidden="true"] { display: none; }
}
