/* [claude code] 2026-11-04 v4.23: drop enhance socket milestone chips. */
/* [claude code] 2026-10-31 v4.11: unclaimed reward summary, tab counts and free-claim highlight. */
/* [claude code] 2026-10-23 v3.86 📺 常駐廣告列:--ad-h / --sat、#portraitRoot 扣掉廣告列、#adbar 樣式(檔尾) */
/* [claude code] 2026-10-22 v3.79 少字版:單件詳情 .it-stats / .it-chips / .it-enh / .needcard(缺口卡)· 商店獎勵 chip .rwd / .rc;拿掉沒有標記在用的 .enhodds / .itrow.cmp / .itrow.sub / .dlt / .payfirst */
/* [claude code] 2026-10-21 v3.77 月卡頁 .passpanel / .ptoday / .pcard / .ptable · 大廳第 4 張中排卡 · 圖片頭像框 */
/* [claude code] 2026-10-21 v3.76 大階外框 .tc2 / .tc3(背包格 / 裝備格 / 詳情標題) */
/* [claude code] 2026-10-19 v3.70 html[data-art] .lb-deck > .sec-arrow 回到 absolute(切星區箭頭有美術時跑位) */
/* [claude code] 2026-10-19 v3.69 大廳目前難度膠囊:.lb-capline · .lb-diff */
/* [claude code] 2026-09-13 v2.99 💎 商城 P2 B1 + B2:.payrow(購買商城幣)· .paybind · .shopodds(隨機商品的機率) */
/* [claude code] 2026-09-13 v2.98 💎 商城 P2 B3:.lb-cur .gem · .shopit:disabled · .passcard(月卡每日領取) */
/* [claude code] 2026-09-04 v2.68 UI 重構 T14:字級 165→3(3 筆有理由的例外)· 圓角 43→0 · 硬寫色碼 21→0 */
/* [claude code] 2026-09-04 v2.66 UI 重構 T13:導覽列改成內嵌 SVG 圖示(currentColor) */
/* [claude code] 2026-09-04 v2.63 UI 重構 T12:設定改成「一行一設定」(圖示 + 標籤 + ⓘ + 控制項) */
/* [claude code] 2026-09-04 v2.62 UI 重構 T11:收益中心(.erow)—— 四個領取入口收成一個 */
/* [claude code] 2026-09-04 v2.60 UI 重構 T10:技能樹一次一棵(手機)+ 底部只留一顆升級鈕 */
/* [claude code] 2026-09-04 v2.58 UI 重構 T9:批次選取模式(後果寫成數字、觸控目標 44px) */
/* [claude code] 2026-09-04 v2.55 UI 重構 T8:背包/材料/寶石分頁 + 單件 sheet 的機制說明收合 */
/* [claude code] 2026-09-04 v2.53 UI 重構 T7:裝備第一屏 = 戰力卡(28px)+ 六部位 2x3 + 一條建議 */
/* [claude code] 2026-09-04 v2.51 UI 重構 T6:三選一改三張並排(只留一行核心增益)+ 結算獎勵先於統計、Build 收合 */
/* [claude code] 2026-09-04 v2.49 UI 重構 T5:HUD 收斂成四件事 + 暫停面板 + 第一次出擊的操作說明 */
/* [claude code] 2026-09-04 v2.44 UI 重構 T4:大廳重排(SECTOR caption + 28px 星區名 + 進度 + 兩張卡 + 出擊)*/
/* [claude code] 2026-09-04 v2.43 UI 重構 T1/T2/T3:token 層 + overlay 歸成 sheet/full 兩類 + grid 全面 minmax(0,1fr) */
/* [claude code] 2026-07-29 Phase 1:戰鬥 UI(HUD / 選單 / 三選一 / 結算)。
   🔴 陣營色二分(己方=青 / 蟲族=洋紅紫)是純幾何繪圖下唯一可靠的敵我辨識手段,變數在這裡定死。 */
/* [claude code] 2026-07-29 一鍵最佳裝備的按鈕列 */
/* [claude code] 2026-07-29 Phase 9b:設定頁 / 帳號表單 / 版本提示條 / 直向鎖定 的樣式 */
/* [claude code] 2026-07-29 Phase 9:星區地圖 / 關卡格 / 系統未解鎖提示條 的樣式 */
/* [claude code] 2026-07-29 Phase 6b:寶石孔位 / 打造 / 背包 的樣式 */
/* [claude code] 2026-07-29 Phase 8:體力列 / 券勾選列 / 離線報告 / 異常訊號 的樣式 */
/* [claude code] 2026-07-29 v1.2:大廳(兩層)/ 底部功能列 / 出擊面板 / 🎁 寶箱 / ⭐ 星等 的樣式 */
/* [claude code] 2026-07-30 v1.6:❓ 遊戲內詢問視窗(#ask)的樣式 —— 取代瀏覽器 confirm */
/* [claude code] 2026-08-29 v2.37:⚔️ 單件積分 / 🎖️ 全身共鳴 / 📈 養成結果面板 / 💎 寶石工坊 的樣式 */
/* [claude code] 2026-08-27 v2.34:手機版面收尾(dvh / safe-area / iOS 表單放大 / 矮螢幕裁切 / 觸控目標)—— 見檔尾 */
/* [claude code] 2026-09-09 v2.88 P1:Google Play 金流骨幹接完 */
/* [claude code] 2026-09-13 v2.97 🔓 解鎖文案四處都錯一個星區 + 💎 寶石「去哪拿」寫的是錯的 */
/* [claude code] 2026-09-13 v3.2 月卡的頭像框(pf-basic / pf-elite)與稱號(pass-title)—— 見檔尾 */
:root {
  --up: var(--red);
  --down: var(--green);
  /* 📺 v3.86 常駐廣告列:--ad-h = 廣告列總高(沒有廣告 = 0);--sat = 頂部安全區,廣告列在上方時由它吃掉 → 遊戲內歸 0 */
  --ad-h: 0px;
  --sat: env(safe-area-inset-top);
  /* -- 既有色票(整份 CSS 都在用,T1 一個都不動)------------------ */
  --bg: #0a0e1a;
  --panel: rgba(16, 24, 44, .93);
  --battle-hint-bg: rgba(16, 24, 44, .58);
  --line: rgba(120, 200, 255, .18);
  --txt: #dbe7ff;
  --dim: #8ba0c4;
  --ally: #35e6ff;
  --ally-soft: #7af3ff;
  --enemy: #ff3ea5;
  --enemy-heal: var(--violet);
  /* 🔴 2026-09-04 新增的角色色:**窗外 / 非介面的東西**(毒氣、孢子)。
     為什麼值得開一顆:色票是「一色一職」,而這一色的職務是
     「讓玩家一眼知道**這不是 UI**」—— 借用既有的 --ally / --enemy 反而會讓
     「這東西可以點嗎」變得模糊。只用在背景裝飾層,不准出現在任何控制項上。 */
  --toxic: #9be36a;
  /* 🎛️ 大廳窗外的兩層裝飾 —— **調濃淡 / 快慢就改這四個數字**,不要去動漸層本身。
     🔴 為什麼抽出來:它們的「對」與「不對」只有在**真的裝置上、而且會動**的時候看得出來,
        Claude 的預覽視窗強制 `prefers-reduced-motion: reduce`(永遠是靜止的),
        所以這一定是「使用者看了說再多一點 / 少一點」的來回 —— 那就要讓來回只改一個值。 */
  /* 🔴 濃度倍率是**乘進顏色的 alpha**,不是套在 opacity 上 ——
     `opacity` 的上限是 1,寫成 opacity 的話這顆旋鈕**只能調淡、不能調濃**
     (2026-09-04 實測:設 2.5 完全沒反應,而且不會報錯)。 */
  --lb-star-a: 1;        /* 星塵濃度倍率(0 = 關掉;可以 > 1) */
  --lb-star-s: 9s;       /* 星塵一輪多久(小 = 飛得快) */
  --lb-gas-a: 1;         /* 毒氣濃度倍率(0 = 關掉) */
  --lb-gas-s: 22s;       /* 毒氣一輪多久 */
  --enemy-soft: #b06bff;
  --gold: #ffd666;
  --ok: #4df0a9;
  --bad: #ff5c72;

  /* ==============================================================
     T1 . Token 層(2026-09-04)-- 規格 SSOT:
       .claude/skills/dtg-ui/SKILL.md 第 2 節
       restart_codex\wolves_ui_redesign\ui-spec.html

     🔴 這一段【只是把尺放上去】,沒有改任何一個現有選擇器的值。
        之後每做一項(T4 大廳、T7 裝備…)才逐面板把寫死的數字換成這裡的變數。
     ============================================================== */

  /* -- 字級:只有這 5 級 ------------------------------------------ */
  --fs-caption: 10px;   /* 單位 / 徽章內文 / 次要標籤 */
  --fs-body: 12px;      /* 內文 / 按鈕 / 列標籤 */
  --fs-title: 15px;     /* 數值 / 區塊內主要文字 */
  --fs-heading: 20px;   /* 面板標題 / 關卡名 */
  --fs-display: 28px;   /* 🔴 一屏唯一的主角數值 -- 出現第二次層級就塌了 */
  /* ⚠️ 24~64px 那一段不是字級,是 emoji 當美術(.lb-art / .loadlogo / .chbox /
     .chanim / .card .ci)。它們刻意沒有 token,要在 T13 換成 <img> -- 換完那一整段
     自然從 CSS 消失。字級爆炸與 emoji 當圖示是同一個問題,不要當兩件事修。 */

  /* -- 圓角:只有這 3 種(+ 圓形 50% 是唯一例外)------------------- */
  --r-ctl: 8px;         /* 控制項:按鈕 / 輸入框 / 分頁 / 小方鈕 */
  --r-card: 12px;       /* 卡片 / 面板 / sheet */
  --r-pill: 999px;      /* 徽章 / 膠囊 / 進度條 */

  /* -- 間距:4 的倍數(卡片內距 12 . 卡片之間 8 . 區塊之間 16~24)--- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-6: 24px;

  /* -- 色票:一色一職(右邊是它未來要取代的舊變數)------------------ */
  --cyan: #35e6ff;      /* 可以點的東西 -- 唯一的互動訊號。與 --ally 同值 */
  --cyan2: #25aee8;     /* 主按鈕漸層的暗端 / hover / active。舊的沒有這一顆 */
  /* --gold 同名同值,不重複定義 */
  --green: #48e0a3;     /* 增益 / 完成 / 已達成     <- 取代 --ok  (#4df0a9) */
  --red: #ff657e;       /* 危險 / 損失 / 未讀紅點   <- 取代 --bad (#ff5c72) */
  --violet: #aa75ff;    /* 稀有 / 敵方。🔴 不准用在按鈕上 <- 取代 --enemy-soft (#b06bff) */
  --ink: #edf7ff;       /* 主要文字 <- 取代 --txt (#dbe7ff) */
  --muted: #86a0b8;     /* 次要文字 <- 取代 --dim (#8ba0c4) */
  --panel2: #11263a;    /* 卡片浮在面板上的那一層。舊的沒有這一顆 */
  /* 🔴 --panel 這個名字【已經被舊值佔住】(rgba(16,24,44,.93),整份 CSS 都在用),
     而 T1 不准改任何現有選擇器的值 -> 規格那顆不透明的 #0c1928 先叫 --panel-flat。
     每重做一個面板就把該面板的 background 從 var(--panel) 換成 var(--panel-flat);
     換完最後一處之後,才可以把 --panel 本身改成 #0c1928 並刪掉這個別名。
     ⚠️ 兩者不是同一個東西:舊的是半透明(會透出底下的畫面),新的是實心。 */
  --panel-flat: #0c1928;
  /* 淺底上的紅字。🔴 青色 / 白色實心按鈕上不能用 --red(#ff657e)——
     亮紅壓在亮底上讀不出來,要用這顆深紅。原本兩處各自硬寫一次。 */
  --red-ink: var(--red-ink);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--txt);
  font-family: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%; overscroll-behavior: none; touch-action: none; user-select: none;
}
#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }

/* ===== HUD ===== */
#hud { position: fixed; inset: 0; pointer-events: none; padding: var(--sat) 0 0; }
#hud button { pointer-events: auto; }
.hud-top {
  position: absolute; top: 10px; left: 0; right: 0;
  display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 12px;
}
.wavebox {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  background: rgba(10,16,30,.72); border: 1px solid var(--line);
  padding: 8px 12px; font-size: 12px; letter-spacing: 0; font-variant-numeric: tabular-nums;
  border-radius: var(--r-card); max-width: calc(100% - 64px);
}
.mission-clock { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mission-clock #hTime { color: var(--gold); }
.mission-objective { color: var(--muted); font-size: var(--fs-caption); }
.mission-track { height: 4px; overflow: hidden; border-radius: var(--r-pill); background: var(--panel2); }
.mission-track[hidden] { display: none; }
.mission-track i { display: block; height: 100%; width: 0; background: var(--gold); }
.ico-btn {
  position: absolute; right: 12px; top: 0;
  width: 44px; height: 44px; border-radius: 8px;
  background: rgba(10,16,30,.72); border: 1px solid var(--line); color: var(--txt); font-size: 15px;
}
.hud-bottom { position: absolute; bottom: 12px; left: 12px; right: 12px; }
.bar {
  position: relative; height: 14px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.10); border: 1px solid var(--line);
}
.bar i { position: absolute; inset: 0; width: 0; display: block; transition: width .12s linear; }
.bar.energy { height: 10px; }
.bar.energy i { background: linear-gradient(90deg, var(--ally), var(--ally-soft)); }
.bar span {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 10px; color: #fff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums;
}

/* FPS 讀數(綠 = 正常 / 琥珀 = 畫面掉幀 / 紅 = 模擬也跟不上 = 這台機器真的跑不動) */
/* 🔴 T5:FPS + 物件數量合併成一條【只在除錯模式出現】的診斷列。
   它本來常駐在波次那顆膠囊裡 —— 那是玩家整場都在看的位置,而那兩個數字
   只有開發的人看得懂。開關在 app.js 的 DIAG(`?diag=1` 或 localStorage.dtg_diag)。 */
.diag {
  /* 🔴 擺左下角不是擺正上方 —— 上方 44~48px 是 👑 BOSS 血條的位置(.bossbox top:48px),
     兩個疊在一起的話,開了除錯模式就看不到王剩多少血。
     它是給開發的人看的東西,不該去搶遊戲本身的版面。 */
  position: absolute; bottom: 34px; left: 12px;
  font-size: var(--fs-caption); color: var(--ok); opacity: .85;
  font-variant-numeric: tabular-nums; white-space: nowrap;
  background: rgba(10,16,30,.72); border-radius: var(--r-pill); padding: 2px 8px;
}
.diag[hidden] { display: none; }
.diag.warn { color: var(--gold); }
.diag.bad { color: var(--bad); }
/* 📊 物件數量:掛在波次列正下方(靠左,不擋 BOSS 血條的名字) */
/* 👑 終局 BOSS 血條(在波次列正下方,橫跨整個寬度 —— 要一眼看到「王剩多少血、還剩幾秒」) */
.bossbox { position: absolute; top: 84px; left: 12px; right: 12px; }
/* 🔴 這裡【不要】給 display —— HTML 的 hidden 屬性會被 CSS 的 display 蓋掉(v1.3 線上事故:空盒子) */
.bossbox[hidden] { display: none; }
.bossbox .bt {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 12px; letter-spacing: 1px; margin-bottom: 3px;
  text-shadow: 0 1px 3px #000; color: var(--enemy-soft);
}
.bossbox .bt span:last-child { font-variant-numeric: tabular-nums; color: var(--dim); }
.bossbox.warn .bt span:last-child { color: color-mix(in srgb, var(--red) 55%, #fff); }
.bar.boss { height: 11px; border-color: rgba(255,62,165,.5); }
.bar.boss i { background: linear-gradient(90deg, #ff3ea5, color-mix(in srgb, var(--enemy) 55%, #fff)); }
.bossbox.rage .bar.boss i { background: linear-gradient(90deg, var(--red), color-mix(in srgb, var(--gold) 70%, var(--red))); }

/* 👑 清場 / 降臨的大字 */
/* 👑 v2.36:清場 / 降臨 / 狂暴的警示改成【中央往左右拉開的橫幅】。
   🔴 為什麼要換掉純文字:那 2.3 秒剛好是滿場怪 + 玩家在走位的時候,
      一段沒有底的白字會直接被畫面吃掉(使用者:「感覺沒看過」)。
      橫幅有【底 + 斜紋 + 上下發光邊】,而且是【橫貫整個畫面】—— 用面積換注意力。
   🔴 顏色由 kind 決定(語意不要混):淨化 = 己方青、降臨 = 敵方洋紅、狂暴 = 警告橘紅。 */
/* 🩸 v2.38 受傷紅暈 —— 使用者回報「我被打中也沒有什麼感覺」。
   🔴 用 radial-gradient 從四邊往內壓,中間【留白】:蓋滿整片的話會看不見自己與腳下的怪,
      「有感覺」就變成「看不到」。
   🔴 靠切換 class 重播動畫要先 reflow(見 app.js 的 hurtFlash);
      transition 版本在連續受傷時會卡在最亮不回來。 */
.hurtfx {
  position: absolute; inset: 0; pointer-events: none; opacity: 0;
  background: radial-gradient(ellipse at center,
    rgba(255, 40, 70, 0) 38%, rgba(255, 40, 70, .28) 76%, rgba(255, 30, 60, .62) 100%);
  z-index: 3;
}
.hurtfx.on { animation: hurtPulse .42s ease-out both; }
/* 血量低於三成:常駐一層淡紅呼吸 —— 「快死了」要在畫面上一直看得到,不能只有血條 */
.hurtfx.low { opacity: 1; animation: hurtLow 1.4s ease-in-out infinite; }
.hurtfx.low.on { animation: hurtPulse .42s ease-out both; }
@keyframes hurtPulse { 0% { opacity: 0; } 12% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hurtLow { 0%, 100% { opacity: .28; } 50% { opacity: .52; } }

.boss-alert {
  position: absolute; top: 32%; left: 0; right: 0;
  text-align: center; pointer-events: none;
  /* 🔴 存【rgb 分量】不是顏色值 —— rgba(var(--ba), .3) 到處都能跑;
     用 color-mix() 的話舊 Safari 會讓整條 background 失效 → 帶子變透明 = 回到原本看不見的樣子。 */
  --ba: 255, 62, 165;        /* 預設:降臨(敵方洋紅)*/
  --ba-soft: #b06bff;
}
.boss-alert[hidden] { display: none; }
.boss-alert.k-purge { --ba: 53, 230, 255; --ba-soft: #7af3ff; }   /* 淨化:己方青 */
.boss-alert.k-rage  { --ba: 255, 122, 61; --ba-soft: #ffd666; }   /* 狂暴:警告橘 */
.boss-alert .ba-band {
  position: relative; padding: 12px 0 10px;
  border-top: 2px solid rgb(var(--ba)); border-bottom: 2px solid rgb(var(--ba));
  background:
    repeating-linear-gradient(-45deg, rgba(var(--ba), .22) 0 10px, transparent 10px 22px),
    linear-gradient(90deg, transparent 0%, rgba(var(--ba), .30) 22%,
      rgba(var(--ba), .46) 50%, rgba(var(--ba), .30) 78%, transparent 100%);
  box-shadow: 0 0 26px rgba(var(--ba), .55);
  /* 🔴 拉開的是【帶子】,字另外淡入 —— 字跟著 scaleX 會被拉扁 */
  transform-origin: 50% 50%;
  animation: baBand .34s cubic-bezier(.16, .9, .3, 1) both;
}
.boss-alert b {
  display: block; font-size: 28px; letter-spacing: 5px; color: #fff;
  text-shadow: 0 0 18px rgba(var(--ba), .9), 0 2px 6px #000;
  animation: baText .3s ease-out .18s both;
}
.boss-alert small {
  display: block; margin-top: 5px; font-size: 12px; color: var(--ba-soft); letter-spacing: 2px;
  animation: baText .3s ease-out .26s both;
}
@keyframes baBand {
  from { transform: scaleX(.06); opacity: 0; }
  60%  { transform: scaleX(1.02); opacity: 1; }
  to   { transform: scaleX(1); opacity: 1; }
}
@keyframes baText {
  from { opacity: 0; transform: scale(1.25); filter: blur(4px); }
  to   { opacity: 1; transform: scale(1); filter: none; }
}
/* 矮螢幕:帶子壓扁一點,不要蓋住玩家 */
@media (max-height: 640px) {
  .boss-alert { top: 28%; }
  .boss-alert .ba-band { padding: 8px 0 7px; }
  .boss-alert b { font-size: 20px; letter-spacing: 3px; }
}
.slots { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; align-items: center; }
.boss-alert.k-variant { top:84px; left:12px; right:12px; text-align:left; }
.boss-alert.k-variant .ba-band { padding:8px 12px; border-color:var(--violet); background:var(--panel); box-shadow:none; }
.boss-alert.k-variant b { font-size:var(--fs-title); letter-spacing:0; line-height:1.5; text-shadow:none; }
.boss-alert.k-variant small:empty { display:none; }
.slots .sl {
  display: inline-flex; align-items: center; gap: 2px;
  background: rgba(10,16,30,.72); border: 1px solid var(--line);
  border-radius: 8px; padding: 2px 6px; font-size: 12px;
}
.slots .sl i { font-style: normal; font-size: 10px; color: var(--gold); }
.slots .sl.attr i { color: var(--ally-soft); }
.slots .sep { font-size: 10px; color: var(--dim); margin: 0 4px; }

/* 虛擬搖桿 */
.stick {
  position: fixed; width: 104px; height: 104px; margin: -52px 0 0 -52px;
  border-radius: 50%; border: 2px solid rgba(122,243,255,.35); background: rgba(53,230,255,.06);
  pointer-events: none;
}
.stick i {
  position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background: rgba(53,230,255,.35); border: 2px solid rgba(122,243,255,.8);
}

/* ===== overlay 共用 ===== */
.overlay {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6, 10, 20, .82); backdrop-filter: blur(5px);
  padding: 16px; overflow: auto;
}
.overlay[hidden] { display: none; }
.panel {
  width: 100%; max-width: 460px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 20px 18px 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.panel h1 {
  margin: 0; font-size: 28px; text-align: center; letter-spacing: 2px;
  background: linear-gradient(90deg, var(--ally), var(--enemy-soft));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.panel h2 { margin: 0 0 14px; font-size: 20px; text-align: center; }
.panel .sub { margin: 6px 0 16px; text-align: center; color: var(--dim); font-size: 12px; letter-spacing: 2px; }
.panel h3 { margin: 14px 0 8px; font-size: 12px; color: var(--ally-soft); font-weight: 600; }
.panel h3 small { color: var(--dim); font-weight: 400; margin-left: 6px; font-size: 12px; }

/* 🔽 v2.21:裝備頁的「查資料」區塊改成收合(總加成 / 材料 / 寶石)。
   🔴 summary 長得跟 h3 一樣 —— 玩家看到的還是同一排標題,只是預設不展開。 */
.gsec { margin: 14px 0 8px; }
.gsec > summary {
  list-style: none; cursor: pointer; user-select: none;
  font-size: 12px; color: var(--ally-soft); font-weight: 600;
  display: flex; align-items: center; gap: 6px; padding: 4px 0;
}
.gsec > summary::-webkit-details-marker { display: none; }
.gsec > summary::before { content: '▸'; color: var(--dim); font-size: 12px; }
.gsec[open] > summary::before { content: '▾'; }
/* 🔴 標題本身不准斷行 —— 窄畫面(360px)時「材料」會被拆成「材 / 料」兩行,
   因為 flex 子項預設可以縮到比內容還窄。標題 nowrap、說明那半才是可以縮的那一半。 */
.gsec > summary { flex-wrap: wrap; }
.gsec > summary > span:first-of-type, .gsec > summary { white-space: nowrap; }
.gsec > summary small {
  color: var(--dim); font-weight: 400; font-size: var(--fs-caption);
  white-space: normal; min-width: 0; flex: 1 1 auto;
}
.gemops { display: flex; gap: 6px; margin: 2px 0 8px; }

/* 👉 下一步建議:一次只講一件事 —— 左邊是原因,右邊是「按下去會發生什麼」 */
/* 🔴 用 hidden 切換 + CSS 指定了 display → 一定要補這條(見上面 .reward[hidden] 的註解) */
.gnext[hidden] { display: none; }
/* Full-outfit upgrades are actionable only when they increase actual power. */
#btnAutoEquip[hidden], #rEquip[hidden] { display: none; }
.gnext {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(53,230,255,.12), color-mix(in srgb, var(--violet) 20%, transparent));
  border: 1px solid rgba(53,230,255,.35); border-radius: 12px;
  padding: 8px 10px; margin: 8px 0 4px;
}
.gnext-t { font-size: 12px; color: var(--txt); }
.gnext .mini { flex: 0 0 auto; }
/* v2.91:這件事的按鈕就在正上方那排 —— 這裡只指路,不再放第二顆一樣的按鈕 */
.gnext-up { flex: 0 0 auto; font-size: 10px; color: var(--ally-soft); white-space: nowrap; }

.picks { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.picks.small { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.pk {
  display: flex; flex-direction: column; gap: 2px; text-align: left; min-width: 0;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 9px 10px; font: inherit; cursor: pointer;
}
.pk b { font-size: 12px; }
.pk small { font-size: 10px; color: var(--dim); line-height: 1.4; }
.pk em { font-size: 10px; color: var(--gold); font-style: normal; }
.pk.on { background: rgba(53,230,255,.14); border-color: var(--ally); box-shadow: 0 0 0 1px var(--ally) inset; }

.primary {
  width: 100%; margin-top: 16px; padding: 13px; border: 0; border-radius: 12px;
  background: linear-gradient(90deg, var(--ally), var(--cyan2)); color: var(--bg);
  font: 700 16px/1 inherit; letter-spacing: 2px; cursor: pointer;
}
.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--dim);
  border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
/* ===== 技能樹(Phase 7)===== */
.btnrow { display: flex; gap: 8px; margin-top: 8px; }
.btnrow .secondary, .btnrow .primary { margin-top: 0; }
.dot {
  font-style: normal; font-size: 10px; background: var(--bad); color: #fff;
  border-radius: 999px; padding: 1px 6px; margin-left: 4px; vertical-align: middle;
}
/* 🔴 T10:面板本身變成【上下三段】—— 抬頭與底部固定,只有樹的部分會捲。
   本來整張面板一起捲,底部那顆「當前可執行的升級」會被捲出畫面。 */
.skillpanel {
  max-width: 900px; max-height: calc(var(--vh-avail) * .92);
  display: flex; flex-direction: column; overflow: hidden;
  padding-bottom: 0;
}
.k-head { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-bottom: 8px; }
.k-head .xbtn { font-size: var(--fs-heading); line-height: 1; }
.k-title { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.k-title b { font-size: var(--fs-heading); }
.k-title i { font-style: normal; font-size: var(--fs-caption); color: var(--muted); }

/* ⋯ 選單:♻️ 洗點與那段規則說明都收在這裡 */
.kmenu { position: relative; flex: 0 0 auto; }
.kmenu > summary {
  list-style: none; cursor: pointer; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); border-radius: var(--r-ctl);
  color: var(--muted); letter-spacing: 2px;
}
.kmenu > summary::-webkit-details-marker { display: none; }
.kmenu-body {
  position: absolute; right: 0; top: 34px; z-index: 3; width: 240px; max-width: 78vw;
  background: var(--panel-flat); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.kmenu-body .mini { width: 100%; min-height: 44px; }
.kmenu-body .hint { margin: 8px 0 0; text-align: left; }

/* 可用技能點 */
.kpts {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto; margin-bottom: 8px;
  font-size: var(--fs-body);
}
.kp-k { color: var(--muted); }
.kp-v {
  margin-left: auto; color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(255,214,102,.12); border: 1px solid rgba(255,214,102,.45);
  border-radius: var(--r-pill); padding: 3px 10px;
}

/* 三系的分頁 —— 同時是「每一系投了幾點」的總表 */
.ktabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  flex: 0 0 auto; margin-bottom: 8px;
}
.ktab {
  min-width: 0; min-height: 44px; display: flex; flex-direction: column; gap: 1px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted);
  border-radius: var(--r-ctl); padding: 6px 4px; font: inherit; cursor: pointer;
}
.ktab b { font-size: var(--fs-caption); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ktab i { font-style: normal; font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
/* 🔴 選中的用【該系自己的顏色】填色 —— 三系本來就各有一個色,用它當選取訊號
   比再發明一個顏色好:玩家在節點卡上看到的也是同一個色。 */
.ktab.on {
  color: var(--ink); border-color: var(--tc);
  background: color-mix(in srgb, var(--tc) 18%, transparent);
}
.ktab.on i { color: var(--tc); }

/* 樹:只有這一段會捲 */
.ktrees { flex: 1 1 auto; min-height: 0; overflow: auto; display: block; }
.ktree { min-width: 0; }
/* 🔴 手機一次只看一棵 —— 用 CSS 切,不用 JS 判斷寬度
   (JS 判寬度就得自己補 resize 監聽,而且一定會忘) */
.ktree:not(.on) { display: none; }
/* 🔴 2026-09-04:寬畫面本來是【三棵並排】,改成跟手機一樣「一次一棵」。
   使用者回饋:「太大了, 能變成三個TAB嗎」——
   三欄並排時整頁高度是最長那一棵決定的(實測 880px 寬要捲很久),
   而且三欄同時攤開等於**要玩家自己比對三份清單**,那正是分頁要解決的事。
   💡 分頁本來就在(.ktabs 在所有寬度都顯示),所以這裡只是把
   「寬畫面額外攤開」那個例外拿掉 —— 一種版面走到底,不是兩種。 */
@media (min-width: 720px) {
  /* 單獨一棵在寬螢幕上會被拉得很長 —— 夾住寬度並置中,行長才不會超過可讀範圍 */
  /* 🔴 要 `width: 100%` —— 父層是 column flex 且沒有 stretch,
     只寫 max-width 的話這一欄會縮成內容寬(實測 880px 畫面下只有 236px,
     而且看起來是偏左的,不是置中)。 */
  .ktrees { width: 100%; max-width: 560px; margin: 0 auto; }
  .ktree {
    background: rgba(255,255,255,.035); border: 1px solid var(--line);
    border-radius: var(--r-card); padding: 10px 8px;
  }
}

/* 底部固定區:只有一顆 */
.k-foot {
  flex: 0 0 auto; padding: 10px 0 calc(env(safe-area-inset-bottom) + 12px);
  border-top: 1px solid var(--line); background: var(--panel-flat);
}
.k-foot .primary { margin-top: 0; }
.k-sub { display: block; font-style: normal; font-size: var(--fs-caption); font-weight: 500; opacity: .8; margin-top: 2px; }
/* 🔴 T10:.kt-head / .kt-spent / .kt-desc 隨著樹的標題列一起移除了 ——
   「哪一系、投了幾點」現在寫在分頁上(.ktab),系的說明改成分頁的 title。
   💡 移版面就把它的 CSS 一起移掉,留著會讓下一個人以為那個結構還在。 */
.kt-tier { display: flex; flex-direction: column; gap: 5px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed rgba(255,255,255,.07); }
.kt-tier:last-child { border-bottom: 0; }
.knode {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 6px; text-align: left;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 6px 8px; font: inherit; cursor: pointer;
}
.knode { grid-template-columns: auto minmax(0, 1fr) auto; }
/* 🔴 T10:四個子項的位置【全部明確指定】。
   本來只有 .kn-gain 寫了 grid-column,其餘靠自動排版 —— 結果 .kn-rank 因為 span 2 列
   被塞到第 2 欄,名字被擠到最右邊(icon | 0/5 | 火力訓練)。
   💡 grid 裡只要有一個子項跨列,其餘的自動位置就很難用眼睛推;要嘛全寫、要嘛都不寫。 */
.knode .kn-ico { grid-column: 1; grid-row: 1 / span 2; align-self: center; width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center; font-size: 15px; }
.knode .kn-name { grid-column: 2; grid-row: 1; font-size: var(--fs-body); min-width: 0; text-align: left; }
.knode .kn-gain { grid-column: 2; grid-row: 2; font-size: var(--fs-caption); color: var(--muted); min-width: 0; text-align: left; }
.knode .kn-rank { grid-column: 3; grid-row: 1 / span 2; align-self: center; text-align: right;
  font-size: var(--fs-body); color: var(--gold); font-variant-numeric: tabular-nums; }
.knode.on { border-color: var(--tc); background: color-mix(in srgb, var(--tc) 28%, transparent); }
.knode.full { border-color: var(--ok); background: rgba(77,240,169,.10); }
.knode.full .kn-rank { color: var(--ok); }
.knode.lock { opacity: .42; cursor: not-allowed; }
.knode.lock .kn-rank { color: var(--dim); }
.knode.ult { border-color: var(--gold); background: rgba(255,214,102,.08); }
.knode.ult .kn-name { color: var(--gold); }
.knode:disabled { cursor: default; }
@media (max-width: 620px) { .skillpanel { max-width: 460px; } }

/* ===== 裝備頁(Phase 6)===== */
.secondary {
  width: 100%; margin-top: 8px; padding: 11px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.05); color: var(--txt); font: 600 14px/1 inherit; cursor: pointer;
}
.gearpanel { max-width: 560px; max-height: 92vh; overflow: auto; }
.gslots { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.gslot { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 8px; font-size: 12px; min-width: 0; }
.gs-head { display: flex; justify-content: space-between; gap: 4px; color: var(--dim); margin-bottom: 5px; }
.gs-stat { color: var(--ally-soft); }
.gs-item { border: 1px solid var(--line); border-radius: 8px; padding: 6px; margin-bottom: 5px; line-height: 1.7; }
.gs-item b { font-size: 12px; }
.gs-star { color: var(--gold); margin-left: 4px; }
.gs-val { float: right; color: var(--ally-soft); font-weight: 600; }
.gs-w { display: block; color: var(--dim); font-size: 10px; }
.gs-aff { display: inline-block; background: rgba(53,230,255,.10); border-radius: 8px; padding: 0 4px; margin: 1px 2px 0 0; font-size: 10px; }
.gs-enh { display: flex; align-items: center; justify-content: space-between; gap: 4px; flex-wrap: wrap; }
.gs-empty { color: var(--dim); text-align: center; padding: 10px 0; }
.gs-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.grade { font-style: normal; font-size: 10px; color: var(--gold); border: 1px solid rgba(255,214,102,.45);
  border-radius: 8px; padding: 0 4px; margin-left: 4px; }

.mini.enh.charging { animation: enhCharge .42s ease-in-out infinite; pointer-events: none; }
.mini.up { border-color: rgba(176,107,255,.55); background: rgba(176,107,255,.16); }
@keyframes enhCharge {
  0%, 100% { box-shadow: 0 0 0 rgba(53,230,255,0); }
  50% { box-shadow: 0 0 12px rgba(53,230,255,.85); transform: scale(1.04); }
}

/* 強化結果的爆字(蓋在畫面正中央,1.5 秒後自己消失) */
.enhfx {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
  z-index: 60; pointer-events: none; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  animation: enhPop .32s cubic-bezier(.2,1.6,.4,1);
}
.enhfx b { font-size: 28px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 2px 12px rgba(0,0,0,.75); }
.enhfx span { font-size: 12px; color: var(--ink); text-shadow: 0 1px 6px rgba(0,0,0,.8); }
.enhfx em { font-style: normal; font-size: 12px; color: var(--gold); margin-top: 3px;
  border: 1px solid rgba(255,214,102,.6); border-radius: 8px; padding: 2px 8px; background: rgba(255,214,102,.12); }
.enhfx.ok b { color: #7af3ff; }
/* 🔴 T14:三段爆字本來是 30 / 36 / 42px —— 收進階梯之後只剩一個 28px,
   「大成功 → 超級大成功」的遞進會消失。差異改用 transform 表達:
   字級階梯管的是【字有多少種尺寸】,而這裡要的是【同一種字的強調程度】。 */
.enhfx.crit b { color: #ffd666; transform: scale(1.2); }
.enhfx.super b { color: color-mix(in srgb, var(--enemy) 45%, #fff); transform: scale(1.45); animation: enhGlow .5s ease-in-out infinite alternate; }
.enhfx.fail b { color: var(--red); }
@keyframes enhPop { from { transform: translate(-50%, -35%) scale(.6); opacity: 0; } }
@keyframes enhGlow { to { text-shadow: 0 0 26px rgba(255,159,240,.95); } }
.shakeS { animation: shakeS .18s; }
.shakeL { animation: shakeL .3s; }
@keyframes shakeS { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes shakeL { 20% { transform: translate(-7px, 2px); } 60% { transform: translate(7px, -2px); } 85% { transform: translateX(-3px); } }
.cap { font-style: normal; color: var(--ok); font-size: 10px; }

.gboost { display: flex; flex-wrap: wrap; gap: 5px; }
.gb { font-size: 12px; color: var(--dim); background: rgba(255,255,255,.04); border-radius: 8px; padding: 3px 7px; }
.gb.on { color: var(--txt); background: rgba(53,230,255,.12); }
.gb b { color: var(--ally-soft); }

.gbagops { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }
.hintline { font-size: 10px; color: var(--dim); }
.gbag { display: flex; flex-direction: column; gap: 6px; max-height: 40vh; overflow: auto; }
.gcard {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-left: 3px solid var(--line); border-radius: 8px; padding: 6px 7px;
}
.gcard.sel { background: rgba(53,230,255,.12); }
.gc-pick input { width: 16px; height: 16px; accent-color: var(--ally); }
.gc-main { flex: 1; min-width: 0; }
.gc-title { font-size: 12px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.gc-star { color: var(--gold); font-size: 10px; }
.gc-val { color: var(--ally-soft); margin-left: auto; }
.gc-sub { font-size: 10px; color: var(--dim); margin-top: 2px; }
.gc-ops { display: flex; flex-direction: column; gap: 3px; }
.mini {
  background: rgba(53,230,255,.16); border: 1px solid rgba(53,230,255,.35); color: var(--txt);
  border-radius: 8px; padding: 3px 7px; font: 500 10.5px/1.4 inherit; cursor: pointer; white-space: nowrap;
}
.mini.ghost { background: transparent; border-color: var(--line); color: var(--dim); }
.mini.off, .mini:disabled { opacity: .4; cursor: not-allowed; }
.pk.dim { opacity: .45; }

.drops { width: 100%; margin-top: 6px; }
.drops h4 { margin: 4px 0; font-size: 12px; color: var(--dim); font-weight: 500; }
.dp { display: inline-block; font-size: 12px; background: rgba(255,255,255,.05); border-radius: 8px; padding: 2px 6px; margin: 2px 3px 0 0; }
/* 🧹 v2.38 掃蕩掉落:品階統計永遠都在,逐件明細收起來 ——
   🔴 版面不可以因為件數多寡而換一種長相(使用者:「第二次掃的畫面變少很多」)。 */
.dp.more { color: var(--dim); background: none; }
.dpmore { margin-top: 6px; }
.dpmore > summary {
  cursor: pointer; font-size: 10px; color: var(--dim); list-style: none;
  padding: 3px 0; user-select: none;
}
.dpmore > summary::-webkit-details-marker { display: none; }
.dpmore > summary::before { content: '▸ '; }
.dpmore[open] > summary::before { content: '▾ '; }
.dplist { max-height: 148px; overflow: auto; }

.toast {
  position: fixed; left: 50%; bottom: 18%; transform: translateX(-50%) translateY(8px);
  background: rgba(10,16,30,.94); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 9px 16px; font-size: 12px; z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 主選單的帳號列(Phase 5) */
.mebar {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; font-size: 12px; color: var(--dim);
}
.mebar .who { color: var(--txt); }
.mebar .lv { color: var(--ally-soft); }
.mebar .lv i { font-style: normal; font-size: 10px; color: var(--dim); margin-left: 4px; }
.mebar .gold { color: var(--gold); font-variant-numeric: tabular-nums; }
.mebar .off { color: var(--warn); }

/* 結算的獎勵列 */
.reward { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 2px 0 12px; }
/* 🔴 只要 CSS 給了 display,HTML 的 hidden 屬性就【失效】——
   `[hidden] { display: none }` 是瀏覽器預設樣式,而作者樣式一律贏過預設樣式(跟權重無關)。
   所以每個「用 hidden 屬性切換 + 又被 CSS 指定 display」的元素,都要自己補一條 [hidden]。
   漏掉的下場:JS 明明設了 hidden,畫面上還是留著一個空盒子(結算 / 掃蕩 / 訊號的獎勵列都吃過)。 */
.reward[hidden] { display: none; }
.reward .gain {
  display: flex; align-items: baseline; gap: 5px;
  background: rgba(255,214,102,.10); border: 1px solid rgba(255,214,102,.28);
  border-radius: 12px; padding: 7px 12px; font-size: 12px;
}
.reward .gain b { font-size: 15px; color: var(--gold); font-variant-numeric: tabular-nums; }
/* 🔴 T6:這一屏唯一的 28px —— 打完一場最想知道的是「我拿到什麼」。
   🔴 顏色用暖金是【對的】(跟 T4 的星區名不同):它是貨幣,正好是 --gold 的職責。
   整列獨佔一行,不跟其他 gain 擠在同一排。 */
.reward .gain.hero { flex: 1 1 100%; padding: 12px 14px; }
.reward .gain.hero b { font-size: var(--fs-display); line-height: 1.15; }
.reward .gain.hero small { font-size: var(--fs-body); }
.reward .gain small { font-size: 10px; color: var(--dim); }
.reward .gain.up { background: color-mix(in srgb, var(--up) 10%, transparent); border-color: color-mix(in srgb, var(--up) 30%, transparent); }
.reward .gain.up b { color: var(--up); }
.reward .gain.warn { background: rgba(255,200,87,.08); border-color: rgba(255,200,87,.3); }
.reward .pending { font-size: 12px; color: var(--dim); }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 12px; color: var(--dim); }
.hint { margin: 12px 0 0; font-size: 12px; color: var(--dim); line-height: 1.6; text-align: center; }
.plink { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ===== 三選一 ===== */
.cardpanel { max-width: 420px; }
#btnCardReroll { min-height: 44px; }
#btnCardReroll:not(:disabled) { color: var(--cyan); border-color: var(--cyan); }
#btnCardReroll:disabled { opacity: .4; cursor: not-allowed; }
/* 🔴 T6:三張【並排】而不是疊成三列。
   窄卡天生逼著文案短 —— 一張 107px 的卡放不下「所有己方彈體 / 領域 / 球體 +15% 體積」,
   只放得下「+15% 體積」,而那正好就是玩家要的那一句。 */
.ch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.ch-head h2 { margin: 0; flex: 1 1 auto; min-width: 0; text-align: left; }
.cardlist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: stretch; }
.card {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
  min-width: 0;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--txt);
  border-radius: var(--r-card); padding: 12px 6px 10px; font: inherit; cursor: pointer;
}
.card:active { background: rgba(53,230,255,.16); }
.card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.card-kind { font-size: var(--fs-caption); color: var(--muted); }
.card.evolve { border-color: var(--violet); }
.card.evolve .card-kind { color: var(--violet); }
/* 🔴 這是 emoji 當卡面圖(T13 要換成 <img>)—— 尺寸先用 40px 佔好位置,
   換圖之後版面不會跳。 */
.card .ci { font-size: 28px; height: 40px; line-height: 40px; }
.card .cb { width: 100%; min-width: 0; }
.card .cb b { display: block; font-size: var(--fs-body); line-height: 1.35; }
/* One complete effect description; no separate detail mode. */
.card .cg {
  font-size: var(--fs-caption); color: var(--ink); line-height: 1.5; margin-top: 3px;
  white-space: normal; overflow-wrap: anywhere; min-height: 3em;
}
.card .cp { font-size: var(--fs-caption); color: var(--gold); margin-top: 4px; }
.card-ranks { display: flex; justify-content: center; gap: 4px; margin-top: 8px; }
.card-ranks i { width: 8px; height: 4px; border-radius: var(--r-pill); border: 1px solid var(--line); }
.card-ranks i.owned { background: var(--muted); border-color: var(--muted); }
.card-ranks i.next { background: var(--gold); border-color: var(--gold); }
.card .new {
  display: inline-block; font-style: normal; font-size: 10px; color: var(--bg);
  background: var(--ok); border-radius: var(--r-ctl); padding: 0 4px; margin-left: 4px;
}

#firstClearReward { z-index: 80; }
.first-clear-panel { max-width: 420px; text-align: center; }
.first-clear-amount { margin: var(--sp-6) 0; font-size: var(--fs-display); color: var(--gold); }
#btnFirstClearConfirm { min-height: 44px; }

/* ===== 結算 ===== */
#result > .panel { max-height: calc(var(--vh-avail) - 32px); overflow: auto; }
.result-advice { margin: 12px 0; font-size: var(--fs-body); line-height: 1.5; color: var(--muted); text-align: center; }
.result-actions { position: sticky; bottom: -18px; padding: 12px 0; background: var(--panel-flat); z-index: 1; }
.result-actions button { min-width: 0; min-height: 44px; }
.stats { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 6px 0 14px; }
.stats div { min-width: 76px; text-align: center; background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px 8px; }
.stats b { display: block; font-size: 20px; color: var(--ally-soft); font-variant-numeric: tabular-nums; }
.stats small { font-size: 10px; color: var(--dim); }
/* 🔴 T6:Build 與格數預設收合 —— 它不影響「要不要再來一場」這個決定。 */
.rdet { margin-top: 10px; }
.rdet > summary {
  cursor: pointer; list-style: none; text-align: center;
  font-size: var(--fs-caption); color: var(--muted); padding: 6px 0;
}
.rdet > summary::-webkit-details-marker { display: none; }
.rdet > summary::after { content: ' \25BE'; }
.rdet[open] > summary::after { content: ' \25B4'; }

/* 結算的 build:左武器 / 右屬性,標題帶已用格數 */
.build2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-top: 4px; }
.build2 .col { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 8px; min-width: 0; }
.build2 h4 {
  margin: 0 0 8px; font-size: 12px; color: var(--ally-soft); font-weight: 600;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.build2 .cap {
  font-size: 12px; color: var(--dim); font-weight: 500;
  background: rgba(0,0,0,.3); border-radius: 999px; padding: 1px 7px; font-variant-numeric: tabular-nums;
}
.bl {
  display: flex; align-items: center; gap: 6px; padding: 5px 4px;
  border-bottom: 1px dashed rgba(255,255,255,.07); font-size: 12px;
}
.bl:last-child { border-bottom: 0; }
.bl .bi { font-size: 15px; width: 20px; text-align: center; flex: 0 0 auto; }
.bl .bn { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bl .bs { font-size: 12px; color: var(--gold); flex: 0 0 auto; }
.bl.red { background: rgba(255,62,165,.10); border-radius: 8px; }
.bl.red .bs { color: var(--enemy); font-size: 10px; }
.bl.full .bs { color: var(--ok); }
.bl.empty { color: var(--dim); justify-content: center; }
.tagm {
  font-style: normal; font-size: 10px; color: var(--bg); background: var(--ally-soft);
  border-radius: 999px; padding: 0 4px; margin-left: 4px; vertical-align: middle;
}
/* 🔧 v2.28:開場星級(模組品階給的)—— 出擊面板 / 模組卡片 / 裝備視窗共用同一個樣子,
   玩家在三個地方看到的是同一個東西。金色 = 「這是你帶進場的戰力」 */
.mstar { color: var(--gold); letter-spacing: 1px; }
.mstar .dim { font-style: normal; color: var(--dim); font-size: 10px; letter-spacing: 0; margin-left: 6px; }
.pk.mod small b.mstar { font-size: 12px; }
/* 手機也維持「左武器 / 右屬性」兩欄(使用者要求),只縮字級 + 名稱省略號;
   極窄畫面(< 360px)才退成單欄 */
@media (max-width: 460px) {
  .build2 { gap: 8px; }
  .build2 .col { padding: 8px 8px 6px; }
  .bl { font-size: 12px; gap: 4px; padding: 4px 2px; }
  .bl .bi { font-size: 12px; width: 16px; }
  .bl .bs { font-size: 10px; }
  .bl.red .bs { font-size: 10px; }
}
@media (max-width: 360px) { .build2 { grid-template-columns: minmax(0, 1fr); } }

/* ===== Phase 9b:設定頁 / 帳號 / 版本提示 / 直向鎖定 ===== */
/* 🔴 T12「一行一設定」:圖示 + 標籤 + ⓘ + 控制項。
   說明一律收進 ⓘ(.infobox,按了才出現);唯一常駐的例外是「會扣錢 / 不可逆」那一句。 */
.setrow {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 10px; margin-bottom: 6px; font-size: var(--fs-body); min-height: 52px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: var(--r-ctl);
}
.setrow .si { flex: 0 0 auto; width: 20px; text-align: center; }
/* 沒有圖示的那一列(例如不可逆警告)也要佔同樣的寬度,不然標籤會左右跳 */
.setrow .si.warnmark::before { content: '!'; color: var(--red); font-weight: 700; }
.setrow .sl { flex: 1 1 auto; min-width: 0; }
.setrow small { color: var(--muted); font-size: var(--fs-caption); margin-left: 4px; }
.setrow .mini { flex: 0 0 auto; min-width: 62px; min-height: 32px; text-align: center; }
/* ⓘ:44px 觸控目標;展開時亮起來,玩家才知道下面那行是它開出來的 */
/* 🔴 44×44:規格的觸控目標下限。ⓘ 不是破壞性動作,但「按不準的說明鈕」等於沒有說明 ——
   玩家連續戳兩次沒反應就不會再試第三次了。 */
.infobtn {
  flex: 0 0 auto; width: 44px; min-height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-ctl);
  color: var(--muted); font: var(--fs-body)/1 inherit; cursor: pointer;
}
.infobtn.on { color: var(--cyan); border-color: var(--cyan); }
/* 🔴 不可逆那一列是唯一常駐的警告 —— 用紅框標出來,它不是一般設定 */
.setrow.warn { border-color: rgba(255,101,126,.5); background: rgba(255,101,126,.08); }
.setrow.warn .sl { color: var(--red); }

.infobox {
  margin: -2px 0 8px; padding: 8px 12px;
  font-size: var(--fs-caption); color: var(--muted); line-height: 1.65;
  background: rgba(0,0,0,.24); border-radius: var(--r-ctl);
}
.infobox[hidden] { display: none; }
.infobox b { color: var(--ink); }
/* 角色卡的經驗那一行是【數字】不是說明(T12 把它從 <small> 換成 span) */
.mc-xp { font-size: var(--fs-caption); color: var(--muted); }

.accform { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.accform input {
  flex: 1 1 46%; min-width: 0; background: rgba(0,0,0,.35); color: var(--txt);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 12px;
}
.accform input:focus { outline: none; border-color: var(--ally); }
.accform .mini { flex: 0 0 auto; padding: 8px 12px; }
.acc-warn { text-align: left; color: var(--dim); }
.acc-warn b { color: var(--txt); }
.accsw { margin-top: 8px; }
.accsw summary { font-size: 12px; color: var(--dim); cursor: pointer; }
.accsw .hint { text-align: left; }

/* 🗑️ v2.86:刪除帳號的危險區。
   🔴 它跟「登入 / 綁定」不可以長得一樣 —— 那兩個做錯了可以重來,這一個不行。
   收在 <details> 裡(要自己展開)+ 紅字 summary + 常駐那一句不可逆的說明。 */
.accsw.dz { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.accsw.dz summary { color: var(--red); }
.accsw.dz .infobox { margin-top: 6px; }
.mini.danger {
  border-color: color-mix(in srgb, var(--red) 55%, transparent);
  background: color-mix(in srgb, var(--red) 16%, transparent);
  color: var(--red);
}

/* 有新版本的浮動提示條(戰鬥中不出現) */
.verbar {
  position: fixed; left: 50%; top: 10px; transform: translateX(-50%); z-index: 40;
  background: rgba(10,16,30,.95); border: 1px solid rgba(255,214,102,.5); color: var(--txt);
  border-radius: 999px; padding: 7px 14px; font-size: 12px; display: flex; align-items: center; gap: 6px;
}
.verbar[hidden] { display: none; }
.verbar b { color: var(--gold); }

/* 🔴 手機橫向擋一層(iOS Safari 沒有 orientation lock API) */
/* 🔴 純 CSS 判斷(不靠 JS 事件):手機橫向 = landscape + 高度 < 500px;桌機不擋 */
.rotate {
  position: fixed; inset: 0; z-index: 80; background: var(--bg);
  display: none; align-items: center; justify-content: center; text-align: center;
}
@media (orientation: landscape) and (max-height: 500px) {
  .rotate { display: flex; }
}
.rotate span { font-size: 46px; display: block; animation: rot 2s ease-in-out infinite; }
.rotate p { margin: 12px 0 0; font-size: 15px; color: var(--dim); letter-spacing: 2px; }
@keyframes rot { 50% { transform: rotate(-90deg); } }

/* ===== Phase 9:星區地圖(5 星區 × 8 關)===== */
/* 🗺️ v2.21:星區切換改成【地圖兩側的 ‹ ›】+ 底下一排圓點。
   舊的 .sectors / .sec 橫列已移除 —— 六顆並排的按鈕在手機上每顆只有 50px,
   字被截、圖也小,而且它跟中央那張大圖講的是同一件事(重複佔位)。 */
.secdots { display: flex; justify-content: center; gap: 7px; padding: 2px 0; }
.sdot {
  width: 26px; height: 26px; border-radius: 50%; padding: 0;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--dim);
  font: 600 12px/1 inherit; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.sdot.on { background: rgba(53,230,255,.16); border-color: var(--ally); color: var(--txt); }
.sdot.lock { opacity: .5; font-size: 12px; }

/* ‹ › 切星區:壓在大圖兩側(不佔版面高度)。🔴 尺寸要夠大 —— 手機拇指點得到。
   🔴 class 叫 `sec-arrow` 不叫 `lb-nav` —— **`.lb-nav` 早就是大廳底部那排 4 欄導覽列**
   (寶箱 / 裝備 / 出擊 / 技能),而且它寫在這條後面 → 後者勝出,箭頭會被撐成兩條全寬的橫帶。
   2026-08-20 線上就是長這樣。新增 class 前先 grep 一次,縮寫特別容易撞。 */
.lb-main { position: relative; }
.sec-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 40px; height: 64px; border-radius: 12px; padding: 0;
  background: rgba(10,14,26,.55); border: 1px solid var(--line); color: var(--txt);
  /* 🔴 T4:原本 30px —— 比 28px 的星區名還大,等於畫面上最大的字是兩個箭頭。
     縮到 20px(階梯上的 heading);按鈕本體 40×64 沒動,觸控目標照樣夠大。 */
  font: 300 var(--fs-heading)/1 inherit; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
.sec-arrow:disabled { opacity: .25; cursor: default; }
.sec-arrow.prev { left: 2px; }
.sec-arrow.next { right: 2px; }
@media (max-width: 380px) { .sec-arrow { width: 34px; height: 54px; } }

.sectors { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 5px; }
.sec {
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 7px 2px 5px; font: inherit; cursor: pointer; min-width: 0;
}
.sec .si { font-size: 15px; line-height: 1.1; }
.sec b { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.sec em { font-style: normal; font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.sec.on { background: rgba(53,230,255,.14); border-color: var(--ally); box-shadow: 0 0 0 1px var(--ally) inset; }
.sec.lock { opacity: .42; }

.secinfo { margin: 8px 0 2px; }
.secinfo .sd { margin: 0 0 6px; font-size: 12px; color: var(--dim); line-height: 1.6; }
.stags { display: flex; flex-wrap: wrap; gap: 5px; }
.stag {
  font-size: 10px; color: var(--dim); background: rgba(255,255,255,.05);
  border: 1px dashed var(--line); border-radius: 999px; padding: 2px 9px;
}
.stag.got { color: var(--ok); border-style: solid; border-color: rgba(77,240,169,.35); background: rgba(77,240,169,.08); }

.mission-brief { padding: 12px; margin: 8px 0 12px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel2); }
.mission-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mission-heading b { min-width: 0; font-size: var(--fs-heading); overflow-wrap: anywhere; }
.mission-heading span { flex-shrink: 0; font-size: var(--fs-caption); color: var(--muted); }
.mission-brief p { margin: 8px 0; font-size: var(--fs-body); line-height: 1.5; }
.mission-brief > small { font-size: var(--fs-caption); color: var(--gold); }
.mission-route { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mission-route li { min-width: 0; font-size: var(--fs-caption); color: var(--muted); border-top: 2px solid var(--line); padding-top: 8px; }
.mission-dossier { margin: 8px 0 12px; }
.mission-dossier summary { color: var(--cyan); font-size: var(--fs-body); cursor: pointer; min-height: 44px; display: flex; align-items: center; gap: 8px; }
.mission-dossier summary::before { content: '+'; }
.mission-dossier[open] summary::before { content: '−'; }
.mission-dossier summary:focus-visible, .stg:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.stagegrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stg {
  display: flex; flex-direction: column; gap: 1px; text-align: left; position: relative; min-width: 0;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 7px 8px; font: inherit; cursor: pointer; min-width: 0;
}
.stg .sn { font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.stg b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stg small { font-size: 10px; color: var(--dim); line-height: 1.35; }
.stg em { font-style: normal; font-size: 10px; color: var(--gold); margin-top: 2px; }
.stg em.short { color: var(--bad); }
.stg.on { background: rgba(53,230,255,.14); border-color: var(--ally); box-shadow: 0 0 0 1px var(--ally) inset; }
.stg.lock { opacity: .65; }
.stg.boss { border-color: rgba(255,62,165,.42); background: rgba(255,62,165,.07); }
.stg.boss.on { background: rgba(255,62,165,.18); border-color: var(--enemy); box-shadow: 0 0 0 1px var(--enemy) inset; }
.pk.lock { opacity: .45; }
.primary:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.reward .gain.boss { background: rgba(255,62,165,.12); border-color: rgba(255,62,165,.35); }
.reward .gain.boss b { color: var(--enemy-soft); font-size: 15px; }
/* 系統還沒解鎖時的提示條(章節推進 = 系統解鎖) */
.lockbar {
  font-size: 12px; color: var(--dim); background: rgba(255,200,87,.08);
  border: 1px solid rgba(255,200,87,.28); border-radius: 8px; padding: 6px 9px; margin: 4px 0;
}
@media (max-width: 420px) {
  .sectors { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ===== Phase 6b:寶石(孔位 / 打造 / 背包)===== */
.sockets { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; align-items: center; }
.sk {
  width: 26px; height: 26px; border-radius: 8px; padding: 0;
  background: rgba(255,255,255,.05); border: 1px dashed var(--line); color: var(--dim);
  font: 12px/1 inherit; cursor: pointer; position: relative;
}
.sk.on { background: rgba(180,120,255,.16); border-style: solid; border-color: var(--enemy-soft); color: var(--txt); }
.sk.on i { position: absolute; right: -2px; bottom: -3px; font-style: normal; font-size: 10px; color: var(--gold); }
.sk.ready { border-color: var(--ok); color: var(--ok); animation: skpulse 1.1s ease-in-out infinite; }
.sk.none { border: 0; color: var(--dim); font-size: 10px; padding: 0; width: auto; height: auto; cursor: default; }
@keyframes skpulse { 50% { background: rgba(77,240,169,.18); } }

.gemcraft { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.gemc {
  display: flex; flex-direction: column; gap: 1px; text-align: left; min-width: 0;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 6px 8px; font: inherit; cursor: pointer;
}
.gemc .gi { font-size: 15px; }
.gemc b { font-size: 12px; }
.gemc small { font-size: 10px; color: var(--dim); }
.gemc em { font-style: normal; font-size: 10px; color: var(--ally-soft); }
.gemc:disabled { opacity: .4; cursor: not-allowed; }

.gembag { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; max-height: 30vh; overflow: auto; }
.gemrow {
  display: flex; align-items: center; gap: 6px; font-size: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px;
}
.gemrow.sel { border-color: var(--ok); background: rgba(77,240,169,.10); }
.gemrow .gi { font-size: 15px; }
.gemrow .gn { flex: 1; min-width: 0; }
.gemrow .gn em { font-style: normal; color: var(--gold); font-size: 10px; }
.gemrow .gv { color: var(--ally-soft); }
.gemrow .gq { color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---- 💎 選寶石鑲進這個孔(第三層;v2.27 取代裝備頁上的「寶石」整段)----
   🔴 z-index 要比 #item(30)高、比 #ask(50)低 —— 它是從單件裝備視窗點出來的。 */
#gempick { z-index: 40; }
.gempickpanel { max-width: 420px; max-height: 90vh; overflow: auto; }
.gemline { display: flex; align-items: center; gap: 6px; }
.gemline .mini { flex: 0 0 auto; }
/* 整列就是按鈕 —— 手機上「點那顆小小的鑲嵌鈕」跟「點這一列」是兩種難度 */
button.gemrow { flex: 1; min-width: 0; text-align: left; color: var(--txt); font: 11.5px/1.5 inherit; cursor: pointer; }
button.gemrow:hover, button.gemrow:active { border-color: var(--ok); background: rgba(77,240,169,.10); }
.gemrow .gdo { color: var(--ok); font-size: 10px; white-space: nowrap; }
/* 💎 v2.97:每一列多一行【這顆到底給什麼】—— 詞條早就有這種翻譯(affEffect),
   寶石以前只有乾數字「+2.5%」,玩家看不出值不值得。 */
.gemrow { flex-wrap: wrap; }
.gemrow .geff { flex: 1 0 100%; font-size: 10px; color: var(--dim); }
.gemrow .geff b.warn { color: var(--bad); }
#gpCraftSec { margin-top: 10px; }

/* ===== Phase 8:體力 / 掃蕩 / 離線 / 異常訊號 ===== */
.mebar .sta { color: var(--ok); font-variant-numeric: tabular-nums; }
.mebar .sta b { color: var(--ok); }
.mebar .sta i { font-style: normal; font-size: 10px; color: var(--dim); margin-left: 3px; }
.mebar .mini { margin-left: 2px; }

.pk em.short { color: var(--bad); }
.pk em.ok { font-style: normal; color: var(--ok); font-size: 12px; }
.pk[disabled] { cursor: not-allowed; }
.primary .cst { font-style: normal; font-size: 12px; opacity: .85; margin-left: 4px; }

/* 蟲潮警報券的勾選列(有券才出現) */
.ticketrow {
  display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 10px;
  background: rgba(255,62,165,.10); border: 1px solid rgba(255,62,165,.32); border-radius: 12px;
  font-size: 12px; line-height: 1.5; cursor: pointer;
}
/* 🔴 沒有這一條,「沒有券」的時候整列還是會被畫出來 —— 就是一個只剩勾選框的空盒子
   (使用者兩次回報的「出擊上面的空白區域」都是它;原因見上面 .reward[hidden] 的註解)。 */
.ticketrow[hidden] { display: none; }
.ticketrow input { width: 16px; height: 16px; accent-color: var(--enemy); flex: 0 0 auto; }
.ticketrow b { color: var(--enemy-soft); }
.ticketrow i { font-style: normal; color: var(--dim); }

.ghost.wide { display: block; width: 100%; margin-top: 8px; }

/* 離線報告:🔴 時薪與天花板都要明示,不讓玩家自己猜 */
.ofrate {
  display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 4px 0 12px;
  font-size: 12px; color: var(--dim);
}
.ofrate span { background: rgba(255,255,255,.05); border-radius: 999px; padding: 3px 10px; }
.ofrate b { color: var(--ally-soft); }

/* 異常訊號 */
.sgbody { text-align: center; }
.sgnum { font-size: 28px; letter-spacing: 4px; margin: 4px 0; }
.sgtxt { font-size: 12px; color: var(--dim); }
.sgtxt b { color: var(--gold); font-size: 15px; }
.sgtk {
  margin-top: 8px; font-size: 12px; color: var(--enemy-soft);
  background: rgba(255,62,165,.10); border: 1px solid rgba(255,62,165,.28);
  border-radius: 8px; padding: 6px 8px;
}

@media (min-width: 700px) {
  .hud-bottom { left: 50%; transform: translateX(-50%); max-width: 560px; }
}

/* ================================================================
   v1.2:大廳(第一層)/ 出擊面板(第二層)/ 底部功能列 / 寶箱 / 星等
   🔴 使用者要求的版面:大廳【只有星區】,選項收進第二層;裝備之類固定在下面那一列。
   ================================================================ */

/* ---- 大廳外框:上(資源)· 中(星區)· 下(星區列 + 開始 + 功能列),一屏排完不捲動 ---- */
.lobby {
  position: fixed; inset: 0; z-index: 20;
  display: flex; flex-direction: column; align-items: center;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(53,230,255,.13), transparent 60%),
    radial-gradient(90% 60% at 50% 110%, rgba(176,107,255,.14), transparent 60%),
    var(--bg);
  padding: calc(var(--sat) + 8px) 10px calc(env(safe-area-inset-bottom) + 6px);
  overflow: hidden;
}
.lobby[hidden] { display: none; }

/* 頂部:角色 + 資源 */
.lb-top { width: 100%; max-width: 560px; display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.lb-avatar {
  display: flex; align-items: center; gap: 7px; position: relative;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--txt);
  border-radius: 999px; padding: 4px 12px 4px 5px; font: inherit; cursor: default; min-width: 0;
}
.lb-avatar .av {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(135deg, rgba(53,230,255,.35), rgba(176,107,255,.35));
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.lb-avatar { cursor: pointer; }
.lb-avatar .who { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.lb-avatar .who b { font-size: 12px; max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-avatar .who i { font-style: normal; font-size: 10px; color: var(--ally-soft); flex: 0 0 auto; }
/* 🔴 v2.4:Lv 與經驗條【同一列、各佔各的空間】。
   舊版經驗條是 position:absolute 疊在整顆頭像上,名字一長就直接壓住 Lv
   (使用者回報「LV 和經驗值有點壓到」)。改成 flex 之後兩者不可能重疊。 */
.lb-avatar .lvline { display: flex; align-items: center; gap: 5px; width: 100%; }
.lb-avatar .xp {
  flex: 1 1 auto; min-width: 34px; height: 4px;
  background: rgba(255,255,255,.14); border-radius: 999px; overflow: hidden;
}
.lb-avatar .xp i { display: block; height: 100%; width: 0; background: var(--ok); }

.lb-cur { display: flex; min-width: 0; align-items: center; gap: 5px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }
.lb-cur .cur {
  font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap;
  background: rgba(0,0,0,.35); border: 1px solid var(--line); border-radius: 999px; padding: 4px 9px;
}
.lb-cur .gold { color: var(--gold); }
.lb-cur .core { color: var(--ally-soft); }
.lb-cur .sta { color: var(--ok); cursor: pointer; font-family: inherit; min-height: 44px; text-align: left; }
.lb-cur .sta:hover { border-color: var(--cyan); }
.lb-cur .sta:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.lb-cur .sta b { color: var(--ok); }
.lb-cur .sta i { font-style: normal; font-size: 10px; color: var(--dim); margin-left: 3px; }
.lb-cur .buy { color: var(--enemy-soft); cursor: pointer; font-family: inherit; }
/* 🔴 T4:抬頭只剩「三種主要貨幣 + 一顆 ⋯」。⋯ 走 👤 個人面板(設定 / 帳號 / 版本 / 💎 商店)。
   觸控目標補到 44px —— 它是抬頭唯一的按鈕,不能因為字小就變成一個難點的點。 */
.lb-cur .more {
  color: var(--muted); cursor: pointer; font-family: inherit;
  min-width: 34px; min-height: 28px; letter-spacing: 2px; font-size: var(--fs-body);
}
/* 💎 v2.98 B3:抬頭的商城幣 —— 抬頭唯一一顆「數字本身就是入口」的 chip,
   所以字用青色(規格裡唯一的互動訊號),不用貨幣的暖金;觸控高度對齊 ⋯。 */
.lb-cur .gem { color: var(--cyan); cursor: pointer; font-family: inherit; min-height: 28px; }

/* 中央大卡片 */
.lb-main {
  flex: 1 1 auto; min-height: 0; width: 100%; max-width: 560px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  text-align: center; padding: 6px 4px;
}
/* 🔴 T4:定位(10px)-> 星區名(28px)-> 大圖 -> 進度。
   星區名是【這一屏唯一的 28px】。它回答的問題是「我現在在哪」。
   🔴 顏色刻意不用暖金:規格把 --gold 保留給「重點數值 / 貨幣 / 戰力」,
      而抬頭那顆 🪙 金幣已經是金色 —— 星區名染金會讓兩種語意撞在一起。
      01-lobby.png 的做法也是象牙白,這裡照版面稿。 */
.lb-cap {
  font-size: var(--fs-caption); color: var(--muted);
  letter-spacing: 3px; text-transform: uppercase; font-variant-numeric: tabular-nums;
}
.lb-title { font-size: var(--fs-display); font-weight: 700; letter-spacing: 2px; line-height: 1.2; }
/* 🎚️ v3.69:目前難度膠囊 —— 跟定位(SECTOR 05)同一行,不多佔一列高度。
   描邊不填色:它是狀態不是按鈕(青色實心的注意力預算留給「出擊準備」)。
   底色要半透明深色 —— 有美術時它壓在星區背景上。 */
.lb-capline { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: var(--sp-2); }
.lb-diff {
  display: inline-flex; align-items: center; gap: var(--sp-1);
  padding: 2px 10px 2px 4px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: rgba(6,10,20,.6); color: var(--ink); font-size: var(--fs-body); line-height: 1.4;
}
.lb-diff[hidden] { display: none; }
.lb-diff b { font-weight: 700; letter-spacing: 1px; }
.lb-diff .artimg { width: 20px; height: 20px; }
/* 🔴 2026-09-04 使用者決定:**「發光 / 呼吸的注意力預算只給【可領取】與【可升級】」這條規則拿掉**,
   漂浮動畫加回來(T4 當初就是照那條規則把它移除的)。
   💡 保留的判斷:動態仍然**只放在背景與佈景**(星塵 / 毒氣 / 這張大圖的漂浮),
      **不放在按鈕與數字上** —— 那裡一動,玩家會以為「有東西可以領」。 */
.lb-art {
  font-size: 28px; line-height: 1.1; margin: 2px 0;
  filter: drop-shadow(0 6px 18px rgba(53,230,255,.35));
  animation: lbFloat 5.2s ease-in-out infinite;
}
@keyframes lbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-7px) scale(1.012); }
}
/* 只有出事的時候才出現(離線 / 讀不到星區地圖)—— 常駐是 0 字 */
/* 🔴 要有自己的底 —— 它出現的時候後面通常還壓著星區大圖,
   灰字直接壓在圖上讀不出來(而這一行出現的時機就是「出事了」,更不能看不懂)。 */
.lb-note {
  margin: 0; max-width: 340px; padding: 8px 12px;
  font-size: var(--fs-caption); color: var(--ink); line-height: 1.6;
  background: rgba(6,10,20,.88); border: 1px solid var(--line); border-radius: var(--r-card);
}
.lb-note[hidden] { display: none; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; }
.lb-prog { width: 100%; max-width: 320px; margin-top: 2px; }
.pgbar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.10); overflow: hidden; }
.pgbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ally), var(--ok)); }
.pgtxt { display: block; margin-top: 4px; font-size: 10px; color: var(--dim); }
.pgtxt b { color: var(--txt); }

/* 🔴 T4:大廳那一排 🧹 掃蕩 / 📡 異常訊號的樣式整組移除(.lb-quick / .qbtn)——
   掃蕩在出擊面板頁尾本來就有一顆,訊號移進了巡邏面板。
   💡 移功能的時候,它的 CSS 要一起移掉:留著的話下一個人會以為那個版面還在用。 */
#signalHint, .ndot {
  background: var(--bad); color: #fff; font-size: 10px; line-height: 1;
  border-radius: 999px; padding: 2px 5px; font-style: normal;
}

/* 星區橫列 */
.lobby .sectors { width: 100%; max-width: 560px; flex: 0 0 auto; }

/* 開始遊戲 */
.lb-go {
  width: 100%; max-width: 400px; flex: 0 0 auto; margin: 10px 0 4px;
  padding: 12px; border: 0; border-radius: 8px;
  background: linear-gradient(90deg, var(--ally), var(--cyan2)); color: var(--bg);
  font: 700 17px/1.1 inherit; letter-spacing: 2px; cursor: pointer;
  box-shadow: 0 8px 22px rgba(53,230,255,.28);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.lb-go:disabled { opacity: .45; cursor: not-allowed; filter: grayscale(.5); }
.lb-go .lb-sub { font-style: normal; font-size: var(--fs-caption); font-weight: 500; opacity: .8; letter-spacing: 1px; }
/* 🔴 T4:體力不夠時那個數字直接變紅 —— 「為什麼現在按了會失敗」要看得到。
   底色是青色實心,所以紅字要用深紅 + 淺底,不然在青底上根本讀不出來。 */
.lb-go .lb-sub b { font-weight: 700; }
.lb-go .lb-sub b.short { background: rgba(255,255,255,.6); color: var(--red-ink); border-radius: var(--r-ctl); padding: 0 5px; }


/* 🔴 底部固定功能列 */
.lb-nav {
  width: 100%; max-width: 560px; flex: 0 0 auto;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;  /* v2.4:⚙️ 設定移進個人面板 → 剩四顆 */
  /* v2.28:加了 📅 任務 → 五欄(窄畫面靠縮字級吸收,不換行) */
  background: rgba(10,16,30,.9); border: 1px solid var(--line); border-radius: 12px; padding: 5px;
}
.lb-nav.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* 🔴 T13:導覽的圖示是內嵌 SVG(不是 emoji 也不是切圖)——
   `currentColor` 讓它跟著「選中 / 未選中」的文字色走,不用準備兩張圖。 */
.lb-nav .ni {
  width: 22px; height: 22px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* 🔴 T13(第二批):文字裡的線條圖示 —— 跟著【它旁邊那行字】走。
   ① 尺寸用 em(這裡才對:它就是一個字,字大它就大)——
      ⚠️ 對照 T14 的教訓「圖不要用 em」:那條講的是【插畫】(尺寸與字無關),
      這裡是【隨文圖示】,兩者剛好相反。
   ② `stroke: currentColor` → 灰字裡是灰的、金字裡是金的,不用準備多張。
   ③ 沒有 width/height 的 <svg> 預設是 300×150 —— 少了這一段會直接撐爆版面。 */
.svgi {
  width: 1.15em; height: 1.15em;
  vertical-align: -0.17em;
  flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
/* 按鈕 / 標題上的圖示稍微大一點,不然在 20px 的字旁邊會顯得瘦 */
h3 .svgi, .lb-go .svgi, .primary .svgi { stroke-width: 1.9; }
.lb-nav button.on .ni { stroke-width: 1.9; }
.lb-nav button {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0;
  background: transparent; border: 0; color: var(--dim); font: 19px/1 inherit;
  border-radius: 12px; padding: 7px 2px 5px; cursor: pointer;
}
.lb-nav.five button { font-size: 15px; }
.lb-nav.five button em { font-size: 10px; }

/* ---- 📅 任務 · 🏅 成就(v2.28)---- */
/* ---- 🌊 今日活動橫幅(v2.32)---- */
/* 🔴 T4:活動從大廳的橫幅改成【出擊面板裡的一列】—— 它講的是「這一場會多拿到什麼」。
   💡 同一塊內容換了位置就要換版面:大廳是置中的膠囊,面板裡要靠左的卡片,
      照抄過去會變成一顆浮在左上角的膠囊。 */
.lch-event {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 8px 0 2px; padding: 8px 10px;
  background: linear-gradient(90deg, rgba(122,243,255,.12), rgba(180,120,255,.12));
  border: 1px solid rgba(122,243,255,.35); border-radius: var(--r-card);
  font-size: var(--fs-body); line-height: 1.4;
}
.lch-event[hidden] { display: none; }
.lch-event b { color: var(--ally-soft); }
.lch-event .ev-eff { color: var(--gold); }
.lch-event .ev-left { color: var(--muted); font-size: var(--fs-caption); }
.lch-event .ev-sec { color: var(--enemy-soft); }
/* 星區描述句(從大廳搬過來)+ 💎 商店按鈕上的餘額 */
.lch-desc { margin: 8px 0 6px; font-size: var(--fs-caption); color: var(--muted); line-height: 1.6; }
/* 🔴 .lb-tags 原本是給置中的大廳用的;搬進面板之後要靠左 —— 面板裡每一段都靠左,
   只有這一段置中會看起來像沒對齊。💡 同一塊內容換了容器,對齊方式要跟著換。 */
#lchTags { justify-content: flex-start; margin-bottom: 2px; }
.lch-desc:empty { display: none; }
.shopbal { font-style: normal; color: var(--gold); margin-left: 6px; }

/* ---- 🪙 補給站(v2.32):價格會隨當天買過幾次遞增,所以「剩幾次 / 下次多少」要寫在卡片上 ---- */
.shopit .gs-left { color: var(--dim); font-size: 10px; }
.shopit .gs-next { color: var(--gold); font-size: 10px; }
.gs-slots { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 2px; }
.gs-slots button {
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--txt);
  border-radius: 8px; padding: 5px 8px; font: 11.5px/1 inherit; cursor: pointer;
}
.gs-slots button:hover { border-color: var(--ally); }

#quest { z-index: 20; }
.questpanel { max-width: 460px; max-height: 88vh; overflow: auto; }
.qtabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; margin-bottom: 8px; }
.qtabs.three { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
.qall code { font-size: 10px; color: var(--ally-soft); }
.dp.me { color: var(--ok); font-weight: 700; }
.qtab {
  min-width: 0;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--dim);
  border-radius: 8px; padding: 8px 4px; font: 12.5px/1 inherit; cursor: pointer;
}
.qtab.on { border-color: var(--ally); color: var(--txt); background: rgba(53,230,255,.12); }
.qtab .qn { color: var(--gold); font-size: 12px; }
/* v2.35:分頁上的「可以領幾件」用【紅點徽章】,跟大廳底部功能列的 .dot 同一套語言 ——
   原本是跟分頁文字同色同字重的「(3)」,玩家掃過去看不出那是「有東西可以拿」。
   🔴 只有「可以領」用紅點;🏆 挑戰那顆是「今天剩幾次」,維持括號寫法不要跟著變紅。 */
.qtab .qn.hot {
  background: var(--bad); color: #fff; border-radius: 999px;
  padding: 1px 6px; margin-left: 3px; font-weight: 700;
}
/* 🎁 清單最上面那條「有 N 件可以領 + 全部領取」 */
.qready {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--ok); background: rgba(77,240,169,.10);
  border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 12px;
}
.qready b { color: var(--ok); font-size: 15px; }
.qready .artimg.sm { vertical-align: -2px; }
.qlist { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.qrow {
  display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 8px;
}
.qrow > span { min-width: 0; }
.qrow:has(> .qlock) { grid-template-columns: 26px minmax(0, 1fr); }
.qrow:has(> .qlock) > .qi { grid-column: 1; grid-row: 1 / span 2; }
.qrow:has(> .qlock) > span:nth-child(2) { grid-column: 2; grid-row: 1; }
.qrow > .qlock { grid-column: 2; grid-row: 2; font-size: 12px; color: var(--dim); }
.qrow.done { border-color: var(--ok); background: rgba(77,240,169,.08); }
.qrow.claimed { opacity: .45; }
.qrow .qi { font-size: 20px; text-align: center; }
.qrow .qn { font-size: 12px; }
.qrow .qr { font-size: 10px; color: var(--gold); }
/* 進度條:🔴 數字與條要一起出現 —— 只有條看不出「還差幾個」 */
.qbar { height: 5px; border-radius: 999px; background: rgba(255,255,255,.10); margin-top: 5px; overflow: hidden; }
.qbar i { display: block; height: 100%; background: var(--ally); border-radius: 999px; }
.qrow.done .qbar i { background: var(--ok); }
.qrow .qp { font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.qgo { min-width: 62px; }
.qall {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px dashed var(--gold); border-radius: 12px; padding: 8px 10px; margin-bottom: 8px;
  font-size: 12px;
}
.lb-nav button em { font-style: normal; font-size: 10px; }
.lb-nav button.on { color: var(--txt); background: rgba(53,230,255,.14); }
.lb-nav button.center { font-size: 20px; }
.lb-nav button.center.on { background: linear-gradient(180deg, rgba(53,230,255,.28), rgba(53,230,255,.10)); }
.lb-nav .ndot { position: absolute; top: 2px; right: 50%; margin-right: -20px; }
.lb-nav .ndot:empty { display: none; }

/* ---- 第二層:出擊面板(底部彈出、出擊鈕釘在底部)---- */
.overlay.sheet { align-items: flex-end; padding: 0; }
@media (min-width: 700px) { .overlay.sheet { align-items: center; padding: 16px; } }

/* ===== T2(2026-09-04):overlay 只有兩類 =====================================
   sheet = 底部滑出 . 做一個決定 . 主要按鈕落在拇指區
           (launch / item / gempick / growth / gembench / sweep / ask)
   full  = 全頁 . 瀏覽一堆東西(其餘 12 個)
   🔴 判準是「這個窗是【做一個決定】還是【看一堆東西】」,不是它有多大。
   關閉行為統一在 app.js 的 bindOverlayDismiss():點背景 / Esc = 按 data-close 那顆鈕。
   #cards(三選一)與 #result(結算)【刻意】沒有 data-close —— 那兩屏一定要玩家自己選。
   ========================================================================= */

/* -- full:置中、輕輕浮上來 -- */
.overlay.full > .panel { animation: ovin .18s ease-out; }
@keyframes ovin { from { transform: translateY(8px); opacity: 0; } }

/* -- sheet:貼著畫面下緣滑上來(#launch 用的是 .sheetbox,規則在上面)-- */
.overlay.sheet > .panel {
  width: 100%; max-width: 560px;
  max-height: calc(var(--vh-avail) * .92); overflow: auto;
  border-radius: var(--r-card) var(--r-card) 0 0;
  padding-bottom: 0;                      /* 下緣的內距交給最後一個子元素 */
  animation: shup .22s ease-out;
  box-shadow: 0 -18px 50px rgba(0,0,0,.55);
}
.overlay.sheet > .panel > :last-child:not(.sh-actions) {
  margin-bottom: calc(env(safe-area-inset-bottom) + 12px);
}
@media (min-width: 700px) { .overlay.sheet > .panel { border-radius: var(--r-card); } }

/* 🔴 sheet 的主要動作區釘在畫面下緣 —— 內容再長也不用捲到底才按得到。
   (#item 的詞條清單就是這樣:五條詞條 + 五顆動作鈕,舊版一定要捲到底才按得到) */
.overlay.sheet > .panel > .sh-actions {
  position: sticky; bottom: 0; z-index: 2;
  margin: 10px -18px 0; padding: 10px 18px calc(env(safe-area-inset-bottom) + 12px);
  background: var(--panel-flat); border-top: 1px solid var(--line);
}
.sheetbox {
  width: 100%; max-width: 560px; max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px 20px 0 0; box-shadow: 0 -18px 50px rgba(0,0,0,.55);
  animation: shup .22s ease-out;
}
@media (min-width: 700px) { .sheetbox { border-radius: 12px; } }
@keyframes shup { from { transform: translateY(24px); opacity: .4; } }
.sh-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px 8px; flex: 0 0 auto; border-bottom: 1px solid var(--line);
}
.sh-head b { font-size: 15px; }
.xbtn {
  width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.06);
  border: 1px solid var(--line); color: var(--dim); font: 13px/1 inherit; cursor: pointer;
}
.sh-body { flex: 1 1 auto; overflow: auto; padding: 4px 16px 12px; -webkit-overflow-scrolling: touch; }
.sh-body h3 { margin: 12px 0 7px; font-size: 12px; color: var(--ally-soft); font-weight: 600; }
/* 🔴 T5:出擊準備的三個步驟依決策順序編號(關卡 -> 難度 -> 武器模組)。
   編號不是裝飾:它讓玩家知道「這一頁總共要決定幾件事」。 */
.sh-body h3 .stepn {
  display: inline-block; min-width: 20px; margin-right: 6px; padding: 1px 5px;
  font-style: normal; font-size: var(--fs-caption); font-weight: 700;
  font-variant-numeric: tabular-nums; text-align: center;
  color: var(--bg); background: var(--cyan); border-radius: var(--r-ctl);
}
.sh-body h3 small { color: var(--dim); font-weight: 400; margin-left: 6px; font-size: 10px; }
.sh-body .hint { text-align: left; margin-top: 10px; }
/* 🔴 出擊鈕釘底 —— 內容再長,按鈕上方也不會出現一塊空白(v1.1 的老問題) */
.sh-foot {
  flex: 0 0 auto; display: flex; gap: 8px; padding: 10px 16px calc(env(safe-area-inset-bottom) + 12px);
  border-top: 1px solid var(--line); background: rgba(10,16,30,.72);
}
.sh-foot .primary, .sh-foot .secondary { margin-top: 0; }
.sh-foot .secondary { width: auto; flex: 0 0 auto; padding: 13px 16px; }
.sh-foot .primary { flex: 1 1 auto; }
@media (max-width:420px) {
  #launch .sh-foot { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  #launch .sh-foot .primary { grid-column:1 / -1; grid-row:1; }
  #launch .sh-foot .secondary { width:100%; min-width:0; padding:12px 8px; }
}

/* 出擊面板的「這一場會拿到什麼」 */
.lchinfo { margin: 10px 0 2px; display: flex; flex-direction: column; gap: 5px; }
.lci {
  display: flex; gap: 8px; align-items: baseline; font-size: 12px; line-height: 1.5;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 6px 9px;
}
.lci-k { flex: 0 0 auto; color: var(--dim); }
.lci-v { color: var(--txt); }
.lci-v i { font-style: normal; color: var(--dim); }

/* 關卡格上的星等 */
.stg .stars { font-size: 10px; color: var(--gold); letter-spacing: -1px; }

/* ---- ⭐ 結算星等 ---- */
.rstars { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 2px 0 12px; min-height: 34px; }
/* 🔴 T6:星等從 28px 降到 20px —— 一屏只能有一個 28px,而那顆給了獎勵。
   三顆星本來各是一個 28px,等於這一屏有三個主角。 */
.rstars .st {
  font-size: var(--fs-heading); color: rgba(255,255,255,.16); line-height: 1;
  transition: color .2s; text-shadow: none;
}
.rstars .st.on { color: var(--gold); text-shadow: 0 0 14px rgba(255,214,102,.6); animation: starpop .45s ease-out backwards; }
@keyframes starpop { from { transform: scale(0) rotate(-40deg); opacity: 0; } 70% { transform: scale(1.3); } }
.rstars .stbest { font-size: 10px; color: var(--dim); margin-left: 6px; }
.reward .gain.chest { background: rgba(255,255,255,.05); }
.reward .gain.chest b { font-size: 12px; }

/* ---- 🎁 寶箱倉庫 ---- */
.chestpanel { max-width: 520px; max-height: 92vh; overflow: auto; }
.chlist { display: flex; flex-direction: column; gap: 7px; }
.chrow {
  display: flex; align-items: center; gap: 9px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-left: 3px solid var(--line); border-radius: 12px; padding: 8px 10px;
}
.chrow.empty { opacity: .45; }
.chrow .chi { font-size: 28px; width: 30px; text-align: center; flex: 0 0 auto; }
.chrow .chm { flex: 1; min-width: 0; }
.chrow .chm b { font-size: 12px; }
.chrow .chm small { display: block; font-size: 10px; color: var(--dim); line-height: 1.5; margin-top: 2px; }
.chrow .chq { font-size: 12px; color: var(--gold); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.chrow .chops { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }

.chresult {
  margin: 12px 0 4px; padding: 10px; text-align: center;
  background: rgba(255,214,102,.06); border: 1px solid rgba(255,214,102,.25); border-radius: 12px;
}
.chresult h4 { margin: 0 0 8px; font-size: 12px; color: var(--gold); }
.chresult .drops h4 { color: var(--dim); }
.chresult.pop { animation: chpop .3s ease-out; }
@keyframes chpop { from { transform: scale(.9); opacity: 0; } }
.chanim { font-size: 28px; animation: chshake .5s ease-in-out infinite; }
@keyframes chshake { 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

/* 🏳️ 撤退鈕(HUD 左上) */
.ico-btn.left { left: 12px; right: auto; }

/* 窄畫面微調 */
@media (max-width: 380px) {
  .lb-art { font-size: 28px; }
  .artimg.big { width: 218px; height: 218px; }
  /* 🔴 T4:這裡本來把 .lb-title 壓成 19px —— 19 不在 5 級階梯上,而且窄畫面把
     「這一屏的主角」縮小等於把層級拿掉。星區名最長 4 個字,28px 在 375px 放得下,不用縮。 */
  .lb-cur .cur { font-size: var(--fs-caption); }
  /* 🔴 360×800 是目標機之一,而抬頭在那個寬度會擠成兩行(實測差 40px)——
     省的地方是【名字】不是【數字】:名字截掉還看得出是誰,貨幣少一位就變成錯的。
     guest_xxxxxx 這種預設名最長,所以要以它為準量。 */
  .lb-cur { gap: 4px; }
  .lb-cur .cur { padding: 3px 5px; }
  .lb-cur .more { min-width: 28px; letter-spacing: 0; }
  .lb-avatar { gap: 5px; padding: 4px 9px 4px 4px; }
  .lb-avatar .who b { max-width: 62px; }
}
/* 矮畫面(橫向桌機視窗)把中央卡片壓小,確保功能列一定看得到 */
@media (max-height: 620px) {
  .lb-art { font-size: 28px; }
  .artimg.big { width: 185px; height: 185px; }
}

/* ===== v1.4:武器模組要說出「會變成哪一把主武器」/ 一鍵最佳裝備的提示 ===== */
/* 🔴 模組是裝備裡影響最大的一件(決定進場那把主武器),以前 UI 只印原始 id(cryo / pulse)—— 玩家看不出穿了會變成什麼 */
.gs-w { display: block; color: var(--dim); font-size: 10px; line-height: 1.6; margin-top: 2px; }
.gs-w b { color: var(--ally-soft); font-size: 12px; }
.gs-w i { display: block; font-style: normal; color: var(--dim); }
.gs-w em { display: block; font-style: normal; color: var(--enemy-soft); font-size: 10px; }
.gc-w { display: inline-block; color: var(--ally-soft); font-size: 10px; margin-right: 4px; }
/* 換上去會把主武器換掉 —— 這件事一定要先講,不能讓玩家裝完才發現整套 build 變了 */
.gc-w.diff { color: var(--gold); }
.mini.hot { background: rgba(255,214,102,.18); border-color: rgba(255,214,102,.5); }
.mini.hot .dot { margin-left: 4px; }

/* ===== ❓ 遊戲內詢問視窗(v1.6:取代瀏覽器 confirm)===== */
/* 🔴 z-index 要比其他 .overlay(20)高 —— 一鍵餵是從裝備頁(也是 .overlay)按下去的,
   同層靠 DOM 順序決勝負太脆弱(以後有人把 #ask 搬到前面就整個看不到了)。 */
/* ⏸ T5:暫停面板 —— z-index 要比一般面板高(戰鬥中它是最上層),但比 #ask(50)低,
   因為「撤退嗎?」那個確認框要蓋在它上面。 */
#pause { z-index: 46; }
.pausepanel { max-width: 420px; }
.pausepanel #pauseBuild { margin: 10px 0 2px; justify-content: center; min-height: 30px; }
/* 🔴 沒撿到任何東西的第一波也要有東西看,不然面板會空掉一塊 */
.pausepanel #pauseBuild:empty::before { content: '還沒有升級'; font-size: var(--fs-caption); color: var(--muted); }

/* 🕹️ 第一次出擊的操作說明 */
.tutpanel { max-width: 380px; }
.tutrow {
  display: grid; grid-template-columns: 3.5em minmax(0, 1fr); gap: 4px 10px;
  align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line);
}
.tutrow:last-of-type { border-bottom: 0; }
.tutrow b { font-size: var(--fs-body); color: var(--cyan); }
.tutrow i { font-style: normal; font-size: var(--fs-body); color: var(--ink); line-height: 1.6; }

#ask { z-index: 50; }
.askpanel { max-width: 400px; }
.askbody { font-size: 12px; line-height: 1.8; }
.askbody .ln { margin: 0 0 5px; }
.askbody .ln:last-child { margin-bottom: 0; }
.askbody .ln.dim { color: var(--dim); font-size: 12px; }
.askbody .ln.gold { color: var(--gold); }
.askbody .ln.bad { color: var(--bad); }
.askbody .ln.hl { color: var(--txt); font-weight: 600; font-size: 12px; margin-bottom: 8px; }
/* 明細列(一鍵餵的部位清單)—— 縮排 + 底色,跟說明文字分開 */
.askbody .ln.item {
  background: rgba(255,255,255,.045); border-radius: 8px; padding: 5px 9px; margin-bottom: 4px;
  display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap;
}
/* 🔴 右邊那串可能很長(星核是「每個部位各幾顆」)—— 不換行的話左邊的標題會被擠成一字一行。
   左標題可縮(min-width 0)、右值可換行,兩邊都不要用 flex:0 0 auto 硬撐。 */
.askbody .ln.item > span { flex: 1 1 auto; min-width: 0; }
.askbody .ln.item i {
  font-style: normal; color: var(--gold); flex: 0 1 auto;
  text-align: right; word-break: break-word; max-width: 100%;
}
.askbody .ln.item .artimg { width: 15px; height: 15px; }
/* 會銷毀資產的確認鈕染紅 —— 顏色本身就是最後一道提醒 */
.primary.danger { background: linear-gradient(90deg, var(--bad), color-mix(in srgb, var(--red) 60%, var(--gold))); color: color-mix(in srgb, var(--red) 25%, #000); }

/* ================================================================
   v2.4(2026-08-06 實玩回饋):👤 個人面板 · 🎁 章節寶箱 / 🛰️ 巡邏 · 裝備角色面板 · 三選一已選格子
   ================================================================ */

/* ---- 大廳:右上的個人面板入口 ---- */
.lb-cur .prof { color: var(--txt); cursor: pointer; font-family: inherit; }

/* ---- 大廳中段:🎁 章節寶箱 / 🛰️ 巡邏(都是「要自己來領」的東西)---- */
/* 🔴 T4 版面照 01-lobby.png:圖示 + 名字在第一行,狀態在第二行、整張靠左。
   置中排列在「狀態是一句話」的時候會變成兩張各自置中的碎字。 */
.midbtn {
  position: relative; flex: 1 1 0; min-width: 0;
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 6px;
  align-items: center; text-align: left;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--txt);
  border-radius: var(--r-card); padding: 8px 10px; font: inherit; cursor: pointer;
}
.midbtn .mi { font-size: 20px; line-height: 1.1; }
.midbtn b { font-size: var(--fs-body); font-weight: 600; }
.midbtn i {
  grid-column: 1 / span 2; min-width: 0;
  font-style: normal; font-size: var(--fs-caption); color: var(--muted); font-variant-numeric: tabular-nums;
}
/* 有東西可以領 = 金色描邊(暖金徽章預算 2 顆,這兩張卡剛好是「現在可以拿的資源」)。
   🔴 T4 拿掉呼吸動畫:金框本身已經在講同一件事,而「發光 / 呼吸」一屏只有 1 個預算。 */
.midbtn.ready { border-color: rgba(255,214,102,.6); background: rgba(255,214,102,.12); }
.midbtn.ready b, .midbtn.ready i { color: var(--gold); }
.midbtn .ndot { position: absolute; top: -5px; right: -4px; }
.midbtn .ndot:empty { display: none; }

/* ---- 👤 個人面板的角色卡 ---- */
.mecard {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.mc-av {
  width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; font-size: 28px;
  background: linear-gradient(135deg, rgba(53,230,255,.35), rgba(176,107,255,.35));
  display: flex; align-items: center; justify-content: center;
}
.mc-main { flex: 1; min-width: 0; }
.mc-main b { font-size: 15px; }
.mc-lv { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.mc-lv i { font-style: normal; font-size: 12px; color: var(--ally-soft); flex: 0 0 auto; }
.mc-lv .xp { flex: 1 1 auto; height: 5px; background: rgba(255,255,255,.14); border-radius: 999px; overflow: hidden; }
.mc-lv .xp i { display: block; height: 100%; width: 0; background: var(--ok); }
.mc-main small { display: block; margin-top: 3px; font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---- 🛠️ 裝備:角色面板(六部位圍著中央角色)---- */
/* 🔴 T7:裝備第一屏 = 戰力卡 + 六部位 + 一條建議。
   舊版是「左三 / 角色 / 右三」三欄,角色那一欄同時塞了頭像 + 戰力 + 五項屬性 ——
   結果戰力被五個百分比夾在中間,而它才是這一頁在回答的那個問題。 */
.gpcard {
  display: flex; flex-wrap: wrap; gap: 4px 12px;
  align-items: center; margin-bottom: 8px; padding: 12px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: var(--r-card);
}
.gpwrap { display: flex; flex-direction: column; flex: 1 1 auto; min-width: max-content; }
.power-entry { border: 0; border-radius: var(--r-ctl); background: transparent; padding: 0; text-align: left; min-height: 44px; cursor: pointer; }
.power-entry-hint { color: var(--cyan); font-size: var(--fs-caption); }
.power-profile { display: block; width: 100%; min-height: 44px; color: var(--cyan); cursor: pointer; }
.gp-k { font-size: var(--fs-caption); color: var(--muted); letter-spacing: 2px; }
/* 🔴 這是【裝備頁唯一的 28px】。暖金是對的:戰力是數值,正好是 --gold 的職責。 */
.gp-v {
  font-size: var(--fs-display); line-height: 1.15; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.gp-res {
  flex: 0 0 auto; margin-left: auto; font: inherit; cursor: pointer;
  font-size: var(--fs-caption); color: var(--muted);
  background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 6px 10px; min-height: 32px;
}
.gp-res[hidden] { display: none; }
.gp-res b { font-size: var(--fs-body); color: var(--ok); font-variant-numeric: tabular-nums; }
.gp-res.off b { color: var(--muted); }

/* 六部位:2×3。🔴 一格吃半個寬度之後,名字與數值才排得下同一行。 */
.gslots6 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.gcell {
  position: relative; display: flex; align-items: center; gap: 6px; text-align: left;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); border-left: 3px solid var(--line);
  color: var(--txt); border-radius: 12px; padding: 6px 7px; font: inherit; cursor: pointer; min-width: 0;
}
.gcell .ci { font-size: 20px; flex: 0 0 auto; }
.gcell .cm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.gcell .cn { font-size: 10px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcell .cv { font-size: 12px; font-variant-numeric: tabular-nums; }
.gcell .cs { font-size: 10px; color: var(--gold); letter-spacing: -1px; }
.gcell .enh {
  position: absolute; top: -6px; right: -4px; font-size: 10px; font-style: normal;
  background: rgba(255,214,102,.9); color: color-mix(in srgb, var(--gold) 25%, #000); border-radius: 999px; padding: 1px 5px;
}
.gcell.empty { border-style: dashed; opacity: .6; }
.gcell.empty .cv { color: var(--dim); }
/* 🔴 T7:.gmid / .gpower 隨著三欄版面一起移除了(戰力卡 .gpcard 取代它們)。
   💡 移版面的時候,它的 CSS 要一起移掉 —— 留著會讓下一個人以為那個結構還在用。
   .gav(圓形頭像)留著:戰力卡還在用同一顆。 */
.gav {
  width: 58px; height: 58px; border-radius: 50%; font-size: 28px;
  background: linear-gradient(135deg, rgba(53,230,255,.3), rgba(176,107,255,.3));
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 4px 14px rgba(53,230,255,.28));
}
/* 🔴 T7:五項屬性搬進「📊 總加成」的 details 之後可以吃滿寬度,不再是窄欄 */
.gsec .gmain { max-width: none; justify-content: flex-start; }
.gmain { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.gmain span {
  font-size: 10px; color: var(--dim); background: rgba(0,0,0,.28); border-radius: 8px; padding: 2px 6px;
  font-variant-numeric: tabular-nums;
}
.gmain b { color: var(--ally-soft); }
/* 🎯 v2.40 暴擊滿了之後的「溢出 → 爆傷」小字 —— 玩家要看得出投資沒有白費 */
.gmain .ovf { font-style: normal; color: var(--gold); font-size: 10px; margin-left: 4px; }
/* 🔴 T7:窄畫面本來要把三欄折成兩欄 + 角色換到最上面;
   現在戰力卡本來就在最上面、部位本來就是兩欄,這個覆寫不需要了。 */

/* 🔴 T11:收益中心 —— 四個「有東西可以領」的地方的單一入口。
   每一列直接寫「還有多少可以領」,點下去才進到原本那個面板。 */
.earnpanel { max-width: 420px; }
.earnlist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.erow {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 2px 8px; align-items: center; text-align: left; min-height: 44px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--txt);
  border-radius: var(--r-card); padding: 10px 12px; font: inherit; cursor: pointer;
}
/* 🔴 三欄了 —— **每一個子項都要明寫 grid-column**。
   T10 踩過:只有一個子項寫了位置,其餘被自動排版丟到別欄,
   症狀是「名字被推到最右邊」而 CSS 一個字都不會報錯。 */
.erow .eico {
  grid-column: 1; grid-row: 1 / span 2; align-self: center;
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;          /* 🔴 寫死 —— 圖是 96px,不夾住會撐爆整列 */
}
.erow .eico .artimg { width: 34px; height: 34px; }
.erow .eico .svgi { width: 22px; height: 22px; }
.erow b { grid-column: 2; grid-row: 1; font-size: var(--fs-body); font-weight: 600; }
.erow i { grid-column: 2; grid-row: 2; font-style: normal; font-size: var(--fs-caption); color: var(--muted); min-width: 0; }
/* 🔴 有東西可以領 = 暖金(那正是「現在可以花掉 / 拿到的資源」,--gold 的職責);
   數字寫在右邊,不用紅點 —— 紅點的預算留給導覽列那三顆。 */
.erow .en {
  grid-column: 3; grid-row: 1 / span 2; align-self: center;
  font-size: var(--fs-title); color: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums;
}
.erow.has { border-color: rgba(255,214,102,.5); background: rgba(255,214,102,.08); }
.erow.has b { color: var(--gold); }

/* 🔴 T9:批次選取模式。
   一般狀態那一列【0 字說明】—— 只有「N 件」與一顆選取鈕;
   規則(哪些會被保留)寫在選取模式的抬頭上,而且寫成數字。 */
.gbagbar, .gpickbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 6px; min-height: 36px;
}
.gbagbar[hidden], .gpickbar[hidden] { display: none; }
.gb-n { font-size: var(--fs-caption); color: var(--muted); font-variant-numeric: tabular-nums; }
.gbagbar .mini { margin-left: auto; }
/* 選取模式的抬頭:沒選之前是灰的提示,選了之後是暖金的【後果】 */
.gp-sum {
  flex: 1 1 100%; min-width: 0;
  font-size: var(--fs-body); color: var(--muted); font-variant-numeric: tabular-nums;
}
.gp-sum.on { color: var(--gold); font-weight: 600; }
.gp-btns { display: flex; gap: 6px; width: 100%; }
/* 🔴 .mini 預設只有 27px 高 —— 規格的觸控目標下限是 44px。
   這三顆是【會永久銷毀裝備】的那一組,按錯的代價最高,不能是最難按的那一組。 */
.gp-btns .mini { flex: 1 1 0; min-width: 0; min-height: 44px; }
.gbagbar .mini { min-height: 44px; padding-left: 16px; padding-right: 16px; }

/* 選取中的格子:🔴 用【填色 + 邊框】兩個訊號 ——
   背包格子本來就各自有品階色的邊框,只改邊框在一堆彩色框裡看不出來。 */
.gbag.picking .bcell { cursor: pointer; }
.gbag.picking .bcell.picked {
  background: rgba(53,230,255,.22);
  box-shadow: 0 0 0 2px var(--cyan) inset;
}
.gbag.picking .bcell.picked::after {
  content: '\2713'; position: absolute; top: 2px; left: 4px;
  font-size: var(--fs-caption); color: var(--cyan); font-weight: 700;
}

/* 🔴 T8:背包 / 材料 / 寶石的分頁。
   三段本來在同一條長頁上同時攤開 —— 捲到底要經過兩段自己用不到的東西,
   而且「現在在看哪一類」只能靠捲軸位置記憶。 */
.gtabs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
  margin: 10px 0 8px;
}
.gtab {
  min-width: 0; min-height: 38px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted);
  border-radius: var(--r-ctl); padding: 8px 4px; font: var(--fs-body)/1.2 inherit; cursor: pointer;
}
/* 🔴 選中的那一頁用【填色】—— 描邊在三顆並排時分不出來 */
.gtab.on { background: rgba(53,230,255,.16); border-color: var(--cyan); color: var(--ink); font-weight: 600; }
.gtab i { font-style: normal; font-size: var(--fs-caption); color: var(--muted); font-variant-numeric: tabular-nums; }
.gtab i:empty { display: none; }
.gtab.on i { color: var(--cyan); }
.gpane[hidden] { display: none; }

/* 🔴 T8:單件視窗的機制說明收在這裡(預設收合)。
   規則收起來、當下的數字留在外面 —— 判準見 app.js 的 itWhyHtml()。 */
.itwhy { margin-top: 10px; }
.itwhy > summary {
  cursor: pointer; list-style: none;
  font-size: var(--fs-caption); color: var(--muted); padding: 6px 0;
}
.itwhy > summary::-webkit-details-marker { display: none; }
.itwhy > summary::after { content: ' \25BE'; }
.itwhy[open] > summary::after { content: ' \25B4'; }
.itwhy p {
  margin: 0 0 6px; font-size: var(--fs-caption); color: var(--muted); line-height: 1.65;
}
.itwhy b { color: var(--ink); }

/* ---- 🛠️ 背包:一格一件(只給品階 / 部位 / 星級,詳細點了才看)---- */
.gbag {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px;
  max-height: 34vh; overflow: auto;
}
.bcell {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 7px 3px 5px; font: inherit; cursor: pointer; min-width: 0;
}
.bcell .bi { font-size: 20px; line-height: 1.1; }
.bcell .bt { font-size: 10px; font-weight: 700; white-space: nowrap; }
/* v3.76 大階外框:T1 一般框 · T2 細光框 · T3 亮光框(三個大階的金裝同色,靠這個分) */
.bcell .bs { font-size: 10px; color: var(--gold); letter-spacing: -1.5px; }
/* 小圖示標記(使用者要求:沒穿的裝備不列屬性,改用圖示提示「這件有什麼」) */
.bcell .bmk { position: absolute; top: 2px; right: 3px; font-size: 10px; letter-spacing: -1px; }
.bcell .upmk { position: absolute; top: -5px; left: -4px; font-size: 10px; }
.bcell.better { border-color: color-mix(in srgb, var(--up) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--up) 35%, transparent) inset; }
.bcell.maxstar { border-color: rgba(255,214,102,.55); }

/* [claude code] 2026-10-23 v3.89: red and rainbow endgame tiers, static CSS frames. */
.tier-red { --tier-frame: var(--red); }
.tier-rainbow {
  --tier-frame: var(--violet);
  --tier-spectrum: linear-gradient(120deg, var(--red), var(--gold), var(--green), var(--cyan), var(--violet), var(--red));
}
.bcell.tier-red, .gcell.tier-red,
.bcell.tier-rainbow, .gcell.tier-rainbow { outline-color: var(--tier-frame); }
.bcell.tier-rainbow, .gcell.tier-rainbow {
  border-color: transparent !important;
  background: linear-gradient(var(--panel2), var(--panel2)) padding-box, var(--tier-spectrum) border-box;
}
.tier-rainbow .cn, .tier-rainbow .bt,
#itTitle .tier-rainbow, .nc-yield th.tier-rainbow {
  background-image: var(--tier-spectrum);
  background-clip: text; -webkit-background-clip: text;
  color: transparent !important; text-shadow: none;
}
#itTitle .tier-red { text-shadow: 0 0 8px var(--red); }

/* ---- 單件裝備詳細(第二層)---- */
#item { z-index: 30; }
.itempanel { max-width: 400px; max-height: 90vh; overflow: auto; }
.it-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.it-head b { font-size: 15px; }
.itbody { font-size: 12px; line-height: 1.7; }
.itrow {
  display: flex; justify-content: space-between; gap: 8px; padding: 5px 8px; margin-bottom: 4px;
  background: rgba(255,255,255,.04); border-radius: 8px;
}
.itrow span { color: var(--dim); }
.itrow b { font-variant-numeric: tabular-nums; }
.itnote { font-size: 10px; color: var(--dim); line-height: 1.6; margin: 6px 0 2px; }
.itnote.warn { color: var(--gold); }
.itops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.itops .mini { flex: 1 1 auto; padding: 9px 8px; font-size: 12px; text-align: center; }
.itops .wide { flex: 1 1 100%; }

/* ---- 🎁 章節寶箱 ---- */
.sclist { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow: auto; }
.scsec { background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; }
.scsec.lock { opacity: .5; }
.sc-head { display: flex; align-items: baseline; gap: 6px; font-size: 12px; margin-bottom: 6px; }
.sc-head em { font-style: normal; margin-left: auto; font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.sc-ms { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.scbox {
  display: flex; flex-direction: column; align-items: center; gap: 1px; min-width: 0;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 7px 4px 5px; font: inherit; cursor: pointer;
}
.scbox .si { font-size: 20px; line-height: 1.1; }
.scbox b { font-size: 10px; }
.scbox small { font-size: 10px; color: var(--dim); }
.scbox.ready { border-color: rgba(255,214,102,.65); background: rgba(255,214,102,.14); animation: midpulse 1.8s ease-in-out infinite; }
.scbox.ready small { color: var(--gold); }
.scbox.done { opacity: .45; cursor: default; }
.scbox.wait { opacity: .7; cursor: default; }

/* ---- 🛰️ 巡邏:累積進度條 ---- */
.ofbar { height: 7px; border-radius: 999px; background: rgba(255,255,255,.12); overflow: hidden; margin: 0 0 10px; }
.ofbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ally), var(--ok)); transition: width .3s; }
.ofbar.full i { background: linear-gradient(90deg, var(--gold), color-mix(in srgb, var(--gold) 70%, var(--red))); }

/* ---- 三選一上方的「已選格子」---- */
.pickslots { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.psrow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.psrow .pk-t { font-size: 10px; color: var(--dim); flex: 0 0 auto; width: 30px; }
.psl {
  display: inline-flex; align-items: center; gap: 2px; min-width: 28px; height: 28px; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 8px; padding: 0 5px; font-size: 15px;
}
.psl i { font-style: normal; font-size: 10px; color: var(--gold); }
.psl.attr i { color: var(--ally-soft); }
.psl.free { border-style: dashed; opacity: .45; }
.psl.red { border-color: rgba(255,62,165,.6); background: rgba(255,62,165,.12); }

/* ================================================================
   v2.5(2026-08-06):🧹 掃蕩常駐 · 中央大卡片可點 · 🎁 開箱的內容預告與開獎表演
   ================================================================ */

/* 中央大卡片整塊可點(它是畫面最大的一塊,不能只是裝飾) */
.lb-main { cursor: pointer; border-radius: 12px; transition: background .15s; }
.lb-main:active { background: rgba(53,230,255,.06); }

/* 掃蕩沒有目標時不藏、改成灰的(v2.1 鐵則:按了一定要說話) */
.qbtn.dim { opacity: .5; }

/* 🎁 這箱能開出什麼(裝備品階權重 / 寶石 / 券) */
.chodds { display: flex; flex-wrap: wrap; gap: 3px 5px; align-items: center; margin-top: 3px; }
.chodds .ok { font-size: 10px; color: var(--dim); }
.chodds .odd {
  font-size: 10px; font-variant-numeric: tabular-nums;
  background: rgba(255,255,255,.06); border-radius: 8px; padding: 1px 5px;
}

/* 🎁 開獎:蓄力 → 爆開 → 一項一項跳出來 */
.chstage { position: relative; height: 76px; display: flex; align-items: center; justify-content: center; }
/* 🔴 T13/T14:寶箱動畫接上 `chest/N` 的圖(素材本來就有)——
   接上之後 font-size 只是「抓不到圖時」的備援,收進階梯就不會動到畫面。 */
.chbox { font-size: 28px; display: block; animation: chcharge 1s cubic-bezier(.4,0,.6,1) infinite; }
.chbox .artimg, .chanim .artimg { width: 88px; height: 88px; }
.chbox.fast { animation-duration: .26s; }
@keyframes chcharge {
  0%, 100% { transform: rotate(-10deg) scale(1); }
  50% { transform: rotate(10deg) scale(1.14); }
}
.chglow {
  position: absolute; width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle, var(--burst, #7af3ff) 0%, transparent 68%);
  opacity: .25; animation: chglow 1s ease-in-out infinite;
}
@keyframes chglow { 50% { opacity: .6; transform: scale(1.28); } }

.chresult.burst {
  border-color: var(--burst, rgba(255,214,102,.25));
  animation: chburst .55s ease-out;
}
@keyframes chburst {
  0% { box-shadow: 0 0 0 0 var(--burst); transform: scale(.94); }
  35% { box-shadow: 0 0 44px 6px var(--burst); transform: scale(1.03); }
  100% { box-shadow: 0 0 0 0 transparent; transform: scale(1); }
}
.chresult.burst .gain, .chresult.burst .dp {
  animation: chgain .34s cubic-bezier(.2,1.6,.4,1) backwards;
}
@keyframes chgain { from { transform: scale(.5) translateY(10px); opacity: 0; } }
.chrare {
  font-size: 15px; font-weight: 900; letter-spacing: 2px; margin: 2px 0 6px;
  animation: chgain .4s cubic-bezier(.2,1.6,.4,1) backwards;
  text-shadow: 0 0 16px currentColor;
}

/* ================================================================
   v2.6(2026-08-06):🔧 拆解與材料 · 🔒 洗練鎖定與詞條池 · ⏳ 巡邏倒數
   ================================================================ */

/* 🔧 材料列(🧬 星核 / 🔩 強化石 / 💠 洗練石) */
.gmats { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.gmats .mat {
  font-size: 12px; color: var(--dim); background: rgba(255,255,255,.04);
  border: 1px solid var(--line); border-radius: 8px; padding: 3px 8px; font-variant-numeric: tabular-nums;
}
.gmats .mat.on { color: var(--txt); background: rgba(53,230,255,.10); }
.gmats .mat b { color: var(--ally-soft); margin-left: 3px; }

/* ✨ 詞條(可鎖定)+ 🎲 詞條池 */
/* v2.11:🎲 洗練按鈕搬進標題列 —— 鎖幾條 / 要幾顆 / 按哪裡,三件事在同一個視野內 */
.itaffh { display: flex; align-items: center; flex-wrap: wrap; gap: 4px;
  font-size: 12px; color: var(--ally-soft); margin: 8px 0 4px; }
.itaffh small { color: var(--dim); font-size: 10px; margin-left: 4px; flex: 1 1 120px; min-width: 0; }
.itaffh .mini.rr { margin-left: auto; flex: 0 0 auto; }
.itaff { display: flex; flex-direction: column; gap: 4px; }
/* v2.11:每條詞條兩行 —— 上行「名字 + 值」,下行「它實際加了什麼 + 本階區間」。
   🔴 使用者原話「護盾電池,我不懂他加了什麼」:名字是風味,效果才是資訊,兩者都要在。 */
.affrow {
  display: grid; grid-template-columns: 15px minmax(0, 1fr) auto; gap: 2px 6px;
  align-items: center; font-size: 12px; cursor: pointer;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px;
}
.affrow.on { border-color: var(--gold); background: rgba(255,214,102,.10); }
.affrow input { grid-row: 1; grid-column: 1; width: 15px; height: 15px; accent-color: var(--gold); }
.affrow .an { grid-row: 1; grid-column: 2; min-width: 0; }
.affrow > b { grid-row: 1; grid-column: 3; text-align: right;
  color: var(--ally-soft); font-variant-numeric: tabular-nums; }
.affrow .ae { grid-row: 2; grid-column: 2; font-style: normal; font-size: 10px;
  color: var(--dim); line-height: 1.35; }
.affrow .ae b { color: var(--ally-soft); font-variant-numeric: tabular-nums; }
.affrow em { grid-row: 2; grid-column: 3; font-style: normal; font-size: 10px;
  color: var(--dim); text-align: right; white-space: nowrap; align-self: end; }
.itpool { margin: 8px 0 2px; font-size: 12px; }
.itpool summary { color: var(--dim); cursor: pointer; }
.poolrow {
  display: flex; justify-content: space-between; gap: 8px; padding: 3px 8px;
  font-size: 10px; color: var(--dim); border-bottom: 1px dashed rgba(255,255,255,.07);
}
.poolrow b { color: var(--ally-soft); font-variant-numeric: tabular-nums; }

/* 🛰️ 巡邏按鈕的兩行(累積 + 倒數) */
.midbtn i { line-height: 1.35; text-align: center; }

/* ================================================================
   v2.8:🔺 升級石取代章節鎖 · 每個花資源的地方都寫「需要 / 持有」· 🎉 獎勵彈窗
   ================================================================ */

/* 🔴 「需要 / 持有」—— 不夠時整段染紅,光看按鈕就知道差多少 */
.cost { font-style: normal; font-variant-numeric: tabular-nums; opacity: .95; }
.cost.short { color: var(--bad); font-weight: 700; }
.mini .cost { margin-left: 2px; }
.gemc .cost { font-style: normal; }
.primary .cst.short { color: var(--red-ink); background: rgba(255,255,255,.55); border-radius: 8px; padding: 0 5px; }

/* 🔋 體力 chip:第二行「多久回滿」(使用者:「實在一點」) */
.lb-cur .sta .fullin { display: block; font-size: 10px; color: var(--dim); margin-left: 0; }

/* 💎 商店 */
.shoppanel { max-width: 460px; max-height: 92vh; overflow: auto; }
.shoplist { display: flex; flex-direction: column; gap: 7px; margin-top: 8px; }
.shopit {
  display: flex; align-items: center; gap: 9px; text-align: left; width: 100%;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--txt);
  border-radius: 12px; padding: 9px 10px; font: inherit; cursor: pointer;
}
.shopit .si { font-size: 20px; flex: 0 0 auto; }
.shopit .sm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.shopit .sm b { font-size: 12px; }
.shopit .sm small { font-size: 10px; color: var(--dim); line-height: 1.5; }
.shopit .sp { flex: 0 0 auto; font-size: 12px; color: var(--enemy-soft); font-weight: 600; }
.shopit.hot { border-color: rgba(255,214,102,.5); background: rgba(255,214,102,.09); }
.shopit.poor { opacity: .6; }
.shopit:active { background: rgba(53,230,255,.14); }
/* 💎 v2.98 B3:買不到的商品【事先】就灰掉,理由寫在價格那一格(今天賣完了 / 額度只剩 N 點)——
   以前要按下去才知道。🔴 用真的 disabled 不是只換 class:按不下去就不會有一次白按。 */
.shopit:disabled { opacity: .45; cursor: default; }
.shopit:disabled:active { background: rgba(255,255,255,.05); }
.shopit:disabled .sp em { font-style: normal; font-size: 10px; color: var(--muted); }
/* 🎫 v2.98 B3:月卡的每日 💎(有月卡才出現)—— 跟「推薦」商品卡同一種底色,右邊是一顆領取鈕 */
.passcard {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: rgba(255,214,102,.09); border: 1px solid rgba(255,214,102,.5); border-radius: 12px;
}
.passcard .sm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.passcard .sm b { font-size: 12px; }
.passcard .sm small { font-size: 10px; color: var(--muted); }
.passcard .secondary {
  flex: 0 0 auto; width: auto; margin: 0; padding: 0 12px; min-height: 44px; font-size: var(--fs-body);
}
.passcard .secondary:disabled { opacity: .45; cursor: default; }
/* 💳 v2.99 B1:💎 分頁最上面的「購買商城幣」—— 收起來是一列,點開才列方案。
   青色邊框 = 可以點(規格裡唯一的互動訊號);買不到的時候換成灰框 + 原因(.off)。 */
.payrow {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  background: rgba(53,230,255,.06); border: 1px solid rgba(53,230,255,.35); color: var(--txt);
  border-radius: 12px; padding: 9px 10px; font: inherit; cursor: pointer;
}
.payrow .si { flex: 0 0 auto; color: var(--cyan); }
.payrow .sm { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.payrow .sm b { font-size: 12px; }
.payrow .sm small { font-size: 10px; color: var(--muted); }
.payrow .sp { flex: 0 0 auto; font-size: 12px; color: var(--cyan); }
.payrow.off {
  cursor: default; align-items: flex-start; font-size: 12px; color: var(--muted);
  background: rgba(255,255,255,.04); border-color: var(--line);
}
.payrow.off .si { color: var(--muted); }
/* 🔴 原因那一句裡有 💎 圖示:.sm 沿用直向 flex 的話,文字與圖示會被拆成三個 flex 項目各佔一行 */
.payrow.off .sm { display: block; }
.payrow.off small { display: block; margin-top: 2px; word-break: break-all; }
.paylist { display: flex; flex-direction: column; gap: 7px; }
.paynote { margin: 0; font-size: 10px; color: var(--muted); text-align: center; }
.shopit.pay .sp { color: var(--gold); }
.paybind { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.paywhy { margin: 0 0 4px; font-size: 10px; color: var(--muted); line-height: 1.6; }
/* 📊 v2.99 B2:隨機商品卡片下面那一行機率 —— 購買前就看得到(Play 的硬性要求),點了開完整的表 */
.shopodds { margin-top: -4px; padding: 0 10px; font-size: 10px; line-height: 1.6; color: var(--muted); text-decoration: none; }
.shopodds .svgi { vertical-align: -2px; }
.shopodds:hover, .shopodds:focus-visible { color: var(--cyan); }

/* ===== 🎲 v3.0 B4:洗練的雙軌 / 三軌掃描 · 🔧 校準晶片 ===== */
.scanrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 2px; }
.scanlbl { flex: 1 1 100%; min-width: 0; font-size: 10px; line-height: 1.6; color: var(--dim); }
.scanlbl .shopodds { padding: 0; margin: 0 0 0 4px; }
.mini.scan i { font-style: normal; color: var(--dim); margin-left: 3px; }
.mini.off i { font-style: normal; }
.mini.scan.charging { animation: enhCharge .42s ease-in-out infinite; pointer-events: none; }
/* 還沒選的結果:一定要比周圍顯眼 —— 它擋著這件的洗練與升品階,玩家要一眼知道「還有一步」 */
.scanbox { margin: 8px 0 2px; padding: 8px; border: 1px solid rgba(255,214,102,.45); border-radius: 12px; background: rgba(255,214,102,.06); }
.scanh { font-size: 12px; color: var(--gold); margin-bottom: 4px; }
.scanset { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 6px 2px; border-top: 1px dashed var(--line); }
.scanh + .scanset { border-top: 0; }
.scank { font-size: 12px; color: var(--ally-soft); text-align: center; }
.scanset.orig .scank { color: var(--dim); }
.scanaff { display: flex; flex-wrap: wrap; gap: 2px 8px; min-width: 0; font-size: 10px; line-height: 1.5; }
.scanaff i { font-style: normal; color: var(--txt); white-space: nowrap; }
.scanaff i.up { color: var(--up); }
.scanaff i.down { color: var(--down); }
.scanaff .svgi { width: 10px; height: 10px; vertical-align: -1px; margin-right: 1px; }
.scanset .mini { padding: 7px 8px; }
.mini.chip { border-color: rgba(255,214,102,.5); }

/* 🎉 獎勵彈窗(開箱 / 章節寶箱共用)—— 蓋在畫面正中央,不用往下捲 */
#fx { z-index: 45; }
.fxpanel { max-width: 420px; }
.fxpanel .chresult { margin: 0; }
.fxpanel .primary { margin-top: 14px; }

/* v2.7:背包上方那排「兩個動作」—— 🔧 拆解 / 🍖 餵,一樣寬、一眼看到 */
.gbagops.two { display: flex; gap: 8px; }
.gbagops.two .mini { flex: 1 1 0; padding: 9px 8px; font-size: 12px; text-align: center; }

/* ✨🍖 v2.91 養成快捷列:固定在六部位正下方的兩顆(一鍵最佳裝備 / 一鍵餵)。
   🔴 .mini 預設只有 27px 高,而規格的觸控目標下限是 44px —— 這一排是主要動作,一定要補足。
   🔴 沒事做時是 .off(半透明)而不是消失:位置固定,玩家才記得住「要換裝去哪裡按」。 */
.gquick { margin: 2px 0 8px; }
/* 🔓 v2.97:大廳「下一個解鎖什麼」—— 一行灰字,沒有卡片、沒有紅點(它是背景層) */
.lb-unlock { margin: 0 0 6px; font-size: 10px; color: var(--dim); text-align: center; }
.lb-unlock[hidden] { display: none; }
.lb-unlock b { color: var(--gold); }
.gquick .mini {
  min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
}
.gquick .mini .svgi { flex: 0 0 auto; }
/* 🔴 這一排的 .off 不能用預設的 .4 —— 那是「按鈕在旁邊順便變淡」的用量,
   而這兩顆的整個重點是【找得到】。淡到看不見的話,就跟 T7 把它整顆拿掉沒有差別。 */
.gquick .mini.off { opacity: .62; }
.mini.dis { background: rgba(255,146,90,.16); border-color: rgba(255,146,90,.45); }

/* ================================================================
   v2.11:🔨 打到成功 · ✨ 詞條講人話 · 🛡️ 護盾用「層」當單位
   ================================================================ */

/* 🔨 打到成功:跟單發的 🔨 +1 並排,用虛線邊框區分「這顆會連擲」 */
.mini.until { border-style: dashed; }
.mini.until i { font-style: normal; color: var(--dim); margin-left: 3px; }
.mini.enh.until.charging { animation: enhCharge .28s ease-in-out infinite; pointer-events: none; }

/* 「第 N 次擲成功」—— 使用者要的就是這一行 */
.enhfx .tries {
  font-style: normal; font-size: 12px; color: var(--gold); margin-top: 2px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .8);
}
.enhfx .tries b { font-size: 15px; font-weight: 800; color: var(--gold); }

/* 🛡️ 總加成列:護盾另外標「實際生效幾層」(0.99 層 = 0 層,不寫出來就是在騙人) */
.gb .eff { font-style: normal; font-size: 10px; color: var(--gold); margin-left: 3px; }

/* ================================================================
   v2.12:🎨 美術資源包 —— DOM 圖示(有圖就換,沒有維持 emoji)
   🔴 一律用 object-fit: contain + 100% 塞滿原本 emoji 佔的位置,
      這樣「換圖」不會連帶改變版面(補一張圖不該讓整排跳動)。
   ================================================================ */
.artimg {
  width: 1.35em; height: 1.35em; object-fit: contain; vertical-align: middle;
  display: inline-block; image-rendering: auto;
}
.artimg.sm { width: 1.1em; height: 1.1em; }
.card .ci .artimg { width: 40px; height: 40px; }
.gcell .ci .artimg { width: 24px; height: 24px; }
.bcell .bi .artimg,
.bl .bi .artimg { width: 20px; height: 20px; }
.knode .kn-ico .artimg { width: 26px; height: 26px; }

/* ================================================================
   v2.14:P1 / P2 面板圖示接上 DOM
   🔴 每個位置都把尺寸寫死 —— 補一張圖不該讓整排版面跳動
      (沒有圖的時候是 emoji,emoji 的視覺大小 ≈ 1.2em,所以都抓這個量級)。
   ================================================================ */
/* 🔴 T14 踩到的坑:這裡本來是 `4.2em` —— **em 是跟著 .lb-art 的 font-size 走的**,
   而 .lb-art 的 font-size 只是「沒有圖時那顆 emoji 的大小」。
   T14 把它從 64px 收進階梯(28px)之後,這張圖跟著從 269px 縮成 118px,
   **CSS 不會報錯,只是圖變小了**。
   💡 圖的尺寸不要相依於「文字的尺寸」—— 那兩件事會在不同的時候、為不同的理由被改。
   四個斷點的值 = 原本的 font-size × 4.2。 */
.artimg.big { width: 269px; height: 269px; }        /* 大廳中央的星區圖 */
.sec .si .artimg { width: 26px; height: 26px; }      /* 星區選擇按鈕 */
.cur .artimg,
#lbGold .artimg, #lbCore .artimg { width: 15px; height: 15px; }
#meRes .artimg { width: 16px; height: 16px; }
#gWallet .artimg { width: 15px; height: 15px; }
.chrow .chi .artimg { width: 30px; height: 30px; }   /* 寶箱倉庫 */
.gmats .mat .artimg { width: 15px; height: 15px; }   /* 材料列 */
.gemc .gi .artimg, .gemrow .gi .artimg { width: 22px; height: 22px; }
.shopit .si .artimg { width: 30px; height: 30px; }
.pk .artimg { width: 15px; height: 15px; margin-right: 3px; }   /* 難度 */
.grade .artimg { width: 14px; height: 14px; margin-right: 2px; } /* 強化段位 */
.lb-avatar .av .artimg { width: 100%; height: 100%; }
/* 👤 另外兩個頭像位置(裝備頁 / 個人面板)—— 尺寸是容器寫死的,圖只要撐滿並裁成圓 */
.gav .artimg, .mc-av .artimg { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* 🖼️ 大廳底圖:🔴 只有【資源包真的給了這張】才套(resPack 設 --art-lobby-bg + data-art)。
   沒有的話維持原本的漸層 —— 不能因為換了皮就讓沒圖的人看到空白。 */
html[data-art] .lb-deck {
  background-image: var(--art-lobby-bg, none);
  background-size: cover;
  background-position: center;
}

/* ✨ 窗外的星塵(2026-09-04 使用者:「主畫面有點靜態, 外面能有感覺是在飛動嗎」)
   ────────────────────────────────────────────────────────────────
   🔴 這一段跟 T4 拿掉 `.lb-art` 漂浮動畫的理由**是有張力的** ——
      那條規則說「發光 / 呼吸的注意力預算只留給【可領取】與【可升級】」。
      所以這裡刻意收在三個條件內,才不會把預算吃掉:
        ① 只在**背景層**(`::before`,`pointer-events:none`),不碰任何可互動元件
        ② **慢**(最快的一層 26 秒跑一輪)且**低對比**(最亮的星 .5 alpha)——
           會動但不會「閃」;人眼對「突然」敏感,對「等速」不敏感
        ③ 用遮罩**只留上半部**(窗外的天空),下半是艙內地板 —— 地板上飄星星會很怪
   💡 為什麼星星動比背景圖動更像在飛:太空船的窗戶本來就是這樣 ——
      **船艙是靜止的參考系,動的是外面**。把整張底圖平移反而像鏡頭在晃。
   🔴 三層不同大小 / 不同速度 = 視差;只有一層的話看起來像雜訊在滾。 */
html[data-art] .lb-deck { position: relative; overflow: hidden; }
html[data-art] .lb-deck::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;          /* 🔴 少了這行整張大卡片會點不動(它蓋在上面) */
  z-index: 0;
  /* 三層星:近(大、快)→ 遠(小、慢) */
  /* 🔴 第一版的 alpha 是 .22~.50,在這張很滿的星雲底圖上**完全看不出來**。
     💡 教訓:裝飾層的濃度要對著**它實際會疊在什麼上面**訂,不能憑「看起來不刺眼」——
        乾淨底色上的 .3 很明顯,滿版插畫上的 .3 等於沒有。
     速度線(那兩條細長的)是關鍵:圓點只會讓人覺得「有雜訊」,
        **拉長的點才會讀成「移動」**。 */
  background-image:
    /* 🔴 「速度線」= **拉長的點**,所以用 radial-gradient 的橢圓,不要用 linear-gradient。
       這裡連錯兩次,兩次都不報錯:
         v2.80 寫成 `linear-gradient(...) 0 0 / 1.5px 22px repeat`
               → 那是 `background` 簡寫語法,長寫屬性吃不下 →
                 **整條 background-image 被丟掉,八層星塵一起消失**
         v2.83 把簡寫拿掉但留著 linear-gradient
               → 尺寸交給 background-size 之後,它變成 **140px 寬的灰白色帶**橫在畫面上
       💡 通則:**linear-gradient 沒有「寬度」的概念** —— 它會鋪滿整個 tile 的寬。
          要細長的一小條,就得用 radial-gradient 指定橢圓的兩軸。 */
    radial-gradient(1.2px 11px at 30% 20%, rgba(122,243,255,calc(.55 * var(--lb-star-a))), transparent 70%),
    radial-gradient(1px 8px at 78% 60%, rgba(255,255,255,calc(.42 * var(--lb-star-a))), transparent 70%),
    radial-gradient(2px 2px   at 18% 12%, rgba(122,243,255,calc(.85 * var(--lb-star-a))), transparent 62%),
    radial-gradient(1.8px 1.8px at 72% 26%, rgba(255,255,255,calc(.78 * var(--lb-star-a))), transparent 62%),
    radial-gradient(1.6px 1.6px at 44% 62%, rgba(122,243,255,calc(.62 * var(--lb-star-a))), transparent 62%),
    radial-gradient(1.4px 1.4px at 86% 48%, rgba(255,255,255,calc(.55 * var(--lb-star-a))), transparent 62%),
    radial-gradient(1.3px 1.3px at 8%  74%, rgba(122,243,255,calc(.48 * var(--lb-star-a))), transparent 62%),
    radial-gradient(1.1px 1.1px at 60% 8%,  rgba(255,255,255,calc(.42 * var(--lb-star-a))), transparent 62%);
  background-size:
    140px 300px, 96px 210px,
    190px 190px, 250px 250px, 320px 320px, 320px 320px, 420px 420px, 420px 420px;
  animation: lbDrift var(--lb-star-s) linear infinite;
  /* 只留上半的天空 —— 下半是艙內,不該有星 */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 34%, transparent 62%);
  mask-image: linear-gradient(180deg, #000 0%, #000 34%, transparent 62%);
}
/* 往下流 = 船在往前飛(視覺上前方的星會往兩側與下方散開,
   單一方向已經夠說服人,而且不會讓人注意到它在「動畫」) */
@keyframes lbDrift {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
  /* 🔴 每一層的位移量都必須**剛好等於它自己的 background-size 高度**,
     不然一輪跑完會【跳一下】—— 而那一下看起來像畫面閃了一下,很難察覺是動畫接不上。 */
  to   { background-position:
           0 300px, 0 210px,
           0 190px, 0 250px, 0 320px, 0 320px, 0 420px, 0 420px; }
}
/* 🔴 內容要在星塵之上 —— 否則星星會壓在星區名與大圖上面 */
html[data-art] .lb-deck > * { position: relative; z-index: 1; }
/* 🔴 v3.70:左右切星區的箭頭要排除在上一條之外 —— 它是蓋在卡片兩側的浮動鈕(.sec-arrow 的 absolute + z-index 2),
   被 `> *` 改成 relative 之後會擠進中間那一欄:大螢幕躲在星區大圖後面、短螢幕露在星區名上面
   (2026-09-04 加星塵那天起就是這樣,只有「有美術」時才壞,所以沒圖的環境驗不到)。 */
html[data-art] .lb-deck > .sec-arrow { position: absolute; z-index: 2; }

/* 🧪 毒氣 / 孢子(2026-09-04 使用者:「能噴一些毒氣的粒子嗎, 或是讓人覺的可怕的粒子」)
   ────────────────────────────────────────────────────────────────
   🔴 跟星塵分工:星塵是 `::before`(上半、青白、往下流 = 在飛),
      毒氣是 `::after`(下半、病態黃綠、**往上飄** = 蟲巢在冒氣)。
      兩層方向相反,才不會看起來像同一堆東西在滾。
   🔴 「可怕」不是靠更亮,是靠**顏色與節奏**:
      · 顏色用病態黃綠 var(--toxic) / 酸蝕紫 var(--violet) —— 介面色票裡沒有這兩色,
        所以它天生就讀成「這不是介面,是外面的東西」
      · 大團、模糊、**慢**(28~46 秒),而且**大小不一致**(有機感;等距等大會像圖案)
      · `mix-blend-mode: screen` 讓它疊在底圖上像發光的霧,不像貼上去的圓
   ⚠️ 濃度刻意壓在 .10~.16 —— 毒氣要「看得出來有」,不能蓋住星區大圖(那是主體)。 */
html[data-art] .lb-deck::after {
  content: '';
  position: absolute; inset: -10% -10% 0 -10%;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  background-image:
    radial-gradient(58px 44px at 22% 88%, color-mix(in srgb, var(--toxic) calc(30% * var(--lb-gas-a)), transparent), transparent 70%),
    radial-gradient(44px 34px at 63% 95%, color-mix(in srgb, var(--toxic) calc(26% * var(--lb-gas-a)), transparent), transparent 70%),
    radial-gradient(76px 56px at 84% 82%, color-mix(in srgb, var(--violet) calc(24% * var(--lb-gas-a)), transparent), transparent 72%),
    radial-gradient(34px 26px at 41% 78%, color-mix(in srgb, var(--toxic) calc(28% * var(--lb-gas-a)), transparent), transparent 70%),
    radial-gradient(26px 20px at 74% 70%, rgba(176,107,255,.10), transparent 70%);
  background-size: 280px 300px, 340px 360px, 420px 440px, 300px 320px, 360px 380px;
  filter: blur(2.5px);
  animation: lbGas var(--lb-gas-s) linear infinite;
  /* 氣是重的:貼著下半部,越往上越淡 */
  -webkit-mask-image: linear-gradient(180deg, transparent 10%, #000 55%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 10%, #000 55%, #000 100%);
}
/* 往上飄 + 左右各層速度不同(視差)。
   🔴 位移量刻意設成 background-size 的整數倍 —— 不然一輪跑完會【跳一下】。 */
@keyframes lbGas {
  from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; }
  to   { background-position: 0 -300px, 0 -360px, 0 -440px, 0 -320px, 0 -380px; }
}

/* ♿ 使用者把系統的「減少動態」打開時就不要動 ——
   這幾層是純裝飾,關掉不會少任何資訊。
   ⚠️ **驗證陷阱**:Claude 的 Browser pane **永遠回報 `reduce`**,
      所以在那裡截圖看到的一定是靜止的 —— 那不是壞掉。
      要看動畫得在真的瀏覽器開,或在 console 裡覆寫這一段。 */
@media (prefers-reduced-motion: reduce) {
  html[data-art] .lb-deck::before,
  html[data-art] .lb-deck::after,
  .lb-art { animation: none; }
}

/* ⏳ LOADING(v2.21)——「開 App」與「進戰鬥」兩個時機各一個。
   🔴 蓋滿全螢幕、z-index 要在所有 overlay 之上(#ask 是 50)。 */
/* 🔴🔴 一定要有這條 —— 2026-08-20 線上事故:少了它,兩層載入遮罩【永遠蓋著畫面】,
   玩家一進站就卡在「部署中…」。`[hidden] { display: none }` 只是瀏覽器預設樣式,
   作者樣式的 `display: flex` 一律贏過它(跟權重無關)。
   ⚠️ 而且【屬性是對的】(`el.hidden === true`)—— 只驗 .hidden 完全看不出來,
   要驗 `getComputedStyle(el).display`。 */
.loadmask[hidden] { display: none; }
.loadmask {
  position: fixed; inset: 0; z-index: 90;
  background: radial-gradient(circle at 50% 35%, var(--panel2) 0%, var(--bg) 70%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .28s ease;
}
.loadmask.gone { opacity: 0; pointer-events: none; }
.loadbox { display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(260px, 72vw); }
.loadbox b { font-size: 15px; letter-spacing: 3px; }
.loadlogo { font-size: 46px; filter: drop-shadow(0 6px 18px rgba(53,230,255,.4)); animation: lbfloat 2.4s ease-in-out infinite; }
.loadlogo.spin { animation: loadspin 1.6s linear infinite; }

/* 🖼 2026-09-04 換成真的美術之後的尺寸。
   🔴 **一定要寫死 px** —— `.loadlogo` 的 `font-size: 46px` 只管「沒有圖時那顆字有多大」,
      `<img>` 不吃它,不寫的話會用圖檔自己的像素(256px)把版面撐爆。
      (T14 的 `.artimg.big` 用 `4.2em` 相依字級,已經因此壞過一次。) */
.loadlogo .artimg { width: 128px; height: 128px; }
.rotate span .artimg { width: 120px; height: 120px; }
@media (max-height: 620px) {
  .loadlogo .artimg { width: 96px; height: 96px; }
}
@keyframes loadspin { to { transform: rotate(360deg); } }
.loadbar { width: 100%; height: 5px; border-radius: 999px; background: rgba(255,255,255,.10); overflow: hidden; }
.loadbar i { display: block; height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--ally), #b06bff); transition: width .2s ease; }
.loadtip { font-size: 12px; color: var(--dim); min-height: 16px; text-align: center; }


/* ================================================================
   v2.33(2026-08-23):🎞️ 換星區的【滑進滑出】
   —— ‹ › / 鍵盤左右鍵 / 手機左右滑,三個入口共用同一段動畫。
   🔴 動的只有 `.lb-slide`(星區名 / 大圖 / 說明 / 標籤 / 進度)。
      兩側箭頭與活動橫幅不在裡面 —— 它們不隨星區換,跟著滑會變成整個畫面在晃。
   🔴 舊的那份是【複製品】(.ghost):絕對定位、不佔版面 → 高度不同的兩區切換時
      不會把下面的按鈕頂上頂下。
   ================================================================ */
/* 🔴 這裡【不要】加 `overflow: hidden` —— 大卡片的內容本來就允許溢出一點點
   (小螢幕上進度條會超出約 34px);加了會把進度條裁掉。滑出畫面的裁切交給
   `.lobby`(它已經是 position:fixed + overflow:hidden 的整屏容器)。 */
.lb-slide {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.lb-slide.ghost {
  position: absolute; left: 0; right: 0; top: var(--ghost-top, 0px);
  pointer-events: none; z-index: 1;
}
/* --dir:+1 = 切到下一區(新的從右邊進來、舊的往左出去);-1 = 反過來 */
@keyframes secIn  { from { opacity: 0; transform: translateX(calc(var(--dir, 1) *  34%)); } to { opacity: 1; transform: none; } }
@keyframes secOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateX(calc(var(--dir, 1) * -34%)); } }
.lb-slide.slidein { animation: secIn  var(--sec-slide, .22s) cubic-bezier(.22,.61,.36,1); }
.lb-slide.ghost   { animation: secOut var(--sec-slide, .22s) cubic-bezier(.22,.61,.36,1) forwards; }
/* 👆 拖曳跟手中:關掉動畫,transform 由 JS 直接寫 inline */
.lb-slide.dragging { animation: none; }
.lb-slide.snapback { transition: transform .18s ease; }

/* ♿ 會暈的人:直接換內容,不做位移動畫(ghost 也不要出現) */
@media (prefers-reduced-motion: reduce) {
  .lb-slide.slidein { animation: none; }
  .lb-slide.ghost { display: none; }
}

/* ===== v2.37:⚔️ 單件積分 · 🎖️ 全身共鳴 · 📈 養成結果 · 💎 寶石工坊 ===== */

/* ⚔️ 積分:部位格與背包格都標一個 —— 「哪一件在拖後腿」不用點進去六次才看得出來 */
.gcell .csc { font-style: normal; color: var(--ally-soft); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.bcell .bsc {
  font-size: 10px; color: var(--ally-soft); font-variant-numeric: tabular-nums;
  letter-spacing: -.3px; line-height: 1.1;
}

/* 🎖️ 全身共鳴 —— 🔴 常駐、不收合(它是「引誘平均養」的本體,收起來等於沒做) */
.gres {
  margin: 4px 0 10px; padding: 8px 10px; border-radius: 12px; font-size: 12px;
  background: linear-gradient(135deg, rgba(255,214,102,.12), rgba(53,230,255,.08));
  border: 1px solid rgba(255,214,102,.34);
}
.gres.off { background: rgba(255,255,255,.04); border-color: var(--line); }
.rs-h { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.rs-h b { font-size: 12px; }
.rs-s { color: var(--dim); font-size: 10px; }
.rs-v {
  margin-left: auto; font-size: 15px; font-weight: 800; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.rs-v i { font-size: 10px; font-style: normal; color: var(--ok); }
.rs-v.off { font-size: 12px; color: var(--dim); font-weight: 600; }
.rs-l {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 4px 6px; margin-bottom: 4px; border-radius: 8px; background: rgba(0,0,0,.24);
}
.rs-l.warn { background: rgba(255,92,114,.12); }
.rs-k { flex: 0 0 auto; font-size: 10px; }
.rs-k b { color: var(--gold); font-size: 12px; }
.rs-b { flex: 0 0 auto; color: var(--ok); font-variant-numeric: tabular-nums; font-size: 12px; }
.rs-w { flex: 1 1 160px; min-width: 0; color: var(--dim); font-size: 10px; line-height: 1.5; }
.rs-w b { color: var(--ally-soft); }
.rs-l .mini { flex: 0 0 auto; padding: 4px 8px; font-size: 10px; }
.rs-n { margin: 4px 0 0; color: var(--dim); font-size: 10px; line-height: 1.5; }

/* 📈 養成結果面板 —— 🔴 z-index 比 #item(30)高、比 #ask(50)與 .enhfx(60)低(爆字要蓋在它上面) */
#growth { z-index: 42; }
.growthpanel { max-width: 380px; max-height: 88vh; overflow: auto; }
.grbody { font-size: 12px; }
.grrow {
  display: flex; align-items: center; gap: 8px; padding: 6px 9px; margin-bottom: 4px;
  background: rgba(255,255,255,.04); border-radius: 8px; border-left: 3px solid transparent;
}
.grrow.up { border-left-color: var(--up); }
.grrow.down { border-left-color: var(--down); }
.grrow.same { opacity: .55; }
.grk { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--dim); }
.grv { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.grv i { font-style: normal; color: var(--dim); font-size: 12px; }
.grv em { font-style: normal; color: var(--dim); font-size: 10px; }
.grv b { font-size: 12px; color: var(--txt); }
.grd {
  flex: 0 0 52px; text-align: right; font-size: 12px; font-weight: 700;
  font-variant-numeric: tabular-nums; color: var(--dim);
}
.grrow.up .grd { color: var(--up); }
.grrow.down .grd { color: var(--down); }
.grrow.up .grv b { color: var(--up); }
.grnote { margin: 6px 0 0; font-size: 10px; color: var(--dim); line-height: 1.6; }
.grnote b { color: var(--gold); }
.grops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.grops .mini { flex: 1 1 auto; text-align: center; }
.grops .mini i { font-style: normal; color: var(--dim); font-size: 10px; margin-left: 3px; }
.growthopt {
  display: flex; align-items: center; gap: 6px; margin-top: 9px;
  font-size: 10px; color: var(--dim); cursor: pointer;
}
/* 大成功 / 超大成功 / 升品階:標題那一行的顏色跟著爆字走(同一件事不要有兩套配色) */
.grbody.crit .grrow.up .grv b { color: var(--gold); }
.grbody.super .grrow.up .grv b { color: var(--gold); }
.grbody.up .grrow.up .grv b { color: var(--up); }
/* 🔨 v2.38 失敗:留在同一個面板換內容(關掉再開就是使用者說的「一直開關」)*/
.grbody.fail .grrow { background: rgba(255, 95, 109, .08); }
.grbody.fail .grrow.up .grd { color: var(--gold); }   /* 失敗時唯一「變好」的是保底 → 用金色不是綠色 */

/* 💎 寶石工坊 —— 🔴 z-index 比 #item(30)高一點就好(它是從裝備頁按下去的) */
#gembench { z-index: 36; }
#nickname { z-index: 36; }
.benchpanel { max-width: 400px; max-height: 90vh; overflow: auto; }
.gbtop { margin-bottom: 10px; }
.gbsum {
  font-size: 12px; color: var(--dim); margin-bottom: 6px;
  background: rgba(0,0,0,.24); border-radius: 8px; padding: 5px 8px;
}
.gbsum b { color: var(--ally-soft); font-variant-numeric: tabular-nums; }
.gbtop .mini.wide { width: 100%; margin-bottom: 5px; }
.gbnote { margin: 2px 0 0; font-size: 10px; color: var(--dim); line-height: 1.6; }
.gbbody { font-size: 12px; }
.gbtype {
  margin-bottom: 8px; padding: 6px 8px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
}
.gbt-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12px; }
.gbt-h em { font-style: normal; margin-left: auto; font-size: 10px; color: var(--dim); }
.gbrow { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.gbrow.can { color: var(--ally-soft); }
.gbl { flex: 0 0 62px; font-size: 12px; font-variant-numeric: tabular-nums; }
.gbl .mx { font-style: normal; font-size: 10px; color: var(--gold); }
.gbv { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.gbq { flex: 0 0 34px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
.gbb { flex: 0 0 auto; }
.gbb.dim { font-size: 10px; color: var(--dim); }
.gbb i { font-style: normal; font-size: 10px; color: var(--dim); margin-left: 2px; }

/* ================================================================
   📱 v2.34:手機版面收尾 & PWA
   放在檔尾 = 刻意覆蓋前面的規則(後者勝出)。每一條都寫清楚「在哪支手機上會壞」。
   ================================================================ */

/* ---- ① 動態視窗高度:手機瀏覽器的網址列會伸縮 ----
   🔴 `position: fixed; inset: 0` 對齊的是【大視窗】(URL bar 收起來時的高度)——
   所以在瀏覽器裡開(還沒加到主畫面)時,大廳底部那排功能列會被網址列 / 工具列蓋掉一截,
   iOS Safari 尤其明顯(底部工具列 ~50px)。`dvh` 會跟著目前狀態縮放,兩種狀態都貼齊。
   ⚠️ 這裡不用擔心「捲動時 dvh 跳動」—— 本遊戲整頁不捲(body overflow:hidden + touch-action:none),
      網址列不會伸縮,dvh 是穩定值。
   ⚠️ 只能設 height:不要同時改 inset,`top` + `height` + `bottom` 三者都有值時 bottom 會被忽略,
      正好是我們要的(從上往下量 100dvh)。 */
@supports (height: 100dvh) {
  /* 📺 v3.86 改成跟著 #portraitRoot(它扣掉了廣告列;contain 讓這些 fixed 層以它為容器) */
  #game, #hud, .lobby, .overlay, .loadmask, .rotate { height: 100%; }
}

/* ---- ② HUD 底部要讓開 home indicator ----
   🔴 iPhone(X 以後)底部那條白線佔 34px,原本 `.hud-bottom { bottom: 12px }` 會把
   經驗條 + 技能格排在它底下 —— 手指去點技能格會被系統攔去做「回主畫面」。
   `.lobby` 早就有 `env(safe-area-inset-bottom)`,漏的是戰鬥中的 HUD。 */
.hud-bottom { bottom: calc(env(safe-area-inset-bottom) + 12px); }
/* 🏳️ 撤退 / ⏸ 暫停在 `#hud` 內,`#hud` 的 padding-top 已含 safe-area-inset-top → 不用再補 */

/* ---- ③ iOS 的表單自動放大 ----
   🔴 iOS Safari 只要輸入框的 `font-size < 16px`,聚焦時就會把整個畫面放大,
   而且**放大之後不會自己縮回來** —— 玩家綁完帳號會發現版面歪掉、要自己用兩指縮小。
   `user-scalable=no` 從 iOS 10 起被忽略,擋不住這件事,唯一的解就是 16px。
   只對觸控裝置改(桌機維持原本的小字,不然設定面板會被撐開)。 */
@media (pointer: coarse) {
  .accform input { font-size: 16px; }
}

/* ---- ④ 矮螢幕:中央卡片溢出時只能往下溢,不能往上 ----
   🔴 `.lb-main` 是 `justify-content: center`,內容比容器高的時候會**上下各溢出一半**,
   而 `.lobby` 是 `overflow: hidden` → 溢出的上半直接被裁掉。
   實測 360×560(= 360×640 的機器開著網址列)時,🌊 今日活動橫幅的上緣在 -16px,
   玩家看到的是一條被切一半的橫幅。`safe center` 的意思是「空間不夠時退回 flex-start」,
   讓它只往下溢 —— 下面是可以被壓縮的區塊,上面是切掉就沒了的資訊。 */
.lb-main { justify-content: safe center; }

/* ---- ⑤ 矮螢幕再擠一點(前面已有 max-height:620px 那段,這裡接著往下)---- */
@media (max-height: 560px) {
  .lb-art { font-size: 28px; margin: 0; }
  .artimg.big { width: 151px; height: 151px; }
  .lb-go { margin: 6px 0 2px; padding: 9px; font-size: 15px; }
  .lb-foot { display: none; }          /* 版本 / 帳號那行:設定頁裡看得到,矮螢幕先讓位 */
}

/* ---- ⑥ 手指點得到:資源列右邊那兩顆小鈕 ----
   🔴 💎 補給站 / ⚙️ 設定原本只有 30×22px,遠低於「可觸控目標」的建議值。
   🔴 **感應區只能往左右撐,不能往上下撐** —— 實測 375×812 時這兩顆是【上下相鄰】的
      (💎 在資源列第一行的最右、⚙️ 掉到第二行),中間只隔 5px。
      一開始各撐成 44×44,結果兩個感應區重疊了 16px,DOM 在後面的 ⚙️ 蓋掉 💎 的下半
      —— 點 💎 的下緣會開到設定。**「放大按鈕」本身就可能製造出新的誤點**,
      相鄰的按鈕要先量彼此的間距再決定撐多少。
   作法:間距先拉到 8px,上下各撐 4px(剛好貼齊、不重疊),左右可以放心撐(那一側是空的)。 */
@media (pointer: coarse) {
  .lb-cur { gap: 8px; }
  .lb-cur .cur.buy, .lb-cur .cur.prof { position: relative; padding: 7px 11px; }
  .lb-cur .cur.buy::after, .lb-cur .cur.prof::after {
    content: ''; position: absolute; left: -9px; right: -9px; top: -4px; bottom: -4px;
  }
}

/* ---- ⑦ 設定頁的補充說明(安裝步驟的第二行)---- */
.dimtip { display: inline-block; margin-top: 4px; font-size: 10px; color: var(--dim); line-height: 1.5; }
#setPwa b { color: var(--ally-soft); }

/* ---- ⑧ 面板 / 彈窗要讓開瀏海與 home indicator ----
   🔴 這條是**跟著 `apple-mobile-web-app-status-bar-style: black-translucent` 一起來的**:
   那個設定讓畫面延伸到狀態列底下(全螢幕比較好看),代價是**最上面 ~59px 會被狀態列蓋住**。
   實測 375×812:`#gear` 裝備面板的上緣在 y=32 → 標題與 ✕ 關閉鈕會被時間 / 訊號格壓住。
   `.lobby` 與 `#hud` 早就處理過了(它們有 `env(safe-area-inset-*)`),漏的是這一整批 overlay。

   兩件事一起做,少一件都不行:
   ① overlay 的 padding 加上安全區 —— 決定「面板最高能長到哪」
   ② 面板自己的 `max-height` 從 `vh` 換成 `dvh` 再扣掉安全區 ——
      🔴 `vh` 量的是【大視窗】(網址列收起來的高度),在瀏覽器裡開會比看得到的範圍還高。 */
.overlay {
  padding: calc(var(--sat) + 16px) 16px calc(env(safe-area-inset-bottom) + 16px);
}
/* 可用高度 = 目前視窗 − 上下安全區。不支援 dvh 的舊瀏覽器退回 100vh(= 原本的行為) */
:root { --vh-avail: calc(100vh - var(--ad-h)); }
@supports (height: 100dvh) {
  :root { --vh-avail: calc(100dvh - var(--ad-h) - var(--sat) - env(safe-area-inset-bottom)); }
}
.skillpanel, .gearpanel, .chestpanel, .shoppanel { max-height: calc(var(--vh-avail) * .92); }
.sheetbox                                        { max-height: calc(var(--vh-avail) * .92); }
.gempickpanel, .itempanel                        { max-height: calc(var(--vh-avail) * .90); }
.questpanel                                      { max-height: calc(var(--vh-avail) * .88); }
/* 面板【內部】的捲動區(背包 / 寶石袋 / 星區清單)也是同一個道理。
   ⚠️ `.gbag` 在前面**被宣告了兩次**(40vh 然後 34vh)—— 同特異度後者勝出,
   所以這裡要對齊的是 **.34 不是 .40**。搬 vh → dvh 這種「整批換算」的動作,
   一定要先確認每個 selector【實際生效】的是哪一條,不能只看第一次出現的那個值。 */
.gbag  { max-height: calc(var(--vh-avail) * .34); }
.gembag { max-height: calc(var(--vh-avail) * .30); }
.sclist { max-height: calc(var(--vh-avail) * .60); }

/* v3.2 月卡的頭像框(大廳 / 個人面板 / 裝備頁三顆頭像共用;class 由 app.js 的 paintPassFrame 加上)
   補給合約 = 綠框(月卡生效中)· 艦橋權限 = 金框 + 稱號。只加外框,不改頭像本身。 */
.av.pf-basic, .mc-av.pf-basic, .gav.pf-basic { box-shadow: 0 0 0 2px var(--green); }
.av.pf-elite, .mc-av.pf-elite, .gav.pf-elite { box-shadow: 0 0 0 2px var(--gold), 0 0 8px rgba(255, 214, 102, .45); }
/* 掃蕩批次按鈕(.pk)裡的「月卡」膠囊:.pk em 會把字染成金色,疊在淺青底上幾乎看不見 —— 這裡把字色改回 .tagm 原本的深色 */
.pk em.tagm { color: var(--bg); }
.pass-title {
  display: inline-block; margin-left: 6px; padding: 0 6px; vertical-align: middle;
  border: 1px solid var(--gold); border-radius: var(--r-pill);
  color: var(--gold); font-size: var(--fs-caption); font-style: normal; font-weight: 600;
}

/* v3.11: tactical reference, shared by launch and pause. */
.guide-open { width: 100%; min-height: 44px; margin-top: var(--sp-2); }
#guide { z-index: 60; }
.guidepanel { width: 100%; max-width: 640px; max-height: calc(var(--vh-avail) - 32px); display: flex; flex-direction: column; overflow: hidden; text-align: left; }
.guidepanel > .it-head { flex: none; }
#guideTitle { font-size: var(--fs-heading); }
.guidepanel .xbtn { width: 44px; height: 44px; }
.guide-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); margin-top: var(--sp-3); flex: none; }
.guide-tabs button { min-width: 0; min-height: 44px; color: var(--muted); border: 1px solid var(--line); background: var(--panel2); border-radius: var(--r-ctl); font-size: var(--fs-body); }
.guide-tabs button[aria-pressed="true"] { color: var(--cyan); border-color: var(--cyan); }
.guidepanel > .hint { margin: var(--sp-3) 0; flex: none; }
.guide-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: var(--sp-2); }
.guide-card { min-width: 0; padding: var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--panel2); }
.guide-card h3 { color: var(--ink); font-size: var(--fs-title); margin: 0; }
.guide-card p { margin: var(--sp-2) 0 0; font-size: var(--fs-body); line-height: 1.6; color: var(--muted); overflow-wrap: anywhere; }
.guide-weapon { display: flex; align-items: center; gap: var(--sp-3); }
.guide-weapon > div { min-width: 0; flex: 1; }
.guide-weapon .artimg { width: 44px; height: 44px; object-fit: contain; flex: none; }
.guide-card summary { display: flex; align-items: center; min-height: 44px; margin-top: var(--sp-2); color: var(--cyan); font-size: var(--fs-body); cursor: pointer; }
.guide-card summary::before { content: '+'; margin-right: var(--sp-2); }
.guide-card details[open] > summary::before { content: '−'; }
.guide-milestone b, .guide-cap { color: var(--gold); font-size: var(--fs-body); }
.guide-cap { display: block; margin-top: var(--sp-2); }
.guide-evolution { margin-top: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--violet); }
.guide-evolution > b { color: var(--violet); font-size: var(--fs-body); }
@media (min-width: 720px) { .guide-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

/* v3.12: searchable tactical markers, without changing card order. */
.guide-search { margin-top: var(--sp-3); flex: none; }
.guide-search > input { display: block; width: 100%; min-width: 0; min-height: 44px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel2); color: var(--ink); font-size: var(--fs-body); }
.guide-search > input::placeholder { color: var(--muted); }
.guide-search > label { display: flex; align-items: center; gap: var(--sp-2); min-height: 44px; font-size: var(--fs-body); color: var(--muted); }
.guide-search > label input { width: 16px; height: 16px; margin: 0; accent-color: var(--cyan); }
.guide-status { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.guide-status > span { min-width: 0; flex: 1; font-size: var(--fs-caption); color: var(--muted); }
.guide-status > button { width: auto; padding: 0 var(--sp-3); min-height: 44px; flex: none; font-size: var(--fs-body); }
.guide-marker { width: 100%; min-height: 44px; margin-top: var(--sp-2); font-size: var(--fs-body); border-radius: var(--r-ctl); border: 1px solid var(--line); background: transparent; color: var(--cyan); }
.guide-marker[aria-pressed="true"] { border-color: var(--cyan); background: var(--panel-flat); }
.card-target { display: block; margin-top: var(--sp-1); color: var(--green); font-size: var(--fs-caption); }

/* v3.13: next mission preparation remains an explicit choice. */
.result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-2); }
#btnNextStage { grid-column: 1 / -1; }
#rNextHint, #rTransitionStatus { grid-column: 1 / -1; margin: 0; font-size: var(--fs-body); overflow-wrap: anywhere; }

/* v3.14: preparation, comparison and battle information share the same visual hierarchy. */
.overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }
.overview-grid > div { min-width:0; background:var(--panel2); border:1px solid var(--line); border-radius:var(--r-ctl); padding:12px; }
.overview-grid small { display:block; font-size:var(--fs-caption); color:var(--muted); margin-bottom:4px; }
.overview-grid b { display:block; font-size:var(--fs-title); color:var(--gold); overflow-wrap:anywhere; }
.tactical-brief { padding:12px; border-left:2px solid var(--cyan); background:var(--panel2); color:var(--ink); font-size:var(--fs-body); line-height:1.6; }
.plan-select { display:flex; gap:12px; align-items:center; font-size:var(--fs-body); color:var(--muted); }
.plan-select select { flex:1; min-width:0; }
.plan-select select, .inventory-filters select, .inventory-filters input[type=search] { min-height:44px; padding:8px 12px; color:var(--ink); background:var(--panel2); border:1px solid var(--line); border-radius:var(--r-ctl); font:inherit; }
.growth-table { display:grid; gap:4px; margin:8px 0; }
.growth-table > div { display:grid; grid-template-columns:48px minmax(0,1fr); gap:8px; padding:8px; background:var(--panel2); border-radius:var(--r-ctl); font-size:var(--fs-body); }
.growth-table b { color:var(--gold); }
#guide .guidepanel { gap:8px; }
#guide .guide-rule, #guideRule { margin:4px 0; }
#guideList { min-height:0; }
#guide .guide-search label, .inventory-filters label { min-height:44px; display:flex; align-items:center; gap:8px; }
#pause .pausepanel { max-width:640px; max-height:calc(var(--vh-avail, 100vh) - 24px); overflow-y:auto; }
.pause-build { display:grid; gap:8px; margin:12px 0; }
.build-card { display:flex; align-items:flex-start; gap:12px; border:1px solid var(--line); background:var(--panel2); border-radius:var(--r-ctl); padding:12px; }
.build-card > .artimg { width:44px; height:44px; flex-shrink:0; }
.build-card > div { min-width:0; flex:1; }
.build-card b { font-size:var(--fs-title); }
.build-card strong { display:block; font-size:var(--fs-body); color:var(--gold); margin:4px 0; }
.build-card p { font-size:var(--fs-body); line-height:1.6; margin:4px 0; color:var(--muted); }
.build-card small { font-size:var(--fs-caption); color:var(--violet); }
#pause .sh-actions { position:sticky; bottom:0; padding:12px 0; background:var(--panel-flat); }
.utility-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:16px 0; }
.utility-actions button, #btnHistoryClose, #btnGuideClose, #pause button, .qgo { min-height:44px; }
.history-panel { width:min(640px,100%); max-height:calc(var(--vh-avail, 100vh) - 24px); overflow:auto; }
#history, #tut { z-index:70; }
.history-row { border:1px solid var(--line); border-radius:var(--r-card); padding:12px; margin:8px 0; background:var(--panel2); font-size:var(--fs-body); overflow-wrap:anywhere; }
.history-row small { display:block; color:var(--muted); margin-top:4px; }
.history-state { display:inline-block; border-radius:var(--r-pill); background:var(--panel-flat); color:var(--muted); padding:4px 8px; margin-top:8px; font-size:var(--fs-caption); }
.history-state.verified { color:var(--green); }
.history-row summary { min-height:44px; display:flex; align-items:center; color:var(--cyan); cursor:pointer; }
.inventory-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; font-size:var(--fs-body); }
.inventory-filters input[type=search] { grid-column:1 / -1; width:100%; }
.inventory-filters > * { min-width:0; }
#bagCount { display:flex; align-items:center; color:var(--muted); }
.item-compare { border:1px solid var(--line); border-radius:var(--r-card); padding:12px; margin:12px 0; font-size:var(--fs-body); }
.item-compare > div { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:8px 0; border-bottom:1px solid var(--line); }
.item-compare b, .item-compare span { overflow-wrap:anywhere; }
.item-compare > div:first-child { color:var(--muted); font-size:var(--fs-caption); }
.item-compare > div b:last-child { color:var(--gold); }
.unlock-summary { padding:12px; background:var(--panel2); border:1px solid var(--green); border-radius:var(--r-ctl); color:var(--green); font-size:var(--fs-body); line-height:1.6; }
.bmk .svgi, .upmk .svgi { width:12px; height:12px; }
#resultHealth { margin:12px 0; }
#settings .setrow button { min-width:44px; min-height:44px; }
#lchMission { border-radius:var(--r-card); }
@media (min-width:600px) { #launchSummary { grid-template-columns:repeat(3,minmax(0,1fr)); } .sweep-overview { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:390px) { .guide-status { flex-wrap:wrap; } #guide .guidepanel { padding:12px; } .guide-search { gap:4px; } .guide-search input[type=search] { min-width:0; } }

.result-shortcuts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.result-shortcuts button { min-height:44px; min-width:0; padding:8px; font-size:var(--fs-body); }

.xbtn { min-width:44px; min-height:44px; }
#launch button, #guide button, #gear .mini, #item .mini, #quest button, #sweep button, #settings button, #gear .gtab { min-height:44px; }
.overlay summary { min-height:44px; padding-top:12px; padding-bottom:12px; box-sizing:border-box; }
.pause-details { margin:8px 0; font-size:var(--fs-body); }
.pause-details summary { color:var(--cyan); cursor:pointer; }
.lb-go { min-height:56px; border-radius:var(--r-card); }
.lb-cur { align-items:center; }
.lbSecProg, #lbSecProg { font-size:var(--fs-body); }
#cardList .card { border-radius:var(--r-card); }
#cardSlots .psrow { min-width:0; }

#gResPill { min-width:44px; min-height:44px; }
.slot-summary { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 12px; font-size:var(--fs-caption); color:var(--muted); margin:8px 0 0; }
.psl .artimg { width:24px; height:24px; object-fit:contain; }

#launchSummary > div:last-child { grid-column:1 / -1; }
@media (min-width:600px) { #launchSummary > div:last-child { grid-column:span 2; } }

#pause .pausepanel #pauseBuild { grid-template-columns:minmax(0,1fr); justify-content:stretch; text-align:left; margin:12px 0; }

/* v3.15 equipment presets and presentation controls */
.loadout-row { padding: var(--sp-3) 0; border-bottom: 1px solid var(--panel2); }
.loadout-row > span { margin-left: var(--sp-2); font-size: var(--fs-body); }
.loadout-row .utility-actions { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-2); }
.loadout-row button { min-height: 44px; }
.loadout-row .utility-actions button { width: auto; flex: 1 1 80px; padding: var(--sp-2); margin-top: 0; }
.bag-favorite { display: flex; align-items: center; min-height: 44px; gap: var(--sp-2); }
.setrow input[type=range] { width: 104px; min-height: 44px; accent-color: var(--cyan); }
.setrow output { width: 40px; text-align: right; font-size: var(--fs-body); }
.setrow select { min-height: 44px; max-width: 128px; background: var(--panel2); color: var(--ink); border-radius: var(--r-ctl); }
.reduced-effects .overlay, .reduced-effects .bossalert, .reduced-effects .hurt-flash { animation: none !important; transition: none !important; }
.reduced-effects #hurtFx { display: none; }
.reduced-effects *, .reduced-effects *::before, .reduced-effects *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
.loadout-row details { margin-top: var(--sp-2); font-size: var(--fs-body); color: var(--muted); }
.loadout-row summary { min-height: 44px; display: flex; align-items: center; }
.loadout-row ul { padding-left: var(--sp-4); }
/* v3.16: practice, analysis and performance review use existing UI scales. */
.practice-form { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:var(--sp-2);align-items:center;margin-block:var(--sp-4); }
.practice-form select { width:100%;min-width:0;min-height:44px;background:var(--panel2);color:var(--ink);border:1px solid var(--line);border-radius:var(--r-ctl);padding:var(--sp-2);font-size:var(--fs-body); }
.analysis-row { display:flex;flex-wrap:wrap;gap:var(--sp-2);justify-content:space-between;padding-block:var(--sp-2);font-size:var(--fs-body); }
.analysis-row meter { flex-basis:100%;width:100%;height:var(--sp-2);accent-color:var(--cyan); }
.perf-controls { padding-block:var(--sp-3); }
.gp-btns { flex-wrap:wrap; }
#btnSettlementRetry { min-height:44px;width:100%; }

.rstars[hidden], #btnSettlementRetry[hidden] { display:none; }

/* v3.17: quiet empty lists and account cosmetics, use existing design tokens. */
#bootLogo { animation: none; filter: none; }
#bootLogo .artimg { width: min(256px, 72vw); height: auto; aspect-ratio: 512 / 160; }
.avatar-picker { margin-top: var(--sp-2); }
.avatar-picker summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--cyan); font-size: var(--fs-body); }
.avatar-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-2); }
.avatar-choice { min-width: 0; min-height: 44px; display: flex; flex-direction: column; gap: var(--sp-1); align-items: center; padding: var(--sp-2); }
.avatar-choice .artimg { width: 64px; height: 64px; object-fit: contain; }
.avatar-choice[aria-pressed="true"] { border-color: var(--cyan); background: var(--panel2); }
.empty-state { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: var(--sp-2); padding: var(--sp-4); color: var(--muted); text-align: center; font-size: var(--fs-body); }
.empty-state .empty-art { width: 64px; height: 64px; object-fit: contain; opacity: .7; }
.empty-state p { margin: 0; }

#settings > .panel { max-height: calc(var(--vh-avail) - 32px); overflow-y: auto; }

.practice-plan { display: flex; align-items: center; gap: var(--sp-2); margin: var(--sp-2) 0; font-size: var(--fs-body); }
.practice-plan b { flex: 1; min-width: 0; }
.practice-plan button { min-height: 44px; }

.board-panel { max-height: calc(var(--vh-avail) - 32px); overflow-y: auto; }
.board-row { display: grid; grid-template-columns: 32px minmax(0,1fr) 48px 48px; align-items: center; gap: var(--sp-2); padding: var(--sp-3); border-bottom: 1px solid var(--line); font-size: var(--fs-body); }
.board-row span { min-width: 0; overflow-wrap: anywhere; }
.board-row strong { color: var(--gold); }
.board-row small { color: var(--muted); font-size: var(--fs-caption); }
.board-me { background: var(--panel2); }
#endlessBoard button { min-height: 44px; }

/* Phone portrait is the shared playfield, including desktop preview. */
body { display: flex; justify-content: center; }
#portraitRoot { position: relative; width: min(100%, 480px, calc((100vh - var(--ad-h)) * .625)); height: calc(100% - var(--ad-h)); margin-top: var(--ad-h); overflow: hidden; contain: layout paint; }
@supports (height: 100dvh) { #portraitRoot { width: min(100%, 480px, calc((100dvh - var(--ad-h)) * .625)); height: calc(100dvh - var(--ad-h)); } }
#setShakeStrength:disabled { opacity: .4; }

#portraitRoot .guide-list { grid-template-columns: minmax(0, 1fr); }

#portraitRoot .hud-bottom { left: 12px; right: 12px; transform: none; max-width: none; }
#setShake, #portraitRoot .setrow .mini, #portraitRoot .setrow input[type=range] { min-height: 44px; }
.boss-cast { color:var(--gold); font-size:var(--fs-body); margin-top:4px; line-height:1.4; }
.encounter-hud { position:absolute; top:calc(84px + var(--sat)); left:12px; right:12px; padding:8px 12px; border:1px solid var(--gold); border-radius:var(--r-ctl); background:var(--battle-hint-bg); color:var(--gold); font-size:var(--fs-body); line-height:1.5; text-align:center; pointer-events:none; z-index:15; }
#hBoss:not([hidden]) + .encounter-hud { top:calc(174px + var(--sat)); }

/* Portrait launch intel and compact combination progress. */
.stage-intel { margin-top:12px; border-top:1px solid var(--line); }
.stage-intel summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:var(--cyan); font-size:var(--fs-body); }
.stage-intel summary::before { content:'+'; margin-right:8px; }
.stage-intel[open] summary::before { content:'−'; }
.stage-intel p { margin:8px 0; overflow-wrap:anywhere; }
.stage-intel small { display:block; margin:8px 0; }
.intel-map { display:block; width:100%; max-height:160px; }
.intel-bound { fill:var(--panel-flat); stroke:var(--line); stroke-width:2; }
.intel-obstacle,.intel-cover { fill:var(--muted); }
.intel-barrel { fill:var(--gold); }
.intel-hazard { fill:var(--bad); opacity:.65; }
.intel-supply { fill:var(--green); }
.intel-player { fill:var(--cyan); }
 .combo-guide { margin-top:var(--sp-3); padding-top:var(--sp-2); border-top:1px solid var(--line); }
.combo-guide-head { display:grid; gap:var(--sp-1); margin-bottom:var(--sp-2); font-size:var(--fs-caption); color:var(--muted); }
.combo-guide-head b { font-size:var(--fs-body); color:var(--ink); }
.combo-progress { display:grid; gap:var(--sp-1); margin:var(--sp-2) 0; padding:var(--sp-2); border:1px solid var(--line); border-radius:var(--r-ctl); background:var(--panel2); font-size:var(--fs-caption); overflow-wrap:anywhere; }
.combo-progress p { margin:0; line-height:1.5; }
.combo-title { display:flex; justify-content:space-between; align-items:baseline; gap:var(--sp-2); }
.combo-title b { font-size:var(--fs-body); color:var(--ink); }
.combo-title span { flex-shrink:0; color:var(--muted); }
.combo-progress.active { border-color:var(--green); }
.combo-progress.active .combo-title span { color:var(--green); }
.combo-progress.ready { border-color:var(--gold); }
.combo-progress.ready .combo-title span, .combo-missing { color:var(--gold); }
.combo-recipe { color:var(--muted); }
.combo-effect { color:var(--ink); }
.card-combo-hint { margin-top:var(--sp-2); padding-top:var(--sp-1); border-top:1px solid var(--line); font-size:var(--fs-caption); line-height:1.5; color:var(--gold); }

.combo-info { border-color:var(--gold); }

/* [codex] 2026-10-11: power attribution and concrete growth navigation. */
#powerDetail { z-index: 28; }
.power-panel { max-width: 560px; max-height: calc(var(--vh-avail) * .92); overflow: auto; }
.power-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.power-header h2 { margin: 0; font-size: var(--fs-heading); text-align: left; }
.power-header .xbtn { min-width: 44px; min-height: 44px; }
.power-total { display: flex; flex-direction: column; gap: 4px; margin: 16px 0; }
.power-total span, .power-muted, .power-source-heading span { color: var(--muted); font-size: var(--fs-caption); }
.power-total b { color: var(--gold); font-size: var(--fs-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.power-tip { padding: 12px; border: 1px solid var(--cyan); border-radius: var(--r-card); margin-bottom: 16px; }
.power-tip > b { display: block; margin: 4px 0 8px; font-size: var(--fs-title); }
.power-tip .primary { width: 100%; min-height: 44px; margin-top: 8px; }
.power-source-heading, .power-base { display: flex; justify-content: space-between; gap: 8px; margin: 12px 0; font-size: var(--fs-body); }
.power-source { border: 1px solid var(--line); border-radius: var(--r-card); margin-bottom: 8px; }
.power-source > summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; list-style: none; min-height: 44px; font-size: var(--fs-title); }
.power-source > summary::after { content: '›'; color: var(--cyan); grid-column: 4; grid-row: 1; justify-self: end; font-size: var(--fs-body); }
.power-source[open] > summary::after { content: '⌄'; }
.power-source > summary::-webkit-details-marker { display: none; }
.power-source > summary > span { min-width: 0; }
.power-source > summary small { display: block; color: var(--muted); font-size: var(--fs-caption); line-height: 1.5; margin-top: 4px; }
.power-source > summary b { font-size: var(--fs-title); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; text-align: right; }
.power-source-body { border-top: 1px solid var(--line); padding: 12px; font-size: var(--fs-body); }
.power-stats { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--ink); font-size: var(--fs-body); }
.power-stat { display: inline-flex; align-items: center; gap: 4px; }
.power-stats .svgi, .power-source > summary .svgi { flex: 0 0 auto; }
.power-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.power-item > div { flex: 1 1 160px; min-width: 0; }
.power-item p { margin: 4px 0; color: var(--muted); font-size: var(--fs-body); }
.power-item small { font-size: var(--fs-caption); }
.power-link { min-height: 44px; max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: transparent; color: var(--cyan); cursor: pointer; font-size: var(--fs-body); }
.power-tree { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.power-tree .power-stats { flex-basis: 100%; }
.power-note { color: var(--muted); font-size: var(--fs-body); line-height: 1.6; margin: 8px 0; }
.power-info { margin: 12px 0; font-size: var(--fs-body); }
.power-info > summary { cursor: pointer; min-height: 44px; padding: 12px 0; color: var(--cyan); }
.power-change { color: var(--up); font-size: var(--fs-body); }
.power-change.negative { color: var(--down); }
.power-change.unchanged { color: var(--muted); }
.power-acquire { border: 1px solid var(--line); border-radius: var(--r-card); padding: 12px; margin: 12px 0; font-size: var(--fs-body); }
.power-acquire .mini { min-height: 44px; }
.power-entry:focus-visible, .power-profile:focus-visible, .power-link:focus-visible, .power-source > summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }

/* [codex] v3.24: consistent close controls and one-row skill nodes. */
.overlay .panel { position: relative; }
.overlay-x { position: sticky; top: 0; margin-left: auto; display: block; z-index: 3; }
.gp-btns .mini { flex: 1 1 auto; white-space: normal; font-size: var(--fs-body); min-width: 0; }
.knode { grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; min-height: 48px; }
.knode .kn-ico { grid-column: 1; grid-row: 1; width: 40px; height: 40px; }
.knode .kn-ico img { width: 40px; height: 40px; }
.knode .kn-name { grid-column: 2; grid-row: 1; }
.knode .kn-gain { grid-column: 3; grid-row: 1; font-size: var(--fs-caption); }
.knode .kn-gain .artimg { width: 12px; height: 12px; }
.knode .kn-rank { grid-column: 4; grid-row: 1; font-size: var(--fs-caption); }

/* v3.24: one scrollbar and sticky footer in long full overlays. */
#pause { overflow: hidden; }
#pause .pausepanel { box-sizing: border-box; max-height: calc(var(--vh-avail) - 48px); }
#gear .sh-actions, #settings .sh-actions { position: sticky; bottom: -18px; z-index: 2; padding: 12px 0; background: var(--panel-flat); }
#btnZoom { right: 60px; }
.guide-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wsub { display: block; }
.knode .kn-name { overflow-wrap: anywhere; }
.knode .kn-gain { max-width: 112px; }
.k-head #btnSkillClose { order: 3; }
.gupnote small { display: block; }
#swBatch .pk.dim { opacity: 1; }
#swBatch .pk:disabled b { color: var(--ink); }
#swBatch .pk:disabled em.short { color: var(--red); }
.overlay .xbtn { background: var(--panel-flat); }
.overlay .panel > .ithead,
.overlay .panel > .it-head,
.overlay .panel > .sh-head,
.overlay .panel > .power-header,
.overlay .panel > .k-head {
  position: sticky; top: 0; z-index: 3; background: var(--panel-flat);
}

/* [claude code] 2026-10-12 v3.25: shop free reminder and locked mastery. */
#lbGem { position: relative; }
#lbGem .ndot { position: absolute; top: -4px; right: -4px; }
#lbGem .ndot:empty { display: none; }
.knode.mastery-locked { grid-template-columns: 40px minmax(0, 1fr) auto; }
.knode.mastery-locked .kn-gain { grid-column: 2; grid-row: 2; }
.knode.mastery-locked .kn-rank { grid-column: 3; grid-row: 1 / span 2; max-width: 100px; white-space: normal; }
.knode.mastery-locked.ult { border-color: var(--muted); background: transparent; }
.knode.mastery-locked.ult .kn-name { color: var(--muted); }

/* [claude code] v3.26 shared rules disclosure and pictorial gem results. */
.infobtn { min-width:44px; min-height:44px; width:44px; height:44px; flex:0 0 44px; display:inline-flex; align-items:center; justify-content:center; }
.infobtn .svgi { width:24px; height:24px; }
.info-head { display:flex; align-items:center; gap:8px; }
.info-head > b,.info-head > .k-title { flex:1; min-width:0; }
.info-head > h2 { flex:1; min-width:0; margin:0; }
.history-panel #btnHistoryClose { display:none; }
.panel-info-head { position:sticky; top:0; z-index:3; background:var(--panel-flat); margin-bottom:12px; }
.panel-info-head > h2 { flex:1; min-width:0; margin:0; }
.info-head > .overlay-x { position:static; margin:0; }
.k-head .kmenu { order:1; }
.k-head .infobtn { order:2; }
.infobox { text-align:left; overflow-wrap:anywhere; }
.infobox[hidden] { display:none; }
.kn-step { display:block; font-size:var(--fs-caption); color:var(--muted); margin-top:4px; }
.gem-results { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding:8px 0; }
.gem-result { position:relative; min-width:0; border:1px solid var(--line); border-radius:var(--r-ctl); padding:12px 8px 8px; text-align:center; }
.gem-result .artimg { display:block; width:48px; height:48px; margin:4px auto 8px; }
.gem-level { position:absolute; top:4px; right:4px; font-size:var(--fs-caption); color:var(--gold); }
.gem-result b { display:block; font-size:var(--fs-title); }
.grops .primary { width:100%; min-height:44px; }

.infobtn[hidden],.growthopt[hidden] { display:none; }
.knode .kn-gain { color:var(--gold); font-size:var(--fs-body); }

.grstatus { font-size:var(--fs-caption); color:var(--muted); line-height:1.65; margin:8px 0; }

/* [claude code] 2026-10-14 v3.27: compact mobile preparation and inventory. */
.launch-choice { margin:12px 0; border:1px solid var(--line); border-radius:var(--r-card); background:var(--panel2); padding:0 12px; }
.launch-choice > summary { display:flex; align-items:center; gap:12px; list-style:none; min-height:64px; cursor:pointer; }
.launch-choice > summary b { flex:1; min-width:0; font-size:var(--fs-title); color:var(--ink); overflow-wrap:anywhere; }
.launch-choice > summary span { flex:none; color:var(--cyan); font-size:var(--fs-body); }
.launch-choice[open] { padding-bottom:12px; }
.launch-brief { font-size:var(--fs-body); color:var(--ink); line-height:1.65; margin:8px 0; overflow-wrap:anywhere; }
.bag-quick { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; font-size:var(--fs-body); }
.bag-quick > * { min-width:0; }
.bag-quick select { min-height:44px; padding:8px; color:var(--ink); background:var(--panel2); border:1px solid var(--line); border-radius:var(--r-ctl); font:inherit; }
.bag-quick label { display:flex; align-items:center; gap:8px; min-height:44px; }
.bag-filters > summary { color:var(--cyan); font-size:var(--fs-body); cursor:pointer; }
.bag-filter-state { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:44px; font-size:var(--fs-body); color:var(--muted); }
.bag-filter-state .mini { min-height:44px; flex:none; }
#gearHint { background:var(--panel2); color:var(--cyan); border:1px solid var(--cyan); }
.erow:disabled { opacity:.6; cursor:wait; }
.result-actions .primary { grid-column:1 / -1; order:1; min-height:56px; }
.result-actions .secondary { order:2; min-height:44px; }
.result-actions { position:sticky; bottom:0; background:var(--panel-flat); padding:12px 0; z-index:2; }

/* Brief, non-interactive map title below the mission HUD. */
.map-name { position: absolute; top: calc(104px + var(--sat)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 8px 16px; border-radius: var(--r-card); background: var(--panel-flat); color: var(--ink); font-size: var(--fs-title); font-weight: 600; pointer-events: none; text-align: center; }
.map-name[hidden] { display: none; }

#hBoss:not([hidden]) ~ .map-name { top: calc(174px + var(--sat)); }

#hEncounter:not([hidden]) ~ .map-name { top: calc(144px + var(--sat)); }
#hBoss:not([hidden]) ~ #hEncounter:not([hidden]) ~ .map-name { top: calc(234px + var(--sat)); }

#cards > .cardpanel { max-height: calc(var(--vh-avail) - 32px); overflow-y: auto; }

.k-head #btnSkillReset { order:1; flex:0 0 auto; min-height:44px; }

/* Patrol capacity stays visible alongside the claim-ready state. */
.patrol-progress { grid-column: 1 / -1; width: 100%; height: 4px; margin-top: 4px; border: 0; border-radius: var(--r-pill); overflow: hidden; appearance: none; background: var(--panel2); color: var(--gold); }
.patrol-progress::-webkit-progress-bar { background: var(--panel2); }
.patrol-progress::-webkit-progress-value { background: var(--gold); border-radius: var(--r-pill); }
.patrol-progress::-moz-progress-bar { background: var(--gold); border-radius: var(--r-pill); }
.patrol-full .patrol-progress::-webkit-progress-value { background: var(--green); }
.patrol-full .patrol-progress::-moz-progress-bar { background: var(--green); }
.midbtn.patrol-full i { color: var(--green); }

.forge-title { color: var(--muted); font-size: var(--fs-caption); margin: 4px 0; }
.forge-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 8px; }
.forge-tabs button { min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--panel2); color: var(--cyan); font: inherit; }
.forge-tabs button.on { border-color: var(--cyan); }
.forge-refine { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.forge-refine button { min-height: 44px; white-space: normal; }
.forge-auto { width: 100%; color: var(--muted); font-size: var(--fs-body); }
.forge-auto summary { min-height: 44px; cursor: pointer; color: var(--cyan); }
.forge-auto label { display: inline-flex; align-items: center; min-height: 44px; margin-right: 12px; }
[data-forge-panel][hidden],#itOps [hidden] { display: none !important; }

#itOps [data-forge-action]{display:contents}

.difficulty-reward{font-size:var(--fs-body);color:var(--gold);margin:8px 0 12px;line-height:1.6;white-space:pre-line}
#pickDiff .pk{min-height:72px}

/* Chapter art remains interactive; all decorative layers ignore pointer input. */
/* v3.57: class selectors also style ID-free chapter transition snapshots. */
.lb-art{position:relative;isolation:isolate;width:fit-content;max-width:100%}
.lb-art[data-sector]{animation:none}
.lb-art .sector-motion{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;visibility:hidden}
.lb-art.sector-ready > img{visibility:hidden}
.lb-art.sector-ready .sector-motion{visibility:visible}
#tut .tut-actions{display:grid;gap:8px;margin-top:16px}

/* v3.58: two aligned header rows, with one shared panel and large touch targets. */
.lb-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px;gap:8px;align-items:center;box-sizing:border-box;padding:8px;background:var(--panel-flat);border:1px solid var(--line);border-radius:var(--r-card)}
.lb-top .lb-avatar{background:none;border:0;border-radius:var(--r-ctl);padding:4px;gap:8px;min-height:56px;width:100%;box-sizing:border-box}
.lb-top .lb-avatar .av{width:32px;height:32px}
.lb-top .lb-avatar .who{flex:1;gap:4px}
.lb-top .lb-avatar .who b{font-size:var(--fs-body);max-width:100%}
.lb-top .lb-avatar .lvline{gap:4px}
.lb-top .lb-avatar .xp{min-width:16px}
.lb-top .header-settings{display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:8px;color:var(--cyan);background:var(--panel2);border:1px solid var(--line);border-radius:var(--r-ctl)}
.lb-top .header-settings .svgi{width:20px;height:20px}
.lb-top .header-stamina{display:flex;flex-direction:column;gap:4px;justify-content:center;min-width:0;width:100%;min-height:56px;padding:4px 8px;box-sizing:border-box;background:var(--panel2);border:1px solid var(--line);border-radius:var(--r-ctl);font:inherit;color:var(--cyan);text-align:left;cursor:pointer}
.sta-amount{display:flex;align-items:center;gap:4px;width:100%;white-space:nowrap;font-size:var(--fs-body)}
.sta-amount .artimg{width:16px;height:16px}
.sta-amount b{color:var(--green)}
.sta-amount small{font-size:var(--fs-caption);font-weight:400;color:var(--muted)}
.sta-plus{margin-left:auto;font-size:var(--fs-title);line-height:1}
.sta-meter{display:block;width:100%;height:4px;overflow:hidden;background:var(--line);border-radius:var(--r-pill)}
.sta-meter>span{display:block;height:100%;background:var(--green);border-radius:inherit}
.sta-timing{display:flex;justify-content:space-between;gap:4px;width:100%;font-size:var(--fs-caption);font-variant-numeric:tabular-nums;line-height:1.2;color:var(--muted);white-space:nowrap}
.lb-top .lb-cur{grid-column:1/-1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;padding-top:8px;border-top:1px solid var(--line)}
.lb-top .lb-cur .cur{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;min-width:0;min-height:44px;box-sizing:border-box;padding:4px 8px;border:0;border-radius:var(--r-ctl);background:var(--panel2)}
.lb-top .wallet-label{font-size:var(--fs-caption);font-weight:400;line-height:1;color:var(--muted)}
.lb-top .wallet-value{display:flex;align-items:center;gap:4px;font-size:var(--fs-body);font-variant-numeric:tabular-nums;font-weight:600;line-height:1.2;white-space:nowrap}
.lb-top .lb-cur .gem{position:relative;color:var(--cyan)}
.lb-top #lbGem .ndot{right:4px;top:4px}
.lb-top button:hover{border-color:var(--cyan);background:var(--panel2)}
.lb-top button:focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
@media(max-height:600px){.lb-top{padding:4px;gap:4px}.lb-top .lb-avatar,.lb-top .header-stamina{min-height:44px}.lb-top .lb-cur{padding-top:4px}.lb-top .lb-cur .cur{gap:4px}.lb-top .sta-meter{display:none}}
@media(max-height:780px){.lobby .lb-art>.artimg.big{width:clamp(144px,calc(100dvh - 520px),240px);height:clamp(144px,calc(100dvh - 520px),240px)}}

/* v3.59: explicit resource shortcuts and a bounded combination announcement. */
.lb-top .resource-shortcut{cursor:pointer;font:inherit;position:relative}
.lb-top .resource-shortcut::after{content:'›';position:absolute;right:8px;top:8px;color:var(--cyan);font-size:var(--fs-body)}
.resource-balance{font-size:var(--fs-heading);color:var(--gold);font-variant-numeric:tabular-nums;margin:16px 0}
.resource-actions{display:grid;gap:8px}


.combo-notice{position:absolute;top:84px;left:50%;transform:translateX(-50%);width:calc(100% - 32px);max-width:360px;box-sizing:border-box;display:grid;gap:4px;padding:12px;background:var(--panel);border:1px solid var(--gold);border-radius:var(--r-card);pointer-events:none;text-align:center}
.combo-notice[hidden]{display:none}
.combo-notice b{font-size:var(--fs-title);color:var(--gold)}
.combo-notice span{font-size:var(--fs-body);line-height:1.4;color:var(--txt)}

/* Three doctrines are comparable before spending stamina. */
.depth-loadout { margin-top:16px; padding:12px; background:var(--panel2); border:1px solid var(--line); border-radius:var(--r-card); }
.depth-picks { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
.depth-picks .pk { text-align:left; padding:12px; min-height:44px; border:1px solid var(--line); border-radius:var(--r-ctl); background:var(--panel); color:var(--ink); }
.depth-picks .pk.on { border-color:var(--cyan); background:var(--panel2); box-shadow:inset 0 0 0 1px var(--cyan); }
.depth-picks b { display:block; font-size:var(--fs-body); }
.depth-picks small { display:block; font-size:var(--fs-body); color:var(--muted); line-height:1.5; margin-top:4px; }
#hDoctrine { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--gold); }

#hDoctrine[data-tactic="guard"] { color:var(--ally); }
#hDoctrine[data-tactic="pierce"] { color:var(--gold); }
#hDoctrine[data-tactic="control"] { color:var(--violet); }

/* ================================================================
   v3.77 🎫 月卡頁(#pass)
   ================================================================ */
#pass > .panel { max-height: calc(var(--vh-avail) - 32px); overflow-y: auto; }
.passbody { display: flex; flex-direction: column; gap: var(--sp-3); }
.passbody h3 { margin: 0 0 var(--sp-2); font-size: var(--fs-title); }
.ptoday {
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-3);
  display: flex; flex-direction: column; gap: var(--sp-2);
}
.ptoday.ready { border-color: rgba(255,214,102,.6); }
.ptoday-gets { display: flex; flex-wrap: wrap; gap: var(--sp-2); font-size: var(--fs-body); }
.ptoday-gets span { background: rgba(255,255,255,.06); border-radius: var(--r-pill); padding: 2px var(--sp-2); }
.ptoday-off { margin: 0; color: var(--muted); font-size: var(--fs-body); }
.pcards { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-2); }
@media (max-width: 380px) { .pcards { grid-template-columns: minmax(0, 1fr); } }
.pcard {
  min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); align-items: stretch;
  background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--sp-2);
}
.pcard.t2 { border-color: rgba(255,214,102,.45); }
.pcard.on { box-shadow: 0 0 0 1px var(--green) inset; }
.pcard-art { height: 88px; display: flex; align-items: center; justify-content: center; }
.pcard-art .artimg { width: 100%; height: 88px; object-fit: contain; }
.pcard-art .svgi { width: 40px; height: 40px; }
.pcard b { font-size: var(--fs-title); }
.pcard.t2 b { color: var(--gold); }
.pcard small { font-size: var(--fs-caption); color: var(--muted); }
.pcard .pcard-st { color: var(--ink); }
.pcard.on .pcard-st { color: var(--green); }
.ptable-wrap { min-width: 0; }
.ptable { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-caption); }
.ptable th, .ptable td { padding: var(--sp-1); border-bottom: 1px solid var(--line); text-align: center; overflow-wrap: anywhere; }
.ptable tbody th { text-align: left; color: var(--muted); font-weight: 400; }
.ptable thead th { font-size: var(--fs-caption); color: var(--muted); }
.ptable .t1 { color: var(--green); }
.ptable .t2 { color: var(--gold); }
.passlink.ready { border-color: var(--cyan); background: var(--panel2); }
.shopit.claim-ready { border: 2px solid var(--cyan); background: var(--panel2); }
.shopit.claim-ready .sp { color: var(--cyan); }
.claim-label { display: inline-block; border-radius: var(--r-ctl); padding: var(--sp-2); color: var(--bg); background: var(--cyan); }
.claim-notice { display: flex; align-items: center; gap: var(--sp-2); border-color: var(--cyan); margin-bottom: var(--sp-2); text-align: left; }
.claim-notice[hidden] { display: none; }
.claim-notice b { flex: 1; min-width: 0; font-size: var(--fs-body); }
.claim-notice > span { color: var(--cyan); }
[data-stab][data-reward]:not([data-reward=""])::after { content: attr(data-reward); display: inline-block; margin-left: var(--sp-1); padding: var(--sp-1); border-radius: var(--r-pill); background: var(--red); color: var(--bg); font-size: var(--fs-caption); line-height: 1; }
.passlink .si .artimg { width: 28px; height: 28px; }
#btnPass .mi .artimg { width: 22px; height: 22px; }

/* v3.77 月卡頭像框:有圖(html[data-frames])就把 v3.2 的光暈換成 Codex 畫的框;沒圖照舊用光暈 */
html[data-frames] .av.pf-basic, html[data-frames] .mc-av.pf-basic, html[data-frames] .gav.pf-basic,
html[data-frames] .av.pf-elite, html[data-frames] .mc-av.pf-elite, html[data-frames] .gav.pf-elite { box-shadow: none; position: relative; }
html[data-frames] .pf-basic::after, html[data-frames] .pf-elite::after {
  content: ''; position: absolute; inset: -26%; pointer-events: none;
  background: center / contain no-repeat;
}
html[data-frames] .pf-basic::after { background-image: var(--art-frame-basic); }
html[data-frames] .pf-elite::after { background-image: var(--art-frame-elite); }

/* ================================================================
   v3.79 少字版 —— 使用者(手機看 v3.76):「文字太多,盡量用簡介的圖示或是面版」
   單件詳情:數值磚 / 星級 chip / 強化面板 / 缺口卡 · 商店:獎勵 chip
   🔴 判準照 dtg-ui skill §3.3:數字留在外面、名稱縮成 10px 小標、規則收進「規則說明」
   ================================================================ */
/* 共用:細進度條(強化等級 / 升星 / 缺口卡) */
.ibar { display: inline-block; position: relative; height: 4px; border-radius: var(--r-pill); background: rgba(255,255,255,.12); overflow: hidden; vertical-align: middle; }
.ibar > i { display: block; height: 100%; border-radius: var(--r-pill); background: var(--cyan); }

/* 頂端三格數值磚(取代三~四列「長名稱 ……… 數字」)*/
.it-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-1); margin-bottom: var(--sp-2); }
.its { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: var(--sp-1) var(--sp-2); background: rgba(255,255,255,.04); border-radius: var(--r-ctl); }
.its .cap { font-size: var(--fs-caption); color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.its .cap .artimg { width: 12px; height: 12px; vertical-align: -2px; }
.its b { font-size: var(--fs-title); line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.its.main b { color: var(--ally-soft); }
.its em { font-style: normal; font-size: var(--fs-caption); color: var(--muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.its.up b, .its em.up { color: var(--up); }
.its.down b, .its em.down { color: var(--down); }

/* 星級(沒滿星帶升星進度)· 武器模組開場星級 */
.it-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); margin-bottom: var(--sp-2); }
.ic { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px var(--sp-2); border-radius: var(--r-pill); background: rgba(255,255,255,.05); color: var(--gold); font-size: var(--fs-body); font-variant-numeric: tabular-nums; }
.ic .ibar { width: 48px; }

/* 🔨 強化面板:+N/上限(進度條)· 倍率 · 段位;段位一段 = 一排格子 */
.it-enh { display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2); margin-bottom: var(--sp-2); background: rgba(255,255,255,.04); border-radius: var(--r-card); }
.ie-head { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); }
.ie-head b { font-size: var(--fs-title); font-variant-numeric: tabular-nums; }
.ie-cap { color: var(--muted); font-variant-numeric: tabular-nums; }
.ie-mul { margin-left: var(--sp-1); color: var(--ally-soft); font-variant-numeric: tabular-nums; }
.ie-bind { margin-left: auto; padding: 0 var(--sp-2); border: 1px solid var(--line); border-radius: var(--r-pill); font-size: var(--fs-caption); color: var(--muted); }
.it-enh > .ibar { display: block; width: 100%; }
.ie-grade { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); }
.ie-grade b { color: var(--gold); font-variant-numeric: tabular-nums; }
.ie-grade .seg { display: inline-flex; gap: 2px; }
.ie-grade .seg i { width: 12px; height: 6px; border-radius: var(--r-pill); background: rgba(255,255,255,.14); }
.ie-grade .seg i.on { background: var(--gold); }
.ie-grade em { font-style: normal; color: var(--ok); font-variant-numeric: tabular-nums; }
.ie-odds { display: flex; flex-wrap: wrap; gap: var(--sp-1); font-size: var(--fs-caption); color: var(--muted); }
.ie-odds > span, .ie-odds > a { padding: 1px var(--sp-2); border-radius: var(--r-pill); background: rgba(255,255,255,.05); }
.ie-odds b, .ie-odds .on { color: var(--gold); }
.ie-odds .chiplink { color: var(--cyan); text-decoration: none; }

/* 洗練的品質色點(左低右高,跟詞條左邊框同一組顏色)· 鑲嵌的開孔門檻 chip */
.rf-legend, .gm-rule { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); }
.qdots { display: inline-flex; gap: 3px; }
.qdots i { width: 8px; height: 8px; border-radius: 50%; }

/* 🧾 缺口卡:灰按鈕按下去才打開,在 #itOps(黏在畫面下緣)的最上面 */
.needcard { flex: 1 1 100%; display: flex; flex-direction: column; gap: var(--sp-1); padding: var(--sp-2) var(--sp-3); border: 1px solid rgba(255,214,102,.45); border-radius: var(--r-card); background: var(--panel2); font-size: var(--fs-body);
  max-height: calc(var(--vh-avail) * .45); overflow: auto; }   /* 矮手機上不要把整個 sheet 蓋掉 */
/* 🔴 #itOps 的 [data-forge-action] 一律 display: contents(讓按鈕直接參與排版)—— 卡片也帶這個屬性(換分頁時才會一起藏),
      不另外指定的話整張卡會被攤平:邊框 / 底色消失、標題跟第一列擠在同一行(而且不報錯) */
#itOps .needcard[data-forge-action] { display: flex; }
.needcard[hidden] { display: none; }
.nc-head { display: flex; align-items: center; gap: var(--sp-2); }
.nc-head b { flex: 1; min-width: 0; }
.nc-x { min-width: 44px; min-height: 44px; margin: -8px -12px -8px 0; padding: 0; border: 0; background: transparent; color: var(--muted); }
.nc-x .svgi { width: 18px; height: 18px; }
.nc-row { display: flex; align-items: center; gap: var(--sp-2); font-variant-numeric: tabular-nums; }
.nc-row .artimg { width: 16px; height: 16px; }
.nc-row .ibar { flex: 1 1 auto; min-width: 32px; }
.nc-row > span { color: var(--muted); }
.nc-row > b { min-width: 56px; text-align: right; }
.nc-row.short > b { color: var(--bad); }
.nc-row.short .ibar > i { background: var(--red); }
.nc-row.ok > b { color: var(--ok); }
.nc-row.ok .ibar > i { background: var(--green); }
.nc-src { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); font-size: var(--fs-caption); color: var(--muted); }
.nc-src .artimg { width: 14px; height: 14px; }
.nc-yield { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--fs-caption); font-variant-numeric: tabular-nums; }
.nc-yield th, .nc-yield td { padding: 2px; text-align: center; border-bottom: 1px solid var(--line); }
.nc-yield tbody th { color: var(--muted); font-weight: 400; }
.nc-yield td.me { border-radius: var(--r-ctl); background: var(--gold); color: var(--bg); font-weight: 700; }

/* 🎁 商店的獎勵 chip(月卡 / 幣包 / 每日補給):一樣東西一顆「圖示 + 數量」 */
.rwd { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-1); }
.rc { display: inline-flex; align-items: center; gap: 2px; padding: 1px var(--sp-2); border-radius: var(--r-pill); background: rgba(255,255,255,.07); color: var(--ink); font-size: var(--fs-caption); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rc .artimg { width: 14px; height: 14px; }
.rc.gold, .rc.warn { color: var(--gold); background: rgba(255,214,102,.14); }
.rc.up { color: var(--up); }
.rl { min-width: 2.4em; font-style: normal; font-size: var(--fs-caption); color: var(--muted); }
/* 有 chip 的商品卡(.wide):名字 / 價格一列,chip 換到第二列佔滿整寬(擠在中間那欄的話一列只放得下一顆) */
.shopit.wide { flex-wrap: wrap; row-gap: var(--sp-1); }
.shopit.wide .sm { flex: 1 1 0; }
.shopit .sx { flex: 1 1 100%; min-width: 0; display: flex; flex-direction: column; gap: var(--sp-1); padding-left: 39px; }   /* 39 = 圖示 30 + 間距 9,跟名字對齊 */
/* 商店抬頭下面那條 #shopPolicy 現在永遠是空的(紅線那句搬進「!」說明)—— 空的就不要畫出一條空框 */
.lockbar:empty { display: none; }
/* 月卡的「立即 / 每天 / 權益」:標籤一欄、chip 一欄 —— 換行的 chip 留在右邊那欄,不會鑽到標籤底下 */
.rwd.lab { flex-wrap: nowrap; align-items: flex-start; }
.rwd.lab > .rl { flex: 0 0 auto; padding-top: 2px; }
.rwd.lab > .rwd { flex: 1 1 auto; min-width: 0; }

/* [claude code] 2026-10-23 v3.81: boss raid follows the existing mobile type/spacing scale. */
.raid-entry { display:flex;align-items:center;gap:var(--sp-2);min-height:44px;padding:var(--sp-2) var(--sp-3);flex-shrink:0;width:100%;text-align:left; }
.raid-entry b { font-size:var(--fs-body);min-width:0; }
.raid-entry > span:last-child { margin-left:auto;color:var(--muted);font-size:var(--fs-caption); }
.raid-entry-icon,.raid-entry-icon .artimg { width:28px;height:28px;object-fit:contain; }
.qtabs.raid-tabs { grid-template-columns:repeat(4,minmax(0,1fr)); }
.raid-tabs .qtab { min-height:44px;font-size:var(--fs-body); }
.raid-hero { display:grid;grid-template-columns:80px minmax(0,1fr);gap:var(--sp-3);align-items:center;padding:var(--sp-3);border-radius:var(--r-card);background:var(--panel2); }
.raid-portrait .artimg { width:80px;height:80px;object-fit:contain; }
.raid-hero h2 { font-size:var(--fs-heading);margin:0 0 var(--sp-1); }
.raid-hero p { font-size:var(--fs-body);margin:0 0 var(--sp-1); }
.raid-hero small,.raid-score small { font-size:var(--fs-caption);color:var(--muted); }
.raid-score { display:flex;flex-direction:column;gap:var(--sp-1);padding:var(--sp-3); }
.raid-number { font-size:var(--fs-display);color:var(--gold); }
.raid-score > div { display:flex;justify-content:space-between;gap:var(--sp-2);font-size:var(--fs-body); }
.raid-weapons { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-1); }
.raid-weapons button { min-width:0;min-height:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-1);font-size:var(--fs-caption);padding:var(--sp-1); }
.raid-weapons .on { border-color:var(--cyan); }
.raid-board-head { display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);margin-top:var(--sp-2); }
.raid-board-head h3 { font-size:var(--fs-title); }
.raid-board-head button { min-height:44px;font-size:var(--fs-body); }
.raid-rank-row { display:grid;grid-template-columns:40px minmax(0,1fr) minmax(0,1fr);gap:var(--sp-2);align-items:center;padding:var(--sp-2);font-size:var(--fs-body);border-bottom:1px solid var(--line); }
.raid-rank-row b { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0; }
.raid-rank-row strong { text-align:right;overflow-wrap:anywhere; }
.raid-rank-row.me { color:var(--green);background:var(--panel2); }
.raid-rank-labels { color:var(--muted);font-size:var(--fs-caption); }
.raid-rules,.raid-prizes { font-size:var(--fs-body);padding:var(--sp-2); }
.raid-rules summary,.raid-prizes summary { min-height:44px;line-height:44px;cursor:pointer; }
.raid-rules p { color:var(--muted);line-height:1.6; }
.raid-prize { display:grid;grid-template-columns:64px minmax(0,1fr);gap:var(--sp-2);padding:var(--sp-2) 0;border-bottom:1px solid var(--line); }
.raid-rewards { display:flex;flex-wrap:wrap;gap:var(--sp-1) var(--sp-2);font-size:var(--fs-body); }
.raid-rewards > span { white-space:nowrap; }
.raid-claim { display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);padding:var(--sp-3);border:1px solid var(--green);border-radius:var(--r-card); }
.raid-claim > div { min-width:0; }
.raid-claim b { font-size:var(--fs-body); }
.raid-claim button { min-height:44px;flex-shrink:0; }

.raid-claim > div { flex:1 1 0; }
.raid-claim button { width:auto;flex:0 0 auto;min-width:72px; }

.raid-board-head h3 { flex:1 1 0;min-width:0; }
.raid-board-head button { width:auto;flex:0 0 auto;min-width:88px; }

.raid-board-head h3 { color:var(--ink); }

/* [claude code] 2026-10-23 v3.82: daily endless board shares raid reward components. */
.rank-tabs { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-2);margin-bottom:var(--sp-3); }
.rank-tabs button { min-width:0;min-height:44px; }
.rank-tabs button[aria-pressed="true"] { border-color:var(--cyan);color:var(--cyan); }
.rank-summary { display:flex;flex-direction:column;gap:var(--sp-1);margin:var(--sp-4) 0; }
.rank-summary small { color:var(--muted);font-size:var(--fs-caption); }
#endlessBoardClaims { display:grid;gap:var(--sp-2); }
#endlessBoardPrizes { margin-top:var(--sp-4); }
#endlessBoard .ithead { display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2); }
#endlessBoard .ithead h2 { flex:1 1 0;min-width:0;text-align:left; }
#endlessBoard .ithead .xbtn { flex:0 0 auto;width:44px; }

/* [claude code] 2026-10-23 v3.83: two-area skill priority editor, desktop and touch drag. */
.auto-panel { display:flex;flex-direction:column;max-height:calc(var(--vh-avail) - 32px); }
.auto-panel .it-head { display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2); }
.auto-panel h2 { margin:0;font-size:var(--fs-heading); }
.auto-body { overflow-y:auto;min-height:0; }
.auto-body > .wide { min-height:44px;margin-bottom:var(--sp-3); }
.auto-body section { margin:var(--sp-4) 0; }
.auto-body h3 { font-size:var(--fs-title);margin-bottom:var(--sp-2); }
.auto-body h3 small { display:block;font-size:var(--fs-caption);color:var(--muted);font-weight:400; }
.auto-enable { display:flex;align-items:center;gap:var(--sp-2);min-height:44px; }
.auto-enable input { width:auto; }
.auto-modes { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-2); }
.auto-modes button { min-width:0;min-height:44px; }
.auto-modes button[aria-pressed="true"] { border-color:var(--cyan);color:var(--cyan); }
.auto-grid { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--sp-2); }
.auto-top { min-height:112px;padding:var(--sp-2);border:1px dashed var(--cyan);border-radius:var(--r-card); }
.auto-top > .hint { grid-column:1/-1;align-self:center;text-align:center; }
.auto-skill { min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--sp-1);padding:var(--sp-3) var(--sp-1);min-height:80px;border:1px solid var(--line);border-radius:var(--r-ctl);background:var(--panel2);touch-action:none;cursor:grab;user-select:none; }
.auto-skill .artimg { width:32px;height:32px; }
.auto-skill b { font-size:var(--fs-body);overflow-wrap:anywhere;text-align:center; }
.auto-skill > small { position:absolute;top:4px;left:4px;color:var(--gold);font-size:var(--fs-caption); }
.auto-skill[aria-disabled="true"] { opacity:.55;cursor:default; }
.auto-skill:focus-visible { outline:2px solid var(--cyan); }
.auto-remove { position:absolute;top:0;right:0;width:28px;min-height:28px;padding:0;background:transparent;color:var(--muted);font-size:var(--fs-title); }
.auto-drag { position:fixed;width:80px;z-index:10000;pointer-events:none;opacity:.85;border-color:var(--cyan); }
.auto-foot { padding-top:var(--sp-3); }
#btnAutoToggle { left:12px;right:auto;width:44px;min-width:44px;padding:0;font-size:var(--fs-caption); }
#btnAutoToggle[aria-pressed="true"] { color:var(--cyan);border-color:var(--cyan); }
.hud-top { padding-left:64px;padding-right:112px; }
.hud-top .wavebox { width:100%;max-width:100%; }

/* ===== 📺 v3.86 常駐廣告列(src/adbar.js 建立;規格 SPEC.md)=====
   🔴 廣告本體(.ad-unit 裡的 ins / iframe)不准設 pointer-events / display:none / 被跳窗蓋住 ——
      #adbar 在 #portraitRoot 外面(body 第一層),z-index 高於所有遊戲層。
   上方版位:廣告 50 + 不能點的窄條(標「廣告」),把廣告跟遊戲頂部按鈕隔開。
   側邊版位(桌機寬視窗):離遊戲欄 ≥ 150px,遊戲不縮。 */
html[data-ad-layout="top"] { --sat: 0px; }
#adbar { position: fixed; z-index: 10001; background: var(--panel-flat); color: var(--muted); }
#adbar[data-placement="top"] { top: 0; left: 0; right: 0; padding-top: env(safe-area-inset-top); }
#adbar[data-placement="side"] { top: 16px; left: calc(50% + min(100vw, 480px, calc(100dvh * .625)) / 2 + var(--ad-side-gap)); width: var(--ad-unit-w); }
#adbar .ad-unit { width: var(--ad-unit-w); max-width: 100%; height: var(--ad-unit-h); margin: 0 auto; display: flex; align-items: center; justify-content: center; overflow: hidden; }
#adbar .ad-gap { height: var(--ad-gap-h); line-height: var(--ad-gap-h); padding: 0 8px; font-size: var(--fs-caption); border-top: 1px solid var(--line); user-select: none; }
#adbar[data-placement="side"] .ad-gap { border-top: 0; text-align: center; }
#adbar .ad-house { width: 100%; height: 100%; display: flex; align-items: center; gap: 8px; padding: 0 8px; color: inherit; text-decoration: none; }
#adbar .ad-house img { width: 32px; height: 32px; flex: none; border-radius: var(--r-ctl); }
#adbar .ad-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#adbar .ad-copy strong { color: var(--ink); font-size: var(--fs-caption); font-weight: 600; }
#adbar .ad-copy small { font-size: var(--fs-caption); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#adbar .ad-cta { flex: none; font-size: var(--fs-caption); color: var(--cyan); }
#adbar[data-placement="side"] .ad-house { flex-direction: column; justify-content: center; text-align: center; gap: 12px; padding: 12px; }
#adbar[data-placement="side"] .ad-house img { width: 64px; height: 64px; }
#adbar[data-placement="side"] .ad-copy { flex: none; }
#adbar[data-placement="side"] .ad-copy small { white-space: normal; }

/* [claude code] v3.99: grouped, icon-first loot and claim receipts. */
.loot-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(80px,1fr)); gap: 8px; width: 100%; margin: 8px 0; }
.reward-grid { flex: 1 1 100%; }
.loot-tile { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--loot-color,var(--muted)); border-radius: var(--r-ctl); background: var(--panel2); text-align: center; }
.loot-icon > .artimg,.loot-icon > .svgi { width: 32px; height: 32px; object-fit: contain; }
.loot-tile b { font-size: var(--fs-title); color: var(--gold); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.loot-tile small,.loot-badge { font-size: var(--fs-caption); color: var(--loot-color,var(--muted)); overflow-wrap: anywhere; }
.drops details summary { font-size: var(--fs-body); color: var(--cyan); padding: 8px 0; cursor: pointer; }
.qr .loot-grid { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; }
.qr .loot-tile { flex-direction: row; padding: 4px; border: 0; background: none; }
.qr .loot-icon > .artimg,.qr .loot-icon > .svgi { width: 20px; height: 20px; }
.qr .loot-tile small { display: none; }
.reward-receipt { width: 100%; }

.loot-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; font-size: var(--fs-heading); }
.qr .loot-icon { width: 20px; height: 20px; font-size: var(--fs-body); }

/* [claude code] 2026-10-24 v4.0: compact wardrobe, consistent with the equipment panel. */
.fashion-gear-actions,.fashion-tabs,.fashion-grid,.fashion-bonuses{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.fashion-gear-actions button{min-height:44px}.fashion-tabs{grid-template-columns:repeat(3,minmax(0,1fr));margin:16px 0 12px}
.fashion-tabs button{min-height:44px;padding:8px 4px}.fashion-tabs .on{border-color:var(--cyan);color:var(--cyan)}
.fashion-wallet{display:flex;justify-content:flex-end;align-items:center;gap:4px;color:var(--gold);font-size:15px}
.fashion-wallet img,.fashion-price img{width:16px;height:16px;vertical-align:middle}
.fashion-hero{display:flex;align-items:center;gap:16px;padding:8px 0}.fashion-preview{width:104px;height:120px;flex-shrink:0;display:grid;place-items:center}.fashion-preview>.svgi{width:64px;height:64px}
.fashion-art{width:100%;height:100%;display:block}.fashion-summary{min-width:0;display:grid;gap:8px}.fashion-summary>b{font-size:20px}.fashion-summary small,.fashion-bonuses small{color:var(--muted);font-size:10px}
.fashion-stats{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--up)}.fashion-stats>span{white-space:nowrap}.fashion-stats .svgi{width:12px;height:12px;vertical-align:middle}
.fashion-progress{display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px;font-size:12px}.fashion-progress b{font-size:28px;color:var(--gold)}.fashion-progress progress{width:100%;height:8px;accent-color:var(--cyan)}
.fashion-bonuses{margin-bottom:12px}.fashion-bonuses>div{display:grid;gap:4px}.fashion-grid{margin-top:8px}.fashion-card{min-width:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--panel2);display:flex;flex-direction:column;gap:8px}.fashion-card.equipped{border-color:var(--cyan)}.fashion-card.unowned .fashion-art{opacity:.35;filter:grayscale(1)}
.fashion-card>b{font-size:15px}.fashion-card small{font-size:10px;color:var(--muted)}.fashion-card button{min-height:44px;padding:8px 4px;font-size:12px}.fashion-price{display:inline-flex;align-items:center;gap:4px;color:var(--gold)}.fashion-portrait{height:120px;position:relative;background:var(--panel-flat);border-radius:8px}.fashion-badge{position:absolute;right:4px;bottom:4px;border-radius:999px;padding:4px 8px;font-size:10px;color:var(--muted);background:var(--bg)}.fashion-status{font-size:10px;color:var(--muted)}

.fashion-grid:has(>.fashion-card:only-child){grid-template-columns:minmax(0,1fr)}
.fashion-card:only-child .fashion-portrait{height:144px}

/* [claude code] 2026-10-31 v4.12: complete battle outfit and handheld weapon preview. */
.wardrobe-stage{border:1px solid var(--line);border-radius:var(--r-card);padding:var(--sp-3);background:radial-gradient(ellipse at 50% 40%,var(--panel2),var(--panel-flat) 75%);margin:var(--sp-2) 0 var(--sp-4)}
.wardrobe-stage-head{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-2);font-size:var(--fs-body)}
.wardrobe-stage-head>span{font-size:var(--fs-caption);color:var(--green)}.wardrobe-stage-head .trial{color:var(--gold)}
.wardrobe-loadout{position:relative;height:300px;isolation:isolate}
.wardrobe-figure{position:relative;width:min(100%,300px);aspect-ratio:1;margin:auto;top:50%;transform:translateY(-50%)}
.wardrobe-figure.flipped{transform:translateY(-50%) scaleX(-1)}
.wardrobe-figure>.fashion-art{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 8px 16px var(--bg))}
.wardrobe-hand{position:absolute;z-index:2;height:auto;object-fit:contain;pointer-events:none}
.wardrobe-hand>.artimg{display:block;width:100%;height:auto}.wardrobe-hand>.svgi{width:100%;height:100%}
.wardrobe-slots{position:absolute;top:24px;bottom:24px;width:48px;z-index:3;display:flex;flex-direction:column;justify-content:space-between;gap:var(--sp-2)}
.wardrobe-slots.left{left:0}.wardrobe-slots.right{right:0}
.wardrobe-slot{display:grid;justify-items:center;gap:var(--sp-1);padding:var(--sp-1);border-radius:var(--r-ctl);background:var(--panel);border:1px solid var(--line);min-width:0}
.wardrobe-slot .artimg,.wardrobe-slot>.svgi{width:24px;height:24px}.wardrobe-slot small,.wardrobe-slot b{font-size:var(--fs-caption);font-weight:400;color:var(--muted);text-align:center}
.wardrobe-stage .fashion-summary{text-align:center;justify-items:center;gap:var(--sp-1)}
/* [claude code] 2026-11-01 v4.16: action controls stay within the existing wardrobe stage. */
.wardrobe-motion-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--sp-1);margin-top:var(--sp-2)}
.wardrobe-motion-actions button{min-height:44px;min-width:0;padding:var(--sp-1);font-size:var(--fs-body)}
.wardrobe-motion-actions .on{border-color:var(--cyan);color:var(--cyan)}
.wardrobe-preview-actions{display:flex;justify-content:center;gap:var(--sp-2);margin-top:var(--sp-2)}.wardrobe-preview-actions button{min-height:44px}
.wardrobe-stage h3{font-size:var(--fs-body);color:var(--muted);margin:var(--sp-4) 0 var(--sp-2)}
.wardrobe-weapons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-2)}
.wardrobe-weapons button{display:grid;justify-items:center;gap:var(--sp-1);min-height:72px;min-width:0;padding:var(--sp-2);font-size:var(--fs-caption)}
.wardrobe-weapons img,.wardrobe-weapons .svgi{width:80px;max-width:100%;height:36px;object-fit:contain}.wardrobe-weapons .on{border-color:var(--cyan);color:var(--cyan)}
.fashion-portrait{display:block;width:100%;padding:0;border:0;cursor:pointer;overflow:hidden}.fashion-card .fashion-portrait{height:176px;padding:0}.fashion-portrait .fashion-art{object-fit:contain}
.fashion-card.previewed{border-color:var(--cyan)}.fashion-card .fashion-portrait:focus-visible{outline:2px solid var(--cyan);outline-offset:4px}
.fashion-stars{display:inline-flex;justify-content:center;gap:var(--sp-1);color:var(--muted)}.fashion-stars i{display:flex;opacity:.35}.fashion-stars i.lit{color:var(--gold);opacity:1}.fashion-stars .svgi{width:12px;height:12px}
.fashion-rules{margin:var(--sp-3) 0;font-size:var(--fs-caption);color:var(--muted)}.fashion-rules p{line-height:1.6}
.gemcraft:has(.gem-craft-actions),#gpCraft:has(.gem-craft-actions){display:block}.gem-random-rule{font-size:var(--fs-body);line-height:1.6;color:var(--muted)}
.gem-random-types{display:flex;flex-wrap:wrap;gap:var(--sp-2);margin:var(--sp-3) 0}.gem-random-types .artimg{width:28px;height:28px}
.gem-craft-actions,.sector-claim-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--sp-2)}
.gem-craft-actions button{display:grid;justify-items:center;gap:var(--sp-2);min-width:0;min-height:64px;font-size:var(--fs-body);padding:var(--sp-2)}
.gem-craft-actions small{font-size:var(--fs-caption)}.sector-claim-actions{flex-shrink:0;margin-top:var(--sp-3)}.sector-claim-actions button{min-width:0;min-height:44px}

#fashion>.panel{max-height:calc(var(--vh-avail) - 32px);overflow-y:auto;overflow-anchor:none}

/* v4.2: tactile feedback and reachable touch targets. */
button:not(:disabled):active { transform:scale(.97); filter:brightness(1.15); }
.chops .mini, #gempick button, #growth button, #gembench button, .ghost.wide,
.nc-x, .nc-src button { min-width:44px; min-height:44px; }
.sdot { position:relative; }
.sdot::before { content:""; position:absolute; width:44px; height:44px; left:50%; top:50%; transform:translate(-50%,-50%); }
#rAdvice { white-space:pre-line; }

.secdots { gap:18px; min-height:44px; align-items:center; }

.sec-arrow { min-width:44px; }
.sec-arrow:not(:disabled):active { transform:translateY(-50%) scale(.97); }

.loot-sequence .loot-tile { animation:loot-reveal .24s both; animation-delay:var(--reveal-delay,0ms); }
@keyframes loot-reveal { from { opacity:0; transform:scale(.9); } to { opacity:1; transform:scale(1); } }
#fxBody[data-rarity="4"] .chrare, #fxBody[data-rarity="5"] .chrare { font-size:var(--fs-heading); }
.gain.first-clear { color:var(--gold); }
#questHint { white-space:normal; overflow:visible; text-overflow:clip; }
.pass-total { color:var(--gold); }
.midbtn[hidden], .raid-entry[hidden] { display:none; }
#pass button { min-height:44px; min-width:44px; }
.qtabs.raid-tabs { display:flex; overflow-x:auto; gap:4px; }
.qtabs.raid-tabs .qtab { flex:0 0 auto; min-width:64px; padding:8px; }
.journal-calendar { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:4px; margin-bottom:16px; }
.journal-day { min-width:44px; min-height:44px; padding:8px 4px; }
.journal-day small { display:block; font-size:var(--fs-caption); color:var(--muted); }
.journal-day.on { border-color:var(--cyan); }
.journal-day.claim-ready { border-color:var(--gold); background:color-mix(in srgb,var(--gold) 12%,var(--panel-flat)); }
.journal-day.claim-ready small { color:var(--gold); font-weight:700; }
.journal-day.claim-ready.on { border-color:var(--cyan); }
.weekly-claimable { display:flex; flex-wrap:wrap; gap:var(--sp-2); margin:var(--sp-3) 0; }
.weekly-claimable > b { flex-basis:100%; color:var(--gold); font-size:var(--fs-body); }
.weekly-claimable button { flex:1 1 100px; min-height:44px; margin:0; }
.weekly-claimable .weekly-claim-all { flex-basis:100%; }

/* v4.13: visible socket inventory, quality and effective stat limits. */
#gStatCaps, .item-cap-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--sp-2); margin:var(--sp-2) 0 var(--sp-3); }
#gStatCaps:empty, .item-cap-summary:empty { display:none; }
.stat-cap { min-width:0; display:flex; flex-direction:column; gap:var(--sp-1); padding:var(--sp-2); border:1px solid var(--line); border-radius:var(--r-ctl); font-size:var(--fs-caption); color:var(--muted); }
.stat-cap b { color:var(--ink); font-size:var(--fs-body); }
.stat-cap.capped > span, .cap-effect { color:var(--gold); }
.stat-cap small { font-size:var(--fs-caption); }
.cap-effect { display:block; font-size:var(--fs-caption); line-height:1.5; white-space:normal; }
.gear-socket-summary { display:flex; flex-direction:column; gap:var(--sp-1); margin-top:var(--sp-1); font-size:var(--fs-caption); color:var(--muted); letter-spacing:0; }
.gear-socket-icons { display:flex; flex-wrap:wrap; gap:var(--sp-1); }
.gear-socket-icons > i { position:relative; width:20px; height:24px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:var(--r-ctl); font-style:normal; }
.gear-socket-icons .artimg, .gear-socket-icons .svgi { width:16px; height:16px; }
.gear-socket-icons > i.filled { border-color:var(--violet); }
.gear-socket-icons > i.empty { border-style:dashed; color:var(--cyan); }
.gear-socket-icons b { position:absolute; right:0; bottom:0; font-size:var(--fs-caption); color:var(--gold); line-height:1; }
.socket-origin { display:flex; flex-direction:column; gap:var(--sp-2); margin:var(--sp-2) 0; font-size:var(--fs-body); color:var(--muted); }
.socket-origin > b { font-weight:400; }
.gem-current { display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-2); margin-bottom:var(--sp-2); }
.gem-current .artimg { width:24px; height:24px; }
.gem-current button { min-height:44px; margin:0; }
.it-gem-sockets { display:block; }
.it-gem-sockets > span { font-size:var(--fs-caption); }
.it-gem-sockets .sockets { margin-top:var(--sp-2); }
.aff-quality { display:flex; align-items:center; flex-wrap:wrap; gap:var(--sp-1) var(--sp-2); color:var(--muted); font-size:var(--fs-caption); white-space:normal; }
.aff-quality b { color:var(--quality-color); font-size:var(--fs-caption); }
.aff-quality progress { width:100%; height:4px; accent-color:var(--quality-color); }
.affrow .aff-quality { grid-row:3; grid-column:2/-1; }
.affrow > .cap-effect { grid-row:4; grid-column:2/-1; }
.scanaff > i { min-width:0; white-space:normal; flex:1 1 120px; }
.scanaff .aff-quality { margin-top:var(--sp-1); }
.loadout-row.active > .dim { color:var(--green); }
.loadout-purpose { line-height:1.6; }
.card-cap-hint { font-size:var(--fs-caption); color:var(--gold); margin-top:var(--sp-2); }
@media (max-width:360px) {
  .its b { font-size:var(--fs-body); }
  #gStatCaps, .item-cap-summary { grid-template-columns:minmax(0,1fr); }
  .affrow .ae { grid-column:2/-1; }
  .affrow em { grid-row:3; grid-column:2/-1; text-align:left; }
  .affrow .aff-quality { grid-row:4; }
  .affrow > .cap-effect { grid-row:5; }
}
.journal-goal { border:1px solid var(--line); border-radius:var(--r-card); padding:12px; margin:8px 0; }
.journal-goal > div:first-child { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; }
.journal-goal progress { width:100%; accent-color:var(--green); }
.journal-goal button { width:100%; min-height:44px; }
.journal-fashion { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.journal-fashion .fashion-portrait { width:64px; height:64px; }

/* v4.3: milestone hierarchy and shared seek-free loot reveal. */
#rTitle.result-event { font-size:var(--fs-display); color:var(--gold); }
#rEquip { width:100%; max-width:100%; min-width:0; min-height:44px; white-space:normal; }
#rGoal { flex-basis:100%; margin:var(--sp-1) 0; }
.rc.down { color:var(--down); }

/* v4.3: server wait feedback is independent of the frozen battle canvas. */
button[aria-busy="true"] { opacity:.55; filter:grayscale(1); pointer-events:none; }
#apiProgress { position:fixed; top:0; left:0; right:0; height:3px; z-index:200000; background:var(--gold); animation:api-loading 1s ease-in-out infinite; pointer-events:none; }
@keyframes api-loading { 0%,100% { opacity:.35; } 50% { opacity:1; } }
.toast.actionable { pointer-events:auto; display:flex; align-items:center; gap:var(--sp-2); }
.toast.actionable button { min-height:44px; flex:0 0 auto; margin:0; }
.module-rec-basis { display:block; margin-top:var(--sp-1); color:var(--muted); font-size:var(--fs-caption); }

/* Freeze hidden lobby scenery while panels or battles cover it. */
html[data-art].panel-open .lb-deck::before, html[data-art].panel-open .lb-deck::after,
html[data-art].reduced-effects .lb-deck::before, html[data-art].reduced-effects .lb-deck::after,
html[data-art].in-battle .lb-deck::before, html[data-art].in-battle .lb-deck::after { animation-play-state: paused; }

.gear-main-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); }
.lb-daily-mod { flex:0 0 auto; margin:0 0 6px; padding:0 8px; color:var(--ink); font-size:var(--fs-body); text-align:center; line-height:1.4; }
.gear-main-tabs button { min-height:44px; }

.return-card { position:relative; margin:8px 10px; padding:8px 12px; border:1px solid var(--line); border-radius:8px; background:var(--panel); font-size:12px; }
.return-card span { display:block; }
.return-card button { min-height:44px; }
.return-card[hidden] { display:none; }

.return-card { width:calc(100% - 20px); max-width:560px; flex:0 0 auto; }

#offer button { min-height:44px; }
#offer .sh-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
#btnOfferLater { grid-column:1 / -1; width:100%; }

/* v4.6: touch targets cover every button, including compact menus and gem sockets. */
button, summary, [role="button"] { min-width:44px; min-height:44px; }
.auto-remove { min-height:44px; }
#questFullTime { grid-column:1 / -1; min-width:0; white-space:normal; font-size:var(--fs-caption); color:var(--muted); line-height:1.6; }
#questFullTime span { display:inline-block; white-space:nowrap; }
.toast.power-notice { top:calc(env(safe-area-inset-top, 0px) + 132px); bottom:auto; width:max-content; }
/* v4.6: the same data-defined class frame in every equipment presentation. */
.tier-f1 { outline: 1px solid var(--tier-color, currentColor); outline-offset: 1px; }
.tier-label { display: inline-block; padding: 0 4px; margin: 0 2px; border-radius: var(--r-ctl); }
.tier-f2, .bcell.tier-f2, .gcell.tier-f2, .loot-tile.tier-f2 { outline: 1px solid var(--tier-color, currentColor); outline-offset: 1px; box-shadow: 0 0 8px color-mix(in srgb, var(--tier-color, currentColor) 65%, transparent); }
.daily-entry { display: flex; flex: 0 0 auto; flex-direction: column; gap: 2px; min-height: 44px; margin: 6px 0; padding: 8px 12px; text-align: left; }
.daily-entry[hidden] { display:none; }
.daily-entry small { font-size: 10px; font-weight: 400; color: var(--dim); text-wrap: balance; }
.rift-tier-choice { margin: 8px 0; }
.rift-tier-choice > b { display: block; margin-bottom: 8px; font-size: 12px; }
.rift-tier-choice button { min-height: 44px; padding: 8px; }
.rift-tier-choice button small { display: block; font-size: var(--fs-caption); }
.lb-goal { min-height: 44px; padding: 4px 8px; border: 0; background: none; color: var(--cyan); font: inherit; text-wrap: balance; cursor: pointer; }
.challenge-rules { margin: 8px 0 12px; font-size: var(--fs-caption); color: var(--muted); line-height: 1.6; }

/* v4.8: pause every lobby animation behind either kind of panel. */
html.panel-open #menu *, html.panel-open #menu *::before, html.panel-open #menu *::after { animation-play-state:paused !important; }
.number-exact { bottom:calc(96px + env(safe-area-inset-bottom)); z-index:10000; }

/* [Codex] 2026-11-01: core combat actions, 44px touch targets and reserved HUD lane. */
.card-wrap { position:relative; min-width:0; display:flex; }
.card-wrap .card { width:100%; padding-top:56px; }
.card-ban { position:absolute; right:4px; top:4px; min-width:44px; min-height:44px; padding:4px 8px; font-size:var(--fs-caption); }
.card-actions { display:flex; gap:8px; }
.card-actions button { min-width:0; min-height:44px; flex:1; }
.ult-choice { flex-shrink:0; margin-bottom:8px; }
.ult-choice h3,.mutator-choice h3 { font-size:var(--fs-title); margin:8px 0; }
.ult-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.ult-card { min-width:0; min-height:44px; padding:8px; display:flex; flex-direction:column; align-items:center; gap:4px; border:1px solid var(--line); border-radius:var(--r-card); background:var(--panel2); color:var(--ink); font-size:var(--fs-body); }
.ult-card .artimg { width:36px; height:36px; }
.ult-card small { font-size:var(--fs-caption); color:var(--muted); line-height:1.5; }
.ult-card.on,.mutator-pill.on { border-color:var(--cyan); }
.mutator-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.mutator-pill { min-width:0; min-height:44px; padding:8px; border:1px solid var(--line); border-radius:var(--r-ctl); background:var(--panel2); color:var(--ink); text-align:left; }
.mutator-pill b { display:block; font-size:var(--fs-body); }
.mutator-pill small { font-size:var(--fs-caption); color:var(--muted); }
#btnUlt.ult-button { position:absolute; right:16px; bottom:calc(var(--sab,0px) + 44px); width:80px; height:80px; border-radius:50%; border:4px solid transparent; padding:8px; color:var(--ink); background:linear-gradient(var(--panel2),var(--panel2)) padding-box,conic-gradient(var(--cyan) var(--ult-charge,0%),var(--panel2) 0) border-box; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; font-size:var(--fs-caption); touch-action:manipulation; }
#btnUlt .artimg { width:32px; height:32px; }
#btnUlt.ready { border-color:var(--gold); color:var(--gold); }
#btnUlt:disabled { opacity:.75; }
@media(max-height:640px) { .ult-card .artimg { display:none; } .ult-card small { line-height:1.2; } }

/* v4.19: reserve a clear center, with separate left/right accessory rails. */
.lobby { overflow-y:auto; gap:var(--sp-2); }
.lb-deck {
  position:relative; isolation:isolate; width:100%; max-width:560px;
  flex:1 0 auto; min-height:320px; box-sizing:border-box;
  display:grid; grid-template-columns:clamp(64px,18vw,88px) minmax(0,1fr) clamp(64px,18vw,88px);
  align-items:center; gap:var(--sp-2); padding:var(--sp-2) var(--sp-1);
  border-radius:var(--r-card);
}
.lb-deck .lb-main { grid-column:2; grid-row:1; min-width:0; width:100%; padding:0; }
.lb-deck .lb-slide { min-width:0; gap:var(--sp-2); }
.lb-deck .lb-title { font-size:var(--fs-display); line-height:1.2; }
.lb-deck .lb-capline { gap:var(--sp-1); }
.lb-deck .lb-cap { letter-spacing:2px; }
.lb-deck .lb-prog { max-width:100%; }
.lb-deck .lb-art { width:100%; max-width:280px; margin:0; }
.lb-deck .lb-art > .artimg.big { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain; }
.lb-rail { display:flex; flex-direction:column; gap:var(--sp-2); min-width:0; align-self:center; }
.lb-rail-left { grid-column:1; grid-row:1; }
.lb-rail-right { grid-column:3; grid-row:1; }
html[data-art] .lb-deck > .lb-rail { z-index:2; }
.lb-rail .sec-arrow {
  position:static; align-self:center; transform:none; width:44px; height:44px;
  min-height:44px; border-radius:var(--r-ctl); background:var(--panel);
}
.lb-rail .sec-arrow:not(:disabled):active { transform:scale(.97); }
.lb-rail .midbtn {
  flex:0 0 auto; width:100%; min-height:80px; box-sizing:border-box;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:var(--sp-1); padding:var(--sp-2) var(--sp-1); text-align:center;
  background:var(--panel); border-radius:var(--r-ctl);
}
.lb-rail .midbtn.ready { background:color-mix(in srgb,var(--gold) 10%,var(--panel-flat)); }
.lb-rail .midbtn .mi { display:flex; align-items:center; justify-content:center; height:24px; }
.lb-rail .midbtn .mi .artimg,.lb-rail .midbtn .mi .svgi { width:24px; height:24px; object-fit:contain; }
.lb-rail .midbtn b { font-size:var(--fs-body); line-height:1.3; }
.lb-rail .midbtn i { width:100%; font-size:var(--fs-caption); line-height:1.4; overflow-wrap:anywhere; text-wrap:balance; }
.lb-rail .patrol-progress { margin:0; flex:0 0 4px; }
#questSchedule { line-height:1.6; }
#questFullTime { display:block; margin-bottom:var(--sp-2); }
#questSchedule[hidden],#questFullTime[hidden] { display:none; }
.lb-activities { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:var(--sp-2); width:100%; max-width:560px; flex:0 0 auto; }
.lb-activities .secondary { min-width:0; min-height:44px; margin:0; padding:var(--sp-2); }
.lb-activities .raid-entry { gap:var(--sp-1); }
.lb-activities .raid-entry > span:last-child { display:none; }
.lb-activities .daily-entry { justify-content:center; }
.lb-activities .daily-entry small { display:none; }
.lb-activities .raid-entry:has(+ [hidden]),.lb-activities .raid-entry[hidden] + .daily-entry { grid-column:1 / -1; }
.lobby > .lb-unlock { margin:0; flex:0 0 auto; }
.lobby > .lb-go { width:100%; max-width:560px; margin:0; }
.lobby > .secdots { width:100%; max-width:560px; flex-wrap:nowrap; justify-content:safe center; overflow-x:auto; gap:var(--sp-1); padding:0; flex:0 0 auto; }
.lobby > .secdots .sdot { flex:0 0 44px; }
.lobby > .lb-nav { position:sticky; bottom:env(safe-area-inset-bottom,0px); margin-top:auto; box-sizing:border-box; z-index:3; }
.lobby > .return-card { display:flex; align-items:center; gap:var(--sp-2); box-sizing:border-box; width:100%; margin:0; padding:var(--sp-1) var(--sp-2); }
.lobby > .return-card[hidden] { display:none; }
.lobby > .return-card > b { flex:1; min-width:0; }
.lobby > .return-card > span,.lobby > .return-card > small { display:none; }
.lobby > .return-card > div { display:flex; gap:var(--sp-1); }
/* v4.20: visible crafting before the inventory; manual battle modal pause status. */
.gem-craft-top { margin:var(--sp-2) 0; padding:var(--sp-3); border:1px solid var(--line); border-radius:var(--r-card); background:var(--panel2); }
.gem-craft-heading { display:flex; flex-wrap:wrap; align-items:center; gap:var(--sp-1) var(--sp-2); }
.gem-craft-heading b { font-size:var(--fs-body); color:var(--cyan); }
.gem-craft-heading small { font-size:var(--fs-caption); color:var(--muted); }
.gem-craft-top .gemcraft { margin-top:var(--sp-2); }
.gem-craft-top .gem-random-rule { margin:0 0 var(--sp-2); }
.gem-craft-top .gem-craft-actions .secondary { margin:0; }
.battle-pause-note { display:none; margin:0 0 var(--sp-2); padding:var(--sp-2); border:1px solid var(--line); border-radius:var(--r-ctl); color:var(--cyan); font-size:var(--fs-body); }
.manual-panel-paused .battle-pause-note { display:block; }
@media(max-width:350px) {
  .lb-deck { grid-template-columns:60px minmax(0,1fr) 60px; gap:var(--sp-1); min-height:300px; }
  .lb-deck .lb-cap { letter-spacing:1px; }
  .lb-deck .lb-diff { font-size:var(--fs-caption); }
}

/* [claude code] 2026-11-13 v4.24: clear tier frames and reachable persistent actions. */
.overlay.full > .panel > .sh-actions { position:sticky; bottom:-18px; z-index:4; background:var(--panel-flat); padding:12px 0; }
.overlay .panel > .it-head { top:-18px; padding:8px 0; }
.overlay .panel > .sh-actions > button { width:100%; }
.gcell:not(.empty), .bcell, .bcell.better, .bcell.maxstar { border:2px solid var(--tier-color); background:color-mix(in srgb,var(--tier-color) 12%,var(--panel-flat)); }
.gcell:not(.empty) { border-left-width:2px; }
.gcell .upmk, .bcell .upmk, .bcell .bs { z-index:2; }
.raid-entry, #btnEndlessBoard { position:relative; }
.raid-entry > .ndot, #btnEndlessBoard > .ndot { position:absolute; top:0; right:0; }
.sk.locked { color:var(--muted); background:var(--panel-flat); }
.patrol-soon #patrolHint { color:var(--up); }
.fashion-buy-top { display:flex; justify-content:center; padding:8px; gap:8px; }
.lb-activities #raidEntryHint { display:none; }
.rank-claim-entry { position:relative; grid-column:1 / -1; }
.rank-claim-entry[hidden] { display:none; }
.rank-claim-entry .ndot { position:absolute; top:0; right:0; }

.gcell.tier-rainbow, .bcell.tier-rainbow { background:linear-gradient(var(--panel2),var(--panel2)) padding-box,var(--tier-spectrum) border-box; }
