/* Native compound (合成) window. Frame/tabs reuse the status window art; element art from
   UI_Compound (ui/compound/source.json), placement measured from the official screenshot. */
.compound-overlay{position:absolute;inset:0;z-index:60;background:rgba(0,0,0,.48)}
.compound-window{position:absolute;left:50%;top:50%;width:850px;height:470px;transform:translate(-50%,-50%) scale(var(--compound-scale,1));
  background:url('ui/status-frame.png') center/100% 100%;font:700 17px TSClient,'Microsoft JhengHei',sans-serif;color:#111}
.compound-title{position:absolute;left:10px;top:9px;width:830px;height:40px;background:url('ui/status-title.png') center/100% 100%}
.compound-title h2{margin:6px 15px;color:#fff;font-size:22px;text-shadow:1px 1px #347fb8}
.compound-title button{position:absolute;top:2px;width:36px;height:36px;border:0;background:center/contain no-repeat;cursor:pointer}
.compound-close{right:4px;background-image:url('ui/common0_but002D.png')!important}
.compound-help{right:46px;background-image:url('ui/common0_but007D.png')!important}
/* Tabs and paper use the status window's aligned geometry: inactive tabs are clipped at the paper's
   left edge (x124), the active tab uses the connected art and overlaps it. */
.compound-tabs{position:absolute;left:10px;top:72px;width:127px;z-index:2;pointer-events:none}
.compound-tabs button{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}
.compound-tabs button.active{width:127px;clip-path:none;background:url('ui/status-tab-connected.png') center/100% 100%;color:#fff19b}
/* Layout measured from the official compound window (user screenshot, window ~1:1 with this
   850x470 frame); paper at the status window's 124,58 714x400, inner positions in paper pixels. The official left panel draws the UI_Compound prefab at
   ~0.945 scale with arrows at their native aspect; all positions below are in paper pixels. */
.compound-paper{position:absolute;left:124px;top:58px;width:714px;height:400px;z-index:1;background:url('ui/status-content.png') center/100% 100%}
.compound-body{position:absolute;inset:0}
.compound-left{position:absolute;left:0;top:0;width:398px;height:400px}
.compound-slot,.compound-product{position:absolute;width:60px;height:60px;margin:-30px 0 0 -30px;padding:0;border:0;
  background:url('ui/compound/common0_com006.png') center/100% 100% no-repeat}
.compound-slot{cursor:pointer}
.compound-slot img,.compound-product img{position:absolute;inset:6px;width:48px;height:48px;object-fit:contain;image-rendering:pixelated}
.compound-slot b{position:absolute;left:5px;bottom:2px;color:#fff;font:700 14px TSClient,sans-serif;text-shadow:-1px 0 #111,1px 0 #111,0 -1px #111,0 1px #111}
.compound-slot-1{left:82.5px;top:96.5px}
.compound-slot-2{left:195.5px;top:96.5px}
.compound-slot-3{left:308.5px;top:96.5px}
.compound-product{left:195.5px;top:267px}
.compound-question{position:absolute;inset:2px;top:5px;bottom:-1px;background:url('ui/compound/common0_com017.png') center/100% 100% no-repeat}
.compound-arrow{position:absolute;pointer-events:none;background:center/100% 100% no-repeat}
.compound-arrow-1,.compound-arrow-3{width:94.5px;height:88px;top:135px;background-image:url('ui/compound/common0_com015.png')}
.compound-arrow-1{left:67px}
.compound-arrow-3{left:229px;transform:scaleX(-1)}
.compound-arrow-2{left:180px;top:136px;width:30.7px;height:84.6px;background-image:url('ui/compound/common0_com016.png')}
/* common0_but001D (50x50, sprite border L16 B21 R16 T21) pre-nine-sliced to 120x50 by export_compound_ui.py
   (CSS border-image left seams under fractional scale), shown at 113x47. Text_Submit/Cancel: size 22,
   colour (1,.946,.904), effect (89,81,158) distance 1.5. */
.compound-button{position:absolute;top:317.5px;width:113px;height:47px;padding:0;border:0;
  background:url('ui/compound/button-120x50.png') center/100% 100% no-repeat;
  font:700 21px TSClient,sans-serif;line-height:47px;color:#fff1e7;
  text-shadow:1.5px 0 #59519e,-1.5px 0 #59519e,0 1.5px #59519e,0 -1.5px #59519e,1.5px 1.5px #59519e,-1.5px -1.5px #59519e,1.5px -1.5px #59519e,-1.5px 1.5px #59519e;cursor:pointer}
.compound-submit{left:58px}
.compound-cancel{left:220px}
/* While compounding the controls are locked but keep their normal look (official). */
.compound-button:disabled,.compound-slot:disabled,.compound-tools button:disabled{filter:none;opacity:1;color:#fff1e7;cursor:default}
.compound-hint{position:absolute;left:95px;width:200px;top:300px;margin:0;text-align:center;font-size:14px;color:#3d4c6a;pointer-events:none}

/* Right panel: toolbar right edge at paper x 703, y 14; standard 308x308 bag frame at 398,60 with
   square 59.2px cells; capacity under it, right-aligned at 703. */
.compound-right{position:absolute;inset:0;pointer-events:none}
.compound-right>*{pointer-events:auto}
.compound-bag{left:398px;top:60px;width:308px;height:308px;grid-auto-rows:59.2px}
.compound-tools{position:absolute;right:11px;top:14px;display:flex;gap:5px}
.compound-tools button{width:38px;height:38px;padding:0;border:0;background:center/contain no-repeat;cursor:pointer}
.compound-tools .compound-sort{background-image:url('ui/compound/common0_but139D.png')}
.compound-tools .compound-sort:active{background-image:url('ui/compound/common0_but139L.png')}

/* Grey fill only inside the slot art, so neighbouring placed stacks stay separate cells. */
.compound-bag .compound-used::before{content:'';position:absolute;inset:4px 6px 6px 4px;background:#8f8f8f}
.compound-used img{opacity:.45;z-index:1}
.compound-capacity{position:absolute;right:11px;top:371px;margin:0;color:#4b898e;font:700 18px/22px TSClient,sans-serif}
.compound-quantity-layer{position:absolute;inset:0;z-index:5;background:#0006}
.compound-quantity-layer .item-use-window{left:50%;top:50%;--use-scale:1}


/* Compound animation (compound.unity3d): Mixed 6 frames looping in the product slot, then the
   L10248 burst once over the product. Frames are stacked top to bottom. */
.compound-mixing,.compound-burst{position:absolute;pointer-events:none;background-repeat:no-repeat;background-size:100% 600%}
.compound-mixing{left:2px;top:6px;width:56px;height:46px;background-image:url('ui/compound/Mixed.png');animation:compound-frames .6s steps(6) infinite}
.compound-burst{left:-34px;top:-34px;width:128px;height:128px;background-image:url('ui/compound/L10248.png');animation:compound-frames .48s steps(6) forwards}
@keyframes compound-frames{from{background-position:0 0}to{background-position:0 120%}}
