:root {
  --bg: #0b0a0d; --bg2: #131118; --card: #18151e; --line: #2a2533;
  --text: #e6e0d4; --muted: #9a9286; --gold: #c9a45c; --gold2: #f0d28c;
  --blue: #5b8fd6; --red: #c8473f; --ok: #6fbf73;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 Inter, system-ui, sans-serif; }
a { color: var(--gold2); text-decoration: none; }
h1, h2, h3, .logo { font-family: Cinzel, serif; letter-spacing: .04em; color: var(--gold2); }
h1 { font-size: clamp(32px, 6vw, 60px); margin: 0 0 .3em; }
h2 { font-size: 26px; margin: 1.6em 0 .6em; border-bottom: 1px solid var(--line); padding-bottom: .3em; }
h3 { font-size: 18px; margin: 0 0 .4em; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 24px; padding: 12px 24px;
  background: rgba(11,10,13,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font-size: 22px; font-weight: 700; }
.top nav { display: flex; gap: 20px; align-items: center; margin-left: auto; }
.top nav a { color: var(--text); }
#auth { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.top nav a.on, .top nav a:hover { color: var(--gold2); }
.burger { display: none; margin-left: auto; background: none; border: 0; color: var(--text); font-size: 24px; }

main { max-width: 1100px; margin: 0 auto; padding: 24px 16px 64px; min-height: 70vh; }
footer { text-align: center; color: var(--muted); padding: 24px; border-top: 1px solid var(--line); }

body { background: radial-gradient(ellipse at 50% -10%, #1d1622 0%, var(--bg) 55%) fixed; }
.hero { position: relative; overflow: hidden; text-align: center; padding: 56px 16px 80px; margin: -24px calc(50% - 50vw) 32px;
  background: linear-gradient(180deg, rgba(11,10,13,.55) 0%, rgba(11,10,13,.75) 60%, var(--bg) 100%), url(/img/hero.png) center 35% / cover; }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 180px 60px #000; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(44px, 9vw, 96px); text-shadow: 0 0 40px rgba(240,180,90,.35), 0 4px 0 #000; margin: 0; }
.hero .sub { font-family: Cinzel, serif; color: var(--gold); letter-spacing: .35em; font-size: 13px; margin-bottom: 18px; }
.hero p { max-width: 640px; margin: 18px auto 32px; color: #cfc6b6; font-size: 17px; text-shadow: 0 1px 4px #000; }
.embers { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.embers i { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%; background: #ffb35c; box-shadow: 0 0 6px 2px rgba(255,140,40,.6);
  animation: rise linear infinite; opacity: 0; }
@keyframes rise { 0% { transform: translate(0,0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx), -110vh); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .embers { display: none; } }

.orn { display: flex; align-items: center; gap: 14px; justify-content: center; color: var(--gold); margin: 6px auto; }
.orn::before, .orn::after { content: ''; height: 1px; width: 90px; background: linear-gradient(90deg, transparent, var(--gold)); }
.orn::after { transform: scaleX(-1); }

.faction { position: relative; overflow: hidden; min-height: 300px; padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; }
.faction .bgimg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; transition: opacity .3s, transform .6s; }
.faction:hover .bgimg { opacity: .5; transform: scale(1.04); }
.faction.koruna .bgimg { background-image: linear-gradient(0deg, var(--card) 15%, transparent), url(/img/koruna.png); filter: hue-rotate(170deg) saturate(.7); }
.faction.pakt .bgimg { background-image: linear-gradient(0deg, var(--card) 15%, transparent), url(/img/pakt.png); }
.faction > *:not(.bgimg) { position: relative; }
.emblem { width: 64px; height: 64px; margin-bottom: 10px; filter: drop-shadow(0 0 10px currentColor); }
.koruna .emblem { color: var(--blue); }
.pakt .emblem { color: var(--red); }

.btn { display: inline-block; padding: 11px 26px; border-radius: 4px; border: 1px solid var(--gold); background: linear-gradient(#3a2c14, #241a0c);
  color: var(--gold2); font: 600 15px Inter, sans-serif; cursor: pointer; }
.btn:hover { background: linear-gradient(#4a3818, #2e210e); }
.btn.ghost { background: transparent; }
.btn + .btn { margin-left: 10px; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { background: linear-gradient(180deg, #1c1823, var(--card)); border: 1px solid var(--line); border-radius: 6px; padding: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px rgba(0,0,0,.35); transition: border-color .2s, transform .2s, box-shadow .2s; }
.grid .card:hover { border-color: #4a3e2a; transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(201,164,92,.15), 0 12px 30px rgba(0,0,0,.5); }
.feat .ico { width: 34px; height: 34px; color: var(--gold); margin-bottom: 8px; }
h2 { display: flex; align-items: center; gap: 10px; }
h2::before { content: '◆'; color: var(--gold); font-size: 12px; }
.card p { margin: .3em 0; color: var(--muted); }
.koruna { border-top: 3px solid var(--blue); }
.pakt { border-top: 3px solid var(--red); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); color: var(--muted); margin: 2px 4px 2px 0; }
.tag.koruna { color: var(--blue); border-color: #2c4366; }
.tag.pakt { color: var(--red); border-color: #5a2522; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.tabs button { background: var(--bg2); border: 1px solid var(--line); color: var(--muted); padding: 7px 16px; border-radius: 4px; cursor: pointer; font: 500 14px Inter, sans-serif; }
.tabs button.on { color: var(--gold2); border-color: var(--gold); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; font-size: 13px; }
td.n { font-variant-numeric: tabular-nums; }
tr:hover td { background: var(--bg2); }
.tablewrap { overflow-x: auto; }

form.auth { max-width: 380px; margin: 40px auto; }
label { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 13px; }
input, select { width: 100%; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; color: var(--text); font: 15px Inter, sans-serif; }
input:focus { outline: none; border-color: var(--gold); }
.err { color: var(--red); min-height: 1.4em; margin-top: 10px; }
.note { color: var(--muted); font-size: 13px; background: var(--bg2); border-left: 3px solid var(--gold); padding: 8px 12px; margin: 10px 0; }

.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bar { height: 10px; background: var(--bg2); border-radius: 5px; overflow: hidden; display: flex; margin: 12px 0; }
.bar i { display: block; height: 100%; }

/* ---------- logo ---------- */
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { width: 34px; height: 34px; transition: transform .6s; filter: drop-shadow(0 0 6px rgba(240,190,100,.4)); }
.logo:hover img { transform: rotate(45deg); }
.hero-logo { width: 96px; height: 96px; margin-bottom: 10px; animation: float 6s ease-in-out infinite, glow 4s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes glow { 0%,100% { filter: drop-shadow(0 0 14px rgba(240,190,100,.45)); } 50% { filter: drop-shadow(0 0 30px rgba(240,190,100,.8)) drop-shadow(0 0 8px rgba(139,75,214,.6)); } }
.emblem { width: 76px; height: auto; transition: transform .4s; }
.card:hover .emblem { transform: scale(1.08) rotate(-3deg); }

/* ---------- animations ---------- */
.shine { background: linear-gradient(100deg, var(--gold) 30%, #fff6d8 50%, var(--gold) 70%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.hero .sub, .hero p, .hero .btn, .hero .orn { animation: up .9s both; }
.hero .sub { animation-delay: .1s; } .hero .orn { animation-delay: .35s; } .hero p { animation-delay: .5s; } .hero .btn { animation-delay: .7s; }
@keyframes up { from { opacity: 0; transform: translateY(18px); } }
#app.enter > *:not(.hero) { animation: fadein .45s both; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } }
.rv { opacity: 0; transform: translateY(16px); transition: opacity .6s, transform .6s, border-color .2s, box-shadow .2s; }
.rv.in { opacity: 1; transform: none; }
.grid .card.rv.in:hover { transform: translateY(-3px); }
.btn { position: relative; overflow: hidden; transition: box-shadow .25s; }
.btn:hover { box-shadow: 0 0 18px rgba(240,190,100,.35); }
.btn::after { content: ''; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,240,200,.25), transparent); transform: skewX(-20deg); }
.btn:hover::after { left: 120%; transition: left .6s; }
.tabs button { transition: color .2s, border-color .2s, background .2s; }
.tabs button:hover { color: var(--text); }
#wiki, #rank { animation: fadein .35s both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .rv { opacity: 1; transform: none; } }

/* ---------- wiki bits ---------- */
.filters { display: flex; gap: 10px; flex-wrap: wrap; } .filters > * { flex: 1 1 200px; }
.count { color: var(--muted); font-size: 13px; }
.rank { font-size: 12px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); }
.rank-elite { color: #e0b860; border-color: #5a4720; } .rank-boss { color: #ff6b5a; border-color: #6a2a22; } .rank-rare, .rank-champion { color: #b48cff; border-color: #44306a; }
.unique { border-left: 3px solid #e08a3c; } .unique h3 { color: #f0a85c; }
.r-Magic { color: #6fa8ff; } .r-Rare { color: #f0d050; } .r-Epic { color: #b48cff; } .r-Legendary { color: #ff9a3c; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- round 2 ---------- */
::selection { background: #5a4220; color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #3a3024; border-radius: 5px; border: 2px solid var(--bg); } ::-webkit-scrollbar-thumb:hover { background: var(--gold); }
.top { transition: box-shadow .3s, background .3s; } .scrolled .top { box-shadow: 0 6px 24px rgba(0,0,0,.6); }
.top nav a { position: relative; } .top nav > a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: var(--gold); transform: scaleX(0); transition: transform .25s; }
.top nav > a:hover::after, .top nav > a.on::after { transform: scaleX(1); }

/* ornamental corners on cards */
.card { position: relative; }
.card::before { content: ''; position: absolute; inset: 5px; pointer-events: none; border-radius: 3px;
  background: linear-gradient(var(--gold), var(--gold)) top left / 10px 1px, linear-gradient(var(--gold), var(--gold)) top left / 1px 10px,
    linear-gradient(var(--gold), var(--gold)) bottom right / 10px 1px, linear-gradient(var(--gold), var(--gold)) bottom right / 1px 10px;
  background-repeat: no-repeat; opacity: .35; transition: opacity .25s, inset .25s; }
.card:hover::before { opacity: .9; inset: 3px; }

/* page banner */
.banner { position: relative; text-align: center; padding: 70px 16px 46px; margin: -24px calc(50% - 50vw) 28px; overflow: hidden;
  background: linear-gradient(180deg, rgba(11,10,13,.55), var(--bg) 96%), var(--img) center 40% / cover; border-bottom: 1px solid var(--line); }
.banner::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 120px 40px #000; pointer-events: none; }
.banner > * { position: relative; z-index: 1; animation: up .7s both; }
.banner h1 { margin: 0; text-shadow: 0 0 30px rgba(240,180,90,.3), 0 3px 0 #000; }
.banner p { color: #cfc6b6; margin: 6px 0 0; animation-delay: .2s; }

/* gallery */
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; }
.shot { position: relative; margin: 0; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); }
.shot.big { grid-column: span 2; grid-row: span 2; }
.shot img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85) brightness(.8); transition: transform .8s, filter .4s; }
.shot:hover img { transform: scale(1.07); filter: saturate(1) brightness(.95); }
.shot figcaption { position: absolute; inset: auto 0 0 0; padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.85)); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.shot figcaption b { font-family: Cinzel, serif; color: var(--gold2); font-size: 17px; }
.shot figcaption span { font-size: 12px; color: var(--gold); }
.shot figcaption small { width: 100%; color: #bdb4a6; font-size: 12px; max-height: 0; overflow: hidden; transition: max-height .4s; }
.shot:hover figcaption small, .shot.big figcaption small { max-height: 40px; }

/* class strip */
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x mandatory; mask-image: linear-gradient(90deg, #000 92%, transparent); }
.cls { flex: 0 0 190px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 6px; border: 1px solid var(--line);
  background: linear-gradient(160deg, #1f1a26, var(--card)); color: var(--text); transition: transform .25s, border-color .25s, box-shadow .25s; }
.cls b { font-family: Cinzel, serif; color: var(--gold2); font-size: 16px; }
.cls small { color: var(--muted); font-size: 12px; }
.cls .race { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.cls.koruna .race { color: var(--blue); } .cls.pakt .race { color: var(--red); }
.cls:hover { transform: translateY(-4px); }
.cls.koruna:hover { border-color: #2c4366; box-shadow: 0 8px 24px rgba(91,143,214,.2); }
.cls.pakt:hover { border-color: #5a2522; box-shadow: 0 8px 24px rgba(200,71,63,.2); }

/* news */
.news { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.news time { font-size: 12px; color: var(--gold); letter-spacing: .08em; }

/* CTA */
.cta { text-align: center; margin: 56px 0 0; padding: 48px 16px; border: 1px solid var(--line); border-radius: 8px;
  background: radial-gradient(ellipse at 50% 0%, rgba(201,164,92,.18), transparent 70%), var(--card); }
.cta img { width: 64px; animation: glow 4s ease-in-out infinite; }
.cta h2 { justify-content: center; border: 0; margin: 10px 0 4px; } .cta h2::before { display: none; }
.cta p { color: var(--muted); margin: 0 0 20px; }

/* podium */
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 8px 0 24px; }
.pod { flex: 0 1 180px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; animation: up .7s both; }
.pod .medal { font-size: 30px; } .pod b { font-family: Cinzel, serif; color: var(--gold2); } .pod small { color: var(--muted); font-size: 12px; }
.pod .lvl { font: 700 22px Cinzel, serif; color: var(--text); }
.pod .step { width: 100%; margin-top: 8px; border-radius: 6px 6px 0 0; font: 700 28px Cinzel, serif; color: rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #2a2230, var(--card)); border: 1px solid var(--line); border-bottom: 0; }
.p1 .step { height: 110px; border-top: 2px solid var(--gold); } .p2 .step { height: 80px; border-top: 2px solid #b9bfc8; } .p3 .step { height: 60px; border-top: 2px solid #b0703a; }
.p1 { animation-delay: .1s; } .p2 { animation-delay: .25s; } .p3 { animation-delay: .4s; }

/* footer */
footer { text-align: left; padding: 40px 16px 20px; background: linear-gradient(180deg, transparent, #070609); }
.fwrap { max-width: 1100px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.fbrand { display: flex; gap: 12px; align-items: center; } .fbrand img { width: 48px; } .fbrand b { font-family: Cinzel, serif; color: var(--gold2); display: block; } .fbrand small { color: var(--muted); }
.fcol { display: flex; flex-direction: column; gap: 4px; } .fcol b { color: var(--text); margin-bottom: 4px; } .fcol a { color: var(--muted); } .fcol a:hover { color: var(--gold2); }
.fcrests { display: flex; gap: 10px; } .fcrests img { width: 44px; opacity: .7; transition: opacity .3s, transform .3s; } .fcrests img:hover { opacity: 1; transform: translateY(-3px); }
.fcopy { text-align: center; color: #5f584f; font-size: 12px; margin-top: 28px; }

/* ---------- round 3 ---------- */
/* intro */
#intro { position: fixed; inset: 0; z-index: 100; background: radial-gradient(circle at 50% 45%, #1a1220, #000 70%); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 22px; cursor: pointer; transition: opacity .7s, visibility .7s; }
#intro.out { opacity: 0; visibility: hidden; }
#intro .seal { position: relative; width: 150px; height: 150px; animation: sealIn 1.4s cubic-bezier(.2,.8,.2,1) both; }
#intro .seal img { width: 100%; height: 100%; animation: sealGlow 2.6s ease-in-out both; }
#intro .flash { position: absolute; inset: -60%; border-radius: 50%; background: radial-gradient(circle, rgba(255,240,200,.9), rgba(139,75,214,.35) 30%, transparent 60%);
  opacity: 0; animation: flash 1.2s .9s ease-out both; }
#intro .itxt { font: 700 clamp(28px, 6vw, 46px) Cinzel, serif; letter-spacing: .5em; padding-left: .5em; color: var(--gold2); animation: up 1s 1s both; text-shadow: 0 0 24px rgba(240,180,90,.5); }
@keyframes sealIn { from { transform: scale(.4) rotate(-90deg); opacity: 0; } }
@keyframes sealGlow { 50% { filter: drop-shadow(0 0 40px rgba(240,190,100,.9)) drop-shadow(0 0 20px rgba(139,75,214,.9)); } 100% { filter: drop-shadow(0 0 14px rgba(240,190,100,.5)); } }
@keyframes flash { 30% { opacity: 1; transform: scale(1.1); } 100% { opacity: 0; transform: scale(1.6); } }

/* fog */
.fog { position: absolute; inset: -20% -50%; z-index: 0; pointer-events: none; opacity: .35;
  background: radial-gradient(ellipse 30% 18% at 20% 70%, rgba(200,190,220,.25), transparent 70%), radial-gradient(ellipse 25% 14% at 65% 80%, rgba(200,190,220,.2), transparent 70%),
    radial-gradient(ellipse 35% 16% at 85% 60%, rgba(200,190,220,.18), transparent 70%); animation: drift 38s linear infinite; }
.fog.f2 { opacity: .25; animation-duration: 60s; animation-direction: reverse; top: 10%; }
@keyframes drift { from { transform: translateX(-12%); } to { transform: translateX(12%); } }

/* war meter */
.war { display: flex; align-items: center; gap: 18px; margin: 28px 0 0; padding: 18px 24px; }
.wside { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.wside .emblem { width: 46px; margin: 0; } .wside b { font-family: Cinzel, serif; } .wside span { font: 700 22px Cinzel, serif; }
.wside.koruna span, .wside.koruna b { color: #8fb6ec; } .wside.pakt span, .wside.pakt b { color: #e0716a; }
.wmid { flex: 1; text-align: center; } .wmid small { color: var(--muted); font-size: 11px; letter-spacing: .15em; }
.wbar { position: relative; display: flex; height: 14px; margin: 8px 0; border-radius: 7px; overflow: hidden; background: var(--bg2); border: 1px solid var(--line); }
.wbar i { width: 50%; transition: width 1.6s cubic-bezier(.2,.8,.2,1); }
#wbk { background: linear-gradient(90deg, #1f3a66, var(--blue)); } #wbp { background: linear-gradient(90deg, var(--red), #5a1612); }
.wbar em { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent); background-size: 40% 100%; background-repeat: no-repeat; animation: sweep 3s linear infinite; }
@keyframes sweep { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* clickable classes + modal */
.clickable { cursor: pointer; } .cls { cursor: pointer; }
#modal { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.7); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; transition: opacity .25s; }
#modal.open { opacity: 1; }
/* `display:flex` above would override the [hidden] attribute and leave an invisible layer eating every click */
[hidden], #modal[hidden], .mtip[hidden] { display: none !important; }
.mbox { position: relative; width: min(760px, 100%); max-height: 90vh; overflow-y: auto; background: linear-gradient(180deg, #1d1824, #121016); border: 1px solid #4a3e2a; border-radius: 8px;
  padding: 26px; box-shadow: 0 0 0 1px rgba(201,164,92,.15), 0 30px 80px #000; transform: translateY(20px) scale(.97); transition: transform .3s cubic-bezier(.2,.8,.2,1); }
#modal.open .mbox { transform: none; }
.mclose { position: absolute; top: 10px; right: 14px; background: none; border: 0; color: var(--muted); font-size: 28px; cursor: pointer; } .mclose:hover { color: var(--gold2); }
.mhead { display: flex; gap: 16px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mhead .emblem { width: 60px; margin: 0; } .mhead h2 { margin: 0; border: 0; padding: 0; font-size: 30px; } .mhead h2::before { display: none; }
.mhead small { color: var(--muted); letter-spacing: .05em; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 8px; }
h4 { font: 600 12px Inter, sans-serif; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); margin: 16px 0 10px; }
.rat { display: grid; grid-template-columns: 96px 1fr 20px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13px; color: var(--muted); }
.rat b { color: var(--text); text-align: right; }
.rbar { height: 8px; background: var(--bg2); border-radius: 4px; overflow: hidden; border: 1px solid var(--line); }
.rbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7a5622, var(--gold2)); border-radius: 4px; animation: fillbar .9s .2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes fillbar { to { width: var(--w); } }
.spec { padding: 8px 10px; margin: 6px 0; border-left: 2px solid var(--gold); background: var(--bg2); border-radius: 0 4px 4px 0; }
.spec b { display: block; color: var(--gold2); font-family: Cinzel, serif; } .spec small { color: var(--muted); font-size: 12px; }
.skills { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.skill { padding: 8px 10px; background: var(--bg2); border: 1px solid var(--line); border-radius: 4px; } .skill b { display: block; font-size: 13px; } .skill small { color: var(--muted); font-size: 11px; }
.el-fire { border-color: #6a3018; } .el-frost { border-color: #24506a; } .el-lightning { border-color: #5a5a20; } .el-holy { border-color: #6a5a28; }
.el-shadow, .el-arcane { border-color: #44306a; } .el-poison, .el-nature { border-color: #2e5a28; } .el-blood { border-color: #6a1e1e; }

/* auth page */
.authwrap { position: relative; margin: -24px calc(50% - 50vw) 0; min-height: 78vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; overflow: hidden; }
.aside { position: absolute; top: 0; bottom: 0; width: 50%; background-size: cover; background-position: center; opacity: .3; }
.aside.koruna { left: 0; background-image: linear-gradient(90deg, transparent 40%, var(--bg)), url(/img/koruna.png); filter: hue-rotate(170deg) saturate(.6); }
.aside.pakt { right: 0; background-image: linear-gradient(270deg, transparent 40%, var(--bg)), url(/img/pakt.png); }
.authwrap::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 160px 60px var(--bg); pointer-events: none; }
form.auth { position: relative; z-index: 1; width: 100%; margin: 0; padding: 30px; background: rgba(20,17,26,.88); backdrop-filter: blur(6px); animation: up .6s both; }
.alogo { display: block; width: 64px; margin: 0 auto 4px; animation: glow 4s ease-in-out infinite; }
form.auth h1 { text-align: center; }

/* ---------- round 4 ---------- */
/* game-style item tooltip */
.itemcard { background: rgba(8,7,10,.96); border: 1px solid #7a4a1e; border-radius: 3px; font-size: 13px; line-height: 1.5;
  box-shadow: 0 0 0 1px #000, 0 0 18px rgba(224,138,60,.12), 0 10px 30px rgba(0,0,0,.6); transition: transform .2s, box-shadow .2s; }
.itemcard:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px #000, 0 0 28px rgba(224,138,60,.35), 0 14px 34px rgba(0,0,0,.7); }
.ihead { text-align: center; padding: 10px 12px 8px; border-bottom: 1px solid #3a2410; background: linear-gradient(180deg, rgba(224,138,60,.18), transparent); }
.ihead b { display: block; font: 700 16px Cinzel, serif; color: #ff9a3c; text-shadow: 0 0 10px rgba(255,140,40,.4); }
.ihead small { color: #c88a50; }
.ibody { padding: 10px 14px 12px; text-align: center; }
.idmg { color: #e8e0d0; } .idmg b { color: #fff; }
.istat { color: #7f9cff; }
.iel { color: #b48cff; margin-top: 4px; }
.iflav { color: #c8a060; font-style: italic; margin: 8px 0 6px; }
.ireq { color: var(--muted); font-size: 12px; }

/* acts timeline */
.timeline { position: relative; padding-left: 34px; margin-top: 20px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--gold), #8b4bd6 70%, var(--red)); }
.tl { position: relative; margin-bottom: 14px; }
.tdot { position: absolute; left: -30px; top: 20px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--gold); box-shadow: 0 0 10px rgba(240,190,100,.5); }
.tl:last-child .tdot { border-color: var(--red); box-shadow: 0 0 12px rgba(200,71,63,.7); }
.tl small { color: var(--gold); letter-spacing: .1em; font-size: 12px; }

/* dungeon path */
.dpath { position: relative; max-width: 760px; margin: 10px auto; }
.dpath::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: repeating-linear-gradient(var(--gold) 0 8px, transparent 8px 16px); opacity: .5; }
.dnode { position: relative; width: 50%; padding: 0 34px 18px; }
.dnode.l { margin-right: 50%; } .dnode.r { margin-left: 50%; }
.dlvl { position: absolute; top: 14px; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; z-index: 1;
  font: 700 14px Cinzel, serif; color: var(--gold2); background: radial-gradient(#2a2030, #120e16); border: 2px solid var(--gold); box-shadow: 0 0 14px rgba(240,190,100,.35); }
.dnode.l .dlvl { right: -20px; } .dnode.r .dlvl { left: -20px; }
.dnode:last-child .dlvl { border-color: var(--red); color: #ff9a8a; box-shadow: 0 0 16px rgba(200,71,63,.6); }
.dnode.l .card { text-align: right; }

/* download */
.dlhero { display: flex; align-items: center; gap: 24px; padding: 28px; flex-wrap: wrap; background: radial-gradient(ellipse at 0% 50%, rgba(201,164,92,.14), transparent 60%), linear-gradient(180deg, #1c1823, var(--card)); }
.dlhero > img { width: 90px; animation: glow 4s ease-in-out infinite; }
.dlinfo { flex: 1 1 280px; } .dlinfo h3 { font-size: 24px; }
.dlsteps { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 13px; }
.dlsteps i { display: inline-flex; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%; align-items: center; justify-content: center; font-style: normal;
  border: 1px solid var(--gold); color: var(--gold2); font-size: 12px; }
.btn.big { padding: 16px 40px; font-size: 18px; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 26px rgba(240,190,100,.45); } }

/* cursor sparks */
.spark { position: fixed; z-index: 90; width: 4px; height: 4px; margin: -2px; border-radius: 50%; pointer-events: none; background: #ffd27a;
  box-shadow: 0 0 6px 2px rgba(255,170,60,.7); animation: sparkfall .9s ease-out forwards; }
@keyframes sparkfall { to { transform: translate(var(--dx), 28px) scale(.2); opacity: 0; } }

/* ---------- round 5 ---------- */
/* monster cards */
.mrow { display: flex; justify-content: space-between; align-items: center; margin: 8px 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.seg button { background: var(--bg2); border: 0; color: var(--muted); padding: 6px 14px; cursor: pointer; font: 500 13px Inter, sans-serif; }
.seg button.on { background: #2a2214; color: var(--gold2); }
.mgridc { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.mcard { position: relative; padding: 14px; border-radius: 6px; background: linear-gradient(180deg, #1a161f, #110f14); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.mcard:hover { transform: translateY(-3px); }
.mtop { display: flex; gap: 12px; align-items: center; }
.mtop b { display: block; font-family: Cinzel, serif; color: var(--text); } .mtop small { color: var(--muted); font-size: 12px; }
.mlvl { flex: 0 0 38px; height: 38px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 2px solid var(--line); background: var(--bg2); font: 700 13px Cinzel, serif; color: var(--muted); }
.mbars { display: grid; grid-template-columns: 40px 1fr; gap: 4px 8px; align-items: center; margin: 12px 0 8px; font-size: 11px; color: var(--muted); }
.mbars i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, #3a6a2a, #7fd46a) 0 0 / var(--w) 100% no-repeat, var(--bg2); }
.mbars i.atk { background: linear-gradient(90deg, #6a2a1a, #ff7a5a) 0 0 / var(--w) 100% no-repeat, var(--bg2); }
.mspells { margin: 4px 0; font-size: 12px; color: #b48cff; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.mdrops { margin: 4px 0 0; font-size: 11px; color: #6f675d; }
.mr-elite { border-color: #5a4720; } .mr-elite .mlvl { border-color: var(--gold); color: var(--gold2); } .mr-elite .mtop b { color: var(--gold2); }
.mr-rare, .mr-champion { border-color: #44306a; } .mr-rare .mlvl, .mr-champion .mlvl { border-color: #b48cff; color: #d2bcff; } .mr-rare .mtop b, .mr-champion .mtop b { color: #d2bcff; }
.mr-boss { border-color: #7a2a22; background: radial-gradient(ellipse at 50% 0%, rgba(200,71,63,.22), transparent 70%), linear-gradient(180deg, #1f1214, #110f14);
  animation: bossglow 3s ease-in-out infinite; }
.mr-boss .mlvl { border-color: var(--red); color: #ffb0a6; background: #2a0e0c; } .mr-boss .mtop b { color: #ff8a7a; }
.mr-boss::after { content: 'BOSS'; position: absolute; top: 10px; right: 12px; font: 700 10px Inter, sans-serif; letter-spacing: .2em; color: var(--red); }
@keyframes bossglow { 50% { box-shadow: 0 0 22px rgba(200,71,63,.35); } }

/* loot */
.mloot { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.mloot h5 { margin: 0 0 6px; font: 600 10px Inter, sans-serif; letter-spacing: .15em; text-transform: uppercase; color: var(--gold); }
.lgear { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: 12px; } .lgear span { color: var(--muted); } .lgear b { color: var(--text); }
.lgear small { width: 100%; color: #6f675d; font-size: 11px; }
.lmats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.lmat { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.mico { width: 30px; height: 30px; border-radius: 4px; background: radial-gradient(#221c28, #0e0c11); border: 1px solid #3a3440; }
.mico.none { visibility: visible; background: radial-gradient(circle, #6a4aa0 0 18%, #221c28 22%, #0e0c11); }
.lmat > em { position: absolute; right: -2px; bottom: -4px; font: 600 9px Inter, sans-serif; font-style: normal; color: #fff; background: rgba(0,0,0,.8); padding: 0 3px; border-radius: 3px; }
.lmats.big { gap: 8px; } .lmats.big .lmat { background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px 6px 6px; }
.lmats.big .mico { width: 36px; height: 36px; } .lmats.big b { display: block; font-size: 13px; } .lmats.big em { font-style: normal; color: var(--gold); font-size: 12px; }
.lbtn { margin-top: 8px; width: 100%; text-align: left; padding: 7px 10px; border-radius: 5px; cursor: pointer; font: 600 12px Inter, sans-serif; color: #ffb36a;
  background: linear-gradient(90deg, rgba(224,138,60,.14), transparent); border: 1px solid #5a3a1a; transition: background .2s, border-color .2s; }
.lbtn small { display: block; font-weight: 400; color: #8a7a68; font-size: 11px; }
.lbtn:hover { border-color: #e08a3c; background: linear-gradient(90deg, rgba(224,138,60,.28), transparent); }
.lbtn.boss { color: #ffc98a; border-color: #8a4a1a; box-shadow: 0 0 12px rgba(224,138,60,.2); }
.lugrid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); max-height: 320px; overflow-y: auto; padding-right: 4px; }
.lu { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 5px; background: rgba(8,7,10,.9); border: 1px solid #5a3a1a; }
.lu .iimg { width: 36px; height: 36px; flex: 0 0 36px; } .lu b { display: block; font-size: 13px; color: #ff9a3c; } .lu small { color: var(--muted); font-size: 11px; }

/* rankings */
.rb { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 50%; font: 700 13px Cinzel, serif;
  background: var(--bg2); border: 1px solid var(--line); color: var(--muted); }
.rb1 { background: radial-gradient(#6a5020, #2a1e0a); border-color: var(--gold); color: #fff1c4; box-shadow: 0 0 10px rgba(240,190,100,.5); }
.rb2 { background: radial-gradient(#5a6068, #22262c); border-color: #b9bfc8; color: #fff; }
.rb3 { background: radial-gradient(#6a4020, #2a160a); border-color: #b0703a; color: #ffd6b0; }
tr.fr-koruna td:first-child { box-shadow: inset 3px 0 0 var(--blue); } tr.fr-pakt td:first-child { box-shadow: inset 3px 0 0 var(--red); }
tr.fr-koruna:hover td { background: rgba(91,143,214,.07); } tr.fr-pakt:hover td { background: rgba(200,71,63,.07); }
.clink { color: var(--text); border-bottom: 1px dotted var(--muted); } .clink:hover { color: var(--gold2); border-color: var(--gold); }
.ctag { display: inline-block; min-width: 34px; text-align: center; font: 700 10px Inter, sans-serif; letter-spacing: .08em; padding: 2px 5px; border-radius: 3px 3px 8px 8px; }
.ctag.koruna { background: #1c2c48; color: #a8c6f0; border: 1px solid #2c4366; } .ctag.pakt { background: #3a1412; color: #f0a8a0; border: 1px solid #5a2522; }

/* lore drop cap */
.lore p:first-child::first-letter { float: left; font: 700 58px/0.9 Cinzel, serif; color: var(--gold2); margin: 6px 10px 0 0; text-shadow: 0 0 18px rgba(240,180,90,.4); }
.lore p { color: #c9c0b2; }

/* back to top */
#totop { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 52px; height: 52px; border: 0; background: none; cursor: pointer; padding: 0;
  opacity: 0; transform: translateY(20px) scale(.8); pointer-events: none; transition: opacity .3s, transform .3s; }
#totop.show { opacity: 1; transform: none; pointer-events: auto; }
#totop img { width: 100%; filter: drop-shadow(0 0 8px rgba(240,190,100,.5)); transition: transform .5s; }
#totop span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #120e14; font-size: 12px; }
#totop:hover img { transform: rotate(90deg); }

/* toasts */
#toasts { position: fixed; top: 74px; right: 16px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 6px; background: rgba(24,20,30,.96);
  border: 1px solid #4a3e2a; box-shadow: 0 10px 30px rgba(0,0,0,.6); color: var(--text); animation: tin .4s cubic-bezier(.2,.8,.2,1) both; transition: opacity .4s, transform .4s; }
.toast img { width: 28px; } .toast.out { opacity: 0; transform: translateX(30px); }
@keyframes tin { from { opacity: 0; transform: translateX(40px); } }

/* ---------- round 6 ---------- */
/* faction themes */
:root { transition: none; }
:root[data-ft="koruna"] { --gold: #7fa6dc; --gold2: #d4e4ff; }
:root[data-ft="pakt"] { --gold: #d0574c; --gold2: #ffc0b4; }
:root[data-ft="koruna"] body { background: radial-gradient(ellipse at 50% -10%, #141c2c 0%, var(--bg) 55%) fixed; }
:root[data-ft="pakt"] body { background: radial-gradient(ellipse at 50% -10%, #2a1210 0%, var(--bg) 55%) fixed; }
:root[data-ft="koruna"] .btn { background: linear-gradient(#1c2c48, #111a2c); } :root[data-ft="pakt"] .btn { background: linear-gradient(#481a16, #2a0e0c); }
:root[data-ft="koruna"] .btn.ghost, :root[data-ft="pakt"] .btn.ghost { background: transparent; }
:root[data-ft="koruna"] .hero-logo, :root[data-ft="koruna"] .logo img { filter: hue-rotate(185deg) saturate(.7) drop-shadow(0 0 10px rgba(127,166,220,.5)); }
:root[data-ft="pakt"] .hero-logo, :root[data-ft="pakt"] .logo img { filter: hue-rotate(-30deg) saturate(1.4) drop-shadow(0 0 10px rgba(208,87,76,.5)); }
.themes { display: inline-flex; gap: 6px; align-items: center; padding: 0 4px; }
.themes button { width: 16px; height: 16px; border-radius: 50%; padding: 0; cursor: pointer; border: 2px solid #3a3440; transition: transform .2s, border-color .2s;
  background: radial-gradient(circle at 35% 35%, #f0d28c, #7a5622); }
.themes button[data-theme="koruna"] { background: radial-gradient(circle at 35% 35%, #d4e4ff, #2c4a7a); }
.themes button[data-theme="pakt"] { background: radial-gradient(circle at 35% 35%, #ffc0b4, #6a1a14); }
.themes button:hover { transform: scale(1.2); } .themes button.on { border-color: #fff; box-shadow: 0 0 8px rgba(255,255,255,.4); }

/* hero light rays */
.rays { position: absolute; left: 50%; top: 104px; width: 900px; height: 900px; margin: -450px 0 0 -450px; z-index: 0; pointer-events: none; opacity: 1;
  background: repeating-conic-gradient(from 0deg, rgba(255,220,150,.2) 0deg 4deg, transparent 4deg 18deg);
  mask-image: radial-gradient(circle, #000 0%, transparent 55%); -webkit-mask-image: radial-gradient(circle, #000 0%, transparent 55%); animation: spin 90s linear infinite; }
:root[data-ft="koruna"] .rays { background: repeating-conic-gradient(rgba(180,210,255,.14) 0deg 4deg, transparent 4deg 18deg); }
:root[data-ft="pakt"] .rays { background: repeating-conic-gradient(rgba(255,140,110,.14) 0deg 4deg, transparent 4deg 18deg); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ornamental h2 divider */
h2 { border-bottom: 0; padding-bottom: .5em; position: relative; }
h2::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background: linear-gradient(90deg, var(--gold), transparent 70%) left center / 100% 1px no-repeat,
    radial-gradient(circle, var(--gold) 2px, transparent 2.5px) 0 center / 9px 9px no-repeat; opacity: .55; }

.cta h2::after, .mhead h2::after { display: none; }

/* 3D tilt */
.tilting { transition: transform .08s linear !important; will-change: transform; }
.faction::after, .itemcard::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255,240,210,.12), transparent 45%); }
.itemcard { position: relative; }
.tilting::after { opacity: 1; }

/* skeleton */
.skel { display: flex; flex-direction: column; gap: 8px; }
.sk { height: 38px; border-radius: 4px; background: linear-gradient(90deg, var(--bg2) 0%, #221d28 50%, var(--bg2) 100%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
.sk:first-child { height: 140px; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* account */
.acct { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 26px; margin-top: 8px;
  background: radial-gradient(ellipse at 0% 0%, rgba(201,164,92,.16), transparent 60%), linear-gradient(180deg, #1c1823, var(--card)); }
.acct h1 { margin: 0; font-size: 34px; } .acct small { color: var(--gold); letter-spacing: .2em; font-size: 11px; } .acct p { margin: 2px 0 0; }
.avatar { width: 84px; height: 84px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 700 38px Cinzel, serif; color: var(--gold2);
  background: radial-gradient(#2a2030, #120e16); border: 2px solid var(--gold); box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--line), 0 0 24px rgba(240,190,100,.3); }
.astats { margin-left: auto; display: flex; gap: 24px; text-align: center; } .astats b { display: block; font: 700 28px Cinzel, serif; color: var(--text); }
.heroes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.hero-slot { position: relative; min-height: 230px; border-radius: 8px; padding: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center;
  background: linear-gradient(180deg, #1c1823, var(--card)); border: 1px solid var(--line); transition: transform .25s, border-color .25s; }
.hero-slot:hover { transform: translateY(-4px); border-color: var(--gold); }
.hero-slot b { font: 700 18px Cinzel, serif; color: var(--gold2); } .hero-slot small { color: var(--muted); font-size: 12px; }
.hlvl { position: absolute; top: 10px; right: 12px; font: 700 14px Cinzel, serif; color: var(--gold); }
.hero-slot.empty { border-style: dashed; background: transparent; }
.plus { width: 56px; height: 56px; border-radius: 50%; border: 1px dashed var(--muted); display: flex; align-items: center; justify-content: center; font-size: 28px; color: var(--muted); margin-bottom: 6px; }

/* ---------- class preview ---------- */
.play { color: #cfc6b6; line-height: 1.7; margin: 0; } .play b { color: var(--gold2); }
.stage { --ec: #c9a45c; position: relative; height: 260px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--ec) 28%, transparent), transparent 55%), #0b0a0e;
  display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stage.el-fire { --ec: #ff7a2a; } .stage.el-frost { --ec: #6ec8ff; } .stage.el-lightning { --ec: #f0e060; } .stage.el-holy { --ec: #ffe9a0; }
.stage.el-shadow { --ec: #9a6aff; } .stage.el-arcane { --ec: #c87aff; } .stage.el-poison, .stage.el-nature { --ec: #7fd46a; } .stage.el-blood { --ec: #ff3a3a; }
.stage.el-spirit { --ec: #8ff0e0; } .stage.el-physical { --ec: #e0d0b0; }
.sbig { width: 92px; height: 92px; border-radius: 10px; border: 2px solid var(--ec); position: relative; z-index: 1; margin-top: -30px;
  box-shadow: 0 0 30px color-mix(in srgb, var(--ec) 60%, transparent); }
.cast .sbig { animation: castpop .6s cubic-bezier(.2,1.6,.4,1); }
@keyframes castpop { from { transform: scale(.6) rotate(-8deg); opacity: .3; } }
.sring { position: absolute; left: 50%; top: 42%; width: 100px; height: 100px; margin: -50px; border-radius: 50%; border: 2px solid var(--ec); opacity: 0; }
.cast .sring { animation: ring 1.1s ease-out; } .cast .sring.r2 { animation: ring 1.1s .2s ease-out; }
@keyframes ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
.scap { text-align: center; margin-top: 12px; z-index: 1; } .scap b { display: block; font: 700 18px Cinzel, serif; color: var(--ec); text-shadow: 0 0 12px color-mix(in srgb, var(--ec) 50%, transparent); }
.scap small { color: #bdb4a6; } .cast .scap { animation: up .5s both; }
.sbar { position: absolute; bottom: 10px; display: flex; gap: 6px; }
.sbar img { width: 30px; height: 30px; border-radius: 4px; border: 1px solid var(--line); opacity: .45; cursor: pointer; transition: opacity .2s, transform .2s; }
.sbar img:hover { opacity: .8; } .sbar img.on { opacity: 1; border-color: var(--ec); transform: translateY(-3px); }
.skill { display: flex; gap: 10px; align-items: flex-start; }
.skill img { width: 40px; height: 40px; border-radius: 6px; flex: 0 0 40px; border: 1px solid var(--line); }
.skill small { display: block; } .smeta { display: block; font-size: 11px; color: #6f675d; margin-top: 2px; }
.skills { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* promo screenshots */
.promo { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); grid-auto-flow: dense; }
.pshot { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); background: #000; }
.pshot.wide { grid-column: span 2; grid-row: span 2; }
.pshot img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s, filter .4s; filter: brightness(.9); }
.pshot:hover img { transform: scale(1.06); filter: brightness(1.05); }
.pshot:hover { border-color: var(--gold); }
.pcat { position: absolute; top: 8px; left: 8px; font: 600 10px Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--gold2);
  background: rgba(10,8,12,.75); border: 1px solid #4a3e2a; padding: 2px 8px; border-radius: 10px; }
.pcap { position: absolute; inset: auto 0 0 0; padding: 26px 12px 10px; background: linear-gradient(transparent, rgba(0,0,0,.85)); transform: translateY(40%); opacity: 0; transition: .35s; }
.pshot:hover .pcap, .pshot.wide .pcap { transform: none; opacity: 1; }
.pcap b { display: block; font-family: Cinzel, serif; color: var(--gold2); } .pcap small { color: #cfc6b6; font-size: 12px; }
#lightbox { position: fixed; inset: 0; z-index: 110; display: none; align-items: center; justify-content: center; gap: 10px; padding: 20px; background: rgba(0,0,0,.92); }
#lightbox.open { display: flex; animation: fadein .25s both; }
#lightbox figure { margin: 0; max-width: min(1600px, 88vw); }
#lightbox img { width: 100%; max-height: 80vh; object-fit: contain; border-radius: 4px; box-shadow: 0 20px 60px #000; animation: castpop .4s cubic-bezier(.2,1.2,.4,1); }
#lightbox figcaption { color: #cfc6b6; margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
#lightbox figcaption .pcat { position: static; } #lightbox figcaption b { color: var(--gold2); font-family: Cinzel, serif; }
#lightbox figcaption small { margin-left: auto; color: var(--muted); }
.lbprev, .lbnext, .lbx { background: rgba(20,16,24,.8); border: 1px solid #4a3e2a; color: var(--gold2); cursor: pointer; border-radius: 50%; }
.lbprev, .lbnext { flex: 0 0 48px; height: 48px; font-size: 28px; } .lbprev:hover, .lbnext:hover { background: #2a2214; }
.lbx { position: absolute; top: 16px; right: 20px; width: 40px; height: 40px; font-size: 24px; }
@media (max-width: 720px) { .pshot.wide { grid-column: auto; grid-row: auto; } .lbprev, .lbnext { position: absolute; bottom: 20px; } .lbprev { left: 20px; } .lbnext { right: 20px; } }

/* cinematic hero + films */
.hvideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: .55; pointer-events: none; }
/* stills from the cinematics: only when SHOW_CINEMATICS (app.js) adds .cine to <html> */
:root.cine .hero { background: linear-gradient(180deg, rgba(11,10,13,.35) 0%, rgba(11,10,13,.7) 65%, var(--bg) 100%), url(/img/hero_poster.jpg) center / cover; }
:root.cine .faction.koruna .bgimg { background-image: linear-gradient(0deg, var(--card) 12%, transparent 70%), url(/img/koruna_city.jpg); filter: none; }
:root.cine .faction.pakt .bgimg { background-image: linear-gradient(0deg, var(--card) 12%, transparent 70%), url(/img/pakt_city.jpg); }
:root.cine .faction .bgimg { opacity: .55; } :root.cine .faction:hover .bgimg { opacity: .75; }
.films { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.film { position: relative; display: block; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #000; color: var(--text); aspect-ratio: 16 / 10; }
.film img { width: 100%; height: 100%; object-fit: cover; opacity: .7; transition: transform .8s, opacity .4s; }
.film:hover img { transform: scale(1.06); opacity: .9; }
.film .play { position: absolute; left: 50%; top: 40%; width: 64px; height: 64px; margin: -32px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; padding-left: 4px; color: var(--gold2); background: rgba(10,8,12,.65); border: 2px solid var(--gold); box-shadow: 0 0 24px rgba(240,190,100,.4); transition: transform .3s, background .3s; }
.film:hover .play { transform: scale(1.12); background: rgba(60,40,15,.8); }
.fmeta { position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px; background: linear-gradient(transparent, rgba(0,0,0,.9)); }
.fmeta small { color: var(--gold); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; } .fmeta b { display: block; font: 700 20px Cinzel, serif; color: var(--gold2); }
.fmeta p { margin: 2px 0 0; color: #bdb4a6; font-size: 13px; }
#modal.wide .mbox { width: min(1100px, 100%); padding: 16px; }
.fplayer video { width: 100%; border-radius: 6px; background: #000; display: block; }
.fplayer h2 { margin: 14px 0 4px; } .fplayer h2::before, .fplayer h2::after { display: none; }

/* item icons */
.iimg { display: block; object-fit: contain; }
.iimg.none { visibility: hidden; }
.wcard { text-align: center; } .wcard p { text-align: center; }
.wico { width: 84px; height: 84px; margin: 0 auto 6px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); transition: transform .3s; }
.wcard:hover .wico { transform: scale(1.1) rotate(-6deg); }
.uico { width: 64px; height: 64px; margin: 0 auto 6px; filter: drop-shadow(0 0 10px rgba(255,140,40,.45)); }
.itemcard:hover .uico { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.agrid { display: grid; gap: 10px; margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.aset { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.aset:hover { transform: translateY(-2px); }
.aset b { display: block; font-family: Cinzel, serif; color: var(--text); font-size: 14px; } .aset small { color: var(--muted); font-size: 12px; display: block; }
.aval { font-size: 12px; color: #8fb6ec; }
.aslot { position: relative; flex: 0 0 64px; height: 64px; border-radius: 6px; background: radial-gradient(#221c28, #0e0c11); border: 1px solid #3a3440; }
.aslot::before { content: '⛨'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #2a2430; }
.aslot .iimg { position: relative; width: 100%; height: 100%; }
.aslot .tier { position: absolute; bottom: -6px; right: -6px; font: 700 10px Inter, sans-serif; padding: 1px 5px; border-radius: 8px; background: var(--bg); border: 1px solid currentColor; }
/* tier color ramp: common → magic → rare → epic → legendary */
.aset { --tc: #9a9286; } .aset.t3, .aset.t4 { --tc: #6fa8ff; } .aset.t5, .aset.t6 { --tc: #f0d050; } .aset.t7, .aset.t8, .aset.t9 { --tc: #b48cff; } .aset.t10, .aset.t11, .aset.t12 { --tc: #ff9a3c; }
.aset .aslot { border-color: color-mix(in srgb, var(--tc) 55%, transparent); box-shadow: inset 0 0 14px color-mix(in srgb, var(--tc) 25%, transparent); }
.aset .tier { color: var(--tc); } .aset:hover { border-color: color-mix(in srgb, var(--tc) 50%, transparent); }
.jgrid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.jcard { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); }
.jcard .iimg { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 6px; background: radial-gradient(#221c28, #0e0c11); border: 1px solid #3a3440; }
.jcard b { display: block; color: var(--text); } .jcard small { color: var(--muted); font-size: 12px; } .jcard p { margin: 4px 0 0; }
.jcard.g-Rare .iimg { border-color: #6a3a7a; box-shadow: 0 0 12px rgba(180,140,255,.35); } .jcard.g-Rare b { color: #d2bcff; }
.jcard.g-Medium .iimg { border-color: #2c4a7a; }
.jcard.g-Mid .iimg { border-color: #2c4a7a; } .jcard.g-High .iimg { border-color: #6a5a28; box-shadow: 0 0 10px rgba(240,208,80,.25); } .jcard.g-High b { color: #f0d050; }
.ecard { text-align: center; } .eico { width: 64px; height: 64px; margin: 0 auto 6px; animation: bob 3s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(120,200,255,.35)); }

/* spec switching */
.hint { text-transform: none; letter-spacing: 0; color: #6f675d; font-weight: 400; margin-left: 6px; }
.spec { cursor: pointer; transition: background .2s, border-color .2s, transform .2s; opacity: .7; }
.spec:hover { opacity: 1; transform: translateX(3px); }
.spec.on { opacity: 1; background: linear-gradient(90deg, rgba(201,164,92,.18), var(--bg2)); border-left-width: 4px; }
.spec:focus-visible { outline: 1px solid var(--gold); }
img.swap { animation: swapin .45s cubic-bezier(.2,1.4,.4,1); }
@keyframes swapin { from { transform: scale(.5) rotate(-12deg); opacity: 0; } }

/* mini spell icons */
.minis { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }
.minis img { width: 26px; height: 26px; border-radius: 4px; border: 1px solid var(--line); transition: transform .2s; }
.cls:hover .minis img, .card:hover .minis img { transform: translateY(-2px); }
.cls:hover .minis img:nth-child(2), .card:hover .minis img:nth-child(2) { transition-delay: .04s; }
.cls:hover .minis img:nth-child(3), .card:hover .minis img:nth-child(3) { transition-delay: .08s; }
.cls:hover .minis img:nth-child(4), .card:hover .minis img:nth-child(4) { transition-delay: .12s; }

/* spotlight */
.spot { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; padding: 0; overflow: hidden; min-height: 280px; }
.spot.koruna { border-top: 3px solid var(--blue); } .spot.pakt { border-top: 3px solid var(--red); }
.spinfo { padding: 26px; display: flex; flex-direction: column; justify-content: center; }
.spinfo small { color: var(--gold); letter-spacing: .12em; font-size: 12px; text-transform: uppercase; }
.spinfo h3 { font-size: 30px; margin: 4px 0 8px; } .spinfo p { color: #bdb4a6; font-size: 14px; } .spinfo .btn { align-self: flex-start; margin-top: 8px; }
.spinfo.swap > * { animation: up .6s both; } .spinfo.swap > *:nth-child(2) { animation-delay: .08s; } .spinfo.swap > *:nth-child(3) { animation-delay: .16s; } .spinfo.swap > *:nth-child(4) { animation-delay: .24s; }
.spstage { --ec: #c9a45c; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--ec) 30%, transparent), transparent 60%), #0b0a0e; border-left: 1px solid var(--line); }
.spstage.el-fire { --ec: #ff7a2a; } .spstage.el-frost { --ec: #6ec8ff; } .spstage.el-lightning { --ec: #f0e060; } .spstage.el-holy { --ec: #ffe9a0; }
.spstage.el-shadow { --ec: #9a6aff; } .spstage.el-arcane { --ec: #c87aff; } .spstage.el-poison, .spstage.el-nature { --ec: #7fd46a; } .spstage.el-blood { --ec: #ff3a3a; }
.spstage.el-spirit { --ec: #8ff0e0; } .spstage.el-physical { --ec: #e0d0b0; }
.spstage img { width: 96px; height: 96px; border-radius: 12px; border: 2px solid var(--ec); box-shadow: 0 0 34px color-mix(in srgb, var(--ec) 60%, transparent); position: relative; z-index: 1; }
.spstage b { font: 700 18px Cinzel, serif; color: var(--ec); z-index: 1; }
.spstage .sring { top: 42%; }
.spstage.cast img { animation: castpop .6s cubic-bezier(.2,1.6,.4,1); } .spstage.cast .sring { animation: ring 1.1s ease-out; } .spstage.cast .sring.r2 { animation: ring 1.1s .2s ease-out; }
.spdots { display: flex; gap: 6px; } .spdots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: background .3s; } .spdots i.on { background: var(--ec); box-shadow: 0 0 8px var(--ec); }

/* ---------- round 7: world map ---------- */
.mapwrap { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid #4a3e2a;
  background: radial-gradient(ellipse at 50% 40%, #2a2218 0%, #16120e 60%, #0b0907 100%); box-shadow: inset 0 0 120px rgba(0,0,0,.8), 0 10px 40px rgba(0,0,0,.5); }
.mapwrap::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, transparent 0 49px, rgba(201,164,92,.06) 49px 50px), repeating-linear-gradient(90deg, transparent 0 49px, rgba(201,164,92,.06) 49px 50px); }
.wmap { display: block; width: 100%; height: auto; position: relative; }
.wmap .links path { fill: none; stroke: #6a5a3a; stroke-width: 3; stroke-dasharray: 2 8; stroke-linecap: round; }
.region rect { fill: color-mix(in srgb, var(--rc) 9%, transparent); stroke: color-mix(in srgb, var(--rc) 55%, transparent); stroke-width: 1.5; }
.region .rname { font: 700 20px Cinzel, serif; fill: var(--rc); text-anchor: middle; letter-spacing: .06em; }
.region .rsub { font: 12px Inter, sans-serif; fill: #8a8070; text-anchor: middle; }
.region .route { fill: none; stroke: color-mix(in srgb, var(--rc) 60%, transparent); stroke-width: 2.5; stroke-dasharray: 2000; stroke-dashoffset: 2000; animation: draw 3s .3s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.znode { cursor: pointer; animation: pop .4s calc(.4s + var(--d)) both; transform-box: fill-box; transform-origin: center; }
@keyframes pop { from { opacity: 0; transform: scale(0); } }
.znode circle { fill: #1a1510; stroke: var(--rc); stroke-width: 2; transition: fill .2s, r .2s; }
.znode text { font: 700 9px Inter, sans-serif; fill: #e6dcc8; text-anchor: middle; pointer-events: none; }
.znode:hover circle, .znode:focus circle { fill: var(--rc); r: 13; }
.znode:hover text, .znode:focus text { fill: #120e14; }
.znode:focus { outline: none; }
.znode.final circle { stroke: #ff5a3c; animation: bosspulse 2.4s ease-in-out infinite; }
@keyframes bosspulse { 50% { stroke-width: 4; filter: drop-shadow(0 0 6px #ff5a3c); } }
.fortress circle { animation: bosspulse 3s ease-in-out infinite; } .fortress text, .city text { font: 700 13px Cinzel, serif; fill: #ff9a8a; text-anchor: middle; }
.city path { fill: #c9a45c; } .city .road { fill: none; stroke: #c9a45c; stroke-width: 2; stroke-dasharray: 3 4; } .city text { fill: var(--gold2); font-size: 11px; }
.compass circle { fill: none; stroke: #6a5a3a; } .compass path { fill: #c9a45c; } .compass text { font: 700 12px Cinzel, serif; fill: #c9a45c; text-anchor: middle; }
.mtip { position: absolute; z-index: 5; width: 200px; padding: 10px 12px; pointer-events: none; background: rgba(8,7,10,.96); border: 1px solid #7a5a2a; border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.7); font-size: 13px; animation: fadein .15s both; }
.mtip b { display: block; font-family: Cinzel, serif; color: var(--gold2); } .mtip span { color: var(--gold); font-size: 12px; }
.mtip small { display: block; color: var(--muted); margin-top: 4px; } .mtip em { color: #ff8a7a; font-style: normal; } .mtip i { display: block; color: #6f675d; font-size: 11px; margin-top: 4px; }
.wmap.small .rsub { display: none; }
@media (prefers-reduced-motion: reduce) { .region .route { stroke-dashoffset: 0; } }

@media (max-width: 720px) {
  .themes { padding: 14px 24px; justify-content: center; gap: 14px; } .themes button { width: 24px; height: 24px; }
  .astats { margin-left: 0; }
  .spot { grid-template-columns: 1fr; } .spstage { min-height: 220px; border-left: 0; border-top: 1px solid var(--line); }
  .rays { top: 90px; width: 600px; height: 600px; margin: -300px 0 0 -300px; }
  /* slide-in drawer (backdrop-filter on .top would trap the fixed nav inside the header) */
  .top { backdrop-filter: none; background: rgba(11,10,13,.97); }
  html body .top nav { display: flex; position: fixed; top: 0; bottom: 0; left: auto; right: 0; width: min(280px, 80vw); padding: 70px 0 20px; flex-direction: column; align-items: stretch; gap: 0;
    background: linear-gradient(180deg, #1a1520, #0c0a0e); border: 0; border-left: 1px solid #4a3e2a; box-shadow: -20px 0 60px rgba(0,0,0,.7);
    transform: translateX(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1); z-index: 30; }
  html body.nav-open .top nav { transform: none; }
  html body .top nav a { padding: 14px 24px; border-bottom: 1px solid var(--line); font-family: Cinzel, serif; }
  .top nav > a::after { display: none; }
  .top nav a.on { color: var(--gold2); background: linear-gradient(90deg, rgba(201,164,92,.15), transparent); box-shadow: inset 3px 0 0 var(--gold); }
  #auth { flex-direction: column; align-items: stretch; padding: 14px 24px; } #auth a { padding: 8px 0; border: 0; text-align: center; }
  .burger { position: relative; z-index: 31; transition: transform .3s; } .nav-open .burger { transform: rotate(90deg); color: var(--gold2); }
  .nav-open::after { content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 9; }
  #toasts { left: 16px; }
  #auth .sep { display: none; }
  .dpath::before { left: 20px; }
  .dnode, .dnode.l, .dnode.r { width: auto; margin: 0; padding: 0 0 16px 56px; }
  .dnode .dlvl, .dnode.l .dlvl, .dnode.r .dlvl { left: 0; right: auto; }
  .dnode.l .card { text-align: left; }
  .mgrid { grid-template-columns: 1fr; }
  .war { flex-wrap: wrap; justify-content: space-between; } .wmid { order: 3; flex-basis: 100%; }
  .gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .podium { gap: 6px; } .pod .medal { font-size: 22px; }
  .burger { display: block; }
  .top nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg2); border-bottom: 1px solid var(--line); }
  .top nav a, .top nav #auth { padding: 12px 16px; }
  .nav-open .top nav { display: flex; }
  .vs { grid-template-columns: 1fr; }
}
/* Measured build guide: self-contained, no reveal animation or overlay. */
#build-guide { max-width:1200px; margin:auto; }
.bg-hero { padding:36px 24px; margin-bottom:24px; border:1px solid #685333; background:radial-gradient(ellipse at top right,#47331d66,transparent 65%),#101216; }
.bg-hero h1 { margin:14px 0; }
.bg-hero p { max-width:800px; line-height:1.7; color:var(--muted); }
.bg-method { padding:18px; margin:20px 0; border:1px solid #39362e; background:#14161b; line-height:1.7; }
.bg-method summary { cursor:pointer; color:var(--gold); font-weight:600; }
.bg-filters { display:grid; grid-template-columns:1fr 1fr 1.5fr; gap:16px; margin:24px 0; }
.bg-filters label { display:grid; gap:8px; }
.bg-filters input,.bg-filters select { width:100%; min-width:0; }
.bg-table { min-width:960px; }
.bg-table small { display:block; margin-top:8px; color:var(--muted); font-weight:normal; }
.bg-table td { font-variant-numeric:tabular-nums; white-space:nowrap; }
.bg-table th:first-child { min-width:260px; }
.bg-metrics { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; }
.bg-metrics>div { padding:18px; background:#17191f; border-top:2px solid var(--gold); }
.bg-metrics strong { display:block; color:var(--gold); font-size:24px; margin-top:8px; }
.bg-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:16px; }
.bg-card { background:#17191f; border:1px solid #34363d; padding:20px; }
.bg-card small { color:var(--muted); }
#build-guide code { display:block; font-size:12px; color:#a8aab4; overflow-wrap:anywhere; margin-top:8px; }
.bg-passives { padding-left:34px; }
.bg-passives li { padding:12px 16px; border-bottom:1px solid #34363d; }
.bg-passives li::marker { color:var(--gold); }
.bg-passives span { display:block; margin-top:6px; color:var(--muted); }
.bg-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px; }
.bg-stats dd { margin:0; color:var(--gold); }
@media(max-width:700px) { .bg-filters { grid-template-columns:1fr; } .bg-metrics { grid-template-columns:repeat(2,1fr); } .bg-hero { padding:22px 16px; } }

/* ---- weapons tab: real drop tiers ---- */
.gtab { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 14px; }
.gtab th, .gtab td { padding: 7px 10px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; }
.gtab th { color: var(--gold); font-family: Cinzel, serif; font-weight: 500; font-size: 13px; }
.wfams { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.wfams button { display: flex; align-items: center; gap: 6px; padding: 5px 12px 5px 6px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: var(--text); cursor: pointer; font: inherit; font-size: 14px; }
.wfams button img { width: 28px; height: 28px; }
.wfams button:hover { border-color: var(--gold); }
.wfams button.on { background: rgba(201,164,92,.18); border-color: var(--gold); color: var(--gold2); }
.wlvl { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.wlvl input { flex: 1; min-width: 160px; max-width: 420px; accent-color: var(--gold); }
.wlvl b { color: var(--gold2); font-family: Cinzel, serif; font-size: 20px; min-width: 40px; }
.whead { display: flex; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid rgba(201,164,92,.25); border-radius: 12px; background: rgba(255,255,255,.03); margin-bottom: 14px; }
.whead .wico { margin: 0; flex: none; }
.whead h3 { margin: 0 0 4px; } .whead p { margin: 3px 0; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tcard { position: relative; display: flex; flex-direction: column; gap: 5px; align-items: center; text-align: center; padding: 14px 12px; border-radius: 12px; background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.015)); border: 1px solid rgba(255,255,255,.08); color: var(--muted); transition: transform .25s, border-color .25s; }
.tcard:hover { transform: translateY(-3px); border-color: currentColor; }
.tcard > b { font-family: Cinzel, serif; font-weight: 500; font-size: 15px; line-height: 1.25; }
.tcard small { font-size: 12px; }
.tcard.r-Common { color: var(--muted); } .tcard.r-Common > b { color: var(--text); }
.tcard.off { opacity: .45; filter: grayscale(.6); }
.tico { position: relative; width: 84px; height: 84px; border-radius: 12px; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); }
.tico img { width: 100%; height: 100%; filter: brightness(var(--b, 1)) drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.tico .tier { position: absolute; right: -6px; bottom: -4px; font: 600 11px Inter, sans-serif; padding: 2px 6px; border-radius: 6px; background: #000a; border: 1px solid currentColor; }
.tdmg { color: var(--text); font-size: 14px; line-height: 1.5; } .tdmg b { color: var(--gold2); }
.tch { margin-top: auto; font-size: 12px; color: var(--muted); }
.tag.el-Fire { color: #ff8a4c; } .tag.el-Ice { color: #8fd0ff; } .tag.el-Lightning { color: #c9b6ff; } .tag.el-Holy { color: #ffe08a; } .tag.el-Poison { color: #9be37a; } .tag.el-Shadow { color: #c48cff; } .tag.el-Magical { color: #8fb4ff; }
@media (max-width: 600px) { .tgrid { grid-template-columns: repeat(2, 1fr); } .whead { flex-direction: column; text-align: center; } }

/* ---- armor tab: real drop pieces ---- */
.seg button.r-Common { color: var(--text); }
.arow { border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; background: rgba(255,255,255,.02); transition: border-color .25s; }
.arow.hot { border-color: rgba(201,164,92,.55); background: rgba(201,164,92,.06); }
.ahead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ahead .tier { font: 600 12px Inter, sans-serif; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--gold); color: var(--gold2); }
.ahead small { color: var(--muted); }
.ahead .ach { margin-left: auto; font-size: 13px; color: var(--muted); }
.arow.hot .ach { color: var(--gold2); }
.apieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.apiece { display: flex; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; background: rgba(0,0,0,.25); }
.apiece img { width: 72px; height: 72px; flex: none; border-radius: 8px; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); }
.armor-icon.uico { width: 96px; height: 96px; }
.apiece b { display: block; font-size: 13px; line-height: 1.25; }
.apiece small { display: block; font-size: 11.5px; color: var(--muted); }
.apiece .aval { font-size: 13px; color: var(--text); }
.apiece.r-Common b { color: var(--text); }

/* Shared class identity: 20 families and their 80 specializations. */
.class-emblem{width:48px;height:48px;object-fit:contain;flex-shrink:0;vertical-align:middle}
.class-heading{display:flex;align-items:center;gap:12px}
.cls>.class-emblem{display:block;margin:0 auto 12px}
.mhead>.identity-emblem{width:72px;height:72px}
.spec>.class-emblem{float:left;width:36px;height:36px;margin-right:12px}
.spec{display:flow-root}

/* ---- loot modal: full droplist ---- */
.lrows { display: grid; gap: 6px; margin-bottom: 6px; }
.lrow { display: flex; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.06); }
.lrow > div { flex: 1; min-width: 0; }
.lrow b { display: block; font-size: 14px; } .lrow small { display: block; font-size: 12px; color: var(--muted); }
.lrow em { font-style: normal; font-weight: 600; color: var(--gold2); white-space: nowrap; }
.lrow.u { border-color: rgba(255,154,60,.35); } .lrow.u b { color: #ff9a3c; }
.lico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 8px; background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%); }
.lico img { width: 100%; height: 100%; filter: brightness(var(--b, 1)); }
.lico.gem { font-size: 22px; } .gem.g-Bless { color: #8fd0ff; } .gem.g-Soul { color: #c48cff; } .gem.g-Life { color: #ff6b6b; } .gem.g-U { color: #ff9a3c; }
.lgo { float: right; font: 500 12px Inter, sans-serif; background: none; border: 1px solid rgba(201,164,92,.4); color: var(--gold2); border-radius: 999px; padding: 3px 10px; cursor: pointer; }
.lgo:hover { background: rgba(201,164,92,.15); }
.af-intro{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:24px 0}.af-intro h2{margin:10px 0}.af-intro p{color:var(--muted)}
.af-totals{display:flex;gap:28px;text-align:center}.af-totals b{font-size:30px;color:var(--gold,#d3b979)}.af-totals small{display:block;font:12px sans-serif;color:var(--muted);margin-top:5px}
.af-controls{display:grid;grid-template-columns:minmax(180px,2fr) 1fr 1fr;gap:14px;padding:20px;border:1px solid #39313f;background:#14111b;border-radius:12px}.af-controls label{display:flex;flex-direction:column;gap:8px;font-size:13px;color:#d3c9dc}.af-controls input,.af-controls select{width:100%;min-height:44px;background:#0c0a10;color:#eee5f3;border:1px solid #55485e;border-radius:6px;padding:10px}
.af-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:20px;align-items:start}.af-list{max-height:780px;overflow:auto;border:1px solid #352d3e;border-radius:10px}.af-list thead{position:sticky;top:0;background:#18131f;z-index:1}.af-list td{font-variant-numeric:tabular-nums}.af-list td:not(:first-child){white-space:nowrap}.af-list button{display:block;width:100%;border:0;background:none;text-align:left;color:inherit;padding:8px;cursor:pointer}.af-list button b,.af-list button small{display:block;margin-top:5px}.af-list button small{color:#bfb4c9;font-size:12px}.af-prefix{color:#9abfff}.af-suffix{color:#83d4c2}.af-list button>span{font-size:11px;text-transform:uppercase;letter-spacing:.08em}.af-selected{background:#292032}.af-list button:focus-visible{outline:2px solid #e0bf73;outline-offset:-2px}.af-detail{min-width:0;position:sticky;top:80px}.af-tier-table{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}.af-tier-table th,.af-tier-table td{padding:9px 7px}.af-active-tier{background:#3a2b1c;color:#ffdda1}.af-method{margin-top:24px}.af-method summary{cursor:pointer;font-weight:bold;padding:8px 0}.af-method p{line-height:1.7}.af-odds{display:flex;gap:12px;flex-wrap:wrap}.af-odds span{padding:10px 14px;border:1px solid #403449;border-radius:8px}.af-odds b{display:block;color:#e0bf73}.af-method caption{text-align:left;padding:12px 0;color:#d3c9dc}
@media(max-width:1000px){.af-layout{grid-template-columns:1fr}.af-detail{position:static}.af-list{max-height:480px}}
@media(max-width:600px){.af-intro{align-items:flex-start;flex-direction:column}.af-controls{grid-template-columns:1fr}.af-totals{gap:30px}.af-list .gtab{font-size:12px}.af-detail{padding:14px}}
