.forge-dialog{padding:0;width:min(570px,calc(100% - 20px));max-height:calc(100dvh - 32px);border:3px solid #aeb9df;border-radius:13px;background:linear-gradient(120deg,#626580,#494e6a);color:#fff;box-shadow:0 0 0 2px #363d59,0 18px 60px #071222b3;overflow:hidden}
.forge-dialog[open]{display:flex;flex-direction:column}.forge-dialog::backdrop{background:#111827a8;backdrop-filter:blur(2px)}
.forge-dialog .heroes-window-header{flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 12px;min-height:58px}.forge-dialog h2{font:800 21px Inter,Arial,sans-serif;margin:0;text-shadow:0 2px #303b60}.forge-dialog header>span{font-size:25px;color:#d8e7ff}
.forge-content{padding:10px 16px 12px;overflow:auto;scrollbar-width:thin;min-height:0}#forge-rule{text-align:center;margin:0 0 10px;color:#d5ddf3;font-size:12px;font-weight:700}
.forge-result{display:flex;align-items:center;flex-direction:column;gap:3px}.forge-result strong{font-size:15px}.forge-result>span{font-size:11px;color:#ffdf7b}.forge-result>small{color:#9dffc1;font-size:12px}.forge-result .forge-item{width:76px;height:76px}
.forge-quantity{display:flex;justify-content:center;align-items:end;gap:9px;margin:12px 0}.forge-quantity>button{min-width:36px;height:36px;background:linear-gradient(#7a8cab,#3c4568);border:2px solid #b2c5e5;border-radius:8px;color:white;font-size:24px}.forge-quantity #forge-max{font-size:11px;padding:0 8px}.forge-quantity label{font-size:9px;text-align:center;color:#dce3f9}.forge-quantity input{display:block;width:80px;height:36px;border:1px solid #aebcdf;border-radius:4px;background:#31394f;color:white;font:700 19px Inter,Arial,sans-serif;text-align:center}
.forge-recipe{display:grid;grid-template-columns:60px 1fr minmax(96px,140px);align-items:center;gap:10px;padding:9px 12px;background:#30364f66;border:1px solid #acb4d25c;border-radius:8px}.forge-cost{display:flex;flex-direction:column;gap:5px;min-width:0}.forge-cost>span{font-size:11px}.forge-cost>strong{font-size:12px;color:#b8f5d3}.forge-cost>small{font-size:10px;color:#d7e6ff}.forge-recipe .hero-gold-button{padding:10px 5px;font-size:13px;min-height:45px;min-width:0;justify-content:center;width:100%}#forge-status{font-size:11px;line-height:1.5;color:#e9efff;min-height:17px;margin:9px 0}
.forge-filter{display:flex;align-items:center;gap:9px;margin:10px 0;font-size:11px}.forge-filter select{min-width:0;max-width:185px;flex:1;background:#353c58;border:1px solid #a0aecb;color:#fff;padding:7px;border-radius:4px}.forge-filter .text-button{font-size:10px;margin-left:auto;color:#f6e1a5;padding:5px}
.forge-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;padding:13px;border:2px solid #8994b5;border-radius:7px;background:#393e59;align-content:start}.forge-item{display:block;position:relative;aspect-ratio:1;width:100%;padding:5px;border:2px solid #74d68e;border-radius:3px;background:radial-gradient(ellipse at 50% 70%,#365342,#18212d);color:white;box-shadow:inset 0 0 8px #02061b88}.forge-item img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 3px 2px #0008)}.forge-stars{position:absolute;bottom:0;left:2px;font-size:12px;letter-spacing:-2px;color:#ffe675;text-shadow:0 1px 2px #211913}.forge-rank{position:absolute;top:0;right:3px;font-size:10px;font-weight:800;text-shadow:0 1px 2px #000}.forge-item[data-ready=true]:before{content:'';position:absolute;top:-5px;right:-5px;width:10px;height:10px;border:1px solid #e0ffbc;border-radius:50%;background:#67e252;box-shadow:0 0 6px #7dff49;z-index:1}.forge-item[aria-pressed=true]{outline:3px solid #ffea9b;outline-offset:3px}.forge-item[data-ready=false]{filter:saturate(.62)}
.forge-item.rare,.bag-item.rare{border-color:#55bdff}.forge-item.epic,.bag-item.epic{border-color:#be7aff}.forge-item.legendary,.bag-item.legendary{border-color:#ffce51;background:radial-gradient(#785924,#231c19)}.forge-item.ancient,.bag-item.ancient{border-color:#ff903f;background:radial-gradient(#793c24,#271b20)}.forge-item.mystic,.bag-item.mystic{border-color:#ff487d;background:radial-gradient(#663b59,#231929)}
.forge-help{font-size:10px;color:#c3cce7;line-height:1.5;margin:9px 1px}.forge-guide{font-size:11px;line-height:1.65;color:#d7ddf1}.forge-guide summary{cursor:pointer;color:#f6d78e}.forge-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));flex:none;border-top:2px solid #8799c1;padding:0 5px 5px;gap:3px;background:#3a405c}.forge-tabs button{min-height:43px;border:1px solid #7882ac;border-radius:0 0 8px 8px;background:linear-gradient(#505d8b,#363d5e);color:#fff;font:700 12px Inter,Arial,sans-serif}.forge-tabs [aria-selected=true]{background:linear-gradient(#849ad5,#6b76b8);box-shadow:inset 0 -3px #9ac4ff}
.forge-dialog button{cursor:pointer}.forge-dialog button:disabled{opacity:.45;cursor:default;filter:grayscale(.6)}.forge-dialog :focus-visible{outline:3px solid #ffe79a;outline-offset:2px}
@media(max-width:420px){.forge-dialog{max-height:calc(100dvh - 16px)}.forge-dialog .heroes-window-header{min-height:48px;padding:5px 9px}.forge-dialog h2{font-size:17px}.forge-content{padding:9px}.forge-result .forge-item{width:62px;height:62px}.forge-grid{gap:9px;padding:10px}.forge-recipe{grid-template-columns:48px 1fr 88px;padding:7px;gap:7px}.forge-cost>span{font-size:10px}.forge-quantity{margin:9px 0}.forge-filter{gap:6px}.forge-filter>label{display:none}.forge-stars{font-size:10px}.forge-tabs button{font-size:11px}#forge-rule{font-size:10px}}
@media(prefers-reduced-motion:no-preference){.forge-item{transition:filter .15s,outline-color .15s}.forge-item:hover{filter:brightness(1.2)}.forge-result.is-crafted{animation:forge-created .45s ease-out}@keyframes forge-created{50%{filter:brightness(1.5);transform:translateY(-3px)}}}

.forge-item.rare{background:radial-gradient(#3c537b,#152134)}.forge-item.epic{background:radial-gradient(#5b467a,#241c35)}
.forge-payment{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}.forge-payment>strong{font-size:12px;color:#ffe190}.forge-payment>strong:before{content:'●';color:#ffcf48;margin-right:4px}.forge-payment>strong.insufficient{color:#ffb8b0}#forge-gold-balance{text-align:center;font-size:10px;color:#e6d8b5;margin:7px 0}.forge-item{padding:0;overflow:visible}.forge-item img{border-radius:1px;filter:none}.forge-item[data-ready=false]{filter:none}
