/* Aurev Studio · trang tĩnh phong cách pixel (khung gỗ / giấy lấy từ bộ khung màn chờ của Ngõ 1930s, hình PixelLab). */
@font-face { font-family: "VT323"; src: url("/assets/fonts/vt323.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Ark Pixel"; src: url("/assets/fonts/ark-pixel-12.woff2") format("woff2"); font-display: swap; }

:root {
  --bg: #d9c7a1;
  --bg-deep: #c4ad83;
  --ink: #2a1a14;
  --ink-soft: #5a4334;
  --paper: #e6d8b9;
  --seal: #9e2f22;
  --seal-ink: #fff4dc;
  --wood: #4a2f22;
  --wood-ink: #f3e3c0;
  --link: #8a2a1c;
  --focus: #d98a1c;
  --head: #3b2519;
  --head-ink: #f3e3c0;
  --shadow: rgba(40, 20, 10, .35);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1d1826;
    --bg-deep: #141019;
    --ink: #2a1a14;
    --ink-soft: #5a4334;
    --paper: #e6d8b9;
    --link: #8a2a1c;
    --head: #120e18;
    --head-ink: #f0dcb4;
    --shadow: rgba(0, 0, 0, .6);
    --page-ink: #eadcbc;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1d1826;
  --bg-deep: #141019;
  --head: #120e18;
  --head-ink: #f0dcb4;
  --shadow: rgba(0, 0, 0, .6);
  --page-ink: #eadcbc;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--page-ink, var(--ink));
  font-family: "Ark Pixel", ui-monospace, Menlo, monospace;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
.px { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--wood); color: var(--wood-ink); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

h1, h2, h3, .title { font-family: "VT323", ui-monospace, monospace; font-weight: normal; line-height: 1.05; letter-spacing: .5px; }
h1 { font-size: 56px; margin: 0 0 12px; }
h2 { font-size: 40px; margin: 28px 0 10px; }
h3 { font-size: 30px; margin: 22px 0 6px; }

/* Thanh trên */
.top { background: var(--head); color: var(--head-ink); border-bottom: 4px solid #000; }
.top-in { max-width: 1120px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 48px; height: 48px; }
.brand span { font-family: "VT323", monospace; font-size: 30px; letter-spacing: 2px; white-space: nowrap; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: "VT323", monospace; font-size: 24px; }
.nav a { text-decoration: none; padding: 2px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { border-bottom-color: currentColor; }
.tools { display: flex; align-items: center; gap: 8px; font-family: "VT323", monospace; font-size: 22px; }
.lang a { text-decoration: none; padding: 0 4px; opacity: .7; }
.lang a[aria-current="true"] { opacity: 1; text-decoration: underline; }
.theme { background: none; border: 2px solid currentColor; color: inherit; font: inherit; padding: 0 8px; cursor: pointer; line-height: 1.3; }

/* Đầu trang chủ */
.hero { position: relative; background: #0d0a14; border-bottom: 4px solid #000; }
.hero img.bg { width: 100%; height: min(52vw, 540px); object-fit: cover; object-position: 50% 60%; }
.hero-in { position: absolute; inset: auto 0 0 0; padding: 16px; background: linear-gradient(transparent, rgba(8, 6, 14, .88) 45%); color: #f6e7c6; }
.hero-box { max-width: 1120px; margin: 0 auto; display: flex; align-items: flex-end; gap: 16px; }
.hero-box img { width: 96px; height: 96px; flex: none; }
.hero h1 { font-size: 64px; margin: 0; text-shadow: 3px 3px 0 #000; }
.hero p { margin: 4px 0 0; font-size: 18px; text-shadow: 2px 2px 0 #000; }

main { max-width: 1120px; margin: 0 auto; padding: 16px; }

/* Tờ giấy trong khung gỗ */
.paper {
  background: var(--paper);
  color: var(--ink);
  border: 32px solid transparent;
  border-image: url("/assets/img/frame-board.png") 18 / 32px / 0 round;
  image-rendering: pixelated;
  padding: 4px 8px;
  margin: 16px 0;
  box-shadow: 0 8px 0 -2px var(--shadow);
}
.paper > :first-child { margin-top: 0; }
.paper > :last-child { margin-bottom: 0; }
.paper a { color: var(--link); }
.paper .muted { color: var(--ink-soft); }
.page-title { color: var(--page-ink, var(--ink)); margin-top: 8px; }

/* Nút gỗ */
.plank {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
  width: 276px; height: 72px; padding: 0 30px;
  background: url("/assets/img/btn-plank.png") 0 0 / 100% 100% no-repeat;
  image-rendering: pixelated;
  color: var(--wood-ink); text-decoration: none; text-align: center;
  font-family: "VT323", monospace; font-size: 30px; line-height: 1; text-shadow: 2px 2px 0 #1a0d0a;
}
.plank small { font-family: "Ark Pixel", monospace; font-size: 12px; letter-spacing: 1px; text-transform: uppercase; opacity: .9; margin-top: 4px; }
.plank[aria-disabled="true"] { cursor: default; filter: saturate(.75); }
.plank.sm { width: 184px; height: 48px; font-size: 24px; padding: 0 20px; }
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 4px; }

/* Lưới game */
.games { display: grid; grid-template-columns: 1fr; gap: 8px; }
.game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; align-items: center; }
.game .head { display: flex; gap: 12px; align-items: center; }
.game .head img { width: 96px; height: 96px; flex: none; }
.game h3 { margin: 0; }
.game .vn { font-family: "VT323", monospace; font-size: 22px; color: var(--ink-soft); }
.game p { margin: 8px 0 0; }
figure { margin: 0; }
figure .media { width: 100%; aspect-ratio: 1280 / 670; object-fit: cover; background: #000; border: 4px solid var(--wood); }
figcaption { font-size: 14px; color: var(--ink-soft); margin-top: 4px; }
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 0; list-style: none; margin: 8px 0 0; font-size: 16px; }
.badges li::before { content: "■ "; color: var(--seal); }

/* Văn bản dài */
.doc { max-width: 860px; margin: 0 auto; }
.doc h2 { font-size: 34px; }
.doc ul, .doc ol { padding-left: 24px; }
.doc li { margin: 4px 0; }
.note { border-left: 6px solid var(--seal); padding: 4px 12px; background: rgba(158, 47, 34, .08); }
.steps { counter-reset: s; list-style: none; padding-left: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; margin: 10px 0; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; background: var(--seal); color: var(--seal-ink); font-family: "VT323", monospace; font-size: 26px; text-align: center; line-height: 32px; }
dl.faq dt { font-family: "VT323", monospace; font-size: 28px; margin-top: 18px; line-height: 1.1; }
dl.faq dd { margin: 4px 0 0; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 6px 8px; border-bottom: 2px solid rgba(74, 47, 34, .3); }
.mail { font-family: "VT323", monospace; font-size: 30px; word-break: break-all; }

/* Chân trang */
.foot { background: var(--head); color: var(--head-ink); border-top: 4px solid #000; margin-top: 32px; }
.foot-in { max-width: 1120px; margin: 0 auto; padding: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; font-size: 14px; }
.foot-in nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.foot-in p { margin: 0; flex-basis: 100%; opacity: .8; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 44px; }
  h2 { font-size: 34px; }
  .hero h1 { font-size: 44px; }
  .hero img.bg { height: 64vw; }
  .hero-box img { width: 64px; height: 64px; }
  .hero p { font-size: 15px; }
  .paper { border-width: 16px; border-image-width: 16px; padding: 4px 4px; }
  .game { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .game .head img { width: 64px; height: 64px; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .brand span { font-size: 24px; }
  .brand img { width: 36px; height: 36px; }
  .nav { font-size: 20px; gap: 2px 12px; width: 100%; }
  .plank { width: 230px; height: 60px; font-size: 26px; }
  .stores { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto; } }
