/* 小字下限（2026-09-13 界面评审）：HUD 按舞台宽度的 1% 缩放，窗口一小，.5em~.62em 的字只剩 6~8px，中文读不清。最小的几处加 max(…, Npx) */
/* 秘境旅团（原名旅伴守卫战）v2
   色板：夜蓝紫地 #0b0c12 / 面板 #14131f / WoW 金 #ffd100（只给最关键的字）/ 羊皮纸 #ece3cf / 暗月紫 #8a5cc2
   字体：标题宋体（接近 WoW 石刻字气质）、正文系统黑体、数字等宽 */
:root {
  --ground: #0b0c12; --panel: rgba(18, 16, 28, 0.88); --panel-solid: #14131f; --line: #2d2742;
  --gold: #ffd100; --text: #ece3cf; --muted: #8f8ba3; --moon: #8a5cc2;
  --hp: #4fd35a; --danger: #e0413b;
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--ground); color: var(--text); font-family: var(--sans); }
body { display: grid; place-items: center; overflow: hidden; }
#app { width: 100vw; height: 100vh; display: grid; place-items: center; }
#stage {
  position: relative; width: min(100vw, calc(100vh * 16 / 9)); aspect-ratio: 16 / 9;
  container-type: inline-size; overflow: hidden; background: #000;
}
#canvas-host, #canvas-host canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
kbd {
  font-family: var(--sans); font-size: .78em; font-weight: 700; color: var(--gold);
  border: 1px solid rgba(255, 209, 0, .45); border-bottom-width: 2px; border-radius: 4px; padding: .05em .45em;
  background: rgba(0, 0, 0, .35); white-space: nowrap;
}
button { font: inherit; cursor: pointer; }
button:focus-visible, .spec:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ================= HUD（尺寸全用 cqw，随舞台等比缩放） ================= */
#hud { position: absolute; inset: 0; pointer-events: none; font-size: 1cqw; }
#hud[hidden] { display: none; }
.frame { display: flex; gap: .7em; align-items: flex-start; }
.frame .portrait {
  flex: none; width: 3.6em; height: 4.8em; border-radius: .3em; background: center bottom / contain no-repeat;
  border: 1px solid color-mix(in srgb, var(--cc) 60%, transparent); box-shadow: 0 .2em .8em rgba(0,0,0,.5);
  image-rendering: pixelated;
}
.frame .name { font-weight: 800; color: var(--cc); font-size: 1.15em; text-shadow: 0 1px 2px #000; }
.hp, .mana { position: relative; height: 1.15em; background: rgba(0,0,0,.65); border: 1px solid rgba(255,255,255,.12); border-radius: .2em; overflow: hidden; margin-top: .25em; }
.hp i, .mana i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#5fe36a, #2f9b3a); transition: width .12s linear; }
.mana i { background: linear-gradient(#4f9dff, #2459b8); }
.hp b, .mana b { position: relative; display: block; text-align: center; font-size: max(.8em, 10px); line-height: 1.45; font-weight: 700; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.res { display: flex; gap: .25em; margin-top: .3em; min-height: .9em; }
.res .mana, .res .meter { flex: 1; height: .9em; margin-top: 0; }
.res .mana b, .res .meter b { font-size: max(.7em, 9px); line-height: 1.3; }
/* 0~100 的资源画成条（怒气、能量、集中值……），点数少的才画圆点 */
.meter { position: relative; height: 1.15em; background: rgba(0,0,0,.65); border: 1px solid rgba(255,255,255,.12); border-radius: .2em; overflow: hidden; }
.meter i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#9aa4b2, #5b6472); transition: width .12s linear; }
.meter b { position: relative; display: block; text-align: center; font-weight: 700; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.res[data-kind="mana"] .meter i        { background: linear-gradient(#4f9dff, #2459b8); }
.res[data-kind="rage"] .meter i        { background: linear-gradient(#ff6a5a, #a01b12); }
.res[data-kind="fury"] .meter i        { background: linear-gradient(#c86bff, #6a1fa8); }
.res[data-kind="energy"] .meter i      { background: linear-gradient(#ffe680, #c8a01e); }
.res[data-kind="focus"] .meter i       { background: linear-gradient(#ffb864, #a85e12); }
.res[data-kind="astral_power"] .meter i{ background: linear-gradient(#9fd8ff, #2f6fb8); }
.res[data-kind="insanity"] .meter i    { background: linear-gradient(#c8a8ff, #5a2a9a); }
.res[data-kind="ele_maelstrom"] .meter i { background: linear-gradient(#7fe8ff, #1c7aa8); }
.pip { width: .95em; height: .95em; border-radius: 50%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); }
.res[data-kind="shards"] .pip.on { background: radial-gradient(circle at 35% 35%, #e0b3ff, #8b3dd6 60%, #4a1675); border-color: #d9a6ff; box-shadow: 0 0 .5em #a45cff; }
.res[data-kind="maelstrom"] .pip { width: .7em; height: .7em; }
.res[data-kind="maelstrom"] .pip.on { background: radial-gradient(circle at 35% 35%, #dff6ff, #3aa6e8 60%, #144e7a); border-color: #9fe3ff; box-shadow: 0 0 .4em #62d0ff; }

#pf { position: absolute; left: 1.4em; top: 1.2em; width: 23em; }
#pf .body { flex: 1; }
#pf .mastery { font-size: .72em; color: var(--muted); margin-top: .3em; }
#pf .buffs { position: absolute; left: 4.9em; top: 7.2em; display: flex; flex-wrap: wrap; gap: .35em; width: 26em; }
.buff { display: inline-flex; align-items: center; gap: .25em; font-size: .85em; background: var(--panel); border: 1px solid var(--line); border-radius: .3em; padding: .1em .45em .1em .3em; }
.buff small { font-size: .82em; color: var(--text); font-variant-numeric: tabular-nums; }

/* 队伍框：两队各一框、左右并排；每人只留职业 + 血量，尽量窄，别挡住场地中央和 BOSS 血条 */
#party { position: absolute; right: 1.4em; top: 1.2em; display: flex; flex-direction: row; gap: .35em; align-items: flex-start;
         width: auto; max-width: 12.5em; max-height: calc(100% - 12.5em); overflow-y: auto; scrollbar-width: thin; }
#party .sqbox { display: flex; flex-direction: column; gap: .18em; flex: 1 1 0; min-width: 0;
                background: var(--panel); border: 1px solid var(--line); border-radius: .4em; padding: .22em .28em; }
#party .sqlb { font-size: max(.62em, 8px); color: var(--muted); text-align: center; line-height: 1.2; letter-spacing: .12em; }
#party .mate { border-left: .22em solid var(--qc, var(--line)); border-radius: .25em; padding: .12em .28em .14em; background: rgba(0,0,0,.22); }
#party .mate .name { font-size: max(.68em, 9px); font-weight: 700; color: var(--cc); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#party .mate .hp { height: .85em; margin-top: .1em; }
#party .mate .hp b { font-size: max(.58em, 8px); line-height: 1.25; }
#party .mate.dead { opacity: .55; filter: grayscale(.8); }
#party.single .sqbox { max-width: 5.2em; }

.topbar { position: absolute; left: 50%; top: 1em; transform: translateX(-50%); text-align: center; }
#loot { font-size: .85em; color: var(--text); text-shadow: 0 1px 3px #000; font-variant-numeric: tabular-nums; margin-top: .2em; }
/* 难度选择：WoW 的难度阶梯，一排按钮 */
#diffs { display: flex; gap: .5em; margin: 0 0 1.1em; flex-wrap: wrap; }
#diffs button { flex: 1 1 0; min-width: 9em; text-align: left; padding: .55em .8em; border-radius: .45em; border: 1px solid var(--line); background: #15131f; color: var(--text); }
#diffs button b { display: block; font-size: 1em; }
#diffs button small { display: block; font-size: .72em; color: var(--muted); line-height: 1.35; margin-top: .15em; }
#diffs button .best { color: #9fe3a0; }
#diffs button.on { border-color: var(--dc); background: color-mix(in srgb, var(--dc) 16%, #15131f); box-shadow: 0 0 0 1px var(--dc) inset; }
#diffs button.on b { color: var(--dc); }
#phase .aff { display: inline-flex; gap: .35em; margin-left: .6em; vertical-align: middle; }
#phase .aff i { font-style: normal; color: #ffb58a; background: rgba(255,90,40,.12); border: 1px solid rgba(255,120,60,.35); border-radius: .3em; padding: 0 .35em; pointer-events: auto; cursor: help; }
.shop-head .go small.dn { display: block; font-size: .7em; font-weight: 500; opacity: .8; }
/* 鼠标提示：WoW 风格的深色框 */
#tip { position: fixed; z-index: 50; max-width: 26em; pointer-events: none; font-size: 13px; line-height: 1.5;
       background: rgba(10, 9, 18, .96); border: 1px solid #5a4d80; border-radius: 6px; padding: .6em .8em; color: var(--text);
       box-shadow: 0 6px 24px rgba(0,0,0,.6); }
#tip h5 { margin: 0 0 .3em; font-size: 1.1em; }
#tip h5 small { margin-left: .6em; font-size: .75em; color: var(--muted); font-weight: 500; }
#tip p { margin: .2em 0; color: #d8cfbd; }
#tip p.note { color: var(--muted); font-size: .9em; margin-top: .5em; }
#tip dl { display: grid; grid-template-columns: auto 1fr; gap: .2em .7em; margin: .5em 0 0; }
#tip dt { color: var(--muted); }
#tip dd { margin: 0; }
/* #hud 整体 pointer-events:none（不让 HUD 挡住战场操作），要能点的一个个放行。
   2026-10-08：AUTO 药丸漏在这份名单外，于是电脑版的药丸**有两个独立病因**：
   hud.js 那条监听被 `if (pillMobile)` 圈住了（已改成无条件挂），这边它又继承着 #hud 的 none ——
   鼠标指到药丸中心，命中的是底下那块 canvas，点它等于点战场、顺带开始走位，药丸永远收不到点击。
   手机版没这问题是因为 .mobile #mraid 单独放行了（见下面）。补进名单，两个版本才是同一套行为。 */
#hud .slot, #hud .autopill { pointer-events: auto; }
/* 手动技能按了放不出来：闪红 + 原因 */
.slot.deny { animation: deny .45s; }
.slot.deny::after { content: attr(data-why); position: absolute; left: 50%; bottom: 105%; transform: translateX(-50%); white-space: nowrap;
                    font-size: .7em; color: #ff8a7a; text-shadow: 0 1px 2px #000; animation: denyTxt .9s forwards; }
@keyframes deny { 0%, 60% { box-shadow: 0 0 0 .15em #ff4a3a inset; } 100% { box-shadow: none; } }
@keyframes denyTxt { 0% { opacity: 1; } 100% { opacity: 0; } }
.slot { overflow: visible; }
/* 选项开关（Q/E/R 自动释放） */
.toggle { font: inherit; font-size: .85em; padding: .3em .8em; border-radius: 1em; border: 1px solid var(--line); background: #1a1626; color: var(--muted); cursor: pointer; }
.toggle.on { color: #9fe3a0; border-color: #4a8a4c; background: #16241a; }
#pause .opt { margin-top: 1em; }
.autopill { align-self: stretch; display: flex; align-items: center; gap: .3em; padding: 0 .7em; border-radius: .35em; font-size: .8em; font-weight: 800;
            border: 1px solid var(--line); background: #17141f; color: var(--muted); }
.autopill.on { color: #9fe3a0; border-color: #4a8a4c; background: #16241a; }
/* 手动技能被设成自动时，格子角上标"自动" */
.slot.auto::before { content: '自动'; position: absolute; right: .2em; top: .1em; font-size: max(.6em, 9px); color: #9fe3a0; z-index: 2; }
/* 第一次上场的按键说明 */
#keyhint { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); pointer-events: auto; cursor: pointer;
           background: rgba(12, 10, 20, .93); border: 1px solid #5a4d80; border-radius: .7em; padding: 1em 1.4em; min-width: 26em; box-shadow: 0 1em 3em rgba(0,0,0,.6); }
#keyhint h4 { margin: 0 0 .6em; font-size: 1.15em; color: var(--gold); }
#keyhint dl { display: grid; grid-template-columns: auto 1fr; gap: .35em .9em; margin: 0; }
#keyhint dt kbd { min-width: 2.6em; text-align: center; }
#keyhint dd { margin: 0; }
#keyhint dd small { color: var(--muted); margin-left: .5em; }
#keyhint p { margin: .8em 0 0; font-size: .85em; color: var(--muted); }
#timer { font-family: var(--serif); font-size: 2.1em; font-weight: 700; color: var(--text); text-shadow: 0 2px 6px #000; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
#phase { font-size: .85em; color: var(--muted); margin-top: .1em; }
#bossbar { margin-top: .6em; width: 34em; }
#bossbar[hidden] { display: none; }
#bossbar .bn { font-family: var(--serif); color: #ff9a6a; font-weight: 700; letter-spacing: .1em; }
/* 现在打到第几阶段。放名字前面而不是塞进名字里：艾瑞达双子那种一条血条写两个名字+两个百分比，
   名字那行已经很挤了，再拼进去手机上会换行 */
#bossbar .bph { display: inline-block; margin-right: .5em; padding: 0 .4em; font-size: .78em; font-weight: 700;
    line-height: 1.5; color: #ffd08a; background: rgba(70,22,10,.9); border: 1px solid #a5502a; border-radius: .25em;
    vertical-align: middle; font-variant-numeric: tabular-nums; }
#bossbar .bph[hidden] { display: none; }
/* 阶段分界线：画在血条填充层之上、数字之下 */
#bossbar .bar .bphm { position: absolute; inset: 0; pointer-events: none; }
#bossbar .bar .bphm s { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,226,180,.55); }
#bossbar .bar { position: relative; height: 1.3em; background: rgba(0,0,0,.7); border: 1px solid #6b2a22; border-radius: .2em; overflow: hidden; margin-top: .25em; }
#bossbar .bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#ff5c3a, #9b1f10); }
#bossbar .bar b { position: relative; font-size: .8em; line-height: 1.6; font-variant-numeric: tabular-nums; text-shadow: 0 1px 2px #000; }
#bossbar .bcast { display: block; font-size: .8em; color: #ffb58a; height: 1.3em; margin-top: .2em; }

#announce {
  position: absolute; left: 0; right: 0; top: 62%; text-align: center; font-family: var(--serif); font-size: 2.1em; font-weight: 700;
  pointer-events: none;   /* 放在画面上方三分之一：原来压在战场正中间，"宝箱出现了！"直接盖住主角 */
  color: var(--gold); text-shadow: 0 0 .4em rgba(255, 170, 0, .5), 0 3px 8px #000; letter-spacing: .08em; opacity: 0;
}
#announce.show { animation: announce 2.6s ease both; }
@keyframes announce { 0% { opacity: 0; transform: scale(1.15); } 12% { opacity: 1; transform: scale(1); } 75% { opacity: 1; } 100% { opacity: 0; } }

/* 平A条 / 施法条贴着动作条，别浮在场地中间（原来 gap .8em，两条都藏起来时中间空一大块） */
.bottom { position: absolute; left: 50%; bottom: 1.3em; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .3em; }
#castbar { position: relative; width: 22em; height: 1.4em; background: rgba(0,0,0,.72); border: 1px solid rgba(255,209,0,.5); border-radius: .2em; overflow: hidden; }
#castbar[hidden] { display: block; visibility: hidden; }
/* 平A条（WoW 的挥砍计时器）：物理系才有。满了就是这一刀 / 这一箭出手 */
#swingbar { position: relative; width: 22em; height: .95em; margin-bottom: .25em; background: rgba(0,0,0,.72); border: 1px solid rgba(232,217,181,.45); border-radius: .2em; overflow: hidden; }
#swingbar[hidden] { display: block; visibility: hidden; }
#swingbar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8a7a55, #e8d9b5); opacity: .85; }
#swingbar.hit i { background: #fff3c4; opacity: 1; }
#swingbar.far { opacity: .45; }
#swingbar span { position: relative; display: block; text-align: center; font-size: max(.62em, 10px); line-height: 1.55; font-weight: 700; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.frame .sw { height: 2px; margin-top: 2px; background: rgba(0,0,0,.5); border-radius: 1px; overflow: hidden; }
.frame .sw i { display: block; height: 100%; width: 0; background: #e8d9b5; }
#castbar i { position: absolute; inset: 0 auto 0 0; opacity: .85; }
/* 蓄力法术的档位刻度 */
#castbar .pips { position: absolute; inset: 0; pointer-events: none; }
#castbar .pips b { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(0,0,0,.65); box-shadow: 1px 0 0 rgba(255,255,255,.25); }
#castbar span { position: relative; display: block; text-align: center; font-size: .82em; line-height: 1.7; font-weight: 700; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
#actionbar { display: flex; gap: .35em; align-items: flex-end; background: var(--panel); border: 1px solid var(--line); border-radius: .6em; padding: .45em; }
#actionbar .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 .25em; }
.slot {
  position: relative; width: 4.4em; height: 3.6em; border-radius: .35em; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--sc) 40%, #1a1826), #0f0e17 75%);
  border: 1px solid color-mix(in srgb, var(--sc) 55%, transparent);
  display: flex; align-items: center; justify-content: center; text-align: center;
}
.slot.big { width: 5.2em; height: 4.2em; }
.slot .nm { position: relative; font-size: .78em; font-weight: 700; line-height: 1.15; padding: 0 .2em; text-shadow: 0 1px 2px #000; z-index: 1; text-wrap: balance; }
.slot kbd { position: absolute; left: .25em; top: .2em; font-size: max(.6em, 10px); padding: 0 .3em; border-bottom-width: 1px; z-index: 1; color: var(--muted); border-color: rgba(255,255,255,.2); }
.slot.big kbd { color: var(--gold); border-color: rgba(255,209,0,.5); }
.slot em { position: absolute; right: .3em; bottom: .15em; font-style: normal; font-size: .72em; font-weight: 800; color: #fff; z-index: 1; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.slot .cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0,0,0,.66); }
.slot.casting { box-shadow: 0 0 0 2px var(--gold), 0 0 1em rgba(255,209,0,.45); }
.slot.dim .nm { opacity: .45; }
.slot.ready { box-shadow: 0 0 0 2px var(--gold); animation: ready 1s ease-in-out infinite alternate; }
@keyframes ready { from { box-shadow: 0 0 0 2px var(--gold), 0 0 .3em rgba(255,209,0,.3); } to { box-shadow: 0 0 0 2px var(--gold), 0 0 1.4em rgba(255,209,0,.8); } }

#summons { position: absolute; left: 1.4em; bottom: 1.4em; display: flex; flex-wrap: wrap; gap: .4em; max-width: 24em; }

#meter { position: absolute; right: 1.4em; bottom: 1.4em; width: 17em; background: var(--panel); border: 1px solid var(--line); border-radius: .5em; padding: .5em .6em .6em; }
#meter h4 { margin: 0 0 .4em; font-size: .72em; color: var(--muted); font-weight: 600; letter-spacing: .08em; }
#meter .row { position: relative; height: 1.5em; margin-top: .2em; border-radius: .2em; overflow: hidden; background: rgba(255,255,255,.04); display: flex; align-items: center; justify-content: space-between; padding: 0 .5em; }
#meter .row i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--cc) 38%, transparent); }
#meter .row span, #meter .row b { position: relative; font-size: .8em; font-variant-numeric: tabular-nums; }
#meter .row b em { font-style: normal; color: #7dff8a; font-weight: 600; }

/* ================= 菜单 / 暂停 / 结算 ================= */
.screen { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1cqw;
  background: radial-gradient(ellipse at 50% 40%, rgba(40, 22, 60, .55), rgba(5, 5, 10, .92) 70%); }
.screen[hidden] { display: none; }
.panel { width: min(92%, 82em); }
.panel.small { width: 34em; text-align: center; background: var(--panel-solid); border: 1px solid var(--line); border-radius: .8em; padding: 2em; }
.eyebrow { margin: 0; color: var(--moon); letter-spacing: .3em; font-size: 1em; font-weight: 600; }
h1 { margin: .15em 0 .2em; font-family: var(--serif); font-size: 5.2em; line-height: 1; color: var(--gold); letter-spacing: .12em; font-weight: 900;
     text-shadow: 0 .04em 0 #7a5a00, 0 .1em .4em rgba(0,0,0,.8); text-wrap: balance; }
.lede { margin: 0 0 2em; color: var(--text); font-size: 1.15em; max-width: 44em; line-height: 1.7; }
#specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2em; }
.spec {
  position: relative; display: flex; gap: 1em; text-align: left; color: var(--text); padding: 1.1em;
  background: linear-gradient(150deg, color-mix(in srgb, var(--cc) 14%, var(--panel-solid)), var(--panel-solid) 60%);
  border: 1px solid color-mix(in srgb, var(--cc) 35%, var(--line)); border-radius: .7em; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.spec:hover { transform: translateY(-.2em); border-color: var(--cc); box-shadow: 0 .6em 2em rgba(0,0,0,.5), 0 0 0 1px var(--cc); }
.spec .portrait { flex: none; width: 5em; height: 6.4em; border-radius: .3em; background: center bottom / contain no-repeat; border: 1px solid color-mix(in srgb, var(--cc) 55%, transparent); image-rendering: pixelated; }
.spec .top { display: flex; align-items: baseline; gap: .6em; }
.spec h3 { margin: 0; font-family: var(--serif); font-size: 1.5em; color: var(--cc); letter-spacing: .04em; }
.role { font-size: .75em; padding: .1em .55em; border-radius: 1em; border: 1px solid var(--line); color: var(--muted); }
.role.healer { color: #7dff8a; border-color: rgba(125,255,138,.4); }
.spec p { margin: .5em 0 .7em; font-size: .92em; line-height: 1.6; color: #d7cfbe; }
.spec dl { display: grid; grid-template-columns: auto 1fr; gap: .25em .7em; margin: 0; font-size: .85em; }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; }
.spec > kbd { position: absolute; right: .8em; top: .8em; }
.keys { list-style: none; padding: 0; margin: 2em 0 0; display: flex; flex-wrap: wrap; gap: .6em 2em; color: var(--muted); font-size: .92em; }
.keys kbd { margin-right: .5em; }
#end .panel { background: var(--panel-solid); border: 1px solid var(--line); border-radius: .9em; padding: 2em 2.4em; width: min(92%, 66em); }
h2 { margin: 0; font-family: var(--serif); font-size: 3.4em; letter-spacing: .15em; }
h2.win { color: var(--gold); } h2.lose { color: #ff7a6a; }
.sub { color: var(--muted); margin: .3em 0 1.4em; font-size: 1.05em; }
.cols { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2em; }
.cols h4 { margin: 0 0 .6em; color: var(--muted); font-weight: 600; letter-spacing: .08em; font-size: .9em; }
.tbl { width: 100%; border-collapse: collapse; font-size: .95em; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; color: var(--muted); font-weight: 500; font-size: .85em; padding: .3em .4em; border-bottom: 1px solid var(--line); }
.tbl td { padding: .4em; border-bottom: 1px solid rgba(255,255,255,.05); }
.tbl .team td:first-child { color: var(--cc); font-weight: 700; }
.tbl.bars td:nth-child(2) { width: 50%; }
.tbl.bars i { display: block; height: .7em; border-radius: .2em; background: linear-gradient(90deg, var(--moon), #c79bff); }
.tbl.bars td:last-child { text-align: right; color: var(--muted); }
.kills { color: var(--muted); font-size: .85em; margin: 1.2em 0 0; }
.btns { display: flex; gap: .8em; justify-content: center; margin-top: 1.6em; }
.btns button { padding: .7em 1.6em; border-radius: .4em; border: 1px solid var(--line); background: #1d1a2b; color: var(--text); font-size: 1em; }
.btns button.primary { background: linear-gradient(#ffe066, #c99a00); color: #1a1200; border-color: #ffd100; font-weight: 800; }
.btns button.primary kbd { color: #1a1200; border-color: rgba(0,0,0,.35); background: rgba(255,255,255,.3); }
#fatal { position: absolute; inset: 2em; background: #2a0b0b; color: #ffb0a8; padding: 1em; white-space: pre-wrap; border: 1px solid #a33; }
@media (prefers-reduced-motion: reduce) { #announce.show, .slot.ready { animation: none; opacity: 1; } .spec { transition: none; } }

/* ================= v2 肉鸽层：选择页 / 商店 / 队伍框 ================= */
#pf .lanes { display: flex; flex-wrap: wrap; gap: .3em; margin-top: .3em; }
#pf .lanes span { font-size: .72em; padding: .05em .5em; border-radius: 1em; border: 1px solid color-mix(in srgb, var(--cc) 50%, transparent); background: rgba(0,0,0,.45); white-space: nowrap; }
/* 分队由「在哪个框里」表达，不再写「队伍N · 职业」小字 */
.frame .squad, #pf .squad { display: none; }

/* 选择页：按职业分三列 */
#specs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2em; align-items: start; }
.cls { display: flex; flex-direction: column; gap: .6em; }
.cls header { display: flex; gap: .8em; align-items: center; padding-bottom: .5em; border-bottom: 1px solid color-mix(in srgb, var(--cc) 40%, var(--line)); }
.cls header .portrait { width: 3.2em; height: 4.2em; border-radius: .3em; background: center bottom / contain no-repeat; border: 1px solid color-mix(in srgb, var(--cc) 60%, transparent); image-rendering: pixelated; flex: none; }
.cls h3 { margin: 0; font-family: var(--serif); font-size: 1.5em; color: var(--cc); letter-spacing: .06em; }
.cls header p { margin: .15em 0 0; font-size: .82em; color: var(--muted); }
.cls header p b { color: #ff8000; font-weight: 700; }
.cls .spec { display: block; padding: .75em .9em; }
.cls .spec .top { display: flex; align-items: center; gap: .6em; }
.cls .spec h4 { margin: 0; font-size: 1.1em; color: var(--text); }
.cls .spec .top kbd { margin-left: auto; }
.cls .spec p { margin: .4em 0 .35em; font-size: .82em; line-height: 1.55; color: #cfc6b4; }
.cls .spec .meta { font-size: .76em; color: var(--muted); }
.cls .spec { --cc: inherit; }
#menu .panel { width: min(94%, 88em); }
#menu h1 { font-size: 4.4em; }
#menu .lede { margin-bottom: 1.4em; }

/* 商店 */
/* 两个商店叠起来比屏幕高时（宽而矮的窗口，界面按宽度缩放）：整屏滚动，面板从顶部排起 */
#shop { overflow-y: auto; align-items: start; padding: 1.2em 0; }
#shop .panel.shop { position: relative; width: min(95%, 92em); background: var(--panel-solid); border: 1px solid var(--line); border-radius: .9em; padding: 1.3em 1.6em 1.5em; }
/* 顶栏钉住：往下滚货架时，金币和「开始下一波」不能跟着滚走 */
.shop-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 1.5em;
             padding: .2em 0 .9em; border-bottom: 1px solid var(--line); background: var(--panel-solid); }
.shop-head h2 { font-size: 2.2em; letter-spacing: .1em; color: var(--gold); }
.shop-head .sub { margin: .2em 0 0; }
.shop-head .tickets { margin-left: auto; text-align: right; font-size: 1.5em; font-variant-numeric: tabular-nums; }
/* 货币图标：8-bit 像素图，由 game/currency.js 在启动时烘焙进 --cur-img */
/* 尺寸用整数倍像素（16 / 32px）：16×16 的像素图缩到 13px 这类非整数倍会丢像素、糊成一团 */
.cur { display: inline-block; width: 16px; height: 16px; margin-right: 3px; vertical-align: -3px;
       background: var(--cur-gold) center / contain no-repeat; image-rendering: pixelated; }
.cur-ticket { background-image: var(--cur-ticket); }
/* 通用像素小图标（王冠、卡片……），大小跟着字号走但按像素锐利显示 */
/* 界面里的小人也会轻轻呼吸（用户要的"动态"）；开了系统减少动态效果就停下 */
@keyframes heroBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
.ctile .portrait, .spec .portrait, .offer .portrait, .cls header .portrait, .frame .portrait { animation: heroBob 1.8s ease-in-out infinite; }
.ctile:nth-child(2n) .portrait, .offer:nth-child(2n) .portrait { animation-delay: -.6s; }
.ctile:nth-child(3n) .portrait { animation-delay: -1.1s; }
.ctile.on .portrait { animation-duration: 1.1s; }
@media (prefers-reduced-motion: reduce) { .ctile .portrait, .spec .portrait, .offer .portrait, .cls header .portrait, .frame .portrait { animation: none; } }
.pxi { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -.2em; background: var(--i) center / contain no-repeat; image-rendering: pixelated; }
/* 暗月卡片的牌面：竖着的塔罗牌比例，像素放大不模糊 */
.tarot.card-art { width: 2.6em; height: 3.6em; background: center / contain no-repeat; image-rendering: pixelated;
                  filter: drop-shadow(0 0 .35em color-mix(in srgb, var(--qc) 70%, transparent)); }
.tarot.px { width: 2.7em; height: 2.7em; background: center / contain no-repeat; image-rendering: pixelated; filter: drop-shadow(0 0 .3em color-mix(in srgb, var(--qc) 60%, transparent)); }
.shop-head .tickets .cur { width: 32px; height: 32px; vertical-align: -6px; margin-right: 6px; }
.shop-head .wallet { margin-left: auto; display: flex; gap: 1.4em; align-items: flex-start; }
.shop-head .wallet .tickets { margin-left: 0; }
.shop-head .wallet .tk b { color: #ff7a7a; }
/* 暗月奖品摊：红紫色调，和金币商店区分开 */
.prizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8em; margin-bottom: 1.1em; }
.offer.prize .tarot { font-size: 2.2em; line-height: 1.3; }
.offer.prize { --qc: #ff6b6b; background: linear-gradient(170deg, #2a1420, #16131f 70%); }
.offer.prize.altar { --qc: #b44cff; background: linear-gradient(170deg, #241236, #16131f 70%); border-style: dashed; }
.offer.prize button { border-color: rgba(255,107,107,.55); color: #ff9a9a; background: #2a1218; }
.offer.prize.altar button { border-color: rgba(180,76,255,.6); color: #d6a4ff; background: #1f1230; }
/* 天赋三选一：**盖在商店上面的独立面板**。一局只有四次、而且是唯一改变主角的东西 ——
   原来只是商店最上面的一条，是整页最小的一块，权重完全不对（评审提的） */
.talents { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
           gap: 1em; background: rgba(8,7,12,.86); backdrop-filter: blur(3px); border-radius: .6em; }
.talents[hidden] { display: none; }
.talents h3 { margin: 0; font-size: 1.5em; color: var(--gold); letter-spacing: .06em; }
.talents h3 small { display: block; margin-top: .3em; font-size: max(.5em, 12px); color: var(--muted); font-weight: 500; letter-spacing: 0; }
.talent-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; width: min(60em, 88%); }
.talent { min-height: 9em; }
.talent { position: relative; display: flex; flex-direction: column; gap: .3em; text-align: left; padding: .8em .9em 1em; border-radius: .5em;
          border: 1px solid #6a5a2a; background: linear-gradient(170deg, #2a2412, #16131f 70%); color: var(--text); cursor: pointer; }
.talent:hover { border-color: var(--gold); background: linear-gradient(170deg, #3a3218, #16131f 70%); }
.talent .q { font-size: .72em; font-weight: 800; color: var(--gold); letter-spacing: .1em; }
.talent h4 { margin: 0; font-size: 1.25em; color: var(--gold); }
.talent h4 small { margin-left: .5em; font-size: .72em; color: var(--muted); font-weight: 500; }
.talent .desc { margin: 0; font-size: .92em; color: #d8cfbd; line-height: 1.5; }
.talent .hint { margin: 0; font-size: .75em; color: var(--muted); }
.talent .kbd { position: absolute; right: .6em; bottom: .5em; }
.prize-foot { display: flex; align-items: center; gap: 1em; margin: -.3em 0 1.1em; }
.status { display: flex; flex-wrap: wrap; gap: .4em; margin: .2em 0 .9em; }
.status span { font-size: .78em; padding: .15em .6em; border-radius: 1em; border: 1px solid var(--line); color: #d6c9ff; background: #1a1626; }
.shop-head .tickets b { color: var(--gold); font-size: 1.3em; }
.shop-head .tickets small { display: block; font-size: max(.5em, 11px); color: var(--muted); }
.shop-head .go { padding: .8em 1.4em; border-radius: .45em; border: 1px solid #ffd100; background: linear-gradient(#ffe066, #c99a00); color: #1a1200; font-weight: 800; font-size: 1em; }
.shop-head .go kbd { color: #1a1200; border-color: rgba(0,0,0,.35); background: rgba(255,255,255,.3); }
.shop-body { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.6em; margin-top: 1em; }
.shop-body h3 { margin: .2em 0 .6em; font-size: .9em; color: var(--muted); font-weight: 600; letter-spacing: .12em; }
.shop-body h3 small { font-weight: 400; letter-spacing: 0; margin-left: .6em; opacity: .8; }
.offers { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: .8em; }
.offer {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35em;
  padding: 1em .7em .8em; border-radius: .6em; background: linear-gradient(170deg, color-mix(in srgb, var(--qc) 12%, #1a1826), #121019 70%);
  border: 1px solid color-mix(in srgb, var(--qc) 50%, var(--line)); min-height: 17em;
}
.offer .q { position: absolute; left: .6em; top: .5em; font-size: .72em; font-weight: 800; color: var(--qc); letter-spacing: .1em; }
.offer .portrait { width: 4.2em; height: 5.4em; border-radius: .3em; background: center bottom / contain no-repeat; border: 1px solid color-mix(in srgb, var(--qc) 60%, transparent); image-rendering: pixelated; box-shadow: 0 0 1em color-mix(in srgb, var(--qc) 40%, transparent); }
.offer .tarot { font-size: 3em; line-height: 1.5; filter: drop-shadow(0 0 .3em color-mix(in srgb, var(--qc) 60%, transparent)); }
.offer h4 { margin: .1em 0 0; font-size: 1.05em; color: var(--cc, var(--qc)); }
.offer h4 small { display: block; font-size: .7em; color: var(--muted); font-weight: 500; }
.offer .chips { display: flex; gap: .3em; }
.offer .chips span { font-size: .72em; padding: .05em .5em; border-radius: 1em; border: 1px solid var(--line); color: var(--muted); }
.offer .hint, .offer .desc { margin: 0; font-size: .78em; color: #cfc6b4; line-height: 1.45; }
.offer .desc { color: var(--text); font-size: .85em; }
.offer button { margin-top: auto; width: 100%; padding: .5em; border-radius: .35em; border: 1px solid rgba(255,209,0,.5); background: #231f10; color: var(--gold); font-weight: 800; font-size: .95em; }
.offer button:hover:not(:disabled) { background: #3a3110; }
.offer button:disabled { opacity: .45; cursor: default; }
.offer .why { font-size: .7em; color: #ff8a7a; }
.offer.sold { opacity: .4; }
.offer.empty { justify-content: center; color: var(--muted); }
.market-foot { display: flex; align-items: center; gap: 1em; margin: .8em 0 1.1em; }
.refresh { padding: .45em 1em; border-radius: .35em; border: 1px solid var(--line); background: #1d1a2b; color: var(--text); }
.refresh:disabled { opacity: .45; }
.market-foot .note { font-size: .78em; color: var(--muted); }
.roster ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3em; }
.roster li { display: flex; flex-wrap: wrap; align-items: center; gap: .5em .5em; padding: .4em .6em; border-radius: .35em; background: #16141f; border-left: .25em solid var(--qc, var(--gold)); color: var(--cc); font-size: .92em; }
.roster li.me { border-left-color: var(--gold); }
.roster li b { font-weight: 800; }
.roster .qdot { display: none; }
.roster .tag { margin-left: auto; font-size: .75em; color: var(--muted); }
/* 队伍行等级芯片：quality 上色的点阵 + 品质名（绿蓝紫橙）。点越多级越高，一眼看出买过几次 */
.roster .tag.qlv { display: inline-flex; align-items: center; gap: .28em; color: var(--qc, var(--muted)); font-weight: 700; white-space: nowrap; }
.roster .tag.qlv .qdot { display: inline-block; width: .55em; height: .55em; border-radius: 50%; background: var(--qc, var(--muted)); box-shadow: 0 0 .35em color-mix(in srgb, var(--qc, var(--muted)) 70%, transparent); }
.roster .tag.qlv .qpips { display: inline-flex; gap: .18em; }
.roster .tag.qlv .qpips i { width: .38em; height: .38em; border-radius: 1px; background: #3a3452; }
.roster .tag.qlv .qpips i.on { background: var(--qc, var(--muted)); box-shadow: 0 0 .25em color-mix(in srgb, var(--qc, var(--muted)) 60%, transparent); }
/* 队伍行装备预览（只读 7 小格 + 套装进度）：手机版队伍页签用，不做换装交互。
   必须一行装得下 —— 格子压到最小、套装徽章只留件数（名字进 title） */
.gpreview { display: inline-flex; align-items: center; gap: 2px; flex: none; margin-left: .3em; }
.gpreview .gp-s { width: .82em; height: .82em; border-radius: .15em; border: 1px solid var(--qc, #4a4460); background: #0d0a12 center / 100% no-repeat; image-rendering: pixelated; flex: none; }
.gpreview .gp-s.empty { border-style: dashed; border-color: #6a6288; background: rgba(255,255,255,.04); }
.gpreview .gp-set { font-size: .62em; font-weight: 800; font-variant-numeric: tabular-nums; padding: 0 .28em; border-radius: .2em; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; margin-left: 2px; }
.gpreview .gp-set.lv2 { border-color: var(--sc); color: var(--sc); background: color-mix(in srgb, var(--sc) 14%, transparent); }
.gpreview .gp-set.lv4 { border-color: var(--sc); background: var(--sc); color: #120e18; }
.gpreview .gp-set.off { opacity: .65; }
/* 商店队伍分组标题（人不够 6 不分队时不出现） */
.roster li.sqhead { background: none; border-left: 0; border-top: 1px solid var(--line); border-radius: 0;
    color: var(--muted); font-size: .78em; letter-spacing: .12em; padding: .7em .2em .15em; margin-top: .2em; }
.roster li.sqhead:first-child { margin-top: 0; border-top: 0; padding-top: .2em; }
.acts { display: flex; flex-direction: column; gap: .4em; margin: .7em 0 1em; }
.bonds { display: flex; flex-direction: column; gap: .3em; }
.bond { display: grid; grid-template-columns: 5.2em auto 1fr; align-items: center; gap: .6em; font-size: .85em; color: var(--muted); }
.bond.zero { opacity: .45; }
.bond.active { color: var(--text); }
.bond .bn { font-weight: 700; }
.bond.active .bn { color: var(--gold); }
.bond .pips { display: flex; gap: .15em; }
.bond .pips i { width: .6em; height: .8em; border-radius: .12em; background: rgba(255,255,255,.08); }
.bond .pips i.mark { box-shadow: inset 0 -2px 0 rgba(255,209,0,.6); }
.bond .pips i.on { background: #c9a14a; }
.bond.active .pips i.on { background: var(--gold); }
.bond .be { font-size: .92em; white-space: normal; overflow: visible; line-height: 1.45; }
/* 羁绊全部档位（2026-09-26：原来只显示一档，看不到「2人/3人各给什么」） */
.bond .be .bt { margin-right: .35em; }
.bond .be .bt.on { color: var(--gold); font-weight: 700; }
.bond .be .bt.off { opacity: .55; }
.bond .be em { font-style: normal; color: var(--muted); margin-right: .35em; }

/* 选择页：两步选（职业 → 专精） */
/* 13 个职业排成 7 + 6 两行；窄屏退回自动换行 */
#classes { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .6em; margin-bottom: 1.2em; }
@media (max-width: 760px) { #classes { grid-template-columns: repeat(auto-fill, minmax(7em, 1fr)); } }
.ctile { display: flex; flex-direction: column; align-items: center; gap: .3em; padding: .7em .4em .6em; border-radius: .6em;
  background: #15131f; border: 1px solid var(--line); color: var(--text); transition: border-color .12s, transform .12s; }
.ctile:hover { transform: translateY(-.15em); border-color: color-mix(in srgb, var(--cc) 60%, var(--line)); }
.ctile.on { border-color: var(--cc); background: linear-gradient(170deg, color-mix(in srgb, var(--cc) 20%, #15131f), #15131f 70%); box-shadow: 0 0 0 1px var(--cc); }
.ctile .portrait { width: 3em; height: 4em; border-radius: .3em; background: center bottom / contain no-repeat; border: 1px solid color-mix(in srgb, var(--cc) 55%, transparent); image-rendering: pixelated; }
.ctile b { font-family: var(--serif); font-size: 1.05em; color: var(--cc); }
.ctile small { font-size: .72em; color: var(--muted); }
#specs { display: block; }
#specs header { display: flex; align-items: baseline; gap: 1em; margin-bottom: .7em; }
#specs header h3 { margin: 0; font-family: var(--serif); font-size: 1.6em; color: var(--cc); letter-spacing: .08em; }
#specs header p { margin: 0; color: var(--muted); font-size: .9em; }
#specs header p b { color: #ff8000; }
.spec-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(16em, 1fr)); gap: .9em; }
.spec-row .spec { display: block; text-align: left; padding: .85em 1em; }
.spec-row .spec .top { display: flex; align-items: center; gap: .6em; }
.spec-row .spec .top .portrait { flex: none; width: 2.6em; height: 3em; background: center bottom / contain no-repeat; image-rendering: pixelated; }
.spec-row .spec h4 { margin: 0; font-size: 1.15em; color: var(--text); }
.spec-row .spec .top kbd { margin-left: auto; }
.spec-row .spec p { margin: .45em 0 .4em; font-size: .85em; line-height: 1.6; color: #cfc6b4; }
.spec-row .spec .meta { font-size: .78em; color: var(--muted); }
.role.tank { color: #7ab8ff; border-color: rgba(122,184,255,.45); }

/* 解雇按钮：藏在队伍行里，不抢眼，但队伍满了必须找得到 */
.roster li { position: relative; }
/* 一直看得见（只在 hover 才出现的话，队伍满了的人根本找不到它）——平时压暗，指上去才亮 */
.roster li .fire { margin-left: auto; display: inline-flex; align-items: center; gap: .25em; opacity: .45;
                   background: rgba(120,20,20,.3); color: #ffb0a8; border: 1px solid rgba(255,120,100,.3);
                   border-radius: .3em; font-size: .72em; padding: .1em .45em; cursor: pointer; white-space: nowrap; }
.roster li:hover .fire { opacity: 1; }
.roster li .fire:hover { background: rgba(180,30,30,.55); color: #fff; }
.roster h3 .full { margin-left: .6em; font-size: .78em; color: #ffb454; font-weight: 600; }

/* 旅伴卡上的数值：买谁不能靠职业名瞎猜 */
.offer .stats { margin: .25em 0 0; font-size: .76em; color: var(--muted); font-variant-numeric: tabular-nums; }
.offer .stats b { color: #e8e2d0; font-weight: 700; }
.offer .stats .dup { color: #ffb454; }

/* 首领机制预告：橙色一条，和普通说明区分开 */
.bosstip { margin: .35em 0 0; font-size: .82em; color: #ffcf8a; background: rgba(255,140,40,.08);
           border-left: 3px solid #ff8c28; border-radius: 0 .3em .3em 0; padding: .25em .6em; }
.bosstip b { color: #ff9a3c; margin-right: .5em; }

/* 结算页的一行总结 */
#end .runstats { margin: .2em 0 1.1em; font-size: .92em; color: #c9c2b4; }
#end .runstats b { color: var(--gold); font-variant-numeric: tabular-nums; }
#end .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(17em, 1fr)); gap: 1.4em; }
#end .bars td i { background: linear-gradient(90deg, #6dff9a, #2ac86a); }
#end section:nth-child(2) .bars td i { background: linear-gradient(90deg, #ffb454, #c96a00); }

/* 排行榜（只有无尽 / 史诗钥石会出现） */
.board { margin-top: 1.4em; border-top: 1px solid var(--line); padding-top: 1em; }
.board[hidden] { display: none; }
.board .bhead { display: flex; align-items: baseline; gap: .8em; }
.board .bhead h4 { margin: 0 0 .5em; color: var(--gold); }
.board .bhead .rank { font-size: .85em; color: #9fe3ff; }
.board .bhead .rank b { color: var(--gold); font-size: 1.2em; }
.board form { display: flex; gap: .6em; align-items: center; margin: 0 0 .8em; font-size: .9em; }
.board form[hidden] { display: none; }
.board input { background: #12101a; border: 1px solid var(--line); border-radius: .3em; color: var(--text); padding: .35em .6em; font: inherit; width: 9em; }
.board button { padding: .4em 1em; border-radius: .35em; border: 1px solid #ffd100; background: linear-gradient(#ffe066, #c99a00); color: #1a1200; font-weight: 700; cursor: pointer; }
.board tbody tr.me { background: rgba(255,209,0,.12); }
.board td.empty { color: var(--muted); text-align: center; padding: .8em; }

/* 奖券为 0 时把奖品摊折叠成一行灰条：新玩家第一眼不该是一整排买不起的东西 */
.prizes.locked { display: block; }
.prizes.locked .offer { display: none; }
.prizes.locked::before { content: attr(data-locked); display: block; font-size: .85em; color: var(--muted);
                         border: 1px dashed var(--line); border-radius: .4em; padding: .5em .8em; }

/* 菜单：把"点专精卡就开局"写出来 */
#specs header .gohint { display: inline-block; margin-top: .3em; font-size: .8em; color: var(--gold); }
.spec .go { display: block; margin-top: .5em; font-size: .8em; color: var(--gold); opacity: .55; }
.spec:hover .go { opacity: 1; }
/* 暂停页速查 */
#pausesheet dl { display: grid; grid-template-columns: auto 1fr; gap: .25em .9em; margin: .8em 0 0; font-size: .85em; text-align: left; }
#pausesheet dt { color: var(--muted); white-space: nowrap; }
#pausesheet dd { margin: 0; color: #d8cfbd; }
#pausesheet b { color: var(--gold); }

/* 按键说明底部的"开打"提示：说明弹着时游戏是暂停的，要让人知道怎么继续 */
#keyhint .go { margin: .8em 0 0; text-align: center; color: var(--gold); font-weight: 700; animation: hintpulse 1.2s ease-in-out infinite; }
@keyframes hintpulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { #keyhint .go { animation: none; } }

/* 阵容缺口：坦克 / 治疗各要 2 个，缺的标橙 */
.roster .rolebar { display: flex; flex-wrap: wrap; gap: .35em; margin: .1em 0 .4em; }
.roster .rolebar span { font-size: .78em; padding: .1em .55em; border-radius: 1em; border: 1px solid var(--line); color: var(--muted); font-variant-numeric: tabular-nums; }
.roster .rolebar span.ok { color: #9fe3a0; border-color: rgba(120,220,130,.35); }
.roster .rolebar span.lack { color: #ffb454; border-color: rgba(255,160,60,.6); background: rgba(255,140,40,.1); font-weight: 700; }
.roster .lacktip { margin: 0 0 .6em; font-size: .78em; color: #ffcf8a; }
.offer .chips .fill { color: #1a1200; background: #ffb454; border-color: #ffb454; font-weight: 800; }

/* 低血红边：--k 0~1（血越少越大），--speed 脉动周期 */
#lowhp { position: absolute; inset: 0; pointer-events: none; opacity: 0; z-index: 1;
         background: radial-gradient(ellipse at center, transparent 55%, rgba(200, 0, 0, calc(.25 + .45 * var(--k, 0))) 100%); }
#lowhp.on { animation: lowhp var(--speed, 1s) ease-in-out infinite; }
@keyframes lowhp { 0%, 100% { opacity: calc(.55 + .45 * var(--k, 0)); } 50% { opacity: calc(.25 + .3 * var(--k, 0)); } }
@media (prefers-reduced-motion: reduce) { #lowhp.on { animation: none; opacity: calc(.4 + .5 * var(--k, 0)); } }
/* 结算页：死前 5 秒的伤害构成 */
#end .recap { margin: -.6em 0 1.1em; font-size: .88em; color: #ffb3a6; }
#end .recap b { color: #ff8a7a; }

/* 一波结束后的针对性建议（伤害垫底 / 一个技能没按）*/
.coach { margin: .35em 0 0; font-size: .82em; color: #bfe8ff; background: rgba(90,170,255,.08);
         border-left: 3px solid #5aa8ff; border-radius: 0 .3em .3em 0; padding: .25em .6em; }

/* 货架锁定 */
.offer .lock { margin-top: .3em; width: 100%; font-size: .72em; padding: .15em 0; border-radius: .3em; cursor: pointer;
               background: transparent; color: var(--muted); border: 1px dashed var(--line); }
.offer .lock:hover { color: var(--text); border-color: var(--muted); }
.offer .lock.on { color: #1a1200; background: #9fd8ff; border: 1px solid #9fd8ff; font-weight: 800; }

/* 排行榜页（主菜单 B） */
.menubar { margin: -.4em 0 .8em; display: flex; gap: .5em; }
.menubar button { padding: .35em .9em; border-radius: .35em; border: 1px solid var(--line); background: #15131f; color: var(--gold); font: inherit; font-size: .9em; cursor: pointer; }
.menubar button:hover { border-color: var(--gold); }
#boards .btabs { display: flex; flex-wrap: wrap; gap: .4em; margin: .6em 0 0; }
#boards .btabs button { padding: .4em .8em; border-radius: .35em; border: 1px solid var(--line); background: #15131f; color: var(--text); font: inherit; font-size: .9em; cursor: pointer; text-align: left; }
#boards .btabs button small { display: block; font-size: .78em; color: var(--muted); }
#boards .btabs button.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; color: var(--gold); }
#boards .board { border-top: 0; }
#boards .mine { color: #9fe3ff; font-size: .9em; margin: .6em 0 0; }
.bhead h4 small { margin-left: .6em; font-size: .75em; color: var(--muted); font-weight: 400; }
#quit.danger { border-color: #ff6a5a; color: #ff8a7a; }
#diffs button b .rec { font-style: normal; font-size: .62em; margin-left: .5em; padding: .05em .45em; border-radius: .3em; background: #9fe3a0; color: #0e1a0e; vertical-align: .15em; }
.bond-zero { margin: .3em 0 0; font-size: .8em; color: var(--muted); }
.lacktip kbd { font-size: .85em; }
#bossbar .bcast em { font-style: normal; color: #ffe0c8; margin-left: .6em; }
#bossbar .btip { display: block; margin-top: .3em; padding: .35em .7em; font-size: max(.85em, 11px); line-height: 1.45; color: #ffe0c8; background: rgba(40,10,6,.78); border: 1px solid #6b2a22; border-radius: .3em; }
#bossbar .btip[hidden] { display: none; }
.challenge { margin: .5em 0 0; padding: .5em .8em; border: 1px solid #b44cff; border-radius: .35em; background: rgba(120,40,180,.15); font-size: .9em; line-height: 1.5; }
.challenge b { color: #d6a4ff; margin-right: .5em; }
.challenge span { display: block; color: var(--muted); }
.challenge button { margin-top: .35em; padding: .3em .9em; border-radius: .3em; border: 1px solid #b44cff; background: #2a1840; color: #e8d0ff; font: inherit; cursor: pointer; }
button.elite { align-self: center; margin-right: .6em; padding: .45em .9em; border-radius: .4em; border: 1px dashed #ff9a2a; background: #1d1614; color: #ffc68a; font: inherit; cursor: pointer; text-align: left; }
button.elite small { display: block; font-size: max(.72em, 11px); color: var(--muted); }
button.elite.on { border-style: solid; background: rgba(255,120,30,.18); box-shadow: 0 0 0 1px #ff9a2a inset; }
button.elite b, .elitetag { color: #ff9a2a; }
.offer .hint.none { color: #ff8a7a; }
.offer .hint .combo-hot { color: #ffd76a; font-weight: 700; }
.offer .hint .combo-on { color: #6cff8a; font-weight: 700; }
#daily { color: var(--text) !important; }
#daily b { font-weight: 800; }
.spec h4 .badge { font-style: normal; font-size: .6em; margin-left: .5em; padding: .05em .4em; border-radius: .25em; border: 1px solid var(--dc); color: var(--dc); vertical-align: .2em; font-weight: 700; }
#end .meta { margin: .4em 0 0; padding: .45em .8em; border-radius: .35em; background: rgba(255,209,0,.08); border: 1px solid rgba(255,209,0,.35); font-size: .9em; line-height: 1.6; }
#end .meta[hidden] { display: none; }
.achv { list-style: none; margin: .4em 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(16em, 1fr)); gap: .5em; }
.achv li { padding: .5em .7em; border-radius: .35em; border: 1px solid var(--line); background: #15131f; opacity: .55; }
.achv li.got { opacity: 1; border-color: var(--gold); background: rgba(255,209,0,.08); }
.achv li b { display: block; color: var(--gold); }
.achv li span { font-size: .85em; color: var(--muted); }
.spec .ease { margin: .15em 0 .2em; font-size: max(.78em, 11px); color: var(--muted); }
.spec .ease b { color: var(--ec); }
/* 十一格动作条（2026-09-14）：格子缩一点，一排放得下 */
#actionbar.wide .slot.big { width: 4.3em; height: 3.7em; }
#actionbar.wide .slot .nm { font-size: .72em; }
.buff.debuff { border-color: #c0392b; background: rgba(120,20,20,.55); }
.buff.team { font-size: .78em; opacity: .85; letter-spacing: .1em; }
.frame .name .st { margin-left: .35em; font-size: .85em; }
.spec .rot, #keyhint .rot { margin: .35em 0 .2em; font-size: max(.82em, 11px); line-height: 1.55; color: var(--text); }
.spec .rot b, #keyhint .rot b { color: var(--gold); margin-right: .45em; }
.spec .rot kbd, #keyhint .rot kbd { font-size: .85em; padding: 0 .3em; }

/* 正式服 / 测试服切换（主菜单右上角） */
.channel { position: absolute; top: 1em; right: 1.2em; z-index: 20; padding: .4em 1em; border-radius: .4em; border: 1px solid #b44cff; background: rgba(60,20,90,.75);
           color: #e8d0ff; font-weight: 700; text-decoration: none; letter-spacing: .08em; }
.channel:hover { background: rgba(100,40,150,.9); }
.channel.back { border-color: var(--gold); color: var(--gold); background: rgba(60,45,0,.7); }
.channel[hidden], .channelnote[hidden] { display: none; }
.channelnote { position: absolute; top: 1.15em; right: 9em; z-index: 20; margin: 0; padding: .3em .8em; border-radius: .35em; background: rgba(180,76,255,.2); border: 1px dashed #b44cff; color: #e8d0ff; font-size: .85em; }

/* 觉醒（2026-09-14）：合击格角标 + 另外两系的自动释放开关 */
.slot.combo::before { content: '合击'; position: absolute; right: .2em; top: .1em; font-size: max(.58em, 9px); font-weight: 800; color: #ff8000; z-index: 2; text-shadow: 0 1px 2px #000; }
.slot.combo[data-ult]::before { content: '三系'; }
.lanegrp { display: flex; flex-direction: column; gap: .25em; align-self: stretch; justify-content: space-between; }
.slot.lane { cursor: pointer; font: inherit; color: inherit; width: 6.2em; height: auto; flex: 1; min-height: 1.7em; display: flex; align-items: center; gap: .3em; padding: 0 .35em;
             border: 1px solid var(--sc); box-shadow: inset 0 0 0 1px var(--sc); }
.slot.lane kbd { position: static; color: var(--gold); border-color: rgba(255,209,0,.5); }
.slot.lane .nm { font-size: .7em; white-space: nowrap; padding: 0; }
.slot.lane em { position: static; margin-left: auto; font-size: .7em; color: #9fe3a0; }
.slot.lane.off { opacity: .75; box-shadow: none; border-style: dashed; }
.slot.lane.off em { color: #ff9a7a; }
.slot.lane .pips { position: absolute; left: 50%; bottom: .08em; transform: translateX(-50%); display: flex; gap: .18em; font-style: normal; }
.slot.lane .pips b { width: .3em; height: .3em; border-radius: 50%; background: rgba(255,255,255,.18); }
.slot.lane .pips b.ready { background: var(--sc); box-shadow: 0 0 .3em var(--sc); }
.slot.lane:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
#actionbar.wide.lanes .slot.big { width: 3.95em; }
#actionbar.wide.lanes { gap: .3em; }
/* 只留大秘境（2026-09-14）：主菜单原来的难度选择换成一张说明卡 */
#diffs .keystone { flex: 1; padding: .55em .8em; border-radius: .45em; border: 1px solid #ff8000; background: color-mix(in srgb, #ff8000 12%, #15131f); }
#diffs .keystone b { display: block; color: #ff8000; }
#diffs .keystone small { display: block; font-size: .72em; color: var(--muted); line-height: 1.35; margin-top: .15em; }
#diffs .keystone .best { color: #9fe3a0; }

/* 大秘境词缀（2026-09-14）：层开始横幅 + 商店「接下来两层」 */
#affixbanner { position: absolute; left: 50%; top: 68%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .3em; pointer-events: none; opacity: 0; z-index: 5; }
#affixbanner.show { animation: affixin 3.2s ease both; }
#affixbanner p { margin: 0; display: flex; align-items: baseline; gap: .5em; background: rgba(20,8,6,.78); border: 1px solid rgba(255,110,60,.45); border-radius: .4em; padding: .3em .8em; white-space: nowrap; }
#affixbanner em { font-style: normal; font-size: 1.2em; }
#affixbanner b { color: #ffb070; font-size: 1.05em; }
#affixbanner sup { color: #ffd100; font-size: .65em; margin-left: .2em; }
#affixbanner span { color: #f0e6d8; font-size: .9em; }
@keyframes affixin { 0% { opacity: 0; transform: translate(-50%, -8px); } 10% { opacity: 1; transform: translate(-50%, 0); } 82% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #affixbanner.show { animation: none; opacity: 1; } }
.affprev { margin: .45em 0 0; display: flex; flex-direction: column; gap: .3em; }
.affrow { display: flex; flex-wrap: wrap; gap: .35em; align-items: stretch; font-size: .82em; }
.affrow > b { color: var(--muted); align-self: center; min-width: 4.2em; }
.affcard { display: grid; grid-template-columns: auto 1fr; column-gap: .4em; background: rgba(255,90,40,.08); border: 1px solid rgba(255,120,60,.3); border-radius: .35em; padding: .2em .5em; max-width: 21em; cursor: help; }
.affcard em { font-style: normal; grid-row: span 3; align-self: center; font-size: 1.2em; }
.affcard strong { color: #ffb070; }
.affcard small { color: #e8dccc; }
.affcard i { font-style: normal; font-size: .85em; color: var(--muted); }
.affcard i.ok { color: #9fe3a0; }
.affcard i.no { color: #ff8a7a; }

/* buff / debuff 图标块（2026-09-15）：像素图标 + 层数 + 剩余秒数 + 时间遮罩 */
#pf .buffs { display: flex; flex-direction: column; gap: .25em; }
#pf .buffs .arow { display: flex; flex-wrap: wrap; gap: .2em; }
.aic { position: relative; display: inline-block; width: 2.1em; height: 2.1em; background: var(--i) center / contain no-repeat; image-rendering: pixelated; pointer-events: auto; cursor: help; flex: none; }
.aic::after { content: ''; position: absolute; inset: 0; background: conic-gradient(rgba(0,0,0,.72) var(--p), transparent 0); border-radius: .2em; pointer-events: none; }
.aic.db::before { content: ''; position: absolute; right: 0; top: 0; border-style: solid; border-width: 0 .55em .55em 0; border-color: transparent #ff2a1a transparent transparent; z-index: 1; }
.aic b { position: absolute; right: -.15em; bottom: -.1em; font-size: .72em; font-weight: 800; color: #fff; text-shadow: 0 0 2px #000, 0 1px 2px #000; z-index: 1; font-variant-numeric: tabular-nums; }
.aic em { position: absolute; left: 50%; bottom: .05em; transform: translateX(-50%); font-style: normal; font-size: .78em; font-weight: 800; line-height: 1; padding: 0 .15em; border-radius: .15em; background: rgba(0,0,0,.72); color: #fff; font-variant-numeric: tabular-nums; }
#pf .buffs .arow { row-gap: .25em; }
.aic.sm { width: 1.35em; height: 1.35em; }
.aic.sm b { font-size: .6em; }
.aic.db { filter: drop-shadow(0 0 .12em rgba(255,60,40,.9)) drop-shadow(0 0 .12em rgba(255,60,40,.9)); }
.aic.dp { filter: drop-shadow(0 0 .2em rgba(190,110,255,.8)); }
.frame.mate .pa { display: flex; flex-wrap: wrap; gap: .15em; margin-top: .15em; min-height: 0; }
.frame.mate .pp { display: flex; gap: .25em; margin-top: .15em; }
.frame.mate .pp:empty, .frame.mate .pa:empty { display: none; }
.frame.mate .mp { position: relative; width: 1.5em; height: 1.5em; background: var(--i) center / contain no-repeat; image-rendering: pixelated; }
.frame.mate .mp i { position: absolute; left: 0; bottom: -.25em; height: .18em; background: #4fd35a; }
#bossbar .bauras { display: inline-flex; gap: .15em; margin-left: .6em; vertical-align: middle; }
/* 宠物框（2026-09-15）：头像 + 名字 + 血条 + 蓝条 / 剩余时间 */
#summons { gap: .35em; align-items: flex-end; max-width: 15.5em; }
#summons.compact .pet .pbody small { display: none; }
#summons.compact .pet .pbody { width: 3em; }
#summons .more { font-size: .8em; color: var(--gold); align-self: center; }
#summons .pet { display: flex; align-items: center; gap: .35em; background: var(--panel); border: 1px solid var(--line); border-radius: .35em; padding: .2em .4em .2em .2em; pointer-events: auto; }
#summons .pp { position: relative; width: 2.1em; height: 2.1em; background: var(--i) center / contain no-repeat; image-rendering: pixelated; flex: none; }
#summons .pp b { position: absolute; right: -.25em; bottom: -.2em; font-size: .7em; color: var(--gold); text-shadow: 0 1px 2px #000; }
#summons .pbody { display: flex; flex-direction: column; gap: .12em; width: 5.2em; }
#summons .pbody small { font-size: .68em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#summons .pb { height: .38em; background: rgba(0,0,0,.6); border-radius: .1em; overflow: hidden; }
#summons .pb i { display: block; height: 100%; }
#summons .pb.hp i { background: linear-gradient(#6ee07a, #2e9a3a); }
#summons .pb.mp i { background: linear-gradient(#6aa8ff, #2a5ac0); }
#summons .pb.lt i { background: linear-gradient(#7ae8ff, #2a9ab0); }

/* ================= 手机版（html.mobile，由 game/touch.js 判定：触屏设备，或网址 ?mobile=1） =================
   横屏、全屏铺满；战斗强制 AUTO，只剩一个浮动摇杆；HUD 去掉动作条和伤害面板；商店分两页（金币 → 奖券）。
   字号按屏幕短边算：横屏手机高 360~430px，界面字约 11px，HUD 约 9px */
html:not(.mobile) .mobile-only { display: none !important; }
.mobile body { overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
.mobile #app { width: 100vw; height: 100vh; height: 100dvh; }
.mobile #stage { width: 100%; height: 100%; aspect-ratio: auto; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
/* 键位提示在手机上没有意义（.mobile kbd 一起藏掉），但 AUTO 开关是**要看得见、点得动**的：
   原来把 .autoqer 一起藏了，手机上既看不到状态也切不了（2026-10-07 梅维斯改）。 */
.mobile kbd, .mobile #keyhint { display: none !important; }

/* 摇杆：不按时停在左下角当提示，按下就挪到手指下面 */
#joy { display: none; }
.mobile.playing #joy { display: block; }
.mobile #joy { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; pointer-events: none;
               left: calc(env(safe-area-inset-left, 0px) + 96px); top: calc(100% - 92px);
               border-radius: 50%; border: 2px solid rgba(255,255,255,.14); background: radial-gradient(circle, rgba(255,255,255,.05), rgba(255,255,255,.02) 70%); transition: opacity .2s; opacity: .7; }
.mobile #joy i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%;
                 background: rgba(255,255,255,.16); border: 2px solid rgba(255,255,255,.22); }
.mobile #joy.on { opacity: 1; border-color: rgba(255,209,0,.45); }
.mobile #joy.on i { background: rgba(255,209,0,.38); border-color: rgba(255,224,102,.8); box-shadow: 0 0 14px rgba(255,209,0,.35); }

/* 战斗 HUD */
.mobile #hud { font-size: clamp(8px, 2.6vmin, 12px); }      /* 按短边算：横屏竖屏一样大 */
.mobile #actionbar, .mobile #swingbar, .mobile #pf .lanes, .mobile #pf .mastery { display: none !important; }
.mobile #pf { left: max(1em, env(safe-area-inset-left)); top: .8em; width: 19em; }
.mobile #pf .buffs { width: 22em; top: 7.8em; }      /* 终极充能条把主角框撑高了 1.4em，增益行要跟着下移 */
.mobile #party { right: max(1em, env(safe-area-inset-right)); top: 5em; width: 13.6em; gap: .28em; max-height: calc(100% - 13em); }
.mobile #party .sqbox { padding: .18em .22em; gap: .14em; }
.mobile #party .mate { padding: .1em .22em .12em; }
.mobile #party .mate .hp { height: 15px; margin-top: .08em; }
.mobile #party .mate .hp b { font-size: max(.62em, 9px); line-height: 13px; }
.mobile #party .mate .name { font-size: max(.72em, 9px); }
.mobile #summons { left: auto; right: max(1em, env(safe-area-inset-right)); bottom: .8em; justify-content: flex-end; }
.mobile .bottom { bottom: .8em; }
.mobile #bossbar { width: 30em; }
.mobile #bossbar .btip { font-size: .8em; padding: .25em .6em; }
.mobile #mpause { position: absolute; right: max(1em, env(safe-area-inset-right)); top: .7em; width: max(3.4em, 44px); height: max(3.4em, 44px);
                  display: flex; gap: 5px; align-items: center; justify-content: center; pointer-events: auto; padding: 0;
                  border-radius: 50%; border: 1px solid var(--line); background: var(--panel); }
.mobile #mpause i { width: 5px; height: 15px; border-radius: 1px; background: var(--text); }
.mobile #tip { font-size: 12px; max-width: min(24em, 70vw); }

/* 菜单 / 暂停 / 结算：整屏可滚，面板贴满宽度 */
.mobile .screen { font-size: clamp(10px, 2.9vmin, 13px); overflow-y: auto; touch-action: pan-y; -webkit-overflow-scrolling: touch;
                  padding: .8em max(1em, env(safe-area-inset-right)) 1.2em max(1em, env(safe-area-inset-left)); }
.mobile .screen > .panel { margin-block: auto; }
.mobile #menu .panel { width: 100%; }
.mobile #menu h1 { font-size: 3em; }
.mobile #menu .lede:not(.touchnote) { display: none; }
.mobile #menu .lede { font-size: 1em; line-height: 1.6; }
.mobile .touchnote b { color: var(--gold); }
.mobile .touchnote { margin: 0 0 .8em; padding: .5em .8em; border-radius: .4em; font-size: .95em; color: #bfe8ff; background: rgba(90,170,255,.08); border: 1px solid rgba(90,170,255,.3); }
.mobile .keys { display: none; }
.mobile .spec:hover, .mobile .ctile:hover { transform: none; }
.mobile .btns button { min-height: 42px; }
.mobile #end .panel { width: 100%; padding: 1.2em 1.4em; }
.mobile #end h2 { font-size: 2.4em; }
.mobile .panel.small { width: min(40em, 100%); }

/* 商店：两页。顶栏钉住：标题 + 步骤 + 钱包 + 翻页 / 开始按钮 */
.mobile #shop { padding: 0; }
.mobile #shop .panel.shop { width: 100%; min-height: 100%; border: 0; border-radius: 0; padding: 0 max(1em, env(safe-area-inset-right)) 1.4em max(1em, env(safe-area-inset-left)); }
.mobile .shop-head { gap: 1em; padding: .5em 0; }
.mobile .shop-head .ttl { display: flex; flex-direction: column; gap: .1em; }
.mobile .shop-head h2 { font-size: 1.55em; letter-spacing: .06em; white-space: nowrap; }
.mobile .shop-head .step { font-size: .8em; color: var(--muted); white-space: nowrap; }
.mobile .shop-head .step b { display: inline-block; min-width: 1.4em; text-align: center; border-radius: 1em; background: var(--gold); color: #1a1200; }
.mobile .shop-head .step i { font-style: normal; margin: 0 .3em; }
.mobile .shop-head .wallet { gap: 1em; align-items: center; }
.mobile .shop-head .tickets { font-size: 1.1em; white-space: nowrap; }
.mobile .shop-head .tickets small { display: none; }
.mobile .shop-head .tickets .cur { width: 16px; height: 16px; vertical-align: -3px; margin-right: 4px; }
.mobile .shop-head .go, .mobile .shop-head .next { min-height: 40px; padding: .5em 1.1em; font-size: 1em; white-space: nowrap; max-width: 24em; overflow: hidden; text-overflow: ellipsis; }
.shop-head .next { border-radius: .45em; border: 1px solid #ffd100; background: linear-gradient(#ffe066, #c99a00); color: #1a1200; font-weight: 800; }
.mobile .shop-head .go small.dn { display: none; }
.mobile .shop-head .back { min-height: 40px; padding: .4em .9em; border-radius: .45em; border: 1px solid var(--line); background: #1d1a2b; color: var(--text); white-space: nowrap; }
.mobile .shop-info { display: flex; flex-direction: column; gap: .3em; margin: .3em 0 .6em; }
.mobile .shop-info:empty { display: none !important; }
.mobile .shop-info .sub { margin: 0; font-size: .95em; }
.mobile .shop-info button.elite { align-self: stretch; margin: 0; padding: .7em 1em; font-size: 1.05em; }
.mobile .shop-body { grid-template-columns: 1.45fr 1fr; gap: 1.2em; margin-top: .4em; }
.mobile #shop.p0 .pg-prize, .mobile #shop.p1 .pg-gold, .mobile #shop.p1 .roster { display: none; }
.mobile #shop.p1 .shop-body { grid-template-columns: 1fr; }
.mobile .offers { grid-template-columns: repeat(3, 1fr); gap: .6em; }
.mobile .offer { min-height: 0; padding: 1.3em .5em .6em; }
.mobile .offer .tarot { font-size: 1.7em; line-height: 1.2; }
.mobile .offer .portrait { width: 3.4em; height: 4.4em; }
.mobile .offer button.lock { position: absolute; right: .35em; top: .3em; width: auto; min-height: 0; margin: 0; padding: .2em .6em; font-size: .78em; }
.mobile .offer button, .mobile .refresh, .mobile .talent { min-height: 38px; }
.mobile .prizes { grid-template-columns: repeat(4, 1fr); gap: .6em; }
.mobile #shop.p1 .status { margin: 0 0 .8em; }
.mobile .roster li .fire { opacity: 1; min-height: 28px; }
/* 队伍行带 7 格装备预览：优先一行装得下；真放不下才换行兜底，不许破版 */
.mobile .roster li { flex-wrap: wrap; row-gap: .15em; gap: .3em; }
.mobile .roster li .skills .need { font-size: .62em; }
.mobile .roster .tag.qlv { font-size: .68em; }
.mobile .roster li .fire { padding-inline: .35em; font-size: .85em; }
.mobile .talents { position: fixed; border-radius: 0; overflow-y: auto; justify-content: safe center; padding: 1em; }
.mobile .talent-row { width: min(64em, 96%); }
.mobile .talent { min-height: 0; }


/* 团队冷却按钮：嗜血 G（赤橙）/ 战复 H（金绿），2026-09-15 */
.slot.raid { --sc: #ff6a2a; cursor: pointer; }
.slot.raid.rez { --sc: #7dff8a; }
.slot.raid.dim .nm { opacity: .55; }
.slot.raid.none { opacity: .38; filter: grayscale(.8); }
.slot.raid.on { box-shadow: 0 0 0 2px #ff8a3a, 0 0 1.2em rgba(255,106,42,.7); }
.slot.raid.need, .mraid.need { animation: ready 0.8s ease-in-out infinite alternate; box-shadow: 0 0 0 2px #7dff8a; }
#mraid { display: none; }
.mobile #mraid { display: flex; flex-direction: column; gap: 10px; position: absolute; right: max(1em, env(safe-area-inset-right)); bottom: 9em; pointer-events: auto; }
.mraid { position: relative; width: max(4.6em, 50px); height: max(4.6em, 50px); border-radius: 50%; overflow: hidden; padding: 0; color: #fff;
         border: 2px solid #ff6a2a; background: radial-gradient(circle at 40% 35%, #5a2412, #1a0e0a 75%); font-weight: 800; }
.mraid.rez { border-color: #7dff8a; background: radial-gradient(circle at 40% 35%, #1e4a24, #0a140c 75%); }
.mraid.gap { border-color: #ffc95a; background: radial-gradient(circle at 40% 35%, #4a3a14, #140f06 75%); }   /* 冲锋（接近位移）*/
.mraid b { position: relative; z-index: 1; font-size: max(.9em, 11px); text-shadow: 0 1px 2px #000; }
.mraid .cd { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: rgba(0,0,0,.66); }
.mraid em { position: absolute; left: 0; right: 0; bottom: 18%; z-index: 1; font-style: normal; font-size: max(.75em, 10px); text-shadow: 0 1px 2px #000; }
.mraid.dim b { opacity: .6; }
.mraid.none { opacity: .35; filter: grayscale(.8); }
/* 手机版 AUTO 药丸：跟着 #mraid 竖排按钮组一起排，撑满一列宽、给足触摸高度，点一下就切。
   （电脑版的 .autopill 在动作条上，外观一字未改。） */
.mobile #mraid .autopill { align-self: stretch; justify-content: center; min-height: max(2.4em, 36px);
    font-size: max(11px, .95em); touch-action: manipulation; cursor: pointer; }
.mraid.on { box-shadow: 0 0 14px rgba(255,106,42,.8); }

/* ---- 组合技按钮（2026-09-26 手动触发，最多 3 个） ---- */
.combogrp { display: contents; }
.slot.raid.combo { --sc: #ffc23a; min-width: 5.2em; }
.slot.raid.combo .nm { font-size: .78em; letter-spacing: .02em; }
.mraid.combo { border-color: #ffc23a; background: radial-gradient(circle at 40% 35%, #4a3410, #140e04 75%); }
.mraid.combo b { font-size: max(.85em, 10px); letter-spacing: -.02em; }
.mraid.combo.on { box-shadow: 0 0 16px rgba(255,194,58,.85); }

/* 主角倒下且没法战复：×3 加速按钮（别干等队友打完） */
#fastbtn {
    position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%);
    z-index: 40; min-height: 44px; padding: .55em 1.4em;
    font: 600 1.15em/1.2 inherit; letter-spacing: .04em; color: #1a1200;
    background: linear-gradient(180deg, #ffd76a, #f0a820); border: 1px solid #ffe9a8;
    border-radius: 999px; cursor: pointer; pointer-events: auto; box-shadow: 0 4px 18px rgba(255,180,40,.45);
    animation: fastPulse 1.2s ease-in-out infinite;
}
#fastbtn:active { transform: translateX(-50%) scale(.96); }
#fastbtn.on { background: linear-gradient(180deg, #b8f07a, #6dc420); border-color: #d4ff9a; animation: none; }
@keyframes fastPulse { 0%, 100% { box-shadow: 0 4px 18px rgba(255,180,40,.45); } 50% { box-shadow: 0 4px 28px rgba(255,200,60,.8); } }

/* ---- 队伍框流动特效：组合技释放中，那 3 个人的框金色流光扫过 ---- */
@keyframes comboFlow {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
@keyframes comboFlowGlow {
    0%, 100% { box-shadow: 0 0 8px 2px rgba(255,194,58,.65), 0 0 22px 4px rgba(255,140,20,.35); }
    50%      { box-shadow: 0 0 16px 5px rgba(255,210,80,.95), 0 0 36px 10px rgba(255,140,20,.55); }
}
@keyframes comboFlowBorder {
    0%, 100% { border-color: #ffc23a; }
    50%      { border-color: #ffe9a8; }
}
#party .mate.combo-flow,
#pf.combo-flow {
    position: relative;
    border-left-width: .32em !important;
    background-image: linear-gradient(110deg,
        rgba(255,194,58,.15) 0%, rgba(255,194,58,.5) 18%, rgba(255,240,160,.75) 32%,
        rgba(255,194,58,.5) 46%, rgba(255,194,58,.15) 62%, rgba(255,194,58,.45) 82%, rgba(255,194,58,.15) 100%);
    background-size: 200% 100%;
    animation: comboFlow 1s linear infinite, comboFlowGlow 1s ease-in-out infinite, comboFlowBorder 1s ease-in-out infinite;
}
#party .mate.combo-flow .name,
#pf.combo-flow .name { color: #ffe9a8; text-shadow: 0 0 8px rgba(255,194,58,.9), 0 0 2px #fff; }
#party .mate.combo-flow .hp { box-shadow: 0 0 4px rgba(255,194,58,.6); }
@media (prefers-reduced-motion: reduce) {
    #party .mate.combo-flow, #pf.combo-flow { animation: comboFlowGlow 1.4s ease-in-out infinite, comboFlowBorder 1.4s ease-in-out infinite; }
}

/* ================= 图鉴 · 首领出场说明 · 死亡建议（game/codex.js，2026-09-15） ================= */
#codex .panel.codex { width: min(94%, 86em); height: min(92%, 60em); box-sizing: border-box; display: flex; flex-direction: column;
  background: var(--panel-solid); border: 1px solid var(--line); border-radius: .9em; padding: 1.3em 1.8em 1.5em; }
.cx-top { display: flex; align-items: center; gap: 1.2em; }
.cx-top h2 { font-size: 2.6em; color: var(--gold); letter-spacing: .14em; }
.cx-top .sub { margin: 0; flex: 1; }
.cx-top button { padding: .55em 1.3em; border-radius: .4em; border: 1px solid #ffd100; background: linear-gradient(#ffe066, #c99a00); color: #1a1200; font: inherit; font-weight: 800; cursor: pointer; }
.cx-top button kbd { color: #1a1200; border-color: rgba(0,0,0,.35); background: rgba(255,255,255,.3); }
.cx-tabs { display: flex; flex-wrap: wrap; gap: .4em; margin: .7em 0 0; }
.cx-tabs button { padding: .4em 1em; border-radius: .35em; border: 1px solid var(--line); background: #15131f; color: var(--text); font: inherit; font-size: .95em; cursor: pointer; text-align: left; }
.cx-tabs button small { display: block; font-size: .72em; color: var(--muted); min-height: 1.2em; }
.cx-tabs button.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; color: var(--gold); }
.cx-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(18em, 26em) 1fr; gap: 1.1em; margin-top: .8em; }
.cx-list { overflow-y: auto; padding-right: .3em; }
.cx-list h4 { margin: .5em 0 .35em; color: var(--muted); font-size: .8em; font-weight: 600; letter-spacing: .14em; }
.cx-list h4:first-child { margin-top: 0; }
.cx-list ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .3em; }
.cx-list button { position: relative; width: 100%; display: flex; align-items: center; gap: .5em; padding: .3em .5em; border-radius: .35em; border: 1px solid var(--line);
  background: #17141f; color: var(--text); font: inherit; font-size: .88em; text-align: left; cursor: pointer; }
.cx-list button:hover { border-color: #6a5a9a; }
.cx-list button.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; background: #221c14; }
.cx-list button.locked span { color: var(--muted); letter-spacing: .1em; }
.cx-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-list sup { position: absolute; right: .3em; top: .15em; font-size: .7em; color: #1a1200; background: var(--gold); border-radius: .6em; padding: 0 .35em; font-weight: 800; }
.cxi { flex: none; width: 2.2em; height: 2.2em; background: var(--i) center / contain no-repeat; image-rendering: pixelated; }
.cxi.locked { filter: brightness(0) drop-shadow(0 0 1px #8a7fb0); opacity: .75; }
.cx-detail { overflow-y: auto; min-height: 0; background: #100e18; border: 1px solid var(--line); border-radius: .6em; padding: 1em 1.3em 1.2em; }
.cx-head { display: flex; gap: 1em; align-items: center; }
.cx-head .cxi { width: 5.2em; height: 5.2em; border-radius: .4em; background-color: rgba(255,255,255,.03); }
.cx-head h3 { margin: 0; font-family: var(--serif); font-size: 1.7em; color: var(--gold); letter-spacing: .05em; }
.cx-head h3 small { margin-left: .6em; font-family: var(--sans); font-size: .5em; font-weight: 600; color: var(--muted); letter-spacing: .1em; vertical-align: .3em; }
.cx-blurb { margin: .25em 0 0; color: var(--text); line-height: 1.5; }
.cx-needs { margin: .45em 0 0; display: flex; flex-wrap: wrap; gap: .3em; }
.cx-needs i, #bossbrief .needs i, #pausetip .needs i { font-style: normal; font-size: .78em; padding: .05em .6em; border-radius: 1em; border: 1px solid #5a86c8; color: #bfe0ff; background: rgba(90,140,255,.12); white-space: nowrap; }
.cx-howto { margin-top: 1em; background: rgba(125,255,138,.06); border: 1px solid rgba(125,255,138,.28); border-radius: .5em; padding: .6em 1em .7em; }
.cx-howto h4, .cx-mech h4 { margin: 0 0 .35em; font-size: .82em; letter-spacing: .12em; color: #9fe3a0; }
.cx-mech h4 { color: var(--muted); margin-top: 1em; }
.cx-howto ol { margin: 0; padding-left: 1.4em; line-height: 1.75; font-size: 1.02em; }
.cx-mech dl { display: grid; grid-template-columns: max-content 1fr; gap: .4em 1em; margin: 0; font-size: .9em; }
.cx-mech dt { color: var(--muted); white-space: nowrap; }
.cx-mech dd { margin: 0; line-height: 1.5; }
.cx-mech dd b { color: #ffcf8a; margin-right: .5em; }
.cx-mech dd em { display: block; font-style: normal; color: var(--muted); font-size: .86em; }
.cx-lock { color: var(--muted); margin-top: 1.2em; line-height: 1.6; }
.mobile #codex { padding: 0; overflow: hidden; }
.mobile #codex .panel.codex { width: 100%; height: 100vh; height: 100dvh; margin: 0; border: 0; border-radius: 0; padding: .4em max(1em, env(safe-area-inset-right)) .6em max(1em, env(safe-area-inset-left)); }
.mobile .cx-top h2 { font-size: 1.6em; }
.mobile .cx-top .sub { font-size: .85em; }
.mobile .cx-top button { min-height: 36px; padding: .3em 1em; }
.mobile .cx-tabs { margin-top: .35em; }
.mobile .cx-tabs button { padding: .25em .8em; min-height: 34px; }
.mobile .cx-tabs button small { display: inline; margin-left: .5em; }
.mobile .cx-body { grid-template-columns: 15em 1fr; gap: .7em; margin-top: .5em; }
.mobile .cx-list ul { grid-template-columns: 1fr; }
.mobile .cx-list button { min-height: 32px; }
.mobile .cx-detail { padding: .6em .9em .8em; }
.mobile .cx-head .cxi { width: 3.8em; height: 3.8em; }
.mobile .cx-head h3 { font-size: 1.4em; }

/* 首领出场说明卡片：出场时展开，几秒后收进血条右边的「？ 机制」按钮 */
#bossbar { position: relative; }
#bossbar .bbrief { position: absolute; left: 100%; top: 1.35em; margin-left: .5em; pointer-events: auto; white-space: nowrap; cursor: pointer;
  font: inherit; font-size: max(.78em, 11px); padding: .15em .7em; border-radius: 1em; border: 1px solid #c8643a; background: rgba(40,12,6,.85); color: #ffcf8a; }
#bossbar .bbrief:hover, #bossbar .bbrief.on { border-color: #ffb070; background: rgba(90,30,10,.9); }
#bossbar .bbrief[hidden] { display: none; }
#bossbrief { position: relative; margin: .2em auto 0; width: 32em; text-align: left; box-sizing: border-box; pointer-events: none; z-index: 6;
  background: rgba(26,10,8,.9); border: 1px solid #9a4a2a; border-radius: .55em; padding: .55em 1em .7em; box-shadow: 0 .4em 1.4em rgba(0,0,0,.5); }
#bossbrief[hidden] { display: none; }
#bossbrief.in { animation: bbIn .35s ease-out both; }
#bossbrief.out { animation: bbOut .26s ease-in both; }
@keyframes bbIn { from { opacity: 0; transform: translateY(-.8em) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bbOut { to { opacity: 0; transform: translate(40%, -4em) scale(.3); } }
#bossbrief h5, #pausetip h5 { margin: 0 0 .3em; font-size: 1em; font-weight: 600; color: #ffb58a; }
#bossbrief h5 b, #pausetip h5 b { font-family: var(--serif); color: #ff9a6a; letter-spacing: .08em; margin-right: .5em; }
#bossbrief h5 small, #pausetip h5 small { font-size: .78em; color: var(--muted); }
#bossbrief ol, #pausetip ol { margin: 0; padding: 0; list-style: none; counter-reset: bb; }
#bossbrief li, #pausetip li { counter-increment: bb; position: relative; padding-left: 1.9em; margin: .25em 0; line-height: 1.45; color: #fff2e6; font-size: 1.05em; text-align: left; }
#bossbrief li::before, #pausetip li::before { content: counter(bb); position: absolute; left: 0; top: .1em; width: 1.35em; height: 1.35em; border-radius: 50%;
  background: #ff8c28; color: #1a0a00; font-size: .8em; font-weight: 800; line-height: 1.35em; text-align: center; }
#bossbrief .needs, #pausetip .needs { margin: .4em 0 0; display: flex; flex-wrap: wrap; gap: .3em; }
#bossbrief .bb-close { position: absolute; right: .5em; top: .45em; pointer-events: auto; cursor: pointer; font: inherit; font-size: .78em; padding: .05em .6em;
  border-radius: 1em; border: 1px solid #6b3a2a; background: rgba(0,0,0,.35); color: #d9b8a0; }
#pausetip { text-align: left; }
#pausetip li { font-size: 1em; }
.mobile #bossbrief { width: 30em; padding: .4em .8em .5em; }
.mobile #bossbrief li { margin: .15em 0; }
.mobile #bossbar .bbrief { min-height: 26px; }
@media (prefers-reduced-motion: reduce) { #bossbrief.in, #bossbrief.out { animation: none; } }

/* 主角倒下（队友还在打）：一句简短建议 */
#downtip { position: absolute; left: 50%; top: 75%; transform: translateX(-50%); max-width: 44em; width: max-content; box-sizing: border-box; pointer-events: none; z-index: 5;
  padding: .45em 1.1em; border-radius: .45em; background: rgba(22,8,10,.88); border: 1px solid rgba(255,120,100,.5); color: #ffe6dc; font-size: 1.05em; line-height: 1.5; opacity: 0; }
#downtip[hidden] { display: none; }
#downtip b { color: #ff8a7a; margin-right: .7em; }
#downtip.show { animation: downtip 7s ease both; }
@keyframes downtip { 0% { opacity: 0; transform: translate(-50%, .6em); } 6%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.mobile #downtip { top: 70%; max-width: 70%; width: auto; }
@media (prefers-reduced-motion: reduce) { #downtip.show { animation: none; opacity: 1; } }

/* 结算页：下次试试（死亡建议） */
#end .advice { margin: -.4em 0 1.1em; padding: .55em 1em .6em; border-radius: .5em; background: rgba(125,255,138,.06); border: 1px solid rgba(125,255,138,.3); font-size: .95em; }
#end .advice[hidden] { display: none; }
#end .advice b { color: #9fe3a0; letter-spacing: .08em; }
#end .advice ul { margin: .25em 0 0; padding-left: 1.3em; line-height: 1.65; color: #e8f5e2; }
.cx-list, .cx-detail { color-scheme: dark; scrollbar-width: thin; scrollbar-color: #3a3452 transparent; }

/* ---- 能力标签（2026-09-15）：词缀需求 / 旅伴特长 / 团队能力 / 应对类暗月卡片共用一套词和颜色（shop.js 的 NEED） ---- */
.need { --nc: #cfc6b4; display: inline-block; font-style: normal; font-weight: 700; font-size: .72em; line-height: 1.45; padding: 0 .42em; border-radius: .3em; white-space: nowrap;
        color: var(--nc); border: 1px solid color-mix(in srgb, var(--nc) 55%, transparent); background: color-mix(in srgb, var(--nc) 13%, transparent); }
.need.n-kick { --nc: #ffa040; }
.need.n-dispel { --nc: #5cc8ff; }
.need.n-single { --nc: #ff6b6b; }
.need.n-aoe { --nc: #c88cff; }
.need.n-party { --nc: #ffe066; }
.need.n-lust { --nc: #ff66c4; }
.need.n-rez { --nc: #6fe8c0; }
.need.n-tank { --nc: #b8c4d8; }
.need.n-healer { --nc: #9be35a; }
.need.n-counter { --nc: #ffd100; }
.need.miss { --nc: #8a8578; border-style: dashed; }
.offer .skills { display: flex; flex-wrap: wrap; justify-content: center; gap: .2em; min-height: 1.1em; }
.roster li .skills { display: inline-flex; flex-wrap: wrap; gap: .2em; }
.roster li .skills .need { font-size: .68em; }
.roster .teamskills { display: flex; flex-wrap: wrap; align-items: center; gap: .3em; margin: 0 0 .45em; font-size: .95em; }
.roster .teamskills em { font-style: normal; font-size: .76em; color: var(--muted); margin-right: .15em; }
.roster .teamskills .need { font-size: .78em; font-variant-numeric: tabular-nums; }
.affcard i .need { font-size: .95em; margin-right: .15em; }
.affcard i .ok { color: #9fe3a0; }
.affcard i .no { color: #ff8a7a; font-weight: 800; }
.offer .counter { margin: 0; font-size: .74em; line-height: 1.4; color: #ffe9a8; }
.offer .counter .need { margin-right: .3em; font-size: .95em; }
.offer .counter.off { color: var(--muted); font-size: .7em; }
.offer.countered { border-color: #ffd100; box-shadow: 0 0 0 1px rgba(255,209,0,.55) inset, 0 0 .9em rgba(255,209,0,.22); }
.mobile .offer .skills .need { font-size: .66em; }
.mobile .offer .counter { font-size: .68em; }
.mobile .offer .counter.off { display: none; }
.cxi.q { display: grid; place-items: center; background: #0c0b12; border: 1px dashed #3a3452; border-radius: .3em; color: #5a527a; font-weight: 800; font-size: 1em; box-sizing: border-box; }
.cx-head .cxi.q b { font-size: 2.2em; }
.offers > .offer { min-width: 0; }

/* ===== 2026-09-16 评测修复（第一批）===== */
/* 带 display 的 HUD 元素会盖掉 hidden 属性（词缀横幅压在暂停 / 结算页上，三份评测里两份独立发现） */
#affixbanner[hidden], #bossbrief[hidden], #downtip[hidden], #keyhint[hidden], #mraid[hidden] { display: none !important; }
/* 全屏界面（暂停 / 图鉴 / 结算 / 商店）压在 HUD 上面：HUD 里带 z-index 的元素（嗜血 / 战复按钮字、横幅）不再透出来 */
.screen { z-index: 30; }
/* 全屏界面内容比舞台高时整屏滚动（主菜单在 16:9 下被裁掉专精卡下半截和 AUTO 开关，不能滚） */
.screen { overflow-y: auto; place-items: start center; }
.screen > .panel { margin-block: auto; }
#menu { padding-block: 1em; }
#specs header .autoqer { margin-left: auto; font-size: .95em; }
/* 手机 HUD（手机评测）：队伍框改成一行名字 + 细血条，8 人放得下；嗜血 / 战复挪到顶部暂停键左边；字不小于 11px；触控目标 ≥ 44px */
.mobile #party { top: 4.6em; width: 13.6em; gap: 3px; max-height: none; overflow: visible; }
.mobile #party .sqbox { padding: 2px 3px; gap: 2px; border-radius: 5px; min-width: 0; }
.mobile #party .mate { padding: 2px 4px 3px; border-radius: 3px; border-left-width: 3px; min-width: 0; }
.mobile #party .mate .name { font-size: 10px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 血量数字（2026-09-26 周正实机：数字被切成一条缝 —— 框 5px 高、字 9px，overflow:hidden 上下全切掉）。
   框高 = 字行高 + 上下 border 2px，不然 clientHeight 装不下；宽度再留一档给 4~6 位数。 */
.mobile #party .mate .hp { height: 15px; margin-top: 2px; }
.mobile #party .mate .hp b { font-size: max(.62em, 9px); line-height: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile #party .sqlb { font-size: 9px; }
.mobile #mraid { flex-direction: row; top: .7em; bottom: auto; right: calc(max(1em, env(safe-area-inset-right)) + max(3.4em, 40px) + 8px); gap: 8px; }
.mobile .mraid { width: 48px; height: 48px; }
.mobile .mraid b { font-size: 12px; }
.mobile .mraid em { font-size: 10px; bottom: 12%; }
.mobile #bossbar .bcast { font-size: 11px; background: rgba(0,0,0,.55); border-radius: 4px; padding: 0 6px; }
.mobile #pf .name { font-size: 12px; }
/* 主角血量同理：原来 height 1.15em（≈11px）装不下 11px 字 × 1.45 行高（≈16px） */
.mobile #pf .hp { height: 19px; }
.mobile #pf .hp b { font-size: 11px; line-height: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile .aic b { font-size: 10px; }
.mobile #announce { top: 40%; }
.mobile .menubar button, .mobile .btns button, .mobile .toggle, .mobile .cx-tabs button, .mobile .refresh, .mobile #bossbar .bbrief, .mobile #bossbrief button { min-height: 44px; }
.mobile .shop-info .affrow small, .mobile .offer .hint, .mobile .offer .chips span, .mobile .need, .mobile .roster .tag { font-size: max(.8em, 11px); }
.mobile #menu .keystone small { font-size: 11px; }

/* 桌面：伤害统计挪到动作条上方、只列前 6 名（新手评测：满编时盖住 AUTO / G / H 和第 8 个队友框） */
html:not(.mobile) #meter { bottom: 5.8em; width: 16em; }
/* 手机首领说明（暂停中）：卡片放屏幕中间、能点，下面一个大「开打」按钮 */
#bossbrief.gate { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; animation: none !important; pointer-events: auto; z-index: 40; width: min(92vw, 30em); font-size: 14px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
#bossbrief .bb-go { display: block; width: 100%; min-height: 44px; margin-top: .6em; border-radius: .4em; border: 1px solid #ffd100; background: linear-gradient(#ffe066, #c99a00); color: #1a1200; font-weight: 800; font-size: 16px; }

.spec-row .spec p.sig { margin: .35em 0; padding: .3em .55em; border-radius: .35em; background: rgba(255,209,0,.07); border: 1px solid rgba(255,209,0,.25); color: #efe2c0; }
.spec-row .spec p.sig b { color: var(--gold); margin-right: .5em; }

/* 电脑版首领说明：左侧主角框下方的小卡片，不挡战场中间、不接鼠标，几秒后自己淡出（2026-09-17） */
html:not(.mobile) #bossbrief:not(.gate) { position: absolute; left: 1.4em; top: 17em; margin: 0; width: 23em; font-size: .92em; }
.mobile #bossbrief:not(.gate) { position: absolute; left: 50%; top: 7.5em; margin: 0 0 0 -15em; width: 30em; }
/* 加载完之前：动态填字的按钮先不显示（用户截图：菜单上两个空格子），职业区显示「加载中」 */
#daily:empty, #modeswitch:empty, .autoqer:empty { display: none; }
#classes:empty::before { content: '加载中……'; grid-column: 1 / -1; color: var(--muted); font-size: 1.1em; padding: 1em 0; }

/* 主角身上的光环：名字在图标上方（2026-09-17）。每格固定 4.4em 宽、名字最多两行，图标底边对齐 */
#pf .buffs .arow:not(.team) { align-items: flex-end; gap: .15em .3em; width: 30em; }
.abox { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: 4.4em; flex: none; }
.abox .an { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; margin-bottom: .12em;
            font-style: normal; font-size: max(.72em, 10px); line-height: 1.12; text-align: center; color: #f0e6d0; text-shadow: 0 1px 2px #000, 0 0 2px #000; word-break: break-all; }
.abox.long .an { font-size: max(.64em, 9px); }
.abox .aic { width: 2.5em; height: 2.5em; }
.abox .aic.db + .an, .abox:has(.aic.db) .an { color: #ffb0a0; }
.mobile .abox { width: 4.6em; }
.mobile .abox .an { font-size: 10px; }
.mobile #pf .buffs .arow:not(.team) { width: 40em; }
.mobile #pf .buffs .arow.more { align-items: center; gap: .25em; }   /* 第二行：不带名字的小图标 */
.mobile #pf .buffs .arow.more .aic { width: 2.3em; height: 2.3em; }

/* ===== 装备（2026-09-17，替代暗月卡片；docs/v2_装备系统设计.md §7）===== */
/* 货架装备卡：品质 · 部位、图标、名字、一行效果（按给的人换算）、职业特效 / 套装、给谁 ▾ */
.offer.gear .gicon, .offer.gearprize .gicon { width: 3.4em; height: 3.4em; flex: none; background: #0d0a12 center / contain no-repeat; image-rendering: pixelated; border-radius: .2em;
    box-shadow: 0 0 1em color-mix(in srgb, var(--qc, var(--gq)) 45%, transparent); }
.offer.gear .desc { font-size: .8em; line-height: 1.4; }
.offer.gear .desc em, .gpick em, #tip .tgear em i { font-style: normal; }
/* 奖券饰品卡：效果说明一行 + 「给谁」独立一行（都要看得见，518 行两段拼的） */
.offer.gearprize .desc .to { display: block; margin-top: .2em; font-style: normal; font-size: .92em; color: #cfc6b4; }
.offer .gcls { margin: 0; font-size: .7em; line-height: 1.35; color: var(--muted); }
.offer .gcls.on { color: #9fd8ff; }
.offer .gcls.act { color: #c8f0ff; font-weight: 700; }
.offer .gcls small { display: block; font-weight: 400; color: var(--muted); }
.gset { margin: 0; font-size: .7em; line-height: 1.35; color: var(--sc); }
em.off { margin-left: .35em; font-size: .9em; color: #ffb454; white-space: nowrap; }
em.clsfx { margin-left: .35em; font-size: .9em; color: #9fd8ff; white-space: nowrap; }
.offer .givebox { margin-top: auto; width: 100%; }
.offer .givebox .gown { margin: 0 0 .1em; }
.offer.gear > button[data-act="buy"] { margin-top: .3em; }
.offer button.give { margin: 0; display: flex; align-items: center; gap: .3em; padding: .2em .45em; font-size: .78em; font-weight: 600; text-align: left;
    color: var(--text); background: #15131f; border: 1px solid var(--line); }
.offer button.give span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.offer button.give b { color: var(--muted); }
.offer button.give:hover:not(:disabled), .offer button.give.on { background: #221e32; border-color: var(--muted); }
.gmini { display: inline-block; flex: none; width: 1.4em; height: 1.65em; background: center bottom / contain no-repeat; image-rendering: pixelated; }
.gi { display: inline-block; flex: none; width: 1.25em; height: 1.25em; vertical-align: -.25em; margin-right: .2em; background: #0d0a12 center / contain no-repeat; image-rendering: pixelated; border-radius: .15em; }
.gi.big { width: 2.2em; height: 2.2em; margin: 0; }
.offer.picking { z-index: 20; }

/* 人选 / 换装面板：电脑版挂在卡片下（.pop）或队伍行下（li.gpanel）；手机版是底部弹层（.gsheet） */
.gpick { text-align: left; background: var(--panel-solid); border: 1px solid #5a5070; border-radius: .45em; box-shadow: 0 .6em 2em rgba(0,0,0,.6); color: var(--text); }
.gpick.pop { position: absolute; top: calc(100% - 3.4em); left: 0; width: 26em; z-index: 25; }
.gpick.pop .gp-list { max-height: 24em; overflow-y: auto; }
.gpick.pop.r { left: auto; right: 0; }
.gpick .gp-head { display: flex; align-items: center; gap: .55em; padding: .45em .6em; border-bottom: 1px solid var(--line); font-size: .88em; }
.gpick .gp-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.gpick .gp-t small { font-size: .78em; color: var(--muted); }
.gpick .gp-t em { font-size: .8em; color: var(--muted); }
.gpick button.gp-x { margin: 0 0 0 auto; width: 1.8em; height: 1.8em; padding: 0; flex: none; border-radius: .3em; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.1em; font-weight: 400; line-height: 1; }
.gpick button.gp-pin { margin: 0 0 0 auto; width: auto; padding: .2em .55em; flex: none; font-size: .78em; font-weight: 600; border-radius: .3em; border: 1px solid #9fd8ff; background: rgba(159,216,255,.12); color: #9fd8ff; }
.gpick .gp-pin + .gp-x { margin-left: .3em; }
.gpick .gp-fx { margin: .45em .7em 0; font-size: .86em; }
.gpick .gcls, .gpick .gset { margin: .25em .7em 0; font-size: .76em; color: var(--muted); }
.gpick .gcls.act { color: #9fd8ff; }
.gpick .gcls small { margin-left: .3em; }
.gpick .gset { color: var(--sc); }
.gpick .gp-sub { margin: .5em .7em .1em; font-size: .72em; color: var(--muted); letter-spacing: .1em; }
.gpick .gp-empty { margin: .6em .7em .7em; font-size: .82em; color: var(--muted); }
.gpick .gp-list { display: flex; flex-direction: column; }
.gpick button.prow { margin: 0; width: 100%; display: flex; align-items: center; gap: .5em; padding: .3em .7em; text-align: left; font-size: .84em; font-weight: 400;
    color: var(--text); background: transparent; border: 0; border-top: 1px solid rgba(255,255,255,.05); border-radius: 0; }
.gpick button.prow:hover:not(:disabled) { background: rgba(255,255,255,.06); }
.gpick button.prow.on { background: rgba(255,209,0,.09); box-shadow: inset 3px 0 0 var(--gold); }
.gpick .prow .gmini { width: 1.7em; height: 2em; }
.gpick .pb { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.gpick .pl { display: flex; align-items: baseline; gap: .35em; min-width: 0; }
.gpick .pn { font-weight: 700; white-space: nowrap; }
.gpick .pc { margin-left: auto; font-size: .86em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.gpick .pc b { font-weight: 600; }
.gpick .pc .gi { width: 1.1em; height: 1.1em; }
.gpick .pe { font-size: .9em; color: #cfc6b4; }
.gpick .rec { font-size: .78em; padding: 0 .35em; border-radius: .25em; background: var(--gold); color: #1a1200; font-weight: 800; white-space: nowrap; }
.gpick .gp-acts { display: flex; gap: .4em; padding: .5em .7em .6em; border-top: 1px solid var(--line); }
.gpick .gp-acts button { margin: 0; width: auto; padding: .3em .8em; font-size: .82em; font-weight: 600; border-radius: .3em; border: 1px solid var(--line); background: #1d1a2b; color: var(--text); }
.gpick .gp-acts button.sell { border-color: rgba(255,209,0,.45); color: var(--gold); }
.gpick .gp-acts button:disabled { opacity: .45; }
.roster li.gpanel { display: block; padding: 0 0 .2em; background: none; border-left: 0; color: var(--text); }

/* 队伍行末尾的三个装备小格 / 背包格：边框品质色，空格虚线；带小锁 = 手动换过 */
/* 装备格统一换行到角色下方（周正 2026-09-26：不要跟名字挤同一行）——
   flex-basis:100% 让它独占一行，name/skills/quality/fire 仍留在第一行 */
.roster li .gslots { flex-basis: 100%; margin-left: 0; }
.roster li .gpreview { flex-basis: 100%; margin-left: 0; margin-top: .25em; }
.roster li .tag ~ .gslots, .roster li .fire ~ .gslots { margin-left: 0; }
.roster li .tag ~ .gpreview, .roster li .fire ~ .gpreview { margin-left: 0; }
.gslots { display: inline-flex; gap: .22em; flex: none; }
.gslot { position: relative; width: 1.9em; height: 1.9em; padding: 0; flex: none; cursor: pointer; border-radius: .2em;
    border: 1px solid var(--qc, #4a4460); background: #0d0a12 center / 100% no-repeat; image-rendering: pixelated; }
.gslot:hover { filter: brightness(1.25); }
.gslot.on { outline: 2px solid var(--gold); outline-offset: 1px; }
.gslot.empty { border: 1px dashed #4a4460; background: rgba(255,255,255,.02); display: inline-grid; place-items: center; }
.gslot.empty i { font-style: normal; font-size: .62em; color: #5f587a; }
.gslot.bagempty { cursor: default; }
.gslot.bagempty:hover { filter: none; }
.glock { position: relative; display: inline-block; width: 7px; height: 5px; margin-top: 3px; background: var(--gold); border-radius: 1px; vertical-align: middle; }
.glock::before { content: ''; position: absolute; left: 1px; top: -4px; width: 3px; height: 4px; border: 1px solid var(--gold); border-bottom: 0; border-radius: 3px 3px 0 0; }
.gslot .glock { position: absolute; right: -3px; bottom: -2px; box-shadow: 0 0 0 1px #0d0a12; }
.gbag { display: flex; align-items: center; gap: .5em; margin: .45em 0 .2em; }
.gbag em { font-style: normal; font-size: .76em; color: var(--muted); white-space: nowrap; }
.gbag .gauto { margin-left: auto; padding: .25em .7em; border-radius: .3em; border: 1px solid var(--line); background: #1d1a2b; color: var(--text); font: inherit; font-size: .78em; cursor: pointer; white-space: nowrap; }
.gbag .gauto:hover { border-color: var(--gold); color: var(--gold); }
.gpick.gpanel { margin: .1em 0 .3em; }
.gsets { display: flex; flex-wrap: wrap; align-items: baseline; gap: .15em .7em; margin: .1em 0 .3em; font-size: .76em; }
.gsets em { font-style: normal; color: var(--muted); }
.gsets span { color: var(--sc); }
.gsets span b { font-weight: 700; }
.gsets small { margin-left: .35em; color: #cfc6b4; }

/* 买下 / 换装的一句反馈：屏幕下方，三秒淡出 */
.gtoast { position: fixed; left: 50%; bottom: 1.6em; z-index: 60; transform: translateX(-50%); max-width: min(46em, 92vw); pointer-events: none; opacity: 0;
    padding: .5em 1.1em; border-radius: .45em; background: rgba(20,17,30,.96); border: 1px solid rgba(255,209,0,.5); box-shadow: 0 .4em 1.4em rgba(0,0,0,.5); font-size: .95em; text-align: center; }
.gtoast.show { animation: gtoast 3.4s ease-out forwards; }
@keyframes gtoast { 0% { opacity: 0; transform: translate(-50%, .6em); } 8%, 78% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .gtoast.show { animation-name: gtoastFade; } @keyframes gtoastFade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } } }

/* 引导气泡：第一次看到装备（localStorage wowba.tip.gear） */
.gtipb { position: absolute; left: 50%; bottom: calc(100% + .55em); z-index: 15; width: 15em; transform: translateX(-50%);
    padding: .45em .6em; border-radius: .4em; background: #ffe066; color: #1a1200; font-size: .76em; font-weight: 700; line-height: 1.4; box-shadow: 0 .3em 1em rgba(0,0,0,.45); }
.gtipb::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: #ffe066; }
.offer .gtipb button { display: block; margin: .3em auto 0; width: auto; padding: .1em .8em; font-size: .95em; border-radius: .3em; border: 1px solid rgba(0,0,0,.35); background: rgba(255,255,255,.4); color: #1a1200; }

/* 悬停提示：穿着装备的大头像 + 三件装备 + 套装进度 */
#tip .tgear { display: flex; gap: .7em; align-items: flex-start; margin-top: .6em; padding-top: .55em; border-top: 1px solid var(--line); }
#tip .tport { flex: none; width: 3.6em; height: 4.2em; background: center bottom / contain no-repeat; image-rendering: pixelated; }
#tip .tgear ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .3em; min-width: 0; }
#tip .tgear li { display: flex; gap: .45em; align-items: flex-start; }
#tip .tgear li.empty { color: var(--muted); }
#tip .tgi { flex: none; width: 1.7em; height: 1.7em; border: 1px dashed #4a4460; border-radius: .2em; background: center / contain no-repeat; image-rendering: pixelated; }
#tip .tgear li:not(.empty) .tgi { border: 0; }
#tip .tgear li span { line-height: 1.35; }
#tip .tgear li small { margin-left: .4em; font-size: .8em; color: var(--muted); }
#tip .tgear em { display: block; font-style: normal; font-size: .92em; color: #d8cfbd; }
#tip .tgear em.cls { color: #9fd8ff; }
#tip .off { margin-left: .35em; color: #ffb454; }
#tip .tset { margin: .35em 0 0; font-size: .9em; color: var(--sc); }

/* 手机：队伍栏页签 [队伍 | 装备]；装备页每人一行 头像 + 三个大格子；人选 / 换装是底部弹层 */
.rtabs { display: inline-flex; gap: 0; margin-right: .5em; border: 1px solid var(--line); border-radius: .4em; overflow: hidden; vertical-align: middle; }
.rtabs button { min-height: 36px; padding: .2em .9em; border: 0; background: #15131f; color: var(--muted); font: inherit; font-size: 1.05em; font-weight: 700; letter-spacing: 0; }
.rtabs button.on { background: var(--gold); color: #1a1200; }
.roster.gtab .needs, .roster.gtab .status, .roster.gtab .acts, .roster.gtab > h3 ~ h3, .roster.gtab .bonds { display: none; }
.roster li.gmrow { gap: .5em; padding: .25em .5em; }
.gmrow .gmport { flex: none; width: 30px; height: 36px; background: center bottom / contain no-repeat; image-rendering: pixelated; }
.gmrow .gmname { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.gmrow .gmname b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gmrow .gmname small { font-size: max(.72em, 10px); color: var(--sc); white-space: nowrap; }
.gslots.big { gap: 5px; }
.gslots.big .gslot, .mobile .gbag .gslot { width: 42px; height: 42px; }
.mobile .gbag { flex-wrap: wrap; }
.mobile .gbag .gauto { min-height: 44px; font-size: .95em; }
.gsheet { position: fixed; inset: 0; z-index: 70; }
.gsheet[hidden] { display: none; }
.gsheet .gs-back { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.gsheet .gs-body { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: min(44em, 100%); max-height: 88vh; max-height: 88dvh; overflow-y: auto;
    border-radius: .7em .7em 0 0; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); font-size: 13px; }
.gsheet .gp-list { max-height: none; overflow: visible; }
.gsheet button.prow { min-height: 44px; }
.gsheet button.gp-x { width: 44px; height: 44px; }
.gsheet .gp-acts button, .gsheet button.gp-pin { min-height: 44px; padding: .3em 1.2em; }
.gsheet .gp-head { position: sticky; top: 0; z-index: 1; background: var(--panel-solid); }
.mobile .gtoast { bottom: .8em; font-size: 12px; }
.mobile .offer.gear .gicon { width: 2.6em; height: 2.6em; }
.mobile .offer .gcls, .mobile .gset { font-size: max(.7em, 10px); }
/* 队伍行：品质字和解雇按钮挨着靠右，装备小格排在最后（两个 margin-left:auto 会把品质字挤到行中间） */
.roster li .tag ~ .fire { margin-left: .45em; }
.roster li > b { white-space: nowrap; }
.offer button.give { gap: .15em; padding: .2em .3em; font-size: .74em; }
.offer button.give .gmini { width: 1.2em; height: 1.4em; }
.mobile .offer .gtipb { width: 17em; font-size: 11px; }
.mobile .offer .gtipb button { display: inline-block; min-height: 44px; margin: .3em 0 0; padding: 0 1.2em; }

/* ===== 装备第二版（7 格 + 专精套装 + 掉落）===== */
/* 货架卡：套装块（套装名 · 进度 · 2 / 4 件效果）、专精武器特效、首领掉落 */
.gsetinfo { width: 100%; margin: .15em 0 0; padding: .25em .4em; text-align: left; border-radius: .3em; border-left: 2px solid var(--sc);
    background: color-mix(in srgb, var(--sc) 9%, transparent); font-size: .7em; line-height: 1.35; }
.gsetinfo p { margin: 0; }
.gsetinfo .gs-h { color: var(--sc); }
.gsetinfo .gs-h b { font-weight: 800; }
.gsetinfo .gs-p { color: #e8e2d0; }
.gsetinfo .gs-p b { color: var(--gold); }
.gsetinfo .gs-p.off { color: #ffb454; }
.gsetinfo .gs-b { color: var(--muted); }
.gsetinfo .gs-b i { font-style: normal; margin-right: .35em; padding: 0 .25em; border-radius: .2em; border: 1px solid #4a4460; font-size: .9em; }
.gsetinfo .gs-b.on { color: #e8e2d0; }
.gsetinfo .gs-b.on i { border-color: var(--sc); background: var(--sc); color: #120e18; font-weight: 800; }
.gsetinfo.off .gs-b { opacity: .6; text-decoration: line-through; text-decoration-color: rgba(255,180,84,.5); }
.gwfx { width: 100%; margin: .1em 0 0; text-align: left; font-size: .7em; line-height: 1.35; color: var(--muted); }
.gwfx i { display: block; font-style: normal; font-size: .9em; color: #9fd8ff; opacity: .8; }
.gwfx.on { color: #c8f0ff; }
.gwfx.on i { opacity: 1; font-weight: 700; }
.gwfx.off { opacity: .75; }
.gwfx small { display: block; color: #ffb454; }
.gboss { display: inline-block; padding: 0 .45em; border-radius: .25em; font-size: .68em; font-weight: 800; letter-spacing: .08em; color: #1a0e00;
    background: linear-gradient(90deg, #ffb040, #ffe0a0, #ff8000); box-shadow: 0 0 .6em rgba(255,128,0,.55); }
/* 首领掉落的卡：橙色流光描边 + 暖色底（商店本来不卖，奖品 / 以后的特殊货架可能出现；面板和提示也用同一套） */
.offer.gear.boss { background: radial-gradient(120% 60% at 50% 0%, rgba(255,128,0,.22), transparent 70%), linear-gradient(170deg, #2a1a0c, #16131f 75%);
    border-color: #ff8000; box-shadow: 0 0 1.2em rgba(255,128,0,.35), inset 0 0 1.4em rgba(255,160,40,.12); }
.offer.gear.boss h4 { color: #ffb040; text-shadow: 0 0 .5em rgba(255,128,0,.6); }
.offer.gear.boss::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none; padding: 1px;
    background: linear-gradient(120deg, transparent 30%, #ffe0a0 50%, transparent 70%) 0 0 / 250% 100%;
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: gshine 3.2s linear infinite; }
@keyframes gshine { to { background-position: -250% 0; } }
@media (prefers-reduced-motion: reduce) { .offer.gear.boss::before { animation: none; } }
.offer.gear.boss .gicon { box-shadow: 0 0 1.4em rgba(255,128,0,.75); }
.gslot.boss { box-shadow: 0 0 .5em rgba(255,128,0,.7); }
.gpick .gp-head.boss { background: linear-gradient(90deg, rgba(255,128,0,.18), transparent); }
.gpick .gsetinfo, .gpick .gwfx { width: auto; margin: .35em .7em 0; font-size: .76em; }

/* 人选列表：本专精的人排前面，标"套装 2→3/4"或"特效" */
.gpick .sett { font-size: .76em; padding: 0 .35em; border-radius: .25em; border: 1px solid var(--sc, #9fd8ff); color: var(--sc, #9fd8ff); white-space: nowrap; }
.gpick button.prow.match { background: rgba(159,216,255,.04); }

/* 队伍行：武器 + 套装徽章 + 饰品两格；徽章点开护甲四格（行下面一条） */
.gsetb { display: inline-flex; align-items: center; gap: .2em; height: 1.9em; margin: 0; padding: 0 .4em; flex: none; border-radius: .25em; white-space: nowrap;
    font: inherit; font-size: .74em; font-weight: 600; color: var(--sc, var(--muted)); background: #0d0a12; border: 1px solid #4a4460; cursor: pointer; }
span.gsetb { cursor: default; height: auto; padding: .05em .4em; }
.gsetb b { font-weight: 800; font-variant-numeric: tabular-nums; }
.gsetb i { font-style: normal; font-size: .85em; color: var(--muted); }
.gsetb.none { color: #6f6888; }
.gsetb.off { opacity: .6; }
.gsetb.lv2 { border-color: var(--sc); background: color-mix(in srgb, var(--sc) 16%, #0d0a12); }
.gsetb.lv4 { border-color: var(--sc); background: var(--sc); color: #120e18; box-shadow: 0 0 .6em color-mix(in srgb, var(--sc) 70%, transparent); }
.gsetb.lv4 i { color: #120e18; }
button.gsetb:hover, button.gsetb.on { filter: brightness(1.2); outline: 1px solid var(--gold); }
.roster li.garmor { gap: .35em; padding: .25em .6em .3em 1.2em; margin-top: -.2em; background: #110f18; border-left-color: transparent; color: var(--text); font-size: .92em; }
.garmor .gpart { position: relative; display: inline-flex; flex-direction: column; align-items: center; }
.garmor .gpart em { font-style: normal; font-size: .6em; line-height: 1; color: var(--muted); margin-top: .1em; }
.garmor .gsls { display: flex; flex-direction: column; gap: .1em; margin-left: .5em; min-width: 0; font-size: .76em; }
.garmor .gsl { color: var(--sc); white-space: nowrap; }
.garmor .gsl small { margin-left: .4em; color: var(--muted); }
.garmor .gsl small.on { color: var(--gold); font-weight: 700; }
.garmor .gsl.off { opacity: .65; }
.garmor small.none { color: var(--muted); white-space: normal; }

/* 本层掉落：货架上方一排；首领掉落更大、橙色流光 */
.gdropbar:empty { display: none; }
.gdrops { display: flex; flex-wrap: wrap; align-items: center; gap: .35em .5em; margin: 0 0 .7em; padding: .4em .6em; border-radius: .4em;
    background: linear-gradient(90deg, rgba(255,209,0,.08), transparent 70%); border: 1px solid rgba(255,209,0,.25); }
.gdrops > em { font-style: normal; font-size: .8em; font-weight: 800; color: var(--gold); letter-spacing: .08em; margin-right: .2em; }
.gdrop { display: inline-flex; align-items: center; gap: .35em; padding: .15em .5em .15em .2em; border-radius: .3em; background: #15131f; border: 1px solid color-mix(in srgb, var(--qc) 45%, transparent); font-size: .82em; }
.gdrop .gi { width: 1.8em; height: 1.8em; margin: 0; }
.gdrop .gd-t { display: flex; flex-direction: column; line-height: 1.2; }
.gdrop .gd-t small { font-size: .78em; color: var(--muted); white-space: nowrap; }
.gdrop.boss { padding: .25em .7em .25em .25em; font-size: .95em; border-color: #ff8000; background: linear-gradient(90deg, rgba(255,128,0,.28), #1d140c);
    box-shadow: 0 0 1em rgba(255,128,0,.45); }
.gdrop.boss .gi { width: 2.4em; height: 2.4em; box-shadow: 0 0 .8em rgba(255,128,0,.8); }
.gdrop.boss .gd-t b { text-shadow: 0 0 .5em rgba(255,128,0,.7); }
.gdrop.boss .gd-t small { color: #ffcf8a; }
.gtoast.top { top: 1.2em; bottom: auto; border-color: rgba(255,128,0,.7); }
.mobile .gtoast.top { top: .5em; bottom: auto; }
.mobile .gdrops { margin: 0 0 .5em; padding: .3em .4em; }
.mobile .gdrop { font-size: 11px; }
.mobile.paged.p1 .gdropbar, .paged.p1 .gdropbar { display: none; }

/* 引导气泡：三行新规则 */
.gtipb { width: 18em; font-weight: 600; }
.gtipb small { font-weight: 500; opacity: .85; }

/* 悬停提示：7 格 + 套装 */
#tip .tgear li .sl { margin: 0 .4em 0 0; font-size: .75em; color: var(--muted); }
#tip .tgear li.boss .tgi { box-shadow: 0 0 .5em rgba(255,128,0,.8); }
#tip .tgear ul { gap: .15em; }
#tip .tgear em { display: inline; margin-left: .4em; font-size: .88em; }
#tip .tgear em.cls { display: block; margin-left: 0; }
#tip .tgi { width: 1.45em; height: 1.45em; }
#tip .tset { margin: .35em 0 0; font-size: .9em; color: var(--sc); }
#tip .tset p { margin: 0; color: var(--muted); }
#tip .tset p i { font-style: normal; margin-right: .4em; color: var(--muted); }
#tip .tset p.on { color: #e8e2d0; }
#tip .tset p.on i { color: var(--sc); font-weight: 700; }
#tip .tset.off { color: #ffb454; }
#tip .tset.off b { color: var(--sc); }
#tip .tgitem .gboss { margin: 0 0 .3em; }
#tip .tgitem.boss h5 { text-shadow: 0 0 .5em rgba(255,128,0,.6); }
#tip .gsetinfo { font-size: .92em; margin-top: .4em; }
#tip .gwfx { font-size: .92em; }

/* 手机装备页签：头像 + 名字 / 徽章在第一列，7 格分三组（武器 | 头肩胸腿 | 饰品）；放不下换到第二行 */
.roster li.gmrow { flex-wrap: wrap; row-gap: .2em; }
.gmrow .gmname { gap: .15em; align-items: flex-start; }
.gmrow .gmname .gsetb { font-size: max(.7em, 10px); }
.gslots.big { gap: 6px; flex-wrap: nowrap; margin-left: auto; }
.gslots.big .gg { display: inline-flex; gap: 3px; }
/* 格子 44px（2026-09-20 实测改）：原来是 34px，为的是让"名字 + 7 格"挤进同一行。
   但 iOS 的触控下限是 44pt、Android 是 48dp，34px 低 23%，而且这是 7 个相邻格子的密集网格，
   偏偏又是最需要点准的地方（把哪件装备给哪个人）。实测手机竖屏装备页 45 个可点元素里 43 个不达标。
   注意上面那行注释写的"放不下换到第二行"—— 换行的设计本来就有（.gmrow 是 flex-wrap: wrap），
   只是 34px 让它永远挤得下、永远换不了行。改回 44px 之后它会自然换到第二行，正是原本设计的样子。
   背包那排（.mobile .gbag .gslot）早就是 42px 了，这里一直没跟上。 */
.gslots.big .gslot { width: 44px; height: 44px; }
/* 卡片上套装效果 / 特效最多两三行，全文悬停看（tooltip goffer） */
.offer.gear { padding-top: 1.5em; }
.offer .gsetinfo .gs-b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.offer .gwfx { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.roster li .gsetb { width: 7.4em; justify-content: space-between; }
.roster li .gsetb b { margin-left: auto; padding-left: .25em; }
.gsetb .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }

/* ================= 竖屏（html.portrait，手机竖着拿）2026-09-20 =================
   为了上 TapTap 要能竖着玩。场地本身会换成 720×1280（横版的镜像，见 game/touch.js），
   所以这里只管界面：390 宽的屏幕塞不下"左边主角框 + 右边一列队伍框 + 中间顶栏"这套横屏布局。
   竖屏改成上下分层：第一行计时 / 层数 / 暂停，第二行主角框 + 队伍框各占一半，首领条横跨整宽。 */

/* 顶栏：计时和层数并排放在最上面一条，不再居中堆两行 */
.portrait .topbar { left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + .5em); width: 100%; transform: none; display: flex; flex-direction: column; align-items: center; gap: .1em; padding: 0 4.6em; }
.portrait #timer { font-size: 1.5em; }
.portrait #phase { font-size: .8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.portrait #loot { font-size: .8em; }

/* 竖屏的刘海 / 底部横条：顶栏那一串都从 safe-area-inset-top 起算，摇杆和团队冷却按钮从底部横条上面起算 */
.mobile.portrait #mpause { top: calc(env(safe-area-inset-top, 0px) + .7em); }

/* 顶部分三层，互不重叠（首领条是会冒出来的，不能让它把主角框顶掉）：
   ① 计时 / 层数  ② 主角框 + 队伍框  ③ 首领血条 */
.mobile.portrait #pf { left: max(.6em, env(safe-area-inset-left)); top: calc(env(safe-area-inset-top, 0px) + 4.6em); width: 17em; }
/* 增益图标：横跨整宽单独一条，最多两行（再多就藏起来，别一路顶到首领血条上） */
/* 增益图标（2026-09-22 改）：只占左栏（右边是队伍框，原来整宽横穿过去），宽度按屏幕算，不再写死 37em / 40em；
   两行：带名字的一行 + 小图标一行，团队增益再一小行。首领血条和机制卡跟着往下挪了 4.4em */
/* 2026-09-27 周正：DPS 表和 BUFF 区互换。
   理由：DPS 表是个 14em×9em 的方块，压在右下角正好切掉战斗区一角；BUFF 区是一排扁图标，
   占的角小得多。互换之后「被挡的 UI 全集中在 BOSS 血条以上」，血条以下是一整块干净画面 ——
   完整的矩形视野比「面积相同但缺一角」好读得多。
   buffs 原来是相对主角框 #pf 定位的（它在顶部），要挪到底部必须改 fixed 脱离它。 */
.mobile.portrait #pf .buffs { position: fixed; left: auto; top: auto;
                      right: max(.6em, env(safe-area-inset-right));
                      bottom: calc(env(safe-area-inset-bottom, 0px) + 12.5em);   /* 比原 DPS 表再高 5em：DPS 表是块高方块、从这往下铺，BUFF 只有一条，贴同样的 bottom 会飘到摇杆和技能键那一层，手指挡住 */
                      width: 14em; max-height: 5.4em; overflow: hidden; justify-content: flex-end; }
.mobile.portrait #pf .buffs .arow:not(.team) { width: 100%; }
.mobile.portrait #party { right: max(.6em, env(safe-area-inset-right)); top: calc(env(safe-area-inset-top, 0px) + 4.6em); width: 13.6em; gap: 3px;
                          max-height: calc(100% - 22em); }
.mobile.portrait #party .sqbox { padding: 2px 3px; gap: 2px; }
.mobile.portrait #party .mate { padding: 2px 4px 3px; border-radius: 3px; border-left-width: 3px; }
.mobile.portrait #party .mate .name { font-size: 10px; }
/* 竖屏跟随手机版的血条高度（原来写死 5px，字被切成一条缝） */
.mobile.portrait #party .mate .hp { height: 15px; }

/* 首领条：从顶栏的文档流里拿出来，横跨整宽钉在主角框下面（不这样的话它一出现就把顶栏撑高、压住主角框） */
.portrait #bossbar { position: absolute; left: 0; right: 0; top: calc(env(safe-area-inset-top, 0px) + 20.2em); width: auto; margin: 0; }
.portrait #bossbar .bn { font-size: .9em; }
.portrait #bossbar .bcast { font-size: .75em; }
.portrait #bossbar .bbrief { right: .4em; }
/* 只管常驻的那块机制提示；.gate（点「开打」之前那层弹窗）是居中的模态，别碰 */
.mobile.portrait #bossbrief:not(.gate) { left: max(.6em, env(safe-area-inset-left)); right: max(.6em, env(safe-area-inset-right)); top: calc(env(safe-area-inset-top, 0px) + 25em); width: auto; margin: 0; }
.mobile.portrait #bossbrief.gate { width: min(94vw, 30em); }
.portrait #announce { top: 56%; }
.portrait #affixbanner { top: 62%; }

/* 底部：摇杆照旧在左手边，嗜血 / 战复排在右下角（横屏时它们在右侧中间，竖屏那儿是场地）。
   top 必须显式写 auto —— 不写的话它保留静态位置，和 bottom 一起把按钮拉成整屏高 */
.mobile.portrait #mraid { top: auto; right: max(.6em, env(safe-area-inset-right)); bottom: calc(env(safe-area-inset-bottom, 0px) + 1.4em); flex-direction: row; gap: 8px; }
.mobile.portrait #joy { left: calc(env(safe-area-inset-left, 0px) + 78px); top: calc(100% - 96px - env(safe-area-inset-bottom, 0px)); }
.mobile.portrait #summons { left: max(.6em, env(safe-area-inset-left)); right: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 9.5em); justify-content: flex-start; max-width: 62%; }
.portrait #announce { font-size: 1.5em; }
.portrait #affixbanner { font-size: .9em; max-width: 92vw; }

/* 商店 / 结算：竖屏一列到底，货架两列 */
.mobile.portrait .shop-body { grid-template-columns: 1fr; gap: .8em; }
.mobile.portrait .offers { grid-template-columns: repeat(2, 1fr); }
.mobile.portrait .prizes { grid-template-columns: repeat(2, 1fr); }
.mobile.portrait .shop-head { flex-wrap: wrap; gap: .5em; }

/* 暂停面板里的手机自检行：方向 / 视口 / 画布 / 场地，真机上布局不对时用来定位 */
.diag:empty { display: none; }
.diag { font-size: .8em; color: var(--muted); font-variant-numeric: tabular-nums; }

/* 终极充能条（只在手机上出现：电脑的动作条 F 格已经有了）。
   全自动之下它回答的不是"我能按什么"，是"接下来几秒会发生什么" */
#pf .ult { display: none; }
.mobile #pf .ult { position: relative; display: block; height: 1.15em; margin-top: .25em; border-radius: .2em;
                   background: rgba(0,0,0,.55); border: 1px solid #6a5a20; overflow: hidden; }
.mobile #pf .ult i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(#ffd86a, #c08a10); transition: width .12s linear; }
.mobile #pf .ult b { position: relative; display: block; font-size: max(.7em, 9px); line-height: 1.5em; text-align: center;
                     color: #ffeaa8; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; }
.mobile #pf .ult.on { border-color: #ffd100; box-shadow: 0 0 .5em rgba(255,209,0,.5); animation: ultReady .9s ease-in-out infinite alternate; }
.mobile #pf .ult.on b { color: #fff6cf; }
@keyframes ultReady { from { box-shadow: 0 0 .3em rgba(255,209,0,.35); } to { box-shadow: 0 0 .9em rgba(255,209,0,.75); } }
@media (prefers-reduced-motion: reduce) { .mobile #pf .ult.on { animation: none; } }


/* ===== UI 触控与遮挡修正（2026-09-20，实测数据见 tests/ui_audit.mjs）===== */

/* 引导气泡原来是 position:absolute + bottom:calc(100%+.55em)，挂在第一张装备卡的"正上方"。
   但商店是网格布局，"正上方"就是上一行的另一张卡 —— 箭头指着「断骨者」，气泡却盖住「戒律牧师」，
   而且得先点掉才能买被盖那张。更麻烦的是它看起来像属于被盖那张卡。
   气泡的文字本来就是讲整套装备规则的通用说明，不是讲某一张卡，所以改成排在它自己那张卡里面，
   在流里占位、把卡撑高，不盖任何东西。 */
.gtipb, .mobile .offer .gtipb {
    position: static; width: auto; max-width: 100%; margin: .5em 0 0; transform: none;
}
.gtipb::after { display: none; }

/* 手机上其余没到 44px 的可点元素（实测清单见下）。都只加最小高度，不改视觉大小：
   buy 160×38 / page 125×40 / rtab 62×36、41×36 / 货架锁定 30×18。 */
.mobile .offer button { min-height: 44px; }
/* 货架的「锁定」按钮是绝对定位在卡片右上角的小徽章（见上面 .mobile .offer button.lock），
   30×18，全界面最小的可点目标。**这里不能直接撑到 44px** —— 撑大会吃掉卡角、盖住品质字。
   改成用一个透明的 ::after 把触控区扩到 44×44，外观一点不变。
   （扩出去的那圈落在卡片自己身上，而「已购 / 购买」按钮在卡片底部、离得远，不会误触。
   我一开始想当然写成"它挨着已购按钮"，量过之后才发现不是。） */
.mobile .offer button.lock::after { content: ''; position: absolute; inset: -14px -8px; }
.mobile .shop-head .go, .mobile .shop-head .next { min-height: 44px; }
.mobile .rtabs button { min-height: 44px; padding-inline: .9em; }

/* 货架装备卡：买下后替换谁、替换后什么效果（2026-09-22） */
.offer.gear .repl { margin: .3em 0 0; padding: .3em .45em; border-radius: .3em; background: rgba(255,255,255,.05); font-size: .82em; line-height: 1.45; color: #d8ccb4; }
.offer.gear .repl b { color: #ffd100; }
.offer.gear .repl .gi { width: 1.2em; height: 1.2em; vertical-align: -.25em; margin: 0 .15em; }

/* 手机的伤害表（2026-09-22）：暂停键左边一个「伤害」按钮，点开后右下角（嗜血 / 战复上方）出半透明小表 */
.mobile #mmeter { position: absolute; right: calc(max(1em, env(safe-area-inset-right)) + max(3.4em, 44px) + .5em); top: .7em; height: max(3.4em, 44px); padding: 0 .9em;
                  border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: max(.9em, 12px); pointer-events: auto; }
.mobile #mmeter.on { color: #ffd100; border-color: rgba(255,209,0,.5); }
.mobile.portrait #mmeter { top: calc(env(safe-area-inset-top, 0px) + .7em); }
/* 手机伤害表（2026-09-22 周正：竖屏横屏都默认显示）：没存过开关就是开的；竖屏右下角（圆按钮上方），横屏在队伍框左边、圆按钮下面 */
.mobile #meter { display: none !important; }
/* DPS 表挪到顶部（BUFF 腾出来的那块）。限高 7.6em：下面就是 BOSS 血条，撑高了会把血条推下去、
   反而吃掉战斗区。超出的行滚动隐藏 —— 竖屏看前几名够用，要看全的横屏或桌面版没有这个限制。 */
.mobile.portrait #meter.open { display: block !important; left: max(.6em, env(safe-area-inset-left)); top: calc(env(safe-area-inset-top, 0px) + 10.4em); right: auto; bottom: auto;
                      width: 14em; max-height: 7.6em; overflow: hidden; padding: .3em .45em .4em; background: rgba(12,12,18,.72); pointer-events: none; font-size: max(.85em, 10px); }
.mobile #meter.open h4 { font-size: .8em; margin-bottom: .2em; }
.mobile #meter.open .row { height: 1.35em; margin-top: .15em; }
.mobile #meter.open { padding: .35em .45em .45em; background: rgba(12,12,18,.72); pointer-events: none; font-size: max(.9em, 11px); }   /* 两个方向共用：半透明、不拦手指 */
.mobile:not(.portrait) #meter.open { display: block !important; bottom: auto; left: auto; width: 11em;
                      right: calc(max(1em, env(safe-area-inset-right)) + 12.5em + .8em);   /* 队伍框（right 1em、宽 12.5em）左边留 .8em */
                      top: calc(.7em + max(3.4em, 44px) + .8em); }                        /* 冲锋 / 嗜血 / 战复那排圆按钮下面 */

/* 商店：上一层伤害统计（默认收起） */
.lastmeter { margin: .5em 0; border: 1px solid var(--line); border-radius: .4em; background: rgba(255,255,255,.03); font-size: .9em; }
.lastmeter summary { cursor: pointer; padding: .45em .7em; color: var(--muted); list-style-position: inside; }
.lastmeter[open] summary { color: var(--text); }
.lastmeter .lm-head, .lastmeter .lm-row { display: grid; grid-template-columns: minmax(6em, 1.6fr) 1fr 1fr .7fr 1fr; gap: .4em; align-items: center; padding: 0 .7em; font-variant-numeric: tabular-nums; }
.lastmeter .lm-head { font-size: .8em; color: var(--muted); padding-bottom: .2em; }
.lastmeter .lm-row { position: relative; height: 1.7em; margin: .15em .4em; border-radius: .2em; background: rgba(255,255,255,.04); overflow: hidden; padding: 0 .3em; }
.lastmeter .lm-row > i { position: absolute; inset: 0 auto 0 0; background: color-mix(in srgb, var(--cc) 35%, transparent); }
.lastmeter .lm-row > * { position: relative; }
.lastmeter .lm-row .n { color: var(--cc); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lastmeter .lm-row.me .n::after { content: ' ★'; color: #ffd100; }
.lastmeter .lm-row .h { color: #7dff8a; }
.lastmeter .lm-row:last-child { margin-bottom: .45em; }
/* 横屏：暂停键左边是冲锋 / 嗜血 / 战复一排，「伤害」接在这一排的左边（暂停键下面是队伍框） */
.mobile:not(.portrait) #mmeter { top: .7em; right: calc(max(1em, env(safe-area-inset-right)) + max(3.4em, 40px) + 8px + 3 * max(4.6em, 50px) + 3 * 8px); }

/* ---- 局外天赋树面板（2026-09-28）---- */
.talent-panel { max-width: 52em; }
.talent-tabs { display: flex; flex-wrap: wrap; gap: .4em; margin: .8em 0; }
.t-tab { padding: .35em .75em; border: 1px solid var(--line); border-radius: .4em; background: var(--panel); color: var(--ink); cursor: pointer; font-size: .95em; }
.t-tab.on { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 600; }
.talent-tree { display: grid; grid-template-columns: repeat(auto-fit, minmax(15em, 1fr)); gap: .8em; max-height: 55vh; overflow-y: auto; }
.t-branch { background: var(--panel); border: 1px solid var(--line); border-radius: .5em; padding: .7em; }
.t-branch h4 { margin: 0 0 .5em; font-size: 1.05em; color: var(--accent); }
.t-branch h4 em { font-style: normal; font-size: .75em; color: var(--muted); margin-left: .5em; }
.t-item { border: 1px solid var(--line); border-radius: .4em; padding: .5em; margin-bottom: .5em; position: relative; }
.t-item.has { border-color: var(--accent); }
.t-item.maxed { border-color: #7dff8a; background: rgba(125,255,138,.08); }
.t-head { display: flex; justify-content: space-between; align-items: center; }
.t-rank { font-size: .8em; color: var(--muted); }
.t-desc { margin: .3em 0; font-size: .82em; line-height: 1.4; color: var(--muted); }
.t-plus { position: absolute; right: .5em; bottom: .5em; padding: .15em .6em; border: 1px solid var(--accent); border-radius: .3em; background: transparent; color: var(--accent); cursor: pointer; }
.t-plus:disabled { opacity: .4; cursor: not-allowed; }
.t-full { position: absolute; right: .5em; bottom: .5em; font-size: .8em; color: #7dff8a; }
.tp { font-style: normal; font-size: .8em; color: var(--muted); }
.tpoints { color: var(--accent); }


/* ===== 新 UI 整合（2026-10-04 周正「更新到正式服」）=====
   来源：v2/src/testui.css（去掉 html.test-ui 前缀）
   内容：三带布局 / 小队框 2×5 / 大招条不切字 / 安全区 / 字号下限
   ===== */

/* ==========================================================================
   测试服专用 UI（2026-10-03）
   --------------------------------------------------------------------------
   这份文件里的每一条都挂在 （或 ）下面。
   正式服 <html> 上没有这个 class —— 整个文件一行都不生效，v2/src/style.css
   里原来那套规则一个字没动。所以「不许破坏正式服」是结构上保证的，不是靠自觉。

   内容全部照抄已经定稿的两份稿子，不重新设计：
     · 三带 / 安全区 / 字号下限 / 大招条   ← ui_preview/index.html
     · 小队框 v2（2 行 × 5 列）            ← ui_mockup_小队框.html
     · 方案与取舍见 docs/mavis/UI整合说明.md、docs/mavis/ui方案_小队框.md

   基准 390×844，可用高 = 844 − 47(刘海) − 34(Home) = 763px。
   三带高度由 testmode.js 按屏高算好写进 --t-a/b/c/d（写死百分比在 320 短屏上会崩）。
   ========================================================================== */

/* 测试服用青色，跟正式服的金色（--gold）一眼分得开。
   注意这条**不能**只挂在 下面：下面 #opensever 的 border/color 都用 var(--t-cyan)，
   变量在「测试服没开」时不存在 → 那几条声明在计算值阶段直接失效 →
   实测按钮边框变成 border-style:none、字色掉回默认色（验收脚本抓到的）。
   按钮恰恰要在**没进**测试服时就长得不一样，所以这个色值必须一直有。 */
html { --t-cyan: #4fe3c1; }

{
    /* 安全区兜底值，testmode.js 会在真机上用 env() 的实测值覆盖 */
    --t-sat: 47px;
    --t-sab: 34px;
    --t-a: 114px;
    --t-b: 377px;
    --t-c: 158px;
    --t-d: 114px;
    --t-gut: 8px;
}

/* ==========================================================================
   1. 主界面「测试服」按钮
   --------------------------------------------------------------------------
   跟其它 menubar 按钮同规格（.menubar button 的 padding / 字号都继承），
   但虚线边框 + 青色，一眼不是正式服的按钮。

   ★ BETA 角标已删（周正 2026-10-04 v4 铁律：「BETA 直接去掉，整个删」）。
     原来这里有个 `#opensever::after { content:"BETA" }` 挂在右上角，
     现在**一个字节都不留**：不发 content 的 ::after 不生成盒子，
     `getComputedStyle(b,'::after').content` 读回来是 "none"，验收脚本查的就是这个。
     区分测试/正式服改由三样东西承担，都还在：虚线边框、青色字、开了以后整块实心青色。
     position:relative 也一起删了 —— 它当初只是给角标当定位锚点用的，
     钮里剩下的唯一子元素是 <kbd>T</kbd>，style.css 没有一条绝对定位它（已查）。
   ========================================================================== */
#opensever {
    color: var(--t-cyan) !important;
    border: 1px dashed var(--t-cyan) !important;
    background: color-mix(in srgb, var(--t-cyan) 9%, #15131f) !important;
}
#opensever:hover { border-color: var(--t-cyan) !important; }
#opensever kbd { background: color-mix(in srgb, var(--t-cyan) 18%, transparent); color: var(--t-cyan); }
/* 已经开着：实心，一眼看出「现在就在测试服里」；再点一下回到正式服 */
#opensever[aria-pressed="true"] {
    color: #04120f !important;
    border-style: solid !important;
    background: var(--t-cyan) !important;
}
#opensever[aria-pressed="true"] kbd { background: rgba(0, 0, 0, .22); color: #04120f; }

/* 主菜单里的一行说明：告诉玩家这个按钮是干什么的、切过去会变什么 */
#testnote {
    margin: -.2em 0 .9em;
    padding: .5em .8em;
    border-left: 3px solid var(--t-cyan);
    border-radius: .3em;
    background: color-mix(in srgb, var(--t-cyan) 8%, transparent);
    color: var(--text);
    font-size: .82em; line-height: 1.55;
}
#testnote b { color: var(--t-cyan); }
#testnote[hidden] { display: none; }

/* ==========================================================================
   2. 战场横幅：**已整个删掉**（周正 2026-10-04 v4 定稿）
   --------------------------------------------------------------------------
   这里原来有一条
       body:has(#hud:not([hidden]))::after { content:"BETA"; top:2px; right:… }
   前三版一直在给它挪窝（先压顶栏 → 挪右上角 → 挪安全区那条空带），
   每挪一次就得重量一遍它跟 11 个 HUD 元素的重叠，验收脚本也跟着改一版。
   v4 的定稿是**不再挪，直接删**：BETA 整个去掉。
   删干净的标准 = 规则整段不存在，body::after 回到「没发 content → 不生成盒子」，
   `getComputedStyle(document.body,'::after').content` 读回来是 "none"
   （测试服和正式服读出来一模一样，验收脚本就查这个，见 verify_testui.mjs）。

   顺带删掉的还有验收脚本里那段「按坐标反推横幅盒子」的假测量 ——
   body::after 本来就量不出元素盒子，反推的坐标全靠人肉对齐 CSS。
   横幅没了以后改成量**真的元素**两两重叠，见 verify_testui.mjs 的 zeroOverlap。
   ========================================================================== */

/* ==========================================================================
   3. 竖屏布局（只竖屏：）
   --------------------------------------------------------------------------
   做法：把 #hud 变成网格，每个 HUD 元素一个独立行（具体见下一段）。
   为什么不用写死的三带百分比（--t-a/b/c/d）：主角框以后多一行、小队框哪天变成
   11 个人、播报文字多一行，auto 行会自己变高、战场行（1fr）自动让位；
   写死百分比的话一旦装不下就把内容顶出屏外。
   #hud 下没排进网格的孩子（#affixbanner / #downtip / canvas）是 fixed，
   绝对定位不参与网格，正式服的层叠关系不受影响。
   ========================================================================== */
/* =====================================================================
   布局（周正 2026-10-04 v4 定稿，优先级最高，压倒一切）
   ---------------------------------------------------------------------
   自上而下（v4，跟 /tmp/ui_v4.md 一条一条对得上）：
     ① 玩家模块框架 #pf          ← 顶头，安全区下面第一行
     ② 小队框架     #party       ← 紧跟玩家框（周正「小队跟随向上」）
     ③ 暂停钮 #mpause + 伤害钮 #mmeter  ← 在小队框**下面**
     ④ BOSS 血条（.topbar）
     ④ 机制播报（#announce）      ← ④ 拆成两行，不叠在血条上
     ⑤ 战场（1fr，吃剩下的）
     ⑥ BUFF（#tbuffs）左 · DPS 表（#meter）右   ← 同一行左右分
     ⑥ 合剂 / 嗜血 / 战复钮（#mraid）
     ⑦ 底部按钮（.bottom）

   v3 → v4 只动了两个钮的行位置：
     v3：工具条（BETA 横幅 + 暂停 + 伤害）在**最上**，玩家框被挤到第二行
     v4：① 顶头是玩家框 → ② 小队框紧跟 → ③ 两个钮掉到小队框下面
   BETA 横幅整个删掉了（见第 2 节），安全区下面那条空带不再被横幅占着，
   两个钮也就是下面那条 tools 行、单独一格，跟任何框都不共用格子。

   铁律「任何框架不能重叠」怎么保证的：**一个元素一个格子**。
   早先两个元素共用一个 grid-area（.topbar 和 #announce 都是 boss、
   #meter 和 #mraid 都是 dps），CSS Grid 会把它们摆进同一个格子 —— 就是重叠的温床：
   实测 390 上顶栏 y194~252、播报 y231~252（压住 21px），DPS 表和合剂钮两个盒子
   完全一样（x8~382 y715.8~791.8）。这一版每个元素独占一格，格与格之间不可能压。
   验收脚本另外把真实盒子两两量了一遍（verify_testui.mjs 的 zeroOverlap），
   不靠 CSS 结构自证。

   BUFF / DPS 同一行左右分，**故意不共用一个格子**，原因见下面那条备注。

   几条钉死的量（不是估的）：
     · grid-template-columns 用 minmax(0,1fr) 而不是 1fr：1fr 的自动最小值是
       max-content，#mraid 六个圆钮的 min-content = 6×48+5×8 = 328px，
       在 320 屏（内容盒只有 304）会把整列顶到 328 —— 连带 ① ② ⑥ ⑦ 全部多出 8px，
       最右一列小队卡直接出屏（验收「320 短屏 无截字无出屏」就是这么红的）。
       minmax(0,1fr) 允许轨道缩到内容以下，于是每行都老老实实待在内容盒里。
     · 战场用 minmax(0,1fr)：极矮屏（可用高不够）时这一行先缩到 0，
       不会反过来把 ⑦ 顶出屏外。
   ===================================================================== */
#hud {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto auto auto auto minmax(0, 1fr) auto auto auto;
    grid-template-areas:
        "pf     pf     pf"       /* ① 玩家模块框架 — 顶头 */
        "party  party  party"    /* ② 小队框架 — 紧跟玩家框 */
        "tools  pause  dmg"      /* ③ 暂停钮 + 伤害钮 — 在小队框下面 */
        "boss   boss   boss"     /* ④ BOSS 血条 */
        "mech   mech   mech"     /* ④ 机制播报 */
        "field  field  field"    /* ⑤ 战场（canvas 不进 grid，占满屏，这里只当留白） */
        "buffs  buffs  buffs"    /* ⑥ BUFF 左 · DPS 右（同一格里的 flex 左右分，见第 3 节） */
        "raid   raid   raid"     /* ⑥ 合剂 / 嗜血 / 战复 */
        "btn    btn    btn";     /* ⑦ 底部按钮 */
    padding: var(--t-sat) var(--t-gut) var(--t-sab) var(--t-gut);
    box-sizing: border-box;
    gap: 4px;
}
/* ① 玩家框 — 最上（v4：顶头，压过工具条） */
#hud > #pf {
    grid-area: pf;
    position: static; left: auto; top: auto;
    width: auto; margin: 0;
}
/* ② 小队框 — 紧跟玩家框 */
#hud > #party {
    grid-area: party;
    position: static; right: auto; top: auto;
    width: auto; max-width: none; max-height: none; overflow: visible;
    margin: 0;
}
/* ④ BOSS 血条 — 小队框下面，整行宽（上一版 max-width:30% 把血条掐成 112px，
   血量数字和机制提示挤成一团 = 周正说的「BOSS 血条位置不对」） */
#hud > .topbar {
    grid-area: boss;
    position: static; left: auto; right: auto; top: auto;
    width: auto; max-width: none; margin: 0;
    /* style.css:83 用 `left:50% + translateX(-50%)` 居中。absolute 时代的居中法，
       变成网格项后 left 被我置成 auto，这个 transform 就变成「凭空往左挪半格」——
       实测 .bottom 就是这么歪到 x=-179 的（内容却在 x=8）。网格项一律清掉。 */
    transform: none;
}
/* ④ 机制播报 — 血条下面自己一行 */
#hud > #announce {
    grid-area: mech;
    position: static; left: auto; right: auto; top: auto;
    width: auto; margin: 0;
    font-size: 15px; line-height: 1.2; text-align: center; pointer-events: none;
    /* 长播报最多两行：再多就把战场挤没了（min-height:0 是让 grid 允许它缩） */
    max-height: 2.4em; min-height: 0; overflow: hidden;
    z-index: 5;
}
/* ⑤ 战场：留白行，什么都不放 —— 画布是 fixed 的，本来就铺满屏 */
/* ⑥ BUFF + DPS 同一行（BUFF 左 / DPS 右）
   ---------------------------------------------------------------------
   testmode.js 把 .buffs **和** #meter 一起挪进 #tbuffs（见该文件 placeBuffs），
   #tbuffs 这一格横着摆：左边增益图标，右边 DPS 表。
   为什么是「搬进一个 flex 容器」而不是「网格里并排两格」——三条都量过：

     ① 网格并排（"buffs meter meter"，DPS 跨 pause+dmg 两列）实测会把工具条拆开：
        390 上三列被撑成 221.8 / 70.3 / 73.9，暂停钮 justify-self:end 贴在
        col2 右边 304.1，伤害钮贴在 col3 右边 382 → 两个钮之间 30.3px
        （改之前是 4px，等于把周正已经点头的工具条改坏了）。
        改回 4 列的话 320 屏左边只剩 60px 给 BUFF（要 86px），增益图标被切 ——
        为了 DPS 表去切 BUFF，方向就错了。
     ② 网格同一格两元素（都用 buffs 区域 + justify-self 两头）能摆对，
        但那正是本文件上面刚写死的「两个元素共用一个 grid-area = 重叠温床」：
        只要哪天有人把 max-width 那行删了，BUFF 就整排滑到 DPS 表底下，无声重叠。
     ③ flex 容器天生排不下就收缩（min-width:0），永远不叠在一起 ——
        .buffs 是可缩的那个，#meter 是 flex:none 的固定宽度。结构上就压不上。

   横向实测（390×844，4 个光环真的画出来之后那次交图）：
     #tbuffs x8~382 · .buffs x8~85（内容宽，自动收缩）· #meter x233.8~382
     两个钮仍然相距 4px（#mpause 286.4~330.4 / #mmeter 334.4~382）。
   --------------------------------------------------------------------- */
#hud > #tbuffs {
    grid-area: buffs;
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    width: auto; margin: 0; min-height: 0;
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
/* 可缩的是 BUFF：宽度不够时它先让，且 min-width:0 才准缩（否则 nowrap 撑出去） */
#tbuffs > .buffs { flex: 0 1 auto; min-width: 0; }
/* ⑥ DPS 表 — 右侧窄框（周正 2026-10-04 定稿：「没必要这么宽」+「要在右边，BUFF 在左边」）
   宽度 140~168px 是量出来的，不是估的（390 竖屏实测，meter 自身 font-size 10px）：
     · 整行宽时盒子 374px，里面的字只占 123px（h4 标题「本层伤害 / 治疗（每秒）」）——
       250px 纯空白，这就是周正说的「没必要这么宽」；
     · 标题单行就要 125px（h4 8px 字 + .08em 字距），最坏的一行
       「防骑 128,432 +5,210」要 121px（模拟 5 位数 DPS + 5 位治疗量出来的）。
   所以下限 140px 给标题留 15px 余量、标题不折行；上限 168px 在 430 屏上也不至于
   把左边的 BUFF 挤没。中间一档用 vw：320 屏拿下限 140、430 屏拿 168 附近，
   三档都实测过标题仍是单行、数字不切。
   选择器挂 #tbuffs 而不是 #hud：style.css 那几条 .mobile #meter / .mobile.portrait
   #meter.open 是 (1,3,0)，这里 (2,2,1) 稳赢，position/inset/width 才真的被覆盖
   （#hud > #meter 那条在 #meter 换爹之后就不匹配了）。 */
#tbuffs > #meter {
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    flex: none;                       /* 表本身不缩：宁可切 BUFF 也不切数字 */
    width: clamp(140px, 38vw, 168px); max-width: none; margin: 0;
}
/* 收窄以后行内字不许被挤断：数字永远完整（flex:none + 不换行），
   只有名字空间不够才省略（style.css:201 那条 overflow:hidden 会把折行的第二行切掉）。 */
#tbuffs > #meter .row b { flex: none; white-space: nowrap; }
#tbuffs > #meter .row span {
    min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* ⑥ DPS 表不在网格里排了 —— 它跟 .buffs 一起住在 #tbuffs 这一格（上面的 flex 左右分）。
   原来那条 `#hud > #meter { grid-area: meter }` 连同 "buffs meter meter" 那行 areas
   一起删掉了：把 DPS 表跨到 pause+dmg 两列，实测会把两个钮撑开成 30.3px（见上面①）。 */
/* ⑥ 合剂 / 嗜血 / 战复 — 独占一行，绝不跟 DPS 表挤一个格子 */
#hud > #mraid {
    grid-area: raid;
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    width: auto; max-width: none; margin: 0;
    display: flex; flex-direction: row; gap: 4px;
    justify-content: flex-end; align-items: center;
    min-height: 0;
}
/* ③ 工具条：暂停 / 伤害两个钮（正式服钉在右上角 absolute）。
   v4 位置：**在小队框下面**（周正 2026-10-04「暂停和伤害显示放到小队下面」）。
   放在第 3 行而不是顶头，是因为 ① 顶头必须是玩家模块框架、② 小队要紧跟主角 ——
   三个都是整行宽的框，两个钮是唯一可以并排放进右半边的东西，所以排在它们下面。

   这两个钮**没有任何一个跟别的框共用 grid-area**：pause / dmg 各自独占一列
   （col2 / col3，都是 auto 宽），col1 那格空着当留白。
   justify-self:end 把它们各自贴到自己列的右边 → 两个钮之间只剩 gap 的 4px，
   跟 v3 顶部工具条时代量出来的间距一样（没动过它们的尺寸）。
   尺寸照抄 style.css（圆形 44px / 胶囊），**不要**写 width:auto ——
   .mobile #mpause 是 display:flex，auto 会缩成两个竖条那么宽（实测 17px）。 */
#hud > #mmeter {
    grid-area: dmg; justify-self: end; align-self: center;
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    margin: 0;
}
#hud > #mpause {
    grid-area: pause; justify-self: end; align-self: center;
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    margin: 0; flex: none;
}
/* ⑦ 底部按钮 — 不变 */
#hud > .bottom {
    grid-area: btn;
    position: static; left: auto; bottom: auto;
    width: auto; margin: 0;
    transform: none;   /* 同 .topbar：清掉 `left:50%` 时代的居中 transform */
}

/* ==========================================================================
   4. 主角框 + 大招条
   --------------------------------------------------------------------------
   ★ 大招条字被切的修法（周正 2026-10-02 人肉发现的）
     原 bug：v2/src/style.css:1405-1408
       .mobile #pf .ult      { height: 1.15em;  overflow: hidden; }  容器 ≈10px
       .mobile #pf .ult b    { font-size: max(.7em, 9px); line-height: 1.5em; } 字盒 ≈14px
     容器 10px 装 14px 的字盒 + overflow:hidden → 上下各切 2px。
     修法：高度改 auto + min-height:30px，字锁 12px 不跟着 em 缩到 9px；
           名字和百分比分两个格，名字溢出才省略（「就绪」这种右侧数字永远不压缩）。
   ========================================================================== */
#pf {
    display: flex; align-items: stretch; gap: 8px;
    padding: 6px 8px; border-radius: 10px;
    background: var(--panel); border: 1px solid var(--line);
}
#pf .portrait {
    width: 34px; height: 40px; border-radius: 5px;
}
/* .body 排成两列：左边 名字/血量/资源，右边 大招条 —— 竖着叠会把 C 带顶爆 */
#pf .body {
    flex: 1 1 auto; min-width: 0;
    display: grid;
    grid-template-columns: 1fr 40%;
    grid-template-areas: "nm ult" "hp ult" "res ult";
    column-gap: 8px; align-items: center;
}
#pf .name {
    grid-area: nm; font-size: 13px; line-height: 15px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#pf .hp {
    grid-area: hp; position: relative; height: 24px; margin-top: 0;
    border-radius: 6px; overflow: hidden; background: var(--hp-bg);
}
#pf .hp b {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; line-height: 24px; font-weight: 700; color: #fff;
    text-shadow: 0 1px 2px #000, 0 0 4px #000;
    font-variant-numeric: tabular-nums;
}
#pf .res { grid-area: res; min-height: 0; margin-top: 2px; }
#pf .res .mana,
#pf .res .meter { height: 10px; }
#pf .res .mana b,
#pf .res .meter b { font-size: 9px; line-height: 10px; }
/* 大师 / 额外专精：整行铺开，不去挤上面那两格 */
#pf .mastery,
#pf .lanes { grid-column: 1 / -1; font-size: 11px; margin-top: 2px; }

#pf .ult {
    grid-area: ult; align-self: center;
    position: relative; display: flex; align-items: center;
    height: auto; min-height: 30px; margin-top: 0;
    padding: 4px 8px; border-radius: 6px;
    background: rgba(0, 0, 0, .55); border: 1px solid #6a5a20;
    overflow: hidden;
}
#pf .ult i {
    position: absolute; inset: 0 auto 0 0; width: 0;
    background: linear-gradient(90deg, #ffd86a, #c08a10); transition: width .12s linear;
}
#pf .ult b {
    position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
    width: 100%; font-size: 12px; line-height: 1.2; font-weight: 700; color: #ffeaa8;
    text-shadow: 0 1px 2px #000;
}
#pf .ult .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#pf .ult .pct { flex: none; font-variant-numeric: tabular-nums; }
#pf .ult.on { border-color: var(--gold); box-shadow: 0 0 10px var(--gold-dim); }
#pf .ult.on b { color: #fff6cf; }
#pf .ult.on::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 209, 0, .18), transparent);
    animation: tuiUltSweep 1.2s linear infinite;
}
@keyframes tuiUltSweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { #pf .ult.on { animation: none; } #pf .ult.on::after { animation: none; } }

/* ==========================================================================
   5. 小队框 v2 · 2 行 × 5 列（ui_mockup_小队框.html 方案 1）
   --------------------------------------------------------------------------
   为什么必须横着排：游戏是 10 人队（run.js:25 rosterCap:9，含主角 10 个），
   竖排 10 行要 300px = 39% 屏高，会把战场压到 21%。横排 2 行只要 84px。
   为什么 5 列放得下：全库 39 个职业 short 名最长 2 个汉字（6 字节），
   390 ÷ 5 = 每列 70.8px，2 汉字 11px 字只要 22px，余下的正好放血量数字和角标。
   320 屏每列 56.8px 也还余 34px —— 三档都不用缩字号。
   ========================================================================== */
#party {
    display: grid;
    /* minmax(0,1fr) 不是 1f：1fr 的自动最小值是 max-content，卡片里
       「nowrap + overflow:hidden」的名字和绝对定位的血量数字一旦撑出内容盒，
       轨道就顶不下去。实测 320 上整列被顶到 328px（内容盒只有 304），
       最右一列两张卡 x273.6~336 直接出屏。 */
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    min-width: 0;
}
#party .sqbox { display: contents; }   /* 两队摊平进同一个 5 列网格 */
#party .sqlb { display: none; }       /* 队号挪到卡右上角 */
#party.single .sqbox { max-width: none; }

#party .mate {
    position: relative; min-width: 0;
    padding: 2px 3px 3px; border-radius: 5px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--qc, var(--line));   /* 品质色：绿 蓝 紫 橙 */
    border-top: 2px solid var(--cc, #666);           /* 职业色 */
}
/* 主角卡：金边，从 9 张旅伴里一眼挑出来 */
#party .mate.you {
    border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255, 209, 0, .25);
}
#party .mate .name {
    display: block; height: 15px; padding-right: 13px;   /* 右留 13px 给角标，永不撞字 */
    font-size: 11px; line-height: 15px; font-weight: 700;  /* 正式服竖屏是 10px，本轮往上调 */
    color: var(--cc, var(--text));
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#party .mate .hp {
    position: relative; height: 15px; margin-top: 2px;
    border-radius: 3px; background: var(--hp-bg); overflow: hidden;
}
#party .mate .hp i {
    position: absolute; inset: 0 auto 0 0; background: linear-gradient(#4fd35a, #2a8c3a);
}
#party .mate .hp b {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; line-height: 15px; color: #fff;    /* 正式服是 9px，本轮往上调 */
    text-shadow: 0 1px 1px #000, 0 0 3px #000;
    font-variant-numeric: tabular-nums;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 右上角标：队号（两队时）· 减益数。留空时 :empty 不画，单队零视觉变化 */
#party .mate .bd {
    position: absolute; top: 2px; right: 3px; width: 13px; height: 13px; border-radius: 3px;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; line-height: 1; font-weight: 700;
    color: #1a1200; background: var(--gold);
}
#party .mate .bd.db { color: #fff; background: var(--danger); }
#party .mate .bd:empty { display: none; }

/* 三种状态：阵亡 / 低血 / combo-flow（低血 = 红边 + 斜纹，色盲友好，不只靠颜色） */
#party .mate.dead { opacity: .6; filter: grayscale(.8); }
#party .mate.dead .hp b { color: #cfc8b8; }
#party .mate.low { border-color: var(--danger); }
#party .mate.low::after {
    content: ""; position: absolute; inset: 0; border-radius: 4px; pointer-events: none;
    background: repeating-linear-gradient(45deg, transparent 0 5px, rgba(224, 65, 59, .28) 5px 10px);
}
#party .mate.low .hp i { background: linear-gradient(#ffb14a, #a34a12); }
#party .mate.combo-flow,
#party .mate.combo-flow .name { box-shadow: 0 0 4px rgba(255, 194, 58, .6); }

/* ==========================================================================
   6. 其它 HUD 元素跟着新布局走（安全区不侵入）
   --------------------------------------------------------------------------
   这里原来还挂着 .topbar { top:2px; max-width:30% } 和 .bottom { bottom:… }
   两条 —— 都是上一版「把顶栏当角标挪」留下的，现在这两个元素都是 grid 项
   （position:static），inset 和 max-width 对它们不再起作用，但 max-width:30%
   实测把 BOSS 血条掐成了 112px 宽，所以两条一起删掉，位置只由第 3 节的
   grid-template-areas 说了算。 */
/* 顶栏字号：血条挤在一行里，字得小一点才放得下 30em 的 bossbar */
.topbar { font-size: 10px; padding: 1px 6px; }

/* 增益行（⑥ 区，testmode.js 把它挪到 #tbuffs 里）
   周正报的「小队图标和 BUFF 图标重叠」：正式服 .buffs 是 position:fixed 钉在
   右下（style.css:1360），而 #party 也在右边一列（style.css:1365）——
   两个框占同一条竖列，小队框一长就压上去。
   测试服不再 fixed：BUFF 在 ⑥ 区那一行的**左半**、DPS 表在右半（#tbuffs 这个 flex 容器里
   左右分，见第 3 节），跟 ② 小队框（更上面）也不可能相交。
   这一行的高度是两者里高的那个（实测 390 上 76px，被 76px 的 DPS 表撑着），
   .buffs 自己是 align-items:center 居中，不用改。 */
#tbuffs .buffs {
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    width: auto; min-width: 0;
    /* 图标 2.1em + 名字两行 ≈ 41px，给 46px 留够；再高就把战场挤没了 */
    max-height: 46px; overflow: hidden;
    display: flex; flex-direction: column; flex-wrap: nowrap; gap: 2px;
    justify-content: center; z-index: auto; pointer-events: none;
    margin: 0;
}
#tbuffs .buffs .arow { flex-wrap: nowrap; gap: 3px; }
#tbuffs .buffs .arow:not(.team) { width: auto; }
#tbuffs .buffs .aic { width: 1.9em; height: 1.9em; }
#tbuffs .buffs .arow.team { justify-content: flex-end; }
/* 铁律：任何框架不能重叠 —— #pf 整体 overflow:hidden 兜底 */
#pf { overflow: hidden; }

/* 合剂 / 嗜血 / 战复圆钮（⑥ 区独占一行）
   正式服 48px 固定（style.css:1004），六颗钮 6×48+5×8 = 328px，
   在 320 屏（内容盒 304）根本放不下 —— 上一版就是被这个 min-content
   把整列顶出屏的。这里跟着屏宽缩：320 → 38px，390 → 45px，430+ → 48px，
   最窄那档 6×38+5×4 = 248 < 304，留 56px 余量。 */
#mraid .mraid {
    width: clamp(38px, 11.6vw, 48px);
    height: clamp(38px, 11.6vw, 48px);
    flex: none;
}

/* 播报 / 机制预警 / 倒下提示：announce 在第 3 节排了独立一行（④ 区，血条下面），
   affix / downtip 是 fixed（不在 grid 流里），钉在战场中段，不碰顶部 HUD 也不碰底部按钮。 */
#affixbanner {
    position: fixed; left: 0; right: 0; top: 58%;
    z-index: 24; pointer-events: none;
}
#downtip {
    position: fixed; left: var(--t-gut); right: var(--t-gut); top: 72%;
    z-index: 24; pointer-events: none;
}

/* 极矮屏兜底：⑥ 区三行（buffs+DPS / raid / btn）加起来超过可用高时，
   先压 DPS 表，再压合剂钮 —— 战场那行是 minmax(0,1fr)，能缩到 0，
   但 ⑤ 按钮行必须留在屏内（Home 安全区 34px 由 #hud 的 padding-bottom 保证）。 */
@media (max-height: 620px) {
    #tbuffs > #meter { max-height: 4.4em; overflow: hidden; }
    #hud > #mraid .mraid { width: 36px; height: 36px; }
}

/* 320 短屏：大招条 min-height 兜底（字 12px 行盒 14.4px，min-height 30px 够） */
@media (max-width: 360px) {
    #pf .ult { min-height: 32px; }
    #pf .ult b { font-size: 12px; line-height: 1.2; }
}

/* 320 短屏大招条：强制 min-height，字 12px 行盒 14.4px，盒 36px 才不切 */
@media (max-width: 360px) {
    #pf .ult {
        min-height: 36px !important;
        padding: 6px 8px !important;
    }
    #pf .ult b {
        font-size: 12px !important;
        line-height: 14px !important;
    }
}

/* ==========================================================================
   5. HUD v5 · 手机竖屏 / 横屏（2026-10-08，工头授权唯一属主块）
   --------------------------------------------------------------------------
   本段只作用于 `.mobile`（html.mobile，由 game/touch.js 判定）——
   **PC 一个字节都不改**（工头：只手机竖横，无 PC 新开发）。

   改的四块，对应四条硬要求：
     ① Boss 区：主角框 + 队伍框**之后同一个流式布局区**里，固定摆
        「timer / phase / 首领名 / HP / 阶段」；多 Boss 最多 2 条紧凑条，
        绝不绝对定位横穿场中。
     ② 中央机制提示：同时最多 1 条**主**提示（第 3 节的队列已经保证），
        排队的下一条降级成**短条**；**不许 overflow:hidden 把字吃掉** ——
        装不下就缩字号，缩到下限再允许换行，两条提示各占各的行，文字不互压。
     ③ BUFF：左侧、**摇杆上方固定安全区**，最多 2 行，danger debuff 优先；
        层数在图标内、剩余秒数在图标底部；溢出用「+N」展开 / 收回，
        不用 overflow:hidden 直接丢信息；转屏 + safe-area 不裁剪。
     ④ DPS 表：右下紧凑、**默认展开**、用户可主动关闭、偏好持久化；
        放伤害 + 治疗；不挡摇杆（左下）/ 动作钮 / BUFF（左）。

   摇杆几何（portrait，.mobile.portrait #joy，120px 圆 + margin -60）：
     静止位圆心 = (safe-left + 78, 底 96px)，半径 60
     → 圆占 x[safe-left+18, safe-left+138]，底边离屏底 96+60 = 156px
     BUFF 安全区就钉在这 156px 之上（--joy-safe），不靠猜。
   ========================================================================== */

/* ── ⑤-0 安全区变量：全部收口成变量，布局只读变量、不直接写 env()
      为什么收口：env() 没法在测试里模拟（Chrome 桌面 headless 永远是 0），
      收成 --sa-* 之后，测试可以把这几个值改成刘海屏的真实值来量，
      真机上仍然是 env() 实测值 —— 一份声明，两种验法。
      注：原 1540 行那个裸 `{ --t-sat: 47px; ... }` 块在 CSS 里是**无效**的
      （顶层裸块不是选择器，浏览器整段丢弃），--t-sat/--t-sab 实际是未定义的。
      这里在真选择器 .mobile #hud 上重新定义，grid padding 才真的有值。 */
.mobile #hud {
    --sa-t: env(safe-area-inset-top, 0px);
    --sa-r: env(safe-area-inset-right, 0px);
    --sa-b: env(safe-area-inset-bottom, 0px);
    --sa-l: env(safe-area-inset-left, 0px);
    --t-sat: max(8px, var(--sa-t, 0px));
    --t-sab: max(8px, var(--sa-b, 0px));
    --t-gut: max(8px, var(--sa-l, 0px), var(--sa-r, 0px));
    /* 摇杆安全区：圆心底 96px + 半径 60px + 6px 余量 */
    --joy-safe: calc(var(--sa-b, 0px) + 162px);
    /* BUFF 安全区的条宽。横屏要给首领条让出同宽的左栏，两边必须读同一个值，
       否则手写两套数字早晚会错开（实测：条 203px / 左栏 137px → 压掉 2980px²）。 */
    --buff-w: min(62vw, 24em);
    --buff-rail: calc(var(--buff-w) + 16px);
    /* 右下角 #mraid 那一排按钮的高度（.mraid 50px + 2px×2 边框 = 54px） */
    --raid-safe: calc(var(--sa-b, 0px) + 66px);
}

/* ── ⑤-1 ① Boss 区：.topbar 变成一个**流式**竖排块（不再是 absolute 居中块）
      .portrait .topbar 原本是 `position:absolute; left:0; right:0; top:safe+.5em`，
      而 #hud 又把它排进 grid 的 boss 那一行 —— absolute 元素不进 grid 流，
      于是「Boss 条跟主角框/队伍框同一个流式布局区」这条根本没成立。
      这里改回 static，让 grid 真的把它排在 ④ 行。 */
.mobile #hud > .topbar {
    position: static; left: auto; right: auto; top: auto;
    display: flex; flex-direction: column; align-items: stretch; gap: .15em;
    width: auto; max-width: none; margin: 0; padding: 0;
    transform: none; min-width: 0;
}
/* meta 行（timer / phase / loot）—— 运行时由 hud_layout.js 建出来包住这三个既有节点 */
.mobile #hud > .topbar > #bossmeta {
    display: flex; align-items: baseline; gap: .6em;
    min-width: 0; overflow: visible;
}
.mobile #hud > .topbar > #bossmeta > #timer { font-size: 1.25em; line-height: 1.15; flex: none; }
.mobile #hud > .topbar > #bossmeta > #phase { font-size: .78em; white-space: nowrap; overflow: visible; text-overflow: clip; min-width: 0; }
.mobile #hud > .topbar > #bossmeta > #loot { font-size: .78em; margin-left: auto; white-space: nowrap; flex: none; }

/* 首领条本体：跟着 grid 走，不 absolute、不横穿场中 */
.mobile #hud > .topbar > #bossbar,
.mobile #hud > .topbar > #bossbar2 {
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    width: auto; max-width: none; margin: 0; transform: none;
    pointer-events: auto;
}
.mobile #hud > .topbar > #bossbar[hidden],
.mobile #hud > .topbar > #bossbar2[hidden] { display: none !important; }
.mobile #hud > .topbar > #bossbar .bn { font-size: .9em; line-height: 1.25; }
/* 血量数字原来是被 .bar 的 `overflow:hidden` 切掉的（#bossbar .bar 基线就是 overflow:hidden）：
   bar 高度 1.15em=11.7px，而数字行盒 .8em×1.6 = 13px → 上下各切一点；
   横屏压到 .9em=9.1px 时切掉 3.9px，字顶上一排直接少一截（截图里 "26.2k" 上面被啃）。
   改法：**高度改 auto，让条自己抱住字**，行高收到 1.2 —— 一个字都不切。 */
.mobile #hud > .topbar > #bossbar .bar,
.mobile #hud > .topbar > #bossbar2 .bar { height: auto; min-height: 1.3em; margin-top: .15em; }
.mobile #hud > .topbar > #bossbar .bar b,
.mobile #hud > .topbar > #bossbar2 .bar b { display: block; font-size: .74em; line-height: 1.25; }
.mobile #hud > .topbar > #bossbar .bcast { font-size: .78em; line-height: 1.3; margin-top: .15em; }
/* 「？ 机制」钮：原来 absolute 挂在血条右边（left:100%），紧凑条里会出格 → 改成行内 */
.mobile #hud > .topbar > #bossbar .bbrief,
.mobile #hud > .topbar > #bossbar2 .bbrief {
    position: static; margin: .15em 0 0; min-height: 0;
    padding: .1em .5em; font-size: max(.72em, 10px);
}

/* 第 2 条首领（紧凑条）：#topbar.multi 时，1 号也压成紧凑，两条一样高、一样排版 */
.mobile #hud > .topbar > #bossbar2 { display: flex; flex-direction: column; }
.mobile #hud > .topbar > #bossbar2 .bn { font-size: .85em; line-height: 1.2; color: #ffb06a;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mobile #hud > .topbar > #bossbar2 .bph { font-size: .7em; padding: 0 .3em; }
.mobile #hud > .topbar > #bossbar2 .bar { min-height: 1.2em; }
.mobile #hud > .topbar > #bossbar2 .bcast { font-size: .72em; line-height: 1.25; }
/* 紧凑条里 2 号没有独立「？ 机制」钮（1 号那一个已经开的是当前首领的），藏掉免得点错 */
.mobile #hud > .topbar > #bossbar2 .bbrief { display: none !important; }
.mobile #hud > .topbar > #bossbar2 .bauras { display: none; }
/* 双 Boss 时 1 号也让位给第二条 */
.mobile #hud > .topbar.multi > #bossbar .bcast { display: none; }
.mobile #hud > .topbar.multi > #bossbar .bauras { display: none; }
.mobile #hud > .topbar.multi > #bossbar .bbrief { align-self: flex-start; }

/* 机制卡（点「？ 机制」弹的）：跟着 topbar 走，absolute 定位保持在流里它自己那格 */
.mobile #hud > .topbar > #bossbrief { position: static; width: auto; margin: .2em 0 0; }

/* ── ⑤-2 ② 中央机制提示：主提示 1 条 + 队列下一条降级短条
      硬要求：不能 overflow:hidden 直接丢字。改法 = 自适应字号 + 最多两行 + 换行。
      字号由 hud.js 按实际行数调（--ann-fit），这里只给上下限。 */
.mobile #hud > #announce {
    grid-area: mech;
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    width: auto; margin: 0;
    /* 关键：把 v4 的 `max-height:2.4em; overflow:hidden` 拆掉 ——
       那是「字直接被吃掉」的元凶。改成 max-height 留足两行富余，
       再用 min-height:0 让 grid 允许它在极矮屏收缩。 */
    max-height: 3.4em; min-height: 0;
    overflow: visible;                 /* ← 不再裁字 */
    font-size: clamp(11px, calc(var(--ann-fit, 1) * 1.35em), 17px);
    line-height: 1.2; text-align: center;
    white-space: normal; overflow-wrap: anywhere;
    padding: 0 .4em;
}
/* 队列里的下一条：短条，排在主提示**下面自己一行**，两者不共用盒子 → 不可能互压 */
.mobile #hud > #announce2 {
    grid-area: mech2;
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    width: auto; margin: .1em 0 0; padding: 0 .4em;
    font-size: clamp(10px, .82em, 12px); line-height: 1.2;
    text-align: center; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;   /* 短条本来就是摘要，省略号是设计，不是丢信息 */
    color: #ffd9a0; opacity: .85;
    pointer-events: none; min-height: 0;
}
.mobile #hud > #announce2[hidden] { display: none !important; }
/* grid 多加一行给短条；不加行的话短条会跟主提示抢同一格 = 重叠温床 */
.mobile #hud {
    /* 10 行里**只有一个** 1fr（⑤ 战场）。多写一个会让 mech2（次提示短条）也变 1fr，
       实测那条「短条」被撑成 192px 高。 */
    grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr) auto auto auto;
    grid-template-areas:
        "pf     pf     pf"
        "party  party  party"
        "tools  pause  dmg"
        "boss   boss   boss"
        "mech   mech   mech"
        "mech2  mech2  mech2"
        "field  field  field"
        "buffs  buffs  buffs"
        "raid   raid   raid"
        "btn    btn    btn";
}

/* ── ⑤-3 ③ BUFF：左侧摇杆上方固定安全区，最多 2 行 + 「+N」展开 */
.mobile #hud > #tbuffs {
    position: fixed; left: 0; right: auto; top: auto;
    bottom: var(--joy-safe);
    width: auto; max-width: none; margin: 0;
    /* 宽度 = 屏宽 62%，上限 24em；左侧对齐到安全区，落在摇杆正上方 */
    width: var(--buff-w);
    left: max(6px, var(--sa-l, 0px));
    display: flex; align-items: flex-end; gap: 0;
    z-index: 6; pointer-events: none;
}
/* #tbuffs 移出 grid 流 → buffs 那一行自动塌掉，空间还给战场 */
.mobile #hud { grid-template-areas:
    "pf pf pf" "party party party" "tools pause dmg" "boss boss boss"
    "mech mech mech" "mech2 mech2 mech2" "field field field"
    "buffs buffs buffs" "raid raid raid" "btn btn btn"; }

.mobile #hud > #tbuffs > .buffs {
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    width: 100%; max-width: none; min-width: 0;
    /* v4 的 `max-height:46px; overflow:hidden` 会把第三行直接吃掉 ——
       工头红线：禁止用 overflow:hidden 丢信息。改成「行高由内容定，
       超出用 +N 展开」，overflow 留 visible。 */
    max-height: none; overflow: visible;
    display: flex; flex-direction: column; flex-wrap: nowrap; gap: .18em;
    justify-content: flex-end; z-index: auto; margin: 0; padding: 0;
}
/* 两行：① 带名字的（含 danger debuff，优先） ② 小图标 + 团队 + 展开钮 */
.mobile #hud > #tbuffs > .buffs .arow {
    display: flex; flex-wrap: wrap; align-items: flex-end;
    gap: .15em .25em; row-gap: .2em; width: 100%;
}
.mobile #hud > #tbuffs > .buffs .abox { width: 4.2em; }
.mobile #hud > #tbuffs > .buffs .abox .aic { width: 2.2em; height: 2.2em; }
.mobile #hud > #tbuffs > .buffs .abox .an { font-size: 10px; line-height: 1.1;
    -webkit-line-clamp: 1; }   /* 名字只留 1 行（图标 2 行会撑爆安全区），省略号是设计 */
/* 层数在图标内、剩余秒数在图标底部 —— 两条都要在，且**不许互压**。
   原来 v3 两条都锚在底部：`.aic b` 右下、`.aic em` 正中偏下，图标只有 2.2em(~22px)，
   叠层数「10」+ 剩余「12」时两个数字直接压成一团。
   改法：层数挪到**左上角图标内**（右上角已被减益红三角占了，.aic.db::before），
   剩余秒数留在底部正中 —— 一个上、一个下，各占一条，互不重叠。 */
.mobile #hud > #tbuffs > .buffs .aic b {
    left: 0; top: 0; right: auto; bottom: auto;
    font-size: max(9px, .7em); font-weight: 800;
    line-height: 1.1; padding: 0 .14em; border-radius: 0 0 .2em 0;
    background: rgba(0,0,0,.8); color: #fff; z-index: 2;
}
.mobile #hud > #tbuffs > .buffs .aic em {
    left: 50%; bottom: 0; right: auto; top: auto; transform: translateX(-50%);
    font-size: max(8px, .62em); line-height: 1.15; padding: 0 .18em;
    z-index: 2; border-radius: .18em;
}
/* danger debuff 视觉优先：红框 + 红字 + 左上角角标（红框已有，这里加字色） */
.mobile #hud > #tbuffs > .buffs .abox:has(.aic.db) .an { color: #ff9a88; font-weight: 700; }
/* 「+N」展开 / 收回钮：永远在第二行末尾，44px 触摸区 */
.mobile #hud > #tbuffs > .buffs .arow > .bmore {
    flex: none; align-self: center; min-width: 44px; min-height: 30px;
    padding: .2em .5em; margin-left: .1em;
    font: 700 max(10px, .78em)/1.2 inherit; font-variant-numeric: tabular-nums;
    color: #ffeaa8; background: rgba(20,16,30,.9);
    border: 1px solid rgba(255,209,0,.5); border-radius: .4em;
    cursor: pointer; pointer-events: auto; touch-action: manipulation;
}
.mobile #hud > #tbuffs > .buffs .arow > .bmore:active { background: rgba(70,56,10,.95); }
.mobile #hud > #tbuffs > .buffs[data-more="0"] .arow > .bmore { display: none !important; }
/* 展开：允许更多行；超出安全区用**滚动**（不丢信息），且带 -webkit-overflow-scrolling */
.mobile #hud > #tbuffs > .buffs.open {
    max-height: min(46vh, 15em);
    overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    background: rgba(10,8,18,.62); border-radius: .45em; padding: .25em;
    pointer-events: auto;
}
.mobile #hud > #tbuffs > .buffs.open::-webkit-scrollbar { width: 3px; }
.mobile #hud > #tbuffs > .buffs.open::-webkit-scrollbar-thumb { background: rgba(255,209,0,.45); border-radius: 2px; }

/* ── ⑤-4 ④ DPS 表：右下紧凑、**默认展开**、可主动关闭、偏好持久
      v4 是 `.mobile #meter { display:none !important }` → 默认收起，工头要默认展开。

      ★ 这里原来是 `position: fixed` 浮层（bottom: --raid-safe），
        实测 9 个档位**全部**跟网格里的 #mraid 压住（104~6240px²），
        844×390 横屏还额外压到首领条和机制提示 —— 因为 fixed 不参与网格流，
        390 高的屏被内容填满以后，右下角那点空位根本不存在。
      改法：**让它占网格自己的第 ⑩ 行**（btn 行，手机上 #actionbar 隐藏、本来就是空的）。
        · 在流里 → 跟 #mraid / 首领条 / 机制提示是**上下相邻的不同格子**，结构上压不上；
        · justify-self: end → 仍然是右下角紧凑；
        · 战场那行是 minmax(0,1fr)，它自动让位，不会把战场挤没。 */
.mobile #hud > #dpswrap {
    grid-area: btn;
    position: relative; left: auto; right: auto; top: auto; bottom: auto;
    justify-self: end; align-self: end;
    width: auto; margin: 0;
    display: none; pointer-events: auto;
}
/* 默认展开：dpswrap 上有 .on（hud.js 把 #meter.open 镜像过来的）才显示 */
.mobile #hud > #dpswrap.on { display: block !important; }
/* 关掉时 #meter 必须真的 display:none —— 原来 .mobile #meter 那条 !important 还在，
   这里显式覆盖（2 个 id 提特异性，稳赢 1 个 id） */
.mobile #hud > #dpswrap > #meter,
.mobile #hud > #dpswrap.on > #meter {
    display: block !important;
    position: static; left: auto; right: auto; top: auto; bottom: auto;
    width: clamp(132px, 34vw, 158px); max-width: none; margin: 0;
    padding: .3em .4em .4em; box-sizing: border-box;
    background: rgba(12,12,18,.72);
    font-size: max(10px, .95em);
    pointer-events: none;                 /* 半透明、不拦手指 */
    /* 10 人满队时 8 行自然高度 122px（实测），会把战场那行吃光。
       封顶 + 纵向滚动：滚动 ≠ 丢信息（还能滑下去看），裁掉才是丢。 */
    max-height: 4.6em; overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.mobile #hud > #dpswrap > #meter h4 {
    font-size: .74em; margin: 0 0 .25em; white-space: nowrap;
    /* 右上角留给 × 关闭钮：标题原来顶到面板右边缘，× 又伸到面板外，
       两者一起把 844×390 横屏那排按钮的边角啃掉一块（截图里贴着「亡者」）。 */
    padding-right: 2.1em; overflow: hidden; text-overflow: ellipsis;
}
/* 关闭钮：44×32 触摸区，**收在面板内**右上角，不许伸出面板外去压别人的按钮 */
.mobile #hud > #dpswrap > #dpsclose {
    position: absolute; right: 1px; top: 1px; z-index: 2;
    min-width: 44px; min-height: 30px; padding: 0 .35em;
    font: 700 max(11px, .82em)/1 inherit; color: #ffe0c0;
    background: rgba(24,18,32,.95); border: 1px solid rgba(255,180,120,.5);
    border-radius: .35em; cursor: pointer; pointer-events: auto; touch-action: manipulation;
}
.mobile #hud > #dpswrap > #meter .row { height: 1.3em; margin-top: .12em; }
.mobile #hud > #dpswrap > #meter .row b { flex: none; white-space: nowrap; }
.mobile #hud > #dpswrap > #meter .row span {
    min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}


/* ── ⑤-5 横屏（844×390 等）：同一套块，横过来压扁
      横屏只有 390 高，竖屏那套行高直接溢出。三处必须专门处理（数字都是量出来的）：

      ① 摇杆几何**横竖屏不一样**，安全区不能照抄：
         竖屏 #joy 静止位 top = 100% - 96px → 圆底离屏底 96+60 = 156px
         横屏 #joy 静止位 top = 100% - 92px → 圆底离屏底 92+60 = 152px
         安全区要 ≥ 158px 才留得住（原来照抄成 118px，BUFF 整块压进摇杆圆里）。
      ② #mraid 在横屏是**竖排**一列（.mobile #mraid 的 flex-direction: column，
         只有 .mobile.portrait 才改成 row）：三颗钮 + 间距 ≈ 170px，
         一根就把 390 高的网格顶爆、首领条被挤出屏。横屏也排成 row（≈44px）。
      ③ 10 人满队时 #party 是两队 ×5 张卡，自然高度能到 110px。
         给它 max-height + 纵向滚动：宁可滑，不许把下面的首领条顶出屏（滚动 ≠ 丢信息）。 */
@media (orientation: landscape) and (max-height: 500px) {
    .mobile #hud > .topbar > #bossmeta > #timer { font-size: 1.05em; }
    .mobile #hud > .topbar > #bossbar .bar { min-height: 1.2em; }
    .mobile #hud > .topbar > #bossbar .bn { font-size: .82em; }
    .mobile #hud > .topbar > #bossbar2 .bar { min-height: 1.15em; }
    .mobile #hud > .topbar > #bossbar2 .bn { font-size: .8em; }
    .mobile #hud > .topbar > #bossbar .bcast,
    .mobile #hud > .topbar > #bossbar2 .bcast { display: none; }
    .mobile #hud > #announce { max-height: 2.4em; font-size: clamp(10px, calc(var(--ann-fit, 1) * 1.2em), 14px); }
    .mobile #hud > #announce2 { font-size: 10px; }

    /* ③ 队伍框封顶 + 可滚 */
    .mobile #hud > #party { max-height: 6.5em; min-height: 0; overflow-y: auto; overflow-x: hidden;
        -webkit-overflow-scrolling: touch; }
    .mobile #hud > #party .mate { padding: 1px 3px 2px; }
    .mobile #hud > #party .mate .hp { height: 10px; }
    .mobile #hud > #party .mate .name { font-size: 9px; }
    /* ② 合剂钮排成横排 */
    .mobile #hud > #mraid { flex-direction: row; gap: 6px; }
    .mobile #hud > #mraid .mraid { width: 40px; height: 40px; }

    /* ④ 左栏让给 #pf / #party / BUFF：
         横屏 390 高，网格内容（首领条 y110~205 + 机制提示 y209~224）是**整行宽**的，
         而 BUFF 固定在左侧摇杆上方（y172~232）—— 两者必撞（实测压掉 5542px²）。
         把首领条和机制提示的左边距让出一条左栏，BUFF 那条竖列就空出来了。
         仍然是同一个流式布局区（同一个 grid 的相邻行），只是不再横穿整宽。 */
    .mobile #hud { --buff-w: min(42vw, 20em); }
    .mobile #hud > .topbar,
    .mobile #hud > #announce,
    .mobile #hud > #announce2 { margin-left: var(--buff-rail); margin-right: 0; }

    /* ① 横屏摇杆安全区：圆底 152px + 6px 余量 = 158px（不是竖屏那个 162） */
    .mobile #hud { --joy-safe: calc(var(--sa-b, 0px) + 158px); }
    .mobile #hud > #tbuffs { bottom: var(--joy-safe); }
    .mobile #hud > #tbuffs > .buffs .abox { width: 3.6em; }
    .mobile #hud > #tbuffs > .buffs .abox .aic { width: 1.95em; height: 1.95em; }
    .mobile #hud > #tbuffs > .buffs .arow > .bmore { min-width: 38px; min-height: 26px; }
    /* DPS 在 btn 行（网格内），横屏只把表本身压窄一点 */
    .mobile #hud > #dpswrap > #meter { width: clamp(118px, 24vw, 142px); font-size: max(9px, .85em); }
    .mobile #hud > #dpswrap > #meter .row { height: 1.15em; }
    .mobile #hud > #dpswrap > #dpsclose { min-height: 26px; min-width: 38px; }
}

/* 极矮屏兜底：安全区先让，不裁字（BUFF/DPS 都是 fixed，不会把 grid 撑爆） */
@media (max-height: 360px) {
    /* 只压内容高度，**绝不动 --joy-safe**：安全区往下挪就是让 BUFF 压进摇杆圆里
       （原来的 `calc(var(--joy-safe) - 44px)` 就是这么把 BUFF 推进去的，实测 3648px²）。 */
    .mobile #hud > #announce { max-height: 2.2em; }
    .mobile #hud > #party { max-height: 6em; }
    .mobile #hud > .topbar > #bossbar .bcast,
    .mobile #hud > .topbar > #bossbar2 .bcast { display: none; }
}

/* PC 不受影响：把 ⑤ 段里所有 fixed / 尺寸的兜底都锁在 .mobile 下，
   非手机一律走 v3/v4 原样 —— 工头「无 PC 新开发」的硬边界。 */

/* B: measured ten-person mobile landscape HUD, root-authorized scoped layout. */
@media (orientation: landscape) and (min-width: 800px) and (max-height: 500px) {

.mobile #hud.b-ls10 { display:block !important; padding:0 !important; }
.mobile #hud.b-ls10 > #pf { position:absolute;left:max(8px,var(--sa-l));right:auto;top:max(8px,var(--sa-t));width:230px;margin:0; }
.mobile #hud.b-ls10 > #pf .ult { padding:2px 4px; }
.mobile #hud.b-ls10 > #pf .ult b { font-size:9px;line-height:11px;flex-direction:column;gap:1px; }
.mobile #hud.b-ls10 > #pf .ult .nm { white-space:normal;overflow:visible;text-overflow:clip; }
.mobile #hud.b-ls10 > #party { position:absolute;left:calc(max(8px,var(--sa-l)) + 238px);right:calc(max(8px,var(--sa-r)) + 102px);top:max(8px,var(--sa-t));width:auto;margin:0;max-height:none;overflow:visible;gap:3px; }
.mobile #hud.b-ls10 > #party .mate { padding:1px 3px 2px; }
.mobile #hud.b-ls10 > #party .mate .name { height:12px;line-height:12px;font-size:10px; }
.mobile #hud.b-ls10 > #party .mate .hp { height:10px;margin-top:1px; }
.mobile #hud.b-ls10 > #mpause { position:absolute;right:calc(max(8px,var(--sa-r)) + 52px);top:max(8px,var(--sa-t));width:44px;height:44px;margin:0; }
.mobile #hud.b-ls10 > #mmeter { position:absolute;right:max(8px,var(--sa-r));top:max(8px,var(--sa-t));width:44px;height:44px;margin:0;padding:0;font-size:11px;white-space:nowrap; }
.mobile #hud.b-ls10 > .topbar { position:absolute;left:max(8px,var(--sa-l));right:max(8px,var(--sa-r));top:calc(max(8px,var(--sa-t)) + 68px);margin:0;display:grid;grid-template-columns:180px minmax(0,1fr) minmax(0,1fr);gap:6px;align-items:start; }
.mobile #hud.b-ls10 > .topbar > #bossmeta { grid-column:1;display:grid;grid-template-columns:1fr auto;grid-template-areas:"time loot" "phase phase";gap:3px; }
.mobile #hud.b-ls10 #bossmeta > #timer { grid-area:time; }
.mobile #hud.b-ls10 #bossmeta > #loot { grid-area:loot; }
.mobile #hud.b-ls10 #bossmeta > #phase { grid-area:phase;white-space:normal; }
.mobile #hud.b-ls10 > .topbar > #bossbar, .mobile #hud.b-ls10 > .topbar > #bossbar2 { position:relative;min-height:44px;padding-right:50px;box-sizing:border-box; }
.mobile #hud.b-ls10 > .topbar .bbrief { position:absolute;right:0;top:0;width:44px;min-height:44px;margin:0; }
.mobile #hud.b-ls10 > .topbar > #bossbar { grid-column:2 / 4;min-width:0; }
.mobile #hud.b-ls10 > .topbar.multi > #bossbar { grid-column:2; }
.mobile #hud.b-ls10 > .topbar > #bossbar2 { grid-column:3;min-width:0; }
.mobile #hud.b-ls10 > .topbar > #bossbrief { grid-column:1 / 4; }
.mobile #hud.b-ls10 > #announce { position:absolute;left:calc(max(8px,var(--sa-l)) + 156px);right:calc(max(8px,var(--sa-r)) + 156px);top:calc(max(8px,var(--sa-t)) + 120px);margin:0;font-size:12px;line-height:15px;max-height:none;transform:none !important; }
.mobile #hud.b-ls10 > #announce2 { position:absolute;left:calc(max(8px,var(--sa-l)) + 156px);right:calc(max(8px,var(--sa-r)) + 156px);top:calc(max(8px,var(--sa-t)) + 151px);margin:0; }
.mobile #hud.b-ls10 > #mraid { position:absolute;right:max(8px,var(--sa-r));bottom:calc(max(8px,var(--sa-b)) + 54px);margin:0;display:flex;flex-direction:row;gap:6px; }
.mobile #hud.b-ls10 > #mraid .mraid { width:44px;height:44px; }
.mobile #hud.b-ls10 > #dpswrap { position:absolute;right:max(8px,var(--sa-r));bottom:max(8px,var(--sa-b));margin:0; }
.mobile #hud.b-ls10 > .bottom { position:absolute;left:calc(max(8px,var(--sa-l)) + 156px);right:calc(max(8px,var(--sa-r)) + 156px);bottom:max(8px,var(--sa-b));margin:0;align-items:center; }
.mobile #hud.b-ls10 > #tbuffs { width:160px; }
.mobile #hud.b-ls10 > #affixbanner { left:max(8px,var(--sa-l));right:auto;top:calc(max(8px,var(--sa-t)) + 120px);width:144px;transform:none !important; }
.mobile #hud.b-ls10 > #affixbanner p { display:block;white-space:normal;padding:3px 5px;line-height:12px;font-size:10px; }
.mobile #hud.b-ls10 > #affixbanner span { display:block;font-size:9px;line-height:11px; }
.mobile #hud.b-ls10 > #affixbanner em { font-size:10px; }


}

/* User phone feedback: five DPS ranks, fully visible above raid controls. */
.mobile #hud > #dpswrap, .mobile #hud.b-ls10 > #dpswrap {
 position:fixed !important; grid-area:auto; right:var(--dps-raid-right,8px) !important;
 bottom:var(--dps-above-raid,80px) !important; top:auto !important; left:auto !important; margin:0;
}
.mobile #hud > #dpswrap > #meter { max-height:none !important; overflow:visible !important; }

/* 机制提示以视口内左右边距定位，不再叠加旧居中-50%动画。 */
#hud > #affixbanner { left: max(8px, var(--sa-l, 0px)); right: max(8px, var(--sa-r, 0px)); width: auto; max-width: none; transform: none; }
#hud > #affixbanner.show { animation-name: affixInViewport; }
#hud > #affixbanner p { white-space: normal; flex-wrap: wrap; overflow-wrap: anywhere; }
#hud > #affixbanner span { min-width: 0; }
@keyframes affixInViewport { 0% { opacity: 0; transform: translateY(-8px); } 10%,82% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { #hud > #affixbanner.show { animation: none; opacity: 1; } }

/* Manual orientation uses logical viewport; runtime b-ls10 owns this layout. */


.mobile #hud.b-ls10 { display:block !important; padding:0 !important; }
.mobile #hud.b-ls10 > #pf { position:absolute;left:max(8px,var(--sa-l));right:auto;top:max(8px,var(--sa-t));width:230px;margin:0; }
.mobile #hud.b-ls10 > #pf .ult { padding:2px 4px; }
.mobile #hud.b-ls10 > #pf .ult b { font-size:9px;line-height:11px;flex-direction:column;gap:1px; }
.mobile #hud.b-ls10 > #pf .ult .nm { white-space:normal;overflow:visible;text-overflow:clip; }
.mobile #hud.b-ls10 > #party { position:absolute;left:calc(max(8px,var(--sa-l)) + 238px);right:calc(max(8px,var(--sa-r)) + 102px);top:max(8px,var(--sa-t));width:auto;margin:0;max-height:none;overflow:visible;gap:3px; }
.mobile #hud.b-ls10 > #party .mate { padding:1px 3px 2px; }
.mobile #hud.b-ls10 > #party .mate .name { height:12px;line-height:12px;font-size:11px; }
.mobile #hud.b-ls10 > #party .mate .hp { height:10px;margin-top:1px; }
.mobile #hud.b-ls10 > #mpause { position:absolute;right:calc(max(8px,var(--sa-r)) + 52px);top:max(8px,var(--sa-t));width:44px;height:44px;margin:0; }
.mobile #hud.b-ls10 > #mmeter { position:absolute;right:max(8px,var(--sa-r));top:max(8px,var(--sa-t));width:44px;height:44px;margin:0;padding:0;font-size:11px;white-space:nowrap; }
.mobile #hud.b-ls10 > .topbar { position:absolute;left:max(8px,var(--sa-l));right:max(8px,var(--sa-r));top:calc(max(8px,var(--sa-t)) + 68px);margin:0;display:grid;grid-template-columns:180px minmax(0,1fr) minmax(0,1fr);gap:6px;align-items:start; }
.mobile #hud.b-ls10 > .topbar > #bossmeta { grid-column:1;display:grid;grid-template-columns:1fr auto;grid-template-areas:"time loot" "phase phase";gap:3px; }
.mobile #hud.b-ls10 #bossmeta > #timer { grid-area:time; }
.mobile #hud.b-ls10 #bossmeta > #loot { grid-area:loot; }
.mobile #hud.b-ls10 #bossmeta > #phase { grid-area:phase;white-space:normal; }
.mobile #hud.b-ls10 > .topbar > #bossbar, .mobile #hud.b-ls10 > .topbar > #bossbar2 { position:relative;min-height:44px;padding-right:50px;box-sizing:border-box; }
.mobile #hud.b-ls10 > .topbar .bbrief { position:absolute;right:0;top:0;width:44px;min-height:44px;margin:0; }
.mobile #hud.b-ls10 > .topbar > #bossbar { grid-column:2 / 4;min-width:0; }
.mobile #hud.b-ls10 > .topbar.multi > #bossbar { grid-column:2; }
.mobile #hud.b-ls10 > .topbar > #bossbar2 { grid-column:3;min-width:0; }
.mobile #hud.b-ls10 > .topbar > #bossbrief { grid-column:1 / 4; }
.mobile #hud.b-ls10 > #announce { position:absolute;left:calc(max(8px,var(--sa-l)) + 156px);right:calc(max(8px,var(--sa-r)) + 156px);top:calc(max(8px,var(--sa-t)) + 120px);margin:0;font-size:12px;line-height:15px;max-height:none;transform:none !important; }
.mobile #hud.b-ls10 > #announce2 { position:absolute;left:calc(max(8px,var(--sa-l)) + 156px);right:calc(max(8px,var(--sa-r)) + 156px);top:calc(max(8px,var(--sa-t)) + 151px);margin:0; }
.mobile #hud.b-ls10 > #mraid { position:absolute;right:max(8px,var(--sa-r));bottom:calc(max(8px,var(--sa-b)) + 54px);margin:0;display:flex;flex-direction:row;gap:6px; }
.mobile #hud.b-ls10 > #mraid .mraid { width:44px;height:44px; }
.mobile #hud.b-ls10 > #dpswrap { position:absolute;right:max(8px,var(--sa-r));bottom:max(8px,var(--sa-b));margin:0; }
.mobile #hud.b-ls10 > .bottom { position:absolute;left:calc(max(8px,var(--sa-l)) + 156px);right:calc(max(8px,var(--sa-r)) + 156px);bottom:max(8px,var(--sa-b));margin:0;align-items:center; }
.mobile #hud.b-ls10 > #tbuffs { width:160px; }
.mobile #hud.b-ls10 > #affixbanner { left:max(8px,var(--sa-l));right:auto;top:calc(max(8px,var(--sa-t)) + 120px);width:144px;transform:none !important; }
.mobile #hud.b-ls10 > #affixbanner p { display:block;white-space:normal;padding:3px 5px;line-height:12px;font-size:11px; }
.mobile #hud.b-ls10 > #affixbanner span { display:block;font-size:9px;line-height:11px; }
.mobile #hud.b-ls10 > #affixbanner em { font-size:11px; }



/* 20261018 landscape: compact framed header, clear centre, separate controls. */
.mobile #hud.b-ls10 { --ls-gap:8px; font-size:12px; }
.mobile #hud.b-ls10 > #pf { left:12px;top:10px;width:208px;padding:8px;gap:8px;border:1px solid #384458;border-radius:10px;background:linear-gradient(135deg,#151c2bee,#101522dd);box-shadow:0 3px 14px #0006; }
.mobile #hud.b-ls10 > #pf .portrait { width:34px;height:44px;border-radius:6px; }
.mobile #hud.b-ls10 > #pf .body { min-width:0; }
.mobile #hud.b-ls10 > #pf .name { font-size:12px;line-height:16px; }
.mobile #hud.b-ls10 > #pf .hp { height:12px;margin-top:3px; }
.mobile #hud.b-ls10 > #pf .hp b { font-size:10px;line-height:12px; }
.mobile #hud.b-ls10 > #pf .res { margin-top:3px;min-height:6px; }
.mobile #hud.b-ls10 > #pf .res .meter,.mobile #hud.b-ls10 > #pf .res .mana { height:6px; }
.mobile #hud.b-ls10 > #pf .mastery,.mobile #hud.b-ls10 > #pf .lanes { display:none; }
.mobile #hud.b-ls10 > #pf .ult { height:18px;min-height:18px;margin-top:5px;overflow:hidden; }
.mobile #hud.b-ls10 > #pf .ult b { flex-direction:row;font-size:10px;line-height:14px;gap:4px; }
.mobile #hud.b-ls10 > #party { left:228px;right:116px;top:10px;max-width:none;width:auto;max-height:82px;overflow-y:auto;gap:6px; }
.mobile #hud.b-ls10 > #party .sqbox { flex-direction:row;flex-wrap:wrap;gap:4px;padding:5px;border-radius:8px;background:#111827de; }
.mobile #hud.b-ls10 > #party .sqlb { display:none; }
.mobile #hud.b-ls10 > #party .mate { flex:1 1 56px;min-width:48px;max-width:100px;padding:3px 4px;border-left-width:2px; }
.mobile #hud.b-ls10 > #party.single .sqbox { max-width:none; }
.mobile #hud.b-ls10 > #party .mate .name { height:13px;line-height:13px;font-size:10px; }
.mobile #hud.b-ls10 > #party .mate .hp { height:8px;margin-top:3px; }
.mobile #hud.b-ls10 > #party .mate .hp b { font-size:8px;line-height:8px; }
.mobile #hud.b-ls10 > #mpause { right:64px;top:10px;width:40px;height:40px; }
.mobile #hud.b-ls10 > #mmeter { right:12px;top:10px;width:44px;height:40px;font-size:11px; }
.mobile #hud.b-ls10 > .topbar { left:228px;right:116px;top:98px;transform:none;grid-template-columns:104px minmax(0,1fr) minmax(0,1fr);gap:8px;text-align:left; }
.mobile #hud.b-ls10 > .topbar > #bossmeta { font-size:10px;line-height:13px; }
.mobile #hud.b-ls10 > .topbar > #bossbar,.mobile #hud.b-ls10 > .topbar > #bossbar2 { width:auto;margin:0;min-height:42px;padding:5px 48px 5px 8px;background:#201719e8;border:1px solid #78483d;border-radius:8px; }
.mobile #hud.b-ls10 .topbar .bn { display:block;font-size:11px;line-height:14px; }
.mobile #hud.b-ls10 .topbar .bar { height:10px;min-height:10px;margin-top:3px; }
.mobile #hud.b-ls10 .topbar .bar b { font-size:9px;line-height:10px; }
.mobile #hud.b-ls10 .topbar .bcast { font-size:10px;height:13px;line-height:13px; }
.mobile #hud.b-ls10 > .topbar .bbrief { right:4px;top:4px;width:38px;min-height:32px;font-size:10px;border-radius:6px; }
.mobile #hud.b-ls10 > #announce { left:230px;right:150px;top:162px;font-size:12px;line-height:17px;max-width:none; }
.mobile #hud.b-ls10 > #announce2 { left:230px;right:150px;top:192px;font-size:11px; }
.mobile #hud.b-ls10 > .bottom { left:176px;right:218px;bottom:12px;max-width:none; }
.mobile #hud.b-ls10 > #mraid { right:12px;bottom:12px;gap:6px; }
.mobile #hud.b-ls10 > #mraid .mraid { width:44px;height:44px;font-size:12px; }
.mobile #hud.b-ls10 > #tbuffs { left:12px;bottom:112px;width:196px;max-height:64px;overflow:auto; }
.mobile #hud.b-ls10 > #affixbanner { left:12px;top:110px;width:196px; }
.mobile #hud.b-ls10 > #dpswrap { --dps-above-raid:68px;--dps-raid-right:12px;max-width:150px; }
/* Reviewed corrections: logical safe insets; three separated left-rail blocks. */
.mobile #hud.b-ls10 { --ls-l:max(12px,var(--sa-l,0px));--ls-r:max(12px,var(--sa-r,0px));--ls-t:max(10px,var(--sa-t,0px));--ls-b:max(12px,var(--sa-b,0px)); }
.mobile #hud.b-ls10 > #pf { left:var(--ls-l);top:var(--ls-t); }
.mobile #hud.b-ls10 > #party { left:calc(var(--ls-l) + 216px);right:calc(var(--ls-r) + 104px);top:var(--ls-t); }
.mobile #hud.b-ls10 > #mpause { right:calc(var(--ls-r) + 52px);top:var(--ls-t); }
.mobile #hud.b-ls10 > #mmeter { right:var(--ls-r);top:var(--ls-t); }
.mobile #hud.b-ls10 > .topbar { left:calc(var(--ls-l) + 216px);right:calc(var(--ls-r) + 104px);top:calc(var(--ls-t) + 88px); }
.mobile #hud.b-ls10 > #announce { left:calc(var(--ls-l) + 218px);right:calc(var(--ls-r) + 138px);top:calc(var(--ls-t) + 152px); }
.mobile #hud.b-ls10 > #announce2 { left:calc(var(--ls-l) + 218px);right:calc(var(--ls-r) + 138px);top:calc(var(--ls-t) + 182px); }
.mobile #hud.b-ls10 > .bottom { left:calc(var(--ls-l) + 164px);right:calc(var(--ls-r) + 206px);bottom:var(--ls-b); }
.mobile #hud.b-ls10 > #mraid { right:var(--ls-r);bottom:var(--ls-b); }
.mobile #hud.b-ls10 > #tbuffs { position:absolute;left:var(--ls-l);top:calc(var(--ls-t) + 114px);bottom:auto;width:196px;max-height:44px;overflow-y:auto;overflow-x:hidden;pointer-events:auto; }
.mobile #hud.b-ls10 > #affixbanner { left:var(--ls-l);top:calc(var(--ls-t) + 162px);bottom:auto;width:196px;max-height:56px;overflow-y:auto;pointer-events:auto; }
.mobile #hud.b-ls10 > #dpswrap { --dps-above-raid:calc(var(--ls-b) + 56px);--dps-raid-right:var(--ls-r); }
/* Affix and buff rails must share HUD coordinates, including rotated toolbar. */
.mobile #hud.b-ls10 > #affixbanner { position:absolute; }
.mobile #hud.b-ls10 > #tbuffs { top:calc(var(--ls-t) + 72px); }
.mobile #hud.b-ls10 > #affixbanner { top:calc(var(--ls-t) + 120px); }

/* Boss HUD: only a thin health strip; no panel, badges or extra controls. */
.mobile #hud.b-ls10 > .topbar { top:calc(var(--ls-t) + 88px);gap:8px;align-items:start; }
.mobile #hud.b-ls10 > .topbar > #bossbar,
.mobile #hud.b-ls10 > .topbar > #bossbar2 { position:relative;height:22px;min-height:0;padding:0;margin:0;background:none;border:0;border-radius:0;box-shadow:none;overflow:hidden; }
.mobile #hud.b-ls10 > .topbar :is(#bossbar,#bossbar2) > .bar { position:absolute;inset:0;height:22px;min-height:0;margin:0;box-sizing:border-box;border:1px solid #a85050;border-radius:3px;background:#301114;overflow:hidden; }
.mobile #hud.b-ls10 > .topbar :is(#bossbar,#bossbar2) > .bar > i { background:linear-gradient(180deg,#e64747,#b91f2c); }
.mobile #hud.b-ls10 > .topbar :is(#bossbar,#bossbar2) > .bn { position:absolute;left:8px;right:100px;top:0;height:22px;line-height:22px;margin:0;z-index:2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px;color:#fff;text-shadow:0 1px 2px #000;pointer-events:none; }
.mobile #hud.b-ls10 > .topbar :is(#bossbar,#bossbar2) > .bar > b { position:absolute;right:7px;top:0;width:auto;height:20px;line-height:20px;font-size:10px;color:#fff;text-shadow:0 1px 2px #000; }
.mobile #hud.b-ls10 > .topbar :is(#bossbar,#bossbar2) > :is(.bph,.bauras,.bcast,.btip,.bbrief),
.mobile #hud.b-ls10 > .topbar :is(#bossbar,#bossbar2) > .bar > .bphm { display:none !important; }

/* 20261018: no full-width orientation strip; test navigation lives only in menu. */
#layout-toolbar[hidden] { display:none !important; }
.mobile #hudtools { display:flex;gap:6px;align-items:center;justify-content:flex-end;pointer-events:auto; }
.mobile #hudtools > :is(#mpause,#mmeter,#layout-toggle) { position:static !important;left:auto;right:auto;top:auto;bottom:auto;width:36px;min-width:36px !important;height:36px;min-height:36px !important;margin:0;padding:0;font-size:10px;border-radius:8px; }
.mobile #hudtools > #mmeter { width:44px; }
.portrait #hud { grid-template-rows:auto auto auto auto auto auto minmax(0,1fr) auto auto auto;grid-template-areas:"pf pf pf" "party party party" "boss boss boss" "tools tools tools" "mech mech mech" "mech2 mech2 mech2" "field field field" "buffs buffs buffs" "raid raid raid" "btn btn btn";gap:3px; }
.portrait #hudtools { grid-area:tools; }
.portrait #hud > .topbar { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:3px;align-items:start; }
.portrait #hud > .topbar > #bossmeta { grid-column:1 / -1;display:flex;gap:8px;align-items:center;font-size:9px;line-height:12px; }
.portrait #hud > .topbar > #bossmeta :is(#timer,#phase,#loot) { font-size:9px;line-height:12px;margin:0; }
.portrait #hud > .topbar > #bossbar { grid-column:1 / -1; }
.portrait #hud > .topbar.multi > #bossbar { grid-column:1; }
.portrait #hud > .topbar > #bossbar2 { grid-column:2; }
.portrait #hud .topbar :is(#bossbar,#bossbar2) { position:relative;width:auto;height:22px;min-height:0;padding:0;margin:0;border:0;border-radius:0;background:none;box-shadow:none;overflow:hidden; }
.portrait #hud .topbar :is(#bossbar,#bossbar2) > .bar { position:absolute;inset:0;height:22px;min-height:0;margin:0;border:1px solid #a85050;border-radius:3px;background:#301114; }
.portrait #hud .topbar :is(#bossbar,#bossbar2) > .bar > i { background:linear-gradient(180deg,#e64747,#b91f2c); }
.portrait #hud .topbar :is(#bossbar,#bossbar2) > .bn { position:absolute;left:7px;right:96px;top:0;height:22px;line-height:22px;z-index:2;margin:0;font-size:11px;color:white;text-shadow:0 1px 2px black;overflow:hidden;white-space:nowrap;text-overflow:ellipsis; }
.portrait #hud .topbar :is(#bossbar,#bossbar2) > .bar > b { position:absolute;right:6px;top:0;width:auto;line-height:20px;font-size:10px; }
.portrait #hud .topbar :is(#bossbar,#bossbar2) > :is(.bph,.bauras,.bcast,.btip,.bbrief),.portrait #hud .topbar :is(#bossbar,#bossbar2) > .bar > .bphm { display:none !important; }
.mobile #hud.b-ls10 > #hudtools { position:absolute;right:var(--ls-r);top:var(--ls-t); }
.mobile #hud.b-ls10 > #party { right:calc(var(--ls-r) + 138px); }
