:root{--vault:#8b5cf6;--vault2:#22d3ee;--panel:rgba(16,22,40,.92);--line:rgba(148,163,184,.18);--muted:#93a4c7}.build-library-page,.character-profile-page{padding:22px;display:grid;gap:20px}.library-hero,.profile-hero{position:relative;overflow:hidden;border:1px solid rgba(139,92,246,.35);border-radius:22px;background:radial-gradient(circle at 10% 0%,rgba(139,92,246,.24),transparent 38%),linear-gradient(135deg,rgba(15,23,42,.96),rgba(8,13,27,.96));box-shadow:0 20px 55px rgba(0,0,0,.28);padding:28px}.library-hero{display:flex;justify-content:space-between;gap:20px;align-items:center}.eyebrow,.profile-panel header span,.section-heading span{font-size:11px;letter-spacing:.18em;color:#a78bfa;font-weight:800}.library-hero h1,.profile-identity h1{margin:5px 0 8px;font-size:clamp(28px,4vw,46px)}.library-hero p{max-width:760px;color:#aab7d1;line-height:1.65}.ghost-button,.primary-button,.library-filters button{display:inline-flex;align-items:center;gap:8px;border-radius:12px;padding:11px 15px;text-decoration:none;border:1px solid rgba(167,139,250,.35);background:rgba(139,92,246,.12);color:#e9e4ff;font-weight:700}.library-alert{padding:12px 15px;border-radius:12px;border:1px solid}.library-alert.success{background:rgba(16,185,129,.1);border-color:rgba(16,185,129,.35);color:#6ee7b7}.library-alert.error{background:rgba(244,63,94,.1);border-color:rgba(244,63,94,.35);color:#fda4af}.library-layout{display:grid;grid-template-columns:minmax(300px,390px) minmax(0,1fr);gap:20px;align-items:start}.library-editor,.library-content,.profile-panel{border:1px solid var(--line);border-radius:18px;background:var(--panel);box-shadow:0 14px 36px rgba(0,0,0,.22)}.library-editor{padding:18px;position:sticky;top:18px}.section-heading,.profile-panel>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.section-heading h2,.profile-panel h2{margin:2px 0 0;font-size:20px}.section-heading a,.profile-panel header a{color:#a78bfa;text-decoration:none}.build-form{display:grid;gap:13px}.build-form label{display:grid;gap:7px;color:#aab7d1;font-size:12px;font-weight:800}.build-form input,.build-form select,.build-form textarea,.library-filters input,.library-filters select{width:100%;box-sizing:border-box;border:1px solid rgba(148,163,184,.22);border-radius:11px;background:rgba(2,6,23,.62);color:#edf2ff;padding:10px 11px;font:inherit;resize:vertical}.build-form textarea:focus,.build-form input:focus,.build-form select:focus{outline:none;border-color:#8b5cf6;box-shadow:0 0 0 3px rgba(139,92,246,.12)}.form-grid.two{display:grid;grid-template-columns:1fr 1fr;gap:10px}.check-row{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center}.check-row input{width:auto}.primary-button{justify-content:center;border:0;background:linear-gradient(135deg,#7c3aed,#4f46e5);cursor:pointer}.library-content{padding:18px;min-width:0}.library-filters{display:grid;grid-template-columns:minmax(180px,1fr) 160px 150px auto auto;gap:9px;align-items:center}.library-filters a{color:#93a4c7;text-decoration:none;text-align:center}.library-summary{margin:15px 0;color:#93a4c7}.build-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}.build-card{display:grid;gap:11px;padding:16px;border-radius:16px;border:1px solid rgba(148,163,184,.16);background:linear-gradient(145deg,rgba(20,27,49,.95),rgba(8,13,27,.95));min-width:0}.build-card.featured{border-color:rgba(245,200,76,.48);box-shadow:inset 0 0 30px rgba(245,200,76,.05)}.build-card header,.build-card footer,.build-title-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.build-card h3{margin:0;font-size:19px}.class-chip,.spec-chip,.character-badge{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:800;text-decoration:none}.class-chip{background:rgba(139,92,246,.15);color:#c4b5fd}.spec-chip{background:rgba(34,211,238,.1);color:#67e8f9}.character-badge{width:max-content;background:rgba(255,255,255,.06);color:#dbeafe}.character-badge.muted{color:#94a3b8}.featured-star{color:#f5c84c}.build-notes{color:#aab7d1;line-height:1.5;font-size:13px;margin:0;max-height:110px;overflow:auto}.string-actions{display:flex;flex-wrap:wrap;gap:8px}.string-actions button{border:1px solid rgba(139,92,246,.3);border-radius:10px;background:rgba(139,92,246,.1);color:#ddd6fe;padding:8px 10px;cursor:pointer;font-weight:700}.string-actions .gse-copy{border-color:rgba(34,211,238,.3);background:rgba(34,211,238,.08);color:#a5f3fc}.build-card footer{border-top:1px solid var(--line);padding-top:10px}.build-card footer small{color:#64748b}.build-card footer div{display:flex;gap:9px}.build-card footer form{margin:0}.build-card footer a,.build-card footer button{border:0;background:none;color:#a78bfa;padding:0;font:inherit;cursor:pointer;text-decoration:none}.empty-library,.profile-empty{grid-column:1/-1;text-align:center;padding:36px;color:#8391ad}.empty-library i{font-size:34px;color:#8b5cf6}.copy-toast{position:fixed;right:22px;bottom:22px;z-index:9999;padding:11px 15px;border-radius:12px;background:#111827;color:#e9d5ff;border:1px solid #7c3aed;box-shadow:0 12px 36px rgba(0,0,0,.4)}.profile-hero{display:grid;grid-template-columns:auto auto 1fr auto;align-items:center;gap:20px}.profile-back{color:#a78bfa;text-decoration:none;align-self:start}.profile-avatar{width:112px;height:112px;border-radius:50%;padding:4px;background:linear-gradient(135deg,#8b5cf6,#22d3ee)}.profile-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;background:#0f172a}.profile-identity span,.profile-identity p{color:#9fb0ce}.profile-power{text-align:center;padding:14px 20px;border-left:1px solid var(--line)}.profile-power strong{display:block;font-size:38px;color:#f5c84c}.profile-power span{font-size:10px;letter-spacing:.16em;color:#94a3b8}.profile-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.profile-kpis>div{padding:14px;border:1px solid var(--line);border-radius:14px;background:rgba(15,23,42,.8)}.profile-kpis span{display:block;color:#7f8fac;font-size:11px;text-transform:uppercase;letter-spacing:.08em}.profile-kpis strong{display:block;margin-top:5px}.profile-grid{display:grid;grid-template-columns:1.25fr .9fr;gap:18px}.profile-panel{padding:18px}.profile-builds{grid-row:span 2}.profile-build-list{display:grid;gap:12px}.profile-build-card{padding:14px;border:1px solid var(--line);border-radius:13px;background:rgba(2,6,23,.35)}.profile-build-card.assigned{border-color:rgba(139,92,246,.42)}.build-title-row small{display:block;color:#8594ae;margin-top:3px}.build-title-row>span{font-size:10px;color:#c4b5fd;border:1px solid rgba(139,92,246,.3);padding:4px 7px;border-radius:999px}.profile-build-card p{color:#9eacc5;font-size:13px}.gear-list{display:grid;gap:8px}.gear-row{display:grid;grid-template-columns:72px 1fr auto;align-items:center;gap:10px;padding:9px;border-radius:10px;background:rgba(2,6,23,.38)}.gear-row>span{color:#72809c;font-size:10px}.gear-row strong,.gear-row small{display:block}.gear-row small{color:#8190aa;margin-top:3px}.gear-row>b{color:#f5c84c}.weight-list,.currency-list{display:grid;gap:8px}.weight-list>div,.currency-list>div{display:flex;justify-content:space-between;padding:9px 10px;background:rgba(2,6,23,.38);border-radius:10px}.weight-list span,.currency-list span{color:#93a4c7}.weight-list strong{color:#a78bfa}.currency-list strong{color:#f5c84c}.class-profile-mage .profile-hero{border-color:rgba(63,199,235,.4)}.class-profile-priest .profile-hero{border-color:rgba(255,255,255,.3)}.class-profile-warlock .profile-hero{border-color:rgba(135,136,238,.4)}.character-profile-link{color:inherit;text-decoration:none;border-bottom:1px dashed currentColor}.character-profile-link:hover{filter:brightness(1.25)}
@media(max-width:1000px){.library-layout,.profile-grid{grid-template-columns:1fr}.library-editor{position:static}.library-filters{grid-template-columns:1fr 1fr}.profile-kpis{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.build-library-page,.character-profile-page{padding:12px}.library-hero{align-items:flex-start;flex-direction:column}.form-grid.two,.library-filters{grid-template-columns:1fr}.profile-hero{grid-template-columns:1fr;text-align:center}.profile-back{justify-self:start}.profile-avatar{justify-self:center}.profile-power{border-left:0;border-top:1px solid var(--line)}.profile-kpis{grid-template-columns:1fr}.gear-row{grid-template-columns:58px 1fr auto}}

.character-vault{border:1px solid rgba(139,92,246,.28);border-radius:18px;background:linear-gradient(145deg,rgba(16,22,40,.94),rgba(8,13,27,.94));padding:18px;box-shadow:0 14px 36px rgba(0,0,0,.22)}.character-vault-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:15px}.character-vault-head h2{margin:3px 0 5px;font-size:22px}.character-vault-head p{margin:0;color:#93a4c7}.character-vault-head>strong{color:#c4b5fd;white-space:nowrap}.character-profile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(235px,1fr));gap:11px}.character-profile-card{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:11px;padding:12px;border:1px solid rgba(148,163,184,.16);border-radius:14px;background:rgba(2,6,23,.42);color:#e5e7eb;text-decoration:none;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.character-profile-card:hover{transform:translateY(-2px);border-color:var(--character-color);box-shadow:0 9px 26px color-mix(in srgb,var(--character-color) 18%,transparent)}.character-profile-avatar{width:46px;height:46px;border-radius:50%;padding:2px;background:var(--character-color)}.character-profile-avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover;background:#0f172a}.character-profile-copy{min-width:0}.character-profile-copy strong,.character-profile-copy small,.character-profile-copy em{display:block}.character-profile-copy strong{color:var(--character-color);font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.character-profile-copy small{margin-top:2px;color:#aab7d1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.character-profile-copy em{margin-top:4px;color:#71809d;font-size:10px;font-style:normal}.character-profile-build-count{display:grid;place-items:center;min-width:42px;padding:7px;border-radius:10px;background:rgba(139,92,246,.1);color:#c4b5fd;font-weight:900}.character-profile-build-count small{display:block;font-size:9px;color:#8f9db8;font-weight:700}.library-filters{grid-template-columns:minmax(180px,1fr) 150px 130px 170px auto auto}@media(max-width:1100px){.library-filters{grid-template-columns:1fr 1fr 1fr}}@media(max-width:650px){.character-vault-head{align-items:flex-start;flex-direction:column}.character-profile-grid{grid-template-columns:1fr}.library-filters{grid-template-columns:1fr}}

/* Build Library v1.2 flow refinements */
.library-hero-actions{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
}
.library-hero-actions .primary-button{
    text-decoration:none;
    padding:11px 15px;
    border-radius:12px;
    color:#fff;
}
#build-editor{
    scroll-margin-top:18px;
}
.build-form small{
    color:#7f8fac;
    font-size:11px;
    line-height:1.45;
    font-weight:600;
}
.form-grid.is-character-locked{
    position:relative;
    padding:10px;
    border:1px solid rgba(139,92,246,.26);
    border-radius:13px;
    background:rgba(139,92,246,.06);
}
.form-grid.is-character-locked select:disabled{
    opacity:.82;
    cursor:not-allowed;
    border-color:rgba(139,92,246,.28);
    background:rgba(15,23,42,.78);
    color:#ddd6fe;
}
.active-character-filter{
    display:grid;
    grid-template-columns:auto minmax(0,1fr) auto;
    align-items:center;
    gap:12px;
    margin:14px 0;
    padding:11px 13px;
    border:1px solid rgba(139,92,246,.28);
    border-radius:13px;
    background:rgba(139,92,246,.08);
}
.active-character-filter>i{
    color:#c4b5fd;
    font-size:20px;
}
.active-character-filter strong,
.active-character-filter span{
    display:block;
}
.active-character-filter span{
    margin-top:2px;
    color:#91a0bc;
    font-size:11px;
}
.active-character-filter a{
    color:#c4b5fd;
    text-decoration:none;
    font-weight:800;
    white-space:nowrap;
}
.missing-string-action,
.profile-build-edit{
    display:inline-flex;
    align-items:center;
    gap:6px;
    border:1px dashed rgba(148,163,184,.28);
    border-radius:10px;
    padding:8px 10px;
    color:#aab7d1;
    text-decoration:none;
    font-size:12px;
    font-weight:800;
}
.missing-string-action:hover,
.profile-build-edit:hover{
    border-color:#8b5cf6;
    color:#ddd6fe;
    background:rgba(139,92,246,.08);
}
.gse-missing{
    border-color:rgba(34,211,238,.28);
    color:#a5f3fc;
}
.profile-build-create{
    display:grid;
    gap:12px;
    margin-bottom:18px;
    padding:15px;
    border:1px solid rgba(139,92,246,.34);
    border-radius:15px;
    background:linear-gradient(145deg,rgba(139,92,246,.10),rgba(34,211,238,.045));
}
.profile-build-create-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}
.profile-build-create-head strong,
.profile-build-create-head small{
    display:block;
}
.profile-build-create-head strong{
    color:#f3f0ff;
    font-size:15px;
}
.profile-build-create-head small{
    margin-top:4px;
    color:#8fa0bd;
    font-size:11px;
}
.profile-build-create-head>span{
    display:inline-flex;
    align-items:center;
    gap:5px;
    padding:5px 8px;
    border-radius:999px;
    background:rgba(139,92,246,.14);
    color:#c4b5fd;
    font-size:10px;
    font-weight:800;
    white-space:nowrap;
}
.profile-build-create label{
    display:grid;
    gap:6px;
    color:#aab7d1;
    font-size:11px;
    font-weight:800;
}
.profile-build-create input,
.profile-build-create textarea{
    width:100%;
    box-sizing:border-box;
    border:1px solid rgba(148,163,184,.22);
    border-radius:11px;
    background:rgba(2,6,23,.64);
    color:#edf2ff;
    padding:10px 11px;
    font:inherit;
    resize:vertical;
}
.profile-build-create input:focus,
.profile-build-create textarea:focus{
    outline:none;
    border-color:#8b5cf6;
    box-shadow:0 0 0 3px rgba(139,92,246,.12);
}
.profile-build-create-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
.profile-build-create-actions .primary-button{
    border:0;
    cursor:pointer;
    padding:10px 14px;
    border-radius:11px;
}
.profile-build-card .string-actions{
    margin-top:10px;
}
.character-vault{
    margin-top:20px;
}

@media(max-width:900px){
    .library-hero-actions{
        justify-content:flex-start;
    }
    .active-character-filter{
        grid-template-columns:auto 1fr;
    }
    .active-character-filter a{
        grid-column:2;
    }
}
@media(max-width:650px){
    .library-hero-actions,
    .profile-build-create-actions,
    .profile-build-create-head{
        align-items:stretch;
        flex-direction:column;
    }
    .library-hero-actions a,
    .profile-build-create-actions button{
        justify-content:center;
        width:100%;
        box-sizing:border-box;
    }
}


/* v1.3 flow cleanup */
.oracle-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.oracle-stat{padding:12px;border:1px solid color-mix(in srgb,var(--stat-color) 35%,transparent);border-radius:12px;background:color-mix(in srgb,var(--stat-color) 9%,rgba(2,6,23,.72))}
.oracle-stat span,.oracle-stat strong{display:block}.oracle-stat span{color:#aab7d1;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.oracle-stat strong{margin-top:4px;color:var(--stat-color);font-size:21px}
.oracle-stat-strength{--stat-color:#ef5350}.oracle-stat-agility{--stat-color:#66bb6a}.oracle-stat-intellect{--stat-color:#42a5f5}.oracle-stat-crit{--stat-color:#ff6b6b}.oracle-stat-haste{--stat-color:#f6c453}.oracle-stat-mastery{--stat-color:#b388ff}.oracle-stat-versatility{--stat-color:#36d1c4}
.profile-filter-context{
    display:flex;
    align-items:center;
    gap:9px;
    margin:0 0 14px;
    padding:10px 12px;
    border:1px solid rgba(139,92,246,.22);
    border-radius:11px;
    background:rgba(139,92,246,.07);
    color:#aebbd4;
    font-size:12px;
}
.profile-filter-context i{color:#a78bfa}
.currency-note{
    margin:12px 0 0;
    padding:10px 12px;
    border-left:3px solid rgba(245,200,76,.55);
    border-radius:8px;
    background:rgba(245,200,76,.05);
    color:#9ba8c0;
    font-size:11px;
    line-height:1.5;
}
.profile-empty a{color:#a78bfa}

/* Compact library: browse first, edit on demand. Scoped to this page. */
.build-library-page [hidden]{display:none!important}
.build-library-page{max-width:1500px;margin:0 auto;gap:18px}
.build-library-page .library-hero{padding:20px 24px;border-radius:16px;background:#101827;box-shadow:none;border-color:var(--line)}
.build-library-page .library-hero h1{font-size:28px}
.build-library-page .library-hero p{margin:0;color:#9cabc2}
.build-library-page .library-layout{display:flex;flex-direction:column;gap:20px}
.build-library-page .library-editor{position:static;max-height:none}
.build-library-page #build-editor{width:100%;max-width:860px;box-sizing:border-box;align-self:center}
.library-tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);padding-bottom:10px}
.library-tabs button{border:1px solid transparent;background:transparent;color:#aebbd0;border-radius:9px;padding:11px 16px;cursor:pointer;font:inherit;font-weight:600}
.library-tabs button[aria-pressed=true]{background:#252841;color:#e0d8ff;border-color:#65549b}
.library-tabs span{margin-left:8px;font-size:12px;opacity:.75}
.build-library-page .library-filters{margin:0;gap:10px;padding:14px;background:#101827;border:1px solid var(--line);border-radius:12px}
.build-browser{display:grid;grid-template-columns:minmax(240px,340px) minmax(0,1fr);gap:18px;align-items:start}
.build-picker{display:grid;gap:6px;max-height:640px;overflow:auto;padding:2px}
.build-picker button{text-align:left;padding:15px;border:1px solid var(--line);border-radius:10px;background:#101827;color:#e2e8f0;cursor:pointer;min-width:0}
.build-picker button[aria-pressed=true]{border-color:#a78bfa;background:#22233b;box-shadow:inset 3px 0 #a78bfa}
.build-picker strong,.build-picker span,.build-picker small{display:block;overflow-wrap:anywhere}
.build-picker strong{font-size:14px;line-height:1.5}
.build-picker span{font-size:12px;color:#9cabc2;margin-top:5px}
.build-picker small{font-size:11px;color:#bba9ed;margin-top:7px}
.build-library-page .build-card-grid{display:block;min-width:0}
.build-library-page .build-card{padding:24px;background:#101827;box-shadow:none;min-height:280px}
.build-library-page .build-card h3{font-size:24px;overflow-wrap:anywhere;margin:20px 0 12px}
.build-library-page .build-notes{max-height:none;white-space:normal;overflow-wrap:anywhere;color:#b5c2d6;line-height:1.7}
.build-library-page .string-actions{margin:22px 0;display:flex;flex-wrap:wrap;gap:10px}
.build-library-page .build-card footer{margin-top:24px;flex-wrap:wrap;gap:12px}
.build-library-page #gse-inbox{margin:0;padding:24px;border-radius:14px;background:#101827}
.build-library-page #gse-inbox>p{color:#9cabc2;line-height:1.7;max-width:850px}
.inbox-search{display:grid;gap:8px;margin:20px 0;color:#b6c4d9;font-size:13px}
.inbox-search input{padding:12px;background:#0b1220;color:#e2e8f0;border:1px solid var(--line);border-radius:9px;max-width:480px}
.build-library-page #gse-inbox summary{cursor:pointer;line-height:1.7;overflow-wrap:anywhere}
.build-library-page #gse-inbox details textarea{box-sizing:border-box;margin:12px 0;background:#080f1c;color:#b9c7dc;border:1px solid var(--line);border-radius:8px;padding:12px;resize:vertical}
.build-library-page #gse-inbox details button,.build-library-page #gse-inbox details a{display:inline-block;padding:9px 12px;margin:4px 8px 4px 0;border:1px solid #584c7d;border-radius:8px;background:#242139;color:#ddd6fe;text-decoration:none;cursor:pointer}
.build-library-page :is(button,a,input,select,textarea):focus-visible{outline:2px solid #c4b5fd;outline-offset:3px}
@media(max-width:760px){.build-browser{grid-template-columns:1fr}.build-picker{max-height:260px}.build-library-page .build-card{padding:18px}.library-tabs button{padding:10px;font-size:13px}.build-library-page .library-hero{padding:18px}}

.character-build-choice{display:block;padding:15px;background:#101827;border:1px solid var(--line);border-radius:10px;color:#e2e8f0;text-decoration:none}
.character-build-choice[aria-current=page]{border-color:#a78bfa;background:#22233b;box-shadow:inset 3px 0 #a78bfa}
.profile-builds textarea[hidden]{display:none!important}
.profile-builds .profile-build-card{margin-top:12px}

.profile-builds .loadout-current{border:1px solid #3bbf7a;background:linear-gradient(120deg,rgba(28,100,62,.28),rgba(8,22,20,.8));box-shadow:inset 3px 0 #4ade80}
.profile-builds .loadout-current .build-title-row strong{color:#bbf7d0}
.profile-builds .loadout-current .build-title-row>span{color:#bbf7d0;border-color:#3bbf7a;background:rgba(34,197,94,.12)}
.loadout-legend{color:#9eacc5;font-size:13px;margin:20px 0 10px}

.build-stat-priority{margin:18px 0;padding:16px;border:1px solid rgba(167,139,250,.3);border-radius:12px;background:rgba(139,92,246,.055)}
.build-stat-priority p{color:#d3dced;line-height:1.6;overflow-wrap:anywhere}
.build-stat-priority small{display:block;color:#9eacc5;line-height:1.6;margin:8px 0}
.build-stat-priority a{color:#c4b5fd}
.build-stat-priority details{margin:14px 0}
.build-stat-priority summary{cursor:pointer;color:#cbd5e1}
