:root {
    --app-bg: #0f0c17;
    --app-surface: #171220;
    --app-surface-soft: #21192d;
    --app-ink: #fcf9ff;
    --app-muted: #c7b8e4;
    --app-line: #574474;
    --violet: #8f5bff;
    --violet-strong: #6e34f6;
    --violet-soft: #b38cff;
    --rose: #db6dff;
    --card-shell: #22182f;
    --card-border: #5a3d82;
}

body.app-body {
    min-height: 100vh;
    color: var(--app-ink);
    color-scheme: dark;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(143, 91, 255, 0.22), transparent 24%),
        radial-gradient(circle at top right, rgba(219, 109, 255, 0.16), transparent 20%),
        linear-gradient(180deg, #16111e 0%, var(--app-bg) 100%);
}

body.app-body::before,
body.app-body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

body.app-body::before {
    background:
        radial-gradient(circle at 18% 14%, rgba(137, 240, 255, 0.12), transparent 18%),
        radial-gradient(circle at 82% 22%, rgba(255, 111, 214, 0.12), transparent 20%),
        radial-gradient(circle at 30% 78%, rgba(154, 100, 255, 0.14), transparent 22%),
        radial-gradient(circle at 78% 82%, rgba(115, 255, 194, 0.1), transparent 18%);
    mix-blend-mode: screen;
    opacity: 0.9;
}

body.app-body::after {
    background:
        url("mew.png") left -34px center / 320px auto no-repeat,
        url("assets/img/pokeballs/1.png") 7% 14% / 112px no-repeat,
        url("assets/img/pokeballs/2.png") 92% 18% / 88px no-repeat,
        url("assets/img/pokeballs/3.png") 14% 88% / 74px no-repeat,
        url("assets/img/pokeballs/4.png") 88% 84% / 128px no-repeat,
        url("assets/img/pokeballs/5.png") 58% 22% / 82px no-repeat,
        url("assets/img/pokeballs/6.png") 76% 66% / 72px no-repeat,
        url("assets/img/pokeballs/7.png") 24% 56% / 92px no-repeat;
    opacity: 0.085;
    filter: brightness(1.06) saturate(0.96) blur(0.2px);
}

.site-header,
main.container.py-4 {
    position: relative;
    z-index: 1;
}

.app-splash {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 50% 32%, rgba(143, 91, 255, 0.26), transparent 24%),
        radial-gradient(circle at 18% 20%, rgba(219, 109, 255, 0.14), transparent 24%),
        radial-gradient(circle at 84% 78%, rgba(109, 183, 255, 0.12), transparent 22%),
        linear-gradient(180deg, rgba(15, 12, 23, 0.98), rgba(15, 12, 23, 0.995));
    opacity: 1;
    visibility: visible;
    transition: opacity 0.36s ease, visibility 0.36s ease;
}

.app-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.app-splash-seen .app-splash {
    display: none;
}

.app-splash-inner {
    display: grid;
    justify-items: center;
    gap: 1.35rem;
}

.app-splash-orbit {
    position: relative;
    width: min(76vw, 340px);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
}

.app-splash-loader-ring,
.app-splash-loader-core {
    position: absolute;
    border-radius: 50%;
}

.app-splash-loader-ring {
    inset: 18%;
    border: 4px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(230, 220, 255, 0.92);
    border-right-color: rgba(143, 91, 255, 0.92);
    box-shadow: 0 0 32px rgba(143, 91, 255, 0.18);
    animation: splash-spin 1.2s linear infinite;
}

.app-splash-loader-core {
    width: 22%;
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 52%),
        linear-gradient(180deg, rgba(143, 91, 255, 0.96), rgba(90, 50, 170, 0.96));
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, 0.03),
        0 12px 26px rgba(80, 38, 155, 0.32);
}

.app-splash-ball {
    position: absolute;
    width: clamp(44px, 10vw, 72px);
    height: clamp(44px, 10vw, 72px);
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
    --ball-x: 0px;
    --ball-y: 0px;
    animation: splash-float 2.8s ease-in-out infinite;
}

.app-splash-ball-1 { top: 4%; left: 50%; --ball-x: -50%; animation-delay: -0.2s; }
.app-splash-ball-2 { top: 18%; right: 10%; animation-delay: -0.5s; }
.app-splash-ball-3 { bottom: 18%; right: 8%; animation-delay: -0.9s; }
.app-splash-ball-4 { bottom: 5%; left: 50%; --ball-x: -50%; animation-delay: -1.2s; }
.app-splash-ball-5 { bottom: 18%; left: 8%; animation-delay: -1.5s; }
.app-splash-ball-6 { top: 18%; left: 10%; animation-delay: -1.8s; }
.app-splash-ball-7 { top: 50%; left: 50%; width: clamp(56px, 14vw, 96px); height: clamp(56px, 14vw, 96px); --ball-x: -50%; --ball-y: -50%; animation: splash-pulse 1.8s ease-in-out infinite; }

.app-splash-copy {
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    text-align: center;
}

.app-splash-brand {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.app-splash-kicker {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f6f1ff;
}

.app-splash-text {
    margin: 0;
    color: #d8caef;
    font-size: 0.96rem;
    font-weight: 700;
}

@keyframes splash-spin {
    to { transform: rotate(360deg); }
}

@keyframes splash-float {
    0%, 100% { transform: translate(var(--ball-x), var(--ball-y)) scale(1); }
    50% { transform: translate(var(--ball-x), calc(var(--ball-y) - 10px)) scale(1.04); }
}

@keyframes splash-pulse {
    0%, 100% { transform: translate(var(--ball-x), var(--ball-y)) scale(0.98); }
    50% { transform: translate(var(--ball-x), var(--ball-y)) scale(1.06); }
}

.rolling-pokeball-layer {
    position: fixed;
    inset: auto 0 0;
    z-index: 2;
    height: 120px;
    pointer-events: none;
    overflow: hidden;
}

.rolling-pokeball {
    position: absolute;
    left: calc(-1 * var(--rolling-size));
    bottom: var(--rolling-bottom);
    width: var(--rolling-size);
    height: var(--rolling-size);
    object-fit: contain;
    opacity: 0.82;
    filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.34));
}

.rolling-pokeball.is-rolling {
    animation: pokeball-roll var(--rolling-duration) linear forwards;
}

.rolling-pokeball.is-bouncing {
    animation: pokeball-bounce-roll var(--rolling-duration) linear forwards;
}

@keyframes pokeball-roll {
    from {
        transform: translateX(0) rotate(0deg);
    }
    to {
        transform: translateX(calc(100vw + (var(--rolling-size) * 2))) rotate(900deg);
    }
}

@keyframes pokeball-bounce-roll {
    0% { transform: translateX(0) translateY(0) rotate(0deg); }
    10% { transform: translateX(10vw) translateY(-16px) rotate(90deg); }
    20% { transform: translateX(20vw) translateY(0) rotate(180deg); }
    30% { transform: translateX(30vw) translateY(-12px) rotate(270deg); }
    40% { transform: translateX(40vw) translateY(0) rotate(360deg); }
    52% { transform: translateX(52vw) translateY(-8px) rotate(468deg); }
    64% { transform: translateX(64vw) translateY(0) rotate(576deg); }
    100% { transform: translateX(calc(100vw + (var(--rolling-size) * 2))) translateY(0) rotate(900deg); }
}

.api-loader-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    gap: 1rem;
    align-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 50% 42%, rgba(143, 91, 255, 0.28), transparent 24%),
        rgba(15, 12, 23, 0.82);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.api-loader-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.api-loader-orbit {
    position: relative;
    width: 178px;
    height: 178px;
    border-radius: 50%;
    animation: api-loader-spin 1.7s linear infinite;
}

.api-loader-orbit::before {
    content: "";
    position: absolute;
    inset: 38px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 52%),
        linear-gradient(180deg, rgba(143, 91, 255, 0.95), rgba(42, 26, 67, 0.95));
    box-shadow:
        0 0 0 8px rgba(255, 255, 255, 0.04),
        0 18px 34px rgba(0, 0, 0, 0.34);
}

.api-loader-ball {
    --loader-angle: calc(var(--loader-index) * 30deg);
    position: absolute;
    top: 50%;
    left: 50%;
    width: 34px;
    height: 34px;
    object-fit: contain;
    transform:
        translate(-50%, -50%)
        rotate(var(--loader-angle))
        translateY(-78px)
        rotate(calc(-1 * var(--loader-angle)));
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
}

.api-loader-label {
    color: #f7f0ff;
    font-size: 1rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-align: center;
}

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

@keyframes brand-mark-float {
    0%, 100% { transform: translateY(0) rotate(0deg) scale(1); }
    25% { transform: translateY(-2px) rotate(-5deg) scale(1.02); }
    50% { transform: translateY(-4px) rotate(0deg) scale(1.04); }
    75% { transform: translateY(-2px) rotate(5deg) scale(1.02); }
}

.back-to-top {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 30;
    width: 66px;
    height: 66px;
    padding: 0;
    border: 0;
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(48, 37, 68, 0.96), rgba(31, 22, 43, 0.98));
    border: 1px solid rgba(179, 140, 255, 0.3);
    box-shadow: 0 14px 24px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.92);
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top::before {
    content: "";
    position: absolute;
    inset: 15px 15px 15px 15px;
    background: url("pokeball-pokemon-svgrepo-com.png") center/52px 52px no-repeat;
    opacity: 0.26;
    filter: grayscale(0.15) brightness(1.15);
}

.back-to-top-glyph {
    position: absolute;
    inset: 0;
    display: block;
}

.back-to-top-glyph::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 15px;
    width: 22px;
    height: 22px;
    border-top: 4px solid #f7f3ff;
    border-left: 4px solid #f7f3ff;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 4px 0 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.back-to-top-glyph::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 22px;
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #f7f3ff, #dccbff);
    transform: translateX(-50%);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.back-to-top:hover,
.back-to-top:focus-visible {
    transform: translateY(-2px) scale(1.03);
    border-color: rgba(226, 210, 255, 0.72);
    box-shadow: 0 18px 28px rgba(72, 39, 128, 0.34);
}

.site-header {
    background:
        radial-gradient(circle at left center, rgba(179, 140, 255, 0.22), transparent 24%),
        linear-gradient(135deg, rgba(27, 21, 38, 0.98), rgba(17, 13, 25, 0.98));
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.app-kicker {
    letter-spacing: 0.12em;
    color: rgba(202, 184, 239, 0.78);
}

.brand-mark-shell {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow:
        0 0 0 1px rgba(179, 140, 255, 0.14),
        0 0 22px rgba(143, 91, 255, 0.16);
}

.brand-mark {
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand-mark-dynamic {
    filter: drop-shadow(0 0 18px rgba(143, 91, 255, 0.3));
    animation: brand-mark-float 3.2s ease-in-out infinite;
    transition: transform 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.brand-mark-dynamic.is-switching {
    opacity: 0.4;
    transform: scale(0.88) rotate(-14deg);
}

.header-subtitle {
    color: var(--app-muted);
}

.site-header .container {
    max-width: 1200px;
}

.btn {
    --bs-btn-font-weight: 700;
}

.btn-primary,
.btn-danger {
    --bs-btn-bg: var(--violet);
    --bs-btn-border-color: var(--violet);
    --bs-btn-hover-bg: var(--violet-strong);
    --bs-btn-hover-border-color: var(--violet-strong);
    --bs-btn-active-bg: var(--violet-strong);
    --bs-btn-active-border-color: var(--violet-strong);
    --bs-btn-disabled-bg: var(--violet);
    --bs-btn-disabled-border-color: var(--violet);
}

.btn-outline-dark,
.btn-outline-light {
    --bs-btn-color: #e9e3f7;
    --bs-btn-border-color: rgba(179, 140, 255, 0.55);
    --bs-btn-hover-bg: rgba(143, 91, 255, 0.14);
    --bs-btn-hover-border-color: rgba(179, 140, 255, 0.8);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: rgba(143, 91, 255, 0.22);
    --bs-btn-active-border-color: rgba(179, 140, 255, 0.9);
    --bs-btn-active-color: #fff;
}

.alert-success {
    background: rgba(72, 129, 104, 0.22);
    color: #d8f2e1;
    border-color: rgba(114, 188, 152, 0.35);
}

.alert-danger {
    background: rgba(130, 56, 89, 0.24);
    color: #ffe2ed;
    border-color: rgba(191, 92, 141, 0.34);
}

.text-secondary {
    color: var(--app-muted) !important;
}

.text-danger {
    color: #ff7aa5 !important;
}

.empty-state-panel,
.card.shadow-sm {
    border-radius: 1.25rem;
    background: rgba(23, 18, 32, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28) !important;
}

.card h2,
.card h3,
.card h4,
.card .h4,
.card .h5,
.card .h6 {
    color: #f6f2ff;
}

.form-label {
    color: #efe5ff;
    font-weight: 700;
}

.form-check-label {
    color: #e4d7fb;
}

.form-text {
    color: #c1b1de !important;
}

.pokemon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.binder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 1.15rem;
}

.binder-card {
    min-width: 0;
}

.binder-card-shell {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 0.72rem;
    border-radius: 1.15rem;
    background:
        radial-gradient(circle at 16% 10%, rgba(219, 109, 255, 0.2), transparent 34%),
        linear-gradient(145deg, rgba(143, 91, 255, 0.28), transparent 32%),
        linear-gradient(180deg, var(--card-shell) 0%, var(--app-surface) 54%, #120d1b 100%);
    border: 1px solid rgba(179, 140, 255, 0.38);
    box-shadow:
        0 18px 34px rgba(0, 0, 0, 0.34),
        0 0 0 3px rgba(255, 255, 255, 0.035) inset;
    overflow: hidden;
    transform-origin: center center;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.binder-card-shell::before {
    content: "";
    position: absolute;
    inset: 0.45rem;
    border-radius: 0.86rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    pointer-events: none;
}

.binder-card-category {
    position: absolute;
    z-index: 3;
    top: 0.05rem;
    left: 50%;
    max-width: calc(100% - 2.6rem);
    transform: translateX(-50%);
    padding: 0.12rem 0.62rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(43, 32, 56, 0.96), rgba(18, 13, 27, 0.96));
    border: 1px solid rgba(244, 197, 66, 0.72);
    color: #f7d975;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 4px 12px rgba(0, 0, 0, 0.28);
    font-size: 0.62rem;
    font-weight: 900;
    line-height: 1.15;
    text-align: center;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.binder-card-shell:hover,
.binder-card-shell:focus-within {
    transform: perspective(1200px) scale(1.03) rotate(-1.2deg);
    box-shadow:
        0 26px 42px rgba(0, 0, 0, 0.44),
        0 0 0 3px rgba(179, 140, 255, 0.12) inset;
    filter: saturate(1.08);
}

.binder-card-main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    padding-top: 0.42rem;
    color: var(--app-ink);
    text-decoration: none;
}

.binder-card-main:hover {
    color: var(--app-ink);
}

.binder-card-title-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.55rem;
    min-height: 2.35rem;
    padding: 0.18rem 0.2rem 0.42rem;
}

.binder-card-title {
    min-width: 0;
    margin: 0;
    color: var(--app-ink);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.08;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 10px rgba(143, 91, 255, 0.28);
}

.binder-card-hp {
    display: inline-flex;
    align-items: baseline;
    gap: 0.16rem;
    white-space: nowrap;
    color: #f0d8ff;
    font-size: 0.76rem;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.binder-card-hp strong {
    font-size: 1.05rem;
}

.binder-card-hp.is-empty {
    color: rgba(199, 184, 228, 0.7);
    font-size: 0.7rem;
}

.binder-card-media {
    display: block;
    aspect-ratio: 1.2;
    border: 5px solid rgba(179, 140, 255, 0.48);
    border-radius: 0.45rem;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.2), transparent 34%),
        linear-gradient(180deg, #2b2038, #181222);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 12px 20px rgba(0, 0, 0, 0.24);
}

.binder-card-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 26%;
    transform: scale(1.18);
    transition: transform 0.22s ease, object-position 0.22s ease, filter 0.22s ease;
}

.binder-card-shell:hover .binder-card-image,
.binder-card-shell:focus-within .binder-card-image {
    transform: scale(1.02);
    object-position: center center;
}

.binder-card-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--app-muted);
    font-weight: 800;
    text-align: center;
    padding: 1rem;
}

.binder-card-lore {
    display: flex;
    justify-content: space-between;
    gap: 0.55rem;
    min-height: 1.58rem;
    margin-top: 0.48rem;
    padding: 0.25rem 0.42rem;
    border-radius: 0.35rem;
    background: rgba(15, 12, 23, 0.58);
    border: 1px solid rgba(179, 140, 255, 0.22);
    color: var(--app-muted);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.1;
    overflow: hidden;
}

.binder-card-lore span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.binder-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    margin-top: 0.62rem;
}

.binder-card-meta {
    min-width: 0;
    color: var(--app-muted);
    font-size: 0.72rem;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.binder-card-ranking {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.52rem;
    margin-top: 0.72rem;
    padding: 0.34rem 0.48rem;
    border-radius: 999px;
    background: rgba(15, 12, 23, 0.48);
    border: 1px solid rgba(179, 140, 255, 0.18);
}

.binder-ranking-stars {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0.08rem;
    min-width: 0;
    flex: 1;
}

.binder-ranking-star {
    color: rgba(199, 184, 228, 0.26);
    font-size: 0.76rem;
    line-height: 1;
    text-align: center;
}

.binder-ranking-star.is-filled {
    color: #f4c542;
    text-shadow: 0 0 8px rgba(244, 197, 66, 0.36);
}

.binder-ranking-value {
    flex: 0 0 auto;
    color: #f7d975;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1;
}

.binder-card-actions {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 0.38rem;
    margin-top: 0.72rem;
}

.binder-card-actions .btn {
    flex: 1;
    min-width: 0;
    padding: 0.34rem 0.48rem;
    font-size: 0.72rem;
    font-weight: 800;
}

.card-type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
}

.card-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    min-height: 28px;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    background: rgba(143, 91, 255, 0.16);
    border: 1px solid rgba(179, 140, 255, 0.26);
    color: #f3edff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.card-type-chip {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 0.28rem;
    max-width: 7.5rem;
    padding: 0.12rem 0.38rem 0.12rem 0.18rem;
    border-radius: 999px;
    background: rgba(143, 91, 255, 0.18);
    border: 1px solid rgba(179, 140, 255, 0.34);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1;
}

.card-type-chip span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-type-icon {
    display: inline-block;
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    background-image: url("assets/img/type/energy-types.png");
    background-repeat: no-repeat;
    background-size: 100px 75px;
    border-radius: 50%;
    vertical-align: middle;
}

.card-type-icon-fire {
    background-position: 0 0;
}

.card-type-icon-colorless {
    background-position: -25px 0;
}

.card-type-icon-fairy {
    background-position: -50px 0;
}

.card-type-icon-metal {
    background-position: -75px 0;
}

.card-type-icon-dragon {
    background-position: 0 -25px;
}

.card-type-icon-lightning {
    background-position: -25px -25px;
}

.card-type-icon-fighting {
    background-position: -50px -25px;
}

.card-type-icon-psychic {
    background-position: -75px -25px;
}

.card-type-icon-darkness {
    background-position: 0 -50px;
}

.card-type-icon-grass {
    background-position: -25px -50px;
}

.card-type-icon-water {
    background-position: -75px -50px;
}

.imported-card-panel {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.imported-card-media {
    border-radius: 1.35rem;
    overflow: hidden;
    background: linear-gradient(180deg, #2c213d, #17111f);
    padding: 0.65rem;
    box-shadow: 0 16px 30px rgba(0, 0, 0, 0.32);
    transform-origin: center center;
    transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.imported-card-image,
.imported-card-placeholder {
    width: 100%;
    aspect-ratio: 0.72;
    border-radius: 1rem;
    transition: transform 0.24s ease, filter 0.24s ease;
}

.imported-card-image {
    display: block;
    object-fit: cover;
}

.imported-card-media:hover {
    transform: perspective(1200px) scale(1.1) rotate(-2.4deg);
    box-shadow: 0 26px 42px rgba(0, 0, 0, 0.44);
    filter: saturate(1.1);
}

.imported-card-media:hover .imported-card-image,
.imported-card-media:hover .imported-card-placeholder {
    transform: scale(1.05);
}

.imported-card-placeholder {
    display: grid;
    place-items: center;
    text-align: center;
    padding: 1rem;
    color: var(--app-muted);
    background: linear-gradient(180deg, #2a2038, #17111f);
}

.imported-card-name {
    font-size: 1.8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 0.35rem;
    color: #f7f4ff;
}

.imported-card-number {
    color: #d3c7ea;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.imported-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.imported-card-stat {
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(179, 140, 255, 0.18);
}

.imported-card-stat span {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #bdaed9;
    margin-bottom: 0.25rem;
}

.imported-card-stat strong {
    display: block;
    font-size: 0.95rem;
    color: #f5f2ff;
}

.api-import-panel .text-danger,
.collection-section .text-secondary,
.detail-sheet .text-secondary,
.card .text-secondary {
    color: #cfbfe9 !important;
}

.api-import-panel .card-body > .d-flex h3,
.api-import-panel .card-body > h3,
.card-body > h3,
.card-body > h2 {
    color: #f7f3ff;
}

.form-check-input {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(179, 140, 255, 0.5);
}

.form-check-input:checked {
    background-color: var(--violet);
    border-color: var(--violet);
}

.pokemon-mini-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    border-radius: 1.15rem;
    padding: 0.6rem;
    background: linear-gradient(180deg, #ffe184 0%, #f3cb62 100%);
    border: 2px solid var(--card-border);
    box-shadow:
        0 16px 28px rgba(25, 46, 85, 0.12),
        inset 0 0 0 2px rgba(255, 255, 255, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.pokemon-mini-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 20px 32px rgba(25, 46, 85, 0.16),
        inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.pokemon-card-top,
.pokemon-card-bottom {
    background: rgba(255, 249, 230, 0.92);
    border-radius: 0.8rem;
    border: 1px solid rgba(129, 99, 12, 0.18);
}

.pokemon-card-top {
    padding: 0.65rem 0.7rem 0.55rem;
    margin-bottom: 0.55rem;
}

.pokemon-card-name {
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.1;
}

.pokemon-card-meta,
.one-line {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pokemon-card-meta {
    font-size: 0.72rem;
    color: var(--app-muted);
    margin-top: 0.2rem;
}

.pokemon-badge {
    background: var(--violet-strong);
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
}

.pokemon-image-frame {
    flex: 1;
    border-radius: 0.95rem;
    overflow: hidden;
    border: 2px solid rgba(99, 78, 13, 0.24);
    background:
        linear-gradient(180deg, rgba(95, 168, 255, 0.28), rgba(255, 255, 255, 0.5)),
        linear-gradient(135deg, #f9f3d0, #ddecff);
    min-height: 175px;
}

.pokemon-image,
.gallery-photo,
.detail-photo {
    width: 100%;
    display: block;
    object-fit: cover;
}

.pokemon-image {
    height: 100%;
}

.gallery-photo {
    aspect-ratio: 4 / 3;
}

.detail-photo {
    max-height: 560px;
    width: 100%;
}

.pokemon-image-placeholder,
.detail-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    min-height: 175px;
    color: var(--app-muted);
    font-weight: 700;
    text-align: center;
    padding: 1rem;
}

.detail-placeholder {
    min-height: 420px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #2a2038, #17111f);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
}

.detail-card-stage {
    position: sticky;
    top: 1.2rem;
}

.detail-card-shell {
    border-radius: 1.6rem;
    overflow: hidden;
    background: linear-gradient(180deg, #2a2038, #17111f);
    padding: 0.9rem;
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.36);
    transform-origin: center center;
    transition: transform 0.24s ease, box-shadow 0.24s ease, filter 0.24s ease;
}

.detail-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 0.72;
    object-fit: cover;
    border-radius: 1.1rem;
    transition: transform 0.24s ease, filter 0.24s ease;
}

.detail-card-shell:hover {
    transform: perspective(1400px) scale(1.06) rotate(-1.8deg);
    box-shadow: 0 28px 48px rgba(0, 0, 0, 0.45);
    filter: saturate(1.08);
}

.detail-card-shell:hover .detail-card-image,
.detail-card-shell:hover .detail-placeholder {
    transform: scale(1.045);
}

.detail-photo-stack {
    display: grid;
    gap: 0.85rem;
}

.detail-sheet,
.collection-section {
    background: rgba(23, 18, 32, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.detail-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 0.98;
    margin-bottom: 0.45rem;
    color: #faf7ff;
}

.detail-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    color: var(--app-muted);
    font-size: 0.95rem;
}

.detail-subtitle span {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--app-line);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    color: #ddd3f0;
}

.detail-info-grid,
.collection-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.detail-info-card {
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(143, 91, 255, 0.11), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(143, 91, 255, 0.2);
}

.detail-info-card span {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #bdaed9;
    margin-bottom: 0.35rem;
}

.detail-info-card strong {
    font-size: 1rem;
    color: #f5f2ff;
}

.collection-section-head {
    margin-bottom: 1rem;
}

.pokemon-card-bottom {
    padding: 0.7rem;
    margin-top: 0.55rem;
}

.detail-stat {
    height: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--app-line);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.03);
}

.detail-stat span {
    display: block;
    margin-bottom: 0.35rem;
    color: #bdaed9;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.detail-stat strong {
    font-size: 1rem;
    color: #f5f2ff;
}

.note-box {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    background: rgba(143, 91, 255, 0.08);
    border: 1px solid rgba(143, 91, 255, 0.22);
    color: #f0ebfb;
}

.search-shell {
    background: rgba(23, 18, 32, 0.88);
    backdrop-filter: blur(8px);
}

.search-shell .card-body {
    padding: 0.9rem 1rem !important;
}

.search-set-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.search-set-label {
    color: #d8cdef;
    font-size: 0.92rem;
    font-weight: 700;
}

.filter-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.filter-reset-link {
    color: #b78fff;
    font-weight: 700;
    text-decoration: none;
}

.filter-reset-link:hover {
    color: #d2b7ff;
}

.type-filter-block {
    border-top: 1px solid rgba(179, 140, 255, 0.14);
    padding-top: 1rem;
}

.collection-sort-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: nowrap;
    justify-content: flex-end;
    margin-left: auto;
}

.collection-sort-row .form-label {
    flex: 0 0 auto;
    white-space: nowrap;
}

.collection-sort-select {
    width: 290px;
    height: 42px;
    min-height: 42px;
    padding: 0.42rem 2.4rem 0.42rem 0.9rem;
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(47, 35, 66, 0.96), rgba(29, 21, 42, 0.96));
    border-color: rgba(179, 140, 255, 0.38);
    color: #f3edff;
    font-size: 0.9rem;
    font-weight: 800;
}

.collection-filter-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 0.85rem;
}

.collection-filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.collection-filter-buttons .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
}

.type-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
    padding-top: 0.85rem;
}

.type-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-width: 88px;
    padding: 0.4rem 0.78rem 0.4rem 0.42rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(47, 35, 66, 0.96), rgba(29, 21, 42, 0.96));
    border: 1px solid rgba(179, 140, 255, 0.34);
    color: #f2ebff;
    font-weight: 700;
    cursor: pointer;
    user-select: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.type-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.type-pill:hover {
    transform: translateY(-1px);
    border-color: rgba(191, 159, 255, 0.78);
    box-shadow: 0 10px 18px rgba(69, 40, 116, 0.22);
}

.type-pill.is-active {
    color: #fff;
    background: linear-gradient(135deg, #b78fff, #7a44ff);
    border-color: rgba(226, 210, 255, 0.95);
    box-shadow:
        0 14px 24px rgba(95, 57, 170, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.mobile-filter-collapse {
    display: block;
}

.mobile-filter-collapse:not(.is-open) {
    display: none;
}

.mobile-filter-toggle {
    display: inline-flex;
}

.search-set-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    text-decoration: none;
    color: #f7f2ff;
    background: linear-gradient(180deg, rgba(53, 40, 74, 0.95), rgba(35, 26, 49, 0.95));
    border: 1px solid rgba(179, 140, 255, 0.42);
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.search-set-pill span {
    color: #d8c9f3;
    font-size: 0.78rem;
    font-weight: 600;
}

.search-set-pill:hover {
    color: #fff;
    background: linear-gradient(180deg, rgba(88, 59, 135, 0.96), rgba(57, 36, 92, 0.96));
    border-color: rgba(191, 159, 255, 0.82);
    box-shadow: 0 10px 18px rgba(69, 40, 116, 0.28);
    transform: translateY(-1px);
}

.search-set-pill.is-active {
    color: #fff;
    background: linear-gradient(135deg, #b78fff, #7a44ff);
    border-color: rgba(226, 210, 255, 0.95);
    box-shadow:
        0 14px 24px rgba(95, 57, 170, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.08) inset;
    transform: translateY(-1px);
}

.search-set-pill.is-active span {
    color: #f4ecff;
}

.search-active-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    background: rgba(143, 91, 255, 0.08);
    border: 1px solid rgba(179, 140, 255, 0.2);
    color: #e8deff;
}

.search-active-filter strong {
    color: #fff;
}

.search-active-filter em {
    color: #cab9e9;
    font-style: normal;
}

.search-active-filter a {
    color: #b78fff;
    font-weight: 700;
    text-decoration: none;
}

.search-active-filter a:hover {
    color: #d2b7ff;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.4rem;
}

.search-card-result {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.search-card-media {
    position: relative;
    display: block;
    aspect-ratio: 0.72;
    border-radius: 1.4rem;
    overflow: hidden;
    background: linear-gradient(180deg, #2b2038, #17111f);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35);
    text-decoration: none;
    transform-origin: center center;
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.search-card-media:hover .search-card-image,
.search-card-media:hover .search-card-placeholder {
    transform: scale(1.08);
}

.search-card-image,
.search-card-placeholder {
    width: 100%;
    height: 100%;
    transition: transform 0.18s ease;
}

.search-card-image {
    object-fit: cover;
    display: block;
}

.search-card-placeholder {
    display: grid;
    place-items: center;
    padding: 1rem;
    text-align: center;
    font-weight: 700;
    color: var(--app-muted);
}

.search-card-media:hover {
    transform: perspective(1200px) scale(1.08) rotate(-2.4deg);
    box-shadow: 0 24px 38px rgba(0, 0, 0, 0.44);
    filter: saturate(1.1);
}

.search-card-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1rem 0.9rem 0.85rem;
    background: linear-gradient(180deg, rgba(8, 6, 14, 0) 0%, rgba(8, 6, 14, 0.92) 100%);
    color: #fff;
}

.form-control,
.form-select {
    background-color: rgba(33, 25, 45, 0.92);
    border-color: rgba(179, 140, 255, 0.32);
    color: #f3edff;
}

.form-select {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23b38cff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(43, 32, 58, 0.96);
    color: #fff;
    border-color: rgba(179, 140, 255, 0.75);
    box-shadow: 0 0 0 0.25rem rgba(143, 91, 255, 0.18);
}

.form-select:hover {
    border-color: rgba(191, 159, 255, 0.68);
}

.form-control::placeholder {
    color: #bfaedc;
}

.form-select option {
    background: #21192d;
    color: #f3edff;
}

.ranking-picker {
    display: grid;
    gap: 0.42rem;
}

.ranking-stars {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 0.28rem;
    max-width: 360px;
}

.ranking-star {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    border: 1px solid rgba(179, 140, 255, 0.3);
    border-radius: 0.45rem;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(199, 184, 228, 0.48);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.14s ease, background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.ranking-star:hover,
.ranking-star:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(179, 140, 255, 0.78);
    outline: none;
}

.ranking-star.is-active {
    background: rgba(143, 91, 255, 0.24);
    border-color: rgba(179, 140, 255, 0.68);
    color: #f0d8ff;
}

.ranking-value {
    color: var(--app-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1) brightness(1.2);
}

input[type="file"]::file-selector-button {
    margin-right: 0.9rem;
    border: 0;
    border-radius: 0.7rem;
    padding: 0.65rem 0.9rem;
    background: rgba(143, 91, 255, 0.2);
    color: #fff;
    font-weight: 700;
}

.card .btn-outline-secondary {
    --bs-btn-color: #e9e3f7;
    --bs-btn-border-color: rgba(179, 140, 255, 0.42);
    --bs-btn-hover-bg: rgba(143, 91, 255, 0.12);
    --bs-btn-hover-border-color: rgba(179, 140, 255, 0.72);
    --bs-btn-hover-color: #fff;
}

.card .btn-outline-secondary:disabled {
    --bs-btn-color: #8e7cae;
}

.search-card-title {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.search-card-number {
    font-size: 0.82rem;
    opacity: 0.92;
    letter-spacing: 0.03em;
}

.search-card-body {
    padding: 0 0.25rem;
}

.search-type-badges {
    margin-bottom: 0.75rem;
}

.search-card-set {
    min-height: 2.4em;
    margin-bottom: 0.7rem;
    color: var(--app-ink);
    font-size: 0.94rem;
    font-weight: 700;
    line-height: 1.2;
}

.search-card-set-muted {
    color: var(--app-muted);
    font-weight: 600;
}

.search-results-summary {
    color: #d7caef;
    font-size: 0.96rem;
}

.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.search-pagination-status {
    color: #e9deff;
    font-weight: 700;
}

.pokemon-initial-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.pokemon-initial-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.8rem;
    border-radius: 999px;
    text-decoration: none;
    color: #f4edff;
    background: linear-gradient(180deg, rgba(53, 40, 74, 0.95), rgba(35, 26, 49, 0.95));
    border: 1px solid rgba(179, 140, 255, 0.42);
    font-size: 0.9rem;
    font-weight: 800;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.pokemon-initial-pill:hover,
.pokemon-initial-pill:focus-visible {
    color: #fff;
    background: linear-gradient(135deg, #b78fff, #7a44ff);
    border-color: rgba(226, 210, 255, 0.95);
    box-shadow: 0 12px 22px rgba(95, 57, 170, 0.28);
    transform: translateY(-1px);
}

.pokemon-group-section {
    margin-bottom: 1.6rem;
    scroll-margin-top: 110px;
}

.pokemon-group-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.8rem;
}

.pokemon-group-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 900;
    color: #faf7ff;
}

.pokemon-group-count {
    color: #c8b9e4;
    font-size: 0.84rem;
    font-weight: 700;
}

.pokemon-wiki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.8rem;
}

.pokemon-wiki-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-height: 94px;
    padding: 0.7rem 0.8rem;
    border-radius: 1rem;
    background: rgba(23, 18, 32, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 18px rgba(0, 0, 0, 0.22);
}

.pokemon-wiki-media {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    flex: 0 0 64px;
    border-radius: 0.9rem;
    background: radial-gradient(circle at top left, rgba(143, 91, 255, 0.12), transparent 35%), rgba(255, 255, 255, 0.025);
    overflow: hidden;
}

.pokemon-wiki-image {
    width: 56px;
    height: 56px;
    object-fit: contain;
    image-rendering: auto;
}

.pokemon-wiki-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    min-width: 0;
    text-align: left;
}

.pokemon-wiki-name {
    color: #f7f2ff;
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pokemon-wiki-name-link {
    text-decoration: none;
}

.pokemon-wiki-name-link:hover .pokemon-wiki-name,
.pokemon-wiki-name-link:focus-visible .pokemon-wiki-name {
    color: #caa8ff;
}

.pokemon-wiki-id {
    color: #c8b9e4;
    font-size: 0.8rem;
    font-weight: 700;
}

@media (max-width: 576px) {
    .collection-filter-actions,
    .collection-sort-row {
        width: 100%;
    }

    .collection-sort-select {
        width: min(100%, 230px);
    }

    .app-splash {
        padding: 1rem;
    }

    .app-splash-orbit {
        width: min(86vw, 280px);
    }

    .app-splash-kicker {
        font-size: 0.96rem;
    }

    .app-splash-text {
        font-size: 0.9rem;
    }

    .container.py-4,
    .site-header .container.py-3 {
        padding-left: 0.95rem !important;
        padding-right: 0.95rem !important;
    }

    .brand-mark-shell {
        width: 46px;
        height: 46px;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
    }

    body.app-body::after {
        background:
            url("mew.png") left -18px bottom 92px / 128px auto no-repeat,
            url("assets/img/pokeballs/1.png") 7% 14% / 86px no-repeat,
            url("assets/img/pokeballs/2.png") 92% 18% / 68px no-repeat,
            url("assets/img/pokeballs/3.png") 14% 88% / 58px no-repeat,
            url("assets/img/pokeballs/4.png") 88% 84% / 84px no-repeat,
            url("assets/img/pokeballs/5.png") 66% 24% / 62px no-repeat,
            url("assets/img/pokeballs/6.png") 78% 64% / 56px no-repeat,
            url("assets/img/pokeballs/7.png") 22% 54% / 68px no-repeat;
        opacity: 0.065;
    }

    .back-to-top {
        width: 58px;
        height: 58px;
        right: 0.85rem;
        bottom: 0.85rem;
        border-radius: 1.2rem;
    }

    .back-to-top::before {
        inset: 13px;
        background-size: 44px 44px;
    }

    .back-to-top-glyph::before {
        top: 13px;
        width: 18px;
        height: 18px;
        border-top-width: 3px;
        border-left-width: 3px;
    }

    .back-to-top-glyph::after {
        top: 19px;
        width: 3px;
        height: 21px;
    }

    .app-kicker {
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .header-subtitle {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .site-header nav {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-header nav .btn {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
        font-size: 0.88rem;
    }

    .pokemon-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.85rem;
    }

    .binder-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .search-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    .search-card-title {
        font-size: 0.95rem;
    }

    .binder-grid,
    .collection-grid,
    .detail-info-grid,
    .imported-card-grid {
        grid-template-columns: 1fr;
    }

    .binder-card-shell,
    .detail-sheet,
    .collection-section,
    .card.shadow-sm .card-body {
        padding: 1rem !important;
    }

    .binder-card-title-row {
        gap: 0.5rem;
    }

    .binder-card-title {
        font-size: 1rem;
    }

    .binder-card-actions {
        gap: 0.32rem;
    }

    .binder-card-actions .btn {
        padding-inline: 0.36rem;
        font-size: 0.68rem;
    }

    .detail-title {
        font-size: 1.85rem;
    }

    .detail-subtitle {
        gap: 0.45rem;
    }

    .detail-subtitle span {
        padding: 0.32rem 0.65rem;
        font-size: 0.84rem;
    }

    .imported-card-name {
        font-size: 1.45rem;
    }

    .imported-card-number {
        font-size: 0.92rem;
        margin-bottom: 0.75rem;
    }

    .search-card-set {
        min-height: 0;
        font-size: 0.85rem;
    }

    .pokemon-initial-nav {
        gap: 0.45rem;
    }

    .pokemon-initial-pill {
        min-width: 38px;
        height: 38px;
        padding: 0 0.7rem;
        font-size: 0.84rem;
    }

    .pokemon-wiki-grid {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }

    .pokemon-wiki-card {
        min-height: 86px;
        padding: 0.65rem 0.75rem;
    }

    .pokemon-wiki-media {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
    }

    .pokemon-wiki-image {
        width: 50px;
        height: 50px;
    }

    .search-card-body .btn {
        font-size: 0.9rem;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }

    .form-check {
        padding-top: 0.15rem;
        padding-bottom: 0.15rem;
    }

    .detail-card-shell {
        padding: 0.65rem;
    }
}

@media (max-width: 992px) {
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .detail-card-stage {
        position: static;
    }

    .imported-card-panel {
        grid-template-columns: 1fr;
    }

    .detail-card-shell,
    .imported-card-media {
        max-width: 420px;
        margin: 0 auto;
    }
}

@media (max-width: 400px) {
    .site-header nav {
        grid-template-columns: 1fr;
    }

    .search-results-grid {
        grid-template-columns: 1fr;
    }

    .d-flex.gap-2.flex-wrap {
        width: 100%;
    }

    .d-flex.gap-2.flex-wrap > .btn {
        flex: 1 1 100%;
    }
}
