body {
    padding: 1.5rem;
}

main {
    max-width: 1080px;
    margin: auto;
}

section.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

section.card > h2 {
    margin-top: 0;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.pass-market-heading {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.pass-market-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #555;
}

.pass-market-controls label {
    margin: 0;
}

.pass-lobby-select {
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #cfcfcf;
    background: #fff;
    font-size: 0.85rem;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.account-card table {
    margin-top: 1.25rem;
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    align-items: start;
}

.account-username {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.account-username label {
    width: 100%;
    margin-bottom: 0.25rem;
}

.account-username button {
    width: auto;
    margin-top: 0;
}

.nft-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem;
    background: #fafafa;
}

.nft-thumb {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    object-fit: contain;
    object-position: center;
    background: #f4f4f4;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td:first-child {
    font-weight: 600;
    color: #555;
    width: 30%;
    vertical-align: top;
}

.info-table td:last-child {
    word-break: break-word;
}

.help-text {
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

a.disabled-link {
    pointer-events: none;
    color: #888;
    text-decoration: none;
}

.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.pass-quantity-label {
    font-size: 0.8rem;
    color: #555;
    align-self: center;
}

.pass-quantity-select {
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #cfcfcf;
    background: #fff;
    font-size: 0.85rem;
}

.pass-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ececec;
    margin-bottom: 1rem;
}

.pass-owned-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0.5rem 0 0.75rem;
}

.pass-owned-meta {
    color: #666;
    font-size: 0.85rem;
}

.pass-market-title {
    margin: 1.5rem 0 0.75rem;
}

.pass-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e7e7e7;
    color: #333;
}

.pass-status-listed {
    background: #fff1c4;
    color: #7a5200;
}

.pass-status-available {
    background: #dff6e7;
    color: #0b5c2b;
}

.nft-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e7e7e7;
    color: #333;
}

.nft-status-listed {
    background: #fff1c4;
    color: #7a5200;
}

.nft-status-available {
    background: #dff6e7;
    color: #0b5c2b;
}

.pass-label {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.pass-value {
    margin: 0.25rem 0 0;
    font-size: 1.4rem;
    font-weight: 600;
}

#log {
    font-size: 0.85rem;
    background: #111;
    color: #0f0;
    padding: 0.75rem;
    border-radius: 6px;
    max-height: 180px;
    overflow-y: auto;
}

code {
    word-break: break-all;
}

.swap-panel {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e6e6e6;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.swap-panel h3 {
    margin: 0;
}

.swap-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.swap-quote {
    background: #f5f7ff;
    border: 1px solid #dbe5ff;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.95rem;
    color: #0f2454;
}

.swap-message {
    font-size: 0.9rem;
    color: #4d4d4d;
}

.swap-message.status-error {
    color: #b00020;
}

.swap-message.status-success {
    color: #0c6b2f;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.2s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-dialog {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.5rem 2rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    text-align: center;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: #0066ff;
    border-radius: 50%;
    animation: profile-spinner 0.8s linear infinite;
}

@keyframes profile-spinner {
    to {
        transform: rotate(360deg);
    }
}

.wallet-picker-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.wallet-picker {
    min-width: 240px;
    max-width: 320px;
    background: #0b1224;
    border: 1px solid rgba(120, 140, 190, 0.35);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
    color: #e7f0ff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wallet-picker-title {
    font-size: 1rem;
    font-weight: 600;
}

.wallet-picker-subtitle {
    font-size: 0.9rem;
    color: #b4c3e8;
}

.wallet-picker-button,
.wallet-picker-cancel {
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid rgba(120, 170, 255, 0.3);
    background: rgba(44, 82, 140, 0.45);
    color: #e7f0ff;
    padding: 0.6rem 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.wallet-picker-button:hover,
.wallet-picker-cancel:hover {
    background: rgba(56, 108, 182, 0.7);
    transform: translateY(-1px);
}

.wallet-picker-cancel {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: #cbd7f2;
}

.app-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4000;
}

.app-modal {
    min-width: 240px;
    max-width: 360px;
    background: rgba(10, 18, 34, 0.96);
    border: 1px solid rgba(120, 140, 190, 0.35);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.35);
    color: #e7f0ff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.app-modal-title {
    font-size: 14px;
    font-weight: 600;
}

.app-modal-message {
    font-size: 13px;
    color: #cbd7f2;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.app-modal-input {
    border-radius: 8px;
    border: 1px solid rgba(120, 170, 255, 0.3);
    background: rgba(20, 32, 60, 0.8);
    color: #e7f0ff;
    padding: 8px 10px;
    font-family: inherit;
}

.app-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 6px;
}

.app-modal-button {
    font-family: inherit;
    border-radius: 8px;
    border: 1px solid rgba(120, 170, 255, 0.3);
    background: rgba(44, 82, 140, 0.45);
    color: #e7f0ff;
    padding: 6px 12px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.app-modal-button:hover {
    background: rgba(56, 108, 182, 0.7);
    transform: translateY(-1px);
}

.app-modal-cancel {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: #cbd7f2;
}

/* Skin Store (Phase 2 non-NFT skin economy) */
.scales-balance {
    font-size: 0.95rem;
}

.store-price {
    font-weight: 600;
    margin: 0.25rem 0;
}

.store-rarity-label {
    text-transform: capitalize;
    font-size: 0.8rem;
    color: #666;
    margin: 0.25rem 0;
}

.store-rarity-rare { border-color: #4a90d9; }
.store-rarity-epic { border-color: #9b59b6; }
.store-rarity-legendary { border-color: #e0a52a; }
.store-rarity-nft { border-color: #2ecc71; }

.collection-progress {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.5rem 0 1rem;
}

.progress-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-label {
    min-width: 120px;
    font-size: 0.85rem;
    text-transform: capitalize;
}

.progress-track {
    flex: 1;
    height: 10px;
    border-radius: 6px;
    background: #e6e6e6;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #4a90d9;
    border-radius: 6px;
}

.collection-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.collection-item.collection-missing {
    opacity: 0.75;
    background: #f0f0f0;
}

.collection-item .silhouette {
    filter: grayscale(1) brightness(0.35);
}

.collection-hint {
    font-size: 0.8rem;
    color: #777;
    margin: 0.25rem 0 0;
}

.collection-name {
    font-weight: 600;
    margin: 0.25rem 0 0;
}

.drop-actions {
    margin: 0.5rem 0 1rem;
}

.drop-reveal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.drop-reveal-overlay[hidden] {
    display: none;
}

.drop-reveal-box {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    min-width: 260px;
    max-width: 90vw;
}

.drop-reveal-chest {
    font-size: 4rem;
    animation: drop-chest-shake 0.4s ease-in-out infinite;
}

@keyframes drop-chest-shake {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(6deg); }
}

.drop-reveal-result img {
    max-width: 140px;
}

.drop-reveal-name {
    font-weight: 600;
    margin: 0.25rem 0;
}

.drop-reveal-rarity {
    text-transform: capitalize;
    font-weight: 600;
    margin: 0.25rem 0;
}

.drop-reveal-rarity.rarity-rare { color: #4a90d9; }
.drop-reveal-rarity.rarity-epic { color: #9b59b6; }
.drop-reveal-rarity.rarity-legendary { color: #e0a52a; }

.drop-reveal-bonus {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2e7d32;
    margin: 0.25rem 0 0;
}

.drop-reveal-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}
