/* ===== Giai đoạn 2: khu sân, online ===== */
.tright { display: flex; gap: 8px; align-items: center; }
.acct { padding: 8px 14px; }
.enter { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 100%; max-width: 760px; margin-bottom: 12px; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, #c6ff3a, #6fe08a); color: #0b1a10; font-family: var(--fh); font-weight: 800; font-size: 1.7rem; box-shadow: 0 12px 34px #c6ff3a50; transition: transform .15s; }
.enter small { color: #1d3b17; font-family: var(--fb); font-size: .85rem; font-weight: 600; }
.enter:hover { transform: translateY(-3px); } .enter:active { transform: scale(.98); }
.ibtn { width: 44px; height: 44px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); font-size: 1.2rem; backdrop-filter: blur(10px); }
#hubhud { position: fixed; inset: 0; pointer-events: none; z-index: 4; }
#hubhud > * { pointer-events: auto; }
.hh-top { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; pointer-events: none !important; }
.hh-top > * { pointer-events: auto; }
.chip.online { padding: 8px 12px; font-size: .8rem; color: #9aa3c8; }
.chip.online.on { color: var(--lime); }
.travel { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 6px; }
.travel button { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 10px; border-radius: 14px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(10px); font-size: 1.05rem; text-align: left; transition: transform .12s, background .12s; }
.travel button span { font-size: .8rem; font-weight: 600; }
.travel button:hover { transform: translateX(-4px); background: rgba(40, 46, 90, .85); }
.zprompt { position: absolute; left: 50%; bottom: 120px; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 12px; border-radius: 18px; background: #0b0f24e6; border: 2px solid var(--lime); box-shadow: 0 0 30px #c6ff3a55; text-align: left; }
.zprompt i { font-style: normal; font-size: 1.8rem; }
.zprompt b { display: block; font-family: var(--fh); font-size: 1.25rem; line-height: 1; }
.zprompt small { color: var(--mut); }
.zprompt kbd { font-size: 1rem; padding: 4px 10px; background: var(--lime); color: #0b1a10; }
.touchdev .zprompt kbd { display: none; }
.touchdev .zprompt { bottom: 190px; }
.roombar { position: absolute; left: 50%; top: max(64px, calc(env(safe-area-inset-top) + 56px)); transform: translateX(-50%); padding: 8px 14px; border-radius: 14px; background: #ffb35acc; color: #1a1000; font-weight: 700; font-size: .88rem; cursor: pointer; }
#bubbles { position: fixed; inset: 0; pointer-events: none; z-index: 3; }
.bub { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.bub .nm { font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: #0009; color: #cfe3ff; white-space: nowrap; }
.bub.me .nm { color: var(--lime); }
.bub .tx { max-width: 220px; padding: 5px 10px; border-radius: 12px; background: #fff; color: #111; font-weight: 600; font-size: .85rem; box-shadow: 0 4px 14px #0005; word-wrap: break-word; text-align: center; }
#chat { position: fixed; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 6; width: min(360px, 60vw); }
#chat .log { max-height: 150px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; font-size: .84rem; text-shadow: 0 1px 3px #000; }
#chat .log p { margin: 0; padding: 2px 8px; border-radius: 8px; background: #0006; width: fit-content; max-width: 100%; }
#chat .log b { color: var(--lime); }
#chat .log p.sys { color: #ffd25a; }
#chat form { display: flex; gap: 6px; }
#chat input { flex: 1; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: #0b0f24cc; color: #fff; font: 500 .9rem var(--fb); outline: none; }
#chat button { width: 40px; border-radius: 12px; background: var(--lime); color: #0b1a10; font-weight: 800; }
.touchdev #chat { left: auto; right: 12px; bottom: auto; top: 64px; width: min(280px, 45vw); }
.touchdev #chat .log { max-height: 80px; }
.emotebar { position: fixed; right: 12px; top: 64px; z-index: 6; display: flex; flex-direction: column; gap: 4px; }
.emotebar button { padding: 6px 10px; border-radius: 10px; background: var(--glass); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; text-align: left; }
.emotebar button small { color: var(--mut); margin-right: 4px; }
.touchdev .emotebar { top: auto; bottom: 230px; flex-direction: row; flex-wrap: wrap; max-width: 220px; justify-content: flex-end; }
.touchdev .emotebar button small { display: none; }
body.hubmode #hud .score, body.hubmode #hud .hbtns, body.hubmode #hud .status, body.hubmode #hud .tbtns, body.hubmode #hud .htag, body.hubmode #hud .serveHint, body.hubmode #hud .timer, body.hubmode #hud .streak, body.hubmode #hud .banner, body.hubmode #hud .shotpop { display: none !important; }
.x { font-size: 1rem; flex: none; }
.aform { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.err { color: #ff8a8a; margin: 0; min-height: 1.2em; font-size: .88rem; font-weight: 600; }
.codejoin { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.codejoin input { width: 130px; text-transform: uppercase; letter-spacing: .2em; font-family: var(--fh); font-weight: 800; }
.code { font-family: var(--fh); letter-spacing: .15em; color: var(--lime); }
.seats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.seat { padding: 14px; border-radius: 16px; border: 2px dashed #ffffff30; background: #ffffff08; display: flex; align-items: center; gap: 10px; min-height: 70px; text-align: left; }
.seat.t0 { border-color: #ffb35a77; } .seat.t1 { border-color: #7dd3ff77; }
.seat.full { border-style: solid; background: #ffffff12; }
.seat.me { box-shadow: 0 0 0 3px #c6ff3a66; }
.seat .face { width: 40px; height: 40px; border-radius: 50%; position: relative; overflow: hidden; flex: none; border: 3px solid #fff3; background: #444; }
.seat .face::after { content: ''; position: absolute; left: 50%; top: 20%; width: 48%; height: 48%; transform: translateX(-50%); border-radius: 50%; background: var(--skin, #e0ac82); }
.seat b { display: block; font-family: var(--fh); font-size: 1.05rem; }
.seat small { display: block; }
.ebtns.row { flex-direction: row; flex-wrap: wrap; } .ebtns.row > * { flex: 1; min-width: 120px; margin: 0; }
.lb { list-style: none; padding: 0; margin: 12px 0 0; max-height: 52vh; overflow-y: auto; }
.lb li { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px; }
.lb li:nth-child(odd) { background: #ffffff08; }
.lb li .rk { width: 30px; font-family: var(--fh); font-weight: 800; font-size: 1.2rem; color: var(--mut); }
.lb li:nth-child(1) .rk { color: #ffd24a; } .lb li:nth-child(2) .rk { color: #d9e2ef; } .lb li:nth-child(3) .rk { color: #ff9a5a; }
.lb li .nm { flex: 1; font-weight: 700; } .lb li .sc { font-family: var(--fh); font-weight: 800; font-size: 1.15rem; color: var(--lime); }
.lb li.me { box-shadow: inset 0 0 0 2px #c6ff3a66; }
.results { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.results div { display: flex; justify-content: space-between; padding: 6px 12px; border-radius: 10px; background: #ffffff0c; font-weight: 600; }
.results .up { color: var(--lime); } .results .down { color: #ff8a8a; }
.coachbox { position: fixed; right: 12px; top: 70px; z-index: 6; width: min(340px, 44vw); padding: 14px 16px; border-radius: 18px; background: #0b0f24e8; border: 1px solid var(--line); box-shadow: 0 16px 40px #0008; backdrop-filter: blur(10px); }
.cb-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.cb-head b { font-family: var(--fh); font-size: 1.2rem; line-height: 1.1; }
.step { padding: 2px 8px; border-radius: 99px; background: var(--lime); color: #0b1a10; font-weight: 800; font-size: .72rem; white-space: nowrap; }
.coachbox p { margin: 0 0 8px; font-size: .86rem; line-height: 1.5; color: #dfe4ff; }
.cb-keys { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; font-size: .8rem; }
.cb-prog { height: 6px; border-radius: 6px; background: #ffffff18; overflow: hidden; }
.cb-prog i { display: block; height: 100%; width: 0; background: var(--lime); transition: width .3s; }
.cb-fb { margin-top: 8px !important; font-weight: 700; min-height: 1.2em; }
.cb-fb.ok { color: var(--lime); } .cb-fb.bad { color: #ff8a8a; }
.touchdev .coachbox { top: 56px; width: min(300px, 50vw); padding: 10px 12px; }
.touchdev .coachbox p { font-size: .76rem; }
@media (max-width: 720px) {
  .travel { top: auto; bottom: 200px; transform: none; flex-direction: row; flex-wrap: wrap; justify-content: flex-end; max-width: 60vw; }
  .travel button span { display: none; }
}
@media (max-height: 520px) {
  .travel { top: 60px; transform: none; flex-direction: row; right: auto; left: 50%; translate: -50% 0; }
  .travel button { padding: 6px 8px; } .travel button span { display: none; }
  .enter { font-size: 1.3rem; padding: 10px; } .enter small { display: none; }
  .seats { grid-template-columns: repeat(4, 1fr); }
  .zprompt, .touchdev .zprompt { bottom: 14px; padding: 6px 12px; }
  .zprompt i { font-size: 1.4rem; } .zprompt b { font-size: 1.05rem; }
}
