* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #05070b; overflow: hidden; }
/* 載入畫面：資源(atlas/bgm/字型)就緒前先蓋住，避免看到半殘畫面；boot 完成加 .done 淡出 */
#loader { position: fixed; inset: 0; z-index: 999; background: #05070b; display: flex;
  flex-direction: column; align-items: center; justify-content: center; gap: 18px; transition: opacity .45s ease; }
#loader.done { opacity: 0; pointer-events: none; }
#loader .ring { width: 46px; height: 46px; border: 4px solid #1c2634; border-top-color: #39e0d0;
  border-radius: 50%; animation: ldspin .9s linear infinite; }
#loader .lt { font-size: 13px; letter-spacing: 6px; color: #39e0d0; text-indent: 6px;
  text-shadow: 0 0 16px rgba(57,224,208,0.4); }
@keyframes ldspin { to { transform: rotate(360deg); } }
/* 拉丁字用乾淨無襯線優先（system-ui/Segoe），中日韓字自動 per-glyph 退回 JhengHei/PingFang——
   避免英文被 CJK 字體的拉丁字符渲染成又寬又大。 */
body { display: flex; justify-content: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", sans-serif;
  color: #dce4ee; user-select: none; }

#app { width: min(430px, 100vw); height: 100dvh; display: flex; flex-direction: column; background: #0d1219; position: relative; overflow: hidden; }

/* ---- 上半：canvas 舞台 ---- */
#stage { position: relative; flex: 0 0 auto; }
#stage canvas { display: block; width: 100%; height: auto; max-height: 32dvh; object-fit: cover; object-position: center bottom; }
#speedBar { position: absolute; right: 8px; bottom: 8px; display: none; gap: 6px; }
#speedBar.on { display: flex; }
#speedBar button { background: rgba(10,14,20,0.75); border: 1px solid #39485d; color: #b7c4d4; font-size: 12px; padding: 4px 10px; border-radius: 6px; }
#speedBar button.on { color: #ffd23e; border-color: #ffd23e; }

/* ---- 狀態條 ---- */
#gauges { padding: 6px 12px 2px; display: flex; flex-direction: column; gap: 5px; }
.gauge { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.gauge .lbl { width: 40px; color: #8fa0b4; }
.gauge .bar { flex: 1; height: 24px; background: #1c2634; border-radius: 12px; overflow: hidden; position: relative; }
.gauge .fill { height: 100%; border-radius: 12px; background: linear-gradient(90deg, #39e0d0, #2da8e0); transition: width .25s; opacity: .82; }
.gauge .hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 12px; letter-spacing: 3px; text-indent: 3px; color: #f2f6fa;
  pointer-events: none; white-space: nowrap;
  background: rgba(5, 10, 16, 0.42); padding: 2px 12px; border-radius: 9px; }
.gauge.over .fill { background: linear-gradient(90deg, #ff9a3e, #ff5a4e); }
.gauge .num { width: 74px; text-align: right; color: #b7c4d4; font-variant-numeric: tabular-nums; }
.gauge.over .num { color: #ff8a6e; }

/* ---- 中段內容 ---- */
#content { flex: 1 1 auto; min-height: 0; padding: 6px 12px 8px; display: flex; flex-direction: column; }
.pane { display: none; flex: 1; min-height: 0; flex-direction: column; }
.pane.on { display: flex; }

/* ---- 機庫能力值 HUD（左右各半，避免單側過長遮住機體）---- */
/* 回首頁（只出現在主選單：掛在 #menu 底下，遊戲掛在行銷官網 /play/ 底下，href="/" 回官網首頁） */
#homeBtn { position: absolute; top: 8px; left: 10px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: rgba(10,14,20,0.75); border: 1px solid #39485d; border-radius: 8px; }
#homeBtn svg { width: 15px; height: 15px; fill: #b7c4d4; }
#homeBtn:active { background: rgba(29,58,74,0.9); }
#homeBtn:active svg { fill: #39e0d0; }

/* 設定（主選單右上角）：齒輪 → 音樂/音效滑桿 */
#setBtn { position: absolute; top: 8px; right: 10px;
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  background: rgba(10,14,20,0.75); border: 1px solid #39485d; border-radius: 8px; }
#setBtn svg { width: 16px; height: 16px; fill: #b7c4d4; }
#setBtn:active svg, #setBtn.on svg { fill: #39e0d0; }
/* top 要在信箱鈕(top:38 + 高26 = 64)之下，否則面板會被信封鈕壓住一角 */
#setPanel { position: absolute; top: 72px; right: 10px; z-index: 5; width: 200px;
  background: linear-gradient(160deg, rgba(13,20,30,0.96), rgba(10,15,23,0.94));
  border: 1px solid rgba(57,224,208,0.28); border-radius: 10px; padding: 12px 14px; }
#setPanel.off { display: none; }
/* 信箱鈕：設定齒輪正下方；紅點＝有未讀信或未領獎勵 */
#mailBtn { position: absolute; top: 38px; right: 10px; width: 26px; height: 26px; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10,14,20,0.75); border: 1px solid #39485d; border-radius: 8px; }
#mailBtn svg { width: 16px; height: 16px; fill: #b7c4d4; }
#mailBtn:active svg { fill: #39e0d0; }
#mailBtn .dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
  background: #ff5a4e; border: 1.5px solid #05070b; border-radius: 50%; display: none; }
#mailBtn .dot.on { display: block; }
.mail-item h4 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mail-item.unread h4::before { content: ''; display: inline-block; width: 7px; height: 7px;
  background: #ff5a4e; border-radius: 50%; margin-right: 6px; flex: none; }
.mail-ts { font-size: 10px; color: #5f7085; font-weight: normal; }
.mail-reward { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed rgba(255,210,62,0.3); font-size: 12px; color: #ffd23e; }
.mail-claim { background: #ffb03e; border: none; color: #241a05; font-weight: bold;
  border-radius: 8px; padding: 6px 16px; font-size: 12px; cursor: pointer; }
.mail-claim.done { background: #33404f; color: #7e8fa3; cursor: default; }
.sp-row { display: flex; align-items: center; gap: 10px; }
.sp-row + .sp-row { margin-top: 12px; }
.sp-lbl { font-size: 12px; color: #8fa0b4; width: 32px; flex: none; }
.sp-row input[type=range] { flex: 1; accent-color: #39e0d0; }

#hud, #hudR { position: absolute; top: 10px; width: 128px;
  background: linear-gradient(160deg, rgba(13,20,30,0.88), rgba(10,15,23,0.78));
  border: 1px solid rgba(57,224,208,0.28);
  border-radius: 8px; padding: 7px 8px 6px; backdrop-filter: blur(3px); }
#hud { left: 10px; border-left: 3px solid #39e0d0; }
#hudR { right: 10px; border-right: 3px solid #39e0d0; }
#hud.off, #hudR.off { display: none; }
.h-title { font-size: 10px; letter-spacing: 3px; color: #39e0d0; margin-bottom: 5px;
  border-bottom: 1px solid rgba(57,224,208,0.2); padding-bottom: 3px; }
#hudR .h-title { text-align: right; }
.h-row { display: grid; grid-template-columns: 36px 1fr 32px; align-items: center;
  gap: 4px; margin-bottom: 4px; }
.h-row .hk { font-size: 10px; color: #7e8fa3; }
.h-row .hb { height: 4px; background: rgba(60,75,95,0.55); border-radius: 2px; overflow: hidden; }
.h-row .hb i { display: block; height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, #2da8e0, #39e0d0); }
.h-row.warn .hb i { background: linear-gradient(90deg, #ff9a3e, #ff5a4e); }
.h-row .hv { font-size: 11px; font-weight: bold; color: #dce4ee; text-align: right;
  font-variant-numeric: tabular-nums; }
.h-row.warn .hv { color: #ff8a6e; }
/* 可點的性能數值：指標提示 + 虛線底線暗示可點看說明 */
[data-stat] { cursor: pointer; }
.h-row.tappable .hk { border-bottom: 1px dotted rgba(140,160,180,0.5); }
.gauge[data-stat] .lbl { border-bottom: 1px dotted rgba(140,160,180,0.5); }
/* 浮出的說明面板（pointer-events:none 讓下一次點擊直接落到別處＝收起） */
.stat-tip { position: fixed; z-index: 200; max-width: 240px; pointer-events: none;
  background: #141b26; border: 1px solid #2b3a4d; border-radius: 8px; padding: 8px 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.5); animation: statTipIn .12s ease-out; }
.stat-tip h5 { margin: 0 0 3px; font-size: 12px; color: #39e0d0; }
.stat-tip p { margin: 0; font-size: 11px; line-height: 1.55; color: #cdd6e2; }
@keyframes statTipIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }
.h-alert { font-size: 10px; color: #ff9a3e; line-height: 1.5; margin-top: 3px;
  border-top: 1px dashed rgba(255,154,62,0.35); padding-top: 3px; }

.slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot-btn { background: linear-gradient(180deg, #1b2431, #141b26); border: 1px solid #2c3a4d; border-radius: 10px; padding: 6px 10px 7px; text-align: left; color: #dce4ee; }
.slot-btn:active { border-color: #39e0d0; }
/* 三行排版：部位 / 裝備名稱 / 素質（小藍字） */
.slot-btn .k { font-size: 11px; color: #7e8fa3; display: block; }
.slot-btn .v { font-size: 14px; font-weight: bold; display: block; margin-top: 1px; }
.slot-btn .s { font-size: 11px; color: #5f9bd4; display: block; margin-top: 2px; line-height: 1.45; }
/* 晶片/行為卡：插槽格區塊 */
.slot-sec { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 6px 10px 7px;
  background: linear-gradient(180deg, #1b2431, #141b26); border: 1px solid #2c3a4d; border-radius: 10px; color: #dce4ee; }
.slot-sec:active { border-color: #39e0d0; }
.slot-sec .k { font-size: 11px; color: #7e8fa3; display: block; }
.slot-row { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.mini-slot { flex: 1; min-width: 0; background: #10161f; border: 1px solid #2c3a4d; border-radius: 8px;
  padding: 6px 3px 7px; text-align: center; font-size: 12px; font-weight: bold; overflow: hidden;
  white-space: nowrap; text-overflow: ellipsis; }
.mini-slot .no { display: block; font-size: 9px; font-weight: normal; color: #7e8fa3; margin-bottom: 2px; }
.mini-slot.empty { border-style: dashed; border-color: #33415466; color: #55637a; font-weight: normal; }
.mini-slot.c-tactical { border-left: 3px solid #ffb03e; }
.mini-slot.c-passive { border-left: 3px solid #4de08a; }
.mini-slot.c-personality { border-left: 3px solid #e07be0; }
.slot-row .sep { color: #55637a; font-size: 13px; flex: 0 0 auto; }

.list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding-right: 4px; cursor: grab; }
.list::-webkit-scrollbar { width: 6px; }
.list::-webkit-scrollbar-track { background: #141b26; border-radius: 3px; }
.list::-webkit-scrollbar-thumb { background: #39485d; border-radius: 3px; }
.list::-webkit-scrollbar-thumb:hover { background: #4d6078; }

.card { background: linear-gradient(180deg, #1b2431, #141b26); border: 1px solid #2c3a4d; border-radius: 10px; padding: 10px 12px; }
.card.sel { border-color: #39e0d0; box-shadow: 0 0 0 1px #39e0d033 inset; }
.card.lock { opacity: .45; }
.card h4 { font-size: 14px; display: flex; justify-content: space-between; align-items: center; }
.card h4 .tag { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: #263447; color: #8fa0b4; font-weight: normal; }
.card h4 .tag.tactical { color: #ffb03e; } .card h4 .tag.passive { color: #4de08a; } .card h4 .tag.personality { color: #e07be0; }
.card p { font-size: 12px; color: #8fa0b4; margin-top: 3px; line-height: 1.5; }
.card .stats { font-size: 11px; color: #5f9bd4; margin-top: 3px; }

/* ---- 底部 tab bar + 中央大 CTA ---- */
#tabbar { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; padding: 6px 18px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #10161f, #0a0f16); border-top: 1px solid #1e2836; }
.tab { background: none; border: none; color: #67788c; font-size: 12px; padding: 8px 0 2px; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tab .ic { width: 22px; height: 22px; }
.tab .ic path, .tab .ic rect, .tab .ic circle { fill: #67788c; }
.tab.on { color: #39e0d0; } .tab.on .ic path, .tab.on .ic rect, .tab.on .ic circle { fill: #39e0d0; }
#ctaFight { width: 76px; height: 76px; border-radius: 50%; border: 3px solid #ffb03e; margin: -30px 10px 0; background: radial-gradient(circle at 35% 30%, #ff9a3e, #e0552a 70%); color: #fff; font-size: 16px; font-weight: bold; box-shadow: 0 6px 18px rgba(224,85,42,0.45); letter-spacing: 2px; }
#ctaFight:active { transform: scale(.95); }
#ctaFight:disabled { filter: grayscale(.8); box-shadow: none; }

/* ---- Modal ---- */
/* z-index 必須高於 #menu(40)：主選單也會開 modal（信箱／公告），否則會被選單整片蓋住＝點了像沒反應 */
#modalWrap { position: absolute; inset: 0; background: rgba(3,5,9,0.66); display: none; align-items: flex-end; z-index: 50; }
#modalWrap.on { display: flex; }
#modal { width: 100%; max-height: 78%; background: #131a25; border-radius: 16px 16px 0 0; border-top: 1px solid #2c3a4d; display: flex; flex-direction: column; padding: 14px 14px calc(12px + env(safe-area-inset-bottom)); animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: .4; } }
#modal h3 { font-size: 15px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
#modal h3 button { background: #263447; border: none; color: #b7c4d4; border-radius: 6px; padding: 4px 12px; font-size: 12px; }

.stage-row { display: flex; justify-content: space-between; align-items: center; }
.stage-row .go { background: #2da8e0; border: none; color: #fff; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: bold; }
.stage-row.done .go { background: #263447; color: #8fa0b4; }
.stage-row .rw { font-size: 11px; color: #ffb03e; }

/* ---- 主選單 ---- */
#menu { position: absolute; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 25%, #1c2941 0%, #0b111b 65%, #05070b 100%); }
#menu.off { display: none; }
.menu-inner { width: 82%; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.menu-emblem { width: 148px; height: 148px; image-rendering: pixelated; margin-bottom: 4px;
  filter: drop-shadow(0 0 18px rgba(57,224,208,0.35)); }
.menu-logo { font-size: 40px; font-weight: 900; letter-spacing: 12px; color: #39e0d0;
  text-shadow: 0 0 24px rgba(57,224,208,0.45), 3px 3px 0 #14413c; text-indent: 12px; }
.menu-sub { font-size: 14px; letter-spacing: 10px; color: #7e8fa3; margin: -4px 0 22px; text-indent: 10px; }
.menu-btn { width: 100%; text-align: left; padding: 16px 20px; border-radius: 14px;
  background: linear-gradient(180deg, #1c2637, #131b28); border: 1px solid #2c3a4d; color: #dce4ee; }
.menu-btn:active { border-color: #39e0d0; transform: scale(.98); }
.menu-btn .t { display: block; font-size: 19px; font-weight: bold; letter-spacing: 3px; }
.menu-btn .d { display: block; font-size: 12px; color: #7e8fa3; margin-top: 4px; }
.menu-btn.locked { opacity: .5; }
.menu-btn.locked:active { border-color: #2c3a4d; transform: none; }
.menu-btn .soon { font-size: 11px; font-weight: normal; color: #ff9a3e; border: 1px solid #ff9a3e66;
  border-radius: 5px; padding: 1px 7px; margin-left: 10px; vertical-align: 3px; letter-spacing: 1px; }
.menu-note { font-size: 11px; color: #55637a; margin-top: 14px; }
.tab-duo { display: flex; justify-content: space-evenly; }
.tab { position: relative; }
.tab .dot { display: none; position: absolute; top: 4px; right: calc(50% - 16px); width: 9px; height: 9px;
  border-radius: 50%; background: #ff5a4e; box-shadow: 0 0 6px rgba(255,90,78,0.8); }
.tab .dot.on { display: block; }

/* ---- 多人 ---- */
.mp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.mp-head .rk { font-size: 13px; color: #ffd23e; font-weight: bold; }
.mp-toggle { display: flex; gap: 6px; }
.log-toggle { margin-bottom: 8px; }
.log-toggle button { flex: 1; padding: 7px 0; }
.mp-toggle button { background: #1c2634; border: 1px solid #2c3a4d; color: #8fa0b4;
  font-size: 12px; padding: 5px 14px; border-radius: 7px; }
.mp-toggle button.on { color: #39e0d0; border-color: #39e0d0; }
.vs-row { display: flex; justify-content: space-between; align-items: center; }
.vs-row .go { background: #e0552a; border: none; color: #fff; border-radius: 8px; padding: 8px 16px; font-size: 13px; font-weight: bold; }
.vs-row .meta { font-size: 11px; color: #7e8fa3; margin-top: 2px; }
.replay-btn { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: none;
  background: none; color: #2da8e0; padding: 0; display: flex; align-items: center; justify-content: center; }
.replay-btn svg { width: 32px; height: 32px; }
.replay-btn:active { color: #39e0d0; transform: scale(.92); }

/* 戰報卡三段排版：狀態列 / 戰績句 / 數據列（緊湊版：一屏剛好 5 筆） */
#logList { gap: 6px; }
.log-card { padding: 5px 10px 6px; }
.log-top { display: flex; align-items: center; gap: 7px; }
.log-tag { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px; display: flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: bold; }
.log-tag.w { background: #143526; color: #4de08a; border: 1px solid #4de08a55; }
.log-tag.l { background: #38181a; color: #ff6a5e; border: 1px solid #ff6a5e55; }
.log-time { flex: 1; font-size: 10px; color: #67788c; }
.log-top .replay-btn { width: 30px; height: 30px; margin: -3px -5px -3px 0; }
.log-top .replay-btn svg { width: 24px; height: 24px; }
.log-main { font-size: 13px; font-weight: bold; line-height: 1.45; margin-top: 3px; }
.log-meta { font-size: 10px; color: #7e8fa3; margin-top: 2px; }

.rank-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center;
  padding: 7px 10px; border-radius: 8px; background: #151d29; border: 1px solid #243247; font-size: 13px; }
.rank-row.me { border-color: #39e0d0; background: #14251f; }
.rank-row .no { color: #7e8fa3; font-weight: bold; }
.rank-row .pt { color: #ffd23e; font-variant-numeric: tabular-nums; }

/* ---- 鍛造工坊 2.0（自由拼裝台）---- */
.dbg { background: #263447; border: 1px dashed #55637a; color: #8fa0b4; font-size: 11px;
  padding: 4px 10px; border-radius: 6px; }
.forge-tools { display: flex; gap: 5px; }
.forge-tools button { background: #1c2634; border: 1px solid #2c3a4d; color: #b7c4d4;
  font-size: 11px; padding: 4px 9px; border-radius: 6px; }
.forge-tools button:active { border-color: #39e0d0; color: #39e0d0; }
/* 鍛造頁吃整個版面：藏機甲展示區與量表 */
#app.forge-full #stage, #app.forge-full #gauges { display: none; }
#forgeCv { display: block; width: 100%; height: auto; flex: 0 1 auto; min-height: 0;
  border: 1px solid #2c3a4d; border-radius: 10px;
  touch-action: none; image-rendering: pixelated; }
#forgeInfo { font-size: 12px; line-height: 1.55; margin: 6px 2px; min-height: 34px; flex: 0 0 auto; }
#forgeInfo .ok { color: #8fa0b4; }
#forgeInfo .bad { color: #ff8a6e; }
/* 部件庫：3 排 x 分頁，左右滑動切頁 */
#pieceStrip { overflow: hidden; flex: 0 0 auto; touch-action: none; user-select: none; }
#piecePages { display: flex; transition: transform .22s ease-out; }
.piece-page { flex: 0 0 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 2px 1px 6px; }
#pieceStrip .piece-opt { padding: 5px 3px 6px; }
#pieceStrip .piece-opt img { height: 34px; -webkit-user-drag: none; user-select: none; pointer-events: none; }
#pieceStrip .piece-opt span { font-size: 11px; }
.pv-lv { color: #ffd23e; font-size: 9px; font-weight: bold; }
#pieceStrip .piece-opt em { font-size: 9px; }
#pieceTabs { display: flex; gap: 6px; padding: 2px 1px 6px; }
#pieceTabs button { flex: 1; background: #1c2634; border: 1px solid #2c3a4d; color: #8fa0b4;
  font-size: 12px; padding: 6px 0; border-radius: 7px; }
#pieceTabs button.on { color: #39e0d0; border-color: #39e0d0; }
.gen-tabs { display: flex; gap: 6px; margin-bottom: 8px; }
.gen-tab { flex: 1; background: #1c2634; border: 1px solid #2c3a4d; color: #8fa0b4;
  font-size: 12px; padding: 7px 0; border-radius: 7px; }
.gen-tab.on { color: #ffb03e; border-color: #ffb03e; }
#fGo { margin-top: 4px; background: #263447; border: none; color: #fff; border-radius: 10px;
  padding: 11px; font-size: 14px; font-weight: bold; letter-spacing: 2px; }
.forge-prev { max-width: 78%; max-height: 84px; image-rendering: pixelated; }
.piece-row { display: flex; gap: 6px; margin-top: 7px; }
.piece-opt { flex: 1; min-width: 0; background: #10161f; border: 1px solid #2c3a4d; border-radius: 8px;
  padding: 6px 3px; color: #dce4ee; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.piece-opt.on { border-color: #39e0d0; box-shadow: 0 0 0 1px #39e0d033 inset; }
.piece-opt img { height: 30px; max-width: 92%; object-fit: contain; image-rendering: pixelated; }
.piece-opt span { font-size: 11px; font-weight: bold; }
.piece-opt em { font-style: normal; font-size: 9px; color: #5f9bd4; }
.rg-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; margin-top: 6px; }
.rg-k { font-size: 11px; color: #8fa0b4; }
.rg-bar { position: relative; height: 8px; background: #1c2634; border-radius: 4px; }
.rg-bar i { position: absolute; top: -7px; margin-left: -5px; border-left: 5px solid transparent;
  border-right: 5px solid transparent; border-top: 7px solid #ffd23e; }
.rg-bar.fillable b { display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, #2da8e0, #39e0d0); }
.rg-v { font-size: 11px; color: #b7c4d4; font-variant-numeric: tabular-nums; }
.forge-name { background: #10161f; border: 1px solid #2c3a4d; border-radius: 6px; color: #dce4ee;
  font-size: 14px; font-weight: bold; padding: 5px 8px; width: 60%; }
.forge-name:focus { outline: none; border-color: #39e0d0; }

#toast { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); background: rgba(10,14,20,0.9); border: 1px solid #39e0d0; color: #dce4ee; padding: 10px 20px; border-radius: 10px; font-size: 14px; display: none; z-index: 60; white-space: nowrap; }   /* 高於 #menu(40) 與 #modalWrap(50)：選單/彈窗上的提示也要看得到 */
#toast.on { display: block; animation: pop 1.8s ease-out forwards; }
@keyframes pop { 0% { opacity: 0; transform: translateX(-50%) scale(.9); } 12% { opacity: 1; transform: translateX(-50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* 非中文語系：大字距只適合方塊字，拉丁/日韓字收窄字距才不會又鬆又大 */
html:not([lang="zh"]) .menu-logo { letter-spacing: 4px; text-indent: 4px; }
html:not([lang="zh"]) .menu-sub  { letter-spacing: 4px; text-indent: 4px; }
html:not([lang="zh"]) .menu-btn .t { letter-spacing: 0.5px; }
html:not([lang="zh"]) .h-title,
html:not([lang="zh"]) .sec-title { letter-spacing: 1px; text-indent: 0; }
html:not([lang="zh"]) #ctaFight,
html:not([lang="zh"]) .gen-tab,
html:not([lang="zh"]) .menu-btn .soon { letter-spacing: 0.5px; }
