/* =====================================================================
   Р“Р°СЂРґРµСЂРѕР±
   ===================================================================== */

.wd-layout { display: grid !important; grid-template-columns: minmax(300px, 400px) 1fr; gap: 18px; align-items: stretch; grid-template-rows: minmax(0, 1fr); padding-bottom: 18px !important; }
.wd-stage { display: flex; flex-direction: column; gap: 10px; padding: 12px; min-height: 0; overflow: hidden; }
.wd-stage-head { display: flex; align-items: center; gap: 6px; }
.wd-canvas-wrap { position: relative; flex: 1; min-height: 240px; border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.1), transparent), #0b0c18; border: 1px solid var(--line); cursor: crosshair; }
.wd-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wd-stage-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wd-presets { min-height: 0; }
.wd-presets .section-title { margin: 6px 0; }
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; min-height: 54px; align-items: center; }
.preset { position: relative; width: 54px; height: 54px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); display: grid; place-items: center; transition: all 0.25s var(--spring); padding: 0; }
.preset:hover { transform: translateY(-3px) scale(1.06); border-color: var(--accent); }
.preset .avatar-static { width: 46px; height: 46px; }
.preset-x { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: var(--bad); color: #fff; display: none; place-items: center; }
.preset:hover .preset-x { display: grid; }

.wd-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: 10px; }
.wd-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 8px; flex: none; scrollbar-width: thin; }
.wd-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font-weight: 700; font-size: 0.88rem; transition: all 0.25s var(--ease); white-space: nowrap; }
.wd-tab small { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.wd-tab:hover { color: var(--text); transform: translateY(-1px); }
.wd-tab.active { background: linear-gradient(120deg, rgba(var(--accent-rgb), 0.35), rgba(var(--accent-2-rgb), 0.18)); border-color: rgba(var(--accent-rgb), 0.8); color: var(--text); box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.25); }
.wd-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: none; }
.wd-toolbar:empty { display: none; }
select.sort-select { width: auto; height: 34px; min-width: 150px; }
.wd-content { flex: 1; min-height: 0; overflow: auto; padding: 4px 4px 20px; margin: 0 -4px; }

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 12px; }
.item-card { --rc: #9ca3af; position: relative; display: grid; gap: 6px; padding: 8px 8px 10px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--rc) 30%, var(--line)); background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 10%, var(--surface)), var(--surface)); text-align: center; overflow: hidden; transition: transform 0.3s var(--ease), border-color 0.25s, box-shadow 0.3s; }
.item-card:hover { transform: translateY(-4px) scale(1.03); border-color: var(--rc); box-shadow: 0 12px 30px color-mix(in srgb, var(--rc) 30%, transparent); }
.item-card:active { transform: scale(0.97); }
.item-card.equipped { border-color: var(--good); box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35), 0 10px 28px rgba(52, 211, 153, 0.18); }
.item-card.focus:not(.equipped) { border-color: var(--rc); box-shadow: 0 0 0 2px color-mix(in srgb, var(--rc) 55%, transparent); }
.item-thumb { width: 100%; aspect-ratio: 1; border-radius: 12px; background: rgba(255, 255, 255, 0.03); display: block; }
.item-card.locked .item-thumb { filter: saturate(0.55) brightness(0.85); }
.item-name { font-weight: 800; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 0.72rem; }
.item-state { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-weight: 700; }
.item-state.on { color: var(--good); }
.item-price { display: inline-flex; align-items: center; gap: 3px; color: var(--gem); font-weight: 800; }
.item-rarity { color: var(--rc); font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.64rem; }
.item-lock { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 8px; background: rgba(6, 7, 16, 0.72); display: grid; place-items: center; color: var(--text-2); }
.item-shine { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.28) 50%, transparent 65%); background-size: 250% 100%; }
.item-card.r-legendary .item-shine, .item-card.r-mythic .item-shine { opacity: 1; animation: shine 3.6s linear infinite; }
.item-card.r-mythic { background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 22%, var(--surface)), var(--surface)); }
@keyframes shine { from { background-position: 200% 0; } to { background-position: -100% 0; } }

.wd-buybar { position: sticky; bottom: 0; display: none; align-items: center; gap: 14px; padding: 12px 16px; border-color: color-mix(in srgb, var(--rc, var(--accent)) 60%, transparent); flex: none; }
.wd-buybar.show { display: flex; }
.bb-name { font-weight: 800; font-size: 1.05rem; }
.bb-sub { font-size: 0.8rem; color: var(--muted); }
.bb-need { color: var(--warn); font-weight: 700; font-size: 0.85rem; }

.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.color-block { padding: 16px; display: grid; gap: 14px; align-content: start; }
.color-head { display: flex; align-items: center; gap: 10px; }
.color-chip { width: 28px; height: 28px; border-radius: 9px; border: 2px solid rgba(255, 255, 255, 0.4); }
.hex-input { width: 100px; height: 34px; text-transform: uppercase; }
.swatches { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.swatch { aspect-ratio: 1; border-radius: 9px; border: 2px solid rgba(255, 255, 255, 0.15); transition: transform 0.2s var(--spring), border-color 0.2s; }
.swatch:hover { transform: scale(1.2); z-index: 1; }
.swatch.active { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.4); }
.hsl-block { display: grid; gap: 10px; }
.hsl-block.disabled { opacity: 0.35; pointer-events: none; filter: grayscale(0.6); }
.hsl-range { -webkit-appearance: none; appearance: none; height: 12px; border-radius: 12px; outline: none; }
.hsl-range::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid rgba(0, 0, 0, 0.5); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
.color-lock { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: rgba(45, 212, 191, 0.1); border: 1px dashed rgba(45, 212, 191, 0.5); }
.color-lock .ic { color: var(--gem); }
.color-lock > div { flex: 1; }
.color-note { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: var(--text-2); grid-column: 1 / -1; }

.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.oset-card { position: relative; display: grid; gap: 8px; justify-items: center; padding: 14px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; transition: all 0.35s var(--ease); text-align: center; }
.oset-card:hover { transform: translateY(-5px); border-color: rgba(var(--accent-rgb), 0.6); box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35); }
.set-glow { position: absolute; top: -20px; width: 240px; height: 240px; opacity: 0.7; }
.set-canvas { position: relative; width: 170px; height: 170px; }
.set-name { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.set-meta { position: relative; font-size: 0.8rem; }
.oset-card .row { position: relative; }

@media (max-width: 900px) {
    .wd-layout { grid-template-columns: 1fr; grid-template-rows: 300px 1fr; overflow: hidden; }
    .wd-canvas-wrap { min-height: 150px; }
    .wd-presets { display: none; }
    .swatches { grid-template-columns: repeat(6, 1fr); }
}


