@font-face { font-family: 'Cinzel'; font-weight: 400; src: url(dist/fonts/cinzel-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Cinzel'; font-weight: 600; src: url(dist/fonts/cinzel-latin-600-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Cinzel'; font-weight: 700; src: url(dist/fonts/cinzel-latin-700-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Cinzel'; font-weight: 800; src: url(dist/fonts/cinzel-latin-800-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Cormorant'; font-weight: 400; src: url(dist/fonts/cormorant-garamond-latin-400-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Cormorant'; font-weight: 500; src: url(dist/fonts/cormorant-garamond-latin-500-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Cormorant'; font-weight: 600; src: url(dist/fonts/cormorant-garamond-latin-600-normal.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Cormorant'; font-weight: 700; src: url(dist/fonts/cormorant-garamond-latin-700-normal.woff2) format('woff2'); font-display: swap; }

:root {
  --ink: #0b0907; --ink2: #15110d; --panel: rgba(14, 11, 8, 0.84); --panel2: rgba(24, 19, 14, 0.9);
  --parch: #e9dcc0; --dim: #a89a80; --faint: #6e6352; --gold: #cfa64e; --gold2: #f0cf7a; --blood: #a8301f; --blood2: #e0533a;
  --steel: #6f93bd; --green: #7fbf5a; --line: rgba(207, 166, 78, 0.32); --line2: rgba(207, 166, 78, 0.6);
  --head: 'Cinzel', Georgia, serif; --body: 'Cormorant', Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #000; color: var(--parch); font-family: var(--body); font-size: 18px; user-select: none; -webkit-font-smoothing: antialiased; }
canvas { display: block; }
#game { position: fixed; inset: 0; }
#overlay { position: fixed; inset: 0; pointer-events: none; z-index: 5; }
#ui { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
#ui > * { pointer-events: auto; }
.hidden { display: none !important; }
.ico { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; }
button { font: inherit; color: inherit; }

/* ---------- generic ---------- */
.panel { background: linear-gradient(180deg, rgba(30, 23, 16, 0.86), rgba(10, 8, 6, 0.9)); border: 1px solid var(--line); box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 220, 150, 0.06); position: relative; }
.panel::before, .panel::after { content: ''; position: absolute; width: 14px; height: 14px; border: 2px solid var(--gold); opacity: 0.75; pointer-events: none; }
.panel::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.panel::after { bottom: -2px; right: -2px; border-left: none; border-top: none; }
h1, h2, h3, .head { font-family: var(--head); font-weight: 700; letter-spacing: 0.08em; margin: 0; text-transform: uppercase; }
h2 { font-size: 26px; color: var(--gold2); text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); }
h3 { font-size: 16px; color: var(--gold); letter-spacing: 0.14em; }
.sub { color: var(--dim); font-style: italic; }
.btn { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em; font-size: 15px; padding: 12px 26px; background: linear-gradient(180deg, #2a2016, #16110c);
  border: 1px solid var(--line2); color: var(--parch); cursor: pointer; transition: all 0.15s; position: relative; }
.btn:hover { border-color: var(--gold2); color: #fff; box-shadow: 0 0 22px rgba(240, 190, 90, 0.25), inset 0 0 16px rgba(240, 190, 90, 0.08); transform: translateY(-1px); }
.btn:disabled { opacity: 0.4; cursor: default; transform: none; box-shadow: none; }
.btn.primary { background: linear-gradient(180deg, #8a2a1a, #4a140c); border-color: #e0806a; font-size: 18px; padding: 15px 38px; }
.btn.primary:hover { box-shadow: 0 0 30px rgba(230, 90, 50, 0.45); }
.btn.small { font-size: 12px; padding: 7px 14px; letter-spacing: 0.1em; }
.btn.gold { background: linear-gradient(180deg, #6a5020, #34260e); border-color: var(--gold2); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); font-family: var(--head); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.bar { height: 8px; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.08); position: relative; overflow: hidden; }
.bar > i { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, #8a6a2a, var(--gold2)); transition: width 0.5s; }
.fade-in { animation: fadeIn 0.6s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 rgba(240, 190, 90, 0); } 50% { box-shadow: 0 0 24px rgba(240, 190, 90, 0.55); } }
@keyframes glowText { 0%, 100% { text-shadow: 0 0 20px rgba(255, 140, 60, 0.4); } 50% { text-shadow: 0 0 40px rgba(255, 160, 80, 0.8); } }

/* ---------- title ---------- */
#title { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse at 50% 60%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 70%, rgba(0, 0, 0, 0.85) 100%); }
#title .logo { font-family: var(--head); font-weight: 800; font-size: min(26vw, 260px); letter-spacing: 0.12em; line-height: 0.9; color: #f2dfb6;
  background: linear-gradient(180deg, #fff2d0 0%, #e0b860 45%, #8a5a20 70%, #4a2a10 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 30px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 40px rgba(255, 120, 40, 0.25)); padding-left: 0.12em; }
#title .tag { font-family: var(--head); letter-spacing: 0.5em; font-size: 18px; color: var(--gold); margin-top: 6px; text-transform: uppercase; padding-left: 0.5em; }
#title .press { margin-top: 70px; font-family: var(--head); letter-spacing: 0.4em; font-size: 14px; color: var(--parch); opacity: 0.8; animation: blink 2.4s infinite; text-transform: uppercase; }
@keyframes blink { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.9; } }
#title .studio { position: absolute; bottom: 26px; font-family: var(--head); letter-spacing: 0.3em; font-size: 11px; color: var(--faint); }
#lore { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.72); }
#lore .text { max-width: 760px; text-align: center; font-size: 30px; line-height: 1.45; color: var(--parch); text-shadow: 0 2px 20px #000; padding: 20px; }
#lore .text p { opacity: 0; transition: opacity 1.4s; margin: 0 0 22px; }
#lore .text p.on { opacity: 1; }
#lore .skip { position: absolute; bottom: 30px; right: 40px; }

/* ---------- war room ---------- */
#warroom { position: absolute; inset: 0; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: 78px 1fr; background: linear-gradient(90deg, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 30%, rgba(0, 0, 0, 0.25) 60%, rgba(0, 0, 0, 0.6) 100%); }
#topbar { grid-column: 1 / 3; display: flex; align-items: center; gap: 22px; padding: 0 26px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.3)); border-bottom: 1px solid var(--line); }
#topbar .brand { font-family: var(--head); font-weight: 800; font-size: 34px; letter-spacing: 0.18em; color: var(--gold2); margin-right: 10px; }
#topbar .sig { width: 46px; height: 58px; display: grid; place-items: center; clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%); font-size: 26px; }
#topbar .who { display: flex; flex-direction: column; gap: 4px; min-width: 260px; }
#topbar .who .rk { font-family: var(--head); font-size: 15px; letter-spacing: 0.12em; }
#topbar .who .rk b { color: var(--gold2); }
#topbar .who .bar { width: 260px; }
#topbar .stat { display: flex; flex-direction: column; align-items: center; font-family: var(--head); font-size: 11px; letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; }
#topbar .stat b { font-size: 20px; color: var(--parch); letter-spacing: 0.04em; }
#topbar .stat.pts b { color: var(--gold2); }
#topbar .grow { flex: 1; }
#daily { animation: pulse 2s infinite; }
#nav { display: flex; flex-direction: column; padding: 26px 0 26px 26px; gap: 4px; }
#nav button { text-align: left; background: none; border: none; border-left: 2px solid transparent; padding: 12px 18px; font-family: var(--head); font-size: 15px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); cursor: pointer; transition: all 0.15s; }
#nav button:hover { color: var(--parch); background: linear-gradient(90deg, rgba(207, 166, 78, 0.1), transparent); }
#nav button.on { color: var(--gold2); border-left-color: var(--gold2); background: linear-gradient(90deg, rgba(207, 166, 78, 0.18), transparent); }
#nav .badge { display: inline-block; min-width: 20px; padding: 1px 6px; margin-left: 8px; background: var(--blood); color: #fff; font-size: 11px; border-radius: 10px; text-align: center; }
#nav .navsep { flex: 1; }
#main { padding: 26px 34px 26px 10px; overflow-y: auto; overflow-x: hidden; }
#main::-webkit-scrollbar { width: 8px; } #main::-webkit-scrollbar-thumb { background: rgba(207, 166, 78, 0.3); }

.home { display: grid; grid-template-columns: minmax(380px, 520px) 1fr; gap: 28px; align-items: start; }
.home .call { padding: 34px; }
.home .call h2 { font-size: 40px; margin-bottom: 8px; }
.home .call p { font-size: 21px; line-height: 1.5; color: var(--parch); margin: 14px 0 26px; }
.home .quick { display: flex; gap: 12px; flex-wrap: wrap; }
.home .side { display: flex; flex-direction: column; gap: 18px; }
.mini { padding: 18px 22px; }
.mini .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 18px; }
.mini .row b { font-family: var(--head); color: var(--gold2); font-size: 15px; }

/* setup wizard */
.wizard { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; }
.steps .st { flex: 1; padding: 10px 12px; font-family: var(--head); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); text-shadow: 0 1px 4px #000; border-bottom: 2px solid rgba(255, 255, 255, 0.08); }
.steps .st.on { color: var(--gold2); border-bottom-color: var(--gold2); }
.steps .st.done { color: var(--dim); border-bottom-color: rgba(207, 166, 78, 0.4); }
.stepbody { padding: 26px 30px; min-height: 520px; }
.stepbody h2 { margin-bottom: 4px; }
.stepbody .sub { margin-bottom: 20px; font-size: 19px; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.opt { padding: 16px 18px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.35); cursor: pointer; transition: all 0.15s; position: relative; }
.opt:hover { border-color: var(--line2); background: rgba(207, 166, 78, 0.06); }
.opt.on { border-color: var(--gold2); background: linear-gradient(180deg, rgba(207, 166, 78, 0.16), rgba(207, 166, 78, 0.04)); box-shadow: 0 0 24px rgba(240, 190, 90, 0.18); }
.opt.locked { opacity: 0.45; cursor: not-allowed; }
.opt .t { font-family: var(--head); font-weight: 700; letter-spacing: 0.1em; font-size: 16px; text-transform: uppercase; }
.opt .d { color: var(--dim); font-size: 17px; margin-top: 6px; line-height: 1.3; }
.opt .fx { color: var(--gold); font-size: 16px; margin-top: 8px; font-style: italic; }
.opt .lk { position: absolute; top: 10px; right: 12px; font-family: var(--head); font-size: 11px; color: var(--blood2); letter-spacing: 0.1em; }
.opt .ic { font-size: 34px; color: var(--gold); margin-bottom: 8px; }
.sizes { display: flex; gap: 8px; margin: 10px 0 24px; }
.sizes .opt { flex: 1; text-align: center; padding: 14px 6px; }
.sizes .opt .t { font-size: 22px; }
.label { font-family: var(--head); font-size: 13px; letter-spacing: 0.18em; color: var(--gold); text-transform: uppercase; margin: 22px 0 8px; }

.muster { display: flex; flex-direction: column; gap: 10px; }
.urow { display: grid; grid-template-columns: 54px 180px 1fr 64px 70px; gap: 14px; align-items: center; padding: 10px 14px; border: 1px solid rgba(255, 255, 255, 0.06); background: rgba(0, 0, 0, 0.3); }
.urow:hover { border-color: var(--line); }
.urow .ic { font-size: 34px; color: var(--gold); text-align: center; }
.urow .n { font-family: var(--head); font-weight: 700; letter-spacing: 0.08em; font-size: 15px; }
.urow .s { color: var(--dim); font-size: 14px; }
.urow .cnt { font-family: var(--head); font-size: 22px; text-align: right; color: var(--gold2); }
.urow .cost { color: var(--dim); font-size: 15px; text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; background: linear-gradient(90deg, #6a4a1a, #2a2016); outline: none; border: 1px solid rgba(255, 255, 255, 0.08); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 26px; background: linear-gradient(180deg, var(--gold2), #8a6020); border: 1px solid #000; cursor: pointer; clip-path: polygon(50% 0, 100% 25%, 100% 100%, 0 100%, 0 25%); }
.totals { display: flex; gap: 24px; margin-top: 14px; padding: 14px 18px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.4); align-items: center; }
.totals .tv { font-family: var(--head); font-size: 22px; }
.totals .tv.over { color: var(--blood2); }
.totals .tl { font-family: var(--head); font-size: 11px; letter-spacing: 0.16em; color: var(--dim); text-transform: uppercase; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.summary { padding: 22px; position: sticky; top: 0; }
.summary .line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05); font-size: 17px; }
.summary .line b { font-family: var(--head); font-size: 13px; color: var(--gold2); letter-spacing: 0.08em; text-align: right; }
.summary .nav { display: flex; gap: 10px; margin-top: 22px; }
.summary .nav .btn { flex: 1; padding: 12px 8px; }
.comp { display: flex; height: 14px; margin: 12px 0; border: 1px solid rgba(255, 255, 255, 0.1); }
.comp i { display: block; height: 100%; }

/* heroes */
.heroes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.hcard { padding: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.55)); cursor: pointer; position: relative; transition: all 0.15s; min-height: 250px; }
.hcard:hover { border-color: var(--line2); transform: translateY(-2px); }
.hcard.on { border-color: var(--gold2); box-shadow: 0 0 30px rgba(240, 190, 90, 0.2); background: linear-gradient(180deg, rgba(207, 166, 78, 0.12), rgba(0, 0, 0, 0.55)); }
.hcard.locked { opacity: 0.5; cursor: not-allowed; filter: grayscale(0.7); }
.hcard .portrait { width: 74px; height: 74px; display: grid; place-items: center; font-size: 46px; border: 1px solid var(--line); background: radial-gradient(circle, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.4)); float: left; margin-right: 14px; }
.hcard .nm { font-family: var(--head); font-size: 20px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.hcard .tt { color: var(--dim); font-style: italic; font-size: 17px; }
.hcard .lore { clear: both; padding-top: 12px; font-size: 16px; line-height: 1.35; color: var(--parch); opacity: 0.85; }
.hcard .ab { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }
.hcard .ab span { color: var(--dim); }
.hcard .ab b { font-family: var(--head); font-size: 11px; color: var(--gold); letter-spacing: 0.1em; margin-right: 6px; }
.hcard .order { position: absolute; top: 12px; right: 14px; font-family: var(--head); font-size: 26px; color: var(--gold2); }
.hcard .leadtag { position: absolute; bottom: 12px; right: 14px; }
.statline { display: flex; gap: 10px; margin-top: 8px; font-family: var(--head); font-size: 11px; letter-spacing: 0.08em; color: var(--dim); }
.statline b { color: var(--parch); }

/* upgrades */
.paths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.path { padding: 20px; }
.path h3 { font-size: 20px; }
.path .ps { color: var(--dim); margin-bottom: 14px; }
.node { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(0, 0, 0, 0.3); cursor: pointer; transition: all 0.15s; }
.node:hover { border-color: var(--line2); }
.node.max { border-color: rgba(207, 166, 78, 0.6); background: rgba(207, 166, 78, 0.08); }
.node.locked { opacity: 0.4; cursor: not-allowed; }
.node .nn { font-family: var(--head); font-size: 14px; letter-spacing: 0.08em; font-weight: 700; }
.node .nd { grid-column: 1 / 3; color: var(--dim); font-size: 15px; }
.node .pips { display: flex; gap: 4px; align-items: center; }
.node .pips i { width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid var(--gold); }
.node .pips i.f { background: var(--gold2); box-shadow: 0 0 8px var(--gold2); }
.node .req { grid-column: 1 / 3; font-family: var(--head); font-size: 10px; letter-spacing: 0.12em; color: var(--blood2); }

/* banner editor */
.bannered { display: grid; grid-template-columns: 300px 1fr; gap: 30px; }
.bannerprev { padding: 26px; display: grid; place-items: center; }
.bannerprev canvas { width: 200px; height: 320px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.8)); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 38px; height: 38px; border: 2px solid rgba(255, 255, 255, 0.15); cursor: pointer; }
.sw.on { border-color: #fff; box-shadow: 0 0 14px rgba(255, 255, 255, 0.4); }
.sigils { display: flex; flex-wrap: wrap; gap: 8px; }
.sg { width: 62px; height: 62px; display: grid; place-items: center; font-size: 36px; border: 1px solid var(--line); cursor: pointer; color: var(--gold); background: rgba(0, 0, 0, 0.3); }
.sg.on { border-color: var(--gold2); background: rgba(207, 166, 78, 0.18); }
.sg.locked { opacity: 0.25; cursor: not-allowed; }

/* achievements / legends */
.achs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ach { padding: 14px 16px; border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(0, 0, 0, 0.3); display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: center; }
.ach .ai { font-size: 30px; color: var(--faint); }
.ach.got { border-color: var(--line2); background: linear-gradient(90deg, rgba(207, 166, 78, 0.12), rgba(0, 0, 0, 0.3)); }
.ach.got .ai { color: var(--gold2); filter: drop-shadow(0 0 8px rgba(240, 190, 90, 0.6)); }
.ach .an { font-family: var(--head); font-size: 14px; letter-spacing: 0.06em; font-weight: 700; }
.ach .ad { color: var(--dim); font-size: 15px; }
table.legends { width: 100%; border-collapse: collapse; font-size: 17px; }
table.legends th { font-family: var(--head); font-size: 11px; letter-spacing: 0.16em; color: var(--gold); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); text-transform: uppercase; }
table.legends td { padding: 9px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
table.legends tr.me td { color: var(--gold2); font-weight: 700; }
.won { color: var(--green); font-family: var(--head); font-size: 13px; } .lost { color: var(--blood2); font-family: var(--head); font-size: 13px; }

.settings { display: grid; grid-template-columns: 240px 1fr; gap: 14px 24px; align-items: center; max-width: 720px; padding: 26px; }
.settings label { font-family: var(--head); font-size: 13px; letter-spacing: 0.14em; color: var(--dim); text-transform: uppercase; }
select { background: #15110c; color: var(--parch); border: 1px solid var(--line2); padding: 8px 10px; font-family: var(--head); font-size: 13px; letter-spacing: 0.08em; }

/* modal */
.modal { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); z-index: 30; }
.modal .box { padding: 34px 40px; min-width: 420px; max-width: 760px; text-align: center; }
.modal .box h2 { margin-bottom: 14px; }
.modal .box .acts { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.keys { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 8px 18px; text-align: left; margin-top: 16px; font-size: 17px; }
kbd { font-family: var(--head); font-size: 12px; padding: 3px 8px; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.5); color: var(--gold2); min-width: 26px; display: inline-block; text-align: center; }

/* ---------- HUD ---------- */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud * { pointer-events: none; }
#hud .pointer { pointer-events: auto; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); opacity: 0.85; }
#crosshair::before, #crosshair::after { content: ''; position: absolute; background: rgba(255, 240, 210, 0.85); box-shadow: 0 0 4px #000; }
#crosshair::before { left: 14px; top: 4px; width: 2px; height: 22px; } #crosshair::after { top: 14px; left: 4px; height: 2px; width: 22px; }
#crosshair.melee { width: 6px; height: 6px; } #crosshair.melee::before { left: 2px; top: 0; height: 6px; } #crosshair.melee::after { top: 2px; left: 0; width: 6px; }
#crosshair.hit::before, #crosshair.hit::after { background: #ff7050; }

#hbar { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 16px; }
#hport { width: 92px; height: 92px; position: relative; display: grid; place-items: center; font-size: 54px; border: 2px solid var(--gold); background: radial-gradient(circle, rgba(60, 40, 20, 0.9), rgba(10, 8, 6, 0.95)); box-shadow: 0 0 30px rgba(0, 0, 0, 0.8); }
#hport .lv { position: absolute; bottom: -12px; left: 50%; transform: translateX(-50%); font-family: var(--head); font-weight: 800; font-size: 15px; background: #0b0907; border: 1px solid var(--gold); padding: 1px 9px; color: var(--gold2); }
#hport svg.xpring { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); }
#hmid { display: flex; flex-direction: column; gap: 6px; width: 420px; }
#hname { font-family: var(--head); font-size: 15px; letter-spacing: 0.14em; text-transform: uppercase; text-shadow: 0 2px 6px #000; display: flex; justify-content: space-between; }
#hname span { color: var(--dim); font-size: 12px; }
#hhp { height: 18px; background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(255, 255, 255, 0.15); position: relative; overflow: hidden; }
#hhp .trail { position: absolute; inset: 0; background: #e8d0a0; transition: width 0.6s 0.2s; }
#hhp .fill { position: absolute; inset: 0; background: linear-gradient(180deg, #d8442c, #7a160c); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
#hhp .txt { position: absolute; inset: 0; text-align: center; font-family: var(--head); font-size: 12px; line-height: 17px; text-shadow: 0 1px 3px #000; }
#hfury { height: 8px; background: rgba(0, 0, 0, 0.7); border: 1px solid rgba(255, 255, 255, 0.1); position: relative; }
#hfury .fill { position: absolute; inset: 0; background: linear-gradient(90deg, #a04a10, #ffb040); }
#hfury.full { animation: pulse 0.9s infinite; } #hfury.full .fill { background: linear-gradient(90deg, #ff8030, #ffe080); }
#abil { display: flex; gap: 8px; }
#abil .ab { width: 64px; height: 64px; position: relative; border: 1px solid var(--line2); background: rgba(10, 8, 6, 0.85); display: grid; place-items: center; font-size: 34px; color: var(--parch); overflow: hidden; }
#abil .ab .cdm { position: absolute; inset: 0; background: conic-gradient(rgba(0, 0, 0, 0.75) var(--p, 0%), transparent 0); }
#abil .ab .cdt { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--head); font-weight: 700; font-size: 20px; text-shadow: 0 1px 4px #000; }
#abil .ab .k { position: absolute; top: 2px; left: 4px; font-family: var(--head); font-size: 11px; color: var(--gold2); text-shadow: 0 1px 2px #000; }
#abil .ab.ready { border-color: var(--gold2); box-shadow: inset 0 0 14px rgba(240, 190, 90, 0.25); }
#abil .ab.ult.ready { animation: pulse 1s infinite; border-color: #ffb060; color: #ffe0a0; }
#abil .ab.flash { animation: abflash 0.4s; }
@keyframes abflash { 0% { background: rgba(255, 220, 150, 0.6); } 100% { background: rgba(10, 8, 6, 0.85); } }

#army { position: absolute; left: 22px; bottom: 22px; width: 300px; padding: 14px 16px; }
#army h3 { font-size: 12px; margin-bottom: 8px; display: flex; justify-content: space-between; }
#army h3 b { color: var(--parch); }
#orders { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
#orders div { text-align: center; font-family: var(--head); font-size: 10px; letter-spacing: 0.06em; padding: 6px 2px; border: 1px solid rgba(255, 255, 255, 0.1); color: var(--dim); text-transform: uppercase; }
#orders div kbd { display: block; margin: 0 auto 3px; width: 22px; padding: 1px 0; font-size: 11px; }
#orders div.on { border-color: var(--gold2); color: var(--gold2); background: rgba(207, 166, 78, 0.12); }
#mates { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mate { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; font-size: 14px; }
.mate .mi { font-size: 22px; text-align: center; }
.mate .mn { font-family: var(--head); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.mate .bar { height: 5px; margin-top: 3px; } .mate .bar > i { background: linear-gradient(90deg, #7a160c, #d8442c); transition: width 0.2s; }
.mate.dead { opacity: 0.35; } .mate.dead .mn { text-decoration: line-through; }
.mate .lvl { font-family: var(--head); font-size: 11px; color: var(--gold); }
#swaphint { margin-top: 8px; font-size: 14px; color: var(--dim); }

#topstat { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-start; gap: 14px; }
.side { display: flex; gap: 6px; }
.side.right { flex-direction: row-reverse; }
.cmdchip { padding: 6px 10px 8px; background: rgba(10, 8, 6, 0.78); border: 1px solid rgba(255, 255, 255, 0.08); min-width: 118px; border-top: 3px solid var(--c); }
.cmdchip.me { border-color: var(--gold); border-top-color: var(--c); }
.cmdchip.out { opacity: 0.35; filter: grayscale(1); }
.cmdchip .cn { font-family: var(--head); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.cmdchip .pips { display: flex; gap: 4px; margin: 5px 0 4px; }
.cmdchip .pips i { width: 12px; height: 12px; transform: rotate(45deg); background: var(--c); border: 1px solid rgba(255, 255, 255, 0.4); box-shadow: 0 0 6px var(--c); }
.cmdchip .pips i.d { background: transparent; box-shadow: none; border-color: rgba(255, 255, 255, 0.2); }
.cmdchip .bar { height: 4px; } .cmdchip .bar > i { background: var(--c); transition: width 0.4s; }
.cmdchip .ac { font-family: var(--head); font-size: 10px; color: var(--dim); margin-top: 3px; }
#topstat.compact .cmdchip { min-width: 54px; padding: 4px 6px 6px; }
#topstat.compact .cmdchip .cn, #topstat.compact .cmdchip .ac { display: none; }
#topstat.compact .cmdchip.me .cn { display: block; max-width: 70px; }
#topstat.compact .cmdchip .pips i { width: 9px; height: 9px; }
#clock { font-family: var(--head); font-size: 22px; letter-spacing: 0.1em; padding: 8px 14px; background: rgba(10, 8, 6, 0.85); border: 1px solid var(--line); text-align: center; min-width: 96px; }
#clock small { display: block; font-size: 9px; letter-spacing: 0.2em; color: var(--dim); }
#omenbadge { position: absolute; top: 96px; left: 50%; transform: translateX(-50%); font-family: var(--head); font-size: 13px; letter-spacing: 0.2em; color: #ffb08a; text-transform: uppercase; text-shadow: 0 0 12px rgba(255, 80, 40, 0.7); }

#minimap { position: absolute; top: 14px; right: 14px; width: 230px; height: 230px; border: 1px solid var(--line2); background: rgba(0, 0, 0, 0.6); box-shadow: 0 0 30px rgba(0, 0, 0, 0.7); }
#minimap.big { top: 50%; left: 50%; right: auto; width: min(80vh, 760px); height: min(80vh, 760px); transform: translate(-50%, -50%); z-index: 5; image-rendering: auto; }
#feed { position: absolute; left: 22px; top: 120px; width: 420px; display: flex; flex-direction: column; gap: 6px; }
.fe { font-size: 18px; padding: 6px 12px; background: linear-gradient(90deg, rgba(10, 8, 6, 0.85), rgba(10, 8, 6, 0)); border-left: 3px solid var(--gold); animation: feedIn 0.35s ease both; text-shadow: 0 1px 3px #000; }
.fe.good { border-left-color: var(--green); } .fe.bad { border-left-color: var(--blood2); } .fe.omen { border-left-color: #ff7050; color: #ffc0a0; } .fe.gold { border-left-color: var(--gold2); color: var(--gold2); }
.fe.out { opacity: 0; transition: opacity 0.8s; }
@keyframes feedIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
#bigmsg { position: absolute; top: 24%; left: 0; right: 0; text-align: center; pointer-events: none; }
#bigmsg .m { display: inline-block; font-family: var(--head); font-weight: 800; font-size: 46px; letter-spacing: 0.18em; color: var(--gold2); text-shadow: 0 4px 30px #000, 0 0 40px rgba(255, 140, 60, 0.4); animation: big 3.4s ease both; text-transform: uppercase; }
#bigmsg .m small { display: block; font-family: var(--body); font-weight: 500; font-style: italic; font-size: 24px; letter-spacing: 0.02em; color: var(--parch); text-transform: none; margin-top: 6px; }
@keyframes big { 0% { opacity: 0; transform: scale(1.25); letter-spacing: 0.4em; } 12% { opacity: 1; transform: scale(1); letter-spacing: 0.18em; } 80% { opacity: 1; } 100% { opacity: 0; } }
#killc { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font-family: var(--head); font-size: 20px; color: var(--parch); text-shadow: 0 2px 8px #000; opacity: 0; transition: opacity 0.3s; text-align: center; }
#killc b { color: var(--gold2); font-size: 28px; display: block; }
#killc.on { opacity: 1; }
#talentcue { position: absolute; left: 50%; bottom: 140px; transform: translateX(-50%); font-family: var(--head); letter-spacing: 0.16em; font-size: 14px; padding: 8px 18px; border: 1px solid var(--gold2); background: rgba(40, 28, 10, 0.85); color: var(--gold2); animation: pulse 1.2s infinite; text-transform: uppercase; }
#talents { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.8)); pointer-events: auto; }
#talents * { pointer-events: auto; }
#talents .cards { display: flex; gap: 22px; margin-top: 26px; }
.tcard { width: 230px; min-height: 320px; padding: 24px 20px; border: 1px solid var(--rc); background: linear-gradient(180deg, rgba(40, 30, 18, 0.96), rgba(8, 6, 4, 0.98)); cursor: pointer; text-align: center; transition: all 0.2s; animation: cardIn 0.5s both; box-shadow: 0 0 30px rgba(0, 0, 0, 0.8), inset 0 0 40px color-mix(in srgb, var(--rc) 15%, transparent); }
.tcard:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 0 40px color-mix(in srgb, var(--rc) 50%, transparent); }
.tcard .r { font-family: var(--head); font-size: 11px; letter-spacing: 0.24em; color: var(--rc); text-transform: uppercase; }
.tcard .ti { font-size: 70px; color: var(--rc); margin: 22px 0; filter: drop-shadow(0 0 14px var(--rc)); }
.tcard .tn { font-family: var(--head); font-weight: 700; font-size: 19px; letter-spacing: 0.08em; text-transform: uppercase; }
.tcard .td { color: var(--dim); font-size: 18px; margin-top: 10px; line-height: 1.35; }
.tcard .kk { margin-top: 18px; }
@keyframes cardIn { from { opacity: 0; transform: translateY(40px) rotateY(60deg); } to { opacity: 1; transform: none; } }
#hints { position: absolute; right: 22px; bottom: 22px; padding: 14px 18px; font-size: 15px; transition: opacity 1s; }
#hints .keys { grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 15px; }
#deploy { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
#deploy .vs { font-family: var(--head); font-weight: 800; font-size: 64px; letter-spacing: 0.2em; color: var(--gold2); text-shadow: 0 4px 40px #000; animation: fadeIn 1s both; }
#deploy .vs small { display: block; text-align: center; font-size: 18px; letter-spacing: 0.4em; color: var(--parch); margin-top: 8px; }
#deploy .count { font-family: var(--head); font-size: 120px; font-weight: 800; color: #fff; text-shadow: 0 0 50px rgba(255, 120, 40, 0.7); margin-top: 20px; }
#spect { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); font-family: var(--head); font-size: 13px; letter-spacing: 0.2em; color: var(--dim); text-transform: uppercase; }

/* results */
#results { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.88)); }
#results .box { width: min(1100px, 94vw); padding: 34px 40px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 30px; }
#results .verdict { grid-column: 1 / 3; text-align: center; }
#results .verdict h1 { font-size: 84px; letter-spacing: 0.24em; font-weight: 800; animation: glowText 2s infinite; padding-left: 0.24em; }
#results .verdict h1.v { color: var(--gold2); } #results .verdict h1.d { color: var(--blood2); }
#results .verdict .sub { font-size: 22px; }
.rstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rstat { padding: 12px 14px; border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(0, 0, 0, 0.35); }
.rstat b { display: block; font-family: var(--head); font-size: 28px; color: var(--parch); }
.rstat span { font-family: var(--head); font-size: 10px; letter-spacing: 0.16em; color: var(--dim); text-transform: uppercase; }
.rxp { margin-top: 16px; }
.rxp .bar { height: 14px; } .rxp .bar > i { transition: width 1.6s cubic-bezier(.2, .8, .2, 1); }
.rxp .rl { display: flex; justify-content: space-between; font-family: var(--head); font-size: 13px; letter-spacing: 0.08em; margin-bottom: 6px; }
.rankup { margin-top: 12px; padding: 12px 16px; border: 1px solid var(--gold2); background: linear-gradient(90deg, rgba(207, 166, 78, 0.25), rgba(0, 0, 0, 0.3)); animation: fadeIn 0.6s both; }
.rankup b { font-family: var(--head); color: var(--gold2); letter-spacing: 0.1em; }
.chest { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.3); }
.chest .cic { font-size: 90px; color: var(--gold); cursor: pointer; transition: transform 0.2s; filter: drop-shadow(0 0 20px rgba(240, 190, 90, 0.4)); }
.chest .cic:hover { transform: scale(1.08) rotate(-3deg); }
.chest .cic.shake { animation: shake 0.5s infinite; }
@keyframes shake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg) scale(1.05); } 75% { transform: rotate(6deg) scale(1.05); } }
.chest .rw { font-family: var(--head); font-size: 20px; letter-spacing: 0.08em; animation: fadeIn 0.5s both; }
.alist { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-height: 190px; overflow: auto; }
.alist .ach { padding: 8px 12px; }

#fpsmeter { position: absolute; right: 8px; bottom: 4px; font: 11px monospace; color: rgba(255, 255, 255, 0.35); }
#loading { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 100; transition: opacity 1s; font-family: var(--head); letter-spacing: 0.4em; color: var(--gold); }
#loading .ll { font-size: 64px; font-weight: 800; color: var(--gold2); letter-spacing: 0.2em; }
#loading .lb { width: 260px; height: 2px; background: #222; margin-top: 26px; overflow: hidden; } #loading .lb i { display: block; height: 100%; width: 30%; background: var(--gold); animation: load 1.2s infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
@media (max-width: 1100px) { .home, .wizard, .bannered { grid-template-columns: 1fr; } .heroes, .paths { grid-template-columns: 1fr 1fr; } #results .box { grid-template-columns: 1fr; } #results .verdict { grid-column: 1; } }

/* ---------- Endless War (streaming AI watch) ---------- */
#hud.stream #hbar, #hud.stream #army, #hud.stream #hints, #hud.stream #crosshair, #hud.stream #talentcue, #hud.stream #spect, #hud.stream #killc, #hud.stream #talents { display: none !important; }
#hud.clean > *:not(#bigmsg) { display: none !important; }
#streamtop { position: absolute; left: 22px; top: 16px; padding: 12px 18px 12px 16px; background: linear-gradient(90deg, rgba(10, 8, 6, 0.86), rgba(10, 8, 6, 0.5)); border-left: 3px solid var(--gold); min-width: 330px; }
#streamtop .ew { font-family: var(--head); font-weight: 800; font-size: 22px; letter-spacing: 0.3em; color: var(--gold2); text-transform: uppercase; }
#streamtop .bn { font-family: var(--head); font-size: 13px; letter-spacing: 0.16em; color: var(--parch); text-transform: uppercase; margin-top: 2px; }
#streamtop .tally { display: flex; gap: 14px; margin-top: 8px; font-family: var(--head); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; }
#streamtop .tally b { font-size: 22px; font-weight: 800; padding: 0 4px; }
#streamtop .t0 { color: #8fb4ec; } #streamtop .t1 { color: #ec8a7a; }
#streamtop .up { margin-top: 6px; font-size: 14px; color: var(--faint); }
#streamtop .up kbd { font-family: var(--head); font-size: 10px; border: 1px solid var(--line); padding: 0 4px; color: var(--dim); }
#hud.stream #feed { top: 150px; }
#streamcap { position: absolute; left: 50%; bottom: 46px; transform: translateX(-50%); pointer-events: none; }
#streamcap span { display: inline-block; white-space: nowrap; font-family: var(--head); font-size: 20px; letter-spacing: 0.14em; text-transform: uppercase; color: #f2e6c8; padding: 10px 30px;
  background: linear-gradient(90deg, rgba(10, 8, 6, 0), rgba(10, 8, 6, 0.78) 18%, rgba(10, 8, 6, 0.78) 82%, rgba(10, 8, 6, 0)); text-shadow: 0 2px 8px #000; }
#streamcap.pop span { animation: capin 0.6s ease-out; }
@keyframes capin { from { opacity: 0; transform: translateY(10px); letter-spacing: 0.3em; } to { opacity: 1; transform: none; letter-spacing: 0.14em; } }
