/* ═══════════════════════════════════════════════════════════════════
   Ladder Lessons · _brand/ll-chat.css —— 對話泡泡 + 跟讀大字（全庫共用，2026-11-14）
   ═══════════════════════════════════════════════════════════════════
   Shari 2026-11-14：「對話嘅 UX/UI 太單調，參考 Ladder Festivals 嘅 Greet mode，統一全庫遊戲嘅對話框設計」。
   之前每隻各自一套（.ouSay、.bubble、.lt-bub、.bubW、.speech-bubble …），而家全部用呢套。

   Markup（或者用 _brand/ll-chat.js 嘅 LLChat.them()／me()／wait() 砌）：
     <div class="thread">
       <div class="msg msg--them"><span class="av"><img src="…/_brand/cast/av_teacher.svg" alt=""></span>
         <div class="bub"><b class="nm">Staff</b><p class="bt"><span>Can I help you?</span></p></div></div>
       <div class="msg msg--me"><div class="bub"><p class="bt"><span>I’ve lost my bag.</span></p></div>
         <span class="av"><img src="…/_brand/cast/av_you.svg" alt=""></span></div>
     </div>
   狀態：msg--wait（輪到學生講：虛線、透明）、msg--sent（學生講完／答啱：淡 teal）、msg--in（新出現，滑入）
   跟讀大字：<p class="bigLine"><span>It’s a red hat.</span></p> —— 撳 Show the sentence／Sentence help 之後
            句子要喺 stage 入面大字出，學生先跟得住讀（唔好淨係擺喺底部回饋欄）。
   規矩：
   · 全部 selector 掛喺 .thread／.bigLine 底下，唔會撞到遊戲自己嘅 .bub／.av。
   · 對方（them）= 白泡泡，左邊，左下角尖；學生（me）= 淡黃，右邊，右下角尖（跟 Festivals）。
   · 頭像冇圖就 .av--ph（黃圓 + 名第一個字）。圖喺 _brand/cast/（免費遊戲都載得）。
   · 顏色只用 token；淡黃／淡 teal 用 color-mix 由 --yellow／--teal 撈白。
   ═══════════════════════════════════════════════════════════════════ */
.thread{display:flex;flex-direction:column;gap:12px;width:100%;max-width:820px;margin:0 auto}
/* ll-practice.css 有個舊 .msg（空狀態訊息：大 padding、置中），呢度要全部蓋返 */
.thread .msg{display:flex;align-items:flex-end;gap:10px;max-width:92%;margin:0;padding:0;text-align:left}
.thread .msg--them{align-self:flex-start}
.thread .msg--me{align-self:flex-end}
.thread .av{width:clamp(44px,6vw,60px);height:clamp(44px,6vw,60px);flex:0 0 auto;display:block}
.thread .av img,.thread .av svg{width:100%;height:100%;display:block}
.thread .av--ph{display:grid;place-items:center;border-radius:50%;border:3px solid var(--ink);background:var(--yellow);
  font:700 clamp(17px,2.2vw,22px) var(--ff-head);color:var(--ink);box-sizing:border-box}
.thread .bub{position:relative;text-align:left;background:#fff;border:3px solid var(--ink);border-radius:20px;padding:10px 16px;min-width:0;
  box-shadow:0 4px 0 color-mix(in srgb, var(--ink) 14%, transparent)}
.thread .msg--them .bub{border-bottom-left-radius:6px}
.thread .msg--me .bub{background:color-mix(in srgb, var(--yellow) 45%, #fff);border-bottom-right-radius:6px}
.thread .msg--wait .bub{background:transparent;border-style:dashed;box-shadow:none}
.thread .msg--sent .bub{background:color-mix(in srgb, var(--teal) 22%, #fff)}
.thread .msg--past .bub{opacity:.72}
.thread .nm{display:block;font:600 14px var(--ff-head);color:var(--ink-soft,var(--ink));margin-bottom:2px}
.thread .bt{display:flex;align-items:center;gap:10px;margin:0;font:800 clamp(19px,2.6vw,24px)/1.4 var(--ff-body);color:var(--ink)}
.thread .bt>span{flex:1;min-width:0}
.thread .yt{margin:0;font:700 clamp(15px,1.8vw,17px)/1.4 var(--ff-body);color:var(--ink-soft,var(--ink))}
.thread .yt i{font-style:normal;color:var(--ink)}
.thread .typing{display:flex;gap:6px;margin:6px 2px}
.thread .typing i{width:9px;height:9px;border-radius:50%;background:var(--ink);opacity:.35}
.sit{display:flex;align-items:flex-start;gap:10px;margin:0;font:700 clamp(16px,2.2vw,20px)/1.4 var(--ff-body);color:var(--ink-soft);font-style:italic}
.sit>span{flex:1;min-width:0}

/* 跟讀大字 */
.bigLine{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 auto;max-width:900px;width:100%;box-sizing:border-box;
  padding:12px 20px;border:3px solid var(--ink);border-radius:var(--r-lg,24px);background:color-mix(in srgb, var(--yellow) 45%, #fff);
  font:800 clamp(24px,3.4vw,40px)/1.3 var(--ff-body);color:var(--ink);text-align:center}
.bigLine>span{min-width:0}
.bigLine mark{background:transparent;color:inherit;text-decoration:underline;text-decoration-color:var(--teal);text-decoration-thickness:4px;text-underline-offset:5px}

@media (max-width:560px){.thread .msg{max-width:100%}.thread .bub{padding:8px 12px}}
@media (prefers-reduced-motion:no-preference){
  .thread .typing i{animation:llChatDot 1.2s ease-in-out infinite}
  .thread .typing i:nth-child(2){animation-delay:.15s}.thread .typing i:nth-child(3){animation-delay:.3s}
  .thread .msg--in,.bigLine{animation:llChatIn .3s ease-out both}
  @keyframes llChatDot{0%,100%{opacity:.25;transform:none}40%{opacity:.8;transform:translateY(-4px)}}
  @keyframes llChatIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
}
/* 撳得嘅泡泡（例如 Ladder Talk 遮住嘅句子：撳先揭） */
.thread button.bub{font:inherit;color:inherit;cursor:pointer;text-align:left}
/* 跟讀大字收埋狀態（2026-11-16）：固定位，撳同一個位先揭句子，底下啲掣唔會跳 */
button.bigLine{cursor:pointer}
.bigLine.is-hidden{background:transparent;border-style:dashed;color:var(--ink-soft,var(--ink));font-size:clamp(18px,2vw,22px)}
@media (hover:hover){button.bigLine.is-hidden:hover{background:color-mix(in srgb, var(--yellow) 25%, #fff)}}
