* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0c140f; font-family: 'Segoe UI', Tahoma, sans-serif; color: #f3e6c8; user-select: none; }
#cv { position: fixed; inset: 0; display: block; }
.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
.big { background: linear-gradient(#8a6233, #5e3f1d); color: #ffeec4; border: 2px solid #c9a35a; border-radius: 10px; padding: 10px 22px; font-size: 17px; font-weight: 700; text-shadow: 0 1px 2px #000; box-shadow: 0 3px 0 #2b1b0b; margin: 6px; }
.big:hover { filter: brightness(1.12); }
.big.red { background: linear-gradient(#c2452f, #7c2216); border-color: #f0b25a; }

#topbar { position: fixed; top: 0; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; align-items: center; background: linear-gradient(#3a2914, #24180b); border: 2px solid #8a6a3a; border-top: 0; border-radius: 0 0 14px 14px; padding: 6px 14px; box-shadow: 0 4px 14px rgba(0,0,0,.5); }
.tr { min-width: 92px; font-size: 16px; padding: 2px 8px; }
.tr.warn b { color: #ff7a6a; }
.tbtn { background: #4a3518; color: #ffeec4; border: 1px solid #8a6a3a; border-radius: 8px; padding: 4px 10px; font-size: 14px; }

#bottom { position: fixed; left: 0; right: 0; bottom: 0; height: 176px; display: flex; gap: 10px; padding: 6px 10px; background: linear-gradient(#3a2914, #1c1208); border-top: 3px solid #8a6a3a; box-shadow: 0 -4px 14px rgba(0,0,0,.5); }
.mm { width: 168px; height: 168px; border: 2px solid #8a6a3a; background: #000; flex: none; }
#minimap { width: 164px; height: 164px; display: block; cursor: pointer; }
#info { flex: 1; background: rgba(0,0,0,.3); border: 2px solid #5e4520; border-radius: 10px; padding: 10px 14px; overflow: hidden; }
#card { width: 236px; flex: none; display: grid; grid-template-columns: repeat(4, 54px); grid-template-rows: repeat(3, 52px); gap: 4px; }
.cbtn { position: relative; background: linear-gradient(#5a4226, #2e2010); border: 2px solid #a8844a; border-radius: 8px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.cbtn:hover { border-color: #ffe27a; filter: brightness(1.15); }
.cbtn.empty { background: rgba(0,0,0,.25); border-color: #3e2e16; cursor: default; }
.cbtn.off { filter: grayscale(.7) brightness(.65); }
.cbtn canvas { width: 44px; height: 44px; }
.ctxt { font-size: 24px; }
.ccd { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); font-size: 20px; font-weight: 800; color: #fff; border-radius: 6px; }
.clvl { position: absolute; bottom: 0; right: 3px; font-size: 7px; color: #ffd23a; letter-spacing: 1px; }
.hpbar.mp div { background: linear-gradient(#5a9aff, #2a5ad0); }
.hpbar.xp { height: 10px; } .hpbar.xp div { background: linear-gradient(#c9a0ff, #7a4ad0); } .hpbar.xp span { font-size: 9px; line-height: 9px; }
.ckey { position: absolute; top: 1px; left: 3px; font-size: 10px; font-weight: 800; color: #ffe27a; text-shadow: 0 1px 2px #000; }
#tip { position: fixed; width: 280px; background: rgba(20,14,8,.96); border: 2px solid #c9a35a; border-radius: 10px; padding: 8px 12px; font-size: 13px; z-index: 20; pointer-events: none; }
#tip b { color: #ffe2a0; font-size: 15px; }
#tip .tk { color: #c9b590; }
#tip .tc { margin: 4px 0; }
#tip .td { color: #d9c9a8; }
.bad { color: #ff8a70; }
.muted { color: #b5a07a; font-size: 13px; }

.ihead { display: flex; gap: 14px; align-items: center; }
.ihead canvas { width: 64px; height: 64px; background: rgba(0,0,0,.35); border: 2px solid #6e5228; border-radius: 8px; }
.iname { font-size: 18px; font-weight: 800; color: #ffe2a0; }
.iname span { font-size: 13px; }
.hpbar { position: relative; width: 260px; height: 16px; background: #2a1a10; border: 1px solid #5e4520; border-radius: 4px; margin: 5px 0; overflow: hidden; }
.hpbar div { height: 100%; background: linear-gradient(#5bd15b, #2e8a2e); }
.hpbar span { position: absolute; inset: 0; text-align: center; font-size: 11px; line-height: 15px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.istat { font-size: 13px; color: #d9c9a8; }
.queue { display: flex; gap: 5px; margin-top: 10px; }
.qi { position: relative; border: 2px solid #6e5228; border-radius: 6px; cursor: pointer; width: 38px; height: 38px; }
.qi:hover { border-color: #f08f7a; }
.qprog { position: absolute; bottom: 0; left: 0; right: 0; height: 4px; background: #2a1a10; }
.qprog div { height: 100%; background: #e0b43c; }
.mgrid { display: flex; flex-wrap: wrap; gap: 3px; max-height: 130px; overflow: hidden; }
.mi.sm { width: 30px; height: 33px; } .mi.sm canvas { width: 26px; height: 26px; }
.mi { width: 40px; height: 44px; border: 2px solid #6e5228; border-radius: 6px; cursor: pointer; position: relative; }
.mi canvas { width: 36px; height: 36px; display: block; }
.mhp { height: 4px; background: #2a1a10; } .mhp div { height: 100%; }

#msgs { position: fixed; bottom: 190px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.gmsg { font-size: 17px; font-weight: 700; color: #ffd0a0; text-shadow: 0 2px 4px #000, 0 0 2px #000; }
.gmsg.good { color: #b8ffb0; }

#lobby, #result, #menu, #profile { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, rgba(40,60,35,.85), rgba(5,10,8,.97)); z-index: 30; }
.lbox { background: linear-gradient(#3a2914, #24180b); border: 3px solid #c9a35a; border-radius: 18px; padding: 24px 34px; width: min(760px, 94vw); text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.7); }
.lbox.small { width: 420px; }
.lbox h1 { margin: 0; font-size: 42px; letter-spacing: 8px; color: #e8c16a; text-shadow: 0 3px 0 #3a250e; }
.lsub { font-size: 18px; color: #c9b083; margin-bottom: 14px; letter-spacing: 3px; }
.lsect { text-align: left; font-weight: 800; color: #ffd98a; margin: 10px 0 6px; }
.slot { display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,.28); border: 1px solid #5e4520; border-radius: 10px; padding: 8px 12px; margin-bottom: 6px; }
.sw { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #000; }
.sname { width: 90px; text-align: left; font-weight: 700; }
.slot select { flex: 1; background: #2a1d10; color: #ffeec4; border: 1px solid #8a6a3a; border-radius: 6px; padding: 6px; font-size: 15px; }
.slot select:last-child { flex: none; width: 130px; }
.lrow { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.netrow { display: flex; gap: 8px; align-items: center; }
.netrow input { flex: 1; background: #2a1d10; color: #ffeec4; border: 1px solid #8a6a3a; border-radius: 6px; padding: 8px; font-size: 16px; text-transform: uppercase; letter-spacing: 3px; }
.big.small { padding: 8px 14px; font-size: 15px; }
#net-code { margin: 8px 0; font-size: 18px; } #net-code b { font-size: 26px; letter-spacing: 6px; color: #ffe27a; }
#net-status { min-height: 18px; margin: 4px 0 6px; }
.swho { flex: 1; text-align: left; } .steam { width: 130px; color: #c9b590; }
.lbox { max-height: 94vh; overflow: auto; }
.pstats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; text-align: left; margin: 6px 0; }
.rs { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(201,163,90,.2); padding: 3px 0; font-size: 14px; } .rs b { color: #ffe2a0; }
.achs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; text-align: left; }
.ach { display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,.28); border: 1px solid #4a3818; border-radius: 10px; padding: 8px 10px; opacity: .5; filter: grayscale(1); }
.ach.on { opacity: 1; filter: none; border-color: #c9a35a; background: rgba(201,163,90,.12); }
.ach .ai { font-size: 30px; } .ach small { color: #c9b590; }
.apr { height: 5px; background: #2a1a10; border-radius: 3px; margin: 4px 0 2px; overflow: hidden; } .apr div { height: 100%; background: #c9a035; }
.pname { text-align: left; margin: 8px 0; } .pname input { background: #2a1d10; color: #ffeec4; border: 1px solid #8a6a3a; border-radius: 6px; padding: 6px 10px; font-size: 16px; }
.help { text-align: left; font-size: 13px; color: #d9c9a8; line-height: 1.55; margin-top: 12px; background: rgba(0,0,0,.25); border-radius: 10px; padding: 10px 14px; }
#res-sub { color: #d9c9a8; }

#mapsel { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
#mapsel .mdesc { flex-basis: 100%; }
