@font-face { font-family: "Departure Viet"; src: url(fonts/departure-viet.otf) format("opentype"); font-display: optional; }
@font-face { font-family: "Be Vietnam Pro"; src: url(fonts/bevietnam-500.ttf) format("truetype"); font-weight: 500; font-display: optional; }
@font-face { font-family: "Be Vietnam Pro"; src: url(fonts/bevietnam-600.ttf) format("truetype"); font-weight: 600 800; font-display: optional; }

/* Layout: the new carved-wood logo sets the tone - warm wood frames on parchment by day,
   a lantern-lit night band for downloading; every picture is a real 1x capture from the game. */
:root {
  --ground: #f6ecd3; --ground-2: #ede0bd; --card: #fdf6e4;
  --ink: #2b1c10; --ink-soft: #6b5337;
  --outline: #2a1a10; --rim: #c98a46; --rim-hi: #e8b06a; --rim-lo: #8a5a2a;
  --leaf: #4d8a28; --leaf-hi: #86c440; --lantern: #ffcf5a; --ember: #e2533b; --sky: #2f6b9e;
  --night: #1b2330; --night-2: #243043; --night-ink: #f3e7c9; --night-soft: #b7ab90;
  --discord: #5865f2; --discord-hi: #7983f5; --discord-lo: #3c45a5;
  --shadow: rgba(42, 26, 16, .28);
  --f-pixel: "Departure Viet", "Consolas", monospace;
  --f-body: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --ground: #17201a; --ground-2: #1e2a22; --card: #223128; --ink: #f2e6c8; --ink-soft: #b8aa8a;
  --outline: #0b0f0c; --leaf: #9ad064; --sky: #86bde0; --night: #0f141c; --night-2: #182131; --shadow: rgba(0, 0, 0, .5);
  color-scheme: dark; } }
:root[data-theme="dark"] {
  --ground: #17201a; --ground-2: #1e2a22; --card: #223128; --ink: #f2e6c8; --ink-soft: #b8aa8a;
  --outline: #0b0f0c; --leaf: #9ad064; --sky: #86bde0; --night: #0f141c; --night-2: #182131; --shadow: rgba(0, 0, 0, .5);
  color-scheme: dark; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font: 500 16px/1.65 var(--f-body); overflow-x: clip; }
img { max-width: 100%; display: block; }
.shot img { image-rendering: pixelated; width: 100%; height: auto; }
a { color: var(--sky); }
a:hover { color: var(--ember); }
:focus-visible { outline: 3px solid var(--lantern); outline-offset: 3px; }
h1, h2, h3, h4, .eyebrow, .btn, .key { font-family: var(--f-pixel); font-weight: 400; text-wrap: balance; }
h3 { font-size: 1.3rem; line-height: 1.25; margin: .2em 0 .5em; }
p { margin: .5em 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
.wrap.narrow { max-width: 1000px; }
.band { padding-block: 68px; }
.band.dim { background: var(--ground-2); }
.band.night { background: var(--night); color: var(--night-ink); --ink: var(--night-ink); --ink-soft: var(--night-soft); --card: var(--night-2); }
.band.night a:not(.btn) { color: var(--lantern); }
.title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); line-height: 1.15; margin: 0 0 .5em; display: flex; align-items: center; gap: 14px; }
.title::before { content: ""; width: 16px; height: 16px; flex: none; background: var(--leaf-hi); box-shadow: 0 0 0 3px var(--outline), 4px 4px 0 0 var(--rim); }
.lead { max-width: 66ch; color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 26px; }
.eyebrow { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--rim-lo); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .eyebrow { color: var(--rim-hi); } }
:root[data-theme="dark"] .eyebrow { color: var(--rim-hi); }

/* wooden frame of the game's UI */
.frame { background: var(--card); padding: 7px; box-shadow: 0 0 0 3px var(--outline), inset 0 0 0 4px var(--rim), inset 0 0 0 7px var(--outline), 7px 7px 0 3px var(--shadow); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer; border: 0; font-size: 1rem; color: #2a1a10;
  padding: 11px 20px; background: var(--rim); box-shadow: 0 0 0 3px var(--outline), inset 0 4px 0 var(--rim-hi), inset 0 -5px 0 var(--rim-lo), 0 5px 0 3px var(--outline); transform: translateY(-2px); }
.btn:hover { color: #2a1a10; background: var(--rim-hi); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 3px var(--outline), inset 0 4px 0 var(--rim-lo), 0 0 0 3px var(--outline); }
.btn-sm { font-size: .85rem; padding: 7px 13px; }
.btn-big { font-size: 1.15rem; padding: 14px 26px; }
.btn.discord { background: var(--discord); color: #fff; box-shadow: 0 0 0 3px var(--outline), inset 0 4px 0 var(--discord-hi), inset 0 -5px 0 var(--discord-lo), 0 5px 0 3px var(--outline); }
.btn.discord:hover { background: var(--discord-hi); color: #fff; }
.btn[aria-disabled="true"] { background: #b9a88a; color: #4a3b2a; cursor: default; box-shadow: 0 0 0 3px var(--outline), inset 0 4px 0 #cfc0a2, inset 0 -5px 0 #8d7d62, 0 5px 0 3px var(--outline); }

/* top bar */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 16px; padding: 8px 20px; padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background: #2a1a10; box-shadow: 0 3px 0 var(--rim-lo); }
.brand img { width: 120px; height: auto; }
.menu { display: flex; gap: 2px; margin-left: auto; }
.menu a { color: #f6e3bd; text-decoration: none; font: .9rem var(--f-pixel); padding: 8px 10px; }
.menu a:hover { color: var(--lantern); }
.burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 3px; background: #f6e3bd; margin: 4px 0; }

/* hero */
.hero { position: relative; color: #fff6df; overflow: hidden; background: #1b2330; }
.hero-art { position: absolute; inset: 0; background: url(img/shots/barkridge.png) center 30% / cover no-repeat; image-rendering: pixelated; }
.hero-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 18, 28, .25), rgba(14, 18, 28, .55) 55%, rgba(18, 12, 8, .92)); }
.hero-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: clamp(40px, 8vw, 104px) 20px 52px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-logo { width: min(680px, 94%); height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .4)); }
.hero-tag { font-size: clamp(1.02rem, 2vw, 1.22rem); max-width: 44ch; margin: 14px 0; font-weight: 600; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 26px; }
.badges span { font: .8rem var(--f-pixel); padding: 5px 10px; background: rgba(20, 14, 8, .75); box-shadow: 0 0 0 2px var(--lantern); color: #ffe7a8; }
.cta, .dl-row { display: flex; flex-wrap: wrap; gap: 18px 22px; justify-content: center; }
.cta-note { font: .8rem var(--f-pixel); color: #f1dfb8; margin-top: 14px; text-shadow: 0 1px 0 rgba(0, 0, 0, .6); }

/* intro */
.realms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; margin-bottom: 60px; }
.shot { margin: 0; }
.shot figcaption { padding: 12px 10px 6px; font-size: .95rem; color: var(--ink-soft); }
.shot figcaption b { display: block; font: 400 1.15rem var(--f-pixel); color: var(--ink); margin-bottom: 2px; }
.feature { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-bottom: 56px; }
.feature.flip .shot { order: 2; }
.ftext p { color: var(--ink-soft); }

/* download */
.dl-box { padding: 26px 20px 18px; text-align: center; margin-bottom: 34px; }
.dl-box .cta-note { color: var(--night-soft); text-shadow: none; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.step { padding: 20px 22px 16px; }
.step ul, .step ol { padding-left: 1.2em; margin: 0; }
.step li { margin: 6px 0; font-size: .95rem; }
.step.f8 { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 26px; align-items: start; }
.step.f8 h3 { grid-column: 1 / -1; }
.step.f8 .shot { box-shadow: 0 0 0 3px var(--outline); padding: 0; }
.key { display: inline-block; padding: 1px 8px; background: var(--lantern); color: #2a1a10; box-shadow: 0 0 0 2px var(--outline), inset 0 -3px 0 #c99a2a; }
.note { margin-top: 26px; font-size: .9rem; color: var(--ink-soft); }

/* news */
.news { padding: 20px 24px; margin-bottom: 22px; }
.news .when { font: .8rem var(--f-pixel); color: var(--rim-lo); }
.news h4 { font: 400 1rem var(--f-pixel); margin: 12px 0 4px; }
.news ul { margin: 0; padding-left: 1.2em; color: var(--ink-soft); }
.empty { color: var(--ink-soft); }

/* text pages (terms, privacy) */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 20px 64px; }
.doc h1 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); margin: 0 0 6px; }
.doc .updated { font: .8rem var(--f-pixel); color: var(--ink-soft); margin-bottom: 26px; }
.doc h2 { font-size: 1.15rem; margin: 30px 0 6px; }
.doc li { margin: 5px 0; }
.mail { user-select: all; }

/* footer */
.foot { background: #2a1a10; color: #d9c7a3; padding-block: 38px 54px; font-size: .88rem; }
.foot img { width: 140px; height: auto; margin-bottom: 10px; }
.foot a { color: var(--lantern); }
.foot-links { font-family: var(--f-pixel); }

@media (max-width: 860px) {
  .realms, .feature, .feature.flip, .steps, .step.f8 { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .feature.flip .shot { order: 0; }
  .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #2a1a10; padding: 8px 12px 14px; box-shadow: 0 4px 0 var(--rim-lo); }
  .menu.open { display: flex; }
  .burger { display: block; }
  .topbar .btn-sm { margin-left: auto; }
  .band { padding-block: 48px; }
}
@media (max-width: 520px) {
  .wrap, .hero-inner, .doc { padding-inline: 16px; }
  .topbar { padding-inline: 12px; gap: 8px; }
  .brand img { width: 96px; }
  .btn-big { font-size: 1rem; padding: 12px 18px; }
}

/* ---------- M53: lit, alive, sectioned ---------- */
.band { position: relative; }
.eyebrow + .title { margin-top: 4px; }
.hero { min-height: min(86vh, 860px); display: grid; place-items: center; }
.hero-media { position: absolute; inset: 0; background: #1b2330 url(video/plaza.jpg) center / cover no-repeat; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, rgba(14, 18, 28, .15), rgba(14, 18, 28, .62) 70%), linear-gradient(180deg, transparent 55%, rgba(18, 12, 8, .9)); }
.glow { position: absolute; inset: auto 0 0 0; height: 45%; background: radial-gradient(60% 80% at 50% 100%, rgba(255, 196, 92, .28), transparent 70%); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; }
.hero-logo { animation: breathe 6s ease-in-out infinite; }
@keyframes breathe { 50% { transform: translateY(-5px); filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .35)) drop-shadow(0 0 22px rgba(255, 200, 100, .35)); } }
.hero .badges { margin: 22px 0 0; }
.scroll-cue { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 2; width: 26px; height: 40px; border: 3px solid #f6e3bd; border-radius: 14px; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; background: var(--lantern); animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* fireflies and drifting leaves: spawned by site.js, none when motion is reduced */
.motes { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.mote { position: absolute; width: 4px; height: 4px; background: #ffe08a; box-shadow: 0 0 6px 2px rgba(255, 214, 110, .75); animation: float var(--d, 9s) ease-in-out infinite, blink var(--b, 3s) ease-in-out infinite; opacity: 0; }
.mote.leaf { width: 6px; height: 6px; background: #8fd24a; box-shadow: 2px 2px 0 #4d8a28; animation: fall var(--d, 12s) linear infinite; opacity: .9; }
@keyframes float { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(18px, -26px); } 66% { transform: translate(-14px, -10px); } }
@keyframes blink { 0%, 100% { opacity: 0; } 40%, 60% { opacity: 1; } }
@keyframes fall { 0% { transform: translate(0, -40px) rotate(0); } 100% { transform: translate(120px, 110vh) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .motes, .scroll-cue span { display: none; } .hero-logo { animation: none; } }

/* intro */
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 44px; align-items: center; }
.tilt { transform: rotate(-1.2deg); transition: transform .3s; }
.tilt:hover { transform: rotate(0) scale(1.01); }

/* features */
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; margin-top: 18px; }
.feat { padding: 18px 18px 14px; transition: transform .2s, box-shadow .2s; }
.feat:hover { transform: translateY(-5px); box-shadow: 0 0 0 3px var(--outline), inset 0 0 0 4px var(--rim-hi), inset 0 0 0 7px var(--outline), 7px 11px 0 3px var(--shadow), 0 0 26px rgba(255, 200, 100, .35); }
.feat img { width: 48px; height: 48px; image-rendering: pixelated; background: radial-gradient(circle, rgba(255, 207, 90, .45), transparent 70%); margin-bottom: 6px; }
.feat h3 { font-size: 1.05rem; margin: 2px 0 6px; }
.feat p { font-size: .9rem; color: var(--ink-soft); margin: 0; }

/* realms */
.realm-tabs { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.realm-tab { gap: 10px; background: var(--night-2); color: var(--night-ink); box-shadow: 0 0 0 3px var(--outline), inset 0 -4px 0 #141b26, 0 4px 0 3px var(--outline); }
.realm-tab:hover { background: #2e3b52; color: var(--night-ink); }
.realm-tab img { image-rendering: pixelated; box-shadow: 0 0 0 2px var(--outline); }
.realm-tab[aria-selected="true"] { background: var(--rim); color: #2a1a10; box-shadow: 0 0 0 3px var(--outline), inset 0 4px 0 var(--rim-hi), inset 0 -5px 0 var(--rim-lo), 0 5px 0 3px var(--outline), 0 0 22px rgba(255, 200, 100, .4); }
.realm { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; padding: 18px; animation: show .35s ease-out; }
@keyframes show { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .realm { animation: none; } .tilt, .feat { transition: none; } }
.realm-text h3 { font-size: 1.45rem; margin: 4px 0 10px; }
.points { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.points li { padding-left: 24px; position: relative; font-size: .95rem; color: var(--ink-soft); }
.points li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 10px; background: var(--lantern); box-shadow: 0 0 8px rgba(255, 207, 90, .8); }
.points b { color: var(--ink); }
.realm-thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.realm-thumbs img { image-rendering: pixelated; box-shadow: 0 0 0 3px var(--outline); }

/* video players */
.clip { position: relative; aspect-ratio: 16 / 9; background: #111; box-shadow: 0 0 0 3px var(--outline); overflow: hidden; }
.clip video, .clip img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; display: block; }
.clip .soon { position: absolute; left: 10px; bottom: 10px; font: .75rem var(--f-pixel); padding: 3px 8px; background: rgba(20, 14, 8, .82); color: var(--lantern); box-shadow: 0 0 0 2px var(--lantern); }
.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.videos .vcard:first-child { grid-column: span 2; grid-row: span 2; }
.vcard { margin: 0; padding: 7px; }
.vcard figcaption { font: .9rem var(--f-pixel); padding: 10px 6px 4px; }

/* three steps */
.steps3 { list-style: none; padding: 0; margin: 10px 0 30px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps3 li { padding: 26px 22px 18px; position: relative; }
.steps3 .num { position: absolute; top: -18px; left: 18px; width: 40px; height: 40px; display: grid; place-items: center; font: 1.3rem var(--f-pixel); background: var(--lantern); color: #2a1a10; box-shadow: 0 0 0 3px var(--outline), 0 0 18px rgba(255, 207, 90, .55); }
.steps3 h3 { margin-top: 10px; }
.steps3 p { font-size: .93rem; color: var(--ink-soft); }
.steps3 .btn { margin-top: 6px; }
.steps3 .cta-note { color: var(--night-soft); text-shadow: none; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 24px; }
.req { padding: 20px 22px 16px; }
.req ul { padding-left: 1.2em; margin: 0; }
.req li { margin: 5px 0; font-size: .93rem; }
.req.f8 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 20px; align-items: start; }
.req.f8 h3 { grid-column: 1 / -1; }
.req.f8 p { font-size: .93rem; margin: 0; }
.req.f8 img { image-rendering: pixelated; box-shadow: 0 0 0 3px var(--outline); }

/* community */
.community { background: linear-gradient(135deg, #2b2a5c, #4b3a7c 55%, #2a1a10); }
.discord-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px 34px; }
.discord-card .title { margin-bottom: 8px; }
.discord-card p { margin: 0; color: var(--ink-soft); max-width: 56ch; }
.discord-card .btn { flex: none; font-size: 1.3rem; padding: 18px 34px; }

/* faq */
.faq { display: grid; gap: 14px; }
.faq details { padding: 4px 18px; }
.faq summary { cursor: pointer; font: 1rem var(--f-pixel); padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--rim-lo); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin: 0 0 14px; color: var(--ink-soft); }

/* footer */
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 30px; align-items: start; }
.foot-grid .foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot-grid .fine { grid-column: 1 / -1; font-size: .8rem; opacity: .8; margin: 10px 0 0; }

@media (max-width: 1000px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .intro-grid, .realm, .steps3, .req-row, .req.f8, .videos, .foot-grid { grid-template-columns: minmax(0, 1fr); }
  .videos .vcard:first-child { grid-column: auto; grid-row: auto; }
  .steps3 { gap: 34px; }
  .discord-card { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .hero { min-height: 0; }
  .scroll-cue { display: none; }
}
@media (max-width: 520px) { .features { grid-template-columns: minmax(0, 1fr); } .discord-card .btn { width: 100%; } }
.hero-media::after { background: radial-gradient(120% 90% at 50% 40%, rgba(14, 18, 28, .38), rgba(14, 18, 28, .72) 70%), linear-gradient(180deg, rgba(14, 18, 28, .35), transparent 30%, transparent 55%, rgba(18, 12, 8, .92)); }
.hero-tag { text-shadow: 0 2px 0 rgba(0, 0, 0, .75), 0 0 14px rgba(0, 0, 0, .6); }
@media (max-width: 860px) { .hero-media::after { background: rgba(14, 18, 28, .7); } }
.realm-thumbs img, .req.f8 img, .feat img { height: auto; }
.videos .vcard:first-child { grid-column: auto; grid-row: auto; }
.title { align-items: flex-start; }
.title::before { margin-top: .32em; }
.realm-media { display: grid; gap: 12px; align-content: start; }

/* ---------- M53 fixes: bigger body text, HUD-free hero, NV3's decor (assets/art, whole-number scales only) ---------- */
body { font-size: 17.5px; }
.lead, .ftext p, .feat p, .points li, .steps3 p, .req li, .req.f8 p, .faq details p, .discord-card p { font-size: 1rem; }
.lead { max-width: 70ch; }
.hero-tag { font-size: clamp(1.1rem, 2vw, 1.32rem); }
.hero-media { background: #1b2330 url(img/shots/hero_meowmont.png) center 40% / 1920px auto repeat-x; image-rendering: pixelated; filter: blur(1.5px) saturate(1.05); transform: scale(1.02); }
@media (max-width: 960px) { .hero-media { background-size: 960px auto; } }
.hero-media::after { background: radial-gradient(70% 60% at 50% 42%, rgba(14, 18, 28, .55), rgba(14, 18, 28, .78) 75%), linear-gradient(180deg, rgba(14, 18, 28, .4), transparent 30%, transparent 60%, rgba(18, 12, 8, .92)); }
.intro-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }

/* 9-slice frames: x1 art, slice 16, drawn at 2x (border 32) */
.card9 { border: 32px solid transparent; border-image: url(assets/art/x1/frame_card.png) 16 fill round; image-rendering: pixelated; background: none; box-shadow: none; padding: 0; filter: drop-shadow(5px 6px 0 var(--shadow)); }
.wood9 { border: 32px solid transparent; border-image: url(assets/art/x1/frame_wood.png) 16 round; image-rendering: pixelated; background: var(--night-2); box-shadow: none; padding: 6px; filter: drop-shadow(6px 7px 0 rgba(0, 0, 0, .5)); }
.card9, .card9 h3, .card9 h2 { color: #2b1c10; }
.card9 p, .card9 .lead { color: #5a4530; }

/* feature cards: big icon, one-line title, two short lines */
.features { gap: 18px; }
.feat.card9 { position: relative; text-align: center; transition: transform .2s; }
.feat.card9:hover { transform: translateY(-6px); filter: drop-shadow(5px 10px 0 var(--shadow)) drop-shadow(0 0 16px rgba(255, 200, 100, .45)); }
.feat.card9 img { width: 64px; height: 64px; margin: -6px auto 6px; background: radial-gradient(circle, rgba(255, 207, 90, .5), transparent 68%); }
.feat.card9 h3 { font-size: 1.08rem; margin: 0 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat.card9 p { font-size: .95rem; margin: 0; line-height: 1.5; }
.stretch { position: absolute; inset: -32px; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .feat.card9 { transition: none; } }

/* section dividers: NV3's lantern vine (Cat) and snow rope with mine lamps (Dog), at 3x */
.divider { height: 102px; margin: -51px 0; position: relative; z-index: 3; background: url(assets/art/divider_cat.png) center / auto 102px repeat-x; image-rendering: pixelated; pointer-events: none; }
.divider-dog { height: 90px; margin: -45px 0; background-image: url(assets/art/divider_dog.png); background-size: auto 90px; }
@media (max-width: 860px) { .divider { height: 68px; margin: -34px 0; background-size: auto 68px; } .divider-dog { height: 60px; margin: -30px 0; background-size: auto 60px; } }

/* realm panels: the waving cat and dog (two frames, 0.4 s each), at 2x */
.realm.wood9 { background: var(--night-2); }
.greet { width: 96px; height: 128px; float: right; margin: -8px 0 4px 12px; background: url(assets/art/x1/greet_cat_0.png) center / 96px 128px no-repeat; image-rendering: pixelated; animation: wave-cat .8s steps(1) infinite; }
.greet-dog { background-image: url(assets/art/x1/greet_dog_0.png); animation-name: wave-dog; }
@keyframes wave-cat { 0% { background-image: url(assets/art/x1/greet_cat_0.png); } 50% { background-image: url(assets/art/x1/greet_cat_1.png); } }
@keyframes wave-dog { 0% { background-image: url(assets/art/x1/greet_dog_0.png); } 50% { background-image: url(assets/art/x1/greet_dog_1.png); } }
@media (prefers-reduced-motion: reduce) { .greet { animation: none; } }

/* sprite motes */
.mote, .mote.leaf { background: center / contain no-repeat; box-shadow: none; image-rendering: pixelated; }
.mote.fly { width: 16px; height: 16px; filter: drop-shadow(0 0 4px rgba(255, 214, 110, .9)); }
.mote.leaf { width: 20px; height: 20px; animation: fall var(--d, 12s) linear infinite; opacity: .95; }
.mote.snow { width: 12px; height: 12px; animation: snowfall var(--d, 12s) linear infinite; opacity: .95; }
@keyframes snowfall { 0% { transform: translate(0, -20px); } 50% { transform: translate(14px, 55vh); } 100% { transform: translate(-6px, 110vh); } }
.snow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .snow { display: none; } }

/* community: NV3's sunset with the wooden Discord sign, at 3x */
.community { background: #2b2a5c; overflow: hidden; }
.community-art { position: absolute; inset: 0; background: url(assets/art/community_bg.png) center bottom / 960px 288px repeat-x, linear-gradient(#e9a36a, #5c3f73 60%, #2d3b2a); image-rendering: pixelated; opacity: .95; }
.community .wrap { position: relative; z-index: 1; }
.discord-card.card9 { max-width: 760px; }
.discord-card .btn img { width: 48px; height: 48px; image-rendering: pixelated; margin-right: 4px; }
@media (max-width: 860px) { .greet { width: 72px; height: 96px; background-size: 72px 96px; } }
.feat.card9 h3 { white-space: normal; overflow: visible; text-overflow: clip; min-height: 2.5em; display: flex; align-items: center; justify-content: center; line-height: 1.25; }
.community-art { background: url(assets/art/community_bg.png) right -40px bottom / 960px 288px no-repeat, linear-gradient(#e9a36a, #b0707a 38%, #5c3f73 62%, #2d3b2a 80%); }
.community { min-height: 360px; display: flex; align-items: center; }
.community .wrap { width: 100%; }
.discord-card.card9 { max-width: 640px; flex-direction: column; align-items: flex-start; gap: 18px; }
.discord-card .title { font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
@media (max-width: 860px) { .community-art { background-position: center bottom, 0 0; opacity: .6; } }
@media (max-width: 860px) { .intro-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 1100px) { .menu { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: #2a1a10; padding: 8px 12px 14px; box-shadow: 0 4px 0 var(--rim-lo); } .menu.open { display: flex; } .burger { display: block; } .topbar .btn-sm { margin-left: auto; } }
.menu a { white-space: nowrap; }
.tag-soon { display: inline-block; font: .7rem var(--f-pixel); padding: 1px 6px; margin-left: 6px; color: #2a1a10; background: var(--lantern); box-shadow: 0 0 0 2px var(--outline); vertical-align: 1px; }

/* M60: a still hero - one HUD-free game picture at exactly 2x (3x on very wide screens), no zoom, pan, blur or video */
.hero-media { background: #1b2330 url(img/shots/hero_meowmont.png) center center / 1920px 1080px no-repeat; image-rendering: pixelated; filter: none; transform: none; }
@media (min-width: 1921px) { .hero-media { background-size: 2880px 1620px; } }
@media (max-width: 960px) { .hero-media { background-size: 1920px 1080px; } }
.hero-media::after { background: linear-gradient(180deg, rgba(14, 18, 28, .25) 0%, rgba(14, 18, 28, .35) 30%, rgba(14, 18, 28, .72) 62%, rgba(18, 12, 8, .9) 100%); }
.hero-logo { animation: none; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .45)); }
.hero { min-height: 0; }
.hero-inner { padding-block: clamp(56px, 9vw, 118px) 64px; }
.hero .motes .mote { will-change: transform, opacity; }

/* Phóng to ảnh, video và thẻ tính năng (khung xem lớn) */
.zw { display: block; position: relative; }
.zw img { display: block; }
.zoomable { cursor: zoom-in; outline-offset: 4px; }
.zoomable:focus-visible { outline: 3px solid var(--lantern); }
.zw::after, .clip.zoomable::after {
  content: "+ Phóng to"; position: absolute; right: 8px; top: 8px; z-index: 2; pointer-events: none;
  font: .75rem var(--f-pixel); padding: 4px 8px; background: rgba(20, 14, 8, .85); color: var(--lantern); box-shadow: 0 0 0 2px var(--lantern);
  opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s;
}
.clip.zoomable::after { content: "Xem video lớn"; }
.zw:hover::after, .zw:focus-within::after, .clip.zoomable:hover::after, .clip.zoomable:focus-visible::after { opacity: 1; transform: none; }
.zw:hover img, .clip.zoomable:hover video, .clip.zoomable:hover img { filter: brightness(1.08); }
@media (hover: none) { .zw::after, .clip.zoomable::after { opacity: .9; transform: none; } }

.feat.card9[data-media] { cursor: pointer; }
.feat.card9[data-media]:focus-visible { outline: 3px solid var(--lantern); outline-offset: 6px; }
.feat-peek {
  position: absolute; left: -10px; right: -10px; top: -14px; aspect-ratio: 16 / 9; z-index: 2; pointer-events: none;
  background: #111 center / cover no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 3px var(--outline), 4px 5px 0 2px var(--shadow);
  opacity: 0; transform: scale(.92); transition: opacity .18s, transform .18s;
}
.feat.card9[data-media]:hover .feat-peek, .feat.card9[data-media]:focus-visible .feat-peek { opacity: 1; transform: none; }
.feat-more-hint { display: inline-block; margin-top: 10px; font: .8rem var(--f-pixel); color: #8a4b12; border-bottom: 2px solid currentColor; }
@media (hover: none) { .feat-peek { display: none; } }

html.lb-open { overflow: hidden; }
.lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 8, 6, .97); color: #f3e7c9; }
.lb::backdrop { background: rgba(10, 8, 6, .7); }
.lb[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto auto; }
.lb-stage { position: relative; display: grid; place-items: center; overflow: auto; padding: 56px 64px 12px; }
.lb-stage img, .lb-stage video { image-rendering: pixelated; box-shadow: 0 0 0 3px #000, 0 0 0 6px var(--rim); background: #000; display: block; }
.lb-stage video { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.lb-stage img { cursor: zoom-in; }
.lb-stage.zoomed { place-items: start; }
.lb-stage.zoomed img { cursor: zoom-out; max-width: none; max-height: none; margin: auto; }
.lb-bar { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; padding: 6px 64px 4px; max-width: 1200px; width: 100%; margin: 0 auto; }
.lb-text b { font: 1.1rem var(--f-pixel); color: var(--lantern); }
.lb-text p { margin: 4px 0 0; font-size: 1rem; line-height: 1.55; color: #e6d9bb; max-width: 820px; }
.lb-text p:empty { display: none; }
.lb-count { font: .85rem var(--f-pixel); color: #b7ab90; white-space: nowrap; padding-top: 3px; }
.lb-strip { display: flex; gap: 10px; justify-content: center; padding: 8px 16px 16px; overflow-x: auto; }
.lb-strip:empty { display: none; }
.lb-strip button { position: relative; flex: 0 0 auto; width: 112px; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #000 center / cover no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 2px #000, 0 0 0 4px #5a4530; cursor: pointer; opacity: .65; }
.lb-strip button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px #000, 0 0 0 4px var(--lantern); }
.lb-strip button:hover { opacity: 1; }
.lb-strip button.is-video::after { content: "video"; position: absolute; left: 4px; bottom: 4px; font: .65rem var(--f-pixel); padding: 1px 5px; background: rgba(0, 0, 0, .8); color: var(--lantern); }
.lb-btn { position: absolute; z-index: 3; width: 46px; height: 46px; border: 0; padding: 0; cursor: pointer; font: 1.1rem var(--f-body); color: #2b1c10; background: var(--lantern); box-shadow: 0 0 0 3px #000, inset -3px -3px 0 rgba(0, 0, 0, .25); }
.lb-btn:hover { background: #ffe08a; }
.lb-btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.lb-close { top: 12px; right: 12px; }
.lb-prev, .lb-next { top: calc(50% - 60px); }
.lb-prev { left: 10px; } .lb-next { right: 10px; }
.lb-btn[hidden] { display: none !important; }
@media (max-width: 700px) {
  .lb-stage { padding: 58px 8px 8px; }
  .lb-bar { padding: 4px 14px; flex-direction: column; gap: 2px; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; position: fixed; }
  .lb-strip { padding-bottom: 66px; justify-content: flex-start; }
  .lb-strip button { width: 84px; }
}
.feat-peek::after { content: "Bấm để xem lớn"; position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 8px; font: .8rem var(--f-pixel); color: var(--lantern); background: linear-gradient(transparent, rgba(10, 8, 6, .9)); text-align: center; }
