/* Funded — the HUD and screens. Prop Firm Loop's look: dark glass, Clash Grotesk for numbers and titles, Inter for text. */
@font-face { font-family: 'Clash Grotesk'; src: url('./clash-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
:root { color-scheme: dark; --glass: rgba(16, 15, 26, 0.6); --glass-2: rgba(28, 26, 44, 0.72); --line: rgba(255, 255, 255, 0.1); --text: #ECEAF2; --mute: #9A9CAE; --green: #2EE59D; --red: #FF6B6B; --gold: #F2C14E; --violet: #A08BFF; --blue: #5CA8FF; --display: 'Clash Grotesk', Inter, system-ui, sans-serif; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
.q-low .glass, .q-low .screen.dim { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.q-low .glass { background: rgba(18, 17, 28, 0.88); }
html, body { height: 100%; background: #0A0A0F; color: var(--text); font: 500 14px/1.4 Inter, system-ui, -apple-system, sans-serif; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; touch-action: none; }
#app { position: fixed; inset: 0; }
#app canvas { position: absolute; inset: 0; display: block; }
.fx-overlay { pointer-events: none; z-index: 2; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 10px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.hud { position: absolute; inset: 0; z-index: 3; pointer-events: none; --top: 80px; }
.hud > *, .hud .top > * { pointer-events: auto; }
.hud .top { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); left: calc(14px + env(safe-area-inset-left, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "ac st tools"; gap: 12px; align-items: start; pointer-events: none; }

/* the account: small and plain (what it's worth, where it passes, where it fails) */
.acct { grid-area: ac; justify-self: start; padding: 9px 14px 8px; border-radius: 15px; display: grid; gap: 2px; min-width: 0; }
.ac-1 { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.ac-k { font-size: 11.5px; font-weight: 650; color: var(--mute); } .ac-k.funded { color: var(--green); }
.ac-1 b { font: 600 20px var(--display); letter-spacing: -0.3px; }
.ac-1 small { font-weight: 650; font-size: 12px; }
.ac-2 { display: flex; gap: 10px; align-items: center; font-size: 11.5px; color: var(--mute); white-space: nowrap; }
.ac-2 b { color: var(--text); font-weight: 600; }
.ac-2 .t b { color: var(--green); } .ac-2 .f { color: #FF9A9A; } .ac-2 .p b { color: var(--gold); }
.up { color: var(--green); } .dn { color: var(--red); }

/* the rounds of the act, TFT style: a sword per fight, a gem where a relic comes after, a skull for the boss */
.stages { grid-area: st; justify-self: center; display: flex; align-items: center; gap: 12px; padding: 7px 12px 7px 14px; border-radius: 15px; }
.st-k { display: grid; line-height: 1.05; }
.st-k b { font: 600 18px var(--display); letter-spacing: -0.2px; }
.st-k span { font-size: 11px; color: var(--mute); white-space: nowrap; }
.st-row { display: flex; align-items: center; gap: 4px; }
.rd { position: relative; width: 22px; height: 25px; display: grid; place-items: center; color: transparent; font-style: normal; flex: none; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(255, 255, 255, 0.14); }
.rd svg { opacity: 0; }
.rd.won { background: var(--green); } .rd.lost { background: #FF7A7A; }
.rd.won::after, .rd.lost::after { content: ''; position: absolute; width: 8px; height: 4px; border-left: 2px solid #062618; border-bottom: 2px solid #062618; transform: translateY(-1px) rotate(-45deg); }
.rd.lost::after { width: 9px; height: 0; border-left: 0; border-bottom: 2px solid #2A0808; transform: rotate(45deg); box-shadow: none; }
.rd.lost::before { content: ''; position: absolute; width: 9px; height: 0; border-bottom: 2px solid #2A0808; transform: rotate(-45deg); }
.rd.now { background: #fff; color: #14121F; } .rd.now svg { opacity: 1; }
.rd.boss { width: 30px; height: 30px; clip-path: none; border-radius: 10px; color: #FF9A9A; background: rgba(255, 107, 107, 0.18); box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.45); } .rd.boss svg { opacity: 1; }
.rd.boss.now { color: #fff; background: var(--red); box-shadow: 0 0 0 2px #FFD0D0, 0 0 16px rgba(255, 107, 107, 0.8); }
.rd.boss.won { color: #2A1D05; background: var(--gold); box-shadow: none; } .rd.boss.won::after { display: none; }
.rd.gem { width: 12px; height: 16px; clip-path: none; background: transparent; color: var(--gold); margin: 0 -1px; } .rd.gem svg { opacity: 1; }
.rd.gem.got { color: rgba(242, 193, 78, 0.35); }
.rd.now:not(.boss) { animation: rd-now 1.8s ease-in-out infinite; }
@keyframes rd-now { 50% { background: #CFFCE9; } }
@media (prefers-reduced-motion: reduce) { .rd.now:not(.boss) { animation: none; } }

.tools { grid-area: tools; justify-self: end; display: flex; gap: 8px; align-items: center; }
.ibtn { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--text); }
.ibtn.off { opacity: 0.45; position: relative; }
.ibtn.off::after { content: ''; position: absolute; width: 22px; height: 2px; background: currentColor; transform: rotate(-45deg); border-radius: 2px; }
.relics { display: flex; gap: 4px; }
.relic { width: 34px; height: 34px; display: grid; place-items: center; cursor: help; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45)); }
.relic svg { display: block; }

/* synergies: compact rows (hover or tap for the units and the steps) */
.traits { position: absolute; left: calc(14px + env(safe-area-inset-left, 0px)); top: calc(var(--top) + 12px); width: 214px; max-height: calc(100% - var(--top) - 250px); overflow-y: auto; padding: 8px 6px; display: grid; gap: 2px; scrollbar-width: none; align-content: start; }
.traits::-webkit-scrollbar { display: none; }
.tr-h { font-size: 11.5px; font-weight: 650; color: var(--mute); padding: 0 8px 4px; }
.traits .empty { color: var(--mute); font-size: 12.5px; padding: 8px; }
.trait { display: grid; grid-template-columns: 28px 1fr auto; gap: 9px; align-items: center; padding: 5px 8px; border-radius: 11px; cursor: pointer; }
.trait:hover { background: rgba(255, 255, 255, 0.07); }
.trait.on { background: rgba(255, 255, 255, 0.045); }
.trait.off { opacity: 0.6; }
.trait .hex { width: 28px; height: 31px; display: grid; place-items: center; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: rgba(255, 255, 255, 0.08); }
.trait.on .hex { background: var(--c); }
.tr-m { min-width: 0; } .tr-m b { font-size: 13px; font-weight: 650; display: block; line-height: 1.15; }
.tr-steps { display: flex; gap: 3px; align-items: center; font-size: 11px; color: rgba(236, 234, 242, 0.4); font-weight: 600; }
.tr-steps span.on { color: var(--c); filter: brightness(1.25); font-weight: 800; } .tr-steps span.past { color: rgba(236, 234, 242, 0.7); }
.tr-steps i { font-style: normal; opacity: 0.5; }
.tr-n { font: 600 15px var(--display); font-style: normal; min-width: 22px; text-align: right; }
.trait.on .tr-n { color: var(--c); filter: brightness(1.2); }
.traits-pill { grid-area: pill; display: none; padding: 7px 12px; border-radius: 12px; font-size: 12.5px; white-space: nowrap; }
.traits-pill b { color: var(--green); }

/* the popover beside a synergy or an item */
.tip { position: fixed; z-index: 7; width: 296px; padding: 12px 13px; border-radius: 16px; background: rgba(22, 20, 36, 0.94); pointer-events: auto; display: grid; gap: 8px; }
.q-low .tip { background: rgba(22, 20, 36, 0.98); }
.tip-h { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 10px; }
.tip-h b { font: 600 17px var(--display); color: var(--c); filter: brightness(1.15); }
.tip-h small { grid-column: 1; color: var(--mute); font-size: 11.5px; }
.tip-h em { grid-row: 1; grid-column: 2; font-style: normal; font-size: 11.5px; color: var(--mute); }
.tip-ih { grid-template-columns: auto 1fr; align-items: center; } .tip-ih b { color: var(--text); filter: none; display: block; } .tip-ih small { grid-column: 2; } .tip-ih svg { grid-row: span 2; }
.tip-p { font-size: 12.5px; color: #DAD8E4; }
.tip-steps { list-style: none; display: grid; gap: 4px; }
.tip-steps li { display: grid; grid-template-columns: 20px 1fr; gap: 6px; font-size: 12px; color: rgba(236, 234, 242, 0.55); line-height: 1.35; }
.tip-steps li b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.08); color: var(--text); font-size: 11.5px; }
.tip-steps li.on { color: var(--text); } .tip-steps li.on b { background: var(--c); color: #0A0A0F; }
.tip-l { font-size: 11px; font-weight: 650; color: var(--mute); }
.tip-units { display: flex; flex-wrap: wrap; gap: 5px; }
.tu { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 2px solid color-mix(in srgb, var(--r) 55%, transparent); background: rgba(255, 255, 255, 0.04); overflow: hidden; opacity: 0.45; filter: grayscale(0.7); }
.tu img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tu em { position: absolute; right: 1px; bottom: 0; font: 600 10px var(--display); font-style: normal; color: var(--gold); text-shadow: 0 1px 2px #000; }
.tu.have { opacity: 0.85; filter: none; }
.tu[data-u] { cursor: pointer; transition: transform 0.14s ease, opacity 0.14s, filter 0.14s, box-shadow 0.14s; }
.tu[data-u]:hover, .tu.on { opacity: 1; filter: none; transform: translateY(-2px) scale(1.08); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in srgb, var(--r) 80%, transparent); }
/* the unit you're on: its name, its classes, its price (Hit, Nov 8) */
.tu-info { min-height: 38px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1px 8px; padding: 7px 9px; border-radius: 10px; background: rgba(255, 255, 255, 0.045); }
.tu-info small { grid-column: 1 / -1; color: var(--mute); font-size: 11.5px; }
.tu-info b { font-size: 13.5px; font-weight: 700; color: color-mix(in srgb, var(--uc, #fff) 45%, #fff); }
.tu-info em { grid-row: 1; grid-column: 2; font-style: normal; font-size: 11px; color: var(--gold); white-space: nowrap; }
.tu-info span { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #CFCDDB; }
.tu-info span i { width: 7px; height: 7px; border-radius: 2px; background: var(--uc, #fff); transform: rotate(45deg); flex: none; }
.tu.in { opacity: 1; filter: none; border-color: var(--r); box-shadow: 0 0 10px color-mix(in srgb, var(--r) 55%, transparent); }
/* a component's six recipes: the other part, what it makes, its numbers and what it does (lit: you have the part) */
.tip-recipes { list-style: none; display: grid; gap: 3px; }
.tip-recipes li { display: grid; grid-template-columns: auto 34px minmax(0, 1fr); column-gap: 7px; align-items: start; padding: 5px 6px; border-radius: 10px; min-width: 0; }
.tip-recipes li.ready { background: rgba(242, 193, 78, 0.1); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.35); }
.tip-recipes .rc { display: flex; align-items: center; gap: 2px; padding-top: 6px; } .tip-recipes .rc i { font-style: normal; color: var(--mute); font-size: 12px; font-weight: 700; }
.rd-t { display: grid; gap: 3px; min-width: 0; } .rd-t b { font-size: 12.5px; font-weight: 700; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; } .rd-t b em { font-style: normal; font-size: 10px; color: var(--gold); font-weight: 700; }
.rd-t small { font-size: 11px; color: #BDBACB; line-height: 1.3; } .rd-t .chip { font-size: 10px; padding: 1px 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; } .chip { padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); font-size: 11px; font-weight: 650; color: #E6E4EE; white-space: nowrap; }
.item-tip { max-height: calc(100dvh - 16px); overflow-y: auto; pointer-events: none; }   /* (it only tells: taps and clicks go through to the board) */
.item-tip.compact { width: calc(100vw - 16px); max-width: 420px; gap: 6px; padding: 10px 11px; }
.tip-makes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.tip-makes span { display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 6px; align-items: center; padding: 3px 4px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); min-width: 0; }
.tip-makes span svg { grid-row: span 2; } .tip-makes small { font-size: 10.5px; font-weight: 700; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip-makes em { font-style: normal; font-size: 9.5px; color: #BDBACB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.tip-makes span.ready { background: rgba(242, 193, 78, 0.12); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.4); }
.tip-from { display: flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; } .tip-from i { font-style: normal; color: var(--mute); }
.tip svg, .it svg, .ii svg, .sc-item svg, .mr svg { display: block; flex: none; }

/* items: a tray beside the board (above the shop on phones); drag one onto a unit */
.items { position: fixed; right: calc(14px + env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); padding: 9px 8px 8px; border-radius: 16px; display: grid; gap: 6px; pointer-events: auto; }   /* (it sits in .bottom, which lets clicks through to the board) */
.it-h { font-size: 11.5px; font-weight: 650; color: var(--mute); text-align: center; }
.it-grid { display: grid; grid-template-columns: repeat(2, 44px); gap: 5px; }
.it { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.05); touch-action: none; cursor: grab; transition: transform 0.12s; }
.it:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.1); }
.it.sel { background: rgba(242, 193, 78, 0.22); box-shadow: 0 0 0 2px var(--gold); }
.ghost-item { position: fixed; left: 0; top: 0; z-index: 9; width: 44px; pointer-events: none; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.6)); }
/* what dropping it there would do: forge, equip, take off */
.ghost-item .gn { position: absolute; left: 50%; top: 50px; transform: translateX(-50%); white-space: nowrap; padding: 4px 9px; border-radius: 9px; background: rgba(10, 10, 15, 0.92); border: 1px solid var(--line); font-size: 12px; font-weight: 650; color: var(--text); }
.ghost-item .gn b { font-weight: 800; } .ghost-item .gn.forge { color: var(--gold); border-color: rgba(242, 193, 78, 0.55); }
.ghost-item .gn.mag { color: #9FD0FF; border-color: rgba(92, 168, 255, 0.55); } .ghost-item .gn.no { color: #FFB0B0; }
/* what two items forge into, while one is dragged over the other (Hit, Nov 8) */
.forge-peek { position: fixed; z-index: 10; width: 272px; padding: 10px 12px 11px; border-radius: 15px; pointer-events: none; display: grid; gap: 7px; background: rgba(20, 18, 32, 0.95); border-color: rgba(242, 193, 78, 0.45); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 26px rgba(242, 193, 78, 0.16); }
.forge-peek.in { animation: fpIn 0.18s ease-out; }
@keyframes fpIn { from { opacity: 0; transform: translateY(6px) scale(0.96); } }
.fp-eq { display: flex; align-items: center; gap: 4px; } .fp-eq > i { font-style: normal; color: var(--mute); font-weight: 700; font-size: 13px; }
.fp-eq > svg:nth-of-type(3) { filter: drop-shadow(0 0 10px rgba(242, 193, 78, 0.55)); margin-left: 2px; }
.fp-n { min-width: 0; display: grid; margin-left: 4px; } .fp-n b { font: 600 15px var(--display); color: var(--gold); } .fp-n small { font-size: 10.5px; color: var(--mute); }
.forge-peek p { font-size: 11.5px; color: #DAD8E4; line-height: 1.35; }
.it.fp-on { outline: 2px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 18px rgba(242, 193, 78, 0.5); transform: scale(1.08); }
/* the Magnet (its count on its corner) and the recipe book, in the tray */
.it.mag { position: relative; background: rgba(92, 168, 255, 0.12); }
.it.mag em { position: absolute; right: -3px; bottom: -3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #1D4C9C; color: #fff; font: 600 11px/18px var(--display); font-style: normal; text-align: center; box-shadow: 0 0 0 2px rgba(10, 10, 15, 0.9); }
.it.book { color: var(--mute); display: grid; place-items: center; align-content: center; gap: 1px; cursor: pointer; }
.it.book small { font-size: 8.5px; font-weight: 700; letter-spacing: 0.02em; } .it.book:hover { color: var(--text); }
.fly-item { position: fixed; left: 0; top: 0; z-index: 9; pointer-events: none; transition: transform 0.6s cubic-bezier(.3, .7, .2, 1), opacity 0.6s ease-in; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5)); }

/* the shop */
.bottom { position: absolute; left: 0; right: 0; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.shop { pointer-events: auto; display: flex; gap: 10px; padding: 10px; align-items: stretch; max-width: calc(100% - 24px); transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), opacity 0.3s; }
/* during a fight the shop stays open (buy, reroll, level up, sell from the bench); the Fight button gives way to the speed */
.shop.fighting .fight { display: none; }
.shop.sellzone { box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.7), 0 10px 36px rgba(0, 0, 0, 0.32); }
.wallet { width: 166px; flex: none; display: grid; gap: 8px; align-content: start; padding: 2px 4px; }
.gold { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.gold i { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE39A, #F2C14E 55%, #B8862A); box-shadow: 0 0 12px rgba(242, 193, 78, 0.5); }
.gold b { font: 600 26px var(--display); }
.gold small { width: 100%; color: var(--mute); font-size: 11.5px; margin-top: -4px; }
.lvl span { font-size: 12px; color: var(--mute); } .lvl b { color: var(--text); }
.xp { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); margin-top: 5px; overflow: hidden; } .xp i { display: block; height: 100%; background: var(--blue); border-radius: 3px; transition: width 0.4s; }
.btns { display: grid; grid-template-columns: 1fr 1fr 34px; gap: 6px; }
.btns button { display: flex; flex-direction: column; align-items: center; padding: 6px 4px; border-radius: 10px; background: rgba(255, 255, 255, 0.07); border: 1px solid var(--line); font-size: 12px; font-weight: 650; }
.btns button b { color: var(--gold); font: 600 12px var(--display); }
.btns button:hover:not(:disabled) { background: rgba(255, 255, 255, 0.13); }
.btns button:disabled { opacity: 0.4; }
.btns .lock { justify-content: center; font-size: 14px; } .btns .lock.on { background: rgba(242, 193, 78, 0.18); border-color: rgba(242, 193, 78, 0.5); }
.cards { display: flex; gap: 8px; flex: 0 1 auto; min-width: 0; }
.card { position: relative; flex: 0 1 132px; width: 132px; min-width: 84px; border-radius: 14px; padding: 2px; background: var(--r); text-align: left; transition: transform 0.15s, filter 0.15s; box-shadow: 0 0 18px color-mix(in srgb, var(--r) 28%, transparent); }
.card:hover:not(.empty) { transform: translateY(-4px); }
.card.poor { filter: grayscale(0.7) brightness(0.7); }
.card.empty { background: rgba(255, 255, 255, 0.04); box-shadow: none; border: 1px dashed rgba(255, 255, 255, 0.1); }
.card.t5 { background: linear-gradient(135deg, #FFE39A, #F2C14E 40%, #B8862A 70%, #FFE39A); }
.card-in { height: 100%; border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: 108px auto; background: linear-gradient(180deg, rgba(34, 32, 52, 0.95), rgba(14, 14, 22, 0.98)); }
.card img { width: 100%; height: 108px; object-fit: cover; background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--c) 36%, transparent), transparent 70%); }
.card-meta { padding: 6px 9px 8px; display: grid; gap: 2px; }
.card-meta b { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta small { font-size: 10.5px; color: var(--mute); display: flex; gap: 5px; align-items: center; white-space: nowrap; overflow: hidden; min-width: 0; }
.card-meta small i { flex: none; width: 7px; height: 7px; border-radius: 2px; background: var(--c); transform: rotate(45deg); }
/* a line too long for its box runs like a ticker (hud.js tickers): two copies side by side, sliding one copy's width */
.tk { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.tk-in { display: inline-flex; }
.tk.run { -webkit-mask-image: linear-gradient(90deg, transparent, #000 5px, #000 calc(100% - 7px), transparent); mask-image: linear-gradient(90deg, transparent, #000 5px, #000 calc(100% - 7px), transparent); }
.tk.run .tk-t { padding-right: 16px; }
.tk.run .tk-in { animation: tk var(--dur, 6s) linear var(--dl, 1s) infinite; }
@keyframes tk { to { transform: translateX(calc(-1 * var(--w))); } }
@media (prefers-reduced-motion: reduce) { .tk.run .tk-in { animation: none; } .tk.run .tk-t + .tk-t { display: none; } }
.cost { position: absolute; right: 8px; top: 8px; font: 600 13px var(--display); padding: 2px 7px; border-radius: 8px; background: rgba(10, 10, 15, 0.72); color: var(--gold); }
.have { position: absolute; left: 8px; top: 8px; font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 8px; background: rgba(46, 229, 157, 0.92); color: #062618; }
.fight { width: 118px; flex: none; border-radius: 14px; background: linear-gradient(180deg, #3BEAA8, #10B981); color: #052417; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; box-shadow: 0 8px 28px rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4); transition: transform 0.15s; }
.fight span { font: 600 24px var(--display); letter-spacing: -0.3px; }
.fight small { font-size: 11px; font-weight: 650; opacity: 0.8; max-width: 100px; text-align: center; line-height: 1.2; }
.fight:hover:not(:disabled) { transform: translateY(-2px); }
.fight:disabled { filter: grayscale(0.8) brightness(0.6); }
.speed { width: 118px; flex: none; display: grid; grid-template-columns: 1fr 1fr; align-content: center; gap: 6px; padding: 8px; border-radius: 14px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); }
.speed[hidden] { display: none; }
.speed small { grid-column: 1 / -1; text-align: center; font-size: 11.5px; font-weight: 650; color: var(--mute); letter-spacing: 0.02em; }
.speed button { padding: 10px 0; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--mute); background: rgba(255, 255, 255, 0.05); }
.speed button.on { background: rgba(255, 255, 255, 0.16); color: #fff; }
.toast { position: absolute; left: 50%; top: calc(var(--top) + 54px); transform: translate(-50%, -10px); padding: 9px 16px; border-radius: 12px; background: rgba(16, 15, 26, 0.85); border: 1px solid var(--line); font-weight: 600; opacity: 0; transition: 0.25s; pointer-events: none !important; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { color: #FFB0B0; } .toast.good { color: #9CFFD6; }

/* the unit card */
.info { position: absolute; z-index: 6; padding: 14px; border-radius: 16px; background: var(--glass-2); max-height: calc(100dvh - 24px); overflow-y: auto; }
.q-low .info { background: rgba(28, 26, 44, 0.97); }
.info .x { position: absolute; right: 8px; top: 6px; width: 28px; height: 28px; font-size: 20px; color: var(--mute); }
.info-head { display: flex; gap: 11px; align-items: center; padding-right: 22px; }
.info-head img { width: 60px; height: 54px; object-fit: cover; border-radius: 11px; border: 2px solid var(--r); background: radial-gradient(circle, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%); flex: none; }
.info-head b { font: 600 17px var(--display); display: block; } .info-head small { display: flex; gap: 5px; align-items: center; color: var(--mute); font-size: 11.5px; }
.info-head small i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); transform: rotate(45deg); flex: none; }
.ui-stars { display: flex; align-items: center; gap: 1px; margin: 1px 0 2px; }
.ui-stars i { font-style: normal; font-size: 14px; color: rgba(255, 255, 255, 0.18); line-height: 1; } .ui-stars i.on { color: var(--gold); text-shadow: 0 0 8px rgba(242, 193, 78, 0.5); }
.ui-stars span { margin-left: 7px; font-size: 11px; color: var(--mute); }
.ui-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 11px; }
.ui-tags span { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); color: #DAD8E4; display: inline-flex; align-items: center; gap: 5px; }
.line.front { background: rgba(242, 193, 78, 0.16) !important; color: #FFE39A !important; } .line.back { background: rgba(92, 168, 255, 0.16) !important; color: #BFDCFF !important; }
.stars { color: var(--gold); font-size: 13px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 11px 0 10px; }
.stats span { font-size: 11px; color: var(--mute); background: rgba(255, 255, 255, 0.05); border-radius: 8px; padding: 5px 7px; display: flex; flex-direction: column; }
.stats b { color: var(--text); font-size: 13px; } .stats b em { font-style: normal; color: var(--green); font-size: 11px; margin-left: 3px; }
.ab b { font-size: 13.5px; color: #D9C9FF; } .ab p { font-size: 12.5px; color: #CFCDD8; margin-top: 3px; }
.ui-items { display: grid; gap: 6px; margin-top: 10px; }
.ii { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; } .ii b { font-size: 12.5px; display: block; } .ii small { font-size: 11px; color: var(--mute); display: block; line-height: 1.3; }
.ui-noitems { margin-top: 10px; font-size: 11.5px; color: var(--mute); }
.sell { margin-top: 12px; width: 100%; padding: 9px; border-radius: 10px; background: rgba(255, 107, 107, 0.16); border: 1px solid rgba(255, 107, 107, 0.4); color: #FFC2C2; font-weight: 700; }

/* full screens */
.screen { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; padding: 20px; overflow-y: auto; touch-action: pan-y; }
.screen > * { margin: auto; flex: none; max-width: 100%; }   /* (centered, and still scrollable from the top when taller than the screen) */
.screen.dim { background: radial-gradient(ellipse at center, rgba(10, 10, 15, 0.55), rgba(10, 10, 15, 0.88)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.screen h2 { font: 600 clamp(30px, 4vw, 44px) var(--display); letter-spacing: -0.8px; text-align: center; }
.cta { padding: 13px 30px; border-radius: 14px; background: linear-gradient(180deg, #3BEAA8, #10B981); color: #052417; font: 600 18px var(--display); box-shadow: 0 10px 30px rgba(16, 185, 129, 0.35); transition: transform 0.15s; }
.cta:hover { transform: translateY(-2px); }
.ghost { padding: 12px 22px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.06); font-weight: 650; }
.title-screen { background: linear-gradient(180deg, rgba(10, 10, 15, 0.5), rgba(10, 10, 15, 0) 26%, rgba(10, 10, 15, 0) 64%, rgba(10, 10, 15, 0.78)); align-items: stretch; padding: max(4vh, 22px) 20px max(5.5vh, 22px); }
.title { width: 100%; text-align: center; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 18px; min-height: 100%; }
.title-bottom { display: grid; gap: 16px; justify-items: center; }
/* the wordmark: flat, solid letters; only a soft shadow to lift it off the scene (Hit: no gradient, no green) */
.logo .kicker { font-size: 13px; font-weight: 650; color: #E4DEFF; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7); }
.wordmark { margin-top: 4px; font: 600 clamp(60px, 9.6vw, 118px)/0.9 var(--display); letter-spacing: -0.025em; color: #F6F5FA; padding-bottom: 0.04em;
  text-shadow: 0 2px 0 rgba(14, 12, 26, 0.32), 0 10px 34px rgba(0, 0, 0, 0.42); }
.wordmark span { display: inline-block; }
.logo p { max-width: 460px; margin: 12px auto 0; color: #F4F2FA; font-size: 15.5px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55), 0 2px 16px rgba(0, 0, 0, 0.6); }
.title-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.best { color: var(--mute); } .best b { color: var(--gold); }
.sheet { width: min(620px, calc(100vw - 32px)); padding: 26px; border-radius: 22px; display: grid; gap: 16px; justify-items: center; background: var(--glass-2); }
.sheet p { color: #CFCDD8; text-align: center; }
/* How it works: a wide sheet on a computer, full width on a phone */
.how-sheet { width: min(760px, calc(100vw - 32px)); justify-items: stretch; }
.how-sheet h2, .how-sheet .title-btns { justify-self: center; }
.how { list-style: none; counter-reset: s; display: grid; gap: 12px; }
.how li { counter-increment: s; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; color: #CFCDD8; font-size: 14px; line-height: 1.5; text-align: left; }
.how li::before { content: counter(s); width: 26px; height: 26px; border-radius: 8px; background: rgba(46, 229, 157, 0.16); color: var(--green); font-weight: 800; display: grid; place-items: center; font-size: 13px; }
.how b { color: var(--text); }
.menu-sheet { width: min(460px, calc(100vw - 32px)); }
.menu-relics { display: grid; gap: 8px; width: 100%; }
.mr { display: grid; grid-template-columns: 40px 1fr; gap: 10px; align-items: center; text-align: left; } .mr b { font-size: 13.5px; display: block; } .mr small { font-size: 12px; color: var(--mute); }
/* the four classes */
.classes, .starter { display: grid; gap: 16px; justify-items: center; width: min(1180px, 100%); }
.classes .sub, .starter .sub { color: #CFCDD8; max-width: 620px; text-align: center; margin-top: -6px; }
.cx-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; width: 100%; }
.cx { border-radius: 18px; padding: 12px 13px 14px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 20%, rgba(20, 19, 32, 0.92)), rgba(14, 14, 22, 0.95)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); display: grid; gap: 6px; align-content: start; text-align: left; min-width: 0; }
.cx-art img { width: 100%; height: 130px; object-fit: contain; display: block; }
.cx-body { display: grid; gap: 6px; min-width: 0; }
.cx b { font: 600 21px var(--display); } .cx em { font-style: normal; color: var(--c); font-weight: 700; font-size: 13px; filter: brightness(1.3); }
.cx p { color: #CFCDD8; font-size: 12.5px; }
.cx-steps { list-style: none; display: grid; gap: 4px; }
.cx-steps li { display: grid; grid-template-columns: 20px 1fr; gap: 6px; font-size: 11.5px; color: #CFCDD8; line-height: 1.35; }
.cx-steps li b { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font: 700 11px Inter; background: var(--c); color: #0A0A0F; }
.cx-units { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.cx-units img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: rgba(255, 255, 255, 0.05); border: 1.5px solid color-mix(in srgb, var(--r) 60%, transparent); }
/* the first unit */
.start-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; width: 100%; }
.start-card { border-radius: 18px; padding: 12px; text-align: left; display: grid; gap: 8px; align-content: start; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 20%, rgba(20, 19, 32, 0.92)), rgba(14, 14, 22, 0.95)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); transition: transform 0.16s, box-shadow 0.16s; min-width: 0; }
.start-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px color-mix(in srgb, var(--c) 30%, transparent); }
.sc-art img { width: 100%; height: 132px; object-fit: contain; display: block; background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--c) 30%, transparent), transparent 65%); }
.sc-b { display: grid; gap: 4px; }
.sc-b > b { font: 600 19px var(--display); }
.sc-b small { display: flex; gap: 5px; align-items: center; color: var(--mute); font-size: 11.5px; } .sc-b small i { width: 7px; height: 7px; border-radius: 2px; background: var(--c); transform: rotate(45deg); flex: none; }
.sc-b .line { justify-self: start; font-size: 11px; font-weight: 650; padding: 2px 7px; border-radius: 7px; display: inline-flex; gap: 4px; align-items: center; }
.sc-b p { font-size: 12px; color: #CFCDD8; line-height: 1.4; } .sc-b p b { color: #E2D6FF; }
.sc-item { display: grid; grid-template-columns: 30px 1fr; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 12px; background: rgba(0, 0, 0, 0.25); }
.sc-item span { font-size: 12px; color: #CFCDD8; } .sc-item b { color: var(--text); } .sc-item small { display: block; font-size: 11px; color: var(--mute); }
.end { background: rgba(16, 15, 26, 0.74); border: 1px solid var(--line); border-radius: 26px; padding: 24px 40px 26px; min-width: min(380px, 100%); max-width: min(560px, 100%); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3); }
.q-low .end { background: rgba(16, 15, 26, 0.94); backdrop-filter: none; -webkit-backdrop-filter: none; }
.end { padding: 28px 44px 30px; }
.res-kick { color: var(--mute); font-size: 13.5px; font-weight: 600; }
.end.won h2 { color: #B6FFE0; } .end.over h2 { color: #FFC2C2; }
.relic-pick { display: grid; gap: 14px; justify-items: center; text-align: center; } .relic-pick > p { color: var(--mute); }
.relic-row { display: grid; grid-template-columns: repeat(3, minmax(0, 230px)); gap: 14px; }
.relic-card { padding: 22px 16px 20px; border-radius: 20px; background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%), linear-gradient(180deg, rgba(30, 28, 46, 0.95), rgba(16, 15, 26, 0.96)); border: 1px solid color-mix(in srgb, var(--c) 42%, transparent); display: grid; gap: 8px; justify-items: center; transition: transform 0.15s, box-shadow 0.15s; }
.relic-card:hover { transform: translateY(-5px); box-shadow: 0 18px 44px color-mix(in srgb, var(--c) 26%, transparent); }
.relic-ico { display: grid; place-items: center; filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.55)); } .relic-ico svg { display: block; }
.relic-card b { font: 600 18px var(--display); } .relic-card p { color: #CFCDD8; font-size: 13px; }
.pay-opts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.end { text-align: center; display: grid; gap: 14px; justify-items: center; }
.end-sum { display: flex; gap: 8px; align-items: baseline; justify-content: center; flex-wrap: wrap; font-size: 13px; color: var(--mute); margin-top: -6px; }
.end-sum b { color: var(--text); font-weight: 650; } .end-sum i { font-style: normal; } .end-sum small { width: 100%; font-size: 12px; }
.end-post { min-height: 22px; font-size: 14px; color: #CFCDD8; } .end-post b { color: var(--gold); font: 600 16px var(--display); } .end-post .bad { color: #FF9A9A; } .end-post .wait { color: var(--mute); }
.end-post a, .who a, .lb-me a, .lb-empty a, button.link { color: var(--green); font-weight: 700; text-decoration: none; }
button.link { padding: 0; }
.try-endless { font-size: 13px; opacity: 0.85; }   /* (the preview link only) */
/* who's playing (title) */
.home { position: absolute; top: 16px; left: 18px; z-index: 2; color: rgba(236, 234, 242, 0.75); text-decoration: none; font: 600 14px var(--display); letter-spacing: 0.2px; padding: 8px 12px 8px 30px; border-radius: 12px; background: rgba(10, 10, 15, 0.28); border: 1px solid var(--line); pointer-events: auto; }
.home::before { content: ''; position: absolute; left: 12px; top: 50%; width: 8px; height: 8px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.home:hover { color: #fff; }
.noscript { position: fixed; inset: 0; display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px; } .noscript h1 { font: 600 48px var(--display); } .noscript a { color: var(--green); }
.stagecard { position: absolute; left: 0; right: 0; top: calc(34% - 30px); padding: 30px 0; z-index: 4; display: grid; justify-items: center; gap: 4px; text-align: center; background: radial-gradient(ellipse 42% 50% at center, rgba(10, 10, 15, 0.5), rgba(10, 10, 15, 0) 100%); pointer-events: none !important; opacity: 0; transform: translateY(10px) scale(0.98); transition: opacity 0.5s, transform 0.6s cubic-bezier(.2, .9, .3, 1.1); }
.stagecard.in { opacity: 1; transform: none; } .stagecard.out { opacity: 0; transform: translateY(-8px) scale(1.02); }
.stagecard span { font-size: 15px; font-weight: 700; color: #E9E4FF; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7); }
.stagecard b { font: 600 clamp(44px, 7vw, 84px) var(--display); letter-spacing: -1.5px; line-height: 1; color: #fff; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.55), 0 0 60px rgba(160, 139, 255, 0.35); }
.stagecard em { font-style: normal; font-size: 15px; font-weight: 600; color: #F1EEFA; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8); }
.stagecard.boss b { color: #FFD6D6; text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6), 0 0 70px rgba(255, 70, 90, 0.55); } .stagecard.boss span { color: #FF9A9A; }
.stagecard.funded b { color: #DFFFF0; text-shadow: 0 2px 0 #16A06A, 0 4px 0 #0C6F4A, 0 10px 30px rgba(0, 0, 0, 0.55); }
@media (prefers-reduced-motion: reduce) { .stagecard { transition: opacity 0.3s; transform: none !important; } }
.coach { position: absolute; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100vw - 32px)); padding: 10px 18px 10px 40px; border-radius: 14px; background: rgba(46, 229, 157, 0.16); border: 1px solid rgba(46, 229, 157, 0.55); color: #E9FFF5; font-weight: 650; font-size: 14px; text-align: left; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); pointer-events: none !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.coach::before { content: ''; position: absolute; left: 15px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.7); animation: coach-ping 1.6s infinite; }
.coach.in { animation: coach-in 0.35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes coach-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes coach-ping { 0% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(46, 229, 157, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 229, 157, 0); } }
.q-low .coach { background: rgba(14, 40, 30, 0.92); backdrop-filter: none; }
@media (prefers-reduced-motion: reduce) { .coach.in, .coach::before { animation: none; } }
.who { display: flex; align-items: center; gap: 10px; justify-content: center; color: #CFCDD8; font-size: 13.5px; pointer-events: auto; }
.who b { color: var(--text); } .who .av { width: 34px; height: 34px; }
.av { width: 30px; height: 30px; image-rendering: pixelated; border-radius: 9px; background: rgba(255, 255, 255, 0.06); flex: none; }
/* the leaderboard */
.lb-sheet { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; align-items: stretch; }
.lb-sheet > * { flex-shrink: 0; } .lb-sheet > .lb { flex: 1 1 auto; min-height: 0; }   /* (only the list scrolls, however many lines sit above it) */
.lb-sheet h2, .lb-sheet > .ghost { align-self: center; }
.lb-sub { font-size: 13px; margin-top: -8px; }
.lb-tabs { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.lb-tabs button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); font-size: 13px; font-weight: 650; color: #CFCDD8; display: inline-flex; align-items: center; gap: 6px; }
.lb-tabs button.on { background: rgba(255, 255, 255, 0.14); color: #fff; border-color: rgba(255, 255, 255, 0.28); }
.lb-week { text-align: center; font-size: 12.5px; color: var(--mute); margin-top: -4px; } .lb-week b { color: #FFE39A; font-variant-numeric: tabular-nums; }
.lb { list-style: none; overflow: auto; display: grid; gap: 6px; align-content: start; padding-right: 2px; }
.lb li { display: grid; grid-template-columns: 30px 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 14px; background: rgba(255, 255, 255, 0.045); border: 1px solid transparent; }
.lb li:nth-child(1) .rk { color: var(--gold); } .lb li:nth-child(2) .rk { color: #D9DEE8; } .lb li:nth-child(3) .rk { color: #E0A26E; }
.lb li.me { border-color: rgba(46, 229, 157, 0.5); background: rgba(46, 229, 157, 0.08); }
.lb .rk { font: 600 18px var(--display); text-align: center; color: var(--mute); }
.lb .av { width: 34px; height: 34px; }
.lb-who { min-width: 0; } .lb-who b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-who small { color: var(--mute); font-size: 12px; display: flex; align-items: center; gap: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb .sc { font: 600 17px var(--display); color: var(--gold); text-align: right; min-width: 78px; }
.lb-empty { text-align: center; padding: 18px 8px; display: grid; gap: 6px; } .lb-empty b { font: 600 18px var(--display); }
.lb-sample { font-size: 12.5px; color: #FFE39A !important; background: rgba(242, 193, 78, 0.1); border: 1px solid rgba(242, 193, 78, 0.35); border-radius: 10px; padding: 6px 12px; justify-self: center; margin-top: -6px; }
.lb-me { text-align: center; font-size: 13.5px; color: #CFCDD8; } .lb-me b { color: var(--text); }
.end-score span { display: block; color: var(--mute); font-size: 13px; } .end-score b { font: 600 72px var(--display); letter-spacing: -2px; color: var(--gold); } .end-score em { display: block; font-style: normal; color: var(--green); font-weight: 700; }
.end-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.end-stats span { padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); font-size: 12px; color: var(--mute); } .end-stats b { display: block; color: var(--text); font-size: 14px; }
.veil { position: absolute; inset: 0; z-index: 9; pointer-events: none; opacity: 0; transition: opacity 0.6s; }
.veil.on { opacity: 1; }
.screen-flash { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.bell-pulse { position: absolute; inset: 0; z-index: 4; pointer-events: none; box-shadow: inset 0 0 120px rgba(255, 60, 60, 0.55); animation: bell 1s ease-out 2; }
@keyframes bell { 0% { opacity: 0; } 30% { opacity: 1; } 100% { opacity: 0; } }
.eclipse { position: absolute; inset: 0; z-index: 4; pointer-events: none; background: radial-gradient(ellipse at center, rgba(10, 6, 20, 0.15), rgba(10, 6, 20, 0.75)); animation: ecl var(--d, 3s) ease-in-out forwards; }
@keyframes ecl { 0% { opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
.loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 10; background: radial-gradient(ellipse at 50% 46%, #14102A, #0A0A0F 62%); transition: opacity 0.5s; font: 600 22px var(--display); color: #CFC7FF; overflow: hidden; }
.loading.done { opacity: 0; pointer-events: none; }
/* INFINITE's loading screen (loader.js): the grains on the canvas, then the crisp word over them, then it lifts away */
.ld-cv { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.55s ease-in 0.08s; }
.ld-word { position: relative; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 0 16px; transition: transform 0.42s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.42s, filter 0.42s; }
.ld-word small { font-size: 13px; font-weight: 650; color: #E4DEFF; letter-spacing: 0.3em; opacity: 0; transition: opacity 0.7s ease-out 0.1s, letter-spacing 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s; }
.ld-word b { font: 600 clamp(60px, 9.6vw, 118px)/0.9 var(--display); letter-spacing: -0.025em; color: #F6F5FA; opacity: 0; transition: opacity 0.42s ease-out; text-shadow: 0 0 28px rgba(160, 139, 255, 0.35); }
.ld-line { position: relative; width: min(200px, 46vw); height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; opacity: 0; transition: opacity 0.4s; }
.ld-line::after { content: ''; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; background: linear-gradient(90deg, transparent, #A08BFF, #2EE59D, transparent); animation: ldRun 1.25s ease-in-out infinite; }
@keyframes ldRun { to { left: 100%; } }
.loading.word .ld-cv { opacity: 0; }
.loading.word .ld-word b { opacity: 1; } .loading.word .ld-word small { opacity: 1; letter-spacing: 0.02em; }
.loading.wait .ld-line { opacity: 1; }
.loading.out { pointer-events: none; } .loading.out .ld-word { transform: scale(1.06); opacity: 0; filter: blur(8px); }
.loading.still .ld-word b, .loading.still .ld-word small { transition: opacity 0.6s ease-out; }

/* smaller computers: the classes two by two */
@media (max-width: 1240px) { .cx-row, .start-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .cx-row, .start-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the unit card's Magnet button */
.unmag { width: 100%; margin-top: 10px; display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 12px; background: rgba(92, 168, 255, 0.12); border: 1px solid rgba(92, 168, 255, 0.35); color: #CFE6FF; font-weight: 700; font-size: 13px; text-align: left; }
.unmag small { display: block; font-size: 11px; font-weight: 600; color: var(--mute); } .unmag:hover { background: rgba(92, 168, 255, 0.2); } .unmag svg { flex: none; }
/* the item recipes: a 6×6 grid (rows and columns are the components), the picked one's details beside it */
.ig-sheet { max-width: 780px; }
.ig { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; margin: 6px 0 16px; }
.ig-grid { display: grid; grid-template-columns: repeat(7, 42px); gap: 4px; }
.ig-c { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.04); transition: transform 0.12s, box-shadow 0.12s; }
.ig-c.ig-h, .ig-c.ig-0 { background: none; } .ig-c.ig-h svg { opacity: 0.9; }
.ig-c.can { background: rgba(242, 193, 78, 0.14); box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.45); }
.ig-c.on { box-shadow: 0 0 0 2px var(--gold); transform: scale(1.08); } .ig-c:hover { transform: scale(1.06); }
.ig-d { display: grid; gap: 9px; align-content: start; min-height: 240px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.04); }
.ig-top { display: flex; gap: 12px; align-items: center; } .ig-top b { font: 600 20px var(--display); display: block; } .ig-top small { color: var(--mute); font-size: 12px; }
.ig-d p { font-size: 13px; color: #DAD8E4; line-height: 1.45; }
.ig-makes { display: flex; gap: 5px; flex-wrap: wrap; } .ig-makes button { border-radius: 9px; transition: transform 0.12s; } .ig-makes button:hover { transform: translateY(-2px); }
.ig-from { display: flex; align-items: center; gap: 6px; font-size: 12.5px; flex-wrap: wrap; } .ig-from i { font-style: normal; color: var(--mute); } .ig-from span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ig-sheet .cta { justify-self: center; }
/* graphics, in the menu */
.gfx { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--mute); flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: rgba(255, 255, 255, 0.06); }
.seg button { padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: 12.5px; color: var(--mute); } .seg button.on { background: rgba(255, 255, 255, 0.14); color: var(--text); }
.gfx small { font-size: 11.5px; min-width: 110px; }

/* the fight's big words: FIGHT!, VICTORY, K.O. (a stamp in the middle), First Blood and streaks (a slanted banner up
   top), and cut-ins (a band across the lower screen with who and what). Above the HUD, under cards and screens. */
.stamp, .announce, .cutin { position: fixed; z-index: 5; pointer-events: none; }
.stamp { left: 50%; top: 40%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 6px; }
.stamp b { font: 600 clamp(58px, 10vw, 128px)/0.9 var(--display); letter-spacing: -0.02em; font-style: italic; color: #fff; text-shadow: 0 6px 0 rgba(10, 8, 18, 0.6), 0 0 44px rgba(10, 8, 18, 0.4); animation: stamp-in 1.45s cubic-bezier(.2, 1.3, .3, 1) both; white-space: nowrap; }
.stamp span { font-weight: 700; font-size: 13px; letter-spacing: 0.03em; color: #ECEAF2; text-shadow: 0 1px 3px #000; animation: stamp-sub 1.45s ease both; }
.stamp.st-go b { color: #FFE27A; } .stamp.st-win b { color: var(--gold); } .stamp.st-lose b { color: #FF5A6B; }
@keyframes stamp-in { 0% { transform: scale(2.6) rotate(-9deg); opacity: 0; } 13% { transform: scale(0.94) rotate(-4deg); opacity: 1; } 21% { transform: scale(1.04) rotate(-4deg); } 28%, 76% { transform: scale(1) rotate(-4deg); opacity: 1; } 100% { transform: scale(1.16) rotate(-4deg); opacity: 0; } }
@keyframes stamp-sub { 0%, 14% { opacity: 0; transform: translateY(6px); } 26%, 76% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.announce { left: 50%; top: 23vh; display: grid; justify-items: center; animation: ann 1.75s ease both; }
.announce b { font: 600 clamp(28px, 4.4vw, 50px)/1 var(--display); font-style: italic; letter-spacing: -0.01em; padding: 7px 24px 9px; background: var(--c); color: #0A0A0F; transform: skewX(-12deg); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(10, 8, 18, 0.85); white-space: nowrap; }
.announce span { margin-top: 8px; font-weight: 700; font-size: 12.5px; color: #ECEAF2; text-shadow: 0 1px 3px #000; }
@keyframes ann { 0% { opacity: 0; transform: translateX(-50%) scale(1.7); } 11% { opacity: 1; transform: translateX(-50%) scale(0.95); } 18%, 80% { opacity: 1; transform: translateX(-50%) scale(1); } 100% { opacity: 0; transform: translateX(-50%) translateY(-12px) scale(1); } }
.cutin { inset: 0; overflow: hidden; }
.ci-band { position: absolute; left: -12%; right: -12%; top: 63%; height: 128px; transform: translateY(-50%) rotate(-6deg); background: rgba(10, 8, 18, 0.9); border-top: 3px solid var(--c); border-bottom: 3px solid var(--c); animation: ci-band 1.4s cubic-bezier(.2, .9, .2, 1) both; }
.cutin.boss .ci-band { transform: translateY(-50%) rotate(6deg); animation-name: ci-band-r; }
.ci-in { height: 100%; display: flex; align-items: center; justify-content: center; gap: 20px; animation: ci-in 1.4s cubic-bezier(.2, .9, .2, 1) both; }
.cutin.boss .ci-in { flex-direction: row-reverse; animation-name: ci-in-r; }
.ci-in img { height: 150px; margin-top: -28px; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.6)); }
.ci-mark { color: var(--c); display: grid; place-items: center; width: 92px; height: 92px; border-radius: 22px; background: rgba(255, 77, 109, 0.12); }
.ci-t span { display: block; font-weight: 700; font-size: 13px; color: var(--c); letter-spacing: 0.02em; }
.ci-t b { display: block; font: 600 clamp(30px, 5vw, 58px)/1 var(--display); color: #fff; font-style: italic; letter-spacing: -0.01em; }
@keyframes ci-band { 0% { clip-path: inset(0 100% 0 0); } 16%, 82% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 100%); opacity: 0.6; } }
@keyframes ci-band-r { 0% { clip-path: inset(0 0 0 100%); } 16%, 82% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 100% 0 0); opacity: 0.6; } }
@keyframes ci-in { 0% { transform: translateX(-90px); } 18% { transform: translateX(0); } 82% { transform: translateX(16px); } 100% { transform: translateX(60px); } }
@keyframes ci-in-r { 0% { transform: translateX(90px); } 18% { transform: translateX(0); } 82% { transform: translateX(-16px); } 100% { transform: translateX(-60px); } }
@media (prefers-reduced-motion: reduce) {
  .stamp b, .stamp span, .announce, .ci-band, .ci-in { animation: calm 1.4s ease both !important; }
  .announce { transform: translateX(-50%); } .ci-band { transform: translateY(-50%); }
}
@keyframes calm { 0% { opacity: 0; } 15%, 80% { opacity: 1; } 100% { opacity: 0; } }
@media (hover: none) { .keys-li { display: none !important; } }   /* (no keyboard to speak of) */

/* phones */
@media (max-width: 760px) {
  .title { padding-top: 34px; } .home { top: 10px; left: 10px; font-size: 13px; padding: 6px 10px 6px 26px; } .home::before { left: 10px; }
  .lb li { grid-template-columns: 24px 30px minmax(0, 1fr) auto; padding: 8px 10px; gap: 8px; } .lb .sc { font-size: 15px; min-width: 0; }
  /* the top: the rounds and the buttons, then the synergy pill and the damage meter's icons (Hit, Nov 8: no account box
     on a phone; a tap on the rounds shows it for a moment) */
  .hud .top { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "st st tools" "pill pill pill"; gap: 6px; top: calc(8px + env(safe-area-inset-top, 0px)); left: calc(8px + env(safe-area-inset-left, 0px)); right: calc(8px + env(safe-area-inset-right, 0px)); }
  .stages { justify-self: start; gap: 8px; padding: 5px 8px 5px 10px; border-radius: 13px; } .st-k b { font-size: 15px; } .st-k span { display: none; }
  .st-row { gap: 3px; } .rd { width: 18px; height: 21px; } .rd svg { width: 11px; height: 11px; } .rd.boss { width: 25px; height: 25px; border-radius: 8px; } .rd.boss svg { width: 14px; height: 14px; } .rd.gem { width: 10px; } .rd.gem svg { width: 9px; height: 9px; }
  .traits.open ~ .coach { display: none !important; }
  .tools { gap: 5px; } .relics { display: none; } .ibtn { width: 34px; height: 34px; border-radius: 11px; } .ibtn svg { width: 16px; height: 16px; }
  .acct { padding: 6px 11px 6px; border-radius: 13px; display: none; } .ac-1 b { font-size: 16.5px; } .ac-1 small { font-size: 11px; } .ac-k { font-size: 10.5px; } .ac-2 { font-size: 10.5px; gap: 8px; }
  .hud.ac-open .acct { display: grid; position: fixed; z-index: 5; top: calc(var(--top, 96px) + 8px); left: calc(8px + env(safe-area-inset-left, 0px)); animation: acPeek 0.22s ease-out; }
  .stages { cursor: pointer; }
  .traits-pill { display: block; align-self: center; justify-self: start; }
  .traits { display: none; top: calc(var(--top) + 8px); left: 8px; width: min(250px, 72vw); max-height: calc(100dvh - var(--top) - 260px); } .traits.open { display: grid; }
  .tip { width: min(300px, calc(100vw - 16px)); }
  .bottom { bottom: calc(6px + env(safe-area-inset-bottom, 0px)); gap: 5px; }
  .items { position: static; transform: none; display: flex; align-items: center; gap: 6px; padding: 5px 7px; max-width: calc(100% - 12px); pointer-events: auto; border-radius: 13px; }
  .it-h { display: none; } .it-grid { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; } .it { width: 36px; height: 36px; flex: none; border-radius: 9px; } .it svg { width: 30px; height: 30px; }
  .it.book small { display: none; } .it.book svg { width: 20px; height: 20px; } .it.mag em { right: -2px; bottom: -2px; min-width: 16px; height: 16px; font-size: 10px; line-height: 16px; }
  .ig { grid-template-columns: minmax(0, 1fr); justify-items: center; } .ig-grid { grid-template-columns: repeat(7, minmax(0, 40px)); gap: 3px; } .ig-c { width: 100%; max-width: 40px; height: 40px; } .ig-c svg { width: 30px; height: 30px; } .ig-d { width: 100%; min-height: 0; }
  .ci-band { height: 100px; } .ci-in img { height: 112px; margin-top: -20px; } .ci-mark { width: 70px; height: 70px; } .stamp { top: 36%; }
  .shop { flex-wrap: wrap; gap: 6px; padding: 7px; max-width: calc(100% - 12px); }
  .wallet { width: 100%; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; }
  .gold b { font-size: 21px; } .gold small { display: none; } .btns { grid-template-columns: auto auto 34px; } .btns button { flex-direction: row; gap: 4px; padding: 7px 8px; }
  /* five cards side by side, no scrolling */
  .cards { width: 100%; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; }
  .card { width: auto; min-width: 0; border-radius: 12px; } .card-in { grid-template-rows: 58px auto; border-radius: 10px; } .card img { height: 58px; }
  /* (Hit, Nov 8: a phone's card shows the unit's classes, not its name, running like a ticker when they don't fit; the
     name is in its info, a long press) */
  .card-meta { padding: 4px 5px 5px; } .card-meta b { display: none; } .card-meta small { font-size: 10px; gap: 4px; color: #C9C7D6; } .card-meta small i { width: 6px; height: 6px; }
  .cost { right: 4px; top: 4px; font-size: 11px; padding: 1px 5px; border-radius: 6px; } .have { left: 4px; top: 4px; font-size: 10px; padding: 1px 4px; border-radius: 6px; }
  .fight { width: 100%; height: 46px; flex-direction: row; gap: 10px; } .fight span { font-size: 20px; }
  .cx-row, .start-row { grid-template-columns: minmax(0, 1fr); }
  .cx { grid-template-columns: 92px minmax(0, 1fr); gap: 10px; } .cx-art img { height: 96px; } .cx b { font-size: 18px; }
  .start-card { grid-template-columns: 96px minmax(0, 1fr); } .sc-art img { height: 104px; } .sc-item { grid-column: 1 / -1; } .sc-b > b { font-size: 17px; }
  .relic-row { grid-template-columns: 1fr; } .relic-card { grid-template-columns: auto 1fr; justify-items: start; text-align: left; padding: 14px; gap: 2px 14px; } .relic-ico { grid-row: span 2; } .relic-ico svg { width: 64px; height: 64px; }
  .end-score b { font-size: 54px; }
  .end { padding: 20px 18px 22px; }
  .how li { font-size: 13.5px; } .sheet { padding: 20px 16px; }
  .speed { width: 100%; height: 46px; padding: 5px; grid-template-columns: auto 1fr 1fr; align-items: center; gap: 6px; } .speed small { grid-column: auto; padding: 0 6px; }
  .speed button { padding: 8px 0; height: 100%; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .hud .top { top: calc(6px + env(safe-area-inset-top, 0px)); grid-template-areas: "pill st tools"; } .acct { padding: 5px 10px; display: none; } .ac-1 b { font-size: 16px; } .ac-2 { font-size: 10.5px; }
  .hud.ac-open .acct { display: grid; position: fixed; z-index: 5; top: calc(var(--top, 96px) + 6px); left: calc(8px + env(safe-area-inset-left, 0px)); animation: acPeek 0.22s ease-out; }
  .stages { cursor: pointer; }
  .traits-pill { display: block; align-self: center; justify-self: start; }
  .traits { display: none; top: calc(var(--top) + 6px); left: 8px; width: 240px; max-height: calc(100% - var(--top) - 100px); } .traits.open { display: grid; }
  .card-in { grid-template-rows: 48px auto; } .card img { height: 48px; } .card { width: 84px; flex-basis: 84px; min-width: 66px; } .card-meta { padding: 3px 6px 5px; } .card-meta b { display: none; } .card-meta small { font-size: 10px; gap: 4px; color: #C9C7D6; } .card-meta small i { width: 6px; height: 6px; }
  .wallet { width: 178px; gap: 5px; grid-template-columns: auto 1fr; align-items: center; } .wallet .btns { grid-column: 1 / -1; } .gold b { font-size: 20px; } .gold i { width: 16px; height: 16px; } .gold small { display: none; } .lvl span { font-size: 10.5px; } .xp { margin-top: 3px; }
  .btns button { flex-direction: row; gap: 4px; justify-content: center; padding: 4px; font-size: 11px; } .fight { width: 86px; } .fight span { font-size: 18px; } .fight small { display: none; }
  .speed { width: 86px; grid-template-columns: 1fr; gap: 4px; padding: 5px; } .speed small { display: none; } .speed button { padding: 6px 0; }
  .items { top: 56%; } .it-grid { grid-template-columns: repeat(2, 36px); } .it { width: 36px; height: 36px; } .it svg { width: 30px; height: 30px; }
  .bottom { bottom: calc(4px + env(safe-area-inset-bottom, 0px)); } .shop { padding: 6px; }
}

/* ── Endless (To the Moon) ── */
/* the summit's choice: cash out, or go on to the moon */
.summit { display: grid; gap: 14px; justify-items: center; text-align: center; max-width: min(760px, calc(100vw - 32px)); }
.summit h2 { color: #FFE39A; }
.summit .sub { color: #CFCDD8; font-size: 15px; } .summit .sub b { color: var(--text); }
.sm-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 14px; width: 100%; }
.sm-card { padding: 22px 20px; border-radius: 22px; display: grid; gap: 8px; align-content: start; justify-items: start; text-align: left; border: 1px solid var(--line); transition: transform 0.15s, box-shadow 0.15s; }
.sm-card:hover { transform: translateY(-4px); }
.sm-k { font-size: 12.5px; font-weight: 700; color: var(--mute); letter-spacing: 0.02em; }
.sm-card > b { font: 600 30px var(--display); letter-spacing: -0.6px; }
.sm-card p { color: #CFCDD8; font-size: 13.5px; }
.sm-card ul { display: grid; gap: 6px; padding-left: 18px; color: #DCDAE8; font-size: 13.5px; text-align: left; }
.sm-card.cash { background: linear-gradient(180deg, rgba(36, 34, 52, 0.95), rgba(16, 15, 26, 0.96)); }
.sm-card.cash > b { color: var(--gold); }
.sm-card.moon { background: radial-gradient(ellipse at 80% 0%, rgba(46, 229, 157, 0.22), transparent 60%), radial-gradient(ellipse at 10% 100%, rgba(127, 77, 255, 0.28), transparent 60%), linear-gradient(180deg, #11142a, #080a16); border-color: rgba(46, 229, 157, 0.45); box-shadow: 0 0 40px rgba(46, 229, 157, 0.12); }
.sm-card.moon > b { color: #B6FFE0; }
.sm-card.moon:hover { box-shadow: 0 16px 50px rgba(46, 229, 157, 0.28); }
/* the Broker: his picture, your gold, the deals */
.broker { display: grid; gap: 14px; justify-items: center; max-width: min(820px, calc(100vw - 32px)); }
.bk-head { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: center; text-align: left; }
.bk-head img { width: 120px; height: 120px; object-fit: cover; border-radius: 22px; background: radial-gradient(circle at 50% 45%, rgba(242, 193, 78, 0.35), rgba(16, 15, 26, 0.9) 70%); border: 1px solid rgba(242, 193, 78, 0.4); }
.bk-head h2 { text-align: left; } .bk-head p { color: #CFCDD8; font-size: 14px; }
.bk-gold { display: flex; gap: 8px; align-items: center; } .bk-gold i { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFE39A, #F2C14E 55%, #B8862A); box-shadow: 0 0 12px rgba(242, 193, 78, 0.5); }
.bk-gold b { font: 600 26px var(--display); } .bk-gold span { color: var(--mute); font-size: 13px; }
.bk-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; width: 100%; }
.deal { position: relative; padding: 18px 14px 16px; border-radius: 18px; display: grid; gap: 6px; justify-items: center; text-align: center; background: linear-gradient(180deg, rgba(34, 32, 52, 0.95), rgba(16, 15, 26, 0.96)); border: 1px solid var(--line); transition: transform 0.15s, box-shadow 0.15s; }
.deal:hover:not(:disabled) { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4); }
.deal.dk-relic { border-color: rgba(185, 131, 255, 0.5); background: radial-gradient(ellipse at 50% 0%, rgba(185, 131, 255, 0.25), transparent 70%), linear-gradient(180deg, rgba(34, 30, 56, 0.95), rgba(16, 15, 26, 0.96)); }
.deal .dl-pic { height: 66px; display: grid; place-items: center; } .deal .dl-pic img { width: 66px; height: 66px; object-fit: cover; border-radius: 14px; }
.deal b { font: 600 16px var(--display); } .deal small { font-size: 12px; color: #BDBBCB; line-height: 1.35; }
.deal em { font: 600 15px var(--display); font-style: normal; color: var(--gold); margin-top: 2px; }
.deal.poor { opacity: 0.55; } .deal.sold { opacity: 0.45; } .deal.sold em { color: var(--green); }
.bk-xp { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; font: 600 18px var(--display); font-style: normal; color: #052417; background: radial-gradient(circle at 35% 30%, #9BFFD6, #2EE59D 60%, #129466); }
/* greater relics: a cosmic violet, set apart from the rest */
.relic-pick.greater h2 { color: #E2CCFF; }
.relic-card.greater { box-shadow: 0 0 34px rgba(185, 131, 255, 0.18); }
.mr.greater b { color: #E2CCFF; }
/* the stage tracker and title card in Endless (To the Moon) */
.st-k.endless b { color: #9BFFD6; }
.stagecard.endless b { background: linear-gradient(90deg, #9BFFD6, #C9B8FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* an elite's modifier on its card */
.ab.elite { border-left: 3px solid var(--c); padding-left: 9px; } .ab.elite b { color: var(--c); }
.menu-sheet .cash { border-color: rgba(242, 193, 78, 0.5); color: #FFE39A; }
.end.moon h2 { background: linear-gradient(90deg, #9BFFD6, #C9B8FF); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Mr. Market's moods wash the screen for a moment */
.mood { position: absolute; inset: 0; z-index: 4; pointer-events: none; animation: mood var(--d, 1.4s) ease-out forwards; }
.mood.euphoria { box-shadow: inset 0 0 160px rgba(46, 229, 157, 0.45); }
.mood.panic { box-shadow: inset 0 0 180px rgba(255, 60, 80, 0.6); }
.mood.halt { box-shadow: inset 0 0 0 6px rgba(255, 77, 94, 0.75), inset 0 0 120px rgba(255, 77, 94, 0.35); animation-name: halt; }
@keyframes mood { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes halt { 0%, 100% { opacity: 0; } 10%, 30%, 50%, 70% { opacity: 1; } 20%, 40%, 60% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) { .mood, .mood.halt { animation: none; opacity: 0.6; } }
@media (max-width: 760px) {
  .sm-row { grid-template-columns: minmax(0, 1fr); } .sm-card { padding: 16px; } .sm-card > b { font-size: 24px; }
  .bk-head { grid-template-columns: 76px 1fr; } .bk-head img { width: 76px; height: 76px; border-radius: 16px; }
  .bk-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .deal { padding: 12px 10px; } .deal .dl-pic { height: 50px; } .deal .dl-pic img { width: 50px; height: 50px; } .deal small { display: none; }
}

/* ── the damage meter (Hit, Nov 8: the sword shows damage dealt, the shield damage taken; it closes into those two icons).
   A computer: top right, above the items; open, one glass panel with the icons in its top right corner. ── */
.meter { position: fixed; right: calc(14px + env(safe-area-inset-right, 0px)); top: calc(var(--top, 96px) + 12px); z-index: 3; pointer-events: auto; display: grid; justify-items: end; align-items: start; }
.meter[hidden] { display: none; }
.meter > * { grid-area: 1 / 1; }
.mt-panel { width: 214px; padding: 9px 9px 8px; border-radius: 16px; display: grid; gap: 7px; cursor: pointer; }
.mt-t { display: flex; align-items: center; height: 30px; padding: 0 2px 0 4px; font-size: 12.5px; font-weight: 700; color: var(--text); letter-spacing: 0.01em; }
.mt-pill { position: relative; z-index: 1; margin: 9px 9px 0 0; padding: 0; border-radius: 10px; }
.meter:not(.min) .mt-pill { background: none; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.meter.min .mt-panel { display: none; }
.meter.min .mt-pill { margin: 0; padding: 3px; border-radius: 13px; }
.mt-tabs { display: flex; gap: 3px; padding: 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.05); }
.meter.min .mt-tabs { background: none; padding: 0; gap: 2px; }
.mt-tabs button { width: 30px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: var(--mute); transition: background 0.15s, color 0.15s; }
@media (hover: hover) { .mt-tabs button:hover { color: var(--text); background: rgba(255, 255, 255, 0.08); } }
.mt-tabs button.on { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.meter.min .mt-tabs button.on { background: none; }
.mt-tabs button[data-mt="dealt"].on { color: #FFD27A; } .mt-tabs button[data-mt="taken"].on { color: #8FC6FF; }
.mt-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: min(330px, calc(100dvh - var(--top, 96px) - 300px)); overflow: hidden auto; scrollbar-width: none; }
.mt-rows li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 3px 7px 6px 3px; border-radius: 9px; background: rgba(255, 255, 255, 0.035); }
.mt-rows img { width: 26px; height: 26px; object-fit: cover; object-position: 50% 18%; border-radius: 7px; background: color-mix(in srgb, var(--c) 22%, transparent); }
.mt-n { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mt-n i { font-style: normal; color: var(--gold); font-size: 10px; }
.mt-v { font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums; }
.mt-bar { position: absolute; left: 36px; right: 7px; bottom: 3px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.mt-bar i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, #fff 0%), var(--c)); border-radius: 3px; transition: transform 0.18s ease-out; }
.mt-rows li.fell { opacity: 0.55; } .mt-rows li.fell .mt-n { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.35); }

/* ── what a fight did, for a moment at the top (in place of the popup: nothing to click) ── */
.result-note { position: fixed; left: 50%; top: calc(var(--top, 96px) + 14px); transform: translate(-50%, -8px); z-index: 4; display: grid; justify-items: center; gap: 2px; padding: 9px 18px 10px; border-radius: 16px; pointer-events: none; opacity: 0; transition: opacity 0.25s, transform 0.25s; text-align: center; min-width: 180px; }
.result-note.in { opacity: 1; transform: translate(-50%, 0); }
.result-note .rn-h { font-family: var(--display); font-size: 21px; font-weight: 650; letter-spacing: 0.01em; }
.result-note .rn-m { font-size: 13px; color: var(--mute); display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.result-note .rn-m b { color: var(--text); font-weight: 700; } .result-note .up { color: var(--green); } .result-note .pay { color: var(--gold); }
.result-note.lost .rn-h { color: #FF8A8A; } .result-note.won .rn-h { color: var(--text); }

/* ── Recenter: when the map has been dragged or zoomed ── */
.recenter { position: fixed; left: 50%; bottom: calc(var(--bot, 220px) + 10px); transform: translateX(-50%); z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px 7px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; pointer-events: auto; }
.recenter[hidden] { display: none; }
.recenter svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
  /* the meter (Hit, Nov 8): closed into its two icons, side by side, right after the synergy pill (the game lines it
     up); a tap drops the list down under them, another tap closes it */
  .meter { right: auto; left: calc(8px + env(safe-area-inset-left, 0px)); top: calc(var(--top, 96px) + 8px); gap: 6px; justify-items: start; }
  .meter > .mt-pill { grid-area: 1 / 1; } .meter > .mt-panel { grid-area: 2 / 1; }
  .mt-pill, .meter:not(.min) .mt-pill, .meter.min .mt-pill { margin: 0; padding: 2px; border-radius: 12px; background: var(--glass); border-color: var(--line); box-shadow: 0 10px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
  .q-low .meter .mt-pill { background: rgba(18, 17, 28, 0.88); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mt-tabs, .meter.min .mt-tabs { flex-direction: row; background: none; padding: 0; gap: 2px; }
  .mt-tabs button { width: 30px; height: 26px; border-radius: 9px; } .mt-tabs svg { width: 16px; height: 16px; }
  .mt-panel { width: 188px; padding: 6px 6px 5px; gap: 5px; border-radius: 13px; }
  .mt-t { height: auto; padding: 1px 2px 0 4px; font-size: 11.5px; }
  .mt-rows { gap: 3px; max-height: min(176px, calc(100dvh - var(--top, 96px) - 330px)); } .mt-rows li { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 5px; padding: 2px 5px 5px 2px; }
  .mt-rows img { width: 20px; height: 20px; border-radius: 6px; } .mt-n { font-size: 10.5px; } .mt-v { font-size: 11px; } .mt-bar { left: 27px; }
  .hud.mt-open .coach { display: none !important; }
  .result-note { top: calc(var(--top, 96px) + 8px); padding: 7px 14px 8px; } .result-note .rn-h { font-size: 18px; } .result-note .rn-m { font-size: 12px; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .meter { right: auto; left: calc(8px + env(safe-area-inset-left, 0px)); top: calc(var(--top, 96px) + 6px); gap: 6px; justify-items: start; }
  .meter > .mt-pill { grid-area: 1 / 1; } .meter > .mt-panel { grid-area: 2 / 1; }
  .mt-pill, .meter:not(.min) .mt-pill, .meter.min .mt-pill { margin: 0; padding: 2px; border-radius: 12px; background: var(--glass); border-color: var(--line); box-shadow: 0 10px 36px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); }
  .q-low .meter .mt-pill { background: rgba(18, 17, 28, 0.88); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .mt-tabs, .meter.min .mt-tabs { flex-direction: row; background: none; padding: 0; gap: 2px; }
  .mt-tabs button { width: 30px; height: 26px; border-radius: 9px; } .mt-tabs svg { width: 16px; height: 16px; }
  .mt-panel { width: 188px; padding: 6px 6px 5px; gap: 5px; border-radius: 13px; }
  .mt-t { height: auto; padding: 1px 2px 0 4px; font-size: 11.5px; }
  .mt-rows { gap: 3px; max-height: min(120px, calc(100dvh - var(--top, 96px) - 150px)); }   /* (clear of the shop) */ .mt-rows li { grid-template-columns: 20px minmax(0, 1fr) auto; gap: 5px; padding: 2px 5px 5px 2px; }
  .mt-rows img { width: 20px; height: 20px; border-radius: 6px; } .mt-n { font-size: 10.5px; } .mt-v { font-size: 11px; } .mt-bar { left: 27px; }
  .hud.mt-open .coach { display: none !important; }
}
@keyframes acPeek { from { opacity: 0; transform: translateY(-6px) scale(0.97); } }
