/* GENESIS — an observation console around a living island. Near-black green, bone type, ONE lime for life and mutation,
 * the condition's own colour (--acc) for what the island is going through right now. No blur over the canvas (fps). */
:root {
  --bg: #07120d; --bg2: #0b1a13; --ink: #e9f0e5; --dim: #93a69a; --faint: #5f7166; --lime: #b8ff3a; --lime2: #8fd82a; --red: #ff4d6d; --amber: #ffb547;
  --acc: #5affb4; --line: rgba(184, 255, 58, .13); --line2: rgba(233, 240, 229, .08);
  --glass: linear-gradient(180deg, rgba(11, 21, 16, .93), rgba(7, 14, 11, .91));
  --serif: 'Instrument Serif', 'Times New Roman', serif; --sans: 'Inter Tight', Inter, system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --r: 14px; --gap: 18px; --top: 64px; --side: 344px; --side2: 364px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 500 13px/1.4 var(--sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
.k { font: 600 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.k.r { margin-left: auto; }
b, .num { font-variant-numeric: tabular-nums; }
svg { display: block; }

#gl, #flat { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }

/* ───────────── boot */
#boot { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 58%, #13301c 0%, #0a1912 38%, #050c08 100%); transition: opacity .9s ease, visibility .9s; }
#boot.off { opacity: 0; visibility: hidden; }
.boot-in { text-align: center; width: min(420px, 80vw); }
.boot-mark { width: 64px; height: 64px; margin: 0 auto 18px; color: var(--lime); filter: drop-shadow(0 0 18px rgba(184, 255, 58, .55)); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotateY(360deg); } }
.boot-word { font: 800 34px/1 var(--sans); letter-spacing: .42em; padding-left: .42em; }
.boot-line { font: italic 400 21px/1.3 var(--serif); color: var(--dim); margin: 12px 0 26px; }
.boot-bar { height: 2px; background: rgba(233, 240, 229, .1); border-radius: 2px; overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 4%; background: var(--lime); box-shadow: 0 0 12px var(--lime); transition: width .35s ease; }
.boot-step { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin-top: 12px; }

/* ───────────── top */
#top { position: fixed; z-index: 10; left: 0; right: 0; top: 0; height: var(--top); display: flex; align-items: center; gap: 18px; padding: 0 var(--gap); background: linear-gradient(180deg, rgba(5, 11, 8, .82), rgba(5, 11, 8, 0)); pointer-events: none; }
#top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: var(--side); }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #0d2016; border: 1px solid var(--line); color: var(--lime); overflow: hidden; }
.brand .mark svg { width: 22px; height: 22px; }
.brand .mark img { width: 100%; height: 100%; object-fit: cover; }
.brand .word { font: 800 17px/1 var(--sans); letter-spacing: .3em; text-transform: uppercase; }
.brand .tick { font: 600 11px/1 var(--mono); color: var(--lime); background: rgba(184, 255, 58, .08); border: 1px solid var(--line); padding: 5px 7px; border-radius: 6px; }
.worldstrip { flex: 1; display: flex; justify-content: center; align-items: center; gap: 4px; }
.ws-cell { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 8px 14px; min-width: 92px; }
.ws-cell b { font: 600 18px/1 var(--mono); }
.ws-cell .sub { font: 500 10px/1 var(--mono); color: var(--faint); min-width: 74px; }
.ws-cell + .ws-cell, .ws-stage + .ws-cell { border-left: 1px solid var(--line2); }
.ws-meter { width: 330px; padding: 8px 14px; margin-left: 8px; border-left: 1px solid var(--line2); }
.m-top { display: flex; align-items: center; gap: 8px; }
.m-who { margin-left: auto; font: 600 11px/1 var(--mono); color: var(--lime); padding: 3px 6px; border-radius: 5px; background: rgba(184, 255, 58, .08); }
.m-bar { position: relative; height: 6px; margin: 7px 0 4px; border-radius: 6px; background: rgba(233, 240, 229, .08); overflow: hidden; }
.m-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: linear-gradient(90deg, #4b7a1c, var(--lime)); box-shadow: 0 0 10px rgba(184, 255, 58, .6); transition: width .8s ease; }
.m-line { position: absolute; right: 0; top: -2px; bottom: -2px; width: 2px; background: var(--red); }
.m-num { font: 500 10px/1 var(--mono); color: var(--faint); display: flex; gap: 4px; align-items: baseline; }
.m-num b { color: var(--ink); font-size: 12px; }
.actions { display: flex; align-items: center; gap: 8px; min-width: var(--side2); justify-content: flex-end; }
.ca { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: rgba(11, 21, 16, .9); border: 1px solid var(--line); }
.ca-k { font: 700 10px/1 var(--mono); color: var(--lime); letter-spacing: .1em; }
.ca-v { font: 500 12px/1 var(--mono); color: var(--ink); min-width: 92px; text-align: left; }
.ca svg { width: 14px; height: 14px; color: var(--dim); }
.ca:hover { border-color: rgba(184, 255, 58, .4); }
.ca.none { opacity: .55; cursor: default; } .ca.none:hover { border-color: var(--line); }
a.hx[href="https://x.com/"] { display: none; }
.links { display: flex; gap: 2px; margin-right: 4px; }
.links a { height: 36px; padding: 0 11px; display: grid; place-items: center; border-radius: 10px; color: var(--dim); text-decoration: none; font: 600 12.5px/1 var(--sans); }
.links a:hover { color: var(--lime); background: rgba(184, 255, 58, .06); }
.cc-b:disabled { opacity: .35; cursor: default; }
.cc-fx .die { color: var(--dim); }
.cc-fx { flex-wrap: nowrap; white-space: nowrap; } .cc-fav { font: 500 10.5px/1.3 var(--mono); color: var(--faint); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-art #hArt { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s ease; }
.h-art #hArt.on { opacity: 1; }
.iconbtn { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(11, 21, 16, .9); border: 1px solid var(--line2); color: var(--ink); text-decoration: none; }
.iconbtn svg { width: 16px; height: 16px; }
.iconbtn:hover { border-color: rgba(184, 255, 58, .4); color: var(--lime); }
.connect { height: 36px; padding: 0 16px; border-radius: 10px; background: var(--lime); color: #07120d; font-weight: 700; display: flex; align-items: center; gap: 8px; min-width: 112px; justify-content: center; }
.connect .dot { width: 7px; height: 7px; border-radius: 50%; background: #07120d; opacity: .5; }
.connect.on { background: rgba(11, 21, 16, .9); color: var(--ink); border: 1px solid var(--line); }
.connect.on .dot { background: var(--lime); opacity: 1; box-shadow: 0 0 8px var(--lime); }

/* ───────────── panels */
.panel { position: fixed; z-index: 8; background: var(--glass); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: 0 18px 50px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04); }
.p-head { display: flex; align-items: center; gap: 10px; }
.clock { margin-left: auto; font: 700 14px/1 var(--mono); color: var(--ink); min-width: 42px; text-align: right; }
.round { font: 500 10.5px/1 var(--mono); color: var(--faint); }
.sect { display: flex; align-items: center; margin: 16px 0 8px; }

#now { left: var(--gap); top: calc(var(--top) + 8px); width: var(--side); bottom: calc(var(--gap) + 196px); padding: 16px 18px; overflow: hidden auto; scrollbar-width: none; border-top: 2px solid var(--acc); }
#now::-webkit-scrollbar { display: none; }
.cond-bar { height: 2px; margin: 10px 0 12px; background: rgba(233, 240, 229, .08); border-radius: 2px; overflow: hidden; }
.cond-bar i { display: block; height: 100%; width: 0; background: var(--acc); box-shadow: 0 0 10px var(--acc); }
.cond-title { margin: 0; font: 400 40px/1 var(--serif); letter-spacing: -.01em; color: var(--ink); text-shadow: 0 0 30px color-mix(in srgb, var(--acc) 35%, transparent); }
.cond-line { margin: 8px 0 6px; color: var(--dim); font-size: 13.5px; line-height: 1.45; min-height: 38px; }
.cond-by { font: 500 11px/1 var(--mono); color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 7px; background: rgba(233, 240, 229, .05); border: 1px solid var(--line2); font: 500 11px/1 var(--mono); color: var(--dim); }
.chip b { color: var(--ink); font-weight: 600; }
.chip.hot { border-color: color-mix(in srgb, var(--acc) 45%, transparent); color: var(--ink); background: color-mix(in srgb, var(--acc) 10%, transparent); }
.needs { display: flex; flex-direction: column; gap: 7px; }
.need { display: grid; grid-template-columns: 1fr 86px 34px; align-items: center; gap: 8px; }
.need .nl { font-weight: 600; font-size: 12.5px; }
.need .nt { font: 500 10.5px/1.2 var(--mono); color: var(--faint); grid-column: 1 / -1; margin-top: -4px; }
.need .bar, .bar { height: 5px; border-radius: 5px; background: rgba(233, 240, 229, .08); overflow: hidden; }
.need .bar i, .bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--lime); transition: width .6s ease; }
.need .bar i.bad { background: var(--red); } .need .bar i.mid { background: var(--amber); }
.need .pc { font: 600 11px/1 var(--mono); text-align: right; }
.needs .empty { color: var(--faint); font-size: 12.5px; }
.traits { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.tr { display: grid; grid-template-columns: 70px 1fr 14px; align-items: center; gap: 6px; font-size: 11.5px; color: var(--dim); }
.tr .bar { height: 4px; }
.tr .bar i { background: linear-gradient(90deg, #5d7f3a, #b8d98a); }
.tr .mv { font: 700 10px/1 var(--mono); text-align: right; }
.tr.up { color: var(--ink); } .tr.up .mv { color: var(--lime); } .tr.up .bar i { background: var(--lime); box-shadow: 0 0 8px rgba(184, 255, 58, .5); }
.tr.dn { color: var(--ink); } .tr.dn .mv { color: var(--red); }

/* board: condition cards (the leading one lights up in its own colour) */
#board { right: var(--gap); top: calc(var(--top) + 8px); width: var(--side2); bottom: var(--gap); padding: 16px; display: flex; flex-direction: column; }
.board-sub { color: var(--faint); font-size: 12px; margin: 8px 0 12px; min-height: 16px; }
.cards { display: flex; flex-direction: column; gap: 8px; overflow: hidden auto; scrollbar-width: thin; scrollbar-color: rgba(184, 255, 58, .28) transparent; flex: 1; min-height: 0; padding-right: 2px; }
.cards::-webkit-scrollbar { width: 5px; } .cards::-webkit-scrollbar-thumb { background: rgba(184, 255, 58, .28); border-radius: 5px; } .cards::-webkit-scrollbar-track { background: transparent; }
.cc { position: relative; flex: 0 0 auto; padding: 11px 12px 10px 14px; border-radius: 12px; background: rgba(233, 240, 229, .035); border: 1px solid var(--line2); overflow: hidden; transition: border-color .4s, background .4s, transform .25s; }
.cc::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--cacc); opacity: .55; }
.cc.lead { border-color: color-mix(in srgb, var(--cacc) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--cacc) 16%, rgba(10, 20, 15, .9)), rgba(10, 20, 15, .9) 70%); box-shadow: 0 0 28px color-mix(in srgb, var(--cacc) 22%, transparent), inset 0 0 22px color-mix(in srgb, var(--cacc) 10%, transparent); }
.cc.lead::before { opacity: 1; box-shadow: 0 0 12px var(--cacc); }
.cc.mine { border-style: dashed; }
.cc-top { display: flex; align-items: baseline; gap: 8px; }
.cc-t { font: 400 22px/1.05 var(--serif); }
.cc-by { margin-left: auto; font: 500 10.5px/1 var(--mono); color: var(--faint); white-space: nowrap; }
.cc-l { color: var(--dim); font-size: 12px; margin: 4px 0 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 32px; }
.cc-fx { display: flex; align-items: center; gap: 8px; font: 500 10.5px/1.3 var(--mono); color: var(--dim); }
.cc-fx .surv { color: var(--ink); font-weight: 700; }
.cc-fx .surv.bad { color: var(--red); } .cc-fx .surv.ok { color: var(--lime); }
.cc-mine { font: 600 10.5px/1.3 var(--mono); margin-top: 5px; }
.cc-mine .up { color: var(--lime); } .cc-mine .dn { color: var(--red); }
.cc-row { display: flex; align-items: center; gap: 8px; margin-top: 9px; }
.cc-votes { flex: 1; height: 4px; border-radius: 4px; background: rgba(233, 240, 229, .07); overflow: hidden; }
.cc-votes i { display: block; height: 100%; background: var(--cacc); width: 0; transition: width .5s ease; }
.cc-n { font: 600 10.5px/1 var(--mono); color: var(--dim); min-width: 62px; text-align: right; }
.cc-b { height: 26px; padding: 0 10px; border-radius: 7px; font: 700 11px/1 var(--sans); background: rgba(233, 240, 229, .07); border: 1px solid var(--line2); }
.cc-b:hover { border-color: var(--cacc); }
.cc-b.vote.on { background: var(--cacc); color: #07120d; border-color: transparent; }
.cc-b.burn { display: inline-flex; align-items: center; gap: 4px; color: var(--amber); }
.cc-b.burn svg { width: 12px; height: 12px; }
.cc-burned { font: 600 10px/1 var(--mono); color: var(--amber); }
.prompt { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line2); }
.pr-k { font: 400 19px/1.1 var(--serif); margin-bottom: 8px; }
.pr-row { display: flex; gap: 6px; }
.pr-row input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 10px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line2); outline: none; }
.pr-row input:focus { border-color: rgba(184, 255, 58, .5); }
.pr-row button { width: 40px; height: 40px; border-radius: 10px; background: var(--lime); color: #07120d; display: grid; place-items: center; }
.pr-row button svg { width: 18px; height: 18px; }
.pr-row button:disabled { opacity: .5; }
.pr-note { font-size: 11.5px; color: var(--faint); margin-top: 7px; min-height: 30px; }
.pr-note.err { color: var(--red); } .pr-note.ok { color: var(--lime); }

/* the left column: the condition panel at its own height, the live feed fills what is left */
#left { position: fixed; z-index: 8; left: var(--gap); top: calc(var(--top) + 8px); bottom: var(--gap); width: var(--side); display: flex; flex-direction: column; gap: 12px; }
#left > #now { position: relative !important; left: auto !important; top: auto !important; bottom: auto !important; width: auto !important; flex: 0 1 auto; min-height: 0; }
#left > #feed { position: relative !important; left: auto !important; bottom: auto !important; width: auto !important; height: auto !important; flex: 1 1 128px; min-height: 128px; }

/* the clicked animal */
#card { right: var(--gap); top: calc(var(--top) + 8px); width: var(--side2); bottom: var(--gap); padding: 18px; overflow: hidden auto; scrollbar-width: none; border-top: 2px solid var(--lime); z-index: 9; background: linear-gradient(180deg, #0b1611, #070e0b); }
#board.under { visibility: hidden; }
#card::-webkit-scrollbar { display: none; }
.x { position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--dim); }
.x:hover { color: var(--ink); background: rgba(233, 240, 229, .06); }
.x svg { width: 16px; height: 16px; }
.ac-top { display: flex; gap: 8px; align-items: center; font: 600 11px/1 var(--mono); }
.ac-tag { color: var(--lime); } .ac-gen { color: var(--dim); }
.ac-own { padding: 4px 7px; border-radius: 6px; background: rgba(233, 240, 229, .06); color: var(--dim); }
.ac-own.owned { background: rgba(184, 255, 58, .12); color: var(--lime); }
.ac-own.mine { background: var(--lime); color: #07120d; }
.ac-name { margin: 10px 0 4px; font: 400 36px/1 var(--serif); }
.ac-sub { color: var(--dim); font-size: 12.5px; min-height: 18px; }
.ac-vitals { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; margin-top: 14px; align-items: end; }
.ac-vitals > div { display: flex; flex-direction: column; gap: 6px; }
.ac-vitals b { font: 700 16px/1 var(--mono); }
.bar.stress i { background: linear-gradient(90deg, var(--amber), var(--red)); }
.needs.small .need { grid-template-columns: 1fr 80px 34px; }
.dna { display: grid; grid-template-columns: repeat(16, 1fr); gap: 3px; height: 58px; align-items: end; }
.dna .g { position: relative; height: 100%; border-radius: 3px; background: rgba(233, 240, 229, .05); overflow: hidden; }
.dna .g i { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, var(--lime), #4b7a1c); border-radius: 3px; }
.dna .g.ch i { background: linear-gradient(180deg, #fff, var(--lime)); box-shadow: 0 0 10px var(--lime); }
.dna .g span { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font: 700 7.5px/1 var(--mono); color: rgba(7, 18, 13, .8); writing-mode: vertical-rl; transform: rotate(180deg); height: 100%; display: flex; align-items: center; justify-content: flex-start; }
.ac-sp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sp { padding: 5px 8px; border-radius: 7px; font: 600 11px/1.2 var(--mono); color: var(--lime); background: rgba(184, 255, 58, .08); border: 1px solid var(--line); }
.ac-line { display: flex; flex-wrap: wrap; gap: 4px; font: 500 11px/1.3 var(--mono); color: var(--dim); }
.ac-line span { padding: 3px 6px; border-radius: 5px; background: rgba(233, 240, 229, .05); }
.ac-money { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line2); display: flex; flex-direction: column; gap: 10px; }
.am-row { display: flex; align-items: baseline; justify-content: space-between; }
.am-row b { font: 700 18px/1 var(--mono); }
.am-row small { font: 500 11px/1 var(--mono); color: var(--faint); margin-left: 4px; }
.btn { height: 44px; border-radius: 11px; font-weight: 800; letter-spacing: .02em; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn.lime { background: var(--lime); color: #07120d; box-shadow: 0 0 24px rgba(184, 255, 58, .25); }
.btn.ghost { background: rgba(233, 240, 229, .06); border: 1px solid var(--line2); }
.btn:disabled { opacity: .55; cursor: default; }
.am-note { font-size: 11.5px; color: var(--faint); }

/* feed */
#feed { position: fixed; z-index: 8; left: var(--gap); bottom: var(--gap); width: var(--side); height: 180px; padding: 12px 14px; background: var(--glass); border: 1px solid var(--line2); border-radius: var(--r); overflow: hidden; }
.f-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.f-rows { display: flex; flex-direction: column; gap: 0; }
.fr { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; height: 26px; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; animation: rowin .5s ease; border-bottom: 1px solid rgba(233, 240, 229, .04); }
.fr .ic { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.fr .tx { overflow: hidden; text-overflow: ellipsis; }
.fr .tx b { color: var(--ink); font-weight: 600; }
.fr .w { font-family: var(--mono); font-size: 11px; color: var(--ink); }
.fr .v { font: 600 11px/1 var(--mono); color: var(--ink); }
.fr.buy .ic { background: var(--lime); box-shadow: 0 0 6px var(--lime); }
.fr.death .ic { background: var(--red); } .fr.claim .ic { background: var(--lime); border-radius: 2px; transform: rotate(45deg); }
.fr.burnvote .ic, .fr.burn .ic { background: var(--amber); } .fr.cashout .ic { background: #8fd8ff; } .fr.monster .ic { background: #fff; box-shadow: 0 0 8px #fff; }
.fr.sys .ic { background: var(--acc); }
@keyframes rowin { from { background: rgba(184, 255, 58, .14); transform: translateY(-6px); opacity: 0; } to { background: transparent; transform: none; opacity: 1; } }

/* documentary lower third + camera buttons */
.lower { position: fixed; z-index: 7; left: 50%; bottom: 70px; transform: translateX(-50%); text-align: center; pointer-events: none; opacity: 0; transition: opacity .8s ease; max-width: 640px; }
.lower.on { opacity: 1; }
.lt-k { font: 600 10.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--lime); text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
.lt-t { font: italic 400 30px/1.15 var(--serif); color: #fff; text-shadow: 0 2px 18px rgba(0, 0, 0, .75); margin-top: 6px; }
.lt-t small { display: block; font: 500 11.5px/1.4 var(--mono); font-style: normal; color: rgba(233, 240, 229, .78); margin-top: 6px; }
#camctl { position: fixed; z-index: 8; left: 50%; bottom: var(--gap); transform: translateX(-50%); display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(7, 14, 11, .85); border: 1px solid var(--line2); }
#camctl button { height: 28px; padding: 0 12px; border-radius: 8px; font: 600 11.5px/1 var(--sans); color: var(--dim); }
#camctl button.on { background: rgba(184, 255, 58, .12); color: var(--lime); }

/* world labels */
.lab { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); white-space: nowrap; font: 600 10.5px/1 var(--mono); color: #fff; padding: 4px 7px; border-radius: 6px; background: rgba(5, 11, 8, .78); border: 1px solid rgba(233, 240, 229, .14); will-change: transform; }
.lab::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 1px; height: 5px; background: rgba(233, 240, 229, .4); }
.lab.leader { color: #07120d; background: var(--lime); border-color: transparent; box-shadow: 0 0 14px rgba(184, 255, 58, .55); }
.lab.owned { color: var(--lime); border-color: rgba(184, 255, 58, .35); }
.lab.mine { color: #07120d; background: #fff; }
.lab.sel { border-color: #fff; }
.lab.bubble { white-space: normal; width: max-content; max-width: 240px; font: 500 13px/1.3 var(--sans); color: #10160f; background: #f4f7ee; border-color: transparent; padding: 8px 11px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); margin-top: -8px; }
.lab.bubble::after { width: 10px; height: 10px; background: #f4f7ee; transform: translateX(-50%) rotate(45deg); bottom: -5px; }
.pop { position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); font: 700 12px/1 var(--mono); color: #fff; text-shadow: 0 1px 6px #000; animation: popup 2.6s ease-out forwards; pointer-events: none; }
.pop.death { color: #ffb3c1; } .pop.death-owned { color: var(--red); font-size: 13px; } .pop.hatch { color: var(--lime); }
@keyframes popup { 0% { opacity: 0; margin-top: 8px; } 12% { opacity: 1; margin-top: 0; } 75% { opacity: 1; } 100% { opacity: 0; margin-top: -26px; } }

/* the Apex: the console steps aside */
body.cine #now, body.cine #board, body.cine #feed, body.cine #card, body.cine #camctl, body.cine .lower, body.cine #labels, body.cine #tabs { opacity: 0; pointer-events: none; }
#now, #board, #feed, #camctl, #labels { transition: opacity .8s ease; }
/* the Apex */
#mon { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; pointer-events: none; }
.mon-title { text-align: center; margin-top: 58vh; opacity: 0; transform: translateY(16px); transition: opacity 1.2s ease, transform 1.2s ease; }
#mon.on .mon-title { opacity: 1; transform: none; }
.mon-k { font: 600 11px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: rgba(233, 240, 229, .75); }
.mon-big { font: 900 clamp(34px, 6.4vw, 96px)/1 var(--sans); letter-spacing: .16em; padding-left: .16em; color: #fff; text-shadow: 0 0 40px rgba(184, 255, 58, .7), 0 0 90px rgba(184, 255, 58, .35); margin: 12px 0 8px; }
/* before the roar only the line under it shows; the title lands with the roar, then its name, its words, its owner */
#mon:not(.roar) .mon-k { color: var(--lime); font-size: 13px; padding: 7px 14px; border-radius: 999px; background: rgba(4, 10, 6, .62); box-shadow: 0 0 0 1px rgba(184, 255, 58, .35), 0 0 24px rgba(184, 255, 58, .25); display: inline-block; }
.mon-big { opacity: 0; transform: scale(1.75); filter: blur(14px); transition: opacity .2s ease, transform .6s cubic-bezier(.16, 1.35, .3, 1), filter .45s ease; }
#mon.roar .mon-big { opacity: 1; transform: none; filter: none; }
.mon-epi, .mon-roar, .mon-own { opacity: 0; transform: translateY(8px); transition: opacity .8s ease, transform .8s ease; }
#mon.roar .mon-epi { opacity: 1; transform: none; transition-delay: .7s; }
#mon.roar .mon-roar { opacity: 1; transform: none; transition-delay: 1.3s; }
#mon.roar .mon-own { opacity: 1; transform: none; transition-delay: 1.8s; }
.mon-epi { font: italic 400 clamp(22px, 2.6vw, 38px)/1.1 var(--serif); color: var(--lime); min-height: 1.1em; }
.mon-roar { font: 500 14px/1.4 var(--mono); color: rgba(233, 240, 229, .85); margin-top: 12px; min-height: 1.4em; }
.mon-own { font: 600 12px/1 var(--mono); color: var(--dim); margin-top: 10px; }
#hall { position: fixed; inset: 0; z-index: 21; display: flex; align-items: center; justify-content: center; gap: 56px; background: radial-gradient(ellipse at 50% 50%, rgba(7, 18, 13, .55), rgba(3, 8, 5, .92)); animation: fadein .8s ease; }
@keyframes fadein { from { opacity: 0; } }
.holo { position: relative; width: 360px; height: 520px; border-radius: 22px; padding: 14px; background: linear-gradient(160deg, #1d3a17, #0b1a10 40%, #10241a 70%, #2b4a12); box-shadow: 0 0 0 2px rgba(184, 255, 58, .55), 0 0 60px rgba(184, 255, 58, .3), 0 30px 80px rgba(0, 0, 0, .6); overflow: hidden; display: flex; flex-direction: column; transform-style: preserve-3d; animation: cardin 1.5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes cardin { 0% { transform: translateY(90px) rotateY(-160deg) scale(.55); opacity: 0; filter: brightness(3); } 45% { opacity: 1; } 62% { transform: translateY(-6px) rotateY(10deg) scale(1.05); filter: brightness(1.9); box-shadow: 0 0 0 2px rgba(184, 255, 58, .9), 0 0 140px rgba(184, 255, 58, .75), 0 30px 80px rgba(0, 0, 0, .6); } 100% { transform: none; filter: none; } }
/* the hall card: the /cards card (money-card.css), face down first, then it turns over with a flare */
.hcard { position: relative; width: 360px; flex: 0 0 auto; aspect-ratio: 63 / 88; perspective: 1400px; }
.hcard > .hback, .hcard > .hfront { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; transform-style: preserve-3d; }
.hcard > .hfront .gc { width: 100%; }
.hcard > .hback { border-radius: 16px; background: radial-gradient(circle at 50% 42%, #24461a, #0b170e 62%, #050b07); box-shadow: 0 0 0 3px rgba(184, 255, 58, .75), 0 0 80px rgba(184, 255, 58, .3), 0 30px 80px rgba(0, 0, 0, .6); display: grid; place-content: center; text-align: center; transform: rotateY(180deg); }
.hb-ring { width: 120px; height: 120px; margin: 0 auto 18px; border-radius: 50%; box-shadow: 0 0 0 3px #b8ff3a, 0 0 40px rgba(184, 255, 58, .6), inset 0 0 30px rgba(184, 255, 58, .35); }
.hb-word { font: 800 28px/1 var(--sans); letter-spacing: .28em; padding-left: .28em; color: #f2eee2; text-shadow: 0 0 20px rgba(184, 255, 58, .6); }
.hb-sub { font: 600 11px/1 var(--mono); letter-spacing: .35em; text-transform: uppercase; color: var(--lime); margin-top: 10px; }
.hcard.flip { animation: hflip 2.1s cubic-bezier(.2, .8, .2, 1) both; transform-style: preserve-3d; }
.hcard.flip > .hback { transform: rotateY(180deg); }
@keyframes hflip { 0% { transform: translateY(80px) rotateY(180deg) scale(.6); opacity: 0; } 18% { opacity: 1; transform: translateY(0) rotateY(180deg) scale(.92); } 38% { transform: rotateY(180deg) scale(.95); } 70% { transform: rotateY(-8deg) scale(1.06); filter: brightness(1.6); } 100% { transform: none; filter: none; } }
#hall::before { content: ''; position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px; border-radius: 50%; box-shadow: 0 0 0 2px rgba(184, 255, 58, .8), 0 0 60px 20px rgba(184, 255, 58, .35); animation: hallring 1.6s .5s ease-out both; pointer-events: none; }
@keyframes hallring { 0% { transform: scale(.2); opacity: 0; } 15% { opacity: 1; } 100% { transform: scale(40); opacity: 0; } }
.hall-side { animation: sidein 1s 1.1s ease both; }
@keyframes sidein { from { opacity: 0; transform: translateX(24px); } }
.holo::after { content: ''; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .16) 47%, rgba(184, 255, 58, .14) 50%, rgba(143, 216, 255, .12) 53%, transparent 60%); animation: shine 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes shine { 0% { transform: translateX(-40%); } 60%, 100% { transform: translateX(40%); } }
.h-top { display: flex; align-items: baseline; justify-content: space-between; }
.h-name { font: 400 24px/1.02 var(--serif); color: #fff; max-width: 250px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.h-top { align-items: flex-start; }
.h-hp { font: 800 22px/1 var(--sans); color: #fff; } .h-hp small { font: 700 10px/1 var(--mono); color: var(--lime); margin-right: 3px; }
.h-types { display: flex; gap: 5px; margin: 6px 0 8px; }
.ty { font: 800 9.5px/1 var(--mono); letter-spacing: .12em; padding: 4px 7px; border-radius: 5px; background: rgba(184, 255, 58, .14); color: var(--lime); }
.h-art { position: relative; height: 252px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 55%, #2f5a14, #071209); border: 1px solid rgba(184, 255, 58, .35); }
.h-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.h-meta { font: 500 10px/1.4 var(--mono); color: var(--dim); margin: 7px 0 4px; min-height: 14px; }
.h-moves { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; flex: 1; }
.mv { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.mv b { font: 700 13px/1.1 var(--sans); color: #fff; } .mv .pw { font: 800 14px/1 var(--mono); color: var(--lime); }
.mv span { grid-column: 1 / -1; font-size: 10.5px; color: var(--dim); }
.h-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font: 600 10px/1 var(--mono); color: var(--dim); text-align: center; margin-top: 6px; }
.h-stats b { display: block; font-size: 15px; color: #fff; margin-top: 3px; }
.h-foot { display: flex; justify-content: space-between; font: 700 9.5px/1 var(--mono); letter-spacing: .14em; color: var(--lime); margin-top: 8px; }
.hall-side { width: 400px; }
.hall-k { font: 600 11px/1 var(--mono); letter-spacing: .3em; text-transform: uppercase; color: var(--lime); }
.hall-story { font: italic 400 26px/1.25 var(--serif); color: var(--ink); margin: 14px 0 22px; }
.hall-name { display: flex; gap: 8px; margin-bottom: 18px; }
.hall-name input { flex: 1; height: 44px; padding: 0 12px; border-radius: 10px; background: rgba(0, 0, 0, .4); border: 1px solid rgba(184, 255, 58, .4); outline: none; }
.hall-name button { height: 44px; padding: 0 16px; border-radius: 10px; background: var(--lime); color: #07120d; font-weight: 800; }
.hall-next { font: 500 12px/1 var(--mono); color: var(--dim); }

/* how it works */
#help { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(3, 8, 5, .82); }
.help-in { position: relative; width: min(760px, 92vw); max-height: 88vh; overflow: auto; padding: 30px 32px; border-radius: 18px; background: var(--glass); border: 1px solid var(--line); }
.help-k { font: 400 36px/1 var(--serif); margin-bottom: 18px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line2); }
.steps li > b { font: 700 14px/1 var(--mono); color: var(--lime); }
.steps h3 { margin: 0 0 4px; font: 700 15px/1.2 var(--sans); }
.steps p { margin: 0; color: var(--dim); line-height: 1.5; }

#toast { position: fixed; z-index: 40; left: 50%; top: 76px; transform: translate(-50%, -10px); padding: 10px 16px; border-radius: 10px; background: rgba(7, 14, 11, .95); border: 1px solid var(--line); font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#tabs { display: none; }

/* ───────────── laptop */
@media (max-height: 820px) {
  .traits { gap: 3px 12px; } .tr { font-size: 10.5px; } .tr .bar { height: 3px; }
  .sect { margin: 10px 0 6px; } .cond-line { min-height: 0; font-size: 12.5px; margin: 6px 0 4px; }
  .needs { gap: 4px; } .need .nt { margin-top: -3px; } .chips { margin-top: 8px; } .chip { height: 22px; }
  .p-head + .cond-bar { margin: 8px 0 10px; }
  .need .nt { display: none; } .need { gap: 6px; } #feed { height: 128px !important; } #now { bottom: calc(var(--gap) + 140px) !important; }
  .cond-title { font-size: 30px !important; }
  .links a { padding: 0 8px; }
}
@media (max-width: 1400px) { .links { display: none; } }
@media (max-height: 820px), (max-width: 1500px) {
  :root { --side: 308px; --side2: 330px; --gap: 14px; }
  .cond-title { font-size: 34px; }
  .ws-meter { width: 270px; }
  .ws-cell { min-width: 80px; padding: 8px 10px; }
  #feed { height: 150px; }
  #now { bottom: calc(var(--gap) + 162px); }
  .tr { grid-template-columns: 62px 1fr 12px; font-size: 11px; }
  .brand { min-width: 0; }
  .actions { min-width: 0; }
}
@media (max-width: 1240px) {
  .ws-eggs { display: none !important; }
  .ca-v { min-width: 0; max-width: 70px; overflow: hidden; }
  .lt-t { font-size: 24px; }
}
/* ───────────── phone: the island on top, one sheet with tabs below */
@media (max-width: 760px) {
  :root { --top: 52px; --gap: 10px; }
  #top { gap: 8px; padding: 0 10px; background: linear-gradient(180deg, rgba(5, 11, 8, .92), rgba(5, 11, 8, .0)); }
  .brand .word, .brand .tick { display: none; }
  .worldstrip { position: fixed; top: 52px; left: 10px; right: 10px; justify-content: space-between; background: rgba(7, 14, 11, .86); border: 1px solid var(--line2); border-radius: 12px; padding: 2px 4px; }
  .ws-cell { min-width: 0; padding: 6px 8px; gap: 3px; } .ws-cell b { font-size: 14px; } .ws-cell .sub { display: none; }
  .ws-meter { width: auto; flex: 1; padding: 6px 8px; margin: 0; }
  .m-top .k { font-size: 9px; }
  .actions { gap: 6px; margin-left: auto; }
  .ca { padding: 0 8px; height: 32px; } .ca-v { display: none; }
  .iconbtn { width: 32px; height: 32px; } #helpBtn, .actions a[href="/ledger"] { display: none; }
  .connect { height: 32px; min-width: 0; padding: 0 12px; }
  /* the bottom sheet: peeks (title + clock, ~27 % of the screen) and opens on a tap or a drag up; the island gets the rest */
  .panel, #feed { left: 10px !important; right: 10px !important; width: auto !important; top: auto !important; bottom: 54px !important; height: var(--sheet) !important; border-radius: 16px; transition: height .32s cubic-bezier(.2, .8, .2, 1); }
  #left { display: contents; } #left > #now, #left > #feed { position: fixed !important; left: 10px !important; right: 10px !important; width: auto !important; top: auto !important; bottom: 54px !important; height: var(--sheet) !important; }
  body { --sheet: 27vh; } body.sheet-open { --sheet: 64vh; }
  body:not(.sheet-open) #now, body:not(.sheet-open) #board, body:not(.sheet-open) #feed { overflow: hidden !important; }
  #now::before, #board::before, #feed::before { content: ''; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(233, 240, 229, .28); }
  #now, #board, #feed { touch-action: pan-y; }
  #now, #board, #feed { display: none; }
  body[data-tab="now"] #now, body[data-tab="board"] #board, body[data-tab="feed"] #feed { display: block; }
  body[data-tab="board"] #board { display: flex; }
  #card { height: 62vh !important; z-index: 12; padding-bottom: 0; }
  #acMoney { position: sticky; bottom: 0; z-index: 2; margin: 0 -18px; padding: 14px 18px 18px; background: linear-gradient(rgba(9, 22, 15, 0), #09160f 26%); }
  #toast { top: 126px; }
  #tabs { position: fixed; z-index: 11; left: 10px; right: 10px; bottom: 10px; height: 38px; display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: rgba(7, 14, 11, .92); border: 1px solid var(--line2); }
  #tabs button { flex: 1; border-radius: 9px; font-weight: 700; color: var(--dim); }
  #tabs button.on { background: rgba(184, 255, 58, .14); color: var(--lime); }
  #camctl { display: none; }
  .lower { bottom: calc(var(--sheet) + 66px); transition: bottom .32s cubic-bezier(.2, .8, .2, 1); } .lt-t { font-size: 20px; }
  .cond-title { font-size: 30px; }
  #hall { flex-direction: column; gap: 16px; overflow: auto; justify-content: flex-start; padding: 70px 16px 20px; }
  .holo { width: 300px; height: 440px; flex: 0 0 auto; } .h-art { height: 180px; }
  .hcard { width: min(300px, 78vw); }
  .hall-side { width: 100%; } .hall-story { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .boot-mark, .live-dot, .holo::after { animation: none; } }

/* ═══════════════════════ GENESIS v2: duels, the dex, the leaderboard, the creature card, breeding, pops ═══════════════════════ */
.m-form { margin-left: auto; color: var(--dim); font-size: 10px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* duels now (left, top): two fighters a row, their HP */
#now { padding: 14px 14px 12px; border-top-color: var(--lime); }
#left > #now { flex: 0 0 auto; }
.dn-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; min-height: 190px; }
.dn { display: grid; grid-template-columns: 1fr 22px 1fr; align-items: center; gap: 4px; height: 40px; }
.dn-vs { font: 800 9px/1 var(--mono); color: var(--faint); text-align: center; letter-spacing: .1em; }
.dn-f { display: grid; grid-template-columns: 8px 1fr auto; grid-template-rows: auto 5px; gap: 3px 6px; align-items: center; padding: 5px 8px; border-radius: 8px; background: rgba(233, 240, 229, .04); border: 1px solid var(--line2); text-align: left; cursor: pointer; min-width: 0; }
.dn-f:hover { border-color: rgba(184, 255, 58, .35); }
.dn-dot { width: 8px; height: 8px; border-radius: 50%; }
.dn-n { font: 600 11.5px/1 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dn-lv { font: 600 10px/1 var(--mono); color: var(--dim); }
.dn-f .bar { grid-column: 1 / -1; height: 4px; }
.bar.hp i { background: linear-gradient(90deg, #5fd35a, #b8ff3a); }
#now .empty, #board .empty { color: var(--faint); font-size: 12px; padding: 8px 2px; }
/* the feed's new rows */
.fdot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.fr.won .ic { background: #ffe066; } .fr.born .ic { background: #fff6e0; box-shadow: 0 0 6px #fff6e0; } .fr.evo .ic { background: #fff; box-shadow: 0 0 8px #b8ff3a; }
.fr.prism .ic { background: conic-gradient(#ff7ad9, #ffe066, #7fe07a, #46b4ff, #c46bff, #ff7ad9); } .fr.mut .ic { background: var(--lime); }
/* the dex (right): ten lines, three forms each */
#board { padding: 14px 14px 12px; gap: 0; border-top: 2px solid var(--lime); }
.dex { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 10px 0 12px; }
.dx { padding: 7px 8px 6px; border-radius: 9px; background: linear-gradient(180deg, color-mix(in srgb, var(--lc) 12%, transparent), rgba(233, 240, 229, .03)); border: 1px solid color-mix(in srgb, var(--lc) 28%, transparent); min-width: 0; }
.dx-h { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.dx-t { display: flex; align-items: center; gap: 5px; font: 700 11.5px/1 var(--sans); color: var(--ink); white-space: nowrap; }
.dx-t .ti { width: 12px; height: 12px; }
.dx-ty { font: 600 9px/1 var(--mono); color: var(--faint); letter-spacing: .08em; text-transform: uppercase; }
.dx-st { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 5px; }
.dx-s { position: relative; height: 38px; border-radius: 6px; background: rgba(0, 0, 0, .22); display: grid; place-items: center; overflow: hidden; }
.dx-s img { height: 34px; width: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.dx-s b { position: absolute; right: 3px; bottom: 2px; font: 700 10px/1 var(--mono); color: #fff; text-shadow: 0 1px 3px #000; }
.dx-s.none img { opacity: .28; filter: grayscale(.8); } .dx-s.none b { color: var(--faint); }
.dx-b { display: block; width: 100%; margin-top: 5px; text-align: left; font: 500 10px/1.2 var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.dx-b b { color: var(--ink); } .dx-b:disabled { cursor: default; opacity: .6; }
/* the leaderboard */
.lb-head { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line2); }
.lb { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.lb-r { display: grid; grid-template-columns: 14px 8px 1fr auto 34px; grid-template-rows: auto 3px; gap: 4px 7px; align-items: center; padding: 6px 8px; border-radius: 8px; background: rgba(233, 240, 229, .035); text-align: left; cursor: pointer; }
.lb-r:hover { background: rgba(184, 255, 58, .07); } .lb-r.mine { background: rgba(184, 255, 58, .12); }
.lb-n { font: 700 11px/1 var(--mono); color: var(--faint); } .lb-dot { width: 8px; height: 8px; border-radius: 50%; }
.lb-f { font: 600 12px/1 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-o { font: 600 9.5px/1 var(--mono); color: var(--faint); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lb-o.own { color: var(--lime); }
.lb-lv { font: 700 11px/1 var(--mono); text-align: right; }
.lb-r .bar { grid-column: 3 / -1; height: 3px; }
/* the creature card */
#card { --lc: #b8ff3a; border-top-color: var(--lc); }
.ac-name { font-size: 34px; }
.ac-types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 22px; }
.ac-types .ty { display: inline-flex; align-items: center; gap: 5px; background: color-mix(in srgb, var(--tc, #b8ff3a) 16%, transparent); color: var(--tc, var(--lime)); text-transform: uppercase; }
.ac-types .ty.apex { background: #fff; color: #07120d; }
.gc-en.sm { width: 15px; height: 15px; }
.ac-lv { display: grid; grid-template-columns: auto auto 1fr auto; gap: 8px; align-items: center; margin-top: 14px; }
.ac-lv .k { font: 600 10px/1 var(--mono); color: var(--faint); letter-spacing: .1em; }
.ac-lv b { font: 700 22px/1 var(--mono); }
.bar.xp { height: 6px; } .bar.xp i { background: linear-gradient(90deg, #46b4ff, #8fd8ff); }
.ac-xpn { font: 500 10.5px/1 var(--mono); color: var(--dim); min-width: 74px; text-align: right; }
.ac-vit { display: grid; grid-template-columns: 1fr auto; gap: 16px; margin-top: 12px; align-items: end; }
.ac-vit > div { display: flex; flex-direction: column; gap: 6px; }
.ac-vit .k { font: 600 10px/1 var(--mono); color: var(--faint); letter-spacing: .1em; text-transform: uppercase; }
.ac-vit .n { font: 500 10.5px/1 var(--mono); color: var(--dim); }
.ac-vit .bar { height: 7px; }
.hearts { display: flex; gap: 4px; height: 16px; align-items: center; }
.hearts i { width: 14px; height: 13px; background: rgba(233, 240, 229, .16); clip-path: path('M7 13C2 9.4 0 7 0 4.3 0 1.9 1.8 0 4 0c1.3 0 2.3.6 3 1.6C7.7.6 8.7 0 10 0c2.2 0 4 1.9 4 4.3C14 7 12 9.4 7 13Z'); }
.hearts i.on { background: #ff6f9e; filter: drop-shadow(0 0 4px rgba(255, 111, 158, .6)); }
.genes { display: flex; flex-direction: column; gap: 6px; }
.gn { display: grid; grid-template-columns: 58px 1fr 26px 30px; gap: 8px; align-items: center; font-size: 11.5px; color: var(--dim); }
.gn .bar { height: 5px; } .gn .bar i { background: color-mix(in srgb, var(--lc) 80%, white); }
.gn b { font: 700 11px/1 var(--mono); color: var(--ink); text-align: right; } .gn .sv { font: 500 10px/1 var(--mono); color: var(--faint); text-align: right; }
.moves { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mvx { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 8px; background: rgba(233, 240, 229, .04); border: 1px solid var(--line2); }
.mvx .mn { font: 600 11.5px/1.1 var(--sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mv .mp { font: 700 10.5px/1 var(--mono); color: var(--dim); }
.ac-rec { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font: 500 10.5px/1.2 var(--mono); color: var(--dim); }
.ac-rec span { padding: 6px; border-radius: 7px; background: rgba(233, 240, 229, .04); text-align: center; } .ac-rec b { display: block; font-size: 15px; color: var(--ink); margin-bottom: 2px; }
.ac-path { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; font: 500 10.5px/1.3 var(--mono); color: var(--faint); align-items: center; }
.ac-path span { padding: 3px 6px; border-radius: 5px; background: rgba(233, 240, 229, .05); color: var(--dim); }
.am-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .am-btns .btn { height: 42px; font-size: 12.5px; }
body.picking #gl { cursor: crosshair !important; }
body.picking #card { box-shadow: 0 0 0 2px var(--lime), 0 18px 50px rgba(0, 0, 0, .45); }
/* breeding sheet */
#breed { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(3, 8, 5, .62); }
.br-in { position: relative; width: min(460px, 92vw); padding: 22px; border-radius: 18px; background: var(--glass); border: 1px solid rgba(184, 255, 58, .3); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); display: flex; flex-direction: column; gap: 14px; }
.br-in .x { position: absolute; right: 12px; top: 12px; }
.br-k { font: 800 11px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--lime); }
.br-pair { display: grid; grid-template-columns: 1fr 30px 1fr; align-items: center; }
.br-p { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; border-radius: 12px; background: color-mix(in srgb, var(--lc) 14%, rgba(0, 0, 0, .25)); }
.br-p img { height: 96px; } .br-p b { font: 400 22px/1 var(--serif); } .br-p span { font: 500 10.5px/1 var(--mono); color: var(--dim); }
.br-x { text-align: center; font: 300 26px/1 var(--sans); color: var(--faint); }
.br-note { font-size: 12.5px; color: var(--dim); min-height: 36px; } .br-note b { color: var(--lime); }
/* labels: level + lives; duel HP bars; hover */
.lab b { font-weight: 700; } .lab .lh { color: #ff8fb4; letter-spacing: 1px; margin-left: 2px; }
.lab.hov { border-color: rgba(233, 240, 229, .4); }
.lab.duel { display: flex; flex-direction: column; gap: 4px; min-width: 96px; padding: 5px 7px 6px; background: rgba(7, 14, 11, .82); }
.lab.duel .dl { font: 600 10.5px/1 var(--mono); } .lab.duel small { color: var(--dim); }
.lab.duel .bar { height: 5px; width: 100%; }
/* pops: damage, effectiveness, XP, level, evolution, hatch, knock-out */
.pop.dmg { font: 900 20px/1 var(--sans); color: #fff; text-shadow: 0 2px 0 #7a1020, 0 0 10px rgba(255, 60, 80, .7); animation: popdmg 1.3s ease-out forwards; }
.pop.dmg.crit { font-size: 28px; color: #ffe066; text-shadow: 0 2px 0 #7a4a00, 0 0 14px rgba(255, 220, 80, .9); }
.pop.eff { font: 800 13px/1 var(--sans); padding: 4px 8px; border-radius: 6px; animation: popup 1.8s ease-out forwards; }
.pop.eff.super { color: #07120d; background: #ffe066; } .pop.eff.weak { color: #cdd6d0; background: rgba(40, 50, 45, .85); } .pop.eff.crit { color: #fff; background: #ff4d6d; }
.pop.xp { font: 800 13px/1 var(--mono); color: #8fd8ff; } .pop.lvl { font: 900 16px/1 var(--sans); color: #ffe066; text-shadow: 0 0 10px rgba(255, 224, 102, .8); }
.pop.evo { font: 900 17px/1 var(--sans); color: #fff; text-shadow: 0 0 12px #b8ff3a, 0 0 2px #000; } .pop.born { font: 800 13px/1 var(--sans); color: #fff6e0; } .pop.born.prism { color: #ffb3ec; font-size: 16px; }
.pop.ko { font: 900 15px/1 var(--sans); color: #ffb3c1; } .pop.ko.owned { color: var(--red); } .pop.faint { font: 800 13px/1 var(--sans); color: #c9b8c0; }
@keyframes popdmg { 0% { opacity: 0; transform: translate(-50%, -100%) scale(1.8); } 12% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -160%) scale(.9); } }
.lower .vs { font: 800 12px/1 var(--mono); color: var(--faint); margin: 0 6px; }
@media (max-width: 760px) {
  .dex { grid-template-columns: 1fr 1fr; } .dn-rows { min-height: 0; } #board { overflow: hidden auto; }
  .lb-head { margin-top: 6px; }
}
.m-num span { color: var(--dim); } .ws-cell .sub { color: var(--dim); }
@media (max-width: 760px) {
  .worldstrip .ws-isl, .worldstrip .ws-eggs { display: none; }
  .ws-cell .k { font-size: 9px; letter-spacing: .12em; }
  .m-num { flex-wrap: nowrap; white-space: nowrap; } .m-form { max-width: 120px; font-size: 9px; }
  .dn { height: 44px; } .dn-n { font-size: 11px; }
}
@media (max-width: 760px) { #acMoney { background: #0a1711; box-shadow: 0 -16px 16px #0a1711; } }

/* ───────────── v2.1 THE LAST STAND: the island's heartbeat in the top bar, the banners, the claim price that climbs */
.ws-stage { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 7px 16px 9px; min-width: 214px; border-left: 1px solid var(--line2); border-radius: 0; transition: background .5s ease, box-shadow .5s ease; }
.ws-stage .k { font: 600 10px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.st-main { display: flex; align-items: baseline; gap: 8px; }
.st-main b { display: inline-block; font: 700 22px/1 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; min-width: 2ch; transform-origin: 50% 70%; }
.st-sub { font: 500 10.5px/1 var(--mono); color: var(--dim); white-space: nowrap; }
.st-bar { position: absolute; left: 16px; right: 16px; bottom: 4px; height: 2px; border-radius: 2px; background: rgba(233, 240, 229, .08); overflow: hidden; }
.st-bar i { display: block; height: 100%; width: 0; background: var(--dim); transition: width 1s linear; }
.ws-stage[data-stage="royale"] { background: linear-gradient(180deg, rgba(184, 255, 58, .13), rgba(184, 255, 58, .03)); box-shadow: inset 0 0 0 1px rgba(184, 255, 58, .38), 0 0 26px rgba(184, 255, 58, .12); border-radius: 11px; border-left-color: transparent; }
.ws-stage[data-stage="royale"] .k { color: var(--lime); font-weight: 800; letter-spacing: .2em; }
.ws-stage[data-stage="royale"] .k::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--lime); vertical-align: 1px; animation: lsdot 1.1s ease-in-out infinite; }
.ws-stage[data-stage="royale"] .st-main b { font-size: 27px; color: var(--lime); text-shadow: 0 0 18px rgba(184, 255, 58, .55); }
.ws-stage[data-stage="royale"] .st-sub { color: var(--ink); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ws-stage[data-stage="royale"] .st-bar i { background: var(--lime); box-shadow: 0 0 8px var(--lime); }
.ws-stage[data-stage="end"] .st-main b { color: var(--lime); }
.st-main b.beat { animation: lsbeat .7s cubic-bezier(.2, .9, .3, 1); }
@keyframes lsbeat { 0% { transform: scale(1); } 22% { transform: scale(1.42); color: #fff; } 100% { transform: scale(1); } }
@keyframes lsdot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
body.royale .ws-alt b { color: var(--lime); }
#banner { position: fixed; left: 0; right: 0; top: 30%; z-index: 19; display: grid; justify-items: center; pointer-events: none; text-align: center; }
#banner .bn-k { font: 700 11px/1 var(--mono); letter-spacing: .32em; text-transform: uppercase; color: var(--lime); padding: 7px 14px; border-radius: 999px; background: rgba(4, 10, 6, .66); box-shadow: 0 0 0 1px rgba(184, 255, 58, .35); opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
#banner .bn-big { font: 900 clamp(38px, 6.6vw, 104px)/1 var(--sans); letter-spacing: .12em; padding-left: .12em; color: #fff; margin: 12px 0 10px; text-shadow: 0 0 36px rgba(184, 255, 58, .75), 0 0 90px rgba(184, 255, 58, .35), 0 3px 0 rgba(0, 0, 0, .35); opacity: 0; transform: scale(1.6); filter: blur(12px); transition: opacity .25s ease, transform .55s cubic-bezier(.16, 1.3, .3, 1), filter .4s ease; }
#banner .bn-sub { font: 600 clamp(13px, 1.25vw, 17px)/1.35 var(--sans); color: var(--ink); max-width: min(720px, 90vw); padding: 7px 16px; border-radius: 10px; background: rgba(4, 10, 6, .58); opacity: 0; transform: translateY(6px); transition: opacity .4s ease .35s, transform .4s ease .35s; }
#banner.on .bn-k, #banner.on .bn-big, #banner.on .bn-sub { opacity: 1; transform: none; filter: none; }
.fr.royale { background: linear-gradient(90deg, rgba(184, 255, 58, .1), transparent 70%); }
.fr.royale .ic { background: var(--lime); box-shadow: 0 0 8px var(--lime); border-radius: 50%; }
.fr.royale .tx b { color: var(--lime); letter-spacing: .04em; }
.am-x { font: 700 10.5px/1 var(--mono); font-style: normal; color: var(--amber); margin-left: 8px; padding: 3px 6px; border-radius: 5px; background: rgba(255, 181, 71, .1); white-space: nowrap; }
.am-x:empty { display: none; }
.pop.left { margin-top: -30px; color: var(--lime); font: 900 22px/1 var(--sans); letter-spacing: .04em; text-shadow: 0 0 14px rgba(184, 255, 58, .7), 0 2px 0 rgba(0, 0, 0, .5); }
@media (max-width: 1500px) { .ws-stage { min-width: 196px; padding: 7px 12px 9px; } }
@media (max-width: 760px) {
  .ws-stage { min-width: 0; flex: 0 0 auto; padding: 5px 9px 7px; gap: 2px; border-left: 0; }
  .ws-stage .k { font-size: 8.5px; letter-spacing: .1em; } .st-main b { font-size: 16px; } .ws-stage[data-stage="royale"] .st-main b { font-size: 19px; }
  .st-sub { font-size: 9px; } .st-bar { left: 9px; right: 9px; bottom: 2px; }
  #banner { top: 24%; } #banner .bn-k { font-size: 9.5px; letter-spacing: .22em; }
}
.lower .lv { font: 600 12px/1 var(--mono); font-style: normal; color: rgba(233, 240, 229, .78); margin-left: 4px; vertical-align: 3px; }
@media (max-width: 760px) {
  .ws-alt { flex: 0 0 auto; } .ws-meter { min-width: 0; } .ws-meter .m-form { display: none; }
}
.links a.on { color: var(--ink); background: rgba(233, 240, 229, .06); }
.hall-go { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.hall-go .btn { height: 42px; padding: 0 16px; display: inline-grid; place-items: center; border-radius: 10px; text-decoration: none; font-weight: 800; }
.hall-go .btn.ghost { border: 1px solid rgba(184, 255, 58, .35); color: var(--lime); }
@media (max-width: 760px) {
  #tabs .tab-link { flex: 0.8; display: grid; place-items: center; border-radius: 9px; font-weight: 700; color: var(--dim); text-decoration: none; border-left: 1px solid var(--line2); }
}
/* ───────────── v2.2 combat: damage by effectiveness, heals, statuses, the move's name, status chips over duelists */
.pop.dmg.super { font-size: 24px; color: #ffb03a; text-shadow: 0 2px 0 #7a2a00, 0 0 12px rgba(255, 140, 40, .85); }
.pop.dmg.weak { font-size: 15px; color: #b9c7cf; text-shadow: 0 2px 0 #2a3640, 0 0 6px rgba(0, 0, 0, .6); }
.pop.dmg.burn { font-size: 15px; color: #ff9a4a; text-shadow: 0 2px 0 #6a1c00, 0 0 8px rgba(255, 110, 40, .8); }
.pop.dmg.poison { font-size: 15px; color: #d39bff; text-shadow: 0 2px 0 #3a1060, 0 0 8px rgba(180, 90, 255, .8); }
.pop.dmg.recoil { font-size: 14px; color: #ffc9d2; }
.pop.heal { font: 900 19px/1 var(--sans); color: #7dff9a; text-shadow: 0 2px 0 #0d4a1e, 0 0 10px rgba(125, 255, 154, .75); animation: popdmg 1.4s ease-out forwards; }
.pop.miss { font: italic 800 15px/1 var(--sans); color: #e6ecef; text-shadow: 0 1px 6px #000; letter-spacing: .04em; }
.pop.eff.hits { color: #07120d; background: #8fd8ff; }
.pop.buff { font: 800 13px/1 var(--sans); padding: 4px 8px; border-radius: 6px; animation: popup 1.8s ease-out forwards; }
.pop.buff.shield { color: #07120d; background: #9fe4ff; } .pop.buff.boost { color: #2a0d00; background: linear-gradient(90deg, #ff6a3a, #ffd36a); } .pop.buff.cure { color: #07120d; background: #b8ff3a; }
.pop.st { font: 900 14px/1 var(--sans); padding: 4px 9px; border-radius: 999px; letter-spacing: .03em; animation: popup 1.9s ease-out forwards; }
.pop.st.burn { color: #fff; background: linear-gradient(90deg, #ff4a1a, #ff9a3a); box-shadow: 0 0 14px rgba(255, 110, 40, .7); }
.pop.st.poison { color: #fff; background: linear-gradient(90deg, #7a2ad6, #b45cff); box-shadow: 0 0 14px rgba(180, 90, 255, .7); }
.pop.st.freeze { color: #06303f; background: linear-gradient(90deg, #bfeaff, #f2fbff); box-shadow: 0 0 14px rgba(190, 235, 255, .8); }
.pop.st.dazzle { color: #3a2a00; background: linear-gradient(90deg, #ffe066, #fff6c8); box-shadow: 0 0 14px rgba(255, 230, 120, .8); }
.pop.mvname { font: 800 12.5px/1 var(--sans); color: #fff; padding: 4px 9px; border-radius: 6px; background: rgba(6, 12, 9, .78); border-left: 3px solid var(--tc, #fff); animation: popname 1.5s ease-out forwards; white-space: nowrap; }
.pop.mvname.t-beast { --tc: #f6c27a; } .pop.mvname.t-ember { --tc: #ff7a3c; } .pop.mvname.t-tide { --tc: #46b4ff; } .pop.mvname.t-thorn { --tc: #7fe07a; } .pop.mvname.t-gale { --tc: #d6f6ff; }
.pop.mvname.t-lumen { --tc: #ffe066; } .pop.mvname.t-frost { --tc: #c8f0ff; } .pop.mvname.t-iron { --tc: #d6dde6; } .pop.mvname.t-venom { --tc: #c46bff; } .pop.mvname.t-shadow { --tc: #8a6bff; }
@keyframes popname { 0% { opacity: 0; transform: translate(-50%, -80%) scale(.9); } 12% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -125%); } }
.lab .sx { display: inline-flex; gap: 3px; margin-left: 5px; vertical-align: -2px; }
.lab .sx i { width: 15px; height: 15px; border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; }
.lab .sx i svg { width: 11px; height: 11px; }
.lab .sx .burn { background: #ff5a24; color: #fff; box-shadow: 0 0 8px rgba(255, 110, 40, .8); } .lab .sx .poison { background: #9a3cf0; color: #fff; box-shadow: 0 0 8px rgba(180, 90, 255, .8); }
.lab .sx .freeze { background: #d6f3ff; color: #0a3a52; box-shadow: 0 0 8px rgba(190, 235, 255, .9); } .lab .sx .dazzle { background: #ffe066; color: #4a3600; box-shadow: 0 0 8px rgba(255, 230, 120, .8); }
.lab .sx .shield { background: #8fd8ff; color: #06303f; } .lab .sx .boost { background: linear-gradient(135deg, #ff5a2a, #ffd36a); color: #2a0d00; }
