.bjld {
    color: #1f2933;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.bjld * {
    box-sizing: border-box;
}

.bjld .bjld-known-drops {
    background: transparent;
    border: 0;
    color: inherit;
    font-size: 13px;
    line-height: 1.5;
    padding: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.bjld .bjld-known-drops > strong {
    display: block;
    font-size: 13px;
    margin-bottom: 3px;
}

.bjld .bjld-known-drops ul,
.bjld .bjld-known-drops p {
    list-style: none;
    margin: 0;
    padding: 0;
}

.bjld .bjld-known-drops li {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0 6px;
    margin: 0;
    padding: 0;
}

.bjld .bjld-known-drops small {
    font-size: 11px;
    min-width: 0;
}

.bjld .bjld-known-drops .bjld-link {
    color: #0f5a52;
    font-weight: 400;
    min-width: 0;
    text-decoration: none;
}

.bjld .bjld-known-drops .bjld-link:hover,
.bjld .bjld-known-drops .bjld-link:focus-visible {
    color: #12695f;
    text-decoration: underline;
}

.bjld-feedback-banner {
    background: #e6f4f1;
    border: 1px solid #12695f;
    color: #0f5a52;
    font-weight: 700;
    margin-bottom: 12px;
    padding: 10px 12px;
    position: sticky;
    top: 32px;
    z-index: 20;
}

.bjld-feedback-banner[hidden] {
    display: none;
}

.bjld-feedback-error {
    background: #fdecea;
    border-color: #c62828;
    color: #8a1c1c;
}

.bjld-toolbar {
    align-items: center;
    border-bottom: 1px solid #d9e2ec;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
}

.bjld-toolbar h2,
.bjld-rules-grid h3 {
    margin: 0;
}

.bjld-toolbar p {
    color: #52606d;
    margin: 4px 0 0;
}

.bjld-button,
.bjld-tabs button {
    background: #12695f;
    border: 0;
    color: #fff;
    cursor: pointer;
    font: inherit;
    padding: 8px 12px;
}

.bjld-button:hover,
.bjld-tabs button:hover {
    background: #0f5a52;
}

.bjld-summary {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 16px;
}

.bjld-summary-card {
    background: #fff;
    border: 1px solid #d9e2ec;
    color: #1f2933;
    cursor: pointer;
    padding: 12px;
    text-align: left;
    width: 100%;
}

.bjld-summary-card:hover,
.bjld-summary-card:focus {
    background: #f5f7fa;
    border-color: #12695f;
    outline: none;
}

.bjld-summary span {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.bjld-summary label {
    color: #52606d;
    cursor: pointer;
    display: block;
    font-size: 13px;
    margin-top: 4px;
}

.bjld-tabs {
    border-bottom: 1px solid #d9e2ec;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.bjld-tabs button {
    background: #e6f4f1;
    color: #1f2933;
}

.bjld-tabs button.is-active {
    background: #12695f;
    color: #fff;
}

.bjld-panel {
    display: none;
}

.bjld-panel.is-active {
    display: block;
}

.bjld-home-grid {
    display: grid;
    gap: 14px;
}

.bjld-home-section {
    border: 1px solid #d9e2ec;
    padding: 14px;
}

.bjld-home-section h3 {
    margin: 0 0 12px;
}

.bjld-home-action-grid,
.bjld-home-metrics {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.bjld-home-action,
.bjld-home-metrics div {
    background: #fff;
    border: 1px solid #d9e2ec;
    color: #1f2933;
    padding: 12px;
    text-align: left;
}

.bjld-home-action {
    cursor: pointer;
}

.bjld-home-action:hover,
.bjld-home-action:focus {
    border-color: #12695f;
    outline: none;
}

.bjld-home-action span,
.bjld-home-metrics strong {
    display: block;
    font-size: 22px;
}

.bjld-home-action label,
.bjld-home-metrics span {
    color: #52606d;
    display: block;
    font-size: 13px;
    margin-top: 4px;
}

.bjld-home-warning-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.bjld-home-warning-list div {
    border-top: 1px solid #d9e2ec;
    padding-top: 8px;
}

.bjld-home-warning-list small {
    display: block;
}

.bjld-roster-section {
    border: 1px solid #d9e2ec;
    margin-bottom: 14px;
}

.bjld-roster-section summary {
    background: #f5f7fa;
    color: #102a43;
    cursor: pointer;
    font-weight: 700;
    padding: 12px 14px;
}

.bjld-roster-section[open] summary {
    border-bottom: 1px solid #d9e2ec;
}

.bjld-roster-section > form,
.bjld-roster-section > .bjld-filter-row,
.bjld-roster-section > .bjld-table-wrap,
.bjld-roster-section > .bjld-subpanel {
    margin: 14px;
}

.bjld-filter-row {
    margin-bottom: 12px;
}

.bjld-filter-row label {
    color: #52606d;
    display: inline-flex;
    flex-direction: column;
    font-size: 13px;
    gap: 4px;
}

.bjld-filter-row .bjld-checkbox-row {
    align-items: center;
    color: #1f2933;
    flex-direction: row;
    margin-left: 10px;
    vertical-align: bottom;
}

.bjld-upgrade-scope-filter {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
    vertical-align: top;
}

.bjld-upgrade-filter-checks {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bjld-upgrade-filter-checks .bjld-checkbox-row {
    margin-left: 0;
}

.bjld-item-search-filters {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.bjld-item-search-filters button {
    min-height: 48px;
}

.bjld input,
.bjld select,
.bjld textarea {
    border: 1px solid #bcccdc;
    font: inherit;
    padding: 8px;
    width: 100%;
}

.bjld textarea {
    min-height: 80px;
    resize: vertical;
}

.bjld-required {
    color: #c92a2a;
    font-weight: 700;
}

.bjld-label-text {
    align-items: baseline;
    display: inline-flex;
    gap: 3px;
}

.bjld-form-note {
    color: #52606d;
    font-size: 13px;
    margin: 0;
}

.bjld-form-note p {
    margin: 0 0 8px;
}

.bjld-upgrade-diagnostics-details {
    margin-top: 8px;
}

.bjld-upgrade-diagnostics-details summary {
    cursor: pointer;
    font-weight: 700;
}

.bjld-upgrade-diagnostics-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 8px;
}

.bjld-upgrade-diagnostic-card {
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    display: grid;
    gap: 3px;
    padding: 8px;
}

.bjld-upgrade-diagnostic-card small {
    color: #52606d;
}

.bjld-matching-diagnostics {
    margin-top: 6px;
}

.bjld-matching-diagnostics summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.bjld-matching-diagnostic-list {
    display: grid;
    gap: 4px;
    margin-top: 6px;
}

.bjld-matching-diagnostic-row {
    align-items: start;
    display: grid;
    gap: 6px;
    grid-template-columns: 58px 1fr;
}

.bjld-matching-diagnostic-row small {
    color: #52606d;
    display: block;
}

.bjld-match-status {
    border: 1px solid #bcccdc;
    color: #52606d;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 4px;
    text-transform: uppercase;
}

.bjld-match-status-pass {
    border-color: #0f766e;
    color: #0f766e;
}

.bjld-match-status-block {
    border-color: #b42318;
    color: #b42318;
}

.bjld-match-status-review {
    border-color: #a16207;
    color: #a16207;
}

.bjld-upgrade-hidden-table-wrap {
    margin-top: 8px;
    overflow-x: auto;
}

.bjld-upgrade-hidden-table {
    min-width: 960px;
}

.bjld-upgrade-hidden-table small {
    color: #52606d;
    display: block;
    margin-top: 3px;
}

.bjld-upgrade-hidden-reason {
    font-weight: 700;
}

.bjld-checkbox-row {
    align-items: center;
    display: flex;
    gap: 8px;
}

.bjld-checkbox-row input {
    width: auto;
}

.bjld-checkbox-field .bjld-checkbox-row {
    color: #1f2933;
    min-height: 38px;
}

.bjld-table-wrap {
    overflow-x: auto;
}

.bjld-table {
    border-collapse: collapse;
    min-width: 760px;
    width: 100%;
}

.bjld-table th,
.bjld-table td {
    border-bottom: 1px solid #d9e2ec;
    padding: 9px 8px;
    text-align: left;
    vertical-align: top;
}

.bjld-table th {
    background: #f5f7fa;
    color: #334e68;
    font-size: 13px;
}

.bjld-table button {
    background: #f5f7fa;
    border: 1px solid #bcccdc;
    color: #1f2933;
    cursor: pointer;
    font: inherit;
    padding: 5px 8px;
}

.bjld-table button:hover {
    background: #e6f4f1;
    border-color: #12695f;
    color: #0f5a52;
}

.bjld-table .bjld-column-sort {
    align-items: baseline;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    font-weight: inherit;
    gap: 5px;
    padding: 0;
    text-align: left;
}

.bjld-column-sort span {
    flex: 0 0 1em;
    text-align: center;
}

.bjld-table .bjld-column-sort:hover,
.bjld-table .bjld-column-sort:focus-visible {
    color: #0f766e;
    text-decoration: underline;
}

.bjld-character-equipment-layout {
    background: #2a1717;
    border: 1px solid #8b6f24;
    display: grid;
    gap: 6px;
    grid-template-areas:
        "head cloak charm1 charm2 earLeft earRight"
        "shoulders doll doll doll doll neck"
        "chest doll doll doll doll ring1"
        "forearms doll doll doll doll ring2"
        "hands doll doll doll doll wrist1"
        "legs doll doll doll doll wrist2"
        "feet primary secondary ranged plume waist";
    grid-template-columns: repeat(6, 64px);
    grid-template-rows: repeat(7, 64px);
    margin-bottom: 14px;
    max-width: max-content;
    padding: 8px;
    position: relative;
}

.bjld-character-overview-grid {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: max-content minmax(280px, 420px);
}

.bjld-character-stats-panel {
    background: #f8fafc;
    border: 1px solid #d9e2ec;
    box-sizing: border-box;
    color: #1f2933;
    min-width: 280px;
    padding: 12px;
}

.bjld-character-stats-meta {
    color: #52606d;
    margin: 0 0 12px;
}

.bjld-character-stat-group {
    border-top: 1px solid #d9e2ec;
    padding-top: 10px;
}

.bjld-character-stat-group:first-child,
.bjld-character-stats-meta + .bjld-character-stat-group {
    border-top: 0;
    padding-top: 0;
}

.bjld-character-stat-group + .bjld-character-stat-group {
    margin-top: 12px;
}

.bjld-character-stat-group h5 {
    color: #334e68;
    font-size: 13px;
    margin: 0 0 7px;
}

.bjld-character-stat-list {
    display: grid;
    gap: 6px 16px;
    grid-template-columns: repeat(2, minmax(118px, 1fr));
}

.bjld-character-stat-list div {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    min-width: 0;
}

.bjld-character-stat-list span {
    color: #52606d;
    min-width: 0;
    overflow-wrap: anywhere;
}

.bjld-character-stat-list strong {
    color: #102a43;
    flex: 0 0 auto;
    font-weight: 700;
}

.bjld-equipment-paperdoll {
    align-items: center;
    background: #3b2424;
    border: 1px solid #4f3030;
    color: #f8f0d0;
    display: flex;
    flex-direction: column;
    grid-area: doll;
    justify-content: center;
    min-width: 220px;
    text-align: center;
}

.bjld-equipment-paperdoll-text {
    align-items: center;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
    max-width: 180px;
}

.bjld-equipment-paperdoll strong {
    color: #fff;
    font-size: 24px;
}

.bjld-equipment-paperdoll small {
    color: #d8c6a3;
    line-height: 1.25;
}

.bjld-equipment-slot {
    align-items: center;
    background: #111827;
    border: 1px solid #5f6b7a;
    color: #d6ad45;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: 64px;
    min-width: 64px;
    padding: 2px;
    position: relative;
}

.bjld-equipment-slot.has-item {
    border-color: #d6ad45;
}

.bjld-equipment-slot-icon {
    align-items: center;
    display: flex;
    height: 36px;
    justify-content: center;
    min-width: 36px;
}

.bjld-equipment-slot-icon img {
    display: block;
    height: 36px;
    object-fit: cover;
    width: 36px;
}

.bjld-equipment-slot-icon span {
    color: #8fa7c2;
    font-size: 12px;
    font-weight: 700;
}

.bjld-equipment-slot small {
    color: #d8c6a3;
    display: block;
    font-size: 9px;
    line-height: 1;
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bjld-equipment-popover {
    display: none;
    left: 48px;
    max-width: 360px;
    min-width: 320px;
    position: absolute;
    top: -8px;
    z-index: 30;
}

.bjld-equipment-slot:nth-child(n + 15) .bjld-equipment-popover {
    bottom: -8px;
    top: auto;
}

.bjld-equipment-slot:hover,
.bjld-equipment-slot:focus-within {
    border-color: #fff;
    z-index: 31;
}

.bjld-equipment-slot:hover .bjld-equipment-popover,
.bjld-equipment-slot:focus-within .bjld-equipment-popover {
    display: block;
}

.bjld-equipment-mobile-card {
    display: none;
}

.bjld-equipment-mobile-actions {
    border-top: 1px solid rgba(214, 173, 69, 0.45);
    margin-top: 10px;
    padding-top: 10px;
}

.bjld-equipment-mobile-bis-button {
    background: #fff7e6;
    border: 1px solid #c28a0c;
    color: #402b00;
    cursor: pointer;
    font: inherit;
    padding: 7px 10px;
}

.bjld-equipment-mobile-bis-button.is-bis {
    background: #c28a0c;
    color: #fff;
}

.bjld-subpanel {
    border: 1px solid #d9e2ec;
    margin-top: 16px;
    padding: 12px;
}

.bjld-subpanel-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.bjld-subpanel h3 {
    margin: 0;
}

.bjld-section-heading {
    margin: 0 0 10px;
}

.bjld-section-heading:not(:first-child) {
    margin-top: 22px;
}

.bjld-section-heading h3 {
    margin: 0;
}

.bjld-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bjld-assignment {
    display: flex;
    flex-basis: 100%;
    gap: 6px;
}

.bjld-assignment select {
    max-width: 260px;
    min-width: 180px;
    padding: 5px 8px;
    width: auto;
}

.bjld-leader-loot-table {
    min-width: 980px;
}

.bjld-audit-table {
    min-width: 1080px;
}

.bjld-audit-decision,
.bjld-audit-intents {
    display: grid;
    gap: 3px;
    min-width: 220px;
}

.bjld-audit-decision small,
.bjld-audit-intents small {
    color: #52606d;
    display: block;
    font-size: 12px;
}

.bjld-leader-loot-status {
    background: #e6f4f1;
    color: #0f5a52;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
    padding: 2px 6px;
}

.bjld-leader-loot-card {
    margin-top: 10px;
    max-width: 360px;
}

.bjld-leader-loot-card .bjld-item-card {
    min-height: 0;
}

.bjld-leader-loot-intents {
    display: grid;
    gap: 6px;
    min-width: 220px;
}

.bjld-leader-loot-coverage {
    color: #334e68;
    font-size: 12px;
    font-weight: 700;
}

.bjld-leader-loot-intent {
    border: 1px solid #d9e2ec;
    padding: 7px;
}

.bjld-leader-loot-intent strong,
.bjld-leader-loot-intent small,
.bjld-leader-loot-assignment small {
    display: block;
}

.bjld-leader-loot-intent span {
    color: #0f5a52;
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.bjld-leader-loot-intent small,
.bjld-leader-loot-assignment small {
    color: #52606d;
    font-size: 12px;
    margin-top: 2px;
}

.bjld-leader-loot-assignment {
    display: grid;
    gap: 6px;
    min-width: 240px;
}

.bjld-leader-loot-assignment select,
.bjld-leader-loot-assignment input {
    padding: 6px 8px;
}

.bjld-actions button {
    background: #f5f7fa;
    border: 1px solid #bcccdc;
    color: #1f2933;
    cursor: pointer;
    font: inherit;
    padding: 5px 8px;
}

.bjld-actions button:hover {
    background: #e6f4f1;
    border-color: #12695f;
    color: #0f5a52;
}

.bjld-actions button:disabled,
.bjld-assignment select:disabled,
.bjld-table button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.bjld-recommendations {
    display: grid;
    flex-basis: 100%;
    gap: 6px;
    margin-top: 4px;
}

.bjld-recommendation {
    text-align: left;
}

.bjld-recommendation-static {
    background: #f5f7fa;
    border: 1px solid #bcccdc;
    padding: 8px;
}

.bjld-recommendation strong,
.bjld-recommendation small {
    display: block;
}

.bjld-recommendation small {
    color: #52606d;
    font-size: 12px;
    margin-top: 2px;
}

.bjld-recommendation-badges {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 5px;
}

.bjld-recommendation-badge {
    background: #12695f;
    color: #fff;
    display: inline-block;
    font-size: 11px;
    margin-left: 6px;
    padding: 1px 5px;
}

.bjld-recommendation-badges .bjld-recommendation-badge {
    margin-left: 0;
}

.bjld-recommendation-score-badge {
    background: #0f766e;
}

.bjld-recommendation-status {
    background: #334e68;
}

.bjld-recommendation-owner {
    background: #8a5a00;
}

.bjld-recommendation-reason {
    margin-top: 6px;
}

.bjld-recommendation-reason summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.bjld-character-stat-change-card {
    background: #1f0909;
    border: 1px solid #8b6f24;
    color: #63e6ff;
    margin-top: 8px;
    padding: 8px;
}

.bjld-character-stat-change-card h5 {
    color: #f8f0d0;
    font-size: 12px;
    margin: 0 0 6px;
}

.bjld-character-stat-change-list {
    display: grid;
    gap: 3px 12px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.bjld-character-stat-change-list div {
    font-size: 12px;
}

.bjld-character-stat-change-list span,
.bjld-character-stat-change-list strong {
    display: inline;
}

.bjld-character-stat-change-list strong {
    font-weight: 700;
    margin-left: 4px;
}

.bjld-character-stat-change-list em {
    font-style: normal;
}

.bjld-character-stat-change-list .is-primary-stat {
    color: #35ff49;
}

.bjld-character-stat-change-list .is-positive {
    color: #35ff49;
}

.bjld-character-stat-change-list .is-negative {
    color: #ff6b6b;
}

.bjld-upgrade-pager {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.bjld-upgrade-pager-top {
    justify-content: flex-start;
}

.bjld-upgrade-pager span {
    color: #52606d;
    font-size: 12px;
}

.bjld-upgrade-debug {
    background: #0f172a;
    border: 1px solid #334155;
    color: #e2e8f0;
    margin-top: 6px;
    padding: 6px;
}

.bjld-upgrade-debug summary {
    cursor: pointer;
    font-weight: 700;
}

.bjld-upgrade-debug pre {
    background: #111827 !important;
    border: 1px solid #475569;
    color: #e5e7eb !important;
    font-size: 12px;
    line-height: 1.35;
    margin: 6px 0 0;
    max-height: 360px;
    overflow: auto;
    padding: 8px;
    white-space: pre-wrap;
}

.bjld-upgrade-debug pre::selection,
.bjld-upgrade-debug pre *::selection {
    background: #2563eb;
    color: #fff;
}

.bjld-debug-details {
    margin: 8px 0;
}

.bjld-debug-details summary {
    cursor: pointer;
}

.bjld-debug-toolbar {
    margin: 8px 0 6px;
}

.bjld-debug-toolbar button {
    background: #0f766e;
    border: 1px solid #115e59;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    padding: 5px 10px;
}

.bjld-debug-toolbar button:hover,
.bjld-debug-toolbar button:focus {
    background: #0d9488;
}

.bjld-bis-badge {
    background: #8a5a00;
    color: #fff;
    display: inline-block;
    font-size: 10px;
    margin-left: 4px;
    padding: 1px 4px;
}

.bjld-bis-toggle {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #bcccdc;
    color: #52606d;
    cursor: pointer;
    display: inline-flex;
    height: 22px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 4px;
    top: 4px;
    width: 22px;
    z-index: 45;
}

.bjld-bis-hitbox {
    background: transparent;
    border: 0;
    bottom: 0;
    cursor: pointer;
    left: 0;
    padding: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 45;
}

.bjld-bis-hitbox span {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.bjld-bis-hitbox:focus {
    box-shadow: inset 0 0 0 2px #c28a0c;
    outline: none;
}

.bjld-bis-toggle::before {
    content: "\1F513";
    font-size: 13px;
    line-height: 1;
}

.bjld-bis-toggle span {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.bjld-bis-toggle:hover,
.bjld-bis-toggle:focus {
    background: #fff7e6;
    border-color: #c28a0c;
    color: #8a5a00;
    outline: none;
}

.bjld-bis-toggle.is-bis {
    background: #fff7e6;
    border-color: #c28a0c;
    color: #8a5a00;
}

.bjld-bis-toggle.is-bis::before {
    content: "\1F512";
}

.bjld-equipment-slot.is-bis {
    border-color: #c28a0c;
    box-shadow: 0 0 0 1px rgba(194, 138, 12, 0.55);
}

.bjld-equipped-slot-choice {
    color: #52606d;
    display: inline-flex;
    flex-direction: column;
    font-size: 12px;
    gap: 3px;
    margin-top: 8px;
    max-width: 180px;
}

.bjld-suggestion-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.bjld-suggestion-actions button {
    background: #fff;
    border: 1px solid #bcccdc;
    color: #1f2933;
    cursor: pointer;
    font: inherit;
    padding: 4px 8px;
}

.bjld-suggestion-actions button:hover {
    background: #e6f4f1;
    border-color: #12695f;
    color: #0f5a52;
}

.bjld-suggestion-actions button.bjld-auto-assign {
    background: #176b3a;
    border-color: #176b3a;
    color: #fff;
}

.bjld-suggestion-actions button.bjld-auto-assign:hover {
    background: #10532c;
    border-color: #10532c;
    color: #fff;
}

.bjld-suggestion-actions button.bjld-auto-assign:focus-visible {
    outline: 2px solid #176b3a;
    outline-offset: 3px;
}

.bjld-inline-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.bjld-inline-actions button {
    background: #fff;
    border: 1px solid #bcccdc;
    color: #1f2933;
    cursor: pointer;
    font: inherit;
    padding: 4px 8px;
}

.bjld-inline-actions button:hover {
    background: #e6f4f1;
    border-color: #12695f;
    color: #0f5a52;
}

.bjld-item-compare {
    margin-top: 8px;
}

.bjld-not-upgrade-note {
    background: #fff8e1;
    border: 1px solid #d9a441;
    color: #5c3b00;
    margin-top: 8px;
    padding: 7px 8px;
}

.bjld-not-upgrade-note strong,
.bjld-not-upgrade-note small {
    display: block;
}

.bjld-not-upgrade-note small {
    color: #7c5a12;
}

.bjld-item-compare summary {
    color: #0f5a52;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.bjld-item-compare-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    margin-top: 8px;
}

.bjld-item-card {
    background: #1f0909;
    border: 1px solid #8b6f24;
    color: #f8f0d0;
    min-height: 160px;
    padding: 10px;
}

.bjld-item-detail-card {
    max-width: 430px;
}

.bjld-item-detail-card .bjld-item-card {
    box-sizing: border-box;
    width: 100%;
}

.bjld-item-card-empty {
    background: #f5f7fa;
    border-color: #bcccdc;
    color: #334e68;
}

.bjld-item-card-title {
    align-items: start;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    min-width: 0;
}

.bjld-item-card-title strong {
    color: #fff;
    font-size: 17px;
    line-height: 1.2;
    min-width: 0;
    overflow-wrap: anywhere;
}

.bjld-item-components {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.bjld-item-component {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 36px minmax(0, 1fr);
}

.bjld-item-component-icon {
    align-items: center;
    background: #111827;
    border: 1px solid #d6ad45;
    color: #d6ad45;
    display: flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.bjld-item-component-icon img {
    display: block;
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.bjld-item-component small {
    color: #f8d38a;
    display: block;
    font-size: 11px;
    margin-top: 2px;
}

.bjld-item-title-tools {
    align-items: stretch;
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
    margin-left: auto;
}

.bjld-item-score-box {
    align-items: center;
    background: #f5f7fa;
    border: 1px solid #d6ad45;
    color: #102a43;
    display: grid;
    flex: 0 0 78px;
    font-size: 13px;
    height: 44px;
    line-height: 1.05;
    min-width: 78px;
    padding: 2px 8px;
    text-align: center;
    white-space: nowrap;
}


.bjld-item-score-box strong {
    color: #006644;
    font-size: 16px;
    line-height: 1;
}

.bjld-item-capture-version {
    color: #d6ad45;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.bjld-item-card-footer {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-top: 10px;
    min-height: 24px;
}

.bjld-item-card-copy-link {
    background: #f8f0d0;
    border: 1px solid #d6ad45;
    border-radius: 3px;
    color: #1f0909;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
    padding: 5px 7px;
}

.bjld-item-card-copy-link:hover,
.bjld-item-card-copy-link:focus {
    background: #fff7d6;
}

.bjld-item-card-copy-link[data-copy-state="copied"] {
    background: #d8f3dc;
    border-color: #57a773;
    color: #064e3b;
}


.bjld-item-icon {
    align-items: center;
    background: #111827;
    border: 1px solid #d6ad45;
    color: #d6ad45;
    display: flex;
    flex: 0 0 44px;
    height: 44px;
    justify-content: center;
    min-width: 44px;
}

.bjld-item-icon img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.bjld-item-tier {
    color: #d6ad45;
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
    text-decoration: underline;
}

.bjld-item-stats {
    display: grid;
    gap: 3px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
}

.bjld-item-stats-blue {
    margin-top: 6px;
}

.bjld-item-stats div {
    color: #63e6ff;
    font-size: 12px;
}

.bjld-item-stats span,
.bjld-item-stats strong {
    display: inline;
}

.bjld-item-stats strong {
    font-weight: 700;
    margin-left: 4px;
}

.bjld-item-stats .is-primary-stat {
    color: #35ff49;
}

.bjld-item-adornments {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 8px;
}

.bjld-item-adornments-label {
    color: #f4e38a;
    flex: 0 0 100%;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}

.bjld-item-adornment-slot {
    align-items: center;
    background: #080406;
    border: 1px solid #6f5d43;
    color: #e6edf5;
    display: inline-flex;
    flex: 0 0 28px;
    height: 28px;
    justify-content: center;
    padding: 0;
    width: 28px;
}

.bjld-item-adornment-slot img,
.bjld-item-adornment-slot b {
    align-items: center;
    background: #06080c;
    border: 0;
    display: inline-flex;
    flex: 0 0 24px;
    height: 24px;
    justify-content: center;
    line-height: 1;
    width: 24px;
}

.bjld-item-adornment-slot img {
    object-fit: cover;
}

.bjld-item-adornment-slot small {
    color: #f5d76e;
    font-size: 10px;
    font-weight: 700;
}

.bjld-item-adornment-slot em {
    color: #dbeafe;
    font-style: normal;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bjld-item-adornment-slot.is-empty em {
    color: #94a3b8;
}

.bjld-item-adornment-slot.is-white {
    border-color: #dfe7f1;
}

.bjld-item-adornment-slot.is-green {
    border-color: #5ee271;
}

.bjld-item-adornment-slot.is-yellow {
    border-color: #facc15;
}

.bjld-item-adornment-slot.is-red {
    border-color: #ef4444;
}

.bjld-item-adornment-slot.is-blue {
    border-color: #60a5fa;
}

.bjld-item-adornment-slot.is-purple {
    border-color: #c084fc;
}

.bjld-item-adornment-slot.is-cyan {
    border-color: #22d3ee;
}

.bjld-item-adornment-slot.is-orange {
    border-color: #ff9d3a;
}

.bjld-item-adornment-slot.is-turquoise {
    border-color: #34dddd;
}

.bjld-item-adornment-slot.is-black {
    border-color: #111827;
}

.bjld-item-white-stats {
    color: #fff;
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 2px 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 10px;
}

.bjld-item-white-stats div {
    display: flex;
    gap: 6px;
}

.bjld-item-white-stats span {
    min-width: 48px;
}

.bjld-item-stats .is-positive {
    color: #35ff49;
}

.bjld-item-stats .is-negative,
.bjld-item-stats .is-missing-stat {
    color: #ff6b6b;
}

.bjld-item-meta {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
}

.bjld-item-level {
    color: #35ff49;
}

.bjld-item-classes {
    color: #fff;
}

.bjld-item-classes span:not(.bjld-item-class-separator) {
    color: #35ff49;
}

.bjld-item-class-separator {
    color: #fff;
}

.bjld-item-effects {
    color: #f8f0d0;
    font-size: 12px;
    margin: 2px 0 0;
    padding-left: 18px;
}

.bjld-item-effects-label {
    color: #f4e38a;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
}

.bjld-item-effects strong {
    color: #f8f0d0;
}

.bjld-item-effect-lines {
    margin: 4px 0 0;
    padding-left: 16px;
}

.bjld-item-effect-lines .bjld-item-effect-lines {
    margin-top: 2px;
    padding-left: 16px;
}

.bjld-item-effect-lines li {
    margin-top: 3px;
    white-space: normal;
}

.bjld-item-effect-lines span {
    color: #f8f0d0;
}

.bjld-item-flags {
    color: #ffef63;
    font-size: 12px;
    font-weight: 700;
    margin-top: 10px;
}

.bjld-rules-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 20px;
}

.bjld-rules-grid form {
    border: 1px solid #d9e2ec;
    display: grid;
    gap: 10px;
    padding: 12px;
}

.bjld-rule-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    margin-bottom: 20px;
}

.bjld-rule-help,
.bjld-rule-builder {
    border: 1px solid #d9e2ec;
    padding: 12px;
}

.bjld-rule-help {
    margin-bottom: 16px;
}

.bjld-rule-help summary {
    color: #0f5a52;
    cursor: pointer;
    font-weight: 700;
}

.bjld-help-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
}

.bjld-help-grid div {
    background: #f5f7fa;
    border: 1px solid #d9e2ec;
    padding: 10px;
}

.bjld-help-grid strong,
.bjld-help-grid span {
    display: block;
}

.bjld-help-grid span {
    color: #52606d;
    font-size: 13px;
    margin-top: 3px;
}

.bjld-rule-builder {
    display: grid;
    gap: 12px;
}

.bjld-rule-builder h3 {
    margin: 0;
}

.bjld-bulk-rules textarea {
    min-height: 220px;
}

.bjld-form-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.bjld-form-grid label {
    color: #52606d;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 4px;
}

.bjld-rule-checks,
.bjld-rule-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bjld-rule-checks label {
    align-items: center;
    color: #1f2933;
    display: inline-flex;
    gap: 6px;
}

.bjld-rule-checks input {
    width: auto;
}

.bjld-rule-requirements {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bjld-rule-list-builder {
    border: 1px solid #d9e2ec;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 120px auto;
    padding: 10px;
}

.bjld-rule-list-builder label {
    color: #52606d;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 4px;
}

.bjld-rule-list-builder select[multiple] {
    grid-column: 1 / -1;
}

.bjld-rule-list-builder button,
.bjld-rule-actions button:not(.bjld-button) {
    background: #f5f7fa;
    border: 1px solid #bcccdc;
    color: #1f2933;
    cursor: pointer;
    font: inherit;
    padding: 8px 12px;
}

.bjld-rule-list-builder button {
    align-self: end;
}

.bjld-category-table {
    margin-top: 0;
}

.bjld-rule-bulk-move {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.bjld-rule-bulk-move label {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    gap: 4px;
}

.bjld-rule-category-row td {
    background: #f5f7fa;
    color: #1f2933;
}

.bjld-rule-category-row small {
    color: #52606d;
    margin-left: 8px;
}

.bjld-rule-category-row button {
    margin-left: 8px;
}

.bjld-upgrade-matching-fields {
    border: 1px solid #d9e2ec;
    display: grid;
    gap: 10px;
    margin: 12px 0;
    padding: 10px;
}

.bjld-upgrade-matching-fields h4 {
    margin: 0;
}

.bjld-effect-trainer-layout {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.65fr);
    margin-bottom: 20px;
}

.bjld-effect-preview {
    border: 1px solid #d9e2ec;
    padding: 12px;
}

.bjld-effect-preview h3,
.bjld-effect-trainer-layout h3 {
    margin: 0 0 10px;
}

.bjld-effect-preview-box {
    background: #f5f7fa;
    border: 1px solid #d9e2ec;
    min-height: 110px;
    padding: 10px;
}

.bjld-effect-preview-lines {
    display: grid;
    gap: 6px;
}

.bjld-effect-preview-lines strong,
.bjld-effect-preview-lines span {
    display: block;
}

.bjld-effect-preview-lines span {
    color: #52606d;
}

.bjld-table pre {
    background: #f5f7fa;
    border: 1px solid #d9e2ec;
    color: #1f2933;
    font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    margin: 6px 0 0;
    max-width: 520px;
    overflow: auto;
    padding: 8px;
    white-space: pre-wrap;
}

.bjld-rule-collapse {
    min-width: 32px;
}

.bjld-table tr.is-disabled td,
.bjld-rule-category-row.is-disabled td {
    color: #7b8794;
}

.bjld-table tr.is-disabled td strong {
    color: #52606d;
}

[data-rule-editing-label] {
    color: #52606d;
    font-size: 13px;
}

.bjld-status {
    color: #52606d;
    margin-top: 12px;
}

.bjld-account {
    color: #52606d;
    font-size: 13px;
    margin-top: 6px;
}

.bjld-link {
    color: #0f5a52;
    font-weight: 700;
    text-decoration: none;
}

.bjld-link:hover,
.bjld-link:focus {
    text-decoration: underline;
}

.bjld-muted {
    color: #7b8794;
}

.bjld-detail-panel {
    border-top: 1px solid #d9e2ec;
    padding-top: 16px;
}

.bjld-detail-heading {
    align-items: flex-start;
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.bjld-detail-heading > div {
    min-width: 0;
    overflow-wrap: anywhere;
}

.bjld-detail-heading > button {
    flex-shrink: 0;
}

.bjld-detail-heading h3 {
    margin: 0;
    white-space: normal;
}

.bjld-detail-heading p {
    color: #52606d;
    margin: 4px 0 0;
}

.bjld-detail-heading p span {
    display: block;
}

.bjld-detail-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
}

.bjld-detail-grid h4 {
    margin: 0 0 8px;
}

.bjld-empty-detail {
    border: 1px solid #d9e2ec;
    color: #52606d;
    padding: 12px;
}

@media (max-width: 760px) {
    .bjld-toolbar,
    .bjld-tabs {
        align-items: stretch;
        flex-direction: column;
    }

    .bjld-summary,
    .bjld-rules-grid,
    .bjld-effect-trainer-layout,
    .bjld-rule-layout,
    .bjld-item-compare-grid,
    .bjld-help-grid,
    .bjld-rule-requirements,
    .bjld-form-grid {
        grid-template-columns: 1fr;
    }

    .bjld-rule-list-builder {
        grid-template-columns: 1fr;
    }

    .bjld-character-equipment-layout {
        box-sizing: border-box;
        gap: 4px;
        grid-template-areas:
            "head cloak charm1 charm2 earLeft earRight"
            "shoulders doll doll doll doll neck"
            "chest doll doll doll doll ring1"
            "forearms doll doll doll doll ring2"
            "hands doll doll doll doll wrist1"
            "legs doll doll doll doll wrist2"
            "feet primary secondary ranged plume waist";
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-template-rows: repeat(7, minmax(48px, 1fr));
        max-width: 430px;
        padding: 6px;
        width: 100%;
    }

    .bjld-character-overview-grid {
        grid-template-columns: 1fr;
    }

    .bjld-character-stats-panel {
        min-width: 0;
    }

    .bjld-character-stat-list {
        grid-template-columns: 1fr;
    }

    .bjld-equipment-paperdoll {
        display: flex;
        min-width: 0;
    }

    .bjld-equipment-paperdoll-text {
        max-width: 150px;
        padding: 6px;
    }

    .bjld-equipment-paperdoll strong {
        font-size: 20px;
    }

    .bjld-equipment-paperdoll small {
        font-size: 11px;
    }

    .bjld-equipment-slot {
        aspect-ratio: 1 / 1;
        min-height: 0;
        min-width: 0;
    }

    .bjld-equipment-slot-icon {
        height: clamp(24px, 8vw, 36px);
        min-width: 0;
    }

    .bjld-equipment-slot-icon img {
        height: clamp(24px, 8vw, 36px);
        width: clamp(24px, 8vw, 36px);
    }

    .bjld-equipment-slot small {
        font-size: clamp(7px, 2vw, 9px);
    }

    .bjld-equipment-popover {
        bottom: 12px;
        left: 12px;
        max-height: min(70vh, 560px);
        max-width: calc(100vw - 24px);
        min-width: 0;
        overflow: auto;
        position: fixed;
        right: 12px;
        top: auto;
        z-index: 100;
    }

    .bjld-equipment-mobile-card:not([hidden]) {
        background: #2d1010;
        border: 1px solid #d6ad45;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.45);
        display: block;
        grid-area: doll;
        max-height: 100%;
        min-height: 0;
        overflow: hidden;
        padding: 10px;
        position: relative;
        z-index: 80;
    }

    .bjld-equipment-mobile-card-close {
        align-items: center;
        background: #fff7e6;
        border: 1px solid #c28a0c;
        color: #402b00;
        cursor: pointer;
        display: flex;
        font: inherit;
        font-weight: 700;
        height: 28px;
        justify-content: center;
        padding: 0;
        position: absolute;
        right: 8px;
        top: 8px;
        width: 28px;
        z-index: 2;
    }

    .bjld-equipment-mobile-card-body {
        max-height: 100%;
        overflow: auto;
        padding-right: 2px;
    }

    .bjld-equipment-mobile-card-body .bjld-item-card {
        margin: 0;
        max-width: none;
        min-width: 0;
        padding-top: 34px;
        width: 100%;
    }
}

@media (max-width: 760px) and (hover: none) {
    .bjld-equipment-slot:hover .bjld-equipment-popover,
    .bjld-equipment-slot:focus-within .bjld-equipment-popover {
        display: none;
    }
}

.bjld-gear-tracker {
    --gear-border: #cbd5df;
    --gear-ink: #172b2a;
    --gear-accent: #12695f;
    position: relative;
}

.bjld-gear-toolbar,
.bjld-gear-controls,
.bjld-gear-pattern-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-bottom: 12px;
}

.bjld-gear-toolbar label,
.bjld-gear-controls > label,
.bjld-gear-pattern-toolbar label,
.bjld-gear-edit-form label,
.bjld-gear-mapping-editor label {
    display: grid;
    font-size: 12px;
    font-weight: 700;
    gap: 4px;
}

.bjld-gear-profile-field select {
    width: 250px;
}

.bjld-gear-display-field select {
    width: 150px;
}

.bjld-segmented {
    display: inline-flex;
    margin-left: auto;
}

.bjld-segmented button,
.bjld-gear-character-filters button,
.bjld-gear-slot-filters button {
    background: #fff;
    border: 1px solid var(--gear-border);
    color: var(--gear-ink);
    cursor: pointer;
    font: inherit;
    padding: 7px 10px;
}

.bjld-segmented button + button {
    border-left: 0;
}

.bjld-segmented button.is-active,
.bjld-gear-character-filters button.is-active,
.bjld-gear-slot-filters button.is-active {
    background: var(--gear-accent);
    border-color: var(--gear-accent);
    color: #fff;
}

.bjld-gear-legend,
.bjld-pattern-legend {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-left: auto;
}

.bjld-gear-legend span,
.bjld-pattern-legend span {
    font-size: 11px;
    white-space: nowrap;
}

.bjld-gear-legend b,
.bjld-gear-flags b {
    align-items: center;
    background: #dff2ef;
    border: 1px solid #7fc3b9;
    border-radius: 3px;
    color: #0a5b52;
    display: inline-flex;
    font-size: 10px;
    height: 17px;
    justify-content: center;
    min-width: 17px;
    padding: 0 3px;
    width: auto;
}

.bjld-gear-character-filters {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 8px 0;
}

.bjld-gear-character-filter-group,
.bjld-gear-character-filter-group > div,
.bjld-gear-slot-filter-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.bjld-gear-character-filter-group {
    gap: 8px;
}

.bjld-gear-character-filter-group > strong {
    font-size: 12px;
    white-space: nowrap;
}

.bjld-gear-character-filters button,
.bjld-gear-slot-filters button {
    font-size: 11px;
    padding: 5px 8px;
}

.bjld-gear-slot-filters {
    display: grid;
    gap: 4px;
    margin: 4px 0 12px;
}

.bjld-gear-alerts {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
}

.bjld-gear-alerts div {
    background: #fff7e6;
    border: 1px solid #e5b94d;
    color: #664b05;
    padding: 8px 10px;
}

.bjld-gear-grid-wrap {
    border: 1px solid var(--gear-border);
    max-height: 72vh;
    overflow: auto;
    position: relative;
}

.bjld-gear-grid {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    min-width: 100%;
    table-layout: fixed;
}

.bjld-gear-grid th,
.bjld-gear-grid td {
    background: #fff;
    border-bottom: 1px solid #e4e9ee;
    border-right: 1px solid #e4e9ee;
    min-width: 132px;
    padding: 0;
    vertical-align: stretch;
}

.bjld-gear-grid thead th {
    background: #e9f4f2;
    color: #213b39;
    font-size: 11px;
    padding: 8px 6px;
    position: sticky;
    text-align: center;
    top: 0;
    z-index: 12;
}

.bjld-gear-grid .bjld-gear-character-col {
    background: #f7faf9;
    left: 0;
    min-width: 180px;
    padding: 8px 10px;
    position: sticky;
    text-align: left;
    width: 180px;
    z-index: 10;
}

.bjld-gear-grid thead .bjld-gear-character-col {
    background: #dceeea;
    z-index: 20;
}

.bjld-gear-character-col a,
.bjld-gear-character-col small {
    display: block;
}

.bjld-gear-character-col small {
    color: #64727a;
    font-weight: 400;
    margin-top: 2px;
}

.bjld-stale-badge {
    background: #8b3d2f;
    color: #fff;
    display: inline-block;
    font-size: 9px;
    margin-top: 5px;
    padding: 2px 5px;
    text-transform: uppercase;
}

.bjld-gear-grid tr.is-stale td {
    background: #fffbf3;
}

.bjld-gear-cell,
.bjld-pattern-cell {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--gear-ink);
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 4px;
    height: 100%;
    min-height: 72px;
    padding: 7px;
    position: relative;
    text-align: left;
    width: 100%;
}

.bjld-gear-cell-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    display: grid;
    font: inherit;
    gap: 4px;
    height: 100%;
    padding: 7px;
    text-align: left;
    width: 100%;
}

.bjld-gear-cell:hover,
.bjld-gear-cell:focus,
.bjld-pattern-cell:hover,
.bjld-pattern-cell:focus {
    box-shadow: inset 0 0 0 2px var(--gear-accent);
    outline: none;
    z-index: 6;
}

.bjld-gear-cell.has-item:focus-within,
.bjld-gear-cell-trigger:focus {
    box-shadow: inset 0 0 0 2px var(--gear-accent);
    outline: none;
}

.bjld-gear-cell.is-empty,
.bjld-gear-cell.is-two-handed {
    color: #82909a;
    justify-items: center;
    text-align: center;
}

.bjld-gear-cell-icon {
    align-items: center;
    background: #e9eef1;
    display: flex;
    height: 26px;
    justify-content: center;
    overflow: hidden;
    width: 26px;
}

.bjld-gear-cell-icon img {
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.bjld-gear-cell-value {
    min-width: 0;
}

.bjld-gear-cell-value strong,
.bjld-gear-cell-value small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bjld-gear-cell-value small {
    color: #62717a;
    font-size: 9px;
}

.bjld-gear-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    justify-content: center;
}

.bjld-gear-incomplete {
    align-items: center;
    background: #fff1c2;
    border: 1px solid #d9a20b;
    border-radius: 50%;
    color: #674d00;
    display: flex;
    font-style: normal;
    height: 18px;
    justify-content: center;
    position: absolute;
    right: 5px;
    top: 5px;
    width: 18px;
}

.bjld-gear-hover-card {
    display: none;
    left: calc(100% - 10px);
    max-height: 65vh;
    min-width: 330px;
    overflow: auto;
    position: absolute;
    top: 8px;
    z-index: 100;
}

.bjld-gear-cell:hover .bjld-gear-hover-card,
.bjld-gear-cell:focus .bjld-gear-hover-card,
.bjld-gear-cell:focus-within .bjld-gear-hover-card {
    display: block;
}

.bjld-gear-cell.is-hover-card-above .bjld-gear-hover-card {
    bottom: 8px;
    top: auto;
}

.bjld-gear-cell.is-hover-card-viewport {
    z-index: 30;
}

.bjld-gear-cell.is-hover-card-viewport .bjld-gear-hover-card {
    bottom: auto;
    position: fixed;
    z-index: 1000;
}

.bjld-gear-total-col {
    background: #f1f7f5 !important;
    min-width: 72px !important;
    text-align: center;
    width: 72px;
}

.bjld-pattern-legend span,
.bjld-pattern-detail,
.bjld-pattern-cell {
    border-left: 4px solid #80909a;
}

[data-pattern-status="needed"] { border-color: #b54a3a !important; }
[data-pattern-status="reserved"] { border-color: #cb9312 !important; }
[data-pattern-status="redeemed"] { border-color: #3d7fbd !important; }
[data-pattern-status="equipped"] { border-color: #27845c !important; }
[data-pattern-status="not_needed"] { border-color: #77828a !important; }

.bjld-pattern-legend span {
    background: #f4f7f8;
    padding: 4px 7px;
}

.bjld-pattern-cell strong,
.bjld-pattern-cell small,
.bjld-pattern-cell i,
.bjld-pattern-quantity {
    display: block;
}

.bjld-pattern-quantity {
    color: #53636b;
    font-size: 10px;
}

.bjld-pattern-cell small {
    font-size: 9px;
}

.bjld-pattern-cell i {
    color: #78610f;
    font-size: 9px;
}

.bjld-gear-drawer {
    background: #f8faf9;
    border-left: 1px solid #9caaa8;
    bottom: 0;
    box-shadow: -12px 0 30px rgba(27, 47, 44, .22);
    max-width: min(560px, 96vw);
    overflow: auto;
    padding: 22px;
    position: fixed;
    right: 0;
    top: 0;
    width: 560px;
    z-index: 10000;
}

.bjld .bjld-gear-drawer-close {
    align-items: center;
    appearance: none;
    background: #12695f !important;
    border: 1px solid #0a514a;
    border-radius: 50%;
    color: transparent !important;
    cursor: pointer;
    display: inline-flex;
    flex: 0 0 40px;
    font-size: 0;
    height: 40px;
    justify-content: center;
    line-height: 0;
    min-height: 40px;
    min-width: 40px;
    padding: 0 !important;
    position: sticky;
    top: 0;
    width: 40px;
    z-index: 5;
}

.bjld .bjld-gear-drawer-close::before,
.bjld .bjld-gear-drawer-close::after {
    background: #fff;
    border-radius: 2px;
    content: '';
    height: 2px;
    left: 50%;
    position: absolute;
    top: 50%;
    width: 19px;
}

.bjld .bjld-gear-drawer-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.bjld .bjld-gear-drawer-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.bjld .bjld-gear-drawer-close:hover,
.bjld .bjld-gear-drawer-close:focus-visible {
    background: #0a514a !important;
    box-shadow: 0 0 0 3px rgba(18, 105, 95, .25);
    outline: 2px solid #fff;
    outline-offset: -4px;
}

.bjld-gear-drawer header {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.bjld-gear-drawer h3,
.bjld-gear-drawer h4 {
    margin: 0 0 7px;
}

.bjld-gear-drawer section,
.bjld-gear-edit-form,
.bjld-pattern-detail {
    border-top: 1px solid #d8e0e2;
    margin-top: 16px;
    padding-top: 16px;
}

.bjld-gear-edit-form {
    display: grid;
    gap: 9px;
}

.bjld-gear-edit-form input,
.bjld-gear-edit-form select,
.bjld-gear-edit-form textarea,
.bjld-gear-mapping-editor input,
.bjld-gear-mapping-editor select {
    max-width: none;
    width: 100%;
}

.bjld-gear-item-suggestions {
    border: 1px solid #ccd6db;
    display: grid;
    max-height: 220px;
    overflow: auto;
}

.bjld-gear-item-suggestions:empty {
    display: none;
}

.bjld-gear-item-suggestions button {
    background: #fff;
    border: 0;
    border-bottom: 1px solid #e5eaed;
    cursor: pointer;
    padding: 8px;
    text-align: left;
}

.bjld-gear-item-suggestions strong,
.bjld-gear-item-suggestions small {
    display: block;
}

.bjld-gear-holdings {
    display: grid;
    gap: 12px;
}

.bjld-gear-holdings article {
    background: #fff;
    border: 1px solid #d5dde1;
    padding: 10px;
}

.bjld-gear-mapping-editor {
    border: 1px solid #cbd5df;
    margin-top: 14px;
    padding: 12px;
}

.bjld-gear-mapping-editor form {
    align-items: end;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(200px, 2fr) repeat(3, minmax(120px, 1fr)) auto;
}

.bjld-gear-mapping-editor .bjld-gear-item-suggestions {
    grid-column: 1;
}

.bjld-gear-mapping-row {
    align-items: center;
    border-top: 1px solid #e0e6e9;
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.bjld-gear-mapping-row small {
    display: block;
}

.bjld-pattern-detail {
    display: grid;
    gap: 4px;
    padding-left: 12px;
}

.bjld-sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0 0 0 0);
}

@media (max-width: 760px) {
    .bjld-gear-toolbar,
    .bjld-gear-controls,
    .bjld-gear-pattern-toolbar {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
    }

    .bjld-segmented,
    .bjld-gear-legend,
    .bjld-pattern-legend {
        margin-left: 0;
    }

    .bjld-segmented button {
        flex: 1;
    }

    .bjld-gear-profile-field select,
    .bjld-gear-display-field select {
        width: 100%;
    }

    .bjld-gear-grid th,
    .bjld-gear-grid td {
        min-width: 112px;
    }

    .bjld-gear-grid .bjld-gear-character-col {
        min-width: 140px;
        width: 140px;
    }

    .bjld-gear-cell {
        min-height: 66px;
    }

    .bjld-gear-hover-card {
        display: none !important;
    }

    .bjld-gear-drawer {
        border-left: 0;
        max-width: none;
        padding: 14px;
        width: 100vw;
    }

    .bjld-gear-mapping-editor form {
        grid-template-columns: 1fr;
    }
}
