:root {
  --bg1: #141a3a; --bg2: #2a1a4a; --panel: rgba(17, 22, 48, .88); --panel2: rgba(255, 255, 255, .06); --line: rgba(255, 255, 255, .12);
  --text: #eef1ff; --mute: #9aa3c7; --blue: #3d8bff; --red: #ff4d5e; --gold: #ffcc33; --green: #4ee08a;
  --common: #a9b4c2; --rare: #3e9bff; --epic: #b263ff; --legendary: #ffb02e; --perk: #3fd6a0;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: radial-gradient(ellipse at 30% 0%, #2c3a8a 0%, var(--bg1) 45%, var(--bg2) 100%); color: var(--text); font-family: 'Nunito', system-ui, sans-serif; font-weight: 700; }
button { font-family: inherit; font-weight: 800; cursor: pointer; border: 0; border-radius: 12px; padding: 10px 18px; font-size: 15px; color: #fff; background: #3a4680; transition: transform .08s, filter .15s, background .15s; }
button:hover:not(:disabled) { filter: brightness(1.15); }
button:active:not(:disabled) { transform: translateY(1px) scale(.98); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: linear-gradient(180deg, #ffd34d, #ff9f1a); color: #3a2000; box-shadow: 0 4px 0 #b86a00; }
button.blue { background: linear-gradient(180deg, #5aa2ff, #2f6fe0); box-shadow: 0 4px 0 #1d4799; }
button.red { background: linear-gradient(180deg, #ff6b7a, #e0334a); box-shadow: 0 4px 0 #9a1d2e; }
button.ghost { background: var(--panel2); border: 1px solid var(--line); }
button.small { padding: 5px 10px; font-size: 13px; border-radius: 9px; }
input, select { font-family: inherit; font-weight: 700; font-size: 15px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0,0,0,.3); color: var(--text); outline: none; }
input:focus { border-color: var(--gold); }
h1, h2, h3, .title { font-family: 'Lilita One', 'Nunito', sans-serif; font-weight: 400; letter-spacing: .5px; margin: 0; }
.hidden { display: none !important; }
#app { position: fixed; inset: 0; overflow: auto; }
.screen { min-height: 100%; display: flex; flex-direction: column; align-items: center; padding: 22px 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.row { display: flex; gap: 10px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 10px; }
.mute { color: var(--mute); }
.grow { flex: 1; }

/* ---------- home ---------- */
.logo { font-family: 'Lilita One'; font-size: 76px; line-height: .95; text-align: center; margin: 5vh 0 6px; background: linear-gradient(180deg, #fff27a, #ff9a1f 60%, #ff5e3a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 5px 0 #4a1d6b) drop-shadow(0 10px 20px rgba(0,0,0,.5)); transform: rotate(-3deg); }
.tagline { color: var(--mute); margin-bottom: 28px; font-size: 17px; }
.home-box { width: min(440px, 100%); display: flex; flex-direction: column; gap: 14px; }
.home-box .row > * { flex: 1; }
.home-box input.code { text-transform: uppercase; letter-spacing: 4px; text-align: center; }
.floating-cards { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.floating-cards .card { position: absolute; opacity: .22; transform: scale(.6); }

/* ---------- lobby ---------- */
.lobby { width: min(1300px, 100%); display: grid; grid-template-columns: 1fr 1fr 1.45fr; gap: 16px; align-items: start; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; }
.settings-grid .setting span { line-height: 1.15; }
.lobby-head { width: min(1250px, 100%); display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.room-code { font-family: 'Lilita One'; font-size: 30px; letter-spacing: 3px; background: var(--panel); padding: 6px 18px; border-radius: 14px; border: 1px solid var(--line); cursor: pointer; }
.room-code small { font-family: Nunito; font-size: 12px; letter-spacing: 0; color: var(--mute); display: block; margin-top: -4px; }
.team { min-height: 320px; display: flex; flex-direction: column; gap: 8px; transition: box-shadow .15s; }
.team.drag-over { box-shadow: 0 0 0 3px var(--gold) inset; }
.team h2 { font-size: 30px; display: flex; justify-content: space-between; align-items: center; }
.team.t0 h2 { color: var(--blue); } .team.t1 h2 { color: var(--red); }
.pchip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.pchip[draggable=true] { cursor: grab; }
.pchip .av { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 18px; }
.team.t0 .av { background: var(--blue); } .team.t1 .av { background: var(--red); }
.pchip .nm { flex: 1; font-size: 16px; }
.badge { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.12); color: var(--mute); }
.badge.host { background: var(--gold); color: #3a2a00; }
.badge.you { background: var(--green); color: #003a18; }
.settings { display: flex; flex-direction: column; gap: 7px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; }
.setting input[type=number] { width: 74px; padding: 6px 8px; text-align: right; }
.setting input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--gold); }
.setting .val { font-weight: 900; }
.pref-box { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); }

/* ---------- cards ---------- */
.card { --rc: var(--common); width: 250px; border-radius: 18px; background: linear-gradient(180deg, #232a55, #151a38); border: 3px solid var(--rc); box-shadow: 0 0 0 2px rgba(0,0,0,.4), 0 10px 30px rgba(0,0,0,.45), 0 0 24px color-mix(in srgb, var(--rc) 35%, transparent); overflow: hidden; position: relative; text-align: left; }
.card.common { --rc: var(--common); } .card.rare { --rc: var(--rare); } .card.epic { --rc: var(--epic); } .card.legendary { --rc: var(--legendary); } .card.perk { --rc: var(--perk); }
.card .rar { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 12px; font-weight: 900; padding: 3px 9px; border-radius: 8px; background: var(--rc); color: #10122a; text-transform: uppercase; letter-spacing: .5px; }
.card .typ { position: absolute; top: 10px; right: 10px; z-index: 2; font-size: 12px; font-weight: 900; padding: 3px 9px; border-radius: 8px; background: rgba(0,0,0,.45); color: #fff; }
.card .art { height: 156px; position: relative; overflow: hidden; background: #0b0e24; }
.card .art::after { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(0deg, rgba(21,26,56,.9), transparent 30%); }
.card .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 10px 14px 14px; }
.card .nm { font-family: 'Lilita One'; font-size: 24px; line-height: 1.05; }
.card .ds { font-size: 13.5px; color: #c9cff0; margin-top: 6px; min-height: 36px; }
.card table { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 13px; }
.card td { padding: 3px 0; border-top: 1px solid var(--line); }
.card td:last-child { text-align: right; font-weight: 900; }
.card.legendary .art::before { content: ''; position: absolute; inset: -50%; z-index: 1; mix-blend-mode: screen; background: conic-gradient(from 0deg, transparent, rgba(255,220,120,.35), transparent 30%); animation: spin 4s linear infinite; }
.card.epic .art::before { content: ''; position: absolute; inset: -50%; z-index: 1; mix-blend-mode: screen; background: conic-gradient(from 0deg, transparent, rgba(200,140,255,.25), transparent 30%); animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.card.mini { width: 150px; border-width: 2px; border-radius: 12px; }
.card.mini .art { height: 86px; }
.card.mini .nm { font-size: 16px; }
.card.mini .ds, .card.mini table { display: none; }
.card.mini .body { padding: 6px 9px 9px; }
.card.mini .rar, .card.mini .typ { font-size: 9px; top: 5px; padding: 2px 5px; }
.card.mini .rar { left: 5px; } .card.mini .typ { right: 5px; }
.card.excluded { filter: grayscale(1) brightness(.55); }
.card.excluded::after { content: 'EXCLUDED'; position: absolute; inset: auto 0 40% 0; text-align: center; font-family: 'Lilita One'; font-size: 20px; color: #ff6b7a; transform: rotate(-12deg); text-shadow: 0 2px 4px #000; }
.chip { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; font-size: 17px; overflow: hidden; border: 2px solid var(--rc, #888); background: rgba(0,0,0,.35); position: relative; cursor: help; }
.chip.common, .chip.r-common { --rc: var(--common); } .chip.rare, .chip.r-rare { --rc: var(--rare); } .chip.epic, .chip.r-epic { --rc: var(--epic); } .chip.legendary, .chip.r-legendary { --rc: var(--legendary); } .chip.perk, .chip.r-perk { --rc: var(--perk); }
.chip img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.tip { position: fixed; z-index: 1000; pointer-events: none; }

/* ---------- picker modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(5,8,25,.7); backdrop-filter: blur(4px); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal { width: min(1200px, 100%); max-height: 92vh; display: flex; flex-direction: column; gap: 12px; }
.picker-grid { overflow: auto; flex: 1 1 auto; min-height: 0; grid-auto-rows: max-content; align-content: start; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 4px; }
.picker-grid .card { cursor: pointer; width: auto; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters button.on { background: var(--gold); color: #3a2a00; }

/* ---------- auction ---------- */
.auction { width: 100%; height: 100%; display: grid; grid-template-columns: 300px 1fr 300px; gap: 16px; padding: 16px; }
.auction .side { display: flex; flex-direction: column; gap: 10px; overflow: auto; }
.auction .side h2 { font-size: 28px; }
.auction .t0 h2 { color: var(--blue); } .auction .t1 h2 { color: var(--red); }
.bidder { padding: 10px 12px; border-radius: 14px; background: var(--panel); border: 2px solid transparent; transition: border-color .2s, transform .2s; }
.bidder.leading { border-color: var(--gold); transform: scale(1.02); box-shadow: 0 0 22px rgba(255,204,51,.35); }
.bidder .top { display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.bidder .money { font-family: 'Lilita One'; font-size: 22px; color: var(--green); }
.bidder .won { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; min-height: 30px; }
.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; position: relative; }
.stage .counter { font-family: 'Lilita One'; font-size: 22px; color: var(--mute); }
.upcoming { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; max-width: 520px; }
.upcoming i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; opacity: .85; }
.big-card-wrap { perspective: 1200px; }
.big-card-wrap .card { width: 340px; }
.big-card-wrap .card .art { height: 206px; }
.big-card-wrap .card .nm { font-size: 32px; }
.big-card-wrap .card .ds { font-size: 15px; }
.big-card-wrap .card table { font-size: 14.5px; }
.flip-in { animation: flipIn .6s cubic-bezier(.2,1.4,.4,1) both; }
@keyframes flipIn { from { transform: rotateY(90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.sold-out { animation: soldOut .5s ease-in both; animation-delay: 1.3s; }
@keyframes soldOut { to { transform: translateY(-40px) scale(.7); opacity: 0; } }
.bidline { display: flex; align-items: center; gap: 18px; }
.cur-bid { font-family: 'Lilita One'; font-size: 54px; color: var(--gold); text-shadow: 0 4px 0 rgba(0,0,0,.4); min-width: 110px; text-align: center; }
.cur-bid.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.35); } }
.cur-by { font-size: 17px; min-height: 24px; }
.timer { width: 380px; height: 14px; border-radius: 8px; background: rgba(255,255,255,.1); overflow: hidden; }
.timer i { display: block; height: 100%; background: linear-gradient(90deg, #4ee08a, #ffcc33); border-radius: 8px; transition: width .1s linear; }
.timer.low i { background: linear-gradient(90deg, #ff4d5e, #ff9a3c); }
.bid-btn { font-size: 26px; padding: 14px 40px; border-radius: 16px; font-family: 'Lilita One'; font-weight: 400; letter-spacing: .5px; }
.bid-note { color: var(--mute); font-size: 14px; min-height: 20px; }
.sold-banner { font-family: 'Lilita One'; font-size: 40px; text-shadow: 0 4px 0 rgba(0,0,0,.4); animation: pop .4s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } }
.sold-banner.over { position: absolute; top: 40%; z-index: 5; background: rgba(10,14,35,.9); padding: 12px 28px; border-radius: 18px; border: 2px solid var(--line); box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.log { font-size: 13px; color: var(--mute); max-height: 120px; overflow: auto; width: 100%; text-align: center; }

/* ---------- game ---------- */
#game { position: fixed; inset: 0; animation: fadeIn .5s ease-out; }
@keyframes fadeIn { from { opacity: 0; } }
#game canvas { display: block; width: 100%; height: 100%; }
#hud { position: absolute; inset: 0; pointer-events: none; font-family: 'Nunito'; }
#hud .pe { pointer-events: auto; }
.hud-top { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 14px; }
.score-box { display: flex; align-items: center; gap: 14px; background: linear-gradient(180deg, rgba(14,18,44,.85), rgba(8,10,28,.75)); padding: 6px 20px; border-radius: 16px; font-family: 'Lilita One'; font-size: 34px; border: 1px solid rgba(255,255,255,.1); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.score-box .b { color: var(--blue); } .score-box .r { color: var(--red); }
.score-box .mid { font-size: 14px; color: var(--mute); font-family: Nunito; text-align: center; line-height: 1.15; min-width: 70px; }
.score-box .clock { color: #fff; font-size: 17px; font-weight: 900; }
.hotbar { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; align-items: flex-end; }
.slot { --rc: #5a6288; width: 78px; height: 78px; border-radius: 16px; background: rgba(10,14,35,.85); border: 3px solid var(--rc); position: relative; overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.45), 0 0 14px color-mix(in srgb, var(--rc) 30%, transparent); transition: transform .12s; }
.slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slot.r-common { --rc: var(--common); } .slot.r-rare { --rc: var(--rare); } .slot.r-epic { --rc: var(--epic); } .slot.r-legendary { --rc: var(--legendary); } .slot.r-perk { --rc: var(--perk); }
.slot .key { position: absolute; top: 3px; left: 4px; min-width: 20px; padding: 0 5px; height: 20px; line-height: 20px; border-radius: 6px; text-align: center; font-size: 13px; font-weight: 900; color: #fff; background: rgba(0,0,0,.62); z-index: 4; }
.slot .nm { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10.5px; line-height: 1.1; padding: 10px 3px 3px; text-align: center; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,.85), transparent); z-index: 3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot .cd { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; font-size: 26px; font-family: 'Lilita One'; color: #fff; text-shadow: 0 2px 3px #000; }
.slot .chg { position: absolute; top: 3px; right: 5px; font-size: 15px; font-weight: 900; z-index: 6; color: var(--gold); text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.slot .rc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 6; font-family: 'Lilita One'; font-size: 13px; padding: 3px 7px; border-radius: 8px; background: var(--gold); color: #3a2000; white-space: nowrap; max-width: 74px; overflow: hidden; text-overflow: ellipsis; animation: rcPulse 1s infinite; }
@keyframes rcPulse { 50% { box-shadow: 0 0 14px var(--gold); } }
.slot.recast { border-color: var(--gold); }
.slot.util { width: 56px; height: 56px; border-radius: 14px; }
.slot.util .ico { position: absolute; inset: 0; display: grid; place-items: center; font-size: 24px; padding-bottom: 8px; }
.slot.util .nm { font-size: 10px; }
.slot.dash .pips { position: absolute; left: 6px; right: 6px; bottom: 16px; display: flex; gap: 3px; z-index: 4; }
.slot.dash .pips i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255,255,255,.18); overflow: hidden; display: block; }
.slot.dash .pips i b { display: block; height: 100%; background: #7fd8ff; }
.slot.flash { animation: slotFlash .25s; }
@keyframes slotFlash { 50% { transform: scale(.9); filter: brightness(1.7); } }
.slot.deny { animation: deny .25s; }
@keyframes deny { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.slot.ready-pop { animation: readyPop .4s; }
@keyframes readyPop { 50% { box-shadow: 0 0 24px var(--rc); transform: scale(1.1) translateY(-4px); } }
.slot.sealed::after { content: 'SEALED'; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(120,0,90,.6); font-size: 13px; font-weight: 900; z-index: 7; }
.self-box { position: absolute; bottom: 18px; left: 18px; width: 300px; }
.self-box .nm { font-family: 'Lilita One'; font-size: 20px; margin-bottom: 4px; text-shadow: 0 2px 3px #000; }
.hpbar { height: 24px; border-radius: 12px; background: rgba(10,14,35,.85); border: 2px solid rgba(255,255,255,.2); position: relative; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.hpbar .fill { position: absolute; inset: 0; width: 100%; background: linear-gradient(180deg, #7cf7a8, #22b35e); transition: width .15s; }
.hpbar .lag { position: absolute; inset: 0; width: 100%; background: #ffd86b; transition: width .6s .25s; }
.hpbar .sh { position: absolute; top: 0; bottom: 0; background: rgba(160,220,255,.85); }
.hpbar .txt { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 13px; text-shadow: 0 1px 2px #000; }
.statuses { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.statuses span { font-size: 12px; padding: 2px 7px; border-radius: 7px; background: rgba(10,14,35,.8); border: 1px solid rgba(255,255,255,.15); }
.passives { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }
.passives .chip { width: 34px; height: 34px; overflow: hidden; }
.passives .chip img { width: 100%; height: 100%; object-fit: cover; }
.killfeed { position: absolute; top: 14px; right: 16px; display: flex; flex-direction: column; gap: 5px; align-items: flex-end; }
.killfeed div { background: rgba(10,14,35,.78); padding: 5px 12px; border-radius: 10px; font-size: 14px; animation: pop .3s; }
.killfeed .ko { font-family: 'Lilita One'; color: #ffcc33; margin: 0 4px; }
.banner { position: absolute; top: 26%; left: 0; right: 0; text-align: center; font-family: 'Lilita One'; font-size: 84px; text-shadow: 0 6px 0 rgba(0,0,0,.45), 0 0 30px rgba(0,0,0,.4); animation: bannerIn .45s cubic-bezier(.2,1.6,.4,1); }
.banner small { display: block; font-size: 24px; font-family: Nunito; font-weight: 900; }
@keyframes bannerIn { from { transform: scale(2.2); opacity: 0; } }
.tag { position: absolute; left: 0; top: 0; text-align: center; white-space: nowrap; will-change: transform; }
.tag .n { font-size: 13px; font-weight: 900; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.tag .bar { width: 80px; height: 8px; border-radius: 4px; background: rgba(0,0,0,.6); margin: 2px auto 0; overflow: hidden; position: relative; border: 1px solid rgba(0,0,0,.6); }
.tag .bar.small { width: 46px; height: 5px; }
.tag .bar b { position: absolute; left: 0; top: 0; bottom: 0; transition: width .12s; }
.tag .bar s { position: absolute; top: 0; bottom: 0; background: rgba(170,225,255,.9); }
.tag .st { font-size: 15px; height: 18px; filter: drop-shadow(0 1px 1px #000); }
.tag .cast { height: 14px; width: 96px; margin: 3px auto 0; background: rgba(0,0,0,.55); border-radius: 4px; overflow: hidden; position: relative; }
.tag .cast b { display: block; height: 100%; background: linear-gradient(90deg, #fff27a, #ffb02e); }
.tag .cast span { position: absolute; inset: 0; font-size: 10px; line-height: 14px; color: #fff; text-shadow: 0 1px 2px #000; }
.dmgnum { position: absolute; left: 0; top: 0; font-family: 'Lilita One'; font-size: 24px; text-shadow: 0 2px 0 #000, 0 0 4px #000; pointer-events: none; white-space: nowrap; will-change: transform; }
.dmgnum.big { text-shadow: 0 3px 0 #000, 0 0 10px rgba(255,120,0,.8); }
.hint { position: absolute; bottom: 120px; left: 50%; transform: translateX(-50%); font-size: 15px; color: #fff; background: rgba(10,14,35,.7); padding: 6px 14px; border-radius: 10px; white-space: nowrap; }
.spec { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); font-size: 16px; background: rgba(10,14,35,.7); padding: 6px 14px; border-radius: 10px; }
.callout { position: absolute; top: 15%; left: 50%; transform: translateX(-50%); font-size: 22px; padding: 6px 18px; border-radius: 12px; background: linear-gradient(90deg, transparent, rgba(10,14,35,.8) 20%, rgba(10,14,35,.8) 80%, transparent); opacity: 0; white-space: nowrap; }
.callout b { font-family: 'Lilita One'; font-weight: 400; color: #ffb02e; font-size: 26px; }
.callout.show { animation: callout 1.6s ease-out; }
@keyframes callout { 0% { opacity: 0; transform: translateX(-50%) scale(1.4); } 12% { opacity: 1; transform: translateX(-50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }
.fps { position: absolute; top: 8px; left: 10px; font-size: 13px; color: #9f9; text-shadow: 0 1px 2px #000; }
.menu { position: absolute; inset: 0; background: rgba(5,8,25,.55); backdrop-filter: blur(3px); display: grid; place-items: center; pointer-events: auto; animation: fadeIn .2s; }
.menu .panel { width: min(470px, 92vw); display: flex; flex-direction: column; gap: 12px; }
.menu label { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.menu input[type=range], .pref-box input[type=range] { width: 160px; accent-color: var(--gold); padding: 0; }
.results-wrap { background: rgba(5,8,25,.7); }
.vignette { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px rgba(255,0,30,0); transition: box-shadow .3s; }
.vignette.hurt { box-shadow: inset 0 0 150px rgba(255,0,30,.55); transition: none; }
.lowhp .vignette { box-shadow: inset 0 0 110px rgba(255,0,30,.35); }
.screenflash, .blindfx { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
.blindfx { background: radial-gradient(circle, #fff 0%, #fffbe8 60%, #ffe9a8 100%); }
.chat-in { position: absolute; left: 16px; bottom: 150px; width: 320px; }
/* key bindings */
.binds { width: min(760px, 100%); }
.bind-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; overflow: auto; }
.bind-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.bind-keys { display: flex; gap: 6px; }
.bind { min-width: 62px; padding: 4px 10px; font-size: 13px; border-radius: 8px; background: rgba(255,255,255,.08); border: 1px solid var(--line); }
.bind.listen { background: var(--gold); color: #3a2000; }
.loading { margin-top: 32vh; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.loading .bar { width: 320px; height: 12px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.loading .bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd34d, #ff9f1a); width: 0; transition: width .2s; }

/* ---------- results ---------- */
.results { width: min(900px, 100%); }
.results h1 { font-size: 64px; text-align: center; }
.results table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.results td, .results th { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; }
.results th { color: var(--mute); font-size: 13px; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; }
#toast div { background: #222a55; border: 1px solid var(--line); padding: 10px 18px; border-radius: 12px; animation: pop .3s; }
.chat { position: absolute; left: 16px; bottom: 150px; width: 320px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.chat div { background: rgba(10,14,35,.55); padding: 3px 8px; border-radius: 7px; width: fit-content; }

@media (max-width: 1000px) {
  .lobby { grid-template-columns: 1fr; }
  .auction { grid-template-columns: 1fr; height: auto; }
  .logo { font-size: 52px; }
}

.screen { animation: fadeIn .35s ease-out; }
.auction { animation: fadeIn .35s ease-out; }
.results-wrap .panel.results { width: min(820px, 94vw); }
