.pokecn-wallet {
    position: fixed;
    z-index: 35;
    top: .85rem;
    right: .85rem;
    padding: .55rem .85rem;
    border: 1px solid #efcd76;
    border-radius: .55rem;
    color: #ffe19a;
    background: #262326;
    cursor: pointer;
}
body:has(#team-menu[style*="display: flex"]) .pokecn-wallet { visibility: hidden; }
.pokecn-market {
    box-sizing: border-box;
    width: min(calc(100% - 1.5rem), 820px);
    max-height: calc(100dvh - 1.5rem);
    padding: 1.25rem;
    border: 1px solid #8d7047;
    border-radius: .8rem;
    background: #232126;
    color: #f5eadc;
    font: 15px/1.55 system-ui, sans-serif;
}
.pokecn-market::backdrop { background: #100d15c0; }
.pokecn-market [hidden] { display: none !important; }
.pokecn-market h2, .pokecn-market h3 { margin: 0; color: #ffe19a; }
.pokecn-market p { margin: .4rem 0; color: #dbccba; }
.pokecn-market label { display: grid; gap: .25rem; }
.pokecn-market input, .pokecn-market button {
    box-sizing: border-box;
    border: 1px solid #8e7764;
    border-radius: .4rem;
    color: inherit;
    background: #383139;
    padding: .45rem .6rem;
    font: inherit;
}
.pokecn-market button { cursor: pointer; }
.pokecn-market button:focus-visible, .pokecn-market input:focus-visible, .pokecn-wallet:focus-visible {
    outline: 2px solid #ffe19a;
    outline-offset: 2px;
}
.pokecn-market .pokecn-primary { background: #ffe19a; color: #292026; border-color: #ffe19a; }
.pokecn-header, .pokecn-tools, .pokecn-actions {
    display: flex;
    align-items: center;
    gap: .45rem;
    flex-wrap: wrap;
}
.pokecn-header { justify-content: space-between; }
.pokecn-tools { margin: .7rem 0; }
.pokecn-account { display: grid; gap: .65rem; max-width: 24rem; margin-top: .8rem; }
.pokecn-login-page {
    box-sizing: border-box;
    display: grid;
    place-items: center;
    min-height: 100dvh;
    margin: 0;
    padding: .75rem;
    background: #17151b;
}
.pokecn-login-card {
    width: min(100%, 27rem);
    max-height: none;
}
.pokecn-login-card h1 { margin: 0; color: #ffe19a; font-size: 1.75rem; }
.pokecn-login-card small { color: #dbccba; }
.pokecn-login-card input { width: 100%; }
.pokecn-login-card button:disabled { opacity: .65; cursor: wait; }
.pokecn-boards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.pokecn-list { display: grid; gap: .5rem; margin-top: .45rem; }
.pokecn-pet {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: .35rem .65rem;
    padding: .6rem;
    background: #302a33;
    border-radius: .5rem;
}
.pokecn-pet img { width: 48px; height: 48px; object-fit: contain; image-rendering: pixelated; }
.pokecn-detail { display: grid; }
.pokecn-detail small, .pokecn-actions small { color: #e0cfbb; }
.pokecn-pet .pokecn-actions { grid-column: 1 / -1; }
.pokecn-actions input { width: 7rem; }
.pokecn-shiny { color: #ffe19a; }
.pokecn-error { color: #ffb09c !important; }
#pokecn-battle-result { min-height: 1.5em; margin: .4rem; color: #ffe19a; }
.pokecn-rare-condition { display: block; font-size: .8rem; margin-top: .2rem; }
@media (max-width: 620px) {
    .pokecn-wallet { top: auto; bottom: max(.85rem, env(safe-area-inset-bottom)); }
    .pokecn-boards { grid-template-columns: 1fr; }
}

