/* Tu Tiên Ký homepage: the game's light parchment kit (paper, gold trim, jade action) over the login key art. Mobile first. */
:root {
	--paper: #fcf5e6; --paper-2: #f3e6ca; --paper-3: #e9d8b6; --cream: #fffbf1;
	--ink: #3a2616; --body: #5a4733; --muted: #6e5d4b; --line: #dec9a2;
	--gold: #c9a062; --gold-d: #8c6a34; --jade: #2e7f5e; --jade-hi: #3f9b74; --jade-d: #23664b;
	--night: #10232a; --zalo: #0068ff;
	--f: "Baloo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--r: 14px; --ease: cubic-bezier(.2, .7, .2, 1);
	--shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 18px 40px -22px rgba(58, 38, 22, .45);
	color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--f); color: var(--body); overflow-x: hidden;
	background: var(--paper) radial-gradient(120% 60% at 50% 0, var(--cream), transparent 70%) no-repeat; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--jade-d); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold-d); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; font-weight: 700; }
ul, ol { margin: 0; padding: 0; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--ink); color: var(--cream); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 26px;
	font: 700 18px/1 var(--f); color: #fff; text-decoration: none; border-radius: 12px; cursor: pointer;
	background: linear-gradient(var(--jade-hi), var(--jade) 55%, var(--jade-d)); border: 2px solid var(--jade-d);
	box-shadow: 0 2px 0 rgba(255, 255, 255, .35) inset, 0 4px 0 #1b4f3a, 0 12px 24px -10px rgba(35, 102, 75, .7);
	text-shadow: 0 1px 0 rgba(0, 0, 0, .25); transition: transform .15s var(--ease), filter .15s; }
.btn:hover { filter: brightness(1.07); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset, 0 2px 0 #1b4f3a; }
.btn-big { min-height: 58px; padding: 0 40px; font-size: 22px; letter-spacing: .02em; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 16px; border-radius: 10px; box-shadow: 0 3px 0 #1b4f3a; }
.btn-ghost { color: var(--ink); text-shadow: none; background: var(--cream); border-color: var(--gold);
	box-shadow: 0 4px 0 var(--gold-d), 0 10px 20px -12px rgba(58, 38, 22, .5); }
.btn-zalo { background: var(--zalo); border-color: #0050c4; box-shadow: 0 3px 0 #003c94; }

/* header */
.bar { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .25s, box-shadow .25s; }
.bar-in { display: flex; align-items: center; gap: 12px; height: 60px; }
.bar.scrolled, .bar.open { background: rgba(252, 245, 230, .94); box-shadow: 0 1px 0 var(--line), 0 8px 20px -14px rgba(58, 38, 22, .5);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.brand { margin-right: auto; display: block; }
.brand img { width: 117px; image-rendering: pixelated; filter: drop-shadow(0 1px 0 rgba(58, 38, 22, .35)); }
.nav { display: none; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: 6px 10px; border-radius: 8px; }
.nav a:hover { background: var(--paper-2); }
.lang { font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; padding: 6px 10px; border: 1.5px solid var(--gold);
	border-radius: 8px; background: rgba(255, 251, 241, .8); }
.bar .btn-sm { display: none; }
.menu-btn { width: 44px; height: 44px; border: 1.5px solid var(--gold); border-radius: 10px; background: rgba(255, 251, 241, .85); cursor: pointer;
	display: grid; place-items: center; padding: 0; }
.menu-btn span, .menu-btn span::before, .menu-btn span::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px;
	position: relative; transition: transform .2s; content: ""; }
.menu-btn span::before { position: absolute; top: -6px; } .menu-btn span::after { position: absolute; top: 6px; }
.bar.open .menu-btn span { background: transparent; }
.bar.open .menu-btn span::before { transform: translateY(6px) rotate(45deg); }
.bar.open .menu-btn span::after { transform: translateY(-6px) rotate(-45deg); }
.bar.open .nav { display: grid; position: absolute; top: 60px; left: 0; right: 0; padding: 8px 16px 16px; background: rgba(252, 245, 230, .97);
	box-shadow: 0 12px 20px -14px rgba(58, 38, 22, .5); }
.bar.open .nav a { padding: 12px 8px; border-bottom: 1px solid var(--line); }
@media (min-width: 900px) {
	.nav { display: flex; gap: 4px; }
	.menu-btn { display: none; }
	.bar .btn-sm { display: inline-flex; }
	.brand { margin-right: 24px; }
	.nav { margin-right: auto; }
}

/* hero: the Diễn Võ Trường (the real game in an iframe) right under the header, the logo and "Chơi ngay" beside it (below it on phones) */
.hero { position: relative; display: grid; align-items: center; overflow: hidden; isolation: isolate; background: #c9d5ea; padding: 72px 0 28px; }
.hero-art, .hero-art img, .sky { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-art { z-index: -3; will-change: transform; }
.hero-art img { object-fit: cover; object-position: 50% 60%; image-rendering: auto; }
.sky { z-index: -2; image-rendering: pixelated; image-rendering: crisp-edges; pointer-events: none; }
.hero-fade { position: absolute; inset: auto 0 0; height: 16%; z-index: -1; pointer-events: none;
	background: linear-gradient(rgba(252, 245, 230, 0), rgba(252, 245, 230, .55) 55%, var(--paper)); }
.hero-in { display: grid; justify-items: center; text-align: center; gap: 12px; grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "cd" "logo" "try" "card"; }
.hero .cd { grid-area: cd; }
.logo { grid-area: logo; width: min(72vw, 300px); margin: 0; }
.hero-try { grid-area: try; width: 100%; max-width: 760px; padding: 10px; border-radius: 18px; background: rgba(252, 245, 230, .88);
	border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(255, 251, 241, .55), 0 24px 60px -24px rgba(16, 35, 42, .6); }
.try-cap { margin: 0 0 8px; font-size: 14px; line-height: 1.35; color: var(--body); }
.try-cap b { display: block; font-size: 21px; font-weight: 800; color: var(--ink); }
.scroll-card { grid-area: card; }
@media (min-width: 1000px) {
	.hero { min-height: max(640px, 100svh); padding: 84px 0 56px; }
	.hero-in { grid-template-columns: minmax(0, 390px) minmax(0, 1fr); grid-template-areas: "cd try" "logo try" "card try";
		column-gap: 40px; row-gap: 14px; align-items: center; align-content: center; }
	.hero .cd { align-self: end; }
	.logo { width: 340px; }
	.scroll-card { align-self: start; }
	.try-cap { text-align: left; margin-bottom: 10px; }
	.try-cap b { display: inline; margin-right: 6px; }
}
.logo img { width: 100%; image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(58, 38, 22, .35)) drop-shadow(0 0 18px rgba(255, 246, 220, .9)); }
.scroll-card { position: relative; width: min(100%, 560px); padding: 20px 18px 18px; border-radius: 18px;
	background: rgba(252, 245, 230, .86); border: 2px solid var(--gold); box-shadow: 0 0 0 4px rgba(255, 251, 241, .55), 0 24px 60px -24px rgba(16, 35, 42, .6);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.scroll-card::before, .scroll-card::after { content: ""; position: absolute; top: 10px; bottom: 10px; width: 6px; border-radius: 4px;
	background: linear-gradient(var(--gold), var(--gold-d)); }
.scroll-card::before { left: -5px; } .scroll-card::after { right: -5px; }
.tagline { margin: 0; font-size: clamp(24px, 6.4vw, 34px); font-weight: 800; color: var(--ink); line-height: 1.15; }
.pitch { margin: 8px auto 16px; max-width: 44ch; color: var(--body); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.actions .btn-big { flex: 1 1 220px; max-width: 300px; }
.note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 12px; }
.badge { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 10px; border-radius: 10px; text-decoration: none;
	background: #1b1b1b; color: #fff; font-weight: 700; font-size: 15px; line-height: 1.1; text-align: left; }
.badge svg { width: 20px; height: 20px; fill: #7fe0b5; }
.badge small { display: block; font-weight: 400; font-size: 11px; opacity: .85; }
.badge em { display: block; font-style: normal; font-weight: 400; font-size: 11px; color: #ffd98a; }
.badge span { display: block; }
.badge-zalo { background: var(--zalo); }
.badge-zalo b { font-size: 11px; background: #fff; color: var(--zalo); padding: 3px 5px; border-radius: 5px; }
.badge:hover { filter: brightness(1.15); }

.cd { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border-radius: 999px; font-size: 15px;
	background: rgba(255, 251, 241, .9); border: 1.5px solid var(--gold); color: var(--ink); box-shadow: 0 6px 16px -10px rgba(58, 38, 22, .6); }
.cd i { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; }
.cd.live i { background: #d1493b; animation: pulse 1.4s ease-in-out infinite; }
.cd b { font-weight: 700; }
.cd span { font-variant-numeric: tabular-nums; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(209, 73, 59, .2); } }
.scroll-cue { position: absolute; left: 50%; bottom: 20px; width: 34px; height: 52px; margin-left: -17px; border: 2px solid var(--gold-d);
	border-radius: 18px; background: rgba(255, 251, 241, .7); }
.scroll-cue span { position: absolute; left: 50%; top: 10px; width: 4px; height: 10px; margin-left: -2px; border-radius: 2px; background: var(--gold-d);
	animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 80% { transform: translateY(16px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 699px) {
	.hero .cd { font-size: 14px; }
	.scroll-card { padding: 16px 14px 14px; background: rgba(252, 245, 230, .9); }
	.pitch { font-size: 16px; margin: 6px auto 12px; }
	.scroll-cue { display: none; }
}
@media (min-width: 700px) { .scroll-card { padding: 26px 30px 22px; } .hero-fade { height: 26%; } }

/* sections */
.sec { padding: 52px 0; position: relative; }
@media (min-width: 860px) { .sec { padding: 80px 0; } }
.sec-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.eye { margin: 0 0 6px; font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-d); }
.sec-head .eye::before, .sec-head .eye::after { content: "◆"; font-size: 9px; vertical-align: 2px; margin: 0 10px; color: var(--gold); }
h2 { font-size: clamp(28px, 6vw, 42px); font-weight: 800; }
.lead { margin: 10px 0 0; font-size: 18px; }

/* features: alternating screenshot + text rows */
.feats { padding-top: 40px; }
.feat { display: grid; gap: 18px; align-items: center; margin: 0 0 48px; }
.shot { position: relative; margin: 0; padding: 6px; border-radius: var(--r); background: var(--cream); border: 2px solid var(--gold);
	box-shadow: var(--shadow); }
.shot img { border-radius: 8px; aspect-ratio: 16 / 9; object-fit: cover; width: 100%; background: var(--paper-3); }
.f-dongphu .shot img, .f-mount .shot img, .f-coop .shot img, .f-sect .shot img { image-rendering: pixelated; }
.rider { position: absolute; right: -6px; top: -40px; width: 120px !important; aspect-ratio: auto !important; background: none !important;
	image-rendering: pixelated; filter: drop-shadow(0 8px 6px rgba(58, 38, 22, .3)); animation: hover 3.2s ease-in-out infinite; }
@keyframes hover { 50% { transform: translateY(-8px); } }
.feat-txt h3 { font-size: clamp(24px, 5vw, 32px); font-weight: 800; margin-bottom: 8px; }
.feat-txt p { margin: 0 0 12px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-size: 14px; font-weight: 600; color: var(--ink); padding: 3px 12px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); }
.f-boss .tags li:first-child { background: #fbe2d2; border-color: #e9b597; }
@media (min-width: 860px) {
	.feat { grid-template-columns: 1.25fr 1fr; gap: 48px; margin-bottom: 72px; }
	.feat.flip .shot { order: 2; }
	.rider { width: 150px !important; top: -56px; right: -24px; }
}

/* Tin mới: one stack of identical cards (updates.py) plus the newcomer code; a card opens the patch-notes panel below. */
.news-sec { padding-top: 8px; }   /* the features rows already end with air above it */
.news-grid { display: grid; gap: 18px; align-items: start; }
.news-list { display: grid; gap: 12px; }
.post { display: grid; gap: 4px; width: 100%; text-align: left; padding: 14px 16px; cursor: pointer;
	font: 400 17px/1.6 var(--f); color: var(--body); background: var(--cream); border: 2px solid var(--line);
	border-radius: var(--r); box-shadow: var(--shadow); transition: transform .2s var(--ease), border-color .2s; }
.post:hover { transform: translateY(-2px); border-color: var(--gold); }
.post:active { transform: translateY(1px); }
.post-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.post-cat { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-d);
	padding: 2px 10px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); }
.post-date { font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.post-h { font-size: 20px; font-weight: 800; color: var(--ink); line-height: 1.25; }
.post-sum { font-size: 15px; line-height: 1.5; }
.news-all { margin: 14px auto 0; display: flex; width: max-content; }
/* a card about new art shows that art: the picture sits left of the words, and drops above them on a narrow phone */
.post-img { grid-template-columns: 132px 1fr; gap: 14px; align-items: start; }
.post-thumb { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--ink); }
.post-thumb img { display: block; width: 100%; height: auto; image-rendering: pixelated; }
.post-body { display: grid; gap: 4px; }
@media (max-width: 520px) { .post-img { grid-template-columns: 1fr; } }
.dvt-box { display: grid; gap: 10px; align-content: start; }
.dvt-box h3 { margin: 0; }
.dvt-box p { margin: 0; }
.dvt-shot { display: block; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: var(--ink); }
.dvt-shot img { display: block; width: 100%; height: auto; image-rendering: pixelated; transition: transform .25s var(--ease); }
.dvt-shot:hover img { transform: scale(1.03); }
.dvt-box .btn { width: max-content; }
.code-box { display: grid; gap: 10px; }
.code-box p { margin: 0; }
.code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.code { font: 800 22px/1 var(--f); letter-spacing: .1em; color: var(--ink); padding: 13px 16px; border-radius: 10px;
	background: var(--paper-2); border: 2px dashed var(--gold); user-select: all; -webkit-user-select: all; }
.code-copy { white-space: nowrap; }   /* the label swaps to "Đã chép" / the select-it line after a tap */
.code-where { font-size: 14px; color: var(--muted); }
@media (min-width: 860px) { .news-grid { grid-template-columns: 1.4fr 1fr; gap: 28px; } }
@media (min-width: 1180px) { .news-grid { grid-template-columns: 1.5fr 1fr .8fr; } }

/* realms ladder */
.realms { background: linear-gradient(var(--paper), var(--paper-2) 18%, var(--paper-2) 82%, var(--paper)); }
.ladder { list-style: none; display: grid; gap: 16px; counter-reset: s; position: relative; }
.step { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: start; padding: 18px 18px 16px;
	background: var(--cream); border: 2px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--r); box-shadow: var(--shadow); }
.gem { position: relative; display: grid; place-items: center; width: 56px; height: 56px; font-weight: 800; font-size: 19px; color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .6); z-index: 0; }
.gem::before { content: ""; position: absolute; inset: 8px; z-index: -1; border-radius: 10px; transform: rotate(45deg); border: 2px solid var(--gold-d);
	background: radial-gradient(circle at 35% 30%, #fff 0, var(--c) 45%, color-mix(in srgb, var(--c) 55%, #3a2616) 100%); }
.step h3 { font-size: 24px; font-weight: 800; }
.step .sub { margin: 0; font-size: 14px; color: var(--muted); }
.step ul { list-style: none; margin-top: 6px; display: grid; gap: 4px; font-size: 15px; }
.step em { font-style: normal; font-weight: 700; color: var(--gold-d); margin-right: 4px; }
@media (min-width: 900px) {
	.ladder { grid-template-columns: repeat(4, 1fr); align-items: end; gap: 18px; }
	.ladder::before { content: ""; position: absolute; left: 4%; right: 4%; bottom: 20px; height: 4px; border-radius: 2px;
		background: linear-gradient(90deg, #c7ad7a, #5cc7a8, #f29938, #b28cff); opacity: .5; z-index: 0; }
	.step { grid-template-columns: 1fr; text-align: center; justify-items: center; }
	.step:nth-child(1) { margin-bottom: 0; } .step:nth-child(2) { margin-bottom: 28px; }
	.step:nth-child(3) { margin-bottom: 56px; } .step:nth-child(4) { margin-bottom: 84px; }
	.step ul { justify-items: center; }
}

/* try stage (inside the hero) */
.stage { position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate; border-radius: var(--r); background: var(--night);
	border: 6px solid var(--cream); outline: 2px solid var(--gold); box-shadow: 0 30px 60px -30px rgba(16, 35, 42, .8); }
.stage-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.stage::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(70% 70% at 50% 55%, transparent 40%, rgba(16, 35, 42, .55)); }
.stage:hover .stage-poster { transform: scale(1.03); }
.stage-play { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 10px; width: 100%;
	background: none; border: 0; cursor: pointer; color: #fff; font: 800 22px/1.1 var(--f); text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.stage-play .ring { position: relative; width: 84px; height: 84px; display: grid; place-items: center; border-radius: 50%;
	background: radial-gradient(circle, var(--jade-hi), var(--jade-d) 75%); box-shadow: 0 0 0 4px var(--cream), 0 0 0 6px var(--gold), 0 0 40px rgba(63, 155, 116, .8);
	transition: transform .3s var(--ease); }
.stage-play .ring::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 2px solid rgba(255, 251, 241, .7); animation: halo 2.4s ease-out infinite; }
@keyframes halo { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.stage-play .tri { width: 0; height: 0; margin-left: 7px; border-left: 28px solid #fff; border-top: 17px solid transparent; border-bottom: 17px solid transparent; }
.stage-play:hover .ring { transform: scale(1.08); }
.stage iframe { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; border: 0; background: var(--night); }
.stage-bar { position: absolute; z-index: 4; bottom: 6px; left: 50%; transform: translateX(-50%); display: none; gap: 6px; }
.stage-bar button { font: 700 14px/1 var(--f); color: var(--ink); background: var(--cream); border: 1.5px solid var(--gold); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.stage.live .stage-bar { display: flex; }
.stage.live .stage-play, .stage.live .stage-poster { visibility: hidden; }
.stage-rotate { display: none; }
.stage.full { position: fixed; inset: 0; z-index: 100; aspect-ratio: auto; border: 0; outline: 0; border-radius: 0; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
@media (orientation: portrait) {
	.stage.full .stage-rotate { position: absolute; z-index: 5; left: 50%; bottom: 64px; transform: translateX(-50%); display: block; width: max-content; max-width: 90vw;
		font: 700 15px var(--f); color: var(--ink); background: var(--cream); padding: 8px 14px; border-radius: 8px; text-align: center; }
}
@media (max-width: 560px) {
	.stage-play { gap: 6px; font-size: 18px; }
	.stage-play .ring { width: 60px; height: 60px; }
	.stage-play .tri { margin-left: 5px; border-left-width: 20px; border-top-width: 12px; border-bottom-width: 12px; }
}

/* community */
.com-grid { display: grid; gap: 18px; }
.panel { padding: 22px 20px; background: var(--cream); border: 2px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.panel h3 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.panel h3.mt { margin-top: 24px; }
.panel p { margin: 0 0 10px; }
.steps { padding-left: 22px; display: grid; gap: 8px; margin-bottom: 16px; }
.steps a { font-weight: 600; word-break: break-word; }
@media (min-width: 860px) { .com-grid { grid-template-columns: 1.3fr 1fr; } }
.finale { text-align: center; margin-top: 56px; display: grid; justify-items: center; gap: 18px; }
.quote { margin: 0; font-size: clamp(22px, 5vw, 30px); font-weight: 700; color: var(--ink); }
.quote::before, .quote::after { content: "—"; color: var(--gold); margin: 0 12px; }

/* footer */
.foot { background: var(--night); color: #d9ccb4; padding: 48px 0 28px; margin-top: 40px; border-top: 4px solid var(--gold); }
.foot-in { display: grid; gap: 28px; grid-template-columns: 1fr 1fr; }
.foot-brand { grid-column: 1 / -1; }
.foot-brand img { width: 176px; image-rendering: pixelated; }
.foot-brand p { margin: 8px 0; }
.foot .lang { background: transparent; color: #f4e8cb; }
.foot h2 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.foot ul { list-style: none; display: grid; gap: 6px; }
.foot a { color: #f4e8cb; text-decoration: none; overflow-wrap: anywhere; }
.foot a:hover { color: #fff; text-decoration: underline; }
.copy { grid-column: 1 / -1; margin: 0; padding-top: 18px; border-top: 1px solid rgba(222, 201, 162, .2); font-size: 14px; color: #b9ab93; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; } .foot-brand { grid-column: auto; } }

.zalo-float { position: fixed; right: 14px; bottom: 14px; z-index: 40; min-height: 52px; padding: 0 16px; border-radius: 26px; display: flex; gap: 8px; align-items: center;
	background: var(--zalo); color: #fff; font: 800 14px/1 var(--f); text-decoration: none; box-shadow: 0 8px 20px -6px rgba(0, 60, 148, .7); border: 2px solid #0050c4; }
.zalo-float b { background: #fff; color: var(--zalo); border-radius: 6px; padding: 3px 6px; font-size: 12px; }
.panel-zalo { border-color: var(--zalo); box-shadow: 0 0 0 1px var(--zalo) inset, 0 10px 30px -18px rgba(0, 104, 255, .8); }

/* reveal on scroll (only with JS; nothing hides without it) */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation: none !important; transition: none !important; }
	.js [data-reveal] { opacity: 1; transform: none; }
}
.try-dl { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 12px; }
.try-apk { display: flex; width: max-content; align-items: center; gap: 8px; }
.try-apk svg { width: 18px; height: 18px; fill: currentColor; }
.try-apk small { font-weight: 400; opacity: .8; }

/* Patch notes (updates.py): a corner button bottom-left — the Zalo float keeps the right — and a parchment sheet over the page. */
.js .news-float { opacity: 0; pointer-events: none; transition: opacity .3s; }
.js .scrolled-page .news-float, .js .news-open .news-float { opacity: 1; pointer-events: auto; }
.news-float { position: fixed; left: 14px; bottom: 14px; z-index: 40; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; gap: 7px;
	font: 700 15px/1 var(--f); color: var(--ink); cursor: pointer; border-radius: 22px; border: 2px solid var(--gold-d);
	background: linear-gradient(var(--cream), var(--paper-2)); box-shadow: 0 8px 20px -8px rgba(58, 38, 22, .55); }
.news-float span { color: var(--gold-d); font-size: 15px; }
.news-dot { width: 9px; height: 9px; border-radius: 50%; background: #c0392b; border: 1px solid #fff; display: none; }
.news-unread .news-dot { display: block; }
.news[hidden] { display: none; }   /* author display wins over the UA [hidden] rule: say it here or the sheet never closes */
.news { position: fixed; inset: 0; z-index: 60; display: grid; place-items: end start; padding: 14px; background: rgba(28, 18, 10, .55); }
.news-card { width: min(420px, 100%); max-height: min(72vh, 560px); display: flex; flex-direction: column; overflow: hidden;
	background: var(--paper) linear-gradient(var(--cream), transparent 180px) no-repeat; border: 2px solid var(--gold); border-radius: var(--r);
	box-shadow: var(--shadow), 0 24px 50px -20px rgba(58, 38, 22, .6); }
.news-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 0; }
.news-card h2 { font-size: 20px; }
.news-x { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--cream); color: var(--ink);
	font: 700 20px/1 var(--f); cursor: pointer; }
.news-lead { margin: 4px 14px 10px; font-size: 14px; color: var(--muted); }
.news-body { overflow: auto; padding: 0 14px 14px; -webkit-overflow-scrolling: touch; }
.news-item + .news-item { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.news-item h3 { font-size: 16px; }
.news-date { margin: 1px 0 7px; font: 700 13px/1 var(--f); color: var(--gold-d); }
.news-item ul { list-style: none; display: grid; gap: 8px; }
.news-item li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.5; }
.news-item li::before { content: "·"; position: absolute; left: 4px; top: -1px; color: var(--gold-d); font-weight: 800; }
@media (min-width: 760px) { .news { place-items: center; } .news-card { width: min(520px, 100%); max-height: 78vh; } }

/* First visit only (js sets .cue for a few seconds): a hand points at the Zalo button and it says what it is for.
   Nothing moves for a reader who asked for less motion; the hand simply sits there. */
.zalo-hand { width: 18px; height: 18px; fill: #fff; opacity: 0; width: 0; transition: opacity .25s, width .25s; }
.zalo-float.cue { padding-right: 18px; box-shadow: 0 0 0 4px rgba(0, 104, 255, .35), 0 10px 26px -6px rgba(0, 60, 148, .8); }
.zalo-float.cue .zalo-hand { opacity: 1; width: 18px; animation: zalo-nudge 1.1s ease-in-out 4; }
@keyframes zalo-nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(5px); } }
@media (prefers-reduced-motion: reduce) { .zalo-float.cue .zalo-hand { animation: none; } }

/* A release in the Thiên Cơ Bảng: a picture of the change, the numbers as a table, four short lines. */
.ba { margin: 10px 0 0; display: grid; gap: 6px; }
.ba figcaption { font-size: 13px; font-weight: 700; color: var(--muted); }
.ba img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line);
	background: var(--ink); image-rendering: pixelated; }
.ba-tags { display: flex; gap: 8px; justify-content: space-around; max-width: 70%; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ba-tags b { padding: 2px 8px; border-radius: 999px; background: var(--paper-2); border: 1px solid var(--line); color: var(--muted); }
.ba-tags b.now { color: var(--gold-d); border-color: var(--gold); }
.chg { width: 100%; margin: 12px 0 0; border-collapse: collapse; font-size: 14px; }
.chg th, .chg td { padding: 6px 8px; text-align: left; border-bottom: 1px solid var(--line); }
.chg thead th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.chg tbody th { font-weight: 600; color: var(--body); }
.chg td { color: var(--muted); font-variant-numeric: tabular-nums; }
.chg td.to { color: var(--ink); font-weight: 800; }
