/* Crafting Modal Styles - Forgeworks (4:3) */

:root {
    --craft-ink: #0b0f16;
    --craft-slate: #121826;
    --craft-panel: #151f2e;
    --craft-panel-2: #111722;
    --craft-accent: #ffb454;
    --craft-accent-2: #ff6b3d;
    --craft-muted: #94a3b8;
    --craft-text: #e7edf5;
    --craft-border: rgba(255, 255, 255, 0.08);
    --craft-glow: rgba(255, 180, 84, 0.32);
    --craft-shadow: rgba(7, 10, 16, 0.7);
    --rarity-common: #a3b2c4;
    --rarity-uncommon: #60d394;
    --rarity-rare: #4f9cff;
    --rarity-epic: #b46cff;
    --rarity-legendary: #ffb454;
}

body.crafting-body {
    margin: 0;
    overflow: hidden;
    background: radial-gradient(circle at 20% 20%, #1b2230 0%, #0b0f16 60%, #080b11 100%);
    color: var(--craft-text);
    -webkit-font-smoothing: antialiased;
    font-family: 'Exo 2', 'Orbitron', sans-serif;
}

/* Scaled Crafting Page (4:3) */
#crafting-scaler {
    position: fixed;
    inset: 0;
    overflow: hidden;
}

#crafting-stage {
    width: 1440px;
    height: 1080px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
}

#crafting-page-mount {
    width: 100%;
    height: 100%;
}

#crafting-page-mount.crafting-embedded {
    height: 100%;
}

#crafting-page-mount.crafting-embedded .crafting-root {
    height: 100%;
}

#crafting-page-mount.crafting-embedded .crafting-shell {
    width: 100%;
    height: 100%;
    max-height: 100%;
    aspect-ratio: auto;
    border-radius: 18px;
}

.crafting-root {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crafting-shell {
    position: relative;
    width: min(1200px, 92vw);
    aspect-ratio: 4 / 3;
    max-height: 90vh;
    background: linear-gradient(160deg, rgba(19, 28, 42, 0.98) 0%, rgba(12, 16, 25, 0.98) 100%);
    border-radius: 24px;
    border: 1px solid var(--craft-border);
    box-shadow: 0 30px 80px var(--craft-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.crafting-shell-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 10%, rgba(255, 180, 84, 0.18), transparent 55%),
        radial-gradient(circle at 90% 30%, rgba(255, 107, 61, 0.12), transparent 60%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0) 55%);
    pointer-events: none;
    z-index: 0;
}

.crafting-header {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(90deg, rgba(12, 16, 25, 0.92), rgba(21, 31, 46, 0.92));
}

.crafting-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.crafting-title {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    letter-spacing: 1px;
    color: #ffd8a6;
    text-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.crafting-subtitle {
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
}

.crafting-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.crafting-close {
    background: linear-gradient(140deg, rgba(255, 107, 61, 0.8), rgba(255, 180, 84, 0.8));
    border: none;
    color: #1a1110;
    font-weight: 700;
    border-radius: 12px;
    padding: 10px 18px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 24px rgba(255, 107, 61, 0.3);
}

.crafting-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 107, 61, 0.45);
}

.resource-bar {
    display: flex;
    gap: 8px;
}

.res-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 14, 22, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.8);
}

.res-pill .res-val {
    font-weight: 700;
    color: #ffd8a6;
}

.crafting-body {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 1fr;
    gap: 10px;
    padding: 12px 12px 14px;
    flex: 1;
    min-height: 0;
}

.crafting-panel {
    background: linear-gradient(180deg, rgba(20, 27, 40, 0.95), rgba(10, 14, 22, 0.95));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.panel-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.panel-kicker {
    font-size: 11px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.panel-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    color: #ffe2bf;
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.input-chip,
.select-chip {
    background: #0f1622;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select-chip {
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    padding-right: 28px;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(255, 216, 166, 0.85) 50%),
        linear-gradient(135deg, rgba(255, 216, 166, 0.85) 50%, transparent 50%);
    background-position:
        calc(100% - 14px) calc(50% - 2px),
        calc(100% - 9px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.input-chip:hover,
.select-chip:hover {
    border-color: rgba(255, 180, 84, 0.45);
    color: #ffd8a6;
    background-color: #121b2a;
}

.select-chip option {
    background: #101725;
    color: #e7edf5;
}

.panel-actions .input-chip,
.panel-actions .select-chip {
    min-height: 34px;
}

.filter-check-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0f1622;
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.filter-check-chip:hover {
    border-color: rgba(255, 180, 84, 0.45);
    color: #ffd8a6;
    background-color: #121b2a;
}

.filter-check-chip input[type="checkbox"] {
    width: 15px;
    height: 15px;
    margin: 0;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(8, 12, 18, 0.95);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.5);
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
}

.filter-check-chip input[type="checkbox"]:hover {
    border-color: rgba(255, 180, 84, 0.66);
}

.filter-check-chip input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 180, 84, 0.26);
}

.filter-check-chip input[type="checkbox"]:checked {
    border-color: rgba(255, 180, 84, 0.9);
    background-color: rgba(255, 180, 84, 0.88);
    background-image: linear-gradient(-45deg, transparent 52%, #131921 52%), linear-gradient(45deg, transparent 41%, #131921 41%), linear-gradient(90deg, #131921 0%, #131921 100%);
    background-size: 7px 7px, 7px 7px, 1.8px 8px;
    background-position: 1px 7px, 6px 7px, 6px 3px;
    background-repeat: no-repeat;
}

.filter-check-chip input[type="checkbox"]:checked:hover {
    box-shadow: 0 0 0 2px rgba(255, 180, 84, 0.2);
    transform: translateY(-1px);
}

.input-chip:focus,
.select-chip:focus {
    border-color: rgba(255, 180, 84, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 180, 84, 0.2);
}

.density-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.density-toggle:hover {
    border-color: rgba(255, 180, 84, 0.5);
    color: #ffd8a6;
}

.recipe-filter-chip {
    min-width: 160px;
}

.panel-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding-right: 2px;
}

.character-inventory-section {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.character-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.character-chip {
    background: rgba(10, 14, 22, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.character-chip.active,
.character-chip:hover {
    border-color: rgba(255, 180, 84, 0.5);
    color: #ffd8a6;
}

.character-inventory-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.char-slot {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #0a0e14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-user-select: none;
    user-select: none;
}

.char-slot .slot-art {
    width: 100%;
    height: 100%;
    background: #0b1018;
    border-radius: 4px;
    overflow: hidden;
}

.char-slot .qty {
    position: absolute;
    right: 4px;
    bottom: 4px;
    font-size: 10px;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.crafting-inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 64px);
    gap: 6px;
    align-content: start;
    min-height: 100%;
}

.crafting-shell.density-compact .crafting-inventory-grid {
    grid-template-columns: repeat(auto-fill, 56px);
    gap: 5px;
}

.slot {
    position: relative;
    width: 64px;
    height: 64px;
    background: #0a0e14;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    padding: 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8);
    -webkit-user-select: none;
    user-select: none;
}

.crafting-shell.density-compact .slot {
    width: 56px;
    height: 56px;
    aspect-ratio: 1 / 1;
}

.crafting-shell.density-compact .slot .qty { font-size: 9px; }

.slot:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 180, 84, 0.35);
}

.slot-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b1018;
    border-radius: 4px;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slot-art img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.4));
}

.slot .qty {
    position: absolute;
    right: 4px;
    bottom: 4px;
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    font-size: 10px;
    color: #fff;
    z-index: 2;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

/* Image-only inventory tiles */

.recipes-panel {
    overflow: hidden;
}

.recipes-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    overflow: auto;
    padding-right: 2px;
}

.recipe-card {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(13, 18, 28, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.recipe-card:hover,
.recipe-card.active {
    border-color: rgba(255, 180, 84, 0.6);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
}

.recipe-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(9, 12, 18, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-icon img {
    width: 40px;
    height: 40px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.recipe-name {
    font-weight: 600;
    font-size: 13px;
    color: #fef7ec;
}

.recipe-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.recipe-tag {
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.detail-panel { overflow: hidden; }

.detail-scroll {
    overflow: auto;
    padding-right: 2px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recipe-head {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recipe-title {
    font-family: 'Cinzel', serif;
    font-size: 22px;
    color: #ffe7c8;
}

.recipe-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
}

.recipe-io {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.io-section { display: flex; flex-direction: column; gap: 8px; }

.io-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 6px;
}

.io-divider {
    align-self: center;
    font-family: 'Cinzel', serif;
    font-size: 12px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    padding: 6px 12px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 999px;
}

.group-title {
    font-size: 11px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 8px;
}

.io-card {
    background: rgba(13, 18, 28, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    position: relative;
    text-align: center;
    aspect-ratio: 1 / 1;
    min-width: 0;
}

.io-card.ok {
    border-color: rgba(96, 211, 148, 0.5);
    box-shadow: 0 0 12px rgba(96, 211, 148, 0.2);
}

.io-card.missing { border-color: rgba(255, 107, 61, 0.35); }

.io-art {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(9, 12, 18, 0.7);
    border-radius: 10px;
}

.io-art img {
    width: 48px;
    height: 48px;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

.io-name {
    font-size: 11px;
    font-weight: 600;
    color: #f8f4ef;
}

.io-sub {
    font-size: 9px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.io-qty {
    font-size: 11px;
    font-weight: 700;
    color: #ffd8a6;
}

.io-meter {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 8px;
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    overflow: hidden;
}

.io-meter span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #60d394, #ffd8a6);
}

.io-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
}

.stat-pill {
    background: rgba(255, 180, 84, 0.1);
    color: #ffd8a6;
    border: 1px solid rgba(255, 180, 84, 0.25);
    border-radius: 999px;
    font-size: 9px;
    padding: 2px 6px;
}

.craft-action {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.craft-btn {
    background: linear-gradient(135deg, #ffb454, #ff6b3d);
    border: none;
    color: #1a0f0a;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    padding: 14px 18px;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(255, 107, 61, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.craft-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(255, 107, 61, 0.45);
}

.craft-btn:disabled {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
    cursor: not-allowed;
}

.craft-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.crafting-celebrate {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
}

.crafting-shell.celebrate .crafting-celebrate {
    animation: celebrateFade 1.2s ease;
}

.celebrate-ring {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 2px solid rgba(255, 180, 84, 0.5);
    box-shadow: 0 0 40px rgba(255, 180, 84, 0.35);
    position: absolute;
    animation: ringPulse 1.2s ease;
}

.celebrate-spark {
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(255, 180, 84, 0.9), transparent 60%);
    filter: blur(2px);
    animation: sparkBurst 1.2s ease;
}

@keyframes ringPulse {
    0% { transform: scale(0.3); opacity: 0; }
    40% { opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

@keyframes sparkBurst {
    0% { transform: scale(0.4); opacity: 0; }
    45% { opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

@keyframes celebrateFade {
    0% { opacity: 0; }
    20% { opacity: 1; }
    100% { opacity: 0; }
}

.craft-tooltip {
    position: fixed;
    z-index: 20000;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.craft-tooltip.hidden {
    opacity: 0;
}

.tt-wrap {
    background: rgba(9, 12, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 12px;
    min-width: 200px;
    color: #f7f2ea;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
}

.tt-name {
    font-weight: 700;
    margin-bottom: 4px;
}

.tt-rarity {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.tt-desc {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
}

.tt-stats {
    display: grid;
    gap: 4px;
}

.tt-stat {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.tt-equip {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.tt-equip-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.58);
    margin-bottom: 6px;
}

.tt-slot-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tt-slot-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 180, 84, 0.14);
    color: #ffe1bc;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 8px;
}

.craft-context-menu {
    position: fixed;
    z-index: 21000;
    background: rgba(10, 12, 18, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 6px;
    min-width: 140px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.context-menu-item {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.context-menu-item:hover {
    background: rgba(255, 107, 61, 0.2);
    color: #ffd8a6;
}

.toast-host {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 25000;
}

.toast {
    background: rgba(10, 12, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #f4f1ea;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.35);
}

.toast.success { border-color: rgba(96, 211, 148, 0.5); }
.toast.error { border-color: rgba(255, 107, 61, 0.6); }

.no-items-message {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    padding: 16px;
}

.rarity-common { border-color: rgba(163, 178, 196, 0.5); }
.rarity-uncommon { border-color: rgba(96, 211, 148, 0.6); }
.rarity-rare { border-color: rgba(79, 156, 255, 0.6); }
.rarity-epic { border-color: rgba(180, 108, 255, 0.6); }
.rarity-legendary { border-color: rgba(255, 180, 84, 0.7); }

.rarity-common .slot-art { box-shadow: inset 0 0 0 1px rgba(163, 178, 196, 0.2); }
.rarity-uncommon .slot-art { box-shadow: inset 0 0 0 1px rgba(96, 211, 148, 0.25); }
.rarity-rare .slot-art { box-shadow: inset 0 0 0 1px rgba(79, 156, 255, 0.25); }
.rarity-epic .slot-art { box-shadow: inset 0 0 0 1px rgba(180, 108, 255, 0.25); }
.rarity-legendary .slot-art { box-shadow: inset 0 0 0 1px rgba(255, 180, 84, 0.3); }

.tt-wrap.rarity-common { border-color: rgba(163, 178, 196, 0.5); }
.tt-wrap.rarity-uncommon { border-color: rgba(96, 211, 148, 0.6); }
.tt-wrap.rarity-rare { border-color: rgba(79, 156, 255, 0.6); }
.tt-wrap.rarity-epic { border-color: rgba(180, 108, 255, 0.6); }
.tt-wrap.rarity-legendary { border-color: rgba(255, 180, 84, 0.7); }

.crafting-shell.density-compact .slot-label { font-size: 11px; }
.crafting-shell.density-compact .slot-meta { font-size: 10px; }

@media (max-width: 1100px) {
    .crafting-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        height: auto;
    }
    .crafting-shell { aspect-ratio: auto; height: auto; }
    .io-grid { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
}
