#collectionDialog{width:min(1500px,96vw);max-width:none;height:min(850px,94svh);max-height:94svh;padding:0;overflow:hidden;color:#fff0d0;border:2px solid #d3a65d;border-radius:20px;background:radial-gradient(ellipse at 50% 0,#65402d55,transparent 65%),linear-gradient(130deg,#39271f,#221b17);box-shadow:0 0 0 4px #302017,0 0 0 5px #a17740,0 24px 90px #000c}
#collectionDialog[open]{display:flex;flex-direction:column}#collectionDialog::backdrop{background:#17110db3;backdrop-filter:blur(5px)}
.inventory-heading{height:78px;flex-shrink:0;display:flex;align-items:center;justify-content:center;position:relative;border-bottom:1px solid #c08d4555;background:linear-gradient(#55332366,#2c1d1866)}
#collectionDialog .inventory-heading h2{font:bold 36px Georgia,serif;letter-spacing:3px;margin:0;color:#ffdfa1;text-shadow:0 2px 1px #000}
#closeInventory{position:absolute;right:18px;top:15px;width:46px;height:46px;border-radius:50%;border-color:#d3ab65;color:#ffe5ab;font-size:25px;padding:0;background:#614223}
.inventory-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin:16px 20px 0 27%;gap:6px;flex-shrink:0;min-height:55px}
.inventory-tabs button{border-radius:14px 14px 0 0;font:700 25px Georgia,serif;background:linear-gradient(#664631,#38251b);color:#eed6b1;border-color:#bc9259}
.inventory-tabs button[aria-selected=true]{background:linear-gradient(#ffe5a0,#e7b347);box-shadow:inset 0 0 0 2px #ffedb477;color:#34210e}
.inventory-reserved{min-width:0}.inventory-layout{min-height:0;flex:1;display:grid;grid-template-columns:25% 39% 36%;margin:0 14px;overflow:auto;border-top:1px solid #c99c52}
.inventory-catalog,.inventory-showcase,.inventory-details{margin:10px 5px;border:1px solid #a77c4077;border-radius:14px;background:linear-gradient(145deg,#583c252f,#20191644);min-width:0;padding:18px}
.inventory-catalog{display:flex;flex-direction:column;min-height:0}.inventory-catalog h3{font:700 27px Georgia;text-align:center;color:#ffe0a4;margin:0 0 15px;padding-bottom:14px;border-bottom:1px solid #c4995d66}
#collectionCards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;overflow:auto;min-height:0;padding:3px 5px 12px;scrollbar-color:#b58a4e #2a201a}
#collectionCards .collection-card{border:1px solid #b68a50;padding:8px 5px;background:linear-gradient(#3b2b21,#251b15);text-align:center;align-items:center;gap:5px;min-width:0;min-height:135px;position:relative}
#collectionCards .collection-card[aria-pressed=true]{border:2px solid #ffdc87;box-shadow:0 0 10px #f2b94f55,inset 0 0 8px #f2b94f33;background:#55402b}
#collectionCards .collection-card svg{height:85px;width:100%}#collectionCards .collection-card b{font:700 17px Georgia;line-height:1.3}#collectionCards .inventory-card-state{font-size:12px;color:#e6c991}
.inventory-piece{position:relative;min-width:0;width:100%;filter:drop-shadow(0 9px 5px #0005)}.inventory-piece img{display:block;width:100%;height:auto;pointer-events:none;user-select:none}
#collectionCards .inventory-piece{height:80px}#collectionCards .inventory-piece img{height:100%;object-fit:contain}
.inventory-glyph{position:absolute;left:50%;top:38%;transform:translate(-50%,-50%);font:700 clamp(35px,4.3vw,80px) Georgia;color:#a01412;text-shadow:0 1px 1px #ffd7ba;line-height:1;pointer-events:none}.inventory-glyph.black{color:#221c18}.inventory-piece-gold .inventory-glyph{top:47%}
.inventory-showcase{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:20px 16px;gap:12px;background:radial-gradient(ellipse at center,#85502d33,#2a1a1255)}
#inventoryHero{width:100%;flex:1;min-height:190px;display:flex;align-items:center;justify-content:center}#inventoryHero>svg{display:block;width:min(100%,330px);max-height:370px;filter:drop-shadow(0 12px 8px #0006)}
.inventory-piece-pair{display:flex;align-items:center;gap:10px;width:100%;padding:20px 0}.inventory-piece-pair .inventory-piece{width:50%}.inventory-piece-pair .inventory-piece:first-child{transform:translateY(28px)}.inventory-piece-pair .inventory-piece:last-child{transform:translateY(-20px)}
#inventoryCompanion{width:100%;text-align:center}#inventoryCompanion h4{font:600 18px Georgia;color:#e6c991;margin:8px 0 12px}
.inventory-companion{display:block;width:145px;height:115px;margin:auto;padding:5px;border:1px solid #a77b42;background:#22191266}.inventory-companion>svg{display:block;width:100%;height:100%}.inventory-companion .inventory-piece{width:95px;margin:auto}.inventory-companion .inventory-glyph{font-size:40px}
.inventory-details{display:flex;flex-direction:column;padding:25px 22px;min-height:0}
.inventory-detail-scroll{flex:1;min-height:0;overflow:auto;padding-right:7px;scrollbar-color:#b58a4e #2a201a}
.inventory-layout{overflow:hidden}.inventory-catalog,.inventory-showcase,.inventory-details{height:calc(100% - 20px);min-height:0}
#inventoryHero{min-height:0;overflow:hidden}#inventoryHero>svg{height:100%;max-height:100%;width:100%}
.inventory-piece-pair{max-width:100%;padding:0}.inventory-piece-pair .inventory-piece{max-height:100%}
#inventoryCompanion{flex-shrink:0}#collectionDialog #saveCollection{flex-shrink:0}
#inventoryItemName{font:700 27px Georgia;text-transform:uppercase;line-height:1.25;color:#ffe5b2;margin:0 0 12px}#inventoryRank{font:italic 21px Georgia;color:#dcb76d;margin-bottom:16px}
#collectionDialog #inventoryStory{font:20px/1.75 Georgia,serif;color:#f3dfbd;margin:0 0 20px}
#inventoryFacts{display:grid;grid-template-columns:auto 1fr;gap:12px 9px;border-top:1px solid #bc925866;padding-top:18px;margin:0 0 20px;font-size:17px;line-height:1.5}#inventoryFacts dt{font-weight:700;color:#dec08a}#inventoryFacts dd{margin:0}
#inventoryOwned{align-self:flex-start;min-width:160px;text-align:center;padding:8px 14px;border:1px solid #ba8b4f;border-radius:25px;color:#ffe1a4;background:#5b3d2566;font-size:18px}#inventoryOwned[data-owned=false]{color:#d1bc9e;border-color:#827057}
#collectionDialog #collectionNotice{font-size:16px;line-height:1.6;min-height:30px;color:#ffdda1;margin:12px 0}
#collectionDialog #saveCollection{font-size:23px;min-height:58px;margin-top:auto;white-space:normal}#collectionDialog #saveCollection:disabled{opacity:.65}
.inventory-footer{flex-shrink:0;min-height:64px;padding:10px 18px 12px;text-align:center;color:#eed5a7;font:italic 19px Georgia}.inventory-footer small{display:block;margin-top:6px;color:#d1bc9a;font:14px/1.5 'Segoe UI',sans-serif}
@media(max-width:1100px){.inventory-layout{grid-template-columns:24% 36% 40%}.inventory-catalog,.inventory-showcase,.inventory-details{padding:14px 10px}#inventoryItemName{font-size:23px}#collectionDialog #inventoryStory{font-size:18px}#inventoryFacts{font-size:16px}#collectionCards .collection-card b{font-size:15px}#collectionCards .collection-card{min-height:125px}#collectionCards .collection-card svg{height:70px}#collectionCards .inventory-piece{height:68px}}
@media(max-width:760px){#collectionDialog{height:96svh;max-height:96svh;width:96vw}.inventory-heading{height:62px}#collectionDialog .inventory-heading h2{font-size:28px}.inventory-tabs{margin:10px 12px 0;min-height:48px}.inventory-tabs button{font-size:21px}.inventory-layout{grid-template-columns:1fr 1fr;overflow:auto}.inventory-catalog{grid-column:1/-1;max-height:200px}.inventory-catalog h3{display:none}#collectionCards{grid-template-columns:repeat(7,minmax(105px,1fr));overflow:auto}.inventory-showcase,.inventory-details{margin-top:0}.inventory-details{padding:16px 12px}#inventoryItemName{font-size:21px}#collectionDialog #inventoryStory{font-size:17px}.inventory-glyph{font-size:36px}.inventory-companion{width:110px;height:100px}#inventoryFacts{display:block}#inventoryFacts dd{margin-bottom:10px}.inventory-footer{font-size:16px}}

/* One Vietnamese-capable UI family; Chinese piece faces keep their own glyph font. */
#collectionDialog,#collectionDialog button,#collectionDialog h2,#collectionDialog h3,#collectionDialog h4,#collectionDialog p,#collectionDialog b,#collectionDialog small,#collectionDialog dt,#collectionDialog dd,#inventoryRank,#inventoryOwned,.inventory-footer{font-family:'Segoe UI',Tahoma,Arial,sans-serif;font-synthesis:none;font-kerning:normal;letter-spacing:normal}
#collectionDialog .inventory-heading h2{font-family:'Segoe UI',Tahoma,Arial,sans-serif;font-size:32px;font-weight:700;letter-spacing:1.5px;line-height:1.35}
#collectionDialog .inventory-tabs button{font-size:23px;font-weight:600;line-height:1.4}
#collectionDialog .inventory-catalog h3{font-size:23px;font-weight:600;line-height:1.4}
#inventoryItemName{font-size:26px;font-weight:700;text-transform:none;line-height:1.4}
#inventoryRank{font-size:18px;font-style:normal;font-weight:500;line-height:1.5}
#collectionDialog #inventoryStory{font-family:'Segoe UI',Tahoma,Arial,sans-serif;font-size:19px;font-weight:400;line-height:1.8}
#inventoryFacts{font-size:17px;line-height:1.6}#inventoryFacts dt{font-weight:600}
.inventory-footer{font-size:16px;font-style:normal;line-height:1.5}.inventory-footer small{font-family:inherit;font-size:14px}
#collectionCards{grid-auto-rows:176px;align-content:start}
#collectionCards .collection-card{display:grid;grid-template-rows:82px 44px 18px;gap:4px;padding:8px 6px;min-height:0;align-items:center;justify-items:center;overflow:visible}
#collectionCards .collection-card svg,#collectionCards .inventory-piece{height:82px;width:100%;min-height:0}
#collectionCards .collection-card b{font-family:'Segoe UI',Tahoma,Arial,sans-serif;font-weight:600;font-size:16px;line-height:1.35;white-space:normal;word-break:normal;text-wrap:balance;display:flex;align-items:center;justify-content:center;width:100%;height:44px}
#collectionCards .inventory-card-state{font-family:'Segoe UI',Tahoma,Arial,sans-serif;font-size:12px;line-height:18px;white-space:nowrap}
#collectionDialog #saveCollection{font-weight:600;font-size:22px;line-height:1.4}
@media(max-width:1100px){#collectionCards{grid-auto-rows:160px}#collectionCards .collection-card{grid-template-rows:68px 42px 18px}#collectionCards .collection-card svg,#collectionCards .inventory-piece{height:68px}#collectionCards .collection-card b{font-size:14px;height:42px}#inventoryItemName{font-size:23px}#collectionDialog #inventoryStory{font-size:18px}}
@media(max-width:760px){#collectionDialog .inventory-heading h2{font-size:26px}#collectionDialog .inventory-tabs button{font-size:20px}#inventoryItemName{font-size:21px}#collectionDialog #inventoryStory{font-size:17px}.inventory-footer{font-size:14px}}
