/* 原版介面（本機原版測試）：assets/local/ui-local.js 在 <html> 加上 orig，assets/local/ui/ui.css 定義 --ui-* 圖（電腦 PNG、手機縮小的 WebP）。
   這裡只有版面：位置、大小照原版圖的像素（背景一律指定原尺寸，手機的小圖放大回來）。沒有本機原版圖時整份不作用 */

/* ── 字：遊戲裡的視窗、主介面、對話框、說明、詢問一律是思源黑體（老闆 11-18「換成思源黑體」，看過細明體、像素字、思源黑體、霞鶩文楷的對照圖）。
   之前是細明體的點陣字（老闆 11-04 的原版截圖）：只有 Windows 有，Mac、手機看到的是別的字。--font（css/style.css）每台裝置都一樣，
   這裡和下面寫死的細明體都改用它。登入、創角的捲軸是思源宋體（--o-serif），不動 ── */
html.orig.pc :is(.win, #hud, #log, #chat-input, #tooltip, #ask, #mode-bar) { font-family: var(--font); }
html.orig:is(.pc, .mpc).classic:not(.o-prev) #log { font-size: var(--lf, 12px); line-height: var(--ll, 13px); text-shadow: none; }
/* 一行放不下：第二行起和第一行對齊（老闆 11-06：往右縮是不正常的空格）；大喊前面的箭頭是客戶端圖 605～612 */
html.orig:is(.pc, .mpc).classic:not(.o-prev) #log .sh-ar { display: inline-block; width: var(--lf, 12px); height: var(--lf, 12px); margin-right: 2px; vertical-align: top; text-indent: 0; font-size: 0; background: var(--i) 0 0 / 100% 100% no-repeat; }   /* 貼著這一行的上緣：照基線排會比名字低、那行也變高（老闆 11-06） */
/* ── 一般視窗：原版的石框（562：內框 13,17～210,317，右邊骨頭捲軸，右上角 Close）──
   border-image 用百分比切，手機的縮小圖也對得上 */
html.orig .win {
  border-style: solid !important; border-width: 17px 47px 20px 13px !important;
  border-image: var(--ui-frame) 5.06% 18.29% 5.95% 5.06% fill / 17px 47px 20px 13px stretch !important;
  background: none !important; border-radius: 0 !important; box-shadow: none !important; padding: 0 !important;
}
html.orig .win-head { position: absolute !important; left: 0; right: 0; top: 0; height: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; background: none !important; overflow: visible; }
html.orig .win-head > :not(.close) { display: none !important; }
html.orig .win-head { font-size: 0 !important; color: transparent !important; }   /* 標題（原版的視窗沒有標題） */
html.orig .win-head:not(:has(.close)) { display: none !important; }
/* 關閉：原版圖（532 左上角那塊）的頁籤；一般視窗在框的右上角 */
/*   z-index：疊在視窗內容上面（角色視窗整片的裝備格、石框的外框會蓋住關閉，點不到；手機只能點它關） */
/*   字：用客戶端原本的英文 Close 圖（老闆 11-08：「維持原來的 close 不用硬要翻譯」；之前照台版截圖擦掉字改寫「關閉」） */
html.orig .win .close {
  position: absolute !important; top: -12px; right: -41px; width: 28px !important; height: 15px !important; padding: 0 !important; margin: 0 !important; z-index: 10;
  background: var(--ui-close) 0 0 / 28px 15px no-repeat !important; border: 0 !important; box-shadow: none !important; font-size: 0 !important; color: transparent !important; cursor: pointer;
}
html.orig .win .close:hover { filter: brightness(1.35); }
/*   電腦：視窗的原圖本來就畫著 Close 頁籤（石框 562、背包 532、魔法 538、角色 563、商店 549、交易 475），不再另外貼 532 左上角切下來的那塊
     （老闆 11-08「close 不是本來就有嗎，為什麼看起來像是被切過」：頁籤的弧度不一樣，貼上去的長方形邊看得到）。只留點得到的範圍；
     原圖沒有 Close 的（選項的對話框、佈告欄、地圖）照舊貼 */
html.orig.pc .win .close { background: none !important; }
html.orig.pc .win .close:hover { filter: none; }   /* 透明的按鈕加亮沒有作用，只會讓滑鼠移過去時重畫 */
html.orig.pc :is(#win-opt, #win-board, #win-map.o-map) .close:hover { filter: brightness(1.35); }
html.orig.pc #win-opt .close, html.orig.pc #win-board .close, html.orig.pc #win-map.o-map .close { background: var(--ui-close) 0 0 / 28px 15px no-repeat !important; }
/*   532 切下來的那塊左邊 4 欄、下面 4 列是背包頁籤的弧形邊，貼在這幾個視窗的框上像一小塊金色的鉤子（老闆 11-15「close 有瑕疵」，設定視窗的截圖）：
     只露出中間 24 × 11（Close 的字整個在裡面） */
html.orig.pc :is(#win-opt, #win-board, #win-map.o-map) .close { width: 24px !important; height: 11px !important; background-position: -4px 0 !important; }
/*   角色視窗（台版 563c，老闆 11-09「屬性有中文版本耶」）的頁籤是空白的：客戶端另外蓋頁籤字（515 Close、515c 關閉、515h 关闭）。
     照老闆 11-08 保留英文 Close：蓋 515（23 × 11，亮的 516）在 227, 5，和英文版 563 畫的 Close 逐點對得上 */
html.orig.pc #win-char .close { top: 5px !important; right: auto !important; left: 227px !important; width: 23px !important; height: 11px !important; background: var(--ui-tab-close) 0 0 / 23px 11px no-repeat !important; }
html.orig.pc #win-char .close:hover { filter: none; background-image: var(--ui-tab-close-h) !important; }
/*   手機：圖只有 28 × 15，手指點不準；看得到的大小不變，點得到的範圍往外多 12 像素 */
html.orig.mobile .win .close::before { content: ""; position: absolute; inset: -12px; }
/*   設定選單貼著畫面右邊，預設的位置（-41px）會跑到畫面外 */
html.orig #win-opt .close { top: 0; right: 0; }
/*   拍賣佈告欄、選血盟成員：整個視窗捲動時 Close（在框上）被裁掉點不到；改成裡面的清單捲動 */
html.orig #win-auction, html.orig #win-clanpick { overflow: visible !important; max-height: none !important; }
html.orig #auction-body, html.orig #clanpick-body { max-height: 66vh; overflow-y: auto; }
/*   不超出畫面（NPC 掃描 11-10：奇岩的拍賣佈告欄 45 列，1280 × 909 時視窗畫到 1073、手機直拿畫到 877，下面一截看不到）：
     電腦的視窗放大 --hk 倍（下面 zoom），位置、清單的高度上限先除回來；手機從最上面開始，清單扣掉下面的主介面（--hudh） */
html.orig.pc #win-auction, html.orig.pc #win-clanpick { top: calc(8vh / var(--hk, 1)); }
html.orig.pc #auction-body, html.orig.pc #clanpick-body { max-height: calc(60vh / var(--hk, 1)); }
html.orig.mobile #win-auction, html.orig.mobile #win-clanpick { top: calc(6px + var(--st, 0px)) !important; bottom: auto !important; }
html.orig.mobile #auction-body, html.orig.mobile #clanpick-body { max-height: calc(100vh - var(--hudh, 0px) - var(--st, 0px) - var(--sb, 0px) - 64px); }
/*   信件、信紙：一樣（畫面檢查 11-10：整個視窗捲動時框上的 Close 被蓋住點不到）。電腦的視窗放大 --hk 倍，高度除回去；
     手機放在畫面上面置中（之前接在舊的手機介面下面，橫拿時蓋到下面的主介面、快捷格），內容只到主介面上面 */
html.orig #win-mail, html.orig #win-letter, html.orig #win-cook { overflow: visible !important; max-height: none !important; }
html.orig #mail-body, html.orig #letter-body, html.orig #cook-body { max-height: calc(56vh / var(--hk, 1)); overflow-y: auto; }
html.orig.mobile #win-mail, html.orig.mobile #win-letter, html.orig.mobile #win-cook { left: 50% !important; right: auto !important; top: calc(6px + var(--st, 0px)) !important; bottom: auto !important; transform: translateX(-50%) !important; }
html.orig.mobile #mail-body, html.orig.mobile #letter-body, html.orig.mobile #cook-body { max-height: calc(100vh - var(--hudh, 0px) - var(--st, 0px) - 84px); }

/* ── 自己有原版底圖的視窗：固定大小、不用石框 ── */
html.orig #win-inv, html.orig #win-char, html.orig #win-spell, html.orig #win-trade, html.orig #win-shop, html.orig #win-npc {
  border: 0 !important; border-image: none !important; overflow: visible !important; max-height: none !important; display: block !important; grid-template-columns: none !important;
}
html.orig #win-inv:not(.hidden), html.orig #win-char:not(.hidden), html.orig #win-spell:not(.hidden), html.orig #win-trade:not(.hidden), html.orig #win-shop:not(.hidden), html.orig #win-npc:not(.hidden) { display: block !important; }
html.orig #win-inv.hidden, html.orig #win-char.hidden, html.orig #win-spell.hidden, html.orig #win-trade.hidden, html.orig #win-shop.hidden, html.orig #win-npc.hidden { display: none !important; }

/* 自己有底圖的視窗：Close 照原版圖的位置（563、549 右上角 225～250；475 右上角 193～218） */
html.orig #win-char .close, html.orig #win-shop .close { top: 6px; right: 7px; left: auto; }
/* 電腦：視窗貼著畫面上緣（老闆給的原版截圖：升級點屬性、偷窺內容這種對話頁、交易、角色視窗在左上角，背包在右上角）。
   NPC 對話和用同一個框的頁（隊伍、寵物、記憶座標、變身清單）、交易、角色、NPC 開的商店、學魔法、倉庫在左上角；
   背包在右上角，魔法接在背包左邊（截圖裡沒有） */
/* 寬的畫面（老闆 11-08：對話框出現在左上角，以為沒出現）：原版的畫面不大，左上角就在角色旁邊。
   主介面照原版 640 × 480 放大 --hk 倍（js/main.js）；原版的視窗也放大一樣的倍數（老闆 11-08：快捷格的道具要和背包一樣大），
   照原版的位置放在畫面中間那塊原版大小（640 × 480 的 --hk 倍）的範圍的上緣；畫面比原版窄就貼邊。
   zoom 也會放大視窗自己的 left、right，位置要先除回去 */
/*   介面的範圍（640 × 480 放大 --hk 倍、視窗正中間）的左上角：js/main.js 算好放在 --o-left、--o-top；
     視窗貼著它的上緣、左右兩邊（老闆 11-08 的原版截圖：對話在左上、背包在右上）。
     世界最多畫原版的一張 640 × 480（世界的倍數），視窗更大的部分是黑邊（老闆 11-08）：黑邊的寬是 --f-left、--f-top，
     主介面、對話框、地區名稱、狀態圖示都在這一張裡面 */
html.orig.pc { --o-left: max(0px, calc(50vw - 320px * var(--hk, 1))); --o-top: max(0px, calc(50vh - 240px * var(--hk, 1))); --f-left: 0px; --f-top: 0px; }
/* 介面的圖（主介面、視窗、拖著的道具）照點陣放大，和世界的畫面一樣清楚（老闆 11-08「要還原天堂原本桌機版樣貌」；柔化放大一點 1.46 倍就糊了） */
html.orig.pc #hud, html.orig.pc .win, html.orig.pc #drag-ghost, html.orig.pc #dead, html.orig.pc #ask { image-rendering: pixelated; }
/*   結束視窗、確認框（石框 50）也是（畫面檢查 11-09：1.8 倍時和原圖逐點比平均差 16，1 倍時 0——之前只有 .win 點陣放大，這兩個是平滑的） */
/* 道具、魔法圖示照原版的 32 × 32 畫（一點對一點），置中在格子裡，不撐滿格子（老闆 11-08「檢查一下所有道具大小，歐西斯鏈甲感覺很大」：
   背包的 .icon 是 38、商店是 35，原版 32 的圖被放大 1.1～1.2 倍，畫得滿的圖（歐西斯鏈甲 30 × 31）頂到格線） */
html.orig.pc .icon img { width: 32px; height: 32px; flex: none; }
html.orig.pc .grid .slot > .icon { width: 100%; height: 100%; }
/*   不是整數倍（1.5、1.8 倍）也點陣放大：柔化的字太糊（老闆 11-09「角色屬性視窗中文太糊了」，js/main.js） */
html.orig.pc #win-npc, html.orig.pc #win-party, html.orig.pc #win-pet, html.orig.pc #win-tele, html.orig.pc #win-poly, html.orig.pc #win-char,
html.orig.pc #win-trade, html.orig.pc #win-shop, html.orig.pc #win-learn, html.orig.pc #win-wh, html.orig.pc #win-inv, html.orig.pc #win-spell { zoom: var(--hk, 1); }
html.orig.pc #win-npc, html.orig.pc #win-party, html.orig.pc #win-pet, html.orig.pc #win-tele, html.orig.pc #win-poly, html.orig.pc #win-char,
html.orig.pc #win-trade, html.orig.pc #win-shop, html.orig.pc #win-learn, html.orig.pc #win-wh { left: calc(var(--o-left) / var(--hk, 1)) !important; top: calc(var(--o-top) / var(--hk, 1)) !important; right: auto !important; bottom: auto !important; transform: none !important; }
html.orig.pc #win-inv { right: calc(var(--o-left) / var(--hk, 1)) !important; left: auto !important; top: calc(var(--o-top) / var(--hk, 1)) !important; bottom: auto !important; }
html.orig.pc #win-spell { right: calc(var(--o-left) / var(--hk, 1) + 223px) !important; left: auto !important; top: calc(var(--o-top) / var(--hk, 1)) !important; bottom: auto !important; }
/* 視窗右邊軌道上的滑塊、上下鈕（js/ui.js bindWinThumbs）；只有電腦的原版介面有 */
.o-thumb, .o-sb-btn { display: none; }
html.orig.pc .o-thumb { display: block; position: absolute; width: 14px; height: 9px; z-index: 4; background: var(--ui-scroll-thumb) 0 0 / 100% 100% no-repeat; cursor: pointer; touch-action: none; }
html.orig.pc .o-sb-btn { display: block; position: absolute; width: 14px; height: 11px; z-index: 4; cursor: pointer; }
/*   手機也有（老闆 11-09「按下去移動就該觸發拖曳」：背包、魔法清單上手指一滑就是拖道具，捲動改用框上的捲軸）：
     拖鈕、上下圓鈕點得到的範圍往外多一點（圖只有 14 點寬） */
html.orig.mobile .o-thumb { display: block; position: absolute; width: 14px; height: 9px; z-index: 4; background: var(--ui-scroll-thumb) 0 0 / 100% 100% no-repeat; touch-action: none; }
html.orig.mobile .o-sb-btn { display: block; position: absolute; width: 14px; height: 11px; z-index: 4; }
html.orig.mobile .o-thumb::before, html.orig.mobile .o-sb-btn::before { content: ''; position: absolute; inset: -6px -8px; }
/* 框的圖旁邊有一條透明的（關閉的頁籤凸出去的地方）：點那裡要算點地上，不是點視窗（走路、選目標會沒反應） */
/*   切的線照原圖頁籤底下的弧線（第 16～30 列從外緣收到 17 點；量 532、538、562、563、549、475 的透明度），
     之前一刀直切在第 22 列、17 點（右邊 18 點），弧線被切掉一塊，右邊框還少一行（老闆 11-08「close 下面有一個缺角」） */
html.orig.pc #win-inv, html.orig.pc #win-spell, html.orig.pc #win-wh { clip-path: polygon(0 0, 100% 0, 100% 100%, 17px 100%, 17px 30px, 15px 28px, 13px 26px, 11px 24px, 8px 22px, 5px 20px, 3px 18px, 0 16px); }
html.orig.pc #win-npc, html.orig.pc #win-char, html.orig.pc #win-shop, html.orig.pc #win-trade, html.orig.pc #win-party, html.orig.pc #win-tele, html.orig.pc #win-poly, html.orig.pc #win-learn {
  clip-path: polygon(0 0, 100% 0, 100% 16px, calc(100% - 3px) 18px, calc(100% - 5px) 20px, calc(100% - 8px) 22px, calc(100% - 11px) 24px, calc(100% - 13px) 26px, calc(100% - 15px) 28px, calc(100% - 17px) 30px, calc(100% - 17px) 100%, 0 100%); }

/* 手機：原版的視窗放在畫面上面置中（底下是 HUD、快捷列）；背包點選物品後的動作按鈕接在視窗下面 */
html.orig.mobile #win-inv, html.orig.mobile #win-char, html.orig.mobile #win-spell, html.orig.mobile #win-trade, html.orig.mobile #win-shop, html.orig.mobile #win-npc {
  left: 50% !important; right: auto !important; top: calc(6px + var(--st, 0px)) !important; bottom: auto !important; transform: translateX(-50%) !important;
}
html.orig.mobile #win-inv .detail { display: block !important; position: absolute; left: 0; top: 340px; width: 223px; max-height: none; background: rgba(12, 10, 8, 0.92); border: 1px solid #5a4a30; }
html.orig.mobile #win-inv .detail:empty { display: none !important; }
/*   橫拿（畫面只有 360～390 高，背包 336）：下面放不下，說明和按鈕改接在背包右邊，兩個一起置中
     （畫面檢查 11-09：844 × 390 點了道具，「丟棄」「刪除」在 y 408，按不到）。交易、倉庫並排時照舊 */
@media (orientation: landscape) {
  html.orig.mobile:not(:has(#win-trade:not(.hidden))):not(:has(#win-wh:not(.hidden))):not(:has(#win-shop:not(.hidden))) #win-inv .detail { left: 227px; top: 0; max-height: calc(100vh - 12px - var(--st, 0px)); overflow-y: auto; }
  html.orig.mobile:not(:has(#win-trade:not(.hidden))):not(:has(#win-wh:not(.hidden))):not(:has(#win-shop:not(.hidden))):has(#win-inv .detail:not(:empty)) #win-inv { transform: translateX(calc(-50% - 113px)) !important; }
}
/*   交易、倉庫要同時點背包：左右並排（原版 helptra：交易在左、背包在右），不然背包被蓋住，放不了東西 */
html.orig.mobile:has(#win-trade:not(.hidden)) #win-trade, html.orig.mobile:has(#win-wh:not(.hidden)) #win-wh {
  left: calc(50% - 2px) !important; right: auto !important; top: calc(6px + var(--st, 0px)) !important; bottom: auto !important; transform: translateX(-100%) scale(var(--dual-k, 1)) !important; transform-origin: top right;
}
html.orig.mobile:has(#win-trade:not(.hidden)) #win-inv, html.orig.mobile:has(#win-wh:not(.hidden)) #win-inv { left: calc(50% + 2px) !important; transform: scale(var(--dual-k, 1)) !important; transform-origin: top left; }
/*   商店（向商人買賣，js/ui.js openShop 會一起開背包）也一樣：原版商店在左、背包在右（電腦 orig.pc 的位置）；手機之前兩個都置中，商店整個蓋住背包
     （畫面檢查 11-09：844 × 390、390 × 844 的買賣畫面只看得到背包下緣一條框）。商店 257 寬，放不下時照 --dual-ks 一起縮小。
     兩個不一樣寬（257、223）：一起置中，中間的縫往右移 (257 − 223) ÷ 2 = 17 點 */
/*   角色視窗（257 寬）和背包一起開著時也一樣（原版角色在左上、背包在右上；畫面檢查 11-09：手機上角色視窗整個蓋住背包，換裝備看不到背包） */
html.orig.mobile:has(#win-shop:not(.hidden)) #win-shop, html.orig.mobile:has(#win-char:not(.hidden)):has(#win-inv:not(.hidden)) #win-char {
  left: calc(50% - 2px + 17px * var(--dual-ks, 1)) !important; right: auto !important; top: calc(6px + var(--st, 0px)) !important; bottom: auto !important; transform: translateX(-100%) scale(var(--dual-ks, 1)) !important; transform-origin: top right; }
html.orig.mobile:has(#win-shop:not(.hidden)) #win-inv, html.orig.mobile:has(#win-char:not(.hidden)) #win-inv { left: calc(50% + 2px + 17px * var(--dual-ks, 1)) !important; transform: scale(var(--dual-ks, 1)) !important; transform-origin: top left; }
/*   橫拿的電腦版原圖主介面（html.mpc）：矮的手機（667 × 375）置中時背包蓋到右下的快捷格，整組往左讓開（背包右緣在快捷格左邊 4 點） */
@media (orientation: landscape) {
  html.orig.mobile.mpc:has(#win-shop:not(.hidden)) #win-shop, html.orig.mobile.mpc:has(#win-char:not(.hidden)):has(#win-inv:not(.hidden)) #win-char { left: min(calc(50% - 2px + 17px * var(--dual-ks, 1)), calc(100% - var(--hr) - 148px * var(--hk) - 223px * var(--dual-ks, 1))) !important; }
  html.orig.mobile.mpc:has(#win-shop:not(.hidden)) #win-inv, html.orig.mobile.mpc:has(#win-char:not(.hidden)) #win-inv { left: min(calc(50% + 2px + 17px * var(--dual-ks, 1)), calc(100% - var(--hr) - 144px * var(--hk) - 223px * var(--dual-ks, 1))) !important; }
  /*   交易、倉庫（兩個都 223 寬）一樣讓開（畫面檢查 11-09：667 × 375 開倉庫，背包蓋到快捷格 1、5） */
  html.orig.mobile.mpc:has(#win-trade:not(.hidden)) #win-trade, html.orig.mobile.mpc:has(#win-wh:not(.hidden)) #win-wh { left: min(calc(50% - 2px), calc(100% - var(--hr) - 148px * var(--hk) - 223px * var(--dual-k, 1))) !important; }
  html.orig.mobile.mpc:has(#win-trade:not(.hidden)) #win-inv, html.orig.mobile.mpc:has(#win-wh:not(.hidden)) #win-inv { left: min(calc(50% + 2px), calc(100% - var(--hr) - 144px * var(--hk) - 223px * var(--dual-k, 1))) !important; }
}

/* 手機的背包（老闆 11-09「背包這樣做做看：1. 稍微放大道具 2. 可以拖曳，拖曳到快捷鍵，快捷鍵一樣顯示框框 3. 天堂刪除道具是拖曳到垃圾桶 4. 點選道具應該要顯示資訊，跟桌機一樣」）：
   - 整個背包放大（直拿 1.2、橫拿 1.1，矮的手機 1.05），格子、道具一起大，原圖不變形；
   - 垃圾桶（台版說明 helpitm「刪除：拖到垃圾桶」）在背包右上角外面，拖過去變紅；
   - 按住那一格亮起來（js/ui.js：按住 0.28 秒才是拖，直接滑是捲動），拖的時候快捷鍵每一格亮金框（和設定快捷時一樣） */
html.orig.mobile #win-inv { --bagk: 1.2; transform: translateX(-50%) scale(var(--bagk)) !important; transform-origin: top center; }
@media (orientation: landscape) { html.orig.mobile #win-inv { --bagk: 1.1; } }
@media (orientation: landscape) and (max-height: 384px) { html.orig.mobile #win-inv { --bagk: 1.05; } }
/*   垃圾桶在背包右邊、上面（畫面檢查 11-09：放左下角時 667 × 375 橫拿蓋住左下的 ☰；右上在原始、精簡介面都沒有按鈕） */
html.orig.mobile #win-inv .inv-gold { display: block !important; position: absolute; left: auto; right: -46px; top: 30px; bottom: auto; width: 40px; height: 40px; margin: 0; padding: 0; background: none; border: 0; }
html.orig.mobile #win-inv .inv-gold > :not(#inv-trash):not(#inv-sort) { display: none !important; }
/*   直拿時和商店、交易、倉庫、角色視窗左右並排：背包靠在畫面右邊，右邊外面的垃圾桶跑到畫面外（流程測試 11-10：390 × 844 開商店，
     垃圾桶在 389～420，按不到）。並排時用不到刪除（要刪先關掉另一個視窗），不顯示；橫拿的右邊有空，照舊 */
@media (orientation: portrait) {
  html.orig.mobile:is(:has(#win-shop:not(.hidden)), :has(#win-trade:not(.hidden)), :has(#win-wh:not(.hidden)), :has(#win-char:not(.hidden))) #win-inv .inv-gold { display: none !important; }
}
html.orig.mobile #inv-trash { display: flex !important; align-items: center; justify-content: center; width: 40px; height: 40px; box-sizing: border-box; padding: 0; color: #c8b89a;
  background: radial-gradient(#2c2824, #121010); border: 1px solid #6a5a3a; border-radius: 4px; box-shadow: inset 0 0 6px #000, 0 2px 5px rgba(0, 0, 0, 0.7); }
html.orig.mobile #inv-trash svg { width: 24px; height: 24px; }
/*   點的範圍比看到的大（看不見的外框）：老闆 11-14「垃圾桶點擊觸發範圍太小 要點垃圾桶上半部才會觸發」（iPhone 橫拿時點下去的位置會偏一點；
     模擬器每一處都點得到，重現不了）。往下多一點；左邊少一點，不搶背包捲軸 */
html.orig.mobile #inv-trash { position: relative; }
html.orig.mobile #inv-trash::after { content: ''; position: absolute; top: -8px; right: -10px; bottom: -18px; left: -4px; }
html.orig.mobile #inv-trash.over { color: #ff9a80; border-color: #d06048; background: #3a1a14; box-shadow: 0 0 8px rgba(255, 120, 80, 0.7); }
/*   touch-action: none：手指按在格子上就是拖（捲動用旁邊的捲軸，js/ui.js armTouch）；不然 iPhone 的 Safari 可能當成捲動，送 pointercancel 把拖曳取消（11-14） */
html.orig.mobile #inv-grid .slot { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: none; }
/*   選取框 1 像素（老闆 11-11「背包格子、快捷格子選取框太粗，參考之前的圖」：原版 696 的框只有 1 像素，介面放大時跟著等比例變粗） */
html.orig.mobile #inv-grid .slot.lift { outline: 1px solid #ffd870; outline-offset: -1px; background-color: rgba(255, 216, 112, 0.18); }
html.orig #inv-grid .slot.msel { outline-width: 1px; outline-offset: -1px; }
/*   拖著的圖現在對著的那一格（放開就放進這格，js/ui.js dropAt）：整格亮起來 */
html.item-drag #hotbar .hot.drop-on { background-color: rgba(255, 216, 96, 0.4) !important; box-shadow: inset 0 0 0 1px #fff2b0, 0 0 8px #ffd860 !important; }
html.mobile.item-drag #hotbar .hot { border-color: #ffe08a !important; box-shadow: inset 0 0 10px rgba(255, 216, 96, 0.55), 0 0 3px rgba(255, 216, 96, 0.6) !important; }
/*   手機：道具拖出背包一次，背包變淡、點得穿，看得到底下的狗、寵物，放到牠身上就是交給牠（js/ui.js drag.out；討論版 11-15 手機抓狗） */
html.inv-drag-out #win-inv { opacity: 0.2; }
html.inv-drag-out #win-inv, html.inv-drag-out #win-inv * { pointer-events: none !important; }
/* 背包（532：4 欄 × 8 列、一格 36，從 45,21 開始；Close 在左上角） */
html.orig #win-inv { width: 223px !important; height: 336px !important; background: var(--ui-inv) 0 0 / 223px 336px no-repeat !important; }
html.orig #win-inv .close { top: 3px; left: 4px; right: auto; }
html.orig #win-inv .doll, html.orig #win-inv .inv-gold { display: none !important; }
html.orig.pc #win-inv .detail { display: none !important; }
/* 電腦原版：背包右下角的垃圾桶（老闆 11-11「桌機版沒有垃圾桶，記得是在包包視窗右下角」）：客戶端 742（金色的籃子），道具拖過去換成發亮的 743；
     位置量老闆的 640×480 原版截圖（背包原圖對齊在 417,0，垃圾桶在 611,304 → 視窗裡 194,304，捲軸下圓鈕的下面）。拖到這裡刪除（js/ui.js、world.js deleteEntry） */
html.orig.pc #win-inv .inv-gold { display: block !important; position: absolute; left: 0; top: 0; width: 0; height: 0; margin: 0; padding: 0; border: 0; background: none; }
html.orig.pc #win-inv .inv-gold > :not(#inv-trash):not(#inv-sort) { display: none !important; }
html.orig.pc #inv-trash { display: block !important; position: absolute; left: 194px; top: 304px; width: 25px; height: 27px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--ui-trash) 0 0 / 25px 27px no-repeat; z-index: 3; }
html.orig.pc #inv-trash svg { display: none; }
html.orig.pc #inv-trash.over { background-image: var(--ui-trash-on); }
/* 一鍵整理（js/ui.js、js/world.js sortInv；老闆 11-16「用圖示」）：原版沒有這顆，畫一個排序的圖示（三條由長到短加往下的箭頭），顏色照背包框的銅色。
   電腦：垃圾桶左邊、背包圖下緣那一排；手機：垃圾桶下面一格（背包外面右邊，和垃圾桶一樣的方塊） */
/*   電腦：背包圖下面那條灰色橫條的正中間（老闆 11-16「放在背包下面橫條空間正中間」）。量 inv.png：灰條 x 21～218、y 312～330（上面是格子的金框 309～311，
     下面是外框 331），中心 119.5, 321；圖示 16 × 16 → 112～127、313～328 */
html.orig.pc #inv-sort { display: block !important; position: absolute; left: 112px; top: 313px; width: 16px; height: 16px; padding: 0; margin: 0; border: 0; background: none; color: #c8a868; cursor: pointer; z-index: 3; }
html.orig.pc #inv-sort svg { display: block; width: 16px; height: 16px; filter: drop-shadow(0 1px 1px #000); }
html.orig.pc #inv-sort:hover { color: #f0d898; }
/*   手機：和垃圾桶同一欄、一樣大（老闆 11-16「手機要對齊垃圾桶」：之前一般介面的 margin-left 6px 讓它往右偏 6 點） */
html.orig.mobile #inv-sort { display: flex !important; align-items: center; justify-content: center; width: 40px; height: 40px; margin: 8px 0 0; padding: 0; box-sizing: border-box; color: #c8b89a;
  background: radial-gradient(#2c2824, #121010); border: 1px solid #6a5a3a; border-radius: 4px; box-shadow: inset 0 0 6px #000, 0 2px 5px rgba(0, 0, 0, 0.7); }
html.orig.mobile #inv-sort svg { width: 24px; height: 24px; }
html.orig.mobile #inv-sort:active { color: #f0d898; border-color: #a08848; }
html.orig #inv-grid {
  position: absolute; left: 45px; top: 21px; width: 144px; height: 288px; padding: 0 !important; margin: 0 !important;
  display: grid !important; grid-template-columns: repeat(4, 36px) !important; grid-auto-rows: 36px; gap: 0 !important;
  overflow-y: auto; scrollbar-width: none; background: none !important; border: 0 !important; align-content: start;
}
html.orig #inv-grid::-webkit-scrollbar { display: none; }
/* 格子畫在底圖上：捲動停在整列上（手指拖動；滾輪一次一列見 js/ui.js origSetup），道具才會對齊底圖的格子 */
html.orig #inv-grid, html.orig #wh-grid, html.orig #trade-theirs, html.orig #trade-mine, html.orig #shop-body { scroll-snap-type: y mandatory; }
html.orig #inv-grid, html.orig #wh-grid { max-height: none !important; }   /* 剛好 8 列（style.css 的 260 會讓最後一列停在半格） */
html.orig #inv-grid > *, html.orig #wh-grid > *, html.orig #trade-theirs > *, html.orig #trade-mine > *, html.orig #shop-body > * { scroll-snap-align: start; }
html.orig #inv-grid .slot, html.orig #trade-theirs .slot, html.orig #trade-mine .slot {
  width: 36px !important; height: 36px !important; background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
}
html.orig #inv-grid .slot:hover, html.orig #trade-theirs .slot:hover, html.orig #trade-mine .slot:hover { background: rgba(255, 230, 160, 0.12) !important; }
html.orig #inv-grid .slot.sel { box-shadow: inset 0 0 0 1px #e8c766 !important; }
/* 背包的圖示上不寫數量（原版：滑鼠移過去才看到「金幣(1,111,333)」）。手機也一樣（老闆 11-10「背包道具不用顯示數量 單點擊 顯示資訊
   雙點擊 使用/裝備」：手機點一下就是說明框，數量在名稱裡；之前手機沒有滑鼠才照舊寫） */
html.orig #inv-grid .cnt { display: none; }

/* 角色（563）：欄位照原版的格子（js/ui.js refreshChar 的 .oc-*），裝備格在剪影上 */
html.orig #win-char { width: 257px !important; height: 336px !important; background: var(--ui-char) 0 0 / 257px 336px no-repeat !important; }
html.orig #char-body { position: absolute; inset: 0; padding: 0 !important; }
html.orig .oc { position: absolute; height: 13px; line-height: 13px; font-size: 10px; color: #f0e6cc; text-align: center; white-space: nowrap; overflow: hidden; text-shadow: 0 1px 1px #000; }
html.orig .oc.l { text-align: left; padding-left: 3px; }
/*   角色視窗的值：1.82 原尺寸畫面是 12 點的白字、沒有影子（「416/421」數字高 10 點；之前 10 點米黃色，小一號） */
html.orig #win-char .oc { font: 12px/13px var(--font); color: #fff; text-shadow: none; padding-top: 1px; }   /* 比原版高 1～2 點，往下 1 點 */
html.orig #win-char #doll-slots { position: absolute; inset: 0; display: block !important; padding: 0 !important; }
html.orig #win-char .dslot {
  position: absolute; width: 33px !important; height: 33px !important; padding: 0 !important; margin: 0 !important;
  background: none !important; border: 0 !important; border-radius: 0 !important; display: flex; align-items: center; justify-content: center;
}
html.orig #win-char .dslot > span { display: none; }
html.orig #win-char .dslot .icon { width: 32px; height: 32px; }
html.orig #win-char .dslot:hover { background: rgba(255, 230, 160, 0.12) !important; }
/* 頭盔 項鍊 斗篷 內衣 盔甲 武器 盾牌 手套 腰帶 靴子 戒指 戒指（js/ui.js DOLL_SLOTS 的順序）。
   哪一格放什麼照 1.82 的原尺寸畫面（老闆 11-04 給的 640 × 480 截圖，同一張 563 的角色視窗）：右上頭盔、它左下項鍊、
   上排內衣（T恤）、盔甲（精靈鏈甲）、斗篷（巨蟻女皇的銀翅膀）；左邊戒指、下面武器，中間手套，右邊盾牌、戒指，最下面靴子；
   中間空的那格是腰帶（12 格剛好：戒指兩格）。10-29 自己排的頭盔、項鍊、盔甲、武器、手套、腰帶、戒指都放錯格（畫面檢查 11-09） */
html.orig #win-char .dslot:nth-child(1) { left: 173px; top: 33px; }
html.orig #win-char .dslot:nth-child(2) { left: 137px; top: 55px; }
html.orig #win-char .dslot:nth-child(3) { left: 183px; top: 95px; }
html.orig #win-char .dslot:nth-child(4) { left: 109px; top: 95px; }
html.orig #win-char .dslot:nth-child(5) { left: 146px; top: 95px; }
html.orig #win-char .dslot:nth-child(6) { left: 79px; top: 167px; }
html.orig #win-char .dslot:nth-child(7) { left: 199px; top: 143px; }
html.orig #win-char .dslot:nth-child(8) { left: 114px; top: 153px; }
html.orig #win-char .dslot:nth-child(9) { left: 160px; top: 131px; }
html.orig #win-char .dslot:nth-child(10) { left: 195px; top: 265px; }
html.orig #win-char .dslot:nth-child(11) { left: 76px; top: 132px; }
html.orig #win-char .dslot:nth-child(12) { left: 193px; top: 180px; }

/* 魔法（使用者挑的 5194，依舊天堂的 Sprite14：239 × 317，7 列，一列 36，從 37 開始；左邊方形的圖示槽 18～50、名稱欄 53～212；
   右上角圖上有 X：Close 疊在 X 上（透明）） */
html.orig #win-spell { width: 239px !important; height: 317px !important; background: var(--ui-spell) 0 0 / 239px 317px no-repeat !important; }
html.orig #win-spell .close { top: 11px; right: 4px; left: auto; width: 16px !important; height: 15px !important; background: none !important; }
/*   手機：原圖右上角的 X 只有 16 × 15，看不清楚也不好點（老闆 11-14「法術在手機板上的關閉按鈕太小了」）：
     蓋一顆和左下圓鈕（css/style.css .side-btn）一樣的青銅框圓鈕，30 像素、畫 ✕；點得到的範圍照舊再往外 12 像素（.close::before） */
html.orig.mobile #win-spell .close { top: 3px; right: 1px; width: 30px !important; height: 30px !important; border-radius: 50%; display: flex !important; align-items: center; justify-content: center;
  font-size: 15px !important; line-height: 1; color: #e8d8a8 !important;   /* 按鈕的字本來就是 ✕（index.html），原圖模式把它藏起來（字 0、透明），這裡顯示 */
  background: radial-gradient(#3a342c, #16120e) !important; border: 1px solid #8a6a34 !important; box-shadow: 0 0 0 1px #000, 0 2px 6px rgba(0, 0, 0, 0.7) !important; }
html.orig #spell-list { position: absolute; left: 18px; top: 37px; width: 194px; height: 252px; overflow-y: auto; scrollbar-width: none; padding: 0 !important; }
html.orig #spell-list::-webkit-scrollbar { display: none; }
html.orig #spell-list .spell-row { height: 36px; padding: 0 !important; margin: 0 !important; gap: 0 !important; border: 0 !important; background: none !important; display: flex; align-items: flex-start; cursor: pointer; scroll-snap-align: start; }
html.orig #spell-list { scroll-snap-type: y mandatory; }
html.orig #spell-list .spell-row .icon { width: 32px; height: 32px; flex: none; margin: 1px 0 0 0 !important; background: none !important; border: 0 !important; }
html.orig #spell-list .spell-row > div:not(.icon) { flex: 1; min-width: 0; height: 33px; padding: 3px 0 0 9px; font-size: 12px; line-height: 14px; color: #f0ead8; text-shadow: 0 1px 1px #000; overflow: hidden; }
html.orig #spell-list .spell-row b { color: #fff4d8 !important; }
html.orig #spell-list .spell-row .dim { color: #d8ccb0 !important; font-size: 10px; }
html.orig #spell-list .spell-row:hover { background: rgba(255, 255, 255, 0.12) !important; }
html.orig #spell-list .hotset { display: none; }
/*   下面還有魔法：清單底下一個金色的 ▼（捲軸是藏起來的，iPhone 也不顯示；js/ui.js refreshSpells 加 .more-below） */
.spell-more { display: none; }
html.orig #win-spell .spell-more { position: absolute; left: 18px; width: 194px; top: 271px; height: 18px; pointer-events: none; text-align: center; font-size: 12px; line-height: 20px; color: #ffe08a;
  text-shadow: 0 0 3px #000, 0 1px 1px #000; background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.7)); animation: spell-more 1.2s ease-in-out infinite; }
html.orig #win-spell.more-below .spell-more { display: block; }
html.orig.pc #win-spell .spell-more { left: 52px; width: 136px; top: 273px; }
@keyframes spell-more { 50% { transform: translateY(2px); } }
/* 電腦：老闆 11-04「魔法視窗應該也不是這個……跟背包不是同一種類型視窗」→ 原版的魔法視窗是 538（2001 年的客戶端也是 538）：
   跟背包（532）同一種視窗，左上角的頁籤，4 × 8 格放魔法圖示（每格 34，x 52～189、y 19～291），右邊捲軸，
   下面「S.power :□（x 76～105）　M.resist. :□（x 159～200）%」，y 306～319。沒學魔法就是空的格子。
   老闆 11-08「改回原樣，不要自己中文化」：用客戶端原本的英文圖 538（之前是台版的 538h「魔功」，上面再蓋「魔攻」兩個字） */
#spell-sp, #spell-mr { display: none; }
html.orig.pc #win-spell { width: 223px !important; height: 336px !important; background: var(--ui-magic, var(--ui-spell)) 0 0 / 223px 336px no-repeat !important; }
html.orig.pc #win-spell .close { top: 3px; left: 4px; right: auto; width: 28px !important; height: 15px !important; background: none !important; }
html.orig.pc #spell-list { left: 52px; top: 19px; width: 136px; height: 272px; display: grid; grid-template-columns: repeat(4, 34px); grid-auto-rows: 34px; align-content: start; }
html.orig.pc #spell-list .spell-cell { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; cursor: pointer; scroll-snap-align: start; }
html.orig.pc #spell-list .spell-cell .icon { width: 32px; height: 32px; margin: 0 !important; background: none !important; border: 0 !important; }
html.orig.pc #spell-list .spell-cell:hover { background: rgba(255, 230, 160, 0.12); }
html.orig.pc #spell-sp, html.orig.pc #spell-mr { display: block; position: absolute; top: 306px; height: 13px; font: 12px/13px var(--font); color: #fff; text-align: center; white-space: nowrap; }
html.orig.pc #spell-sp { left: 76px; width: 29px; }
html.orig.pc #spell-mr { left: 159px; width: 41px; }
/*   手機還是原本那張（右上角圖上有 X），頁籤的「關閉」字不寫在 X 上 */
html.orig.mobile #win-spell .close::after { content: none; }
/* 空的魔法卷軸：原版是在魔法視窗（同一張 5194）裡點要寫進去的魔法；卷軸等級不夠的魔法灰掉 */
html.orig #win-blank { width: 239px !important; height: 317px !important; max-height: none !important; border: 0 !important; border-image: none !important; overflow: visible !important; background: var(--ui-spell) 0 0 / 239px 317px no-repeat !important; }
html.orig #win-blank .close { top: 11px; right: 4px; left: auto; width: 16px !important; height: 15px !important; background: none !important; }
html.orig.pc #win-blank { zoom: var(--hk, 1); }   /* 電腦：和魔法視窗一樣放大 --hk 倍（畫面檢查 11-09：之前是 1 倍） */
html.orig #blank-body { position: absolute; left: 18px; top: 37px; width: 194px; height: 252px; overflow-y: auto; scrollbar-width: none; padding: 0 !important; scroll-snap-type: y mandatory; }
html.orig #blank-body::-webkit-scrollbar { display: none; }
html.orig #blank-body > .pad-s, html.orig #blank-body .shop-row button { display: none !important; }
html.orig #blank-body .shop-row { height: 36px; padding: 0 !important; margin: 0 !important; gap: 0 !important; border: 0 !important; background: none !important; display: flex; align-items: flex-start; cursor: pointer; scroll-snap-align: start; }
html.orig #blank-body .shop-row .icon { width: 32px; height: 32px; flex: none; margin: 1px 0 0 0 !important; background: none !important; border: 0 !important; }
html.orig #blank-body .shop-row > .grow { flex: 1; min-width: 0; height: 33px; padding: 3px 0 0 9px; font-size: 12px; line-height: 14px; color: #f0ead8; text-shadow: 0 1px 1px #000; overflow: hidden; }
html.orig #blank-body .shop-row b { color: #fff4d8 !important; }
html.orig #blank-body .shop-row .dim { color: #d8ccb0 !important; font-size: 10px; }
html.orig #blank-body .shop-row.cant { opacity: 0.45; cursor: default; }
html.orig #blank-body .shop-row:not(.cant):hover { background: rgba(255, 255, 255, 0.12) !important; }
/* 手機沒有數字鍵：每列右邊一顆「快捷」，點了再點快捷列的格子 */
html.orig.mobile #spell-list .hotset { display: block; flex: none; width: 38px; height: 24px; margin: 0 4px 0 2px; padding: 0; font-size: 11px; line-height: 22px; color: #2a1a08 !important; text-shadow: none;
  background: linear-gradient(#f4e8c0, #dcc890 55%, #b89a5a) !important; border: 1px solid #5a4020 !important; border-radius: 3px; box-shadow: none !important; }

/* 道具圖示右上角寫強化值（老闆 11-16「裝備武器的小圖示上面要顯示+多少」；之前照原版畫面藏起來，原版只有名字寫「+1 短劍」）。
   沒鑑定的不寫（L.shownEnchant），+0 不寫 */
/* 裝備中的東西：圖示左上角的 E。照老闆 11-09 給的客戶端畫面（640 × 480 原尺寸，背包裡裝備中的鋼爪）逐點畫：5 × 6 點的點陣 E，奶油色（約 252, 232, 205），
     格子左緣往內 2 點、上緣往下 3 點，沒有黑邊（老闆「E 長這樣，它畫質真好」）。底下那一點、右下的襯線是半透明的淡點。
   手機也一樣（老闆 11-09「手機版的介面都要改得跟桌機版一樣的元素」；之前手機是 13 像素的藝術字體 E，比電腦大一倍、有黑邊） */
html.orig .icon .badge { left: 2px; top: 3px; width: 5px; height: 6px; font-size: 0; line-height: 0; color: transparent; text-shadow: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='5' height='6' shape-rendering='crispEdges'%3E%3Cg fill='%23fce8cd'%3E%3Crect width='5' height='1'/%3E%3Crect x='1' y='1' width='1' height='5'/%3E%3Crect x='2' y='2' width='2' height='1'/%3E%3Crect x='2' y='5' width='3' height='1'/%3E%3C/g%3E%3Cg fill='%23fce8cd' opacity='.55'%3E%3Crect x='4' y='4' width='1' height='1'/%3E%3Crect y='5' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 5px 6px no-repeat; }
/* 道具說明：原版是半透明的黑底白字（客戶端照道具資料用字串表的字排），沒有圖示、沒有金色的名字 */
html.orig #tooltip { background: rgba(0, 0, 0, 0.72); border: 1px solid rgba(220, 210, 190, 0.3); border-radius: 0; box-shadow: none; color: #fff; font-size: 12px; line-height: 1.45; padding: 4px 8px; }
html.orig #tooltip b { color: #fff; font-weight: normal; }
html.orig #tooltip .tip-head { margin-bottom: 1px; }
/* 背包、角色視窗點一下道具的詳細資料（js/ui.js showDesc）：原版截圖是半透明黑底、1px 淺灰框，明體白字，窄框自動換行；詛咒的是紅字（老闆 11-04） */
html.orig #tooltip.desc { max-width: 156px; padding: 1px 3px 2px; background: rgba(0, 0, 0, 0.62); border: 1px solid #b8b8b8;
  font: 12px/15px var(--font); color: #fff; text-shadow: 1px 1px 0 #000; }
html.orig #tooltip.desc .tip-head { display: block; margin: 0; }
html.orig #tooltip.desc.cursed, html.orig #tooltip.desc.cursed b { color: #ff3a3a; }
html.orig #tooltip.desc.blessed, html.orig #tooltip.desc.blessed b { color: #f4f2be; }
/* 沒鑑定的名字是灰色（老闆 11-09「未鑑定我記得名稱會是灰色」；L1J 的道具顏色狀態「0:祝福 1:通常 2:詛咒 3:未鑑定」，
   L1JGO-Whale（台版 3.80C 實機）：未鑑定送 3，客戶端顯示暗灰色的名字。灰的深淺沒有原版畫面可量。
   11-14 開服一直有人問「看不到裝備數值」，老闆「字體是不是可以在灰色一點？不要接近白色」：中灰 #a0a0a0 改暗灰 #7c7c7c） */
html.orig #tooltip.desc.unid, html.orig #tooltip.desc.unid b { color: #7c7c7c; }
html.orig #tooltip.desc .tip-unid { color: #9a9a9a; font-size: 0.92em; margin-top: 2px; }
/*   電腦：說明框、滑鼠停著的名字、其他提示跟視窗一樣放大 --hk 倍（之前固定 12 像素，介面 1.89 倍時只有原版比例的一半大）。
     說明框照老闆 11-09 給的客戶端畫面（640 × 480 原尺寸）：12 點字一行 12 點高、框最寬 141 點（「可使用職業 : [黑暗妖精].」換行）、
     1 點淺灰框、字離框左 4 點、上 2 點、下 3 點，白字沒有影子 */
html.orig.pc #tooltip { font-size: calc(12px * var(--hk, 1)); }
html.orig.pc #tooltip.desc { max-width: calc(141px * var(--hk, 1)); padding: calc(2px * var(--hk, 1)) calc(4px * var(--hk, 1)) calc(3px * var(--hk, 1)); border-width: calc(1px * var(--hk, 1));
  font-size: calc(12px * var(--hk, 1)); line-height: calc(12px * var(--hk, 1)); text-shadow: none; }
html.orig.pc #name-tip { font-size: calc(12px * var(--hk, 1)); line-height: calc(14px * var(--hk, 1)); }
/* 滑鼠停在道具上：只有名字，白字黑邊、沒有框（js/ui.js showName；原版截圖「+9 力量魔法杖 (揮舞)」） */
#name-tip { position: fixed; z-index: 30; pointer-events: none; white-space: nowrap; color: #fff;
  font: 12px/14px var(--font); text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000, 1px 1px 0 #000; }
#name-tip.cursed { color: #ff3a3a; }
#name-tip.blessed { color: #f4f2be; }
#name-tip.unid { color: #7c7c7c; }

/* 交易：3.81 客戶端的古銅框（2018 底疊 2019 框，193 × 313；老闆 11-17「交易視窗界面 現在很醜」，3.81 找到的三種選了 B）。
   上面自己、下面對方，各 4 × 3 格（34 × 34），名字在格子上面那條；右上角紅色的 ✕ 是框上畫的（關閉）；最下面是同一組的 OK、Cancel 圖 */
html.orig #win-trade { width: 193px !important; height: 313px !important; background: var(--ui-trade381) 0 0 / 193px 313px no-repeat !important; }
html.orig.pc #win-trade { clip-path: none; }   /* 這張框沒有 1.82 那條透明的頁籤邊，不用切（js/ui.js 的 inStrip 看到 none 就不算） */
html.orig #win-trade .close { top: 13px; right: 4px; left: auto; width: 13px !important; height: 13px !important; background: none !important; }
html.orig #win-trade > .pad-s { display: none !important; }
html.orig #trade-theirs, html.orig #trade-mine { position: absolute; left: 23px; width: 136px; height: 102px; padding: 0 !important; display: grid !important; grid-template-columns: repeat(4, 34px) !important; grid-auto-rows: 34px; gap: 0 !important; overflow-y: auto; scrollbar-width: none; background: none !important; border: 0 !important; align-content: start; }
/* 上段是自己給對方的、下段是對方給自己的（客戶端說明 helptra、L1J S_TradeAddItem 0 上段／1 下段） */
html.orig #trade-mine { top: 47px; }
html.orig #trade-theirs { top: 171px; }
/* 按了 OK 的那一半：格子淡綠、名字那條右邊寫「已確認」（老闆 11-17「第一個人按下去ok要有反應」；js/ui.js refreshTrade） */
html.orig #win-trade.ok-mine #trade-mine, html.orig #win-trade.ok-theirs #trade-theirs { background: rgba(120, 230, 120, 0.17) !important; }
html.orig #win-trade .ot-name { position: absolute; left: 40px; width: 78px; height: 12px; line-height: 12px; font-size: 11px; color: #f0e6cc; overflow: hidden; white-space: nowrap; }
html.orig #win-trade .ot-name.mine, html.orig #win-trade .ot-ok.mine { top: 33px; }
html.orig #win-trade .ot-name.theirs, html.orig #win-trade .ot-ok.theirs { top: 157px; }
html.orig #win-trade .ot-ok { position: absolute; right: 34px; width: 40px; height: 12px; line-height: 12px; font-size: 11px; color: #8cf08c; text-align: right; white-space: nowrap; pointer-events: none; }
html.orig #win-trade .tele-foot { display: none; }   /* 金幣和別的東西一樣：電腦拖進交易視窗，手機點背包的金幣按「放上交易」；原版沒有這一格 */
html.orig #win-trade .npc-opts { display: contents; }   /* 裡面的確定、取消自己定位在視窗的最下面；這層不能再加位移 */
/* OK、Cancel：框最下面那塊（y 276～305）置中在格子下面（格子的中線 x 91）。字是圖：.o-ok、.o-cancel 的黃字這裡不用 */
html.orig #win-trade #trade-ok, html.orig #win-trade #trade-cancel { position: absolute; top: 282px; width: 53px !important; height: 17px !important; padding: 0 !important; font-size: 0 !important; color: transparent !important; text-decoration: none; }
html.orig #win-trade #trade-ok { left: 35px; background: var(--ui-t381-ok) 0 0 / 53px 17px no-repeat !important; }
html.orig #win-trade #trade-ok:hover:not(:disabled) { background: var(--ui-t381-ok-h) 0 0 / 54px 18px no-repeat !important; }
html.orig #win-trade #trade-ok:disabled { background-image: var(--ui-t381-ok-on) !important; opacity: 1; cursor: default; }   /* 按過了：按下去的樣子 */
html.orig #win-trade #trade-cancel { left: 94px !important; background: var(--ui-t381-cancel) 0 0 / 53px 17px no-repeat !important; }
html.orig #win-trade #trade-cancel:hover { background: var(--ui-t381-cancel-h) 0 0 / 54px 18px no-repeat !important; }

/* 倉庫：和背包同一張（532），4 × 8 格 */
html.orig #win-wh, html.orig #win-learn, html.orig #win-board, html.orig #win-map.o-map { border: 0 !important; border-image: none !important; overflow: visible !important; max-height: none !important; }
html.orig #win-wh:not(.hidden), html.orig #win-learn:not(.hidden), html.orig #win-board:not(.hidden), html.orig #win-map.o-map:not(.hidden) { display: block !important; }
html.orig #win-wh { width: 223px !important; height: 336px !important; background: var(--ui-inv) 0 0 / 223px 336px no-repeat !important; }
html.orig #win-wh .close { top: 3px; left: 4px; right: auto; }
html.orig #win-wh > .dim { display: none !important; }
html.orig #wh-grid { position: absolute; left: 45px; top: 21px; width: 144px; height: 288px; padding: 0 !important; margin: 0 !important; display: grid !important; grid-template-columns: repeat(4, 36px) !important; grid-auto-rows: 36px; gap: 0 !important; overflow-y: auto; scrollbar-width: none; background: none !important; border: 0 !important; align-content: start; }
html.orig #wh-grid::-webkit-scrollbar { display: none; }
html.orig #wh-grid .slot { width: 36px !important; height: 36px !important; background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
html.orig #wh-grid .slot:hover { background: rgba(255, 230, 160, 0.12) !important; }
html.orig.pc #win-wh .detail { display: none !important; }
html.orig.mobile #win-wh .detail { display: block !important; position: absolute; left: 0; top: 340px; width: 223px; background: rgba(12, 10, 8, 0.92); border: 1px solid #5a4a30; }
html.orig.mobile #win-wh .detail:empty { display: none !important; }

/* 學習魔法：和商店同一張購買清單（549）——S_SkillBuy 送的是可以學的魔法和單價，客戶端照購買的樣子選、算 Total、按 OK（C_SkillBuyOK）。
   528 那張（下面有 F5～F8 快捷格）是魔法視窗，不是學魔法的 */
html.orig #win-learn { width: 257px !important; height: 336px !important; background: var(--ui-shop) 0 0 / 257px 336px no-repeat !important; }
html.orig #win-learn .close { top: 6px; right: 7px; left: auto; }
html.orig #learn-body { position: absolute; left: 14px; top: 10px; width: 197px; height: 297px; max-height: none !important; overflow-y: auto; scrollbar-width: none; padding: 0 !important; }
html.orig #learn-body::-webkit-scrollbar { display: none; }
html.orig #learn-body .shop-row { height: 37.3px; padding: 0 4px 0 0 !important; margin: 0 !important; gap: 4px !important; border: 0 !important; background: none !important; display: flex; align-items: center; cursor: pointer; }
html.orig #learn-body .shop-row .icon { width: 35px; height: 35px; flex: none; margin: 0 !important; background: none !important; border: 0 !important; }
html.orig #learn-body .shop-row .grow { flex: 1; font-size: 11px; line-height: 13px; overflow: hidden; color: #f0e6cc; }
html.orig #learn-body .shop-row .price { font-size: 11px; color: #f0d27a; }
html.orig #learn-body .shop-row.on { background: rgba(240, 200, 110, 0.16) !important; box-shadow: inset 0 0 0 1px rgba(232, 199, 102, 0.55) !important; }
/* 何侖的學習魔法：每個魔法下面列四種材料，列高跟著內容 */
html.orig #learn-body .shop-row.learn-mat { height: auto; min-height: 37.3px; align-items: flex-start; padding: 2px 0 6px 0 !important; cursor: default; }
html.orig #learn-body .shop-row.learn-mat .grow { overflow: visible; min-width: 0; }
html.orig #learn-body .learn-mats { gap: 2px; margin-top: 2px; }
html.orig #learn-body .learn-mats button { height: auto; min-height: 0; padding: 1px 4px; font-size: 11px; line-height: 13px; color: #f0d27a; background: rgba(0, 0, 0, 0.35); border: 1px solid #6b5a3a; border-radius: 0; white-space: nowrap; cursor: pointer; }
html.orig #learn-body .learn-mats button:hover:not(:disabled) { border-color: #e8c766; color: #fff4d8; }
html.orig #learn-body .learn-mats button:disabled { color: #8a8070; border-color: #3e3424; cursor: default; }
#o-learn-total, #o-learn-ok { display: none; }
html.orig #o-learn-total { display: block; position: absolute; left: 48px; top: 315px; width: 138px; height: 14px; line-height: 14px; font-size: 11px; color: #f0d27a; overflow: hidden; }
html.orig #o-learn-total.poor { color: #e07060; }
html.orig #o-learn-ok { display: block; position: absolute; left: 193px; top: 315px; }   /* 確定（黃字，和 Total 同一行） */

/* 佈告欄、拍賣（670 有線的羊皮紙：字在 20,30～215,315） */
html.orig #win-board { width: 238px !important; height: 343px !important; background: var(--ui-board) 0 0 / 238px 343px no-repeat !important; }
html.orig #win-board .close { top: 12px; right: 14px; filter: drop-shadow(0 0 1px #000); }
html.orig #board-body { position: absolute; left: 20px; top: 32px; width: 196px; height: 282px; overflow-y: auto; scrollbar-width: none; padding: 0 !important; color: #2b2116 !important; font-size: 12px; }
html.orig #board-body::-webkit-scrollbar { display: none; }
html.orig #board-body * { color: #2b2116 !important; text-shadow: none !important; background-color: transparent !important; border-color: rgba(60, 40, 20, 0.35) !important; }
html.orig #board-body button { text-decoration: underline; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 3px !important; color: #5a2a10 !important; }
html.orig #board-body input, html.orig #board-body textarea { border: 1px solid rgba(60, 40, 20, 0.4) !important; }

/* 地圖：那個地方的原版羊皮紙地圖（js/ui.js openMap 設 --om） */
html.orig #win-map.o-map { width: 257px !important; height: 336px !important; background: var(--om) 0 0 / 100% 100% no-repeat !important; }
html.orig #win-map.o-map .map-wrap { display: none !important; }
html.orig #win-map.o-map .close { top: 6px; right: 7px; }
/*   電腦：羊皮紙地圖、佈告欄也是原版 640 × 480 那一張的一部分，和背包一起放大 --hk 倍
     （畫面檢查 11-09：1280 × 909 時背包 1.515 倍，隱藏之谷的地圖還是 257 × 336，只有背包的三分之二大） */
html.orig.pc #win-map.o-map, html.orig.pc #win-board { zoom: var(--hk, 1); }
/* 世界地圖（地圖:大陸全圖，css/style.css #win-world）：電腦照一般視窗的石框，放在主介面（下面那條）上面，不蓋住體力、魔力；
   手機接近滿版，石框左右要 60 點太佔位置，改細的金邊，Close 在地圖右上角 */
html.orig.pc.classic:not(.o-prev) #win-world { top: calc(var(--f-top) + 8px); height: calc(100vh - 2 * var(--f-top) - var(--hh) * var(--hk) - 16px); width: min(1300px, calc(100vw - 2 * var(--f-left) - 40px)); transform: translateX(-50%); }
/*   石框、Close、按鈕、字和其他視窗一樣放大 --hk 倍（其他視窗是整個 zoom；這裡地圖要照實際的點算拖曳、縮放，只放大框和字） */
html.orig.pc #win-world { --wk: var(--hk, 1);
  border-width: calc(17px * var(--wk)) calc(47px * var(--wk)) calc(20px * var(--wk)) calc(13px * var(--wk)) !important;
  border-image: var(--ui-frame) 5.06% 18.29% 5.95% 5.06% fill / calc(17px * var(--wk)) calc(47px * var(--wk)) calc(20px * var(--wk)) calc(13px * var(--wk)) stretch !important; }
html.orig.pc #win-world .close { top: calc(-12px * var(--wk)); right: calc(-41px * var(--wk)); width: calc(28px * var(--wk)) !important; height: calc(15px * var(--wk)) !important; }
html.orig.mobile #win-world { border: 2px solid #c9a24e !important; border-image: none !important; background: #0c0906 !important; box-shadow: 0 0 0 1px #000 !important; }
html.orig.mobile #win-world .close { top: 8px; right: 8px; }

/* 手機：這些視窗也放在上面置中 */
html.orig.mobile #win-wh, html.orig.mobile #win-learn, html.orig.mobile #win-board, html.orig.mobile #win-map.o-map {
  left: 50% !important; right: auto !important; top: calc(6px + var(--st, 0px)) !important; bottom: auto !important; transform: translateX(-50%) !important;
}

/* 確定、取消（詢問視窗、學魔法的清單、手機的商店）：底線黃字，和商人對話的「買」「賣」、原版頁的「返回」一樣。
   老闆 11-11 看了決鬥的詢問視窗「這種奇怪的按鈕 太醜了」「沒有原版或不確定 直接跟買賣一樣 底線黃字就好」：
   之前是客戶端的 OK 框圖（40 × 23）和台版的「取消」圖（91 × 24；11-09 英文 CANCEL 那一版老闆也不要）。
   原版清單視窗本身的 O.K.／Cancel（商店、倉庫、寵物清單，電腦版）、交易視窗的照舊是圖 */
html.orig .o-ok, html.orig .o-cancel { width: auto !important; height: auto !important; min-width: 0 !important; min-height: 0 !important; padding: 2px 8px !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  background: none !important; font: inherit !important; color: #f8f8b8 !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
html.orig .o-ok:hover, html.orig .o-cancel:hover { color: #fff !important; }
/*   詢問視窗一打開游標就停在「確定」（按 Enter 就是確定）：瀏覽器的白色焦點框不要，字變白就好 */
html.orig :is(.o-ok, .o-cancel):is(:focus, :focus-visible) { outline: none !important; color: #fff !important; }
html.orig :is(#o-learn-ok, #o-shop-ok).o-ok { font-size: 11px !important; line-height: 14px !important; padding: 0 6px !important; }

/* 商店（549：一列 37，圖示 14～49、名稱 51～210，8 列從 10 開始；下面 Total） */
html.orig #win-shop { width: 257px !important; height: 336px !important; background: var(--ui-shop) 0 0 / 257px 336px no-repeat !important; }
html.orig #win-shop .close { top: 6px; right: 7px; }
html.orig #win-shop .tabs { position: absolute; left: 60px; top: 313px; display: flex; gap: 4px; padding: 0 !important; border: 0 !important; }
html.orig #win-shop .tabs .tab { height: 16px; padding: 0 8px; font-size: 11px; line-height: 16px; }
html.orig #shop-body { position: absolute; left: 14px; top: 10px; width: 197px; height: 297px; overflow-y: auto; scrollbar-width: none; padding: 0 !important; }
html.orig #shop-body::-webkit-scrollbar { display: none; }
html.orig #shop-body .shop-row { height: 37.3px; padding: 0 4px 0 0 !important; margin: 0 !important; gap: 4px !important; border: 0 !important; background: none !important; display: flex; align-items: center; }
html.orig #shop-body .shop-row .icon { width: 35px; height: 35px; flex: none; margin: 0 !important; background: none !important; border: 0 !important; }
html.orig #shop-body .shop-row .grow { font-size: 11px; line-height: 13px; overflow: hidden; }
html.orig #shop-body .shop-row .price { font-size: 11px; color: #f0d27a; }
html.orig #shop-body .shop-row button { height: 18px; padding: 0 5px; font-size: 11px; }
html.orig #shop-body > .pad { display: none; }
/* 商人的商店：下面 Total 的總價、右下角 OK（底圖分隔線右邊那格） */
#o-shop-total, #o-shop-ok { display: none; }
html.orig #win-shop.o-npcshop #o-shop-total { display: block; position: absolute; left: 48px; top: 315px; width: 138px; height: 14px; line-height: 14px; font-size: 11px; color: #f0d27a; overflow: hidden; }
html.orig #win-shop.o-npcshop #o-shop-total.poor { color: #e07060; }
html.orig #win-shop.o-npcshop #o-shop-ok { display: block; position: absolute; left: 193px; top: 315px; }
html.orig #win-shop.o-npcshop .shop-row { cursor: pointer; }
html.orig #win-shop.o-npcshop .shop-row .grow { flex: 1; }
html.orig #win-shop.o-npcshop .shop-row.cant b { color: #8a8070; }

/* 領回寵物（S_PetList，和倉庫領出同一種清單；老闆 11-04 的原版截圖）：商店的底圖，一列是圖示、「項圈 [Lv.24 名字]」，名字下面右邊 ▼ 0 ▲；
   下面 Total 是要付的錢／身上的金幣，右邊 O.K.、Cancel。截圖右上角的 數量/100 這張底圖沒有地方放，不放 */
#o-pet-ok, #o-pet-cancel { display: none; }
html.orig #win-shop.o-petlist #o-shop-ok { display: none; }
/*   商人的商店也是這一種（老闆 11-07 的購買介面截圖：名稱下面右邊是價格和 ▼ 0 ▲，Total 是總價／身上的金幣） */
html.orig #win-shop:is(.o-petlist, .o-npcshop) .shop-row .grow { position: relative; height: 35px; overflow: visible; font: 12px/18px var(--font); }
html.orig #win-shop:is(.o-petlist, .o-npcshop) .shop-row .grow b { font-weight: normal; color: #d4d4c8; white-space: nowrap; }
html.orig #win-shop:is(.o-petlist, .o-npcshop) .pet-step { position: absolute; right: 2px; bottom: 2px; display: flex; align-items: center; gap: 5px; font: 11px/12px var(--font); color: #fff; }
html.orig #win-shop.o-npcshop .pet-step .price { margin-right: 3px; font: inherit; color: #fff; }
html.orig #win-shop:is(.o-petlist, .o-npcshop) .pet-step i { display: block; width: 12px; height: 12px; cursor: pointer; background: 0 0 / 12px 12px no-repeat; }
html.orig #win-shop:is(.o-petlist, .o-npcshop) .pet-step .up { background-image: var(--ui-arr-up); }
html.orig #win-shop:is(.o-petlist, .o-npcshop) .pet-step .up:hover { background-image: var(--ui-arr-up-on); }
html.orig #win-shop:is(.o-petlist, .o-npcshop) .pet-step .dn { background-image: var(--ui-arr-dn); }
html.orig #win-shop:is(.o-petlist, .o-npcshop) .pet-step .dn:hover { background-image: var(--ui-arr-dn-on); }
html.orig #win-shop:is(.o-petlist, .o-npcshop) .pet-step .o-n { width: 44px; height: 13px; font: 11px/12px var(--font); }
html.orig #win-shop:is(.o-petlist, .o-npcshop) #o-shop-total { font: 11px/14px var(--font); color: #fff; }
/*   商人的商店照原版的圖（老闆 11-08「要跟原版一模一樣」）：價格前面金幣的符號 325（12 × 12），▲ 554（按下 555）、▼ 556（按下 557），10 × 11；
     數量是一般的字（打數量時也一樣，沒有框）。數量不是 0 的列，文字那格變深藍色
     （天堂經典版的商店截圖，巴哈 84452 2026-03：空格約 rgb(41,37,36)，選了的約 rgb(30,34,70)） */
html.orig #win-shop.o-npcshop .shop-row.on .grow { background: rgba(19, 31, 104, 0.5); }
html.orig #win-shop.o-npcshop .pet-step { gap: 4px; }
/*   價錢前面的金幣符號：客戶端 325（金色的斜體 A，透明底），緊貼著數字。老闆 11-11 給原版商店截圖（「A63」「A1,035」）：「價格前面是這符號，現在的超醜」——
     之前沿用一般介面的 .coin（圓形、深色外框、往右蓋到數字），325 被裁成圓的、外面多一圈環 */
html.orig #win-shop.o-npcshop .pet-step .coin { width: 12px; height: 12px; margin-right: -4px; border-radius: 0; box-shadow: none; cursor: default; background: var(--ui-coin) 0 0 / 12px 12px no-repeat; }
html.orig #win-shop.o-npcshop .pet-step .price { min-width: 0; margin-right: 2px; }
html.orig #win-shop.o-npcshop .pet-step :is(.up, .dn) { width: 10px; height: 11px; background-size: 10px 11px; }
html.orig #win-shop.o-npcshop .pet-step .up, html.orig #win-shop.o-npcshop .pet-step .up:hover { background-image: var(--ui-list-up); }
html.orig #win-shop.o-npcshop .pet-step .up:active { background-image: var(--ui-list-up-p); }
html.orig #win-shop.o-npcshop .pet-step .dn, html.orig #win-shop.o-npcshop .pet-step .dn:hover { background-image: var(--ui-list-dn); }
html.orig #win-shop.o-npcshop .pet-step .dn:active { background-image: var(--ui-list-dn-p); }
html.orig #win-shop.o-npcshop .pet-step .o-n { width: 4ch; min-width: 0; height: 12px; padding: 0 !important; margin: 0; flex: none; border: 0 !important; border-radius: 0; background: none !important; box-shadow: none !important; outline: none;
  font: 11px/12px var(--font); color: #fff; text-align: center; caret-color: #fff; }
/*   電腦的清單視窗（商店買、賣，倉庫存放、領出，領回寵物）同一套大小（老闆 11-15「存放/領取倉庫 超級難用…輸入也難輸入 按也難按」「按鈕也很小」
     「每個相同介面應該都要一套操作方式」；操作是 js/ui.js bindQtyList）：箭頭 10 → 16 點（原版的圖放大）、數量一個看得出可以打字的框（之前是沒有框的字，
     點不太到）、字大一點。放在那一列的右下角，和原版一樣 */
html.orig.pc #win-shop:is(.o-npcshop, .o-petlist) .pet-step { gap: 5px; font-size: 12px; }
html.orig.pc #win-shop:is(.o-npcshop, .o-petlist) .pet-step :is(.up, .dn) { width: 16px; height: 17px; background-size: 16px 17px; image-rendering: pixelated; }
html.orig.pc #win-shop:is(.o-npcshop, .o-petlist) .pet-step .o-n { width: 52px; height: 17px; padding: 0 3px !important; box-sizing: border-box; flex: none; text-align: center; font: 13px/15px var(--font); color: #fff;
  background: rgba(0, 0, 0, 0.55) !important; border: 1px solid #7a6436 !important; border-radius: 2px; outline: none; cursor: text; caret-color: #fff; }
html.orig.pc #win-shop:is(.o-npcshop, .o-petlist) .pet-step .o-n:focus { border-color: #ffd870 !important; }
html.orig.pc #win-shop:is(.o-npcshop, .o-petlist) .shop-row.on .pet-step .o-n { color: #ffe08a; }
/*   手機（老闆 11-10「拿掉金幣前的符號」「數量的數字太大」「購買東西的體驗太差 要重新設計 點擊之後跳出新的UI界面 可以上下可以調整以及輸入數量」）：
     清單只有圖示、名稱、價錢，點那一列跳出數量視窗（js/ui.js qtyPop，css/style.css #qty-pop）；沒有金幣符號、▼ 數量 ▲、Total */
html.orig.mobile #win-shop:is(.o-npcshop, .o-petlist) .pet-step :is(.coin, .up, .dn, .o-n) { display: none; }
html.orig.mobile #win-shop:is(.o-npcshop, .o-petlist) .pet-step .price { font-size: 12px; color: #f0d27a; }
html.orig.mobile #win-shop:is(.o-npcshop, .o-petlist) #o-shop-total { display: none; }
/*   底圖下面那條：Total 的深色欄到 x 190，斜線隔開，右邊小格 195～235。O.K. 是原版的圖 560（亮的 561），貼在深色欄右端；Cancel 是 558（亮的 559），在小格裡（老闆 11-04 的原版截圖）。
     電腦的商人商店是同一種視窗，一樣用這兩個 */
html.orig.pc #win-shop.o-npcshop #o-shop-total { width: 112px; }
html.orig.pc #win-shop.o-npcshop :is(#o-pet-ok, #o-shop-ok, #o-pet-cancel) { position: absolute; top: 315px; height: 14px !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; font-size: 0 !important; color: transparent !important; cursor: pointer; }
html.orig.pc #win-shop.o-npcshop :is(#o-pet-ok, #o-shop-ok) { left: 164px; width: 24px !important; background: var(--ui-list-ok) 0 0 / 24px 14px no-repeat !important; }
html.orig.pc #win-shop.o-npcshop :is(#o-pet-ok, #o-shop-ok):hover { background-image: var(--ui-list-ok-h) !important; }
html.orig.pc #win-shop.o-npcshop #o-pet-cancel { display: block; left: 198px; width: 35px !important; background: var(--ui-list-cancel) 0 0 / 35px 14px no-repeat !important; }
html.orig.pc #win-shop.o-npcshop #o-pet-cancel:hover { background-image: var(--ui-list-cancel-h) !important; }
html.orig.pc #win-shop.o-petlist #o-pet-ok { display: block; }
/*   手機的倉庫清單（存放、取出：js/ui.js showWarehouse，11-10 起手機也用清單；之前手機開成倉庫格子＋背包，存不進去）、領回寵物：
     和電腦一樣的 O.K.、Cancel，按得到的範圍往外加大（手指）；單獨開（沒有背包並排）時置中、照螢幕放大（--solo-k，js/ui.js fitDual） */
html.orig.mobile #win-shop.o-petlist :is(#o-pet-ok, #o-pet-cancel) { display: block; position: absolute; top: 315px; height: 14px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; font-size: 0 !important; color: transparent !important; }
html.orig.mobile #win-shop.o-petlist :is(#o-pet-ok, #o-pet-cancel)::before { content: ''; position: absolute; inset: -12px -6px; }
html.orig.mobile #win-shop.o-petlist #o-pet-ok { left: 164px; width: 24px !important; background: var(--ui-list-ok) 0 0 / 24px 14px no-repeat !important; }
html.orig.mobile #win-shop.o-petlist #o-pet-ok:active { background-image: var(--ui-list-ok-h) !important; }
html.orig.mobile #win-shop.o-petlist #o-pet-cancel { left: 198px; width: 35px !important; background: var(--ui-list-cancel) 0 0 / 35px 14px no-repeat !important; }
html.orig.mobile #win-shop.o-petlist #o-pet-cancel:active { background-image: var(--ui-list-cancel-h) !important; }
html.orig.mobile:has(#win-shop.o-petlist:not(.hidden)):not(:has(#win-inv:not(.hidden))) #win-shop { left: 50% !important; right: auto !important; transform: translateX(-50%) scale(var(--solo-k, 1)) !important; transform-origin: top center; }

/* NPC 對話（656 羊皮紙：字在 20,40～215,290） */
/* NPC 對話：原版的石框（frame，257 × 336：內框 13,17～210,317，右邊的骨頭捲軸、右上角 Close 是圖上的；原版的 NPC 對話就是這個框）。
   第一行「名字:」，下面對話，再下面選項（底線） */
html.orig #win-npc { width: 257px !important; height: 336px !important; max-width: none !important; background: var(--ui-frame) 0 0 / 257px 336px no-repeat !important; }
html.orig #win-npc .close { top: 5px; right: 6px; left: auto; }
html.orig #win-npc .win-head > #npc-title { display: block !important; position: absolute; left: 20px; top: 22px; font-size: 12px !important; line-height: 17px; color: #f4f0e6 !important; text-shadow: 0 1px 1px #000; }
html.orig #win-npc #npc-title::after { content: ':'; }
html.orig #npc-text { position: absolute; left: 20px; top: 42px; width: 184px; height: 192px; overflow-y: auto; scrollbar-width: none; padding: 0 !important; color: #e8e4d8 !important; font-size: 12px; line-height: 17px; text-shadow: 0 1px 1px #000; }
html.orig #npc-text::-webkit-scrollbar { display: none; }
html.orig #npc-text .dim { color: #a8a090 !important; }
html.orig #win-npc .npc-opts { position: absolute; left: 20px; top: 240px; width: 184px; height: 72px; overflow-y: auto; scrollbar-width: none; padding: 0 !important; display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 2px !important; }
/* 可以點的字一律是 NPC 連結的淡黃 #f8f8b8（老闆 11-11「統一視窗文字顏色，現在可以點的文字有的橘色有的黃色，都要是黃色」；之前這幾組是偏橘的 #f0d070） */
html.orig #win-npc .npc-opts button { flex: none; background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; color: #f8f8b8 !important; font-size: 12px; text-align: left; text-decoration: underline; text-shadow: 0 1px 1px #000 !important; }
html.orig #win-npc .npc-opts button:hover { color: #fff !important; }
/*   選項很多（羅德尼賣狗）：對話縮短，選項往上長；不然折成框外看不見的第二欄 */
html.orig #win-npc:has(#npc-opts > button:nth-child(7)) #npc-text { height: 62px; }
html.orig #win-npc:has(#npc-opts > button:nth-child(7)) .npc-opts { top: 110px; height: 202px; }
/* 原版的對話頁（js/ui.js origNpcHtml）：名字在原文的第一行；字淺灰、原文指定的顏色照用；連結底線；沒有下面的按鈕時對話一直排到框底 */
html.orig #win-npc.o-html .win-head > #npc-title { display: none !important; }
html.orig #win-npc.o-html #npc-text { top: 22px; height: 212px; color: #b8b8c0 !important; }
html.orig #win-npc.o-html:has(#npc-opts:empty) #npc-text { height: 290px; }
/*   空的按鈕列不能蓋在對話上：不然頁底的連結點不到 */
html.orig #win-npc .npc-opts:empty { display: none; }
/* 對話視窗裡的清單（修理武器、領回寵物）：窄框裡圖示、名字、價錢、按鈕排一列，按鈕像連結 */
html.orig #npc-text .shop-row { gap: 4px; padding: 2px 0; }
html.orig #npc-text .shop-row .icon { width: 32px; height: 32px; flex: none; }
html.orig #npc-text .shop-row .grow { min-width: 0; font-size: 11px; line-height: 14px; }
html.orig #npc-text .shop-row .price { min-width: 0; color: #f0d070; }
html.orig #npc-text .shop-row button { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; color: #f8f8b8 !important; font-size: 12px; text-decoration: underline; text-shadow: 0 1px 1px #000 !important; }
html.orig #npc-text .shop-row button:hover { color: #fff !important; }
html.orig #npc-text .shop-row button:disabled { color: #8a8070 !important; text-decoration: none; }
html.orig #win-npc.o-html #npc-text p { margin: 0; }
/*   原版頁的連結：淡黃色、沒有底線（老闆 11-04 的原版截圖：漢斯的「保管動物」「競技場」量起來約 #f8f8b8；內文淺灰約 #b8b8c0） */
html.orig #win-npc .o-link { color: #f8f8b8; text-decoration: none; cursor: pointer; }
html.orig #win-npc .o-link:hover { color: #fff; }
/*   商人的「買」「賣」（客戶端 312、314 換成的字，js/ui.js TXT）：加底線、兩個字分開一點；下面那行（詢問最近的市價）往下一點
     （老闆 11-10「詢問最近市價再下來一點 買賣再稍微開一點 加上底線看看」） */
html.orig #win-npc .o-link.o-buysell { text-decoration: underline; text-underline-offset: 3px; margin: 0 10px; }
html.orig #win-npc.o-html #npc-text p:has(> .o-buysell) { margin-bottom: 14px; }
/*   商人的頁（js/ui.js 把頁分成三段：.o-body 說的話、.o-mid 買賣、.o-foot 後面的連結）：買賣在說的話和下面之間置中，
     買在左半邊、賣在右半邊；詢問最近的物價貼左下角（老闆 11-12「買賣與上面段落文字太近了，要在視窗中間左右，物價詢問應該在左下角」） */
html.orig #win-npc.o-html #npc-text:has(> .o-mid) { display: flex; flex-direction: column; }
html.orig #win-npc.o-html #npc-text > .o-body { flex: none; }
html.orig #win-npc.o-html #npc-text > .o-mid { flex: none; display: flex; justify-content: space-evenly; margin: auto 0; padding: 16px 0; }
html.orig #win-npc.o-html #npc-text > .o-mid .o-link.o-buysell { margin: 0; }
/*   手機：「買」「賣」只有 12 × 17 點，手指很難點中（服務台 11-16 白袍巫師，iPhone 在奇岩武器店「只能賣 買沒有反應」）：
     外面加一圈看不見的範圍（上下 14、左右 30；兩個字左右分開，範圍不會重疊），和垃圾桶一樣，畫面不變 */
html.orig.mobile #win-npc .o-link.o-buysell { position: relative; }
html.orig.mobile #win-npc .o-link.o-buysell::after { content: ''; position: absolute; top: -14px; right: -30px; bottom: -14px; left: -30px; }
html.orig #win-npc.o-html #npc-text > .o-foot { flex: none; text-align: left; padding-bottom: 2px; }
html.orig #win-npc.o-html #npc-text > .o-foot:empty { display: none; }
html.orig #win-npc .o-dead { color: #8a8678; }
/* 好友名單（/好友）在線的名字：亮綠（服務台 11-18「哪幾位好友在線」；原版的頁只有在線人數） */
html.orig #win-npc .buddy-on { color: #7cff7c; }
html.orig #win-npc .o-img { display: inline-block; vertical-align: middle; margin: 2px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: var(--i) 0 0 / 100% 100% no-repeat; cursor: pointer; }
html.orig #win-npc .o-img:hover { background-image: var(--ih); }

/* 隊伍、寵物、瞬間移動（記憶座標）、變身清單：原版都是 NPC 對話的頁（L1J S_Party「party」、寵物「anicom」、S_ShowPolyList「monlist」），
   和 NPC 對話用同一個石框（frame，257 × 336；內框 20～204、Close 在右上角）：淺灰的字，能點的是金黃色底線，等級不到的灰掉；下面一排是選項 */
html.orig #win-party, html.orig #win-pet, html.orig #win-tele, html.orig #win-poly {
  width: 257px !important; height: 336px !important; max-width: none !important; max-height: none !important; overflow: visible !important;
  border: 0 !important; border-image: none !important; background: var(--ui-frame) 0 0 / 257px 336px no-repeat !important; display: block !important;
}
html.orig #win-party.hidden, html.orig #win-pet.hidden, html.orig #win-tele.hidden, html.orig #win-poly.hidden { display: none !important; }
html.orig.mobile #win-party, html.orig.mobile #win-pet, html.orig.mobile #win-tele, html.orig.mobile #win-poly {
  left: 50% !important; right: auto !important; top: calc(6px + var(--st, 0px)) !important; bottom: auto !important; transform: translateX(-50%) !important;
}
html.orig #win-party .close, html.orig #win-pet .close, html.orig #win-tele .close, html.orig #win-poly .close { top: 5px; right: 6px; left: auto; }
html.orig #party-body, html.orig #pet-body, html.orig #tele-body, html.orig #poly-body {
  position: absolute; left: 20px; top: 22px; width: 184px; height: 212px; margin: 0 !important; padding: 0 !important; overflow-y: auto; scrollbar-width: none;
  background: none !important; border: 0 !important; color: #d0ccc0 !important; font-size: 12px; line-height: 17px; text-shadow: 0 1px 1px #000;
}
html.orig #poly-body { height: 290px; max-height: none !important; }   /* 變身清單沒有下面的選項：整個框都是清單（解除變身在最下面） */
html.orig #poly-body .poly-list { padding: 0 !important; scrollbar-width: none; }
html.orig #poly-body .poly-list::-webkit-scrollbar { display: none; }
html.orig #poly-body .poly-lv { margin: 6px 0 2px !important; font-size: 12px; }
html.orig #poly-body .poly-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 0 6px !important; }
html.orig #poly-body .poly-pick { padding: 1px 0 !important; font-size: 12px; text-align: left; }
html.orig #party-body::-webkit-scrollbar, html.orig #pet-body::-webkit-scrollbar, html.orig #tele-body::-webkit-scrollbar, html.orig #poly-body::-webkit-scrollbar { display: none; }
html.orig :is(#party-body, #pet-body, #tele-body, #poly-body) * { color: #d0ccc0 !important; text-shadow: 0 1px 1px #000 !important; background-color: transparent !important; border-color: rgba(220, 210, 190, 0.18) !important; box-shadow: none !important; }
html.orig :is(#party-body, #pet-body, #tele-body, #poly-body) button { color: #f8f8b8 !important; background: none !important; border: 0 !important; padding: 1px 2px !important; text-decoration: underline; }
/* 瞬間移動（電腦）：照說明頁 helpmag11、helpmgc11，視窗只列記憶過的場所名稱，點兩下過去、選了按 Delete 刪掉；記憶用 /bookmark */
html.orig.pc #tele-body > .pad-s, html.orig.pc #tele-body .shop-row .dim, html.orig.pc #tele-body .shop-row button, html.orig.pc #win-tele .tele-foot { display: none !important; }
html:not(.orig.pc) .tele-rnd { display: none !important; }
html.orig :is(#party-body, #pet-body, #tele-body, #poly-body) button:hover { color: #fff !important; }
html.orig :is(#party-body, #pet-body, #tele-body, #poly-body) :disabled, html.orig :is(#party-body, #pet-body, #tele-body, #poly-body) .dim { color: #8a8678 !important; text-decoration: none; }
html.orig #win-party .npc-opts, html.orig #win-pet .npc-opts, html.orig #win-tele .tele-foot {
  position: absolute; left: 20px; top: 240px; width: 184px; height: 72px; overflow-y: auto; scrollbar-width: none; margin: 0 !important; padding: 0 !important;
  display: flex; flex-wrap: wrap; align-items: flex-start; align-content: flex-start; gap: 2px 8px !important; background: none !important; border: 0 !important;
}
html.orig :is(#win-party .npc-opts, #win-pet .npc-opts, #win-tele .tele-foot) button { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; color: #f8f8b8 !important; font-size: 12px; text-decoration: underline; text-shadow: 0 1px 1px #000 !important; }
html.orig :is(#win-party .npc-opts, #win-pet .npc-opts, #win-tele .tele-foot) button:hover { color: #fff !important; }
/* 社交視窗（老闆 11-18 經典版）：第一行標題白字（同 NPC 頁的標題），選項一行一個金黃底線；說明淺灰小字。
   電腦從這裡開的血盟資訊、隊伍頁（win-npc）放在社交視窗右邊，兩個並排 */
html.orig #party-body .soc-title { color: #f4f0e6 !important; margin: 0 0 8px; }
html.orig #party-body .soc-opt { margin: 0 0 4px; }
html.orig #party-body .soc-opt button { font-size: 12px; text-align: left; }
html.orig #party-body .soc-note { margin: 6px 0; font-size: 11px; line-height: 15px; }
html.orig.pc:has(#win-party:not(.hidden)) #win-npc { left: calc(var(--o-left) / var(--hk, 1) + 262px) !important; }
/* 電腦的寵物視窗（老闆 11-04 的截圖）：台版圖 1171c（寵物，179 × 275）、1196c（召喚獸），不是對話的石框。
   值寫在圖上的字後面（名字、等級 66、經驗值 118、目前狀態、飽食度 61、防禦 128）；體力、魔力條 1172c、1173c 照比例在 54,57／54,72；
   善惡 1174c～1176c 在 22,87；命令的格子 34 × 34：寵物 4 × 2 從 19,190，召喚獸 3 × 2 從 37,169（圖示 32 × 32，滑鼠移上去換亮的那張）；
   關閉是 1177（亮的 1178） */
/*   1.82（亞丁開放前）的寵物選單是對話視窗的 anicom 頁（js/ui.js openPetPage），這個視窗是亞丁開放後才用。
     寵物裝備跟著亞丁開放（.o-equip，整張圖）；沒有裝備時拿掉「裝備、防禦」那一列和 4 格（圖的 127～176），上下兩段接起來，高 225 */
html.orig.pc #win-pet { width: 179px !important; height: 225px !important; background: var(--ui-petwin-top) 0 0 / 179px 127px no-repeat, var(--ui-petwin-bot) 0 127px / 179px 98px no-repeat !important; }
html.orig.pc #win-pet.o-equip { height: 275px !important; background: var(--ui-petwin) 0 0 / 179px 275px no-repeat !important; }
html.orig.pc #win-pet.o-sum { height: 275px !important; background: var(--ui-sumwin) 0 0 / 179px 275px no-repeat !important; }
html.orig.pc #win-pet .close { top: 6px; right: 6px; width: 13px !important; height: 13px !important; background: var(--ui-pet-x) 0 0 / 13px 13px no-repeat !important; }
html.orig.pc #win-pet .close::after { content: none; }
html.orig.pc #win-pet .close:hover { filter: none; background-image: var(--ui-pet-x-h) !important; }
html.orig.pc #pet-body, html.orig.pc #win-pet .npc-opts { position: absolute; inset: 0; width: auto; height: auto; overflow: visible; display: block; }
html.orig.pc #win-pet .npc-opts { pointer-events: none; }
html.orig.pc #win-pet .npc-opts button { pointer-events: auto; }
/*   字照老闆的截圖：值是 12 像素的細明體、淺灰（約 #d0d0c4）、沒有陰影；體力、魔力條上的數字是小的粗體白字 */
html.orig.pc #pet-body .pv { position: absolute; height: 13px; font: 12px/13px var(--font) !important; color: #d4d4c8 !important; text-shadow: none !important; white-space: nowrap; }
html.orig.pc #pet-body .pv.rename { cursor: pointer; }
html.orig.pc #pet-body .pbar { position: absolute; left: 54px; width: 96px; height: 14px; }
html.orig.pc #pet-body .pbar i { position: absolute; left: 0; top: 0; bottom: 0; background-repeat: no-repeat !important; background-position: 0 0 !important; background-size: 96px 14px !important; }
html.orig.pc #pet-body .pbar.hp i { background-image: var(--ui-pet-hp) !important; }
html.orig.pc #pet-body .pbar.mp { height: 13px; }
html.orig.pc #pet-body .pbar.mp i { background-image: var(--ui-pet-mp) !important; background-size: 96px 13px !important; }
html.orig.pc #pet-body .pbar span { position: absolute; left: 26px; top: 0; font: bold 9px/14px Tahoma, Verdana, sans-serif !important; color: #fff !important; text-shadow: none !important; letter-spacing: 0; }
html.orig.pc #pet-body .pal { position: absolute; left: 22px; top: 87px; width: 29px; height: 13px; background: var(--i) 0 0 no-repeat !important; }
html.orig.pc #win-pet .npc-opts button.pcmd { position: absolute; width: 32px !important; height: 32px !important; padding: 0 !important; margin: 0 !important; background: var(--i) 0 0 / 32px 32px no-repeat !important; font-size: 0 !important; text-decoration: none; }
html.orig.pc #win-pet .npc-opts button.pcmd:hover { background-image: var(--ih) !important; }
/*   裝備的 4 格（亞丁開放後）：牠身上的寵物裝備，穿著的格子亮一圈 */
html.orig.pc #pet-body button.pitem { position: absolute; width: 32px !important; height: 32px !important; padding: 0 !important; margin: 0; text-decoration: none; cursor: pointer; }
html.orig.pc #pet-body button.pitem img { display: block; width: 32px; height: 32px; }
html.orig.pc #pet-body button.pitem.on { box-shadow: inset 0 0 0 1px #e8c860 !important; }
html.orig #win-tele .tele-foot input { width: 100px; height: 16px; padding: 0 3px; font-size: 11px; color: #f0ead8; background: rgba(0, 0, 0, 0.45); border: 1px solid rgba(220, 210, 190, 0.3); border-radius: 0; }
/*   手機：名字框自己一行（style.css 的 flex: 1 把它擠到 48 點，提示字「記憶名稱」只看得到「記憶名」，11-11 記憶座標實測），兩個鈕排下一行 */
html.orig #win-tele .tele-foot input { flex: 1 1 100%; }
/* ── 選擇角色（310 的背景、104 的資料欄、原版的欄位動畫在 js/ui.js drawSelectOrig）── */
html.orig.pc #select { background: #000 var(--ui-login-bg) center / auto 100% no-repeat !important; }
/* ── 創造角色（310：640 × 480，左邊捲軸寫職業說明，下面的紅緞帶封印是「開始冒險」；--ck 由 js/ui.js 照畫面算）── */
html.orig #create { background: #000 !important; }
html.orig #create .create-panel {
  position: relative; flex: none; width: 640px !important; height: 480px !important; max-width: none !important; padding: 0 !important; margin: 0 !important;
  background: var(--ui-select-bg) 0 0 / 640px 480px no-repeat !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
  transform: scale(var(--ck, 1)); transform-origin: center;
}
/* 排法照原版 1.63 台版的截圖（老闆提供）：左邊捲軸是職業說明；中間角色，左右兩排職業圖示（王族、騎士在左，妖精、法師在右），
   下面左 ♂ 右 ♀；再下面中文的能力值、骰子、角色命名，右下「確認」「取消」是字 */
html.orig #create h1, html.orig #create .gap, html.orig #btn-roll { display: none !important; }
html.orig #create .create-main, html.orig #create .btns { display: contents !important; }
html.orig #create-desc, html.orig #create-bonus, html.orig #create-hpmp { position: absolute; left: 40px; width: 210px; margin: 0 !important; color: #2b2116 !important; text-shadow: none !important; font-size: 13px; line-height: 17.4px; text-align: left; }
html.orig #create-desc { top: 52px; }
/* 原版的職業說明（js/ui.js；Text.pak 的原文）：照原本的分行、每行置中，捲軸裝不下的部分用滾輪往下看 */
html.orig #create.o-text #create-bonus, html.orig #create.o-text #create-hpmp { display: none; }
html.orig #create.o-text #create-desc { height: 312.5px; overflow-y: auto; scrollbar-width: none; font-family: var(--o-serif); font-weight: 500; font-size: 11px; line-height: 12.5px; }   /* 字的大小、行距照經典版的捲軸 */
html.orig #create.o-text #create-desc::-webkit-scrollbar { display: none; }
html.orig #create.o-text .o-desc { white-space: pre; text-align: center; }
html.orig #create-bonus { top: 236px; font-size: 12px; color: #5a4430 !important; }
html.orig #create-hpmp { top: 318px; font-weight: bold; }
/* 職業：原版的四個圖示（暗的、選到亮的），照原圖大小排在角色左右；深色底透出背景 */
html.orig #create .choice { position: absolute; left: 0; top: 0; width: 0; height: 0; margin: 0 !important; display: block !important; }
html.orig #create [data-cls], html.orig #create [data-gender] { position: absolute; padding: 0 !important; border: 0 !important; box-shadow: none !important; font-size: 0 !important; background: center / contain no-repeat !important; mix-blend-mode: lighten; }
html.orig #create [data-cls="royal"] { left: 329px; top: 34px; width: 66px !important; height: 62px !important; }
html.orig #create [data-cls="knight"] { left: 324px; top: 97px; width: 76px !important; height: 59px !important; }
html.orig #create [data-cls="elf"] { left: 530px; top: 32px; width: 91px !important; height: 65px !important; }
html.orig #create [data-cls="mage"] { left: 542px; top: 96px; width: 61px !important; height: 61px !important; }
/* 性別：原版 304～307（♀、♂ 各有暗的、亮的），左 ♂ 右 ♀ */
html.orig #create [data-gender] { width: 30px !important; height: 44px !important; }
html.orig #create [data-gender="male"] { left: 355px; top: 248px; background-image: var(--ui-sex-m) !important; }
html.orig #create [data-gender="male"].active, html.orig #create [data-gender="male"]:hover { background-image: var(--ui-sex-m-on) !important; }
html.orig #create [data-gender="female"] { left: 545px; top: 245px; background-image: var(--ui-sex-f) !important; }
html.orig #create [data-gender="female"].active, html.orig #create [data-gender="female"]:hover { background-image: var(--ui-sex-f-on) !important; }
html.orig #create [data-cls="royal"] { background-image: var(--ui-cls-royal) !important; }
html.orig #create [data-cls="royal"].active, html.orig #create [data-cls="royal"]:hover { background-image: var(--ui-cls-royal-on) !important; }
html.orig #create [data-cls="knight"] { background-image: var(--ui-cls-knight) !important; }
html.orig #create [data-cls="knight"].active, html.orig #create [data-cls="knight"]:hover { background-image: var(--ui-cls-knight-on) !important; }
html.orig #create [data-cls="elf"] { background-image: var(--ui-cls-elf) !important; }
html.orig #create [data-cls="elf"].active, html.orig #create [data-cls="elf"]:hover { background-image: var(--ui-cls-elf-on) !important; }
html.orig #create [data-cls="mage"] { background-image: var(--ui-cls-mage) !important; }
html.orig #create [data-cls="mage"].active, html.orig #create [data-cls="mage"]:hover { background-image: var(--ui-cls-mage-on) !important; }
/* 角色（原版的出場動畫，置中在兩排圖示之間） */
html.orig #create-preview { position: absolute; left: 404px; top: 0; width: 132px !important; height: 292px !important; }
/* 能力值（中文，js/ui.js 照截圖的位置排）：左邊力量、敏捷、體質，右邊精神、魅力、智力；中間是骰子。
   經典版的分配：每項旁邊 ▼▲（原版 455～458 的小箭頭，按下變亮），骰子上面「剩餘點數」和框 */
html.orig #create { --o-serif: "Noto Serif TC", "PMingLiU", "MingLiU", "Songti TC", serif; }   /* 思源宋體（index.html 從 Google Fonts 載入），連不上就用明體 */
html.orig #create-stats { position: absolute; left: 330px; top: 314px; width: 290px; height: 50px; padding: 0 !important; display: block !important; background: none; }
html.orig .o-lbl { position: absolute; white-space: nowrap; font: 900 13px/15px var(--o-serif); color: #f3e4b8; text-shadow: 0 0 3px rgba(230, 170, 70, 0.9), 0 0 1px #000, 0 1px 1px #000; }
html.orig .o-st { font-size: 11px; }   /* 能力值的名稱：照經典版的大小 */
html.orig .o-val { position: absolute; white-space: nowrap; font: 900 11px/15px "Playfair Display", var(--o-serif); font-variant-numeric: lining-nums; color: #fff; text-shadow: 0 1px 1px #000, 0 0 2px #000; }   /* 數字：Playfair Display 粗體（Google Fonts；圓潤、像經典版的數字） */
html.orig .o-arr { position: absolute; width: 7px !important; height: 7px !important; min-width: 0; padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; cursor: pointer;
  background: #5a5a78 var(--ui-arr-up) 0 0 / 7px 7px no-repeat !important; }
html.orig .o-arr.dn { background-image: var(--ui-arr-dn) !important; }
html.orig .o-arr.up:hover, html.orig .o-arr.up:active { background-image: var(--ui-arr-up-on) !important; }
html.orig .o-arr.dn:hover, html.orig .o-arr.dn:active { background-image: var(--ui-arr-dn-on) !important; }
html.orig .o-left-lbl { top: -30px; width: 60px; line-height: 12px; text-align: center; }
html.orig .o-left { position: absolute; top: 0; width: 21px; height: 14px; border: 1px solid #77736a; background: rgba(0, 0, 0, 0.7); font: 900 11px/12px "Playfair Display", var(--o-serif); font-variant-numeric: lining-nums; text-align: center; color: #fff; }   /* 數字置中（靠右看起來框是歪的） */
/* 骰子：原圖 41 × 80 的下半部（上半部是空的，不擋到「剩餘點數」） */
html.orig #create-die { position: absolute; left: 448px; top: 328px; width: 41px; height: 40px; font-size: 0 !important; cursor: pointer; background: var(--ui-dice) 0 -40px / 164px 80px no-repeat; }
html.orig #create-die:hover { filter: brightness(1.25); }
html.orig #create-die.spin { animation: o-dice 0.4s steps(4) 1; }
@keyframes o-dice { from { background-position: 0 -40px; } to { background-position: -164px -40px; } }
/* 角色命名：「角色命名 :」是字（js/ui.js 加的 #o-name-label），框是深灰底。
   框裡的字：思源宋體的行高（上 12.7、下 3.1）比框高，字會偏下；下面墊 1.3 像素，字的上下剛好置中 */
html.orig #o-name-label { left: 374px; top: 380px; letter-spacing: 2px; font-size: 11px; }   /* 字和能力值的名稱一樣大 */
html.orig #o-name-colon { left: 440px; top: 380px; font-size: 11px; }
html.orig #create-name { position: absolute; left: 457px; top: 380px; width: 111px !important; height: 15px !important; padding: 0 3px 1.3px !important; margin: 0 !important; font-family: var(--o-serif) !important; font-size: 11px !important; font-weight: 900; background: rgba(36, 34, 32, 0.9) !important; border: 1px solid #4a4640 !important; border-radius: 0 !important; color: #f4ecd8 !important; }
html.orig #create-name::placeholder { color: transparent; }
/* 確認、取消：右下兩行字（兩個字中間隔開，和能力值的名稱一樣大），置中在命名框下面 */
html.orig #btn-start, html.orig #btn-create-back { position: absolute; left: 493px; width: 64px !important; height: 16px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important;
  font: 900 11px/16px var(--o-serif) !important; letter-spacing: 17px; text-align: left; color: #efe3c0 !important; text-shadow: 0 0 3px rgba(240, 190, 90, 0.85), 0 0 1px #000; cursor: pointer; }
html.orig #btn-start { top: 415px; }
html.orig #btn-create-back { top: 434px; }
html.orig #btn-start:hover, html.orig #btn-create-back:hover { color: #fff !important; text-shadow: 0 0 5px rgba(255, 210, 120, 1), 0 0 1px #000; }
html.orig #select-info { position: relative; flex: none !important; display: block !important; width: 440px; height: 185px; padding: 0 !important; background: var(--ui-select-info) 0 0 / 440px 185px no-repeat !important; border: 0 !important; }
html.orig #select-info .oc { height: 15px; line-height: 15px; font-size: 12px; color: #f4ecd8; }
html.orig.pc .select-bottom { max-width: 600px !important; }
/* 台版的選角畫面（select-tw-1、-2：640 × 483，上面一頁 4 個拱門，下面角色資料；第 2 頁後兩格是封住的木板）。
   整張照畫面放大置中（js/ui.js selectTwSetup 算 --sk、--sx、--sy）；欄位的動畫疊在拱門上（lighten：黑底透出拱門） */
html.orig #select.tw { display: block !important; padding: 0 !important; --o-serif: "Noto Serif TC", "PMingLiU", "MingLiU", "Songti TC", serif; }
html.orig #select.tw.hidden { display: none !important; }
/*   畫面比圖寬或高時多出來的地方（手機直拿上下、橫拿左右）不留黑的（老闆：黑底很醜；墊登入畫面那張圖）：
     select-back 是登入圖（login-tw-p）中間大樹那段（上面的公告、下面的帳號密碼框不要），鋪滿整個畫面；
     蓋 75% 的黑，圖只剩 25%（老闆：60% 不夠暗），選角的圖跳出來 */
html.orig #select.tw { background: linear-gradient(rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0.75)), var(--ui-select-back) center / cover no-repeat #000 !important; }
html.orig #select.tw .select-panel { box-shadow: 0 0 22px 6px rgba(0, 0, 0, 0.65); }   /* 圖的邊緣淡淡地陷進背景，不是硬切一條 */
html.orig #select.tw .select-panel { position: absolute; left: 0; top: 0; margin: 0; width: 640px; height: 483px; max-width: none; display: block; gap: 0;
  transform-origin: 0 0; transform: translate(var(--sx, 0px), var(--sy, 0px)) scale(var(--sk, 1)); background: var(--ui-select-tw-1) -1px 0 / 642px 489px no-repeat; }
/*   圖檔最左一欄、最下面 12 列（1072～1083）是白的（截圖留下的邊）：圖放大一點點，往左移 1、下面多出 6，白邊落在框外，
     框底下是圖上原本的黑邊（老闆：有一條白色底線）。資料欄的字（js/ui.js infoTw）照同樣的比例放 */
html.orig #select.tw[data-page="2"] .select-panel { background-image: var(--ui-select-tw-2); }
/*   圖上的「盟」「禦」放大後糊掉了（老闆 11-04「盟字很怪」）：用同一張圖旁邊沒有字的地方蓋掉，重寫一個（字的樣式同建立角色的 .o-lbl） */
html.orig #select.tw .select-panel { --sel-art: var(--ui-select-tw-1); }
html.orig #select.tw[data-page="2"] .select-panel { --sel-art: var(--ui-select-tw-2); }
html.orig #select.tw .select-panel::before, html.orig #select.tw .select-panel::after { position: absolute; left: 143px; width: 18px; height: 17px; text-align: center; font: 900 14px/17px var(--o-serif); color: #f6e6c2; text-shadow: 0 0 3px rgba(230, 170, 70, 0.9), 0 0 1px #000, 0 1px 1px #000; pointer-events: none; background: var(--sel-art) no-repeat; background-size: 642px 489px; }
html.orig #select.tw .select-panel::before { content: '盟'; top: 330px; background-position: -121px -330px; }
html.orig #select.tw .select-panel::after { content: '禦'; top: 444px; background-position: -121px -444px; }
html.orig #select.tw #select-slots { display: block; position: absolute; left: 0; top: 0; width: 640px; height: 270px; }
html.orig #select.tw .slot-col { position: absolute; top: 27px; width: 131px; height: 234px; box-shadow: none; }
html.orig #select.tw .slot-col:nth-child(2) { left: 176px; }
html.orig #select.tw .slot-col:nth-child(1) { left: 20px; }
html.orig #select.tw .slot-col:nth-child(3) { left: 332px; }
html.orig #select.tw .slot-col:nth-child(4) { left: 488px; }
html.orig #select.tw .slot-col.locked { cursor: default; }
html.orig #select.tw .slot-col canvas { mix-blend-mode: lighten; }
html.orig #select.tw .select-bottom { display: block; position: static; width: auto; max-width: none !important; }
/* 右下角三行字（老闆給的圖）：確定（進遊戲；空欄位是建立角色）、取消（登出，回登入畫面）、刪除角色；字照圖上的能力值名稱的樣式，
   按的範圍比字大一點（手機縮小後才按得到）；其他按鈕不顯示 */
html.orig #select.tw .select-bottom .btns { display: block !important; position: static; }
html.orig #select.tw .select-bottom .btns > button { display: none !important; }
html.orig #select.tw #btn-login, html.orig #select.tw #btn-signout:not(.hidden), html.orig #select.tw #btn-delete { display: block !important; position: absolute; left: 532px; width: 74px !important; height: 26px !important;
  padding: 0 0 0 6px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; font-size: 0 !important; text-align: left; cursor: pointer; }
html.orig #select.tw #btn-login { top: 374px; }
html.orig #select.tw #btn-signout { top: 402px; }
html.orig #select.tw #btn-delete { top: 429px; }
html.orig #select.tw #btn-login::after, html.orig #select.tw #btn-signout::after, html.orig #select.tw #btn-delete::after { font: 900 13px/26px var(--o-serif); color: #f3e4b8; text-shadow: 0 0 3px rgba(230, 170, 70, 0.9), 0 0 1px #000, 0 1px 1px #000; white-space: nowrap; }
html.orig #select.tw #btn-login::after { content: '確定'; letter-spacing: 27px; }
html.orig #select.tw #btn-signout::after { content: '取消'; letter-spacing: 27px; }
html.orig #select.tw #btn-delete::after { content: '刪除角色'; letter-spacing: 1.5px; }
html.orig #select.tw .btns > button:hover::after { color: #fff; text-shadow: 0 0 5px rgba(255, 210, 120, 1), 0 0 1px #000; }
html.orig #select.tw #btn-delete:disabled { cursor: default; }
html.orig #select.tw #btn-delete:disabled::after { opacity: 0.45; }
html.orig #select.tw #select-info { position: absolute; left: 0; top: 0; width: 640px; height: 483px; background: none !important; pointer-events: none; }
html.orig #select.tw #select-info .oc { font-size: 11px; color: #f4ecd8; }
html.orig #select.tw .sel-pg { position: absolute; top: 274px; width: 27px; height: 27px; padding: 0; border: 0; border-radius: 50%; background: none; box-shadow: none; cursor: pointer; }
html.orig #select.tw #sel-pg1 { left: 294px; }
html.orig #select.tw #sel-pg2 { left: 325px; }
html.orig #select.tw .sel-pg:hover { background: rgba(255, 228, 160, 0.12); }
html.orig #select.tw[data-page="1"] #sel-pg1, html.orig #select.tw[data-page="2"] #sel-pg2 { box-shadow: 0 0 8px 2px rgba(255, 210, 120, 0.55); }
html.orig #select:not(.tw) .sel-pg { display: none; }
/* 舊版的選角畫面（老闆提供的截圖）：select-old 是 2001 客戶端的武器堆 105 加中文資料欄 104c（用像素比對，資料欄在 38, 285），640 × 480 放大置中（js/ui.js selectOldSetup）。
   三個欄位、箭頭的位置從截圖量；按鈕是同一個客戶端的 61c、63c、308c，右下角三行 */
html.orig #select.old { display: block !important; padding: 0 !important; background: #000 !important; }   /* 圖上面本來就是黑的，多出來的地方也黑，才接得起來；武器堆的左右邊淡進黑色（::before） */
html.orig #select.old.hidden { display: none !important; }
html.orig #select.old .select-panel::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #000, transparent 28px, transparent 612px, #000); pointer-events: none; }
html.orig #select.old .select-panel { position: absolute; left: 0; top: 0; margin: 0; width: 640px; height: 480px; max-width: none; display: block; gap: 0;
  transform-origin: 0 0; transform: translate(var(--sx, 0px), var(--sy, 0px)) scale(var(--sk, 1)); background: var(--ui-select-old) 0 0 / 640px 480px no-repeat; }
html.orig #select.old #select-slots { display: block; position: absolute; left: 0; top: 0; width: 640px; height: 292px; }
html.orig #select.old .slot-col { position: absolute; top: 0; width: 132px; height: 292px; box-shadow: none; }
html.orig #select.old .slot-col:nth-child(1) { left: 65px; }
html.orig #select.old .slot-col:nth-child(2) { left: 257px; }
html.orig #select.old .slot-col:nth-child(3) { left: 448px; }
html.orig #select.old .slot-col canvas { mix-blend-mode: lighten; }
html.orig #select.old .sel-arrow { position: absolute; top: 118px; width: 36px; height: 46px; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: none; cursor: pointer; background-size: 100% 100%; background-repeat: no-repeat; }
html.orig #select.old #sel-prev { left: 10px; background-image: var(--ui-sel-arrow-l); }
html.orig #select.old #sel-next { left: 595px; background-image: var(--ui-sel-arrow-r); }
html.orig #select.old .sel-arrow:hover { filter: brightness(1.4); }
html.orig #select.old .select-bottom { display: block; position: static; width: auto; max-width: none !important; }
html.orig #select.old .select-bottom .btns { display: block !important; position: static; }
html.orig #select.old .select-bottom .btns > button { display: none !important; }
html.orig #select.old #btn-login, html.orig #select.old #btn-signout:not(.hidden), html.orig #select.old #btn-delete { display: block !important; position: absolute; left: 525px; width: 112px !important; height: 19px !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: 0 0 / 112px 19px no-repeat !important; font-size: 0 !important; cursor: pointer; }
html.orig #select.old #btn-login { top: 398px; background-image: var(--ui-sel-ok) !important; }
html.orig #select.old #btn-signout:not(.hidden) { top: 417px; background-image: var(--ui-sel-cancel) !important; }
html.orig #select.old #btn-delete { top: 445px; background-image: var(--ui-sel-del) !important; }
html.orig #select.old #btn-login:hover { background-image: var(--ui-sel-ok-h) !important; }
html.orig #select.old #btn-signout:not(.hidden):hover { background-image: var(--ui-sel-cancel-h) !important; }
html.orig #select.old #btn-delete:hover { background-image: var(--ui-sel-del-h) !important; }
html.orig #select.old #btn-delete:disabled { cursor: default; opacity: 0.45; background-image: var(--ui-sel-del) !important; }
/*   App（從主畫面打開）跳過登入畫面、直接到選角：原版的「取消」（回到登入畫面）在這裡就是登出帳號，寫成底線黃字「登出帳號」
     （老闆 11-17「選擇角色又沒有離開遊戲選項 造成無法切換帳號」；原版沒有這幾個字的圖，照 11-11 的規則用底線黃字）。網頁版照舊是原版的「取消」 */
html.orig.app #select.old #btn-signout:not(.hidden) { background-image: none !important; font: 13px/19px var(--font, serif) !important; color: #f8f8b8 !important; text-decoration: underline; text-underline-offset: 3px; text-align: center; }
html.orig.app #select.old #btn-signout:not(.hidden):hover { background-image: none !important; color: #fff !important; }
html.orig.app #select.tw #btn-signout::after { content: '登出帳號'; letter-spacing: 1.5px; text-decoration: underline; text-underline-offset: 3px; }
html.orig #select.old #select-info { position: absolute; left: 38px; top: 285px; width: 440px; height: 185px; background: none !important; pointer-events: none; }
html.orig #select.old #select-info.empty { visibility: visible; }
/*   手機上縮小了：箭頭、確認、刪除角色按的範圍比圖大一點（取消夾在中間，不能再大） */
html.orig.mobile #select.old .sel-arrow::after, html.orig.mobile #select.old #btn-login::after, html.orig.mobile #select.old #btn-delete::after { content: ''; position: absolute; }
html.orig.mobile #select.old .sel-arrow::after { inset: -30px -14px; }
html.orig.mobile #select.old #btn-login::after { inset: -14px 0 0; }
html.orig.mobile #select.old #btn-delete::after { inset: -4px 0 -14px; }

/* 手機直式的創角：360 × 510，排法跟電腦一樣（角色在中間、左右兩排職業圖示、下面 ♂ ♀），能力值、命名、確認取消照電腦的相對位置往左移 305，
   沒有捲軸：最下面一行原文的句子 */
html.orig.mobile #create { align-items: center !important; justify-content: center !important; padding: 0 !important; overflow: hidden !important; }
html.orig.mobile #create .create-panel { width: 360px !important; height: 580px !important; background: radial-gradient(ellipse at 50% 22%, #2a2218, #000 70%) !important; }
html.orig.mobile #create-preview { left: 114px; top: 0; }
html.orig.mobile #create [data-cls="royal"] { left: 27px; top: 34px; }
html.orig.mobile #create [data-cls="knight"] { left: 22px; top: 97px; }
html.orig.mobile #create [data-cls="elf"] { left: 249px; top: 32px; }
html.orig.mobile #create [data-cls="mage"] { left: 263px; top: 96px; }
html.orig.mobile #create [data-gender="male"] { left: 60px; top: 248px; }
html.orig.mobile #create [data-gender="female"] { left: 270px; top: 245px; }
/*   能力值（js/ui.js 手機那一段）：一項一行 32 高，「力量 ▼ 16 ▲」；箭頭畫 18 × 18（原圖 7 × 7 放大、不糊），按的範圍 28 × 28。
     字比電腦大（手機縮小後才看得清楚）：名稱 14、數字 15 */
html.orig.mobile #create-stats { left: 0; top: 330px; width: 360px; height: 92px; }
html.orig.mobile #create-stats .o-st { font-size: 14px; line-height: 28px; }
html.orig.mobile #create-stats .o-val { width: 28px; font-size: 15px; line-height: 28px; text-align: center; }
html.orig.mobile .o-arr { width: 28px !important; height: 28px !important; background: none !important; outline: none !important; }
/*   手機點過以後會一直算「滑鼠移過去」：電腦版亮起來的箭頭圖會鋪滿整個按的範圍（老闆：選取框超醜），手機不用 */
html.orig.mobile .o-arr.up:hover, html.orig.mobile .o-arr.dn:hover, html.orig.mobile .o-arr.up:active, html.orig.mobile .o-arr.dn:active { background: none !important; }
/*   箭頭：原版 7 × 7 的圖放大會一格一格的；畫成網頁按鈕又太現代（老闆：要復古、石頭材質）——跟手機下面那排「?」、人物、＋ 按鈕
     （css/classic/hud/right.png）同一套：砂岩色的石板（斜光的漸層＋石頭的雜點 --stone）、暗色的外框和亮的內緣，三角是刻進去的
     （深褐色、下緣一道亮邊）；按下去石板變暗、三角往下沉；加不了、減不了的褪色（js/ui.js 的 .off） */
html.orig.mobile .o-arr { --tri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M6 2.1 10.6 9.1H1.4Z' fill='%23f6e8c4' opacity='.75'/%3E%3Cpath d='M6 1.2 10.4 8.3H1.6Z' fill='%23382010'/%3E%3C/svg%3E"); }
html.orig.mobile .o-arr.dn { --tri: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.4 2.5H10.6L6 9.5Z' fill='%23f6e8c4' opacity='.75'/%3E%3Cpath d='M1.6 1.7H10.4L6 8.8Z' fill='%23382010'/%3E%3C/svg%3E"); }
html.orig.mobile .o-arr::before { content: ""; position: absolute; left: 2px; top: 2px; width: 24px; height: 24px; box-sizing: border-box; border: 1px solid #22170c; border-radius: 3px;
  background: var(--tri) 50% 50% / 12px 10px no-repeat, var(--stone) 0 0 / 60px 60px, linear-gradient(150deg, #e4d3a8, #c4aa76 45%, #8e7144);
  box-shadow: inset 1px 1px 0 rgba(255, 246, 220, 0.65), inset -1px -1px 0 rgba(70, 42, 14, 0.7), inset 0 0 4px rgba(90, 58, 24, 0.45), 0 1px 3px rgba(0, 0, 0, 0.85); }
html.orig.mobile .o-arr:active::before { background: var(--tri) 50% 62% / 12px 10px no-repeat, var(--stone) 0 0 / 60px 60px, linear-gradient(150deg, #c2ad80, #a18758 45%, #6f5732);
  box-shadow: inset 1px 1px 2px rgba(50, 30, 8, 0.7), inset -1px -1px 0 rgba(255, 240, 210, 0.35), 0 0 1px #000; }
html.orig.mobile .o-arr.off::before { opacity: 0.45; filter: saturate(0.4) brightness(0.8); }
/*   中間：「剩餘點數」、點數的框、骰子（骰子是 #create-panel 的座標） */
html.orig.mobile #create-stats .o-left-lbl { left: 150px; top: -34px; font-size: 12px; line-height: 14px; }
html.orig.mobile #create-stats .o-left { left: 165px; top: 0; width: 30px; height: 22px; font-size: 15px; line-height: 20px; }
html.orig.mobile #create-die { left: 159.5px; top: 362px; }
/*   命名、確認、取消：字放大，按的範圍也放大 */
html.orig.mobile #o-name-label { left: 58px; top: 440px; font-size: 14px; line-height: 24px; }
html.orig.mobile #o-name-colon { left: 138px; top: 440px; font-size: 14px; line-height: 24px; }
html.orig.mobile #create-name { left: 154px; top: 440px; width: 150px !important; height: 24px !important; font-size: 14px !important; }
html.orig.mobile #btn-start, html.orig.mobile #btn-create-back { left: 128px; width: 104px !important; height: 30px !important; font-size: 15px !important; line-height: 30px !important; letter-spacing: 20px; white-space: nowrap; text-align: center; padding: 0 0 0 20px !important; }
html.orig.mobile #btn-start { top: 482px; }
html.orig.mobile #btn-create-back { top: 512px; }
html.orig.mobile #create-desc, html.orig.mobile #create-bonus, html.orig.mobile #create-hpmp { left: 22px; width: 316px; color: #e8dcc0 !important; }
html.orig.mobile #create-desc { top: 472px; }
html.orig.mobile #create-bonus { top: 514px; color: #b8a888 !important; }
html.orig.mobile #create-hpmp { top: 552px; }
/* 手機沒有捲軸：確認、取消下面一行原文的句子（js/ui.js，text-local.js 的 classSlogan） */
html.orig.mobile #create.o-text #create-desc { top: 554px; height: auto; overflow: visible; }
/*   粗的宋體（老闆：細的那種字挺醜），但不能像確認（老闆 11-07：樣式太像）：灰色、沒有金色的光暈，上下兩條細線，看起來是一段說明、不是按鈕 */
html.orig.mobile .o-slogan { text-align: center; white-space: nowrap; font: 900 12px/26px var(--o-serif); letter-spacing: 1px; color: #b8b0a0; text-shadow: 0 1px 1px #000;
  border-top: 1px solid; border-bottom: 1px solid; border-image: linear-gradient(90deg, transparent, rgba(220, 190, 130, 0.4), transparent) 1; }
/* 手機橫式的創角：640 × 360（直式整張縮小的話字和按鈕太小、還會重疊）——左半邊角色、職業、性別（直式的排法），
   右半邊能力值（js/ui.js 同一套，整塊往右移）、命名、確認取消、最下面一句原文 */
@media (orientation: landscape) {
  html.orig.mobile #create .create-panel { width: 640px !important; height: 360px !important; display: block !important; }   /* 手機橫的一般版是格線排法（css/style.css）：格線裡的絕對位置會照格子算，跑出畫面 */
  html.orig.mobile #create-preview { left: 104px; }
  html.orig.mobile #create [data-cls="royal"] { left: 17px; }
  html.orig.mobile #create [data-cls="knight"] { left: 12px; }
  html.orig.mobile #create [data-cls="elf"] { left: 239px; }
  html.orig.mobile #create [data-cls="mage"] { left: 253px; }
  html.orig.mobile #create [data-gender="male"] { left: 50px; }
  html.orig.mobile #create [data-gender="female"] { left: 260px; }
  html.orig.mobile #create-stats { left: 292px; top: 70px; }   /* 用到的範圍是 #create-stats 裡的 38～322：畫面上 330～614 */
  html.orig.mobile #create-die { left: 451.5px; top: 102px; }
  html.orig.mobile #o-name-label { left: 345px; top: 190px; }
  html.orig.mobile #o-name-colon { left: 425px; top: 190px; }
  html.orig.mobile #create-name { left: 441px; top: 190px; }
  html.orig.mobile #btn-start, html.orig.mobile #btn-create-back { left: 420px; }
  html.orig.mobile #btn-start { top: 236px; }
  html.orig.mobile #btn-create-back { top: 268px; }
  html.orig.mobile #create.o-text #create-desc { left: 330px; top: 314px; width: 284px; }
}

/* 手機的快捷格（老闆 11-07：金框太搶眼）：外框是電腦版那塊的雕紋（hud-r-n 上面格子外的框，切出來 hot-frame），格子之間細細一條線，和電腦版一樣 */
html.orig.mobile.classic:not(.mpc) #hotbar { gap: 0; padding: 0; background: #0b0a09; border: 5px solid transparent; border-image: var(--ui-hot-frame) 5 / 5px round; border-radius: 0; box-shadow: none; }
html.orig.mobile.classic:not(.mpc) .hot { height: 40px; background: none; border: 0; box-shadow: inset -1px 0 0 rgba(170, 140, 100, 0.5), inset 0 -1px 0 rgba(170, 140, 100, 0.5); }
html.orig.mobile.classic:not(.mpc) .hot.assign { outline: 1px solid #ffe08a; outline-offset: -1px; }

/* ── 登入（105 的背景、59 的帳號密碼框）── */
html.orig.pc #login { background: #000 var(--ui-arena) center / auto 100% no-repeat !important; }
html.orig #login .login-panel { background: none !important; border: 0 !important; box-shadow: none !important; width: 207px !important; padding: 0 !important; position: relative; }
html.orig #login h1 { display: none; }
html.orig #login .login-panel::before { content: ""; display: block; width: 207px; height: 53px; background: var(--ui-login-box) 0 0 / 207px 53px no-repeat; }
html.orig #login-name, html.orig #login-pass { position: absolute; left: 93px; width: 112px !important; height: 15px !important; margin: 0 !important; padding: 0 3px !important; font-size: 12px !important; background: transparent !important; border: 0 !important; color: #f4ecd8 !important; }
html.orig #login-name { top: 2px; }
html.orig #login-pass { top: 36px; }
html.orig #login-name::placeholder, html.orig #login-pass::placeholder { color: transparent; }
/* 點進輸入框：不要瀏覽器的外框（原版沒有），只有游標 */
html.orig input:focus, html.orig input:focus-visible, html.orig textarea:focus, html.orig textarea:focus-visible { outline: none !important; }
html.orig #login .login-guide { margin-top: 6px !important; text-align: center; text-shadow: 0 1px 2px #000; }
html.orig #login .btns { margin-top: 8px !important; display: flex !important; flex-direction: column; align-items: center; gap: 4px !important; }
html.orig #btn-signin { width: 112px !important; height: 19px !important; padding: 0 !important; font-size: 0 !important; border: 0 !important; box-shadow: none !important; background: var(--ui-btn-ok) 0 0 / 112px 19px no-repeat !important; }
html.orig #btn-signin:hover { background-image: var(--ui-btn-ok-h) !important; }
/* 電腦：台版的登入畫面（login-tw，548×409：左邊公告、右下遊戲帳號、密碼，下面「登錄」「離開遊戲」都畫在圖上）。
   整張照畫面大小放大（--lk，js/ui.js），框和按鈕疊在圖上原本的位置 */
/* 手機（直的）：直式的台版登入圖（login-tw-p，360×640：上面公告、下面遊戲帳號、密碼、「登錄」「離開遊戲」），蓋滿畫面（js/ui.js fitLogin） */
html.orig #login { background: #000 !important; display: block; }
html.orig #login.hidden { display: none !important; }
html.orig #login .login-panel { position: absolute !important; left: 0; top: 0; margin: 0 !important; width: 548px !important; max-width: none !important; height: 409px; max-height: none !important; transform-origin: 0 0; transform: translate(var(--lx, 0px), var(--ly, 0px)) scale(var(--lk, 1)); background: var(--ui-login-tw) 0 0 / 548px 409px no-repeat !important; }
html.orig #login .login-panel::before, html.orig #login .login-guide { display: none; }
html.orig #login-name, html.orig #login-pass { left: 433px; width: 88px !important; height: 12px !important; padding: 0 2px !important; font-size: 9px !important; line-height: 12px; }
html.orig #login-name { top: 264px; }
html.orig #login-pass { top: 283px; }
html.orig #login .btns { display: block !important; margin: 0 !important; }
/*   提醒視窗：登入圖是 548×409 再整張放大，字照圖上公告欄的大小（標題約 14、內文約 10） */
html.orig #login .login-dlg-box { width: 210px; padding: 12px 12px 8px; }
html.orig #login .login-dlg-box p { font-size: 11px; }
html.orig #login .login-dlg-sep { height: 7px; margin: 7px 6px 4px; }
html.orig #login .login-dlg-sep::after { width: 4px; height: 4px; }
html.orig #login .login-dlg-btns { gap: 22px; }
html.orig #login .login-dlg-btns button { padding: 1px 6px !important; font-size: 13px !important; }

/* ── 遊戲畫面下面的主介面（電腦，原版介面 html.classic 的排法上換成原版的圖）──
   原版的 406（平常，125 高）、431（對話框往上高 24 像素，html.o-chatx；對話框右下角的 ▲▼ 切換，js/main.js）切成幾塊：
   左欄（112 寬）、右欄（145 寬）整塊；上緣：兩端的龍、龍頭固定大小，中間鋪一條直欄；對話框（border-image）左右拉長，右邊一條捲軸。
   #hud 用 zoom 放大 --hk 倍，裡面的座標都是原圖的像素；#log、#chat-input 在 #hud 外面，自己乘 --hk。
   html.o-prev（上面那顆「主介面：上一版」，js/render.js）：不套這段，回到 css/classic.css 那套圖，用來比較 */
/* （原版的圖：任何寬度都用；--hk 由 js/main.js 照視窗大小算） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) { --hk: 1.5; --hh: 125px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev).o-chatx { --hh: 149px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #hud { zoom: var(--hk); height: var(--hh); background: none; box-shadow: none;
    left: calc(var(--f-left) / var(--hk)); right: calc(var(--f-left) / var(--hk)); bottom: calc(var(--f-top) / var(--hk)); }   /* 原版那一張的下緣、左右到黑邊為止 */
  /* 對話框：原圖 112～480、上緣 40 以下；左右各 6 像素不拉 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #hud::before { left: 112px; right: 160px; top: 40px; bottom: 0; background: none; box-shadow: none;
    border-style: solid; border-width: 0 6px; border-image: var(--ui-hud-c-n) 0 6 fill / 0 6px stretch; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev).o-chatx #hud::before { border-image-source: var(--ui-hud-c-x); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-scroll { display: block; right: 145px; top: 40px; bottom: 0; width: 15px; background: var(--ui-hud-s-n) 0 0 / 100% 100% no-repeat; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev).o-chatx .cl-scroll { background-image: var(--ui-hud-s-x); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #chat-size { display: block; position: absolute; right: 147px; bottom: 1px; width: 13px; height: 14px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; cursor: pointer; z-index: 6; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #chat-size:hover { background: rgba(255, 255, 255, 0.18); }
  /* 上緣（原圖 406 的 x 112～495）：全部從使用者 2026-10-31 給的原版畫面（66.webp，主介面放大 2.241 倍）切下來，透明的地方照 406 的形狀
     （scratchpad lin-tools/hd-mask.js、hd-band.js、hd-head.js）：兩端的龍（hd-dl、hd-dr）、龍頭（hd-head）、龍旁與龍頭旁的扭繩（hd-wl、hd-wr、hd-hl、hd-hr）、
     中間直的細金桿連空條與暗邊（hd-band、hd-bandr）。畫面比 640 寬時直的那段拉長，龍頭兩邊一樣長。
     框（.cl-frame）不自成一層：金桿那條在條的後面，龍、龍頭在條的前面 */
  /*   兩端的龍圖和對話框之間差不到 1.2 像素，地圖會從縫透出來變成一條淡色的邊（老闆 11-04）：把下面的縫墊深色。
       左右欄那邊不墊：深色直線比龍圖高一截，看起來像一個方框（老闆 11-06），改成龍圖往外拉一點疊在欄上（.cl-end） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-frame { left: 112px; right: 145px; top: 0; height: 40px; z-index: auto;
    background: linear-gradient(#1e1e22, #1e1e22) 0 100% / 30px 1.2px no-repeat, linear-gradient(#0f0f10, #0f0f10) 100% 100% / 30px 1.2px no-repeat; }
  /*   位置都照那張畫面（放大 2.241 倍）的排法換算：畫面 y 763.4 = 主介面第 0 列，條下面的暗邊剛好接到對話框（第 44 列）；x 照條的兩端（140、466） */
  /*   直的一段（畫面 y 803～861：細金桿、空條、暗邊）：左右各切一整段（hd-band 是龍頭左邊那段、hd-bandr 右邊那段），640 寬時剛好在原處；更寬時左邊那段一直鋪 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-rail { display: block; left: 28px; right: 28.8px; top: 17.67px; height: 26.33px; z-index: 1;
    background: var(--ui-hd-bandr) right 40.59px top 0 / 59.35px 100% no-repeat, var(--ui-hd-band) 41.97px 0 / 65.6px 100% repeat-x !important; }
  /*   扭繩：龍旁邊的兩段（::before 左、::after 右）跟著龍；龍頭旁邊的兩段（.cl-frame 的 ::before、::after）跟著龍頭。都切到條的上緣（畫面 y 811）為止 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-rail::before, html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-rail::after,
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-frame::before, html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-frame::after { content: ''; display: block; position: absolute; width: 43.28px; height: 22.31px; background: 0 0 / 100% 100% no-repeat; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-rail::before { left: 0; top: -17.4px; background-image: var(--ui-hd-wl); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-rail::after { right: -1.36px; top: -17.4px; background-image: var(--ui-hd-wr); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-frame::before { left: calc(50% - 57.27px); top: 0.27px; width: 31.24px; z-index: 2; background-image: var(--ui-hd-hl); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-frame::after { left: calc(50% + 32.87px); top: 0.27px; width: 31.24px; z-index: 2; background-image: var(--ui-hd-hr); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-end { left: -0.3px; top: -1.07px; width: 28.77px; height: 40.16px; z-index: 3; background: var(--ui-hd-dl) 0 0 / 100% 100% no-repeat; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-end.r { left: auto; right: -0.3px; width: 28.63px; z-index: 3; background: var(--ui-hd-dr) 0 0 / 100% 100% no-repeat; transform: none; }
  /*   龍頭：使用者自己切給的原版畫面（2026-10-31，畫面放大 2.241 倍）上的龍頭（hd-head，角旁邊的地圖去掉了），640 寬時在 x 275～338 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-head { left: calc(50% - 28.5px); top: -6.87px; width: 62.47px; height: 51.32px; transform: none; z-index: 3; background: var(--ui-hd-head) 0 0 / 100% 100% no-repeat; }
  /* 體力、魔力：繩子下緣到對話框（y 17～39，在框的後面）；左邊從龍的後面到龍頭的左柱，右邊從右柱到右邊的龍的後面。
     沒滿的地方是原版的黑槽色；字在框的上面 */
  /*   條：同一張原版畫面上切下來的一條（滿血、滿魔的紅管、藍管，hd-hp、hd-mp），從直金桿下緣（y 28）開始 18.3 高，下面接那張畫面的暗邊（hd-under）；
       沒滿的地方是暗色 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar { top: 21.24px; height: 18.3px; border: none; border-radius: 0; background: none; box-shadow: none; z-index: auto; }
  /*   黑槽的範圍（406）：體力 x 140～281（左龍的柱子 134～139、龍頭左柱 282～285），魔力 x 331～467（龍頭右柱 327～330、右龍的柱子 468～473）。
       龍頭在 640 寬時 x 270（畫面放大時在 50% − 50），所以體力右緣 = 50% − 38、魔力左緣 = 50% + 11 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.hp { left: 140px; right: calc(50% + 38px); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.mp { left: calc(50% + 11px); right: 172px; background: none; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar .fill { border-radius: 0; box-shadow: none; z-index: 2; }
  /* 照使用者 2026-10-31 的原版圖（65.png）逐行取色：上緣一條直的暗線、上面四分之一一道亮光、中間深色、下面七成處一道反光、底下暗掉；
     條從直金桿下緣（y 28）開始，上緣是直的（中文：「上面邊緣糊掉了 要像這樣」）。字是白字黑邊，貼近龍頭 */
  /*   空掉的部分是灰色的玻璃管（原版截圖：上緣一道亮光、中間暗、下半一道反光，跟血條同一個形狀；hd-empty 照截圖量的每一列） */
  /*   金桿那條（.cl-rail，z 1）在條的後面、裡面空條的地方是暗的：玻璃要蓋在它上面、血魔（.fill，z 2）下面 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.hp::before, html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.mp::before { content: ''; position: absolute; inset: 0; z-index: 2; background: var(--ui-hd-empty, none) 0 0 / 1px 100% repeat-x; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.hp .fill { background: var(--ui-hd-hp) 0 0 / 1px 100% repeat-x; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.mp .fill { background: var(--ui-hd-mp) 0 0 / 1px 100% repeat-x; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar .val { z-index: 4; padding-top: 1.2px; font: var(--hb, 12px)/18.3px var(--font); letter-spacing: 0; color: #fff; white-space: nowrap;   /* 視窗窄時條也窄：換行的話數字掉到第二行被裁掉，只剩「體」「魔」 */
    text-shadow: 1px 0 #000, -1px 0 #000, 0 1px #000, 0 -1px #000; }   /* 原版的字：12px 細明體的點陣字（--hb，js/main.js），白字黑邊；不能拉高，一縮放就不是點陣字 */
  /*   字貼著龍頭（使用者 11-04 的原版截圖：「體力:1197/1197」的尾巴離龍頭左柱幾個像素、「魔力:86/86」緊接在右柱後面）；在彩色的管子裡上下置中。
       條窄的時候（視窗比 4:3 窄）字往邊上靠，「體力:1000/1000」也放得下 */
  /*   字的顏色不是白的（使用者 11-04）：兩張原版截圖量出來體力是淡粉紅（255,197,199）、魔力是淡藍（203,207,255），同一張的白色聊天字量起來是純白，
       不是壓縮造成的；取 RGB555 的值 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.hp .val { text-align: right; padding-right: clamp(0px, calc(100% - 84px), 6px); color: #ffc8c8; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.mp .val { text-align: left; padding-left: clamp(0px, calc(100% - 84px), 3px); color: #c8d0ff; }
  /* 左欄：原圖的框裡放等級與經驗值、防禦｜魔防、負重、飽食度、時間（離下緣的距離兩張圖一樣） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat { left: 0; top: auto; bottom: 0; width: 112px; height: calc(var(--hh) - 21px); background: var(--ui-hud-l-n) 0 0 / 100% 100% no-repeat; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev).o-chatx .cl-stat { background-image: var(--ui-hud-l-x); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-row { top: auto; }
  /*   字：細明體的點陣字（使用者 11-04 給的原版截圖：12 像素的細明體，白字、沒有糊的陰影）。大小 --hf 由 js/main.js 算：螢幕上剛好是有點陣字的
       12、13、15、16 像素（10px 再被 #hud 放大成 14.7 這種大小時是糊的外框字）；陰影是不糊的 1 像素，橘色的經驗值條上也看得清楚。
       每格的字框就是原圖格子的內緣（等級 6～22、防禦 31～43、負重 51～62、飽食 70～81、時間 89～100），細明體的字身剛好在框的正中間 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat :is(.cl-lv, .cl-acmr > span, .cl-bar, #cl-time) { color: #fff; text-shadow: 0.6px 0.6px 0 rgba(0, 0, 0, 0.7); }   /* 白字、一點點影子：#hud 放大了，四邊黑邊看起來太深（老闆 11-06） */
  /* 防禦、善惡值是灰字（老闆 11-06 的原版畫面量到 184,184,184）。上面的 :is 裡有 #cl-time，整條算 id 的特異度，這裡也要用 id 才蓋得過去 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat #cl-ac, html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat #cl-mr { color: #b8b8b8; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-lv { left: 5px; bottom: 81px; width: 102px; height: 17px; padding: 0 3px; font: var(--hf, 10px)/17px var(--font); }
  /*   等級那格：經驗值的橘色條，從格子左緣（原圖 x 0）照百分比往右長（原版截圖：「等級:47 44.79%」的格子左邊四成五是橘的）；字在條的上面 */
  /*   條的圖（hud-bar-o 88×10，負重、飽食那種短條用的）左邊兩行是收邊（淡的一行、深的一行）：在等級格裡拉寬後變成條左端一條深色的線（老闆 11-10「等級條左邊有一個未知的小瑕疵」）。
       圖放大到 88/86 倍、往左移兩行，收邊落在格子外面，條從格子左緣就是橘色 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-lv::before { content: ''; position: absolute; left: -5px; top: 0; bottom: 0; width: calc(110px * var(--exp, 0) / 100); background: var(--ui-hud-bar-o) calc(-2px * 110 / 86) 0 / calc(88px * 110 / 86) 100% no-repeat; }
  /*   字往下的量（11-04 使用者：「要垂直置中」）：字的筆畫在框裡上下各留一樣多。
       換思源黑體以後（216d4c4）重量（老闆 11-18「左下的飽食度等數值 沒有垂直置中」）：原本照細明體調的位移讓黑體的字偏下 1.5～2 像素，
       手機上負重、飽食度的字底還被條切掉。用 canvas 量字形的上下緣對框的中線（手機 390×844、430×932、844×390，電腦 800×600、1280×909、1920×1080），
       每格往上移量到的平均；之後各尺寸都在 ±0.4 像素內 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-lv > span { position: relative; top: -0.1px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-acmr { left: 0; bottom: 61.5px; width: 112px; height: 10px; }
  /*   防禦、魔防：比等級那行小一檔（--hfa，js/main.js）、靠左（原版截圖 hud-ref-u06：「-5」「32767」從格子左邊開始） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-acmr > span { top: -1.9px; height: 13px; font: var(--hfa, var(--hf, 10px))/13px var(--font); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #cl-ac { left: 21px; width: 25px; padding: 0 0 0 2px; text-align: left; }   /* 原圖的格子 21～46、69～109 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #cl-mr { left: 69px; width: 40px; padding: 0 0 0 2px; text-align: left; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-row:nth-child(3), html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-row:nth-child(4), html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-row:nth-child(5) { left: 21px; width: 86px; height: 10px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-row:nth-child(3) { bottom: 42px; } html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-row:nth-child(4) { bottom: 23px; } html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-row:nth-child(5) { bottom: 4px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-bar { height: 10px; font: var(--hf, 10px)/12px var(--font); }
  /* 上一版那套圖（css/classic.css 的 left2.png）才有的：善惡值一列、橘色方塊的條、晚上的星空和月亮圖示；原版的圖不用 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-law { display: none; }
  /*   晚上的月亮（17）整張不透明，四角是別張主介面的石頭色，蓋上去是一塊淺色方形：只留圓的部分，和白天的太陽同大 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat #cl-sunico.ci-moon { display: block; position: absolute; left: -19px; top: -2.5px; width: 16px; height: 15px; border: 0; border-radius: 0; box-shadow: none; background: var(--ui-hud-moon-i) 0 0 / 16px 15px no-repeat; -webkit-mask: radial-gradient(circle 6.5px at 7.5px 7.5px, #000 88%, transparent); mask: radial-gradient(circle 6.5px at 7.5px 7.5px, #000 88%, transparent); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #cl-lv { width: auto; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-bar .fill { top: 1px; bottom: 1px; left: 0; max-width: 100%; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-bar > span { top: -1.35px; bottom: auto; height: 12px; padding-right: 3px; font-size: var(--hf, 10px); line-height: 12px; }
  /* 照 1.82c 台版（使用者給的截圖）：體力、魔力的字；負重、飽食度是原版的橘色條（705，過重是紅的 713）；
     第二列右邊的圓圈是善惡值的圖示（710 混沌、711 中立、712 正義），後面寫善惡值；
     時間那條白天是山（39）、晚上是星空（40），中間寫遊戲時間，太陽、月亮是原版的小圖（37、38）；左邊的圖示晚上換月亮（17） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.hp .val::before { content: '體力:'; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .bar.mp .val::before { content: '魔力:'; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-bar .fill { top: 0; bottom: 0; border-radius: 0; box-shadow: none; background: var(--ui-hud-bar-o) 0 0 / 86px 10px no-repeat !important; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-bar .fill.warn { background-image: var(--ui-hud-bar-r) !important; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .ci-mr { display: block; position: absolute; left: 47px; top: -3.5px; width: 16px; height: 17px; border: 0; border-radius: 0; box-shadow: none; background: var(--ui-hud-al-n) 0 0 / 16px 17px no-repeat; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-acmr.al-l .ci-mr { background-image: var(--ui-hud-al-l); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-acmr.al-c .ci-mr { background-image: var(--ui-hud-al-c); }
  /*   山、星空的圖填滿整條（老闆 11-07 的原版截圖）：圖 80 × 8，條 86 × 10 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-sky { opacity: 1; background: var(--ui-hud-day) 0 0 / 100% 100% no-repeat; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-sky.night { background: var(--ui-hud-night) 0 0 / 100% 100% no-repeat; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #cl-sun { width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 0; box-shadow: none; background: var(--ui-hud-sun) 0 0 / 8px 8px no-repeat; z-index: 1; }
  /*   月亮整個 background 都要寫：css/classic.css 的 .cl-stat #cl-sun.moon（特異度比上面那行高）用 background 簡寫把大小設回 auto，
       電腦用的兩倍圖（pc2x，16×16）在 8×8 的框裡只露出左上角，晚上看到的是一塊黑方塊（11-18 量左下格子時看到；手機用一倍圖沒事） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #cl-sun.moon { background: var(--ui-hud-moon) 0 0 / 8px 8px no-repeat; filter: none; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #cl-time { position: absolute; left: 0; right: 0; top: -1.3px; z-index: 2; text-align: center; font: var(--hf, 10px)/12px var(--font); color: #fff; }
  /*   負重、飽食度的條和時間的天空上平常沒有字（老闆 11-04 的兩張原版截圖：只有條和太陽、月亮）；滑鼠移過去才顯示（老闆 11-04）。手機一直顯示 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-bar > span, html.orig:is(.pc, .mpc).classic:not(.o-prev) #cl-time { display: none; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .cl-stat .cl-row:hover .cl-bar > span { display: block; }
  /* 右欄：快捷格（原圖 500～636 × 29～96，F5～F12 是圖上的字）、下面 7 個按鈕（圖上的，按鈕本身透明） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #hud::after { right: 0; top: auto; bottom: 0; width: 145px; height: calc(var(--hh) - 21px); background: var(--ui-hud-r-n) 0 0 / 100% 100% no-repeat; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev).o-chatx #hud::after { background-image: var(--ui-hud-r-x); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #hotbar { left: auto; right: 4px; top: auto; bottom: 29px; width: 136px; height: 67px; gap: 0; grid-template-rows: 33.5px 33.5px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot { height: 33.5px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot .key { display: none; }
  /* 道具數量：原版快捷格不顯示（老闆給的原版截圖：紅色藥水、卷軸都只有圖示） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot .cnt { display: none; }
  /* 圖示塞滿格子（原版 32 × 32 的圖貼齊金框，使用者 2026-10-31 的截圖）；選到的格子是原版的選取框（696：淡銅色的框、深褐的底） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot { border: 0; background: none; }
  /*   點到的格子才有選取框（使用者 2026-10-31）：原版 696 的底，外框的淡金色線（#ffd594）粗 2 像素、蓋在圖示上面 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot.sel, html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot.assign { background: var(--ui-hot-sel) 0 0 / 100% 100% no-repeat; animation: none; }
  /*   框改成 1 像素（老闆 11-11「選取框太粗，參考之前的圖」：原版 696 的淡金框就是 1 像素） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot.sel::after { content: ''; position: absolute; inset: 0; z-index: 2; border: 1px solid #ffd594; pointer-events: none; }
  /* 對話框捲軸的拖曳鈕（471，銀色的夾塊，使用者 2026-10-31 的原版畫面）：在兩顆圓鈕中間（406 的上圓鈕 y 47～60、下圓鈕 92～104，431 的下圓鈕再低 24），
     --t 是捲動的位置（0 最上、1 最下：貼著下圓鈕） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #log-thumb { display: block; position: absolute; right: 146px; width: 14px; height: 9px; z-index: 6;
    top: calc(60px + var(--t, 1) * (var(--hh) - 102px)); background: var(--ui-scroll-thumb) 0 0 / 100% 100% no-repeat; cursor: pointer; touch-action: none; }
  /*   對話紀錄自己的捲軸（瀏覽器的細棕條）不顯示：有原版的捲軸 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #log { scrollbar-width: none; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #log::-webkit-scrollbar { display: none; }
  /*   兩顆圓鈕：按一下往上、往下捲一行 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #log-up, html.orig:is(.pc, .mpc).classic:not(.o-prev) #log-dn { display: block; position: absolute; right: 145px; width: 15px; height: 13px; z-index: 6; cursor: pointer; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #log-up { top: 47px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #log-dn { bottom: 21px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot .icon { inset: 1px; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hot .icon img { object-fit: fill; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hud-right { left: auto; right: 0; top: auto; bottom: 1px; width: 145px; height: 21px; gap: 0; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hud-right button[title] { height: 21px; }
  /*   右下功能列的畫質（老闆 11-09「右下角功能按鈕你的能力有辦法讓它清晰一點嗎，畫質好一點」）：同一排原圖用 xBR 放大 4 倍
       （assets/local/hq-local.js 的 --ui-hud-row-hq），蓋在主介面圖的那一排上，從 4 倍圖平滑縮到介面的倍數；沒有那張圖就照原圖 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hud-right { background: var(--ui-hud-row-hq, none) 0 0 / 100% 100% no-repeat; image-rendering: auto; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) .hud-right button:hover { border-color: transparent; filter: none; box-shadow: none; outline: none; }   /* 滑過去沒有選取框（老闆 11-07） */
  /* 對話：文字在對話框的石板上（y 44～107），輸入在下面那條（y 111～122） */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #log { left: calc(var(--f-left) + 116px * var(--hk)); right: calc(var(--f-left) + 162px * var(--hk)); top: calc(100vh - var(--f-top) - (var(--hh) - 45px) * var(--hk)); bottom: auto; height: calc((var(--hh) - 63px) * var(--hk)); padding: 0 4px 0 2px; border-top: 2px solid transparent; }   /* 從條下面的暗邊（到 y 44）以下開始；字貼著左上（老闆 11-06 的原版畫面），左邊和上面留一樣的空，放不下一整行的空位留在下面。
     上面的 2 點用透明的邊、不用 padding：padding 在捲動的範圍裡，捲到最新一行時上一行的最後 2 點會露在最上面（畫面檢查 11-09：一條細線）；邊不會跟著捲 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #chat-input { left: calc(var(--f-left) + 115px * var(--hk)); right: calc(var(--f-left) + 162px * var(--hk)); bottom: calc(var(--f-top) + 3px * var(--hk)); height: calc(11px * var(--hk)); padding: 0 4px; font-size: min(var(--lf, 12px), calc(11px * var(--hk))); line-height: calc(11px * var(--hk)); }
  /* 視窗不要壓到主介面 */
  html.orig.pc.classic:not(.o-prev) #win-inv, html.orig.pc.classic:not(.o-prev) #win-wh, html.orig.pc.classic:not(.o-prev) #win-char { bottom: calc(var(--f-top) + var(--hh) * var(--hk) + 10px); }
  html.orig.pc.classic:not(.o-prev) #win-spell { max-height: calc(100vh - var(--o-top) - var(--hh) * var(--hk) - 60px); }
  /* 安全／一般／戰鬥區域：原版在主介面右上角、快捷格那塊的上面，淡藍色的明體字 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #zone-tag { right: calc(var(--f-left) + 6px * var(--hk)); bottom: calc(var(--f-top) + 104px * var(--hk) + 2px); }
  /*   地名貼在右邊快捷鍵框的正上方，對話框加大時不跟著升起（老闆 11-09「安全區域會隨著聊天視窗升起而升起」；
       1.82 原尺寸畫面對話框加大時「战斗区域」還是在快捷鍵框上緣 y 377 的上面，框沒有長高）。之前照主介面的高（--hh）往上 24 點 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #zone-tag b { font-size: calc(14px * var(--hk)); font-weight: normal; letter-spacing: 0; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7); }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #zone-tag .safety { color: #a8c8ee; }
  /* 所在位置的地名（老闆 11-15 給的截圖：遊戲畫面左下角「隱藏之谷」，和右下角的區域同一個高度、同樣的淡藍色明體字；js/ui.js）：
     電腦在左下角；手機的左下角有圓鈕，地名接在區域前面（#zone-tag .place） */
  html.orig.pc.classic:not(.o-prev) #place-tag { display: block; left: calc(var(--f-left) + 6px * var(--hk)); bottom: calc(var(--f-top) + 104px * var(--hk) + 2px); z-index: 30; }
  html.orig.pc.classic:not(.o-prev) #place-tag b, html.orig:is(.pc, .mpc).classic:not(.o-prev) #zone-tag .place { font-size: calc(14px * var(--hk)); font-weight: normal; letter-spacing: 0; color: #a8c8ee; text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.7); }
  /* 對話列最前面的「中」（紫色小方塊、白字），輸入的字接在後面 */
  /*   「中」是使用者原版截圖上的圖（assets/local/ui/pc/ime-zh.png）；切到「英」時沒有圖，用字 */
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #ime { display: block; position: fixed; left: calc(var(--f-left) + 117px * var(--hk)); bottom: calc(var(--f-top) + 3px * var(--hk)); width: calc(12px * var(--hk)); height: calc(10px * var(--hk)); padding: 0; z-index: 31;
    border: 0; border-radius: 0; box-shadow: none; background: var(--ui-ime-zh) 0 0 / 100% 100% no-repeat; color: transparent;
    font: calc(9px * var(--hk)) / calc(10px * var(--hk)) var(--font); text-align: center; cursor: pointer; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #ime.en { background: linear-gradient(#9a5ac4, #6a3290); color: #fff; }
  html.orig:is(.pc, .mpc).classic:not(.o-prev) #chat-input { left: calc(var(--f-left) + 129px * var(--hk)); }

html.orig #btn-signin { position: absolute; left: 457px; top: 314px; width: 34px !important; height: 18px !important; background: none !important; }
html.orig #btn-signin:hover { background: rgba(255, 228, 160, 0.14) !important; }
/* 羊皮紙的登入畫面（L.CONFIG.loginStyle，640×480，js/ui.js fitLogin）：版面照經典版，底圖和建立角色同一張（select-bg）；
   帳密框是客戶端的圖（login-box）；字和按鈕的樣子照建立角色的捲軸、確認鈕 */
.login-notice, #btn-login-exit { display: none; }
html.orig #login.scroll { --o-serif: "Noto Serif TC", "PMingLiU", "MingLiU", "Songti TC", serif; background: #000 !important; overflow: hidden !important; }
html.orig #login.scroll .login-panel { width: 640px !important; height: 480px; background: var(--ui-select-bg) 0 0 / 640px 480px no-repeat !important; }
html.orig #login.scroll .login-panel::before { content: ""; display: block; position: absolute; left: 340px; top: 222px; width: 207px; height: 53px; background: var(--ui-login-box) 0 0 / 207px 53px no-repeat; mix-blend-mode: lighten; }
html.orig #login.scroll #login-name, html.orig #login.scroll #login-pass { left: 433px; width: 112px !important; height: 15px !important; padding: 0 3px !important; font-size: 12px !important; line-height: 15px; }
html.orig #login.scroll #login-name { top: 224px; }
html.orig #login.scroll #login-pass { top: 258px; }
html.orig #login.scroll .login-notice { display: block; position: absolute; left: 40px; top: 52px; width: 210px; height: 312px; overflow: hidden; color: #2b2116; font: 500 12px/18px var(--o-serif); text-align: center; }
html.orig #login.scroll .login-notice h2 { margin: 6px 0 20px; font: 900 15px/20px var(--o-serif); color: #2b2116; }
html.orig #login.scroll .login-notice p { margin: 0 0 20px; }
html.orig #login.scroll .login-notice b { font-weight: 900; color: #8a1c10; }
html.orig #login.scroll #btn-signin, html.orig #login.scroll #btn-login-exit { display: block; position: absolute; left: 455px; width: 90px !important; height: 18px !important; padding: 0 !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important;
  font: 900 12px/18px var(--o-serif) !important; text-align: center; color: #efe3c0 !important; text-shadow: 0 0 3px rgba(240, 190, 90, 0.85), 0 0 1px #000; cursor: pointer; }
html.orig #login.scroll #btn-signin { top: 372px; letter-spacing: 6px; }
html.orig #login.scroll #btn-login-exit { top: 442px; }
html.orig #login.scroll #btn-signin:hover, html.orig #login.scroll #btn-login-exit:hover { color: #fff !important; text-shadow: 0 0 5px rgba(255, 210, 120, 1), 0 0 1px #000; }
@media (orientation: portrait) {
  html.orig.mobile #login .login-panel { width: 360px !important; height: 640px; background: var(--ui-login-tw-p) 0 0 / 360px 640px no-repeat !important; }
  html.orig.mobile #login-name, html.orig.mobile #login-pass { left: 152px; width: 127px !important; height: 16px !important; font-size: 11px !important; line-height: 16px; }
  html.orig.mobile #login-name { top: 470px; }
  html.orig.mobile #login-pass { top: 493px; }
  html.orig.mobile #btn-signin { left: 140px; top: 540px; width: 80px !important; height: 26px !important; }
  /*   提醒視窗：直式登入圖 360 寬，字放大到跟公告欄一樣好讀 */
  html.orig.mobile #login .login-dlg-box { width: 280px; padding: 16px 14px 10px; }
  html.orig.mobile #login .login-dlg-box p { font-size: 15px; }
  html.orig.mobile #login .login-dlg-sep { height: 9px; margin: 9px 8px 6px; }
  html.orig.mobile #login .login-dlg-sep::after { width: 6px; height: 6px; }
  html.orig.mobile #login .login-dlg-btns { gap: 30px; }
  html.orig.mobile #login .login-dlg-btns button { padding: 3px 8px !important; font-size: 18px !important; }
}
/* 手機的羊皮紙，直拿：圖放大到紙撐滿 360 寬，整個畫面就是一張紙，公告、帳密、登入都寫在紙上。
   帳密框的圖只有 207 寬，放大反白又大又糊（老闆 11-07）：這裡直接寫字。登入鈕是黑底金字，和原版的鈕（btn-login）同一個配色 */
@media (orientation: portrait) {
  html.orig.mobile #login.scroll .login-panel { width: 360px !important; height: 640px; background: var(--ui-select-bg) -11px 0 / 853.33px 640px no-repeat !important; }
  html.orig.mobile #login.scroll .login-notice { left: 40px; top: 60px; width: 280px; height: 270px; font: 500 14px/20px var(--o-serif); }
  html.orig.mobile #login.scroll .login-notice h2 { margin: 0 0 10px; font: 900 18px/24px var(--o-serif); }
  html.orig.mobile #login.scroll .login-notice p { margin: 0 0 8px; }
  html.orig.mobile #login.scroll .login-panel::before { content: "遊戲帳號：\A遊戲密碼："; white-space: pre; left: 58px; top: 339px; width: 72px; height: 76px; background: none; mix-blend-mode: normal; color: #2b2116; font: 900 14px/38px var(--o-serif); }
  html.orig.mobile #login.scroll #login-name, html.orig.mobile #login.scroll #login-pass { left: 130px; width: 172px !important; height: 28px !important; padding: 0 6px !important; box-sizing: border-box; font-size: 14px !important; line-height: 26px; color: #2b2116 !important; background: rgba(255, 250, 235, 0.45) !important; border: 1px solid rgba(90, 65, 35, 0.5) !important; border-radius: 2px !important; outline: none; }
  html.orig.mobile #login.scroll #login-name:focus, html.orig.mobile #login.scroll #login-pass:focus { border-color: rgba(138, 28, 16, 0.8) !important; }
  html.orig.mobile #login.scroll #login-name { top: 344px; }
  html.orig.mobile #login.scroll #login-pass { top: 382px; }
  html.orig.mobile #login.scroll #btn-signin { left: 105px; top: 426px; width: 150px !important; height: 38px !important; font: 900 16px/36px var(--o-serif) !important; letter-spacing: 12px; text-indent: 12px; border: 1px solid #6e5430 !important; border-radius: 2px !important; background: linear-gradient(#2c2117, #120c06) !important; box-shadow: inset 0 0 0 1px rgba(255, 220, 150, 0.1), 0 2px 4px rgba(0, 0, 0, 0.4) !important; }
  html.orig.mobile #login.scroll #btn-login-exit { left: 240px; top: 582px; width: 100px !important; height: 34px !important; font: 900 14px/34px var(--o-serif) !important; }
}
/* 手機的羊皮紙，橫拿：和電腦同一個版面（紙在左、帳密在右），上下會切掉（js/ui.js fitLogin），所以字和框都收到紙的中段 */
@media (orientation: landscape) {
  html.orig.mobile #login.scroll .login-notice { top: 94px; height: 228px; }
  html.orig.mobile #login.scroll .login-notice h2 { margin: 0 0 8px; }
  html.orig.mobile #login.scroll .login-notice p { margin: 0 0 10px; }
  html.orig.mobile #login.scroll .login-panel::before { top: 122px; }
  html.orig.mobile #login.scroll #login-name, html.orig.mobile #login.scroll #login-pass { height: 24px !important; line-height: 24px; }
  /*   帳密框：橫拿時在右邊的暗處，原本透明底、沒有框，看不到框在哪（老闆 11-09「橫式登入頁輸入框太黑，跟背景融為一體」）：淡金色的框、稍亮的底 */
  /*   底色不透明（老闆 11-09「輸入框底色歪掉」：半透明時底下登入圖的橫紋透上來，上半深、下半淺），iPhone 的輸入框外觀也拿掉 */
  html.orig.mobile #login.scroll #login-name, html.orig.mobile #login.scroll #login-pass { box-sizing: border-box; padding: 0 6px !important; font-size: 13px !important; color: #f4ecd8 !important;
    -webkit-appearance: none; appearance: none; background: #221d17 !important; background-clip: padding-box !important; border: 1px solid rgba(214, 180, 112, 0.85) !important; border-radius: 2px !important; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7) !important; outline: none; }
  html.orig.mobile #login.scroll #login-name:focus, html.orig.mobile #login.scroll #login-pass:focus { border-color: #ffd98a !important; background: #2c261e !important; }
  html.orig.mobile #login.scroll #login-name { top: 119px; }
  html.orig.mobile #login.scroll #login-pass { top: 153px; }
  html.orig.mobile #login.scroll #btn-signin, html.orig.mobile #login.scroll #btn-login-exit { height: 26px !important; line-height: 26px !important; }
  html.orig.mobile #login.scroll #btn-signin { top: 206px; }
  html.orig.mobile #login.scroll #btn-login-exit { top: 256px; }
}
/* 手機登入的「離開遊戲」：和電腦一樣是登入頁的發光文字（老闆 11-09「手機版登入頁離開遊戲跟桌機一樣，直接用登入文字樣式」，取代石刻字的圖） */

/* 第一次執行的下載畫面（js/preload.js）：原版的開頭圖 */
html.orig #preload { background: #000 var(--ui-logo-lin) center / auto 100% no-repeat !important; }
html.orig.mobile #preload { background-size: 100% auto !important; }

/* 結束視窗：原版的小石框（50，171 × 104，內框正好放三個 24 高的鈕）加台版的中文「重新開始」（44c）、「離開遊戲」（46c）、「取消」（48c），都是 91 × 24。
   11-09 換成客戶端英文的 RESTART、QUIT、CANCEL，老闆：「這是什麼鬼，為什麼變這文字」，換回中文。
   字串表也有「戰鬥中，無法重新開始」「戰鬥中無法離開遊戲」兩句。死亡（C_Restart）和活著按 Ctrl+Q、Alt+X（C_ChangeChar）共用，沒有別的字 */
html.orig #dead { background: none; }
html.orig #dead .panel {
  width: 171px; height: 104px; box-sizing: border-box; padding: 15px 0 0 !important; max-width: none;
  background: var(--ui-askbox) 0 0 / 100% 100% no-repeat !important; border: 0 !important; border-radius: 0 !important; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important;
}
html.orig.mobile #dead .panel { zoom: 1.6; }
/*   電腦：和其他視窗一樣放大 --hk 倍（原版是整張 640 × 480 一起放大，這個框和背包、對話框的比例固定；老闆 11-08「死掉重新開始那個視窗原本就那麼小嗎」） */
html.orig.pc #dead .panel { zoom: var(--hk, 1); }
html.orig #dead .btns { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 0; }
html.orig #dead .btns button { width: 91px !important; height: 24px !important; min-height: 0 !important; padding: 0 !important; margin: 0 !important; font-size: 0 !important; color: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: var(--ui-restart) 0 0 / 100% 100% no-repeat !important; }
html.orig #btn-respawn:hover { background-image: var(--ui-restart-h) !important; }
html.orig #dead #btn-quit { background-image: var(--ui-quit) !important; }
/*   手機還是台版中文的 91 × 24（離開遊戲沒有手機版的圖，用台版的 46c、47c：quit-zh） */
html.orig.mobile #dead #btn-quit { background-image: var(--ui-quit-zh) !important; }
html.orig.mobile #dead #btn-quit:hover { background-image: var(--ui-quit-zh-h) !important; }
html.orig #dead #btn-quit:hover { background-image: var(--ui-quit-h) !important; }
html.orig #dead #btn-dead-close { background-image: var(--ui-cancel) !important; }
html.orig #dead #btn-dead-close:hover { background-image: var(--ui-cancel-h) !important; }
/*   電腦的畫質（老闆 11-10「重新開始視窗 如果可以跟右下功能列一樣清晰化」）：和右下功能列一樣，石框和三個鈕用 xBR 放大 4 倍的圖
     （assets/local/hq-local.js 的 --ui-…-hq，有那些圖時 html 有 hq-ui），從 4 倍圖平滑縮到介面的倍數；沒有就照原圖點陣放大 */
html.orig.pc.hq-ui #dead { image-rendering: auto; }
html.orig.pc.hq-ui:not(.exit-art) #dead .panel { background-image: var(--ui-askbox-hq) !important; }
html.orig.pc.hq-ui:not(.exit-art) #dead #btn-respawn { background-image: var(--ui-restart-hq) !important; }
html.orig.pc.hq-ui:not(.exit-art) #dead #btn-respawn:hover { background-image: var(--ui-restart-h-hq) !important; }
html.orig.pc.hq-ui:not(.exit-art) #dead #btn-quit { background-image: var(--ui-quit-hq) !important; }
html.orig.pc.hq-ui:not(.exit-art) #dead #btn-quit:hover { background-image: var(--ui-quit-h-hq) !important; }
html.orig.pc.hq-ui:not(.exit-art) #dead #btn-dead-close { background-image: var(--ui-cancel-hq) !important; }
html.orig.pc.hq-ui:not(.exit-art) #dead #btn-dead-close:hover { background-image: var(--ui-cancel-h-hq) !important; }
/*   老闆 11-10 做的結束視窗（「離開遊戲視窗 給你用」）：金邊石框、三行字都畫在圖上（assets/local/ui/hq/exit.png，本機的美術檔；
     hq-local.js 設 --ui-exit-art、html 加 exit-art，沒有那張圖就照上面原版的）。框照圖的比例 171 × 98；三個鈕透明、對著三行字
     （量圖：字在 18～34、40～57、61～77 點，左右 45～126），滑過去字的後面亮一點、按下去再亮一點。電腦、手機都用 */
html.orig.exit-art #dead { image-rendering: auto; }
html.orig.exit-art #dead .panel { height: 98px; padding: 15.5px 0 0 !important; background: var(--ui-exit-art) 0 0 / 100% 100% no-repeat !important; }
html.orig.exit-art #dead .btns :is(#btn-respawn, #btn-quit, #btn-dead-close) { height: 21.9px !important; background: none !important; }
html.orig.exit-art #dead .btns :is(#btn-respawn, #btn-quit, #btn-dead-close):hover { background: radial-gradient(ellipse 62% 72% at 50% 50%, rgba(255, 226, 150, 0.2), transparent 78%) !important; }
html.orig.exit-art #dead .btns :is(#btn-respawn, #btn-quit, #btn-dead-close):active { background: radial-gradient(ellipse 62% 72% at 50% 50%, rgba(255, 226, 150, 0.34), transparent 78%) !important; }

/* 詢問視窗（50 的小石框） */
html.orig #ask .ask-box {
  border-style: solid; border-width: 14px 16px 16px 14px; border-image: var(--ui-askbox) 13.46% 9.36% 15.38% 8.19% fill / 14px 16px 16px 14px stretch;
  background: none !important; border-radius: 0 !important; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6) !important; padding: 4px 6px !important;
}
html.orig #ask .ask-btns button { box-shadow: none; }
/*   電腦：和結束視窗（#dead .panel）一樣放大 --hk 倍：原版是整張 640 × 480 一起放大（畫面檢查 11-09：1.8 倍的畫面上這個框和 OK、取消還是 1 倍大） */
html.orig.pc #ask .ask-box { zoom: var(--hk, 1); }
/*   數量的輸入框：瀏覽器自己的上下箭頭（白色）原版沒有 */
html.orig #ask-input { appearance: textfield; -moz-appearance: textfield; }
html.orig #ask-input::-webkit-inner-spin-button, html.orig #ask-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* 狀態圖示：原版是畫面最右邊由上往下一直排（使用者給的 1.82c 畫面），沒有剩下的時間（滑鼠停著看）；排滿了往左再開一排。
   原版的狀態圖示（.st，深色底的方框）是加亮疊在畫面上：深色的底透出後面的畫面。沒有原版狀態圖的用魔法圖示（自己有石框），不再加框、圓角 */
html.orig #buffs { left: auto !important; right: calc(4px + var(--sr, 0px)); top: calc(4px + var(--st, 0px)); max-width: none; max-height: 60vh; flex-direction: column; flex-wrap: wrap-reverse; align-content: flex-start; justify-content: flex-start; gap: 2px; }
html.orig.mobile.classic #buffs { max-width: none; justify-content: flex-start; }
html.orig.pc #buffs { top: calc(var(--f-top) + 40px * var(--hk, 1)); right: calc(var(--f-left) + 4px * var(--hk, 1)); gap: calc(2px * var(--hk, 1)); }   /* 電腦：右上角那排按鈕（#topbar）底下；在原版那一張裡面 */
html.orig .bicon, html.orig .bicon.bad { width: 32px; height: 32px; border: 0; border-radius: 0; box-shadow: none; }
/*   電腦：原版 800×600 畫面裡 32×32，跟著介面放大（--hk；1920×1080 是 1.8 倍）。之前固定 32 像素，畫面放大後相對變小（老闆 11-11「右上角狀態圖示太小，參考原版比例」） */
html.orig.pc .bicon, html.orig.pc .bicon.bad { width: calc(32px * var(--hk, 1)); height: calc(32px * var(--hk, 1)); }
html.orig .bicon span { display: none; }
html.orig .bicon.st { background: none; }
html.orig .bicon.st img { filter: none; }
/* 加亮要加在整排上：#buffs 固定在畫面上自成一層，只加在圖上的話是跟這一層透明的底混，深色的底不會透出遊戲畫面（老闆：要像原版一樣是透明的） */
html.orig #buffs { mix-blend-mode: screen; }
html.orig.mobile .bicon, html.orig.mobile .bicon.bad { width: 28px; height: 28px; }
html.orig.mobile.classic #btn-pk { top: calc(4px + var(--st)); right: calc(40px + var(--sr)); }   /* PK 鈕：在狀態圖示那一排的左邊 */

/* ── 只留原版（2026-10-31，老闆：「把你做的都先拿掉 只留原版的」）──
   有原版的圖時，自己加的都不顯示：上面那排（地名座標時間、攻略・討論、聲音、畫風、介面、選擇角色）只留安全／一般／戰鬥區域；
   選項視窗裡的畫風、介面；手機選單的介面；登入畫面的攻略連結。沒有原版的圖時照舊。
   攻略・討論留在選項（電腦的選項視窗、手機的選項鈕選單）：老闆要「討論版可以放在設定裡面」（2026-10-31） */
#ime, #log-thumb, #log-up, #log-dn { display: none; }
html.orig #topbar > :not(#zone-tag):not(#place-tag) { display: none !important; }
html.orig #btn-art-o, html.orig #win-opt [data-same="btn-skin"], html.orig #btn-skin-m, html.orig .login-guide { display: none !important; }

/* 設定（齒輪；電腦的選項視窗、手機的選單）：原版的選項視窗是主程式自己畫的，客戶端裡沒有它的圖（老闆 11-04：現在的樣子很突兀）。
   用原版的對話框（askbox：石紋底、金色繩框）撐開當框，選項是一行行的字，像原版的選單，不用自己畫的大按鈕；離開遊戲另外一行、紅字 */
html.orig #win-opt, html.orig #mmenu {
  background: none !important; border: 12px solid transparent !important; border-radius: 0 !important; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6) !important;
  border-image: var(--ui-askbox) 12 fill stretch !important; padding: 2px 4px !important; gap: 0 !important; min-width: 168px;
}
/*   電腦：開在畫面那一張（L.FRAME）的右下角、主介面上面（之前固定離視窗右邊 16 點，有黑邊時開在黑邊上） */
html.orig.pc #win-opt { right: calc(var(--f-left) + 16px); bottom: calc(var(--f-top) + var(--hh) * var(--hk) + 6px); }
/*   設定視窗也跟介面放大 --hk 倍（畫面檢查 11-09：4K 時介面 3.6 倍，設定還是 1 倍，小到很難按；老闆「放大比例要一致」）。
     zoom 也會放大自己的 right、bottom，位置先除回去 */
html.orig.pc #win-opt { zoom: var(--hk, 1); right: calc(var(--f-left) / var(--hk, 1) + 16px); bottom: calc(var(--f-top) / var(--hk, 1) + var(--hh) + 6px); }
/*   信件、拍賣、盟徽、選血盟、擺攤（本作自己的視窗）也跟介面放大 --hk 倍：老闆 11-09「忠於原版」（原版整張 640 × 480 一起放大，
     視窗和介面同一個比例）。zoom 會把 vh、px 的位置和高度一起放大，除回去；擺攤和商店一樣放在介面範圍的左上 */
html.orig.pc #win-letter, html.orig.pc #win-mail, html.orig.pc #win-cook, html.orig.pc #win-auction, html.orig.pc #win-emblem, html.orig.pc #win-clanpick, html.orig.pc #win-stall { zoom: var(--hk, 1); }
html.orig.pc #win-letter, html.orig.pc #win-mail, html.orig.pc #win-cook { max-height: calc(70vh / var(--hk, 1)); }
html.orig.pc #win-stall { left: calc(var(--o-left) / var(--hk, 1)) !important; right: auto !important; top: calc(var(--o-top) / var(--hk, 1)) !important; max-height: calc((100vh - 170px) / var(--hk, 1)); }
html.orig #win-opt .win-head { background: none !important; border: 0 !important; padding: 0 6px 4px !important; color: #d8c8a0; font-size: 13px; }
html.orig #win-opt .opt-list { gap: 0 !important; padding: 0 !important; }
html.orig #win-opt .opt-list button, html.orig #mmenu button {
  background: none !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; height: auto !important; min-height: 0 !important;
  padding: 8px 10px !important; text-align: left; font-size: 15px; color: #e8dcc0 !important; text-shadow: 0 1px 0 #000;
}
html.orig #win-opt .opt-list button:hover, html.orig #mmenu button:hover, html.orig #mmenu button:active { color: #ffe08a !important; background: rgba(255, 220, 140, 0.08) !important; }
html.orig #win-opt .opt-list button.guide-btn, html.orig #win-opt .opt-list [data-same="btn-guide"], html.orig #mmenu button.guide-btn { color: #f0c95a !important; }
html.orig #mmenu .mm-leave { margin-top: 4px; border-top: 1px solid rgba(200, 170, 110, 0.35) !important; color: #ff9a86 !important; }
html.orig #mmenu button + button:not(.mm-leave), html.orig #win-opt .opt-list button + button { border-top: 1px solid rgba(0, 0, 0, 0.35) !important; }

/* 隊伍視窗（隊員的體力，js/ui.js refreshParty）、手機的寵物視窗裡的體力條也是 .bar：主介面那兩條的位置、玻璃管、「體力:」不套，照視窗裡的排法
   （11-09 檢查手機介面時發現：電腦的隊員體力條被排到主介面體力條的位置〔left 140、right 50% + 38〕，寬是 0，看不到） */
html.orig :is(#party-body, #pet-body) .bar { position: relative !important; left: auto !important; right: auto !important; top: auto !important; bottom: auto !important; width: auto !important; z-index: auto !important; }
html.orig :is(#party-body, #pet-body) .bar::before, html.orig :is(#party-body, #pet-body) .bar .val::before { content: none !important; }
html.orig :is(#party-body, #pet-body) .bar .fill { left: 0 !important; right: auto !important; }   /* 從右邊扣（主介面的體力往龍頭扣）只有主介面 */

/* ── 手機的主介面用電腦版的原圖（html.mpc）──
   老闆 11-09「有跟你說手機版的介面都要改得跟桌機版一樣的元素，現在的手機版介面是自己畫的，可以把桌機版的切一切放到手機板上嗎？
   一樣做一個按鈕讓我切換比較」：上面電腦的主介面（:is(.pc, .mpc) 那一段，和 css/classic.css 的 :is(.pc.cw, .mpc)）整套照用——
   同一張 406、431 的左欄、右欄、對話框、捲軸，同一套龍框、龍頭、體力魔力的玻璃管，快捷格 F5～F12、下面 7 顆按鈕的位置都一樣；
   這裡只補手機不一樣的地方。classic.css 那套手機原始介面（自己排的）在 html.mpc 時不作用（:not(.mpc)）。
   js/main.js：☰ 的「主介面」切換（記在這台裝置）；--hk 照手機畫面算；橫拿的精簡介面不套。
   橫拿：照電腦版的排法（左欄｜對話框｜右欄）整塊放大 --hk 倍，貼著畫面下緣（扣掉 iPhone 的 Home 橫條）。
   直拿：上面龍框、對話框拉滿寬；下面左欄、右欄並排放滿寬（再放大 --mb 倍，手指點得到） */
html.orig.mobile.classic.mpc { --f-left: 0px; --f-top: 0px; --mb: 1; --cb: 0px; --hudh: calc((var(--hh) + var(--cb)) * var(--hk)); --hl: var(--sl); --hr: var(--sr); }
/*   橫拿：主介面左右貼齊螢幕邊緣，不讓開 iPhone 的瀏海（老闆 11-09「左右留空是為了 iPhone 瀏海，但貼齊底部時不會擋到，往左右延伸；
     跟電腦版一樣左右區塊延伸，中間聊天變長」：瀏海、動態島在螢幕側邊中間，貼著底部的主介面碰不到）。--hl、--hr 是主介面左右離邊緣多遠。
     接著「左右下角會擋到，看來只能縮進來一點，填滿灰色背景」：iPhone 螢幕的圓角切到左下的時間圖示、右下的 Q 鈕，
     兩邊各縮進瀏海寬的一半（老闆的 iPhone 62 → 31 點：圖示中間那個高度圓角切進約 27 點），空出來的地方下面補灰色石紋 */
@media (orientation: landscape) { html.orig.mobile.classic.mpc { --hl: calc(var(--sl) / 2); --hr: calc(var(--sr) / 2); } }
html.orig.mobile.classic.mpc #hud { position: fixed; top: auto; left: calc(var(--hl) / var(--hk)); right: calc(var(--hr) / var(--hk)); bottom: calc(var(--sb) / var(--hk)); height: calc(var(--hh) + var(--cb));
  padding: 0; border: 0; pointer-events: none; image-rendering: pixelated; }
/*   點到介面的底（石板、對話框、右欄）不會變成點地面 */
html.orig.mobile.classic.mpc #hud::before, html.orig.mobile.classic.mpc #hud::after, html.orig.mobile.classic.mpc #hud .bar { pointer-events: auto; }
/*   龍框那一條上面是透明的（繩子、龍頭之間看得到地圖）：點得到地面 */
html.orig.mobile.classic.mpc #hud > .cl-frame { pointer-events: none; }
/*   按鈕：原版那排 7 顆（說明、角色、魔法、背包、隊伍、選項、結束）；手機的選項是 ☰ 選單（設定視窗沒有手機的按鈕），放在齒輪那格。
     圖上的按鈕不到手指寬：點得到的範圍往下多到畫面下緣（iPhone 的 Home 橫條那條） */
html.orig.mobile.classic.mpc .hud-right [data-win="win-opt"] { display: none; }
html.orig.mobile.classic.mpc .hud-right button { position: relative; width: auto; }
html.orig.mobile.classic.mpc .hud-right #btn-menu { order: 6; flex: 1; height: 21px; padding: 0; font-size: 0; color: transparent; background: none; border: 1px solid transparent; border-radius: 0; box-shadow: none; text-shadow: none; }
html.orig.mobile.classic.mpc .hud-right button::after { content: ''; position: absolute; left: 0; right: 0; top: 0; bottom: calc(-2px - var(--sb) / var(--hk) / var(--mb)); }
html.orig.mobile.classic.mpc .hud-right button:active, html.orig.mobile.classic.mpc .hud-right #btn-menu.open { background-color: rgba(255, 240, 200, 0.22); }
/*   負重、飽食度的百分比、時間：電腦平常不顯示、滑鼠移過去才有（老闆 11-04）；手機沒有滑鼠，一直顯示（之前的手機介面也是） */
html.orig.mobile.classic.mpc .cl-stat .cl-bar > span, html.orig.mobile.classic.mpc #cl-time { display: block; }
/*   快捷格：手機的快捷列不是置中的那條；設定快捷時（.assign）格子框金色 */
html.orig.mobile.classic.mpc #hotbar { transform: none; }
html.orig.mobile.classic.mpc .hot.assign { outline: 1px solid #ffe08a; outline-offset: -1px; }
/*   對話框右下角的 ▲▼（換高度）、捲軸的兩顆圓鈕：圖很小，點得到的範圍往外多一點 */
html.orig.mobile.classic.mpc #chat-size::before, html.orig.mobile.classic.mpc #log-up::before, html.orig.mobile.classic.mpc #log-dn::before { content: ''; position: absolute; inset: -4px -1px; }
/*   對話：手指上下滑看之前的訊息；輸入列（圖上最下面那條）點了開聊天視窗。輸入法的「中」只有電腦有 */
html.orig.mobile.classic.mpc #log { z-index: 2; pointer-events: auto; overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; color: #f4f0e4; }
html.orig.mobile.classic.mpc #ime { display: none; }
html.orig.mobile.classic.mpc #btn-chat { z-index: 2; padding: 0; font-size: 0; color: transparent; background: none; border: 0; border-radius: 0; box-shadow: none; }
html.orig.mobile.classic.mpc #chat-unread { top: -4px; right: auto; left: 20px; }
/*   地名在右欄的上面靠右（電腦一樣）；撿取在地名上面；☰ 選單從齒輪往上開（蓋在介面上，選完就收） */
html.orig.mobile.classic.mpc #topbar { top: auto; left: auto; align-items: flex-end; }
html.orig.mobile.classic.mpc #mmenu { top: auto; left: auto; right: calc(var(--sr) + 2px); bottom: calc(var(--sb) + 23px * var(--hk) * var(--mb)); max-height: calc(100% - var(--st) - var(--sb) - 28px * var(--hk) * var(--mb)); overflow-y: auto; }
html.orig.mobile.classic.mpc #mode-bar { top: auto; bottom: calc(var(--sb) + var(--hudh) + 8px); }
/* 圓鈕（輔助喝水、介面、直橫）：左上角一橫排（老闆 11-18「自動喝水 介面調整可以放到左上方」；之前 11-14 是左下經驗值上面）。直拿、橫拿一樣 */
html.orig.mobile.classic.mpc #side-btns { top: calc(6px + var(--st)); bottom: auto; left: calc(6px + var(--sl)); width: auto; flex-direction: row; gap: 12px; }
/* 隊友、寵物快選（老闆 11-18「組隊區塊 橫式放在左中 直式放在左下」）：
     橫拿：左邊、圓鈕底下到主介面上面那一段的正中間；直拿：主介面上面的左下角（之前圓鈕的位置），人多了往上長 */
html.orig.mobile.classic.mpc #mob-party { top: calc(var(--st) + 52px); bottom: calc(var(--sb) + var(--hudh) + 8px); justify-content: center; }
@media (orientation: portrait) { html.orig.mobile.classic.mpc #mob-party { top: calc(var(--st) + 52px); bottom: calc(var(--hudh) + var(--sb) + 10px); justify-content: flex-end; } }
html.orig.mobile.classic.mpc .win { z-index: 5; }   /* 視窗蓋在對話框的字上面 */
@media (orientation: landscape) {
  /*   左邊的圓鈕：11-14 是貼在左下「等級／經驗值」那欄上面一橫排，11-18 老闆改到左上角（上面 #side-btns 那行）。
       精簡模式照舊貼在功能鈕那塊上面（css/classic.css mfight） */
  html.orig.mobile.classic.mpc #log { left: calc(var(--hl) + 116px * var(--hk)); right: calc(var(--hr) + 162px * var(--hk)); top: auto; bottom: calc(var(--sb) + 18px * var(--hk)); }
  html.orig.mobile.classic.mpc #btn-chat { left: calc(var(--hl) + 112px * var(--hk)); right: calc(var(--hr) + 160px * var(--hk)); bottom: var(--sb); height: calc(17px * var(--hk)); }
  html.orig.mobile.classic.mpc #topbar { right: calc(var(--sr) + 6px * var(--hk)); bottom: calc(var(--sb) + 104px * var(--hk) + 2px); }
  html.orig.mobile.classic.mpc #btn-pickup { right: calc(var(--sr) + 14px); bottom: calc(var(--sb) + 104px * var(--hk) + 30px); }
}
/*   直拿：最上面龍框（40 高）、對話框（85，加高 109），下面左欄、右欄並排（104 高，--mb 倍）。--cb 是下面那排的高（#hud 裡的點） */
@media (orientation: portrait) {
  html.orig.mobile.classic.mpc { --cb: calc(104px * var(--mb)); }
  html.orig.mobile.classic.mpc .cl-frame { left: 0; right: 0; }
  /*   體力、魔力：龍頭的兩根柱子之間空出來（電腦是照畫面中間往兩邊算：龍頭左邊 7 點是左柱、56 點是右柱的外緣），兩端到龍的柱子 */
  html.orig.mobile.classic.mpc #hud .bar.hp { left: 28px; right: calc(50% + 21.5px); }
  html.orig.mobile.classic.mpc #hud .bar.mp { left: calc(50% + 27.5px); right: 27px; }
  html.orig.mobile.classic.mpc #hud::before { left: 0; right: 15px; bottom: var(--cb); }
  html.orig.mobile.classic.mpc .cl-scroll { right: 0; bottom: var(--cb); }
  html.orig.mobile.classic.mpc #chat-size { right: 2px; bottom: calc(var(--cb) + 1px); }
  html.orig.mobile.classic.mpc #log-thumb { right: 1px; }
  html.orig.mobile.classic.mpc #log-up { right: 0; }
  html.orig.mobile.classic.mpc #log-dn { right: 0; bottom: calc(var(--cb) + 21px); }
  /*   左欄、右欄：一直是平常那兩張（406，對話框加高時不跟著長） */
  html.orig.mobile.classic.mpc .cl-stat, html.orig.mobile.classic.mpc.o-chatx .cl-stat { height: 104px; zoom: var(--mb); background-image: var(--ui-hud-l-n); }
  html.orig.mobile.classic.mpc #hud::after, html.orig.mobile.classic.mpc.o-chatx #hud::after { width: calc(145px * var(--mb)); height: var(--cb); background-image: var(--ui-hud-r-n); }
  html.orig.mobile.classic.mpc #hotbar, html.orig.mobile.classic.mpc .hud-right { zoom: var(--mb); }
  html.orig.mobile.classic.mpc #log { left: calc(var(--hl) + 4px * var(--hk)); right: calc(var(--hr) + 17px * var(--hk)); top: auto; bottom: calc(var(--sb) + (var(--cb) + 18px) * var(--hk)); }
  html.orig.mobile.classic.mpc #btn-chat { left: var(--hl); right: calc(var(--hr) + 15px * var(--hk)); bottom: calc(var(--sb) + var(--cb) * var(--hk)); height: calc(17px * var(--hk)); }
  html.orig.mobile.classic.mpc #topbar { right: calc(var(--sr) + 8px); bottom: calc(var(--sb) + var(--hudh) + 6px); }
  html.orig.mobile.classic.mpc #btn-pickup { right: calc(var(--sr) + 14px); bottom: calc(var(--sb) + var(--hudh) + 40px); }
}
/* 手機的功能鈕（精簡介面、之前的手機介面）也用電腦主介面右下那排原圖（老闆 11-09「所有功能按鈕都用這個版本」，給的圖是電腦那排：
   說明、角色、魔法、背包、隊伍、齒輪、結束）：同一張 xBR 4 倍圖（--ui-hud-row-hq，七格），照 --i 取第幾格（☰ 用齒輪那格）。
   原圖一格約 1 : 1，精簡介面的按鈕改成 40 × 40 的正方形（之前照 right.png 的 50 : 63） */
html.orig.mobile.classic:not(.mpc) .hud-right button[title], html.orig.mobile.classic:not(.mpc) .hud-right #btn-menu {
  background: var(--ui-hud-row-hq) calc(var(--i) * 100% / 6) 0 / 700% 100% no-repeat; image-rendering: auto; border-radius: 0; }
@media (orientation: landscape) { html.orig.mobile.classic.mfight:not(.mpc) { --bw: 40px; --bh: 40px; } }
/*   主介面左右縮進來的地方（--hl、--hr，橫拿是瀏海寬的一半）：左欄、右欄的底往外延伸到畫面邊緣，用之前手機介面那個灰色石紋
     （老闆 11-09「左右下角會擋到，看來只能縮進來一點，填滿灰色背景」）。高度和兩欄一樣（右欄 --hh − 21）；點到不會變成點地面 */
html.orig.mobile.classic.mpc .cl-stat::before, html.orig.mobile.classic.mpc .hud-right::before { content: ''; position: absolute; pointer-events: auto;
  background: var(--stone), linear-gradient(#3a3a3e, #26262a 45%, #1a1a1d); }
html.orig.mobile.classic.mpc .cl-stat::before { right: 100%; top: 0; bottom: 0; width: calc(var(--hl) / var(--hk)); }
html.orig.mobile.classic.mpc .hud-right::before { left: 100%; bottom: -1px; height: calc(var(--hh) - 21px); width: calc(var(--hr) / var(--hk)); }

/* ── 輔助喝水（老闆 11-15；css/style.css 那段是樣子，這裡是原版介面的位置）──
   電腦：圖示在原版那一張（L.FRAME）的左下角、左欄（等級、經驗值，原圖從下面算起 104 高）正上方，和右邊的安全區域對稱；
   跟著介面放大 --hk 倍（zoom 也會放大 left、bottom，先除回去）。視窗開在圖示上面，石框（1.82c 客戶端沒有這個視窗的圖，和信件、料理書一樣用 562 的框） */
html.orig.pc #btn-autoheal-pc { zoom: var(--hk, 1); right: auto; left: calc(var(--f-left) / var(--hk, 1) + 6px); bottom: calc(var(--f-top) / var(--hk, 1) + 104px + 36px); }   /* 地名（#place-tag）在它下面那一行，中間留空（老闆 11-15「太靠近地名 很壓迫」） */
html.orig.pc #win-autoheal { zoom: var(--hk, 1); right: auto; left: calc(var(--f-left) / var(--hk, 1) + 4px); bottom: calc(var(--f-top) / var(--hk, 1) + 104px + 52px); width: 316px; max-height: calc((100vh - 2 * var(--f-top) - 8px) / var(--hk, 1) - 156px); }   /* 最高到原版那一張的上緣 */
/*   石框的左右框是 13、47：內容少一點邊 */
html.orig #ah-body { padding: 0 4px 2px 2px; scrollbar-width: none; }   /* 瀏覽器的捲軸不要（石框右邊已經畫著捲軸；擠掉一格藥水的寬），滾輪、手指照樣捲 */
html.orig #ah-body::-webkit-scrollbar { display: none; }
html.orig .ah-head b { font-weight: normal; color: #f0d27a; }
html.orig.pc #win-autoheal :is(.ah-head b, .ah-seg button) { font-size: 13px; }
html.orig.pc #win-autoheal :is(.ah-note, .ah-next, .ah-empty) { font-size: 12px; }
html.orig.pc #win-autoheal .ah-name { font-size: 11px; line-height: 13px; }   /* 藥水名字：11 像素有點陣字，比 12 多擠得下一點 */
/*   手機：和信件、料理書一樣放在畫面上面置中，內容只到主介面上面 */
html.orig.mobile #win-autoheal { left: 50% !important; right: auto !important; top: calc(6px + var(--st, 0px)) !important; bottom: auto !important; transform: translateX(-50%) !important; width: min(360px, calc(100vw - 12px)); max-height: calc(100% - var(--hudh, 0px) - var(--st, 0px) - var(--sb, 0px) - 12px); }
/*   橫拿：畫面矮，視窗可以往下蓋到主介面上緣的龍框（左欄、右欄從下面算起 104 高），藥水兩排加下一瓶那行不用捲 */
@media (orientation: landscape) {
  html.orig.mobile #win-autoheal { width: min(660px, calc(100vw - 12px - var(--sl, 0px) - var(--sr, 0px))); }
  html.orig.mobile.mpc #win-autoheal { max-height: calc(100% - 104px * var(--hk, 1) - var(--st, 0px) - var(--sb, 0px) - 10px); }
}

/* ── 登入、選角畫面改版（老闆 11-19「右下的 確認 登出帳號 真的很可怕 依照現有的素材跟風格去分割放大或縮小畫面排出高級的介面」）──
   按鈕、輸入框一律用原版提醒視窗的框（askbox 171×104：外圈金色麻繩、內圈深色石面）切九宮格（四邊各 14 像素）拉成需要的大小；
   字是建立角色、資料欄同一套明體金字發光。原本右下角是三種樣子湊在一起（確認的小圖、底線黃字的登出帳號、刪除角色的圖），現在同一套框 */
html.orig #select.old, html.orig #login.scroll { --o-serif: "Noto Serif TC", "PMingLiU", "MingLiU", "Songti TC", serif; }
html.orig #select.old { overflow: hidden !important; }   /* 手機直拿：640 寬的圖縮小後原本的版面還是 640，下面多一條橫捲軸 */
html.orig #select.old #btn-login, html.orig #select.old #btn-signout:not(.hidden), html.orig.app #select.old #btn-signout:not(.hidden), html.orig #select.old #btn-delete,
html.orig #login.scroll #btn-signin, html.orig #login.scroll #btn-login-exit {
  box-sizing: border-box !important; padding: 0 !important; margin: 0 !important; border-style: solid !important; border-width: 7px 8px !important; border-radius: 0 !important;
  border-image: var(--ui-askbox) 14 fill / 7px 8px stretch !important; background: none !important; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.8) !important;
  font: 900 13px/14px var(--o-serif) !important; letter-spacing: 3px; text-indent: 3px; text-align: center; white-space: nowrap; text-decoration: none !important;
  color: #f6e2b0 !important; text-shadow: 0 0 4px rgba(235, 170, 60, 0.95), 0 0 1px #000, 0 1px 1px #000 !important; cursor: pointer; transition: filter 0.12s; }
html.orig #select.old #btn-login:hover, html.orig #select.old #btn-signout:not(.hidden):hover, html.orig.app #select.old #btn-signout:not(.hidden):hover, html.orig #select.old #btn-delete:hover:not(:disabled),
html.orig #login.scroll #btn-signin:hover, html.orig #login.scroll #btn-login-exit:hover {
  background-image: none !important; filter: brightness(1.25); color: #fff !important; text-shadow: 0 0 6px rgba(255, 210, 120, 1), 0 0 1px #000, 0 1px 1px #000 !important; }
html.orig #select.old .btns > button:active:not(:disabled), html.orig #login.scroll #btn-signin:active, html.orig #login.scroll #btn-login-exit:active { filter: brightness(0.85); }
html.orig #select.old #btn-delete:disabled { opacity: 0.4; cursor: default; background-image: none !important; }
html.orig.mobile #select.old #btn-login::after, html.orig.mobile #select.old #btn-delete::after { content: none; }   /* 按鈕夠大了，不用再往外擴按的範圍 */
/*   電腦、手機橫拿（640×480 的座標）：右下一欄，和左邊資料欄的框對齊——上緣對「等級」那一格的框（336）、下緣對最後一格「智力」的框（462）；寬照圖上武器堆右邊的空處 */
html.orig #select.old #btn-login, html.orig #select.old #btn-signout:not(.hidden), html.orig.app #select.old #btn-signout:not(.hidden), html.orig #select.old #btn-delete { left: 492px; width: 136px !important; }
html.orig #select.old #btn-login { top: 336px; height: 40px !important; line-height: 26px !important; font-size: 15px !important; letter-spacing: 6px; text-indent: 6px; }
html.orig #select.old #btn-signout:not(.hidden), html.orig.app #select.old #btn-signout:not(.hidden) { top: 384px; height: 35px !important; line-height: 21px !important; }
html.orig #select.old #btn-delete { top: 427px; height: 35px !important; line-height: 21px !important; color: #dccba2 !important; }
/*   手機直拿（js/ui.js selectOldSetup 的 port）：一整張 640×480 縮到 390 寬只剩中間一條，字小到看不到。把圖切成兩塊各自放大：
     上面三個拱門（圖的上 292）照寬度；下面資料欄（圖的 38,285 起 440×185）另外放大、套上同一個框；按鈕放在最下面，照手指的大小 */
html.orig.mobile #select.old.port .select-panel { transform: none; width: 100%; height: 100%; background: none; }
html.orig.mobile #select.old.port .select-panel::before { display: none; }
html.orig.mobile #select.old.port #select-slots { top: var(--py, 0px); transform-origin: 0 0; transform: scale(var(--k1, 1)); background: var(--ui-select-old) 0 0 / 640px 480px no-repeat; }
html.orig.mobile #select.old.port #select-slots::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, #000, transparent 28px, transparent 612px, #000), linear-gradient(transparent 276px, #000 292px); }
html.orig.mobile #select.old.port .sel-arrow { top: calc(var(--py, 0px) + 118px * var(--k1, 1)); width: calc(36px * var(--k1, 1)); height: calc(46px * var(--k1, 1)); }
html.orig.mobile #select.old.port #sel-prev { left: calc(10px * var(--k1, 1)); }
html.orig.mobile #select.old.port #sel-next { left: calc(595px * var(--k1, 1)); }
html.orig.mobile #select.old.port #select-info { left: var(--ix, 0px); top: var(--iy, 0px); transform-origin: 0 0; transform: scale(var(--k2, 1));
  box-sizing: content-box !important; background: var(--ui-select-old) -38px -285px / 640px 480px no-repeat #000 !important; border: 7px solid transparent !important; border-image: var(--ui-askbox) 14 / 7px stretch !important; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.85); }
html.orig.mobile #select.old.port #select-info .oc { font-size: 13px; }   /* 縮小後的字：圖上的框 15 高，放得下 13 */
html.orig.mobile #select.old.port #btn-login, html.orig.mobile #select.old.port #btn-signout:not(.hidden), html.orig.mobile.app #select.old.port #btn-signout:not(.hidden), html.orig.mobile #select.old.port #btn-delete {
  left: 16px; width: calc(100% - 32px) !important; border-width: 10px 11px !important; border-image-width: 10px 11px !important; }
html.orig.mobile #select.old.port #btn-login { top: var(--by, 0px); height: 54px !important; line-height: 34px !important; font-size: 19px !important; letter-spacing: 10px; text-indent: 10px; }
html.orig.mobile #select.old.port #btn-signout:not(.hidden), html.orig.mobile.app #select.old.port #btn-signout:not(.hidden), html.orig.mobile #select.old.port #btn-delete { top: calc(var(--by, 0px) + 64px); height: 46px !important; line-height: 26px !important; font-size: 15px !important; }
html.orig.mobile #select.old.port #btn-signout:not(.hidden), html.orig.mobile.app #select.old.port #btn-signout:not(.hidden) { width: calc(50% - 22px) !important; }
html.orig.mobile #select.old.port #btn-delete { left: calc(50% + 6px); width: calc(50% - 22px) !important; }

/*   登入畫面（羊皮紙，640×480）：帳密框套同一個框（蓋住 login-box 圖上原本的暗框，左邊「遊戲帳號：」「遊戲密碼：」的字照舊）；
     登入是主要的鈕，放在帳密框下方、同寬；離開遊戲小一號緊接在登入下面、置中（老闆 11-19「登入 離開遊戲 分太開 登入太上面 都黏到輸入框了」：
     之前登入離密碼框只有 16、離開遊戲留在右下 440）。三種畫面都是：密碼框下空 30 左右、登入、空 14、離開遊戲 */
html.orig #login.scroll #login-name, html.orig #login.scroll #login-pass { box-sizing: border-box; left: 429px; width: 124px !important; height: 24px !important; padding: 0 5px !important; line-height: 14px;
  -webkit-appearance: none; appearance: none; border: 5px solid transparent !important; border-image: var(--ui-askbox) 14 fill / 5px stretch !important; border-radius: 0 !important; background: none !important; outline: none; color: #f4ecd8 !important; font-size: 12px !important; }
html.orig #login.scroll #login-name { top: 219px; }
html.orig #login.scroll #login-pass { top: 253px; }
html.orig #login.scroll #login-name:focus, html.orig #login.scroll #login-pass:focus { filter: brightness(1.2); box-shadow: 0 0 6px rgba(255, 200, 110, 0.55) !important; }
html.orig #login.scroll #btn-signin { left: 429px; top: 307px; width: 124px !important; height: 34px !important; line-height: 20px !important; font-size: 15px !important; letter-spacing: 12px; text-indent: 12px; }
html.orig #login.scroll #btn-login-exit { left: 441px; top: 355px; width: 100px !important; height: 26px !important; line-height: 12px !important; font-size: 12px !important; letter-spacing: 2px; text-indent: 2px; }
@media (orientation: portrait) {
  /*   手機直拿（360×640）：帳密照舊寫在羊皮紙上；登入、離開遊戲換成同一個框 */
  html.orig.mobile #login.scroll #btn-signin { left: 100px; top: 438px; width: 160px !important; height: 44px !important; line-height: 28px !important; font-size: 18px !important; letter-spacing: 14px; text-indent: 14px;
    border: solid !important; border-width: 8px 9px !important; border-image: var(--ui-askbox) 14 fill / 8px 9px stretch !important; border-radius: 0 !important; background: none !important; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55) !important; }
  html.orig.mobile #login.scroll #btn-login-exit { left: 128px; top: 496px; width: 104px !important; height: 34px !important; line-height: 20px !important; font-size: 13px !important; }
}
@media (orientation: landscape) {
  /*   手機橫拿：帳密框在右邊的暗處，原本是金色細線框（11-09）；換成同一個框，位置照舊 */
  html.orig.mobile #login.scroll #login-name, html.orig.mobile #login.scroll #login-pass { left: 427px; width: 128px !important; height: 30px !important; padding: 0 6px !important; line-height: 18px !important;
    border: 6px solid transparent !important; border-image: var(--ui-askbox) 14 fill / 6px stretch !important; background: none !important; box-shadow: none !important; font-size: 13px !important; }
  html.orig.mobile #login.scroll #login-name { top: 113px; }
  html.orig.mobile #login.scroll #login-pass { top: 150px; }
  html.orig.mobile #login.scroll #login-name:focus, html.orig.mobile #login.scroll #login-pass:focus { background: none !important; filter: brightness(1.2); box-shadow: 0 0 6px rgba(255, 200, 110, 0.55) !important; }
  html.orig.mobile #login.scroll #btn-signin { left: 427px; top: 204px; width: 128px !important; height: 38px !important; line-height: 24px !important; }
  html.orig.mobile #login.scroll #btn-login-exit { left: 441px; top: 256px; width: 100px !important; height: 30px !important; line-height: 16px !important; }
}
