/* onlysword.net · the homepage is the climb (surface brief: .impeccable/surfaces/server-deploy-aws-site-index-html.md).
   Look = the game's own: Theme.cs palette, UIKit sprites as 9-slices, the posters' gold title recipe (make_posters.py). */
@font-face { font-family: "Baloo 2"; src: url(/assets/fonts/baloo2-800.woff?v=0dbe1f73) format("woff"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Baloo 2"; src: url(/assets/fonts/baloo2-700.woff?v=8ad1e5f6) format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Be Vietnam Pro"; src: url(/assets/fonts/bevietnampro-400.woff?v=daa826fa) format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Serif"; src: url(/assets/fonts/notoserif-700.woff?v=54805117) format("woff"); font-weight: 700; font-display: swap; }

:root {
  --bg: #151826; --panel: #232842; --panel-dark: #1a1e33;
  --ink: #1e1a2a; --gold: #f4c95d; --gold-dark: #b9852a; --gold-hi: #ffe28c; --gold-face: #ffdc5c;
  --jade: #35c99b;
  --text: #fff; --text-dim: #c2c9e4;
  --navy: #161a4e; --navy-deep: #0c0e2e; --brown: #6e3400;
  --display: "Baloo 2", "Be Vietnam Pro", system-ui, sans-serif;
  --body: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Noto Serif", Georgia, serif;
  --gutter: clamp(16px, 4vw, 56px);
  --railw: 0px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
@media (min-width: 1100px) { :root { --railw: 84px; } }
@media (min-width: 1440px) { :root { --railw: 204px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.65 var(--body); font-synthesis: none;
  -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .2em; }
h2, h3, p, figure, ol, ul { margin: 0; }
p, .note { text-wrap: pretty; }
::selection { background: var(--gold); color: var(--ink); }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: var(--gold-dark) var(--panel-dark); }
::-webkit-scrollbar { width: 12px; height: 10px; } ::-webkit-scrollbar-track { background: var(--panel-dark); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--gold), var(--gold-dark)); border-radius: 8px; border: 3px solid var(--panel-dark); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 10px; background: var(--gold); color: var(--ink);
  font: 700 1rem/1 var(--display); text-decoration: none; transition: top .2s; }
.skip:focus { top: 12px; }

/* ---------- the big gold title: navy outline + 3D side + drop shadow, brown inner line, gold gradient ---------- */
.gold { position: relative; isolation: isolate; font: 800 var(--fs, 3rem)/1.06 var(--display); letter-spacing: -.005em; text-transform: uppercase;
  color: var(--gold-face); -webkit-text-stroke: .19em var(--navy); text-wrap: balance; overflow-wrap: anywhere;
  filter: drop-shadow(0 .055em 0 var(--navy-deep)) drop-shadow(0 .11em .07em rgba(0, 0, 0, .45)) drop-shadow(0 0 .3em rgba(255, 236, 168, .25)); }
.gold::before, .gold::after { content: attr(data-text); content: attr(data-text) / ""; position: absolute; inset: 0; pointer-events: none; }
.gold::before { color: var(--brown); -webkit-text-stroke: .06em var(--brown); }
.gold::after { -webkit-text-stroke: 0; color: transparent; background: linear-gradient(180deg, #fffad6 0%, #ffdc5c 38%, #f7b228 62%, #d6740a 100%);
  -webkit-background-clip: text; background-clip: text; }
h2.gold { --fs: clamp(1.95rem, 3.3vw, 3.05rem); margin-bottom: 18px; }

/* the red ribbon: header_ribbon, 136 px caps */
.ribbon { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 60px;
  border: solid transparent; border-width: 0 60px; border-image: url(/assets/ui/header_ribbon.webp?v=dcf99688) 0 136 fill / 0 60px stretch;
  font: 700 1rem/1 var(--serif); letter-spacing: .06em; color: var(--gold-hi); text-transform: uppercase;
  -webkit-text-stroke: .1em #3c0a00; paint-order: stroke fill; white-space: nowrap; }
.ribbon > span { margin: 0 -38px; position: relative; top: 1px; }

/* buttons: btn_gold / btn_jade, 96 px caps */
.btn { --h: 62px; display: inline-flex; align-items: center; justify-content: center; gap: .5em; height: var(--h); padding: 0 calc(var(--h) * .45);
  border: solid transparent; border-width: 0 calc(var(--h) * .82); text-decoration: none; cursor: pointer; background: none;
  font: 800 1.12rem/1 var(--display); letter-spacing: .01em; text-transform: uppercase; white-space: nowrap;
  transition: transform .18s var(--ease-out), filter .18s; }
.btn > span { margin: 0 calc(var(--h) * -.6); position: relative; top: 1px; display: inline-flex; align-items: center; gap: .45em; }
.btn:hover { transform: translateY(-2px); filter: brightness(1.07) saturate(1.05); }
.btn:active { transform: translateY(1px) scale(.98); filter: brightness(.95); }
.btn-gold { border-image: url(/assets/ui/btn_gold.webp?v=71d1a4a8) 0 96 fill / 0 calc(var(--h) * .82) stretch; color: #4a1e00; text-shadow: 0 .06em 0 rgba(255, 246, 200, .63); }
.btn-jade { border-image: url(/assets/ui/btn_jade.webp?v=152f828b) 0 96 fill / 0 calc(var(--h) * .8) stretch; color: #fff; text-shadow: 0 .07em 0 #0b4f3b; }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn:focus-visible { outline-offset: 6px; border-radius: 40px; }

/* Google Play: the official badge, only scaled */
.gp { display: inline-block; line-height: 0; border-radius: 10px; transition: transform .18s var(--ease-out), filter .18s; }
.gp img { height: 62px; width: auto; }
.gp:hover { transform: translateY(-2px); filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35)); }

.age { display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 10px; background: #1b2a5a; flex: none;
  border: 3px solid #ffd447; font: 800 1.15rem/1 var(--display); color: var(--gold); padding-top: 3px; }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: 26px; height: 72px; padding: 0 var(--gutter);
  transition: background .3s, box-shadow .3s; }
.nav.solid { background: rgba(21, 24, 38, .9); box-shadow: 0 1px 0 rgba(244, 201, 93, .35), 0 8px 24px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.nav .brand { flex: none; }
.nav .brand img { height: 52px; width: auto; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .35)); }
.nav .links { display: flex; gap: 22px; margin-left: auto; padding: 0; list-style: none; }
.nav .links a { display: block; padding: 8px 0; font: 700 1rem/1 var(--display); text-decoration: none; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; }
.nav .links a:hover { color: var(--gold-hi); border-color: var(--gold); }
.langmenu { position: relative; flex: none; }
.langmenu summary { list-style: none; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px 0 10px; border-radius: 999px;
  cursor: pointer; background: rgba(14, 16, 32, .55); box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .55); font: 700 .9rem/1 var(--display); color: #fff;
  -webkit-user-select: none; user-select: none; }
.langmenu summary::-webkit-details-marker { display: none; }
.langmenu summary svg { width: 18px; height: 18px; color: var(--gold-hi); flex: none; }
.langmenu summary:hover, .langmenu[open] summary { background: rgba(14, 16, 32, .88); }
.langmenu ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; min-width: 196px; margin: 0; padding: 8px; list-style: none;
  border-radius: 16px; background: #1a1e33; box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .5), 0 18px 40px rgba(0, 0, 0, .5); }
.langmenu li a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; font: 700 .98rem/1.2 var(--display); color: var(--text-dim); }
.langmenu li a:hover { background: rgba(244, 201, 93, .12); color: #fff; }
.langmenu li a[aria-current] { background: var(--gold); color: var(--ink); }
.nav .btn { --h: 46px; font-size: .95rem; }
@media (max-width: 1280px) { .nav .links { gap: 16px; } .nav .links a { font-size: .92rem; } }
@media (max-width: 1100px) { .nav .links { display: none; } .langmenu { margin-left: auto; } }
@media (max-width: 860px) {
  .nav { height: 60px; gap: 10px; }
  .nav .brand img { height: 40px; }
  .nav .btn { --h: 40px; font-size: .82rem; }
  .langmenu summary { height: 36px; padding: 0 10px 0 8px; font-size: .82rem; }
}

/* ---------- the Tu Vi rail: Hoạt Hình bar stood upright, one node per realm ---------- */
.rail { position: fixed; z-index: 40; right: clamp(12px, 1.6vw, 28px); top: 50%; transform: translateY(-50%); display: none;
  padding: 12px 12px 12px 14px; border-radius: 20px; background: rgba(14, 16, 32, .66);
  box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .45), 0 12px 30px rgba(0, 0, 0, .35); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
@media (min-width: 1100px) { .rail { display: grid; grid-template-columns: auto 18px; gap: 0 10px; } }
.rail ol { display: grid; grid-template-rows: repeat(10, 1fr); padding: 0; list-style: none; }
.rail li a { display: flex; align-items: center; justify-content: flex-end; gap: 8px; height: 46px; text-decoration: none;
  font: 700 .84rem/1 var(--display); color: rgba(194, 201, 228, .72); text-shadow: 0 1px 4px rgba(0, 0, 0, .8); white-space: nowrap; border-radius: 10px; }
.rail .nm { display: none; }
@media (min-width: 1440px) { .rail .nm { display: inline; } }
.rail li img { width: 34px; height: 34px; object-fit: contain; opacity: .42; filter: grayscale(.75); transition: opacity .4s, filter .4s, transform .5s var(--ease-out); }
.rail li a:hover { color: #fff; } .rail li a:hover img { opacity: .9; }
.rail li.on a { color: #fff; } .rail li.on img { opacity: 1; filter: none; }
.rail li.now a { color: var(--gold-hi); font-size: .95rem; }
.rail li.now img { transform: scale(1.32); filter: drop-shadow(0 0 8px var(--c)); }
.rail li { position: relative; }
.rail li.burst::after { content: ""; position: absolute; right: -2px; top: 50%; width: 38px; height: 38px; margin-top: -19px; border-radius: 50%;
  border: 3px solid var(--c); box-shadow: 0 0 18px var(--c); animation: ring .9s var(--ease-out) forwards; pointer-events: none; }
@keyframes ring { from { transform: scale(.5); opacity: 1; } to { transform: scale(2.4); opacity: 0; } }
.rail .bar { position: relative; border-radius: 999px; background: #0e1020; overflow: hidden;
  box-shadow: inset 0 0 0 2px #b9852a, inset 0 0 0 4px #4a3313; }
.rail .bar i { position: absolute; left: 4px; right: 4px; top: 4px; bottom: 4px; border-radius: 999px;
  clip-path: inset(calc((1 - var(--fill, .05)) * 100%) 0 0 0 round 999px);
  background: linear-gradient(0deg, #9ad1a2 0%, #7ec8e3 15%, #f2c14e 28%, #f28c38 40%, #e55b5b 50%, #c86dd7 62%, #8e7cf0 73%, #5bc0eb 84%, #ffffff 93%, #ffe066 100%);
  box-shadow: inset 3px 0 0 rgba(255, 255, 255, .45); transition: clip-path .9s var(--ease-out); }
.rail .bar b { position: absolute; left: 50%; bottom: 0; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .5); transform: translateY(calc(var(--fill, .05) * (8px - var(--barh, 460px)) - 1px)); transition: transform .9s var(--ease-out); }
.rail .toast { position: absolute; right: calc(100% + 12px); top: var(--ty, 50%); transform: translate(10px, -50%); opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .45s var(--ease-out); }
.rail .toast.show { opacity: 1; transform: translate(0, -50%); }
.rail .toast .ribbon { min-height: 46px; font-size: .9rem; }

/* phone and tablet: the rail becomes a thin bar under the nav and a realm chip */
.railbar { position: fixed; z-index: 45; left: 0; right: 0; top: 60px; height: 4px; background: rgba(14, 16, 32, .6); pointer-events: none; }
.railbar i { position: absolute; inset: 0; clip-path: inset(0 calc((1 - var(--fill, .05)) * 100%) 0 0);
  background: linear-gradient(90deg, #9ad1a2, #7ec8e3 15%, #f2c14e 28%, #f28c38 40%, #e55b5b 50%, #c86dd7 62%, #8e7cf0 73%, #5bc0eb 84%, #fff 93%, #ffe066);
  transition: clip-path .9s var(--ease-out); }
.railbar .chip { position: absolute; left: 50%; top: 10px; translate: -50% 0; white-space: nowrap; display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px;
  background: rgba(14, 16, 32, .82); box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .5); font: 700 .8rem/1 var(--display); color: var(--gold-hi);
  opacity: 0; transform: translateY(-6px); transition: opacity .3s, transform .4s var(--ease-out); }
.railbar .chip img { width: 22px; height: 22px; object-fit: contain; }
.railbar .chip.show { opacity: 1; transform: none; animation: pop .7s var(--ease-out); }
@keyframes pop { 30% { transform: scale(1.12); } }
@media (min-width: 1100px) { .railbar { display: none; } }
@media (min-width: 861px) and (max-width: 1099px) { .railbar { top: 72px; } }

/* ---------- hero: Luyện Khí, the foot of the road ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; isolation: isolate;
  padding: 96px calc(var(--gutter) + var(--railw)) 84px var(--gutter); }
.hero-art { position: absolute; inset: 0; z-index: -2; background: #9fd0ee; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10, 22, 52, .64) 0%, rgba(10, 22, 52, .3) 34%, rgba(10, 22, 52, 0) 56%),
    linear-gradient(0deg, var(--bg) 0%, rgba(21, 24, 38, 0) 24%); }
.cloud { position: absolute; z-index: 0; pointer-events: none; width: var(--w, 380px); height: auto; opacity: var(--o, .95);
  filter: drop-shadow(0 10px 18px rgba(10, 14, 40, .3)); animation: drift var(--t, 40s) ease-in-out infinite alternate; }
@keyframes drift { from { transform: translateX(-36px); } to { transform: translateX(44px); } }
.hero-copy { position: relative; z-index: 1; max-width: 600px; display: grid; gap: 16px; justify-items: start; }
.lockup { display: grid; justify-items: center; width: min(520px, 100%); margin: 0 0 0 -18px; }
.lockup img { width: 100%; height: auto; filter: drop-shadow(0 10px 18px rgba(4, 18, 40, .45)); }
.lockup .gold { --fs: clamp(1.55rem, 2.6vw, 2.35rem); margin-top: -12px; letter-spacing: .02em; display: block; }
.lede { font: 700 clamp(1.35rem, 2vw, 1.75rem)/1.3 var(--display); text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.lede-sub { margin-top: -6px; max-width: 34em; color: #eef3ff; text-shadow: 0 1px 8px rgba(0, 0, 0, .55); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; margin-top: 6px; }
.meta { display: flex; align-items: center; gap: 12px; }
.meta p { font-size: .92rem; color: #eef3ff; text-shadow: 0 1px 6px rgba(0, 0, 0, .55); }
.cue { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; z-index: 1;
  font: 700 .85rem/1 var(--display); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .7); text-decoration: none; }
.cue svg { width: 22px; height: 22px; animation: cue 1.8s var(--ease-out) infinite; }
@keyframes cue { 0%, 100% { transform: translateY(0); opacity: .7; } 50% { transform: translateY(6px); opacity: 1; } }
.hero .spacer { display: none; }
@media (max-width: 860px) {
  .hero { display: flex; flex-direction: column; padding: 72px 16px 26px; text-align: center; }
  .hero-art img { object-position: 50% 0; }
  .hero::before { background: linear-gradient(0deg, var(--bg) 0%, rgba(21, 24, 38, .9) 24%, rgba(21, 24, 38, 0) 46%),
    linear-gradient(180deg, rgba(10, 30, 60, .35) 0%, rgba(10, 30, 60, 0) 30%); }
  .hero-copy { display: contents; }
  .lockup { width: min(290px, 80%); margin: 0; align-self: center; order: 0; }
  .hero .spacer { display: block; order: 1; flex: 1 1 auto; min-height: 200px; }
  .lede { order: 2; font-size: 1.25rem; margin-top: 6px; }
  .lede-sub { order: 3; font-size: .95rem; margin: 6px auto 0; }
  .cta { order: 4; justify-content: center; margin-top: 14px; }
  .cta .watch-btn { display: none; }
  .gp img { height: 56px; }
  .meta { order: 5; justify-content: center; margin-top: 12px; text-align: left; }
  .meta p { font-size: .86rem; }
  .cue, .cloud { display: none; }
}

/* ---------- a realm stop ---------- */
.stop { position: relative; padding: clamp(48px, 6vw, 88px) 0; background: linear-gradient(180deg, var(--from, var(--bg)), var(--to, var(--bg))); }
.stop > .wrap, .stop > .lands { position: relative; z-index: 1; }
.mist { position: absolute; left: 0; right: 0; top: -60px; height: 132px; z-index: 0; pointer-events: none; overflow: hidden; opacity: .15;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 34%, #000 58%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 34%, #000 58%, transparent 100%); }
.mist img { position: absolute; bottom: 14px; height: auto; filter: blur(1.2px) sepia(.3) hue-rotate(185deg) saturate(1.5); }
.mist.v0 img:nth-child(1) { left: -60px; width: 420px; }
.mist.v0 img:nth-child(2) { left: 42%; width: 320px; bottom: 30px; opacity: .8; }
.mist.v0 img:nth-child(3) { right: -80px; width: 380px; transform: scaleX(-1); }
.mist.v1 img:nth-child(1) { left: 18%; width: 520px; bottom: 6px; transform: scaleX(-1); }
.mist.v1 img:nth-child(2) { right: 6%; width: 260px; bottom: 40px; opacity: .7; }
.mist.v1 img:nth-child(3) { left: -140px; width: 300px; bottom: 34px; opacity: .6; }
.mist.v2 img:nth-child(1) { right: 22%; width: 460px; }
.mist.v2 img:nth-child(2) { left: 4%; width: 340px; bottom: 26px; transform: scaleX(-1); opacity: .75; }
.mist.v2 img:nth-child(3) { right: -120px; width: 300px; bottom: 44px; opacity: .55; }
.wrap { max-width: calc(1180px + var(--railw)); margin: 0 auto; padding: 0 calc(var(--gutter) + var(--railw)) 0 var(--gutter); }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.split.rev { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); }
.split.rev > .frame { order: 2; }
.body { color: var(--text-dim); max-width: 36em; }
.note { margin-top: 16px; font-size: .9rem; color: rgba(194, 201, 228, .75); }

/* the realm's frame: its breakthrough painting, and the silent clip that plays once when the stop arrives */
.frame { position: relative; aspect-ratio: 760 / 1040; }
.frame .disc, .medal .disc { position: absolute; inset: 0; overflow: hidden; background: #22305c; border-radius: 26px;
  box-shadow: 0 0 0 3px #b9852a, 0 0 0 7px #2a1c08, 0 0 0 9px rgba(244, 201, 93, .5), 0 30px 60px rgba(0, 0, 0, .5); }
.disc img, .disc video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% var(--fy, 40%); }
.disc video { opacity: 0; transition: opacity .6s; }
.playing .disc video { opacity: 1; }
.frame figcaption { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: max-content; max-width: 94%; }
.frame figcaption .ribbon { white-space: normal; text-align: center; line-height: 1.12; font-size: clamp(.78rem, 1.05vw, .98rem); }
.flash .disc::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(255, 250, 220, .9), rgba(255, 236, 168, 0) 60%);
  animation: flash 1s ease-out forwards; pointer-events: none; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.medal { position: relative; width: clamp(150px, 15vw, 196px); aspect-ratio: 1; flex: none; margin-bottom: 20px; }
.medal .disc { border-radius: 50%; box-shadow: 0 0 0 3px #b9852a, 0 0 0 7px #2a1c08, 0 0 0 9px rgba(244, 201, 93, .5), 0 18px 40px rgba(0, 0, 0, .45); }
.medal figcaption { position: absolute; left: 50%; bottom: -24px; translate: -50% 0; z-index: 2; width: max-content; }
.medal figcaption .ribbon { min-height: 40px; padding: 0 46px; border-width: 0 46px; border-image-width: 0 46px; font-size: .78rem; }
.medal figcaption .ribbon > span { margin: 0 -30px; }
.head-row { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); margin-bottom: 34px; }
.head-row .gold { margin-bottom: 12px; }

/* 1 · Trúc Cơ: Kiếm Quyết cards keep the sprite's own shape, the socket holds the icon */
.perks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 26px; }
.perk { display: grid; grid-template-columns: 27.6% minmax(0, 1fr); align-items: center; aspect-ratio: 1410 / 390; max-width: 520px;
  padding: 0 6% 0 0; background: var(--card) 0 0 / 100% 100% no-repeat; }
.perk img { width: 62%; aspect-ratio: 1; object-fit: contain; justify-self: center; margin-top: 2%; }
.perk > div { padding-left: 4%; }
.perk h3 { font: 800 1.18rem/1.15 var(--display); }
.perk h3 small { display: inline-block; margin-left: 8px; font: 700 .78rem/1 var(--display); color: var(--gold-hi); letter-spacing: .02em; }
.perk p { margin-top: 4px; font-size: .88rem; line-height: 1.42; color: var(--text-dim); }

/* 2 · Kim Đan: Pháp Bảo in gold rings, the three Kiếm Đạo */
.arts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; margin-top: 28px; max-width: 520px; }
.arts li { display: grid; justify-items: center; align-content: start; gap: 8px; text-align: center; font: 700 .95rem/1.2 var(--display); }
.ring { position: relative; display: grid; place-items: center; width: 96px; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #3a4a8c, #151b3d 70%); box-shadow: inset 0 0 0 3px #d9a441, inset 0 0 0 6px #3a2a0e, 0 8px 18px rgba(0, 0, 0, .4); }
.ring.r5 { background: radial-gradient(circle at 50% 40%, #8a3a1c, #2a1008 70%); }
.ring img { width: 72%; height: 72%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .45)); }
.daos { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 0; list-style: none; }
.daos li { display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border-radius: 999px; background: rgba(35, 40, 66, .9);
  box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .4); font: 700 .95rem/1 var(--display); }
.daos img { width: 36px; height: 36px; object-fit: contain; }
.label { display: block; margin-top: 30px; font: 700 .95rem/1 var(--display); color: var(--gold-hi); }

/* 3 · Nguyên Anh: ten lands and their overlords, the Sơn Hà Quyển paintings */
.lands { position: relative; margin: 8px auto 0; max-width: calc(1180px + var(--railw)); padding-right: var(--railw); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(270px, 30vw, 380px); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); padding: 6px var(--gutter) 18px; list-style: none; margin: 0; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
.strip li { scroll-snap-align: start; }
.land { position: relative; display: block; border-radius: 18px; overflow: hidden; background: #22305c;
  box-shadow: 0 0 0 2px #b9852a, 0 0 0 5px #2a1c08, 0 14px 30px rgba(0, 0, 0, .4); }
.land .pic { position: relative; aspect-ratio: 1148 / 828; }
.land .pic > img:first-child { width: 100%; height: 100%; object-fit: cover; }
.land .boss { position: absolute; right: -6%; bottom: -8%; width: 54%; height: auto; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .55)); transition: transform .5s var(--ease-out); }
.land:hover .boss { transform: translateY(-6px) scale(1.04); }
.seal { position: absolute; left: 10px; top: 10px; padding: 7px 10px 6px; border-radius: 5px; background: rgba(150, 26, 34, .92);
  box-shadow: inset 0 0 0 2px #962228, inset 0 0 0 4px rgba(255, 220, 190, .75); font: 700 .88rem/1.1 var(--serif); color: #fff3e2; letter-spacing: .02em; }
.land .cap { padding: 12px 16px 14px; background: linear-gradient(180deg, #232842, #1a1e33); }
.land .cap b { display: block; font: 800 1.05rem/1.2 var(--display); color: var(--gold-hi); }
.land .cap span { font-size: .86rem; line-height: 1.45; color: var(--text-dim); }
.strip-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 22px 0 0; padding: 0 var(--gutter); }
.strip-nav p { font-size: .88rem; color: var(--text-dim); }
.arrows { display: flex; gap: 10px; }
.arrow { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; color: var(--ink);
  background: linear-gradient(180deg, #ffe9a6, #f4c95d 55%, #c98d2c); box-shadow: inset 0 0 0 2px #fff3c4, 0 0 0 2px #8a5a14, 0 6px 14px rgba(0, 0, 0, .35); }
.arrow svg { width: 22px; height: 22px; }
.arrow:hover { filter: brightness(1.08); } .arrow:disabled { filter: grayscale(1) brightness(.6); cursor: default; }

/* 4 · Hóa Thần: the thirteen beasts on a cloud bank */
.beasts-band { position: relative; margin-top: 30px; padding: 8px 4px 2px; border: solid transparent; border-width: 33px;
  border-image: url(/assets/ui/panel_popup.webp?v=333cd39d) 66 fill / 33px stretch; }
.beasts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 4px; padding: 0; list-style: none; }
.beasts li { display: grid; justify-items: center; align-content: start; width: 124px; text-align: center; }
.beasts img { width: 100%; height: 100px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(5, 10, 40, .45)); transition: transform .4s var(--ease-out); }
.beasts li:hover img { transform: translateY(-6px) scale(1.06); }
.beasts b { margin-top: 4px; font: 700 .9rem/1.2 var(--display); }
.beasts small { display: block; font: 700 .72rem/1 var(--display); color: var(--g, var(--gold-hi)); letter-spacing: .03em; }

/* 5 · Luyện Hư: the hero pick dresses the outfit cards (gacha "Góc mây" frames) */
.pickers { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.picker { display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border: 0; border-radius: 999px; cursor: pointer; color: #fff;
  background: rgba(35, 40, 66, .9); box-shadow: inset 0 0 0 2px rgba(244, 201, 93, .35); font: 800 1.05rem/1 var(--display); transition: box-shadow .2s, background .2s; }
.picker img { width: 64px; height: 64px; border-radius: 50%; object-fit: contain; object-position: 50% 100%; padding: 4px 3px 0;
  background: radial-gradient(circle at 50% 35%, #3a4a8c, #1b2a5a 70%); box-shadow: 0 0 0 2px #b9852a; }
.picker[aria-pressed="true"] { background: linear-gradient(180deg, #ffe9a6, #f4c95d 60%, #d39a34); color: #4a1e00; box-shadow: inset 0 0 0 2px #fff3c4, 0 0 0 2px #8a5a14; }
.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 44px; padding: 0; list-style: none; }
.card .face { position: relative; aspect-ratio: 512 / 768; border-radius: 16px; overflow: hidden; background: radial-gradient(90% 60% at 50% 40%, #3a4a8c 0%, #1d2550 70%); }
.card .face.S { background: radial-gradient(90% 60% at 50% 40%, #6a4a1c 0%, #2a1c10 72%); }
.card .face.L { background: radial-gradient(90% 60% at 50% 40%, #7a2430 0%, #2a0f14 72%); }
.card .face img { position: absolute; left: -12%; width: 124%; bottom: 6%; height: auto; transition: transform .5s var(--ease-out); }
.card:hover .face img { transform: translateY(-4px) scale(1.03); }
.card .face::after { content: ""; position: absolute; inset: 0; background: url(/assets/ui/card_c2.webp?v=be1b42cd) 0 0 / 100% 100%; pointer-events: none; }
.card .face.S::after { background-image: url(/assets/ui/card_c4.webp?v=667b6a70); }
.card .face.L::after { background-image: url(/assets/ui/card_c5.webp?v=1f85e84e); }
.card p { margin-top: 10px; text-align: center; font: 700 .98rem/1.25 var(--display); }
.card p span { display: block; font: 400 .8rem/1.35 var(--body); color: var(--text-dim); }

/* 6 · Hợp Thể: a living world */
.world { display: grid; gap: 14px; margin-top: 26px; padding: 0; list-style: none; }
.world li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; padding: 2px 8px 2px 2px;
  border: solid transparent; border-width: 22px; border-image: url(/assets/ui/panel_card.webp?v=d32fe7a4) 50 fill / 22px stretch; }
.world img { width: 64px; height: 64px; object-fit: contain; }
.world b { display: block; font: 800 1.1rem/1.2 var(--display); color: var(--gold-hi); }
.world span { font-size: .92rem; line-height: 1.5; color: var(--text-dim); }
.mosaic { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; aspect-ratio: 1 / 1.02; }
.mosaic .tile { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 0 0 2px #b9852a, 0 0 0 5px #2a1c08, 0 18px 36px rgba(0, 0, 0, .45); }
.mosaic .tile img { width: 100%; height: 100%; object-fit: cover; }
.mosaic .tile.tall { grid-row: span 2; }
.mosaic .medal { position: absolute; left: 34px; bottom: -14px; z-index: 2; width: clamp(130px, 12vw, 168px); }

/* 7 · Đại Thừa: the Cave Abode painting owns the band */
.abode { position: relative; min-height: min(86vh, 760px); display: grid; align-items: center; isolation: isolate; overflow: hidden; background: var(--bot, var(--bg)); }
.abode > .bgpic { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.abode::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 18, 40, .82) 0%, rgba(14, 18, 40, .5) 36%, rgba(14, 18, 40, 0) 62%),
    linear-gradient(0deg, var(--bot, var(--bg)) 0%, transparent 18%), linear-gradient(180deg, var(--top, var(--bg)) 0%, transparent 16%); }
.abode .panel { max-width: 520px; padding: 6px 8px; border: solid transparent; border-width: 30px; border-image: url(/assets/ui/panel_popup.webp?v=333cd39d) 66 fill / 30px stretch; }
.abode .panel .medal { width: 120px; margin: -70px auto 34px; }
.abode .panel h2 { text-align: center; }
.abode .panel .body { text-align: center; margin: 0 auto; }
.chips { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding: 0; list-style: none; }
.chips li { display: flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 999px; background: rgba(14, 16, 32, .55);
  box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .45); font: 700 .92rem/1 var(--display); }
.chips img { width: 34px; height: 34px; object-fit: contain; }

/* 8 · Độ Kiếp: Bế Quan and the mini games */
.games { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px 10px; margin-top: 30px; padding: 0; list-style: none; max-width: 560px; }
.games li { display: grid; justify-items: center; align-content: start; gap: 6px; width: 132px; text-align: center; }
.games .ring { width: 92px; margin-bottom: 4px; }
.games b { font: 800 .98rem/1.15 var(--display); color: var(--gold-hi); }
.games li > span:last-child { font-size: .82rem; line-height: 1.35; color: var(--text-dim); }

/* 9 · Chân Tiên: the summit */
.summit { position: relative; padding: clamp(80px, 11vw, 140px) 0 clamp(72px, 9vw, 110px); isolation: isolate; overflow: hidden; }
.summit > .bgpic { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.summit::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, var(--top, var(--bg)) 0%, transparent 16%, transparent 40%, rgba(21, 24, 38, .35) 70%, var(--bg) 100%); }
.jcopy { padding: 6px 10px 10px; border: solid transparent; border-width: 33px; border-image: url(/assets/ui/panel_popup.webp?v=333cd39d) 66 fill / 33px stretch;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .35)); }
.jcopy .body { color: #dfe4f5; }
.journey { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.prize { position: relative; display: grid; place-items: center; min-height: 340px; }
.prize .chest { width: min(300px, 70%); filter: drop-shadow(0 18px 24px rgba(0, 0, 0, .5)); animation: bob 3.2s ease-in-out infinite; }
.prize .tiger { position: absolute; right: 2%; bottom: -4%; width: min(250px, 48%); filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .5)); }
@keyframes bob { 50% { transform: translateY(-10px); } }
.facts { display: grid; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid rgba(244, 201, 93, .35); }
.facts p { font-size: .95rem; color: #eef0fa; }
.facts b { color: var(--gold-hi); font: 800 1rem/1 var(--display); margin-right: 6px; }
.watch { position: relative; display: block; margin: clamp(56px, 8vw, 96px) auto 0; width: min(880px, 100%); aspect-ratio: 16 / 9; border: 0; padding: 0;
  border-radius: 22px; overflow: hidden; cursor: pointer; background: #000;
  box-shadow: 0 0 0 3px #b9852a, 0 0 0 7px #2a1c08, 0 0 0 9px rgba(244, 201, 93, .5), 0 30px 60px rgba(0, 0, 0, .55); }
.watch img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out), filter .4s; }
.watch:hover img { transform: scale(1.03); filter: brightness(1.06); }
.watch .play { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; margin: -48px 0 0 -48px; display: grid; place-items: center; border-radius: 50%;
  background: linear-gradient(180deg, #ffe9a6, #f4c95d 55%, #c98d2c); box-shadow: inset 0 0 0 3px #fff3c4, 0 0 0 3px #8a5a14, 0 10px 30px rgba(0, 0, 0, .5); color: #4a1e00; }
.watch .play svg { width: 42px; height: 42px; margin-left: 6px; }
.watch-cap { width: max-content; max-width: 100%; margin: 16px auto 0; padding: 8px 18px; border-radius: 999px; background: rgba(16, 20, 44, .82);
  box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .45); font: 700 1rem/1.3 var(--display); color: #fff; }
.final { display: grid; justify-items: center; gap: 14px; margin-top: clamp(64px, 9vw, 110px); text-align: center; }
.final .last, .final .small { text-shadow: 0 1px 8px rgba(0, 0, 0, .85), 0 0 2px rgba(0, 0, 0, .6); }
.final .gold { --fs: clamp(2.4rem, 5.4vw, 4.6rem); margin: 0; }
.final .medal { width: clamp(150px, 15vw, 200px); margin-bottom: 10px; }
.final .last { font: 700 clamp(1.15rem, 1.8vw, 1.45rem)/1.35 var(--display); text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.final .gp img { height: 70px; }
.final .small { font-size: .9rem; color: #e6e9f6; }

/* ---------- footer ---------- */
.foot { padding: 56px var(--gutter) 44px; background: #10121e; box-shadow: inset 0 1px 0 rgba(244, 201, 93, .3); }
.foot .in { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px 40px; align-items: start; }
.foot .logo { width: 150px; height: auto; }
.foot nav ul { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; list-style: none; }
.foot nav a { font: 700 1rem/1.4 var(--display); color: #fff; text-decoration: none; border-bottom: 1px solid rgba(244, 201, 93, .4); }
.foot nav a:hover { color: var(--gold-hi); border-color: var(--gold); }
.foot-langs { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 16px 0 0; padding: 0; list-style: none; }
.foot-langs a { font-size: .9rem; color: var(--text-dim); text-decoration: none; }
.foot-langs a:hover { color: #fff; }
.foot-langs a[aria-current] { color: var(--gold-hi); }
.foot .legal { display: grid; gap: 8px; margin-top: 18px; font-size: .86rem; line-height: 1.55; color: var(--text-dim); }
.foot .health { display: flex; align-items: center; gap: 12px; color: #eef0fa; }
.foot .health .age { width: 42px; height: 42px; font-size: 1rem; border-width: 2px; }

/* ---------- the trailer dialog ---------- */
dialog.player { width: min(1100px, 94vw); padding: 0; border: 0; border-radius: 18px; background: #000; color: #fff; overflow: visible;
  box-shadow: 0 0 0 3px #b9852a, 0 30px 80px rgba(0, 0, 0, .7); }
dialog.player::backdrop { background: rgba(6, 8, 18, .82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
dialog.player video { width: 100%; aspect-ratio: 16 / 9; border-radius: 18px; background: #000; }
dialog.player .x { position: absolute; right: -14px; top: -14px; width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  color: #4a1e00; background: linear-gradient(180deg, #ffe9a6, #f4c95d 55%, #c98d2c); box-shadow: inset 0 0 0 2px #fff3c4, 0 0 0 2px #8a5a14, 0 6px 16px rgba(0, 0, 0, .5); }
.x svg { width: 22px; height: 22px; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .split, .split.rev, .journey { grid-template-columns: minmax(0, 1fr); }
  .split.rev > .frame { order: 0; }
  .frame { aspect-ratio: 4 / 3.4; max-width: 520px; width: 100%; margin: 0 auto; }
  .perk { max-width: none; }
  .perk h3 small { display: block; margin: 3px 0 0; }
  .perk p { display: none; }
  .head-row { flex-direction: column; align-items: flex-start; gap: 26px; }
  .head-row .medal { align-self: center; margin-left: 0; }
  .arts { gap: 14px 8px; }
  .ring { width: 84px; }
  .beasts li { width: 84px; }
  .beasts img { height: 80px; }
  .beasts-band { border-width: 26px; border-image-width: 26px; padding: 4px 0 0; }
  .mosaic { margin: 20px 0 60px; }
  .mosaic .medal { left: 50%; transform: translateX(-50%); bottom: -40px; }
  .abode { min-height: 0; padding: 260px 0 60px; }
  .abode > .bgpic { height: 380px; object-position: 62% 50%; }
  .abode::before { background: linear-gradient(0deg, var(--bot, var(--bg)) 0%, var(--bot, var(--bg)) 52%, transparent 80%), linear-gradient(180deg, var(--top, var(--bg)) 0%, transparent 18%); }
  .abode .panel { margin: 0 auto; }
  .games li { width: 104px; }
  .games .ring { width: 80px; }
  .mist { height: 96px; top: -44px; }
  .mist img { width: 250px !important; } .mist img:nth-child(2) { width: 190px !important; } .mist img:nth-child(3) { width: 220px !important; }
  .prize { min-height: 260px; }
  .watch .play { width: 76px; height: 76px; margin: -38px 0 0 -38px; }
  .final .gp img { height: 60px; }
  .foot .in { grid-template-columns: minmax(0, 1fr); }
  .strip-nav .arrows { display: none; }
  dialog.player .x { right: 6px; top: -58px; }
}

/* ---------- scripts other than Latin ---------- */
html:lang(zh-Hans) body, html:lang(zh-Hant) body, html:lang(ja) body, html:lang(ko) body { line-height: 1.8; }
html:lang(th) body { line-height: 1.85; }
html:lang(zh-Hans) .gold, html:lang(zh-Hant) .gold, html:lang(ja) .gold, html:lang(ko) .gold { line-height: 1.24; letter-spacing: .02em; }
html:lang(th) .gold { line-height: 1.5; letter-spacing: 0; }
html:lang(th) .lede, html:lang(th) .perk h3, html:lang(th) .card p, html:lang(th) .land .cap b { line-height: 1.45; }
html:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }
html:lang(zh-Hans) p, html:lang(zh-Hant) p, html:lang(ja) p { line-break: strict; }

/* ---------- legal pages: the store kit's own words, unchanged, in the site's dress (Tools/site/wrap_legal.py) ---------- */
.lnav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gutter); background: #10121e;
  box-shadow: 0 1px 0 rgba(244, 201, 93, .35); }
.lnav img { height: 50px; width: auto; }
.lnav .home { padding: 10px 16px; border-radius: 999px; font: 700 .95rem/1 var(--display); color: var(--gold-hi); text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .5); }
.lnav .home:hover { background: rgba(244, 201, 93, .12); color: #fff; }
.legal-page { max-width: 800px; margin: 0 auto; padding: 44px var(--gutter) 80px; color: #dfe4f5; }
.legal-page h1 { margin: 0 0 6px; font: 800 clamp(1.8rem, 3.2vw, 2.4rem)/1.2 var(--display); color: var(--gold-hi); }
.legal-page .meta { margin: 0 0 20px; font-size: .92rem; color: var(--text-dim); }
.legal-page > nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 6px; }
.legal-page > nav a { padding: 8px 16px; border-radius: 999px; background: #232842; box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .4);
  font: 700 .92rem/1 var(--display); color: #fff; text-decoration: none; }
.legal-page > nav a:hover { color: var(--gold-hi); }
.legal-page h2 { margin: 44px 0 12px; padding-top: 20px; border-top: 1px solid rgba(244, 201, 93, .28); font: 800 1.45rem/1.3 var(--display); color: var(--gold); }
.legal-page h3 { margin: 28px 0 6px; font: 700 1.1rem/1.35 var(--display); color: #fff; }
.legal-page p, .legal li { color: #dfe4f5; }
.legal-page p { margin: 0 0 12px; }
.legal-page b, .legal strong { color: #fff; }
.legal-page a { color: var(--gold-hi); }
.legal-page ul, .legal ol { margin: 0 0 12px; padding-left: 22px; }
.legal-page li { margin: 5px 0; }
.legal-page li::marker { color: var(--gold); }
.legal-page code { padding: 1px 7px; border-radius: 6px; background: #232842; color: var(--gold-hi); font-size: .9em; overflow-wrap: anywhere; }
.legal-page .note { margin: 14px 0; padding: 14px 18px; border-radius: 14px; background: #232842; box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .3); }
.foot.mini .in { grid-template-columns: minmax(0, 1fr); }
.legal-foot { display: grid; gap: 8px; font-size: .86rem; line-height: 1.55; color: var(--text-dim); }
.legal-foot a { color: #fff; }
.legal-foot .health { display: flex; align-items: center; gap: 12px; color: #eef0fa; }
.legal-foot .age { width: 42px; height: 42px; font-size: 1rem; border-width: 2px; }

/* ---------- News (Docs/56): the index, the posts, the 404 ---------- */
body.sub { padding-top: 72px; --railw: 0px; }
.nav .links a[aria-current] { color: var(--gold-hi); border-color: var(--gold); }
.pagehead { position: relative; isolation: isolate; overflow: hidden; padding: clamp(36px, 5vw, 64px) 0 clamp(30px, 4vw, 52px); }
.pagehead > .bgpic { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%; }
.pagehead::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(14, 18, 40, .9) 0%, rgba(14, 18, 40, .62) 55%, rgba(14, 18, 40, .4) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(21, 24, 38, 0) 46%); }
.pagehead h1.gold { --fs: clamp(2rem, 4vw, 3.3rem); margin: 14px 0 12px; max-width: 19em; }
.pagehead.post h1.gold { --fs: clamp(1.75rem, 3.3vw, 2.7rem); }
.pagehead .intro { max-width: 36em; color: #eef1fb; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; font: 700 .9rem/1.3 var(--display); color: var(--text-dim); }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--gold); }
.crumbs a { color: var(--gold-hi); text-decoration: none; } .crumbs a:hover { text-decoration: underline; }
.dateline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .92rem; color: #dfe4f5; }
.tag { display: inline-block; padding: 4px 11px 3px; border-radius: 999px; background: rgba(150, 26, 34, .92);
  box-shadow: inset 0 0 0 1.5px rgba(255, 220, 190, .7); font: 700 .78rem/1.2 var(--display); color: #fff3e2; letter-spacing: .02em; }

/* the index: one card a post */
.newslist { padding-top: 8px; padding-bottom: clamp(56px, 7vw, 96px); }
.posts { display: grid; gap: 26px; padding: 0; list-style: none; }
.postcard { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: clamp(20px, 3vw, 40px); padding: 6px;
  border: solid transparent; border-width: 30px; border-image: url(/assets/ui/panel_popup.webp?v=333cd39d) 66 fill / 30px stretch; }
.postcard .cover { display: block; border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 2px #b9852a, 0 0 0 5px #2a1c08, 0 14px 30px rgba(0, 0, 0, .4); }
.postcard .cover img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; transition: transform .5s var(--ease-out); }
.postcard:hover .cover img { transform: scale(1.03); }
.postcard .tags { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--text-dim); }
.postcard h2 { margin: 10px 0 8px; font: 800 clamp(1.3rem, 2.2vw, 1.75rem)/1.2 var(--display); }
.postcard h2 a { color: #fff; text-decoration: none; } .postcard h2 a:hover { color: var(--gold-hi); }
.postcard p { color: var(--text-dim); }
.postcard .more { display: inline-block; margin-top: 12px; font: 800 1rem/1 var(--display); color: var(--gold-hi); text-decoration: none; }
.postcard .more:hover { text-decoration: underline; }

/* a post */
.article { max-width: calc(940px + var(--gutter) * 2); padding-bottom: clamp(56px, 7vw, 96px); }
.article .lead { margin: 6px 0 26px; font: 700 clamp(1.08rem, 1.5vw, 1.25rem)/1.55 var(--display); color: #fff; }
.article section { margin-top: clamp(40px, 5vw, 60px); }
.article h2.gold.sm { --fs: clamp(1.55rem, 2.6vw, 2.15rem); margin-bottom: 8px; scroll-margin-top: 90px; }
.sectnote { margin-bottom: 18px; color: var(--text-dim); }
.totals { margin-top: 0; padding: 4px 8px 6px; border: solid transparent; border-width: 30px; border-image: url(/assets/ui/panel_popup.webp?v=333cd39d) 66 fill / 30px stretch; }
.totals h2, .toc h2, .newcodes h2, .getgame h2 { font: 800 1.15rem/1.3 var(--display); color: var(--gold-hi); }
.totals .cells { justify-content: center; margin-top: 14px; }
.toc { margin-top: 26px; padding: 16px 20px; border-radius: 16px; background: #1a1e33; box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .35); }
.toc ol { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 10px 0 0; padding: 0; list-style: none; counter-reset: t; }
.toc li a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: #232842; color: #fff;
  font: 700 .92rem/1.2 var(--display); text-decoration: none; box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .3); }
.toc li { counter-increment: t; }
.toc li a::before { content: counter(t); display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: var(--ink); font-size: .78rem; }
.toc li a:hover { color: var(--gold-hi); }

/* the game's reward cell (RewardView): frame by tier, the icon, the count on a dark chip, the name tinted by the frame */
.cells { display: flex; flex-wrap: wrap; gap: 12px 10px; padding: 0; list-style: none; }
.cell { display: grid; justify-items: center; align-content: start; gap: 5px; width: 84px; text-align: center; }
.cell .tile { position: relative; display: grid; place-items: center; width: 80px; aspect-ratio: 1; background: url(/assets/ui/frame_r2.webp?v=87ddf8f5) 0 0 / 100% 100%; }
.cell .tile.t3 { background-image: url(/assets/ui/frame_r3.webp?v=e2e7fe53); }
.cell .tile.t4 { background-image: url(/assets/ui/frame_r4.webp?v=8fdef3ae); }
.cell .tile img { width: 58%; height: 58%; object-fit: contain; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .45)); }
.cell .tile b { position: absolute; right: 7px; bottom: 7px; padding: 3px 5px 2px; border-radius: 7px; background: rgba(10, 13, 31, .86);
  box-shadow: inset 0 0 0 1.5px rgba(255, 217, 115, .5); font: 800 .76rem/1 var(--display); color: #fff; }
.cell .nm { font: 700 .74rem/1.2 var(--display); color: #d9ddf2; }
.cell .nm.t3 { color: #e7cdfa; } .cell .nm.t4 { color: #ffe3a8; }

/* a code: the name to type, its condition, the copy button; then what it gives */
.codes { display: grid; gap: 16px; padding: 0; list-style: none; }
.codes.style-A, .codes.style-C { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.code { padding: 4px 6px 8px; border: solid transparent; border-width: 22px; border-image: url(/assets/ui/panel_card.webp?v=d32fe7a4) 50 fill / 22px stretch; }
.code-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; }
.code-top .badge { grid-column: 1; justify-self: start; }
.code-top .copy { grid-column: 2; grid-row: 1 / span 2; }
.codename { font: 800 clamp(1.45rem, 2.4vw, 1.8rem)/1.1 var(--display); color: var(--gold-hi); letter-spacing: .06em; -webkit-user-select: all; user-select: all;
  text-shadow: 0 2px 0 #3a2a0e, 0 0 14px rgba(255, 220, 92, .25); }
.badge { display: inline-block; padding: 4px 10px 3px; border-radius: 8px; background: rgba(14, 16, 32, .7); box-shadow: inset 0 0 0 1px rgba(53, 201, 155, .6);
  font: 700 .8rem/1.2 var(--display); color: #a6f0d6; white-space: nowrap; }
.btn.copy { --h: 44px; font-size: .9rem; }
.btn.copy.done { filter: saturate(1.3) brightness(1.1); }
.code .cells { margin-top: 14px; }
.gifts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.gifts li { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 4px; border-radius: 999px; background: rgba(14, 16, 32, .6);
  box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .35); font: 800 .92rem/1.1 var(--display); color: #fff; }
.gifts li img { width: 30px; height: 30px; object-fit: contain; }
.gifts li span { font-weight: 700; color: var(--text-dim); }
.codetable { overflow-x: auto; border-radius: 16px; box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .4); background: #1a1e33; }
.codetable table { width: 100%; border-collapse: collapse; }
.codetable th, .codetable td { padding: 12px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid rgba(244, 201, 93, .18); }
.codetable thead th { font: 700 .82rem/1.2 var(--display); color: var(--gold); text-transform: uppercase; letter-spacing: .04em; background: #232842; }
.codetable tbody tr:last-child > * { border-bottom: 0; }
.codetable .codename { font-size: 1.25rem; }
.codetable .gifts { margin: 0; }
.codetable td:last-child { text-align: right; }

/* how to: four steps, each with the game's own screen in the reader's language */
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 26px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: st; }
.steps li { counter-increment: st; display: grid; align-content: start; gap: 14px; }
.steps li > p { position: relative; min-height: 46px; padding-left: 58px; color: #eef0fa; }
.steps li > p::before { content: counter(st); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(180deg, #ffe9a6, #f4c95d 55%, #c98d2c); box-shadow: inset 0 0 0 2px #fff3c4, 0 0 0 2px #8a5a14; color: #4a1e00; font: 800 1.2rem/1 var(--display); }
.steps b { color: var(--gold-hi); }
.snap { position: relative; justify-self: center; width: min(100%, 400px); border-radius: 18px; overflow: hidden; background: #0e1020;
  box-shadow: 0 0 0 2px #b9852a, 0 0 0 5px #2a1c08, 0 16px 32px rgba(0, 0, 0, .45); }
.snap img { width: 100%; height: auto; }
.ring-hl { position: absolute; border-radius: 16px; border: 3px solid #ffe28c; box-shadow: 0 0 0 3px rgba(74, 30, 0, .55), 0 0 18px 4px rgba(255, 226, 140, .7);
  animation: hl 1.6s ease-in-out infinite; pointer-events: none; }
@keyframes hl { 50% { box-shadow: 0 0 0 3px rgba(74, 30, 0, .55), 0 0 28px 8px rgba(255, 226, 140, .95); } }

/* what the game says when a code fails, and why */
.faq { display: grid; gap: 14px; margin: 18px 0 0; }
.faq > div { padding: 14px 18px; border-radius: 16px; background: #1a1e33; box-shadow: inset 0 0 0 1px rgba(244, 201, 93, .25); }
.faq dt { margin-bottom: 8px; }
.toastq { display: inline-block; padding: 7px 14px; border-radius: 12px; background: rgba(10, 13, 31, .92); box-shadow: inset 0 0 0 1.5px rgba(255, 217, 115, .45);
  font: 700 .95rem/1.35 var(--display); color: #fff; }
.faq dd { margin: 0; color: var(--text-dim); }
.newcodes p { margin-top: 6px; color: var(--text-dim); }
.getgame { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px 22px; margin-top: clamp(40px, 5vw, 60px); padding: 6px 10px;
  border: solid transparent; border-width: 30px; border-image: url(/assets/ui/panel_popup.webp?v=333cd39d) 66 fill / 30px stretch; }
.getgame .ic { width: 84px; height: 84px; border-radius: 20px; box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.getgame p { margin-top: 4px; color: #dfe4f5; }
.getgame .gp img { height: 58px; }

/* the 404 */
.nfmain { display: grid; justify-items: center; gap: 14px; max-width: 640px; margin: 0 auto; padding: 40px var(--gutter) 80px; text-align: center; }
.nfart { width: 180px; filter: drop-shadow(0 12px 16px rgba(0, 0, 0, .5)); }
.nfcode { --fs: clamp(4rem, 12vw, 6.5rem); margin: 0; }
.nfmain h1 { margin: 0; font: 800 1.6rem/1.25 var(--display); color: #fff; }
.nfmain > p:not(.gold) { color: var(--text-dim); }
.nflangs { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.nflangs a { font-size: .92rem; color: var(--text-dim); text-decoration: none; } .nflangs a:hover { color: #fff; }

@media (max-width: 860px) {
  body.sub { padding-top: 60px; }
  .postcard { grid-template-columns: minmax(0, 1fr); border-width: 24px; border-image-width: 24px; }
  .codes.style-A, .codes.style-C, .steps { grid-template-columns: minmax(0, 1fr); }
  .totals { border-width: 24px; border-image-width: 24px; padding: 2px 0 4px; }
  .cell { width: 74px; } .cell .tile { width: 70px; }
  .getgame { grid-template-columns: auto minmax(0, 1fr); border-width: 24px; border-image-width: 24px; }
  .getgame .gp { grid-column: 1 / -1; justify-self: center; }
  .codetable thead { display: none; }
  .codetable tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px; padding: 12px 14px;
    border-bottom: 1px solid rgba(244, 201, 93, .18); }
  .codetable tbody tr:last-child { border-bottom: 0; }
  .codetable th, .codetable td { padding: 0; border: 0; }
  .codetable td:nth-child(3) { grid-column: 1; grid-row: 2; }
  .codetable td:nth-child(2) { grid-column: 1 / -1; grid-row: 3; }
  .codetable td:last-child { grid-column: 2; grid-row: 1 / span 2; }
}
@media (max-width: 420px) {
  /* a narrow phone: the code takes the whole first line, its date and the copy button share the second */
  .codename { grid-column: 1 / -1; }
  .code-top .badge { grid-row: 2; }
  .code-top .copy { grid-row: 2; grid-column: 2; }
}
html:lang(th) .codename, html:lang(th) .postcard h2 { line-height: 1.4; }

/* the invite landing page /i/<CODE> (Docs/71 §6): only layout, the pieces are the news page's own */
[hidden] { display: none !important; }
.nav .brand + .links { margin-left: auto; }
.pagehead.inv { padding: clamp(28px, 6vw, 56px) 0 clamp(36px, 6vw, 64px); }
.invwrap { display: grid; justify-items: center; gap: 22px; max-width: 560px; margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.pagehead.inv h1.gold { --fs: clamp(1.7rem, 7.2vw, 2.6rem); margin: 0; max-width: 14em; }
.invpanel { display: grid; justify-items: center; gap: 12px; width: 100%; padding: 2px 6px 6px;
  border: solid transparent; border-width: 30px; border-image: url(/assets/ui/panel_popup.webp?v=333cd39d) 66 fill / 30px stretch; }
.invlabel { font: 700 .9rem/1.2 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.invlabel.gift { margin-top: 8px; }
.invpanel .codename { font-size: clamp(2rem, 9.4vw, 2.9rem); letter-spacing: .1em; padding-left: .1em; }
.invpanel .cells { justify-content: center; margin: 0; }
.invbad { font: 700 1.05rem/1.5 var(--display); color: #fff; }
.invhow { max-width: 30em; color: #dfe4f5; font-size: .98rem; }
@media (max-width: 860px) { .invpanel { border-width: 24px; border-image-width: 24px; } }

/* screenshots (?shot=1) and reduced motion: nothing animates, nothing waits */
.shot *, .shot *::before, .shot *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}