:root {
  --bg: #0b0a0f; --panel: #14121a; --panel2: #1b1822; --panel3: #231f2c; --line: #2b2634; --line2: #3d3549;
  --text: #e9dfcd; --dim: #a39a88; --dimmer: #6b6458; --ember: #ff8a2a; --hot: #ffd27a; --good: #7dff8a; --bad: #ff5a4a; --warn: #ffcf4a;
  --cr: #ff5a48; --cb: #5aa8ff; --cg: #6fdc6a; --cn: #c9c2b4;
  --serif: "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
:root { color-scheme: dark; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font: 13px/1.4 var(--sans); overflow: hidden; user-select: none; -webkit-user-select: none; }
button { font: inherit; color: var(--text); background: var(--panel3); border: 1px solid var(--line2); border-radius: 3px; padding: 5px 11px; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--ember); background: #2c2636; }
button:active:not(:disabled) { transform: translateY(1px); }
button:disabled { opacity: .42; cursor: default; }
/* greyed out like a disabled button, but it still takes a click and a hover, to say why it will not go */
button.off, button.big.off:hover:not(:disabled) { opacity: .42; cursor: default; } button.big.off:hover:not(:disabled) { background: linear-gradient(#b4521a, #7c3210); }
button:focus-visible, textarea:focus-visible { outline: 2px solid var(--hot); outline-offset: 1px; }
button.small { padding: 2px 8px; font-size: 12px; }
button.big { padding: 8px 20px; font-size: 15px; background: linear-gradient(#b4521a, #7c3210); border-color: #ff9a4a; color: #fff3df; font-family: var(--serif); letter-spacing: .03em; }
button.big:hover:not(:disabled) { background: linear-gradient(#cf6222, #8f3a12); }
button.danger { border-color: #7a2a2a; color: #ffb0a8; }
button.icon { padding: 5px 9px; } button.icon.off { opacity: .4; text-decoration: line-through; }
.hidden { display: none !important; }
.dim { color: var(--dim); } .hot { color: var(--hot); } .good { color: var(--good); } .bad { color: var(--bad); }
.t-r { color: var(--cr); } .t-b { color: var(--cb); } .t-g { color: var(--cg); }
img { image-rendering: pixelated; }
h4 { margin: 0; font: 600 15px var(--serif); letter-spacing: .04em; color: var(--hot); }

#app { height: 100%; display: grid; grid-template-rows: 50px 1fr; min-width: 1240px; }

/* ---------------------------------------------------------------- top */
#top { display: flex; align-items: center; gap: 26px; padding: 0 16px; background: linear-gradient(#1a1721, #121017); border-bottom: 1px solid var(--line); }
.brand { font: 700 21px var(--serif); font-variant: small-caps; letter-spacing: .08em; color: var(--hot); text-shadow: 0 0 14px rgba(255,138,42,.55); white-space: nowrap; }
.brand i { font-style: normal; color: var(--ember); font-size: 15px; }
.purse { display: flex; gap: 26px; }
.cur { display: flex; align-items: center; gap: 7px; font: 700 19px var(--serif); font-variant-numeric: tabular-nums; }
.cur i, .ci { width: 14px; height: 14px; display: inline-block; flex: none; }
.ci { width: 10px; height: 10px; vertical-align: -1px; margin-right: 3px; }
.cur.gold i, .ci.gold { border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #e0a020 60%, #8a5a08); }
.cur.dust i, .ci.dust { border-radius: 50% 50% 50% 0; background: radial-gradient(circle at 40% 40%, #ffe07a, #ff6a1a); transform: rotate(-45deg); }
.cur.core i, .ci.core { background: radial-gradient(circle at 35% 30%, #f4e8ff, #a86bff 55%, #4a2a9a); transform: rotate(45deg); border-radius: 2px; }
.cur b { display: inline-block; } .cur.bump b { animation: bump .35s; }
@keyframes bump { 30% { color: #fff; transform: scale(1.25); } }
.ctl { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.seg { display: inline-flex; } .seg button { border-radius: 0; margin-left: -1px; padding: 2px 8px; font-size: 12px; }
.seg button:first-child { border-radius: 3px 0 0 3px; } .seg button:last-child { border-radius: 0 3px 3px 0; }
.seg button.on, .toggle.on { background: linear-gradient(#b4521a, #7c3210); border-color: #ff9a4a; color: #fff; z-index: 1; position: relative; }
.toggle { font-weight: 700; letter-spacing: .04em; padding: 5px 12px; white-space: nowrap; }
.toggle.on { box-shadow: 0 0 12px rgba(255,138,42,.5); }
.toggle.nudge { animation: nudge 1.2s infinite; }
@keyframes nudge { 50% { border-color: var(--hot); box-shadow: 0 0 14px rgba(255,210,122,.7); } }

/* --------------------------------------------------------------- main */
#main { display: grid; grid-template-columns: minmax(352px, 28%) minmax(0, 1fr) minmax(345px, 28%); gap: 10px; padding: 10px 16px; min-height: 0; width: 100%; max-width: 1760px; margin-inline: auto; }
.pane { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; min-height: 0; }
#line { overflow: hidden; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
/* the weapons scroll by themselves: the cursor's card and the heading above them stay where they are */
#line .posts { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin: 0 -6px -6px; padding: 2px 6px 6px; }
#line > .card, #line > .linehead { flex: none; }
/* the weapons on the line are what you look at most, and there are six at the most: they are drawn large */
#line .card.post, #line .card.empty { padding: 12px 13px; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 13px; }
#line .card.post .pic, #line .card.empty .pic { width: 76px; height: 76px; } #line .card.post .pic img { width: 70px; height: 70px; }
#line .card.post .who, #line .card.empty .who { flex-wrap: wrap; row-gap: 2px; padding-right: 34px; }
#line .card.post .who > b, #line .card.empty .who > b { font-size: 19px; }
#line .card.post .who .rank { font-size: 15px; }
#line .card.post .who .dps { font-size: 14.5px; margin-left: 0; flex-basis: 100%; } #line .card.post .who .dps b { font-size: 16.5px; }
#line .card.post .who .x { position: absolute; top: 10px; right: 11px; padding: 3px 10px; font-size: 14px; }
#line .card.post .stats, #line .card.empty .stats { font-size: 14px; white-space: normal; }
#line .card.post .statlist, #line .card.empty .statlist { font-size: 13.5px; line-height: 1.55; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
#line .card.post .chips { gap: 6px; } #line .card.post .chip { font-size: 14px; padding: 3px 12px; border-radius: 12px; }
#line .card.post .uprow, #line .card.empty .uprow { min-height: 34px; gap: 12px; margin-top: 4px; }
#line .card.post .upbar { height: 10px; border-radius: 5px; } #line .card.post .upn { font-size: 14px; }
#line .card.post .uprank { padding: 6px 15px; font-size: 14.5px; }
#line .linehead h4 { font-size: 17px; }
#mid { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 10px; min-height: 0; }
#side { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }       /* gold, the cursor, and the weapons under it */
#left { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }       /* the Forge, and the skills that go into what it makes */
#left.bare { visibility: hidden; }       /* neither yet: no empty box */
#left > #tab-skills:first-child, #left > #shop.hidden + #tab-skills { grid-row: 1 / -1; }
/* gold, where it is spent: across the top of the right-hand pane, and big */
#goldbar { justify-content: center; gap: 10px; padding: 10px 12px; font-size: 30px; color: #ffe08a; background: linear-gradient(#241c10, #17130d); border-bottom: 1px solid #4a3a18; text-shadow: 0 0 14px rgba(255,200,80,.35); }
#goldbar i { width: 22px; height: 22px; } #goldbar span { font: 600 13px var(--sans); color: #b89a58; text-transform: uppercase; letter-spacing: 1.5px; text-shadow: none; align-self: center; margin-top: 6px; }
.fhead .cur.core { font-size: 17px; gap: 5px; flex: none; } .fhead .cur.core i { width: 12px; height: 12px; }
.tab { overflow-y: auto; padding: 10px; min-height: 0; }
::-webkit-scrollbar { width: 9px; } ::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 5px; } ::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------ the line */
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 8px 9px; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 4px 9px; align-items: center; position: relative; }
.card.cursor { border-color: #5a4226; background: linear-gradient(#221c1c, #1b1822); }
.card .pic { position: relative; width: 58px; height: 58px; display: grid; place-items: center; background: #0f0d14; border: 1px solid var(--line); border-radius: 3px; grid-row: span 2; }
.card .pic img { width: 54px; height: 54px; }
.card .who { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.card .who b { font: 600 15px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .who .lvl { color: var(--hot); font-weight: 700; white-space: nowrap; }
.card .who .x { padding: 1px 6px; font-size: 11px; align-self: center; }
.bench .who .cmp { font: 700 12px var(--sans); font-style: normal; margin-left: 2px; align-self: center; cursor: default; } .bench .who .cmp.up { color: #6fdc6a; text-shadow: 0 0 6px rgba(111,220,106,.6); } .bench .who .cmp.down { color: #ff6a5a; }
.card .who .rank { font: 700 12px var(--sans); color: var(--hot); font-style: normal; margin-left: 2px; }
.card .uprow { grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; margin-top: 3px; min-height: 26px; }
.card .upbar { flex: 1; height: 7px; background: #15121b; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; } .card .upbar i { display: block; height: 100%; background: linear-gradient(90deg, #c8791e, #ffcf6a); transition: width .25s; }
.card .upbar.max { border-color: var(--hot); } .card .upbar.max i { background: linear-gradient(90deg, #ffcf6a, #fff3c4); box-shadow: 0 0 8px #ffc860; }
.card .upn { font: 700 11.5px var(--sans); color: var(--dim); font-variant-numeric: tabular-nums; white-space: nowrap; } .card .upn b { color: var(--hot); }
.card .uprank { padding: 3px 10px; white-space: nowrap; flex: none; }
.cur.best span { color: var(--dim); font: 600 12px var(--sans); margin-right: 6px; text-transform: uppercase; letter-spacing: .6px; }
.card .who .dps { margin-left: auto; color: var(--dim); white-space: nowrap; font-variant-numeric: tabular-nums; }
.card .who .dps b { font: 700 13px var(--sans); color: var(--text); }
.card .stats { color: var(--dim); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aoe { color: #ffb46a; }
.card .row { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; }
.card .row .socks { margin-right: auto; }
.card .row .made { margin-right: auto; font-size: 11px; color: var(--dimmer); }
/* a made weapon's skills: its Hex and Aid effects as tags, then the rest as a quiet two-column list */
.chips { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; }
.chip { padding: 2px 9px; border-radius: 10px; background: var(--panel3); border: 1px solid var(--line2); white-space: nowrap; font-size: 12px; font-weight: 600; color: #fff; }
.chip.c-r { border-color: color-mix(in srgb, var(--cr) 80%, #000); background: color-mix(in srgb, var(--cr) 30%, var(--panel2)); }
.chip.dull { opacity: .45; text-decoration: line-through; }
.chip { position: relative; overflow: hidden; } .chip .chg { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: #ffe3a0; box-shadow: 0 0 5px #ffc860; transform-origin: left; transform: scaleX(0); }      /* a Shockwave charging */
.chip.c-b { border-color: color-mix(in srgb, var(--cb) 80%, #000); background: color-mix(in srgb, var(--cb) 34%, var(--panel2)); }
.chip.c-g { border-color: color-mix(in srgb, var(--cg) 75%, #000); background: color-mix(in srgb, var(--cg) 28%, var(--panel2)); }
.statlist { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; font-size: 11.5px; line-height: 1.5; color: var(--dim); }
.statlist span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .statlist span::before { content: '· '; color: var(--dimmer); }
.statlist .none { grid-column: 1 / -1; } .statlist .none::before { content: ''; }
.card.empty { color: var(--dim); background: rgba(255,255,255,.012); } .card.empty .pic { background: none; opacity: .55; } .card.empty .who b { color: var(--dim); font-weight: 400; }
.card.empty .row { justify-content: space-between; }
.card.locked { grid-template-columns: 1fr; border-style: dashed; text-align: center; padding: 6px; }
.card.pickme { border-color: var(--hot); box-shadow: 0 0 10px rgba(255,210,122,.35); cursor: pointer; }
.card.flash { animation: cardflash .5s; }
/* a weapon that has just been upgraded: the whole card flashes gold and settles */
.card.upglow { animation: cardup .9s ease-out both; }
@keyframes cardup { 0% { border-color: #fff; box-shadow: 0 0 0 2px var(--hot), 0 0 34px 10px rgba(255,210,122,.95), inset 0 0 26px rgba(255,210,122,.35); background: #5a4526; }
  35% { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot), 0 0 20px 5px rgba(255,210,122,.6), inset 0 0 14px rgba(255,210,122,.18); background: #3a2e1c; }
  100% { box-shadow: 0 0 0 0 rgba(255,210,122,0), inset 0 0 0 rgba(255,210,122,0); } }
/* a weapon that has just been made: its card glows for a few seconds so you can see where it went */
/* scrapped: struck white, shaken, then it buckles, greys and drops away */
.card.scrapped { pointer-events: none; animation: cardscrap .7s ease-in both; transform-origin: 50% 100%; }
@keyframes cardscrap { 0% { background: #6a2a20; border-color: #fff; box-shadow: 0 0 0 2px #ff5a48, 0 0 30px 8px rgba(255,90,72,.75); filter: brightness(1.9); }
  10% { transform: translateX(-7px) rotate(-1.2deg); } 20% { transform: translateX(7px) rotate(1deg); filter: brightness(1.2); } 30% { transform: translateX(-5px) rotate(-.8deg); } 40% { transform: translateX(4px); box-shadow: 0 0 0 1px #ff5a48, 0 0 14px 2px rgba(255,90,72,.4); } 50% { transform: translateX(-2px) scaleY(1); opacity: 1; filter: grayscale(.4) brightness(.9); }
  100% { transform: translateY(16px) scaleY(.55) rotate(1.5deg); opacity: 0; filter: grayscale(1) brightness(.4); box-shadow: none; border-color: #3a3340; } }
@media (prefers-reduced-motion: reduce) { .card.scrapped { animation: none; opacity: .3; } }
.card.isnew { animation: cardin .38s cubic-bezier(.2,1.4,.4,1) both, cardnew 3.2s ease-out both; }
@keyframes cardin { 0% { transform: translateY(-14px) scale(1.08); opacity: 0; } 55% { opacity: 1; } 100% { transform: none; } }
.card.empty.coming { border-color: var(--hot); box-shadow: inset 0 0 22px rgba(255,180,80,.22); animation: cardwait .45s ease-in both; }
@keyframes cardwait { 0% { box-shadow: inset 0 0 0 rgba(255,180,80,0); } 100% { box-shadow: inset 0 0 30px rgba(255,200,110,.4); } }
@media (prefers-reduced-motion: reduce) { .card.isnew { animation: cardnew 3.2s ease-out both; } }
@keyframes cardnew { 0% { border-color: #fff; box-shadow: 0 0 0 2px var(--hot), 0 0 26px 6px rgba(255,210,122,.9); background: #4a3a22; }
  12%, 36%, 60% { border-color: var(--hot); box-shadow: 0 0 0 1px var(--hot), 0 0 16px 3px rgba(255,210,122,.6); }
  24%, 48% { border-color: var(--ember); box-shadow: 0 0 0 1px var(--ember), 0 0 6px 1px rgba(255,138,42,.4); }
  100% { border-color: var(--line); box-shadow: none; } }
@keyframes cardflash { 0% { background: #4a3520; } }
.cdbar { position: absolute; left: 3px; right: 3px; bottom: 3px; height: 5px; background: #08070b; border-radius: 3px; overflow: hidden; }
#cd-fill, .cdbar i[data-cd] { display: block; width: 100%; height: 100%; background: var(--ember); transform-origin: left; }
#cd-fill.ready { background: var(--hot); box-shadow: 0 0 6px var(--hot); }
.linehead { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.linehead span { color: var(--dim); font-size: 12px; }
button.x { padding: 5px 7px; color: var(--dim); flex: none; }

/* -------------------------------------------------------- sockets, skills */
.socks { display: flex; gap: 4px; flex-wrap: wrap; }
.sock { width: 32px; height: 32px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--sc, var(--cn)) 60%, #000); background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--sc, var(--cn)) 92%, #000), color-mix(in srgb, var(--sc, var(--cn)) 62%, #000)); box-shadow: inset 0 2px 5px rgba(0,0,0,.5); display: grid; place-items: center; position: relative; flex: none; }
.sock > .gem { box-shadow: 0 0 0 2px #0b0a0f, inset 0 -2px 4px rgba(0,0,0,.45); }
.sock.c-r { --sc: var(--cr); } .sock.c-b { --sc: var(--cb); } .sock.c-g { --sc: var(--cg); } .sock.c-n { --sc: var(--cn); }
.sock.ok { box-shadow: 0 0 0 2px #0b0a0f, 0 0 0 4px var(--hot), 0 0 12px var(--hot); cursor: pointer; animation: sockpulse 1s infinite; }
.sock.over { filter: brightness(1.5); }
@keyframes sockpulse { 50% { box-shadow: 0 0 0 2px #0b0a0f, 0 0 0 4px var(--ember), 0 0 6px var(--ember); } }
.sock.ghost { opacity: .3; border-style: dashed; background: none; box-shadow: none; }
.sock.dot { width: 16px; height: 16px; border-width: 2px; box-shadow: inset 0 1px 3px rgba(0,0,0,.45); }
.gem { width: 26px; height: 26px; border-radius: 50%; position: relative; display: grid; place-items: center; cursor: pointer; flex: none;
  background: radial-gradient(circle at 34% 28%, color-mix(in srgb, var(--gc) 40%, #fff), var(--gc) 45%, color-mix(in srgb, var(--gc) 45%, #000) 100%); box-shadow: inset 0 -2px 4px rgba(0,0,0,.45), 0 1px 2px rgba(0,0,0,.6); }
.gem.c-r { --gc: var(--cr); } .gem.c-b { --gc: var(--cb); } .gem.c-g { --gc: var(--cg); }
.gem img { width: 21px; height: 21px; margin: -1px; opacity: .92; filter: drop-shadow(0 1px 0 rgba(0,0,0,.55)); pointer-events: none; }
.gem .glv { position: absolute; right: -5px; bottom: -5px; min-width: 15px; padding: 0 2px; font: 700 10px var(--sans); font-style: normal; text-align: center; color: #fff; background: #0b0a0f; border: 1px solid var(--line2); border-radius: 7px; pointer-events: none; }
/* how many secondary affixes: one bright diamond each, big enough to tell one from two at a glance */
.gem .pips { position: absolute; left: -6px; top: -6px; display: flex; gap: 3px; padding: 2px 4px; background: #0b0a0f; border: 1px solid var(--line2); border-radius: 8px; pointer-events: none; z-index: 1; }
.gem .pips:empty { display: none; }
.gem .pips i { width: 6px; height: 6px; background: #ffe9a8; transform: rotate(45deg); box-shadow: 0 0 4px 1px rgba(255, 214, 110, .9); }
.gem .lock { position: absolute; left: -5px; bottom: -5px; font-size: 9px; font-style: normal; pointer-events: none; }
.gem.sel { outline: 2px solid #fff; outline-offset: 2px; }
.gem.pend::after { content: '?'; position: absolute; left: -5px; top: -6px; width: 13px; height: 13px; border-radius: 50%; background: var(--warn); color: #000; font: 700 10px/13px var(--sans); text-align: center; }
.gem.new { animation: gemnew .9s; }
/* a skill nobody has looked at yet: it glows until the mouse has been over it */
.gem.fresh { box-shadow: 0 0 0 1.5px rgba(255,226,160,.28), 0 0 12px 5px rgba(255,214,130,.28), 0 0 30px 13px rgba(255,186,84,.13); }      /* a steady glow: it does not pulse */
.gem.fresh.new { animation: gemnew .9s; }
@keyframes gemnew { 0% { transform: scale(1.35); filter: brightness(1.6); } }

/* ------------------------------------------------------------ the fight */
#fight { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; padding: 10px; }
/* the level on the left, what it pays on the right, and the level's ten fights in the middle of the pane, as large as there is room for */
.fhead { display: grid; grid-template-columns: minmax(max-content, 1fr) minmax(0, 250px) minmax(max-content, 1fr); align-items: center; gap: 10px; }
.fside { display: flex; align-items: center; gap: 8px; min-width: 0; } .fside.right { justify-content: flex-end; }
.lv { min-width: 96px; text-align: center; line-height: 1.15; }
.lv b { display: block; font: 700 18px var(--serif); } .lv span { color: var(--dim); font-size: 12px; }
#pips { display: flex; gap: clamp(2px, 1.2%, 7px); justify-content: center; align-items: center; min-width: 0; }
#pips i { flex: 1 1 0; max-width: 17px; aspect-ratio: 1; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--line2); background: #0f0d14; }
#pips i.done { background: var(--ember); border-color: #ffb46a; }
#pips i.now { border-color: var(--hot); box-shadow: 0 0 8px var(--hot); }
#pips i.boss { max-width: 18px; border-radius: 3px; transform: rotate(45deg); margin-left: 5px; }
.lifebar { position: relative; height: 22px; background: #0f0d14; border: 1px solid var(--line2); border-radius: 3px; overflow: hidden; }
#life-fill { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(#7fd66a, #2f8a3a); transform-origin: left; transition: transform .12s; }
#life-fill.low { background: linear-gradient(#ff8a6a, #d93a2a); }
#life-barrier { position: absolute; top: 0; height: 6px; left: 0; width: 0; background: repeating-linear-gradient(45deg, rgba(120,190,255,.85) 0 6px, rgba(90,150,235,.85) 6px 12px); opacity: .95; }
#life-txt { position: absolute; inset: 0; display: grid; place-items: center; font: 700 13px var(--sans); color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; font-variant-numeric: tabular-nums; }
.lifebar.hurt { animation: lifehurt .35s; }
@keyframes lifehurt { 0% { border-color: #c8756a; } }
#arena { position: relative; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; min-height: 240px; cursor: none; background: #0f0d14; }      /* the cursor's circle is the pointer here: see arena.js */
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ehead { position: absolute; left: 12px; right: 12px; top: 8px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
#e-name { font: 700 17px var(--serif); text-shadow: 0 1px 3px #000; white-space: nowrap; } #e-name.boss { color: var(--hot); }
#e-status { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow: hidden; justify-content: flex-end; }
#e-status span { padding: 1px 6px; border-radius: 9px; font-size: 11px; font-weight: 700; background: rgba(8,7,11,.8); border: 1px solid currentColor; white-space: nowrap; }
.st-vuln { color: #ff9ad0; } .st-chill { color: #9be3ff; } .st-weak { color: #c9a0ff; } .st-stun { color: #ffe07a; } .st-brit { color: #e0d2a8; } .st-burn { color: #ff8a3a; }
.hpbar { position: absolute; left: 12px; right: 12px; top: 34px; height: 16px; background: rgba(8,7,11,.8); border: 1px solid var(--line2); border-radius: 3px; overflow: hidden; pointer-events: none; }
#hp-fill { position: absolute; inset: 0; background: linear-gradient(#e0483a, #9a2018); transform-origin: left; }
#hp-txt { position: absolute; inset: 0; display: grid; place-items: center; font: 700 11px var(--sans); color: #fff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
#banner { position: absolute; left: 0; right: 0; top: 38%; text-align: center; pointer-events: none; }
/* the interlude after a level: it covers the arena for the pause, then the next level begins */
#interlude { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at center, rgba(10,8,14,.92), rgba(10,8,14,.72)); pointer-events: none; z-index: 4; animation: iin .25s both; }      /* it stays whole until its bar is full, and only then goes */
#interlude.out { animation: iout .4s both; }
#interlude.hidden { display: none; }
.ibox { display: grid; justify-items: center; gap: 6px; }
.ibox small { font: 600 13px var(--sans); letter-spacing: 3px; text-transform: uppercase; color: var(--dim); }
.ibox b { font: 700 40px var(--serif); color: var(--hot); text-shadow: 0 0 24px rgba(255,180,80,.45); line-height: 1; }
.ibox .ipay { font: 700 20px var(--sans); color: #e6d6ff; margin-top: 6px; } .ibox .ipay .ci { width: 13px; height: 13px; margin-right: 7px; } .ibox .ipay i { font: 400 13px var(--sans); color: var(--dim); margin-left: 10px; font-style: normal; }
.ibox .inext { font: 15px var(--serif); color: var(--text); margin-top: 10px; }
.ibox .ibar { width: 180px; height: 3px; background: #2a2433; border-radius: 2px; overflow: hidden; margin-top: 4px; } .ibox .ibar i { display: block; height: 100%; background: var(--hot); transform-origin: left; animation: idrain var(--secs) linear both; }
@keyframes iin { from { opacity: 0; } to { opacity: 1; } }
@keyframes iout { from { opacity: 1; } to { opacity: 0; } }
@keyframes idrain { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* a run's opening: 3, 2, 1 in the middle of the empty arena */
#count { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; font: 700 84px var(--serif); color: var(--hot); text-shadow: 0 0 28px rgba(255,180,80,.45); }
#count span { animation: countin 1s ease-out both; }
@keyframes countin { 0% { opacity: 0; transform: scale(1.5); } 18% { opacity: 1; transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: scale(.85); } }
/* a lost fight: the arena goes grey under a count, until the level starts again */
#dead { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; pointer-events: none; background: rgba(22,22,26,.5); -webkit-backdrop-filter: grayscale(1) brightness(.6); backdrop-filter: grayscale(1) brightness(.6); animation: deadin .5s both; }
.dbox { display: grid; justify-items: center; gap: 4px; }
.dbox b { font: 700 26px var(--serif); color: #d9d6d2; }
.dbox small { font: 14px var(--sans); color: #a9a6a2; }
.dbox span { font: 700 54px var(--serif); color: #f1eeea; line-height: 1.1; margin-top: 6px; font-variant-numeric: tabular-nums; text-shadow: 0 2px 14px rgba(0,0,0,.6); }
@keyframes deadin { from { opacity: 0; } to { opacity: 1; } }
#banner div { display: inline-block; padding: 8px 26px; font: 700 24px var(--serif); background: rgba(8,7,11,.85); border-block: 1px solid currentColor; animation: banner 2.2s both; }
#banner div small { display: block; font: 14px var(--sans); color: var(--text); margin-top: 2px; }
@keyframes banner { 0% { opacity: 0; transform: scale(.8); } 10%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* -------------------------------------------------------------- the rack */
#shop { padding: 9px 10px 10px; border-bottom: 1px solid var(--line); }
.shophead { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; } .shophead h4 { margin-right: auto; white-space: nowrap; } .shophead button { white-space: nowrap; flex: none; }
.bench { display: grid; grid-template-columns: 58px minmax(0, 1fr); grid-template-areas: "pic what" "socks socks" "btns btns" "make make" "note note"; gap: 7px 10px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 9px; }
.bench .pic { grid-area: pic; width: 58px; height: 58px; display: grid; place-items: center; background: #0f0d14; border: 1px solid var(--line); border-radius: 3px; }
.bench .pic img { width: 54px; height: 54px; }
.bench .what { grid-area: what; min-width: 0; } .bench .who { display: flex; align-items: baseline; gap: 8px; } .bench .who > b { font: 600 15px var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bench .who .dps { margin-left: auto; color: var(--dim); white-space: nowrap; } .bench .who .dps b { font: 700 13px var(--sans); color: var(--text); }
.bench .stats { color: var(--dim); font-size: 12px; line-height: 1.35; } .bench .stats span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bsocks { grid-area: socks; display: flex; gap: 8px; flex-wrap: wrap; }
.bbtns { grid-area: btns; display: flex; gap: 6px; align-items: center; font-size: 12px; } .bbtns button { white-space: nowrap; padding: 3px 7px; }
.bench > .big { grid-area: make; padding: 6px 14px; }
.bench .note { grid-area: note; color: var(--dimmer); font-size: 11px; text-align: center; }

/* --------------------------------------------------------------- side */
.baghead { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.baghead span { color: var(--dim); font-size: 12px; margin-right: auto; }
.baghead button { white-space: nowrap; }
.baghead .backbtn { padding: 8px 18px; font: 600 15px var(--sans); }      /* the way back out of a skill's crafting: easy to hit */
button.buyskill { display: block; width: 100%; margin: 0 0 8px; padding: 11px 12px; white-space: nowrap; font: 600 16px var(--sans); }
/* the Skills tab does not scroll: the bag takes what height is left and scrolls inside itself */
#tab-skills { display: flex; flex-direction: column; overflow: hidden; }
#tab-skills > * { flex: none; }
#bag { flex: 1 1 auto; min-height: 96px; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding: 8px; background: #0f0d14; border: 1px solid var(--line); border-radius: 4px; scrollbar-width: thin; }
#bag .brow { display: grid; grid-template-columns: 80px repeat(5, minmax(0, 1fr)); gap: 6px; align-items: center; flex: none; }      /* the five slots share the whole width of the pane */
#bag .brow .slot:nth-child(5n+7) { grid-column: 2; }      /* a row that has run over wraps under its own slots, not under its name */
#bag .bname { font: 600 12px var(--serif); line-height: 1.15; overflow-wrap: normal; word-break: keep-all; hyphens: none; }      /* a name breaks between words, never inside one */
#tab-skills > #detail { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin-top: 0; }
#tab-skills > .hint.keys { margin-top: 8px; }
/* on the right the skills are what you are working with, so they are drawn large */
#left .sock, #side .sock { width: 44px; height: 44px; }
#left .gem, #side .gem { width: 38px; height: 38px; }
#left .bsocks, #side .bsocks { gap: 7px; flex-wrap: nowrap; }
#left .gem img, #side .gem img { width: 30px; height: 30px; margin: 0; }
#left .gem .glv, #side .gem .glv { font-size: 12px; min-width: 19px; padding: 0 3px; border-radius: 9px; right: -6px; bottom: -6px; }
#left .gem .pips, #side .gem .pips { left: -7px; top: -7px; gap: 4px; padding: 3px 5px; border-radius: 10px; } #left .gem .pips i, #side .gem .pips i { width: 8px; height: 8px; }
#left .gem .lock, #side .gem .lock { font-size: 11px; }
#bag .gem { width: 86%; height: auto; aspect-ratio: 1; }
#detail .name .gem { width: 44px; height: 44px; }
#bag .slot { aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 3px; background: var(--panel); }
#bag.over { border-color: var(--hot); }
#detail { margin-top: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 10px; }
#detail .name { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
#detail .name b { font: 700 17px var(--serif); } #detail .name span { font-size: 12px; margin-left: auto; text-align: right; }
.aff { display: flex; align-items: center; gap: 7px; padding: 4px 0; border-top: 1px solid var(--line); }
.aff .txt { margin-right: auto; }
.tier { flex: none; margin: 0 9px 0 0; padding: 0 6px; font: 700 12px var(--sans); color: var(--dim); border: 1px solid var(--line2); border-radius: 8px; white-space: nowrap; }
/* the five tiers, each its own colour wherever a tier is shown: dim grey, pale, cream, gold, and gold filled in */
.tier.t1, .glv.t1 { color: #8d8697; border-color: #3a3544; } .tname.t1 { color: #8d8697; }
.tier.t2, .glv.t2 { color: #b9b2c2; border-color: #5a5368; } .tname.t2 { color: #b9b2c2; }
.tier.t3, .glv.t3 { color: #f1e7d3; border-color: #8f8674; } .tname.t3 { color: #f1e7d3; }
.tier.t4, .glv.t4 { color: var(--hot); border-color: #b8924a; } .tname.t4 { color: var(--hot); }
.tier.t5, .glv.t5 { color: #1a1208; background: var(--hot); border-color: var(--hot); } .tname.t5 { color: var(--hot); font-weight: 700; }
#tip .tier { margin: 0 9px 0 0; font-size: 13px; position: relative; top: -1px; }
.aff.prim .txt { font-weight: 600; }
.aff.pend { background: rgba(255,207,74,.06); flex-wrap: wrap; }
.aff .arrow { color: var(--warn); }
.forge { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.hint.keys { border-top: 1px solid var(--line); padding-top: 7px; }
.forge button { text-align: left; } .forge button small { display: block; color: var(--dim); font-size: 11px; white-space: normal; }
.aff.none { font-style: italic; }
/* crafting: an affix put on slides in lit gold and settles; one taken off turns red, is struck through and closes up */
.aff.affin { animation: affin .7s ease-out backwards; border-radius: 3px; }
@keyframes affin { 0% { opacity: 0; transform: translateX(-12px); background: rgba(255,210,122,.38); box-shadow: 0 0 10px 1px rgba(255,210,122,.4); } 35% { opacity: 1; transform: none; background: rgba(255,210,122,.28); box-shadow: 0 0 8px 0 rgba(255,210,122,.3); } 100% { background: rgba(255,210,122,0); box-shadow: 0 0 0 0 rgba(255,210,122,0); } }
.aff.affout { animation: affout .7s ease-in forwards; overflow: hidden; pointer-events: none; text-decoration: line-through; border-radius: 3px; }
@keyframes affout { 0% { opacity: 1; max-height: 34px; background: rgba(255,90,72,.36); box-shadow: 0 0 9px 0 rgba(255,90,72,.4); } 40% { opacity: .85; max-height: 34px; transform: none; background: rgba(255,90,72,.22); } 100% { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border-top-width: 0; transform: translateX(18px); background: rgba(255,90,72,0); box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .aff.affin { animation: none; } .aff.affout { display: none; } }
.bench .swap { grid-column: 1 / -1; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hint { color: var(--dim); font-size: 12px; margin-top: 8px; line-height: 1.5; }
.hint kbd { font: 11px var(--sans); padding: 0 4px; border: 1px solid var(--line2); border-radius: 3px; background: var(--panel3); color: var(--text); }
.upg { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; padding: 10px; margin-bottom: 8px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; }
.prestige { background: var(--panel2); border: 1px solid var(--line2); border-radius: 4px; padding: 10px 12px; margin-bottom: 12px; }
.prestige p { margin: 4px 0 8px; color: var(--dim); font-size: 12.5px; } .prestige p b { color: var(--text); }
.prestige .pend { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; } .prestige .pend span { margin-right: auto; } .prestige .pend b { font-size: 20px; color: var(--hot); white-space: nowrap; }
.prestige button.big { width: 100%; } .prestige .note { margin-top: 8px; color: var(--dim); font-size: 12px; }
.upg b .rank { margin-left: 8px; font: 600 11px var(--sans); color: var(--dim); }
.card.locked span { font-size: 12px; }
.upg b { font: 600 15px var(--serif); } .upg p { margin: 0; color: var(--dim); font-size: 12px; grid-column: 1; } .upg button { grid-row: 1 / span 2; grid-column: 2; min-width: 96px; }

/* ------------------------------------------------------- tips, toasts */
#tip { position: fixed; z-index: 70; max-width: 360px; padding: 11px 13px; background: #0d0b12; border: 1px solid var(--line2); border-radius: 4px; box-shadow: 0 8px 26px rgba(0,0,0,.7); pointer-events: none; font-size: 15px; line-height: 1.45; }
#tip .tn { font: 700 19px var(--serif); } #tip .ts { color: var(--dim); font-size: 13px; margin-bottom: 6px; }
#tip .tp { font-weight: 600; margin: 4px 0 6px; } #tip .ta { color: #e6ebf5; font-size: 17px; margin: 3px 0; } #tip .tb { color: #cfd6e4; } #tip .tb::before { content: '◆ '; color: var(--dimmer); font-size: 10px; }
#tip .rng { float: right; margin-left: 14px; color: var(--dim); font-weight: 400; font-size: 13px; font-variant-numeric: tabular-nums; }
#tip .tk { color: var(--hot); font-size: 13px; margin-top: 7px; border-top: 1px solid var(--line); padding-top: 6px; }
#tip .tf { color: var(--dim); font-size: 13px; margin-top: 7px; border-top: 1px solid var(--line); padding-top: 6px; }
#toasts { position: absolute; left: 10px; bottom: 10px; z-index: 5; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; pointer-events: none; }
.toast { padding: 7px 13px; background: rgba(13,11,18,.94); border: 1px solid var(--line2); border-left: 3px solid var(--ember); border-radius: 3px; animation: toast 3.6s both; max-width: 340px; }
@keyframes toast { 0% { opacity: 0; transform: translateX(-30px); } 6%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
/* the Prestige window: a popup over the game, which goes on underneath */
#prestige { position: fixed; inset: 0; z-index: 55; background: rgba(5,4,8,.72); display: grid; place-items: center; }
#prestige.alloc { background: #000; }      /* between runs: the game behind is blacked out, and stands still */
#prestige .box { width: min(1760px, 98vw); height: 96vh; display: flex; flex-direction: column; background: #0b0910; border: 1px solid var(--line2); border-radius: 8px; padding: 10px 14px 8px; box-shadow: 0 20px 60px rgba(0,0,0,.8); }
.preshead { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; flex: none; } .preshead h3 { margin: 0; font: 700 22px var(--serif); color: var(--hot); letter-spacing: .5px; }
.preshead .ppts { color: var(--dim); font-size: 13px; white-space: nowrap; } .preshead .ppts b { color: var(--text); font-size: 18px; } .preshead .ppts b.free { color: var(--hot); text-shadow: 0 0 10px rgba(255,210,122,.7); }
.preshead .pnote { flex: 1; color: var(--dim); font-size: 12.5px; min-width: 0; } .preshead .pnote b { color: var(--text); }
.pbtns { display: flex; gap: 8px; flex: none; align-items: center; } .pbtns button { white-space: nowrap; padding: 8px 14px; } .pbtns button.big { padding: 9px 20px; }
#prestige.alloc .box { border-color: #5a3a14; box-shadow: 0 0 0 1px rgba(255,138,42,.25), 0 0 60px rgba(255,138,42,.12); }
/* the tree */
#tree { display: block; flex: 1; min-height: 0; width: 100%; background: #000; border: 1px solid #221d2b; border-radius: 6px; user-select: none; }
#tree .bg .region { font: 700 15px var(--serif); letter-spacing: 6px; fill: var(--c); opacity: .3; }
/* opening the page: a slow double ripple out from the centre. Each path and node comes up softly when the first ripple reaches it
   (its delay is set on it, by how far out it is) and brightens a little, then a little again as the second passes; two faint rings mark the ripples */
#tree.ripple .node, #tree.ripple .link { animation: ripfade .55s ease-out backwards, ripglow 1.3s ease-in-out backwards; }
#tree.ripple .region { animation: ripfade 1.6s ease-out .5s backwards; }
@keyframes ripfade { 0% { opacity: 0; } }
/* the first weapon alone, and the three: one ripple, one swell. The whole tree has two */
/* (no ripple there now, and no swell: until the whole tree has opened what is new only fades in, quietly. The ripple is the whole tree's.) */
#tree.ripple.one .node, #tree.ripple.one .link { animation: ripfade .55s ease-out backwards; }
@keyframes ripglow1 { 0%, 100% { filter: brightness(1); } 40% { filter: brightness(1.32); } }
/* what is already held is there from the start: the ripple brings in the rest, and only brightens these as it passes */
#tree.ripple .node.held, #tree.ripple .link.on { animation: ripglow 1.3s ease-in-out backwards; }
#tree.ripple.one .node.held, #tree.ripple.one .link.on { animation: none; }
/* the page just opened: what is held comes up out of the dark first (its own delay, counted from the opening), stands a moment, and then the ripple goes out */
#tree.ripple.opening .node.held, #tree.ripple.opening .link.on { animation: ripfade 2.2s cubic-bezier(.65, 0, .75, 1) backwards, ripglow 1.3s ease-in-out backwards; }
#tree.ripple.one.opening .node.held, #tree.ripple.one.opening .link.on, #tree.ripple.one.opening .node.early, #tree.ripple.one.opening .link.early { animation: ripfade 2.2s cubic-bezier(.65, 0, .75, 1) backwards; }
#prestige.alloc #tree.ripple.opening .link.next.early { animation: ripfade 2.2s cubic-bezier(.65, 0, .75, 1) backwards, linkflow 1.1s linear infinite; }      /* (the pair beside the first weapon, one taken and one not: the one not taken comes up with the other) */
#tree.ripple.opening .startnode { animation: ripfade 2.2s cubic-bezier(.65, 0, .75, 1) var(--od, 0s) backwards; }
@media (prefers-reduced-motion: reduce) { #tree.ripple.opening .node.held, #tree.ripple.opening .link.on, #tree.ripple.opening .startnode, #tree.ripple.opening .node.early, #prestige.alloc #tree.ripple.opening .link.early { animation: none; } }
@keyframes ripglow { 0%, 100% { filter: brightness(1); } 20% { filter: brightness(1.32); } 46% { filter: brightness(1); } 68% { filter: brightness(1.2); } }
#tree .ripwave { fill: none; stroke: #ffd98a; stroke-width: 1.2; vector-effect: non-scaling-stroke; transform-origin: 0 0; pointer-events: none; animation: ripwave 1.7s linear both; }
@keyframes ripwave { 0% { transform: scale(0); opacity: 0; } 8% { opacity: .32; } 60% { opacity: .16; } 100% { transform: scale(7.4); opacity: 0; } }
/* the square round the middle, when it is first shown: an unhurried fade (it was over in half a second) */
#tree.ripple.one.slow .node, #tree.ripple.one.slow .link { animation-duration: 1.5s; }
/* the inner tree's ring: it goes out as far as that tree does and no further */
#tree .ripwave.mid { animation-name: ripwavemid; }
@keyframes ripwavemid { 0% { transform: scale(0); opacity: 0; } 10% { opacity: .32; } 60% { opacity: .18; } 100% { transform: scale(3.55); opacity: 0; } }
/* what was already on show when a wider tree is revealed stays as it is: no fading out and in again, only the ripple's glow as it passes */
#tree.ripple .node.kept, #tree.ripple .link.kept { animation: ripglow 1.3s ease-in-out backwards; }
#prestige.alloc #tree.ripple .link.next.kept { animation: linkflow 1.1s linear infinite; }
@media (prefers-reduced-motion: reduce) { #tree.ripple .node, #tree.ripple .link, #tree.ripple .region, #tree.ripple.one .node, #tree.ripple.one .link, #tree.ripple .node.held, #tree.ripple .link.on { animation: none; } #tree .ripwave { display: none; } }
#tree .link { stroke: #2a2534; stroke-width: 3; stroke-linecap: round; }
#tree .link.next { stroke: var(--c); stroke-opacity: .55; stroke-dasharray: 3 6; }
#prestige.alloc #tree .link.next { animation: linkflow 1.1s linear infinite; }
@keyframes linkflow { to { stroke-dashoffset: -18; } }
/* (the flow above outranks the ripple's rule, so without this the dotted paths stood there from the start while everything round them faded in) */
#prestige.alloc #tree.ripple .link.next { animation: ripfade .55s ease-out backwards, linkflow 1.1s linear infinite; }
@media (prefers-reduced-motion: reduce) { #prestige.alloc #tree.ripple .link.next { animation: none; } }
#tree .link.on { stroke: var(--c); stroke-width: 4; filter: drop-shadow(0 0 4px var(--c)); }
#tree .startnode rect { fill: #ffe6a8; stroke: #fff8e0; stroke-width: 1.5; filter: drop-shadow(0 0 8px #ffc860); } #tree .startnode .halo { fill: none; stroke: #ffd98a; stroke-opacity: .35; stroke-width: 1.5; stroke-dasharray: 2 4; }
#tree .node { cursor: default; } #prestige.alloc #tree .node.open, #prestige.alloc #tree .node.held { cursor: pointer; }
#tree .node .hit { fill: transparent; }
#tree .node .ring { fill: #13101a; stroke: #4b4459; stroke-width: 2; stroke-linejoin: round; transition: stroke .12s, fill .12s; }
#tree .node .inner { fill: none; stroke: #4b4459; stroke-opacity: .5; stroke-width: 1; stroke-linejoin: round; }
#tree .node.big .ring { stroke-width: 2.5; fill: #17131f; }
#tree .node .pip { fill: var(--c); opacity: .5; }
#tree .node text.price { font: 700 9.5px var(--sans); fill: #b9a7e8; text-anchor: middle; paint-order: stroke; stroke: #0b0910; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; } #tree .node.open text.price { fill: #fff3d6; }
#tree .node.edge .ring { stroke: color-mix(in srgb, var(--c) 45%, #4b4459); }
.tc { font-weight: 700; margin-top: 2px; } .tc.poor { color: #ff8a7a; }
#tree .node.tier.locked .ring { stroke: color-mix(in srgb, var(--c) 50%, #4b4459); } #tree .node.tier .pip { opacity: .85; }
#tree .node .shine { fill: url(#gorb); pointer-events: none; }
#tree .node.locked { opacity: .78; } #tree .node.locked.big .ring { stroke: color-mix(in srgb, var(--c) 38%, #3a3446); }
#tree .node.open .ring { stroke: var(--c); } #tree .node.open .pip { opacity: 1; } #tree .node.open .inner { stroke: var(--c); stroke-opacity: .6; }
#prestige.alloc #tree .node.open .ring { animation: nodeopen 1.3s ease-in-out infinite; }
@keyframes nodeopen { 0%, 100% { filter: drop-shadow(0 0 2px var(--c)); } 50% { filter: drop-shadow(0 0 9px var(--c)); stroke-width: 3.2; } }
#tree .node.held .ring { fill: var(--c); stroke: #fff6dc; filter: drop-shadow(0 0 6px var(--c)); } #tree .node.held .inner { stroke: #1a130a; stroke-opacity: .45; }
#tree .node text { text-anchor: middle; pointer-events: none; }
#tree .node.hub .ico { stroke-width: 1.6; } #tree .node .ico { fill: none; stroke: var(--c); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; } #tree .node.locked .ico { stroke: color-mix(in srgb, var(--c) 70%, #777); } #tree .node.held .ico { stroke: #17100a; }
#tree .node:hover .ring { stroke: #fff; }
#btn-prestige { padding: 6px 10px; font: 600 13px var(--sans); white-space: nowrap; flex: none; }
#btn-prestige b { color: var(--hot); } #btn-prestige .ci { margin-left: 3px; } #btn-prestige.nudge { box-shadow: 0 0 0 1px #6a3ad0, 0 0 10px rgba(106,58,208,.6); }
/* not yet: greyed out. Available: it glows; with points to spend it glows harder, and pulses */
#btn-prestige.cannot { color: var(--dimmer); border-color: var(--line); background: #121017; opacity: .7; cursor: default; }
/* (with nothing to spend it is an ordinary button: no glow) */
#btn-prestige.can { color: #fff3d6; border-color: var(--ember); background: linear-gradient(#3a2412, #24160c); }
#btn-prestige.can.on { border-color: var(--hot); background: linear-gradient(#5a3410, #33200c); animation: presglow 1.5s ease-in-out infinite; }
@keyframes presglow { 0%, 100% { box-shadow: 0 0 0 1px rgba(255,210,122,.7), 0 0 16px 3px rgba(255,160,60,.65); } 50% { box-shadow: 0 0 0 2px rgba(255,225,150,.95), 0 0 30px 9px rgba(255,170,70,.95); } }
/* a pane that this run has for the first time */
.unlockflash { animation: unlockflash 2.4s ease-out; position: relative; z-index: 3; }
@keyframes unlockflash { 0% { box-shadow: 0 0 0 3px #fff3d0, 0 0 60px 18px rgba(255,210,122,.95); filter: brightness(2.4) saturate(1.3); } 12% { box-shadow: 0 0 0 3px var(--hot), 0 0 46px 12px rgba(255,190,90,.9); filter: brightness(1.7); } 35% { filter: brightness(1.15); } 55% { box-shadow: 0 0 0 2px var(--hot), 0 0 30px 6px rgba(255,180,80,.6); filter: brightness(1.35); } 100% { box-shadow: 0 0 0 0 rgba(255,180,80,0); filter: none; } }
.cur.core { cursor: pointer; }
#modal { position: fixed; inset: 0; z-index: 60; background: rgba(5,4,8,.72); display: grid; place-items: center; }
#modal .box { width: min(520px, 92vw); background: var(--panel); border: 1px solid var(--line2); border-radius: 6px; padding: 18px 20px; box-shadow: 0 20px 60px rgba(0,0,0,.8); }
#modal h3 { margin: 0 0 8px; font: 700 20px var(--serif); color: var(--hot); }
#modal p { color: var(--dim); line-height: 1.5; margin: 6px 0; } #modal p b { color: var(--text); }
/* patch notes: a heading for each, and its lines */
#modal h3 .ver { font: 400 12px var(--sans); color: var(--dim); letter-spacing: .03em; margin-left: 8px; vertical-align: middle; }      /* the game's version, beside Settings */
#modal h3.sub { margin-top: 16px; font-size: 17px; }
#modal .notes { max-height: 46vh; overflow-y: auto; margin: 4px 0 10px; text-align: left; }
#modal .notes h4 { margin: 12px 0 4px; font: 600 14px var(--sans, sans-serif); color: var(--text); letter-spacing: .02em; }
#modal .notes h4:first-child { margin-top: 2px; }
#modal .notes ul { margin: 0; padding-left: 20px; color: var(--dim); line-height: 1.5; }
#modal .notes li { margin: 3px 0; }
/* the play-data switch, in the welcome box, its own notice, and Settings */
#modal .teleopt { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel2); cursor: pointer; }
#modal .plain b, #modal .plain .teleopt b { font-weight: 400; }      /* the first box: nothing in bold */
#modal .teleopt { align-items: center; }
#modal .teleopt input { margin-top: 0; width: 16px; height: 16px; accent-color: var(--ember); flex: none; }
#modal .teleopt b { display: block; color: var(--text); font-weight: 600; } #modal .teleopt small { display: block; margin-top: 3px; color: var(--dim); font-size: 12px; line-height: 1.45; }
#modal .btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
#modal textarea { width: 100%; height: 90px; background: #0f0d14; color: var(--text); border: 1px solid var(--line2); border-radius: 3px; font: 11px monospace; padding: 6px; resize: vertical; user-select: text; -webkit-user-select: text; }

@media (max-width: 1240px) { html, body { overflow: auto; } }
/* a pane with nothing in it yet: no post for the crafter, no skills for the bag */
.nothing { margin: 14px 10px; padding: 14px 12px; border: 1px dashed var(--line, #3a3340); border-radius: 6px; color: var(--dim); font-size: 12px; line-height: 1.5; text-align: center; }


/* gold coming in: a glint on the coin and the number, and the amount drifting up beside them */
#goldbar { position: relative; overflow: hidden; }
#goldbar.gain i { animation: coinpulse .45s ease-out; } #goldbar.gain b { animation: goldglow .45s ease-out; }
@keyframes coinpulse { 30% { transform: scale(1.16); filter: brightness(1.3); } }
@keyframes goldglow { 30% { color: #fff6d0; text-shadow: 0 0 16px rgba(255,214,110,.75); } }
#goldbar em { position: absolute; right: 16px; top: 50%; font: 700 13px var(--sans); font-style: normal; color: #ffd98a; opacity: 0; pointer-events: none; animation: gainfloat .95s ease-out; }
@keyframes gainfloat { 0% { opacity: 0; transform: translateY(2px); } 20% { opacity: .8; } 100% { opacity: 0; transform: translateY(-20px); } }

/* new to you: a glow that stays a good while (the flash, if there is one, comes first) */
.newglow { animation: newglow 1.8s ease-in-out infinite; animation-delay: var(--gd, 0s); position: relative; z-index: 2; }
.unlockflash.newglow { animation: unlockflash 2.4s ease-out, newglow 1.8s ease-in-out 2.4s infinite; }
@keyframes newglow { 0%, 100% { box-shadow: 0 0 0 1px rgba(255,210,122,.45), 0 0 10px 1px rgba(255,190,90,.25); } 50% { box-shadow: 0 0 0 2px rgba(255,224,150,.95), 0 0 22px 6px rgba(255,190,90,.6); } }
/* the anvil */
.bench.forging .bsocks, .bench.forging .who, .bench.forging .stats { opacity: .75; pointer-events: none; }
.bench .pic { position: relative; overflow: visible; }
.bench.forging .pic { border-color: var(--ember); box-shadow: 0 0 14px rgba(255,138,42,.6), inset 0 0 16px rgba(255,120,30,.35); }
.bench.forging .pic img { filter: brightness(1.25) sepia(.5) saturate(2.2) hue-rotate(-18deg); }
.bench .pic.strike img, .card .pic.strike img { animation: strike .22s ease-out; }
@keyframes strike { 0% { transform: translateY(0) scale(1); } 25% { transform: translateY(5px) scale(1.12, .86); filter: brightness(2.6); } 100% { transform: translateY(0) scale(1); } }
.spark { position: absolute; left: 50%; top: 55%; width: 4px; height: 4px; border-radius: 50%; background: #ffe9a8; box-shadow: 0 0 6px 2px #ff9a2a; pointer-events: none; z-index: 5; animation: spark .5s ease-out forwards; }
@keyframes spark { 0% { transform: translate(0, 0) scale(1.2); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--dy) + 16px)) scale(.3); opacity: 0; } }
.forgebar { grid-area: make; position: relative; height: 36px; border: 1px solid var(--ember); border-radius: 4px; background: #1a1009; overflow: hidden; display: grid; place-items: center; }
.forgebar i { position: absolute; inset: 0; background: linear-gradient(90deg, #8a3a08, #ff8a2a 70%, #ffe08a); transform-origin: left; transform: scaleX(0); }
.forgebar span { position: relative; font: 700 13px var(--serif); letter-spacing: 3px; text-transform: uppercase; color: #fff3d6; text-shadow: 0 1px 3px #000; }

/* the bench before a weapon is made: an anvil and nothing else; and the two buttons under a made one */
.bench.blank { grid-template-areas: "pic what" "make make"; } .bench.blank .what { align-self: center; }
.anvil { display: block; width: 34px; height: 22px; position: relative; }
.anvil::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 9px; background: #6d6676; border-radius: 2px 9px 2px 2px; box-shadow: inset 0 2px 0 #9a93a3; }
.anvil::after { content: ''; position: absolute; left: 9px; right: 9px; top: 9px; bottom: 0; background: #4b4553; clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); }
.bmake { grid-area: make; display: flex; gap: 8px; } .bmake .big, #shop button.big[data-act="make"] { flex: 1; padding: 13px 16px; font-size: 18px; }      /* the Forge's own button (Forge weapon, then Equip): the biggest on the pane, bigger than Buy a skill */ .bmake .remake { flex: none; padding: 6px 12px; font: 600 13px var(--sans); }
.bench.fresh { animation: benchfresh .7s ease-out; }
@keyframes benchfresh { 0% { box-shadow: 0 0 0 2px #ffe9a8, 0 0 34px 8px rgba(255,180,70,.85); filter: brightness(1.7); } 100% { box-shadow: none; filter: none; } }
.bench .pic.strike .anvil { animation: strike .22s ease-out; } .bench.forging .anvil::before { background: #ffb060; box-shadow: 0 0 12px #ff8a2a; }

/* buying a post, and a socket, for gold */
/* the cursor's own card, over the forge: its sockets and its upgrade sit under it */
#cursor { padding: 9px 10px 0; }
#cursor .card { padding: 10px 11px; gap: 5px 11px; }
#cursor .card .who { flex-wrap: wrap; row-gap: 1px; } #cursor .card .who > b { font-size: 17px; overflow: visible; } #cursor .card .who .dps { flex-basis: 100%; margin-left: 0; }
#cursor .csocks { grid-area: auto; grid-column: 1 / -1; margin-top: 4px; }
#line.bare { display: none; }
#cursor .card .uprow { min-height: 32px; gap: 11px; } #cursor .card .upbar { height: 9px; } #cursor .card .upn { font-size: 13.5px; } #cursor .card .uprank { padding: 5px 13px; font-size: 14px; }
/* power is the number weapons are compared by: large and gold wherever a weapon is shown, with what it does in play (dps) beside it */
#line .card.post .who .dps { display: flex; align-items: baseline; gap: 9px; } #line .card.post .who .dps .pw b { font-size: 21px; color: var(--gold, #ffcf5a); } #line .card.post .who .dps .pw { color: var(--text); }
#line .card.post .who .dps .real { margin-left: auto; font-size: 13px; } #line .card.post .who .dps .real b { font-size: 14.5px; }
#line .card.post .who .dps .weak { font: 700 10.5px var(--sans); font-style: normal; letter-spacing: .06em; text-transform: uppercase; color: #ff8a7a; border: 1px solid rgba(255,138,122,.45); border-radius: 4px; padding: 1px 5px; align-self: center; }
.linehead { display: flex; align-items: baseline; } .linehead .linepw { margin-left: auto; color: var(--dim); font-size: 13px; } .linehead .linepw b { font: 700 15px var(--sans); color: var(--text); }
.bench .who .dps.pw { color: var(--text); font-size: 14px; } .bench .who .dps.pw b { font-size: 21px; color: var(--gold, #ffcf5a); }
.bench .who .cmp { font-size: 21px; line-height: 1; margin-left: 4px; }      /* the arrow beside the power: as tall as the number */
/* a skill that has just become one you can find: its name glows in the list for a while */
.bname.newname { animation: newname 1.8s ease-in-out infinite; animation-delay: var(--gd, 0s); }
@keyframes newname { 0%, 100% { text-shadow: 0 0 3px currentColor; filter: brightness(1.15); } 50% { text-shadow: 0 0 10px currentColor, 0 0 20px currentColor; filter: brightness(1.7); } }
@media (prefers-reduced-motion: reduce) { .bname.newname { animation: none; text-shadow: 0 0 8px currentColor; } }
/* crafting has the whole of the Skills pane to itself: its text is large, and every skill is in a strip along the top to pick from */
button.craftbtn { display: block; width: 100%; margin: 0 0 8px; padding: 8px 12px; font: 600 14.5px var(--sans); }
.baghead .crafthead { margin: 0 0 0 4px; font-size: 17px; }
.craftpick { display: flex; flex-wrap: wrap; gap: 9px; padding: 10px 6px 8px 10px; margin-bottom: 8px; max-height: 132px; overflow-y: auto; background: var(--panel2); border: 1px solid var(--line); border-radius: 4px; }
#left .craftpick .gem { width: 44px; height: 44px; } .craftpick .gem.sel { outline: 2px solid var(--hot); outline-offset: 2px; }
#detail { padding: 14px; } #detail .name { gap: 12px; margin-bottom: 10px; } #detail .name .gem { width: 56px; height: 56px; }
#detail .name b { font-size: 23px; } #detail .name span { font-size: 15px; }
#detail .aff { font-size: 16.5px; padding: 8px 0; gap: 10px; }
#detail .forge { gap: 8px; margin-top: 12px; } #detail .forge button { font-size: 14.5px; padding: 9px 10px; } #detail .forge button small { font-size: 13px; margin-top: 2px; }
#detail .hint { font-size: 14px; margin-top: 12px; } #detail .hint kbd { font-size: 12.5px; }
/* under a cleared level's cores: whether it was new ground (all of them) or ground an earlier run covered (half) */
.ibox .ipay em { display: block; font: 600 13px var(--sans); font-style: normal; margin-top: 3px; letter-spacing: .02em; } .ibox .ipay em.deeper { color: #ffd76a; } .ibox .ipay em.half { color: var(--dim); font-weight: 400; }
.card .stats .upstat { color: var(--hot); font-weight: 600; }      /* what its upgrade ranks come to, with its other numbers */
/* the Prestige button is the way on: large, and the row it shares stays one row (the fight pips give way) */
#btn-prestige { padding: 10px 18px; font: 700 17px var(--sans); } #btn-prestige .ci { width: 13px; height: 13px; }
.fhead { flex-wrap: nowrap; } .fhead .fside { flex: none; white-space: nowrap; } .fhead #pips { flex: 1 1 0; }
@media (max-width: 1320px) { #btn-prestige { padding: 8px 12px; font-size: 15px; } }      /* a narrow window: a little smaller, so the fight pips are still pips */
/* skills that have just become ones you can find: their rows, together, in one glowing border */
#bag .newrows { display: flex; flex-direction: column; gap: 5px; flex: none; margin: -3px -4px; padding: 3px 4px; border-radius: 5px; }
/* the cursor's card is laid out as a weapon's is: picture, name, power large and gold with dps at the right, its numbers, its sockets, its upgrade */
#cursor .card { padding: 12px 13px; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 13px; } #cursor .card .pic { width: 76px; height: 76px; } #cursor .card .pic img { width: 70px; height: 70px; }
#cursor .card .who { row-gap: 2px; } #cursor .card .who > b { font-size: 19px; } #cursor .card .who .rank { font-size: 15px; }
#cursor .card .who .dps { display: flex; align-items: baseline; gap: 9px; font-size: 14.5px; } #cursor .card .who .dps .pw { color: var(--text); } #cursor .card .who .dps .pw b { font-size: 21px; color: var(--gold, #ffcf5a); }
#cursor .card .who .dps .real { margin-left: auto; font-size: 13px; } #cursor .card .who .dps .real b { font-size: 14.5px; }
#cursor .card .stats { font-size: 14px; white-space: normal; }
/* Upgrade is the thing gold is for: a large button, on the cursor and on every weapon */
#line .card.post .uprow, #line .card.empty .uprow, #cursor .card .uprow { min-height: 42px; gap: 12px; margin-top: 5px; }
#line .card.post .upbar, #cursor .card .upbar { height: 10px; border-radius: 5px; } #line .card.post .upn, #cursor .card .upn { font-size: 14.5px; }
#line .card.post .uprank, #cursor .card .uprank { padding: 9px 18px; font: 700 16px var(--sans); }
#cursor { padding-bottom: 9px; }
.sock.newglow { border-radius: 50%; }      /* a socket the tree has just given: the glow goes round it */
#tree .node.wait { pointer-events: none; }      /* not yet come up out of the dark or reached by the ripple: nothing to point at */
/* the cursor's skills, as a weapon's are shown: a badge for each effect, and its stats listed under them */
#cursor .card .statlist { font-size: 13.5px; line-height: 1.55; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); } #cursor .card .chips { gap: 6px; } #cursor .card .chip { font-size: 14px; padding: 3px 12px; border-radius: 12px; }
#modal .telesec { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); } #modal .telesec p { margin: 0 0 8px; } #modal .telesec .teleopt { margin-top: 0; }      /* the play-data part of the first box, set apart from how to play */
#modal .notes ul + ul { margin-top: 12px; }      /* a gap left between two groups of bullets in one note */
