/* 熔爐 window. Frame/tabs reuse the status window art (like 合成); the store follows the
   UI_Furnace prefab: goods box bod013 700x325, 8 cards 175x155 (bod015) at a 174/154 pitch, item
   slot 64x64, name 18px, price bar 130x44 (bod018) with a 30x30 chip, bottom row chip + count,
   跨日時刷新, magnifier 50x50 and 刷新 120x50. Sliced art is pre-rendered (ui/furnace). Sub-tab
   art (武將/裝備/轉生物品 under 商店) is our choice: official screenshots, not in the prefab. */
.furnace-overlay{position:absolute;inset:0;z-index:60;background:rgba(0,0,0,.48)}
.furnace-window{position:absolute;left:50%;top:50%;width:850px;height:470px;transform:translate(-50%,-50%) scale(var(--furnace-scale,1));
  background:url('ui/status-frame.png') center/100% 100%;font:700 17px TSClient,'Microsoft JhengHei',sans-serif;color:#111}
.furnace-title{position:absolute;left:10px;top:9px;width:830px;height:40px;background:url('ui/status-title.png') center/100% 100%}
/* Title measured on the official screenshot: white with a thick dark-blue (#185cae) outline. */
.furnace-title h2{margin:6px 15px;color:#fff;font-size:22px;text-shadow:-1.5px -1.5px #185cae,1.5px -1.5px #185cae,-1.5px 1.5px #185cae,1.5px 1.5px #185cae,0 -1.5px #185cae,0 1.5px #185cae,-1.5px 0 #185cae,1.5px 0 #185cae}
.furnace-title button{position:absolute;top:2px;width:36px;height:36px;border:0;padding:0;background:center/contain no-repeat;cursor:pointer}
.furnace-close{right:4px;background-image:url('ui/common0_but002D.png')!important}
.furnace-help{right:46px;background-image:url('ui/common0_but007D.png')!important}
.furnace-tabs{position:absolute;left:10px;top:72px;width:127px;z-index:2;pointer-events:none}
/* Tab column measured on the official screenshot (window coordinates): 商店 72..136 (connected),
   sub-tabs 武將/裝備/轉生物品 x 29..124, 45 high at y 138 / 185 / 232 with 2px dark gaps,
   黃金商店 at 279, 分解 at 344. */
.furnace-tab{display:block;width:126px;height:62px;margin-bottom:3px;border:0;pointer-events:auto;background:url('ui/status-tab.png') left center/130px 100% no-repeat;clip-path:inset(0 12px 0 0);
  font:700 21px TSClient,sans-serif;color:#f2efff;text-shadow:1px 0 #7970af,-1px 0 #7970af,0 1px #7970af,0 -1px #7970af;cursor:pointer}
.furnace-tab.active{width:127px;height:64px;margin-bottom:2px;clip-path:none;background:url('ui/status-tab-connected.png') center/100% 100%;color:#ecefa0;cursor:default;
  text-shadow:1px 0 #59519e,-1px 0 #59519e,0 1px #59519e,0 -1px #59519e}
/* Sub-tabs: flat panels like the official ones (lavender, the open one green), light top edge,
   dark outline; drawn by CSS (no sprite found in the prefab). */
.furnace-subtab{display:block;width:95px;height:45px;margin:0 0 2px 19px;padding:0;box-sizing:border-box;pointer-events:auto;
  border:1px solid #5c57a3;border-top-color:#8f8bcc;background:linear-gradient(#a7a4dd,#a29fda 30%,#9c99d6);
  font:700 20px TSClient,sans-serif;color:#fff;text-shadow:1.5px 0 #59519e,-1.5px 0 #59519e,0 1.5px #59519e,0 -1.5px #59519e;cursor:pointer}
.furnace-subtab.active{border-color:#2f8f6c;border-top-color:#9fe6c2;background:linear-gradient(#6dd6a1,#61cf98 30%,#5ac993);cursor:default}
.furnace-paper{position:absolute;left:124px;top:58px;width:714px;height:400px;z-index:1;background:url('ui/status-content.png') center/100% 100%}
.furnace-box{position:absolute;left:2px;top:6px;width:710px;height:320px;background:url('ui/furnace/box.png') center/700px 325px no-repeat}
.furnace-loading{position:absolute;left:0;right:0;top:140px;text-align:center;color:#8a8aa8}
.furnace-card{position:absolute;width:175px;height:155px;padding:0;border:0;background:url('ui/furnace/card.png') center/100% 100% no-repeat;cursor:pointer;font:inherit}
.furnace-window button:hover,.furnace-window button:hover:not(:disabled){filter:none} /* official: no hover glow */
.furnace-slot{position:absolute;left:55.5px;top:13.5px;width:64px;height:64px;background:url('ui/bag/item-slot.png') center/100% 100% no-repeat}
.furnace-slot img{position:absolute;inset:6px;width:52px;height:52px;object-fit:contain}
.furnace-name{position:absolute;left:4px;right:4px;top:82px;text-align:center;font-size:17px;line-height:22px;white-space:nowrap;overflow:hidden}
.furnace-price{position:absolute;left:22.5px;top:103.5px;width:130px;height:44px;background:url('ui/furnace/price.png') center/100% 100% no-repeat}
.furnace-price img{position:absolute;left:10px;top:7px;width:30px;height:30px;object-fit:contain}
.furnace-price b{position:absolute;left:27px;width:76px;top:0;line-height:44px;text-align:right;font-size:20px;color:#3d3a7a}
.furnace-price b.sold{text-align:center;left:40px;width:80px}
.furnace-chip{position:absolute;left:33px;top:340px;width:30px;height:30px;object-fit:contain}
.furnace-count{position:absolute;left:70px;top:342px;font-size:20px;line-height:26px;color:#fff;text-shadow:-1.5px 0 #6b60ac,1.5px 0 #6b60ac,0 -1.5px #6b60ac,0 1.5px #6b60ac}
.furnace-pr{position:absolute;left:403px;top:330px;width:50px;height:50px;border:0;padding:0;background:url('ui/furnace/common0_but066D.png') center/40px 40px no-repeat;cursor:pointer}
.furnace-info{position:absolute;left:470px;top:342px;font-size:20px;line-height:26px;color:#3d3d3d}
.furnace-refresh{position:absolute;left:574px;top:330px;width:120px;height:50px;border:0;padding:0;background:url('ui/shop/confirm.png') center/100% 100% no-repeat;
  color:#fff19b;font:700 22px TSClient,sans-serif;text-shadow:-1px 0 #6862ae,1px 0 #6862ae,0 -1px #6862ae,0 1px #6862ae;cursor:pointer}
a.furnace-token-link{color:#2b3f9e;text-decoration:underline}

/* General sheet from 預覽 (official screenshot): frame like the item detail, element + LV + name,
   the general on the com040 circle, HP/SP and six stats in two columns, skills on the right with
   icon, name, LV and description. Measured on the official screenshot (760x432, 1:1): figure
   ~137 tall standing at x 183 / y 272, stat rows centred at y 311..401 (30 apart), skill icons 52
   at x 391, rows 62 apart from y 228. */
.furnace-general-layer{position:absolute;inset:0;z-index:5;display:grid;place-items:center;background:#0003}
.furnace-general{position:absolute;left:50%;top:50%;width:760px;height:430px;box-sizing:border-box;transform:translate(-50%,-50%) scale(var(--furnace-sheet-scale,1));
  border:8px solid transparent;border-image:url('ui/common0_bod011.png') 8 fill/8px stretch;font:700 16px TSClient,'Microsoft JhengHei',sans-serif;color:#111}
.furnace-general::before{content:'';position:absolute;inset:0;border-image:url('ui/common0_bod002.png') 15 12 12 15 fill/10px 8px 8px 10px stretch;z-index:-1}
.furnace-general-head{position:absolute;left:22px;top:22px;display:flex;align-items:center;gap:8px}
.furnace-general-head img{width:42px;height:42px;object-fit:contain;flex-shrink:0}
.furnace-general-lv i{font-style:normal;color:#5c55a5;font-size:16px;margin-right:3px}
.furnace-general-lv b{color:#59b04a;font-size:18px}
.furnace-general-head strong{font-size:19px}
.furnace-general-stage{position:absolute;left:55px;top:86px;width:240px;height:200px}
.furnace-general-stage img{position:absolute;left:45px;top:146px;width:150px;height:66px;object-fit:contain}
.furnace-general-stage canvas{position:absolute;inset:0}
.furnace-general-stats{position:absolute;left:37px;top:288px;width:296px;display:grid;grid-template-columns:1fr 1fr;column-gap:4px;row-gap:2px}
.furnace-general-stats div{display:flex;justify-content:space-between;align-items:center;height:28px;padding-right:6px;border-bottom:2px solid #d3e4e5;font-size:18px}
.furnace-general-stats span{width:46px;line-height:26px;text-align:center;background:#d7e8ea;color:#fff;text-shadow:-1px 0 #86adad,1px 0 #86adad,0 -1px #86adad,0 1px #86adad}
.furnace-general-skills{position:absolute;left:383px;top:220px;width:340px;display:flex;flex-direction:column;gap:10px}
.furnace-general-skill{display:flex;gap:10px;align-items:center}
.furnace-general-skill-icon{width:52px;height:52px;flex:none;background:#201d42;border:2px ridge #aac5c6}
.furnace-general-skill-icon img{width:100%;height:100%}
.furnace-general-skill-name i{font-style:normal;color:#5c55a5}
.furnace-general-skill-name b{color:#59b04a}
.furnace-general-skill p{margin:2px 0 0;font-size:13px;color:#555;font-weight:400}
