/* 精簡版面（ui/hud_menu.js）與共用的提示樣式；index.html 直接載入
   尺寸照共用規則：按鈕 36px（小按鈕 30px）、標籤 22px、間距 6px；主要的「聊天」鈕 44px */

/* ---------- 所有畫面：升級卡改成上方小橫幅（不擋畫面中央與對話框）、徽章卡縮小 ---------- */
.lvup { place-items: start center !important; bottom: auto !important; inset-inline: 0 !important; }
.lvup-rays, .lvup-c { display: none !important; }
.lvup-card { scale: 1 !important; display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: center; min-width: 0 !important; padding: 8px 18px 8px 12px !important; border-radius: 18px !important; text-align: left !important; box-shadow: 0 8px 24px rgba(10, 78, 85, 0.22) !important; }
.lvup-n { grid-row: 1 / span 3; font-size: 36px !important; margin: 0 !important; }
.lvup-n small { font-size: 15px !important; }
.lvup-k { font-size: 12px !important; letter-spacing: 0.2em !important; }
.lvup-t { font-size: 16px !important; }
.lvup-s { margin-top: 0 !important; font-size: 12px !important; }
.bdg-pop { padding: 12px 18px 14px !important; }
.bdg-pop canvas { width: 96px !important; height: 96px !important; }
.bdg-pop b { font-size: 18px !important; }

/* ---------- 浮出小卡 ---------- */
.hv-pop { position: absolute; z-index: 9; display: none; padding: 12px; border-radius: 18px; background: rgba(251, 252, 251, 0.98); box-shadow: 0 10px 32px rgba(10, 78, 85, 0.24); max-width: calc(100vw - 32px); }
.hv-pop.on { display: block; animation: hvin 0.16s ease-out; }
@keyframes hvin { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }
.hv-tiles { display: grid; grid-template-columns: repeat(3, 72px); gap: 6px; }
.hv-tile { height: 64px; border: 0; border-radius: 14px; background: #f1f6f5; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0; cursor: pointer; font-size: 13px; font-weight: 800; font-family: inherit; }
.hv-tile svg { width: 26px; height: 26px; }
.hv-tile:hover { background: #e2efed; }
.hv-tile:active { transform: scale(0.96); }
.hv-tile:focus-visible, .hv-me:focus-visible, .hv-status:focus-visible, .hv-rb:focus-visible, .hv-hint:focus-visible { outline: 3px solid var(--sand); outline-offset: 2px; }

/* 等級圓（外圈是經驗值進度） */
.hv-lv { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #ffe08a, #c8862a 70%); }
.hv-lv b { position: relative; font-size: 13px; font-weight: 900; color: #fff; text-shadow: 0 1px 1px rgba(90, 50, 0, 0.4); }
.hv-ring { position: absolute; inset: -3px; border-radius: 50%; background: conic-gradient(var(--main) calc(var(--p, 0) * 360deg), #d6e6e4 0); -webkit-mask: radial-gradient(circle, transparent 15.5px, #000 16px); mask: radial-gradient(circle, transparent 15.5px, #000 16px); }
.hv-lv.big { width: 44px; height: 44px; }
.hv-lv.big b { font-size: 18px; }
.hv-lv.big .hv-ring { -webkit-mask: radial-gradient(circle, transparent 22.5px, #000 23px); mask: radial-gradient(circle, transparent 22.5px, #000 23px); }
.hv-bar { display: block; height: 6px; border-radius: 999px; background: #e1ecea; overflow: hidden; }
.hv-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--main), #3aa6a8); transition: width 0.6s ease; }

/* 我的卡 */
.hv-me { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 6px; border: 0; border-radius: 22px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 4px 16px rgba(10, 78, 85, 0.16); cursor: pointer; color: inherit; font-family: inherit; }
.hv-me .mark { width: 32px; height: 32px; flex: none; }
.hv-me .hv-tx { display: flex; flex-direction: column; gap: 4px; min-width: 76px; text-align: left; }
.hv-me .hv-tx b { font-size: 13px; font-weight: 900; color: var(--deep); white-space: nowrap; }
.hv-me.bump .hv-lv { animation: lvbump 0.6s ease; }
@media (max-width: 380px) { .hv-me .mark { display: none; } .hv-me { padding-left: 8px; } .hv-me .hv-tx { min-width: 64px; } }
.hv-mepop { width: 252px; }
.hv-mehd { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.hv-mehd > div { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.hv-mehd .hv-t { font-size: 16px; font-weight: 900; color: var(--deep); }
.hv-mehd .hv-s { font-size: 12px; color: #5d7378; }

/* 狀態膠囊 */
.hv-status { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px 0 8px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.9); color: #4b6268; font-size: 12px; font-weight: 700; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1); font-family: inherit; cursor: pointer; position: relative; }
.hv-status::after { content: ""; position: absolute; inset: -11px -4px; }   /* 點擊範圍放大到 44px */
.hv-status i { width: 8px; height: 8px; border-radius: 50%; background: #b9c4c6; flex: none; }
.hv-status i.live { background: #2fbf71; box-shadow: 0 0 0 2px rgba(47, 191, 113, 0.22); }
.hv-status em { font-style: normal; height: 16px; line-height: 16px; padding: 0 6px; border-radius: 999px; background: rgba(122, 91, 176, 0.92); color: #fff; font-size: 11px; font-weight: 800; }
.hv-status em.gh { background: rgba(55, 71, 79, 0.92); }
.hv-status .n { color: var(--main); }
.hv-status .n::before { content: "・"; color: #9fb0b3; }
.hv-stpop { width: min(320px, calc(100vw - 32px)); padding: 12px 14px; }
.hv-stpop b { display: block; font-size: 14px; font-weight: 900; color: var(--deep); margin-top: 8px; }
.hv-stpop b:first-child { margin-top: 0; }
.hv-stpop b.fan { color: #6a4aa6; }
.hv-stpop p { margin: 2px 0 0; font-size: 13px; line-height: 1.7; color: #33464b; }

/* 右上 */
.hv-tr { display: flex; gap: 6px; align-items: center; }
.hv-pill { height: 36px !important; padding: 0 14px 0 10px !important; font-size: 14px !important; gap: 6px !important; }
.hv-pill svg { width: 22px !important; height: 22px !important; }

/* 聊天半圓選單 */
.hv-chatwrap { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.hv-chat { height: 44px !important; padding: 0 18px 0 12px !important; font-size: 15px !important; }
.hv-chat svg { width: 26px !important; height: 26px !important; }
.hv-chat.open { background: var(--deep); color: #fff; }
.hv-hint { position: relative; height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--deep); color: #fff; font-size: 13px; font-weight: 800; font-family: inherit; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 14px rgba(10, 78, 85, 0.28); animation: hvhint 1.6s ease-in-out infinite; }
.hv-hint::after { content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--deep); border-bottom: 0; }
@keyframes hvhint { 50% { transform: translateY(-3px); } }
.hv-radial { inset: 0; padding: 0; background: none !important; box-shadow: none !important; max-width: none; border-radius: 0; pointer-events: none !important; }
.hv-radial.on { animation: none; }
.hv-rb { position: absolute; width: 64px; height: 60px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; font-family: inherit; animation: hvpop 0.22s cubic-bezier(0.2, 0.8, 0.3, 1.2) both; animation-delay: calc(var(--i) * 30ms); }
.hv-rb i { width: 40px; height: 40px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(10, 78, 85, 0.24); }
.hv-rb i svg { width: 24px; height: 24px; }
.hv-rb span { font-size: 12px; font-weight: 800; color: #fff; background: rgba(10, 78, 85, 0.86); border-radius: 999px; padding: 0 8px; line-height: 18px; white-space: nowrap; }
.hv-rb:active i { transform: scale(0.92); }
@keyframes hvpop { from { opacity: 0; transform: scale(0.4) translateY(24px); } }

/* 玩家小卡 */
.hv-peerpop { transform: translateX(-50%); width: min(300px, calc(100vw - 32px)); }
.hv-peerpop.on { animation: none; }
.hv-peerhd { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.hv-peerhd .lv { height: 22px; line-height: 22px; padding: 0 8px; border-radius: 999px; background: var(--sand); color: #fff; font-size: 12px; font-weight: 800; }
.hv-peerhd .nm { font-size: 15px; font-weight: 900; color: var(--deep); }
.hv-peerops { display: flex; gap: 6px; }
.hv-peerops .go { flex: 1; font-family: inherit; }
.hv-peerops .go.ghost { background: #fff; color: var(--main); box-shadow: inset 0 0 0 1.5px var(--main); }

/* 右下 */
.hv-cam { display: flex; gap: 6px; }
.hv-cam.gest .hv-turn { display: none; }   /* 手勢上線後（HALL.camGestures）只留「回到我身邊」 */

/* 設定面板 */
.hv-set { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-bottom: 1px solid #e4eeec; }
.hv-set b { font-size: 14px; color: var(--deep); }
.hv-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.hv-seg button { height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: #eef3f2; color: var(--deep); font-size: 14px; font-weight: 800; font-family: inherit; cursor: pointer; }
.hv-seg button.on { background: var(--main); color: #fff; }

/* 沒操作時淡出（字幕、情境動作、提示不淡） */
body.hv .slot-tl, body.hv .slot-tr, body.hv .slot-br, body.hv .slot-bc { transition: opacity 0.6s ease; }
body.hv-idle .slot-tl, body.hv-idle .slot-tr, body.hv-idle .slot-br, body.hv-idle .slot-bc { opacity: 0.18; }

/* ---------- 藏起被整合的原元素（功能由新按鈕轉呼叫原按鈕） ---------- */
.hv-b .slot-tl > .brand, .hv-b .slot-tl > .lvchip, .hv-b .slot-tl > .scene-note, .hv-b .online, .hv-b .slot-tr > .top-right, .hv-b .slot-bc > .bottom, .hv-b .slot-br > .cam { display: none !important; }
/* 盪鞦韆面板出現時，聊天鈕跟著讓位 */
.hv-b .slot-bc.busy > .hv-chatwrap { display: none !important; }
/* 看電視：只留示意膠囊 */
body.tv-mode.hv .slot-tl > .hv-tlrow.hv-tlrow { display: flex !important; }
body.tv-mode.hv .hv-tlrow > .hv-sun { display: none !important; }
body.tv-mode.hv .hv-pop { display: none !important; }
@media (prefers-reduced-motion: reduce) { .hv-pop.on, .hv-rb, .hv-hint { animation: none; } body.hv .slot-tl, body.hv .slot-tr, body.hv .slot-br, body.hv .slot-bc { transition: none; } }
/* 黃昏與夜晚的畫面亮度快速切換（小太陽） */
.hv-sun { width: 40px; height: 40px; align-self: center; }
.hv-tlrow { display: flex; align-items: center; gap: 8px; }
.hv-tlrow > .hv-sun { width: 30px; height: 30px; }
.hv-tlrow > .hv-sun svg { width: 18px; height: 18px; }
.hv-sun svg { width: 22px; height: 22px; }
.hv-sun.on { background: #fff4d0; box-shadow: 0 0 0 2px #f2c94c inset, 0 3px 12px rgba(10, 78, 85, 0.16); }
