html,
body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", "Verdana", sans-serif;
    color: #ecf4ff;
}

* {
    box-sizing: border-box;
}

a {
    color: inherit;
}

h1,
h2,
h3 {
    margin-top: 0;
}

.page-title {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    color: #f1f7ff;
}

.page-subtitle {
    color: #aec2df;
}

.page-alert {
    border: 1px solid rgba(255, 116, 116, 0.5);
    border-radius: 12px;
    background: rgba(117, 26, 26, 0.36);
    padding: 0.75rem 0.9rem;
    margin-bottom: 1rem;
}

.dashboard-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(250px, 1fr));
}

.dashboard-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 1rem;
}

.dashboard-card h2 {
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
    color: #f7d37a;
}

.dashboard-card p {
    margin: 0.35rem 0;
}

.dashboard-card-wide {
    grid-column: 1 / -1;
}

.inventory-status {
    border: 1px solid rgba(123, 226, 186, 0.48);
    border-radius: 12px;
    background: rgba(30, 88, 65, 0.3);
    color: #d5ffea;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
}

.booster-status {
    border: 1px solid rgba(123, 226, 186, 0.48);
    border-radius: 12px;
    background: rgba(30, 88, 65, 0.3);
    color: #d5ffea;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
}

.booster-open-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 1fr) minmax(300px, 1fr);
    align-items: start;
}

.booster-open-panel {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 1rem;
    min-width: 0;
    min-height: 0;
}

.booster-open-result-panel {
    margin-bottom: 1rem;
}

.booster-open-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.booster-open-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #f7d37a;
}

.booster-list {
    display: grid;
    gap: 0.55rem;
    max-height: min(32vh, 360px);
    overflow-y: auto;
    padding-right: 0.2rem;
}

.booster-list-item {
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.42);
    color: #e8f0ff;
    text-align: left;
    padding: 0.65rem 0.75rem;
    display: grid;
    gap: 0.2rem;
}

.booster-list-item:hover {
    border-color: rgba(124, 192, 255, 0.55);
    background: rgba(24, 44, 74, 0.45);
}

.booster-list-item.is-selected {
    border-color: rgba(255, 208, 121, 0.75);
    background: rgba(92, 66, 27, 0.42);
}

.booster-list-item-title {
    font-weight: 700;
}

.booster-list-item-meta {
    color: #a9bfdc;
    font-size: 0.84rem;
}

.booster-selected-summary p {
    margin: 0 0 0.4rem 0;
    color: #dce8fb;
}

.booster-open-button {
    margin-top: 0.2rem;
}

.booster-open-help {
    margin: 0.55rem 0 0 0;
    color: #a9bfdc;
    font-size: 0.9rem;
}

.booster-result-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    max-height: min(42vh, 420px);
    overflow-y: auto;
    padding-right: 0.2rem;
}

.booster-flip-card {
    position: relative;
    min-height: 320px;
    perspective: 1200px;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.booster-flip-card-inner {
    position: relative;
    width: 100%;
    min-height: 320px;
    transform-style: preserve-3d;
    transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.booster-flip-card.is-revealed .booster-flip-card-inner {
    transform: rotateY(180deg);
}

.booster-flip-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.booster-flip-face-back {
    transform: rotateY(0deg);
}

.booster-flip-face-front {
    transform: rotateY(180deg);
}

.booster-flip-back-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

.booster-card-back-placeholder {
    border-radius: 11px;
    background: linear-gradient(160deg, rgba(20, 31, 54, 0.98), rgba(70, 97, 149, 0.9));
    color: #edf4ff;
    font-weight: 700;
    gap: 0.2rem;
}

.booster-card-back-placeholder small {
    display: block;
    color: #c5d7f4;
    font-size: 0.78rem;
    font-weight: 500;
}

.booster-result-card {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 11px;
    overflow: hidden;
    background: rgba(11, 18, 31, 0.42);
    opacity: 0;
    transform: translateY(6px);
    animation: boosterReveal 260ms ease-out forwards;
    animation-delay: var(--reveal-delay, 0ms);
}

.booster-result-card-front {
    height: 100%;
    opacity: 1;
    transform: none;
    animation: none;
    display: flex;
    flex-direction: column;
}

.card-auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(1, 6, 17, 0.86);
    backdrop-filter: blur(8px);
}

.card-auth-modal {
    width: min(1180px, 100%);
    max-height: min(88vh, 920px);
    overflow: auto;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(180deg, rgba(11, 18, 34, 0.99), rgba(9, 14, 26, 0.97));
    box-shadow: 0 28px 120px rgba(0, 0, 0, 0.65);
    padding: 1.25rem;
}

.card-auth-legal-modal {
    width: min(1200px, 80vw);
}

.card-auth-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.card-auth-header h2 {
    margin: 0.2rem 0 0.45rem 0;
    font-size: 1.55rem;
    color: #f5f8ff;
}

.card-auth-header p {
    margin: 0;
    color: #b4c7e7;
    max-width: 70ch;
}

.card-auth-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.28rem 0.75rem;
    background: rgba(250, 183, 51, 0.16);
    color: #f7cf78;
    border: 1px solid rgba(250, 183, 51, 0.34);
    font-size: 0.82rem;
    font-weight: 700;
}

.card-auth-summary {
    min-width: 170px;
    align-self: flex-start;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.85rem 1rem;
    display: grid;
    gap: 0.25rem;
    color: #dbe7fb;
}

.card-auth-loading,
.card-auth-empty,
.card-auth-error {
    border-radius: 14px;
    padding: 1rem 1.1rem;
    margin-top: 0.75rem;
}

.card-auth-legal {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(120, 153, 214, 0.28);
    background: rgba(14, 24, 42, 0.72);
    color: #d9e6fb;
}

.card-auth-legal h2 {
    margin: 0 0 0.7rem 0;
    font-size: 1.1rem;
    color: #f3f7ff;
}

.card-auth-legal p {
    margin: 0.35rem 0 0 0;
    color: #c8d7ef;
    line-height: 1.5;
}

.card-auth-fulltext-link {
    color: #8fd6ff;
    text-decoration: underline;
    font-weight: 600;
}

.card-auth-fulltext-link:hover {
    color: #d1f0ff;
}

.card-auth-fulltext-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.card-auth-fulltext-button:focus-visible {
    outline: 2px solid rgba(143, 214, 255, 0.85);
    outline-offset: 3px;
    border-radius: 6px;
}

.card-auth-close-button {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: #f5f8ff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.card-auth-close-button:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

.card-auth-close-button:focus-visible {
    outline: 2px solid rgba(143, 214, 255, 0.85);
    outline-offset: 3px;
}

.card-auth-loading,
.card-auth-empty {
    border: 1px solid rgba(123, 226, 186, 0.35);
    background: rgba(30, 88, 65, 0.22);
    color: #e3ffee;
}

.card-auth-error {
    border: 1px solid rgba(255, 124, 124, 0.35);
    background: rgba(95, 24, 24, 0.28);
    color: #ffdcdc;
}

.card-auth-list {
    display: grid;
    gap: 0.85rem;
}

.card-auth-item {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    gap: 0.95rem;
    align-items: start;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    padding: 0.85rem;
}

.card-auth-image-wrap {
    width: 110px;
    height: 152px;
    overflow: hidden;
    border-radius: 12px;
    background: rgba(6, 10, 18, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.card-auth-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}

.card-auth-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b9c8df;
    font-size: 0.9rem;
}

.card-auth-content h3 {
    margin: 0;
    color: #f6f8ff;
    font-size: 1.15rem;
}

.card-auth-content {
    display: grid;
    gap: 0.12rem;
}

.card-auth-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.card-auth-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.card-auth-status-pending {
    background: rgba(255, 196, 61, 0.16);
    color: #ffd36d;
    border: 1px solid rgba(255, 196, 61, 0.28);
}

.card-auth-status-approved {
    background: rgba(80, 184, 121, 0.16);
    color: #b6f2ca;
    border: 1px solid rgba(80, 184, 121, 0.28);
}

.card-auth-status-revoked {
    background: rgba(222, 93, 93, 0.16);
    color: #ffb9b9;
    border: 1px solid rgba(222, 93, 93, 0.28);
}

.card-auth-status-refused {
    background: rgba(234, 150, 61, 0.16);
    color: #ffd2a3;
    border: 1px solid rgba(234, 150, 61, 0.28);
}

.card-auth-content p {
    margin: 0.22rem 0 0 0;
    color: #bfd0e8;
}

.card-auth-missing-image {
    max-width: 220px;
    color: #d8b66e;
    font-size: 0.88rem;
    line-height: 1.45;
}

.card-auth-meta {
    font-size: 0.86rem;
    color: #9db2d0 !important;
}

.card-auth-signature {
    color: #f4d26a;
    font-family: Consolas, "Courier New", monospace;
    white-space: normal;
    word-break: break-all;
}

.card-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 150px;
    justify-self: end;
    align-self: start;
    padding-top: 0.15rem;
}

.card-auth-actions .btn {
    min-width: 128px;
}

.card-auth-side {
    display: grid;
    gap: 0.55rem;
    justify-items: end;
    align-content: start;
    padding-top: 0.1rem;
}

@media (max-width: 900px) {
    .card-auth-header {
        flex-direction: column;
    }

    .card-auth-item {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .card-auth-actions {
        flex-direction: row;
        min-width: 0;
        flex-wrap: wrap;
    }
}

.booster-result-image-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

.booster-result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    -webkit-user-drag: none;
    user-select: none;
}

.booster-result-image-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    text-align: center;
    color: #9bb2d6;
    font-size: 0.84rem;
    padding: 0.5rem;
}

.booster-result-body {
    padding: 0.6rem 0.65rem;
    flex: 1 1 auto;
}

.booster-slot-badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.17rem 0.5rem;
    background: rgba(122, 203, 255, 0.2);
    color: #d8f2ff;
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
}

.booster-result-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.booster-result-meta {
    color: #a7bddb;
    font-size: 0.83rem;
}

.booster-card-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(4, 10, 20, 0.82);
    backdrop-filter: blur(6px);
}

.booster-card-lightbox-panel {
    position: relative;
    width: min(720px, calc(100vw - 2rem));
    max-height: min(92vh, 980px);
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 0.8rem;
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(15, 25, 44, 0.98), rgba(8, 13, 24, 0.98));
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.48);
    --sccg-tilt-x: 0deg;
    --sccg-tilt-y: 0deg;
}

.booster-card-lightbox-close {
    position: absolute;
    top: 0.6rem;
    right: 0.7rem;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1.4rem;
    line-height: 1;
    z-index: 4;
    pointer-events: auto;
}

.booster-card-lightbox-body {
    display: grid;
    place-items: center;
    min-height: 0;
    z-index: 1;
}

.booster-card-lightbox-image-frame {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    width: 100%;
    max-height: min(76vh, 860px);
    border-radius: 14px;
}

.booster-card-lightbox-image-frame.is-webgl-active .booster-card-lightbox-image {
    opacity: 0;
}

.card-preview-webgl-canvas {
    position: absolute;
    inset: 0;
    pointer-events: auto;
    z-index: 2;
    border-radius: inherit;
    overflow: hidden;
    display: block;
    width: 100%;
    height: 100%;
    background: transparent;
    transform-origin: center center;
    will-change: transform;
}

.booster-card-lightbox-image {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: min(76vh, 860px);
    object-fit: contain;
    border-radius: inherit;
    -webkit-user-drag: none;
    user-select: none;
    filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.28));
    transition: opacity 120ms ease-out;
}

.booster-card-lightbox-empty {
    width: 100%;
    min-height: 420px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #b8cceb;
}

.booster-card-lightbox-caption {
    display: grid;
    gap: 0.2rem;
    color: #dce8fb;
    padding: 0 0.15rem 0.1rem;
    z-index: 2;
}

.booster-card-lightbox-caption strong {
    font-size: 1rem;
}

.booster-card-lightbox-caption span {
    color: #9bb2d6;
    font-size: 0.9rem;
}

@keyframes boosterReveal {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inventory-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.inventory-panel {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0;
    min-width: 0;
}

.inventory-panel-wide {
    grid-column: 1 / -1;
}

.inventory-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.inventory-panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #f7d37a;
}

.inventory-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.inventory-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.inventory-table thead th {
    text-align: left;
    color: #b5c7e4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.45rem 0.4rem;
    white-space: nowrap;
}

.inventory-table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.45rem 0.4rem;
    vertical-align: middle;
}

.inventory-card-name {
    font-weight: 700;
}

.inventory-card-hover-target {
    display: inline-block;
    border-bottom: 1px dashed rgba(155, 193, 242, 0.65);
    cursor: default;
}

.inventory-card-sub {
    color: #9ab0d3;
    font-size: 0.82rem;
}

.inventory-opened-list {
    margin: 0.55rem 0 0 1.2rem;
    padding: 0;
}

.inventory-opened-list li {
    margin-bottom: 0.45rem;
}

.inventory-opened-meta {
    display: inline-block;
    margin-left: 0.45rem;
    color: #9cb2d4;
    font-size: 0.86rem;
}

.inventory-filters {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 150px 170px 170px;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

.inventory-filter-search,
.inventory-filter-select {
    min-height: 34px;
}

.inventory-view-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 10px;
    padding: 0.35rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    color: #e6efff;
}

.inventory-view-toggle-label {
    font-size: 0.85rem;
    font-weight: 700;
}

.inventory-view-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.inventory-view-toggle-slider {
    width: 40px;
    height: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.2);
    position: relative;
    transition: background-color 0.2s ease;
}

.inventory-view-toggle-slider::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    transition: transform 0.2s ease;
}

.inventory-view-toggle input:checked + .inventory-view-toggle-slider {
    background: linear-gradient(135deg, #4ca2ff 0%, #7de7ff 100%);
}

.inventory-view-toggle input:checked + .inventory-view-toggle-slider::after {
    transform: translateX(18px);
}

.inventory-hover-preview {
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.45);
    padding: 0.7rem;
    margin-bottom: 0.85rem;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.inventory-hover-preview-frame {
    width: 150px;
    height: 210px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.17);
    background: rgba(255, 255, 255, 0.05);
    display: grid;
    place-content: center;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
}

.inventory-hover-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.inventory-hover-preview-empty {
    color: #9fb6d8;
    font-size: 0.82rem;
    text-align: center;
    padding: 0.6rem;
}

.inventory-hover-preview-caption {
    color: #dce9ff;
    font-size: 0.95rem;
}

.inventory-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.8rem;
}

.inventory-card-tile {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.42);
    overflow: hidden;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
}

.inventory-card-image-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

.inventory-card-quantity-badge {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    z-index: 2;
    padding: 0.18rem 0.52rem;
    border-radius: 999px;
    background: rgba(14, 20, 34, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #f7d37a;
    font-weight: 700;
    font-size: 0.82rem;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.inventory-card-quantity-badge-inline {
    position: relative;
    top: -0.06rem;
    right: auto;
    left: auto;
    margin-left: 0.35rem;
}

.privacy-card {
    width: min(1200px, 80vw);
}

.privacy-section + .privacy-section {
    margin-top: 1rem;
}

.privacy-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.15rem 0 1rem 0;
}

.privacy-section h2 {
    font-size: 1.1rem;
    margin: 0 0 0.35rem 0;
    color: #f7d37a;
}

.privacy-section p {
    margin: 0.15rem 0 0 0;
    color: #d7e3f5;
    line-height: 1.5;
}

.privacy-section ul {
    margin: 0.35rem 0 0 1.1rem;
    padding: 0;
    color: #d7e3f5;
    line-height: 1.45;
}

.privacy-updated {
    margin-top: 0.2rem;
    color: #9cb2d4;
    font-size: 0.86rem;
}

.privacy-export-message {
    margin: 0.25rem 0 0;
    color: #b8ffbf;
    font-size: 0.95rem;
}

.inventory-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.inventory-card-image-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    color: #98afd3;
    font-size: 0.82rem;
    text-align: center;
    padding: 0.5rem;
}

.inventory-card-tile-body {
    padding: 0.55rem 0.6rem;
}

.inventory-card-tile-title {
    font-weight: 700;
    color: #eff6ff;
    margin-bottom: 0.2rem;
}

.inventory-card-tile-meta {
    color: #aac0df;
    font-size: 0.82rem;
}

.trades-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.05fr);
}

.trades-busy-banner {
    border: 1px solid rgba(147, 197, 253, 0.45);
    border-radius: 8px;
    background: rgba(30, 64, 175, 0.24);
    color: #dbeafe;
    font-size: 0.86rem;
    padding: 0.4rem 0.55rem;
}

.trades-panel {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    padding: 1rem;
    min-width: 0;
}

.trades-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.trades-panel-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #f7d37a;
}

.trades-create-panel {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.35);
    padding: 0.75rem;
    margin-bottom: 0.9rem;
}

.trades-create-panel h3 {
    margin: 0 0 0.6rem 0;
    font-size: 0.98rem;
    color: #f7d37a;
}

.trades-create-fields {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr);
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}

.trades-create-summary {
    color: #b7c9e4;
    font-size: 0.84rem;
    margin-bottom: 0.5rem;
}

.trades-create-cards {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem;
    max-height: 230px;
    overflow-y: auto;
    display: grid;
    gap: 0.35rem;
}

.trades-create-card-item {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 0.45rem;
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 0.45rem;
    align-items: center;
    cursor: pointer;
}

.trades-create-card-item:hover {
    border-color: rgba(124, 192, 255, 0.55);
}

.trades-create-card-item.is-selected {
    border-color: rgba(255, 208, 121, 0.75);
    background: rgba(92, 66, 27, 0.32);
}

.trades-create-card-item input {
    margin: 0;
}

.trades-create-card-text {
    color: #deebff;
    font-size: 0.83rem;
}

.trades-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.55rem;
}

.trades-list-sections {
    display: grid;
    gap: 0.95rem;
}

.trades-list-section h3 {
    margin: 0 0 0.55rem 0;
    font-size: 1rem;
    color: #dce8fb;
}

.trades-list {
    display: grid;
    gap: 0.5rem;
}

.trades-list-item {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.42);
    color: #e8f0ff;
    text-align: left;
    padding: 0.6rem 0.7rem;
    display: grid;
    gap: 0.2rem;
}

.trades-list-item:hover {
    border-color: rgba(124, 192, 255, 0.55);
    background: rgba(24, 44, 74, 0.45);
}

.trades-list-item.is-selected {
    border-color: rgba(255, 208, 121, 0.75);
    background: rgba(92, 66, 27, 0.42);
}

.trades-list-item-title {
    font-weight: 700;
}

.trades-list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
    color: #a9bfdc;
    font-size: 0.84rem;
}

.trade-status-badge {
    display: inline-flex;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.2rem 0.5rem;
    width: fit-content;
}

.trade-status-badge.status-ongoing {
    color: #fde68a;
    border-color: rgba(251, 191, 36, 0.5);
    background: rgba(120, 76, 16, 0.42);
}

.trade-status-badge.status-accepted {
    color: #bbf7d0;
    border-color: rgba(74, 222, 128, 0.5);
    background: rgba(22, 101, 52, 0.35);
}

.trade-status-badge.status-refused {
    color: #fecaca;
    border-color: rgba(248, 113, 113, 0.52);
    background: rgba(127, 29, 29, 0.34);
}

.trade-status-badge.status-cancelled,
.trade-status-badge.status-expired {
    color: #dbe7fb;
    border-color: rgba(148, 163, 184, 0.48);
    background: rgba(51, 65, 85, 0.45);
}

.trade-status-badge.status-unknown {
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(30, 41, 59, 0.4);
}

.trades-summary {
    margin-bottom: 0.8rem;
}

.trades-summary p {
    margin: 0 0 0.35rem 0;
    color: #dce8fb;
}

.trades-summary .trade-status-badge {
    margin-left: 0.35rem;
    vertical-align: middle;
}

.trades-counter-offer-panel {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.35);
    padding: 0.75rem;
    margin-bottom: 0.85rem;
}

.trades-counter-offer-panel h3 {
    margin: 0 0 0.6rem 0;
    font-size: 0.98rem;
    color: #f7d37a;
}

.trades-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.trades-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 0.8rem;
}

.trades-card-panel {
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.35);
    padding: 0.7rem;
    min-width: 0;
}

.trades-card-panel h3 {
    margin: 0 0 0.6rem 0;
    font-size: 0.98rem;
    color: #f7d37a;
}

.trades-card-list {
    display: grid;
    gap: 0.55rem;
}

.trades-card-item {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    overflow: hidden;
    display: grid;
    grid-template-columns: 74px 1fr;
    min-width: 0;
}

.trades-card-image-wrap {
    width: 74px;
    height: 98px;
    background: rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.11);
}

.trades-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.trades-card-image-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    text-align: center;
    color: #99b1d4;
    font-size: 0.74rem;
    padding: 0.25rem;
}

.trades-card-body {
    padding: 0.45rem 0.55rem;
    min-width: 0;
}

.trades-card-title {
    font-weight: 700;
    color: #eef6ff;
    margin-bottom: 0.15rem;
}

.trades-card-meta {
    color: #a9bfdc;
    font-size: 0.79rem;
}

.trades-events-panel {
    margin-top: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.35);
    padding: 0.7rem;
}

.trades-events-panel h3 {
    margin: 0 0 0.6rem 0;
    font-size: 0.98rem;
    color: #f7d37a;
}

.trades-event-list {
    margin: 0;
    padding-left: 1.2rem;
    display: grid;
    gap: 0.55rem;
}

.trades-event-item {
    color: #dce8fb;
}

.trades-event-title {
    font-weight: 700;
    color: #e9f2ff;
}

.trades-event-meta {
    color: #a9bfdc;
    font-size: 0.84rem;
}

.trades-event-details {
    color: #c7d9f2;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.8rem;
    margin-top: 0.2rem;
    word-break: break-word;
}

.login-card {
    width: min(440px, 95vw);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(7, 14, 24, 0.78);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.35);
    padding: 1.25rem;
    color: #eef5ff;
}

.login-card-header {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    margin-bottom: 1rem;
}

.login-card-header h1 {
    font-size: 1.55rem;
    margin-bottom: 0.35rem;
}

.login-card-header p {
    margin: 0;
    color: #adc2e3;
}

.login-badge {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: grid;
    place-content: center;
    font-weight: 800;
    color: #17233b;
    background: linear-gradient(145deg, #f6c655 0%, #f49e3f 100%);
}

.login-form .form-control {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(25, 37, 56, 0.28);
    color: #0f1726;
}

.login-submit {
    width: 100%;
    border-radius: 10px;
    font-weight: 700;
}

.login-error {
    border: 1px solid rgba(255, 117, 117, 0.5);
    border-radius: 10px;
    background: rgba(140, 31, 31, 0.3);
    color: #ffc8c8;
    padding: 0.65rem 0.8rem;
}

.login-callback-guard {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.7rem 0.8rem;
    margin-bottom: 1rem;
}

.login-callback-guard.is-ok {
    border-color: rgba(124, 232, 186, 0.45);
    background: rgba(29, 83, 59, 0.24);
}

.login-callback-guard.is-warning {
    border-color: rgba(255, 199, 107, 0.55);
    background: rgba(103, 72, 27, 0.24);
}

.login-callback-title {
    font-weight: 700;
    margin: 0 0 0.35rem 0;
    color: #eff6ff;
}

.login-callback-code {
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(9, 15, 27, 0.6);
    color: #ebf4ff;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.9rem;
    padding: 0.45rem 0.55rem;
    margin-bottom: 0.45rem;
    word-break: break-all;
}

.login-callback-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
}

.login-callback-copy-success {
    color: #aef1cf;
    font-size: 0.9rem;
}

.login-callback-copy-error {
    color: #ffd1a3;
    font-size: 0.9rem;
}

.login-callback-help {
    margin: 0;
    color: #c6d6ef;
}

.login-callback-warning {
    margin: 0.4rem 0 0 0;
    color: #ffd998;
}

.public-catalog-shell {
    width: min(1200px, 96vw);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(7, 14, 24, 0.82);
    box-shadow: 0 20px 54px rgba(0, 0, 0, 0.34);
    padding: 1.1rem;
    color: #eef5ff;
}

.public-catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 0.95rem;
}

.public-catalog-header h1 {
    margin: 0;
    font-size: 1.6rem;
}

.public-catalog-header p {
    margin: 0.28rem 0 0 0;
    color: #acc0df;
}

.public-catalog-filters {
    display: grid;
    grid-template-columns: 1.4fr 0.85fr 0.65fr 0.65fr auto;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
}

.public-catalog-filter-actions {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.public-catalog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #b7c9e3;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.public-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.75rem;
}

.public-catalog-card-tile {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    background: rgba(11, 18, 31, 0.42);
    overflow: hidden;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
}

.public-catalog-card-image-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transform: translateZ(0);
}

.public-catalog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.public-catalog-card-image-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    color: #98afd3;
    font-size: 0.82rem;
    text-align: center;
    padding: 0.5rem;
}

.public-catalog-card-body {
    padding: 0.55rem 0.6rem;
}

.public-catalog-card-title {
    font-weight: 700;
    color: #eff6ff;
    margin-bottom: 0.2rem;
}

.public-catalog-card-meta {
    color: #aac0df;
    font-size: 0.82rem;
}

.public-catalog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.validation-message,
.validation-errors,
.validation-summary-errors {
    color: #ff9f9f;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #43d088;
}

.invalid {
    outline: 1px solid #ff7979;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fff5c4;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.page-action-row {
    display: flex;
    justify-content: flex-end;
    margin: 0.5rem 0 1rem;
}

.profile-card {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(7, 13, 28, 0.55);
}

.profile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.profile-card-header h2 {
    margin: 0;
    font-size: 1.1rem;
}

.profile-card-alert {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 182, 64, 0.35);
    background: rgba(255, 182, 64, 0.12);
    color: #ffd37a;
    margin-bottom: 0.85rem;
}

.profile-card-list {
    display: grid;
    gap: 0.55rem;
}

.profile-card-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
}

.app-version-badge {
    position: fixed;
    right: 0.7rem;
    bottom: 0.55rem;
    z-index: 900;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(8, 13, 24, 0.78);
    color: #b8cceb;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.3rem 0.55rem;
    letter-spacing: 0.02em;
    backdrop-filter: blur(2px);
    white-space: nowrap;
}

@media (max-width: 900px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .booster-open-grid {
        grid-template-columns: 1fr;
    }

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .inventory-filters {
        grid-template-columns: 1fr;
    }

    .inventory-hover-preview {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .trades-grid {
        grid-template-columns: 1fr;
    }

    .trades-detail-grid {
        grid-template-columns: 1fr;
    }

    .trades-create-fields {
        grid-template-columns: 1fr;
    }

    .public-catalog-shell {
        width: 100%;
    }

    .public-catalog-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-catalog-filters {
        grid-template-columns: 1fr;
    }

    .public-catalog-filter-actions {
        justify-content: flex-start;
    }

    .public-catalog-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .app-version-badge {
        right: 0.5rem;
        bottom: 0.5rem;
    }
}
