/* Header status bar */
.site-header {
    background: #090b12 !important;
    color: #e8ecff !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
}

.site-header .mud-toolbar-appbar {
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
    padding: 0 !important;
}

.server-status-bar {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 14px;
    background: #090e18;
    border-top: 1px solid rgba(255, 255, 255, .18);
    border-bottom: 1px solid rgba(111, 133, 170, .28);
    color: #aeb7ca;
    font-size: .74rem;
    line-height: 1;
    white-space: nowrap;
}

.server-service-cluster,
.server-faction-cluster,
.server-time {
    display: inline-flex;
    align-items: center;
}

.server-service-cluster {
    gap: 14px;
}

.server-time strong,
.server-faction-pill strong {
    color: #ffffff;
    font-weight: 800;
}

.server-service-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #c3ccdd;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.server-health-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.server-health-dot--online {
    background: #35d07f;
    box-shadow: 0 0 10px rgba(53, 208, 127, .58);
}

.server-health-dot--offline {
    background: #ff526d;
    box-shadow: 0 0 12px rgba(255, 82, 109, .6);
}

.server-status-separator {
    width: 1px;
    height: 22px;
    background: rgba(111, 133, 170, .25);
}

.server-status-spacer {
    flex: 1;
}

.server-faction-cluster {
    gap: 10px;
}

.server-faction-pill {
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    border: 1px solid rgba(126, 146, 184, .32);
    border-radius: 999px;
    background: rgba(16, 24, 38, .76);
    color: #d7ddea;
}

.server-faction-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, .28));
}

.server-time {
    gap: 8px;
}

.site-main-nav {
    min-height: 64px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #12122A;
}

.site-main-content {
    padding-top: 98px !important;
}

.tmp-hero {
    top: 98px !important;
}

/* User dropdown menu */
.user-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-dropdown > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    border-radius: 4px;
    color: inherit;
    font-size: 0.875rem;
    letter-spacing: 0.02857em;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s;
    white-space: nowrap;
}

.user-dropdown > summary::-webkit-details-marker { display: none; }
.user-dropdown > summary::marker { display: none; }

.user-dropdown > summary:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.header-credit-balance {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-right: 6px;
    padding: 6px 9px;
    border: 0;
    border-radius: 999px;
    color: #f0b71c;
    font-size: .78rem;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    transition: background-color .15s;
}

.header-credit-balance:hover {
    color: #ffd65a;
    background: rgba(240, 183, 28, .1);
    text-decoration: none;
}

.header-credit-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.header-credit-dropdown > summary {
    list-style: none;
    cursor: pointer;
}

.header-credit-dropdown > summary::-webkit-details-marker { display: none; }
.header-credit-dropdown > summary::marker { display: none; }

.header-credit-dropdown[open] > summary::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.header-credit-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 7px);
    min-width: 250px;
    padding: 12px;
    border: 1px solid rgba(240, 183, 28, .28);
    border-radius: 6px;
    background: #141522;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .48);
    z-index: 1201;
    color: #e8ecff;
    white-space: normal;
}

.header-credit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 5px 0;
    font-size: .78rem;
}

.header-credit-row strong {
    color: #f0b71c;
}

.header-credit-row--total {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 4px;
    padding-bottom: 8px;
    font-weight: 800;
}

.header-credit-note {
    color: #9ea8bd;
    font-size: .68rem;
    line-height: 1.25;
    padding-bottom: 5px;
}

.header-credit-grants {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    max-height: 170px;
    overflow-y: auto;
}

.header-credit-grants-title {
    margin-bottom: 5px;
    color: #c8d0e8;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.header-credit-grant-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: baseline;
    padding: 4px 0;
    font-size: .72rem;
}

.header-credit-grant-row strong {
    color: #f0b71c;
}

.header-credit-grant-row span {
    color: #aeb7ce;
    text-align: right;
}

.header-credit-wallet-link {
    display: block;
    margin-top: 8px;
    padding: 7px 8px;
    border-radius: 4px;
    background: rgba(240, 183, 28, .1);
    color: #ffd65a;
    font-size: .76rem;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
}

.header-credit-wallet-link:hover {
    background: rgba(240, 183, 28, .16);
    color: #ffe28a;
    text-decoration: none;
}

/* Invisible overlay — clicking outside closes the dropdown */
.user-dropdown[open] > summary::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.user-dropdown--left .user-dropdown-panel {
    left: 0;
    right: auto;
}

.user-dropdown-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    min-width: 160px;
    width: max-content;
    background: #1A1A2E;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    z-index: 1201;
    overflow: hidden;
    white-space: nowrap;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: #E0E0FF;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background-color 0.15s;
}

.user-dropdown-item:hover {
    background-color: rgba(124, 77, 255, 0.12);
}

.user-dropdown-item--indented {
    padding-left: 26px;
    font-size: 0.8125rem;
}

.user-dropdown-label {
    padding: 6px 16px 3px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(160, 140, 255, 0.6);
    pointer-events: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 4px;
}

/* Responsive nav breakpoint (md = 960px) */
@media (min-width: 960px) {
    .nav-burger        { display: none !important; }
    .app-title-short   { display: none !important; }
}
@media (max-width: 959.95px) {
    .nav-desktop-only  { display: none !important; }
    .app-title-full    { display: none !important; }
    .user-name-desktop { display: none !important; }
    .header-credit-label { display: none; }
    .header-credit-balance { padding: 6px 8px; }
    .server-status-bar {
        min-height: 46px;
        gap: 8px;
        padding: 6px 10px;
        overflow-x: auto;
    }
    .server-status-separator--optional,
    .server-faction-pill > span {
        display: none;
    }
    .site-main-content {
        padding-top: 110px !important;
    }
    .tmp-hero {
        top: 110px !important;
    }
}

/* ── Mobile burger nav ──────────────────────────────────── */
.mobile-nav {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
}

.mobile-nav-toggle {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    color: inherit;
    transition: background-color 0.15s;
    padding: 0;
}

.mobile-nav-toggle::-webkit-details-marker { display: none; }
.mobile-nav-toggle::marker { display: none; }

.mobile-nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Backdrop — clicking it closes the drawer (same trick as user-dropdown) */
.mobile-nav[open] > .mobile-nav-toggle::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.45);
}

/* Drawer panel — slides in from left, above the backdrop */
.mobile-nav-panel {
    display: none;
}

.mobile-nav[open] .mobile-nav-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 64px; /* MudBlazor default AppBar height */
    bottom: 0;
    width: 260px;
    background: #12122A;
    z-index: 1201;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.6);
    overflow-y: auto;
}

.mobile-nav-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 4px 0;
}

.mobile-nav-user {
    padding: 12px 16px 6px;
}

.mobile-nav-user-caption {
    font-size: 0.75rem;
    color: #9E9EC0;
}

.mobile-nav-user-name {
    font-size: 0.875rem;
    color: #E0E0FF;
    font-weight: 500;
}

/* Nav links inside the mobile drawer */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #E0E0FF;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.15s;
}

.mobile-nav-link:hover {
    background-color: rgba(124, 77, 255, 0.12);
    color: #E0E0FF;
}

.mobile-nav-link--active {
    color: #7C4DFF;
    background-color: rgba(124, 77, 255, 0.1);
    font-weight: 600;
}

.mobile-nav-group-label {
    padding: 12px 20px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #9E9EC0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.mobile-nav-sub-label {
    padding: 8px 20px 2px 28px;
    font-size: 0.65rem;
    font-weight: 700;
    color: rgba(158, 158, 192, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mobile-nav-link--indented {
    padding-left: 32px;
}

/* Section label inside a desktop dropdown panel */
.user-dropdown-section {
    padding: 8px 16px 4px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(160, 160, 200, 0.55);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin-top: 2px;
}

.user-dropdown-panel > .user-dropdown-section:first-child {
    border-top: none;
    margin-top: 0;
}

/* Shared control-panel page primitives */
.cp-page-header {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.025);
}

.cp-page-header__row,
.cp-toolbar,
.cp-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.cp-page-icon,
.cp-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(124, 77, 255, 0.14);
    color: #9c7cff;
}

.cp-page-title,
.cp-section-title {
    font-weight: 700;
}

.cp-header-copy,
.cp-toolbar-copy {
    min-width: 220px;
}

.cp-panel,
.cp-stat-card,
.cp-empty-state {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.cp-panel {
    padding: 20px;
}

.cp-panel--tight,
.cp-stat-card {
    padding: 16px;
}

.cp-stat-grid {
    margin: 16px 0;
}

.cp-stat-card {
    height: 100%;
}

.cp-kicker {
    color: var(--mud-palette-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
}

.cp-stat-value {
    font-weight: 800;
    line-height: 1.15;
}

.cp-toolbar {
    justify-content: space-between;
    margin-bottom: 16px;
}

.cp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.cp-form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.cp-empty-state {
    padding: 32px 18px;
    text-align: center;
    color: var(--mud-palette-text-secondary);
}

.cp-empty-state .mud-icon-root {
    font-size: 32px;
    margin-bottom: 8px;
}

.cp-table-shell {
    overflow: hidden;
}

.cp-table-shell .mud-table {
    background: transparent;
}

.cp-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.cp-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cp-action-row {
    justify-content: flex-end;
}

@media (max-width: 600px) {
    .cp-page-header,
    .cp-panel {
        padding: 14px;
    }

    .cp-page-header__row > .mud-button-root,
    .cp-toolbar > .mud-button-root,
    .cp-toolbar .mud-input-control,
    .cp-action-row .mud-button-root {
        width: 100%;
    }

    .cp-form-grid,
    .cp-form-grid--three {
        grid-template-columns: 1fr;
    }
}

/* Admin accordion sub-menu (used inside .user-dropdown-panel and mobile nav) */
.admin-submenu {
    display: block;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-submenu:first-of-type {
    border-top: none;
}

.admin-submenu > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(160, 160, 200, 0.55);
    cursor: pointer;
    user-select: none;
    transition: background-color 0.15s, color 0.15s;
}

.admin-submenu > summary::-webkit-details-marker { display: none; }
.admin-submenu > summary::marker { display: none; }

.admin-submenu > summary::after {
    content: '\203A';
    font-size: 1.1rem;
    line-height: 1;
    margin-left: auto;
    padding-left: 8px;
    transition: transform 0.15s;
    display: inline-block;
}

.admin-submenu[open] > summary::after {
    transform: rotate(90deg);
}

.admin-submenu > summary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(160, 160, 200, 0.85);
}

.admin-submenu > summary:hover::after {
    color: rgba(160, 160, 200, 0.85);
}

/* Indent items inside an open sub-menu */
.admin-submenu > a.user-dropdown-item,
.admin-submenu > form,
.admin-submenu > div > a.user-dropdown-item {
    padding-left: 24px;
}

/* Mobile: slightly larger touch target for sub-menu summary */
.mobile-nav-links .admin-submenu > summary {
    padding: 10px 16px 10px 20px;
    font-size: 0.7rem;
}

.mobile-nav-links .admin-submenu > a.mobile-nav-link {
    padding-left: 36px;
}

/* ── CharacterViewer — Achievements/Titles tab ─────────────────────────── */
.cv-title-library {
    padding: 8px 0 20px;
}

.cv-title-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.cv-title-section-head--achievements {
    margin-top: 18px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.cv-title-section-head h2 {
    margin: 0 0 3px;
    color: #e4e9f5;
    font-size: 1rem;
}

.cv-title-section-head p {
    margin: 0;
    color: #708099;
    font-size: .72rem;
}

.cv-title-count {
    min-width: 28px;
    padding: 3px 8px;
    border: 1px solid rgba(232,169,25,.3);
    border-radius: 999px;
    color: #e8a919;
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
}

.cv-title-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 10px;
}

.cv-title-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 11px;
    border: 1px solid rgba(120,150,200,.14);
    border-radius: 7px;
    background: #111827;
}

.cv-title-card--selected {
    border-color: rgba(232,169,25,.55);
    background: linear-gradient(90deg, rgba(232,169,25,.1), #111827 55%);
}

.cv-title-icon {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    overflow: hidden;
    border: 1px solid rgba(232,169,25,.28);
    border-radius: 5px;
    background: #060a14;
}

.cv-title-icon img,
.cv-title-empty img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cv-title-copy {
    min-width: 0;
    padding-right: 58px;
}

.cv-title-name {
    overflow: hidden;
    color: #f0e5c7;
    font-size: .85rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-title-id {
    margin-top: 3px;
    color: #5b779a;
    font-size: .66rem;
}

.cv-title-bonuses {
    overflow: hidden;
    margin-top: 4px;
    color: #8faac8;
    font-size: .65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-title-selected {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #e8a919;
    color: #171108;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cv-title-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 120px;
    border: 1px dashed rgba(120,150,200,.16);
    border-radius: 7px;
    color: #66758d;
    font-size: .8rem;
}

.cv-title-empty img {
    width: 42px;
    height: 42px;
    opacity: .45;
}

.cv-achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    padding: 8px 0;
}

.cv-ach-card {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #111827;
    border-radius: 6px;
    padding: 12px;
    border: 1px solid rgba(255,255,255,0.07);
    transition: box-shadow 0.15s;
}

.cv-ach-card:hover {
    box-shadow: 0 0 12px rgba(124,77,255,0.15);
}

.cv-ach-badge {
    width: 72px;
    height: 72px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 6px;
}

.cv-ach-badge-placeholder {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
}

.cv-ach-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cv-ach-name {
    font-size: .9rem;
    font-weight: 700;
    color: #e0e0ff;
}

.cv-ach-desc {
    font-size: .75rem;
    color: rgba(160,160,200,0.75);
    line-height: 1.4;
}

.cv-ach-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.cv-event-title-rarity {
    font-size: .65rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.cv-ach-season {
    font-size: .7rem;
    color: rgba(160,160,200,0.6);
}

.cv-ach-awarded {
    font-size: .7rem;
    color: rgba(160,160,200,0.5);
    margin-top: 2px;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ── Codex ────────────────────────────────────────────────────────────── */

/* Shared input resets */
.codex-range-input, .codex-select, .codex-select-sm, .codex-tbl-search {
    background: #12121f;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 4px;
    color: #e0e0e0;
    padding: .3rem .5rem;
    font-size: .82rem;
    outline: none;
    transition: border-color .15s;
}
.codex-range-input:focus, .codex-select:focus, .codex-select-sm:focus, .codex-tbl-search:focus {
    border-color: rgba(232,169,25,.6);
}

/* ── Hero (Codex.razor) ─────────────────────────────────────────────── */

.codex-hero {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #16213e 100%);
    padding: 3rem 1rem 2.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.codex-hero-inner {
    max-width: 700px;
    margin: 0 auto;
}

.codex-hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #e8a919;
    margin: 0 0 .4rem;
}

.codex-hero-sub {
    color: #9fa3a8;
    margin: 0 0 1.5rem;
    font-size: .95rem;
}

.codex-search-bar {
    display: flex;
    justify-content: center;
}

/* ── Category tab row (CodexItems) ──────────────────────────────────── */

.codex-cat-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.codex-cat-btn {
    padding: .3rem .85rem;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 4px;
    background: rgba(255,255,255,.04);
    color: #b0b0b0;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    user-select: none;
}
.codex-cat-btn:hover  { background: rgba(255,255,255,.09); color: #e0e0e0; }
.codex-cat-btn.active { background: #e8a919; border-color: #e8a919; color: #0d0d1a; font-weight: 600; }

/* ── Filter panel ────────────────────────────────────────────────────── */

.codex-filter-panel {
    background: #111120;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    padding: 1rem 1.25rem;
}

.codex-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: flex-end;
    margin-bottom: .75rem;
}

.codex-filter-group {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.codex-filter-label {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #9fa3a8;
}

.codex-range-inputs {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.codex-range-input {
    width: 70px;
    text-align: center;
}

.codex-range-sep { color: #9fa3a8; font-size: .85rem; }

.codex-race-btns { display: flex; gap: .35rem; }

.codex-race-btn {
    padding: .3rem .7rem;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.04);
    color: #b0b0b0;
    font-size: .8rem;
    cursor: pointer;
    transition: all .15s;
}
.codex-race-elyos.active { background: #b8860b; border-color: #e8a919; color: #fff; font-weight: 600; }
.codex-race-asmo.active  { background: #5a2d82; border-color: #a335ee; color: #fff; font-weight: 600; }
.codex-race-btn:not(.active):hover { background: rgba(255,255,255,.09); }

.codex-select { min-width: 110px; }

/* Quality checkboxes */
.codex-quality-checks {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem 1rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(255,255,255,.07);
}

.codex-quality-check {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}
.codex-quality-check input[type="checkbox"] {
    accent-color: #e8a919;
    width: 14px;
    height: 14px;
    cursor: pointer;
}

/* ── Table controls ──────────────────────────────────────────────────── */

.codex-tbl-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .6rem;
    margin-bottom: .5rem;
}

.codex-ctrl-lbl { font-size: .82rem; color: #9fa3a8; }

.codex-select-sm { width: 65px; text-align: center; padding: .28rem .4rem; }

.codex-reset-btn {
    padding: .28rem .75rem;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 4px;
    background: rgba(255,255,255,.04);
    color: #b0b0b0;
    font-size: .8rem;
    cursor: pointer;
    transition: background .15s;
}
.codex-reset-btn:hover { background: rgba(255,255,255,.09); color: #e0e0e0; }

.codex-tbl-search { width: 180px; }

/* ── Table meta (entry info + pagination row) ────────────────────────── */

.codex-tbl-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .35rem;
}

.codex-entry-info { font-size: .8rem; color: #9fa3a8; }

/* ── Pagination ──────────────────────────────────────────────────────── */

.codex-pagination {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
}

.codex-page-btn {
    min-width: 34px;
    height: 30px;
    padding: 0 .5rem;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 3px;
    background: rgba(255,255,255,.04);
    color: #b0b0b0;
    font-size: .8rem;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.codex-page-btn:hover:not(:disabled) { background: rgba(255,255,255,.09); color: #e0e0e0; }
.codex-page-btn.active { background: #e8a919; border-color: #e8a919; color: #0d0d1a; font-weight: 700; }
.codex-page-btn:disabled { opacity: .35; cursor: default; }

.codex-page-ellipsis { color: #9fa3a8; font-size: .8rem; padding: 0 .3rem; }

/* ── Item table ──────────────────────────────────────────────────────── */

.codex-tbl-wrap {
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    overflow: hidden;
}

.codex-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}

.codex-th {
    background: #0e0e1c;
    color: #9fa3a8;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .6rem .9rem;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,.1);
    white-space: nowrap;
}

.codex-th-sort {
    cursor: pointer;
    user-select: none;
}
.codex-th-sort:hover { color: #e8a919; }

.codex-sort-icon { margin-left: .3rem; opacity: .6; font-size: .8rem; }

.codex-tr {
    cursor: pointer;
    transition: background .1s;
}
.codex-tr:nth-child(even) { background: rgba(255,255,255,.02); }
.codex-tr:hover { background: rgba(232,169,25,.08) !important; }

.codex-td {
    padding: .5rem .9rem;
    color: #d0d0d0;
    border-bottom: 1px solid rgba(255,255,255,.05);
    vertical-align: middle;
}

.codex-td-id { color: #606470; font-size: .78rem; white-space: nowrap; }

.codex-td-name {
    display: flex;
    align-items: center;
    gap: 0;
    font-weight: 500;
    padding: 0;          /* icon fills edge to edge vertically */
}

.codex-td-empty {
    padding: 2rem;
    text-align: center;
    color: #9fa3a8;
}

.codex-type-pill {
    padding: .15rem .5rem;
    background: rgba(255,255,255,.07);
    border-radius: 3px;
    font-size: .75rem;
    color: #9fa3a8;
    white-space: nowrap;
}

/* ── Codex landing — category cards (Codex.razor) ───────────────────── */

.codex-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    padding: 1.25rem .75rem;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, transform .12s;
    user-select: none;
}
.codex-cat-card:hover { background: rgba(255,255,255,.08); transform: translateY(-2px); }
.codex-cat-name { font-size: .85rem; font-weight: 600; color: #d0d0d0; }

.codex-quality-row { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.codex-quality-badge {
    padding: .35rem .9rem;
    border: 1.5px solid;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.codex-quality-badge:hover { background: rgba(255,255,255,.08); }

.title-codex {
    min-height: calc(100vh - 64px);
    margin: -24px -16px 0;
    background: #09090f;
    color: #c8d4e8;
}

.title-codex__hero {
    padding: 48px clamp(20px, 5vw, 64px) 34px;
    background: linear-gradient(180deg, #0a0e1e 0%, #09090f 100%);
    border-bottom: 1px solid rgba(100,160,255,.08);
}

.title-codex__back {
    display: inline-block;
    margin-bottom: 24px;
    color: #7ab4ff;
    font-size: .78rem;
    text-decoration: none;
}

.title-codex__eyebrow {
    color: #e8a919;
    font-size: .65rem;
    letter-spacing: .26em;
    text-transform: uppercase;
}

.title-codex__hero h1 {
    margin: 8px 0 4px;
    color: #f0e5c7;
    font-family: Georgia, serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.title-codex__hero p {
    margin: 0 0 24px;
    color: rgba(160,190,230,.65);
}

.title-codex__search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 560px);
    padding: 0 14px;
    border: 1px solid rgba(232,169,25,.35);
    border-radius: 6px;
    background: rgba(10,15,40,.75);
    color: #e8a919;
}

.title-codex__search:focus-within {
    border-color: #e8a919;
    box-shadow: 0 0 0 2px rgba(232,169,25,.12);
}

.title-codex__search input {
    width: 100%;
    padding: 13px 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #eef3ff;
    font: inherit;
}

.title-codex__content {
    padding: 24px clamp(20px, 5vw, 64px) 56px;
}

.title-codex__summary {
    margin-bottom: 14px;
    color: rgba(120,160,215,.75);
    font-size: .78rem;
}

.title-codex__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.title-codex__card {
    display: flex;
    gap: 14px;
    min-width: 0;
    padding: 14px;
    border: 1px solid rgba(100,160,255,.12);
    border-radius: 8px;
    background: rgba(12,17,38,.8);
}

.title-codex__icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    overflow: hidden;
    border: 1px solid rgba(232,169,25,.3);
    border-radius: 6px;
    background: #060a14;
}

.title-codex__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.title-codex__body {
    min-width: 0;
}

.title-codex__body h2 {
    overflow: hidden;
    margin: 1px 0 4px;
    color: #e8edf7;
    font-size: .92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.title-codex__id {
    color: #5f91c8;
    font-size: .7rem;
}

.title-codex__bonuses {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.title-codex__bonuses span {
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(232,169,25,.1);
    color: #d6b65d;
    font-size: .65rem;
}

.title-codex__state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 220px;
    color: #8393ac;
    text-align: center;
}

/* Detail page */
.codex-detail-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
}

.codex-detail-icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,.4);
    border-radius: 4px;
    overflow: hidden;
}

.codex-detail-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    display: block;
}

.codex-detail-title-block {
    flex: 1;
    min-width: 0;
}

.codex-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin: .4rem 0;
}

.codex-tag {
    padding: .15rem .55rem;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 4px;
    font-size: .75rem;
    color: #d0d0d0;
}

.codex-tag--quest {
    border-color: #e8a919;
    color: #e8a919;
}

.codex-detail-body {
    padding: .5rem 1.5rem 1.5rem;
}

.codex-section {
    margin-top: 1.25rem;
}

.codex-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #9fa3a8;
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding-bottom: .3rem;
    margin-bottom: .6rem;
}

.codex-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: .35rem;
}

.codex-stat {
    display: flex;
    justify-content: space-between;
    font-size: .85rem;
    padding: .25rem .5rem;
    background: rgba(255,255,255,.03);
    border-radius: 4px;
}

.codex-stat span:first-child {
    color: #9fa3a8;
}

.codex-stat span:last-child {
    font-weight: 600;
    color: #e0e0e0;
}

.codex-flag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.codex-flag {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: .82rem;
    padding: .2rem .5rem;
    background: rgba(76,175,80,.08);
    border-radius: 4px;
    color: #c8e6c9;
}

.codex-flag--no {
    background: rgba(244,67,54,.06);
    color: #9fa3a8;
}

/* ── Item Tooltip ─────────────────────────────────────────────────────────── */

.item-tt {
    position: fixed;
    z-index: 9999;
    width: 296px;
    background: linear-gradient(175deg, #0d1526 0%, #080d1a 100%);
    border: 1px solid #2c4880;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,.85), 0 0 0 1px rgba(44,72,128,.25);
    pointer-events: none;
    font-size: .8rem;
    color: #bcc8dc;
    overflow: hidden;
}

.item-tt-header {
    padding: 10px 14px 8px;
    border-bottom: 1px solid #182040;
}

.item-tt-label {
    display: block;
    font-size: .62rem;
    letter-spacing: .13em;
    color: #4a6080;
    margin-bottom: 4px;
}

.item-tt-name {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 2px;
}

.item-tt-subtype {
    font-size: .74rem;
    color: #7890a8;
}

.item-tt-body {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid #182040;
    align-items: flex-start;
}

.item-tt-icon {
    flex-shrink: 0;
    border: 1px solid #243050;
    border-radius: 4px;
    background: #060a14;
    padding: 3px;
}

.item-tt-props {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: .78rem;
    color: #a8b8cc;
    padding-top: 1px;
}

.item-tt-section {
    padding: 7px 14px 3px;
    font-size: .62rem;
    letter-spacing: .12em;
    color: #c89030;
    font-weight: 600;
}

.item-tt-restrictions {
    padding: 0 14px 10px;
}

.item-tt-row {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .78rem;
    color: #a8b8cc;
    padding: 1px 0;
}

.item-tt-x {
    color: #e04040;
    font-size: .7rem;
    flex-shrink: 0;
}

/* ── Item Detail Page ─────────────────────────────────────────────────────── */

.idet-section-title {
    font-size: .7rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #4a6080;
    margin-bottom: 12px;
}

.idet-card {
    background: #0a1020;
    border: 1px solid #1e2e50;
    border-radius: 6px;
    overflow: hidden;
}

.idet-card-head {
    padding: 12px 16px 10px;
    border-bottom: 1px solid #182040;
}

.idet-label {
    display: block;
    font-size: .6rem;
    letter-spacing: .14em;
    color: #4a6080;
    margin-bottom: 5px;
}

.idet-name {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 3px;
}

.idet-sub {
    font-size: .76rem;
    color: #7890a8;
}

.idet-body {
    display: flex;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #182040;
    align-items: flex-start;
}

.idet-icon-wrap {
    flex-shrink: 0;
    border: 1px solid #243050;
    border-radius: 4px;
    background: #060a14;
    padding: 3px;
}

.idet-props {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: .82rem;
    color: #a8b8cc;
    padding-top: 2px;
}

.idet-restr-head {
    padding: 8px 16px 4px;
    font-size: .6rem;
    letter-spacing: .13em;
    color: #c89030;
    font-weight: 600;
}

.idet-restr-list {
    padding: 0 16px 12px;
}

.idet-restr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    color: #a8b8cc;
    padding: 2px 0;
}

.idet-x {
    color: #e04040;
    font-size: .72rem;
    flex-shrink: 0;
}

/* ── Item Summary grid ────────────────────────────────────────────────────── */

.isum-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #182040;
    border: 1px solid #182040;
    border-radius: 6px;
    overflow: hidden;
}

.isum-cell {
    background: #0a1020;
    padding: 13px 16px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.isum-cell--wide {
    grid-column: span 2;
}

.isum-label {
    font-size: .6rem;
    letter-spacing: .13em;
    color: #4a6080;
    font-weight: 600;
}

.isum-value {
    font-size: .95rem;
    color: #c8d8ec;
    font-weight: 600;
}

.isum-race-badges {
    display: flex;
    gap: 7px;
    margin-top: 2px;
}

.race-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: .72rem;
    font-weight: 700;
    cursor: default;
}

.race-elyos {
    background: rgba(100,160,255,.12);
    border: 1px solid rgba(100,160,255,.4);
    color: #80b0ff;
}

.race-asmo {
    background: rgba(255,172,50,.1);
    border: 1px solid rgba(255,172,50,.35);
    color: #ffaa30;
}

.item-tt-desc {
    padding: 8px 14px 12px;
    font-size: .76rem;
    color: #7890a8;
    font-style: italic;
    border-top: 1px solid #182040;
    line-height: 1.5;
}

.idet-desc {
    padding: 10px 16px 14px;
    font-size: .82rem;
    color: #7890a8;
    font-style: italic;
    border-top: 1px solid #182040;
    line-height: 1.55;
}

/* ── Item box contents ───────────────────────────────────────────────────── */

.ibox-group + .ibox-group {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #1e2e50;
}

.ibox-group-title {
    margin-bottom: 10px;
    color: #8ea8c7;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.ibox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 9px;
}

.ibox-item {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
    padding: 10px;
    border: 1px solid #1e2e50;
    border-radius: 6px;
    background: #0a1020;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s, background-color .15s, transform .15s;
}

.ibox-item:hover,
.ibox-item:focus-visible {
    border-color: #3862a0;
    background: #0d1730;
    transform: translateY(-1px);
    outline: none;
}

.ibox-item img {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid #2a3c60;
    border-radius: 4px;
    background: #060a14;
    image-rendering: pixelated;
}

.ibox-item-copy {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 2px;
}

.ibox-item-copy strong {
    overflow: hidden;
    font-size: .84rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ibox-item-copy small {
    color: #5f7898;
    font-size: .67rem;
}

.ibox-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: #9db2cc;
    font-size: .7rem;
}

@media (max-width: 600px) {
    .ibox-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Autocomplete search ──────────────────────────────────────────────────── */

.codex-ac-wrap {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.codex-ac-input {
    width: 100%;
    padding: 13px 48px 13px 18px;
    background: #1a1e2e;
    border: 1px solid #2a3a5a;
    border-radius: 8px;
    color: #e0e6f0;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}

.codex-ac-input:focus {
    border-color: #4a7aca;
    box-shadow: 0 0 0 2px rgba(74,122,202,.18);
}

.codex-ac-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #5a7090;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px;
    transition: color .15s;
}

.codex-ac-btn:hover { color: #a0b8d0; }

.codex-ac-drop {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #141824;
    border: 1px solid #2a3a5a;
    border-radius: 6px;
    box-shadow: 0 10px 36px rgba(0,0,0,.75);
    z-index: 2000;
    overflow: hidden;
    max-height: 500px;
    overflow-y: auto;
}

.codex-ac-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 11px;
    padding: 7px 14px;
    cursor: pointer;
    border-bottom: 1px solid #1a2236;
    transition: background .1s;
    text-align: left;
}

.codex-ac-row:last-child { border-bottom: none; }

.codex-ac-row:hover,
.codex-ac-row--active { background: #1e2a40; }

.codex-ac-icon {
    width: 40px;
    height: 40px;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 4px;
    background: #090d17;
    border: 1px solid rgba(90,112,144,.22);
    color: #7f98bb;
    display: grid;
    place-items: center;
}

.codex-ac-icon img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    image-rendering: pixelated;
}

.codex-ac-copy {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.codex-ac-name {
    font-size: .88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.codex-ac-name strong {
    color: #ffffff;
    font-weight: 700;
}

.codex-ac-sub {
    color: #667b99;
    font-size: .7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.codex-ac-tag {
    font-size: .62rem;
    color: #7890b4;
    flex-shrink: 0;
    text-transform: uppercase;
    letter-spacing: .08em;
    border: 1px solid rgba(90,112,144,.3);
    border-radius: 999px;
    padding: 2px 7px;
}

/* ── Shugo Search ─────────────────────────────────────────────────────────── */

.ss-hero {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 50%, #16213e 100%);
    padding: 3rem 1rem 2.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.ss-hero-inner {
    max-width: 620px;
    margin: 0 auto;
}

.ss-shugo-icon {
    margin-bottom: .6rem;
}

.ss-shugo-orb {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(232,169,25,.4);
    box-shadow: 0 0 20px rgba(232,169,25,.25);
    filter: drop-shadow(0 0 8px rgba(232,169,25,.3));
}

.ss-title {
    font-size: 2rem;
    font-weight: 700;
    color: #e8a919;
    margin: 0 0 .35rem;
    letter-spacing: .02em;
}

.ss-sub {
    color: #9fa3a8;
    font-size: .95rem;
    margin: 0 0 1.5rem;
}

.ss-search-row {
    display: flex;
    gap: .6rem;
    align-items: center;
    justify-content: center;
}

.ss-input-wrap {
    position: relative;
    flex: 1;
    max-width: 440px;
}

.ss-input {
    width: 100%;
    padding: 13px 44px 13px 18px;
    background: #1a1e2e;
    border: 1px solid #2a3a5a;
    border-radius: 8px;
    color: #e0e6f0;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}

.ss-input:focus {
    border-color: #e8a919;
    box-shadow: 0 0 0 2px rgba(232,169,25,.15);
}

.ss-clear-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #5a7090;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.ss-clear-btn:hover { color: #c0c8d8; }

.ss-search-btn {
    padding: 13px 24px;
    background: #e8a919;
    border: none;
    border-radius: 8px;
    color: #0d0d1a;
    font-size: .95rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, transform .1s;
    flex-shrink: 0;
}

.ss-search-btn:hover  { background: #f0bc30; }
.ss-search-btn:active { transform: scale(.97); }

/* Results */

.ss-results-wrap {
    max-width: 700px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.item-tt.item-tt--unified {
    width: 374px;
    max-width: calc(100vw - 24px);
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}

.ss-favorites-wrap {
    max-width: 700px;
    margin: 2rem auto 0;
    padding: 0 1rem;
}

.ss-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: .75rem;
}

.ss-section-heading h2 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #e0e6f0;
    font-size: 1rem;
}

.ss-section-heading h2 .mud-icon-root {
    color: #e8a919;
    font-size: 1.15rem;
}

.ss-section-heading p {
    margin: 3px 0 0;
    color: #7890a8;
    font-size: .76rem;
}

.ss-favorite-count {
    min-width: 26px;
    padding: 3px 8px;
    border: 1px solid rgba(232,169,25,.3);
    border-radius: 20px;
    color: #e8a919;
    font-size: .7rem;
    font-weight: 700;
    text-align: center;
}

.ss-favorites-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 70px;
    padding: 14px;
    border: 1px dashed rgba(255,255,255,.1);
    border-radius: 10px;
    background: rgba(17,24,39,.55);
    color: #7890a8;
    font-size: .84rem;
    text-align: center;
}

.ss-favorites-empty .mud-icon-root { color: #5a7090; }
.ss-favorites-empty a { color: #e8a919; font-weight: 700; }

.ss-empty {
    text-align: center;
    color: #7890a8;
    font-size: .95rem;
    padding: 2rem 0;
}

.ss-result-list {
    background: #111827;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.06);
}

.ss-result-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    cursor: pointer;
    transition: background .15s;
}

.ss-result-row:last-of-type { border-bottom: none; }
.ss-result-row:hover { background: rgba(232,169,25,.06); }

.ss-class-icon {
    position: relative;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.ss-class-icon img {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: contain;
    background: #0d1220;
}

.ss-online-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #111827;
}

.ss-char-info {
    flex: 1;
    min-width: 0;
}

.ss-char-name {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    font-size: 1rem;
    font-weight: 700;
    color: #e0e6f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ss-abyss-rank {
    color: #f0b71c;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.ss-char-sub {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .8rem;
    color: #7890a8;
    margin-top: 2px;
    flex-wrap: wrap;
}

.ss-dot { color: #3a4a60; }

.ss-level {
    color: #e8a919;
    font-weight: 600;
}

.ss-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.ss-favorite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    color: #7890a8;
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s, border-color .15s, background .15s;
}

.ss-favorite-btn .mud-icon-root { font-size: 1.08rem; }
.ss-favorite-btn:hover {
    border-color: rgba(232,169,25,.45);
    background: rgba(232,169,25,.1);
    color: #e8a919;
}
.ss-favorite-btn--active {
    border-color: rgba(232,169,25,.4);
    background: rgba(232,169,25,.1);
    color: #e8a919;
}
.ss-favorite-btn:disabled { cursor: wait; opacity: .55; }

.ss-race-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .74rem;
    font-weight: 600;
    white-space: nowrap;
}

.ss-elyos {
    background: rgba(100,160,255,.12);
    border: 1px solid rgba(100,160,255,.35);
    color: #80b0ff;
}

.ss-asmo {
    background: rgba(160,80,255,.12);
    border: 1px solid rgba(160,80,255,.35);
    color: #c080ff;
}

.ss-show-all-btn {
    display: block;
    width: 100%;
    padding: 14px;
    background: none;
    border: none;
    border-top: 1px solid rgba(255,255,255,.05);
    color: #e8a919;
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background .15s;
}

.ss-show-all-btn:hover { background: rgba(232,169,25,.07); }

/* ── Character Viewer ─────────────────────────────────────────────────────── */

.cv-header-wrap {
    background: linear-gradient(135deg, #0d0d1a 0%, #1a1a2e 60%, #16213e 100%);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 1.5rem 1rem;
}

.cv-header {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.cv-portrait {
    position: relative;
    flex-shrink: 0;
}

.cv-portrait-img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: contain;
    background: #0d1220;
    border: 2px solid rgba(255,255,255,.1);
}

.cv-level-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1e2e;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 10px;
    padding: 1px 8px;
    font-size: .72rem;
    font-weight: 700;
    color: #c8d8ec;
    white-space: nowrap;
}

.cv-info {
    flex: 1;
    min-width: 0;
}

.cv-name-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
    margin-bottom: .3rem;
}

.cv-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #e0e6f0;
}

.cv-abyss-rank {
    color: #f0b71c;
    font-size: 1rem;
    font-weight: 700;
}

.cv-server-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .75rem;
    color: #9fa3a8;
}

.cv-class-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .88rem;
    color: #9fa3a8;
}

.cv-dot { color: #3a4a60; }

.cv-elyos { color: #80b0ff; font-weight: 600; }
.cv-asmo  { color: #c080ff; font-weight: 600; }

.cv-online-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: .4rem;
    background: rgba(34,197,94,.1);
    border: 1px solid rgba(34,197,94,.3);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: .72rem;
    font-weight: 600;
    color: #22c55e;
}

.cv-online-pill::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
}

.cv-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-shrink: 0;
}

.cv-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 6px;
    color: #9fa3a8;
    font-size: .82rem;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.cv-action-btn:hover { background: rgba(255,255,255,.1); color: #e0e6f0; }
.cv-action-btn--favorite {
    border-color: rgba(232,169,25,.4);
    background: rgba(232,169,25,.1);
    color: #e8a919;
}

.cv-affiliation-word {
    color: #6f7d91;
}

.cv-legion-name {
    color: #c2ccda;
    font-weight: 600;
}

.cv-previous-names {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
    margin-top: .45rem;
    font-size: .72rem;
}

.cv-previous-names-label {
    color: #7f8da3;
}

.cv-previous-name {
    display: inline-flex;
    padding: 2px 8px;
    border: 1px solid rgba(82, 176, 255, .24);
    border-radius: 999px;
    background: rgba(82, 176, 255, .08);
    color: #9dceff;
}

.ss-former-name-match {
    margin-top: .2rem;
    color: #75bfff;
    font-size: .72rem;
}

@media (max-width: 520px) {
    .ss-hero { padding-top: 2.25rem; }
    .ss-search-row { align-items: stretch; flex-direction: column; }
    .ss-input-wrap { max-width: none; }
    .ss-result-row { gap: 10px; padding: 12px; }
    .ss-race-badge { display: none; }
    .cv-action-btn span { display: none; }
    .cv-action-btn { padding: 8px 10px; }
}

/* Tab bar */

.cv-tabbar {
    display: flex;
    overflow-x: auto;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: #0f1320;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cv-tab {
    padding: .85rem 1.2rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #7890a8;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
    margin-bottom: -1px;
}

.cv-tab:hover { color: #c0c8d8; }

.cv-tab--active {
    color: #e0e6f0;
    border-bottom-color: #e8a919;
}

/* Content area */

.cv-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.cv-section {
    background: #111827;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    overflow: hidden;
}

.cv-section-title {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: #7890a8;
    text-transform: uppercase;
    margin-bottom: .9rem;
}

.cv-pet-storage-identities {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.cv-pet-storage-identity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 150px;
}

.cv-pet-storage-identity img {
    display: block;
    width: 38px;
    height: 38px;
    object-fit: fill;
    image-rendering: pixelated;
    border: 1px solid rgba(94, 127, 165, .5);
    background: #07131f;
}

.cv-pet-storage-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.2;
}

.cv-pet-storage-copy strong {
    color: #ffc400;
    font-size: .83rem;
}

.cv-pet-storage-copy small {
    overflow: hidden;
    color: #a8bad0;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Slot grids */

.cv-slot-grid {
    display: grid;
    gap: .7rem;
}

.cv-slot-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cv-slot-grid--3 { grid-template-columns: repeat(3, 1fr); }

.cv-accessory-specials {
    width: calc(66.666% - .233rem);
    margin: .7rem auto 0;
}

@media (max-width: 640px) {
    .cv-slot-grid--2,
    .cv-slot-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .cv-accessory-specials { width: 100%; }
}

@media (max-width: 420px) {
    .cv-slot-grid--2,
    .cv-slot-grid--3 { grid-template-columns: 1fr; }
}

/* ── Slot card v2 ──────────────────────────────────────────────────────── */

.cv-card {
    display: flex;
    flex-direction: column;
    background: #0d1220;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 8px;
    overflow: hidden;
    min-width: 0;
    transition: border-color .15s, box-shadow .15s;
}

.cv-card:hover {
    border-color: rgba(255,255,255,.15);
    box-shadow: 0 4px 20px rgba(0,0,0,.5);
}

.cv-card--empty {
    opacity: .4;
}

.cv-card--empty:hover {
    border-color: rgba(255,255,255,.07);
    box-shadow: none;
}

.cv-card-body {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 12px 10px;
    border-left: 3px solid transparent;
}

.cv-card-icon-wrap {
    position: relative;
    flex-shrink: 0;
}

.cv-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cv-slot-enchant {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: #1a1e2e;
    border: 1px solid rgba(232,169,25,.65);
    border-radius: 5px;
    font-size: .8rem;
    font-weight: 800;
    color: #e8a919;
    padding: 1px 4px;
    line-height: 1.5;
    text-shadow: 0 0 6px rgba(232,169,25,.5);
}

.cv-slot-name {
    font-size: .85rem;
    font-weight: 600;
    color: #c8d8ec;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cv-slot-label {
    font-size: .68rem;
    color: #5a7090;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* Manastone sockets */

.cv-ms-row {
    display: flex;
    gap: 3px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.cv-ms-socket {
    width: 20px;
    height: 20px;
    overflow: hidden;
    border-radius: 4px;
    background: #060a14;
    border: 1px solid rgba(255,255,255,.12);
    cursor: pointer;
    flex-shrink: 0;
    transition: border-color .1s, box-shadow .1s;
}

.cv-ms-socket:hover {
    border-color: rgba(255,255,255,.4);
    box-shadow: 0 0 6px rgba(124,77,255,.5);
}

/* Fused weapon sub-section */

.cv-fused-section {
    border-top: 1px dashed rgba(255,255,255,.08);
    padding: 7px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: background .12s;
}

.cv-fused-section:hover {
    background: rgba(255,255,255,.02);
}

.cv-fused-label {
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(160,160,200,.35);
    font-weight: 700;
}

.cv-fused-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cv-slot-fusion-name {
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tab bar wrapper (constrains width) */

.cv-tabbar-wrap {
    background: #0f1320;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

/* PvP log tab */

.cv-pvp-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.cv-pvp-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 16px 18px;
    background: #111827;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 9px;
}

.cv-pvp-stat--kills { border-top: 2px solid #22c55e; }
.cv-pvp-stat--assists { border-top: 2px solid #38bdf8; }
.cv-pvp-stat--deaths { border-top: 2px solid #ef4444; }
.cv-pvp-stat--ratio { border-top: 2px solid #e8a919; }

.cv-pvp-stat-value {
    color: #e5edf8;
    font-size: 1.45rem;
    line-height: 1;
    font-weight: 800;
}

.cv-pvp-stat-label {
    color: #71839d;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.cv-pvp-note {
    margin-bottom: 14px;
    color: #65758d;
    font-size: .75rem;
}

.cv-pvp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 180px;
    color: #7890a8;
}

.cv-pvp-list {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 9px;
    overflow: hidden;
}

.cv-pvp-row {
    display: grid;
    grid-template-columns: 72px minmax(180px, 1fr) minmax(120px, .65fr) 175px;
    align-items: center;
    gap: 14px;
    min-height: 70px;
    padding: 11px 15px;
    background: #111827;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.cv-pvp-row:last-child { border-bottom: 0; }
.cv-pvp-row--kill { box-shadow: inset 3px 0 #22c55e; }
.cv-pvp-row--assist { box-shadow: inset 3px 0 #38bdf8; }
.cv-pvp-row--death { box-shadow: inset 3px 0 #ef4444; }

.cv-pvp-result-badge {
    display: inline-flex;
    justify-content: center;
    min-width: 56px;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
}

.cv-pvp-row--kill .cv-pvp-result-badge {
    color: #4ade80;
    background: rgba(34,197,94,.11);
    border: 1px solid rgba(34,197,94,.3);
}

.cv-pvp-row--assist .cv-pvp-result-badge {
    color: #7dd3fc;
    background: rgba(56,189,248,.1);
    border: 1px solid rgba(56,189,248,.28);
}

.cv-pvp-row--death .cv-pvp-result-badge {
    color: #f87171;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.28);
}

.cv-pvp-opponent { min-width: 0; }

.cv-pvp-opponent-name {
    color: #dce6f3;
    font-size: .9rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-pvp-opponent-meta,
.cv-pvp-location {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: #71839d;
    font-size: .72rem;
}

.cv-pvp-location {
    flex-direction: column;
    gap: 2px;
}

.cv-pvp-time {
    color: #8495ad;
    font-size: .74rem;
    text-align: right;
}

.cv-pvp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    color: #71839d;
    font-size: .76rem;
}

@media (max-width: 680px) {
    .cv-pvp-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cv-pvp-row {
        grid-template-columns: 62px minmax(0, 1fr);
        gap: 7px 10px;
    }

    .cv-pvp-location,
    .cv-pvp-time {
        grid-column: 2;
        text-align: left;
    }

    .cv-pvp-location { flex-direction: row; }
}

@media (max-width: 430px) {
    .cv-pvp-summary { gap: 7px; }
    .cv-pvp-stat { padding: 12px 10px; }
    .cv-pvp-stat-value { font-size: 1.15rem; }
    .cv-pvp-footer { align-items: stretch; flex-direction: column; }
}

/* Hover tooltip */

.cv-tt {
    position: fixed;
    z-index: 9000;
    pointer-events: none;
    width: 280px;
    background: #111827;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,.8);
    overflow: hidden;
}

.cv-tt-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px 10px;
    background: #0d1220;
}

.cv-tt-head-text { flex: 1; min-width: 0; }

.cv-tt-name {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.3;
    word-break: break-word;
}

.cv-tt-quality {
    font-size: .72rem;
    color: #5a7090;
    margin-top: 3px;
}

.cv-tt-body {
    padding: 8px 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cv-tt-row {
    display: flex;
    justify-content: space-between;
    font-size: .78rem;
    color: #c0cfe0;
}

.cv-tt-lbl {
    color: #5a7090;
}

.cv-tt-desc {
    padding: 8px 14px 12px;
    font-size: .75rem;
    color: #7890a8;
    font-style: italic;
    border-top: 1px solid rgba(255,255,255,.06);
    line-height: 1.5;
}

.cv-tt.cv-tt--detailed {
    width: 374px;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 12px 12px 10px;
    overflow-y: auto;
    border: 1px solid #3e3e3e;
    border-radius: 3px;
    background: linear-gradient(145deg, #343434, #232323 65%);
    box-shadow: 0 10px 32px rgba(0,0,0,.72);
    color: #ededed;
    scrollbar-width: none;
}

.cv-tt.cv-tt--unified {
    width: 374px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    transform: translateY(-50%);
    pointer-events: auto;
}

.cv-card .cv-ms-row,
.cv-card .cv-fused-section {
    display: none;
}

.cv-tt.cv-tt--detailed::-webkit-scrollbar {
    display: none;
}

.cv-tt-context {
    margin-bottom: 3px;
    color: #c5c5c5;
    font-size: .72rem;
}

.cv-tt-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    text-shadow: 0 1px 1px #000;
}

.cv-tt--detailed .cv-tt-quality {
    margin: 3px 0 12px;
    color: #efefef;
    font-size: .75rem;
}

.cv-tt-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 62px;
    margin-bottom: 8px;
}

.cv-tt-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    overflow: hidden;
    border: 1px solid #8f8f8f;
    border-radius: 2px;
    background: #151515;
}

.cv-tt-icon img {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

.cv-tt-summary-copy {
    color: #f0f0f0;
    font-size: .76rem;
    line-height: 1.45;
}

.cv-tt-section {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px solid rgba(255,255,255,.28);
}

.cv-tt-section h3 {
    margin: 0 0 7px;
    color: #dedede;
    font-size: .74rem;
    font-weight: 800;
    text-shadow: 0 1px 1px #000;
}

.cv-tt-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 18px;
}

.cv-tt-stat {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    color: #f1f1f1;
    font-size: .72rem;
    line-height: 1.25;
}

.cv-tt-stat span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-tt-stat strong {
    flex-shrink: 0;
    color: #fff;
    font-weight: 800;
}

.cv-tt-stones {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 10px;
}

.cv-tt-stones--fused {
    margin-top: 7px;
}

.cv-tt-subheading {
    margin-top: 9px !important;
}

.cv-tt-stone,
.cv-tt-fused {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    font-size: .68rem;
}

.cv-tt-stone img,
.cv-tt-fused img {
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.2);
    background: #111;
    image-rendering: pixelated;
}

.cv-tt-stone span {
    overflow: hidden;
    color: #dedede;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-tt-stone--empty {
    color: #8d969b;
}

.cv-tt-empty-socket {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border: 1px solid #536065;
    border-radius: 3px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.04), rgba(0,0,0,.22)),
        #253035;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.2);
}

.cv-tt-fused > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cv-tt-fused strong {
    overflow: hidden;
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cv-tt-fused span {
    color: #aaa;
    font-size: .63rem;
    white-space: normal;
}

.cv-tt-restrictions > div {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #e9e9e9;
    font-size: .7rem;
    line-height: 1.45;
}

.cv-tt-restrictions > div > span {
    color: #e34c4c;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1;
}

.cv-tt--detailed .cv-tt-desc {
    margin-top: 8px;
    padding: 8px 0 2px;
    border-top: 1px solid rgba(255,255,255,.18);
    color: #c7c7c7;
}

/* Unified compact item display and item tooltip */
.ait-display {
    position: relative;
    display: inline-block;
    width: 100%;
    min-width: 0;
}

.ait-display__trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 7px 8px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    background: rgba(255,255,255,.035);
    color: inherit;
    font: inherit;
    text-align: left;
    justify-content: flex-start !important;
    cursor: help;
    transition: border-color .14s ease, background .14s ease, transform .14s ease;
}

.ait-display__trigger:hover,
.ait-display__trigger:focus-visible,
.ait-display[data-pinned="true"] .ait-display__trigger,
.ait-display--selected .ait-display__trigger {
    border-color: rgba(124,77,255,.8);
    background: rgba(124,77,255,.13);
    outline: none;
}

.ait-display__trigger:hover {
    transform: translateY(-1px);
}

.ait-display--selectable .ait-display__trigger {
    cursor: pointer;
}

.ait-display--selectable > .ait-display__popover {
    pointer-events: none;
}

.ait-display__icon {
    position: relative;
    display: block;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    padding: 2px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 5px;
    background: #0b1016;
}

.ait-display__icon > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    image-rendering: pixelated;
}

.ait-display__quantity {
    position: absolute;
    right: -5px;
    bottom: -5px;
    max-width: 58px;
    padding: 1px 4px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 8px;
    background: #09131e;
    color: #eef7ff;
    font: 700 10px/14px Arial,sans-serif;
    white-space: nowrap;
}

.ait-display__name {
    min-width: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    font-weight: 700;
    font-size: .84rem;
    line-height: 1.25;
    text-align: left !important;
}

.ait-display__popover {
    position: fixed;
    z-index: 10020;
    display: none;
    width: 374px;
    max-width: min(374px, calc(100vw - 28px));
    transform: translateY(-50%);
}

.ait-display[data-tooltip-active="true"] > .ait-display__popover {
    display: block;
}

.ait-tooltip {
    width: 100%;
    max-height: min(760px, calc(100vh - 28px));
    overflow: auto;
    padding: 11px;
    border: 1px solid #67706d;
    border-radius: 4px;
    background: linear-gradient(180deg,#3c4446,#242c2e);
    box-shadow: 0 8px 24px rgba(0,0,0,.72);
    color: #e5dfc7;
    font: 12px/1.35 Arial,Helvetica,sans-serif;
    text-align: left;
    white-space: normal;
}

.ait-tooltip__context {
    color: #c6cac8;
    font-size: 11px;
}

.ait-tooltip__title {
    margin-top: 2px;
    font-size: 15px;
    line-height: 18px;
}

.ait-tooltip__quality {
    margin: 2px 0 7px;
    color: #b9c1bf;
    font-size: 11px;
}

.ait-tooltip__summary {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 55px;
    padding: 7px 1px;
    border-top: 1px solid #566062;
}

.ait-tooltip__icon {
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    padding: 3px;
    border: 1px solid #8e9085;
    background: #172022;
}

.ait-tooltip__icon img,
.ait-tooltip__stone img,
.ait-tooltip__socket img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    image-rendering: pixelated;
}

.ait-tooltip__section {
    padding: 7px 1px;
    border-top: 1px solid #566062;
}

.ait-tooltip__section h3 {
    margin: 0 0 5px;
    color: #e5ed8a;
    font: 700 12px/15px Arial,Helvetica,sans-serif;
}

.ait-tooltip__stats {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 2px 14px;
}

.ait-tooltip__stats--nested {
    margin-top: 7px;
}

.ait-tooltip__stats > div {
    display: flex;
    justify-content: space-between;
    min-width: 0;
    gap: 7px;
}

.ait-tooltip__stats span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ait-tooltip__stats strong {
    color: #f1eee0;
    font-weight: 400;
    white-space: nowrap;
}

.ait-tooltip__stats > .ait-tooltip__stat--inactive,
.ait-tooltip__stats > .ait-tooltip__stat--inactive strong {
    color: #7d8583;
}

.ait-tooltip__stats > .ait-tooltip__stat--inactive {
    opacity: .62;
}

.ait-tooltip__sockets {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 5px 10px;
}

.ait-tooltip__socket,
.ait-tooltip__stone {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.ait-tooltip__socket img,
.ait-tooltip__socket > i,
.ait-tooltip__stone > img {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 3px;
}

.ait-tooltip__socket > i {
    background: linear-gradient(145deg,rgba(255,255,255,.04),rgba(0,0,0,.22)),#253035;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,.2);
}

.ait-tooltip__socket span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ait-tooltip__socket--empty {
    color: #8d969b;
}

.ait-tooltip__stone > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.ait-tooltip__stone strong {
    font-size: 12px;
}

.ait-tooltip__stone span {
    color: #d7d1bb;
    font-size: 11px;
    white-space: normal;
}

.ait-tooltip__restrictions > div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ait-tooltip__restrictions i {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #d63c22;
    box-shadow: inset 0 0 0 1px #ff8064;
}

.ait-tooltip__description {
    color: #eee7c8;
}

/* Coming soon placeholder */

.cv-coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    color: #3a4a60;
    font-size: .9rem;
    text-align: center;
}

/* ── Inventory grid ── */
.inv-grid {
    display: grid;
    grid-template-columns: repeat(9, 56px);
    gap: 3px;
    padding: 10px 12px;
}

.inv-slot {
    position: relative;
}

.inv-slot--filled {
    cursor: pointer;
}

.inv-slot--filled:hover > div {
    filter: brightness(1.3);
    transition: filter .15s;
}

.inv-slot--empty > div {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
}

.inv-qty {
    position: absolute;
    bottom: 3px;
    right: 3px;
    z-index: 1;
    font-size: 0.62rem;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 1px 3px #000, 0 0 4px #000;
    line-height: 1;
    pointer-events: none;
}

.inv-upgrade {
    position: absolute;
    bottom: 3px;
    left: 3px;
    z-index: 1;
    color: #f0b71c;
    font-size: .68rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 1px 3px #000, 0 0 4px #000;
    pointer-events: none;
}
/* Public legal and platform-review documents */
.legal-page {
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: clamp(.25rem, 2vw, 1.5rem) 0 3rem;
}

.legal-document {
    overflow: hidden;
    border: 1px solid rgba(111, 200, 255, .18);
    border-radius: 18px;
    color: #dce7f5;
    background: linear-gradient(155deg, rgba(18, 25, 43, .96), rgba(9, 13, 25, .98));
    box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
}

.legal-document--narrow { width: min(860px, 100%); margin: 0 auto; }
.legal-heading { padding: clamp(1.7rem, 5vw, 3.4rem); border-bottom: 1px solid rgba(255,255,255,.07); background: radial-gradient(circle at 85% 0, rgba(52,189,255,.12), transparent 42%); }
.legal-heading h1 { margin: .25rem 0 .6rem; color: #fff; font-size: clamp(2rem, 5vw, 3.35rem); line-height: 1.05; }
.legal-heading > p:last-child { margin: 0; color: #8091aa; }
.legal-eyebrow { margin: 0; color: #57d5ff; font-size: .7rem; font-weight: 900; letter-spacing: .18em; text-transform: uppercase; }
.legal-document > section { padding: 1.5rem clamp(1.4rem, 5vw, 3.4rem); border-bottom: 1px solid rgba(255,255,255,.055); }
.legal-document > section h2 { margin: 0 0 .85rem; color: #fff; font-size: 1.22rem; }
.legal-document > section h3 { margin: 1.25rem 0 .45rem; color: #c5efff; font-size: .98rem; }
.legal-document > section p, .legal-document > section li { color: #aebbd0; line-height: 1.75; }
.legal-document > section p { margin: .45rem 0 .9rem; }
.legal-document > section ul, .legal-document > section ol { display: grid; gap: .45rem; margin: .6rem 0 1rem; padding-left: 1.35rem; }
.legal-document a { color: #63d7ff; text-underline-offset: 3px; }
.legal-summary { background: rgba(54, 190, 255, .055); }
.legal-summary strong { display: block; margin-bottom: .35rem; color: #75dcff; font-size: 1rem; }
.legal-summary p { margin-bottom: 0 !important; }
.legal-steps { counter-reset: legal-step; list-style: none; padding-left: 0 !important; }
.legal-steps li { position: relative; min-height: 2rem; padding-left: 2.7rem; }
.legal-steps li::before { counter-increment: legal-step; content: counter(legal-step); position: absolute; left: 0; top: -.05rem; display: grid; width: 1.8rem; height: 1.8rem; place-items: center; border: 1px solid rgba(87,213,255,.28); border-radius: 50%; color: #71dcff; background: rgba(87,213,255,.08); font-size: .72rem; font-weight: 900; }
.legal-warning { margin: 1rem 0; padding: 1rem 1.1rem; border: 1px solid rgba(255,184,77,.25); border-radius: 10px; color: #f3c77f; background: rgba(255,171,46,.07); line-height: 1.65; }
.legal-actions { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; padding: 1.3rem clamp(1.4rem, 5vw, 3.4rem); }
.legal-actions a { color: #9baac0; font-size: .8rem; font-weight: 700; text-decoration: none; }
.legal-actions a:hover { color: #66d9ff; }

@media (max-width: 600px) {
    .legal-document { border-radius: 12px; }
    .legal-document > section { padding-top: 1.25rem; padding-bottom: 1.25rem; }
}
