/* ===== POKEPERM — VIBRANT POKEMON THEME ===== */

html, body {
    font-family: 'Poppins', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a, .btn-link {
    color: #e63946;
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    border: none;
    font-weight: 600;
    border-radius: 8px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #ffb347;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #2ecc71;
}

.invalid {
    outline: 1px solid #e63946;
}

.validation-message {
    color: #e63946;
}

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ---------- PokePerm ---------- */

.sort-control {
    display: flex;
    gap: 0.25rem;
}
.sort-control .chip:disabled {
    opacity: 0.4;
    cursor: default;
}
.slot-size-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.slot-size-control label { font-size: 13px; color: var(--pp-text-subtle); font-weight: 500; }
.slot-size-control input[type=range] { width: 100px; accent-color: #e63946; }

.collection-value {
    font-weight: 700;
    font-size: 1.05rem;
    color: #2ecc71;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}
.collection-value .value-label { font-size: 0.75rem; color: var(--pp-text-muted); font-weight: 500; }
.collection-value.loading { color: #aaa; font-weight: 400; font-size: 0.9rem; text-shadow: none; }

.cost-to-complete {
    font-weight: 700;
    font-size: 1.05rem;
    color: #f39c12;
    text-shadow: 0 0 8px rgba(243, 156, 18, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.cost-to-complete .bi { font-size: 0.95rem; }
.cost-to-complete .value-label { font-size: 0.75rem; color: var(--pp-text-muted); font-weight: 500; }
.cost-to-complete.loading { color: #aaa; font-weight: 400; font-size: 0.9rem; text-shadow: none; }
.cost-to-complete.inline { font-size: 0.85rem; margin-left: 0.75rem; vertical-align: middle; }
.cost-to-complete.complete { color: #2ecc71; text-shadow: 0 0 8px rgba(46, 204, 113, 0.25); }
.cost-to-complete.complete .value-label { color: inherit; font-weight: 600; }

.guide-replay {
    background: none;
    border: 1px dashed var(--pp-border-3, #d8d8d8);
    color: var(--pp-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.guide-replay:hover { background: var(--pp-surface-hover, rgba(0, 0, 0, 0.05)); color: var(--pp-text); border-style: solid; }

.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0.5rem 0.5rem;
    flex-wrap: wrap;
}

.daily-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    margin: 0 0.5rem 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(230, 57, 70, 0.14));
    border: 1px solid rgba(124, 58, 237, 0.35);
    color: var(--pp-text);
    text-decoration: none;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.daily-banner:hover { filter: brightness(1.05); transform: translateY(-1px); color: var(--pp-text); }
.daily-banner-icon { color: #7c3aed; font-size: 1.15rem; }
.daily-banner-sprite { width: 44px; height: 44px; image-rendering: pixelated; flex-shrink: 0; }
.daily-banner-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.daily-banner-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #7c3aed; }
.daily-banner-name { font-size: 0.95rem; font-weight: 700; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-banner-cta { margin-left: auto; font-size: 0.85rem; font-weight: 600; color: var(--pp-text-muted); display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; }
.daily-banner:hover .daily-banner-cta { color: #7c3aed; }
@media (max-width: 480px) {
    .daily-banner-cta span { display: none; }
}

/* Snap launch banner — sits above the daily banner on /, announces the new camera-based add
   flow, dismissible via the X button (localStorage-backed). Uses the same orange/yellow palette
   as the SnapPage hero so the visual identity carries over. */
.snap-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.7rem 1rem;
    margin: 0 0.5rem 0.75rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.16), rgba(255, 182, 39, 0.12));
    border: 1.5px solid rgba(255, 107, 0, 0.45);
    color: var(--pp-text);
    text-decoration: none;
    transition: filter 0.15s ease, transform 0.15s ease;
}
.snap-banner:hover { filter: brightness(1.05); transform: translateY(-1px); color: var(--pp-text); }
.snap-banner-icon {
    flex: 0 0 44px; width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b00, #ffb627); color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 2px 0 #c64200;
}
.snap-banner-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1; }
.snap-banner-label { font-size: 0.85rem; font-weight: 800; color: #b04500; display: inline-flex; align-items: center; gap: 0.4rem; }
.snap-banner-label strong { font-weight: 900; }
.snap-banner-beta {
    padding: 1px 6px; font-size: 0.6rem; font-weight: 900; letter-spacing: 0.08em;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff4ecd, #7b6cff 60%, #4ecdff);
    color: #fff; text-transform: uppercase;
}
.snap-banner-sub { font-size: 0.8rem; color: var(--pp-text-muted, #777); margin-top: 0.1rem; }
.snap-banner-cta { margin-left: auto; font-size: 0.85rem; font-weight: 700; color: #b04500; display: flex; align-items: center; gap: 0.25rem; flex-shrink: 0; padding-right: 1.6rem; }
.snap-banner-dismiss {
    position: absolute; top: 0.4rem; right: 0.4rem;
    width: 28px; height: 28px; border-radius: 50%;
    background: transparent; border: none; cursor: pointer;
    color: var(--pp-text-muted, #777);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.85rem;
}
.snap-banner-dismiss:hover { background: rgba(0, 0, 0, 0.08); color: var(--pp-text); }
[data-theme="dark"] .snap-banner-label { color: #ffb627; }
[data-theme="dark"] .snap-banner-cta { color: #ffb627; }
@media (max-width: 600px) {
    .snap-banner-sub { display: none; }
    .snap-banner-cta span { display: none; }
}

/* Slot/Set/Collection page Snap shortcut — sit the SnapEntryButton next to the search field. */
.slot-picker-search-row,
.collection-search-row,
.set-card-search-row {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}
.slot-picker-search-row > .search-row,
.collection-search-row > .search-row,
.set-card-search-row > .search-row {
    flex: 1 1 14rem; min-width: 0; margin-bottom: 0;
}

/* Guest-collection nudge — shown on the home + slot pages to remind anon
   visitors their cards only live in this browser until they sign in. See
   GuestCollectionService + CollectionService.ClaimGuestCollectionAsync. */
.guest-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    margin: 0 0.5rem 0.75rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.16), rgba(230, 57, 70, 0.14));
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: var(--pp-text);
    font-size: 0.92rem;
    line-height: 1.35;
}
.guest-banner-icon { color: #f59e0b; font-size: 1.2rem; line-height: 1.35; flex-shrink: 0; }
.guest-banner-text { flex: 1 1 auto; min-width: 0; }
.guest-banner-text a { color: #7c3aed; font-weight: 600; text-decoration: underline; }
.guest-banner-text a:hover { filter: brightness(1.1); }

.intro-hero {
    position: relative;
    margin: 0.5rem 0.5rem 1rem;
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(230, 57, 70, 0.14) 55%, rgba(245, 158, 11, 0.16));
    border: 1px solid rgba(124, 58, 237, 0.35);
    overflow: hidden;
}
.intro-hero-content { max-width: 720px; display: flex; flex-direction: column; gap: 0.9rem; }
.intro-hero-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #7c3aed;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.14);
}
.intro-hero-title { margin: 0; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; font-weight: 800; color: var(--pp-text); }
.intro-hero-subtitle { margin: 0; font-size: 1rem; line-height: 1.5; color: var(--pp-text); opacity: 0.9; }
.intro-hero-points { list-style: none; padding: 0; margin: 0.25rem 0 0; display: grid; gap: 0.4rem; }
.intro-hero-points li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.95rem; color: var(--pp-text); }
.intro-hero-points li i { color: #7c3aed; font-size: 1.05rem; width: 1.25rem; text-align: center; flex-shrink: 0; }
.intro-hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.35rem; }
.btn-hero-primary {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    font-weight: 700; font-size: 0.95rem;
    color: #fff; text-decoration: none;
    background: linear-gradient(135deg, #7c3aed, #e63946);
    border: none; border-radius: 10px;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.btn-hero-primary:hover { transform: translateY(-1px); filter: brightness(1.07); color: #fff; box-shadow: 0 6px 18px rgba(124, 58, 237, 0.45); }
.btn-hero-secondary {
    display: inline-flex; align-items: center;
    padding: 0.65rem 1rem;
    font-weight: 600; font-size: 0.95rem;
    color: var(--pp-text); text-decoration: none;
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    transition: background 0.15s ease, transform 0.15s ease;
}
.btn-hero-secondary:hover { background: var(--pp-surface-hover); transform: translateY(-1px); color: var(--pp-text); }
.intro-hero-hint { margin: 0; font-size: 0.8rem; color: var(--pp-text-muted); }
@media (max-width: 480px) {
    .intro-hero { padding: 1.25rem 1rem; }
    .intro-hero-actions { flex-direction: column; align-items: stretch; }
    .btn-hero-primary, .btn-hero-secondary { justify-content: center; }
}

.welcome-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin: 0.5rem 0.5rem 1rem;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    border-left: 4px solid #7c3aed;
}
.welcome-card-icon { color: #7c3aed; font-size: 1.4rem; margin-top: 0.1rem; flex-shrink: 0; }
.welcome-card-body { min-width: 0; }
.welcome-card-title { margin: 0 0 0.25rem; font-size: 1.05rem; font-weight: 700; color: var(--pp-text); }
.welcome-card-text { margin: 0; font-size: 0.9rem; line-height: 1.5; color: var(--pp-text); opacity: 0.9; }
.welcome-card-text a { color: #7c3aed; font-weight: 600; }
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}
.sort-size-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.chip {
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pp-text);
    cursor: pointer;
    user-select: none;
    line-height: 1.4;
    transition: all 0.15s ease;
}
.chip:hover {
    background: var(--pp-surface-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.chip.active {
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    border-color: #e63946;
    color: white;
    box-shadow: 0 2px 12px rgba(230, 57, 70, 0.4);
}
.chip-count {
    display: inline-block;
    margin-left: 4px;
    padding: 0 6px;
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
}
.chip.active .chip-count { background: rgba(255,255,255,0.3); }
.chip-sep {
    display: inline-block;
    width: 2px;
    height: 18px;
    background: var(--pp-border);
    margin: 0 4px;
    border-radius: 1px;
}
.chip.tier-chip.tier-0 { border-left: 4px solid #999; }
.chip.tier-chip.tier-1 { border-left: 4px solid #58b4ff; }
.chip.tier-chip.tier-2 { border-left: 4px solid #3d7be6; }
.chip.tier-chip.tier-3 { border-left: 4px solid #c06dff; }
.chip.tier-chip.tier-4 { border-left: 4px solid #ffc233; }
.gen-select {
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pp-text);
    cursor: pointer;
    line-height: 1.4;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 22px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23888'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: all 0.15s ease;
}
.gen-select:hover {
    background-color: var(--pp-surface-hover);
    transform: translateY(-1px);
}
.gen-select.active {
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    border-color: #e63946;
    color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23fff'/%3E%3C/svg%3E");
}

.dex-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 9), 1fr);
    gap: 8px;
    padding: 0.5rem;
}
@media (max-width: 768px) {
    .dex-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); }
}

.dex-cell {
    position: relative;
    aspect-ratio: 5 / 7;
    border: 2px solid var(--pp-border-2);
    border-radius: 10px;
    background: var(--pp-surface);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    container-type: inline-size;
}

.dex-cell:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.dex-cell img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dex-cell .silhouette {
    filter: var(--pp-silhouette-filter);
    width: 70%;
    height: auto;
    max-height: 90%;
    object-fit: contain;
}

.dex-cell .dex-num {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 10px;
    font-weight: 600;
    color: var(--pp-text-muted);
    background: var(--pp-dex-num-bg);
    padding: 0 4px;
    border-radius: 4px;
}

@container (max-width: 70px) {
    .dex-num { font-size: 7px !important; padding: 0 2px !important; bottom: 1px !important; right: 2px !important; }
}
@container (max-width: 55px) {
    .dex-num { display: none !important; }
}

.dex-cell.empty { background: var(--pp-surface-3); }
.dex-cell.owned.tier-0 { border-color: #999; }
.dex-cell.owned.tier-1 { border-color: #58b4ff; box-shadow: inset 0 0 0 1px #58b4ff, 0 0 8px rgba(88, 180, 255, 0.2); }
.dex-cell.owned.tier-2 { border-color: #3d7be6; box-shadow: inset 0 0 0 1px #3d7be6, 0 0 10px rgba(61, 123, 230, 0.25); }
.dex-cell.owned.tier-3 { border-color: #c06dff; box-shadow: inset 0 0 0 2px #c06dff, 0 0 14px rgba(192, 109, 255, 0.35); }
.dex-cell.owned.tier-4 { border-color: #ffc233; box-shadow: inset 0 0 0 2px #ffc233, 0 0 16px rgba(255, 194, 51, 0.45); }
.dex-cell.owned.tier-4:hover { box-shadow: inset 0 0 0 2px #ffc233, 0 0 24px rgba(255, 194, 51, 0.6); }

.wishlist-overlay {
    position: absolute;
    top: 4px;
    left: 4px;
    color: #e74c3c;
    font-size: 0.7rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    pointer-events: none;
    z-index: 2;
}

.diff-they-want.active { background: rgba(231, 76, 60, 0.15) !important; border-color: #e74c3c !important; color: #e74c3c !important; }

/* ---------- Slot page ---------- */

.slot-nav {
    position: sticky;
    top: 3.5rem;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    margin: -1.1rem -1.5rem 1rem;
    background: color-mix(in srgb, var(--pp-bg) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pp-border);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.slot-nav-title {
    flex: 1;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.slot-nav-dex {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pp-text-muted);
    letter-spacing: 0.02em;
    font-variant-numeric: tabular-nums;
}
.slot-nav-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--pp-text);
    letter-spacing: -0.02em;
}
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 6px 14px;
    border: 2px solid var(--pp-border);
    border-radius: 999px;
    background: var(--pp-surface);
    color: var(--pp-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.12s ease;
    flex-shrink: 0;
}
.nav-btn .bi { font-size: 0.95rem; line-height: 1; }
.nav-btn:hover:not(.disabled) {
    background: var(--pp-surface-hover);
    border-color: #e63946;
    color: #e63946;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(230, 57, 70, 0.15);
}
.nav-btn.disabled { opacity: 0.35; cursor: default; }

@media (max-width: 560px) {
    .slot-nav { padding: 0.5rem 0.75rem; margin-left: -1rem; margin-right: -1rem; }
    .nav-btn-label { display: none; }
    .nav-btn { padding: 6px 10px; }
    .slot-nav-name { font-size: 1rem; }
}

.rev-holo-hint { color: var(--pp-text-muted); font-size: 12px; margin-left: 0.25rem; }

.slot-page {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 1.5rem;
    padding: 0.5rem;
    align-items: start;
}

.slot-current {
    position: sticky;
    top: 7rem;
}

@media (max-width: 800px) {
    .slot-page { grid-template-columns: 1fr; }
    .slot-current { position: static; }
}

.slot-title {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pp-text);
    letter-spacing: -0.02em;
}
.slot-summary {
    margin: -0.25rem 0 0.5rem;
    min-height: 1.1rem;
}
.slot-summary .cost-to-complete.inline { margin-left: 0; }
.card-tilt-wrap {
    width: 100%;
    max-width: 320px;
    perspective: 800px;
    cursor: grab;
}
.card-tilt-wrap .card-large,
.card-tilt-wrap .preview-img {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    transform-style: preserve-3d;
    will-change: transform;
    display: block;
}
.card-tilt-wrap:hover .card-large,
.card-tilt-wrap:hover .preview-img {
    box-shadow: 0 12px 40px rgba(0,0,0,0.45);
}
.card-shine {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    background: radial-gradient(
        circle at var(--shine-x, 50%) var(--shine-y, 50%),
        rgba(255, 255, 255, 0.35) 0%,
        rgba(255, 255, 255, 0.1) 30%,
        transparent 60%
    );
    mix-blend-mode: overlay;
}
.card-tilt-wrap:hover .card-shine {
    opacity: 1;
}
.card-tilt-wrap {
    position: relative;
}
/* Holographic shimmer overlay — follows mouse, tier-scaled */
.card-holo {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    background: linear-gradient(
        var(--holo-angle, 135deg),
        transparent 0%,
        rgba(255, 0, 128, 0.08) 15%,
        rgba(0, 200, 255, 0.08) 30%,
        rgba(255, 220, 0, 0.08) 45%,
        rgba(0, 255, 128, 0.08) 60%,
        rgba(128, 0, 255, 0.08) 75%,
        transparent 100%
    );
    background-size: 200% 200%;
    background-position: var(--shine-x, 50%) var(--shine-y, 50%);
    mix-blend-mode: screen;
}
.card-tilt-wrap:hover .card-holo { opacity: 1; }

/* Tier 1 — ReverseHolo: subtle shimmer */
.tilt-tier-1 .card-holo { opacity: 0; }
.tilt-tier-1:hover .card-holo { opacity: 0.6; }

/* Tier 2 — Holo: moderate shimmer */
.tilt-tier-2 .card-holo {
    background: linear-gradient(
        var(--holo-angle, 135deg),
        transparent 0%,
        rgba(255, 0, 128, 0.12) 15%,
        rgba(0, 200, 255, 0.14) 30%,
        rgba(255, 220, 0, 0.12) 45%,
        rgba(0, 255, 128, 0.14) 60%,
        rgba(128, 0, 255, 0.12) 75%,
        transparent 100%
    );
    background-size: 200% 200%;
    background-position: var(--shine-x, 50%) var(--shine-y, 50%);
}
.tilt-tier-2:hover .card-holo { opacity: 0.8; }

/* Tier 3 — HalfFullArt: strong shimmer */
.tilt-tier-3 .card-holo {
    background: linear-gradient(
        var(--holo-angle, 135deg),
        transparent 0%,
        rgba(255, 0, 128, 0.18) 12%,
        rgba(0, 200, 255, 0.2) 25%,
        rgba(255, 220, 0, 0.18) 38%,
        rgba(0, 255, 128, 0.2) 50%,
        rgba(128, 0, 255, 0.18) 62%,
        rgba(255, 100, 0, 0.15) 75%,
        transparent 100%
    );
    background-size: 200% 200%;
    background-position: var(--shine-x, 50%) var(--shine-y, 50%);
}
.tilt-tier-3:hover .card-holo { opacity: 1; }

/* Tier 4 — FullArt: intense rainbow */
.tilt-tier-4 .card-holo {
    background: linear-gradient(
        var(--holo-angle, 135deg),
        transparent 0%,
        rgba(255, 0, 100, 0.25) 10%,
        rgba(0, 180, 255, 0.28) 22%,
        rgba(255, 230, 0, 0.25) 34%,
        rgba(0, 255, 120, 0.28) 46%,
        rgba(150, 0, 255, 0.25) 58%,
        rgba(255, 80, 0, 0.22) 70%,
        rgba(0, 220, 255, 0.25) 82%,
        transparent 100%
    );
    background-size: 200% 200%;
    background-position: var(--shine-x, 50%) var(--shine-y, 50%);
}
.tilt-tier-4:hover .card-holo { opacity: 1; }
.tilt-tier-4:hover .card-shine {
    background: radial-gradient(
        circle at var(--shine-x, 50%) var(--shine-y, 50%),
        rgba(255, 255, 255, 0.5) 0%,
        rgba(255, 255, 255, 0.15) 30%,
        transparent 55%
    );
}

.card-large {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 245 / 342;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    background: var(--pp-border);
    object-fit: cover;
}
.silhouette-large {
    width: 200px;
    filter: var(--pp-silhouette-filter);
}

.card-meta { margin-top: 0.75rem; line-height: 1.6; font-weight: 500; }
.card-price { color: #2ecc71; font-weight: 700; font-size: 1.1rem; text-shadow: 0 0 6px rgba(46, 204, 113, 0.3); }
.btn-remove {
    margin-top: 0.5rem;
    background: linear-gradient(135deg, #e63946, #c0392b);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.12s ease;
}
.btn-remove:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(230, 57, 70, 0.4); }

.search-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0.5rem;
    max-width: 500px;
    position: relative;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 4px;
    list-style: none;
    background: var(--pp-surface, #fff);
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 60;
    max-height: 320px;
    overflow-y: auto;
}

.search-suggestions li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--pp-text);
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.1s ease;
}
.search-suggestion.highlight,
.search-suggestion:hover { background: var(--pp-surface-hover); }

.search-suggestion .ss-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}
.search-suggestion .ss-icon-glyph {
    width: 28px;
    text-align: center;
    color: var(--pp-text-subtle);
    font-size: 16px;
    flex-shrink: 0;
}
.search-suggestion .ss-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-suggestion .ss-sub {
    font-size: 12px;
    color: var(--pp-text-subtle);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.search-box {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--pp-border);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    background: var(--pp-input-bg);
    color: var(--pp-text);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box:focus {
    border-color: #e63946;
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
    outline: none;
}

.btn-clear-search {
    background: var(--pp-surface-2);
    border: 2px solid var(--pp-border);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--pp-text-subtle);
    transition: all 0.12s ease;
}
.btn-clear-search:hover { background: var(--pp-surface-hover); border-color: #e63946; color: #e63946; }

.rev-holo-toggle {
    display: block;
    margin-top: 0.25rem;
    user-select: none;
    font-weight: 500;
}

.price-paid-input {
    width: 90px;
    padding: 3px 8px;
    font: inherit;
    font-size: 0.82rem;
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    background: var(--pp-surface-2);
    color: var(--pp-text);
}

.picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-top: 0.5rem;
    align-items: start;
}
@media (max-width: 480px) {
    .picker-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
}

.picker-card {
    background: var(--pp-card-bg);
    border: 2px solid var(--pp-border);
    border-radius: 10px;
    padding: 5px;
    cursor: pointer;
    text-align: left;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.picker-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.picker-card img {
    width: 100%;
    display: block;
    border-radius: 6px;
    aspect-ratio: 245 / 342;
    background: var(--pp-border);
    object-fit: cover;
}
.picker-grid.fade-unowned .picker-card img { filter: saturate(0) opacity(0.5); }
.picker-grid.fade-unowned .picker-card.in-slot img { filter: none; }
.picker-meta { font-size: 11px; color: var(--pp-text-subtle); margin-top: 4px; font-weight: 500; }

.picker-card.tier-0 { border-color: #999; }
.picker-card.tier-1 { border-color: #58b4ff; }
.picker-card.tier-2 { border-color: #3d7be6; }
.picker-card.tier-3 { border-color: #c06dff; }
.picker-card.tier-4 { border-color: #ffc233; }

.empty-msg { color: var(--pp-text-muted); font-style: italic; margin-top: 0.5rem; }

.manual-import {
    margin: 0.5rem 0 1rem;
    padding: 0.5rem 0.75rem;
    background: var(--pp-surface-2);
    border: 2px solid var(--pp-border-dashed);
    border-radius: 10px;
}
.manual-import summary { cursor: pointer; padding: 0.25rem 0; font-weight: 600; }
.manual-import-body { padding: 0.5rem 0; }
.manual-import .hint { font-size: 12px; color: var(--pp-text-subtle); margin: 0 0 0.5rem; }
.manual-import .hint code { background: var(--pp-surface-3); padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.import-row { display: flex; gap: 0.5rem; align-items: center; }
.btn-import {
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.12s ease;
}
.btn-import:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(230, 57, 70, 0.4); }
.btn-import:disabled { opacity: 0.5; cursor: default; }
.import-error { color: #e63946; font-size: 13px; margin-top: 0.4rem; font-weight: 500; }

/* ---------- Binder page ---------- */

.binder-wrap {
    padding: 0.5rem;
}

.binder-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.75rem;
}

.binder-header h1 { margin: 0; font-weight: 800; }

.binder-page-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.binder-page-label {
    font-size: 0.85rem;
    color: var(--pp-text-subtle);
    min-width: 90px;
    text-align: center;
    font-weight: 600;
}

.binder-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.binder-layout-btns {
    display: flex;
    gap: 0.25rem;
}

.binder-layout-btn {
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    color: var(--pp-text);
    border-radius: 20px;
    padding: 0.25rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s ease;
    line-height: 1.4;
}

.binder-layout-btn:hover { background: var(--pp-surface-hover); transform: translateY(-1px); }
.binder-layout-btn.active { background: linear-gradient(135deg, #e63946, #ff6b6b); border-color: #e63946; color: #fff; }

.binder-color-swatches {
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.binder-swatch {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s;
}

.binder-swatch:hover { transform: scale(1.2); }
.binder-swatch.active { border-color: #e63946; transform: scale(1.2); box-shadow: 0 0 8px rgba(230, 57, 70, 0.4); }

.binder-page {
    display: grid;
    gap: 10px;
    max-width: 960px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 8px 36px rgba(0,0,0,0.45), inset 0 0 0 2px rgba(255,255,255,0.06);
    background: var(--binder-color, #1c1c1c);
}

.binder-page.cols-2 { grid-template-columns: repeat(2, 1fr); max-width: 520px; }
.binder-page.cols-3 { grid-template-columns: repeat(3, 1fr); max-width: 760px; }
.binder-page.cols-4 { grid-template-columns: repeat(4, 1fr); max-width: 960px; }

.binder-slot {
    aspect-ratio: 5 / 7;
    border-radius: 10px;
    overflow: hidden;
    background: #111;
    border: 2px solid #444;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.binder-slot:hover:not(.empty) {
    transform: scale(1.06);
    z-index: 1;
    box-shadow: 0 8px 28px rgba(0,0,0,0.65);
}

.binder-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.binder-slot .silhouette {
    width: 55%;
    height: auto;
    object-fit: contain;
    filter: brightness(0) opacity(0.12);
}

.binder-slot.empty {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.binder-slot.tier-0 { border-color: #555; }
.binder-slot.tier-1 { border-color: #58b4ff; box-shadow: 0 0 8px rgba(88, 180, 255, 0.3); }
.binder-slot.tier-2 { border-color: #3d7be6; box-shadow: 0 0 10px rgba(61, 123, 230, 0.4); }
.binder-slot.tier-3 { border-color: #c06dff; box-shadow: 0 0 14px rgba(192, 109, 255, 0.5); }
.binder-slot.tier-4 { border-color: #ffc233; box-shadow: 0 0 18px rgba(255, 194, 51, 0.55); }

.binder-footer {
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--pp-text-muted);
    font-weight: 500;
}

.pro-upsell {
    display: flex;
    justify-content: center;
    padding: 4rem 1rem;
}

.upsell-card {
    text-align: center;
    max-width: 380px;
}

.upsell-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
}

.upsell-card h2 { margin: 0 0 0.5rem; font-weight: 800; }
.upsell-card p { color: var(--pp-text-dim); margin-bottom: 1.5rem; }

.btn-upgrade {
    display: inline-block;
    background: linear-gradient(135deg, #7c3aed, #a78bfa);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.15s ease;
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.4);
}
.btn-upgrade:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5); color: white; }

.upsell-pwyw {
    margin-top: 0.9rem !important;
    margin-bottom: 0 !important;
    font-size: 0.8rem;
    color: var(--pp-text-muted);
}

/* ---------- Profile Pro upsell card ---------- */

.pro-upsell-profile {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.08), rgba(167, 139, 250, 0.08));
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.pro-upsell-profile .upsell-body { flex: 1; min-width: 220px; }
.pro-upsell-profile h3 { margin: 0 0 0.25rem; font-size: 1.05rem; font-weight: 700; }
.pro-upsell-profile p { margin: 0; color: var(--pp-text-dim); font-size: 0.88rem; }
.pro-upsell-profile .pwyw-hint { font-size: 0.78rem; color: var(--pp-text-muted); margin-top: 0.2rem; }
.pro-upsell-profile .btn-upgrade { padding: 0.55rem 1.25rem; font-size: 0.9rem; }

.pro-thanks {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    color: var(--pp-text-dim);
}
.pro-thanks strong { color: #f59e0b; }

/* --- Badges (v2) --- */
/* Earned-only grid on profile. Aligns chips into uniform tracks instead of
   ragged flex wrapping. Filters/full overview live on /badges. */
.badges-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.85rem 0.65rem;
    align-items: start;
    justify-items: center;
}
.badges-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}
.badges-strip-header .view-all {
    font-size: 0.8rem;
    color: var(--pp-accent, #e63946);
    text-decoration: none;
    font-weight: 600;
}
.badges-strip-header .view-all:hover { text-decoration: underline; }
.badges-points {
    font-size: 0.8rem;
    color: var(--pp-text-muted, #888);
    font-weight: 600;
    margin-left: 0.35rem;
}

/* Full-overview grid on /badges */
.badges-page {
    max-width: 960px;
    margin: 2rem auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.badges-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.badges-controls label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--pp-text-dim, #555);
    margin-right: 0.25rem;
}
.badges-controls select {
    padding: 0.35rem 0.6rem;
    border: 1.5px solid var(--pp-border, #ccc);
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--pp-input-bg, #fff);
}
.badges-category {
    background: var(--pp-card-bg, #fff);
    border: 2px solid var(--pp-border-3, #e0e0e0);
    border-radius: 14px;
    padding: 1.25rem;
}
.badges-category h3 {
    margin: 0 0 0.85rem;
    font-size: 1rem;
    font-weight: 700;
}
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 0.85rem;
}
.badge-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.12s ease;
}
.badge-cell:hover {
    transform: translateY(-1px);
}
.badge-progress-bar {
    width: 48px;
    height: 4px;
    background: var(--pp-surface-3, #e4e4e4);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 0.2rem;
}
.badge-progress-fill {
    height: 100%;
    background: var(--pp-accent, #7c3aed);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.badge-progress-label {
    font-size: 0.6rem;
    color: var(--pp-text-muted, #999);
    margin-top: 0.1rem;
}

/* Disabled "Start Shared (Pro)" button — looks like a link, hints at gated feature */
.btn-shared-locked {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    background: transparent;
    border: 1px dashed rgba(124, 58, 237, 0.5);
    border-radius: 8px;
    color: #7c3aed;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s;
}
.btn-shared-locked:hover { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }

/* ---------- End Binder ---------- */

.card-large.no-image {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 5 / 7;
    background: var(--pp-surface-2);
    border: 2px dashed var(--pp-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}
.card-large.no-image .silhouette-large { width: 60%; }
.no-image-label { color: var(--pp-text-muted); font-size: 13px; margin-top: 0.5rem; font-weight: 500; }

/* ---------- Slot extras (multi-card) ---------- */
.slot-extras { margin-top: 1.25rem; }
.slot-extras-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--pp-text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.slot-extras-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.slot-extra-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90px;
    background: var(--pp-surface);
    border-radius: 10px;
    border: 2px solid var(--pp-border-3);
    padding: 0.4rem;
    gap: 0.25rem;
    position: relative;
    transition: transform 0.1s ease;
}
.slot-extra-card:hover { transform: translateY(-2px); }
.slot-extra-card.is-main { border-color: #f39c12; background: var(--pp-slot-extra-main-bg); box-shadow: 0 0 10px rgba(243, 156, 18, 0.25); }
.slot-extra-card img { width: 100%; border-radius: 6px; aspect-ratio: 245 / 342; background: var(--pp-border); object-fit: cover; }
.slot-extra-meta { text-align: center; font-size: 11px; color: var(--pp-text-subtle); line-height: 1.3; font-weight: 500; }
.slot-extra-setname { font-weight: 700; }
.slot-extra-actions { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: center; margin-top: 0.15rem; }
.btn-make-main {
    background: linear-gradient(135deg, #f39c12, #f1c40f);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s ease;
}
.btn-make-main:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4); }

.main-badge { color: #f39c12; font-size: 11px; font-weight: 700; }
.btn-remove-card {
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s ease;
}
.btn-remove-card:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(230, 57, 70, 0.4); }
.picker-card.in-slot { outline: 3px solid #f39c12; outline-offset: 2px; }
.picker-card.previewed { outline: 3px solid #3d7be6; outline-offset: 2px; }

/* The picked card needs to read clearly against in-slot, previewed and wished
   neighbours — thicker ring + soft halo + lift, and we raise z-index so the
   halo isn't clipped by adjacent tiles. */
.picker-card.selected {
    outline: 4px solid #2ecc71;
    outline-offset: 3px;
    box-shadow: 0 0 0 8px rgba(46, 204, 113, 0.18), 0 8px 22px rgba(46, 204, 113, 0.25);
    transform: translateY(-2px) scale(1.04);
    z-index: 5;
}
.picker-card-wrap:has(.picker-card.selected) { z-index: 5; }
.picker-card-wrap:has(.picker-card.selected)::before {
    content: "Selected";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2ecc71, #58d68d);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.4);
    z-index: 6;
    pointer-events: none;
}

.selected-card-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 70vh;
    overflow-y: auto;
    background: var(--pp-surface);
    border-top: 2px solid var(--pp-border);
    border-radius: 12px 12px 0 0;
    padding: 0.75rem 1rem;
    z-index: 100;
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25);
}

.slot-page:has(.selected-card-panel) {
    padding-bottom: 55vh;
}
.selected-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--pp-text);
}
.btn-close-panel {
    background: none;
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    color: var(--pp-text-muted);
    font-size: 1.1rem;
    line-height: 1;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.1s ease;
}
.btn-close-panel:hover { background: var(--pp-surface-hover); color: #e63946; border-color: #e63946; }

.selected-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.variant-section {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
}
.variant-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 12px;
    flex-wrap: wrap;
}
.entry-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.35rem;
    width: 100%;
}
.entry-field-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.82rem;
    color: var(--pp-text-subtle);
}
.entry-field-label {
    font-weight: 600;
    white-space: nowrap;
}
.entry-field-row input[type="date"] {
    font: inherit;
    font-size: 0.82rem;
    padding: 2px 6px;
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    background: var(--pp-surface-2);
    color: var(--pp-text);
}
.entry-notes {
    width: 100%;
}
.notes-input {
    width: 100%;
    max-width: 400px;
    min-height: 2.2em;
    padding: 6px 10px;
    font: inherit;
    font-size: 0.82rem;
    resize: vertical;
    box-sizing: border-box;
    border: 1px solid var(--pp-border);
    border-radius: 8px;
    background: var(--pp-surface-2);
    color: var(--pp-text);
    transition: border-color 0.15s;
}
.notes-input:focus {
    outline: none;
    border-color: var(--pp-accent, #e63946);
}
.notes-input::placeholder { color: var(--pp-text-muted); }

.panel-list-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--pp-border);
}
.btn-list-toggle {
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    color: var(--pp-text-muted);
    cursor: pointer;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.15s, border-color 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.btn-list-toggle:hover { color: var(--pp-accent); border-color: var(--pp-accent); }

.list-picker-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.panel-wishlist {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--pp-border);
}
.btn-wishlist {
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    color: var(--pp-text-muted);
    cursor: pointer;
    padding: 4px 10px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.btn-wishlist:hover { color: #e74c3c; border-color: #e74c3c; }
.btn-wishlist.active {
    color: #e74c3c;
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}
.btn-wishlist.active:hover {
    background: rgba(231, 76, 60, 0.2);
}

.picker-card.wished {
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.5);
}

.wishlist-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    color: #e74c3c;
    font-size: 0.75rem;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
    pointer-events: none;
    z-index: 2;
}

.friend-owners {
    position: absolute;
    top: 4px;
    left: 4px;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 2px 4px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    pointer-events: auto;
    z-index: 2;
}

.friend-owner-av {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #fff;
    object-fit: cover;
    flex-shrink: 0;
}

.friend-owner-av-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3d7be6, #58b4ff);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.friend-owner-more {
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 0 2px;
}

.slot-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
}
.sort-select {
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    border-radius: 8px;
    padding: 4px 10px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--pp-text);
    cursor: pointer;
}

.variant-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    font-size: 0.5rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #3d7be6, #58b4ff);
    flex-shrink: 0;
}

.variant-label.reverse {
    background: linear-gradient(135deg, #9b59b6, #c39bd3);
}

.add-check {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 12px;
    color: var(--pp-text-subtle);
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

/* Primary Add action inside the selected-card panel — replaces the old
   checkbox label so the action reads as a button, not a form field. */
.btn-add-panel {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: none;
    background: linear-gradient(135deg, #2ecc71, #58d68d);
    color: #fff;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(46, 204, 113, 0.3);
    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
    line-height: 1;
    white-space: nowrap;
}
.btn-add-panel:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.45);
    filter: brightness(1.05);
}
.btn-add-panel:active:not(:disabled) { transform: translateY(0); }
.btn-add-panel:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-add-panel .bi { font-size: 0.95rem; line-height: 1; }
.btn-add-panel.reverse {
    background: linear-gradient(135deg, #9b59b6, #c39bd3);
    box-shadow: 0 2px 8px rgba(155, 89, 182, 0.3);
}
.btn-add-panel.reverse:hover:not(:disabled) { box-shadow: 0 4px 12px rgba(155, 89, 182, 0.45); }

.btn-remove-x {
    background: none;
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    color: #e63946;
    font-size: 13px;
    line-height: 1;
    padding: 2px 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.1s ease;
}
.btn-remove-x:hover { background: rgba(230, 57, 70, 0.1); border-color: #e63946; }

.confirm-remove {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 11px;
    color: #e63946;
    font-weight: 700;
}

.btn-confirm-yes {
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.btn-confirm-yes:hover { background: #c0392b; }

.btn-confirm-no {
    background: var(--pp-surface-2);
    color: var(--pp-text);
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}
.btn-confirm-no:hover { background: var(--pp-surface-hover); }

.qty-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: #e63946;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 6px;
    z-index: 2;
    line-height: 1.3;
}

.picker-card-wrap { position: relative; }
.picker-card { position: relative; }

.picker-card-wrap .variant-indicators {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 4px;
}

.picker-card-wrap .variant-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--pp-border, #ccc);
    font-size: 0.55rem;
    font-weight: 800;
    color: var(--pp-text-muted, #999);
    background: var(--pp-surface-3, #eee);
    transition: all 0.15s;
}

.picker-card-wrap .variant-dot.owned {
    background: linear-gradient(135deg, #3d7be6, #58b4ff);
    border-color: #3d7be6;
    color: #fff;
}

.picker-card-wrap .variant-dot.reverse.owned {
    background: linear-gradient(135deg, #9b59b6, #c39bd3);
    border-color: #9b59b6;
    color: #fff;
}

.picker-card-wrap .variant-star {
    color: #ffc233;
    font-size: 0.85rem;
    line-height: 1;
}

/* ── Quick-add pills (one-tap card adds on SlotPage / SetPage) ───── */
.picker-quickadd-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 5px;
    min-height: 26px;
}

.btn-quickadd {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    border: none;
    background: linear-gradient(135deg, #3d7be6, #58b4ff);
    color: #fff;
    border-radius: 14px;
    padding: 3px 9px;
    font-size: 0.72rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(61, 123, 230, 0.25);
    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
    line-height: 1;
    white-space: nowrap;
}
.btn-quickadd:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(61, 123, 230, 0.4);
    filter: brightness(1.05);
}
.btn-quickadd:active:not(:disabled) { transform: translateY(0); }
.btn-quickadd:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-quickadd .bi { font-size: 0.85rem; line-height: 1; }
.btn-quickadd.reverse {
    background: linear-gradient(135deg, #9b59b6, #c39bd3);
    box-shadow: 0 2px 6px rgba(155, 89, 182, 0.25);
}
.btn-quickadd.reverse:hover:not(:disabled) { box-shadow: 0 4px 10px rgba(155, 89, 182, 0.4); }
.btn-quickadd.primary {
    background: linear-gradient(135deg, #2ecc71, #58d68d);
    box-shadow: 0 2px 6px rgba(46, 204, 113, 0.3);
    padding: 4px 12px;
    font-size: 0.78rem;
}
.btn-quickadd.primary:hover:not(:disabled) { box-shadow: 0 4px 12px rgba(46, 204, 113, 0.45); }

/* Single-variant owned check (compact non-holo cards) */
.variant-dot.single {
    width: 22px;
    height: 22px;
}
.variant-dot.single .bi { font-size: 0.7rem; }

/* Just-added pulse — runs once after a successful add */
@keyframes pp-just-added {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.55); }
    35%  { transform: scale(1.04); box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}
.picker-card-wrap.just-added .picker-card,
.set-card-wrap.just-added .set-card {
    animation: pp-just-added 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) 1;
    outline: 3px solid #2ecc71 !important;
    outline-offset: 2px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 12px;
}

.btn-qty {
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    color: var(--pp-text);
    font-size: 15px;
    line-height: 1;
    padding: 3px 9px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.1s ease;
}
.btn-qty:hover:not(:disabled) { background: var(--pp-surface-hover); }
.btn-qty:disabled { opacity: 0.3; cursor: default; }

.qty-label {
    font-weight: 700;
    font-size: 11px;
    min-width: 20px;
    text-align: center;
    color: var(--pp-text);
}

.preview-banner {
    background: var(--pp-preview-bg);
    color: var(--pp-preview-text);
    padding: 0.5rem 0.85rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-dismiss-preview {
    background: none;
    border: 2px solid var(--pp-preview-text);
    color: var(--pp-preview-text);
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.1s ease;
}
.btn-dismiss-preview:hover {
    background: var(--pp-preview-text);
    color: var(--pp-bg);
}
/* ---------- End Slot extras ---------- */

/* ===== THEME VARIABLES ===== */
:root {
    --pp-bg: #fafafa;
    --pp-surface: #ffffff;
    --pp-surface-2: #f0f0f0;
    --pp-surface-3: #e8e8e8;
    --pp-surface-hover: #e0e0e0;
    --pp-border: #d4d4d4;
    --pp-border-2: #c8c8c8;
    --pp-border-3: #e0e0e0;
    --pp-border-dashed: #d0d0d0;
    --pp-text: #1a1a2e;
    --pp-text-muted: #777777;
    --pp-text-subtle: #555555;
    --pp-text-dim: #666666;
    --pp-link: #e63946;
    --pp-input-bg: #ffffff;
    --pp-card-bg: #ffffff;
    --pp-nav-bg: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --pp-nav-bg-solid: #1a1a2e;
    --pp-nav-border: transparent;
    --pp-code-bg: #e6e6e6;
    --pp-preview-bg: #fff0f0;
    --pp-preview-text: #e63946;
    --pp-dex-num-bg: rgba(255, 255, 255, 0.8);
    --pp-slot-extra-main-bg: #fff8e8;
    --pp-silhouette-filter: brightness(0) opacity(0.25);
    --pp-accent: #e63946;
    --pp-accent-glow: rgba(230, 57, 70, 0.3);
    --pp-gold: #ffc233;
    --pp-green: #2ecc71;
}

[data-theme="dark"] {
    --pp-bg: #0d0d1a;
    --pp-surface: #161625;
    --pp-surface-2: #1e1e30;
    --pp-surface-3: #252540;
    --pp-surface-hover: #2a2a45;
    --pp-border: #363650;
    --pp-border-2: #404060;
    --pp-border-3: #303048;
    --pp-border-dashed: #383855;
    --pp-text: #e8e8f0;
    --pp-text-muted: #888899;
    --pp-text-subtle: #aaaabc;
    --pp-text-dim: #9999aa;
    --pp-link: #ff6b6b;
    --pp-input-bg: #1e1e30;
    --pp-card-bg: #1e1e30;
    --pp-nav-bg: linear-gradient(135deg, #0d0d1a 0%, #161625 50%, #1a1a40 100%);
    --pp-nav-bg-solid: #0d0d1a;
    --pp-nav-border: #252540;
    --pp-code-bg: #2a2a45;
    --pp-preview-bg: #2a1520;
    --pp-preview-text: #ff6b6b;
    --pp-dex-num-bg: rgba(0, 0, 0, 0.5);
    --pp-slot-extra-main-bg: #2a2510;
    --pp-silhouette-filter: brightness(0) invert(1) opacity(0.35);
    --pp-accent: #ff6b6b;
    --pp-accent-glow: rgba(255, 107, 107, 0.3);
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        --pp-bg: #0d0d1a;
        --pp-surface: #161625;
        --pp-surface-2: #1e1e30;
        --pp-surface-3: #252540;
        --pp-surface-hover: #2a2a45;
        --pp-border: #363650;
        --pp-border-2: #404060;
        --pp-border-3: #303048;
        --pp-border-dashed: #383855;
        --pp-text: #e8e8f0;
        --pp-text-muted: #888899;
        --pp-text-subtle: #aaaabc;
        --pp-text-dim: #9999aa;
        --pp-link: #ff6b6b;
        --pp-input-bg: #1e1e30;
        --pp-card-bg: #1e1e30;
        --pp-nav-bg: linear-gradient(135deg, #0d0d1a 0%, #161625 50%, #1a1a40 100%);
        --pp-nav-bg-solid: #0d0d1a;
        --pp-nav-border: #252540;
        --pp-code-bg: #2a2a45;
        --pp-preview-bg: #2a1520;
        --pp-preview-text: #ff6b6b;
        --pp-dex-num-bg: rgba(0, 0, 0, 0.5);
        --pp-slot-extra-main-bg: #2a2510;
        --pp-silhouette-filter: brightness(0) invert(1) opacity(0.35);
        --pp-accent: #ff6b6b;
        --pp-accent-glow: rgba(255, 107, 107, 0.3);
    }
}

/* ===== THEME VARIABLE APPLICATION ===== */
html, body {
    background-color: var(--pp-bg);
    color: var(--pp-text);
}

a, .btn-link { color: var(--pp-link); }

/* ===== END THEME ===== */

/* ===== LOADING SKELETONS ===== */

.skel-root {
    width: 100%;
}

.skel-shimmer {
    position: relative;
    overflow: hidden;
    background: var(--pp-surface-2, #2a2a2a);
    border-radius: 8px;
}

.skel-shimmer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 40%,
        rgba(255, 255, 255, 0.12) 50%,
        rgba(255, 255, 255, 0.06) 60%,
        transparent 100%
    );
    transform: translateX(-100%);
    animation: skel-shimmer-slide 1.4s ease-in-out infinite;
}

[data-theme="light"] .skel-shimmer::after {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(0, 0, 0, 0.04) 40%,
        rgba(0, 0, 0, 0.08) 50%,
        rgba(0, 0, 0, 0.04) 60%,
        transparent 100%
    );
}

@keyframes skel-shimmer-slide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Filter bar */
.skel-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0.5rem 0.5rem;
    flex-wrap: wrap;
}
.skel-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.skel-chip { width: 72px; height: 26px; border-radius: 20px; }
.skel-search { width: 220px; height: 34px; border-radius: 8px; }
.skel-sort { display: flex; gap: 8px; }

/* Dex grid */
.skel-dex-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 0.5rem;
}
.skel-dex-cell {
    aspect-ratio: 5 / 7;
    border-radius: 10px;
}

/* Slot page */
.skel-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
}
.skel-slot-nav { display: flex; gap: 10px; align-self: stretch; justify-content: space-between; }
.skel-slot-title { width: 50%; max-width: 320px; height: 28px; border-radius: 6px; }
.skel-slot-card {
    width: min(320px, 80%);
    aspect-ratio: 5 / 7;
    border-radius: 14px;
}
.skel-slot-meta { width: min(320px, 80%); display: flex; flex-direction: column; gap: 8px; }

/* Lines */
.skel-line { height: 14px; border-radius: 6px; }
.skel-line.short { width: 30%; }
.skel-line.med { width: 55%; }
.skel-line.long { width: 85%; }

/* Sidebar layout (Sets / Illustrators) */
.skel-sidebar-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1rem;
    padding: 0.5rem;
}
.skel-sidebar { display: flex; flex-direction: column; gap: 8px; }
.skel-sidebar-item { height: 32px; border-radius: 6px; }
.skel-sidebar-content { display: flex; flex-direction: column; gap: 12px; }

@media (max-width: 720px) {
    .skel-sidebar-layout { grid-template-columns: 1fr; }
}

/* Profile */
.skel-profile { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.skel-profile-header { display: flex; align-items: center; gap: 1rem; }
.skel-avatar { width: 72px; height: 72px; border-radius: 50%; }
.skel-profile-text { flex: 1; display: flex; flex-direction: column; gap: 8px; }

/* Stats / Progress / Binder */
.skel-stats { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; }
.skel-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.skel-stat-card { height: 96px; border-radius: 10px; }
.skel-panel { height: 140px; border-radius: 12px; }
.skel-panel.tall { height: 260px; }

/* Activity */
.skel-activity { max-width: 640px; margin: 0 auto; padding: 1rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.skel-activity-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: 10px; }
.skel-avatar-sm { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.skel-activity-body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.skel-activity-card { width: 52px; height: 72px; border-radius: 4px; flex-shrink: 0; }

/* Default */
.skel-default { padding: 1rem; display: flex; flex-direction: column; gap: 10px; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .skel-shimmer::after { animation: none; }
}

/* ===== END LOADING SKELETONS ===== */


/* --- Toasts --- */
.notification-toasts {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}
.notification-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    background: var(--pp-card-bg, #fff);
    color: var(--pp-text, #1a1a2e);
    border: 1px solid var(--pp-border, rgba(0, 0, 0, 0.08));
    border-left: 4px solid #e63946;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: nt-slide-in 220ms ease-out;
}
.notification-toast .nt-icon {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    color: #fff;
    font-size: 1.1rem;
}
.notification-toast .nt-body { flex: 1 1 auto; min-width: 0; }
.notification-toast .nt-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}
.notification-toast .nt-message {
    font-size: 0.85rem;
    color: var(--pp-text-subtle, #555);
    line-height: 1.35;
    word-wrap: break-word;
}
.notification-toast .nt-close {
    flex: 0 0 auto;
    background: transparent;
    border: none;
    color: var(--pp-text-subtle, #555);
    cursor: pointer;
    padding: 0.1rem 0.35rem;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 4px;
}
.notification-toast .nt-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--pp-text, #1a1a2e);
}
@keyframes nt-slide-in {
    from { opacity: 0; transform: translateX(16px); }
    to   { opacity: 1; transform: translateX(0); }
}
@media (max-width: 520px) {
    .notification-toasts {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
        max-width: none;
    }
}

/* --- Error boundary --- */
.error-boundary-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 560px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    background: var(--pp-card-bg, #fff);
    border: 1px solid var(--pp-border, #d4d4d4);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.error-boundary-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.error-boundary-card h3 {
    margin: 0 0 0.4rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--pp-text, #1a1a2e);
}
.error-boundary-message {
    color: var(--pp-text-subtle, #555);
    font-size: 0.95rem;
    margin: 0 0 1.5rem;
    line-height: 1.4;
}
.error-boundary-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}
.error-boundary-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.4rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    border: none;
}
.error-boundary-btn.primary {
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    color: #fff;
}
.error-boundary-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(230, 57, 70, 0.4);
}
.error-boundary-btn.secondary {
    background: var(--pp-surface-2, #f0f0f0);
    color: var(--pp-text, #1a1a2e);
}
.error-boundary-btn.secondary:hover {
    background: var(--pp-surface-3, #e8e8e8);
}
.error-boundary-details {
    width: 100%;
    margin-top: 1.5rem;
    text-align: left;
}
.error-boundary-details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--pp-text-muted, #777);
    padding: 0.4rem 0;
    user-select: none;
}
.error-boundary-details summary:hover {
    color: var(--pp-text, #1a1a2e);
}
.error-boundary-exception {
    margin-top: 0.5rem;
    padding: 1rem;
    background: var(--pp-surface-2, #f0f0f0);
    border-radius: 10px;
    overflow: hidden;
}
.error-boundary-type {
    font-weight: 700;
    font-size: 0.85rem;
    color: #e63946;
    word-break: break-all;
}
.error-boundary-msg {
    font-size: 0.85rem;
    color: var(--pp-text, #1a1a2e);
    margin: 0.3rem 0 0.6rem;
    word-break: break-word;
}
.error-boundary-stack {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--pp-text-subtle, #555);
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 320px;
    overflow: auto;
    margin: 0;
    padding: 0.75rem;
    background: var(--pp-surface-3, #e8e8e8);
    border-radius: 8px;
}
.error-boundary-inner {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--pp-border, #d4d4d4);
}
.error-boundary-admin-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1rem;
}
.error-boundary-issue-form {
    width: 100%;
    margin-top: 0.75rem;
    padding: 1rem;
    background: var(--pp-surface-2, #f0f0f0);
    border-radius: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.error-boundary-issue-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pp-text, #1a1a2e);
}
.error-boundary-issue-form textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--pp-border, #d4d4d4);
    background: var(--pp-card-bg, #fff);
    color: var(--pp-text, #1a1a2e);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.4;
    resize: vertical;
}
.error-boundary-issue-form .error-boundary-btn {
    align-self: flex-end;
}

/* --- Blazor circuit error bar (redesigned) --- */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    background: var(--pp-card-bg, #fff);
    border-top: 1px solid var(--pp-border, #d4d4d4);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.blazor-error-content {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    max-width: 800px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--pp-text, #1a1a2e);
}
.blazor-error-icon {
    color: #e63946;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.blazor-error-reload {
    margin-left: auto;
    font-weight: 600;
    color: #e63946;
    text-decoration: none;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    background: rgba(230, 57, 70, 0.08);
    transition: background 0.15s;
    flex-shrink: 0;
}
.blazor-error-reload:hover {
    background: rgba(230, 57, 70, 0.16);
    color: #e63946;
    text-decoration: none;
}
.blazor-error-dismiss {
    background: none;
    border: none;
    color: var(--pp-text-muted, #777);
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    flex-shrink: 0;
}
.blazor-error-dismiss:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--pp-text, #1a1a2e);
}

/* List picker on slot page */
.list-picker-wrap { position: relative; }

.btn-list-add {
    background: none;
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    color: var(--pp-text-muted);
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    font-size: 0.88rem;
    transition: color 0.15s, border-color 0.15s;
    margin-top: 0.3rem;
}

.btn-list-add:hover {
    color: var(--pp-accent);
    border-color: var(--pp-accent);
}

.list-picker-menu {
    position: absolute;
    z-index: 20;
    bottom: 100%;
    left: 0;
    min-width: 180px;
    max-height: 200px;
    overflow-y: auto;
    background: var(--pp-surface);
    border: 1px solid var(--pp-border);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
    padding: 0.3rem 0;
    margin-bottom: 0.3rem;
}

.list-picker-empty {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    color: var(--pp-text-muted);
}

.list-picker-empty a {
    color: var(--pp-link);
}

.list-picker-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    width: 100%;
    padding: 0.4rem 0.75rem;
    background: none;
    border: none;
    color: var(--pp-text);
    cursor: pointer;
    font-size: 0.82rem;
    text-align: left;
    transition: background 0.1s;
}

.list-picker-item:hover {
    background: var(--pp-surface-hover);
}

.list-picker-item.in-list {
    color: #2a9d8f;
    font-weight: 600;
}

/* ---------- PWA install banner ---------- */

.pwa-install-banner {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    z-index: 1080;
    display: flex;
    justify-content: center;
    pointer-events: none;
    animation: pwa-install-banner-in 220ms ease-out;
}

.pwa-install-banner__inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--pp-surface, #ffffff);
    color: var(--pp-text, #1a1a1a);
    border: 1px solid var(--pp-border, rgba(0,0,0,0.1));
    border-radius: 14px;
    padding: 0.75rem 0.9rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    max-width: 520px;
    width: 100%;
}

.pwa-install-banner__icon {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: 10px;
}

.pwa-install-banner__body {
    flex: 1 1 auto;
    min-width: 0;
}

.pwa-install-banner__title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
}

.pwa-install-banner__desc {
    font-size: 0.82rem;
    color: var(--pp-text-muted, #666);
    margin-top: 0.15rem;
}

.pwa-install-banner__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
}

.pwa-install-banner__install {
    background: linear-gradient(135deg, #e63946, #ff6b6b);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.45rem 0.85rem;
    cursor: pointer;
}

.pwa-install-banner__install:hover {
    filter: brightness(1.05);
}

.pwa-install-banner__close {
    background: transparent;
    border: none;
    color: var(--pp-text-muted, #888);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
}

.pwa-install-banner__close:hover {
    color: var(--pp-text, #1a1a1a);
}

@keyframes pwa-install-banner-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}


