/* =========================================================================
   ONLINE (js/ui/lobby.js) — online menu, lobby, in-match online HUD
   ========================================================================= */
.btn.online-btn { color: #ffd8a8; }
.ol-wrap { flex: 1; min-height: 0; display: flex; justify-content: center; align-items: flex-start; overflow-y: auto; }
.ol-card { width: min(34rem, 100%); padding: .8rem 1.3rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; animation: popIn .35s ease-out; }
.ol-card .btn.big { align-self: flex-start; }
.ol-note, .ol-fine { font-size: 1.1rem; color: #b9ad94; }
.ol-fine { font-size: 1rem; color: var(--dim); margin-top: .6rem; border-left: 2px solid var(--line2); padding-left: .5rem; }
input.ol-name { flex: 1; font-size: 1.3rem; }
.ol-join { display: flex; gap: .5rem; align-items: center; }
input.ol-code { width: 9rem; font-family: var(--fh); font-size: 1.3rem; letter-spacing: .3em; text-transform: uppercase; text-align: center; padding: .35rem .4rem; }
.ol-err { min-height: 1.3rem; color: #ffb4a0; font-size: 1.15rem; }

.lobby-screen { padding-bottom: 1rem; }
.lb-code { display: flex; align-items: center; gap: .6rem; margin: -.4rem 0 .7rem; padding: .4rem .8rem; background: linear-gradient(90deg, rgba(120,30,20,.35), rgba(0,0,0,.25)); box-shadow: inset 0 0 0 1px #4a2a22; clip-path: var(--chamfer-s); animation: slideDown .35s ease-out; }
.lb-code-l { font-family: var(--fh); font-size: .55rem; color: var(--dim); letter-spacing: .15em; }
.lb-code-v { font-family: var(--fh); font-weight: 700; font-size: 1.7rem; letter-spacing: .32em; color: #ffd36a; text-shadow: 0 .12rem 0 #5a3a08, 0 0 1rem rgba(255,200,80,.35); user-select: text; -webkit-user-select: text; }
.lb-phase { font-family: var(--fh); font-size: .55rem; color: var(--gold); letter-spacing: .12em; animation: pulse 1s infinite alternate; }
.lb-conn { display: inline-flex; align-items: center; gap: .35rem; font-size: 1.05rem; color: var(--dim); }
.lb-dot { width: .6rem; height: .6rem; border-radius: 50%; background: #777; box-shadow: 0 0 0 2px #000; }
.lb-dot.ok { background: #79c25a; box-shadow: 0 0 0 2px #000, 0 0 .4rem #79c25a; }
.lb-dot.wait { background: #e0b23a; animation: pulse .6s infinite alternate; }
.lb-dot.bad { background: #e0503c; }
.lobby-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.15fr 1fr; gap: 1rem; }
.lobby-col { overflow-y: auto; padding: .4rem 1rem .9rem; display: flex; flex-direction: column; }
.lb-slots { display: flex; flex-direction: column; gap: .3rem; }
.lb-slot { --fc: #888; display: flex; align-items: center; gap: .5rem; padding: .3rem .5rem; min-height: 2.9rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--fc) 20%, #141015), rgba(0,0,0,.25)); box-shadow: inset 0 0 0 1px #2e2428, inset .25rem 0 0 var(--fc); }
.lb-slot.lb-new { animation: slideRight .25s ease-out; }
.lb-slot.me { box-shadow: inset 0 0 0 1px #6a5a32, inset .3rem 0 0 var(--fc); }
.lb-slot.off { filter: grayscale(.7) brightness(.8); }
.lb-slot i.chip { width: .9rem; height: .9rem; flex: none; }
.lb-ico { width: 2.2rem; height: 2.2rem; flex: none; }
.lb-rand { display: inline-flex; align-items: center; justify-content: center; font-family: var(--fh); font-size: 1rem; color: var(--dim); background: radial-gradient(circle, #2a2226, #0e0b0d 75%); box-shadow: inset 0 0 0 1px #3c3034; }
.lb-who { display: flex; flex-direction: column; min-width: 0; }
.lb-who-top { display: flex; align-items: center; gap: .4rem; }
.lb-name { color: var(--bone); font-size: 1.2rem; }
input.lb-name-in { width: 9rem; font-size: 1.15rem; padding: .05rem .3rem; }
.lb-fac-name { font-size: 1rem; color: var(--dim); }
.lb-slot select.sel { font-size: 1rem; }
.lb-tags { display: inline-flex; gap: .25rem; }
.lb-tag { font-style: normal; font-family: var(--fh); font-size: .42rem; letter-spacing: .08em; padding: .08rem .3rem; background: rgba(0,0,0,.5); color: var(--dim); box-shadow: inset 0 0 0 1px #3a2e2a; }
.lb-tag.host { color: #ffd36a; box-shadow: inset 0 0 0 1px #6a5020; }
.lb-tag.you { color: #c8ff9a; box-shadow: inset 0 0 0 1px #3f5a2a; }
.lb-tag.off { color: #ffb4a0; }
.lb-team { font-family: var(--fh); font-size: .5rem; color: var(--dim); letter-spacing: .1em; }
.lb-ready { font-family: var(--fh); font-size: .5rem; letter-spacing: .1em; min-width: 3.4rem; text-align: center; }
.lb-ready.ok { color: #9ae070; }
.lb-ready.no { color: #6a6050; }
.lb-ready.host { color: #ffd36a; font-size: .9rem; }
.btn.lb-x { padding: .2rem .4rem; color: #ffb4a0; }
.lb-slot-foot { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; font-size: 1rem; }
.lb-fac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(7.6rem, 1fr)); gap: .25rem; }
.lb-ftile { --fc: #888; cursor: pointer; display: flex; align-items: center; gap: .3rem; padding: .2rem .3rem; min-height: 2.5rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--fc) 16%, #17131a), #141015); box-shadow: inset 0 0 0 1px #33282c, inset .2rem 0 0 var(--fc); transition: filter .1s; }
.lb-ftile:hover { filter: brightness(1.3); }
.lb-ftile.on { box-shadow: inset 0 0 0 2px var(--fc), inset .3rem 0 0 var(--fc), 0 0 .8rem color-mix(in srgb, var(--fc) 40%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--fc) 35%, #17131a), #1c1519); }
.lb-ftile b { font-weight: normal; font-size: .98rem; line-height: .95; color: var(--bone); }
.lb-ftile .lb-ico { width: 1.9rem; height: 1.9rem; }
.swatch.taken { opacity: .25; cursor: not-allowed; }
.lb-fdetail { margin-top: .5rem; padding: .5rem .7rem; background: rgba(0,0,0,.25); box-shadow: inset 0 0 0 1px #2e2428; border-left: 2px solid var(--fc); }
.lb-fd-top { display: flex; align-items: center; gap: .6rem; }
.lb-fdetail .fd-name { font-size: 1.15rem; }
.lb-fdetail .fd-title { font-size: 1.1rem; }
.lb-rv { color: var(--bone); font-size: 1.15rem; }
.lb-chat { display: flex; flex-direction: column; gap: .3rem; min-height: 8rem; flex: 1; }
.lb-chat-list { flex: 1; min-height: 6rem; max-height: 12rem; overflow-y: auto; padding: .3rem .4rem; background: rgba(0,0,0,.35); box-shadow: inset 0 0 0 1px #2e2428; font-size: 1.1rem; user-select: text; -webkit-user-select: text; }
.lb-msg { line-height: 1.15; }
.lb-msg b { font-weight: normal; }
.lb-msg.sys { color: var(--dim); font-style: italic; }
input.lb-chat-in { width: 100%; }
.lb-status { font-size: 1.15rem; color: var(--dim); margin-left: .6rem; }
.btn.start.dim-start { filter: saturate(.5) brightness(.85); }

/* in-match online HUD */
.net-hud { position: absolute; left: 50%; top: 3.1rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .3rem; pointer-events: none; z-index: 30; width: min(46rem, 80vw); }
.nh-strip { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: .25rem .55rem; padding: .12rem .6rem; background: rgba(8,6,9,.72); box-shadow: inset 0 0 0 1px #3a2e2a; font-size: .98rem; color: var(--dim); clip-path: var(--chamfer-s); }
.nh-tag { font-family: var(--fh); font-size: .42rem; letter-spacing: .14em; color: var(--rust2); }
.nh-p { display: inline-flex; align-items: center; gap: .25rem; color: var(--bone); }
.nh-p.off, .nh-p.left { color: #ffb4a0; }
.nh-p.ai { color: var(--dim); }
.nh-p.sync { color: var(--gold); }
.nh-pd { width: .55rem; height: .55rem; box-shadow: 0 0 0 1px #000; }
.nh-ping { font-family: var(--fh); font-size: .42rem; letter-spacing: .1em; color: #9ae070; }
.nh-ping.warn { color: var(--gold); }
.nh-ping.bad { color: #ff6a50; }
.nh-banner { display: none; align-items: center; gap: .6rem; padding: .35rem .9rem; font-family: var(--fh); font-size: .62rem; letter-spacing: .1em; color: var(--bone); background: rgba(10,8,12,.85); box-shadow: inset 0 0 0 1px var(--line2), 0 .3rem .8rem rgba(0,0,0,.5); pointer-events: auto; animation: slideDown .25s ease-out; }
.nh-banner.show { display: flex; }
.nh-banner.pause { color: #ffd36a; box-shadow: inset 0 0 0 2px #6a5020; }
.nh-banner.warn { color: var(--gold); }
.nh-banner.bad { color: #ff8a70; box-shadow: inset 0 0 0 2px #6a2020; animation: pulse .7s infinite alternate; }
.nh-banner.deploy { color: #c8ff9a; }
.nh-feed { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: 1.12rem; text-shadow: 0 1px 0 #000, 1px 0 0 #000, 0 0 .4rem #000; }
.nh-feed .lb-msg { padding: 0 .4rem; background: rgba(0,0,0,.35); }
.nh-chat { display: none; width: 100%; pointer-events: auto; }
.nh-chat.open { display: block; }
input.nh-chat-in { width: 100%; font-size: 1.15rem; padding: .3rem .5rem; background: rgba(8,6,9,.92); }
.nh-cover { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(4,3,6,.72); z-index: 60; pointer-events: auto; }
.nh-cover.show { display: flex; }
.nh-cover-box { width: min(26rem, 86vw); padding: 1rem 1.3rem; text-align: center; }
.nh-cover-t { font-family: var(--fh); font-size: 1rem; color: var(--bone); letter-spacing: .1em; animation: pulse .8s infinite alternate; }
.nh-cover-bar { height: .6rem; margin: .7rem 0 .4rem; background: #0e0b0e; box-shadow: inset 0 0 0 1px #4a3a32; }
.nh-cover-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--rust), var(--rust2)); transition: width .2s; }
.nh-cover-s { color: var(--dim); font-size: 1.1rem; }
@media (max-width: 900px) {
  .lobby-wrap { grid-template-columns: 1fr; overflow-y: auto; }
  .lobby-col { overflow: visible; }
}
