/* 📯 商城喇叭跑馬燈（js/hornbc.js；伺服器第 787 項 web/WebHorn）
   畫面最上方中央一張卡、金色外框；豪華喇叭更亮的外框＋煙火（#horn-fw）。卡片本身不擋點擊，只有招募按鈕按得到。
   手機寬度（.two）：第一行身分、第二行話；話一行不斷行（放不下 js 先縮字、再慢慢捲） */
#horn-bar { position: fixed; left: 0; right: 0; top: calc(var(--orig-bar-h, 0px) + env(safe-area-inset-top, 0px) + 6px); z-index: 141; height: 0; pointer-events: none;
  display: flex; justify-content: center; }
#horn-bar .hn-card { position: absolute; top: 0; display: flex; align-items: center; gap: 10px; box-sizing: border-box;
  max-width: min(760px, calc(100% - 16px)); min-width: min(420px, calc(100% - 16px)); padding: 6px 10px 6px 7px; border-radius: 8px;
  background: linear-gradient(180deg, rgba(58,36,8,.94), rgba(30,18,4,.94)); border: 2px solid #d9a63a;
  box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 0 12px rgba(230,170,60,.35), inset 0 0 10px rgba(255,200,90,.12);
  font: 15px/1.25 "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif; color: #f6e7c4; text-shadow: 0 1px 0 #000;
  animation: hnIn .28s ease-out both; }
#horn-bar .hn-card.out { animation: hnOut .25s ease-in both; }
@keyframes hnIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes hnOut { to { opacity: 0; transform: translateY(-10px); } }
#horn-bar .hn-av { flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 40% 35%, #a2702a, #4a2c08);
  box-shadow: 0 0 0 1.5px #c9913a, 0 0 6px rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; }
#horn-bar .hn-av img { width: 100%; height: 100%; object-fit: cover; }
#horn-bar .hn-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 0; }
#horn-bar .hn-id { flex: none; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
#horn-bar .hn-tag { font-style: normal; font-size: 12px; line-height: 18px; padding: 0 6px; border-radius: 4px; color: #f0cf8a; background: rgba(120,72,12,.75);
  box-shadow: inset 0 0 0 1px rgba(217,166,58,.45); display: inline-flex; align-items: center; gap: 4px; }
#horn-bar .hn-emb { width: 16px; height: 12px; image-rendering: pixelated; box-shadow: 0 0 0 1px rgba(0,0,0,.8); display: inline-block; }
#horn-bar .hn-embwait { background: rgba(0,0,0,.35); }
#horn-bar .hn-name { color: #ffd76a; font-weight: 700; margin-left: 2px; }
#horn-bar .hn-colon { color: #ffd76a; font-weight: 700; margin-left: -6px; }
#horn-bar .hn-msg.long { -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
#horn-bar .hn-msg { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
#horn-bar .hn-txt { display: inline-block; white-space: nowrap; font-weight: 700; color: #fff4d6; will-change: transform; }
#horn-bar .hn-rb { flex: none; pointer-events: auto; cursor: pointer; font-family: inherit; font-weight: 700; font-size: 13px; line-height: 1; white-space: nowrap; padding: 7px 12px; border-radius: 6px;
  color: #3a2204; background: linear-gradient(180deg, #ffe39a, #e8b04a); border: 1px solid #fff0bd; box-shadow: 0 1px 0 rgba(0,0,0,.6), 0 0 8px rgba(255,210,110,.45); text-shadow: none; }
#horn-bar .hn-rb:active { transform: translateY(1px); }
#horn-bar .hn-rb.done, #lmui-lines .c-hornbtn.done { cursor: default; color: #c9b48a; background: rgba(60,40,10,.8); border-color: rgba(201,162,77,.45); box-shadow: none; }

/* 豪華喇叭：更亮的雙層金框＋流光、金框閃一下（.flash；省電、人多模式只有這個） */
#horn-bar .hn-card.lux { border-color: #ffe08a; background: linear-gradient(180deg, rgba(92,52,6,.96), rgba(44,22,2,.96));
  box-shadow: 0 0 0 1px #6a3c06, 0 0 0 3px #b9852c, 0 0 18px 2px rgba(255,200,80,.6), inset 0 0 14px rgba(255,215,120,.25); }
#horn-bar .hn-card.lux::before { content: ""; position: absolute; inset: -2px; border-radius: 8px; pointer-events: none;
  background: linear-gradient(110deg, transparent 30%, rgba(255,250,220,.55) 45%, transparent 60%) no-repeat; background-size: 250% 100%;
  animation: hnShine 2.4s linear infinite; mix-blend-mode: screen; }
#horn-bar .hn-card.lux .hn-txt { color: #fff8e0; text-shadow: 0 1px 0 #000, 0 0 6px rgba(255,200,90,.75); }
#horn-bar .hn-card.lux .hn-av { box-shadow: 0 0 0 2px #ffe08a, 0 0 10px rgba(255,210,110,.8); }
#horn-bar .hn-card.flash { animation: hnIn .28s ease-out both, hnFlash .5s ease-in-out .25s 3; }
@keyframes hnShine { from { background-position: 150% 0; } to { background-position: -100% 0; } }
@keyframes hnFlash { 50% { border-color: #fffbe6; box-shadow: 0 0 0 1px #6a3c06, 0 0 0 3px #ffe7a0, 0 0 30px 8px rgba(255,220,120,.95), inset 0 0 20px rgba(255,235,170,.5); } }
@media (prefers-reduced-motion: reduce) { #horn-bar .hn-card.lux::before { animation: none; } #horn-bar .hn-card.flash { animation: hnIn .28s ease-out both; } }

/* 手機寬度：兩行（身分＋按鈕一行、話一行） */
#horn-bar .hn-card.two { width: calc(100% - 16px); min-width: 0; padding: 5px 8px 6px 6px; gap: 7px; align-items: center; font-size: 14px; }
#horn-bar .hn-card.two .hn-main { flex-direction: column; align-items: stretch; gap: 3px; }
#horn-bar .hn-card.two .hn-colon { display: none; }
#horn-bar .hn-card.two .hn-av { width: 30px; height: 30px; }
#horn-bar .hn-card.two .hn-tag { font-size: 11px; line-height: 16px; padding: 0 5px; }
#horn-bar .hn-card.two .hn-rb { padding: 8px 10px; font-size: 13px; }

/* 開著彈出視窗：卡片淡一點，不蓋死底下的分頁字（同 #enh-broadcast） */
body.lmui-anywin #horn-bar .hn-card { opacity: .72; }

/* 豪華喇叭煙火：蓋全畫面、不擋點擊，放完就拿掉 */
#horn-fw { position: fixed; left: 0; top: 0; width: 100%; height: 100%; z-index: 139; pointer-events: none; }

/* 聊天框那一行：[喇叭] 橘色、話淡金；豪華的更亮；招募按鈕 */
#lmui-lines .c-hornmsg { color: #f3dfae; }
#lmui-lines .c-hornmsg .c-hornpre { color: #ffab3d; font-weight: 700; margin-right: 2px; }
#lmui-lines .c-hornmsg.lux { color: #ffe9a6; text-shadow: 0 0 4px rgba(255,190,80,.45); }
#lmui-lines .c-hornmsg.lux .c-hornpre { color: #ffd04a; }
#lmui-lines .c-hornbtn { margin-left: 6px; padding: 1px 7px; font-family: inherit; font-weight: 700; font-size: 12px; line-height: 16px; border-radius: 4px; cursor: pointer; vertical-align: 1px;
  color: #3a2204; background: linear-gradient(180deg, #ffe39a, #e8b04a); border: 1px solid #fff0bd; pointer-events: auto; }

/* 組隊申請（發話人看到）：同 party.js 953 的框 */
.hn-ask { display: flex; align-items: center; gap: 10px; text-align: left; }
.hn-askav { width: 34px; height: 34px; border-radius: 50%; box-shadow: 0 0 0 1.5px #c9913a; }
.hn-ask small { color: #d8bf86; }
.hn-asksec { opacity: .75; font-weight: 400; }
