/* ชิป "🔴 กำลังไลฟ์ N" + แผ่นรายชื่อ + แผ่นยืนยันของอินฟลู (client/cheer-livechip.js · PROGRESS-LIVECHIP.md)
   จอสัมผัส: ชิปอยู่ในโซน HUD (ui-root.js ZONES — ไม่ตั้งตำแหน่งเองที่นี่) · คอม: วางเองซ้ายมินิแมพ
   ตัวหนังสือ var(--fs-*) เท่านั้น (server/ui-scale.test.js) · ปุ่ม ≥ 44px · ไม่มี animation infinite (จุดแดงนิ่ง) */
#live-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 260px; padding: 0 12px 0 10px; border: 0; border-radius: 22px;
  background: linear-gradient(#fffdf6, #fbefd2); box-shadow: inset 0 0 0 1.5px #e3cf9e, 0 2px 8px #0003; color: #493820; font: inherit; font-size: var(--fs-sm, 14px);
  cursor: pointer; pointer-events: auto; white-space: nowrap; }
#live-chip[hidden] { display: none; }
#live-chip .lc-n { font-weight: 800; color: #b5443a; }
#live-chip .lc-who { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
#live-chip .lc-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; font-weight: 700; }
#live-chip .lc-ic, #live-sheet .lc-ic { width: 1.25em; height: 1.25em; flex: 0 0 auto; }
.lc-dot { display: inline-block; width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: #e0574b; box-shadow: 0 0 0 3px #e0574b33; }
#live-chip:hover { box-shadow: inset 0 0 0 1.5px #e8b64a, 0 2px 10px #0004; }
#live-chip:focus-visible { outline: 2px solid #2f6f73; outline-offset: 2px; }

/* คอม: ซ้ายของมินิแมพ แถวบนสุด (ไม่ชนแผงแฟนตัวยงของอินฟลูที่อยู่ใต้มินิแมพ) */
html:not(.touch-ui) #live-chip { position: fixed; z-index: var(--z-hud, 100); top: 8px; right: calc(var(--lc-map-w, 220px) + 8px); }
/* จอสัมผัส: กะทัดรัด — ชื่อสั้นลง (เต็มอยู่ในแผ่นรายชื่อ) */
html.touch-ui #live-chip { min-height: 48px; max-width: min(240px, 36vw); padding: 0 10px 0 8px; gap: 5px; }
html.touch-ui #live-chip .lc-n { font-size: var(--fs-xs, 12px); }
#live-chip .lc-ts { display: none; }
/* ที่แคบ (JS fit วัดช่องจริง): lc-mid = "● ไลฟ์ 3" ไม่มีชื่อ · lc-min = "● 3" */
#live-chip.lc-mid .lc-who, #live-chip.lc-mid .lc-tl, #live-chip.lc-min .lc-who, #live-chip.lc-min .lc-tl, #live-chip.lc-min .lc-ts { display: none; }
#live-chip.lc-mid .lc-ts { display: inline; }
/* อินฟลูที่เปิดโหมดไลฟ์อยู่ (จอตัวเองมีชิปแฟนตัวยงใต้มินิแมพ) = ไม่ต้องเห็นชิปนี้ซ้อน */
html.touch-ui #hud #live-chip.lc-self, html:not(.touch-ui) #live-chip.lc-self { display: none; }
/* ผู้เล่นพับแถบ (โหมดเล่นโล่ง) = ซ่อนชิปด้วย */
html.hl-fold2 #live-chip { display: none; }

/* แผ่นรายชื่อ (role=dialog ลูกตรง body — ui-root liftAsk ยกชั้น Popup บนจอสัมผัส) */
#live-sheet, #live-me { position: fixed; inset: 0; z-index: var(--z-popup, 300); display: grid; place-items: center; background: #2a1d0c55; }
#live-me { background: transparent; pointer-events: none; place-items: start center; padding-top: calc(env(safe-area-inset-top, 0px) + 64px); }
#live-sheet .lc-in, #live-me .lc-in { pointer-events: auto; display: flex; flex-direction: column; gap: 6px; width: min(560px, 94vw); max-height: min(80vh, 560px); overflow: auto;
  padding: 12px 14px; border-radius: 16px; background: linear-gradient(#fffdf6, #fbf0d4); box-shadow: inset 0 0 0 1.5px #e3cf9e, 0 8px 24px #0004; color: #493820; font-size: var(--fs-body, 16px); }
#live-sheet header { display: flex; align-items: center; gap: 8px; font-size: var(--fs-title, 20px); }
#live-sheet header b { flex: 1; }
#live-sheet .lc-x { min-width: 44px; min-height: 44px; border: 0; border-radius: 22px; background: #f3e4bd; color: #493820; font-size: var(--fs-name, 18px); cursor: pointer; }
.lc-note { margin: 0; font-size: var(--fs-xs, 12px); color: #7a6440; }
#live-sheet .lc-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
#live-sheet .lc-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 12px; background: #fff8e6; box-shadow: inset 0 0 0 1px #ecdcb2; }
#live-sheet .rk-face { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; background: #f3e4bd; display: grid; place-items: center; }
#live-sheet .rk-face img { width: 100%; height: 100%; object-fit: cover; }
#live-sheet .lc-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
#live-sheet .lc-info b { font-size: var(--fs-name, 18px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#live-sheet .lc-info small { display: flex; align-items: center; gap: 4px; font-size: var(--fs-sm, 14px); color: #2f6f73; min-width: 0; }
#live-sheet .lc-info small span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.lc-go, .lc-rep { min-height: 44px; padding: 0 12px; border: 0; border-radius: 22px; font: inherit; font-size: var(--fs-sm, 14px); font-weight: 700; cursor: pointer; white-space: nowrap; }
.lc-go { background: #2f6f73; color: #fff6df; }
.lc-cheer { background: linear-gradient(#f2c862, #e8b64a); color: #493820; }
.lc-rep { background: transparent; color: #8a7350; font-weight: 600; font-size: var(--fs-xs, 12px); padding: 0 6px; text-decoration: underline; }
.lc-rep.arm { background: #f8dcd2; color: #9b3a2f; text-decoration: none; }
#live-me p { margin: 0; display: flex; gap: 8px; align-items: flex-start; }
#live-me .lc-dot { margin-top: 6px; }
/* จอเตี้ย (มือถือแนวนอน): แถวแน่นขึ้น ปุ่มยังสูง 44 */
@media (max-height: 430px) {
  #live-sheet .lc-in { max-height: 88vh; padding: 8px 10px; gap: 4px; }
  #live-sheet .lc-row { padding: 4px 6px; }
  #live-sheet .lc-info b { font-size: var(--fs-body, 16px); }
}
