/* 小小亞瑟王 復刻版 — 樣式。舞台 360×640（直式手機），依視窗等比縮放 */
:root {
  --mb-tx: #2e2a24;
  --mb-lb: #1b6a7e;
  --mb-hint: #6b6355;
  --mb-red: #d8402a;
  --mb-line: rgba(90, 76, 50, .28);
  --tl-tx: #f0e8d8;
  --tl-hint: #a8c4c8;
  --gold: #e8c060;
  --gold-l: #fff1b0;
  --gold-d: #9a6a10;
  --red: #8a1a14;
  --red-d: #4a0a08;
  --wood: #3a1e10;
  --wood-l: #5a3018;
  --parch: #ecdcb6;
  --parch-d: #c9a877;
  --teal: #1f5a5e;
  --teal-d: #0e3438;
  --ink: #2a1a10;
  --good: #2a8a3a;
  --bad: #c02a2a;
  --font: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", "Heiti TC", sans-serif;
  /* 標題、按鈕、分頁、選單列：台灣版的粗黑體（assets/fonts，Noto Sans TC Bold／Black 的子集） */
  --font-ui: "LA Hei", "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", "Heiti TC", sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 點擊時不要有瀏覽器（Android WebView）的淺藍色框框：點擊高亮、按鈕與可點元素的焦點外框、長按選取 */
*:focus, *:focus-visible { outline: none; }
button, a, [data-act], [data-t], [data-nl], [data-ac], [data-op], img { -webkit-touch-callout: none; }
input, textarea, select { -webkit-user-select: text; user-select: text; }
input:focus, textarea:focus, select:focus { outline: none; box-shadow: 0 0 0 2px rgba(232, 192, 96, .75); }
::selection { background: rgba(232, 192, 96, .45); }
html, body { margin: 0; height: 100%; touch-action: pan-x pan-y; } /* 不能兩指放大、點兩下放大（畫面大小鎖定） */
body { background: #120604 radial-gradient(ellipse at 50% 40%, #3a1810 0%, #120604 75%); font-family: var(--font); color: var(--ink); overflow: hidden; -webkit-user-select: none; user-select: none; }
button { font-family: inherit; }
svg { display: block; }
#svg-defs { position: absolute; }
#app { position: fixed; inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
#stage { position: absolute; width: 360px; height: 640px; transform-origin: 0 0; overflow: hidden; background: #2a120a; box-shadow: 0 0 0 2px #7a4a10, 0 12px 50px rgba(0, 0, 0, .7); border-radius: 8px; touch-action: pan-x pan-y; }
#modal-layer, #dialog-layer, #fx-layer, #toast-layer { position: absolute; inset: 0; pointer-events: none; }
#modal-layer > *, #dialog-layer > * { pointer-events: auto; }
#modal-layer { z-index: 30; }
#dialog-layer { z-index: 40; }
#fx-layer { z-index: 45; }
#toast-layer { z-index: 50; display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 120px; }

/* ---------- 頂部狀態列（台灣版原圖：assets/ui/header.png、ticker.png；原圖 640 寬，這裡縮成 360 寬 = ×0.5625） ---------- */
#header { position: absolute; left: 0; right: 0; top: 0; height: 18px; background: #5a0806 url(../assets/ui/header.png) 0 0 / 100% 100% no-repeat; z-index: 10; color: #fff; font-size: 11px; }
#header .hv { position: absolute; top: 1px; line-height: 16px; font-weight: bold; white-space: nowrap; text-shadow: 0 0 2px #3a0000, 0 1px 1px #000; letter-spacing: .3px; }
#header .h-cp { left: 27px; }
#header .h-crys { left: 141px; }
#header .h-expl { left: 299px; width: 52px; text-align: center; font-size: 9.5px; font-weight: normal; }
#header .h-expfill { position: absolute; left: 297px; top: 4px; width: 56px; height: 10px; border-radius: 2px; overflow: hidden; }
#header .h-expfill i { display: block; height: 100%; background: linear-gradient(#c8f080, #4aa020); opacity: .55; }
#ticker { position: absolute; left: 0; right: 0; top: 17px; height: 19px; background: #2a0404 url(../assets/ui/ticker.png) 0 0 / 100% 100% no-repeat; overflow: hidden; z-index: 9; }
#ticker-text { position: absolute; top: 2px; white-space: nowrap; color: #fff; font-size: 11.5px; font-weight: bold; text-shadow: 0 1px 0 #000; left: 100%; animation: ticker 14s linear infinite; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(calc(-100% - 380px)); } }

/* ---------- 主畫面區：底紋是原版的羊皮紙 ---------- */
#screen { position: absolute; left: 0; right: 0; top: 45px; bottom: 76px; overflow: hidden; background: #3a1a0a; z-index: 1; isolation: isolate; }
.scroll { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 8px; scrollbar-width: thin; }
.scroll::-webkit-scrollbar { width: 4px; }
.scroll::-webkit-scrollbar-thumb { background: #9a6a30; border-radius: 2px; }

/* ---------- 底部選單（原版選單列圖：assets/ui/nav.jpg，圖示與字樣都在圖上） ---------- */
#nav { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: #6a0a06 url(../assets/ui/nav.jpg) 0 0 / 100% 100% no-repeat; display: grid; grid-template-columns: repeat(5, 1fr); z-index: 10; }
.nav-btn { position: relative; border: none; background: none; cursor: pointer; padding: 0; }
.nav-btn:hover { background: radial-gradient(ellipse at 50% 45%, rgba(255, 240, 160, .22), transparent 65%); }
.nav-btn.on { background: radial-gradient(ellipse at 50% 45%, rgba(255, 230, 120, .28), transparent 70%); }
/* 原版的數字徽章：紅色膠囊、淺色細邊，在圖示右上方 */
.badge { position: absolute; top: 1px; right: 2px; z-index: 2; min-width: 21px; height: 15px; border-radius: 8px; background: radial-gradient(ellipse at 50% 30%, #e85048, #a8100c 70%); color: #fff; font-size: 9.5px; font-weight: bold; line-height: 13px; text-align: center; padding: 0 4px; border: 1.2px solid #f6d6cc; box-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.badge.live { background: radial-gradient(ellipse at 50% 30%, #6ae070, #1a8a2a 70%); animation: pulse 1s infinite; }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* ---------- 共用元件 ---------- */
/* 卡片：原版是疊在皮革上的半透明灰黑帶（≈ 66% 的 (71,78,71)） */
.frame { position: relative; border-style: solid; border-color: transparent; border-width: 13px 11px; border-image: url(../assets/ui/v4/marble9.png) 64 fill / 13px 11px stretch; padding: 3px 3px 2px; color: var(--mb-tx); text-shadow: none; }
.frame.dark { border-image: none; border: 1px solid #a8843c; border-radius: 6px; padding: 7px 8px; background: rgba(6, 12, 16, .74); color: var(--tl-tx); text-shadow: 0 1px 1px #000; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .5); }
/* 標題牌：原版的青綠色牌子（左右金色飾角） */
.title-bar { position: relative; margin: 0 auto 8px; width: fit-content; min-width: 60%; text-align: center; color: #fff; font-weight: 900; font-size: 14px; padding: 5px 30px 6px; letter-spacing: 2px; border: 0 solid transparent; border-image: url(../assets/ui/v4/title_blue.png) 14 52 fill / 6px 24px stretch; text-shadow: -1px -1px 0 #0a1a2e, 1px -1px 0 #0a1a2e, -1px 1px 0 #0a1a2e, 1px 1px 0 #0a1a2e, 0 0 3px #001022; }
/* 按鈕：原版的青綠色鈕（「公告」）與紅色鈕（「騎士団設定」），字是白／金色描黑邊 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 7px 15px; font-size: 13px; font-weight: bold; cursor: pointer; color: #fff; white-space: nowrap; line-height: 1.25; background: none; border: 0 solid transparent; border-image: url(../assets/ui/v4/b_blue.png) 24 34 fill / 10px 14px stretch; text-shadow: -1px -1px 0 #0a1a2e, 1px -1px 0 #0a1a2e, -1px 1px 0 #0a1a2e, 1px 1px 0 #0a1a2e, 0 0 3px #001022; }
.btn:hover, .btn:active { border-image-source: url(../assets/ui/v4/b_blue_on.png); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.disabled, .btn.gray { border-image-source: url(../assets/ui/v4/b_gray.png) !important; color: #e4e4e4; cursor: not-allowed; text-shadow: -1px -1px 0 #2a2a2a, 1px -1px 0 #2a2a2a, -1px 1px 0 #2a2a2a, 1px 1px 0 #2a2a2a; }
.btn.red { border-image-source: url(../assets/ui/v4/b_red.png); text-shadow: -1px -1px 0 #3a0000, 1px -1px 0 #3a0000, -1px 1px 0 #3a0000, 1px 1px 0 #3a0000; }
.btn.red:hover, .btn.red:active { border-image-source: url(../assets/ui/v4/b_red_on.png); }
.btn.green { border-image-source: url(../assets/ui/v4/b_green.png); text-shadow: -1px -1px 0 #003a18, 1px -1px 0 #003a18, -1px 1px 0 #003a18, 1px 1px 0 #003a18; }
.btn.green:hover, .btn.green:active { border-image-source: url(../assets/ui/v4/b_green_on.png); }
.btn.gold { border-image-source: url(../assets/ui/v4/b_gold.png); color: #fff; text-shadow: -1px -1px 0 #4a2a00, 1px -1px 0 #4a2a00, -1px 1px 0 #4a2a00, 1px 1px 0 #4a2a00; }
.btn.gold:hover, .btn.gold:active { border-image-source: url(../assets/ui/v4/b_gold_on.png); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-image-width: 8px 11px; }
.btn.lg { padding: 10px 20px; font-size: 16px; border-image-width: 13px 18px; }
.btn.block { display: flex; width: 100%; }
.row { display: flex; gap: 6px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.center { justify-content: center; }
.col { display: flex; flex-direction: column; gap: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.hint { font-size: 11px; color: var(--mb-hint); }
#screen.framed .hint, .frame.dark .hint { color: var(--tl-hint); }
#screen.framed .frame:not(.dark) .hint, .modal .hint { color: var(--mb-hint); }
#screen.framed .frame .hint.bad, .frame.dark .hint.bad, .modal .hint.bad { color: var(--bad); font-weight: bold; } /* 超過裝力上限等提醒 */
.good { color: var(--good); font-weight: bold; }
.bad, .hint.bad { color: var(--bad); font-weight: bold; }
.num { font-variant-numeric: tabular-nums; }
.ic-sm { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
img.medal-img { border-radius: 50%; object-fit: cover; }
img.item-img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.ic-job { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.sep { height: 1px; background: linear-gradient(90deg, transparent, #e8c060, transparent); margin: 6px 0; opacity: .7; }
.bar { height: 10px; background: #3a1a0a; border-radius: 5px; overflow: hidden; border: 1px solid #000; position: relative; }
.bar i { position: absolute; left: 0; top: 0; bottom: 0; }
.bar.hp i { background: linear-gradient(#a8f070, #3a9a20); }
.bar.hp.low i { background: linear-gradient(#ffb070, #d0401a); }
.bar.boss i { background: linear-gradient(#ff7060, #a01a10); }
.bar.bp i { background: linear-gradient(#80c8ff, #2a6ad0); }
.bar.cp i { background: linear-gradient(#ffe070, #d08a10); }
.bar span { position: absolute; inset: 0; text-align: center; font-size: 9px; line-height: 9px; color: #fff; font-weight: bold; text-shadow: 0 0 2px #000; }
.tabs { display: flex; gap: 3px; margin-bottom: 6px; }
.tabs button { flex: 1; padding: 5px 2px; font-weight: bold; font-size: 12.5px; cursor: pointer; background: none; border: 0 solid transparent; border-image: url(../assets/ui/v4/b_blue.png) 24 34 fill / 8px 11px stretch; color: #c8d4dc; filter: brightness(.66) saturate(.75); text-shadow: -1px -1px 0 #0a1a2e, 1px -1px 0 #0a1a2e, -1px 1px 0 #0a1a2e, 1px 1px 0 #0a1a2e, 0 0 3px #001022; }
.tabs button.on { filter: none; color: #fff4b8; border-image-source: url(../assets/ui/v4/b_blue_on.png); }
.empty { text-align: center; color: var(--mb-hint); padding: 18px 8px; font-size: 13px; }
#screen.framed .empty { color: var(--tl-hint); }
#screen.framed .frame:not(.dark) .empty, .modal .empty { color: var(--mb-hint); }

/* ---------- 我的主頁（金框、面板、小圖示都是台灣版原圖；座標＝原圖 ×0.5625） ---------- */
.scroll.home { padding: 0; background: #d8b880 url(../assets/ui/parch.jpg) 0 0 / 248px 259px repeat; }
.home-frame { position: relative; width: 360px; height: 303px; background: url(../assets/ui/home_frame.jpg) 0 0 / 100% 100% no-repeat; overflow: hidden; }
.home-frame .av { position: absolute; left: 25px; top: 42px; width: 230px; height: 220px; z-index: 1; clip-path: inset(-22px -91px -10px -11px); } /* 大型原版裝備會超出：裁在金框內側，圖示、按鈕在上面 */
.home-frame .hicon, .home-frame .hot, .home-frame .bst { z-index: 2; }
.home-frame .av svg { width: 100%; height: 100%; }
.home-frame .bst { position: absolute; left: 244px; top: 74px; width: 88px; height: 88px; animation: float 3s ease-in-out infinite; }
/* 原版動畫（js/anim.js、js/ui-anim.js）：靈獸動畫載好就蓋過靜態圖；裝備特效的背景層在角色後面、前景層在前面，都裁在金框內 */
.anim-host { position: relative; }
.anim-cv { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; }
.anim-host.anim-on > img, .anim-host.anim-on > svg { visibility: hidden; }
.home-frame .bst.anim-on { left: 226px; top: 40px; width: 128px; height: 168px; animation: none; }
.home-fx { position: absolute; inset: 0; pointer-events: none; clip-path: inset(20px 14px 31px 14px); }
.home-fx.fx-back { z-index: 0; }
.home-fx.fx-front { z-index: 1; }
.mission-bst { width: 130px; height: 130px; }
/* 設定畫面的聲音（js/audio.js） */
.snd-row { display: grid; grid-template-columns: 64px 1fr 30px; gap: 6px; align-items: center; font-size: 12px; }
.snd-row input { width: 100%; accent-color: #e0a030; }
.snd-row b { text-align: right; font-size: 11px; }
.snd-pick { display: grid; gap: 4px; }
.snd-pick[hidden] { display: none; }
.snd-now { font-size: 12px; }
.snd-now span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snd-pick label { display: grid; grid-template-columns: 64px 1fr; gap: 6px; align-items: center; font-size: 12px; }
.snd-pick select { font: inherit; font-size: 12px; padding: 2px; border-radius: 4px; border: 1px solid #9a6a30; background: #fff8e8; min-width: 0; }
.beast-cut { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.home-frame .bst > svg, .home-frame .bst > img { width: 100%; height: 100%; }
img.beast.orig { display: block; object-fit: cover; border-radius: 10px; }
img.beast.orig.home { border-radius: 50%; border: 2px solid #fff6d0; box-shadow: 0 0 0 1.5px #b08020, 0 3px 6px rgba(0, 0, 0, .35); }
@keyframes float { 50% { transform: translateY(-5px); } }
.hicon { position: absolute; cursor: pointer; }
.hicon img { display: block; width: 100%; height: 100%; }
.hicon:hover { filter: brightness(1.1) drop-shadow(0 0 3px #fff); }
.hicon.gift { left: 35px; top: 88px; width: 34px; height: 26px; }
.hicon.letter { left: 34px; top: 117px; width: 38px; height: 24px; }
.hicon.shop { left: 29px; top: 219px; width: 47px; height: 47px; }
.hicon.castle { left: 278px; top: 209px; width: 56px; height: 60px; }
.hicon .hnum { position: absolute; width: 14px; text-align: center; font-size: 9px; line-height: 12px; color: #fff; font-weight: bold; text-shadow: 0 0 2px #600; }
.hicon.gift .hnum { left: 22px; top: 14px; }
.hicon.letter .hnum { left: 23px; top: 9px; }
.hot { position: absolute; border: none; background: none; padding: 0; cursor: pointer; border-radius: 4px; }
.hot:hover { background: rgba(255, 255, 255, .14); box-shadow: 0 0 6px rgba(255, 240, 180, .6); }
.hot:active { transform: translateY(1px); }
.hb-stats { left: 21px; top: 269px; width: 86px; height: 33px; }
.hb-event { left: 127px; top: 269px; width: 107px; height: 33px; }
.hb-guild { left: 249px; top: 269px; width: 89px; height: 33px; }
.evlive { position: absolute; left: 6px; right: 6px; top: 7px; height: 19px; line-height: 19px; border-radius: 9px; background: linear-gradient(#fffbd0, #ffe040); color: #8a3a00; font-size: 12px; font-weight: 900; animation: glowbtn 1.2s infinite; }
.evlive:empty { display: none; }
@keyframes glowbtn { 50% { box-shadow: 0 0 8px #fff3a0; } }
.home-panel { position: relative; width: 360px; height: 147px; background: url(../assets/ui/home_panel.jpg) 0 0 / 100% 100% no-repeat; color: #fff; font-size: 10.5px; font-weight: bold; text-shadow: 0 0 2px #5a3a10, 0 1px 1px #3a2008; }
.home-panel .pl, .home-panel .pv { position: absolute; line-height: 14px; white-space: nowrap; }
.home-panel .pl { left: 38px; }
.home-panel .pv { left: 98px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; }
.home-panel .p-name { left: 38px; top: 15px; max-width: 120px; font-size: 11px; }
.home-panel .p-id { left: 38px; top: 32px; max-width: 120px; }
.home-panel .r2 { top: 48px; } .home-panel .r3 { top: 65px; } .home-panel .r4 { top: 81px; } .home-panel .r5 { top: 98px; } .home-panel .r6 { top: 114px; }
.home-panel .link { cursor: pointer; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .5); }
.hb-notice { left: 218px; top: 16px; width: 122px; height: 36px; }
.hb-members { left: 218px; top: 57px; width: 122px; height: 36px; }
.hb-board { left: 218px; top: 100px; width: 122px; height: 36px; }
.hb-next { left: 164px; top: 56px; width: 31px; height: 31px; border-radius: 50%; }
.home-extra { padding: 6px 10px; font-size: 11.5px; color: #4a2a10; line-height: 1.6; text-shadow: 0 1px 0 rgba(255, 245, 220, .6); }
.home-extra .ic-sm, .home-extra .ic-job { vertical-align: -3px; }
.info-list { display: grid; grid-template-columns: 1fr; gap: 3px; font-size: 13px; }
.info-list div { display: flex; gap: 6px; align-items: center; }
.info-list b { color: #6a3a10; width: 56px; flex: none; }
.side-btns { display: flex; flex-direction: column; gap: 6px; }

/* ---------- 王宮（原版最後版本：紅色布幕 backCurtain、瑪麗公主 marry、Level 牌 levelPannel、好感度條 marryBar；原圖 ×0.5625） ---------- */
#screen.framed > .scroll.palace-wrap { inset: 0; padding: 0 0 10px; }
.palace { position: relative; width: 360px; height: 432px; background: #3a0606 url(../assets/ui/v4/curtain.jpg) 0 0 / 100% 100% no-repeat; }
.pal-mary { position: absolute; left: 36px; top: 44px; width: 288px; height: 289px; object-fit: fill; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .55)); animation: palIn .5s ease-out both; }
@keyframes palIn { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.pal-lvbox { position: absolute; left: 8px; top: 334px; width: 76px; height: 49px; z-index: 2; background: url(../assets/ui/v4/lv_panel.png) 0 0 / 100% 100% no-repeat; text-align: center; color: #ffe7a0; text-shadow: 0 0 2px #2a1000, 0 1px 1px #000; }
.pal-lvbox i { display: block; margin-top: 3px; font: italic bold 14px/15px Georgia, "Times New Roman", serif; }
.pal-lvbox b { display: block; font: bold 19px/20px Georgia, serif; color: #fff4c8; }
.pal-bar { position: absolute; left: 70px; top: 343px; width: 284px; height: 31px; background: url(../assets/ui/v4/mary_bar.png) 0 0 / 100% 100% no-repeat; }
.pal-bar i { position: absolute; left: 11px; top: 9px; height: 13px; max-width: 261px; border-radius: 6px; background: linear-gradient(#ffe9a0, #f0b030 50%, #c07810); box-shadow: 0 0 6px rgba(255, 210, 90, .8); transition: width .6s ease-out; }
.pal-bar span { position: absolute; left: 0; right: 0; top: 8px; text-align: center; font-size: 10.5px; font-weight: bold; line-height: 15px; color: #fff; text-shadow: 0 0 2px #000, 0 1px 1px #000; }
.pal-btns { position: absolute; left: 0; right: 0; top: 384px; display: flex; justify-content: center; gap: 18px; }
.pal-btns .btn { width: 118px; }
.pal-foot { margin: 6px 6px 0; font-size: 12px; }
.pal-line { font-size: 12.5px; line-height: 1.55; margin-bottom: 3px; }
.pal-line b { color: var(--mb-lb); margin-right: 2px; }

/* ---------- 戰鬥（討伐） ---------- */
/* 原版討伐背景：夜晚的森林（截圖去掉怪物與介面後補洞，assets/ui/hunt_bg.jpg） */
.field { position: absolute; inset: 0; background: #1a1a14 url(../assets/ui/v4/field.jpg) 50% 100% / 100% auto no-repeat; overflow: hidden; }
#stage.venus .field:not(.bossing) { background-image: url(../assets/ui/v4/field_venus.jpg); }
.field .mon { position: absolute; cursor: pointer; transition: transform .1s; }
.field .mon:hover { transform: scale(1.08); }
.field .mon svg, .field .mon img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .3)); }
.field .mon .lv { position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); background: rgba(0, 0, 0, .6); color: #fff; font-size: 10px; font-weight: bold; border-radius: 6px; padding: 0 5px; white-space: nowrap; }
.field .mon.boss { width: 120px; height: 120px; }
.field .mon.boss .lv { background: #a01a10; }
.field .mon.boss::after { content: "BOSS"; position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 900; color: #ffe060; text-shadow: 0 0 3px #a00, 0 1px 0 #000; }
.field .mon.dying { animation: die .5s forwards; pointer-events: none; }
@keyframes die { to { transform: scale(.2) rotate(30deg); opacity: 0; } }
.hunt-bar { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 5px; align-items: center; }
.hunt-top { position: absolute; left: 6px; right: 6px; top: 6px; display: flex; gap: 5px; align-items: center; justify-content: space-between; }
.pill { background: rgba(0, 0, 0, .55); color: #fff; border-radius: 10px; padding: 2px 8px; font-size: 11px; font-weight: bold; border: 1px solid var(--gold-d); }
.pill.bless { background: linear-gradient(#fff6a0, #e0b020); color: #6a3a00; border-color: #fff; }
.slash { position: absolute; width: 110px; height: 110px; pointer-events: none; animation: slash .45s ease-out forwards; }
@keyframes slash { from { opacity: 1; transform: scale(.4) rotate(-20deg); } to { opacity: 0; transform: scale(1.3) rotate(10deg); } }

/* ---------- 幻獸戰／聯賽戰鬥 ---------- */
@keyframes hitflash { 30% { filter: brightness(2) sepia(1) hue-rotate(-40deg); transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.blog div { padding: 1px 0; border-bottom: 1px dotted rgba(255, 255, 255, .08); }
.blog .s0 { color: #bfe6ff; }
.blog .s1 { color: #ffc0b0; }
.blog .big { color: #fff36a; font-weight: bold; }
.blog .sys { color: var(--gold); font-weight: bold; }
.blog .heal { color: #a8f0a0; }
.blog .sup { color: #e0c0ff; }
.blog time { color: #9a8a7a; margin-right: 4px; }
.cmd-info { font-size: 11px; color: #e8d0a0; margin-bottom: 4px; }
.boss-area { position: relative; height: 170px; display: flex; align-items: center; justify-content: center; }
.boss-area .boss { width: 170px; height: 170px; filter: drop-shadow(0 0 12px rgba(255, 80, 60, .5)); animation: float 3s ease-in-out infinite; }
.boss-area .raid-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.boss-area .raid-img.card { width: 140px; height: 140px; margin: 15px; object-fit: cover; border: 3px solid #e8c060; border-radius: 10px; box-shadow: 0 0 0 2px #6a3a10; }
.dmg-pop { position: absolute; font-weight: 900; font-size: 20px; color: #fff36a; text-shadow: 0 0 4px #a00, 0 2px 0 #000; animation: pop 1s ease-out forwards; pointer-events: none; white-space: nowrap; transform: translateX(-50%); }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, 10px) scale(.6); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -40px) scale(1); } }

/* ---------- 列表 ---------- */
.eq-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.eq-cell { position: relative; cursor: pointer; border-radius: 8px; }
.eq-cell .eicon { width: 100%; height: auto; aspect-ratio: 1; }
.eq-cell .lvtag { position: absolute; right: 2px; bottom: 2px; background: rgba(0, 0, 0, .65); color: #fff; font-size: 9px; font-weight: bold; border-radius: 4px; padding: 0 3px; }
.eq-cell .tag { position: absolute; left: 2px; top: 2px; font-size: 9px; font-weight: bold; color: #fff; background: #2a7ad0; border-radius: 4px; padding: 0 3px; }
.eq-cell .tag.main { background: #d0302a; }
.eq-cell .lock { position: absolute; right: 2px; top: 2px; font-size: 11px; }
.eq-cell.sel::before { content: ""; position: absolute; inset: -2px; z-index: 3; pointer-events: none; background: url(../assets/anim/ui/selectFrame100x100/7.webp) 50% 50% / 100% 100% no-repeat; }
.eq-cell.sel::after { content: ""; position: absolute; inset: -9px; z-index: 2; pointer-events: none; background: url(../assets/anim/ui/selectFrame100x100/4.webp) 50% 50% / 100% 100% no-repeat; animation: selRing 1s linear infinite; }
@keyframes selRing { 0% { opacity: 0; transform: scale(.94); } 20% { opacity: .6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.27); } }
.eq-cell.dim { opacity: .35; }
.eq-cell .check { position: absolute; inset: 0; background: rgba(255, 106, 42, .35); border-radius: 8px; display: grid; place-items: center; font-size: 22px; color: #fff; font-weight: 900; text-shadow: 0 0 4px #000; }
.list-row { display: flex; gap: 8px; align-items: center; padding: 5px 6px; margin-bottom: 4px; background: rgba(255, 255, 255, .42); border: 1px solid var(--mb-line); border-radius: 6px; color: var(--mb-tx); text-shadow: none; }
.list-row .thumb { width: 46px; height: 46px; flex: none; }
.list-row .thumb svg { width: 100%; height: 100%; }
.list-row .main { flex: 1; min-width: 0; font-size: 12.5px; }
.list-row .main b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stat-table td { padding: 2px 4px; border-bottom: 1px dotted var(--mb-line); }
.stat-table td:first-child { color: var(--mb-lb); font-weight: bold; }
.frame.dark .stat-table td { border-bottom-color: rgba(255, 230, 170, .22); }
.frame.dark .stat-table td:first-child { color: #9adcec; }
.stat-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: bold; }
.skill-chip { display: block; font-size: 11px; background: rgba(27, 106, 126, .12); border: 1px solid rgba(27, 106, 126, .25); border-radius: 4px; padding: 2px 5px; margin-top: 3px; }
.skill-chip.locked { opacity: .5; }
.chip { display: inline-block; font-size: 10px; font-weight: bold; color: #fff; border-radius: 4px; padding: 0 4px; }

/* ---------- 視窗與對話 ---------- */
.modal-wrap { position: absolute; inset: 0; background: rgba(0, 8, 12, .62); display: flex; align-items: center; justify-content: center; padding: 64px 5px 14px; }
/* 原版最後版本的視窗：大理石（assets/ui/v4/marble9.png）＋木頭標題列（title_bar.png）＋右上角圓形關閉鈕（close.png）；台灣版的金框皮革已經換掉 */
.modal { position: relative; width: 100%; max-height: 100%; display: flex; flex-direction: column; border-style: solid; border-color: transparent; border-width: 22px 16px 18px; border-image: url(../assets/ui/v4/marble9.png) 64 fill / 22px 16px 18px stretch; color: var(--mb-tx); text-shadow: none; padding: 12px 2px 4px; animation: mdIn .24s cubic-bezier(.2, 1.5, .45, 1) both; }
@keyframes mdIn { from { transform: scale(.82); opacity: 0; } }
.modal .body { overflow-y: auto; min-height: 0; padding: 2px; }
.modal .mtitle, .page-title { position: absolute; left: 50%; top: -42px; transform: translateX(-50%); min-width: 176px; max-width: 300px; height: 44px; padding: 0 40px; line-height: 34px; text-align: center; white-space: nowrap; overflow: hidden; color: #fff; font-weight: 900; font-size: 16px; letter-spacing: 3px; border: 0 solid transparent; border-image: url(../assets/ui/v4/title_bar.png) 20 66 36 fill / 10px 30px 16px stretch; text-shadow: -1px -1px 0 #1a0a00, 1px -1px 0 #1a0a00, -1px 1px 0 #1a0a00, 1px 1px 0 #1a0a00, 0 0 4px #000; z-index: 2; }
.modal .close { position: absolute; right: -14px; top: -20px; width: 40px; height: 40px; border: none; background: url(../assets/ui/v4/close.png) center / contain no-repeat; cursor: pointer; padding: 0; z-index: 3; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .5)); }
.modal .close:hover { filter: brightness(1.18) drop-shadow(0 0 4px #9ad8ff); }
.modal .close:active { transform: scale(.92); }
.list-row .main b { color: #2a2418; }
.frame.dark .list-row { background: rgba(255, 255, 255, .08); border-color: rgba(200, 170, 100, .3); color: var(--tl-tx); }
.frame.dark .list-row .main b { color: #fff4c8; }

/* 原版最後版本的頁面（武具一覽、裝備、寶物箱、團體戰、王宮…）：魔法陣底＋星光、木頭標題列、左上角紅色「返回」 */
#screen.framed { background: #0b161a url(../assets/ui/v4/bg.jpg) 50% 0 / 100% auto no-repeat; color: var(--tl-tx); text-shadow: 0 1px 1px rgba(0, 0, 0, .8); }
#screen.framed > .scroll { inset: 42px 0 0; padding: 4px 6px 12px; z-index: 1; }
.page-fx { position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .9; }
#screen.framed .page-title { top: 0; z-index: 3; }
#screen.framed .page-close { position: absolute; left: 0; top: 3px; width: 58px; height: 34px; padding: 0 0 2px 4px; border: none; background: url(../assets/ui/v4/back.png) 0 0 / 100% 100% no-repeat; color: #fff; font: inherit; font-size: 12.5px; font-weight: 900; letter-spacing: 1px; cursor: pointer; z-index: 4; text-shadow: -1px -1px 0 #3a0000, 1px -1px 0 #3a0000, -1px 1px 0 #3a0000, 1px 1px 0 #3a0000; }
#screen.framed .page-close:hover, #screen.framed .page-close:active { background-image: url(../assets/ui/v4/back_on.png); }
.dialog { position: absolute; left: 6px; right: 6px; bottom: 66px; border-style: solid; border-color: transparent; border-width: 14px; border-image: url(../assets/ui/v4/guide.png) 24 fill / 14px stretch; background: rgba(4, 10, 16, .8); background-clip: padding-box; color: #fff; text-shadow: 0 1px 1px #000; padding: 0 0 0 100px; min-height: 120px; }
.dialog .por { position: absolute; left: -12px; bottom: 0; width: 104px; height: 150px; }
/* 原作卡圖的頭像（塔妮亞、瑪麗公主）：金框小卡，從對話框左上探出來 */
.dialog .por img.beast.orig { position: absolute; left: 10px; bottom: 34px; width: 86px; height: 86px; border-radius: 8px; border: 2px solid var(--gold); box-shadow: 0 0 0 1.5px var(--wood), 0 3px 8px rgba(0, 0, 0, .4); }
.dialog .who { display: inline-block; background: linear-gradient(#2a7a98, #144a62); border: 1px solid #c8a050; color: #fff; font-weight: bold; font-size: 12px; padding: 1px 10px; border-radius: 4px; margin-bottom: 4px; }
.dialog .txt { font-size: 14px; line-height: 1.55; min-height: 44px; }
.dialog .opts { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.toast { background: rgba(4, 16, 22, .92); color: #fff; border: 1.5px solid #c8a050; border-radius: 6px; padding: 6px 14px; font-size: 13px; font-weight: bold; max-width: 320px; text-align: center; box-shadow: 0 0 0 1px #000, 0 4px 10px rgba(0, 0, 0, .5); text-shadow: 0 1px 1px #000; animation: toast-in .2s ease-out, toast-out .4s ease-in 2.6s forwards; }
.toast.good { border-color: #8ae070; }
.toast.bad { border-color: #ff7a6a; color: #ffd8d0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- 扭蛋 ---------- */
.gacha-card { display: flex; gap: 8px; align-items: center; }
.gacha-card .chest { width: 54px; height: 54px; flex: none; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35)); }
.reveal { display: grid; gap: 6px; justify-items: center; }
.reveal .eicon { width: 74px; height: 74px; animation: reveal .5s ease-out backwards; }
.reveal .big-reveal { width: 150px; height: 150px; }
@keyframes reveal { from { transform: scale(0) rotate(-180deg); opacity: 0; } }
.shine { position: relative; }
.shine::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; background: conic-gradient(from 0deg, transparent, rgba(255, 240, 160, .8), transparent 30%, rgba(255, 240, 160, .8), transparent 60%, rgba(255, 240, 160, .8), transparent); animation: spin 3s linear infinite; z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 標題與建立角色 ---------- */
/* 啟動載入畫面（js/ui-boot.js）：原版開場插圖輪播＋實際的素材載入進度 */
.boot { position: absolute; inset: 0; z-index: 65; background: #000; overflow: hidden; transition: opacity .7s ease; color: #fff; }
.boot.out { opacity: 0; pointer-events: none; }
.bt-slides, .bt-slide { position: absolute; inset: 0; }
.bt-slide { background: center / cover no-repeat; opacity: 0; transition: opacity 1.2s ease; }
.bt-slide.in { opacity: 1; }
.bt-slide.a.in { animation: btKbA 4.8s linear forwards; }
.bt-slide.b.in { animation: btKbB 4.8s linear forwards; }
@keyframes btKbA { from { transform: scale(1.04) translate(1%, 1.2%); } to { transform: scale(1.13) translate(-1.5%, -1.5%); } }
@keyframes btKbB { from { transform: scale(1.13) translate(-1%, -1%); } to { transform: scale(1.04) translate(1.2%, .8%); } }
.bt-shade { position: absolute; inset: 0; background: linear-gradient(transparent 62%, rgba(0, 0, 0, .55) 80%, rgba(0, 0, 0, .85)); pointer-events: none; }
.bt-ui { position: absolute; left: 14px; right: 14px; bottom: 18px; }
.bt-tip { min-height: 34px; margin-bottom: 9px; padding: 6px 10px; font-size: 11.5px; line-height: 1.5; background: rgba(10, 6, 2, .55); border-left: 3px solid #e0a030; border-radius: 4px; text-shadow: 0 1px 2px #000; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.bt-tip.in { opacity: 1; transform: none; }
.bt-tip::before { content: "TIPS　"; font: bold 10px Georgia, serif; color: #ffd27a; letter-spacing: 1px; }
.bt-bar { position: relative; height: 9px; border-radius: 5px; background: rgba(14, 12, 24, .8); border: 1px solid #1a1410; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 210, 120, .25); overflow: hidden; }
.bt-bar i { position: relative; display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(#fff0a0, #ffc040 45%, #f08a00 55%, #c86400); box-shadow: 0 0 8px rgba(255, 180, 40, .8); transition: width .15s linear; overflow: hidden; }
.bt-bar i::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; left: -40px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent); animation: tSheen 1.1s linear infinite; }
.bt-txt { display: flex; justify-content: space-between; margin-top: 4px; font-size: 10.5px; color: #f0dcb0; text-shadow: 0 1px 2px #000; }
.bt-txt b { font: bold 11px Georgia, serif; color: #ffe08a; }
@media (prefers-reduced-motion: reduce) { .bt-slide.in { animation: none !important; } }
.title-screen { position: absolute; inset: 0; z-index: 60; background: #07030c; color: #fff; overflow: hidden; cursor: pointer; }
/* 開場（js/ui-opening.js）：鏡頭從暗處拉近 → 下載進度 → 光暈爆開、logo 掃光 → 點擊開始 */
.t-cam { position: absolute; inset: 0; animation: tIntro 2.6s cubic-bezier(.2, .7, .2, 1) both; }
.t-pan { position: absolute; inset: 0; transform-origin: 40% 45%; animation: tDrift 18s ease-in-out 2.6s infinite alternate; }
.t-art { position: absolute; left: 0; top: 0; width: 360px; height: 540px; background: url(../assets/ui/title.jpg) 0 0 / 100% 100% no-repeat; }
.t-ext { position: absolute; left: 0; top: 540px; width: 360px; height: 100px; background: url(../assets/ui/op/title_ext.jpg) 0 0 / 100% 100% no-repeat; }
.t-ext::before { content: ""; position: absolute; left: 0; right: 0; top: -36px; height: 60px; background: linear-gradient(rgba(10, 5, 22, 0), rgba(10, 5, 22, .55) 60%, rgba(10, 5, 22, .2)); }
@keyframes tIntro { 0% { transform: scale(1.14); filter: brightness(0) blur(6px) saturate(.6); } 35% { filter: brightness(.55) blur(2px) saturate(.8); } 100% { transform: scale(1); filter: none; } }
@keyframes tDrift { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.035) translate(-1.2%, -.6%); } }
.t-fx, .pr-fx { position: absolute; left: 0; top: 0; width: 360px; height: 640px; pointer-events: none; }
.t-vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 85% 70% at 50% 42%, transparent 55%, rgba(6, 2, 12, .55) 100%); }
.t-flare { position: absolute; width: 480px; height: 270px; pointer-events: none; mix-blend-mode: screen; opacity: 0; transform: scale(.2); }
.title-screen.loaded .t-flare { animation: tFlare 1.5s ease-out .05s both; }
@keyframes tFlare { 0% { opacity: 0; transform: scale(.2) rotate(-4deg); } 18% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(1.5) rotate(3deg); } }
.t-gleam { position: absolute; overflow: hidden; pointer-events: none; mix-blend-mode: soft-light; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); }
.t-gleam i { position: absolute; top: -40%; bottom: -40%; width: 46px; left: -60px; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .95) 45%, rgba(255, 245, 200, 1) 50%, rgba(255, 255, 255, .95) 55%, transparent); transform: skewX(-20deg); }
.title-screen.loaded .t-gleam i { animation: tGleam 5.5s ease-in-out 1s infinite; }
@keyframes tGleam { 0% { left: -60px; } 22%, 100% { left: 290px; } }
.t-load { position: absolute; left: 150px; top: 24px; width: 205px; text-align: right; transition: opacity .45s, transform .45s; animation: tFadeIn .6s ease-out .5s both; }
.t-load span { font-size: 11px; font-weight: bold; letter-spacing: .5px; text-shadow: 0 0 3px #000, 0 1px 1px #000; }
.t-pct { display: inline-block; min-width: 34px; margin-left: 4px; font: bold 11px/1 Georgia, serif; color: #ffe08a; text-shadow: 0 0 3px #000, 0 1px 1px #000; }
.t-bar { position: relative; margin-top: 4px; height: 12px; border-radius: 6px; background: rgba(14, 12, 24, .78); border: 1px solid #1a1410; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 210, 120, .25); overflow: hidden; text-align: left; }
.t-bar i { position: relative; display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(#fff0a0, #ffc040 45%, #f08a00 55%, #c86400); box-shadow: 0 0 8px rgba(255, 180, 40, .8); overflow: hidden; }
.t-bar i::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; left: -40px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent); animation: tSheen 1.1s linear infinite; }
@keyframes tSheen { to { left: 110%; } }
.title-screen.loaded .t-load { opacity: 0; transform: translateY(-6px); }
/* 標題圖左下角原本烙著「Skip」（原版的跳過鈕），已用 _work/tools/fix_title_skip.py 修掉，透明的按鈕也拿掉了 */
.t-ui { position: absolute; left: 0; right: 0; top: 548px; height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; opacity: 0; transform: translateY(10px); transition: opacity .6s .35s, transform .6s .35s; }
.title-screen.loaded .t-ui { opacity: 1; transform: none; }
.t-welcome { font-size: 12px; font-weight: bold; color: #ffe8b0; text-shadow: 0 0 4px #000, 0 1px 2px #000; }
.t-confirm { font-size: 12px; font-weight: bold; text-align: center; text-shadow: 0 1px 2px #000; }
.t-tap { border: none; background: none; cursor: pointer; padding: 4px 30px; color: #fff4c8; font-family: inherit; display: flex; flex-direction: column; align-items: center; }
.t-tap span { font-size: 15px; font-weight: 900; letter-spacing: 3px; text-shadow: 0 0 6px #ff9a20, 0 0 14px rgba(255, 140, 20, .7), 0 1px 2px #000; }
.t-tap small { margin-top: 1px; font: bold 9px/1 Georgia, serif; letter-spacing: 4px; color: #e8c070; text-shadow: 0 1px 2px #000; }
.title-screen.loaded .t-tap { animation: tPulse 2.2s ease-in-out .9s infinite; }
@keyframes tPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
@keyframes tFadeIn { from { opacity: 0; } }
.title-screen .foot { position: absolute; bottom: 3px; left: 6px; right: 6px; font-size: 8px; color: #b89868; text-align: center; line-height: 1.35; text-shadow: 0 1px 1px #000; cursor: default; }
.t-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .42s ease-in; }
.title-screen.leaving .t-flash { opacity: 1; }
.title-screen.calm .t-cam, .title-screen.calm .t-pan, .title-screen.calm .t-gleam i, .title-screen.calm .t-tap { animation: none !important; }
.title-screen.calm .t-flare { display: none; }

/* 故事序章：全螢幕、上下黑邊、原版插圖慢慢推移，字幕一個字一個字出現 */
.prologue { position: absolute; inset: 0; z-index: 62; background: #000; overflow: hidden; cursor: pointer; color: #fff; }
.prologue.shake .pr-scenes { animation: prShake .5s ease-out; }
@keyframes prShake { 0%, 100% { transform: none; } 15% { transform: translate(-5px, 3px); } 30% { transform: translate(5px, -3px); } 45% { transform: translate(-4px, -2px); } 60% { transform: translate(3px, 2px); } 80% { transform: translate(-1px, 1px); } }
.pr-scenes { position: absolute; inset: 0; }
.pr-bg { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 1.3s ease; transform: var(--kb0); }
.pr-bg.in { opacity: 1; animation: prKB var(--dur, 10s) linear forwards; }
@keyframes prKB { from { transform: var(--kb0); } to { transform: var(--kb1); } }
.pr-bg::after { content: ""; position: absolute; inset: 0; }
.pr-bg.warm::after { background: radial-gradient(ellipse at 50% 35%, transparent 40%, rgba(30, 10, 0, .5)), linear-gradient(transparent 55%, rgba(10, 4, 0, .55)); }
.pr-bg.sky::after { background: radial-gradient(ellipse at 50% 35%, transparent 45%, rgba(0, 10, 30, .45)), linear-gradient(transparent 55%, rgba(0, 6, 20, .55)); }
.pr-bg.back { filter: blur(2.5px) brightness(.5) saturate(.85); }
.pr-bg.night { filter: brightness(.62) saturate(1.1) hue-rotate(-8deg); }
.pr-bg.night::after { background: radial-gradient(ellipse at 60% 45%, rgba(120, 255, 160, .12), transparent 55%), linear-gradient(transparent 50%, rgba(0, 8, 4, .6)); }
.pr-bar { position: absolute; left: 0; right: 0; height: 42px; background: #000; z-index: 3; }
.pr-bar.top { top: 0; transform: translateY(-100%); }
.pr-bar.bot { bottom: 0; transform: translateY(100%); }
.prologue .pr-bar { animation: prBar 1.1s cubic-bezier(.3, .8, .3, 1) .25s forwards; }
@keyframes prBar { to { transform: none; } }
.pr-actor { position: absolute; right: -18px; bottom: 150px; width: 210px; height: 360px; z-index: 2; opacity: 0; transform: translateX(60px) scale(.96); transition: opacity .5s, transform .7s cubic-bezier(.2, 1.4, .4, 1); pointer-events: none; }
.pr-actor.in { opacity: 1; transform: none; }
.pr-actor.in .pr-tania { animation: prFloat 3.2s ease-in-out .7s infinite; }
.pr-tania { position: absolute; left: 0; top: 0; width: 375px; height: 643px; transform: scale(.56); transform-origin: 0 0; filter: drop-shadow(0 0 10px rgba(255, 200, 230, .55)) drop-shadow(0 6px 10px rgba(0, 0, 0, .5)); }
.pr-tania img { position: absolute; left: 0; top: 0; }
.pr-tania .pr-face { left: 105px; top: 60px; width: 111px; height: 108px; }
@keyframes prFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
.pr-jobs { position: absolute; left: 4px; top: 96px; width: 200px; height: 190px; z-index: 1; pointer-events: none; }
.pr-job { position: absolute; width: 74px; text-align: center; opacity: 0; transform: scale(.4); }
.pr-job img { width: 62px; height: 62px; filter: drop-shadow(0 0 8px #ffd860) drop-shadow(0 0 3px #fff); }
.pr-job b { display: block; font-size: 11px; color: #ffeaa0; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.pr-job.j0 { left: 46px; top: 0; } .pr-job.j1 { left: 0; top: 98px; } .pr-job.j2 { left: 92px; top: 98px; }
.prologue.jobs-on .pr-job { animation: prJob .7s cubic-bezier(.2, 1.5, .4, 1) forwards; }
.prologue.jobs-on .pr-job.j1 { animation-delay: .9s; } .prologue.jobs-on .pr-job.j0 { animation-delay: 1.5s; } .prologue.jobs-on .pr-job.j2 { animation-delay: 2.1s; } /* 跟台詞的順序：龍騎士、聖騎士、闇騎士 */
@keyframes prJob { to { opacity: 1; transform: none; } }
.pr-box { position: absolute; left: 10px; right: 10px; bottom: 50px; height: 112px; z-index: 4; padding: 26px 20px 12px; background: url(../assets/ui/op/board.png) 0 0 / 100% 100% no-repeat; color: #3a2410; opacity: 0; transform: translateY(12px); animation: prBox .6s ease-out .9s forwards; }
@keyframes prBox { to { opacity: 1; transform: none; } }
.pr-box.narr { background: none; color: #fff; padding: 10px 20px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.pr-box.narr::before { content: ""; position: absolute; left: -10px; right: -10px; top: -30px; bottom: -8px; z-index: -1; background: linear-gradient(transparent, rgba(0, 0, 0, .72) 45%, rgba(0, 0, 0, .8)); }
.pr-who { position: absolute; left: 6px; top: -14px; min-width: 96px; height: 26px; padding: 0 22px; line-height: 25px; text-align: center; font-size: 13px; font-weight: 900; color: #fff; letter-spacing: 2px; text-shadow: 0 1px 2px #001a20, 0 0 4px #003038; background: url(../assets/ui/op/nameplate.png) 0 0 / 100% 100% no-repeat; }
.pr-who:empty { display: none; }
.pr-txt { font-size: 13.5px; line-height: 1.7; font-weight: bold; min-height: 46px; }
.pr-box.narr .pr-txt { font-size: 14px; font-weight: normal; letter-spacing: 1px; line-height: 1.85; text-shadow: 0 0 6px #000, 0 1px 2px #000; }
.pr-next { position: absolute; right: 18px; bottom: 9px; font-style: normal; font-size: 12px; color: #a0602a; opacity: 0; }
.pr-box.narr .pr-next { color: #ffe08a; bottom: 2px; }
.pr-box.done .pr-next { opacity: 1; animation: prNext .9s ease-in-out infinite; }
@keyframes prNext { 50% { transform: translateY(3px); opacity: .5; } }
.pr-skip { position: absolute; right: 8px; top: 9px; z-index: 5; height: 24px; padding: 0 12px; border: 1px solid rgba(255, 220, 140, .6); border-radius: 12px; background: rgba(0, 0, 0, .45); color: #ffe8b0; font: bold 11px/22px Georgia, "Noto Serif TC", serif; letter-spacing: 1px; cursor: pointer; }
.pr-skip span { font-size: 9px; letter-spacing: -1px; }
.pr-skip:hover { background: rgba(60, 30, 0, .6); }
.pr-flash { position: absolute; inset: 0; z-index: 6; background: #fff; opacity: 0; pointer-events: none; transition: opacity .9s ease-out; }
.pr-flash.on { opacity: 1; transition: opacity .55s ease-in; }
.prologue.out { opacity: 0; transition: opacity .5s; pointer-events: none; }
.prologue.calm .pr-bg.in, .prologue.calm .pr-tania, .prologue.calm .pr-job { animation: none !important; opacity: 1; transform: none; }
.creator { position: absolute; inset: 0; z-index: 61; background: radial-gradient(ellipse at 50% 30%, #f4e6c4, #c8a070); display: flex; flex-direction: column; padding: 8px; gap: 6px; }
.creator .preview { height: 168px; flex: none; display: flex; }
.creator .preview .av-board { flex: 1; height: 100%; }
/* 角色編輯：原版的展示台（avatarBoard）、藍色金框分類按鈕、米色部件框（取自離線版 App） */
svg.avatar:not(.bust) { overflow: visible; }
.av-board { height: 176px; display: flex; justify-content: center; align-items: flex-end; overflow: hidden; background: #3a2414 url(../assets/ui/av/board.png) center bottom / cover no-repeat; border: 3px solid var(--gold); border-radius: 8px; box-shadow: 0 0 0 2px var(--wood); }
.av-fig { width: 168px; margin-bottom: 2px; }
.av-fig svg { width: 100%; height: auto; display: block; }
.av-ed { display: flex; flex-direction: column; gap: 4px; min-height: 0; }
.creator .av-ed { flex: 1; }
.av-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.av-tab { height: 27px; padding: 0; border: none; cursor: pointer; background: url(../assets/ui/av/tab.png) center / 100% 100% no-repeat; color: #fff; font: bold 12.5px/27px inherit; font-family: inherit; text-shadow: 0 1px 2px #000, 0 0 3px #0a2a5a; }
.av-tab.on { background-image: url(../assets/ui/av/tab_on.png); color: #fff4a0; }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); gap: 4px; overflow-y: auto; max-height: 196px; padding: 3px; background: rgba(60, 36, 16, .18); border-radius: 6px; }
.creator .av-grid, .av-modal .av-grid { flex: 1; max-height: none; min-height: 0; }
.modal:has(.av-modal) { height: 100%; }
.modal:has(.av-modal) .body { flex: 1; overflow: hidden; }
.av-modal { height: 100%; display: flex; flex-direction: column; gap: 5px; }
.av-modal .av-board { height: 150px; flex: none; }
.av-modal .av-fig { width: 150px; }
.av-modal .av-ed { flex: 1; }
.av-slot { aspect-ratio: 1; padding: 3px; border: none; cursor: pointer; border-radius: 9px; background: url(../assets/ui/av/slot.png) center / 100% 100% no-repeat; display: flex; align-items: center; justify-content: center; }
.av-slot svg { width: 100%; height: 100%; display: block; }
.av-slot span { font-weight: bold; color: #8a6a4a; font-size: 13px; }
.av-slot.on { box-shadow: 0 0 0 3px #ff8a1a, 0 0 9px 2px #ffd040; }
.part-row { display: grid; grid-template-columns: 52px 26px 1fr 26px; gap: 4px; align-items: center; font-size: 12.5px; font-weight: bold; }
.part-row .val { text-align: center; background: #fff8e8; border: 1px solid var(--parch-d); border-radius: 4px; padding: 2px 0; font-weight: normal; }
.part-row button { padding: 2px 0; }
.swatches { display: flex; gap: 3px; flex-wrap: wrap; }
.swatches button { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #000; cursor: pointer; padding: 0; }
.swatches button.on { box-shadow: 0 0 0 2.5px #ff6a2a; }
.job-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.job-card { border: 2px solid var(--gold-d); border-radius: 8px; padding: 6px 4px; text-align: center; cursor: pointer; background: #fff8e8; font-size: 11px; }
.job-card.on { border-color: #ff6a2a; box-shadow: 0 0 0 2px #ffb070; background: #fff0d0; }
.job-card b { display: block; font-size: 14px; }

.fx { position: absolute; font-weight: 900; font-size: 15px; white-space: nowrap; transform: translateX(-50%); text-shadow: 0 0 3px #000, 0 1px 0 #000; animation: fx-up 1.3s ease-out forwards; pointer-events: none; }
@keyframes fx-up { 0% { opacity: 0; transform: translate(-50%, 6px); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -38px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 禮物箱：主控台寫的內容 */
.pr-msg { margin: 2px 0 1px; padding: 3px 6px; border-left: 3px solid #c8a050; background: rgba(255, 248, 228, .55); font-size: 12px; line-height: 1.5; color: #3a2a18; white-space: normal; word-break: break-all; }

/* 新版本：請更新遊戲 */
.nv-box { text-align: center; font-size: 13px; line-height: 1.6; }
.nv-box > b { display: block; margin: 2px 0 6px; font-size: 16px; color: #b0301a; }
.nv-box p { margin: 0 0 8px; }
.nv-url { display: block; margin: -2px 0 8px; padding: 3px 6px; border-radius: 4px; background: rgba(0, 0, 0, .08); font: 11.5px/1.4 Consolas, monospace; color: #1b4a7e; text-decoration: underline; word-break: break-all; cursor: pointer; }

/* 伺服器維護中：標題畫面（連不上就不能進遊戲）、遊戲中斷線時擋住畫面 */
/* 伺服器維護中、強制更新（遊戲版本已更新）：放在畫面正中間。長的說明與網址會換行，框再高也不會蓋到最下面的復刻聲明 */
.t-ui:has(.t-maint) { top: 0; bottom: 0; height: auto; padding: 50px 0 36px; z-index: 7; pointer-events: none; }
.t-ui .t-maint { pointer-events: auto; max-height: 100%; overflow-y: auto; }
.t-maint span { overflow-wrap: anywhere; line-height: 1.5; }
.t-net[hidden] { display: none !important; }
.t-maint { gap: 2px; padding: 7px 16px 9px; }
.t-maint b { font-size: 18px; }
.t-maint, .nm-box { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 18px 14px; max-width: 292px; border: 2px solid #c8a050; border-radius: 10px; background: linear-gradient(rgba(46, 12, 8, .9), rgba(18, 6, 4, .94)); box-shadow: 0 0 18px rgba(0, 0, 0, .75), inset 0 0 14px rgba(255, 200, 120, .16); text-align: center; color: #fff1d0; }
.t-maint b, .nm-box b { font-size: 20px; letter-spacing: 3px; color: #ffd27a; text-shadow: 0 0 8px #c04010, 0 2px 2px #000; }
.t-maint span { font-size: 12px; color: #ffc8a8; }
.t-maint small, .nm-box p { margin: 0; font-size: 11px; line-height: 1.55; color: #d8c8a8; }
.t-maint .btn, .nm-box .btn { margin-top: 4px; min-width: 112px; }
.t-maint.busy .btn { opacity: .5; pointer-events: none; }
/* 強制更新：蓋住整個畫面、不能關 */
#net-update { position: absolute; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .82); }
.nu-box .nv-url { margin-top: 6px; color: #a8d0ff; font-size: 11px; word-break: break-all; }
#net-maint { position: absolute; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .74); }
.chip.jm-0 { background: #6a6a6a; }
.chip.jm-1 { background: #2a7ad0; }
.chip.jm-2 { background: #2a9a4a; }
.jm-row .btn { flex: 1; }

/* 騎士團（連線）：申請中、職位、團長的管理按鈕 */
.ng-app { margin: 0 0 8px; padding: 6px 8px; border: 1px dashed #9a6a30; border-radius: 6px; background: rgba(255, 240, 200, .35); font-size: 12.5px; }
/* 排行榜 */
.rk-row .main { min-width: 0; }
.rk-row.mine { background: rgba(232, 192, 96, .25); border-radius: 6px; }
.rk-no { flex: none; width: 28px; text-align: center; font-size: 15px; color: var(--mb-lb); }
.rk-no.top1 { color: #c89010; font-size: 18px; } .rk-no.top2 { color: #8a96a8; font-size: 17px; } .rk-no.top3 { color: #b0683a; font-size: 16px; }
.rk-me { margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px dashed var(--mb-line); }
.rk-h { margin: 2px 0 4px; }
/* 道具的說明與取得方式 */
.it-row { cursor: pointer; }
.it-info { display: flex; gap: 10px; align-items: flex-start; }
.it-info .thumb { flex: none; width: 64px; height: 64px; }
.it-info .main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.it-info .main b { font-size: 15px; }
.it-info .main span { font-size: 12px; color: var(--mb-lb); }
.it-info p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; }
.it-src { margin: 4px 0 8px; padding-left: 18px; font-size: 12.5px; line-height: 1.6; }
/* 好友（好友、申請、信件） */
.fr-add { margin: 0 0 4px; }
.fr-row .btn.sm { padding: 3px 7px; }
.fr-row .on { color: var(--good); }
.fr-letter { margin: 6px 0; padding: 6px 8px; border: 1px solid var(--mb-line); border-radius: 6px; background: rgba(255, 255, 255, .35); }
.fr-letter.new { border-color: var(--mb-red); background: rgba(255, 236, 220, .6); }
.fr-lh { display: flex; align-items: center; gap: 6px; }
.fr-lh .hint { flex: 1; }
.fr-lt { margin-top: 4px; font-size: 12.5px; line-height: 1.55; white-space: normal; word-break: break-all; }
/* 騎士團視窗：等待審核的加入申請放最上面 */
.ng-pending { margin: 0 0 8px; padding: 6px 8px 4px; border: 2px solid var(--mb-red); border-radius: 6px; background: rgba(255, 230, 210, .55); }
.chip.role-leader { background: #c0302a; }
.chip.role-vice { background: #2a7ad0; }
.chip.role-member { background: #7a6a52; }
.gm-row { flex-wrap: wrap; }
.gm-acts { display: flex; flex-wrap: wrap; gap: 3px; justify-content: flex-end; }
.gm-acts .btn.sm { padding-left: 6px; padding-right: 6px; }
/* 連線、還沒加入騎士團：團體戰先加入騎士團 */
.lg-join-msg { text-align: center; padding: 18px 10px 12px; font-size: 13px; line-height: 1.7; }
.lg-join-msg > b { display: block; font-size: 17px; color: #b0301a; margin-bottom: 6px; }
.lg-join-app { margin: 10px auto; padding: 6px 10px; border: 1px dashed #9a6a30; border-radius: 6px; background: rgba(255, 240, 200, .35); }

/* ---------- 聯賽（原版配置：4Gamer 2012 截圖、App Store 320×568 截圖；背景 assets/ui/lg_stage.jpg ×0.5625） ---------- */
.battle { position: absolute; inset: 0; display: flex; flex-direction: column; background: linear-gradient(#0a2a36, #071c26 60%, #0a2630); color: #fff; }
.lg-stage { position: relative; flex: none; width: 360px; height: 304px; background: url(../assets/ui/lg_stage.jpg) 0 0 / 100% 100% no-repeat; overflow: hidden; }
.t-name { position: absolute; top: 16px; width: 118px; text-align: center; font-size: 12px; font-weight: bold; color: #fff8e0; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-name.l { left: 40px; }
.t-name.r { right: 40px; }
.t-lp { position: absolute; top: 37px; font-size: 11.5px; font-weight: bold; color: #fff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.t-lp b { font-size: 14px; }
.t-lp.l { left: 10px; }
.t-lp.l b { color: #8ad8ff; }
.t-lp.r { right: 10px; }
.t-lp.r b { color: #ff9a8a; }
.t-plate { position: absolute; left: 96px; width: 168px; top: 53px; height: 24px; display: flex; align-items: baseline; justify-content: center; gap: 8px; font-size: 14px; line-height: 24px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.t-plate small { font-size: 10.5px; font-weight: bold; color: #ffe8a0; }
.t-pills { position: absolute; left: 26px; right: 26px; top: 84px; display: flex; justify-content: center; gap: 4px; z-index: 300; font-size: 10px; }
.t-pills .pill { padding: 0 6px; font-size: 10px; white-space: nowrap; }
.knight { position: absolute; width: 64px; height: 88px; margin: -74px 0 0 -32px; cursor: default; }
.knight .av { position: absolute; left: -22px; top: 1px; width: 80px; height: 76px; }
.knight .av svg { display: block; width: 100%; height: 100%; }
.knight.kn0 .av { left: 6px; }
.knight.kn0 .av svg { transform: scaleX(-1); }
.knight .kbeast { position: absolute; top: 41px; width: 28px; height: 28px; }
.knight.kn0 .kbeast { left: -10px; }
.knight.kn1 .kbeast { left: 46px; }
.knight .kbeast img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.knight .knm { position: absolute; left: 4px; width: 56px; top: 4px; text-align: center; font-size: 8.5px; font-weight: bold; color: #fff; text-shadow: 0 0 2px #000, 0 1px 1px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.knight .bar { position: absolute; left: 10px; width: 44px; top: 77px; height: 5px; margin: 0; border-radius: 1px; background: #fff; border: 0; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.knight .bar i { display: block; height: 100%; border-radius: 1px; background: linear-gradient(#7ad8ff, #1a7ad0); }
.knight.kn1 .bar i { background: linear-gradient(#ffb060, #d02a1a); }
.knight .khp { position: absolute; left: -4px; width: 72px; top: 82px; text-align: center; font-size: 8.5px; font-weight: bold; color: #fff; text-shadow: 0 0 2px #000, 0 1px 1px #000; font-variant-numeric: tabular-nums; }
.knight.me .knm { color: #8ad8ff; }
.knight.stun .av { filter: grayscale(1) brightness(.6); }
.knight.stun::after { content: "昏迷"; position: absolute; top: 34px; left: 18px; width: 28px; text-align: center; background: #a01a10; color: #fff; font-size: 9.5px; font-weight: bold; border-radius: 3px; }
.knight.target { cursor: pointer; }
.knight.target::before { content: ""; position: absolute; left: 2px; top: 60px; width: 60px; height: 24px; border-radius: 50%; border: 2px solid #ff6a4a; box-shadow: 0 0 8px #ff6a4a; animation: pulse 1s infinite; }
.knight.hitflash .av { animation: hitflash .35s; }
@keyframes hitflash { 30% { filter: brightness(2) sepia(1) hue-rotate(-40deg); transform: translateX(-3px); } 60% { transform: translateX(3px); } }
.cmd-panel { flex: none; padding: 3px 12px 5px; }
.cmd-info { font-size: 11px; line-height: 16px; color: #e8f0f0; min-height: 16px; }
.cmd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px 8px; margin-top: 2px; }
.cmd-grid .btn { min-width: 0; height: 40px; padding: 0 2px; font-size: 15px; font-weight: 900; flex-direction: column; gap: 0; line-height: 1.05; border-image-width: 11px 14px; }
.cmd-grid .btn.red { font-size: 13px; }
.cmd-grid .btn small { font-size: 10px; font-weight: bold; color: #ffe8a0; }
.blog { flex: 1; min-height: 0; overflow-y: auto; font-size: 11px; padding: 3px 8px; background: rgba(0, 0, 0, .4); border-top: 1px solid #c8a040; }

/* ---------- 討伐（原版配置：ゲームドライブ、4Gamer 2012 截圖） ---------- */
.field .mon-tag { position: absolute; pointer-events: none; }
.mtag { display: inline-flex; align-items: stretch; font-size: 9.5px; line-height: 1.25; color: #fff; text-shadow: 0 1px 1px #000; white-space: nowrap; }
.mtag i { font-style: normal; font-weight: bold; text-align: center; padding: 1px 4px; background: #3a2a10; border: 1px solid #c8a040; border-radius: 3px 0 0 3px; color: #ffe8a0; }
.mtag span { padding: 1px 6px; background: rgba(20, 16, 8, .78); border: 1px solid rgba(200, 160, 64, .6); border-left: 0; border-radius: 0 3px 3px 0; }
.hunt-top { position: absolute; left: 0; right: 0; top: 0; height: 30px; display: flex; justify-content: space-between; align-items: center; padding: 0 6px; background: linear-gradient(rgba(10, 8, 4, .86), rgba(10, 8, 4, .6)); border-bottom: 1px solid rgba(200, 160, 64, .7); color: #fff; font-size: 11px; z-index: 40; }
.hunt-top .ic-sm { width: 13px; height: 13px; vertical-align: -2px; }
.hunt-top .ht-r { display: flex; flex-direction: column; align-items: flex-end; font-size: 9.5px; line-height: 13px; color: #e8e0c8; }
#hunt-bless.on { color: #ffe060; font-weight: bold; }
.hunt-boss { position: absolute; right: 10px; top: 38px; font-family: Georgia, "Noto Serif TC", serif; font-size: 15px; font-weight: bold; color: #fff; text-shadow: 0 0 3px #a01a10, 0 1px 2px #000; z-index: 30; }
.hunt-bar { position: absolute; left: 8px; right: 8px; bottom: 10px; display: flex; gap: 6px; align-items: center; z-index: 30; }
.field.bossing { background: linear-gradient(#5a1a12, #1a0604); }
.field .mon.boss { left: 0; top: 30px; width: 360px; height: 368px; }
.field .mon.boss img.boss-pic { display: block; width: 360px; height: 368px; object-fit: fill; filter: none; }
.field .mon.boss::after { display: none; }
.boss-tag { position: absolute; left: 112px; top: 34px; width: 136px; padding: 2px 4px; text-align: center; font-size: 10px; line-height: 1.3; color: #fff; font-weight: bold; text-shadow: 0 1px 1px #000; background: #2a0806; border: 1px solid #c8a040; border-radius: 4px; z-index: 20; pointer-events: none; }
.boss-bar { position: absolute; left: 20px; right: 20px; bottom: 56px; display: flex; gap: 14px; z-index: 30; }
.boss-bar .btn { flex: 1; }
/* ---------- 幻獸戰（原版配置：ゲームドライブ、App Store 截圖） ---------- */
.battle.raid .r-top { display: flex; justify-content: space-between; padding: 3px 12px 1px; font-size: 12px; color: #ffe8a0; background: linear-gradient(#3a0c08, #1a0604); font-weight: bold; }
.battle.raid .r-top b { color: #fff; font-variant-numeric: tabular-nums; }
/* 幻獸的血條：原版 raidBossGaugeBackground（兩端的龍頭），血量畫在中間的槽裡 */
.r-bar { position: relative; flex: none; height: 41px; margin: -4px 0 -6px; background: url(../assets/ui/raid_gauge.png) center / 100% 100% no-repeat; z-index: 1; }
.r-bar span { position: absolute; left: 54px; right: 45px; top: 17px; height: 13px; overflow: hidden; }
.r-bar i { display: block; height: 100%; background: linear-gradient(#ffb060, #e0401a 60%, #a01a10); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.r-plate { flex: none; height: 26px; margin: 3px 44px 0; line-height: 24px; text-align: center; font-size: 13px; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; overflow: hidden; border: 0 solid transparent; border-image: url(../assets/ui/modal_title.png) 8 40 12 fill / 4px 21px 6px stretch; }
.r-stage { position: relative; flex: none; width: 360px; height: 216px; margin-top: 2px; background: radial-gradient(ellipse at 40% 55%, #2a6a9a, #0a2a4a 62%, #06121f); }
.r-stage::after { content: ""; position: absolute; inset: 0; background: url(../assets/ui/lg_frame.png) 0 0 / 100% 100% no-repeat; pointer-events: none; }
.r-boss { position: absolute; left: 22px; top: 18px; width: 186px; height: 180px; filter: drop-shadow(0 0 10px rgba(120, 200, 255, .5)); animation: float 3s ease-in-out infinite; }
.r-boss .raid-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.r-boss .raid-img.card { width: 160px; height: 160px; margin: 10px 13px; object-fit: cover; border: 3px solid #e8c060; border-radius: 10px; }
.r-me { position: absolute; right: 18px; top: 64px; width: 112px; text-align: center; }
.r-me .av { width: 112px; height: 106px; }
.r-me .av svg { display: block; width: 100%; height: 100%; }
.r-me .bar { width: 64px; height: 5px; margin: 0 auto; }
.r-myhp { font-size: 9.5px; font-weight: bold; color: #fff; text-shadow: 0 1px 1px #000; }
#raid-combo { position: absolute; left: 50%; top: 22px; transform: translateX(-50%); z-index: 3; white-space: nowrap; }
/* ---------- 選職業（原版畫面：4Gamer 2012 截圖） ---------- */
.job-pick { position: absolute; inset: 0; display: flex; flex-direction: column; background: #0c1c20; }
.job-ask { flex: none; margin: 18px 12px 12px; padding: 12px 6px; text-align: center; font-size: 15px; font-weight: bold; color: #3a2410; background: url(../assets/ui/parch.jpg) 0 0 / 248px 259px; border: 2px solid #c8a040; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, .6); }
.job-art { position: relative; flex: none; width: 360px; height: 436px; background: url(../assets/ui/job_bg.jpg) 0 0 / 100% 100% no-repeat; }
.job-hit { position: absolute; cursor: pointer; border-radius: 4px; }
.job-hit b { position: absolute; left: 4px; right: 4px; top: -9px; height: 19px; line-height: 19px; text-align: center; font-size: 13px; color: #ffe8a0; font-weight: 900; text-shadow: 0 1px 2px #000; background: linear-gradient(#26343a, #121e22); border-radius: 3px; }
.job-hit:hover { box-shadow: 0 0 8px 2px rgba(255, 240, 180, .6); }
.job-hit.on { box-shadow: 0 0 0 3px #ffe060, 0 0 16px 6px rgba(255, 224, 96, .75); }
.job-txt { position: absolute; box-sizing: border-box; padding: 4px 6px; font-size: 11px; line-height: 1.35; color: #fff; background: #1c2226; border-radius: 3px; cursor: pointer; min-height: 52px; }
.job-foot { flex: 1; display: flex; gap: 16px; align-items: center; justify-content: center; padding: 0 16px; }
.job-foot .btn { flex: 1; }
/* 扭蛋演出（js/ui-gacha.js）：原版的寶物庫門 → 切入預告 → 白光 → 結果一張張翻開 → 結果一覽 */
.gacha-anim { position: absolute; inset: 0; z-index: 28; background: #000; overflow: hidden; color: #fff; cursor: pointer; transition: opacity .3s; }
.gacha-anim.out { opacity: 0; pointer-events: none; }
.ga-door, .ga-cut, .ga-stage, .ga-rare { position: absolute; inset: 0; }
.ga-cut { top: 150px; height: 311px; bottom: auto; pointer-events: none; transition: opacity .3s; }
.ga-cut.out { opacity: 0; }
.ga-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .25s ease-in; z-index: 3; }
.ga-flash.on { animation: gaFlash .9s ease-out forwards; }
@keyframes gaFlash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.gacha-anim.revealing { background: radial-gradient(ellipse at 50% 40%, #3a2a5a, #0a0612 75%); }
.ga-skip { position: absolute; right: 8px; top: 8px; z-index: 4; height: 24px; padding: 0 12px; border: 1px solid rgba(255, 220, 140, .6); border-radius: 12px; background: rgba(0, 0, 0, .45); color: #ffe8b0; font: bold 11px/22px Georgia, serif; cursor: pointer; }
.ga-skip span { font-size: 9px; letter-spacing: -1px; }
.ga-stage { z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ga-rare { pointer-events: none; }
.ga-rare.back { z-index: 0; }
.ga-rare.front { z-index: 2; }
.ga-single { position: relative; z-index: 1; animation: gaPop .55s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes gaPop { from { transform: scale(.3) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.ga-card { width: 250px; text-align: center; }
.ga-big { width: 210px; height: 210px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; filter: drop-shadow(0 0 14px rgba(255, 230, 160, .55)); }
.ga-big svg, .ga-big img { width: 100%; height: 100%; object-fit: contain; }
.ga-single.rare .ga-big { filter: drop-shadow(0 0 18px rgba(255, 240, 180, .9)) drop-shadow(0 0 40px rgba(255, 160, 255, .5)); }
.ga-name { font-size: 15px; font-weight: 900; text-shadow: 0 0 4px #000, 0 1px 2px #000; }
.ga-cat { font-size: 11px; color: #d8c8a8; margin-top: 2px; }
.ga-rar { display: inline-block; min-width: 30px; margin-right: 5px; padding: 0 5px; border-radius: 4px; font: bold 11px/17px Georgia, serif; color: #fff; text-shadow: 0 1px 1px #000; vertical-align: 1px; }
.ga-new { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 3px; background: #e02a2a; color: #fff; font: bold 10px/15px sans-serif; animation: gaNew .8s ease-in-out infinite alternate; }
@keyframes gaNew { to { background: #ff7a1a; } }
.ga-tap { position: absolute; bottom: 70px; font-size: 12px; color: #e8d8b8; animation: tPulse 1.6s ease-in-out infinite; }
.ga-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 92px); gap: 8px; margin-top: -60px; }
.ga-grid.many { grid-template-columns: repeat(4, 78px); gap: 6px; }
.ga-cell { position: relative; text-align: center; animation: gaCell .45s cubic-bezier(.2, 1.4, .4, 1) both; cursor: pointer; }
@keyframes gaCell { from { transform: rotateY(90deg) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.ga-ic { position: relative; z-index: 1; width: 100%; aspect-ratio: 1; }
.ga-ic svg, .ga-ic img { width: 100%; height: 100%; }
.ga-fx { position: absolute; z-index: 0; left: -22%; top: -22%; width: 144%; aspect-ratio: 1; pointer-events: none; }
.ga-cell .ga-cn { position: relative; z-index: 1; }
.ga-cell .ga-new { position: absolute; z-index: 2; top: -4px; left: -2px; margin: 0; }
.ga-cn { font-size: 9.5px; line-height: 1.2; height: 23px; overflow: hidden; text-shadow: 0 1px 2px #000; }
.ga-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; padding: 10px 12px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .85) 30%); text-align: center; animation: gaBar .4s ease-out both; }
@keyframes gaBar { from { transform: translateY(30px); opacity: 0; } }
.ga-sum { margin-bottom: 8px; font-size: 13px; font-weight: bold; }
.ga-sum .hint { color: #c8b898; font-weight: normal; }
.lu-btn { flex: none; }
.lineup .lu-rar { margin: 8px 0; }
.lu-h { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 13px; }
.lu-h b { color: #ffe08a; }
.lu-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 4px; }
.lu-it { padding: 2px 1px; border: 1px solid rgba(255, 214, 120, .25); background: rgba(0, 0, 0, .2); border-radius: 4px; font: 9px/1.15 var(--font); color: #fff8e8; display: flex; flex-direction: column; align-items: center; cursor: pointer; min-width: 0; }
.lu-it svg { width: 48px; height: 48px; }
.lu-it span { display: block; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.lu-prev { position: relative; width: 170px; height: 170px; margin: 6px auto; }
.lu-prev svg.avatar { width: 100%; height: 100%; overflow: visible; }
/* 團體戰：自己的位置（選拔騎士在最上層＋標記；一般騎士畫在左下角） */
.me-mark { position: absolute; left: 50%; top: -12px; transform: translateX(-50%); padding: 0 5px; border-radius: 3px; background: linear-gradient(#5ac8ff, #1a78d0); color: #fff; font-size: 8.5px; font-weight: 900; line-height: 13px; white-space: nowrap; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7), 0 1px 3px rgba(0, 0, 0, .5); animation: meMark 1.4s ease-in-out infinite; pointer-events: none; z-index: 2; }
.me-mark::after { content: ""; position: absolute; left: 50%; bottom: -4px; margin-left: -4px; border: 4px solid transparent; border-bottom: 0; border-top-color: #1a78d0; }
@keyframes meMark { 50% { transform: translate(-50%, -2px); } }
.knight.me .knm { left: 2px; width: 60px; top: 3px; padding: 0 2px; border-radius: 3px; background: linear-gradient(#5ac8ff, #1a78d0); color: #fff; line-height: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .7); z-index: 2; }
.knight.me .av { filter: drop-shadow(0 0 3px rgba(120, 210, 255, .9)); }
.me-ring { position: absolute; left: 4px; top: 62px; width: 56px; height: 18px; border-radius: 50%; border: 2px solid #6ad0ff; box-shadow: 0 0 8px #3ab0ff, inset 0 0 6px #3ab0ff; animation: meRing 1.4s ease-in-out infinite; pointer-events: none; }
@keyframes meRing { 50% { opacity: .45; } }
.my-gen { position: absolute; left: 6px; bottom: 4px; width: 60px; height: 68px; z-index: 295; border-radius: 6px; background: rgba(10, 30, 50, .6); box-shadow: inset 0 0 0 1px rgba(120, 210, 255, .7); }
.my-gen .me-mark { top: 2px; animation: none; }
.my-gen .me-mark::after { display: none; }
.my-gen .av { position: absolute; left: 0; top: 13px; width: 60px; height: 36px; filter: drop-shadow(0 0 3px rgba(120, 210, 255, .9)); }
.my-gen .av svg { display: block; width: 100%; height: 100%; transform: scaleX(-1); }
.my-gen .knm { position: absolute; left: 2px; right: 2px; top: 49px; text-align: center; font-size: 8.5px; font-weight: bold; color: #8ad8ff; text-shadow: 0 0 2px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-gen .bar { position: absolute; left: 6px; right: 6px; top: 60px; height: 4px; margin: 0; background: #fff; border: 0; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); }
.my-gen .bar i { display: block; height: 100%; background: linear-gradient(#7ad8ff, #1a7ad0); }
.my-gen.act { animation: genAct .5s ease-out; }
@keyframes genAct { 30% { transform: translateX(6px) scale(1.08); box-shadow: inset 0 0 0 1px #fff, 0 0 14px #8ad8ff; } }
/* 交換所與商店 */
.ex-have { display: flex; align-items: center; gap: 4px; margin: 2px 0 3px; font-size: 13px; }
.ex-have b { color: #ffe08a; }
.ex-row .hint .ic-sm { width: 13px; height: 13px; vertical-align: -2px; }
.deal { display: inline-block; margin-right: 4px; padding: 0 4px; border-radius: 3px; background: #d8201a; color: #fff; font-size: 10px; line-height: 15px; vertical-align: 1px; box-shadow: 0 0 0 1px #fff4; }
.shop-coin { display: flex; gap: 10px; align-items: flex-start; padding: 8px; background: rgba(46, 50, 44, .55); border-radius: 3px; font-size: 12.5px; line-height: 1.55; }
.shop-coin img { width: 76px; height: 76px; flex: none; }
.shop-coin p { margin: 4px 0 0; }
.ic-big { width: 100%; height: 100%; }
/* 武具一覽 */
.eq-head { margin-bottom: 6px; font-size: 12px; }
.eq-filter .tabs { margin: 0 0 4px; }
.eq-filter .row { gap: 4px; flex-wrap: wrap; }
.eq-sel { flex: 1; min-width: 0; height: 24px; padding: 0 2px; font: inherit; font-size: 11px; color: #3a2410; background: #f4e8cc; border: 1px solid #9a6a30; border-radius: 4px; }
.eq-ophead { margin-bottom: 6px; gap: 6px; }
.scroll.with-bar { padding-bottom: 54px; }
.eq-sellbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: linear-gradient(rgba(30, 14, 6, .85), rgba(20, 8, 2, .96)); border-top: 2px solid var(--gold); color: #fff6d0; font-size: 12.5px; font-weight: bold; }
.eq-sellbar span { flex: 1; }
.badge[hidden], .hnum[hidden] { display: none; }
/* 團體戰：原版的 HP 條（lifeGaugeBackground／lifeGaugeRedImage）、職業圖示、特效層 */
.knight .bar { height: 5px; background: url(../assets/ui/lg/hp_bg.png) 0 0 / 100% 100%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); border-radius: 0; }
.knight .bar i { position: absolute; left: 1px; top: 1px; height: 3px; max-width: calc(100% - 2px); border-radius: 0; background: linear-gradient(#8ad8ff, #2a7ad0); }
.knight.kn1 .bar i { background: url(../assets/ui/lg/hp_red.png) 0 0 / 100% 100%; }
.knight .kjob { position: absolute; left: 1px; top: 74px; width: 10px; height: 10px; z-index: 1; }
.knight.stun::after { display: none; }
.stun-fx { position: absolute; left: -20px; top: -20px; width: 104px; height: 128px; pointer-events: none; z-index: 3; }
.lg-fx { position: absolute; inset: 0; z-index: 299; pointer-events: none; overflow: hidden; }
.lg-fxh { position: absolute; inset: 0; pointer-events: none; }
.lg-flash { position: absolute; inset: 0; background: #fff; animation: lgFlash .55s ease-out forwards; }
@keyframes lgFlash { 0% { opacity: 0; } 18% { opacity: .85; } 100% { opacity: 0; } }
.lg-cutin { position: absolute; inset: 0; z-index: 305; pointer-events: none; }
.lg-cutin::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); animation: ciDim .2s ease-out both; }
.lg-cutin .ci-band { position: absolute; left: 0; right: 0; top: 74px; height: 155px; background: url(../assets/ui/lg/cutin_bg.png) 0 0 / 100% 100%; animation: ciBand .22s ease-out both; }
.lg-cutin .ci-art { position: absolute; top: 70px; left: 30px; width: 165px; height: 165px; animation: ciArt .35s cubic-bezier(.2, .9, .3, 1) .08s both; filter: drop-shadow(0 0 10px rgba(160, 220, 255, .9)); }
.lg-cutin .ci-art img, .lg-cutin .ci-art svg { width: 100%; height: 100%; object-fit: contain; }
.lg-cutin .ci-name { position: absolute; right: 14px; top: 132px; width: 160px; text-align: right; font-size: 17px; font-weight: 900; color: #fff; text-shadow: 0 0 6px #0a4aa0, 0 0 2px #000, 0 2px 2px #000; animation: ciName .35s ease-out .18s both; }
.lg-cutin .ci-name small { display: block; font-size: 10px; color: #cfe8ff; }
.lg-cutin.out { animation: ciOut .35s ease-in forwards; }
@keyframes ciDim { from { opacity: 0; } }
@keyframes ciBand { from { transform: scaleY(0); } }
@keyframes ciArt { from { transform: translateX(260px) scale(.8); opacity: 0; } }
@keyframes ciName { from { transform: translateX(-40px); opacity: 0; } }
@keyframes ciOut { to { opacity: 0; transform: scaleY(.6); } }
.lg-start { position: absolute; inset: 0; z-index: 306; pointer-events: none; display: flex; align-items: center; justify-content: center; }
.lg-start .ls-band { display: flex; flex-direction: column; align-items: center; padding: 8px 40px; background: radial-gradient(ellipse at center, rgba(40, 20, 4, .85), rgba(40, 20, 4, 0) 70%); animation: lsIn 2.2s ease-out both; }
.lg-start b { font-size: 22px; font-weight: 900; color: #ffe8a0; text-shadow: 0 0 2px #000, 0 2px 3px #000, 0 0 12px #c08020; letter-spacing: 2px; }
.lg-start span { font-size: 34px; font-weight: 900; color: #fff; text-shadow: 0 0 3px #000, 0 3px 3px #000, 0 0 16px #ffb040; letter-spacing: 8px; }
@keyframes lsIn { 0% { transform: scale(2.2); opacity: 0; } 14% { transform: scale(1); opacity: 1; } 80% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.1); opacity: 0; } }
.lg-result { position: absolute; inset: 0; z-index: 27; background: rgba(0, 0, 0, .25); cursor: pointer; transition: opacity .4s; }
.lg-result.out { opacity: 0; }
.lg-result .lr-a, .lg-result .lr-b { position: absolute; inset: 0; pointer-events: none; }
/* 全畫面的原版演出（js/ui-fx.js） */
.fx-ov { position: absolute; inset: 0; z-index: 29; pointer-events: none; transition: opacity .35s; }
.fx-ov.block { pointer-events: auto; cursor: pointer; }
.fx-ov.dim { background: rgba(0, 0, 0, .45); }
.fx-ov.out { opacity: 0; }
.fx-at { position: absolute; inset: 0; pointer-events: none; }
/* 討伐的 BOSS 魔法陣 */
.boss-circle { position: absolute; left: 0; right: 0; top: 0; height: 540px; z-index: 0; pointer-events: none; }
.tgt-fx { position: absolute; left: 0; top: -40px; width: 64px; height: 40px; pointer-events: none; z-index: 4; }
/* 寶物箱：原版的扭蛋頁背景與金／藍按鈕框 */
.scroll.gacha-page { background: #1a1208 url(../assets/ui/gacha/page_bg.jpg) center top / cover no-repeat; }
.g-wallet { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; padding: 4px 8px; border-radius: 6px; background: rgba(20, 12, 4, .7); font-size: 12px; color: #fff4d8; }
.g-wallet b { color: #ffe08a; }
.g-wallet .btn { margin-left: auto; }
.g-wallet .ic-sm, .gbtn .ic-sm { width: 13px; height: 13px; vertical-align: -2px; }
.gk-ic { display: inline-block; width: 15px; height: 15px; vertical-align: -3px; font-style: normal; }
.gk-ic svg, .gk-ic img { width: 100%; height: 100%; border-radius: 2px; }
.gacha-page .gacha-card { margin-bottom: 6px; background-color: rgba(30, 18, 8, .55); }
.g-btns { gap: 4px; margin-top: 4px; }
.gbtn { position: relative; width: 118px; height: 46px; padding: 0; border: 0; background: url(../assets/ui/gacha/btn_gold.png) 0 0 / 100% 100% no-repeat; cursor: pointer; font-family: inherit; color: #fff; }
.gbtn.blue { background-image: url(../assets/ui/gacha/btn_blue.png); }
.gbtn b { position: absolute; left: 0; right: 0; top: 4px; font-size: 13px; font-weight: 900; line-height: 18px; text-shadow: 0 0 2px #000, 0 1px 2px #000; }
.gbtn span { position: absolute; left: 12px; right: 12px; top: 27px; height: 13px; font-size: 10.5px; line-height: 13px; font-weight: bold; color: #ffe8a0; white-space: nowrap; }
.gbtn:active { filter: brightness(1.2); }
.gbtn[disabled] { filter: grayscale(.85) brightness(.7); cursor: default; }
.g-free { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 3px; background: #d8201a; color: #fff; font-size: 10px; line-height: 15px; vertical-align: 1px; animation: gaNew .8s ease-in-out infinite alternate; }
.g-free.blue { background: #1a68c8; }
.g-note { margin-top: 4px; padding: 3px 6px; border-radius: 4px; background: rgba(20, 12, 4, .6); }
/* 扭蛋結果：原版的卡背，翻開 */
.ga-single-back { position: relative; z-index: 1; width: 200px; height: 200px; animation: gaPop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.ga-single-back .ga-back { width: 100%; height: 100%; }
.ga-single-back.rare { animation: gaPop .45s cubic-bezier(.2, 1.4, .4, 1) both, gaShake .12s .5s linear 5; filter: drop-shadow(0 0 16px rgba(255, 240, 180, .9)); }
.ga-single-back.t-rainbow { filter: drop-shadow(0 0 22px rgba(255, 140, 255, .95)) drop-shadow(0 0 40px rgba(120, 220, 255, .7)); }
@keyframes gaShake { 25% { transform: translateX(-3px) rotate(-1deg); } 75% { transform: translateX(3px) rotate(1deg); } }
.ga-cell { perspective: 400px; }
.ga-flipper { position: relative; width: 100%; aspect-ratio: 1; transform-style: preserve-3d; transition: transform .38s cubic-bezier(.3, 1.3, .5, 1); }
.ga-cell.open .ga-flipper { transform: rotateY(180deg); }
.ga-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.ga-face.ga-fr { transform: rotateY(180deg); }
.ga-face .ga-back { width: 100%; height: 100%; border-radius: 4px; }
.ga-cell .ga-cn { visibility: hidden; }
.ga-cell.open .ga-cn { visibility: visible; }
.ga-cell.r6 .ga-bk, .ga-cell.r7 .ga-bk, .ga-cell.r8 .ga-bk, .ga-cell.r9 .ga-bk { animation: gaGlow 1s ease-in-out infinite alternate; }
@keyframes gaGlow { to { filter: drop-shadow(0 0 8px rgba(255, 230, 150, .95)) brightness(1.15); } }
/* 獎品一覽：已持有、收集數、搜尋；抽獎紀錄 */
.lu-got { margin-left: auto; font-size: 11px; color: #bfe8a0; }
.lu-it.got { border-color: rgba(140, 230, 110, .7); position: relative; }
.lu-it.got::after { content: "✓"; position: absolute; right: 2px; top: 1px; width: 13px; height: 13px; border-radius: 50%; background: #3aa83a; color: #fff; font: bold 9px/13px sans-serif; }
.lu-q { flex: 1; min-width: 90px; height: 24px; padding: 0 6px; border: 1px solid #9a6a30; border-radius: 4px; background: #f4e8cc; color: #3a2410; font: inherit; font-size: 12px; }
.gh-row { margin-bottom: 6px; padding: 5px 6px; border-radius: 4px; background: rgba(46, 50, 44, .55); }
.gh-h { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 3px; }
.gh-items { display: flex; flex-wrap: wrap; gap: 3px; }
.gh-it { width: 34px; height: 34px; }
.gh-it svg, .gh-it img { width: 100%; height: 100%; }
/* 團體戰：戰況裡自己的行動、傷害數字、戰鬥中提示訊息移到競技場下面（不蓋住騎士） */
.blog .me { color: #fff; background: linear-gradient(90deg, rgba(40, 140, 230, .45), transparent 80%); }
.blog .hitme { background: linear-gradient(90deg, rgba(220, 60, 40, .35), transparent 80%); }
.lg-mine { display: inline-block; margin-right: 4px; padding: 0 4px; border-radius: 3px; background: #1a78d0; color: #fff; font-size: 10px; line-height: 14px; }
.lg-dmg { position: absolute; transform: translateX(-50%); font: 900 15px/1 Georgia, serif; color: #ffe860; text-shadow: 0 0 3px #000, 0 2px 2px #000, 0 0 8px #c08020; white-space: nowrap; pointer-events: none; animation: lgDmg 1.1s ease-out forwards; z-index: 3; }
.lg-dmg.ko { color: #ff9a3a; font-size: 18px; }
.lg-dmg.hurt { color: #ff6a5a; text-shadow: 0 0 3px #000, 0 2px 2px #000, 0 0 8px #a01010; }
@keyframes lgDmg { 0% { opacity: 0; transform: translate(-50%, 8px) scale(.6); } 15% { opacity: 1; transform: translate(-50%, 0) scale(1.2); } 30% { transform: translate(-50%, -4px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -26px); } }
#stage:has(#screen .lg-stage) #toast-layer { padding-top: 376px; } /* 跑馬燈移到狀態列下面（#screen 從 45 變 61）之後跟著往下 16 */
.eq-cell .lock { position: absolute; right: 2px; top: 2px; width: 15px; height: 15px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.eq-filter .tabs button small { margin-left: 3px; font-size: 10px; opacity: .85; }
.eq-q { flex: 1; min-width: 0; height: 24px; padding: 0 6px; border: 1px solid #9a6a30; border-radius: 4px; background: #f4e8cc; color: #3a2410; font: inherit; font-size: 12px; }
.eq-quick { gap: 4px; margin: 2px 0; }
/* 紅點的數字變了：跳一下 */
.badge.bump, .hnum.bump { animation: badgeBump .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes badgeBump { 0% { transform: scale(1); } 35% { transform: scale(1.55); } 100% { transform: scale(1); } }
.sh-have { margin-left: 6px; color: #bfe8a0; }

/* 原版的藍色按鈕（blueButton111x44；選中的是 blueBrightButton111x44） */
.btn.blue { border-image: url(../assets/ui/btn_blue.png) 14 20 fill / 8px 11px stretch; color: #fff; text-shadow: -1px -1px 0 #04122a, 1px -1px 0 #04122a, -1px 1px 0 #04122a, 1px 1px 0 #04122a; }
.btn.blue.sm { border-image-width: 7px 10px; }
.btn.blue.on { border-image-source: url(../assets/ui/btn_blue_on.png); color: #fffbe0; filter: drop-shadow(0 0 2px rgba(255, 230, 140, .9)); }
.eq-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 2px 0 6px; }
.eq-sort i { width: 6px; }
.eq-sort-l { font-size: 11px; color: #ffe8b0; margin-right: 2px; }
.eq-ophead { margin-bottom: 6px; gap: 4px; }
.eq-cell .tag.auto { background: #5a8ac0; opacity: .85; }
.eq-role { margin-top: 6px; font-size: 12.5px; font-weight: bold; color: #ffe8a0; }
.eq-role.r-main { color: #ff9a8a; }
.eq-role.r-sub, .eq-role.r-auto { color: #9ad8ff; }
.eq-room { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: 6px; background: rgba(0, 0, 0, .3); font-size: 12.5px; }
.eq-room b { color: #ffe08a; }
/* 武具圖鑑 */
.bk-rate { font-size: 13px; margin-bottom: 6px; }
.bk-rate .bar { margin-top: 3px; }
.bk-tabs .btn { flex: 1; }
.eq-cell.no .eicon { filter: grayscale(1) brightness(.42); }
.bk-no { position: absolute; left: 0; right: 0; bottom: 3px; text-align: center; font-size: 9px; font-weight: bold; color: #e8dcc0; text-shadow: 0 1px 1px #000; }
.bk-state { margin-bottom: 6px; padding: 3px 8px; border-radius: 5px; font-size: 12.5px; font-weight: bold; text-align: center; }
.bk-state.got { background: rgba(60, 140, 60, .45); color: #d8ffd0; }
.bk-state.not { background: rgba(0, 0, 0, .35); color: #d8c8b0; }
.bk-evos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0; }
.bk-evo { text-align: center; font-size: 10px; }
.bk-evo .eicon { width: 100%; height: auto; }
.bk-evo.no .eicon { filter: grayscale(1) brightness(.5); }

/* 聯賽等級、升降級 */
.lg-season .ls-ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin: 6px 0 4px; font-size: 10px; }
.ls-ladder span { padding: 1px 5px; border-radius: 9px; background: rgba(0, 0, 0, .3); color: #b8a888; white-space: nowrap; }
.ls-ladder span.past { color: #e8d8b0; }
.ls-ladder span.cur { background: linear-gradient(#ffe48a, #d89a20); color: #3a2000; font-weight: 900; text-shadow: none; box-shadow: 0 0 6px rgba(255, 220, 120, .8); }
.ls-ladder i { color: #8a7050; font-style: normal; }
.ls-zone { font-size: 12.5px; line-height: 1.5; }
.ls-zone b { color: #ffe08a; }
.ls-zone .z-up { color: #7aff8a; }
.ls-zone .z-down { color: #ff8a7a; }
.ls-days { display: flex; align-items: center; gap: 3px; margin-top: 4px; }
.ls-days span { width: 18px; height: 18px; border-radius: 50%; background: rgba(0, 0, 0, .35); font-size: 10px; line-height: 18px; text-align: center; color: #c8b898; }
.ls-days span.done { background: #6a4a1a; color: #ffe8b0; }
.ls-days span.today { background: #d0302a; color: #fff; box-shadow: 0 0 5px #ff8a5a; }
.ls-days small { margin-left: 4px; font-size: 10.5px; color: #e8d8b8; }
.ls-line { margin: 4px 0 2px; font-size: 11px; font-weight: bold; text-align: center; border-top: 1px dashed rgba(255, 255, 255, .35); padding-top: 2px; }
.ls-line.up { color: #9aff9a; }
.ls-line.down { color: #ff9a8a; }
.list-row.lsr-up > b:first-child { color: #2a9a3a; }
.list-row.lsr-down > b:first-child { color: #d02a2a; }
.list-row.mine { background: rgba(255, 240, 160, .28); box-shadow: inset 0 0 0 1px rgba(255, 230, 140, .7); }
.ss-wrap { text-align: center; padding: 6px 0; }
.ss-rank { font-size: 15px; }
.ss-rank b { font-size: 30px; color: #ffe08a; }
.ss-move { margin: 4px 0; font: 900 26px/1.2 Georgia, "Noto Serif TC", serif; letter-spacing: 4px; animation: ssPop .7s cubic-bezier(.2, 1.5, .4, 1) both; }
.z-up .ss-move { color: #fff2a0; text-shadow: 0 0 10px #ffb020, 0 2px 2px #000; }
.z-down .ss-move { color: #b8c8e0; text-shadow: 0 2px 2px #000; }
.z-stay .ss-move { color: #fff; text-shadow: 0 2px 2px #000; }
.ss-cls { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; margin: 4px 0 8px; }
.ss-cls span { color: #d8c8a8; }
.ss-cls b { color: #ffe08a; font-size: 18px; }
.ss-rw { font-size: 12.5px; margin-bottom: 4px; }
@keyframes ssPop { 0% { opacity: 0; transform: scale(2.2); } 100% { opacity: 1; transform: scale(1); } }
/* 特殊事件 */
.ev-pop { position: absolute; left: 0; right: 0; top: 150px; z-index: 46; display: flex; justify-content: center; cursor: pointer; transition: opacity .35s; animation: evIn .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.ev-pop.out { opacity: 0; }
.ev-box { width: 280px; padding: 8px 12px 10px; text-align: center; color: #fff8e0; border-radius: 10px; background: linear-gradient(rgba(40, 20, 70, .94), rgba(20, 8, 40, .94)); box-shadow: 0 0 0 2px #e8c060, 0 0 18px rgba(255, 210, 120, .7); text-shadow: 0 1px 1px #000; }
.ev-t { font: bold 11px/1 Georgia, serif; letter-spacing: 2px; color: #ffd86a; margin-bottom: 3px; }
.ev-box b { font-size: 16px; color: #fff2b0; }
.ev-box p { margin: 4px 0 6px; font-size: 12px; line-height: 1.5; }
.ev-rw { display: flex; justify-content: center; gap: 14px; font-size: 15px; font-weight: 900; color: #ffe08a; }
.ev-rw span { display: inline-flex; align-items: center; gap: 2px; }
.ev-rw svg, .ev-rw img { width: 20px; height: 20px; }
@keyframes evIn { 0% { opacity: 0; transform: translateY(-20px) scale(.9); } 100% { opacity: 1; transform: none; } }

/* 拿掉「選單」之後：主頁下方的道具、職業變更、交換所、設定 */
.home-tools { display: flex; gap: 4px; margin-top: 6px; }
.home-tools .btn { flex: 1; padding-left: 2px; padding-right: 2px; }
.sh-look { overflow: hidden; }
.sh-look svg { width: 100%; height: 100%; }
/* 原版的稀有度字樣（assets/ui/rar，NText～GodText）；.rar-sh 是字上掃過的光 */
.rar-t { display: inline-block; vertical-align: middle; image-rendering: auto; }
.rar-sh { position: relative; display: inline-block; vertical-align: middle; line-height: 0; }
.rar-sh .sh2 { position: absolute; left: 0; top: 0; filter: brightness(2.4) saturate(.5); clip-path: polygon(-40% 0, -15% 0, -25% 100%, -50% 100%); animation: rarShine 1.8s ease-in-out infinite; pointer-events: none; }
@keyframes rarShine { 0% { clip-path: polygon(-40% 0, -15% 0, -25% 100%, -50% 100%); } 60%, 100% { clip-path: polygon(125% 0, 150% 0, 140% 100%, 115% 100%); } }

/* 扭蛋：依稀有度的翻開特效（js/ui-gacha.js rarFx）、結果一覽只有「點擊空白處離開」 */
.ga-fxb { position: absolute; pointer-events: none; }
.ga-fxb.ring { inset: -45%; z-index: 3; }
.ga-fxb.glow, .ga-fxb.frame { left: -20%; top: -20%; width: 140%; aspect-ratio: 1; z-index: 0; mix-blend-mode: screen; }
.ga-fxb.twk { inset: -30%; z-index: 2; }
.ga-fr .ga-ic { z-index: 1; }
.ga-big { position: relative; }
.ga-fr.t2 .ga-ic, .ga-big.t2 > svg { filter: drop-shadow(0 0 4px rgba(255, 240, 170, .8)); }
.ga-fr.t3 .ga-ic, .ga-big.t3 > svg, .ga-big.t3 > img { filter: drop-shadow(0 0 6px rgba(255, 210, 120, .95)); }
.ga-fr.t4 .ga-ic, .ga-big.t4 > svg, .ga-big.t4 > img { filter: drop-shadow(0 0 7px rgba(255, 120, 90, .95)) drop-shadow(0 0 14px rgba(255, 200, 80, .7)); }
.ga-fr.t5 .ga-ic, .ga-big.t5 > svg, .ga-big.t5 > img { animation: gaLegend 1.2s ease-in-out infinite alternate; }
.ga-fr.t6 .ga-ic, .ga-big.t6 > svg, .ga-big.t6 > img { animation: gaGod 2.4s linear infinite; }
@keyframes gaLegend { from { filter: drop-shadow(0 0 6px rgba(255, 200, 60, .9)); } to { filter: drop-shadow(0 0 14px rgba(255, 230, 120, 1)) brightness(1.12); } }
@keyframes gaGod { 0% { filter: drop-shadow(0 0 9px #ff5a8a) brightness(1.1); } 33% { filter: drop-shadow(0 0 9px #5ad8ff) brightness(1.15); } 66% { filter: drop-shadow(0 0 9px #b8ff5a) brightness(1.1); } 100% { filter: drop-shadow(0 0 9px #ff5a8a) brightness(1.1); } }
.ga-rart { margin: 2px 0 2px; line-height: 0; }
.ga-cnt { display: inline-flex; align-items: center; gap: 2px; margin: 0 4px; }
.ga-leave { font-size: 12.5px; color: #f0e2c0; animation: tPulse 1.6s ease-in-out infinite; }
.fx-ov.ga-bolt { opacity: .85; mix-blend-mode: screen; }

/* ---------- 扭蛋：得到的武具（原版的 GET!、珍珠框／金框、NEW、gachaOpenLight 光爆）：卡片翻過來放大彈出、光掃過、名牌 ---------- */
/* 位置固定：原版 SSR 以上的背景動畫（specialRareAnimationBackground）會在卡片正下方寫「GOD RARE」，卡片和名牌之間留空給它 */
.ga-single { position: absolute; z-index: 1; left: 0; right: 0; top: 112px; display: flex; flex-direction: column; align-items: center; margin: 0; animation: none; }
.ga-rays { --ray: rgba(255, 230, 170, .16); position: absolute; z-index: 0; left: 50%; top: 161px; width: 560px; height: 560px; margin: -280px 0 0 -280px; border-radius: 50%; pointer-events: none; background: repeating-conic-gradient(from 0deg, var(--ray) 0 7deg, transparent 7deg 15deg); -webkit-mask: radial-gradient(circle, #000 10%, rgba(0, 0, 0, .55) 34%, transparent 68%); mask: radial-gradient(circle, #000 10%, rgba(0, 0, 0, .55) 34%, transparent 68%); opacity: 0; animation: gaRaysIn .8s .2s ease-out forwards, gaSpin 18s linear infinite; }
.ga-rays.t1 { --ray: rgba(140, 200, 255, .2); }
.ga-rays.t2, .ga-rays.t3 { --ray: rgba(255, 210, 110, .26); }
.ga-rays.t4, .ga-rays.t5, .ga-rays.t6 { --ray: rgba(255, 190, 255, .3); }
.ga-burst { position: absolute; z-index: 0; left: 50%; top: 161px; width: 420px; height: 420px; margin: -210px 0 0 -210px; pointer-events: none; mix-blend-mode: screen; transition: opacity .7s; }
.ga-burst.done { opacity: 0; }
.ga-get { position: relative; z-index: 3; height: 40px; margin-bottom: 6px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .85)); animation: gaGet .6s .3s cubic-bezier(.2, 1.6, .4, 1) both; pointer-events: none; }
.ga-get.top { position: absolute; top: 70px; left: 50%; margin-left: -56px; }
.ga-card { position: relative; z-index: 2; width: 228px; height: 230px; animation: gaCardIn .75s cubic-bezier(.2, 1.25, .4, 1) both; }
.ga-cin { position: absolute; left: 8.6%; top: 8.6%; right: 8.6%; bottom: 8.6%; overflow: hidden; border-radius: 3px; }
.bg-brown { background: radial-gradient(circle at 50% 42%, #9a7a52, #4a3018 72%); }
.bg-blue { background: radial-gradient(circle at 50% 42%, #6aaaf0, #12305e 72%); }
.bg-red { background: radial-gradient(circle at 50% 42%, #ff8a6a, #6a120c 72%); }
.bg-gold { background: radial-gradient(circle at 50% 42%, #fff0b0, #b07418 72%); }
.bg-rainbow { background: radial-gradient(circle at 50% 42%, rgba(255, 255, 255, .85), transparent 60%), conic-gradient(#ff7a9a, #ffd36a, #8aff8a, #6ad8ff, #b48aff, #ff7a9a); }
.ga-cin.bg-rainbow { animation: gaHue 4s linear infinite; }
.ga-single .ga-big { position: absolute; inset: 4%; width: auto; height: auto; margin: 0; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .55)); }
.ga-single .ga-big .ga-art, .ga-single .ga-big svg { width: 100%; height: 100%; object-fit: contain; }
.ga-frm { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.ga-shine { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .7) 50%, transparent 62%); transform: translateX(-130%); animation: gaShine 1.1s .55s ease-out both; }
.ga-card.t3 .ga-shine, .ga-card.t4 .ga-shine, .ga-card.t5 .ga-shine, .ga-card.t6 .ga-shine { animation: gaShine 1.1s .55s ease-out both, gaShine 1.4s 3s ease-in-out infinite; }
.ga-card.t2 .ga-frm { filter: drop-shadow(0 0 6px rgba(255, 220, 120, .8)); }
.ga-card.t3 .ga-frm { filter: drop-shadow(0 0 9px rgba(255, 190, 80, .95)); }
.ga-card.t4 .ga-frm, .ga-card.t5 .ga-frm, .ga-card.t6 .ga-frm { animation: gaFrmRb 2.4s linear infinite; }
.ga-newi { position: absolute; z-index: 4; left: -12px; top: -14px; height: 30px; pointer-events: none; animation: gaNewi .5s .7s cubic-bezier(.2, 1.8, .4, 1) both; }
.ga-plate .ga-rart { margin: 0 0 2px; line-height: 0; }
.ga-plate { position: relative; z-index: 3; margin-top: 52px; min-width: 200px; max-width: 300px; padding: 6px 16px 6px; border: 2px solid #c8a050; border-radius: 6px; background: linear-gradient(#2c1a10, #120a06); box-shadow: 0 0 0 1px #4a2a10, 0 3px 10px rgba(0, 0, 0, .6), inset 0 0 10px rgba(255, 200, 120, .14); text-align: center; animation: gaUp .45s .6s ease-out both; }
.ga-plate .ga-name { font-size: 15px; font-weight: 900; color: #fff4d8; }
.ga-plate .ga-cat { font-size: 11px; color: #d8c090; margin-top: 1px; }
/* 多抽：每格是原版縮圖＋外框，翻開時光掃過 */
.ga-grid { grid-template-columns: repeat(3, 94px); gap: 10px 8px; margin-top: 0; }
.ga-grid.many { grid-template-columns: repeat(4, 76px); gap: 8px 6px; }
.ga-face.ga-fr .ga-ic { position: absolute; left: 8.6%; top: 8.6%; width: 82.8%; height: 82.8%; aspect-ratio: auto; }
.ga-face.ga-fr { overflow: hidden; border-radius: 3px; }
.ga-fr .ga-shine { animation: none; }
.ga-cell.open .ga-fr .ga-shine { animation: gaShine .9s .3s ease-out both; }
.ga-cell.t2 .ga-fr .ga-frm { filter: drop-shadow(0 0 3px rgba(255, 220, 120, .9)); }
.ga-cell.t3 .ga-fr .ga-frm { filter: drop-shadow(0 0 4px rgba(255, 190, 80, 1)); }
.ga-cell.t4 .ga-fr .ga-frm, .ga-cell.t5 .ga-fr .ga-frm, .ga-cell.t6 .ga-fr .ga-frm { animation: gaFrmRb 2.4s linear infinite; }
.ga-cell .ga-newi { left: -6px; top: -8px; height: 17px; animation: none; }
.ga-cell:not(.open) .ga-newi { visibility: hidden; }
.ga-cell.open .ga-newi { animation: gaNewi .4s .3s cubic-bezier(.2, 1.8, .4, 1) both; }
@keyframes gaCardIn { 0% { transform: perspective(700px) rotateY(-110deg) scale(.35); opacity: 0; filter: brightness(3); } 45% { opacity: 1; } 60% { transform: perspective(700px) rotateY(10deg) scale(1.1); filter: brightness(1.8); } 80% { transform: perspective(700px) rotateY(-3deg) scale(.98); } 100% { transform: none; filter: none; } }
@keyframes gaGet { 0% { transform: translateY(-24px) scale(2.4); opacity: 0; } 55% { transform: scale(.88); opacity: 1; } 100% { transform: none; } }
@keyframes gaShine { 0% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@keyframes gaRaysIn { to { opacity: 1; } }
@keyframes gaSpin { to { transform: rotate(360deg); } }
@keyframes gaHue { to { filter: hue-rotate(360deg); } }
@keyframes gaFrmRb { 0%, 100% { filter: drop-shadow(0 0 7px #ff6ad8); } 33% { filter: drop-shadow(0 0 9px #6ad8ff); } 66% { filter: drop-shadow(0 0 9px #ffe06a); } }
@keyframes gaNewi { 0% { transform: scale(0) rotate(-20deg); } 100% { transform: none; } }
@keyframes gaUp { 0% { transform: translateY(14px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* 進化演出（js/ui-fx.js evolve）：原版的進化背景 evolutionAnimationBackground（assets/ui/evo_bg.jpg） */
.evo-ov { position: absolute; inset: 0; z-index: 30; overflow: hidden; background: #000; cursor: pointer; transition: opacity .35s; }
.evo-ov.out { opacity: 0; pointer-events: none; }
.evo-bg { position: absolute; inset: 0; background: url(../assets/ui/evo_bg.jpg) 50% 50% / cover no-repeat; opacity: 0; transform: scale(1.08); transition: opacity .5s, transform 2.4s ease-out; }
.evo-ov.in .evo-bg { opacity: 1; transform: none; }
.evo-glow { position: absolute; left: 50%; top: 45%; width: 360px; height: 360px; margin: -180px 0 0 -180px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 240, 255, .9), rgba(220, 150, 255, .35) 35%, transparent 65%); opacity: 0; transform: scale(.4); transition: opacity .5s, transform .6s; mix-blend-mode: screen; }
.evo-ov.merge .evo-glow { opacity: .9; transform: scale(1); animation: evoPulse .5s ease-in-out infinite alternate; }
.evo-ov.done .evo-glow { animation: none; opacity: .55; }
@keyframes evoPulse { to { transform: scale(1.15); opacity: 1; } }
.evo-it { position: absolute; top: 230px; width: 96px; height: 96px; opacity: 0; transition: left .6s cubic-bezier(.5, 0, .7, 1), transform .6s, opacity .35s; filter: drop-shadow(0 0 8px rgba(255, 230, 255, .9)); }
.evo-it svg { width: 100%; height: 100%; }
.evo-it.a { left: 34px; }
.evo-it.b { left: 230px; }
.evo-ov.in .evo-it { opacity: 1; }
.evo-ov.merge .evo-it { left: 132px; transform: scale(.55) rotate(180deg); }
.evo-ov.flash .evo-it { opacity: 0; }
.evo-fx { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.evo-res { position: absolute; left: 0; right: 0; top: 150px; text-align: center; opacity: 0; transform: scale(.4); pointer-events: none; }
.evo-ov.done .evo-res { opacity: 1; transform: none; transition: opacity .3s, transform .5s cubic-bezier(.2, 1.5, .4, 1); }
.evo-big { position: relative; width: 170px; height: 170px; margin: 0 auto; filter: drop-shadow(0 0 14px rgba(255, 240, 200, .95)); }
.evo-big > svg, .evo-big > img { width: 100%; height: 100%; object-fit: contain; }
.evo-ring { position: absolute; inset: -60%; pointer-events: none; }
.evo-twk { position: absolute; inset: -30%; pointer-events: none; }
.evo-title { margin-top: 10px; font: 900 26px/1.1 serif; color: #fff4c0; letter-spacing: 2px; text-shadow: 0 0 6px #c070ff, 0 0 2px #000, 0 2px 3px #000; }
.evo-rar { margin-top: 6px; line-height: 0; }
.evo-up { display: inline-block; margin-left: 6px; vertical-align: middle; font-size: 13px; line-height: 18px; color: #ffe060; text-shadow: 0 0 3px #000; animation: gaNew .8s ease-in-out infinite alternate; }
.evo-name { margin-top: 6px; font-size: 15px; font-weight: 900; color: #fff; text-shadow: 0 0 4px #000, 0 1px 2px #000; }
.evo-sub { font-size: 11.5px; color: #e8d8ff; text-shadow: 0 1px 2px #000; }
.evo-tap { margin-top: 18px; font-size: 12px; color: #f0e2c0; text-shadow: 0 1px 2px #000; animation: tPulse 1.6s ease-in-out infinite; }

/* 團體戰必殺技：切入裡的角色與裝備特效、目標身上的裝備特效 */
.lg-cutin .ci-art { overflow: visible; }
.lg-cutin .ci-art > svg.avatar { position: relative; z-index: 1; }
.lg-cutin .ci-art .eqfx { position: absolute; inset: 0; pointer-events: none; }
.lg-cutin .ci-art .eqfx.fx-back { z-index: 0; }
.lg-cutin .ci-art .eqfx.fx-front { z-index: 2; }
.lg-cutin .ci-eq { display: block; width: 46px; height: 46px; margin: 0 0 2px auto; filter: drop-shadow(0 0 6px rgba(160, 220, 255, .95)); }
.lg-fx > .eqfx { position: absolute; inset: 0; pointer-events: none; animation: eqfxIn 1.4s ease-out both; }
@keyframes eqfxIn { 0% { opacity: 0; } 12% { opacity: 1; } 75% { opacity: 1; } 100% { opacity: 0; } }
.lg-cutin .ci-art .eqfx.fx-back { -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 42%, transparent 70%); mask-image: radial-gradient(circle at 50% 50%, #000 42%, transparent 70%); }
.evo-tap { text-shadow: 0 0 4px #000, 0 1px 2px #000; color: #fff; }

/* 多人連線（js/net.js）：登入畫面、標題的入口、連線狀態 */
.title-screen .t-net { position: absolute; right: 10px; top: 12px; z-index: 6; padding: 4px 12px; font-size: 12px; opacity: 0; transition: opacity .6s .35s; }
.title-screen.loaded .t-net { opacity: 1; }
.t-net small { display: block; font-size: 10px; color: #ffe8b0; font-weight: normal; }
/* 自動連線的結果（標題畫面按鈕上面） */
.t-note { position: absolute; left: 10px; right: 10px; top: 522px; z-index: 5; text-align: center; font-size: 11px; font-weight: bold; color: #fff4c8; text-shadow: 0 0 3px #000, 0 1px 2px #000; opacity: 0; transition: opacity .6s .35s; }
.title-screen.loaded .t-note { opacity: 1; }
.t-note.good { color: #b8ffa8; }
.t-note.bad { color: #ffc2a8; }
.t-note .t-upd { margin-left: 6px; padding: 2px 12px; font-size: 12px; vertical-align: middle; }
.t-retry { margin-left: 6px; padding: 1px 9px; border-radius: 9px; border: 1px solid #e8c070; background: rgba(0, 0, 0, .55); color: #ffe8b0; font: bold 11px/16px inherit; cursor: pointer; }
.net-login { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .62); }
.nl-box { width: 320px; padding: 10px 12px 12px; border-radius: 8px; background: url(../assets/ui/parch.jpg) 0 0 / 248px 259px; border: 2px solid #c8a040; box-shadow: 0 4px 18px rgba(0, 0, 0, .7); color: #3a2410; }
.nl-box .title-bar { margin-bottom: 8px; }
.nl-row { display: flex; align-items: center; gap: 6px; margin: 5px 0; font-size: 13px; font-weight: bold; }
.nl-row span { width: 44px; flex: none; }
.nl-row input { flex: 1; min-width: 0; font: inherit; font-weight: normal; padding: 5px 7px; border-radius: 5px; border: 1px solid #9a6a30; background: #fffaf0; }
.nl-st { min-height: 16px; font-size: 11.5px; text-align: center; color: #6a4a20; }
.nl-st.good { color: #2a7a2a; }
.nl-st.bad { color: #b02020; }
.nl-hint { margin-top: 8px; font-size: 11px; line-height: 1.5; color: #5a3a18; }
/* 帳號（Email＋密碼）：標題的登入／註冊新帳號、帳號畫面 */
.t-acct { display: flex; justify-content: center; gap: 10px; }
.t-acct .btn { min-width: 132px; }
.net-login.acct .nl-row span { width: 50px; }
.net-login.acct .nl-row .btn.sm { flex: none; padding: 3px 8px; font-size: 11.5px; white-space: nowrap; }
.net-login.acct .nl-row .btn.sm:disabled { opacity: .55; }
.ac-p { margin: 2px 0 6px; font-size: 12.5px; line-height: 1.6; }
.ac-links { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; }
.ac-links a { color: #8a3a10; text-decoration: underline; cursor: pointer; }
.nl-box .col .btn { margin: 3px 0; }
/* 連線狀態：舞台左上角的小燈（綠＝連線中、橘＝重新連線） */
#net-pill { position: absolute; left: 2px; top: 2px; z-index: 12; width: 7px; height: 7px; border-radius: 50%; overflow: hidden; color: transparent; font-size: 0; background: #3ad84a; box-shadow: 0 0 4px #3ad84a; pointer-events: none; }
#net-pill.retry { background: #f0a020; box-shadow: 0 0 4px #f0a020; animation: tPulse 1s infinite; }

/* 團體戰：指令等待中的原版特效（leagueCommandWaitTImeEffect） */
#lg-cmd { position: relative; }
#lg-cmd .cd-fx { position: absolute; left: 10%; right: 10%; top: 18px; bottom: 0; pointer-events: none; z-index: 2; mix-blend-mode: screen; }

/* ---------- 覺醒融合（原版 awakeBackground、覚醒素材／覚醒ボーナス；字照台灣版用中文）---------- */
img.awm-img { display: block; width: 100%; height: 100%; object-fit: contain; background: url(../assets/ui/eq_bg.png) 0 0 / 100% 100%; border-radius: 6px; }
.aw-stars { display: inline-flex; gap: 1px; vertical-align: -3px; }
.aw-stars i { width: 14px; height: 15px; background: url(../assets/ui/star.png) 0 0 / 100% 100% no-repeat; filter: grayscale(1) brightness(.55); opacity: .55; }
.aw-stars i.on { filter: none; opacity: 1; }
.aw-line { margin: 2px 0; font-size: 12px; color: #ffe6a0; }
.grid2 .aw-btn { grid-column: span 2; }
.awk-pane { margin: -4px -2px 0; padding: 10px 10px 8px; border-radius: 6px; background: url(../assets/ui/awake_bg.jpg) 50% 40% / cover; box-shadow: inset 0 0 0 1px rgba(255, 230, 120, .5); color: #fff; text-shadow: 0 1px 2px #000; }
.awk-top { display: flex; gap: 8px; align-items: center; padding: 6px; background: rgba(20, 16, 0, .55); border-radius: 6px; }
.awk-base { width: 64px; flex: none; }
.awk-base .eicon { width: 64px; height: 64px; }
.awk-bi { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.awk-bi b { font-size: 14px; }
.awk-bi .hint { color: #f2e6b0; }
.awk-h { margin: 8px 0 4px; font: 900 15px/1.2 serif; letter-spacing: 2px; text-align: center; color: #ffe27a; background: linear-gradient(#fff6c8, #f0c040 55%, #b07010); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 1px 1px #000) drop-shadow(0 0 2px #3a2000); }
.awk-mats { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.awk-mat { display: flex; align-items: center; gap: 5px; width: calc(50% - 3px); padding: 4px; background: rgba(20, 16, 0, .55); border-radius: 6px; box-sizing: border-box; }
.awk-mat.lack { box-shadow: inset 0 0 0 1px #ff6a50; }
.awk-mi { width: 40px; height: 40px; flex: none; }
.awk-mi .eicon { width: 40px; height: 40px; }
.awk-mn { display: flex; flex-direction: column; min-width: 0; font-size: 11.5px; }
.awk-mn b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.awk-mat.lack .awk-mn span { color: #ff9a8a; }
.awk-bonus { margin: 0 auto; border-collapse: collapse; font-size: 12.5px; background: rgba(20, 16, 0, .55); border-radius: 6px; }
.awk-bonus td { padding: 2px 8px; }
.awk-bonus .nx { color: #9aff8a; font-weight: bold; }
.awk-bonus .arr { color: #ffe27a; padding: 0; }
.awk-gold { margin: 8px 0 4px; text-align: center; font-size: 12.5px; }
.awk-go { display: block; width: 70%; margin: 0 auto; font-size: 18px; letter-spacing: 4px; }
.awk-why { margin-top: 4px; text-align: center; font-size: 12px; color: #ffb0a0; }
.awk-done { margin: 8px 0; text-align: center; font-weight: bold; color: #ffe27a; }
.awm-thumb img { border-radius: 4px; }

.awk-ov { position: absolute; inset: 0; z-index: 30; overflow: hidden; background: #000; cursor: pointer; transition: opacity .35s; }
.awk-ov.out { opacity: 0; pointer-events: none; }
.awk-bg { position: absolute; inset: 0; background: url(../assets/ui/awake_bg.jpg) 50% 50% / cover no-repeat; opacity: 0; transform: scale(1.06); transition: opacity .5s, transform 2.6s ease-out; }
.awk-ov.in .awk-bg { opacity: 1; transform: none; }
.awk-glow { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: 0; transition: opacity .6s; }
.awk-ov.in .awk-glow { opacity: .6; }
.awk-ov.done .awk-bg { filter: brightness(.7); transition: filter .6s; }
.awk-center { position: absolute; left: 50%; top: 290px; width: 0; height: 0; }
.awk-it { position: absolute; left: -48px; top: -48px; width: 96px; height: 96px; opacity: 0; transition: opacity .4s, transform .6s; filter: drop-shadow(0 0 10px rgba(255, 240, 120, .9)); }
.awk-it .eicon { width: 100%; height: 100%; }
.awk-ov.in .awk-it { opacity: 1; }
.awk-ov.flash .awk-it { opacity: 0; transform: scale(1.4); }
.awk-m { position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; transform: translate(var(--x), var(--y)) scale(.6); opacity: 0; transition: transform .7s cubic-bezier(.55, 0, .8, .4) var(--d), opacity .4s; }
.awk-ov.in .awk-m { opacity: 1; transform: translate(var(--x), var(--y)) scale(1); }
.awk-ov.merge .awk-m { transform: translate(0, 0) scale(.3); opacity: 0; transition: transform .7s cubic-bezier(.55, 0, .8, .4) var(--d), opacity .3s calc(var(--d) + .45s); }
.awk-burst { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.awk-mic { position: absolute; left: 18px; top: 18px; width: 44px; height: 44px; }
.awk-mic .eicon, .awk-mic img { width: 100%; height: 100%; }
.awk-fx { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; }
.awk-res { position: absolute; left: 0; right: 0; top: 140px; text-align: center; opacity: 0; transform: scale(.4); pointer-events: none; }
.awk-ov.done .awk-res { opacity: 1; transform: none; transition: opacity .3s, transform .5s cubic-bezier(.2, 1.5, .4, 1); }
.awk-big { position: relative; width: 160px; height: 160px; margin: 0 auto; filter: drop-shadow(0 0 14px rgba(255, 240, 140, .95)); }
.awk-big > svg, .awk-big > img { width: 100%; height: 100%; object-fit: contain; }
.awk-title { margin-top: 8px; font: 900 30px/1.1 serif; letter-spacing: 4px; color: #fff; text-shadow: 0 0 8px #ffd040, 0 0 2px #000, 0 2px 3px #000; }
.awk-lv { margin-top: 4px; display: flex; gap: 6px; justify-content: center; align-items: center; font-size: 13px; font-weight: bold; color: #ffe8a0; text-shadow: 0 1px 2px #000; }
.awk-lv .aw-stars i { width: 18px; height: 19px; }
.awk-name { margin-top: 4px; font-size: 15px; font-weight: 900; color: #fff; text-shadow: 0 0 4px #000, 0 1px 2px #000; }
.awk-bn { margin-top: 4px; display: flex; gap: 10px; justify-content: center; font-size: 12.5px; font-weight: bold; color: #b8ff9a; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
/* 強化演出（ui-fx.js enhance）：覺醒演出的版面＋原版強化合成的藍色魔法陣 composeAnimationBackground */
.awk-ov.enh .awk-bg { background-image: url(../assets/ui/compose_bg.jpg); }
.enh-glow { position: absolute; left: 50%; top: 290px; width: 340px; height: 340px; margin: -170px 0 0 -170px; border-radius: 50%; background: radial-gradient(circle, rgba(230, 250, 255, .9), rgba(90, 190, 255, .35) 35%, transparent 65%); opacity: 0; transform: scale(.4); transition: opacity .5s, transform .6s; mix-blend-mode: screen; pointer-events: none; }
.awk-ov.enh.merge .enh-glow { opacity: .9; transform: scale(1); animation: evoPulse .45s ease-in-out infinite alternate; }
.awk-ov.enh.done .enh-glow { animation: none; opacity: .45; }
.awk-ov.enh .awk-it { filter: drop-shadow(0 0 10px rgba(150, 220, 255, .95)); }
.awk-ov.enh .awk-big { filter: drop-shadow(0 0 14px rgba(160, 225, 255, .95)); }
.awk-ov.enh .awk-mic .eicon, .awk-ov.enh .awk-mic img, .awk-ov.enh .awk-mic svg { width: 100%; height: 100%; }
.enh-n { position: absolute; right: -6px; bottom: -4px; font-size: 12px; color: #fff; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.enh-more { position: absolute; left: -20px; top: 128px; width: 40px; text-align: center; font-size: 13px; color: #e8f6ff; text-shadow: 0 0 3px #000; }
.awk-ov.merge .enh-more { opacity: 0; transition: opacity .3s; }
.enh-title { text-shadow: 0 0 8px #40b0ff, 0 0 2px #000, 0 2px 3px #000; }
.enh-lv { margin-top: 4px; font-size: 16px; font-weight: 900; color: #e8f6ff; text-shadow: 0 0 4px #000, 0 1px 2px #000; }
.enh-lv b { color: #9aff8a; font-size: 19px; }
.enh-up, .enh-max { display: inline-block; margin-left: 8px; font-style: normal; font-size: 13px; color: #ffe060; text-shadow: 0 0 3px #000; animation: tPulse 1s ease-in-out infinite; }
.enh-bar { width: 220px; margin: 8px auto 0; }
.enh-bar i { transition: width .9s ease-out; }
.enh-st { flex-wrap: wrap; gap: 4px 10px; padding: 0 20px; }
.enh-st b { color: #9aff8a; }

/* ---------- 職業（職業等級、上級職）---------- */
.job180 { display: block; width: 64px; height: 64px; flex: none; }
.jr-head { display: flex; gap: 10px; align-items: center; }
.jr-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.jr-name { font-size: 16px; }
.jr-rank { font-size: 13px; }
.jr-rank b { font-size: 16px; color: #8a2a10; }
.jr-max { height: 22px; vertical-align: middle; }
.jr-bar { height: 9px; }
.jr-up { position: relative; width: 50px; height: 40px; flex: none; }
.jr-up .fx-at { position: absolute; inset: 0; }
.jr-elder { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 6px; background: rgba(60, 30, 80, .18); }
.jr-elder .job180 { width: 52px; height: 52px; filter: grayscale(.85) brightness(.8); }
.jr-elder.on .job180 { filter: none; }
.jr-elder > div { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.elder-ov .elder-ic { position: absolute; left: 0; right: 0; top: 200px; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: elderIn 1.2s ease-out .5s backwards; pointer-events: none; }
.elder-ic .job180 { width: 132px; height: 132px; filter: drop-shadow(0 0 16px #ffd040); }
.elder-ic b { font: 900 26px/1.1 serif; color: #fff; letter-spacing: 3px; text-shadow: 0 0 8px #ffb020, 0 2px 3px #000; }
.elder-ic span { font-size: 14px; font-weight: bold; color: #ffe8a0; text-shadow: 0 1px 2px #000; }
@keyframes elderIn { from { opacity: 0; transform: scale(.3); } 60% { opacity: 1; transform: scale(1.12); } to { transform: none; } }

/* ---------- 原版的小動畫：VS 劍條、GET 章、技能解放 ---------- */
.lg-vsbar { position: relative; margin: 2px 0 6px; padding-top: 60px; }
.lg-vsbar .vsb-anim { position: absolute; left: 0; right: 0; top: 0; height: 58px; pointer-events: none; }
.lg-vsbar b { position: relative; display: block; width: 44%; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lg-vsbar b.l { float: left; color: #9ad8ff; text-shadow: 0 1px 2px #000; }
.lg-vsbar b.r { float: right; text-align: right; color: #ff9a8a; text-shadow: 0 1px 2px #000; }
.lg-vsbar::after { content: ''; display: block; clear: both; }
.list-row .thumb { position: relative; }
.q-stamp { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.q-stamp canvas { overflow: visible; }
.q-got { position: absolute; inset: 0; border-radius: 6px; background: rgba(0, 0, 0, .45) url(../assets/ui/q_get.png) 50% 50% / 86% no-repeat; }
.evo-skill { position: relative; display: inline-block; margin-top: 8px; padding: 2px 10px; font-size: 13.5px; font-weight: 900; color: #ffe86a; text-shadow: 0 0 4px #000, 0 1px 2px #000; }
.evo-skill .rel-fx { position: absolute; left: -34px; top: -26px; width: 60px; height: 60px; pointer-events: none; }

/* ---------- 原版介面圖第二批：道具、貨幣、團體戰數字、排名、好感度條 ---------- */
img.item-img.orig { object-fit: contain; background: url(../assets/ui/eq_bg.png) 0 0 / 100% 100%; padding: 2px; box-sizing: border-box; }
img.money-img, img.crys-img { object-fit: contain; }
img.medal-img { border-radius: 0; object-fit: contain; }
.lg-dmg { display: flex; gap: 0; font-size: 0; }
.lg-dmg img { height: 15px; width: auto; filter: drop-shadow(0 1px 1px #000); }
.lg-dmg.ko img { height: 19px; }
.lg-dmg.hurt img { height: 13px; filter: drop-shadow(0 1px 1px #000) hue-rotate(-12deg) saturate(1.3); }
.lg-dmg.heal img { height: 15px; }
.rk-img { width: 44px; height: auto; flex: none; }
.rk-num { width: 44px; flex: none; text-align: center; }
.rk-mem { width: 44px; height: auto; flex: none; }


/* ---------- 原版最後版本（v4.x）的主介面：狀態列、跑馬燈、選單列、主頁、選單（assets/ui/v4/，主程式 SWF 的圖）---------- */
#header { height: 45px; background: #0e1a22 url(../assets/ui/v4/header.png) 0 0 / 100% 100% no-repeat; font-size: 10px; }
#header .hv { position: absolute; height: 13px; line-height: 13px; font-weight: bold; text-align: center; color: #fff; white-space: nowrap; overflow: hidden; text-shadow: 0 1px 1px #000; letter-spacing: 0; }
#header .h-name { left: 9px; top: 4.5px; width: 126px; text-align: left; font-size: 10.5px; }
#header .h-lv { left: 167px; top: 4.5px; width: 33px; }
#header .h-expfill { position: absolute; left: 239px; top: 5px; width: 80px; height: 11px; border-radius: 6px; overflow: hidden; }
#header .h-expfill i { display: block; height: 100%; background: url(../assets/ui/v4/exp.png) 0 0 / 80px 100% no-repeat; opacity: .85; }
#header .h-expl { left: 238px; top: 4.5px; width: 82px; font-size: 9px; }
#header .h-cp { left: 22px; top: 22.5px; width: 34px; }
#header .h-bp { left: 81px; top: 22.5px; width: 36px; }
#header .h-crys { left: 167px; top: 22.5px; width: 44px; }
#header .h-plus { position: absolute; left: 212px; top: 23px; width: 12px; height: 12px; padding: 0; border: none; background: url(../assets/ui/v4/plus.png) 0 0 / 100% 100% no-repeat; cursor: pointer; }
#header .h-mis { left: 263px; top: 22.5px; width: 57px; padding: 0; border: none; border-radius: 6px; background: none; font: inherit; font-weight: bold; color: #fff; cursor: pointer; }
#header .h-mis.done { background: linear-gradient(#f06a4a, #b8200e 60%, #8a1206); box-shadow: inset 0 0 0 1px #ffc0a0; animation: pulse 1.2s infinite; }
#header .h-mis.run { color: #9ad8ff; font-size: 9px; }
/* 跑馬燈在狀態列下面（台灣版 2016 的版面；以前在選單列上面）：畫面 #screen 從跑馬燈下面到選單列上面，高度跟以前一樣 */
#ticker { top: 45px; bottom: auto; height: 16px; background: linear-gradient(#0a1216, #16262c 50%, #0a1216); border-top: 1px solid #a07a30; border-bottom: 1px solid #a07a30; box-sizing: border-box; }
#screen { top: 61px; bottom: 60px; }
#ticker-text { top: 0; line-height: 14px; font-size: 11px; color: #fff4d8; }
#nav { height: 60px; background: #06121a url(../assets/ui/v4/stars_bottom.jpg) 50% 0 / 100% auto no-repeat; grid-template-columns: repeat(6, 1fr); padding: 1px 1px 0; box-sizing: border-box; }
.nav-btn { background: url(../assets/ui/v4/tile.png) 50% 50% / 100% 100% no-repeat; margin: 1px; overflow: visible; }
.nav-btn.on { background: url(../assets/ui/v4/tile_on.png) 50% 50% / 100% 100% no-repeat; filter: drop-shadow(0 0 4px rgba(150, 220, 255, .8)); }
.nav-btn:hover { background-image: url(../assets/ui/v4/tile_on.png); }
.nav-ic { position: absolute; left: 50%; top: 4px; height: 36px; max-width: 48px; object-fit: contain; transform: translateX(-50%); pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .6)); }
.nav-lb { position: absolute; left: -2px; right: -2px; bottom: 3px; font-size: 10px; line-height: 11px; font-weight: 900; color: #fff; text-align: center; white-space: nowrap; letter-spacing: -.3px; text-shadow: 0 0 2px #000, 0 0 2px #000, 0 1px 1px #000; pointer-events: none; }
.nav-btn[data-to="enhance"] .nav-lb { font-size: 9px; letter-spacing: -.6px; }
/* 選單列的顏色（選單「主頁外觀」）：原版是藍綠色；台灣版也有紅色的。方塊上疊一層「顏色」混合（保留明暗），圖示與字在上面不受影響 */
#stage[class*="navc-"] .nav-btn::before { content: ''; position: absolute; inset: 0; border-radius: 4px; mix-blend-mode: color; pointer-events: none; }
#stage.navc-red .nav-btn::before { background: #c01414; }
#stage.navc-gold .nav-btn::before { background: #d0a018; }
#stage.navc-green .nav-btn::before { background: #149448; }
#stage.navc-purple .nav-btn::before { background: #7a24c0; }
#stage.venus .nav-btn::before { display: none; }

/* 我的主頁（台灣版 2016「我的主頁」，設計稿 a1）：跑馬燈在狀態列下面；畫面＝舞台（金框）＋羊皮紙面板 148 高 */
/* 原版名牌與青色鈕的字是很粗的黑體：Android 內建的中文只有 Regular，所以自己帶 Noto Sans TC Black 的子集（只有用到的字，assets/fonts，SIL OFL 1.1） */
@font-face { font-family: 'LA Hei'; src: url(../assets/fonts/la-hei-black.woff) format('woff'); font-weight: 900; font-style: normal; font-display: block; }
@font-face { font-family: 'LA Hei'; src: url(../assets/fonts/la-hei-bold.woff) format('woff'); font-weight: 700; font-style: normal; font-display: swap; }
.scroll.home.tw { padding: 0; display: flex; flex-direction: column; background: #e8d6a8; overflow: hidden; }
.home.tw button { font: inherit; cursor: pointer; }
/* 舞台：金框 frame.png（1080×885，上 150／下 135／左右 100 九宮格，中間往下拉長；裡面透明）蓋在場景上 */
.tw-stage { position: relative; flex: 1 1 auto; min-height: 300px; }
.tw-scene { position: absolute; z-index: 1; left: 24px; right: 24px; top: 25px; bottom: 30px; overflow: hidden; background: url(../assets/ui/v4/board.jpg) 50% 100% / cover no-repeat; }
/* 台灣版的淡色背景（選單「主頁外觀」） */
.tw-scene.pale { background-image: url(../assets/ui/tw/pale.jpg); }
.tw-frame { position: absolute; inset: 0; z-index: 2; border-style: solid; border-width: 50px 33.33px 45px; border-image: url(../assets/ui/tw/frame.png) 150 100 135 / 50px 33.33px 45px stretch; pointer-events: none; }
/* 角色、靈獸、裝備特效：照原本 360×336 的舞台（特效的座標照這個大小），縮到金框裡 */
.hm-board { position: absolute; left: 50%; bottom: -6px; width: 360px; height: 336px; margin-left: -180px; overflow: visible; background: none; transform: scale(.9); transform-origin: 50% 100%; }
/* 角色：身體在舞台正中間（角色圖的身體在圖寬約 67% 的地方，所以整張圖往左放）；大型武器、鎧甲整個畫出來 */
.hm-board .av { position: absolute; left: 0; top: 64px; width: 244px; height: 233px; z-index: 1; clip-path: none; }
.hm-board .av svg { width: 100%; height: 100%; overflow: visible; }
.hm-board .bst { position: absolute; left: 256px; top: 168px; width: 92px; height: 92px; z-index: 2; animation: float 3s ease-in-out infinite; }
.hm-board .bst.anim-on { left: 232px; top: 112px; width: 128px; height: 168px; animation: none; }
.hm-board .bst > svg, .hm-board .bst > img { width: 100%; height: 100%; }
.hm-board .home-fx { clip-path: none; }
/* 「團體戰排行 N位」名牌（plate.png 420×165，紅底的字補掉了） */
/* 「團體戰排行」「位」：粗黑體、白字、深紅棕的邊；數字是一般的粗體數字，比較大 */
.tw-plate { position: absolute; z-index: 3; left: 50%; top: 0; width: 140px; height: 55px; margin-left: -70px; padding: 7px 0 0; border: none; background: url(../assets/ui/tw/plate.png) 0 0 / 100% 100% no-repeat; display: flex; align-items: baseline; justify-content: center; gap: 2px; color: #fff; font-family: 'LA Hei', var(--font); font-weight: 900; font-size: 13.5px; letter-spacing: .5px; text-shadow: -1px -1px 0 #3a0602, 1px -1px 0 #3a0602, -1px 1px 0 #3a0602, 1px 1px 0 #3a0602, 0 1.5px 2px rgba(0, 0, 0, .8); }
.tw-plate b { margin: 0 6px 0 9px; font: bold 18px/1 Arial, Roboto, sans-serif; letter-spacing: 0; text-shadow: 0 1px 2px rgba(60, 0, 0, .9); }
/* 舞台上的小圖示：禮物、信（任務）、SHOP（商店）、城堡（交換所 瑪麗的城） */
.tw-ic { position: absolute; z-index: 3; padding: 0; border: none; background: none; }
.tw-ic img { display: block; width: 100%; height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5)); }
.tw-ic:active { transform: translateY(1px); filter: brightness(1.15); }
/* 位置、大小照台灣版的原圖（1080 寬 ÷3）：禮物 (104, 443) 108 寬、信 (105, 536) 107 寬、SHOP (81, 837) 148 寬、城堡 (835, 809) 169 寬；舞台的上緣＝原圖 y 200、下緣＝1085 */
.tw-gift { left: 35px; top: 81px; width: 36px; }
.tw-letter { left: 35px; top: 112px; width: 36px; }
.tw-shop { left: 27px; bottom: 38px; width: 49px; }
.tw-castle { right: 25px; bottom: 32px; width: 56px; }
/* 禮物、信右下本來就畫了紅球：台灣版的數字寫在球上（0 也寫）；球心在圖的 (83, 60.5)、(82, 40.5)（÷3） */
.home.tw .tw-ball { left: 19.7px; top: 12.2px; right: auto; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 50%; border-color: #fff; background: radial-gradient(ellipse at 45% 35%, #f05a50, #b0100c 70%); font-size: 10px; line-height: 14px; text-align: center; }
.home.tw .tw-letter .tw-ball { left: 19.3px; top: 5.5px; }
/* 「被選為先發騎士！」（原圖 (104, 350)、352 寬）：團體戰的選拔騎士才有，點了到團體戰 */
.tw-starter { position: absolute; z-index: 3; left: 35px; top: 50px; width: 117px; padding: 0; border: none; background: none; }
.tw-starter img { display: block; width: 100%; height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.tw-starter:active { transform: translateY(1px); filter: brightness(1.1); }
/* 選單列「戰鬥」上面的 WARNING（幻獸、BOSS 出現時；原圖 109×84，上緣在選單列上面 17） */
.nav-warn { position: absolute; z-index: 4; left: 50%; top: -17px; width: 36px; margin-left: -18px; pointer-events: none; animation: navWarn 1s ease-in-out infinite alternate; }
@keyframes navWarn { from { transform: scale(1); } to { transform: scale(1.06); } }
/* 新手任務在左上角（禮物上面空著的地方）、活動徽章在信下面；排行榜、好友在右上 */
.hm-rookie { position: absolute; z-index: 3; left: 4px; top: 40px; width: 58px; height: 54px; padding: 0; border: none; background: none; cursor: pointer; }
.hm-rookie img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.hm-rookie span { position: absolute; left: 3px; bottom: 4px; font-size: 10.5px; line-height: 1.05; font-weight: 900; color: #ff4aa0; text-align: left; transform: rotate(-8deg); text-shadow: -1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff, 0 0 3px #fff; }
.home.tw .hm-rookie { left: 26px; top: 28px; width: 50px; height: 47px; }
.home.tw .hm-badges { left: 24px; top: 138px; max-width: 60px; flex-direction: column; gap: 2px 0; }
.home.tw .hm-rank { right: 26px; top: 30px; width: 46px; }
.home.tw .hm-rank img { width: 40px; height: 40px; }
.home.tw .hm-rank.hm-friend { top: 88px; }
/* 金框下緣：能力值｜活動進行中！｜騎士團（圖是金框上的，這裡是點的範圍） */
.tw-hit { position: absolute; z-index: 3; bottom: 2px; height: 30px; padding: 0; border: none; background: none; }
.tw-hit:active { background: rgba(255, 255, 255, .15); }
.tw-stats { left: 10px; width: 100px; }
.tw-stats .hm-num { left: -4px; right: auto; top: 0; }
.tw-ev { left: 50%; width: 104px; margin-left: -52px; }
/* 沒有進行中的活動：「活動進行中！」變灰（還是點得開公告的活動） */
.tw-ev.off::before { content: ''; position: absolute; inset: 2px 3px; border-radius: 4px; background: rgba(70, 60, 40, .55); }
.tw-ev .hm-num { top: -6px; right: 0; }
.tw-guild { right: 11px; width: 100px; }
.tw-guild .hm-num { top: -4px; right: -2px; }
/* 羊皮紙面板（panel.jpg 1080×443）：個人資料＋▶＋三顆青色鈕 */
.tw-panel { position: relative; flex: none; height: 148px; background: url(../assets/ui/tw/panel.jpg) 0 0 / 100% 100% no-repeat; }
/* 個人資料：原版是一般粗細的黑體、白字、細的深色邊；ID 與數值是粗體 */
.tw-info { position: absolute; left: 38px; top: 16px; width: 140px; margin: 0; padding: 0; list-style: none; color: #fff; font-size: 11.5px; font-weight: normal; line-height: 16.5px; white-space: nowrap; text-shadow: 0 0 1.5px #2a1806, 0 0 1px #2a1806, 0 1px 1px rgba(30, 16, 0, .9); }
.tw-info li { position: relative; height: 16.5px; overflow: hidden; text-overflow: ellipsis; }
.tw-info li:nth-child(2), .tw-info li span { font-weight: bold; }
.tw-info li span { position: absolute; left: 60px; }
.tw-next { position: absolute; left: 164px; top: 54px; width: 32px; height: 32px; padding: 0; border: none; border-radius: 50%; background: none; }
.tw-next:active { background: rgba(255, 255, 255, .25); }
.tw-teal { position: absolute; left: 218px; width: 120px; height: 34px; padding: 0 0 1px; border: none; background: none; }
/* 青色鈕的字：粗黑體、上淡黃下金橘的漸層、深棕色的邊（漸層要用 background-clip，邊改用 drop-shadow，text-shadow 會蓋住漸層） */
.tw-tl { display: inline-block; font-family: 'LA Hei', var(--font); font-weight: 900; font-size: 16.5px; line-height: 1.1; letter-spacing: 1px; background: linear-gradient(#fffbd4 12%, #f8dc56 52%, #e19c1c 88%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(1px 0 0 #2a1600) drop-shadow(-1px 0 0 #2a1600) drop-shadow(0 1px 0 #2a1600) drop-shadow(0 -1px 0 #2a1600) drop-shadow(0 1.5px 1px rgba(0, 0, 0, .55)); }
.tw-teal:active { filter: brightness(1.25); }
.tw-teal.t1 { top: 15px; }
.tw-teal.t2 { top: 57.5px; }
.tw-teal.t3 { top: 100px; }
.tw-teal .hm-num { top: -6px; right: -2px; }
/* 第二頁：自我介紹（蓋住個人資料的小圖示） */
.tw-intro { position: absolute; left: 14px; top: 12px; width: 146px; height: 124px; padding: 5px 7px; box-sizing: border-box; border-radius: 6px; background: rgba(250, 238, 205, .96); border: 1px solid rgba(140, 100, 30, .6); color: #4a2c08; font-size: 11px; line-height: 15px; overflow: hidden; word-break: break-all; cursor: pointer; }
.tw-intro b { display: block; margin-bottom: 2px; color: #8a4a08; font-size: 11.5px; }
.tw-intro .hint { color: #8a7050; }
/* 選單列的團體戰：下一場的倒數（原版「次の試合まで」） */
.nav-next { position: absolute; left: 50%; top: -10px; z-index: 3; transform: translateX(-50%); padding: 1px 6px; border-radius: 8px; border: 1px solid #c8f0a0; background: linear-gradient(#5ac85a, #1e7a2a); color: #fff; font-size: 9px; line-height: 1.1; font-weight: 900; text-align: center; white-space: nowrap; text-shadow: 0 1px 1px #000; pointer-events: none; }
.nav-next b { display: block; font-size: 11px; }
.hm-btn, .mn-btn { position: relative; height: 31px; border: none; padding: 0 2px; background: url(../assets/ui/v4/btn.png) 0 0 / 100% 100% no-repeat; color: #fff; font: inherit; font-size: 13px; font-weight: 900; letter-spacing: 1px; text-shadow: 0 0 3px #001a40, 0 1px 1px #000; cursor: pointer; }
.hm-btn:active, .mn-btn:active, .hm-btn:hover, .mn-btn:hover { background-image: url(../assets/ui/v4/btn_on.png); }
.hm-num { position: absolute; top: -5px; right: -3px; min-width: 18px; height: 16px; padding: 0 4px; border-radius: 9px; background: radial-gradient(ellipse at 50% 30%, #e85048, #a8100c 70%); border: 1.2px solid #f6d6cc; color: #fff; font-size: 10px; line-height: 13px; letter-spacing: 0; }
.hm-num[hidden] { display: none; }

/* 有分頁的視窗（公告）：原版三分頁的大理石視窗 dialog628tab1～3（616×628，頁籤在左／中／右），
   沒選到的頁籤是從 dialog628tab1 切出來調暗的 tab_off.png（196×82，頁籤本體在 x 8–188） */
.modal.tabbed { width: 100%; height: 357px; flex: none; border: 0; border-image: none; padding: 0; background: url(../assets/ui/v4/tabdlg1.png) 0 0 / 100% 100% no-repeat; }
.modal.tabbed.tab2 { background-image: url(../assets/ui/v4/tabdlg2.png); }
.modal.tabbed.tab3 { background-image: url(../assets/ui/v4/tabdlg3.png); }
.modal.tabbed .body { position: absolute; left: 4.2%; right: 4.2%; top: 15.2%; bottom: 3.6%; padding: 0 2px; }
.modal.tabbed .close { top: -40px; right: -8px; }
.mtabs { position: absolute; left: 0; right: 0; top: 0; height: 13.06%; z-index: 2; }
.mtab { position: absolute; top: 0; width: 31.82%; height: 100%; padding: 6px 0 0; border: none; background: url(../assets/ui/v4/tab_off.png) 0 0 / 100% 100% no-repeat; font: inherit; cursor: pointer; }
.mtab.t1 { left: 0; } .mtab.t2 { left: 33.28%; } .mtab.t3 { left: 67.86%; }
.mtab.on { background: none; cursor: default; }
.mtab span { display: inline-block; font: 900 16px/1 serif; letter-spacing: 3px; background: linear-gradient(#d8d0b8, #a89878 55%, #6a5a40); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 1px 1px #000); }
.mtab.on span { background-image: linear-gradient(#fff6c8, #f0c040 55%, #b07010); filter: drop-shadow(0 1px 1px #3a2000) drop-shadow(0 0 2px #3a2000); }
.mtab:not(.on):hover span { background-image: linear-gradient(#f6eed0, #d8c088 55%, #8a6a30); }
.mtab-new { position: absolute; right: 16%; top: 22%; width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ff9a8a, #d01a10 70%); border: 1px solid #ffe0d0; box-shadow: 0 0 3px rgba(0, 0, 0, .5); }
.nt-item { padding: 7px 4px 8px; border-bottom: 1px dotted #9a7a40; }
.nt-item:last-child { border-bottom: none; }
.nt-head { display: flex; align-items: center; gap: 6px; }
.nt-head b { color: #b0601a; font-size: 13.5px; }
.nt-date { margin-left: auto; font-size: 11px; color: var(--mb-hint); white-space: nowrap; }
.nt-item.live .nt-date { color: #c8321e; font-weight: bold; animation: pulse 1.2s infinite; }
.nt-new { height: 14px; width: auto; flex: none; }
.nt-item ul { margin: 3px 0 0; padding-left: 18px; font-size: 12.5px; line-height: 1.55; }
.nt-item .btn { margin: 4px 0 0 18px; }
/* 能力值：金幣、獎牌、武具件數（原本在主頁按鈕下面） */
.st-have { padding: 2px 2px 5px; border-bottom: 1px dotted var(--mb-line); font-size: 13px; }
.st-have .ic-sm { vertical-align: -3px; }

#screen.framed > .scroll.menu-page { padding: 12px 14px 14px; }
.mn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; }
.mn-btn { height: 46px; font-size: 14px; }
.mn-foot { margin-top: 14px; text-align: center; color: #9ab8c0; font-size: 11px; text-shadow: 0 1px 1px #000; }
/* 女神的祝福時間（討伐勝率 100%）：原版的狀態列、選單列換成金色（venusBlessingTimeHeader、footerVenusBackground），圖示換 *VenusButton */
#stage.venus #header { background-image: url(../assets/ui/v4/header_venus.png); }
#stage.venus .nav-btn { background-image: url(../assets/ui/v4/tile_venus.png); }
#stage.venus .nav-btn.on, #stage.venus .nav-btn:hover { background-image: url(../assets/ui/v4/tile_venus_on.png); filter: drop-shadow(0 0 4px rgba(255, 220, 120, .9)); }
/* 大理石（視窗、.frame）上：原本給深色皮革用的淡金、淡綠、淡紅字改成深一點的顏色，對比才夠 */
.modal .lu-h b, .modal .eq-role, .frame:not(.dark) .eq-room b, .frame:not(.dark) .ls-zone b, .modal .ss-rank b, .modal .ss-cls b, .modal .ex-have b { color: #b0601a; }
.modal .sh-have, .modal .lu-got { color: #2a8a3a; }
/* 商店・交換所的限購（每日／每週／每月／一次） */
.modal .lim { color: #8a5a10; font-weight: 700; }
.modal .lim.out { color: #b03020; }
.modal .eq-role.r-main { color: #c8321e; }
.modal .eq-role.r-sub, .modal .eq-role.r-auto { color: #1b6a7e; }
.modal .ss-cls span { color: #6b6355; }
.frame:not(.dark) .eq-room { background: rgba(27, 106, 126, .1); border: 1px solid rgba(27, 106, 126, .22); }
.frame:not(.dark) .ls-zone .z-up, .frame:not(.dark) .ls-line.up { color: #1f8a30; }
.frame:not(.dark) .ls-zone .z-down, .frame:not(.dark) .ls-line.down { color: #c8321e; }
.frame:not(.dark) .ls-line { border-top-color: var(--mb-line); }
.frame:not(.dark) .ls-ladder span { background: rgba(27, 106, 126, .12); color: #5a6a6a; }
.frame:not(.dark) .ls-ladder span.past { color: #2e2a24; }
.frame:not(.dark) .ls-ladder i { color: #8a7a60; }
.frame:not(.dark) .ls-days span { background: rgba(27, 106, 126, .15); color: #4a5a5a; }
.frame:not(.dark) .ls-days span.done { background: #8a6a2a; color: #fff4d0; }
.frame:not(.dark) .ls-days small { color: #6b6355; }
.modal .lu-it { border-color: var(--mb-line); background: rgba(255, 255, 255, .45); color: var(--mb-tx); }
.frame:not(.dark) .lg-vsbar b.l { color: #1b5ea8; text-shadow: none; }
.frame:not(.dark) .lg-vsbar b.r { color: #c8321e; text-shadow: none; }
/* 強化：基礎武具與素材之間的金色 ✕（原版 evolutionX，Gamerch 的強化・覚醒融合截圖） */
.eq-x { position: relative; z-index: 2; width: 46px; height: 34px; margin: -20px 0 -16px 22px; background: url(../assets/ui/v4/x.png) center / contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45)); pointer-events: none; }
/* 騎士團：宣言（騎士團裡）、公告（騎士團詳細）、公告與宣言的編輯 */
.ng-decl { margin: 2px 0 6px; padding: 5px 8px 6px; border: 1px solid #b8913c; border-radius: 6px; background: rgba(255, 248, 225, .65); }
.ng-text { margin-top: 2px; white-space: pre-wrap; word-break: break-word; font-size: 12.5px; line-height: 1.5; color: var(--mb-tx); }
.ng-text.empty { color: var(--mb-hint); font-size: 12px; }
.ng-ta { display: block; width: 100%; box-sizing: border-box; margin: 2px 0 8px; padding: 4px 6px; font: inherit; font-size: 12.5px; line-height: 1.45; border-radius: 4px; border: 1px solid #9a6a30; resize: vertical; }
.ng-g { cursor: pointer; }
.ng-lu { margin: 2px 0 4px; gap: 6px; }
/* 選拔騎士指定（原版的ラインナップ選択） */
.lu-head { margin: 8px 0 3px; padding: 2px 0; text-align: center; font-weight: 900; letter-spacing: 4px; color: #fff3c0; text-shadow: 0 1px 1px #000; background: linear-gradient(90deg, transparent, #8a2a1a 18%, #8a2a1a 82%, transparent); }
.lu-head.sub { background: linear-gradient(90deg, transparent, #1f4f8a 18%, #1f4f8a 82%, transparent); }
.lu-slot { display: flex; align-items: center; gap: 6px; margin: 3px 0; padding: 4px 6px; border: 1px solid #c8a050; border-radius: 6px; background: rgba(255, 250, 235, .75); }
.lu-slot.empty { border-style: dashed; background: rgba(255, 250, 235, .35); }
.lu-slot .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lu-eff { margin: 4px 0 2px; font-size: 12px; color: var(--mb-tx); }
/* 下載網址的文字可以長按全選複製（按鈕是「去更新」） */
.nv-url { -webkit-user-select: all; user-select: all; }
/* 騎士團的名牌（原版 guildNameBox）＋右邊團長的改名圖示（原版的圓形銅框鈕＋筆） */
.ng-head { display: flex; align-items: center; justify-content: center; gap: 2px; margin: 0 0 4px; }
.ng-name { flex: 0 1 280px; height: 50px; padding: 0 38px; display: flex; align-items: center; justify-content: center; background: url(../assets/ui/v4/guild_name.png) 50% 50% / 100% 100% no-repeat; }
.ng-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 900; letter-spacing: 1px; color: #fff; text-shadow: 0 0 3px #001a30, 0 1px 1px #000; }
.ng-rename-ic { flex: none; width: 36px; height: 36px; padding: 0; border: none; background: url(../assets/ui/v4/ic_rename.png) 50% 50% / 100% 100% no-repeat; cursor: pointer; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .5)); }
.ng-rename-ic:active { transform: translateY(1px); filter: brightness(1.15); }
/* 主頁右上：排行榜 */
.hm-rank { position: absolute; z-index: 3; right: 6px; top: 40px; width: 50px; padding: 0; border: none; background: none; cursor: pointer; text-align: center; }
.hm-rank img { width: 46px; height: 46px; display: block; margin: 0 auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.hm-rank span { display: block; margin-top: -4px; font-size: 11px; font-weight: 900; color: #fff; letter-spacing: 1px; text-shadow: -1px -1px 0 #102040, 1px -1px 0 #102040, -1px 1px 0 #102040, 1px 1px 0 #102040; }
.hm-rank:active { transform: translateY(1px); filter: brightness(1.15); }
.fr-reqs { margin-bottom: 8px; padding: 6px 8px; border-radius: 6px; background: rgba(232, 80, 72, .12); border: 1px solid rgba(168, 16, 12, .35); }
.fr-reqs > b { color: #a8100c; }
/* 好友：排行榜下面（同一款圓鈕＋原版「お気に入り」的星） */
.hm-rank.hm-friend { top: 104px; }
.hm-friend .hm-num { top: -2px; right: -2px; }
/* 聊天視窗：羊皮紙底（原版 chatBackground）的訊息區＋輸入列 */
.ch-wrap { display: flex; flex-direction: column; gap: 6px; }
/* 原版的羊皮紙（chatBackground）用九宮格貼：金框與四角的花飾留在邊上，中間鋪羊皮紙；訊息區在裡面捲動，鋪一層淺色讓字清楚 */
.ch-frame { height: 236px; box-sizing: border-box; border: 16px solid transparent; border-image: url(../assets/ui/v4/chat_bg.png) 40 fill / 16px stretch; }
.ch-list { height: 100%; overflow-y: auto; padding: 4px 6px; border-radius: 3px; background: rgba(255, 246, 226, .62); }
.ch-msg { margin: 0 0 5px; font-size: 12.5px; line-height: 1.45; color: #3a2a18; word-break: break-word; -webkit-user-select: text; user-select: text; }
.ch-msg b { margin-right: 4px; color: #1f5a9a; }
.ch-msg.me b { color: #b0301a; }
.ch-msg i { margin-left: 6px; font-style: normal; font-size: 10px; color: #8a7458; }
.ch-empty { padding: 30px 0; text-align: center; color: #7a6448; font-size: 12px; }
.ch-input { display: flex; gap: 6px; }
.ch-input input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 5px 8px; border-radius: 4px; border: 1px solid #9a6a30; }
.ch-dmhead { display: flex; align-items: center; gap: 8px; }
.ch-th { cursor: pointer; }
.ch-unread { flex: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #d8402a; color: #fff; font-size: 11px; line-height: 20px; text-align: center; }
/* 騎士團日誌 */
.gl-row .main { display: block; font-size: 12.5px; line-height: 1.5; }
.gl-row .hint { margin-right: 6px; }
/* 主頁左邊：進行中的限時活動（原版的活動圖示） */
.hm-ev { position: relative; width: 52px; padding: 0; border: none; background: none; cursor: pointer; text-align: center; }
.hm-ev img { width: 50px; height: 50px; display: block; margin: 0 auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.hm-ev span { display: block; margin-top: -6px; font-size: 10px; font-weight: 900; color: #fff; white-space: nowrap; text-shadow: -1px -1px 0 #3a0a00, 1px -1px 0 #3a0a00, -1px 1px 0 #3a0a00, 1px 1px 0 #3a0a00; }
.hm-ev .hm-num { position: absolute; top: 0; right: 0; }
.hm-ev:active { transform: translateY(1px); filter: brightness(1.15); }
/* 限時活動的視窗 */
.ev-head { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.ev-head img { flex: none; width: 56px; height: 56px; }
.ev-head > div { display: flex; flex-direction: column; gap: 1px; }
.ev-head b { font-size: 15px; }
.ev-kind { align-self: flex-start; background: #b0601a; }
.ev-body { margin: 2px 0 6px; white-space: pre-wrap; font-size: 12.5px; line-height: 1.5; }
.ev-now { margin: 2px 0 4px; font-size: 13px; }
.ev-st .main { display: flex; flex-direction: column; gap: 2px; }
.ev-st.got { opacity: .7; }
.ev-bar { width: 100%; margin-top: 2px; }
.ev-tabs { flex-wrap: wrap; }
/* 靈獸任務的獎勵機率 */
.ms-odds { margin-left: 4px; color: #1f5a9a; text-decoration: underline; cursor: pointer; }
table.odds { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.odds td { padding: 3px 6px; border-bottom: 1px solid var(--mb-line); }
table.odds td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
/* 扭蛋：一件一件抽出來（第幾件、已經抽出來的一排、卡背的預告、翻開時的閃光與震動） */
.ga-count { position: absolute; z-index: 4; left: 12px; top: 14px; padding: 2px 10px; border-radius: 10px; background: rgba(0, 0, 0, .55); border: 1px solid #c8a050; font-size: 12px; font-weight: 900; color: #ffe8b0; }
.ga-strip { position: absolute; z-index: 4; left: 8px; right: 8px; bottom: 96px; display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; pointer-events: none; }
.ga-sc { width: 26px; height: 26px; border-radius: 4px; background: rgba(0, 0, 0, .5); border: 1px solid #6a5a3a; overflow: hidden; animation: gaPop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.ga-sc > * { width: 100%; height: 100%; }
.ga-sc.t2, .ga-sc.t3 { border-color: #e8b440; box-shadow: 0 0 4px rgba(255, 200, 80, .8); }
.ga-sc.t4, .ga-sc.t5, .ga-sc.t6 { border-color: #ff9aff; box-shadow: 0 0 6px rgba(255, 150, 255, .9); }
.ga-single-back { display: flex; align-items: center; justify-content: center; }
.ga-single-back .ga-aura { position: absolute; inset: -30px; z-index: -1; border-radius: 50%; pointer-events: none; opacity: 0; }
.ga-single-back.tb2 .ga-aura { opacity: 1; background: radial-gradient(circle, rgba(255, 210, 110, .55), transparent 65%); animation: gaAura 1s ease-in-out infinite alternate; }
.ga-single-back.tb3 .ga-aura, .ga-single-back.tb4 .ga-aura { opacity: 1; background: radial-gradient(circle, rgba(255, 230, 150, .8), rgba(255, 150, 60, .25) 45%, transparent 68%); animation: gaAura .6s ease-in-out infinite alternate; }
.ga-single-back.tb5 .ga-aura { opacity: 1; background: radial-gradient(circle, rgba(200, 230, 255, .9), rgba(120, 160, 255, .35) 45%, transparent 70%); animation: gaAura .35s ease-in-out infinite alternate; }
.ga-single-back.tb6 .ga-aura { opacity: 1; background: conic-gradient(from 0deg, #ff5a8a, #ffd25a, #8aff5a, #5ad8ff, #b45aff, #ff5a8a); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); mask: radial-gradient(circle, #000 30%, transparent 70%); animation: gaSpin 1.2s linear infinite, gaAura .3s ease-in-out infinite alternate; }
@keyframes gaAura { from { transform: scale(.9); filter: brightness(.9); } to { transform: scale(1.08); filter: brightness(1.25); } }
.ga-single-back.tb4 { animation: gaPop .45s cubic-bezier(.2, 1.4, .4, 1) both, gaShake .1s .45s linear 8; }
.ga-single-back.tb5, .ga-single-back.tb6 { animation: gaPop .45s cubic-bezier(.2, 1.4, .4, 1) both, gaShake .08s .4s linear 14; }
.gacha-anim.shake .ga-stage { animation: gaQuake .09s linear infinite; }
@keyframes gaQuake { 25% { transform: translate(-3px, 2px); } 50% { transform: translate(2px, -2px); } 75% { transform: translate(3px, 1px); } }
.ga-flash.pulse { animation: gaFlash .5s ease-out forwards; }
.ga-flash.pulse2 { animation: gaFlash 1s ease-out forwards; }
.fx-ov.ga-bolt.pre { opacity: .55; }
/* SSR～LEGEND：原版 RARE 背景裡的「GOD RARE」字母遮掉（字在舞台 y 395～428 一條），GOD 以上才留著 */
.ga-rare.back.notext { -webkit-mask: linear-gradient(#000 0 386px, transparent 393px 430px, #000 437px); mask: linear-gradient(#000 0 386px, transparent 393px 430px, #000 437px); }
table.odds tr.ms-bst td { color: #b0301a; font-weight: 900; }
/* 推薦好友 */
.fr-sugh { margin-bottom: 4px; gap: 6px; }
.fr-sugh .hint { flex: 1; }
/* 序號兌換 */
.cd-box { text-align: center; }
.cd-box input { width: 100%; box-sizing: border-box; padding: 8px; font-size: 16px; letter-spacing: 2px; text-align: center; text-transform: uppercase; border: 1px solid #9a7a40; border-radius: 6px; }
.cd-ok { display: block; margin: 4px 0 6px; font-size: 18px; color: var(--good); }
/* ---------- 常駐活動（怪物祭、抽箱祭，js/net-fest.js）：主頁跳出的海報視窗 ---------- */
.fest-ov { position: absolute; inset: 0; z-index: 45; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .62); opacity: 0; transition: opacity .25s; }
.fest-ov.in { opacity: 1; }
.fest-ov.out { opacity: 0; pointer-events: none; }
.fest-pop { position: relative; width: 316px; padding: 8px 8px 34px; border-radius: 8px; background: linear-gradient(#2a1c10, #120a04); box-shadow: 0 0 0 2px #c89a3a, 0 0 0 4px #4a3010, 0 8px 30px rgba(0, 0, 0, .8); transform: scale(.92); transition: transform .25s cubic-bezier(.2, 1.4, .4, 1); }
.fest-ov.in .fest-pop { transform: none; }
.fest-x { position: absolute; right: -12px; top: -12px; z-index: 2; width: 34px; height: 34px; border: none; padding: 0; background: url(../assets/ui/v4/x.png) 50% 50% / 100% 100% no-repeat; cursor: pointer; }
.fest-img { position: relative; width: 300px; height: 400px; overflow: hidden; border-radius: 4px; background: #000; }
.fest-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fest-fb { display: none; }
.fest-img.none img { display: none; }
.fest-img.none .fest-fb { display: flex; position: absolute; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 6px; background: radial-gradient(circle at 50% 40%, #6a1a10, #1a0604 70%); }
.fest-fb b { font: 900 52px/1 "Noto Serif TC", serif; letter-spacing: 4px; color: #ffe9a0; text-shadow: 0 0 2px #000, 0 2px 0 #7a3a08, 0 0 18px #ff6a20; }
.fest-fb span { font: 900 18px/1 "Noto Serif TC", serif; color: #fff; letter-spacing: 3px; text-shadow: 0 1px 2px #000; }
.fest-info { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; color: #f0e6cc; font-size: 12px; line-height: 1.45; text-align: center; }
.fest-info > b { font-size: 15px; color: #ffd86a; letter-spacing: 1px; text-shadow: 0 1px 2px #000; }
.fest-info span b { color: #9aff8a; }
.fest-info small { color: #c8b898; font-size: 11px; }
.fest-hide { position: absolute; left: 10px; bottom: 9px; display: flex; align-items: center; gap: 5px; color: #e8dcc0; font-size: 12px; cursor: pointer; }
.fest-hide input { width: 16px; height: 16px; margin: 0; accent-color: #c8402a; }
.fest-badge { background: linear-gradient(#ff7a3a, #c8301a) !important; }
.fest-note { margin: 4px 0; padding: 3px 8px; border-radius: 4px; background: linear-gradient(90deg, #c8301a, #ff8a3a); color: #fff; font-size: 12px; font-weight: 900; text-align: center; text-shadow: 0 1px 1px #000; }
.fest-hunt { position: absolute; left: 6px; top: 34px; z-index: 41; padding: 2px 8px; border-radius: 10px; background: linear-gradient(90deg, rgba(160, 30, 10, .9), rgba(230, 110, 30, .85)); color: #fff; font-size: 10.5px; text-shadow: 0 1px 1px #000; box-shadow: 0 0 6px rgba(255, 120, 40, .7); }
.fest-hunt b { margin-right: 5px; color: #ffe48a; }
/* 主頁左上角的活動徽章（常駐活動、限時活動；js/net-fest.js 的 homeRow）：照開始的時間從左到右，放不下換行 */
.hm-badges { position: absolute; z-index: 4; left: 4px; top: 40px; max-width: 296px; display: flex; flex-wrap: wrap; gap: 0 3px; }
.hm-badges[hidden] { display: none; }
.hb { position: relative; width: 56px; padding: 0; border: none; background: none; cursor: pointer; text-align: center; }
.hb-img { position: relative; display: block; width: 54px; height: 54px; margin: 0 auto; }
.hb-img > img { width: 100%; height: 100%; display: block; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.hb-fb { display: none; }
.hb-img.nb > img { display: none; }
.hb-img.nb .hb-fb { position: absolute; inset: 3px; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: radial-gradient(circle, #7a2a10, #2a0804 75%); box-shadow: 0 0 0 2px #e8c060, 0 0 0 3px #4a2a04, 0 1px 3px rgba(0, 0, 0, .7); font-style: normal; }
.hb-fb img { width: 34px; height: 34px; margin-top: -2px; }
.hb-fb b { font-size: 10px; font-weight: 900; color: #ffe9a0; line-height: 1; text-shadow: 0 1px 1px #000; }
.hb-t { display: block; margin-top: 0; font-size: 9.5px; font-weight: 900; color: #fff; white-space: nowrap; text-shadow: -1px -1px 0 #3a0a00, 1px -1px 0 #3a0a00, -1px 1px 0 #3a0a00, 1px 1px 0 #3a0a00; }
.hb .hm-num { position: absolute; top: -2px; right: -2px; }
.hb:active { transform: translateY(1px); filter: brightness(1.15); }
/* 有徽章時新手任務往下移 */
.hm-badges:not([hidden]) ~ .hm-rookie { top: 112px; }
/* 限時活動的視窗：上面一小塊是獎勵，下面是主題海報（活動名稱疊在海報下面的金框裡） */
.ev-top { margin-bottom: 6px; }
.ev-top .ev-now { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.ev-rows { max-height: 108px; overflow-y: auto; }
.ev-rows .list-row { padding-top: 4px; padding-bottom: 4px; }
.ev-poster { position: relative; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 4px; background: radial-gradient(circle at 50% 35%, #6a2a10, #1a0604 75%); box-shadow: 0 0 0 1px #c89a3a; }
.ev-poster > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.ev-poster.none > img { display: none; }
.ev-ptitle { position: absolute; left: 6%; right: 6%; bottom: 7.6%; text-align: center; font: 900 clamp(18px, 7.4vw, 27px)/1.15 "Noto Serif TC", "Noto Serif CJK TC", serif; letter-spacing: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(#fffbe0, #ffe58a 30%, #f4b02a 52%, #b86408 58%, #ffd86a 74%, #fff6c0 92%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 1px #2a0400) drop-shadow(0 0 1px #2a0400) drop-shadow(0 0 6px rgba(255, 140, 40, .8)); }
.ev-per { margin-top: 3px; line-height: 1.35; }
.ev-poster.none .ev-ptitle { bottom: 44%; }

/* ---------- 意見回饋（選單「意見回饋」） ---------- */
.fb-box { font-size: 13px; }
.fb-box .hint { margin: 2px 0 6px; }
.fb-l { margin: 8px 0 4px; font-weight: 900; color: #7a3a0a; display: flex; justify-content: space-between; align-items: baseline; }
.fb-cnt { font-weight: normal; font-size: 11px; color: #8a7a60; }
.fb-cats { display: flex; flex-wrap: wrap; gap: 5px; }
.fb-cat { padding: 4px 9px; border-radius: 14px; border: 1.5px solid #b89a60; background: linear-gradient(#fffaf0, #efe2c4); color: #5a3a10; font-size: 12px; font-weight: bold; cursor: pointer; }
.fb-cat.on { border-color: #a8100c; background: linear-gradient(#e85048, #a8100c); color: #fff; box-shadow: 0 1px 3px rgba(120, 10, 0, .4); }
.fb-box textarea { width: 100%; box-sizing: border-box; padding: 7px 8px; font-size: 14px; line-height: 1.5; border: 1px solid #9a7a40; border-radius: 6px; resize: vertical; background: #fffdf6; color: #2a1a08; }
.fb-imgs { display: flex; gap: 14px; flex-wrap: wrap; }
.fb-imgs label { display: inline-flex; align-items: center; gap: 4px; font-weight: bold; color: #4a3010; }
.fb-go { display: flex; gap: 8px; justify-content: center; margin: 10px 0 4px; }
.fb-go .btn { flex: 1; max-width: 150px; }
.fb-go .btn[disabled] { filter: grayscale(1); opacity: .55; }
.fb-how { text-align: center; }
.fb-addr { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.fb-done { text-align: center; line-height: 1.6; }
.fb-done > b { display: block; margin: 6px 0; font-size: 16px; color: #a8100c; }
/* 好友名單、推薦、申請：每一列前面是那位騎士的紙娃娃（半身），點了打開騎士資料 */
.fr-av { padding: 0; border: 1px solid rgba(154, 106, 16, .55); border-radius: 6px; background: radial-gradient(ellipse at 50% 35%, #fff6e0, #e6cfa0); cursor: pointer; overflow: hidden; margin-right: 6px; }
.fr-av:active { filter: brightness(1.1); }
/* 騎士資料：原版的展示台（avatarBoard）上站著紙娃娃（外型＋主武器、主鎧甲），左下是主靈獸 */
.fr-prof { display: flex; flex-direction: column; gap: 5px; }
.fr-pboard { position: relative; height: 184px; }
.fr-pboard .av-fig { width: 172px; position: relative; z-index: 2; }
.fr-pbeast { position: absolute; z-index: 1; left: 8px; bottom: 6px; width: 78px; height: 78px; }
.fr-pname { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 16px; }
.fr-pchip { background: #2a9a4a; font-size: 11px; padding: 1px 5px; }
.fr-pchip.req { background: #c0302a; }
.fr-pinfo { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, .35); border: 1px solid var(--mb-line); font-size: 12.5px; }
.fr-pinfo .ic-job { height: 16px; vertical-align: -3px; }
.fr-pinfo .on { color: var(--good); }
.fr-peqs { display: flex; flex-direction: column; gap: 2px; padding: 4px 8px; border-radius: 6px; background: rgba(60, 36, 16, .08); font-size: 12.5px; }
.fr-peq { display: flex; align-items: center; gap: 5px; min-width: 0; }
.fr-peq b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-pk { flex: none; width: 34px; color: #7a5a3a; font-size: 11px; font-weight: bold; }
.fr-pbtn { gap: 6px; flex-wrap: wrap; }
/* 禮物箱：一次送好幾種的禮物（主控台發放、序號、限時活動），圖示右下角是種類數 */
.rw-many { position: absolute; right: -4px; bottom: -3px; padding: 0 3px; border-radius: 6px; background: #c0302a; color: #fff; font: normal 900 9px/13px inherit; font-style: normal; box-shadow: 0 0 0 1px #fff; pointer-events: none; }
/* 申請騎士團：我的申請（審核狀態）、列表的團長與公告、騎士團詳細的團長與團員 */
.ng-apps { margin: 0 0 8px; padding: 6px 8px; border: 1px dashed #9a6a30; border-radius: 6px; background: rgba(255, 240, 200, .35); }
.ng-apps > b { font-size: 12.5px; }
.ng-myapp { cursor: pointer; }
.ng-myapp.no .main > b { color: #6a5a48; }
.chip.ng-st { font-size: 10.5px; padding: 0 5px; vertical-align: 1px; }
.chip.ng-st.wait { background: #d07a10; }
.chip.ng-st.no { background: #8a7a6a; }
.ng-intro { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--mb-tx); }
.ng-intro.empty { color: var(--mb-hint); }
.ng-mystat { margin: 0 0 6px; padding: 5px 8px; border-radius: 6px; font-size: 12px; background: rgba(208, 122, 16, .12); border: 1px solid rgba(208, 122, 16, .45); }
.ng-mystat.no { background: rgba(120, 104, 88, .12); border-color: rgba(120, 104, 88, .45); }
.ng-lead { display: flex; align-items: center; gap: 6px; }
.ng-mems { max-height: 210px; overflow-y: auto; }
.ng-mem .main b .chip { font-size: 10px; }
.ng-mem .ic-job { width: 13px; height: 13px; vertical-align: -2px; }
.lg-join-app.no { border-color: #8a7a6a; background: rgba(120, 104, 88, .1); }
.lg-join-app small { color: var(--mb-hint); }
.ng-lead .fr-av { flex: none; width: 52px; height: 52px; margin: 0; }
.ng-lead .fr-av svg { width: 100%; height: 100%; display: block; }

/* 台灣版的字（使用者：其他畫面的字體也照原版）：標題、按鈕、分頁、選單列、選單的按鈕用粗黑體（LA Hei 700）；內文照舊是一般的黑體 */
.btn, .modal .mtitle, .page-title, .mtab span, .nav-lb, .mn-btn, .hm-btn, .gbtn b, .page-close, .hm-rank span { font-family: var(--font-ui); font-weight: 700; }
/* 選單「主頁外觀」：背景（縮圖）與選單列的顏色 */
.bg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 6px; max-height: 300px; overflow-y: auto; }
.bg-opt { position: relative; padding: 0; border: 2px solid rgba(120, 90, 40, .5); border-radius: 6px; background: #1a1410; cursor: pointer; overflow: hidden; }
.bg-opt.on { border-color: #f0b830; box-shadow: 0 0 0 2px rgba(240, 184, 48, .5); }
.bg-th { display: block; aspect-ratio: 312 / 290; background: #3a2a18; }
.bg-th img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bg-th i { display: flex; height: 100%; align-items: center; justify-content: center; font-style: normal; font-weight: bold; color: #f6e2b0; }
.bg-nm { display: block; padding: 2px 3px; font-size: 10.5px; line-height: 1.3; color: #fff; background: rgba(0, 0, 0, .55); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-colors { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nc-opt { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border: 2px solid rgba(120, 90, 40, .5); border-radius: 6px; background: #f6ecd6; font: inherit; font-size: 12px; cursor: pointer; }
.nc-opt i { width: 16px; height: 16px; border-radius: 3px; background: var(--c); }
.nc-opt.on { border-color: #f0b830; background: #fff6d8; font-weight: bold; }
/* 扭蛋的「背景」：獎品一覽、抽獎紀錄、結果的縮圖 */
.lu-bg { width: 54px; height: 50px; object-fit: cover; border-radius: 4px; }
.gh-bg img { width: 30px; height: 28px; object-fit: cover; border-radius: 3px; display: block; }
.ga-art.ga-bg { object-fit: cover; border-radius: 6px; }

/* 武具圖鑑、扭蛋的獎品一覽：補了原版武具之後一頁有幾百件，畫面外的格子先不畫（捲到才畫） */
.bk-grid .eq-cell { content-visibility: auto; contain-intrinsic-size: auto 64px; }
.lu-it { content-visibility: auto; contain-intrinsic-size: auto 66px; }

/* 武具圖鑑的預覽：縮小的主頁金框舞台（跟主頁背景的縮圖一樣 312×290），進化階段可以點來切換 */
.bk-pv { position: relative; width: 100%; max-width: 312px; height: 290px; margin: 2px auto 2px; border-radius: 8px; overflow: hidden; background: #000; box-shadow: 0 0 0 2px rgba(176, 120, 0, .7), 0 2px 8px rgba(0, 0, 0, .5); }
.bk-pv .tw-scene { left: 0; right: 0; top: 0; bottom: 0; }
.bk-pvh { text-align: center; margin-bottom: 4px; }
.bk-evo { background: none; border: 2px solid transparent; border-radius: 8px; padding: 1px; color: inherit; font: inherit; font-size: 10px; cursor: pointer; }
.bk-evo.on { border-color: #ffd24a; background: rgba(255, 210, 74, .18); }
/* 背景分頁：3 欄的縮圖，名字在下面；現在用的背景有金框 */
.bk-bgs { grid-template-columns: repeat(3, 1fr); }
.bk-bgc { display: flex; flex-direction: column; }
.bk-bgc img { display: block; width: 100%; aspect-ratio: 312 / 290; object-fit: cover; border-radius: 6px; }
.bk-bgc .bk-bgn { display: block; margin-top: 1px; font-size: 9px; line-height: 1.2; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-bgc.no img { filter: grayscale(1) brightness(.55); }
.bk-bgc .bk-no { bottom: 15px; }
.bk-bgc.cur img { box-shadow: 0 0 0 2px #ffd24a; }
.bk-grid .bk-bgc { contain-intrinsic-size: auto 104px; }
.bk-bgname { display: block; text-align: center; margin: 4px 0 2px; }
