/* web12: the redesigned website — the game's own site at / (site.js + web12home.js), the landing pages /<lang>/
   (server/web2.js) and the signed-in account page (screens.js showSelect: header, menu drawer, character cards, the
   offline-farm card). Day and night themes from one set of tokens: night = midnight navy + gold, day = ivory + navy ink.
   html[data-theme] comes from ui.js applyTheme (the game) or web12theme.js (the landing pages): the device setting until
   the player picks one. Phones 320 px → 4K, foldables (Galaxy Z Fold, Mate XT, iPhone Fold) and near-square screens.
   No inline styles (CSP). Loaded last (after web2site.css / fold7.css); every rule is scoped to the website pieces. */

@font-face { font-family: "IRO Serif"; src: url("/fonts/web2/serif-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --w12-bg0: #050a1a; --w12-bg1: #0a1430; --w12-bg2: #102049;
  --w12-card: linear-gradient(180deg, rgba(25, 45, 98, .66), rgba(9, 17, 42, .84));
  --w12-card-solid: #0f1d44;
  --w12-line: rgba(246, 215, 126, .2); --w12-line2: rgba(246, 215, 126, .48);
  --w12-ink: #eef1f8; --w12-ink2: #c6cee2; --w12-mute: #93a0c0;
  --w12-head: #fff3d0; --w12-acc: #f3cf6e; --w12-acc2: #deaa45;
  --w12-gold: linear-gradient(180deg, #fff3c4 0%, #f3cf6e 36%, #d9a441 64%, #b37a22 100%);
  --w12-headgrad: linear-gradient(180deg, #fff8e0 10%, #f6d77e 55%, #d59a35 100%);
  --w12-shadow: 0 18px 44px rgba(0, 0, 0, .38);
  --w12-glow: rgba(246, 205, 110, .22);
  --w12-band: radial-gradient(120% 140% at 50% 0%, rgba(54, 90, 170, .45), transparent 60%), linear-gradient(180deg, #0c1838, #071029);
  --w12-r: 20px;
  --w12-serif: "IRO Serif", Kanit, "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --w12-wrap: 1200px;
}
:root[data-theme="light"] {
  --w12-bg0: #f6efdf; --w12-bg1: #fbf6ea; --w12-bg2: #efe2c3;
  --w12-card: linear-gradient(180deg, #fffdf8, #f8eed8);
  --w12-card-solid: #fffaf0;
  --w12-line: rgba(160, 112, 36, .22); --w12-line2: rgba(160, 112, 36, .5);
  --w12-ink: #2a2116; --w12-ink2: #4c3f2e; --w12-mute: #7a6950;
  --w12-head: #14224a; --w12-acc: #9a6418; --w12-acc2: #b88326;
  --w12-headgrad: linear-gradient(180deg, #1d3168, #14224a);
  --w12-shadow: 0 14px 34px rgba(110, 76, 18, .14);
  --w12-glow: rgba(214, 160, 60, .2);
  --w12-band: radial-gradient(120% 140% at 50% 0%, rgba(255, 255, 255, .85), transparent 60%), linear-gradient(180deg, #f3e6c8, #ead8b0);
}

/* ================================================================ shared section parts (.w12-*) */
.w12-sec, .w12-stats, .w12-cta, .w12-sec *, .w12-stats *, .w12-cta * { box-sizing: border-box; }
.w12-sec { width: min(var(--w12-wrap), 100%); margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); color: var(--w12-ink); scroll-margin-block-start: 76px; }
.w12-sec h2, .w12-sec h3, .w12-sec h4, .w12-cta h2 { margin: 0; line-height: 1.22; }
.w12-sec p { margin: 0; }
.w12-head { display: grid; justify-items: center; text-align: center; gap: 10px; margin-block-end: clamp(18px, 3vw, 34px); }
.w12-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--w12-acc); }
.w12-kicker svg { width: 20px; height: 20px; }
.w12-head h2 { font-family: var(--w12-serif); font-size: clamp(26px, 4.2vw, 46px); max-width: 22ch; text-wrap: balance;
  background: var(--w12-headgrad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.w12-head h2::after { content: ""; display: block; width: 110px; height: 10px; margin: 12px auto 0; -webkit-text-fill-color: initial;
  background: radial-gradient(circle at 50% 50%, var(--w12-acc) 0 3px, transparent 3.5px), linear-gradient(90deg, transparent, var(--w12-acc2) 25%, transparent 45% 55%, var(--w12-acc2) 75%, transparent) center / 100% 1.5px no-repeat; }
.w12-sub { max-width: 62ch; font-size: clamp(15px, 1.3vw, 17.5px); line-height: 1.7; color: var(--w12-ink2); text-wrap: pretty; }
.w12-h3 { font-family: var(--w12-serif); font-size: clamp(20px, 2.4vw, 26px); color: var(--w12-head); text-align: center; margin: clamp(26px, 4vw, 44px) 0 16px !important; }
.w12-note { text-align: center; color: var(--w12-mute); font-size: 14px; margin-block: 14px 0 !important; }
.w12-card { position: relative; border-radius: var(--w12-r); background: var(--w12-card); border: 1px solid var(--w12-line2); box-shadow: var(--w12-shadow); overflow: hidden; }
.w12-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.w12-ic { display: inline-grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px; color: #2a1700; background: var(--w12-gold); box-shadow: 0 8px 18px var(--w12-glow), inset 0 1px 0 rgba(255, 255, 255, .7); }
.w12-ic svg { width: 30px; height: 30px; }
.w12-art { position: relative; overflow: hidden; background: #0b1530; }
.w12-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.w12-art::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 55%, rgba(5, 10, 26, .55)); }
.w12-badge { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; z-index: 1; padding: 3px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #2a1700; background: var(--w12-gold); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }

/* buttons */
.w12-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 12px 30px; border-radius: 999px; font: 700 17px/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer;
  border: 1px solid var(--w12-line2); color: var(--w12-ink); background: transparent; -webkit-tap-highlight-color: transparent; transition: transform .15s ease, box-shadow .2s ease, filter .2s ease; }
.w12-btn svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.w12-btn:hover { transform: translateY(-2px); }
.w12-gold { color: #2a1700; border-color: #fff0b8; background: var(--w12-gold); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -3px 0 rgba(110, 67, 16, .3), 0 10px 28px rgba(222, 170, 69, .42); }
.w12-gold:hover { filter: brightness(1.05); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -3px 0 rgba(110, 67, 16, .3), 0 14px 34px rgba(222, 170, 69, .52); }
.w12-ghost { background: rgba(10, 20, 48, .35); }
:root[data-theme="light"] .w12-ghost { background: rgba(255, 255, 255, .55); color: #14224a; }

/* reveal on scroll (only when web12fx.js runs: html.w12-js) */
.w12-js .w12-rv { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.w12-js .w12-rv.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- stats band */
.w12-stats { position: relative; padding: clamp(18px, 3vw, 30px) max(16px, env(safe-area-inset-left, 0px)); background: var(--w12-band); border-block: 1px solid var(--w12-line2); }
.w12-stats ul { list-style: none; margin: 0 auto; padding: 0; width: min(var(--w12-wrap), 100%); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.w12-stats li { display: grid; justify-items: center; text-align: center; gap: 2px; padding: 6px 4px; position: relative; }
.w12-stats li + li::before { content: ""; position: absolute; inset-inline-start: -5px; inset-block: 18% 18%; width: 1px; background: var(--w12-line2); }
.w12-stats b { font-family: var(--w12-serif); font-size: clamp(26px, 3.6vw, 44px); line-height: 1.05; background: var(--w12-headgrad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; font-variant-numeric: tabular-nums; }
.w12-stats span { font-size: clamp(12px, 1.1vw, 14.5px); font-weight: 600; color: var(--w12-ink2); letter-spacing: .02em; }
/* stat382: the jobs still to open + the next opening, one centred line under the numbers (wraps on phones) */
.w12-stats .w12-soon { margin: 10px auto 0; width: min(var(--w12-wrap), 100%); text-align: center; font-size: clamp(12.5px, 1.15vw, 15px); font-weight: 600; color: var(--w12-ink2); line-height: 1.45; overflow-wrap: anywhere; }
.w12-stats .w12-soon[hidden] { display: none; }

/* ---------------------------------------------------------------- why play */
.w12-why-big { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.w12-why-big > li { display: grid; grid-template-rows: auto 1fr; }
.w12-why-big .w12-art { aspect-ratio: 16 / 9; }
.w12-why-big .w12-txt { display: grid; gap: 8px; align-content: start; padding: clamp(16px, 2vw, 24px); }
.w12-why-big h3 { font-family: var(--w12-serif); font-size: clamp(20px, 2.2vw, 26px); color: var(--w12-head); }
.w12-why-big p, .w12-mini p, .w12-mode p, .w12-extras p { color: var(--w12-ink2); font-size: 15px; line-height: 1.65; }
.w12-why-jobs { display: flex; align-items: flex-end; justify-content: center; height: 100%; padding: 12px 8px 0; gap: 0;
  background: radial-gradient(70% 90% at 50% 100%, rgba(246, 215, 126, .38), transparent 70%), linear-gradient(180deg, #1c3a7a, #0b1636); }
.w12-why-jobs .w12-jf { width: 18%; max-width: 120px; margin-inline: -1.5%; }
.w12-why-jobs .w12-jf:nth-child(3), .w12-why-jobs .w12-jf:nth-child(4) { width: 21%; max-width: 140px; z-index: 1; }
:root[data-theme="light"] .w12-why-jobs { background: radial-gradient(70% 90% at 50% 100%, rgba(255, 220, 140, .8), transparent 70%), linear-gradient(180deg, #8fb2e6, #f2d6a8); }
.w12-why-small { list-style: none; margin: clamp(14px, 2vw, 22px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.w12-mini { display: grid; gap: 10px; align-content: start; padding: 18px; }
.w12-mini h3 { font-size: 17.5px; color: var(--w12-head); }

/* job art: one strip of 18 frames (public/assets/web12/jobs.webp, 200 × 240 each) */
.w12-jf { display: block; aspect-ratio: 200 / 240; background: url("/assets/web12/jobs.webp") no-repeat 0 0 / 1800% 100%; }
.w12-jf[data-j="1"] { background-position-x: calc(100% / 17 * 1); } .w12-jf[data-j="2"] { background-position-x: calc(100% / 17 * 2); }
.w12-jf[data-j="3"] { background-position-x: calc(100% / 17 * 3); } .w12-jf[data-j="4"] { background-position-x: calc(100% / 17 * 4); }
.w12-jf[data-j="5"] { background-position-x: calc(100% / 17 * 5); } .w12-jf[data-j="6"] { background-position-x: calc(100% / 17 * 6); }
.w12-jf[data-j="7"] { background-position-x: calc(100% / 17 * 7); } .w12-jf[data-j="8"] { background-position-x: calc(100% / 17 * 8); }
.w12-jf[data-j="9"] { background-position-x: calc(100% / 17 * 9); } .w12-jf[data-j="10"] { background-position-x: calc(100% / 17 * 10); }
.w12-jf[data-j="11"] { background-position-x: calc(100% / 17 * 11); } .w12-jf[data-j="12"] { background-position-x: calc(100% / 17 * 12); }
.w12-jf[data-j="13"] { background-position-x: calc(100% / 17 * 13); } .w12-jf[data-j="14"] { background-position-x: calc(100% / 17 * 14); }
.w12-jf[data-j="15"] { background-position-x: calc(100% / 17 * 15); } .w12-jf[data-j="16"] { background-position-x: calc(100% / 17 * 16); }
.w12-jf[data-j="17"] { background-position-x: 100%; }

/* ---------------------------------------------------------------- graphics in depth */
.w12-gfx { margin-block-start: clamp(30px, 5vw, 56px); padding-inline: 0; }
.site .w2-gfx .w12-gfx { width: 100%; }
.w12-modes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); /* web410: five modes (+ 3D RealWorld) */ gap: clamp(12px, 1.6vw, 18px); }
.w12-mode { display: grid; grid-template-rows: auto auto 1fr auto; gap: 8px; padding: 0 0 16px; border-radius: var(--w12-r); background: var(--w12-card); border: 1px solid var(--w12-line2); box-shadow: var(--w12-shadow); overflow: hidden; }
.w12-mode.is-def { border-color: var(--w12-acc); box-shadow: 0 0 0 2px var(--w12-glow), var(--w12-shadow); }
.w12-mode .w12-art { aspect-ratio: 16 / 10; }
.w12-mode h3 { padding-inline: 16px; font-size: 17px; color: var(--w12-head); }
.w12-mode p { padding-inline: 16px; font-size: 14px; }
.w12-for { display: flex; align-items: center; gap: 8px; font-size: 13px !important; color: var(--w12-mute) !important; }
.w12-meter { display: inline-flex; gap: 3px; flex: none; }
.w12-meter i { width: 6px; height: 14px; border-radius: 2px; background: var(--w12-line2); }
.w12-meter[data-lvl="1"] i:nth-child(-n+1), .w12-meter[data-lvl="2"] i:nth-child(-n+2), .w12-meter[data-lvl="3"] i:nth-child(-n+3), .w12-meter[data-lvl="4"] i:nth-child(-n+4), .w12-meter[data-lvl="5"] i { background: var(--w12-gold); } /* web410: five steps */
.w12-qual { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(16px, 3vw, 36px); align-items: center; margin-block-start: clamp(22px, 3vw, 36px); padding: clamp(16px, 2.4vw, 28px);
  border-radius: var(--w12-r); background: var(--w12-card); border: 1px solid var(--w12-line2); box-shadow: var(--w12-shadow); }
.w12-qual-txt { display: grid; gap: 10px; }
.w12-qual h3 { font-family: var(--w12-serif); font-size: clamp(20px, 2.2vw, 26px); color: var(--w12-head); }
.w12-qual-txt > p { color: var(--w12-ink2); font-size: 15px; line-height: 1.65; }
.w12-qlist { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; counter-reset: q; }
.w12-qlist li { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr); gap: 10px; align-items: baseline; padding: 7px 12px; border-radius: 12px; background: rgba(255, 255, 255, .04); border: 1px solid var(--w12-line); font-size: 14px; }
:root[data-theme="light"] .w12-qlist li { background: rgba(255, 255, 255, .6); }
.w12-qlist b { color: var(--w12-acc); }
.w12-qlist span { color: var(--w12-ink2); }
.w12-qpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.w12-qpair figure { margin: 0; position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--w12-line2); aspect-ratio: 16 / 10; background: #0b1530; }
.w12-qpair img { display: block; width: 100%; height: 100%; object-fit: cover; }
.w12-qpair figcaption { position: absolute; inset-block-end: 8px; inset-inline-start: 8px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff6dc; background: rgba(5, 10, 26, .72); border: 1px solid rgba(246, 215, 126, .5); }
.w12-qpair figure:last-child figcaption { color: #2a1700; background: var(--w12-gold); border-color: #fff0b8; }
.w12-extras { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.w12-extras li { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--w12-card); border: 1px solid var(--w12-line); }
.w12-extras .w12-ic { width: 44px; height: 44px; border-radius: 13px; }
.w12-extras .w12-ic svg { width: 26px; height: 26px; }
.w12-extras h4 { font-size: 16px; color: var(--w12-head); margin: 0 0 4px; }
.w12-extras p { font-size: 14px; }

/* ---------------------------------------------------------------- jobs carousel */
.w12-car { position: relative; }
.w12-track { list-style: none; margin: 0; padding: 6px 4px 14px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(136px, 17vw, 176px); gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 4px; scrollbar-width: thin; scrollbar-color: var(--w12-acc2) transparent; -webkit-overflow-scrolling: touch; }
.w12-track:focus-visible { outline: 3px solid var(--w12-acc); outline-offset: 2px; border-radius: 16px; }
.w12-job { scroll-snap-align: start; display: grid; justify-items: center; text-align: center; gap: 2px; padding: 10px 8px 14px; border-radius: 18px; border: 1px solid var(--w12-line2);
  background: radial-gradient(90% 60% at 50% 72%, var(--w12-glow), transparent 70%), var(--w12-card); box-shadow: var(--w12-shadow); }
.w12-job .w12-jf { width: 100%; max-width: 150px; transition: transform .3s ease; }
.w12-job:hover .w12-jf { transform: translateY(-4px) scale(1.04); }
.w12-job b { font-size: 16px; color: var(--w12-head); line-height: 1.25; }
.w12-job small { font-size: 12.5px; color: var(--w12-mute); line-height: 1.35; }
.w12-job[data-role="tank"] { --w12-glow: rgba(110, 160, 255, .26); } .w12-job[data-role="magic"] { --w12-glow: rgba(178, 124, 255, .26); }
.w12-job[data-role="ranged"] { --w12-glow: rgba(120, 220, 160, .24); } .w12-job[data-role="support"] { --w12-glow: rgba(255, 214, 120, .3); }
.w12-job[data-role="melee"] { --w12-glow: rgba(255, 120, 110, .24); } .w12-job[data-role="special"] { --w12-glow: rgba(255, 170, 90, .26); }
.w12-car-b { position: absolute; inset-block-start: calc(50% - 30px); z-index: 2; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #2a1700; background: var(--w12-gold); border: 1px solid #fff0b8; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); transition: opacity .2s ease; }
.w12-car-b svg { width: 22px; height: 22px; }
.w12-car-b.prev { inset-inline-start: -10px; } .w12-car-b.next { inset-inline-end: -10px; }
[dir="rtl"] .w12-car-b svg { transform: scaleX(-1); }
.w12-car-b:disabled { opacity: 0; pointer-events: none; }
.w12-car.fits .w12-car-b { display: none; }

/* ---------------------------------------------------------------- the world */
.w12-world { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 52px); align-items: center; }
.w12-world .w12-head { justify-items: start; text-align: start; }
.w12-world .w12-head h2::after { margin-inline: 0; }
.w12-world-pics { position: relative; padding-block-end: 16%; }
.w12-world-pics figure { margin: 0; position: relative; border-radius: 18px; overflow: hidden; border: 1px solid var(--w12-line2); box-shadow: var(--w12-shadow); background: #0b1530; }
.w12-world-pics img { display: block; width: 100%; height: 100%; object-fit: cover; }
.w12-wp1 { aspect-ratio: 16 / 10; width: 88%; }
.w12-wp2 { position: absolute !important; aspect-ratio: 16 / 10; width: 56%; inset-inline-end: 0; inset-block-end: 0; border: 3px solid var(--w12-acc2) !important; }
.w12-world-pics figcaption { position: absolute; inset-block-end: 8px; inset-inline-start: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #fff6dc; background: rgba(5, 10, 26, .7); }
.w12-chips { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.w12-chips li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--w12-card); border: 1px solid var(--w12-line); font-weight: 600; font-size: 14.5px; color: var(--w12-ink); }
.w12-chips .w12-ic { width: 38px; height: 38px; border-radius: 11px; }
.w12-chips .w12-ic svg { width: 22px; height: 22px; }

/* ---------------------------------------------------------------- closing call */
.w12-cta { padding: clamp(40px, 7vw, 90px) 16px; background: radial-gradient(60% 80% at 50% 100%, rgba(246, 205, 110, .3), transparent 70%), var(--w12-band); border-block-start: 1px solid var(--w12-line2); text-align: center; }
.w12-cta-in { display: grid; justify-items: center; gap: 14px; width: min(760px, 100%); margin: 0 auto; }
.w12-cta h2 { font-family: var(--w12-serif); font-size: clamp(28px, 4.6vw, 52px); text-wrap: balance; background: var(--w12-headgrad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.w12-cta p { margin: 0; color: var(--w12-ink2); font-size: clamp(15px, 1.4vw, 18px); max-width: 52ch; }
.w12-cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-block-start: 6px; }
.w12-cta .w12-gold { min-height: 58px; padding-inline: 38px; font-size: 19px; }

/* ================================================================ the game's website at / (site.js) */
.site.w12 { --s-page: linear-gradient(180deg, var(--w12-bg1), var(--w12-bg0)); background: var(--s-page); color: var(--w12-ink); }
:root:not([data-theme="light"]) .site.w12 { --s-page: radial-gradient(1400px 800px at 50% 0%, rgba(38, 69, 127, .4), transparent 70%), linear-gradient(180deg, #08112b, #050a1a); }
.site.w12 .site-main { gap: clamp(40px, 6.5vw, 96px); }
.site.w12 .site-main > *, .w12-car, .w12-track, .w12-sec { min-width: 0; } /* grid items: the jobs track scrolls instead of widening the page */
.site.w12 .w12-stats { margin-block-start: calc(-1 * clamp(40px, 6.5vw, 96px)); }
/* top bar: glass navy by night, ivory glass by day; the horizontal logo has a light twin */
.site.w12 .site-bar { background: linear-gradient(rgba(6, 12, 32, .9), rgba(6, 12, 32, .66)); border-block-end: 1px solid rgba(246, 215, 126, .35); }
:root[data-theme="light"] .site.w12 .site-bar { background: linear-gradient(rgba(255, 251, 242, .94), rgba(255, 248, 232, .8)); border-block-end-color: rgba(160, 112, 36, .35); color: #14224a; }
:root[data-theme="light"] .site.w12 .site-nav-a { color: #22325f; }
:root[data-theme="light"] .site.w12 .site-nav-a:hover { background: rgba(20, 34, 74, .08); color: #14224a; }
.site.w12 .site-mark-logo.lt { display: none; }
:root[data-theme="light"] .site.w12 .site-mark-logo.dk { display: none; }
:root[data-theme="light"] .site.w12 .site-mark-logo.lt { display: block; filter: none; }
.site.w12 .site-nav-a { font-size: 14px; letter-spacing: .01em; }
.site.w12 .site-nav { flex-wrap: nowrap; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.site.w12 .site-nav::-webkit-scrollbar { display: none; }
.site.w12 .site-nav-a { white-space: nowrap; flex: none; }
[dir="rtl"] .site.w12 .site-nav { -webkit-mask-image: linear-gradient(270deg, #000 88%, transparent); mask-image: linear-gradient(270deg, #000 88%, transparent); }
/* the inline logo: navy words on a light page */
:root[data-theme="light"] .site .hero-logo .lg-ink { fill: #14224a; } /* the bars stay navy: their logo keeps its gold */
:root[data-theme="light"] .site .hero-logo { filter: drop-shadow(0 6px 18px rgba(255, 240, 210, .9)); }

/* hero: cinematic — logo reveal, a slow light sweep, the live count, a bigger call */
.site.w12 .site-hero { min-height: min(calc(100svh - 58px), 980px); overflow-x: clip; }
.site.w12 .hero-copy { gap: 16px; background: radial-gradient(ellipse 72% 58% at 50% 34%, var(--s-scrim), transparent 74%); }
.site.w12 .hero-h { position: relative; isolation: isolate; }
.site.w12 .hero-logo { width: min(500px, 86vw); }
.site.w12 .hero-tag { font-family: var(--w12-serif); font-size: clamp(22px, 3vw, 36px); letter-spacing: .02em; }
.site.w12 .hero-cta .btn { min-height: 54px; padding: 12px 32px; font-size: 18px; border-radius: 999px; }
.site.w12 .hero-play { position: relative; overflow: hidden; padding-inline: 40px !important; font-weight: 700; box-shadow: 0 0 0 4px rgba(255, 228, 143, .22), 0 12px 32px rgba(227, 169, 59, .55); }
.site.w12 .hero-play::after { content: ""; position: absolute; inset: -40% auto -40% -60%; width: 40%; transform: skewX(-20deg); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .65), transparent); animation: w12-shine 3.6s ease-in-out 1.6s infinite; }
.site.w12 .hero-chips li { border-color: rgba(246, 215, 126, .65); background: rgba(10, 22, 52, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 4px 13px; }
:root[data-theme="light"] .site.w12 .hero-chips li { background: rgba(255, 252, 244, .78); color: #14224a; border-color: rgba(160, 112, 36, .55); }
.w12-live { display: flex; justify-content: center; }
.w12-live .stat-line { display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 12px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: rgba(6, 14, 36, .62); border: 1px solid rgba(120, 230, 150, .45); color: #e8fff0 !important; }
.w12-live .stat-line::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #5ef08a; box-shadow: 0 0 0 0 rgba(94, 240, 138, .7); animation: w12-pulse 2s ease-out infinite; }
:root[data-theme="light"] .w12-live .stat-line { background: rgba(255, 252, 244, .85); color: #1d4a2c !important; border-color: rgba(40, 150, 80, .45); }
.w12-live .stat-line[hidden] { display: none; }
@keyframes w12-pulse { 70% { box-shadow: 0 0 0 9px rgba(94, 240, 138, 0); } 100% { box-shadow: 0 0 0 0 rgba(94, 240, 138, 0); } }
@keyframes w12-shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes w12-reveal { 0% { opacity: 0; transform: translateY(14px) scale(.93); filter: blur(8px) brightness(1.6); } 60% { filter: blur(0) brightness(1.25); } 100% { opacity: 1; transform: none; filter: none; } }
@keyframes w12-sweep { 0% { transform: translateX(-120%) skewX(-18deg); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateX(220%) skewX(-18deg); opacity: 0; } }
@keyframes w12-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.site.w12 .hero-h .logo-wrap { display: inline-block; animation: w12-reveal 1.5s cubic-bezier(.2, .7, .2, 1) both; }
.site.w12 .hero-h::after { content: ""; position: absolute; inset: 8% auto 30% 0; width: 34%; pointer-events: none; z-index: 1; mix-blend-mode: screen;
  background: linear-gradient(90deg, transparent, rgba(255, 244, 205, .55), transparent); animation: w12-sweep 1.8s ease-out 1s both; }
.site.w12 .hero-tag, .site.w12 .hero-sub, .site.w12 .hero-cta, .site.w12 .hero-chips, .site.w12 .w12-live { animation: w12-rise .9s ease both; }
.site.w12 .hero-tag { animation-delay: .5s; } .site.w12 .hero-sub { animation-delay: .65s; } .site.w12 .hero-cta { animation-delay: .8s; } .site.w12 .hero-chips { animation-delay: .95s; } .site.w12 .w12-live { animation-delay: 1.05s; }
@media (prefers-reduced-motion: reduce) {
  .site.w12 .hero-h .logo-wrap, .site.w12 .hero-h::after, .site.w12 .hero-play::after, .site.w12 .hero-tag, .site.w12 .hero-sub, .site.w12 .hero-cta, .site.w12 .hero-chips, .site.w12 .w12-live, .w12-live .stat-line::before { animation: none !important; }
  .site.w12 .hero-h::after { display: none; }
  .w12-btn, .w12-job .w12-jf { transition: none; }
}
/* the sign-in window: a premium card */
.site.w12 .login-box { border-radius: 18px; border: 1px solid rgba(246, 215, 126, .7); box-shadow: 0 0 0 1px rgba(90, 58, 10, .6), 0 0 0 6px rgba(246, 215, 126, .14), 0 24px 60px rgba(0, 0, 0, .5); overflow: hidden; }
.site.w12 .login-box .title-bar { border-radius: 12px; }
/* older section parts in the new skin */
.site.w12 .site-banner, .site.w12 .w2-head h2 { font-family: var(--w12-serif); }
.site.w12 .w2-head h2 { font-size: clamp(26px, 4vw, 44px); background: var(--w12-headgrad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.site.w12 .w2-sub { color: var(--w12-ink2); }
.site.w12 .w2-qa { border-radius: 14px; border: 1px solid var(--w12-line2); }
.site.w12 .w2-faq { width: min(900px, 100%); }
.site.w12 .site-foot { background: linear-gradient(180deg, #071029, #040917); }

/* ================================================================ the landing pages /<lang>/ (server/web2.js) */
body.w2 .w12-sec, body.w2 .w12-stats, body.w2 .w12-cta { font-family: var(--w2-sans); }
body.w2 .w12-sec { margin-block-start: clamp(48px, 7vw, 96px); }
body.w2 .w12-stats { margin-block-start: 0; }
.w2-theme { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; cursor: pointer; color: var(--w2-g2); background: rgba(16, 32, 73, .6); border: 1px solid var(--w2-line2); }
.w2-theme svg { width: 20px; height: 20px; }
.w2-theme .sun { display: none; }
:root[data-theme="light"] .w2-theme .sun { display: block; } :root[data-theme="light"] .w2-theme .moon { display: none; }
.w2-logo-h.lt { display: none !important; }
:root[data-theme="light"] .w2-logo-h.dk { display: none !important; } :root[data-theme="light"] .w2-logo-h.lt { display: block !important; }
.w2-logo.lt { display: none !important; }
:root[data-theme="light"] .w2-logo.dk { display: none !important; } :root[data-theme="light"] .w2-logo.lt { display: block !important; }
/* the landing hero: layered silhouettes (sky · far castle · temple town · near ledge) that drift with the scroll */
.w12-scene { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.w12-scene svg { position: absolute; left: 50%; bottom: -1px; width: max(100%, 760px); height: auto; display: block; transform: translateX(-50%); }
.w12-scene .l1 { transform: translate(-50%, calc(var(--w12y, 0) * 90px)); }
.w12-scene .l2 { transform: translate(-50%, calc(var(--w12y, 0) * 45px)); }
.w12-scene .sky { position: absolute; inset: 0; background: radial-gradient(60% 50% at 70% 26%, rgba(255, 236, 190, .28), transparent 70%), linear-gradient(180deg, #070d24 0%, #13214d 38%, #2b2f63 62%, #7a3f4f 86%, #d9814a 100%); }
:root[data-theme="light"] .w12-scene .sky { background: radial-gradient(50% 45% at 70% 70%, rgba(255, 240, 200, .9), transparent 70%), linear-gradient(180deg, #4d7fc9 0%, #86a9dd 30%, #f0b98a 66%, #f6a25e 86%, #ffd99a 100%); }
.w12-scene .moon { position: absolute; inset-inline-end: max(6%, calc(50% - 600px)); top: 12%; width: clamp(44px, 6vw, 90px); aspect-ratio: 1; border-radius: 50%; background: #fff3d0; box-shadow: 0 0 60px 20px rgba(255, 236, 190, .35); }
:root[data-theme="light"] .w12-scene .moon { top: 58%; background: #fff7dc; box-shadow: 0 0 90px 40px rgba(255, 214, 140, .6); }
.w12-scene .stars { position: absolute; inset: 0 0 40% 0; background-image: radial-gradient(1.4px 1.4px at 12% 22%, #fff8e1, transparent), radial-gradient(1px 1px at 28% 12%, #fff8e1, transparent), radial-gradient(1.6px 1.6px at 46% 30%, #fff8e1, transparent),
  radial-gradient(1px 1px at 62% 8%, #fff8e1, transparent), radial-gradient(1.3px 1.3px at 78% 36%, #fff8e1, transparent), radial-gradient(1px 1px at 90% 14%, #fff8e1, transparent), radial-gradient(1.2px 1.2px at 6% 48%, #fff8e1, transparent), radial-gradient(1px 1px at 36% 52%, #fff8e1, transparent); opacity: .85; animation: w12-twinkle 4s ease-in-out infinite alternate; }
:root[data-theme="light"] .w12-scene .stars { display: none; }
@keyframes w12-twinkle { to { opacity: .45; } }
.w12-scene .motes { position: absolute; inset: 0; background-image: radial-gradient(3px 3px at 20% 80%, rgba(255, 200, 110, .9), transparent), radial-gradient(2px 2px at 70% 70%, rgba(255, 200, 110, .8), transparent), radial-gradient(2.5px 2.5px at 45% 90%, rgba(255, 210, 120, .8), transparent), radial-gradient(2px 2px at 85% 85%, rgba(255, 190, 100, .8), transparent);
  animation: w12-motes 14s linear infinite; }
@keyframes w12-motes { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-60%); opacity: 0; } }
.w12-scene .f1 { fill: #26336a; } .w12-scene .f2 { fill: #1a2550; } .w12-scene .f3 { fill: #0b1024; }
:root[data-theme="light"] .w12-scene .f1 { fill: #8f86bd; } :root[data-theme="light"] .w12-scene .f2 { fill: #6f6aa3; } :root[data-theme="light"] .w12-scene .f3 { fill: #3b2c48; }
.w12-scene .win { fill: #ffcf7a; } :root[data-theme="light"] .w12-scene .win { fill: none; }
body.w2 .w2-hero { position: relative; isolation: isolate; }
body.w2 .w2-hero.w12-hero .w2-hero-bg { display: none; }
body.w2 .w2-hero.w12-hero .w2-hero-in { position: relative; z-index: 1; }
body.w2 .w12-hero .w2-logo { animation: w12-reveal 1.5s cubic-bezier(.2, .7, .2, 1) both; }
body.w2 .w12-hero .w2-tagline, body.w2 .w12-hero h1, body.w2 .w12-hero .w2-lead, body.w2 .w12-hero .w2-cta, body.w2 .w12-hero .w2-chips { animation: w12-rise .9s ease both; animation-delay: .6s; }
@media (prefers-reduced-motion: reduce) { body.w2 .w12-hero *, .w12-scene * { animation: none !important; } .w12-scene .l1, .w12-scene .l2 { transform: none; } }
/* day theme of the landing pages: the same tokens web2land.css reads */
:root[data-theme="light"] body.w2 {
  --w2-n0: #f7f0e1; --w2-n1: #fffaf0; --w2-n2: #f1e4c6; --w2-n3: #e6d3aa; --w2-n4: #d8bf8c;
  --w2-g1: #14224a; --w2-g2: #8f5f12; --w2-g3: #b88326; --w2-g4: #8a5a12; --w2-g5: #5a3a0a;
  --w2-ink: #2a2116; --w2-ink2: #4c3f2e; --w2-muted: #7a6950; --w2-line: rgba(160, 112, 36, .22); --w2-line2: rgba(160, 112, 36, .5);
  --w2-card: linear-gradient(180deg, #fffdf8, #f6ead0);
  color-scheme: light; background-color: var(--w2-n0);
  background-image: radial-gradient(1200px 700px at 50% -10%, rgba(255, 255, 255, .9), transparent 70%), radial-gradient(900px 600px at 100% 40%, rgba(222, 170, 69, .1), transparent 70%);
}
:root[data-theme="light"] body.w2 .w2-bar { background: rgba(255, 250, 240, .9); border-block-end-color: rgba(160, 112, 36, .35); }
:root[data-theme="light"] body.w2 .w2-nav a { color: #22325f; }
:root[data-theme="light"] body.w2 .w2-btn:not(.w2-btn-gold) { background: rgba(255, 255, 255, .7); color: #14224a; }
:root[data-theme="light"] body.w2 .w2-theme { background: rgba(255, 255, 255, .8); color: #8f5f12; }
:root[data-theme="light"] body.w2 .w2-lang summary { background: rgba(255, 255, 255, .8); color: #14224a; }
:root[data-theme="light"] body.w2 .w2-lang-list { background: #fffaf0; }
:root[data-theme="light"] body.w2 .w2-foot { background: #efe2c3; color: #4c3f2e; }
:root[data-theme="light"] body.w2 .w2-hero h1, :root[data-theme="light"] body.w2 .w2-tagline { color: #14224a; text-shadow: 0 1px 12px rgba(255, 245, 225, .9); }
:root[data-theme="light"] body.w2 .w2-chips li { background: rgba(255, 252, 244, .82); color: #14224a; border-color: rgba(160, 112, 36, .5); }
:root[data-theme="light"] body.w2 .w2-lead { color: #2f2a3c; text-shadow: 0 1px 10px rgba(255, 245, 225, .9); }

/* ================================================================ account page (screens.js showSelect) */
#scr-select { background: radial-gradient(1100px 700px at 50% -10%, rgba(38, 69, 127, .5), transparent 70%), linear-gradient(180deg, #0a1430, #050a1a); }
:root[data-theme="light"] #scr-select { background: radial-gradient(1100px 700px at 50% -10%, rgba(255, 255, 255, .95), transparent 70%), linear-gradient(180deg, #f8f0de, #ecdcb8); }
.sel-wrap.w12-acc .topbar { position: relative; z-index: 6; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; overflow: visible; padding: 8px 12px; border-radius: 18px;
  background: linear-gradient(180deg, #1a3168 0%, #0f1f4a 60%, #0b173a 100%); border: 1px solid rgba(246, 215, 126, .6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 0 0 3px rgba(246, 215, 126, .1), 0 12px 30px rgba(0, 0, 0, .3); }
.sel-wrap.w12-acc .topbar > * { flex: none; }
.sel-wrap.w12-acc .topbar .brand { flex: 0 1 150px; min-width: 70px; margin-inline-end: auto; }
.sel-wrap.w12-acc .topbar .brand .logo-wrap, .sel-wrap.w12-acc .topbar .brand-logo.small { display: block; width: 100%; max-width: 150px; height: auto; }
.sel-wrap.w12-acc .top-more-btn { display: inline-flex !important; align-items: center; gap: 6px; min-height: 40px; min-width: 44px; border-radius: 999px; }
.sel-wrap.w12-acc .top-more-btn .tmb-t { display: inline; }
/* the menu: a drawer of tiles under the bar (every width) */
.sel-wrap.w12-acc .top-more { display: none !important; position: absolute; top: calc(100% + 8px); inset-inline-end: 0; z-index: 30; width: min(460px, calc(100vw - 20px)); max-height: min(78svh, 640px); overflow-y: auto;
  grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 38, 84, .97), rgba(8, 16, 40, .98)); border: 1px solid rgba(246, 215, 126, .6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .1); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.sel-wrap.w12-acc .topbar.open .top-more { display: grid !important; animation: w12-drop .18s ease-out both; }
@keyframes w12-drop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
:root[data-theme="light"] .sel-wrap.w12-acc .top-more { background: linear-gradient(180deg, rgba(255, 252, 244, .98), rgba(246, 236, 212, .98)); border-color: rgba(160, 112, 36, .55); box-shadow: 0 24px 60px rgba(90, 60, 10, .25); }
.sel-wrap.w12-acc .top-more > .btn, .sel-wrap.w12-acc .top-more > a.btn { display: grid !important; justify-items: center; align-content: center; gap: 6px; min-height: 76px; padding: 10px 6px !important; margin: 0;
  border-radius: 16px !important; font-size: 13px !important; line-height: 1.25; text-align: center; white-space: normal; word-break: break-word;
  --btn-bg: linear-gradient(180deg, rgba(42, 74, 140, .7), rgba(18, 34, 76, .85)); --btn-ink: #fff6dc; border: 1px solid rgba(246, 215, 126, .38) !important; box-shadow: none; }
:root[data-theme="light"] .sel-wrap.w12-acc .top-more > .btn, :root[data-theme="light"] .sel-wrap.w12-acc .top-more > a.btn { --btn-bg: linear-gradient(180deg, #fffdf7, #f4e6c4); --btn-ink: #2a2116; border-color: rgba(160, 112, 36, .4) !important; }
.sel-wrap.w12-acc .top-more > .btn:hover { border-color: rgba(246, 215, 126, .85) !important; transform: translateY(-1px); }
.sel-wrap.w12-acc .w12-mi-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; color: #2a1700; background: var(--w12-gold); box-shadow: 0 4px 10px rgba(222, 170, 69, .3); }
.sel-wrap.w12-acc .w12-mi-ic svg { width: 20px; height: 20px; }
.sel-wrap.w12-acc .top-more > .w12-mi-out { --btn-bg: linear-gradient(180deg, rgba(120, 40, 50, .55), rgba(70, 18, 28, .75)); }
:root[data-theme="light"] .sel-wrap.w12-acc .top-more > .w12-mi-out { --btn-bg: linear-gradient(180deg, #fff3f0, #f6d9d2); }
.sel-wrap.w12-acc .top-more > .theme-btn, .sel-wrap.w12-acc .top-more > .lang-btn { display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px; width: auto; max-width: none; height: auto; min-height: 76px; margin: 0;
  padding: 10px 6px; border-radius: 16px !important; font-size: 13px; --btn-bg: linear-gradient(180deg, rgba(42, 74, 140, .7), rgba(18, 34, 76, .85)); --btn-ink: #fff6dc; background: var(--btn-bg); color: var(--btn-ink); border: 1px solid rgba(246, 215, 126, .38) !important; }
:root[data-theme="light"] .sel-wrap.w12-acc .top-more > .theme-btn, :root[data-theme="light"] .sel-wrap.w12-acc .top-more > .lang-btn { --btn-bg: linear-gradient(180deg, #fffdf7, #f4e6c4); --btn-ink: #2a2116; border-color: rgba(160, 112, 36, .4) !important; }
.sel-wrap.w12-acc .top-more > .theme-btn svg, .sel-wrap.w12-acc .top-more > .lang-btn svg { width: 24px; height: 24px; color: var(--w12-acc); }
.sel-wrap.w12-acc .fv-sel-btns .btn { --btn-bg: linear-gradient(180deg, rgba(42, 74, 140, .85), rgba(18, 34, 76, .95)); --btn-ink: #fff6dc; border-color: rgba(246, 215, 126, .6); }
:root[data-theme="light"] .sel-wrap.w12-acc .fv-sel-btns .btn { --btn-bg: linear-gradient(180deg, #fffdf7, #f1e2bf); --btn-ink: #2a2116; }
/* the character list + preview */
.sel-wrap.w12-acc .slots { border-radius: 20px; background: var(--w12-card); border: 1px solid var(--w12-line2); box-shadow: var(--w12-shadow); }
.sel-wrap.w12-acc .slot { border-radius: 16px; background: radial-gradient(80% 60% at 50% 70%, rgba(246, 215, 126, .16), transparent 70%), rgba(255, 255, 255, .03); border: 1px solid var(--w12-line2); transition: transform .15s ease, border-color .15s ease; }
:root[data-theme="light"] .sel-wrap.w12-acc .slot { background: radial-gradient(80% 60% at 50% 70%, rgba(255, 214, 120, .3), transparent 70%), #fffdf6; }
.sel-wrap.w12-acc .slot:hover { transform: translateY(-2px); }
.sel-wrap.w12-acc .slot.on { border-color: var(--w12-acc); box-shadow: 0 0 0 2px var(--w12-glow), 0 10px 24px rgba(0, 0, 0, .2); }
.sel-wrap.w12-acc .slot .nm { font-weight: 700; color: var(--w12-head); }
.sel-wrap.w12-acc .preview { border-radius: 20px; border: 1px solid rgba(246, 215, 126, .6); overflow-y: auto; overflow-x: hidden; grid-template-rows: auto minmax(150px, 1fr) auto;
  background: radial-gradient(70% 50% at 50% 45%, rgba(246, 215, 126, .14), transparent 70%), linear-gradient(180deg, #16295a, #0b1638); }
:root[data-theme="light"] .sel-wrap.w12-acc .preview { background: radial-gradient(70% 50% at 50% 45%, rgba(255, 214, 120, .35), transparent 70%), linear-gradient(180deg, #fffcf3, #f3e5c5); }
.sel-wrap.w12-acc .preview .sel-stage { min-height: 150px; }
.sel-wrap.w12-acc .sel-name { font-family: var(--w12-serif); font-size: 22px; color: var(--w12-head); }
/* the crypto ticker: one tidy line */
.sel-wrap.w12-acc .preview .ticker { border-radius: 12px; border: 1px solid var(--w12-line); background: rgba(0, 0, 0, .18); font-size: 13px; }
:root[data-theme="light"] .sel-wrap.w12-acc .preview .ticker { background: rgba(255, 255, 255, .6); }
/* the offline-farm card: text and buttons in their own rows — never under the character art */
.sel-wrap.w12-acc .fv-sel { position: relative; z-index: 2; display: grid !important; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(30, 60, 130, .55), rgba(10, 22, 56, .8)); border: 1px solid rgba(120, 170, 255, .45); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.sel-wrap.w12-acc .fv-sel[hidden] { display: none !important; }
:root[data-theme="light"] .sel-wrap.w12-acc .fv-sel { background: linear-gradient(180deg, #f2f7ff, #e2ecfb); border-color: rgba(60, 100, 180, .4); }
.sel-wrap.w12-acc .fv-sel-t { display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.sel-wrap.w12-acc .fv-sel-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sel-wrap.w12-acc .fv-sel-btns .btn { flex: 1 1 150px; min-height: 40px; border-radius: 999px; }
.sel-wrap.w12-acc .fv-rep { display: grid; gap: 2px; margin-block-start: 4px; padding-block-start: 8px; border-block-start: 1px dashed var(--w12-line2); }
.sel-wrap.w12-acc .sel-btns .btn.gold { min-height: 48px; font-size: 17px; border-radius: 999px; }

/* phones (portrait): one scrolling column — preview first with a fixed stage, then the farm card, then the list */
@media (max-width: 760px) and (orientation: portrait), (max-width: 520px) {
  .sel-wrap.w12-acc { display: block; overflow-y: auto; }
  .sel-wrap.w12-acc > * + * { margin-block-start: 10px; }
  .sel-wrap.w12-acc .topbar { gap: 6px; padding: 6px 8px; }
  .sel-wrap.w12-acc .topbar .brand { flex-basis: 120px; }
  .sel-wrap.w12-acc .top-more-btn .tmb-t { display: none; }
  .sel-wrap.w12-acc .sel-main { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
  .sel-wrap.w12-acc .sel-main > * { flex: none; }
  .sel-wrap.w12-acc .preview { order: -1; display: grid; grid-template-rows: auto clamp(150px, 42vw, 220px) auto; height: auto; min-height: 0; overflow: visible; }
  .sel-wrap.w12-acc .preview .sel-stage { min-height: 0; height: 100%; }
  .sel-wrap.w12-acc .top-more { top: calc(100% + 8px); inset-inline: 0; width: auto; }
}
@media (max-width: 360px) { .sel-wrap.w12-acc .top-more { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ================================================================ responsive: the new sections */
@media (max-width: 1100px) {
  .w12-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w12-why-small { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w12-extras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .w12-qual { grid-template-columns: minmax(0, 1fr); }
  .w12-world { grid-template-columns: minmax(0, 1fr); }
  .w12-world .w12-head { justify-items: center; text-align: center; }
  .w12-world .w12-head h2::after { margin-inline: auto; }
  .w12-stats ul { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
  .w12-stats li:nth-child(4)::before { display: none; }
}
@media (max-width: 680px) {
  .w12-why-big { grid-template-columns: minmax(0, 1fr); }
  .w12-car-b { display: none; }
  .w12-track { grid-auto-columns: 42%; margin-inline: -4px; }
}
/* web410: in the two-column layouts (tablets, near-square screens) the odd last mode card fills the row, picture beside the text */
@media (max-width: 1100px), (min-width: 900px) and (max-aspect-ratio: 5 / 4) {
  .w12-mode:last-child:nth-child(odd) { grid-column: 1 / -1; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: clamp(12px, 1.6vw, 18px); row-gap: 8px; padding: 0; padding-inline-end: 16px; }
  .w12-mode:last-child:nth-child(odd) .w12-art { grid-row: 1 / span 3; }
  .w12-mode:last-child:nth-child(odd) h3, .w12-mode:last-child:nth-child(odd) p { padding-inline: 0; }
  .w12-mode:last-child:nth-child(odd) h3 { padding-block-start: 16px; }
  .w12-mode:last-child:nth-child(odd) .w12-for { padding-block-end: 16px; }
}
@media (max-width: 520px) {
  .w12-modes { grid-template-columns: minmax(0, 1fr); }
  .w12-mode, .w12-mode:last-child:nth-child(odd) { grid-template-columns: 42% minmax(0, 1fr); grid-template-rows: auto auto 1fr; column-gap: 12px; row-gap: 4px; padding: 0; padding-inline-end: 12px; }
  .w12-mode:last-child:nth-child(odd) h3 { padding-block-start: 12px; }
  .w12-mode:last-child:nth-child(odd) .w12-for { padding-block-end: 12px; }
  .w12-mode .w12-art { grid-row: 1 / span 3; aspect-ratio: auto; height: 100%; min-height: 118px; }
  .w12-mode h3, .w12-mode p { padding-inline: 0; }
  .w12-mode h3 { padding-block-start: 12px; font-size: 15.5px; }
  .w12-mode p { font-size: 13px; line-height: 1.5; }
  .w12-mode .w12-for { padding-block-end: 12px; }
  .w12-extras { grid-template-columns: minmax(0, 1fr); }
  .w12-why-small { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
  .w12-mini { padding: 14px; }
  .w12-mini .w12-ic { width: 44px; height: 44px; }
  .w12-mini p { font-size: 13.5px; }
  .w12-chips { grid-template-columns: minmax(0, 1fr); }
  .w12-qlist li { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .w12-btn { padding-inline: 22px; }
}
@media (max-width: 520px) { .w2-gfx .w2-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .w2-gfx .w2-tab:last-child:nth-child(odd) { grid-column: 1 / -1; } /* web410: five modes */ .w12-scene .moon { top: 5%; width: 40px; } }
@media (max-width: 380px) { .w12-why-small { grid-template-columns: minmax(0, 1fr); } .w12-track { grid-auto-columns: 58%; } }
/* wide and near-square screens (unfolded foldables, tablets in landscape, Mate XT full): use the width */
@media (min-width: 900px) and (max-aspect-ratio: 5 / 4) {
  .w12-why-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w12-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1500px) { :root { --w12-wrap: 1320px; } .w12-track { grid-auto-columns: 180px; } }
/* phone landscape: shorter hero, keep the call in view */
@media (max-height: 480px) and (orientation: landscape) {
  .site.w12 .hero-logo { width: min(300px, 46vw); }
  .site.w12 .hero-copy { gap: 8px; }
  .w12-stats b { font-size: 24px; }
}

/* ================================================================ bots: the /afk status page and the Online bots window */
.afk-scr { background: radial-gradient(1100px 700px at 50% -10%, rgba(38, 69, 127, .5), transparent 70%), linear-gradient(180deg, #0a1430, #050a1a); }
:root[data-theme="light"] .afk-scr { background: radial-gradient(1100px 700px at 50% -10%, rgba(255, 255, 255, .95), transparent 70%), linear-gradient(180deg, #f8f0de, #ecdcb8); }
.afk-logo.w12-afk-logo { background: none; padding: 0; width: 48px; height: 48px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35)); }
.afk-logo.w12-afk-logo img { width: 100%; height: 100%; display: block; }
.afk-head h1 { font-family: var(--w12-serif); color: var(--w12-head); }
.afk-page .afk-card { border-radius: 18px; border: 1px solid var(--w12-line2); background: var(--w12-card); box-shadow: var(--w12-shadow); color: var(--w12-ink); }
.afk-page .afk-run { border-color: rgba(120, 230, 150, .5); background: radial-gradient(80% 60% at 0% 0%, rgba(94, 240, 138, .14), transparent 60%), var(--w12-card); }
.afk-page .afk-clock { font-family: var(--w12-serif); font-size: clamp(28px, 6vw, 44px); background: var(--w12-headgrad); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.b3-win .b3-card { border-radius: 16px; background: var(--w12-card); border: 1px solid var(--w12-line2); box-shadow: 0 8px 22px rgba(0, 0, 0, .18); color: var(--w12-ink); }
.b3-win .b3-name { font-family: var(--w12-serif); color: var(--w12-head); }
.b3-win .b3-clock { color: var(--w12-acc); }
/* the landing pages' gold buttons are links: keep their dark ink over the link colour (body.w2 a) */
body.w2 a.w2-btn-gold, body.w2 a.w12-gold { color: #2a1700; }
/* the site never grows past its screen (a flex column takes its content's width otherwise); tablets and unfolded
   foldables (≤ 1000 px) show the hero full width with the sign-in card under it */
.site.w12 { width: 100%; max-width: 100%; min-width: 0; }
@media (max-width: 1000px) {
  .site.w12 .site-hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .site.w12 .hero-art { grid-row: 1 / 2; grid-column: 1 / 2; }
  .site.w12 .hero-copy { min-height: min(calc(100svh - 58px), 820px); padding-block-end: clamp(170px, 26vh, 260px); }
  .site.w12 .hero-form { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 0; margin-block-start: -28px; }
  .site.w12 .login-box { width: min(460px, 100%); justify-self: center; }
}
/* guide451: the stats band holds 8 numbers (+ monster kinds, bosses & minibosses) — two rows of four, the monster line under it */
.w12-stats ul.g451 { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 14px; }
.w12-stats ul.g451 li:nth-child(4n + 1)::before { display: none; }
.w12-stats ul.g451 li:nth-child(4)::before { display: block; }
.w12-stats .w12-g451 { margin-top: 6px; }
@media (max-width: 520px) { .w12-stats ul.g451 { gap: 12px 6px; } .w12-stats ul.g451 b { font-size: 21px; } .w12-stats ul.g451 span { font-size: 11.5px; } }
