:root {
  --ink: #0b0807;
  --ink2: #120d0b;
  --gold: #e8c36a;
  --gold2: #f6dc9a;
  --ember: #ff7a2a;
  --text: #ecdfc8;
  --muted: #b3a389;
  --sun: #f0a94a;
  --moon: #a9c2f2;
  --serif: Cinzel, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
button { font: inherit; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---- header ---- */
.top { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; gap: 32px; padding: 14px 32px;
  background: linear-gradient(rgba(5,4,3,0.75), rgba(5,4,3,0)); transition: background .35s, padding .35s, box-shadow .35s; }
.top.solid { background: rgba(10,8,7,0.94); padding: 8px 32px; box-shadow: 0 1px 0 rgba(232,195,106,0.18), 0 8px 30px rgba(0,0,0,0.5); }
.brand img { height: 44px; width: auto; transition: height .35s; filter: drop-shadow(0 2px 6px rgba(0,0,0,.8)); }
.top.solid .brand img { height: 36px; }
.menu { display: flex; gap: 30px; flex: 1; }
.menu a { font-family: var(--serif); font-weight: 700; font-size: 15px; letter-spacing: .06em; color: #efe3cb; position: relative; padding: 8px 0; }
.menu a::after { content: ""; position: absolute; left: 50%; right: 50%; bottom: 2px; height: 1px; background: var(--gold); transition: left .25s, right .25s; }
.menu a:hover::after, .menu a.on::after { left: 0; right: 0; }
.top-right { display: flex; align-items: center; gap: 18px; }
.link-small { font-size: 14px; color: #e4d6bd; }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; letter-spacing: .08em;
  border-radius: 3px; transition: transform .2s, box-shadow .2s, filter .2s; text-transform: uppercase; }
.btn:hover { transform: translateY(-2px); }
.btn-small { padding: 10px 18px; font-size: 13px; }
.btn-big { padding: 18px 40px; font-size: 17px; min-width: 240px; }
.btn-gold { color: #1d1206; background: linear-gradient(180deg, #ffe3a1 0%, #e9b358 45%, #b8741f 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 0 1px #6b4512, 0 8px 30px rgba(255,140,40,.35); }
.btn-gold:hover { color: #1d1206; filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 1px #6b4512, 0 10px 40px rgba(255,150,50,.55); }
.btn-ghost { color: var(--gold2); border: 1px solid rgba(232,195,106,.65); background: rgba(10,8,6,.45); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgba(232,195,106,.12); color: #fff3d6; }

/* ---- side dots ---- */
.dots { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 40; display: flex; flex-direction: column; gap: 14px; }
.dots a { width: 10px; height: 10px; position: relative; display: block; transform: rotate(45deg); border: 1px solid rgba(232,195,106,.7); background: rgba(0,0,0,.7); transition: background .25s, transform .25s; }
.dots a.on { background: var(--gold); transform: rotate(45deg) scale(1.25); box-shadow: 0 0 10px rgba(232,195,106,.8); }
.dots span { position: absolute; right: 22px; top: 50%; transform: rotate(-45deg) translate(0, -50%); transform-origin: right; white-space: nowrap;
  font-family: var(--serif); font-size: 12px; letter-spacing: .08em; color: var(--gold2); opacity: 0; pointer-events: none; transition: opacity .2s; }
.dots a:hover span { opacity: 1; }

/* ---- shared ---- */
.panel { position: relative; min-height: 100vh; scroll-snap-align: start; display: flex; align-items: center; padding: 110px 0 90px; overflow: hidden; }
.title { font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 3.4vw, 44px); color: var(--gold2); text-align: center; margin: 0 0 44px;
  letter-spacing: .05em; text-shadow: 0 2px 20px rgba(0,0,0,.8); }
.title em { font-style: normal; color: var(--gold); font-size: .6em; vertical-align: middle; margin: 0 14px; opacity: .8; }
.title.big { font-size: clamp(34px, 5vw, 68px); font-weight: 900; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; padding: 4px 9px; border-radius: 2px;
  background: rgba(10,8,6,.75); color: var(--gold2); border: 1px solid rgba(232,195,106,.5); }
.tag-new { background: linear-gradient(180deg, #ff9a3c, #c2471a); color: #fff; border-color: #ffb36b; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- hero ---- */
.hero { position: relative; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 28px; padding: 88px 0 64px; overflow: hidden; scroll-snap-align: start; }
.hero-bg { position: absolute; inset: -4%; background-size: cover; background-position: center 35%; animation: drift 26s ease-in-out infinite alternate; }
@keyframes drift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.1) translate(-1%, -1.5%); } }
.hero-shade { position: absolute; inset: 0; background:
  radial-gradient(ellipse at 50% 42%, rgba(0,0,0,0) 0%, rgba(0,0,0,.25) 55%, rgba(0,0,0,.7) 100%),
  linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 55%, rgba(11,8,7,.95) 92%, var(--ink) 100%); }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; flex: 1; justify-content: center; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 0 20px; }
/* v465: a soft dark halo behind the logo, so the broken crowns of the picture stay behind it */
.hero-inner::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 42%; width: min(1100px, 130vw); height: 120%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(ellipse closest-side, rgba(10,7,6,.82) 0%, rgba(10,7,6,.6) 45%, rgba(10,7,6,.25) 75%, rgba(10,7,6,0) 100%); }
.hero-logo { width: min(600px, 86vw, max(300px, calc((100vh - 470px) * 1.6))); filter: drop-shadow(0 12px 40px rgba(0,0,0,.9)) drop-shadow(0 0 30px rgba(255,170,60,.25)); }
.hero-tag { margin: 0; font-family: var(--serif); font-size: clamp(18px, 2.2vw, 28px); letter-spacing: .14em; color: #fff1d0; text-shadow: 0 2px 14px #000, 0 0 30px rgba(255,160,60,.4); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 14px; }
.hero-cta.reveal { transition-delay: .25s; }
.hero-cards { position: relative; z-index: 3; display: flex; gap: 16px; width: min(1100px, calc(100% - 48px)); flex: none; }
.hcard { flex: 1; position: relative; height: clamp(104px, 14vh, 132px); border-radius: 4px; overflow: hidden; border: 1px solid rgba(232,195,106,.35); display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px 16px; color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.6); transition: transform .25s, border-color .25s; }
.hcard img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.hcard::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 10%, rgba(0,0,0,.92) 100%); z-index: 1; }
.hcard > * { position: relative; z-index: 2; }
.hcard .tag { position: absolute; top: 12px; left: 14px; }
.hcard b { font-family: var(--serif); font-size: 19px; color: var(--gold2); }
.hcard i { font-style: normal; font-size: 13px; color: #d9ccb4; margin-top: 2px; }
.hcard:hover { transform: translateY(-4px); border-color: var(--gold); color: #fff; }
.hcard:hover img { transform: scale(1.07); }
.scroll-hint { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 3; width: 22px; height: 34px; border: 1px solid rgba(232,195,106,.7); border-radius: 12px; }
.scroll-hint span { position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px; background: var(--gold); border-radius: 2px; animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(12px); } }

/* ---- news ---- */
.news { background: radial-gradient(ellipse at 50% 0%, rgba(255,120,40,.12), transparent 55%), var(--ink2); }
.news-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: stretch; }
.news-feature { position: relative; border-radius: 4px; overflow: hidden; border: 1px solid rgba(232,195,106,.3); min-height: 320px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.news-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.news-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.9)); }
.nf-text { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 2; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.nf-text b { font-family: var(--serif); font-size: 28px; color: var(--gold2); }
.nf-text i { font-style: normal; color: #ddd0b8; font-size: 15px; line-height: 1.5; }
.news-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.news-list li { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 18px 6px; border-bottom: 1px solid rgba(232,195,106,.16); cursor: default; transition: background .2s; }
.news-list li:first-child { border-top: 1px solid rgba(232,195,106,.16); }
.news-list li:hover { background: rgba(232,195,106,.05); }
.nl-v { font-family: var(--serif); font-size: 13px; color: var(--ember); letter-spacing: .06em; }
.nl-t { font-size: 16px; color: #efe3cb; }
.nl-d { font-size: 13px; color: var(--muted); }
.news-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 18px; margin-top: 36px; font-family: var(--serif); font-size: 14px; letter-spacing: .08em; }
.news-links span { color: rgba(232,195,106,.5); }

/* ---- story ---- */
.story-bg, .play-bg { position: absolute; inset: 0; background-size: cover; background-position: center; filter: saturate(.8); }
.story-bg { opacity: .55; }
.story-shade { position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink2) 0%, rgba(8,6,5,.55) 30%, rgba(8,6,5,.6) 70%, var(--ink) 100%); }
.story-inner { position: relative; z-index: 2; text-align: center; }
.story-pages { position: relative; min-height: 210px; max-width: 760px; margin: 0 auto; }
.spage { position: absolute; inset: 0; opacity: 0; transform: translateY(14px); transition: opacity .6s, transform .6s; pointer-events: none; }
.spage.on { opacity: 1; transform: none; pointer-events: auto; }
.spage h3 { margin: 0 0 16px; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); color: #fff3d8; }
.spage p { margin: 0; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.8; color: #e6d9c0; text-shadow: 0 2px 10px #000; }
.timeline { position: relative; display: flex; justify-content: space-between; max-width: 820px; margin: 40px auto 0; }
.timeline::before { content: ""; position: absolute; left: 6%; right: 6%; top: 8px; height: 1px; background: linear-gradient(90deg, transparent, rgba(232,195,106,.7), transparent); }
.timeline button { position: relative; background: none; border: 0; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-family: var(--serif); font-size: 14px; letter-spacing: .06em; padding: 0 6px; min-height: 44px; transition: color .25s; }
.timeline button span:first-child { width: 16px; height: 16px; transform: rotate(45deg); border: 1px solid var(--gold); background: var(--ink); transition: background .25s, box-shadow .25s; }
.timeline button.on, .timeline button:hover { color: var(--gold2); }
.timeline button.on span:first-child { background: var(--gold); box-shadow: 0 0 14px rgba(255,200,100,.9); }

/* ---- kingdoms ---- */
.kbg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1.04); transition: opacity 1s, transform 6s ease-out; }
.kbg.on { opacity: 1; transform: scale(1); }
.kshade { position: absolute; inset: 0; background: linear-gradient(180deg, var(--ink) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 60%, var(--ink) 100%); }
.kbg.sun ~ .kshade { background: linear-gradient(180deg, var(--ink) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 62%, var(--ink) 100%), linear-gradient(270deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 70%); }
.kingdoms.moon-on .kshade { background: linear-gradient(180deg, var(--ink) 0%, rgba(0,0,0,0) 18%, rgba(0,0,0,0) 62%, var(--ink) 100%), linear-gradient(90deg, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 45%, rgba(0,0,0,0) 70%); }
.kingdoms-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.kingdoms.moon-on .kingdoms-inner { align-items: flex-start; text-align: left; }
.kingdoms-inner .title { text-align: inherit; }
.ktabs { display: flex; gap: 14px; margin-bottom: 26px; }
.ktab { min-width: 170px; min-height: 52px; padding: 10px 22px; cursor: pointer; border-radius: 3px; font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: .08em;
  background: rgba(10,8,6,.6); border: 1px solid rgba(232,195,106,.35); color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 10px; transition: all .3s; }
.ktab .sym { font-size: 22px; }
.ktab.sun.on { color: #fff0cf; border-color: var(--sun); background: linear-gradient(180deg, rgba(200,80,20,.55), rgba(90,25,8,.7)); box-shadow: 0 0 24px rgba(240,140,50,.4); }
.ktab.moon.on { color: #eef3ff; border-color: var(--moon); background: linear-gradient(180deg, rgba(50,80,160,.55), rgba(15,22,60,.7)); box-shadow: 0 0 24px rgba(140,170,240,.4); }
.kinfo { display: none; max-width: 520px; }
.kinfo.on { display: block; animation: fadein .7s; }
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.kmotto { margin: 0 0 6px; font-family: var(--serif); letter-spacing: .2em; font-size: 13px; text-transform: uppercase; }
.kinfo.sun .kmotto { color: var(--sun); }
.kinfo.moon .kmotto { color: var(--moon); }
.kinfo h3 { margin: 0 0 14px; font-family: var(--serif); font-size: clamp(26px, 3vw, 40px); color: #fff; text-shadow: 0 2px 16px #000; }
.kinfo p:last-child { margin: 0; font-size: 17px; line-height: 1.75; color: #e8dcc6; text-shadow: 0 2px 10px #000; }

/* ---- world ---- */
.world { background: radial-gradient(ellipse at 50% 100%, rgba(255,110,30,.12), transparent 60%), var(--ink2); }
.wgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.wcard { position: relative; border-radius: 4px; overflow: hidden; border: 1px solid rgba(232,195,106,.22); background: linear-gradient(180deg, #1a1310, #110c0a);
  min-height: 190px; display: flex; align-items: flex-end; background-size: cover; background-position: center; transition: transform .3s, border-color .3s; }
.wcard.wide { grid-column: span 2; min-height: 300px; }
.wcard.wide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 25%, rgba(0,0,0,.9) 100%); }
.wcard > div { position: relative; padding: 22px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.wcard h3 { margin: 0; font-family: var(--serif); font-size: 22px; color: var(--gold2); }
.wcard p { margin: 0; font-size: 15px; line-height: 1.6; color: #d6c8ae; }
.wcard:hover { transform: translateY(-4px); border-color: rgba(232,195,106,.6); }

/* ---- play ---- */
.play-bg { opacity: .45; background-position: center 30%; }
.play-shade { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 60%, rgba(0,0,0,.2), rgba(0,0,0,.75)), linear-gradient(180deg, var(--ink2), transparent 30%, transparent 70%, var(--ink)); }
.play-inner { position: relative; z-index: 2; text-align: center; }
.play-inner p { font-size: 18px; color: #e3d6bd; margin: -20px 0 26px; text-shadow: 0 2px 10px #000; }

/* ---- footer ---- */
.foot { border-top: 1px solid rgba(232,195,106,.18); background: #070504; padding: 40px 0 34px; }
.foot-inner { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.foot-logo { width: 150px; opacity: .85; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; font-size: 13px; }
.foot-links a { color: var(--muted); }
.foot p { margin: 0; font-size: 12px; color: #7d6f5c; }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 30px); z-index: 99; padding: 14px 26px; border: 1px solid rgba(232,195,106,.6); background: rgba(14,10,8,.95);
  color: var(--gold2); font-family: var(--serif); letter-spacing: .05em; border-radius: 3px; opacity: 0; pointer-events: none; transition: all .35s; box-shadow: 0 10px 40px rgba(0,0,0,.7); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- phones and tablets ---- */
@media (max-width: 960px) {
  .menu { display: none; }
  .top { padding: 10px 16px; gap: 12px; justify-content: space-between; }
  .top.solid { padding: 8px 16px; }
  .dots { display: none; }
  .scroll-hint { display: none; }
  .hero-cards { flex-direction: column; margin: 6px auto 0; width: calc(100% - 32px); }
  .hero { padding: 104px 0 64px; }
  .hero-logo { width: min(520px, 86vw); }
  .hcard { height: 110px; flex: none; }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .wgrid { grid-template-columns: minmax(0, 1fr); }
  .wcard.wide { grid-column: auto; }
  .kingdoms-inner, .kingdoms.moon-on .kingdoms-inner { align-items: center; text-align: center; }
  .kbg.sun ~ .kshade, .kingdoms.moon-on .kshade { background: linear-gradient(180deg, var(--ink) 0%, rgba(0,0,0,.45) 25%, rgba(0,0,0,.75) 70%, var(--ink) 100%); }
  .timeline { flex-wrap: wrap; gap: 14px; justify-content: center; }
  .timeline::before { display: none; }
  .story-pages { min-height: 300px; }
  .panel { padding: 90px 0 70px; }
  html { scroll-snap-type: none; }
}
@media (max-width: 520px) {
  .btn-big { min-width: 0; width: 100%; padding: 16px 20px; }
  .hero-cta { width: 100%; }
  .ktab { min-width: 0; flex: 1; }
  .news-list li { grid-template-columns: 52px 1fr; }
  .nl-d { display: none; }
  .news-links { flex-direction: column; align-items: center; }
  .news-links span { display: none; }
  .link-small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===================================================== v390: account pages (login, sign up, account, password) */
.sub { min-height: 100vh; display: flex; flex-direction: column; background: var(--ink); }
.sub .top { position: sticky; background: rgba(10,8,7,0.94); box-shadow: 0 1px 0 rgba(232,195,106,0.18); }
.sub-bg { position: fixed; inset: 0; background-size: cover; background-position: center 30%; opacity: .32; filter: saturate(.8) blur(1px); z-index: 0; }
.sub-bg::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,.2), rgba(0,0,0,.85)), linear-gradient(180deg, transparent 60%, var(--ink)); }
.sub-main { position: relative; z-index: 1; flex: 1; display: flex; justify-content: center; align-items: flex-start; padding: 70px 20px 90px; }
.card { width: 100%; max-width: 470px; padding: 38px 34px 32px; border: 1px solid rgba(232,195,106,.4); border-radius: 4px;
  background: linear-gradient(180deg, rgba(26,19,15,.96), rgba(14,10,8,.97)); box-shadow: 0 30px 80px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,220,150,.08); }
.card.wide { max-width: 880px; }
.card h1 { margin: 0 0 6px; text-align: center; font-family: var(--serif); font-weight: 900; font-size: 32px; letter-spacing: .05em; color: var(--gold2); }
.card .lead { margin: 0 0 26px; text-align: center; font-size: 14px; color: var(--muted); line-height: 1.6; }
.card .crest { display: block; width: 190px; margin: -10px auto 14px; filter: drop-shadow(0 6px 20px rgba(0,0,0,.8)); }
.form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: .04em; color: #d9cbb2; text-transform: uppercase; }
.field input { font: 400 16px var(--sans); letter-spacing: 0; text-transform: none; padding: 13px 14px; border-radius: 3px; color: #f4e9d4; background: #0c0907;
  border: 1px solid #4d3c29; transition: border-color .2s, box-shadow .2s; min-height: 48px; }
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,195,106,.18); }
.rules { list-style: none; margin: -6px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.rules li::before { content: "○"; display: inline-block; width: 18px; color: #8a7a62; }
.rules li.ok { color: #9fd08a; }
.rules li.ok::before { content: "✓"; color: #9fd08a; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: #cdbfa6; line-height: 1.5; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: #d9a046; }
.form .btn { width: 100%; min-height: 52px; font-size: 16px; border: 0; cursor: pointer; }
.form .btn[disabled] { opacity: .55; cursor: wait; transform: none; }
.msg { min-height: 20px; margin: 0; font-size: 14px; text-align: center; line-height: 1.5; }
.msg.err { color: #ff9a85; }
.msg.good { color: #a8dc8f; }
.alt { margin: 4px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.alt a { font-weight: 600; }
.hidden { display: none !important; }

.acc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; padding-bottom: 22px; border-bottom: 1px solid rgba(232,195,106,.18); }
.acc-head h1 { text-align: left; margin: 0; }
.acc-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.box { padding: 22px; border: 1px solid rgba(232,195,106,.2); border-radius: 3px; background: rgba(0,0,0,.25); }
.box h2 { margin: 0 0 14px; font-family: var(--serif); font-size: 19px; color: var(--gold2); letter-spacing: .04em; }
.box .val { margin: 0 0 14px; font-size: 15px; color: #efe3cb; word-break: break-all; }
.box .val small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.chars { grid-column: 1 / -1; }
.char-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.char { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid rgba(232,195,106,.22); border-radius: 3px; background: linear-gradient(180deg, rgba(40,28,20,.6), rgba(16,12,10,.6)); }
.char .ico { width: 46px; height: 46px; flex: none; display: grid; place-items: center; transform: rotate(45deg); border: 1px solid var(--gold); background: #1a120c; }
.char .ico span { transform: rotate(-45deg); font-family: var(--serif); font-weight: 900; font-size: 18px; color: var(--gold2); }
.char b { display: block; font-family: var(--serif); font-size: 17px; color: #fff1d4; }
.char i { font-style: normal; font-size: 13px; color: var(--muted); }
.empty { margin: 0; color: var(--muted); font-size: 14px; }
.btn-line { display: inline-flex; padding: 11px 18px; min-height: 44px; align-items: center; border: 1px solid rgba(232,195,106,.55); border-radius: 3px; background: transparent;
  color: var(--gold2); font-family: var(--serif); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
.btn-line:hover { background: rgba(232,195,106,.1); color: #fff2d2; }
.box .form { gap: 12px; }
.box .form .btn { min-height: 46px; font-size: 14px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #efe3cb; }
.who b { color: var(--gold2); font-weight: 600; }
@media (max-width: 760px) {
  .acc-grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 30px 20px 26px; }
}

/* ===================================================== v391: shared header bits, phone menu, the new pages */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.lang { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; padding: 0 12px; font: 500 13px var(--sans); color: #e9dcc4;
  background: rgba(0,0,0,.35); border: 1px solid rgba(232,195,106,.35); border-radius: 3px; cursor: pointer; }
.lang-btn::after { content: ""; width: 6px; height: 6px; margin: -3px 0 0 2px; border-right: 1.5px solid var(--gold); border-bottom: 1.5px solid var(--gold); transform: rotate(45deg); transition: transform .2s; }
.lang.open .lang-btn::after { transform: rotate(-135deg); margin-top: 3px; }
.lang-btn:hover, .lang.open .lang-btn { border-color: var(--gold); }
.flag { width: 22px; height: 15px; flex: none; border-radius: 2px; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.lang-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 190px; margin: 0; padding: 6px; list-style: none;
  background: rgba(14,10,8,.98); border: 1px solid rgba(232,195,106,.35); border-radius: 4px; box-shadow: 0 18px 40px rgba(0,0,0,.6);
  max-height: min(70vh, 560px); overflow-y: auto; }
.lang.open .lang-menu { display: block; }
.lang-menu button { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; padding: 0 12px; border: 0; border-radius: 3px;
  background: none; color: #e6d8bf; font: 500 14px var(--sans); text-align: left; cursor: pointer; }
.lang-menu button:hover { background: rgba(232,195,106,.1); color: #fff1d4; }
.lang-menu button.on { color: var(--gold2); background: rgba(232,195,106,.08); }
.lang-menu button.on::after { content: "✓"; margin-left: auto; color: var(--gold); }
.burger { display: none; width: 44px; height: 44px; padding: 11px 10px; border: 1px solid rgba(232,195,106,.4); border-radius: 3px; background: rgba(0,0,0,.35); cursor: pointer;
  flex-direction: column; justify-content: space-between; }
.burger span { display: block; height: 2px; background: var(--gold2); border-radius: 1px; transition: transform .25s, opacity .25s; }
.top.open .burger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.top.open .burger span:nth-child(2) { opacity: 0; }
.top.open .burger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.foot-links a:hover { color: var(--gold2); }
html:not(.i18n-ready) [data-t] { transition: none; }

@media (max-width: 960px) {
  .burger { display: flex; order: 3; }
  .top-right { gap: 10px; margin-left: auto; }
  .top.open { background: rgba(10,8,7,.98); }
  .top.open .menu { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 6px 0 14px;
    background: rgba(10,8,7,.98); border-bottom: 1px solid rgba(232,195,106,.25); box-shadow: 0 20px 40px rgba(0,0,0,.6); }
  .top.open .menu a { padding: 15px 24px; font-size: 17px; border-top: 1px solid rgba(232,195,106,.08); }
  .top.open .menu a::after { display: none; }
  .top.open .menu a.on { color: var(--gold2); background: rgba(232,195,106,.06); }
}
@media (max-width: 520px) {
  .brand img, .top.solid .brand img { height: 32px; }
  .lang-name { display: none; }
  .lang-btn { padding: 0 10px; gap: 7px; }
  .top-right .btn-small { padding: 9px 12px; font-size: 12px; }
}

/* ---- content pages (news, wiki, rankings, download, legal) */
.page { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 56px 24px 90px; }
.page-head { text-align: center; margin-bottom: 36px; }
.page-head h1 { margin: 0 0 10px; font-family: var(--serif); font-weight: 900; font-size: clamp(30px, 4vw, 46px); letter-spacing: .05em; color: var(--gold2); text-shadow: 0 2px 20px rgba(0,0,0,.8); }
.page-head p { margin: 0 auto; max-width: 640px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.search { display: block; position: relative; max-width: 520px; margin: 0 auto 28px; }
.search input { width: 100%; font: 400 16px var(--sans); color: #f4e9d4; background: rgba(8,6,5,.85); border: 1px solid #4d3c29; border-radius: 3px; padding: 13px 14px 13px 44px; min-height: 48px; }
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(232,195,106,.18); }
.search::before { content: ""; position: absolute; left: 16px; top: 15px; width: 12px; height: 12px; border: 2px solid var(--gold); border-radius: 50%; }
.search::after { content: ""; position: absolute; left: 28px; top: 29px; width: 7px; height: 2px; background: var(--gold); transform: rotate(45deg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 26px; }
.chip { font: 600 13px var(--sans); letter-spacing: .03em; color: #dccdb3; background: rgba(0,0,0,.4); border: 1px solid rgba(232,195,106,.28); border-radius: 999px; padding: 9px 16px; min-height: 40px; cursor: pointer; }
.chip:hover { border-color: rgba(232,195,106,.6); color: #fff1d4; }
.chip.on { color: #1d1206; background: linear-gradient(180deg, #ffe3a1, #d9a046); border-color: #b8741f; }
.note { text-align: center; color: var(--muted); font-size: 14px; margin: 30px 0; }
.panel-box { border: 1px solid rgba(232,195,106,.25); border-radius: 4px; background: linear-gradient(180deg, rgba(24,18,14,.94), rgba(12,9,7,.96)); box-shadow: 0 20px 60px rgba(0,0,0,.5); }

/* news */
.notes { display: flex; flex-direction: column; gap: 12px; max-width: 900px; margin: 0 auto; }
.pn { border: 1px solid rgba(232,195,106,.2); border-radius: 4px; background: rgba(16,12,9,.92); }
.pn > button { width: 100%; display: grid; grid-template-columns: 70px 1fr auto 20px; gap: 14px; align-items: center; text-align: left; padding: 18px 20px; min-height: 60px;
  background: none; border: 0; color: inherit; cursor: pointer; }
.pn > button::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .2s; justify-self: center; }
.pn.open > button::after { transform: rotate(-135deg); }
.pn > button:hover { background: rgba(232,195,106,.05); }
.pn .v { font-family: var(--serif); font-size: 14px; color: var(--ember); letter-spacing: .06em; }
.pn .t { font-family: var(--serif); font-weight: 700; font-size: 17px; color: #f4e6c9; }
.pn .d { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pn ul { display: none; margin: 0; padding: 4px 26px 22px 104px; color: #d8cab1; font-size: 15px; line-height: 1.65; }
.pn.open ul { display: block; }
.pn li { margin: 6px 0; }
.pn li::marker { color: var(--gold); }
mark { background: rgba(255,170,60,.35); color: #fff3dc; border-radius: 2px; padding: 0 1px; }
.more { display: flex; justify-content: center; margin-top: 26px; }

/* wiki */
.wiki { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.wnav { position: sticky; top: 84px; display: flex; flex-direction: column; padding: 10px; gap: 2px; }
.wnav a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 44px; border-radius: 3px; color: #e2d4ba; font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.wnav a:hover { background: rgba(232,195,106,.07); color: #fff1d4; }
.wnav a.on { background: rgba(232,195,106,.13); color: var(--gold2); box-shadow: inset 2px 0 0 var(--gold); }
.wnav a small { margin-left: auto; font: 500 12px var(--sans); color: var(--muted); }
.wbody { min-width: 0; }
.wbody .search { margin: 0 0 18px; max-width: none; }
.wbody .chips { justify-content: flex-start; }
.wgrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.ent { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid rgba(232,195,106,.18); border-radius: 4px; background: rgba(16,12,9,.9);
  color: inherit; text-align: left; cursor: pointer; min-height: 72px; font: inherit; width: 100%; }
.ent:hover { border-color: rgba(232,195,106,.5); background: rgba(30,22,16,.95); color: inherit; }
.ent img, .pic { width: 48px; height: 48px; flex: none; object-fit: contain; border-radius: 3px; background: radial-gradient(circle at 50% 40%, #2a1e14, #0c0907); border: 1px solid rgba(232,195,106,.22); }
.ent.mon img { width: 56px; height: 56px; object-fit: cover; }
.ent b { display: block; font-family: var(--serif); font-size: 15px; color: #f6e8cc; line-height: 1.3; }
.ent i { display: block; font-style: normal; font-size: 13px; color: var(--muted); margin-top: 3px; }
.rk { display: inline-block; font: 700 10px var(--sans); letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 2px; margin-left: 6px; vertical-align: 2px; }
.rk.elite { background: #3b2a55; color: #d6c2ff; }
.rk.boss { background: #5a1d14; color: #ffb59c; }
.rk.pvp { background: #4a1712; color: #ffab95; }
.rk.safe { background: #1d3a24; color: #a9e2b2; }
.detail { padding: 26px; }
.detail .back { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; margin: -8px 0 12px; font-size: 14px; font-weight: 600; background: none; border: 0; color: var(--gold); cursor: pointer; padding: 0; }
.dhead { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }
.dhead .pic { width: 84px; height: 84px; }
.dhead.mon .pic { width: 130px; height: 130px; object-fit: cover; }
.dhead h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 26px; color: var(--gold2); }
.dhead p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 0 0 22px; }
.stat { padding: 12px 14px; border: 1px solid rgba(232,195,106,.16); border-radius: 3px; background: rgba(0,0,0,.3); }
.stat span { display: block; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; margin-top: 4px; font-size: 17px; color: #f4e6c9; font-weight: 600; }
.detail h3 { margin: 22px 0 10px; font-family: var(--serif); font-size: 17px; letter-spacing: .04em; color: var(--gold2); }
.detail p.txt { color: #d8cab1; line-height: 1.7; font-size: 15px; margin: 0 0 12px; }
.tbl-wrap { overflow-x: auto; border: 1px solid rgba(232,195,106,.16); border-radius: 3px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: rgba(0,0,0,.35); padding: 11px 12px; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-top: 1px solid rgba(232,195,106,.1); color: #e5d8bf; vertical-align: middle; }
.tbl td.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th.n { text-align: right; }
.tbl tr:hover td { background: rgba(232,195,106,.04); }
.tbl a, .tbl button.lnk { color: var(--gold2); }
.lnk { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; color: var(--gold2); text-align: left; }
.lnk:hover { text-decoration: underline; }
.cell { display: flex; align-items: center; gap: 10px; }
.cell img { width: 30px; height: 30px; object-fit: contain; border-radius: 2px; background: #120d09; flex: none; }
.ul { margin: 0; padding-left: 20px; color: #d8cab1; line-height: 1.7; font-size: 15px; }
.cls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.path { margin-bottom: 18px; }
.path h4 { margin: 0 0 4px; font-family: var(--serif); font-size: 16px; color: #f4e6c9; }
.path > p { margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.sk { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px solid rgba(232,195,106,.1); }
.sk img { width: 44px; height: 44px; flex: none; border-radius: 3px; border: 1px solid rgba(232,195,106,.3); }
.sk b { font-size: 15px; color: #f4e6c9; }
.sk p { margin: 3px 0 0; font-size: 14px; color: #cdbfa6; line-height: 1.55; }
.sk small { color: var(--muted); font-size: 12px; }

/* rankings */
.rank-wrap { max-width: 980px; margin: 0 auto; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: -10px 0 22px; }
.filters select { font: 500 14px var(--sans); color: #e9dcc4; background: rgba(0,0,0,.45); border: 1px solid rgba(232,195,106,.35); border-radius: 3px; padding: 10px 14px; min-height: 44px; }
.pos { font-family: var(--serif); font-weight: 900; color: var(--muted); width: 48px; }
tr.top1 .pos { color: #ffd77a; } tr.top2 .pos { color: #dfe4ea; } tr.top3 .pos { color: #e3a26c; }
.fac { display: inline-block; width: 22px; text-align: center; font-size: 15px; }
.fac.sun { color: var(--sun); } .fac.moon { color: var(--moon); }

/* download + legal + 404 */
.dl { max-width: 760px; margin: 0 auto; padding: 36px; text-align: center; }
.dl .btn { margin: 10px 0 20px; }
.req { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; text-align: left; margin-top: 18px; }
.legal { max-width: 860px; margin: 0 auto; padding: 36px 40px; color: #d8cab1; font-size: 15px; line-height: 1.75; }
.legal h2 { font-family: var(--serif); color: var(--gold2); font-size: 20px; margin: 30px 0 8px; letter-spacing: .03em; }
.legal h2:first-child { margin-top: 0; }
.legal .upd { color: var(--muted); font-size: 13px; }
.legal .warn { padding: 14px 16px; border: 1px solid rgba(255,154,90,.4); border-radius: 3px; background: rgba(255,120,40,.07); color: #f1c9a6; font-size: 14px; }
.legal ul { padding-left: 22px; }
.lost { text-align: center; padding: 80px 20px; }
.lost h1 { font-family: var(--serif); font-size: clamp(60px, 12vw, 130px); margin: 0; color: var(--gold2); letter-spacing: .06em; text-shadow: 0 0 40px rgba(255,140,40,.4); }
.lost p { color: var(--muted); font-size: 17px; margin: 6px 0 30px; }

/* google sign-in */
.or { display: flex; align-items: center; gap: 14px; margin: 4px 0; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: rgba(232,195,106,.2); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; border-radius: 3px; border: 1px solid #d9d4cc;
  background: #fff; color: #1f1f1f; font: 600 15px var(--sans); cursor: pointer; }
.btn-google:hover { background: #f3f1ee; }
.btn-google[disabled] { opacity: .6; cursor: wait; }
.btn-google svg { width: 20px; height: 20px; }
.gbox { padding: 16px; border: 1px solid rgba(232,195,106,.3); border-radius: 3px; background: rgba(0,0,0,.3); }
.gbox h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 18px; color: var(--gold2); }
.gbox > p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.5; }

@media (max-width: 860px) {
  .wiki { grid-template-columns: minmax(0, 1fr); }
  .wnav { position: static; flex-direction: row; overflow-x: auto; padding: 6px; scrollbar-width: none; }
  .wnav a { white-space: nowrap; }
  .wnav a small { display: none; }
  .pn > button { grid-template-columns: 56px 1fr 18px; padding: 16px; }
  .pn .d { display: none; }
  .pn ul { padding: 0 18px 18px 36px; }
  .legal { padding: 26px 20px; }
  .dhead { flex-direction: column; text-align: center; }
  .detail { padding: 20px 16px; }
  .page { padding: 36px 16px 70px; }
  .tbl .hide-s { display: none; }
}
.news-list li:has(.nl-a) { display: block; padding: 0; }
.nl-a { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; padding: 18px 6px; color: inherit; }
.nl-a:hover { color: inherit; }
.nl-a:hover .nl-t { color: var(--gold2); }
@media (max-width: 520px) { .nl-a { grid-template-columns: 52px 1fr; } }
.pn { scroll-margin-top: 90px; }
.rar { display: inline-block; font: 600 12px var(--sans); letter-spacing: .03em; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.rar.common { background: rgba(200,190,170,.12); color: #d8ccb4; }
.rar.uncommon { background: rgba(110,200,120,.14); color: #9fdc9f; }
.rar.rare { background: rgba(90,150,255,.16); color: #9ec3ff; }
.rar.very_rare { background: rgba(200,110,255,.16); color: #dcb0ff; }

/* v655: the realm's announcements */
.site-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; box-shadow: 0 -6px 24px rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 9px 44px 9px 16px;
  background: linear-gradient(90deg, #4a2a0c, #7a4a14, #4a2a0c); border-top: 1px solid #c99a46; text-align: center; }
.site-banner a { color: #ffe7b0; font-weight: 600; text-decoration: none; } .site-banner a:hover { text-decoration: underline; }
.site-banner button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: #ffe7b0; font-size: 20px; cursor: pointer; }
.anns { display: grid; gap: 12px; max-width: 900px; margin: 0 auto 22px; }
.ann { scroll-margin-top: 90px; background: rgba(40, 26, 14, .85); border: 1px solid #8a6420; border-radius: 10px; padding: 14px 18px; }
.ann b { display: block; font-size: 18px; margin: 6px 0 2px; color: #ffe0a0; } .ann .d { font-size: 12px; opacity: .7; } .ann p { margin: 8px 0 0; line-height: 1.55; }

/* v662: the Discord button in the header */
.discord-btn { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%;
  color: #c9cdfb; background: rgba(88, 101, 242, .18); border: 1px solid rgba(88, 101, 242, .55); margin-left: auto; margin-right: 10px; transition: .15s; }
.discord-btn:hover { color: #fff; background: #5865f2; }

/* v672: Discord, X and Instagram side by side in the header */
.socials { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; margin-right: 10px; }
.socials .discord-btn { margin: 0; }
.socials .x-btn, .socials .ig-btn { color: #e8dcc0; background: rgba(255, 255, 255, .06); border-color: rgba(232, 220, 192, .35); }
.x-btn:hover { background: #000; color: #fff; }
.ig-btn:hover { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #fff; }
@media (max-width: 760px) { .socials .x-btn, .socials .ig-btn { display: none; } }
