.bridge-layout {
    align-items: start;
    padding-top: 24px;
}

.bridge-window {
    min-height: 720px;
    margin-bottom: 48px;
}

.window-titlebar {
    color: #000c27;
    font-size: 14px;
}

.window-controls {
    font-size: 17px;
    line-height: 1;
}

.bridge-content {
    padding: 22px 22px 100px;
}

.bridge-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #000c27;
}

.bridge-intro h1 {
    margin: 4px 0 8px;
    color: #000c27;
    font-size: clamp(23px, 3vw, 34px);
    line-height: 1;
}

.bridge-intro p:last-child {
    max-width: 650px;
    font-size: 14px;
    line-height: 1.45;
}

.bridge-kicker,
.tiny-label {
    color: #6f51ff;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
}


.wallet-strip,
.bridge-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #000c27;
    background: #edeaff;
}

.wallet-strip > div:first-child {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 8px;
}

.wallet-strip small {
    grid-column: 2;
    margin-top: 2px;
    color: #566c88;
}

.status-dot {
    width: 8px;
    height: 8px;
    border: 1px solid #000c27;
    border-radius: 50%;
    background: #d8d0ff;
}

.status-dot.connected { background: #5cd770; }
.status-dot.wrong { background: #ffbe66; }

.wallet-actions,
.inventory-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.bridge-button,
.text-button {
    border: 1px solid #000c27;
    border-radius: 2px;
    background: #fff;
    color: #000c27;
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.bridge-button {
    min-height: 34px;
    padding: 7px 13px;
    font-size: 13px;
}

.bridge-button:hover:not(:disabled),
.text-button:hover:not(:disabled) {
    background: #e8f7fa;
    box-shadow: 2px 2px 0 #000c27;
    transform: translate(-1px, -1px);
}

.bridge-button:disabled,
.text-button:disabled {
    cursor: not-allowed !important;
    opacity: .48;
}

.bridge-button.secondary { background: #fff; }
.bridge-button.primary {
    min-width: 190px;
    background: #9985ff;
    color: #fff;
    font-weight: 700;
}
.bridge-button.primary:hover:not(:disabled) { background: #6f52ff; }
.bridge-button.pending::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 7px;
    border: 1px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: bridge-spin .7s linear infinite;
}

.text-button {
    padding: 4px 7px;
    font-size: 11px;
}

.inventory-panel,
.lifecycle-panel {
    margin-top: 18px;
}

.lifecycle-panel {
    padding: 14px;
    border: 1px solid #000c27;
    background: rgba(232, 247, 250, .72);
}

.section-row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}

.section-row h2 {
    margin-top: 1px;
    color: #000c27;
    font-size: 18px;
    line-height: 1;
}

.inventory-tools > span {
    margin-right: 3px;
    white-space: nowrap;
}

.inventory-state {
    display: flex;
    min-height: 150px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px dashed #6e85a3;
    background: #f8f7ff;
    color: #566c88;
    text-align: center;
}
.inventory-state strong { color: #000c27; font-size: 15px; }
.inventory-state.error { border-color: #b52d45; background: #fff1f4; }

.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
    gap: 10px;
    max-height: 430px;
    padding: 2px 5px 6px 2px;
    overflow-y: auto;
}

.inventory-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}
.inventory-pagination span {
    min-width: 86px;
    text-align: center;
}

.nft-card {
    position: relative;
    padding: 0;
    overflow: hidden;
    border: 1px solid #000c27;
    border-radius: 2px;
    background: #fff;
    color: #000c27;
    text-align: left;
}
.nft-card:hover:not(:disabled) { box-shadow: 3px 3px 0 #6e85a3; transform: translate(-1px, -1px); }
.nft-card.selected { outline: 3px solid #6f51ff; outline-offset: -3px; background: #edeaff; }
.nft-card.pending {
    cursor: not-allowed !important;
    opacity: .58;
}
.nft-card-art {
    display: flex;
    height: 112px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #000c27;
    background: radial-gradient(circle at 35% 30%, #fff 0 8%, transparent 9%), linear-gradient(135deg, hsl(var(--nft-hue) 85% 88%), #d8d0ff 55%, #85e194);
}
.nft-card-art img { width: 100%; height: 100%; object-fit: cover; }
.nft-card-art span { font-size: 28px; font-weight: 700; text-align: center; text-shadow: 2px 2px 0 #fff; }
.nft-card-meta { display: flex; align-items: center; justify-content: space-between; padding: 7px; }
.nft-card-meta small { color: #6e85a3; }
.selection-box {
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border: 1px solid #000c27;
    background: #fff;
    font-weight: 700;
}
.selected .selection-box { background: #85e194; }

.bridge-summary {
    margin-top: 20px;
    background: #edeaff;
    box-shadow: 3px 3px 0 #000c27;
}
.bridge-summary > div { display: flex; min-width: 105px; flex-direction: column; gap: 2px; }
.bridge-summary > div:nth-child(2) { flex: 1; }
.bridge-summary span { color: #566c88; font-size: 10px; letter-spacing: .05em; }
.bridge-summary strong { font-size: 15px; }
.bridge-summary small { color: #566c88; }

.bridge-warning {
    margin-top: 16px;
    color: #6e85a3;
    font-size: 11px;
    text-align: center;
}

.lifecycle-item {
    padding: 10px 0;
    border-top: 1px dotted #6e85a3;
}
.lifecycle-item:first-child { border-top: 0; padding-top: 0; }
.lifecycle-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.lifecycle-head strong { font-size: 14px; }
.lifecycle-head a { color: #2382ff; text-decoration: underline; }
.lifecycle-links { display: flex; align-items: center; gap: 7px; }
.lifecycle-dismiss {
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    border: 1px solid #000c27;
    background: #fff;
    font-size: 15px;
    line-height: 1;
}
.lifecycle-dismiss:hover { background: #ffdae2; }
.lifecycle-copy { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; color: #566c88; }
.lifecycle-copy span:last-child { text-align: right; }
.lifecycle-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
.lifecycle-step { height: 5px; border: 1px solid #6e85a3; background: #fff; }
.lifecycle-step.active { border-color: #000c27; background: #9985ff; }
.lifecycle-step.complete { border-color: #000c27; background: #85e194; }
.lifecycle-item.attention .lifecycle-step.active { background: #ff8aa0; }

.wallet-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 12, 39, .45);
}
.wallet-modal {
    position: relative;
    width: min(440px, 100%);
    background: #fff;
}
.wallet-modal-content { padding: 22px; }
.wallet-modal-content h2 { color: #000c27; font-size: 20px; }
.wallet-modal-content > p { margin: 5px 0 14px; color: #566c88; line-height: 1.4; }
.modal-close { position: absolute; top: 4px; left: 7px; z-index: 2; font-size: 19px; }
.wallet-list { display: grid; gap: 8px; }
.wallet-option {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px;
    border: 1px solid #000c27;
    background: #f8f7ff;
    text-align: left;
}
.wallet-option:hover { background: #edeaff; }
.wallet-option img { width: 28px; height: 28px; border-radius: 6px; }
.wallet-option small { color: #6e85a3; }
.wallet-empty { padding: 16px; border: 1px dashed #6e85a3; text-align: center; }

.bridge-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 100;
    max-width: 390px;
    padding: 12px 14px;
    border: 1px solid #000c27;
    background: #fff;
    box-shadow: 4px 4px 0 #000c27;
    line-height: 1.35;
}
.bridge-toast.success { background: #dffbe4; }
.bridge-toast.error { background: #fff1f4; }

.hidden { display: none !important; }

@keyframes bridge-spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) {
    .bridge-window { grid-column: span 9 / span 9; }
}

@media (max-width: 768px) {
    .bridge-layout { display: block; padding: 64px 12px 24px; }
    .bridge-layout #musicPlayer { display: none; }
    .bridge-window { min-height: 0; margin: 0; }
    .bridge-content { padding: 15px 15px 100px; }
    .bridge-intro, .wallet-strip, .bridge-summary, .section-row { align-items: stretch; flex-direction: column; }
    .wallet-actions, .inventory-tools { justify-content: flex-start; }
    .nft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: none; }
    .bridge-button.primary { width: 100%; }
    .lifecycle-copy { flex-direction: column; }
    .lifecycle-copy span:last-child { text-align: left; }
}
