/* Trang chủ Xuyên Không Tu Tiên — tranh thủy mặc: nền ngà phẳng, mực đen nhiều độ đậm nhạt, một điểm đỏ son.
   Hiệu ứng cuộn: tiêu đề có nét bút lông tự quét, thẻ / ảnh loang mực hiện dần, vệt mực trên cùng chạy theo trang. */
@font-face { font-family: 'Baloo 2'; font-weight: 700; font-display: swap; src: url('fonts/Baloo2-700.ttf') format('truetype'); }
@font-face { font-family: 'Baloo 2'; font-weight: 800; font-display: swap; src: url('fonts/Baloo2-800.ttf') format('truetype'); }

:root {
  --paper: #f4f0e6; --paper2: #ebe4d4; --paper3: #dfd6c2;
  --ink: #1a1714; --ink2: #3b3631; --ink3: #6b645b; --ink4: #a39b8f;
  --line: rgba(26, 23, 20, .16);
  --son: #b0341f;
  --gutter: max(16px, env(safe-area-inset-left), env(safe-area-inset-right));
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); font: 700 17px/1.6 'Baloo 2', system-ui, sans-serif; overflow-x: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #faf7f0, var(--paper) 60%, #ece5d6);
  background-attachment: fixed;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; line-height: 1.15; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.defs { position: absolute; }
#motes { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

/* vệt mực chạy theo trang (đuôi nhạt, đầu bút đậm, chấm son) */
.ink-progress {
  position: fixed; z-index: 30; top: 0; left: 0; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, rgba(26, 23, 20, .15), var(--ink) 94%, var(--son));
  border-radius: 0 3px 3px 0; pointer-events: none;
}

/* ---------- thanh trên ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20; height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--gutter) 0; display: flex; align-items: center; gap: 24px;
  transition: background .4s, box-shadow .4s;
}
.nav.solid { background: rgba(244, 240, 230, .88); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; color: var(--ink2); white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line); }
.brand b { color: var(--ink); font-weight: 800; }
.links { display: flex; gap: 28px; margin-left: auto; }
.links a { position: relative; font-size: 16px; color: var(--ink3); transition: color .2s; }
.links a::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; border-radius: 2px; background: var(--ink);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .35s;
}
.links a:hover { color: var(--ink); }
.links a:hover::after { transform: scaleX(1); }
.nav-play {
  padding: 7px 20px; border-radius: 4px; font-size: 16px; font-weight: 800; color: var(--paper); white-space: nowrap;
  background: var(--ink); box-shadow: 3px 3px 0 var(--son); transition: transform .15s, box-shadow .15s;
}
.nav-play:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--son); }

/* ---------- màn đầu ---------- */
.hero {
  position: relative; display: flex; justify-content: center;
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + 40px) var(--gutter) 96px; overflow: hidden;
}
.scene { position: absolute; inset: 0; pointer-events: none; }
.mtn { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }
.mist ellipse { animation: mist 30s ease-in-out infinite alternate; }
.mist ellipse:nth-child(2) { animation-duration: 38s; animation-direction: alternate-reverse; }
@keyframes mist { to { transform: translateX(90px); } }
.boat { animation: boat 9s ease-in-out infinite alternate; }
@keyframes boat { to { transform: translate(40px, 2px); } }

.plum { position: absolute; top: calc(var(--nav-h) - 10px); right: 0; width: min(360px, 42vw); opacity: .92; transform-origin: 100% 0; animation: sway 9s ease-in-out infinite alternate; }
@keyframes sway { to { transform: rotate(-1.6deg); } }
.blossom { opacity: .85; }

.cloud { position: absolute; fill: #fffdf7; opacity: .9; animation: drift linear infinite; filter: drop-shadow(0 2px 0 rgba(59, 54, 49, .12)); }
.cloud .curl { stroke: var(--ink4); stroke-width: 2.4; stroke-linecap: round; }
.cl1 { top: 44%; width: 200px; animation-duration: 100s; }
.cl2 { top: 60%; width: 140px; opacity: .8; animation-duration: 130s; animation-delay: -70s; }
.cl3 { top: 30%; width: 120px; opacity: .6; animation-duration: 160s; animation-delay: -30s; }
@keyframes drift { from { transform: translateX(-300px); } to { transform: translateX(calc(100vw + 40px)); } }

.cranes { position: absolute; top: 24%; left: 0; width: 100%; height: 120px; animation: fly 54s linear infinite; }
.crane { position: absolute; fill: var(--ink); animation: flap 1.7s ease-in-out infinite alternate; transform-origin: 50% 60%; }
.k1 { left: 0; top: 30px; width: 44px; opacity: .8; }
.k2 { left: 56px; top: 0; width: 32px; animation-delay: -.5s; opacity: .6; }
.k3 { left: 90px; top: 46px; width: 26px; animation-delay: -1s; opacity: .45; }
@keyframes fly { from { transform: translate(-200px, 50px); } to { transform: translate(calc(100vw + 60px), -50px); } }
@keyframes flap { to { transform: scaleY(.45); } }

.hero-layout { position: relative; z-index: 6; width: 100%; max-width: 1280px; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); align-items: center; gap: 40px; }
.hero-in { min-width: 0; text-align: center; }
.hero-gameplay { min-width: 0; scroll-margin-top: 20px; }
.gameplay-head { margin-bottom: 20px; }
.gameplay-head h2 { font-size: clamp(24px, 2.6vw, 34px); }
.gameplay-caption { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--ink2); }
.hero-gameplay .scroll { padding: 0 12px; }
.hero-gameplay .rod { margin: 0 -12px; }
.hero-gameplay .silk { padding: 10px; }
.hero .tagline { gap: 12px; font-size: clamp(18px, 2vw, 24px); letter-spacing: .06em; margin-bottom: 22px; }
.hero .cta { gap: 18px 14px; }
.hero .btn-play { padding: 14px 28px; font-size: 20px; }
.hero .btn-ghost { padding: 10px 18px; font-size: 17px; }
.hero .note { max-width: 360px; margin: 18px auto 0; }
.logo { margin: 0 auto; width: min(780px, 100%); }
.logo svg { width: 100%; height: auto; display: block; overflow: visible; }
/* logo hiện như mực thấm dần ra giấy */
.js .logo { animation: inkIn 1.8s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes inkIn { from { opacity: 0; filter: blur(14px); transform: scale(.98); } 60% { opacity: 1; } }
.tagline {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin: 0 0 30px; font-size: clamp(20px, 3vw, 27px); letter-spacing: .14em; color: var(--ink2);
}
.tagline i { width: 8px; height: 8px; background: var(--son); transform: rotate(45deg); }
.js .tagline, .js .cta, .js .note { animation: fadeUp 1s .7s cubic-bezier(.2, .7, .2, 1) both; }
.js .cta { animation-delay: .9s; } .js .note { animation-delay: 1.1s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.cta { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; align-items: center; }

/* nút chính: nét bút lông mực đậm, chữ trắng giấy, dấu son nhỏ ở góc */
.btn-play {
  position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 16px 46px;
  font-size: 22px; font-weight: 800; color: var(--paper); white-space: nowrap; isolation: isolate; transition: transform .2s;
}
.btn-play .bg { position: absolute; left: -14px; top: -6px; width: calc(100% + 28px); height: calc(100% + 12px); z-index: -1; fill: var(--ink); filter: url(#inkBrush); transition: fill .2s; }
.btn-play .ic { width: 20px; height: 20px; fill: currentColor; }
.btn-play::after {
  content: ''; position: absolute; right: -4px; bottom: -4px; width: 18px; height: 18px; border-radius: 3px; background: var(--son);
  transform: rotate(-8deg); box-shadow: inset 0 0 0 2px var(--son), inset 0 0 0 3.2px rgba(244, 240, 230, .8);
}
.btn-play:hover { transform: translateY(-2px) scale(1.02); }
.btn-play:hover .bg { fill: #000; }
.btn-play:active { transform: translateY(1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 26px; white-space: nowrap;
  font-size: 19px; font-weight: 800; color: var(--ink); border: 2px solid var(--ink); border-radius: 4px; background: rgba(244, 240, 230, .6);
  transition: background .2s, color .2s;
}
.btn-ghost svg { width: 22px; height: 22px; fill: currentColor; }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.empty { opacity: .45; cursor: default; }
.btn-ghost.empty:hover { background: rgba(244, 240, 230, .6); color: var(--ink); }
.note { margin: 20px 0 0; font-size: 15px; color: var(--ink3); }
.scroll-hint { position: absolute; z-index: 6; left: 50%; bottom: max(22px, env(safe-area-inset-bottom)); transform: translateX(-50%); animation: bob 2.2s ease-in-out infinite; }
.scroll-hint svg { width: 34px; height: 34px; fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .9; }
@keyframes bob { 50% { transform: translate(-50%, 6px); } }

/* ---------- phần chung ---------- */
main { position: relative; z-index: 6; }
.sec { position: relative; max-width: 1160px; margin: 0 auto; padding: 60px var(--gutter); }
.head { position: relative; display: flex; align-items: flex-end; gap: 18px; margin-bottom: 40px; padding-bottom: 22px; }
/* nét bút lông dưới tiêu đề: tự quét từ trái sang khi cuộn tới (home.js chèn) */
.head .brush {
  position: absolute; left: -4px; bottom: 0; width: min(560px, 100%); height: 18px; fill: var(--ink); filter: url(#inkBrush);
  clip-path: inset(0 100% 0 0); transition: clip-path 1.3s cubic-bezier(.6, .1, .2, 1) .25s;
}
.head.in .brush { clip-path: inset(0 0 0 0); }
.num { font-size: clamp(56px, 8vw, 88px); font-weight: 800; line-height: .8; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: 2px var(--ink2); opacity: .5; }
.kicker {
  display: inline-block; padding: 1px 10px; margin-bottom: 6px; border-radius: 2px;
  font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--paper); background: var(--son);
}
.section-desc { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink3); }
.head h2 { font-size: clamp(30px, 4.6vw, 46px); font-weight: 800; color: var(--ink); }
.tag {
  display: inline-block; padding: 0 9px; border-radius: 2px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--son); box-shadow: inset 0 0 0 1.5px var(--son); white-space: nowrap;
}

/* loang mực: phần tử hiện ra từ một điểm, mép nhòe như mực thấm giấy (cần @property; trình duyệt cũ thì hiện thẳng) */
@property --spread { syntax: '<percentage>'; inherits: false; initial-value: 0%; }
.js .reveal {
  --spread: 0%; opacity: 0; filter: blur(6px);
  -webkit-mask-image: radial-gradient(circle at 35% 45%, #000 var(--spread), transparent calc(var(--spread) + 30%));
  mask-image: radial-gradient(circle at 35% 45%, #000 var(--spread), transparent calc(var(--spread) + 30%));
  transition: --spread 1.4s cubic-bezier(.3, .6, .2, 1), filter 1.1s, opacity .5s;
}
.js .reveal.in { --spread: 140%; opacity: 1; filter: none; }
.js .reveal.done { -webkit-mask-image: none; mask-image: none; transition: none; }

/* ---------- 01 video: tranh cuộn ---------- */
.scroll { position: relative; max-width: 1000px; margin: 0 auto; padding: 0 18px; }
.rod {
  display: block; height: 16px; margin: 0 -18px; border-radius: 8px; position: relative; z-index: 2;
  background: linear-gradient(180deg, #4a443d, #1a1714 60%, #0d0b09); box-shadow: 0 4px 10px rgba(26, 23, 20, .35);
}
.rod::before, .rod::after { content: ''; position: absolute; top: -3px; width: 20px; height: 22px; border-radius: 5px; background: linear-gradient(180deg, #8a8278, #3b3631); }
.rod::before { left: -8px; } .rod::after { right: -8px; }
.silk { padding: 16px; background: linear-gradient(180deg, var(--paper2), var(--paper3)); box-shadow: inset 0 0 0 2px rgba(59, 54, 49, .3), inset 0 0 40px rgba(59, 54, 49, .18), 0 18px 40px rgba(26, 23, 20, .18); }
.screen { position: relative; aspect-ratio: 16 / 9; background: #1a1714; overflow: hidden; box-shadow: 0 0 0 1px var(--ink2); }
.screen video, .gameplay-poster {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* Cận trận đánh hơn; khung tranh giữ nguyên, nút phát không bị phóng theo. */
  transform: scale(1.2); transform-origin: 50% 45%;
}
.screen [hidden] { display: none; }
.v-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px; border-radius: 50%;
  border: 2px solid rgba(244, 240, 230, .8); background: rgba(26, 23, 20, .55); color: var(--paper); cursor: pointer; transition: transform .2s, opacity .2s;
}
.v-play svg { width: 38px; height: 38px; fill: currentColor; margin-left: 5px; }
.v-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.v-sound { position: absolute; right: 12px; bottom: 12px; width: 42px; height: 42px; border-radius: 6px; border: 0; background: rgba(26, 23, 20, .65); color: var(--paper); cursor: pointer; opacity: 0; transition: opacity .2s; }
.v-sound svg { width: 24px; height: 24px; fill: currentColor; }
.v-sound .on { display: none; } .sound .v-sound .on { display: inline; } .sound .v-sound .off { display: none; }
.playing .v-play { opacity: 0; pointer-events: none; }
.playing .v-sound, .screen:hover .v-sound { opacity: 1; }
.novideo .v-play, .novideo .v-sound { display: none; }

/* ---------- 02 lục hệ ---------- */
.he-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.he {
  position: relative; padding: 24px 22px 22px; border-radius: 3px; background: rgba(255, 253, 247, .55); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .3s, box-shadow .3s;
}
.he::before {
  /* vệt mực nhạt góc thẻ */
  content: ''; position: absolute; right: 0; top: 0; width: 46%; height: 70%; pointer-events: none;
  background: radial-gradient(closest-side at 75% 30%, rgba(59, 54, 49, .1), transparent); transition: opacity .3s; opacity: .6;
}
.he:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(26, 23, 20, .35), 0 14px 30px rgba(26, 23, 20, .1); }
.he:hover::before { opacity: 1; }
.he .ic { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; border-radius: 10px; background: var(--ink); transform: rotate(-3deg); }
.he .ic svg { width: 28px; height: 28px; fill: var(--paper); }
.he h3 { font-size: 25px; font-weight: 800; }
.he b { display: inline-block; margin: 0 0 8px; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--son); }
.he p { margin: 0; font-size: 16px; color: var(--ink3); }

/* ---------- 03 thế giới: tranh treo, chú thích viết dưới ---------- */
.stage { position: relative; display: grid; }
.slide { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .7s, visibility 0s .7s; }
.slide.on { opacity: 1; visibility: visible; transition: opacity .7s; }
.ph { position: relative; aspect-ratio: 16 / 9; overflow: hidden; padding: 12px; background: var(--paper2); box-shadow: inset 0 0 0 1px rgba(59, 54, 49, .3), 0 18px 40px rgba(26, 23, 20, .16); }
.ph img { width: 100%; height: 100%; object-fit: cover; box-shadow: 0 0 0 1px var(--ink2); }
.slide figcaption { padding: 18px 4px 0; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; align-items: center; }
.slide h3 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; }
.slide p { grid-column: 1 / -1; margin: 6px 0 0; max-width: 720px; font-size: 16px; color: var(--ink3); }
.arw {
  position: absolute; z-index: 4; top: 0; width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  margin-top: calc(var(--ph-h, 300px) / 2 - 23px);
  border: 0; background: rgba(26, 23, 20, .72); color: var(--paper); transition: background .2s, transform .2s;
}
.arw svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.arw:hover { background: var(--ink); transform: scale(1.06); }
.prev { left: 24px; } .next { right: 24px; }
.w-bar { display: flex; align-items: center; gap: 18px; margin-top: 18px; }
.count { font-size: 18px; color: var(--ink3); white-space: nowrap; }
.count b { font-size: 28px; color: var(--ink); }
.thumbs { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button {
  flex: 0 0 auto; width: 112px; aspect-ratio: 16 / 9; padding: 0; border: 0; border-radius: 2px; overflow: hidden;
  cursor: pointer; filter: grayscale(1) contrast(.9); opacity: .55; background: var(--paper3);
  box-shadow: 0 0 0 1px var(--line); transition: opacity .3s, filter .3s, box-shadow .3s;
}
.thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.thumbs button.on, .thumbs button:hover { filter: none; opacity: 1; box-shadow: 0 0 0 2px var(--ink); }

/* ---------- 04 boss: yêu thú trên vệt mực ---------- */
.boss-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.boss {
  position: relative; display: flex; flex-direction: column; padding: 0 18px 20px; border-radius: 3px;
  background: rgba(255, 253, 247, .55); box-shadow: inset 0 0 0 1px var(--line); transition: transform .3s, box-shadow .3s;
}
.boss:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgba(26, 23, 20, .35), 0 14px 30px rgba(26, 23, 20, .1); }
.pic { position: relative; height: 196px; margin: 0 -18px 14px; display: flex; align-items: flex-end; justify-content: center; padding: 22px 14px 10px; isolation: isolate; }
.pic::before {
  /* vệt mực loang sau boss */
  content: ''; position: absolute; left: 4%; right: 4%; bottom: -6px; height: 46%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(59, 54, 49, .34), rgba(59, 54, 49, .14) 60%, transparent);
  filter: url(#inkWash);
}
.pic img { max-height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .35)); transition: transform .5s; }
.boss:hover .pic img { transform: scale(1.06) translateY(-3px); }
.boss .tag { align-self: flex-start; }
.boss h3 { margin: 8px 0 6px; font-size: 21px; font-weight: 800; }
.boss p { margin: 0 0 10px; font-size: 15px; color: var(--ink3); flex: 1; }
.boss small { font-size: 14px; color: var(--ink2); }
.boss small::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 8px; transform: rotate(45deg) translateY(-2px); background: var(--son); }

/* ---------- khí vận: tranh mực đen, nhân vật + khí vận vẽ trên canvas (khivan.js) ---------- */
.kv { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: stretch; }
.kv-stage {
  position: relative; min-height: 520px; border-radius: 3px; overflow: hidden;
  background: radial-gradient(ellipse 60% 55% at 50% 58%, #2c2f3c, #171920 70%, #101116);
  box-shadow: inset 0 0 0 1px rgba(244, 240, 230, .12), 0 18px 40px rgba(26, 23, 20, .22);
}
.kv-stage::after { /* mép giấy mực mờ quanh tranh */
  content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px 10px rgba(0, 0, 0, .55);
}
.kv-stage canvas { position: absolute; left: 0; right: 0; top: 0; bottom: 64px; width: 100%; height: calc(100% - 64px); display: block; }
.kv-stage .arw { top: 50%; margin-top: -23px; background: rgba(244, 240, 230, .14); }
.kv-stage .arw:hover { background: rgba(244, 240, 230, .26); }
.kv-prev { left: 16px; } .kv-next { right: 16px; }
.kv-cap { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; text-align: center; color: var(--paper); }
.kv-cap h3 { margin: 0; font-size: clamp(26px, 3.2vw, 34px); font-weight: 800; letter-spacing: .02em; }
.kv-cap span { font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: #d9b06a; }
/* 16 khí vận: hai cột */
.kv-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start; }
.kv-list button {
  display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 3px; cursor: pointer; text-align: left;
  font: 800 15px/1.2 'Baloo 2', system-ui, sans-serif; color: var(--ink2);
  background: rgba(255, 253, 247, .55); box-shadow: inset 0 0 0 1px var(--line); transition: background .2s, color .2s, transform .2s;
}
.kv-list button::before { content: ''; width: 8px; height: 8px; flex: none; transform: rotate(45deg); background: var(--ink4); transition: background .2s; }
.kv-list button:hover { transform: translateX(3px); color: var(--ink); }
.kv-list button.on { background: var(--ink); color: var(--paper); box-shadow: none; }
.kv-list button.on::before { background: var(--son); }
.kv-list b { font-weight: 800; }
.kv-list .kv-grp { grid-column: 1 / -1; margin: 10px 0 2px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font: 800 17px/1.2 'Baloo 2', system-ui, sans-serif; color: var(--ink); letter-spacing: .02em; }
.kv-list .kv-grp:first-child { margin-top: 0; }

/* ---------- 05 đặc sắc ---------- */
.feat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 34px; }
.feat { display: grid; grid-template-columns: auto 1fr; column-gap: 18px; align-items: start; padding: 24px 6px; border-top: 1px solid var(--line); }
.seal {
  grid-row: span 2; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 4px; transform: rotate(-4deg);
  font-size: 18px; font-weight: 800; color: var(--paper); background: var(--son);
  box-shadow: inset 0 0 0 4px var(--son), inset 0 0 0 5.5px rgba(244, 240, 230, .8);
}
.feat h3 { font-size: 22px; font-weight: 800; }
.feat p { margin: 4px 0 0; font-size: 16px; color: var(--ink3); }

/* ---------- 06 tin mới ---------- */
.news { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.news li { position: relative; padding: 24px 28px 26px 34px; border-radius: 3px; background: rgba(255, 253, 247, .6); box-shadow: inset 0 0 0 1px var(--line); }
.news li::before { content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 3px 3px 0; background: var(--ink); }
.news .meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.news time { font-size: 15px; color: var(--ink3); }
.news h3 { font-size: 26px; font-weight: 800; }
.news p { margin: 6px 0 0; font-size: 17px; color: var(--ink2); }

/* ---------- cuối trang ---------- */
.final { position: relative; z-index: 6; padding: 120px var(--gutter) 110px; text-align: center; overflow: hidden; isolation: isolate; }
.final-mtn { position: absolute; left: 0; bottom: 0; width: 100%; height: 260px; z-index: -1; }
.final h2 { margin-bottom: 30px; font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.foot {
  position: relative; z-index: 6; display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 26px var(--gutter) max(26px, env(safe-area-inset-bottom)); background: var(--ink); color: var(--paper);
}
.foot img { border-radius: 9px; }
.foot div { display: flex; flex-direction: column; line-height: 1.3; }
.foot b { font-size: 18px; }
.foot span { font-size: 14px; color: var(--ink4); }
.foot nav { margin-left: auto; display: flex; gap: 22px; flex-wrap: wrap; }
.foot nav a { font-size: 15px; color: var(--ink4); }
.foot nav a:hover { color: var(--paper); }
.beta {
  /* chiếm trọn một hàng (logo / menu xuống hàng dưới), chữ chỉ dài tối đa ~980px cho dễ đọc */
  flex: 0 0 100%; margin: 0 0 12px; padding: 0 max(0px, calc(100% - 980px)) 18px 0; border-bottom: 1px solid rgba(244, 240, 230, .14);
  font-size: 13.5px; line-height: 1.65; color: var(--ink4);
}
.beta strong { color: var(--paper); font-weight: 700; }
.beta a { color: var(--paper); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- cỡ màn ---------- */
@media (max-width: 960px) {
  .hero { padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + 20px); padding-bottom: 64px; }
  .hero-layout { max-width: 720px; grid-template-columns: 1fr; gap: 18px; text-align: center; }
  .hero-in { display: contents; }
  .hero .logo { order: 1; }
  .hero .tagline { order: 2; margin: 0; }
  .hero-gameplay { order: 3; }
  .hero .cta { order: 4; }
  .hero .note { order: 5; margin-top: 0; }
  .hero .logo { width: min(360px, 100%); }

  .gameplay-head { text-align: center; margin-bottom: 16px; }
  .links { display: none; }
  .nav-play { margin-left: auto; }
  .boss-grid { grid-template-columns: repeat(2, 1fr); }
  .he-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  :root { --nav-h: 56px; }
  .brand span { font-size: 17px; }
  .nav-play { padding: 6px 14px; font-size: 15px; }
  .hero { padding-top: calc(var(--nav-h) + env(safe-area-inset-top) + 8px); padding-bottom: 52px; }
  .hero-layout { gap: 14px; }
  .hero .logo { width: min(240px, 76vw); }
  .hero .tagline { font-size: 18px; gap: 10px; margin: 0; }
  .hero .note { font-size: 13px; line-height: 1.4; margin-top: 0; max-width: 290px; }
  .gameplay-head .kicker { display: none; }
  .gameplay-head h2 { font-size: 24px; }
  .gameplay-head { margin-bottom: 12px; }
  .gameplay-caption { font-size: 13px; margin-top: 12px; }
  .hero-gameplay .silk { padding: 6px; }
  .plum { width: 46vw; opacity: .75; }
  .btn-play { padding: 14px 36px; font-size: 20px; }
  .btn-ghost { padding: 10px 20px; font-size: 17px; }
  .sec { padding: 40px var(--gutter); }
  .head { gap: 14px; margin-bottom: 28px; }
  .he-grid, .feat-grid { grid-template-columns: 1fr; }
  .scroll { padding: 0 8px; }
  .rod { margin: 0 -8px; }
  .silk { padding: 8px; }
  .ph { padding: 6px; }
  .slide figcaption { grid-template-columns: 1fr; }
  .slide h3 { margin-top: 6px; }
  .slide figcaption .tag { justify-self: start; }
  .arw { width: 40px; height: 40px; margin-top: calc(var(--ph-h, 200px) / 2 - 20px); }
  .prev { left: 12px; } .next { right: 12px; }
  .thumbs button { width: 84px; }
  .pic { height: 150px; margin: 0 -14px 10px; }
  .boss { padding: 0 14px 16px; }
  .boss h3 { font-size: 18px; }
  .news li { padding: 20px 18px 22px 24px; }
  .news h3 { font-size: 22px; }
  .foot nav { margin-left: 0; width: 100%; }
}
@media (max-width: 900px) {
  .kv { grid-template-columns: 1fr; }
  .kv-stage { min-height: 440px; }
  .kv-list { grid-template-columns: repeat(4, 1fr); }
  .kv-list button { justify-content: center; padding: 9px 4px; font-size: 14px; text-align: center; }
  .kv-list button::before { display: none; }
}
@media (max-width: 600px) {
  .kv-stage { min-height: 380px; }
  .kv-list { grid-template-columns: repeat(3, 1fr); gap: 5px; }
  .kv-list button { font-size: 13px; padding: 8px 3px; }
  .kv-stage .arw { width: 40px; height: 40px; margin-top: -20px; }
  .kv-prev { left: 8px; } .kv-next { right: 8px; }
}
@media (max-width: 380px) {
  .boss-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; filter: none; -webkit-mask-image: none; mask-image: none; }
  .head .brush { clip-path: none; }
}

/* Giọt mực có chủ đích ở lề tranh, không phủ hạt nhiễu lên chữ / video. */
.ink-drops { position: absolute; width: clamp(90px, 12vw, 170px); height: auto; fill: var(--ink); opacity: .14; pointer-events: none; }
.ink-drops.left { left: -30px; top: 17%; transform: rotate(-18deg); }
.ink-drops.right { right: -24px; bottom: 5%; width: clamp(70px, 9vw, 130px); transform: rotate(155deg); opacity: .21; }
@media (max-width: 600px) {
  .ink-drops.left { left: -42px; top: 8%; opacity: .12; }
  .ink-drops.right { right: -34px; bottom: 3%; }
}
