/*
 * The six windows of the main menu, laid out as in the original client: each is a picture of fixed size
 * (assets/skin/white/Form_*.png, labels and frames already drawn) with the live parts placed on it at the
 * original coordinates (data/json/ui_skin.json where it has them, measured from the pictures otherwise).
 *
 *   item     Form_RoleStatus_1  386×461   status and bag in one window
 *   Skill    form_skill_2       290×459   tabs 物理 魔法 輔助 生活 說明
 *   compound Form_Compound_1    299×467   bag, five material cells, the pot
 *   group    form_team_2        371×539   companions and the party
 *   social   form_friend_2      356×493   friends, five to a page
 *   system   form_system_2      388×451   switches and sound
 *
 * Buttons are three-state sheets stacked top to bottom (normal, hovered, pressed / selected).
 */

/* ── a form and the sprite button ─────────────────────────────────────────────── */

.window.form {
  display: block; padding: 0; margin: 0; min-width: 0; max-height: none; overflow: visible;
  width: var(--fw); height: var(--fh);
  border: 0; border-image: none; border-radius: 0;
  background: var(--fbg) 0 0 no-repeat;
  top: max(8px, calc(50vh - var(--fh) / 2 - 30px));
  left: calc(50vw - var(--fw) / 2);
  font-size: 12px; color: #33456e;
}
.window.form > header { position: absolute; left: 0; top: 0; width: 100%; height: 54px; min-height: 0; padding: 0; border: 0; }
.window.form > header h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }   /* the title is in the picture */
.window.form .win-close { right: auto; left: var(--cx); top: var(--cy); z-index: 2; }
.window.form > .win-body { position: absolute; inset: 0; padding: 0; overflow: visible; pointer-events: none; }
.window.form > .win-body > * { position: absolute; pointer-events: auto; }
.window.form .msg { margin: 0; min-height: 0; font-size: 11px; line-height: 1.2; }

.sbtn {
  width: var(--w); height: var(--h); padding: 0; margin: 0; flex: none;
  border: 0; border-radius: 0; box-shadow: none; cursor: pointer;
  background: var(--img) 0 0 no-repeat; font-size: 0; color: transparent;
}
.sbtn:hover:not(:disabled) { background-position: 0 calc(var(--h) * -1); }
.sbtn:active:not(:disabled), .sbtn[aria-pressed=true], .sbtn[aria-selected=true] { background-position: 0 calc(var(--h) * -2); }
.sbtn:disabled { cursor: default; opacity: 0.45; }
.sbtn:focus-visible { outline: 2px solid #f2b84b; outline-offset: 1px; }
.sbtn.close  { --img: url(../assets/skin/default/btn_close_1.png); --w: 56px; --h: 20px; }
.sbtn.on     { --img: url(../assets/skin/default/Btn_On_1.png);    --w: 39px; --h: 20px; }
.sbtn.off    { --img: url(../assets/skin/default/Btn_Off_1.png);   --w: 39px; --h: 20px; }
.sbtn.setup  { --img: url(../assets/skin/default/Btn_Setup_1.png); --w: 39px; --h: 20px; }
.sbtn.left   { --img: url(../assets/skin/default/Btn_ArrowL_5.png); --w: 17px; --h: 17px; }
.sbtn.right  { --img: url(../assets/skin/default/Btn_ArrowR_5.png); --w: 17px; --h: 17px; }
.form-tabs { display: flex; }
.form-num { font: 700 12px/1 "Courier New", monospace; color: #1d2a4a; white-space: nowrap; }

/* ── item: status on the left, the bag on the right ───────────────────────────── */

#win-status { --fw: 386px; --fh: 461px; --fbg: url(../assets/skin/white/Form_RoleStatus_1.png); --cx: 336px; --cy: 26px; }
#st-element { left: 19px; top: 56px; width: 25px; height: 25px; }
#st-name { left: 50px; top: 61px; width: 130px; font-size: 12px; font-weight: 700; color: #1d2a4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#st-level { left: 18px; top: 82px; width: 80px; height: 15px; background: url(../assets/skin/default/Main_Word_Lv.png) 0 0 no-repeat; }
#st-level .wl-digits { position: absolute; left: 30px; top: 1px; }
#st-potential { left: 126px; top: 88px; --img: url(../assets/skin/default/Btn_Potential_1.png); --w: 43px; --h: 20px; }
/* the potential level beside 潛能, in black (the owner's screenshot: its digits at 174…187, 93…101 of the form) */
#st-points { left: 174px; top: 90px; line-height: 15px; color: #080808; }
/* the job symbol under LV (Icon_<job>, 16 × 16), its name in the hover hint */
#st-job { left: 23px; top: 107px; width: 16px; height: 16px; }
#st-job.hidden { display: none; }
#st-doll { left: 36px; top: 108px; width: 128px; height: 128px; pointer-events: none !important; image-rendering: pixelated; }
#equip-slots { left: 0; top: 0; width: 0; height: 0; }
.equip-slot {
  position: absolute; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 0; background: none;
  display: block; cursor: pointer;
}
.equip-slot:disabled { cursor: default; }
.equip-slot img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; display: block; }
.equip-slot:hover:not(:disabled) { outline: 1px solid #e2b100; }
.equip-slot[data-place="1"] { left: 84px;  top: 84px; }      /* head */
.equip-slot[data-place="2"] { left: 147px; top: 186px; }     /* body */
.equip-slot[data-place="3"] { left: 25px;  top: 125px; }     /* hand */
.equip-slot[data-place="4"] { left: 147px; top: 126px; }     /* arm */
.equip-slot[data-place="5"] { left: 84px;  top: 220px; }     /* shoes */
.equip-slot[data-place="6"] { left: 24px;  top: 185px; }     /* special */
#st-turn-l { left: 40px;  top: 245px; --img: url(../assets/skin/default/Btn_ArrowL_9.png); --w: 20px; --h: 20px; }
#st-turn-r { left: 139px; top: 245px; --img: url(../assets/skin/default/Btn_ArrowR_9.png); --w: 20px; --h: 20px; }
.st-bar { left: 40px; width: 80px; height: 7px; background: #5a6480; border: 1px solid #2e3650; box-sizing: content-box; }
.st-bar i { display: block; height: 100%; width: 0; }
#st-hp-bar { top: 274px; }  #st-hp-bar i { background: linear-gradient(#ff8a7a, #d8261a); }
#st-sp-bar { top: 289px; }  #st-sp-bar i { background: linear-gradient(#8fd0ff, #1e78d8); }
#st-exp-bar { top: 304px; } #st-exp-bar i { background: linear-gradient(#8ff0d0, #18a078); }
#st-hp { left: 126px; top: 272px; }
#st-sp { left: 126px; top: 287px; }
#st-exp { left: 126px; top: 302px; }
#st-gold { left: 46px; top: 319px; }
#st-point { left: 160px; top: 319px; width: 26px; text-align: right; }
/* POINT (Btn_Point_1: three rows of 35 × 11) at (123, 319), shown only while the character has points to give; ui.js
   steps its row every 200 ms (aLogin 0x36be02 / 0x3703f8) */
#st-point-mark { left: 123px; top: 319px; width: 35px; height: 11px; background: url(../assets/skin/default/Btn_Point_1.png) 0 0 no-repeat; pointer-events: none; }
#st-derived { left: 46px; top: 340px; width: 50px; }
#st-attrs { left: 132px; top: 340px; width: 56px; }
.st-row { display: flex; align-items: center; justify-content: space-between; height: 16px; font: 700 12px/1 "Courier New", monospace; color: #1d2a4a; grid-template-columns: none; gap: 0; }
.st-row span:nth-child(2) { min-width: 0; }
.st-row button, .st-row button:hover, .st-row button:active {
  width: 9px; height: 11px; padding: 0; border: 0; border-radius: 0; font-size: 0;
  background: url(../assets/skin/default/Btn_ArrowUp_2.png) 0 0 no-repeat;
}
.st-row button:hover { background-position: 0 -11px; }
.st-row button:active { background-position: 0 -22px; }
.st-row button:disabled { visibility: hidden; }
#bag-grid {
  left: 193px; top: 74px; width: 170px; height: 340px;
  border: 0; background: none; cursor: pointer;
}
.bag-item { box-sizing: border-box; padding: 1px; }
.bag-item img { image-rendering: pixelated; max-width: 100%; max-height: 100%; }
.bag-item.selected { outline: 2px solid #e2b100; outline-offset: -2px; background: rgba(255, 230, 90, 0.35); }
.bag-item.used { opacity: 0.35; }
/* a cell left empty for now: its item is being dragged (ui.js _bindItemGrid), or it is a compound's made item still
   flying from the pot */
.bag-item.dragging, .bag-item.flying { visibility: hidden; }
/* the dragged icon (TSe_DragItem 0x3ed9ec): at the mouse less the grab offset, drawn as it is, over everything */
.drag-item { position: fixed; z-index: 100000; box-sizing: border-box; padding: 1px; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.drag-item img { image-rendering: pixelated; max-width: 100%; max-height: 100%; }
/* 移動數量? (Form_ThrowThing 209×87, TCY_ThrowThingNumMenu 0x371ac8): centred on the screen; the ! icon, the words, the
   field and the button faces are in the picture; the number (Panel26 editor) right-aligned at (64, 33) 81×15 */
#throw-box { position: fixed; z-index: 100001; left: calc(50vw - 104px); top: calc(50vh - 43px); width: 209px; height: 87px; background: url(../assets/skin/white/Form_ThrowThing.png) 0 0 no-repeat; pointer-events: auto; }
#throw-box > * { position: absolute; }
#throw-box input { left: 64px; top: 33px; width: 81px; height: 15px; padding: 0 3px; border: 0; background: transparent; outline: none; text-align: right; font: 700 12px/15px "Courier New", monospace; color: #000; }
#throw-box .tt-more   { left: 37px;  top: 32px; --img: url(../assets/skin/default/Btn_ArrowL_5.png); --w: 17px; --h: 17px; }
#throw-box .tt-less   { left: 155px; top: 32px; --img: url(../assets/skin/default/Btn_ArrowR_5.png); --w: 17px; --h: 17px; }
#throw-box .tt-ok     { left: 34px;  top: 59px; --img: url(../assets/skin/default/btn_ok_1.png); --w: 56px; --h: 20px; }
#throw-box .tt-cancel { left: 119px; top: 59px; --img: url(../assets/skin/default/Btn_Cancel_1.png); --w: 56px; --h: 20px; }
.bag-item .qty { left: 2px; right: auto; bottom: 0; font: 700 11px/1 "Courier New", monospace; color: #000; text-shadow: -1px 0 #fff, 1px 0 #fff, 0 -1px #fff, 0 1px #fff; }
#bag-msg { left: 18px; top: 422px; width: 140px; max-height: 26px; overflow: hidden; }
#st-close { left: 165px; top: 423px; }
/* placing points: 確定 (btn_ok_1) and 取消 (Btn_Cancel_1) in place of 關閉; the points put on each attribute beside its arrow */
#st-ok { left: 130px; top: 423px; --img: url(../assets/skin/default/btn_ok_1.png); --w: 56px; --h: 20px; }
#st-cancel { left: 205px; top: 423px; --img: url(../assets/skin/default/Btn_Cancel_1.png); --w: 56px; --h: 20px; }
#st-ok.hidden, #st-cancel.hidden, #st-close.hidden { display: none; }
.st-row .st-staged { margin-left: 2px; min-width: 16px; text-align: right; color: #1d2a4a; }

/* ── Skill ────────────────────────────────────────────────────────────────────── */

#win-skills { --fw: 290px; --fh: 459px; --fbg: url(../assets/skin/white/form_skill_2.png); --cx: 240px; --cy: 24px; }
#sk-prev { left: 73px; top: 38px; }
#sk-next { left: 191px; top: 38px; }
#sk-owner { left: 92px; top: 39px; width: 97px; text-align: center; font-size: 12px; font-weight: 700; color: #2030c8; white-space: nowrap; overflow: hidden; }
#sk-tabs { left: 23px; top: 59px; }
#sk-tabs .sbtn { --w: 38px; --h: 21px; }
#sk-tabs .sbtn[data-tab="1"] { --img: url(../assets/skin/default/Btn_SkillIcon_1.png); }
#sk-tabs .sbtn[data-tab="3"] { --img: url(../assets/skin/default/Btn_SkillIcon_2.png); }
#sk-tabs .sbtn[data-tab="2"] { --img: url(../assets/skin/default/Btn_SkillIcon_3.png); }
#sk-tabs .sbtn[data-tab="4"] { --img: url(../assets/skin/default/Btn_SkillIcon_4.png); }
#sk-tabs .sbtn[data-tab="0"] { --img: url(../assets/skin/default/Btn_SkillIcon_5.png); }
#skill-list { left: 26px; top: 84px; width: 240px; height: 244px; padding: 2px 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #9db7e0 transparent; }
.skill {
  display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center;
  width: 100%; height: 26px; padding: 0 8px 0 2px; border: 0; background: none; text-align: left;
  font: inherit; font-size: 13px; color: #1d2a4a; cursor: pointer;
}
.skill:hover, .skill[aria-selected=true] { background: #89BFF5; }
.skill .icon { position: relative; width: 24px; height: 24px; background: #7f93c9; }
.skill .icon img { width: 24px; height: 24px; display: block; image-rendering: pixelated; }
.skill .icon b { position: absolute; left: 1px; bottom: 0; font: 700 10px/1 Arial, sans-serif; color: #ffe94a; text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000; }
.skill .sp { font: 700 12px/1 "Courier New", monospace; }
#skill-list .note { padding: 8px; color: #6079b3; line-height: 1.6; }
/* the panel under the list (aLogin 0x2bb6ec): blue text at the client's own positions, the weapon icons 18 px apart */
#sk-desc, #sk-grade, #sk-exp, #sk-way { color: #0000FF; line-height: 15px; white-space: pre; }
#sk-desc { left: 31px; top: 339px; width: 230px; height: 30px; overflow: hidden; white-space: normal; word-break: break-all; }
#sk-grade { left: 68px; top: 375px; }
#sk-way { left: 175px; top: 376px; }
#sk-exp { left: 80px; top: 395px; }
#sk-weapon { left: 174px; top: 395px; display: flex; gap: 2px; height: 16px; }
#sk-weapon span { width: 16px; height: 16px; }
#sk-weapon img { display: block; width: 16px; height: 16px; image-rendering: pixelated; }
/* 說明 page (aLogin 0x2ba9c0): form_skillexpress<element> (144 × 240, opaque) at (69, 87); each learned skill's 28 × 28 icon
   at its place (table 0x4bc9cc, form coordinates less the picture's); Icon_SkillNeed (145 × 39, opaque, so it hides the
   panel's 等級 … 武器 words) at (24, 374); the hovered skill's name (27, 339, wraps at 100), description (27, 359, at 230)
   and points needed (100, 395, at 140), all #0000FF like the other pages' panel */
#sk-tree { left: 69px; top: 87px; width: 144px; height: 240px; background: 0 0 no-repeat; }
#sk-tree img { position: absolute; width: 28px; height: 28px; image-rendering: pixelated; pointer-events: none; }
#sk-need { left: 24px; top: 374px; width: 145px; height: 39px; background: url(../assets/skin/white/Icon_SkillNeed.png) 0 0 no-repeat; pointer-events: none; }
#sk-tree-name, #sk-tree-desc, #sk-tree-req { color: #0000FF; line-height: 15px; white-space: normal; word-break: break-all; pointer-events: none; }
#sk-tree-name { left: 27px; top: 339px; width: 100px; }
#sk-tree-desc { left: 27px; top: 359px; width: 230px; }
#sk-tree-req { left: 100px; top: 395px; width: 140px; }
#sk-close { left: 116px; top: 416px; }

/* ── compound ─────────────────────────────────────────────────────────────────── */

#win-compound { --fw: 299px; --fh: 467px; --fbg: url(../assets/skin/white/Form_Compound_1.png); --cx: 249px; --cy: 24px; }
#cp-grid { left: 22px; top: 75px; width: 170px; height: 340px; cursor: pointer; }
/* the pot (TLight [form+0x220]): anchored bottom-centre at (238, 162) (0x234abf), so its 90×95 frame at (193, 67);
   idle on frame 1; on 合成 frames 1–23 once, 200 ms each (0x235cd7), then frame 1 again — 23 frames stacked in one
   picture, plain colour-keyed blit (no additive blend) */
#cp-pot { left: 193px; top: 67px; width: 90px; height: 95px; background: url(../assets/skin/default/Compounding.png) 0 0 no-repeat; pointer-events: none !important; }
#cp-pot.busy { animation: cp-boil 4.6s steps(23) 1; }
@keyframes cp-boil { to { background-position: 0 -2185px; } }
/* the made item flying from the pot to its bag cell (TLight [form+0x224], mode 3), over the form's contents */
#win-compound .cp-fly { z-index: 3; pointer-events: none !important; image-rendering: pixelated; }
.cp-slot {
  left: 205px; width: 68px; height: 36px; padding: 0; border: 0; background: #eef6ff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 11px; color: #1d2a4a;
}
.cp-slot:empty { background: none; cursor: default; }
.cp-slot img { width: 32px; height: 32px; image-rendering: pixelated; }
.cp-slot[data-i="0"] { top: 167px; height: 44px; }
.cp-slot[data-i="1"] { top: 230px; }
.cp-slot[data-i="2"] { top: 281px; }
.cp-slot[data-i="3"] { top: 332px; }
.cp-slot[data-i="4"] { top: 383px; }
#cp-go { left: 88px; top: 428px; --img: url(../assets/skin/default/Btn_Compound_1.png); --w: 56px; --h: 20px; }
#cp-close { left: 160px; top: 428px; }
#compound-msg { left: 24px; top: 56px; width: 170px; }

/* ── group: companions and party ──────────────────────────────────────────────── */

#win-group { --fw: 371px; --fh: 539px; --fbg: url(../assets/skin/white/form_team_2.png); --cx: 321px; --cy: 24px; }
#gp-tabs { left: 22px; top: 41px; }
#gp-tabs .sbtn { --w: 66px; --h: 21px; }
#gp-tabs .sbtn[data-tab=team]     { --img: url(../assets/skin/default/Btn_Team_1.png); }
#gp-tabs .sbtn[data-tab=guild]    { --img: url(../assets/skin/default/Btn_ArmyGrounp_1.png); }
#gp-tabs .sbtn[data-tab=instance] { --img: url(../assets/skin/default/Btn_DupMis.png); }
#gp-pets { left: 26px; top: 69px; width: 315px; }
.gp-pet { position: relative; height: 34px; cursor: pointer; }
.gp-pet > * { position: absolute; }
.gp-pet canvas { left: 5px; top: 5px; width: 24px; height: 24px; image-rendering: pixelated; }
.gp-pet .name { left: 40px; top: 7px; width: 96px; line-height: 16px; color: #080808; white-space: nowrap; overflow: hidden; }
.gp-pet .mini { left: 152px; width: 34px; height: 3px; background: #5a6480; }
.gp-pet .mini i { display: block; height: 100%; }
.gp-pet .mini.hp { top: 15px; } .gp-pet .mini.hp i { background: #e0372b; }
.gp-pet .mini.sp { top: 23px; } .gp-pet .mini.sp i { background: #2b86e0; }
.gp-pet .tag { left: 140px; font: 700 7px/1 Arial, sans-serif; color: #1d2a4a; }
.gp-pet .tag.hp { top: 13px; } .gp-pet .tag.sp { top: 21px; }
.gp-pet .sbtn { top: 7px; --w: 43px; --h: 20px; }
.gp-pet .sbtn.fight { left: 222px; --img: url(../assets/skin/default/Btn_AssignFight_1.png); }
.gp-pet .sbtn.rest  { left: 222px; --img: url(../assets/skin/default/Btn_AssignRest_1.png); }
.gp-pet .sbtn.info  { left: 269px; --img: url(../assets/skin/default/Btn_Info.png); --w: 43px; background-size: 43px 60px; }
/* 組隊狀態 (aLogin 0x28ee90 / 0x285e60): 離開隊伍 (a member) or 解散隊伍 (the leader) at (140, 235); the cells are laid
   out by ui.js _renderGroupParty at form coordinates, so #gp-party itself sits at the form's corner. */
#gp-leave { left: 140px; top: 235px; --img: url(../assets/skin/default/Btn_LeaveTeam_1.png); --w: 71px; --h: 20px; }
#gp-leave.dismiss { --img: url(../assets/skin/default/Btn_DismissTeam_1.png); }
#gp-party { left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
#gp-party > * { position: absolute; pointer-events: auto; }
#gp-party .gp-face { width: 70px; height: 70px; image-rendering: pixelated; pointer-events: none; }
#gp-party .gp-name { width: 138px; height: 20px; line-height: 15px; color: #1d2a4a; white-space: nowrap; overflow: hidden; }
/* the level as on the status frame: Main_Word_Lv and the white digits 30 px on (aLogin 0x27ba80) */
#gp-party .gp-lv { width: 80px; height: 15px; background: url(../assets/skin/default/Main_Word_Lv.png) 0 0 no-repeat; }
#gp-party .gp-lv .wl-digits { position: absolute; left: 30px; top: 1px; }
#gp-party .gp-word { width: 18px; height: 11px; background: url(../assets/skin/default/Word_Hp_2.png) 0 0 no-repeat; }
#gp-party .gp-word.sp { background-image: url(../assets/skin/default/Word_Sp_2.png); }
/* HP / SP bars drawn by code (aLogin 0x492f1c / 0x49303c): 64 × 8, a grey edge, a light inner edge, a solid fill
   over #393c39 in the 60 × 4 inside — colours read from the original (owner's screenshot 2026-11-30) */
#gp-party .gp-bar { width: 64px; height: 8px; box-sizing: border-box; border: 1px solid #7b7d7b; background: #393c39; box-shadow: inset 0 0 0 1px #f7a69c; }
#gp-party .gp-bar.sp { box-shadow: inset 0 0 0 1px #8cdff7; }
#gp-party .gp-bar i { position: absolute; left: 1px; top: 1px; height: 4px; background: #de3410; }
#gp-party .gp-bar.sp i { background: #108aa5; }
#gp-party .gp-job { width: 16px; height: 16px; }
#gp-party .gp-career { width: 42px; height: 22px; pointer-events: none; }
#gp-party .gp-element { width: 25px; height: 25px; }
#gp-party .gp-assign { --img: url(../assets/skin/default/Btn_AssignLeader_1.png); --w: 71px; --h: 20px; }
/* 驅逐 of a party cell is Btn_AssignLeave_2: one grey picture, the same in every state (aLogin 0x28632d) */
#gp-party .gp-kick, #gp-party .gp-kick:hover, #gp-party .gp-kick:active { --img: url(../assets/skin/default/Btn_AssignLeave_2.png); --w: 43px; --h: 20px; background-position: 0 0; }
#gp-close { left: 157px; top: 501px; }

/* ── social: friends ──────────────────────────────────────────────────────────── */

#win-friends { --fw: 356px; --fh: 493px; --fbg: url(../assets/skin/white/form_friend_2.png); --cx: 306px; --cy: 24px; }
#so-tabs { left: 22px; top: 41px; }
#so-tabs .sbtn { --w: 66px; --h: 21px; }
#so-tabs .sbtn[data-tab=friends] { --img: url(../assets/skin/default/Btn_FriendIcon_1.png); }
#so-tabs .sbtn[data-tab=emotes]  { --img: url(../assets/skin/default/Btn_EmuationalIcon_1.png); }
#so-tabs .sbtn[data-tab=setup]   { --img: url(../assets/skin/default/Btn_Setup_2.png); }
#friend-list { left: 26px; top: 69px; width: 302px; height: 320px; }
.friend { position: absolute; left: 0; width: 302px; height: 60px; padding: 0; border: 0; display: block; }
.friend > * { position: absolute; }
.friend canvas { left: 0; top: 0; width: 60px; height: 60px; image-rendering: pixelated; }
.friend .name { left: 66px; top: 6px; width: 110px; font-size: 13px; color: #1d2a4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend .lv { left: 180px; top: 7px; font: 900 13px/1 "Arial Black", Arial, sans-serif; color: #1d2a4a; white-space: nowrap; }
.friend .state { left: 236px; top: 40px; width: 32px; height: 17px; background: no-repeat 0 0; }
.friend .state.on  { background-image: url(../assets/skin/default/Icon_Online_1.png); }
.friend .state.off { background-image: url(../assets/skin/default/Icon_Offline_1.png); }
.friend .pick { left: 279px; top: 39px; width: 18px; height: 18px; padding: 0; border: 0; background: none; cursor: pointer; }
.friend .pick[aria-checked=true] { background: url(../assets/skin/default/Icon_Check.png) center / 18px 18px no-repeat; }
#so-page { left: 128px; top: 398px; width: 100px; display: flex; align-items: center; justify-content: space-between; }
#so-mail { left: 112px; top: 422px; --img: url(../assets/skin/default/Btn_SendMail_3.png); --w: 61px; --h: 20px; }
#so-del  { left: 179px; top: 422px; --img: url(../assets/skin/default/Btn_DelFriend_1.png); --w: 61px; --h: 20px; }
#so-close { left: 150px; top: 458px; }

/* ── system ───────────────────────────────────────────────────────────────────── */

#win-system { --fw: 388px; --fh: 451px; --fbg: url(../assets/skin/white/form_system_2.png); --cx: 338px; --cy: 26px; }
#win-system .sbtn.sw { left: 143px; }
#sy-pk { top: 66px; } #sy-fight { top: 91px; } #sy-trade { top: 116px; } #sy-channel { top: 141px; }
#sy-info { top: 166px; } #sy-zoom { top: 191px; } #sy-party { top: 216px; }
#sy-music { left: 290px; top: 91px; }
#sy-music-vol { left: 248px; top: 117px; width: 92px; }
#sy-sfx { left: 252px; top: 157px; }
#sy-sfx-vol { left: 248px; top: 185px; width: 92px; }
#win-system input[type=range] { height: 14px; margin: 0; opacity: 0.01; cursor: pointer; }      /* the slider art is in the picture */
.sy-knob { width: 8px; height: 12px; background: #dfe8ff; border: 1px solid #1d2a4a; pointer-events: none !important; }
.sy-wide { --w: 71px; --h: 20px; }
#sy-quests  { left: 218px; top: 270px; --img: url(../assets/skin/default/Btn_MissionBook.png); --w: 97px; --h: 32px; }
#sy-respawn { left: 298px; top: 310px; --img: url(../assets/skin/default/Btn_Return_1.png); }
#sy-code    { left: 218px; top: 310px; --img: url(../assets/skin/default/Btn_Exchange_2.png); }
#sy-logout  { left: 298px; top: 385px; --img: url(../assets/skin/default/Btn_LogOut_1.png); }
#sy-exit    { left: 298px; top: 410px; --img: url(../assets/skin/default/Btn_Exit_2.png); }
#sy-more    { left: 218px; top: 348px; width: 152px; display: grid; gap: 3px; }
#sy-more button { padding: 2px 6px; font: inherit; font-size: 12px; text-align: left; cursor: pointer; color: #3f5ea6; background: linear-gradient(#fdfeff, #dfeafa); border: 1px solid #7d9bd0; border-radius: 4px; }
#sy-more button:hover { border-color: #d8c800; color: #2f8f4c; }
#sy-close { left: 166px; top: 420px; }

/* ── main menu: the six round icons of the original, in its order ─────────────── */

#hud-menu .btn[data-window=compound] { --h: 52px; width: 42px; background-image: url(../assets/skin/default/Btn_13.png); }
#hud-menu .btn[data-window=group]    { --h: 49px; width: 46px; background-image: url(../assets/skin/default/Btn_14.png); }
#hud-menu .btn[data-window=system]   { --h: 51px; width: 47px; background-image: url(../assets/skin/default/Btn_16.png); }
#hud-menu .btn[data-window=status]   { --cap: '狀態物品（C）'; }
#hud-menu .btn[data-window=skills]   { --cap: '特技（K）'; }
#hud-menu .btn[data-window=compound] { --cap: '合成（O）'; }
#hud-menu .btn[data-window=group]    { --cap: '隊伍組織（P）'; }
#hud-menu .btn[data-window=friends]  { --cap: '交友情感（F）'; }
#hud-menu .btn[data-window=system]   { --cap: '系統選項（Esc 關閉視窗）'; }
#hud-menu .btn[data-window=system]::before, #hud-menu .btn[data-window=system]::after { left: auto; right: 0; transform: none; }

/* ── pieces added by feature modules, placed as in the original ───────────────── */

/* hotkey bar: Form_HotKey_V at the right edge, eight 24 px cells 27 px apart (the module styles itself later, hence #hud) */
#hud #hotkey-bar {
  left: auto; right: 0; bottom: auto; top: 163px; width: 56px; height: 274px; display: block; padding: 0;
  border: 0; border-radius: 0; background: url(../assets/skin/white/Form_HotKey_V.png) 0 0 no-repeat;
}
#hud #hotkey-bar .cell { position: absolute; left: 23px; width: 24px; height: 24px; border: 0; border-radius: 0; background: none; }
#hud #hotkey-bar .cell:nth-child(1) { top: 29px; }  #hud #hotkey-bar .cell:nth-child(2) { top: 56px; }
#hud #hotkey-bar .cell:nth-child(3) { top: 83px; }  #hud #hotkey-bar .cell:nth-child(4) { top: 110px; }
#hud #hotkey-bar .cell:nth-child(5) { top: 137px; } #hud #hotkey-bar .cell:nth-child(6) { top: 164px; }
#hud #hotkey-bar .cell:nth-child(7) { top: 191px; } #hud #hotkey-bar .cell:nth-child(8) { top: 218px; }
#hud #hotkey-bar .cell:hover, #hud #hotkey-bar .cell:focus-visible { outline: 1px solid #ffe94a; }
#hud #hotkey-bar .cell img { max-width: 24px; max-height: 24px; }
#hud #hotkey-bar .cell .key { display: none; }                 /* F1–F8 are printed on the picture */
#hud #hotkey-bar .page { position: absolute; left: 20px; top: 247px; width: 30px; height: 18px; border: 0; background: none; color: #ffffff; font-size: 11px; font-weight: 700; }

/* chat bar (main_input_1, aLogin.exe 0x27c70e; ui_skin.json chat.input): mod_chat puts the 頻道 button on the painted one
   (31,2), its channel list in icon_Channelframe_1 above it (28,-87), and Btn_expression_1 at (492,0). The box at (73,2)
   is the whisper name of the original; this server has no whisper, so it stays empty. There is no send button: Enter sends. */
#chat-form:has(#chat-channel)::before { content: none; }
#hud #chat-form .sbtn { position: absolute; width: var(--w); height: var(--h); padding: 0; border: 0; border-radius: 0; background: var(--img) 0 0 no-repeat; }
#hud #chat-form .sbtn:hover:not(:disabled) { background-position: 0 calc(var(--h) * -1); }
#hud #chat-form .sbtn:active:not(:disabled) { background-position: 0 calc(var(--h) * -2); }
#hud #chat-channel { left: 31px; top: 2px; --w: 40px; --h: 20px; }
#hud #chat-chanlist { position: absolute; left: 28px; top: -87px; width: 46px; height: 87px; background: url(../assets/skin/default/icon_Channelframe_1.png) 0 0 no-repeat; }
#hud #chat-chanlist .ch-item { position: absolute; left: 5px; width: 21px; height: 19px; padding: 0; border: 0; border-radius: 0; background: no-repeat 0 0; cursor: pointer; }
#hud #chat-chanlist .ch-item:nth-child(1) { top: 5px; }  #hud #chat-chanlist .ch-item:nth-child(2) { top: 24px; }
#hud #chat-chanlist .ch-item:nth-child(3) { top: 43px; } #hud #chat-chanlist .ch-item:nth-child(4) { top: 62px; }
#hud #chat-chanlist .ch-item:hover:not(:disabled) { outline: 1px solid #ffe58a; }
#hud #chat-chanlist .ch-item:disabled { opacity: 0.4; cursor: default; }
#hud #chat-emote { position: absolute; left: 492px; top: 0; --img: url(../assets/skin/default/Btn_expression_1.png); --w: 26px; --h: 25px; }
#hud #chat-emote:disabled { opacity: 1; filter: grayscale(0.7); }
/* panel_expression_1 263×69 at (492,-69); the icons 16×16 (chat bar coordinates minus the panel's) */
#hud #chat-emotes { position: absolute; left: 492px; top: -69px; width: 263px; height: 69px; background: url(../assets/skin/default/panel_expression_1.png) 0 0 no-repeat; z-index: 5; }
#hud #chat-emotes .ce-icon { position: absolute; width: 16px; height: 16px; padding: 0; border: 0; background: transparent no-repeat 0 0; cursor: pointer; }
#hud #chat-emotes .ce-icon:hover, #hud #chat-emotes .ce-icon:focus-visible { outline: 1px solid #f2b84b; }
#chat-log img.chat-expre { width: 16px; height: 16px; vertical-align: -3px; image-rendering: pixelated; }
#hud #chat-form #chat-input { left: 162px; top: 2px; width: 328px; height: 20px; }
#hud #chat-form button[type=submit] { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
/* a letter waiting: Anim_GotMailS_1 (two 23×21 frames) above the emoticon button; a click opens the letters */
#hud #chat-mail { position: absolute; left: 494px; top: -23px; width: 23px; height: 21px; padding: 0; border: 0; border-radius: 0; cursor: pointer; font-size: 0; color: transparent;
  background: url(../assets/skin/default/Anim_GotMailS_1.png) 0 0 no-repeat; animation: chat-mail 1s steps(1) infinite; }
@keyframes chat-mail { 50% { background-position: 0 -21px; } }

/* Windows stack by use (ui.js raises the one last touched); these always stay above them. */
#dialog, #battle-menu, #cutscene { z-index: 9000; }
#prompts { z-index: 9100; }
#context-menu { z-index: 9200; }
#tooltip, #toast { z-index: 9300; }
/* A form opens where the original put it relative to the middle of its 800 px screen, so two forms overlap less. */
#win-status   { left: calc(50vw - 193px); }
#win-skills   { left: calc(50vw - 145px); }
#win-compound { left: calc(50vw - 150px); }
#win-group    { left: calc(50vw - 185px); }
#win-friends  { left: calc(50vw - 178px); }
#win-system   { left: calc(50vw - 194px); }

/* ── status frame (top left): main_Status_1 with the original rows under it ───── */

#hud-status { height: 190px; }
#hud-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }      /* the original shows no name here */
/* TSe_MainStatus (aLogin 0x279208 / paint 0x27a230), from the frame's top-left: Main_Word_Lv (0,−6), its digits in
   Num_White3_1 (30,−5); the job's 18 × 18 symbol (3,13); the face (sequence 0, 69 × 75) drawn 1:1 in its box (47,−11),
   the head over the frame's top edge. */
#hud-level { left: 0; top: -6px; width: 80px; height: 15px; background: url(../assets/skin/default/Main_Word_Lv.png) 0 0 no-repeat; }
#hud-level .wl-digits { position: absolute; left: 30px; top: 1px; }
#hud-portrait { left: 47px; top: -11px; width: 69px; height: 75px; }
#hud-job { position: absolute; left: 3px; top: 13px; width: 18px; height: 18px; pointer-events: auto; }
#hud-job.hidden { display: none; }
#hud-element { position: absolute; left: 113px; top: 7px; width: 25px; height: 25px; pointer-events: auto; cursor: pointer; }
#hud-status .bar.hp::before { left: -27px; top: 86px; }
#hud-status .bar.hp span { left: 8px; top: 86px; }
#hud-status .bar.sp::before { left: -16px; top: 101px; }
#hud-status .bar.sp span { left: 19px; top: 101px; }
#hud-status .bar span, #hud-exp, #hud-gold { font: 700 13px/14px "Courier New", monospace; color: #ffffff; text-shadow: var(--wl-outline); letter-spacing: 0.5px; }
#hud-exp-row { position: absolute; left: 5px; top: 155px; width: 150px; height: 12px; background: url(../assets/skin/default/Main_Word_Exp.png) 0 0 no-repeat; }
#hud-exp-bar { position: absolute; left: 33px; top: 2px; width: 47px; height: 8px; background: url(../assets/skin/default/Panel37.png) 0 0 no-repeat; }
#hud-exp-fill { position: absolute; left: 2px; top: 2px; height: 4px; max-width: 43px; background: url(../assets/skin/default/Panel38.png) 0 0 no-repeat; }
#hud-exp { position: absolute; left: 84px; top: -1px; }
#hud-gold { left: 5px; top: 170px; padding-left: 35px; background: url(../assets/skin/default/Main_Word_Gold.png) 0 1px no-repeat; }
#hud-lock, #hud-recover, #hud-auto, #hud-pet { position: absolute; pointer-events: auto; }
/* the trade lock: Btn_MsgLock_1 open, Btn_MsgLock_2 (red) locked */
#hud-lock    { left: 16px; top: 98px; --img: url(../assets/skin/default/Btn_MsgLock_1.png); --w: 19px; --h: 18px; }
#hud-lock.locked { --img: url(../assets/skin/default/Btn_MsgLock_2.png); }
#hud-recover { left: 37px; top: 96px; --img: url(../assets/skin/default/Btn_Allrecovery_1.png); --w: 22px; --h: 22px; }
#hud-auto { left: 3px; top: 188px; padding: 0; border: 0; background: none; cursor: pointer; font: 700 12px/1 "Microsoft JhengHei", sans-serif; color: #ffffff; text-shadow: var(--wl-outline); }
#hud-auto[aria-pressed=true] { color: #ffe94a; }
/* the companion that is out: head, level, HP and SP bars, experience */
/* the companion's mini frame (aLogin 0x2b685c / 0x2b70a8), M = (150,38), B = M + (25,0): the reborn star Okey3
   (M.x−23, M.y+20), the head (M.x−6, M.y+2), LV B+(0,2) / digits B+(17,2), HP B+(0,10) bar B+(13,11), SP B+(0,18)
   bar B+(13,19), EXP bar B+(−31,30) and its % B+(−10,29). */
#hud-pet { left: 0; top: 0; width: 241px; height: 110px; }
#hud-pet > * { position: absolute; }
#hud-pet-star { left: 127px; top: 58px; }
#hud-pet-star.hidden { display: none; }
#hud-pet-face { left: 144px; top: 40px; width: 24px; height: 24px; image-rendering: pixelated; }
#hud-pet .pw.lv { left: 175px; top: 40px; }
#hud-pet-lv { left: 192px; top: 40px; }
#hud-pet .pw.hp { left: 175px; top: 48px; }
#hud-pet .pw.sp { left: 175px; top: 56px; }
#hud-pet .mini { width: 27px; height: 5px; background: url(../assets/skin/default/Pet_Frame_Hp.png) 0 0 no-repeat; }
#hud-pet .mini i { position: absolute; left: 1px; top: 1px; height: 3px; max-width: 25px; }
#hud-pet .mini.hp { left: 188px; top: 49px; } #hud-pet .mini.hp i { background: url(../assets/skin/default/Pet_Bmp_Hp.png) 0 0 no-repeat; }
#hud-pet .mini.sp { left: 188px; top: 57px; background-image: url(../assets/skin/default/Pet_Frame_Sp.png); } #hud-pet .mini.sp i { background: url(../assets/skin/default/Pet_Bmp_Sp.png) 0 0 no-repeat; }
#hud-pet .mini.exp { left: 144px; top: 68px; width: 18px; height: 4px; background-image: url(../assets/skin/default/Pet_Frame_Exp.png); }
#hud-pet .mini.exp i { height: 2px; max-width: 16px; background: url(../assets/skin/default/Pet_Bmp_Exp.png) 0 0 no-repeat; }
#hud-pet-exp { left: 165px; top: 67px; display: flex; align-items: flex-start; gap: 1px; }
#hud-pet-exp::after { content: ''; width: 5px; height: 5px; background: url(../assets/skin/default/Pet_Percent_Exp.png) 0 0 no-repeat; }
#hud-pet-exp.hidden { display: none; }
#hud-status #hud-pet { pointer-events: none; }                       /* the box spans the frame; only the head takes the mouse */
#hud-status #hud-pet-face { pointer-events: auto; }
/* the ridden vehicle under the Gold row (aLogin 0x27bbf8): placed by game.js _renderVehicleBar */
#hud-vehicle { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; }
#hud-vehicle.hidden { display: none; }
#hud-vehicle > * { position: absolute; }
#hud-vehicle .vh-icon { image-rendering: pixelated; pointer-events: auto; }
#hud-vehicle .vh-bar { width: 40px; height: 4px; background: url(../assets/skin/default/icon_rail2.png) 0 0 no-repeat; }
#hud-vehicle .vh-bar[hidden] { display: none; }
#hud-vehicle .vh-bar b { position: absolute; left: 0; top: 0; height: 4px; background: no-repeat 0 0; }
#hud-vehicle .vh-hp b { background-image: url(../assets/skin/default/icon_HP2.png); }
#hud-vehicle .vh-sp b { background-image: url(../assets/skin/default/icon_SP2.png); }

/* ── in battle (TRE_BattleMainForm, aLogin 0x2b0958 / paint 0x2b3278) ─────────────────────────────────────────────
   The status frame slides out to the left and the party's frames slide down from the top: BattleStatus_1 at
   (24 + 206 i, 21); from its corner the face box (47,−12) 69 × 75, the HP / SP arcs (32,36) / (21,37), the element
   (114,6), the name (−21,−18) and LV (−20,2) with its digits 30 further; our own rows at (8,140) (8,156) (8,172) (8,187). */
#hud-status { transition: transform 0.35s ease-out; }
body.in-battle #hud-status { transform: translateX(-320px); }
#battle-party { position: absolute; left: 0; top: 0; width: 860px; height: 205px; pointer-events: none; transform: translateY(-230px); transition: transform 0.35s ease-out; }
body.in-battle #battle-party { transform: none; }
.bp-slot { position: absolute; top: 21px; width: 153px; height: 115px; background: url(../assets/skin/default/BattleStatus_1.png) 0 0 no-repeat; }
.bp-slot[hidden], .bp-own[hidden], .bp-element[hidden] { display: none; }
.bp-slot > * { position: absolute; }
.bp-face { left: 47px; top: -12px; width: 69px; height: 75px; }
.bp-arc { overflow: hidden; }
.bp-arc i { position: absolute; left: 0; top: 0; height: 100%; background: no-repeat 0 0; }
.bp-arc.hp { left: 32px; top: 36px; width: 93px; height: 38px; }
.bp-arc.hp i { background-image: url(../assets/skin/default/Main_Hp.png); }
.bp-arc.sp { left: 21px; top: 37px; width: 110px; height: 47px; }
.bp-arc.sp i { background-image: url(../assets/skin/default/Main_Sp.png); }
.bp-element { left: 114px; top: 6px; width: 25px; height: 25px; }
.bp-name { left: -21px; top: -18px; font: 12px/15px "MingLiU", "PMingLiU", "Microsoft JhengHei", sans-serif; color: #ffffff; text-shadow: 1px 1px 0 #101010; white-space: nowrap; }
.bp-lv { left: -20px; top: 2px; width: 80px; height: 15px; background: url(../assets/skin/default/Main_Word_Lv.png) 0 0 no-repeat; }
.bp-lv .wl-digits { position: absolute; left: 30px; top: 1px; }
.bp-own { position: absolute; left: 8px; top: 140px; width: 240px; height: 64px; }
.bp-own > div { position: absolute; left: 0; height: 14px; padding-left: 35px; background: no-repeat 0 1px; white-space: nowrap;
  font: 700 13px/14px "Courier New", monospace; color: #ffffff; text-shadow: var(--wl-outline); letter-spacing: 0.5px; }
.bp-own .hp { top: 0; background-image: url(../assets/skin/default/Main_Word_Hp.png); }
.bp-own .sp { top: 16px; background-image: url(../assets/skin/default/Main_Word_Sp.png); }
.bp-own .exp { top: 32px; width: 150px; height: 12px; padding: 0; background: url(../assets/skin/default/Main_Word_Exp.png) 0 0 no-repeat; }
.bp-own .exp b { position: absolute; left: 33px; top: 2px; width: 47px; height: 8px; background: url(../assets/skin/default/Panel37.png) 0 0 no-repeat; }
.bp-own .exp i { position: absolute; left: 2px; top: 2px; height: 4px; max-width: 43px; background: url(../assets/skin/default/Panel38.png) 0 0 no-repeat; }
.bp-own .exp span { position: absolute; left: 84px; top: -1px; }
.bp-own .gold { top: 47px; background-image: url(../assets/skin/default/Main_Word_Gold.png); }

/* ── action bar (top right): Btn_BackGround_1 and nine of its buttons ─────────── */

#hud-actions { position: absolute; right: 0; top: 0; width: 380px; height: 35px; background: url(../assets/skin/default/Btn_BackGround_1.png) 0 0 no-repeat; }
#hud-actions .sbtn { position: absolute; top: 1px; --w: 37px; --h: 33px; }
#hud-actions .sbtn[aria-pressed=true] { filter: drop-shadow(0 0 3px #ffe94a); }
#hud-actions [data-act=pk]       { left: 35px;  --img: url(../assets/skin/default/Btn_1.png); }
#hud-actions [data-act=join]     { left: 72px;  --img: url(../assets/skin/default/Btn_2.png); --h: 34px; }
#hud-actions [data-act=watch]    { left: 109px; --img: url(../assets/skin/default/Btn_3.png); }
#hud-actions [data-act=party]    { left: 146px; --img: url(../assets/skin/default/Btn_4.png); }
#hud-actions [data-act=friend]   { left: 183px; --img: url(../assets/skin/default/Btn_5.png); }
#hud-actions [data-act=gold]     { left: 220px; --img: url(../assets/skin/default/Btn_6.png); --w: 38px; }
#hud-actions [data-act=activity] { left: 257px; --img: url(../assets/skin/default/Btn_8.png); --w: 36px; }
#hud-actions [data-act=lottery]  { left: 294px; --img: url(../assets/skin/default/Btn_9.png); --w: 36px; }
#hud-actions [data-act=mall]     { left: 331px; --img: url(../assets/skin/default/Btn_711.png); --h: 34px; }

/* The map name and position move to the lower right, above the main menu, as one line of outlined text. */
#hud-map { top: auto; right: 6px; bottom: 60px; padding: 0; background: none; border: 0; display: flex; gap: 8px; align-items: baseline;
  font: 700 13px/1 "Microsoft JhengHei", sans-serif; color: #ffffff; text-shadow: var(--wl-outline); pointer-events: none; }
#hud-map .coords { font: 700 12px/1 "Courier New", monospace; color: #ffffff; }
#hud-map .btn { display: none; }

/* ── gold (商業): Form_Business_1 ─────────────────────────────────────────────── */

#win-gold { --fw: 260px; --fh: 217px; --fbg: url(../assets/skin/white/Form_Business_1.png); --cx: 210px; --cy: 25px; left: calc(50vw - 130px); }
#gd-gold { left: 72px; top: 70px; font-size: 13px; }
.gd-plain { left: 175px; top: 68px; width: 56px; height: 20px; padding: 0; border: 0; background: none; font-size: 0; cursor: pointer; }
.gd-plain:hover { outline: 2px solid #f2e63a; outline-offset: -2px; border-radius: 6px; }
.sbtn.gd { --w: 71px; --h: 20px; }
.sbtn.gd[data-gold=trade-pet]  { left: 22px;  top: 97px;  --img: url(../assets/skin/default/Btn_TradePet_1.png); }
.sbtn.gd[data-gold=trade-item] { left: 95px;  top: 97px;  --img: url(../assets/skin/default/Btn_TradeThing_1.png); }
.sbtn.gd[data-gold=trade-tool] { left: 168px; top: 97px;  --img: url(../assets/skin/default/Btn_TradeUtensil_1.png); }
.sbtn.gd[data-gold=stall-pet]  { left: 22px;  top: 125px; --img: url(../assets/skin/default/Btn_StallPet_1.png); }
.sbtn.gd[data-gold=stall-item] { left: 95px;  top: 125px; --img: url(../assets/skin/default/Btn_StallThing_1.png); }
.sbtn.gd[data-gold=stall-tool] { left: 168px; top: 125px; --img: url(../assets/skin/default/Btn_StallUtensil_1.png); }
#gd-close { left: 102px; top: 180px; }

/* ── lottery: Form_LotteryOL (the "chance" form) and the list of prizes ───────── */

#win-lottery { --fw: 171px; --fh: 183px; --fbg: url(../assets/skin/white/Form_LotteryOL.png); --cx: 147px; --cy: 6px; left: calc(50vw - 85px); }
#win-lottery .lot-prize {
  left: 67px; top: 70px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 0; cursor: pointer;
  background: #000000; color: #ffffff; font: 900 22px/36px "Arial Black", Arial, sans-serif; text-align: center;
}
#win-lottery .lot-prize:hover { outline: 1px solid #e2b100; }
#win-lottery .lot-prize img { width: 32px; height: 32px; margin: 2px; image-rendering: pixelated; display: block; }
#win-lottery .lot-left { left: 78px; top: 125px; width: 24px; text-align: center; }
#win-lottery .lot-draw  { left: 29px; top: 137px; --img: url(../assets/skin/default/Btn_LotteryOL.png); --w: 39px; --h: 20px; }
#win-lottery .lot-close { left: 85px; top: 137px; --img: url(../assets/skin/default/btn_close_2.png);   --w: 39px; --h: 20px; }

#win-lottery-list {
  width: 334px; padding: 0; left: calc(50vw - 167px); top: 110px; min-width: 0;
  border: 2px solid #c9a23f; border-image: none; outline: 1px solid #fff3c4; outline-offset: -4px;
  background: repeating-linear-gradient(#ffffff 0 1px, #eef6ff 1px 2px);
}
#win-lottery-list header { min-height: 0; padding: 5px 26px 4px; justify-content: center; border-bottom: 2px solid #c9a23f; }
#win-lottery-list h3 { font-size: 14px; font-weight: 700; letter-spacing: 1px; color: #33456e; }
#win-lottery-list .win-close { top: 4px; right: 5px; }
#win-lottery-list .win-body { padding: 2px 6px 8px; overflow: visible; }
.lot-list {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(10, 34px); grid-auto-columns: max-content; column-gap: 8px;
  margin: 0 -6px 8px; padding: 0 6px 4px; border-bottom: 2px solid #c9a23f; overflow-x: auto;
}
.lot-row { display: flex; align-items: center; gap: 4px; font-size: 14px; color: #1d2a4a; white-space: nowrap; }
.lot-row .icon { width: 32px; height: 32px; flex: none; }
.lot-row img { width: 32px; height: 32px; image-rendering: pixelated; display: block; }
.sbtn.lot-cancel { display: block; margin: 0 auto; --img: url(../assets/skin/default/Btn_Cancel_3.png); --w: 39px; --h: 20px; }
#win-lottery .lot-left { top: 122px; font-size: 13px; }

/* The remote control, while it is switched on: its item icon above the main menu, at the right edge. */
#hud-remote {
  position: absolute; right: 6px; bottom: 82px; width: 34px; height: 34px; padding: 0; border: 0; cursor: pointer;
  background: none center / 32px 32px no-repeat; font-size: 0; image-rendering: pixelated;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}
#hud-remote:hover { filter: drop-shadow(0 0 3px #ffe94a); }

/* ══ Corrections after comparing with the client the owner plays (D:\WLO; its skin is in assets/skin_wlo) ══ */

/* status frame: the left round button is Btn_Security (the trade safety lock) */
#hud-lock { left: 14px; top: 96px; --img: url(../assets/skin_wlo/default/Btn_Security.png); --w: 22px; --h: 22px; }
#hud-lock.locked { --img: url(../assets/skin_wlo/default/Btn_Security.png); filter: drop-shadow(0 0 2px #ff3b30) drop-shadow(0 0 2px #ff3b30); }
/* the remote control tool: AutoplayTool_1, above the main menu */
#hud-remote { right: 54px; bottom: 78px; width: 42px; height: 42px; background: url(../assets/png/images/AutoplayTool_1.png) center / 42px 42px no-repeat !important; }
/* what an element means is shown as a picture (ElementInfo_<n>) */
#tooltip:has(img.element-info) { padding: 0; border: 0; background: none; max-width: none; }
img.element-info { display: block; }

/* gold: the taller WLO form with five point counters; button places from its constructor */
#win-gold { --fh: 249px; --fbg: url(../assets/skin_wlo/white/Form_Business_1.png); --cx: 209px; --cy: 24px; }
.gd-plain { left: 174px; top: 68px; }
.sbtn.gd[data-gold=trade-item] { left: 21px;  top: 96px; }
.sbtn.gd[data-gold=trade-pet]  { left: 94px;  top: 96px; }
.sbtn.gd[data-gold=trade-tool] { left: 167px; top: 96px; }
.sbtn.gd[data-gold=stall-item] { left: 21px;  top: 124px; }
.sbtn.gd[data-gold=stall-pet]  { left: 94px;  top: 124px; }
.sbtn.gd[data-gold=stall-tool] { left: 167px; top: 124px; }
#gd-close { left: 102px; top: 213px; }
.gd-coin { width: 70px; height: 32px; padding-left: 40px; background: no-repeat 0 0; font: 700 12px/32px "Courier New", monospace; color: #1d2a4a; }
.gd-coin[data-i="1"] { left: 20px;  top: 145px; background-image: url(../assets/skin_wlo/default/coin1.png); }
.gd-coin[data-i="2"] { left: 94px;  top: 145px; background-image: url(../assets/skin_wlo/default/coin2.png); }
.gd-coin[data-i="3"] { left: 168px; top: 145px; background-image: url(../assets/skin_wlo/default/coin3.png); }
.gd-coin[data-i="4"] { left: 20px;  top: 175px; background-image: url(../assets/skin_wlo/default/coin4.png); }
.gd-coin[data-i="5"] { left: 94px;  top: 175px; background-image: url(../assets/skin_wlo/default/coin5.png); }

/* lottery: control places from its constructor; the box is Icon_UnKnow */
#win-lottery { --cx: 145px; --cy: 5px; }
#win-lottery .lot-prize { left: 65px; top: 68px; width: 40px; height: 40px; background: none; }
#win-lottery .lot-prize img { width: 40px; height: 40px; margin: 0; }
#win-lottery .lot-prize img.won { width: 32px; height: 32px; margin: 4px; }
#win-lottery .lot-draw  { left: 37px; top: 142px; }
#win-lottery .lot-close { left: 92px; top: 142px; }

/* compound, group, social: button places from their constructors */
#cp-go { left: 83px; top: 429px; }
#cp-close { left: 159px; top: 429px; }
#gp-tabs { left: 20px; top: 41px; }
#gp-tabs .sbtn { margin-right: -1px; }
#gp-tabs .sbtn[hidden] { display: none; }      /* 組織 without an organisation: 副本 slides to x 85 (ui.js) */
#win-friends { --cx: 304px; --cy: 24px; }
#so-tabs { left: 20px; top: 43px; }
#so-tabs .sbtn { margin-right: -1px; }
#so-tabs .sbtn[data-tab=marry] { --img: url(../assets/skin/default/Btn_Marry.png); }
#so-page { left: 134px; top: 392px; width: 80px; }
#so-mail { left: 111px; top: 420px; }
#so-del  { left: 179px; top: 420px; }
#so-close { left: 152px; top: 458px; }

/* system: the WLO form (rows 29 px apart) and its grid of service buttons */
#win-system { --fbg: url(../assets/skin_wlo/white/Form_System_2.png); --cx: 338px; --cy: 24px; }
#sy-pk { top: 59px; } #sy-fight { top: 88px; } #sy-trade { top: 117px; } #sy-channel { top: 146px; }
#sy-info { top: 175px; } #sy-zoom { top: 204px; } #sy-party { top: 233px; }
#sy-music { left: 290px; top: 86px; }
#sy-music-vol { left: 248px; top: 116px; }
#sy-sfx { left: 250px; top: 155px; }
#sy-voice { left: 330px; top: 155px; }
#sy-sfx-vol { left: 248px; top: 185px; }
/* The volume shown in the bar between 小 ◀ and ▶ 大, as the original: a lighter fill over the dark track of the picture
   (Form_System_2: track x 256–331, y 120–126 and 190–196), its width set from the volume by ui.setSound. */
.sy-vol-fill { left: 256px; width: 0; height: 7px; pointer-events: none !important;
  background: linear-gradient(#a9bbdd 0 1px, #7086b4 1px 6px, #52679a 6px); }
#sy-music-fill { top: 120px; }
#sy-sfx-fill { top: 190px; }
.sy-wide { --w: 71px; --h: 20px; }
#sy-lock    { left: 213px; top: 206px; --img: url(../assets/skin/default/Btn_ExchangeLockSet.png); }
#sy-account { left: 295px; top: 206px; --img: url(../assets/skin/default/Btn_SetAccount.png); }
#sy-black   { left: 295px; top: 233px; }
#sy-web     { left: 213px; top: 262px; --img: url(../assets/skin/default/Btn_OfficialWeb_1.png); }
#sy-pass    { left: 295px; top: 262px; --img: url(../assets/skin/default/Btn_ChangePassword_1.png); }
#sy-code    { left: 213px; top: 289px; }
#sy-respawn { left: 295px; top: 289px; }
#sy-msgform { left: 213px; top: 315px; --img: url(../assets/skin/default/Btn_SetMsgForm.png); }
#sy-points  { left: 295px; top: 315px; --img: url(../assets/skin/default/Btn_CheckNumber_1.png); }
#sy-refill  { left: 213px; top: 341px; --img: url(../assets/skin/default/Btn_Refill_1.png); }
#sy-pay     { left: 295px; top: 341px; --img: url(../assets/skin/default/Btn_NewebPay_1.png); }
#sy-buycard { left: 213px; top: 368px; --img: url(../assets/skin/default/Btn_BuyCardOnline_1.png); }
#sy-logout  { left: 295px; top: 368px; }
#sy-reward  { left: 213px; top: 394px; --img: url(../assets/skin/default/Btn_VipReward_1.png); }
#sy-exit    { left: 295px; top: 394px; }
#sy-close { left: 166px; top: 412px; }
/* Not in the original form: the quest book button and the feature list that hung under it are gone (owner
   2026-12-01 「下面任務跟功能要移除，任務是記事本」) — quests open from the 記事本 item (Form_NoteBook → mission). */
#sy-quests, #sy-more { display: none !important; }

/* ── battle: the command wheel around the acting unit (ring offsets from the client's constructor) ── */

#battle-wheel { position: absolute; left: 0; top: 0; width: 0; height: 0; z-index: 8900; transform-origin: 0 0; }
#battle-wheel .sbtn { position: absolute; --w: 28px; --h: 28px; }
#battle-wheel [data-battle=defend]  { left: -16px; top: -96px; --img: url(../assets/skin/default/Btn_Battle_1_1.png); }
#battle-wheel [data-battle=capture] { left: 28px;  top: -74px; --img: url(../assets/skin/default/Btn_Battle_2_1.png); }
#battle-wheel [data-battle=flee]    { left: 39px;  top: -27px; --img: url(../assets/skin/default/Btn_Battle_3_1.png); }
#battle-wheel [data-battle=item]    { left: 10px;  top: 11px;  --img: url(../assets/skin/default/Btn_Battle_4_1.png); }
#battle-wheel [data-battle=auto]    { left: -38px; top: 11px;  --img: url(../assets/skin/default/Btn_Battle_5_1.png); }
#battle-wheel [data-battle=attack]  { left: -68px; top: -27px; --img: url(../assets/skin/default/Btn_Battle_6_1.png); }
#battle-wheel [data-battle=skill]   { left: -61px; top: -74px; --img: url(../assets/skin/default/Btn_Battle_7_1.png); }
#battle-wheel [data-battle=repeat]  { left: -15px; top: -32px; --img: url(../assets/skin/default/Btn_Battle_6_1.png); }
/* the skill / item list and the hint of the moment: a small panel at the lower middle */
#battle-menu { right: auto; left: 50%; bottom: 70px; transform: translateX(-50%); width: min(340px, calc(100vw - 24px)); padding: 8px 10px; }
#battle-menu .head { display: none; }
#battle-list { margin-top: 0; }
#battle-hint:empty { display: none; }
#battle-hint { min-height: 0; }
/* during a battle the action bar, the map label and the remote tool are put away */
body.in-battle #hud-actions, body.in-battle #hud-map, body.in-battle #hud-remote { display: none; }
/* during a battle the chat log has no panel behind it (as in the original) and lets clicks through to the units under it */
body.in-battle #chat-log {
  background: none; border-color: transparent; border-image: none; box-shadow: none; pointer-events: none;
  text-shadow: -1px 0 #000, 1px 0 #000, 0 -1px #000, 0 1px #000;
}

/* ══ D1: the main forms compared again with the D:\WLO client ══════════════════════════════════════════ */

/* item: 僅顯示狀態欄 / 僅顯示物品欄 (Btn_ArrowL_5 (149,30) / Btn_ArrowR_5 (222,30), 0x7fdd81) and the two halves */
#st-only-status { left: 149px; top: 30px; --img: url(../assets/skin/default/Btn_ArrowL_5.png); --w: 17px; --h: 17px; }
#st-only-items  { left: 222px; top: 30px; --img: url(../assets/skin/default/Btn_ArrowR_5.png); --w: 17px; --h: 17px; }
#st-doll { pointer-events: auto !important; cursor: pointer; }
#st-pet-doll { left: 36px; top: 108px; width: 128px; height: 128px; pointer-events: none !important; image-rendering: pixelated; }
#win-status.only-status { --fw: 207px; --fbg: url(../assets/skin/white/Form_RoleStatus_2.png); --cx: 159px; }
#win-status.only-status #bag-grid, #win-status.only-status #st-only-status, #win-status.only-status #bag-msg { display: none; }
#win-status.only-status #st-only-items { left: 130px; }
#win-status.only-status #st-close { left: 75px; }
#win-status.only-items { --fw: 209px; --fbg: url(../assets/skin/white/Form_RoleStatus_3.png); --cx: 160px; }
#win-status.only-items > .win-body > *:not(#bag-grid):not(#st-only-status):not(#st-close):not(#bag-msg) { display: none; }
#win-status.only-items #bag-grid { left: 19px; }
#win-status.only-items #st-only-status { left: 60px; }
#win-status.only-items #st-close { left: 76px; }
#win-status.only-items #bag-msg { left: 19px; top: 418px; width: 170px; }

/* compound: 「使用 [等級] 鍊金術」: tick box btn_UnCheck_1 / btn_Check_1 (21,50), Icon_UseCompoundSkill, Btn_CompSk_n (56,47) */
#cp-use { left: 21px; top: 50px; width: 16px; height: 16px; --w: 16px; --h: 16px;
  background: url(../assets/skin_wlo/default/btn_UnCheck_1.png) 0 0 / 16px auto no-repeat; }
#cp-use.checked { background-image: url(../assets/skin/default/btn_Check_1.png); }
#cp-use:hover, #cp-use:active { background-position: 0 0; }
/* The tick box and its words (only 中階鍊金術 learned): the label control at (38,53), dark text */
#cp-use-text { left: 38px; top: 51px; font-size: 13px; line-height: 15px; color: #080808; white-space: nowrap; pointer-events: none; }
/* 中階 and 高階 learned: Icon_UseCompoundSkill (134 × 19: 「使用」 0–35, 「鍊金術」 83–133) drawn at the button's x − 38,
   y + 1 (0x237125) = (18,48), with Btn_CompSk_n at (56,47) in the gap; the list of the three levels (Btn_CompSk_3 / 2 / 1
   at y −15, 5, 25) lies in the Icon_RoleSelectFrame frame at (54,−17) */
#cp-use-label { left: 18px; top: 48px; width: 134px; height: 19px; background: url(../assets/skin_wlo/default/Icon_UseCompoundSkill.png) 0 0 no-repeat; pointer-events: none !important; }
#cp-level { left: 56px; top: 47px; --w: 43px; --h: 20px; }
#cp-levels { left: 54px; top: -17px; width: 43px; height: 60px; padding: 2px; z-index: 3; display: grid; grid-auto-rows: 20px;
  background: url(../assets/skin_wlo/default/Icon_RoleSelectFrame.png) 0 0 / 47px 84px no-repeat; }
#cp-levels.hidden { display: none !important; }
#cp-levels .sbtn { position: static; --w: 43px; --h: 20px; }
#cp-levels [data-level="1"] { --img: url(../assets/skin_wlo/default/Btn_CompSk_1.png); }
#cp-levels [data-level="2"] { --img: url(../assets/skin_wlo/default/Btn_CompSk_2.png); }
#cp-levels [data-level="3"] { --img: url(../assets/skin_wlo/default/Btn_CompSk_3.png); }
#compound-msg { display: none; }

/* group: companion rows at y 77 + 34 i (0x6bd9c2), 出戰/休息 x 247, 驅逐 x 295 (form). Inside a row, as the original
   draws them (owner's screenshot, matched pixel for pixel): the name in the 16 px font, #080808, glyph top at (40, 7);
   Pet_Word_Lv / Hp / Sp at x 139, y 4 / 12 / 20; the level in Pet_Num_Lv_Black_1 at (156, 4); the bars at x 152,
   y 13 / 21; the companion's element (Npc.Dat) at (187, 3). */
#gp-pets { top: 70px; }
.gp-pet .sbtn { top: 7px; }
.gp-pet .sbtn.fight, .gp-pet .sbtn.rest { left: 221px; }
.gp-pet .sbtn.leave { left: 269px; --img: url(../assets/skin/default/Btn_AssignLeave_1.png); --w: 43px; --h: 20px; }
.gp-pet .sbtn.info { display: none; }
.gp-pet .word { position: absolute; width: 11px; height: 7px; background: no-repeat 0 0; }
.gp-pet .word.lv { left: 139px; top: 4px; background-image: url(../assets/skin/default/Pet_Word_Lv.png); }
.gp-pet .lv-num { left: 156px; top: 4px; }
.gp-pet .word.hp { left: 139px; top: 12px; background-image: url(../assets/skin/default/Pet_Word_Hp.png); }
.gp-pet .word.sp { left: 139px; top: 20px; background-image: url(../assets/skin/default/Pet_Word_Sp.png); }
.gp-pet .element { left: 187px; top: 3px; width: 25px; height: 25px; }
.gp-pet .mini { left: 152px; width: 27px; height: 5px; background: url(../assets/skin/default/Pet_Frame_Hp.png) 0 0 no-repeat; }
.gp-pet .mini i { position: absolute; left: 1px; top: 1px; height: 3px; max-width: 25px; }
.gp-pet .mini.hp { top: 13px; }
.gp-pet .mini.hp i { background: url(../assets/skin/default/Pet_Bmp_Hp.png) 0 0 no-repeat; }
.gp-pet .mini.sp { top: 21px; }
.gp-pet .mini.sp i { background: url(../assets/skin/default/Pet_Bmp_Sp.png) 0 0 no-repeat; }
.gp-pet .tag { display: none; }

/* social: the friend's face, element and nickname on the card */
.friend .element { left: 236px; top: 3px; width: 17px; height: 17px; }
.friend .nick { left: 108px; top: 23px; width: 120px; font-size: 12px; color: #1d2a4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend .guild { left: 108px; top: 41px; width: 120px; font-size: 12px; color: #1d2a4a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* system, left column: 顯示人物資訊 / 戰鬥鏡頭拉近 are switches; the five colour rows (◀ name ▶) from y 262 */
.sy-color { left: 138px; width: 72px; height: 17px; display: flex; align-items: center; justify-content: space-between; }
.sy-color .sbtn { position: static; }
.sy-color .name { font: 700 12px/17px "Microsoft JhengHei", sans-serif; text-shadow: -1px 0 #33456e, 1px 0 #33456e, 0 -1px #33456e, 0 1px #33456e; }
.sy-color[data-color=local]   { top: 263px; }
.sy-color[data-color=whisper] { top: 292px; }
.sy-color[data-color=team]    { top: 321px; }
.sy-color[data-color=guild]   { top: 350px; }
.sy-color[data-color=world]   { top: 379px; }
/* the chosen colours on the chat log (name and text of everything said) */
#chat-log .said, #chat-log .said .who { color: var(--line-color, inherit); }

/* 頻道開關: Form_Channel_1 169 x 237, 開/關 at x 86, 確定 (41,199), 關閉 (86,199) */
#win-channel { --fw: 169px; --fh: 237px; --fbg: url(../assets/skin_wlo/white/Form_Channel_1.png); left: calc(50vw + 10px); top: 120px; }
#win-channel [data-channel] { left: 86px; --w: 39px; --h: 20px; }
#win-channel [data-channel="1"]  { top: 45px; }
#win-channel [data-channel="2"]  { top: 76px; }
#win-channel [data-channel="4"]  { top: 107px; }
#win-channel [data-channel="8"]  { top: 138px; }
#win-channel [data-channel="16"] { top: 168px; }
#ch-ok    { left: 41px; top: 199px; --img: url(../assets/skin/default/Btn_OK_2.png); --w: 39px; --h: 20px; }
#ch-close { left: 86px; top: 199px; --img: url(../assets/skin/default/Btn_Close_2.png); --w: 39px; --h: 20px; }

/* 記事本: Form_NoteBook 223 x 223, three book buttons at x 63, close (80,190), X (173,26) */
#win-notebook { --fw: 223px; --fh: 223px; --fbg: url(../assets/skin_wlo/white/Form_NoteBook.png); --cx: 173px; --cy: 26px; left: calc(50vw - 112px); }
#nb-mission { left: 63px; top: 56px;  --img: url(../assets/skin_wlo/default/Btn_MissionBook.png); --w: 97px; --h: 32px; }
#nb-monster { left: 63px; top: 98px;  --img: url(../assets/skin_wlo/default/Btn_MonsterBook.png); --w: 97px; --h: 32px; }
#nb-star    { left: 63px; top: 140px; --img: url(../assets/skin_wlo/default/Btn_StarBook.png);    --w: 97px; --h: 32px; }
#nb-close   { left: 80px; top: 190px; }

/* 任務查詢: form_taskview_1 432 x 367, ten titles on the left, the text on the right,
   Arrow_L3 (74,298) / Arrow_R3 (137,298), 關閉 (187,332), 刪除 (290,332), X (382,24) */
#win-quests.form { --fw: 432px; --fh: 367px; --fbg: url(../assets/skin_wlo/white/Form_TaskView_1.png); --cx: 382px; --cy: 24px;
  left: calc(50vw - 216px); width: var(--fw); height: var(--fh); padding: 0; }
#quest-list { left: 18px; top: 53px; width: 194px; height: 240px; display: grid; grid-template-rows: repeat(10, 24px); }
.ms-row { padding: 0 6px; border: 0; background: none; text-align: left; font: inherit; font-size: 13px; color: #1d2a4a; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-row.done { color: #8a96b4; }
.ms-row:hover { background: rgba(255, 255, 255, 0.6); }
.ms-row[aria-selected=true] { background: rgba(255, 233, 74, 0.45); }
#ms-text { left: 222px; top: 56px; width: 186px; height: 230px; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; color: #1d2a4a; scrollbar-width: thin; }
#ms-prev { left: 74px;  top: 298px; --img: url(../assets/skin_wlo/default/Arrow_L3.png); --w: 21px; --h: 21px; }
#ms-next { left: 137px; top: 298px; --img: url(../assets/skin_wlo/default/Arrow_R3.png); --w: 21px; --h: 21px; }
#ms-close  { left: 187px; top: 332px; }
#ms-delete { left: 290px; top: 332px; --img: url(../assets/skin/default/Btn_Delete_1.png); --w: 43px; --h: 20px; }
