.wallet-control {
    --wallet-surface: #ffffff;
    --wallet-text: #020817;
    --wallet-muted: #64748b;
    --wallet-border: #e2e8f0;
    --wallet-hover: #f1f5f9;
    --wallet-hover-text: #0f172a;
    --wallet-primary-text: #f8fafc;
    --wallet-accent: #1a44ea;
    position: relative;
    display: flex;
    flex-shrink: 0;
    font-family: 'Aspekta', ui-sans-serif, system-ui, sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: var(--wallet-text);
}

html[data-theme='dark'] .wallet-control {
    --wallet-surface: #020817;
    --wallet-text: #f8fafc;
    --wallet-muted: #94a3b8;
    --wallet-border: #1e293b;
    --wallet-hover: #1e293b;
    --wallet-hover-text: #f8fafc;
    --wallet-primary-text: #ffffff;
}

.wallet-control button,
.wallet-control a { font-family: inherit; font-size: inherit; line-height: inherit; }
.wallet-control button { cursor: pointer; }
.wallet-menu-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 8px;
    height: 32px;
    padding: 0 12px;
    border: 0 solid;
    border-radius: 6px;
    background: #1a44ea;
    color: var(--wallet-primary-text);
    font-weight: 500;
    letter-spacing: normal;
    white-space: nowrap;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);
    transition: background-color 150ms, color 150ms, border-color 150ms;
}
.wallet-menu-toggle:hover { background: rgb(26 68 234 / .9); }
.wallet-menu-toggle svg { display: block; width: 12px; height: 12px; flex-shrink: 0; }
.wallet-control.is-connected .wallet-menu-toggle {
    border-width: 1px;
    border-color: var(--wallet-border);
    background: var(--wallet-surface);
    color: var(--wallet-text);
}
.wallet-control.is-connected [data-wallet-label] { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.wallet-control.is-connected .wallet-menu-toggle:hover { background: var(--wallet-hover); color: var(--wallet-hover-text); }
.wallet-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: min(256px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid var(--wallet-border);
    border-radius: 6px;
    background: var(--wallet-surface);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
    display: grid;
    overflow-wrap: anywhere;
}
.wallet-menu[hidden], .wallet-menu [hidden] { display: none; }
.wallet-menu-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 12px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--wallet-text);
    text-align: left;
    line-height: 16px;
}
.wallet-menu-item:hover, .wallet-menu-item:focus-visible { background: var(--wallet-hover); color: var(--wallet-hover-text); }
.wallet-menu-item:disabled { opacity: .6; cursor: wait; }
.wallet-balance, .wallet-status { margin: 0; padding: 8px 12px; color: var(--wallet-muted); font-size: 12px; line-height: 16px; }
.wallet-control :focus-visible { outline-color: var(--wallet-accent); outline-offset: 2px; }

@media (pointer: coarse) {
    .wallet-menu-toggle::before { content: ''; position: absolute; inset: -6px 0; }
}
@media (max-width: 650px) {
    .nav-container { gap: 6px; }
    .nav-logo { min-width: 32px; }
}
@media (prefers-reduced-motion: reduce) {
    .wallet-menu-toggle { transition: none; }
}
