/* Stiva Deck Builder - Frontend Styles */
:root {
    --stiva-primary: #c1121f;
    --stiva-primary-dark: #8f0d17;
    --stiva-secondary: #f0eadc;
    --stiva-success: #10b981;
    --stiva-warning: #f59e0b;
    --stiva-danger: #ef4444;
    --stiva-gray-50: #f9fafb;
    --stiva-gray-100: #f3f4f6;
    --stiva-gray-200: #e5e7eb;
    --stiva-gray-300: #d1d5db;
    --stiva-gray-400: #9ca3af;
    --stiva-gray-500: #6b7280;
    --stiva-gray-600: #4b5563;
    --stiva-gray-700: #374151;
    --stiva-gray-800: #1f2937;
    --stiva-gray-900: #111827;
}

.stiva-deck-builder,
.stiva-my-decks,
.stiva-deck-library {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.stiva-deck-builder-hero {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 28px;
    margin-bottom: 20px;
    border: 1px solid #343032;
    border-inline-start: 4px solid #c1121f;
    border-radius: 12px;
    background: #211f20;
    color: #fff;
    box-shadow: 0 4px 12px rgba(35, 28, 25, 0.08);
}
.stiva-builder-hero-copy { display: flex; flex-direction: column; gap: 5px; text-align: end; }
.stiva-builder-hero-copy strong { color: #fff; font-size: 16px; font-weight: 650; line-height: 1.4; letter-spacing: 0; }
.stiva-builder-hero-copy span { color: #c3babc; font-size: 12px; line-height: 1.5; }
.stiva-deck-builder-hero .stiva-deck-builder-brand img { width: 220px; height: auto; max-width: 100%; object-fit: contain; filter: none; }

.stiva-deck-builder-brand,
.stiva-login-brand,
.stiva-deck-library-brand,
.stiva-deck-view-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex: 0 0 auto;
}

.stiva-deck-builder-brand img,
.stiva-login-brand img {
    display: block;
    width: 130px;
    height: 130px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
}

.stiva-deck-library {
    padding: 1.5rem;
}

.stiva-deck-library h2 {
    margin: 0 0 1.5rem;
    color: var(--stiva-gray-900);
}

.stiva-deck-library-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.stiva-deck-library-card {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background: #fff;
    border: 1px solid var(--stiva-gray-200);
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.stiva-deck-library-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e5e7eb 100%);
    cursor: pointer;
    text-decoration: none;
    border: 0;
    padding: 0;
    display: block;
}

.stiva-deck-library-thumb:focus-visible {
    outline: 2px solid rgba(193, 18, 31, 0.65);
    outline-offset: 2px;
}

.stiva-deck-library-thumb img,
.stiva-deck-library-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: block;
}

.stiva-deck-library-thumb img {
    object-fit: cover;
}

.stiva-deck-library-thumb-placeholder {
    background:
        radial-gradient(circle at top, rgba(193, 18, 31, 0.18), transparent 55%),
        linear-gradient(135deg, #f3f4f6 0%, #d1d5db 100%);
}

.stiva-deck-library-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--stiva-gray-900);
}

.stiva-deck-library-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.85rem;
    color: var(--stiva-gray-500);
    font-size: 0.9rem;
}

.stiva-deck-library-description {
    margin: -0.2rem 0 0;
    color: var(--stiva-gray-600);
    font-size: 0.92rem;
    line-height: 1.55;
    display: none !important;
}

.stiva-deck-library-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.stiva-deck-library-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(193, 18, 31, 0.08);
    color: var(--stiva-primary);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.stiva-deck-library-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.55rem 1rem;
    font-size: 0.9rem;
    color: var(--stiva-gray-700);
}

.stiva-deck-library-stats strong {
    color: var(--stiva-gray-900);
}

.stiva-deck-library-youtube {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--stiva-primary);
    font-weight: 600;
    text-decoration: none;
    display: none !important;
}

.stiva-deck-library-youtube:hover {
    color: var(--stiva-primary-dark);
    text-decoration: underline;
}

.stiva-deck-library-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: auto;
}

.stiva-deck-library-actions .stiva-btn {
    width: 100%;
    justify-content: center;
}

.stiva-deck-library-actions .stiva-library-copy,
.stiva-deck-library-actions .stiva-library-download {
    display: none !important;
}

.stiva-deck-library-actions .stiva-library-order {
    grid-column: auto;
}

@media (max-width: 767px) {
    .stiva-deck-library {
        padding: 1rem;
    }

    .stiva-deck-library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem;
    }

    .stiva-deck-library-card {
        padding: 0.85rem;
    }

    .stiva-deck-library-actions {
        grid-template-columns: 1fr;
    }

    .stiva-deck-library-actions .stiva-library-order {
        grid-column: auto;
    }
}

.stiva-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 3rem 3rem;
    min-height: 300px;
    background: #fff;
    border: 1px solid var(--stiva-gray-200);
    border-radius: 18px;
}

.stiva-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--stiva-gray-200);
    border-top-color: var(--stiva-primary);
    border-radius: 50%;
    animation: stiva-spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.stiva-login-prompt {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 2rem;
}

.stiva-login-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 18px;
    padding: 2rem;
    border: 1px solid var(--stiva-gray-200);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.stiva-login-brand {
    justify-content: center;
    margin-bottom: 1rem;
}

.stiva-login-brand img {
    width: 94px;
    height: 94px;
}

.stiva-login-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--stiva-gray-800);
}

.stiva-login-card p {
    color: var(--stiva-gray-600);
    margin-bottom: 1.5rem;
}

.stiva-login-card input[type="text"],
.stiva-login-card input[type="email"],
.stiva-login-card input[type="password"],
.stiva-login-card input[type="search"],
.stiva-login-card input[type="tel"],
.stiva-login-card input[type="url"],
.stiva-login-card textarea,
.stiva-modal-input {
    width: 100%;
    box-sizing: border-box;
    background: #111827;
    color: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    line-height: 1.3;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.stiva-login-card input::placeholder,
.stiva-login-card textarea::placeholder,
.stiva-modal-input::placeholder {
    color: #94a3b8;
    opacity: 1;
}

.stiva-login-card input:focus,
.stiva-login-card textarea:focus,
.stiva-modal-input:focus {
    outline: none;
    border-color: rgba(239, 68, 68, 0.8);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
    background: #0f172a;
}

.stiva-login-card input,
.stiva-login-card textarea,
.stiva-modal-input {
    caret-color: #f43f5e;
    -webkit-text-fill-color: #f8fafc;
}

.stiva-login-card input:-webkit-autofill,
.stiva-login-card input:-webkit-autofill:hover,
.stiva-login-card input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #111827 inset;
    -webkit-text-fill-color: #f8fafc;
    transition: background-color 9999s ease-out 0s;
}

.stiva-login-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.stiva-login-actions .button {
    padding: 0.5rem 1.5rem;
    text-decoration: none;
}

/* Deck Builder Layout */
.stiva-builder-visual {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1rem;
    background: #f6f0ed;
    padding: 1rem;
    width: 100%;
}

@media (max-width: 1024px) {
    .stiva-builder-visual {
        grid-template-columns: 1fr;
    }
}

.stiva-visual-left {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    color: #1f2937;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    min-width: 0;
}

.stiva-visual-right {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    color: #1f2937;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    min-width: 320px;
    align-self: stretch;
}

.stiva-mobile-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
}

.stiva-builder-meta {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    color: #1f2937;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.stiva-mobile-builder {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: calc(100vh - 120px);
}

.stiva-mobile-deck-view,
.stiva-mobile-add-cards-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stiva-mobile-deck-view {
    padding-bottom: 90px;
}

.stiva-mobile-deck-stage,
.stiva-mobile-add-cards-body {
    background: #ffffff;
    border-radius: 18px;
    padding: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

.stiva-mobile-deck-header {
    display: grid;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.stiva-mobile-deck-header p,
.stiva-mobile-add-cards-copy p {
    margin: 0;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.45;
}

.stiva-mobile-deck-kicker {
    color: #c1121f;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stiva-mobile-deck-title,
.stiva-mobile-add-cards-copy h2 {
    margin: 0;
    color: #111827;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.15;
}

.stiva-mobile-deck-sections {
    display: grid;
    gap: 0.85rem;
}

.stiva-mobile-deck-status {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 6px;
    margin: 12px 0 16px;
}

.stiva-mobile-deck-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    box-sizing: border-box;
    min-width: 0;
    min-height: 88px;
    padding: 10px 4px;
    border: 1px solid #e5dcd5;
    border-radius: 10px;
    text-align: center;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
}
.stiva-mobile-deck-pill span { font-size: 10px; line-height: 1.2; font-weight: 500; }
.stiva-mobile-deck-pill strong { color: inherit; font: 700 clamp(11px, 3vw, 15px)/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; white-space: nowrap; }

.stiva-mobile-deck-pill.is-met {
    background: rgba(22, 163, 74, 0.1);
    color: #166534;
}

.stiva-mobile-deck-pill.is-warning {
    background: rgba(193, 18, 31, 0.1);
    color: #991b1b;
}

.stiva-mobile-deck-pill.is-price {
    background: #faf8f6;
    color: #302b28;
}
.stiva-mobile-deck-pill.is-genesys { background: #faf8f6; color: #302b28; }
.stiva-mobile-deck-pill.is-genesys.over-cap { background: #fbecee; border-color: #edb8be; color: #a10e19; }
.stiva-mobile-deck-pill.is-genesys small { color: #776c65; font: 500 10px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.stiva-mobile-deck-pill.is-genesys.over-cap small { color: #a10e19; }
.stiva-mobile-deck-pill.is-genesys > span { max-width: 100%; line-height: 1.35; }

.stiva-mobile-deck-sections .stiva-deck-section:last-child {
    margin-bottom: 0;
}

.stiva-mobile-action-stack .stiva-mobile-primary-actions,
.stiva-mobile-action-stack .stiva-mobile-secondary-actions {
    gap: 12px;
    align-items: start;
    padding: 0;
}

.stiva-mobile-action-stack .stiva-mobile-action-btn {
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    width: 100% !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 1px solid #d8dce2 !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: #374151 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    transform: none !important;
}

.stiva-mobile-action-stack #stiva-add-to-cart {
    background: #c1121f !important;
    border-color: #c1121f !important;
    color: #fff !important;
}

.stiva-mobile-action-stack .stiva-mobile-action-btn:hover {
    border-color: #c1121f !important;
}

.stiva-mobile-action-stack #stiva-clear-deck {
    box-sizing: border-box;
    min-height: 44px;
    padding: 8px 12px;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.stiva-mobile-action-stack .stiva-mobile-secondary-actions > .stiva-export-menu .stiva-export-options {
    min-width: 190px;
    left: auto;
    right: 0;
}

.stiva-save-settings-modal {
    z-index: 10010;
    padding: 16px;
}
body.stiva-settings-open .stiva-mobile-fab { display: none !important; }
.stiva-save-settings-modal .stiva-modal-content {
    width: 100%;
    max-width: 560px;
    max-height: calc(100dvh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.stiva-save-settings-modal .stiva-modal-body {
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
}
.stiva-save-settings-modal .stiva-modal-footer { flex-shrink: 0; }
.stiva-hashtag-chips,
.stiva-hashtag-suggestions { display: flex; flex-wrap: wrap; gap: 8px; }
.stiva-hashtag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; background: #fbe9eb; color: #a50f1c; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.stiva-hashtag-chip button { padding: 0; min-width: 28px; min-height: 32px; border: 0; background: transparent; color: inherit; font-size: 20px; cursor: pointer; }
.stiva-hashtag-suggestions button { padding: 8px 12px; min-height: 44px; background: #fff; color: #374151; border: 1px solid #d8dce2; border-radius: 8px; font-size: 14px; cursor: pointer; overflow-wrap: anywhere; }
.stiva-hashtag-suggestions button:hover { background: #faf0f1; border-color: #c1121f; }
#stiva-hashtag-help { margin: 0; color: #6b7280; font-size: 13px; }
.stiva-hashtag-chips button:focus-visible,
.stiva-hashtag-suggestions button:focus-visible { outline: 2px solid #c1121f; outline-offset: 2px; }
.stiva-save-settings-modal .stiva-deck-meta-editor { margin: 0; padding: 0; border: 0; box-shadow: none; }
.stiva-save-settings-modal .stiva-deck-meta-grid { grid-template-columns: minmax(0, 1fr); }
.stiva-save-settings-modal input,
.stiva-save-settings-modal textarea,
.stiva-save-settings-modal select { font-size: 16px; }

.stiva-mobile-action-stack {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.stiva-mobile-primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.stiva-mobile-action-btn {
    min-height: 52px;
    border-radius: 18px;
    font-size: 0.96rem;
    font-weight: 800;
    box-shadow: 0 14px 26px rgba(193, 18, 31, 0.16);
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.stiva-mobile-action-btn:hover {
    transform: scale(1.02);
    background: linear-gradient(135deg, #d11f2d 0%, #a0101f 100%);
    box-shadow: 0 18px 30px rgba(193, 18, 31, 0.35);
}

.stiva-mobile-action-btn:active {
    transform: scale(0.97);
    background: linear-gradient(135deg, #e01a2a 0%, #b01221 100%);
    box-shadow: 0 10px 20px rgba(193, 18, 31, 0.7);
    color: #fff;
}

.stiva-mobile-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.2rem 0;
}

.stiva-mobile-action-pill {
    min-height: 48px;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: #fff;
    border: 1px solid #e5d7cc;
    color: #1f2937;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stiva-mobile-community-link {
    grid-column: span 1;
    border: 1px solid #e5d7cc;
    background: #fff;
    color: #1f2937 !important;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    font-size: 0.9rem;
    min-height: 50px;
}

.stiva-mobile-secondary-actions > .stiva-export-menu {
    grid-column: span 1;
    min-width: 0;
}

.stiva-mobile-secondary-actions > .stiva-export-menu > summary.stiva-mobile-action-pill {
    width: 100%;
    box-sizing: border-box;
    min-height: 50px;
}

.stiva-mobile-secondary-actions > .stiva-export-menu > summary.stiva-mobile-action-btn,
.stiva-mobile-secondary-actions > .stiva-mobile-community-link {
    height: 52px;
    min-height: 52px;
    max-height: 52px;
    padding: 0.8rem 1rem;
    border: 1px solid #e5d7cc;
    border-radius: 18px;
    background: #fff;
    color: #1f2937 !important;
    font-size: 0.96rem;
    font-weight: 800;
    box-shadow: 0 14px 26px rgba(193, 18, 31, 0.16);
    align-self: start;
    overflow: hidden;
}

.stiva-mobile-secondary-actions > .stiva-export-menu > summary.stiva-mobile-action-btn:hover,
.stiva-mobile-secondary-actions > .stiva-mobile-community-link:hover {
    background: #fff;
    color: #c1121f !important;
    transform: scale(1.02);
}

.stiva-mobile-secondary-actions > .stiva-export-menu .stiva-export-options {
    position: absolute;
    z-index: 20;
    right: 0;
    left: 0;
}

.stiva-mobile-secondary-actions > .stiva-export-menu {
    position: relative;
}

.stiva-mobile-community-link::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.109A11.386 11.386 0 0110.089 18H4.911a11.39 11.39 0 01-4.838-1.237l.003-.109a3.5 3.5 0 013.593-3.49c1.92.027 3.82.366 5.595.994l.805-.308a5.5 5.5 0 015.133.223M15 11a3.5 3.5 0 11-7 0 3.5 3.5 0 017 0zm7.75-2a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.109A11.386 11.386 0 0110.089 18H4.911a11.39 11.39 0 01-4.838-1.237l.003-.109a3.5 3.5 0 013.593-3.49c1.92.027 3.82.366 5.595.994l.805-.308a5.5 5.5 0 015.133.223M15 11a3.5 3.5 0 11-7 0 3.5 3.5 0 017 0zm7.75-2a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-copy-text.stiva-mobile-action-pill::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-export-view.stiva-mobile-action-pill::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-download-ydk.stiva-mobile-action-pill::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-clear-deck.stiva-mobile-action-pill {
    grid-column: span 2;
    background: #ffffff;
    border-color: rgba(193, 18, 31, 0.18);
    color: #991b1b;
}

#stiva-clear-deck.stiva-mobile-action-pill::before {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0' /%3E%3C/svg%3E") no-repeat center;
}

.stiva-mobile-action-pill:hover {
    background: rgba(193, 18, 31, 0.02);
    border-color: var(--stiva-primary);
    color: var(--stiva-primary);
    transform: translateY(-1px);
}

.stiva-mobile-action-pill:active {
    background: var(--stiva-primary);
    border-color: var(--stiva-primary-dark);
    color: #fff !important;
    transform: scale(0.97);
}

.stiva-mobile-danger-btn:hover {
    background: rgba(193, 18, 31, 0.03);
    border-color: var(--stiva-danger);
    color: var(--stiva-danger);
}

.stiva-mobile-danger-btn:active {
    background: var(--stiva-danger);
    border-color: var(--stiva-danger);
    color: #fff !important;
}

.stiva-mobile-settings-panel {
    border-radius: 22px;
    background: linear-gradient(180deg, #fff 0%, #fbf5f0 100%);
    border: 1px solid rgba(193, 18, 31, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    margin-bottom: 90px;
}

.stiva-mobile-settings-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem 0.95rem;
    border: 0;
    background: transparent;
    text-align: left;
    color: #111827;
}

.stiva-mobile-settings-toggle:hover {
    background: rgba(193, 18, 31, 0.03);
}

.stiva-mobile-settings-heading {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.stiva-mobile-settings-kicker {
    color: #c1121f;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stiva-mobile-settings-title {
    font-size: 1rem;
    line-height: 1.2;
    color: #111827;
}

.stiva-mobile-settings-toggle-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(193, 18, 31, 0.1);
    color: #c1121f;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
    transition: transform 0.25s ease, background 0.2s ease;
}

.stiva-mobile-settings-toggle:hover .stiva-mobile-settings-toggle-icon {
    transform: rotate(90deg);
    background: rgba(193, 18, 31, 0.18);
}

.stiva-mobile-settings-toggle:active .stiva-mobile-settings-toggle-icon {
    transform: rotate(90deg) scale(0.85);
    background: #c1121f;
    color: #fff;
    box-shadow: 0 4px 10px rgba(193, 18, 31, 0.5);
}

.stiva-mobile-settings-body {
    display: grid;
    gap: 0.9rem;
    padding: 0 1rem 1rem;
}

.stiva-mobile-settings-grid {
    display: grid;
    gap: 0.85rem;
}

.stiva-mobile-settings-field {
    display: grid;
    gap: 0.4rem;
}

.stiva-mobile-settings-field > span {
    font-size: 0.84rem;
    font-weight: 700;
    color: #1f2937;
}

.stiva-mobile-meta-input,
.stiva-mobile-meta-textarea,
.stiva-mobile-meta-select {
    width: 100%;
    border-radius: 14px;
    border: 1px solid #d9cfc6;
    background: #fff;
    color: #111827;
    padding: 0.8rem 0.9rem;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.04);
}

.stiva-mobile-meta-textarea {
    min-height: 118px;
}

.stiva-mobile-meta-select {
    min-height: 134px;
}

.stiva-mobile-price-card {
    display: grid;
    gap: 0.35rem;
    align-content: start;
    padding: 1rem;
    border-radius: 18px;
    background: #111827;
    color: #fff7f5;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.16);
}

.stiva-mobile-price-card span {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fecdd3;
}

.stiva-mobile-price-card strong {
    font-size: 1.35rem;
    line-height: 1.1;
}

.stiva-mobile-price-card small,
.stiva-mobile-price-card em {
    font-size: 0.8rem;
    color: #e5e7eb;
    font-style: normal;
}

.stiva-mobile-public-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 48px;
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    background: rgba(193, 18, 31, 0.06);
    color: #1f2937;
    font-weight: 700;
}

.stiva-mobile-public-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #c1121f;
}

.stiva-mobile-fab {
    animation: stiva-add-cards-nudge 8s ease-in-out infinite;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: fixed !important;
    right: 1rem !important;
    bottom: calc(120px + env(safe-area-inset-bottom, 0)) !important;
    height: 52px !important;
    padding: 0 1.25rem !important;
    border: 0 !important;
    border-radius: 26px !important;
    background: linear-gradient(135deg, #ac2026 0%, #ef4444 100%) !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    gap: 8px !important;
    box-shadow: 0 10px 25px rgba(172, 32, 38, 0.45) !important;
    z-index: 10002 !important;
    white-space: nowrap !important;
    font-family: inherit !important;
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease !important;
}
@keyframes stiva-add-cards-nudge {
    0%, 12%, 100% { transform: translateY(0); }
    3%, 9% { transform: translateY(-5px); }
    6% { transform: translateY(0); }
}
.stiva-mobile-fab:hover, .stiva-mobile-fab:focus-visible, .stiva-mobile-fab:active { animation: none; }
@media (prefers-reduced-motion: reduce) { .stiva-mobile-fab { animation: none !important; } }

.stiva-mobile-fab .fab-icon {
    font-size: 1.6rem !important;
    line-height: 1 !important;
    margin-top: -2px !important;
    display: inline-block !important;
}

.stiva-mobile-fab .fab-text {
    font-size: 0.85rem !important;
    display: inline-block !important;
}

.stiva-mobile-fab:hover {
    transform: scale(1.08);
    background: linear-gradient(135deg, #d11f2d 0%, #b01221 100%);
    box-shadow: 0 22px 40px rgba(143, 13, 23, 0.5);
}

.stiva-mobile-fab:active {
    transform: scale(0.94);
    background: linear-gradient(135deg, #b01221 0%, #8f0d17 100%);
    box-shadow: 0 15px 30px rgba(143, 13, 23, 0.8);
    color: #fff;
}

.stiva-mobile-add-cards-view {
    position: fixed;
    inset: 0;
    z-index: 10003;
    padding: max(0.75rem, env(safe-area-inset-top, 0)) 0.75rem calc(0.75rem + env(safe-area-inset-bottom, 0));
    background:
        linear-gradient(180deg, rgba(193, 18, 31, 0.12), rgba(255, 255, 255, 0.92) 20%),
        #f7f0ea;
    animation: stiva-mobile-sheet-enter 0.28s ease-out;
}

.stiva-mobile-add-cards-sheet {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 100%;
    max-height: 100%;
    border-radius: 28px 28px 22px 22px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    backdrop-filter: blur(14px);
}

.stiva-mobile-add-cards-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.stiva-mobile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(193, 18, 31, 0.14);
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.stiva-mobile-back span[aria-hidden="true"] {
    font-size: 1.25rem;
    line-height: 1;
}

.stiva-mobile-add-cards-copy {
    display: grid;
    gap: 0.22rem;
    min-width: 0;
}

.stiva-mobile-add-cards-copy p {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #c1121f;
}

.stiva-mobile-add-cards-copy span {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.45;
}

.stiva-mobile-add-cards-body {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 1;
    min-height: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0));
}

.stiva-mobile-mode-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 4px;
    background: #f1e9e2;
    border-radius: 40px;
    margin: 10px 0 15px;
    position: sticky;
    top: 0;
    z-index: 12;
}

.stiva-mobile-mode-toggle .stiva-mode-btn {
    min-height: 54px;
    border: none;
    border-radius: 30px;
    background: transparent;
    color: #4b5563;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: none;
}

.stiva-mobile-mode-toggle .stiva-mode-btn.active {
    background: #fff;
    color: #c1121f;
    box-shadow: 0 8px 16px rgba(193, 18, 31, 0.15);
    transform: scale(1.02);
}

.stiva-mobile-mode-toggle .stiva-mode-btn:active {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(0.98);
}

.stiva-mobile-panel-stack {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
}

.stiva-mobile-search-shell,
.stiva-mobile-import-shell {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 22px;
    background: linear-gradient(180deg, #fff 0%, #fbf5f0 100%);
    border: 1px solid rgba(193, 18, 31, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    animation: stiva-mobile-panel-in 0.22s ease-out;
    align-content: start;
}

.stiva-mobile-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.stiva-mobile-search-bar .stiva-search-input {
    min-height: 52px;
    padding-left: 3rem;
    border-radius: 18px;
    border-color: #e7d6cb;
    font-size: 1rem;
    box-shadow: 0 10px 20px rgba(193, 18, 31, 0.06);
}

.stiva-mobile-search-icon {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    font-size: 1.1rem;
}

.stiva-mobile-filter-panel {
    display: grid;
    gap: 0.6rem;
}

.stiva-mobile-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.stiva-mobile-filter-field {
    display: grid;
    gap: 0.25rem;
    padding: 0.5rem 0.55rem;
    border-radius: 12px;
    border: 1px solid #e7d6cb;
    background: #fff;
}

.stiva-mobile-filter-field span {
    font-size: 0.67rem;
    font-weight: 700;
    color: #7f1d1d;
    line-height: 1;
}

.stiva-mobile-filter-field .stiva-filter-select,
.stiva-mobile-filter-field select.stiva-filter-select {
    min-width: 0 !important;
    width: 100% !important;
    padding: 0.35rem 0.15rem 0.15rem !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 0.78rem !important;
    color: #1f2937 !important;
    height: auto !important;
    min-height: 0 !important;
    box-shadow: none !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
}

.stiva-mobile-filter-field .stiva-filter-select:focus,
.stiva-mobile-filter-field select.stiva-filter-select:focus {
    outline: none !important;
}

.stiva-mobile-filter-clear-btn {
    width: 100%;
    min-height: 42px;
}

.stiva-mobile-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0 16px;
    padding: 16px;
    background: linear-gradient(135deg, #c1121f 0%, #8f0d17 100%);
    border-radius: 20px;
    box-shadow: 0 12px 24px rgba(193, 18, 31, 0.25);
    color: #fff;
}

.stiva-mobile-banner-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    font-size: 28px;
    backdrop-filter: blur(4px);
    flex-shrink: 0;
}

.stiva-mobile-banner-text {
    flex: 1;
    min-width: 0;
}

.stiva-mobile-banner-text strong {
    display: block;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.stiva-mobile-banner-text span {
    display: block;
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.4;
}

.stiva-mobile-results-shell {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1 1 auto;
    min-height: clamp(360px, 52vh, 640px);
    padding: 1rem;
    border-radius: 24px;
    background: #182028;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.stiva-mobile-results-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 5;
    background: #182028;
    padding: 0.1rem 0 0.35rem;
    margin-bottom: 0.15rem;
}

.stiva-mobile-results-header p,
.stiva-mobile-results-header strong,
.stiva-mobile-results-header span {
    margin: 0;
}

.stiva-mobile-results-header p {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fca5a5;
    font-weight: 800;
}

.stiva-mobile-results-header strong {
    display: block;
    font-size: 1.35rem;
    color: #fff7f5;
}

.stiva-mobile-results-header span {
    color: #cbd5e1;
    font-size: 0.78rem;
    text-align: right;
    max-width: 120px;
}

.stiva-mobile-results-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    overflow-y: auto;
    min-height: clamp(280px, 44vh, 560px);
    padding-right: 0.1rem;
    padding-bottom: 1rem;
    align-content: start;
}

@media (max-width: 420px) {
    .stiva-mobile-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stiva-mobile-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stiva-mobile-results-shell {
        min-height: clamp(390px, 56vh, 680px);
    }

    .stiva-mobile-results-grid {
        min-height: clamp(310px, 48vh, 620px);
    }
}

.stiva-mobile-result-card {
    display: grid;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 18px;
    background: linear-gradient(180deg, #f8ede3 0%, #fff 100%);
    color: #111827;
    box-shadow: 0 14px 24px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    min-width: 0;
    transform: translateY(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    animation: none;
}

.stiva-mobile-result-card:active {
    transform: translateY(1px) scale(0.985);
}

.stiva-mobile-result-media {
    position: relative;
    aspect-ratio: 0.72;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
}

.stiva-mobile-deck-qty-badge {
    position: absolute;
    left: 0.45rem;
    top: 0.45rem;
    z-index: 3;
    min-width: 34px;
    height: 28px;
    padding: 0 0.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #c1121f 0%, #8f0d17 100%);
    box-shadow: 0 8px 16px rgba(143, 13, 23, 0.32);
    opacity: 0;
    transform: scale(0.85);
    pointer-events: none;
}

.stiva-mobile-deck-qty-badge.is-visible {
    opacity: 1;
    transform: scale(1);
}

.stiva-mobile-result-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stiva-mobile-card-badges {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    right: 0.4rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.35rem;
    align-items: flex-start;
}

.stiva-mobile-attribute-badge,
.stiva-mobile-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
}

.stiva-mobile-attribute-dark { background: rgba(88, 28, 135, 0.82); }
.stiva-mobile-attribute-light { background: rgba(217, 119, 6, 0.82); }
.stiva-mobile-attribute-earth { background: rgba(120, 53, 15, 0.82); }
.stiva-mobile-attribute-water { background: rgba(3, 105, 161, 0.82); }
.stiva-mobile-attribute-fire { background: rgba(185, 28, 28, 0.82); }
.stiva-mobile-attribute-wind { background: rgba(5, 150, 105, 0.82); }
.stiva-mobile-attribute-divine { background: rgba(30, 41, 59, 0.88); }

.stiva-mobile-level-stars {
    color: #fbbf24;
}

.stiva-mobile-level-overflow {
    color: #fde68a;
}

.stiva-mobile-card-add-btn {
    position: absolute;
    right: 0.45rem;
    bottom: 0.45rem;
    min-width: 44px;
    min-height: 44px;
    padding: 0.45rem 0.7rem;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #c1121f 0%, #8f0d17 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.78rem;
    box-shadow: 0 10px 18px rgba(143, 13, 23, 0.36);
}

.stiva-mobile-select-artwork-btn {
    width: 100%;
    border: 1px solid rgba(193, 18, 31, 0.22);
    background: rgba(193, 18, 31, 0.08);
    color: #c1121f;
    border-radius: 8px;
    padding: 0.42rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.1;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
}

.stiva-mobile-card-check {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    margin-left: -27px;
    margin-top: -27px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(22, 163, 74, 0.92);
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.18s ease, transform 0.18s ease;
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.3);
}

.stiva-mobile-card-copy {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.stiva-mobile-result-name {
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stiva-mobile-result-type {
    font-size: 0.68rem;
    color: #6b7280;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.stiva-mobile-result-footer {
    display: grid;
    gap: 0.15rem;
    margin-top: 0.15rem;
}

.stiva-mobile-card-count,
.stiva-mobile-card-stats {
    font-size: 0.64rem;
    color: #4b5563;
}

.stiva-mobile-card-count {
    font-weight: 700;
    color: #c1121f;
}

.stiva-mobile-result-card.is-loading {
    background: #fff;
    cursor: default;
}

.stiva-mobile-card-skeleton {
    width: 100%;
    aspect-ratio: 0.72;
    border-radius: 14px;
}

.stiva-mobile-empty-search {
    grid-column: 1 / -1;
    min-height: 220px;
    display: grid;
    place-items: center;
    text-align: center;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.04);
}

.stiva-mobile-empty-search strong {
    display: block;
    margin-bottom: 0.4rem;
    color: #fff;
}

.stiva-mobile-empty-search p {
    margin: 0;
    color: #cbd5e1;
}

.stiva-mobile-import-toggle {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: #fff;
    border: 1px solid #e2d9d0;
    border-radius: 30px;
    margin-bottom: 15px;
}

.stiva-mobile-import-toggle .stiva-mode-subbtn {
    flex: 1;
    min-height: 48px;
    border: none;
    border-radius: 26px;
    background: transparent;
    color: #6b7280;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.15s ease;
}

.stiva-mobile-import-toggle .stiva-mode-subbtn.active {
    background: #c1121f;
    color: #fff;
    box-shadow: 0 6px 12px rgba(193, 18, 31, 0.25);
}

.stiva-mobile-import-toggle .stiva-mode-subbtn:active {
    background: #a0101f;
    color: #fff;
    transform: scale(0.97);
}

.stiva-mobile-import-card {
    display: grid;
    gap: 0.75rem;
    background: #fff;
    border-radius: 24px;
    padding: 20px;
    border: 1px solid #ecdfd6;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.04);
}

.stiva-mobile-panel-help {
    margin: 0;
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.45;
}

.stiva-mobile-import-textarea {
    min-height: 160px;
    border-radius: 18px;
    border: 2px solid #e9dbd0;
    padding: 16px;
    font-size: 15px;
    background: #fefcf9;
    margin: 12px 0;
}

.stiva-import-textarea::placeholder {
    color: #9ca3af;
}

.stiva-mobile-import-file {
    min-height: 54px;
    border-radius: 16px;
    border: 2px dashed rgba(193, 18, 31, 0.25);
    background: #fff5f2;
    padding: 12px;
    margin: 12px 0;
}

.stiva-mobile-primary-btn {
    min-height: 48px;
    border-radius: 16px;
}

.stiva-quick-add-sheet {
    position: fixed;
    inset: 0;
    z-index: 10004;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
}

.stiva-quick-add-dialog {
    position: relative;
    width: min(100%, 420px);
    padding: 1rem;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.26);
    animation: stiva-mobile-sheet-enter 0.22s ease-out;
}

.stiva-quick-add-close {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    font-size: 1.5rem;
    line-height: 1;
}

.stiva-quick-add-card {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    padding-right: 2.5rem;
}

.stiva-quick-add-thumb {
    width: 64px;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    background: #0f172a;
    flex-shrink: 0;
}

.stiva-quick-add-copy {
    display: grid;
    gap: 0.2rem;
}

.stiva-quick-add-copy strong {
    color: #111827;
}

.stiva-quick-add-copy span {
    color: #6b7280;
    font-size: 0.88rem;
}

.stiva-quick-add-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.stiva-quick-add-option {
    min-height: 48px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #c1121f 0%, #8f0d17 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(143, 13, 23, 0.18);
}

@keyframes stiva-mobile-sheet-enter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stiva-mobile-panel-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes stiva-card-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (min-width: 520px) {
    .stiva-mobile-results-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Search Panel */
.stiva-mode-toggle,
.stiva-import-toggle {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.stiva-mode-btn,
.stiva-mode-subbtn {
    padding: 0.65rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(15, 18, 25, 0.75);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.9rem;
    color: #9ba6b5;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stiva-mode-btn:hover,
.stiva-mode-subbtn:hover {
    color: #fff;
    border-color: rgba(255, 23, 68, 0.4);
    background: rgba(255, 23, 68, 0.05);
}

.stiva-mode-btn.active,
.stiva-mode-subbtn.active {
    background: linear-gradient(135deg, #ac2026 0%, #ef4444 100%);
    border-color: #ff1744;
    color: #fff;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.stiva-search-panel {
    background: rgba(20, 24, 33, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stiva-search-input-wrapper {
    position: relative;
    margin-bottom: 1rem;
}

.stiva-search-input,
input.stiva-search-input {
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0.75rem 1.25rem 0.75rem 2.75rem !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    font-size: 0.95rem !important;
    background: #1f2633 !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
    box-sizing: border-box !important;
}

.stiva-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

.stiva-search-input:focus,
input.stiva-search-input:focus {
    border-color: #ff1744 !important;
    outline: none !important;
    box-shadow: 0 0 12px rgba(255, 23, 68, 0.3) !important;
    background: #151a24 !important;
}

.stiva-search-icon {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.stiva-search-filters {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stiva-search-filters-desktop {
    align-items: start;
    gap: 0.75rem;
}

.stiva-filter-field {
    display: grid;
    gap: 0.3rem;
    min-width: 120px;
    flex: 1 1 145px;
}

.stiva-filter-field span {
    font-size: 0.75rem;
    font-weight: 800;
    color: #ff4d6d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stiva-filter-select,
select.stiva-filter-select {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 1;
    min-width: 150px !important;
    width: 100% !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0.5rem 1rem !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 6px !important;
    background: #1f2633 !important;
    color: #ffffff !important;
    font-size: 0.9rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5) !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    -moz-appearance: auto !important;
}

.stiva-filter-select:focus,
select.stiva-filter-select:focus {
    border-color: #ff1744 !important;
    outline: none !important;
    box-shadow: 0 0 8px rgba(255, 23, 68, 0.2) !important;
}

.stiva-filter-select option,
select.stiva-filter-select option {
    background: #1f2633 !important;
    color: #ffffff !important;
}

.stiva-filter-clear-btn {
    min-height: 40px;
    padding: 0.6rem 1.2rem;
    border: 1px dashed rgba(255, 23, 68, 0.4);
    border-radius: 6px;
    background: transparent;
    color: #ff1744;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

.stiva-filter-clear-btn:hover {
    background: rgba(255, 23, 68, 0.08);
    border-color: #ff1744;
    box-shadow: 0 0 10px rgba(255, 23, 68, 0.15);
}

/* Search Results */
.stiva-search-results {
    background: rgba(20, 24, 33, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stiva-results-header {
    padding: 0.9rem 1.25rem;
    background: linear-gradient(135deg, #ac2026 0%, #ef4444 100%);
    color: #fff;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.stiva-results-list {
    overflow-y: auto;
    overflow-x: hidden;
}

.stiva-result-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #f5f7fb;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

.stiva-result-item:hover {
    background-color: rgba(255, 23, 68, 0.06);
}

.stiva-result-image {
    width: 50px;
    height: 70px;
    border-radius: 4px;
    object-fit: cover;
    background: #0f172a;
}

.stiva-result-info {
    flex: 1;
    min-width: 0;
}

.stiva-result-name {
    font-weight: 700;
    color: #f5f7fb;
}

.stiva-result-type {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.stiva-result-card {
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.stiva-result-thumb {
    width: 50px;
    flex-shrink: 0;
}

.stiva-result-controls {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Compact desktop search workspace: reserve the remaining height for cards. */
.stiva-visual-right .stiva-search-panel {
    flex: 0 0 auto;
    padding: 12px;
    margin-bottom: 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    backdrop-filter: none;
}

.stiva-visual-right .stiva-search-filters-desktop {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.stiva-visual-right .stiva-filter-field {
    min-width: 0;
    gap: 4px;
}

.stiva-visual-right .stiva-filter-field span {
    color: #4b5563;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
}

.stiva-visual-right select.stiva-filter-select {
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 8px 6px !important;
    background: #fff !important;
    color: #1f2937 !important;
    border: 1px solid #d1d5db !important;
    font-size: 13px !important;
    box-shadow: none !important;
}

.stiva-visual-right select.stiva-filter-select option {
    color: #1f2937 !important;
    background: #fff !important;
}

.stiva-visual-right select.stiva-filter-select:focus-visible {
    outline: 2px solid var(--stiva-primary) !important;
    outline-offset: 2px;
}

.stiva-visual-right .stiva-filter-clear-btn {
    align-self: end;
    min-height: 40px;
    margin: 0;
    padding: 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    box-shadow: none;
}

.stiva-visual-right .stiva-search-results {
    flex: 1 1 auto;
    min-height: 480px;
    max-height: 620px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: none;
    backdrop-filter: none;
}

.stiva-visual-right .stiva-results-header {
    flex: 0 0 auto;
    padding: 10px 14px;
    background: #f3f4f6;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    box-shadow: none;
}

.stiva-visual-right .stiva-results-list {
    flex: 1 1 auto;
    min-height: 420px;
    max-height: 560px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.stiva-visual-right .stiva-result-card {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #1f2937;
    align-items: center;
}

.stiva-visual-right .stiva-result-card:hover {
    background: #f9fafb;
}

.stiva-visual-right .stiva-result-thumb,
.stiva-visual-right .stiva-result-image {
    width: 48px;
}

.stiva-visual-right .stiva-result-image {
    height: 70px;
    object-fit: contain;
    border-radius: 4px;
}

.stiva-visual-right .stiva-result-name {
    color: #1f2937;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.stiva-visual-right .stiva-result-controls {
    flex-wrap: nowrap;
    gap: 4px;
}

.stiva-visual-right .stiva-result-controls .stiva-quantity-btn {
    width: 36px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    font-size: 18px;
}

.stiva-visual-right .stiva-result-controls .stiva-quantity-display {
    width: 28px;
    min-width: 28px;
    padding: 0;
    color: #374151;
    background: transparent;
    font-size: 14px;
    text-align: center;
}

@media (max-height: 700px) and (min-width: 1025px) {
    .stiva-visual-right {
        max-height: none;
    }
    .stiva-visual-right .stiva-results-list {
        max-height: 360px;
    }
}

.stiva-select-artwork-btn {
    border: 1px solid rgba(193, 18, 31, 0.22);
    background: rgba(193, 18, 31, 0.1);
    color: var(--stiva-primary);
    border-radius: 999px;
    padding: 0.42rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.stiva-select-artwork-btn:hover,
.stiva-mobile-select-artwork-btn:hover {
    background: rgba(193, 18, 31, 0.16);
    border-color: rgba(193, 18, 31, 0.35);
    color: #7f0e17;
    transform: translateY(-1px);
}

.stiva-artwork-modal {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.stiva-artwork-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.stiva-artwork-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(94vw, 980px);
    max-height: 88vh;
    overflow: auto;
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    padding: 1.25rem;
}

.stiva-artwork-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.9rem;
    background: transparent;
    border: 0;
    color: #94a3b8;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.stiva-artwork-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-right: 0.5rem;
}

.stiva-artwork-modal-titleblock {
    display: grid;
    gap: 0.35rem;
    max-width: 70%;
}

.stiva-artwork-modal-titleblock p {
    margin: 0;
    color: var(--stiva-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.stiva-artwork-modal-titleblock strong {
    font-size: 1.55rem;
    line-height: 1.15;
}

.stiva-artwork-modal-titleblock span {
    color: #cbd5e1;
    font-size: 0.92rem;
    line-height: 1.5;
    max-width: 58ch;
}

.stiva-artwork-modal-close {
    position: sticky;
    top: 0;
    align-self: flex-start;
    margin-left: auto;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 999px;
    width: 44px;
    height: 44px;
    color: #cbd5e1;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.stiva-artwork-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.stiva-artwork-option {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto;
    gap: 0.75rem;
    align-items: center;
    justify-items: center;
    min-height: 100%;
    padding: 1rem 0.9rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.94) 0%, rgba(17, 24, 39, 0.98) 100%);
    color: #e2e8f0;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    min-width: 0;
}

.stiva-artwork-option:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 68, 68, 0.55);
    box-shadow: 0 20px 34px rgba(15, 23, 42, 0.38);
}

.stiva-artwork-option img {
    width: min(100%, 170px);
    max-height: 190px;
    object-fit: contain;
}

.stiva-artwork-option span {
    font-size: 0.92rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.25;
}

.stiva-artwork-option-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(193, 18, 31, 0.92);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    box-shadow: 0 10px 18px rgba(143, 13, 23, 0.28);
}

@media (max-width: 767px) {
    .stiva-artwork-modal-header {
        align-items: flex-start;
    }

    .stiva-artwork-modal-titleblock {
        max-width: 100%;
    }

    .stiva-artwork-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stiva-artwork-option {
        min-height: 220px;
    }

    .stiva-artwork-option img {
        max-height: 160px;
    }
}

.stiva-quantity-display {
    min-width: 36px;
    padding: 0.4rem 0.55rem;
    text-align: center;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 700;
}

.stiva-quantity-btn {
    min-width: 34px;
    height: 34px;
    border-radius: 6px;
}

/* Import Panel */
.stiva-import-panel {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stiva-import-body {
    margin-top: 1rem;
    display: grid;
    gap: 0.75rem;
}

/* Keep import actions reachable inside the height-limited builder column. */
.stiva-visual-right > .stiva-import-panel {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding: 16px;
}

.stiva-import-panel > .stiva-import-toggle,
.stiva-mobile-import-toggle {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.stiva-import-panel > .stiva-import-toggle .stiva-mode-subbtn,
.stiva-mobile-import-toggle .stiva-mode-subbtn {
    min-width: 0;
    min-height: 44px;
    padding: 8px 6px;
    font-size: 13px;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
    border-radius: 8px;
    box-shadow: none;
}

.stiva-ydke-form {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.stiva-ydke-form .stiva-import-label {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.stiva-ydke-form .stiva-import-hint {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.stiva-ydke-form #stiva-import-ydke {
    box-sizing: border-box;
    width: 100%;
    height: 104px;
    min-height: 104px;
    max-height: 200px;
    margin: 0;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: #1f2937;
    font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
    overflow-wrap: anywhere;
}

.stiva-ydke-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.stiva-ydke-destination {
    display: grid;
    gap: 6px;
    flex: 1 1 180px;
    min-width: 0;
}

.stiva-ydke-form #stiva-import-ydke-action {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 30px 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: #fff;
    color: #374151;
    font-size: 14px;
    box-shadow: none;
}

.stiva-ydke-form #stiva-import-ydke-btn {
    flex: 1 1 130px;
    min-height: 44px;
    margin: 0;
    padding: 10px 16px;
    font-size: 14px;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: none;
}

.stiva-ydke-form textarea:focus-visible,
.stiva-ydke-form select:focus-visible {
    outline: 2px solid var(--stiva-primary);
    outline-offset: 2px;
}

.stiva-ydke-form button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.stiva-import-label {
    font-weight: 600;
    color: var(--stiva-gray-700);
}

.stiva-import-textarea {
    width: 100%;
    min-height: 180px;
    border: 1px solid var(--stiva-gray-300);
    border-radius: 6px;
    padding: 0.75rem;
    font-family: monospace;
    resize: vertical;
}

.stiva-import-file {
    border: 1px solid var(--stiva-gray-300);
    border-radius: 6px;
    padding: 0.65rem;
}

.stiva-import-hint {
    font-size: 0.875rem;
    color: var(--stiva-gray-600);
    margin: 0;
}

/* Deck Panel */
.stiva-deck-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.stiva-builder-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 1.5rem;
}

.stiva-header-left {
    display: contents;
}

.stiva-header-left h2 {
    margin: 0;
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    font: 650 18px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: none;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.stiva-header-stats {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stiva-header-right {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

#stiva-deck-builder .stiva-header-stats .stiva-header-pill {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    box-sizing: border-box;
    height: 88px;
    min-width: 0;
    gap: 3px;
    padding: 12px 16px;
    border: 1px solid #e5dcd5;
    border-radius: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#stiva-deck-builder .stiva-header-stats .stiva-header-pill span { font-size: 12px; line-height: 1.3; }
#stiva-deck-builder .stiva-header-stats .stiva-header-pill strong { font-size: 20px; line-height: 1.3; white-space: nowrap; }
#stiva-deck-builder .stiva-header-stats .stiva-header-pill small { font-size: 10px; line-height: 1.3; }
#stiva-deck-builder .stiva-community-decks-btn-desktop {
    box-sizing: border-box;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    font: 600 13px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    box-shadow: none;
    white-space: nowrap;
}

.stiva-deck-name-input {
    display: none;
}

.stiva-cost-pill,
.stiva-total-pill {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: #0c7184;
    color: #fff;
    font-weight: 700;
}

.stiva-total-pill.met {
    background: #198754;
}

.stiva-total-pill.not-met {
    background: #dc3545;
}

.stiva-price-pill {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    background: #f0eadc;
    color: #111827;
    font-weight: 700;
    white-space: nowrap;
}

.stiva-community-decks-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 40px;
    padding: 0.7rem 1.35rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--stiva-primary) 0%, var(--stiva-primary-dark) 100%);
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 14px rgba(193, 18, 31, 0.35);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stiva-community-decks-btn::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.109A11.386 11.386 0 0110.089 18H4.911a11.39 11.39 0 01-4.838-1.237l.003-.109a3.5 3.5 0 013.593-3.49c1.92.027 3.82.366 5.595.994l.805-.308a5.5 5.5 0 015.133.223M15 11a3.5 3.5 0 11-7 0 3.5 3.5 0 017 0zm7.75-2a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.109A11.386 11.386 0 0110.089 18H4.911a11.39 11.39 0 01-4.838-1.237l.003-.109a3.5 3.5 0 013.593-3.49c1.92.027 3.82.366 5.595.994l.805-.308a5.5 5.5 0 015.133.223M15 11a3.5 3.5 0 11-7 0 3.5 3.5 0 017 0zm7.75-2a2.25 2.25 0 11-4.5 0 2.25 2.25 0 014.5 0z' /%3E%3C/svg%3E") no-repeat center;
}

.stiva-community-decks-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 18, 31, 0.5);
    filter: brightness(1.08);
}

.stiva-community-decks-btn-desktop {
    padding: 0.75rem 1.35rem;
    font-size: 0.9rem;
}

.stiva-header-pill {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e293b;
}

.stiva-header-pill.price {
    background: #111827;
    color: #fff;
}

.stiva-header-pill.warning {
    background: #fee2e2;
    color: #991b1b;
}
.stiva-header-stats .stiva-header-pill.price,
.stiva-header-stats .stiva-header-pill.genesys-points { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 14px; border-radius: 10px; }
.stiva-header-stats .stiva-header-pill span { font-size: 11px; font-weight: 500; }
.stiva-header-stats .stiva-header-pill strong { color: inherit; font-size: 15px; font-variant-numeric: tabular-nums; }
.stiva-header-stats .stiva-header-pill small { font-size: 11px; font-weight: 500; }
.stiva-header-stats .stiva-header-pill.genesys-points { border: 1px solid #e5dcd5; background: #faf8f6; color: #302b28; }
.stiva-header-stats .stiva-header-pill.genesys-points.over-cap { border-color: #edb8be; background: #fbecee; color: #a10e19; }

.stiva-deck-meta-editor {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding: 1rem;
    border: 1px solid #d8cfc7;
    border-radius: 10px;
    background: #fbf7f3;
}

.stiva-deck-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.stiva-deck-meta-field {
    display: grid;
    gap: 0.4rem;
}

.stiva-deck-meta-field label,
.stiva-meta-toggle .stiva-toggle-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1f2937;
}

.stiva-meta-input,
.stiva-meta-textarea,
.stiva-meta-select {
    width: 100%;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #111827;
    border-radius: 4px;
    padding: 0.7rem 0.8rem;
    font-size: 0.95rem;
}

.stiva-meta-input:focus,
.stiva-meta-textarea:focus,
.stiva-meta-select:focus {
    outline: none;
    border-color: var(--stiva-primary);
    box-shadow: 0 0 0 2px rgba(193, 18, 31, 0.12);
}

.stiva-meta-textarea {
    min-height: 96px;
    resize: vertical;
}

.stiva-meta-select {
    min-height: 112px;
}

.stiva-deck-price-info {
    align-content: start;
}

.stiva-price-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.95rem;
    color: #374151;
}

.stiva-price-display strong {
    color: #111827;
    font-size: 1rem;
}

.stiva-price-note {
    margin: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.stiva-meta-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.stiva-meta-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--stiva-primary);
}

.stiva-deck-sections {
    display: grid;
    gap: 0.75rem;
}

.stiva-deck-section {
    border-radius: 6px;
    padding: 0.75rem;
    color: #fff;
}

.stiva-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #f5f7fb;
    margin-bottom: 0.5rem;
}

.stiva-section-title {
    font-weight: 700;
}

.stiva-section-count {
    font-size: 0.875rem;
}

.stiva-deck-items {
    min-height: 120px;
    background: rgba(0,0,0,0.02);
    border-radius: 0;
    padding: 0;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
}

@media (min-width: 1100px) {
    .stiva-deck-items {
        grid-template-columns: repeat(10, minmax(70px, 1fr));
    }
}

.stiva-deck-slot {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    color: #fff;
    cursor: grab;
}

.stiva-deck-slot.empty {
    justify-content: center;
    font-size: 0.9rem;
    color: #cbd5e1;
    cursor: default;
}

.stiva-deck-slot-image {
    width: 100%;
    max-width: 90px;
    height: auto;
    aspect-ratio: 59 / 86;
    object-fit: cover;
    border-radius: 0;
    background: #0f172a;
}

.stiva-db-builder-page .entry-title,
.stiva-db-builder-page .page-title {
    display: none;
}

.stiva-deck-slot-info {
    width: 100%;
    text-align: center;
}

.stiva-qty-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: #c1121f;
    color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.stiva-app-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.stiva-app-modal-content {
    background: #1c2430;
    color: #f5f7fb;
    padding: 1.5rem;
    border-radius: 10px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.stiva-app-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.stiva-deck-slot-name {
    font-weight: 700;
}

.stiva-deck-slot-qty {
    font-size: 0.9rem;
    color: #cbd5e1;
}

.stiva-deck-slot-controls {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 0.35rem;
    align-items: center;
}

.stiva-quantity-btn {
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,0.6);
    background: transparent;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.stiva-quantity-input {
    width: 60px;
    padding: 0.25rem 0.35rem;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 4px;
    background: rgba(255,255,255,0.15);
    color: #fff;
}

.stiva-deck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding: 1.15rem;
    background: var(--stiva-gray-50);
    border-radius: 14px;
    border: 1px solid var(--stiva-gray-200);
}

.stiva-export-menu {
    flex: 1 1 150px;
    min-width: 0;
}

.stiva-export-menu > summary.stiva-btn {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    list-style: none;
    cursor: pointer;
}

.stiva-export-menu > summary::-webkit-details-marker {
    display: none;
}

.stiva-export-menu > summary:focus-visible,
.stiva-export-options button:focus-visible {
    outline: 2px solid #c1121f;
    outline-offset: 3px;
}

.stiva-export-options {
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding: 6px;
    background: #fff;
    border: 1px solid #e5d9d0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(55, 48, 45, 0.08);
}

.stiva-export-options button {
    min-height: 44px;
    padding: 10px 12px;
    background: transparent;
    color: #37302d;
    border: 0;
    border-radius: 7px;
    text-align: start;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.stiva-export-options button:hover {
    color: #c1121f;
    background: #f6f0ed;
}

.stiva-deck-actions .stiva-btn {
    flex: 1 1 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.stiva-btn {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    text-decoration: none;
}

.stiva-btn-primary {
    background: linear-gradient(135deg, var(--stiva-primary) 0%, var(--stiva-primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(193, 18, 31, 0.35);
}

.stiva-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193, 18, 31, 0.5);
    filter: brightness(1.08);
}

.stiva-btn-secondary {
    background: #ffffff;
    border: 1px solid var(--stiva-gray-300);
    color: var(--stiva-gray-700);
}

.stiva-btn-secondary:hover:not(:disabled) {
    border-color: var(--stiva-primary);
    color: var(--stiva-primary);
    background: rgba(193, 18, 31, 0.02);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Icons for Action Buttons */
#stiva-save-deck.stiva-btn::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 3.75H6.912a2.25 2.25 0 00-2.15 1.588L2.35 13.177a2.25 2.25 0 00-.1.661V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18v-4.162c0-.224-.034-.447-.1-.662L19.24 5.338a2.25 2.25 0 00-2.15-1.588H15M2.25 13.5h3.86a2.25 2.25 0 012.008 1.24l.885 1.77a2.25 2.25 0 002.007 1.24h1.98a2.25 2.25 0 002.007-1.24l.885-1.77a2.25 2.25 0 012.007-1.24h3.86m-18 0h18' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M9 3.75H6.912a2.25 2.25 0 00-2.15 1.588L2.35 13.177a2.25 2.25 0 00-.1.661V18a2.25 2.25 0 002.25 2.25h15A2.25 2.25 0 0021.75 18v-4.162c0-.224-.034-.447-.1-.662L19.24 5.338a2.25 2.25 0 00-2.15-1.588H15M2.25 13.5h3.86a2.25 2.25 0 012.008 1.24l.885 1.77a2.25 2.25 0 002.007 1.24h1.98a2.25 2.25 0 002.007-1.24l.885-1.77a2.25 2.25 0 012.007-1.24h3.86m-18 0h18' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-add-to-cart.stiva-btn::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 3h1.386c.51 0 .955.343 1.087.835l.383 1.437M7.5 14.25a3 3 0 00-3 3h15.75m-12.75-3h11.218c1.121-2.3 2.1-4.684 2.924-7.138a60.114 60.114 0 00-16.536-1.84M7.5 14.25L5.106 5.272M6 20.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm12.75 0a.75.75 0 11-1.5 0 .75.75 0 011.5 0z' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-copy-text.stiva-btn::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5A3.375 3.375 0 006.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0015 2.25h-1.5a2.251 2.251 0 00-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 00-9-9z' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-export-view.stiva-btn::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M2.25 15.75l5.159-5.159a2.25 2.25 0 013.182 0l5.159 5.159m-1.5-1.5l1.409-1.409a2.25 2.25 0 013.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 001.5-1.5V6a1.5 1.5 0 00-1.5-1.5H3.75A1.5 1.5 0 002.25 6v12a1.5 1.5 0 001.5 1.5zm10.5-11.25h.008v.008h-.008V8.25zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-download-ydk.stiva-btn::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-clear-deck.stiva-btn {
    background: #ffffff;
    border: 1px solid var(--stiva-gray-300);
    color: var(--stiva-gray-500);
}

#stiva-clear-deck.stiva-btn::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0' /%3E%3C/svg%3E") no-repeat center;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2.5' stroke='currentColor'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0' /%3E%3C/svg%3E") no-repeat center;
}

#stiva-clear-deck.stiva-btn:hover {
    border-color: var(--stiva-danger);
    color: var(--stiva-danger);
    background: rgba(239, 68, 68, 0.03);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.08);
}

.stiva-btn-success {
    background: var(--stiva-success);
    color: white;
}

.stiva-btn-danger {
    background: var(--stiva-danger);
    color: white;
}

.stiva-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* My Decks */
.stiva-my-decks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stiva-my-decks-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
    font-size: 0.9rem;
    color: #94a3b8;
}

.stiva-my-decks-summary span {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.stiva-my-decks-toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stiva-my-decks-search {
    flex: 1;
    min-width: 220px;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #0b1220;
    color: #fff;
    font-size: 0.95rem;
}

.stiva-my-decks-search::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.stiva-my-decks-sort {
    width: 180px;
    padding: 0.75rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: #0b1220;
    color: #fff;
}

.stiva-my-decks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.stiva-deck-card {
    background: #0b1220;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stiva-deck-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.stiva-deck-cover {
    height: 180px;
    position: relative;
    background: linear-gradient(180deg, rgba(245, 245, 245, 0.1), rgba(12, 17, 33, 0.8));
}

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

.stiva-deck-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(4, 7, 16, 0.05) 0%, rgba(4, 7, 16, 0.38) 100%);
    pointer-events: none;
}

.stiva-deck-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e293b, #111827);
}

.stiva-deck-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.stiva-deck-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.stiva-deck-title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.35;
    font-weight: 700;
    color: #f8fafc !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
    overflow-wrap: anywhere;
}

.stiva-deck-card-id {
    font-size: 0.72rem;
    color: #cbd5e1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stiva-deck-card-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stiva-deck-card-meta {
    font-size: 0.83rem;
    color: #dbe5ff;
}

.stiva-deck-card-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.35rem;
}

.stiva-deck-card-actions .stiva-order-deck {
    grid-column: 1 / -1;
}

@media (min-width: 640px) {
    .stiva-deck-card-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stiva-deck-card-actions .stiva-order-deck {
        grid-column: auto;
    }
}

.stiva-deck-card-actions .stiva-btn {
    font-size: 0.82rem;
    min-height: 40px;
    padding: 0.62rem 0.75rem;
    border-radius: 10px;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .stiva-deck-cover {
        height: 168px;
    }
}

.stiva-empty-state-premium {
    background: linear-gradient(135deg, #111827, #1f2937);
    border-radius: 18px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    color: #f8fafc;
}

.stiva-empty-state-content {
    max-width: 420px;
    margin: 0 auto;
}

.stiva-empty-state-label {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.stiva-empty-state-premium h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.stiva-empty-state-premium p {
    color: #cbd5f5;
    margin-bottom: 1.25rem;
}

.stiva-empty-search {
    border-radius: 16px;
    padding: 2.5rem 1.5rem;
    background: #111827;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #e2e8f0;
}

/* Toast Notifications */
.stiva-toast-container {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    z-index: 9999;
}

.stiva-toast {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    min-width: 300px;
    animation: stiva-slide-in 0.3s ease-out;
}

@keyframes stiva-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.stiva-toast-icon {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.stiva-toast-success .stiva-toast-icon {
    color: var(--stiva-success);
}

.stiva-toast-error .stiva-toast-icon {
    color: var(--stiva-danger);
}

.stiva-toast-content {
    flex: 1;
}

.stiva-toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.stiva-toast-message {
    font-size: 0.875rem;
    color: var(--stiva-gray-600);
}

.stiva-cart-success-modal {
    position: fixed;
    inset: 0;
    z-index: 11000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.stiva-cart-success-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.65);
}

.stiva-cart-success-dialog {
    position: relative;
    width: min(92vw, 440px);
    background: #ffffff;
    border-radius: 14px;
    padding: 1.2rem 1.2rem 1rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(193, 18, 31, 0.15);
}

.stiva-cart-success-dialog h3 {
    margin: 0 0 0.45rem;
    color: #0f172a;
    font-size: 1.1rem;
    line-height: 1.35;
}

.stiva-cart-success-dialog p {
    margin: 0;
    color: #475569;
    font-size: 0.92rem;
}

.stiva-cart-success-actions {
    margin-top: 0.95rem;
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.stiva-cart-success-go {
    font-weight: 700;
}

.stiva-cart-success-go.is-disabled {
    opacity: 0.55;
    pointer-events: none;
}

@media (max-width: 540px) {
    .stiva-cart-success-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .stiva-cart-success-actions .stiva-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Modal */
.stiva-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.stiva-modal.active {
    display: flex;
}

.stiva-export-modal {
    background: rgba(2, 6, 23, 0.8);
}

.stiva-modal-content {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.stiva-modal-header {
    margin-bottom: 1.5rem;
}

.stiva-modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--stiva-gray-800);
    margin: 0;
}

.stiva-modal-body {
    margin-bottom: 1.5rem;
}

.stiva-modal-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--stiva-gray-300);
    border-radius: 4px;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.stiva-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.stiva-export-modal .stiva-modal-content {
    max-width: 520px;
    width: min(90vw, 520px);
    background: #020617;
    color: #fff;
    border-radius: 20px;
    padding: 2rem 2.25rem;
    box-shadow: 0 30px 60px rgba(2, 6, 23, 0.5);
}

.stiva-export-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.stiva-export-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
}

.stiva-export-subtitle {
    color: #94a3b8;
    font-size: 0.95rem;
}

.stiva-export-deck-id,
.stiva-export-share {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    padding: 0.65rem 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    color: #e2e8f0;
}

.stiva-export-share span {
    font-size: 0.8rem;
    word-break: break-all;
    flex: 1;
}

.stiva-export-copy {
    border: none;
    background: #2563eb;
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    color: #fff;
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.2s;
}

.stiva-export-copy:hover {
    background: #1d4ed8;
}

.stiva-export-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.stiva-export-action-grid .stiva-btn {
    width: 100%;
    font-size: 0.85rem;
    padding: 0.75rem;
}

/* Legal Text */
.stiva-legal-text {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--stiva-gray-200);
    font-size: 0.75rem;
    color: var(--stiva-gray-500);
    text-align: center;
}

/* Skeleton Loading */
.stiva-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: stiva-skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes stiva-skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.stiva-skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.stiva-skeleton-text:last-child {
    margin-bottom: 0;
}

.stiva-skeleton-img {
    width: 40px;
    height: 40px;
    border-radius: 4px;
}

.stiva-public-deck-page {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32%),
        radial-gradient(circle at top right, rgba(234, 179, 8, 0.12), transparent 26%),
        #08111f;
    color: #e2e8f0;
    min-height: 100vh;
    padding: 2rem 1rem 4rem;
}

.stiva-public-deck-shell {
    max-width: 1320px;
    margin: 0 auto;
}

.stiva-public-deck-empty {
    max-width: 640px;
    margin: 4rem auto;
    background: rgba(15, 23, 42, 0.92);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    padding: 2rem;
    text-align: center;
}

.stiva-public-deck-hero {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.stiva-public-deck-hero-copy,
.stiva-public-deck-meta-top,
.stiva-public-deck-stats,
.stiva-public-deck-section {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.38);
}

.stiva-public-deck-hero-copy {
    padding: 1.75rem;
}

.stiva-public-deck-meta-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.stiva-public-deck-feature {
    display: grid;
    gap: 0.75rem;
    align-content: start;
}

.stiva-public-deck-feature h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
}

.stiva-public-deck-back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #93c5fd;
    text-decoration: none;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.stiva-public-deck-back:hover {
    color: #dbeafe;
}

.stiva-public-deck-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    color: #bfdbfe;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.stiva-public-deck-title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 0.96;
    color: #f8fafc;
}

.stiva-public-deck-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1rem;
    color: #94a3b8;
    font-size: 0.95rem;
}

.stiva-public-deck-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.stiva-public-deck-description {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.7;
}

.stiva-public-deck-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.stiva-public-deck-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
}

.stiva-public-deck-youtube {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #fca5a5;
    font-weight: 600;
    text-decoration: none;
}

.stiva-public-deck-youtube:hover {
    color: #fecaca;
    text-decoration: underline;
}

.stiva-public-deck-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.4rem;
}

.stiva-public-deck-actions .stiva-btn {
    min-width: 170px;
}

.stiva-public-deck-stats {
    padding: 1.1rem;
    display: grid;
    gap: 1rem;
}

.stiva-public-deck-stats-group {
    display: grid;
    gap: 0.75rem;
}

.stiva-public-deck-stats-title {
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stiva-public-deck-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.stiva-public-deck-stat {
    background: rgba(30, 41, 59, 0.7);
    border-radius: 18px;
    padding: 1rem;
    min-height: 92px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stiva-public-deck-stat-label {
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stiva-public-deck-stat strong {
    color: #f8fafc;
    font-size: 1.8rem;
    line-height: 1;
}

.stiva-public-deck-stats-grid.is-primary .stiva-public-deck-stat {
    background: rgba(11, 18, 32, 0.88);
}

.stiva-public-deck-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(205, 27, 32, 0.16);
    border: 1px solid rgba(205, 27, 32, 0.18);
}

.stiva-public-deck-price-label {
    color: #fca5a5;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stiva-public-deck-price strong {
    color: #ffffff;
    font-size: 1.55rem;
    line-height: 1;
    text-align: right;
}

.stiva-public-deck-sheet {
    display: grid;
    gap: 1.25rem;
}

.stiva-public-deck-section {
    padding: 1.1rem;
}

.stiva-public-deck-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.stiva-public-deck-section-header h2 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.25rem;
}

.stiva-public-deck-section-header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #dbeafe;
    font-weight: 700;
}

.stiva-public-deck-grid {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    gap: 0.85rem;
}

.stiva-public-deck-card {
    background: rgba(15, 23, 42, 0.86);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stiva-public-deck-card-media {
    position: relative;
    aspect-ratio: 0.72;
    background: #020617;
}

.stiva-public-deck-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stiva-public-deck-card-qty {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.82);
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.24);
}

.stiva-public-deck-card-body {
    padding: 0.85rem 0.9rem 1rem;
}

.stiva-public-deck-card-body h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 0.92rem;
    line-height: 1.25;
}

.stiva-public-deck-card-body p {
    margin: 0.35rem 0 0;
    color: #94a3b8;
    font-size: 0.8rem;
}

.stiva-public-deck-section-empty {
    margin: 0;
    padding: 1rem;
    border-radius: 16px;
    background: rgba(30, 41, 59, 0.5);
    color: #94a3b8;
}

@media (max-width: 1100px) {
    .stiva-public-deck-meta-top {
        grid-template-columns: 1fr;
    }

    .stiva-public-deck-grid {
        grid-template-columns: repeat(7, minmax(0, 1fr));
    }
}

@media (max-width: 782px) {
    .stiva-deck-meta-grid {
        grid-template-columns: 1fr;
    }

    .stiva-public-deck-page {
        padding: 1.25rem 0.85rem 3rem;
    }

    .stiva-public-deck-hero-copy {
        padding: 1.35rem;
    }

    .stiva-public-deck-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .stiva-header-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .stiva-price-pill,
    .stiva-total-pill {
        flex: 1 1 auto;
        text-align: center;
    }

    .stiva-public-deck-actions .stiva-btn {
        width: 100%;
        min-width: 0;
    }

    .stiva-public-deck-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .stiva-public-deck-stats {
        gap: 0.85rem;
    }

    .stiva-public-deck-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .stiva-public-deck-stat {
        min-height: 84px;
        padding: 0.9rem;
    }

    .stiva-public-deck-price {
        align-items: flex-start;
        flex-direction: column;
    }

    .stiva-public-deck-price strong {
        text-align: left;
    }
}

/* Card Back Selection Modal */
.stiva-back-card-modal {
    position: fixed;
    inset: 0;
    z-index: 100050 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    box-sizing: border-box;
}

.stiva-back-card-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.78);
    backdrop-filter: blur(6px);
}

.stiva-back-card-dialog {
    position: relative;
    width: min(94vw, 600px) !important;
    max-width: 600px !important;
    background: #1c2430 !important;
    color: #f5f7fb !important;
    border-radius: 16px !important;
    padding: 1.5rem !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: min(86dvh, 720px) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.stiva-back-card-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 1.75rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.stiva-back-card-close:hover {
    color: #fff;
}

.stiva-back-card-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 700;
}

.stiva-back-card-header p {
    margin: 0 0 1.25rem;
    color: #94a3b8;
    font-size: 0.95rem;
}

.stiva-back-card-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1.25rem;
}

.stiva-back-tab-btn {
    background: none;
    border: none;
    color: #94a3b8;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.stiva-back-tab-btn:hover {
    color: #fff;
}

.stiva-back-tab-btn.active {
    color: #c1121f;
    border-bottom-color: #c1121f;
}

.stiva-back-card-panes {
    flex: 1 1 auto;
    overflow-y: auto;
    margin-bottom: 1.25rem;
    min-height: 0;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.stiva-back-card-panes::-webkit-scrollbar {
    width: 5px;
}

.stiva-back-card-panes::-webkit-scrollbar-track {
    background: transparent;
}

.stiva-back-card-panes::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.22);
    border-radius: 6px;
}

.stiva-back-pane {
    display: none;
}

.stiva-back-pane.active {
    display: block;
}

.stiva-back-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
    padding: 2px;
}

.stiva-back-preset-item {
    position: relative;
    aspect-ratio: 59 / 86;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #0f172a;
}

.stiva-back-preset-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stiva-back-preset-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.stiva-back-preset-item.active {
    border-color: #c1121f;
    box-shadow: 0 0 0 4px rgba(193, 18, 31, 0.3);
}

.stiva-back-preset-overlay {
    position: absolute;
    inset: 0;
    background: rgba(193, 18, 31, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.stiva-back-preset-item.active .stiva-back-preset-overlay {
    opacity: 1;
}

.stiva-back-preset-overlay span {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    background: #c1121f;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stiva-no-presets-msg {
    text-align: center;
    color: #94a3b8;
    padding: 2rem 0;
}

.stiva-back-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    position: relative;
}

.stiva-back-upload-zone:hover,
.stiva-back-upload-zone.dragover {
    border-color: #c1121f;
    background: rgba(193, 18, 31, 0.02);
}

.stiva-upload-icon {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    display: inline-block;
}

.stiva-back-upload-prompt p {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.stiva-back-upload-prompt span {
    font-size: 0.8rem;
    color: #64748b;
}

.stiva-back-upload-preview {
    position: relative;
    max-width: 150px;
    aspect-ratio: 59 / 86;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.stiva-back-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stiva-back-upload-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.stiva-back-upload-remove:hover {
    background: #c1121f;
}

.stiva-back-upload-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.stiva-back-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
    flex-shrink: 0;
}

.stiva-back-card-footer .stiva-btn {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    font-weight: 600;
}

@media (max-width: 640px) {
    .stiva-back-card-dialog {
        padding: 1.25rem !important;
        max-height: min(84dvh, 660px) !important;
    }

    .stiva-back-card-footer {
        display: grid;
        grid-template-columns: 1fr 1.6fr;
        gap: 10px;
    }

    .stiva-back-card-footer .stiva-btn {
        width: 100%;
        justify-content: center;
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* Free badge in preset tab */
.stiva-back-free-badge {
    display: inline-block;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 1px 6px;
    border-radius: 10px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Free notice banner inside preset pane */
.stiva-back-free-notice {
    background: rgba(22, 163, 74, 0.12);
    border: 1px solid rgba(22, 163, 74, 0.3);
    border-radius: 8px;
    color: #4ade80;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.55rem 0.85rem;
    margin-bottom: 1rem;
}

/* Fee notice banner inside custom-upload pane */
.stiva-back-fee-notice {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    border-radius: 8px;
    color: #fbbf24;
    font-size: 0.88rem;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.85rem;
    line-height: 1.5;
}

.stiva-back-fee-notice strong {
    color: #fde68a;
}

/* Delivery notice in add-to-cart success popup */
.stiva-cart-delivery-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    margin: 0.75rem 0 0.85rem;
}

.stiva-delivery-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 1px;
}

.stiva-cart-delivery-notice div {
    flex: 1;
}

.stiva-cart-delivery-notice strong {
    display: block;
    color: #6366f1;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stiva-cart-delivery-notice p {
    margin: 0 !important;
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.5;
}

.stiva-db-brand-mark {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 14px;
    padding: 10px;
    border-radius: 24px;
    background: radial-gradient(circle at 30% 30%, rgba(205, 27, 32, 0.18), transparent 60%), #11151b;
    box-shadow: 0 18px 35px rgba(0, 0, 0, 0.18);
}

.stiva-db-brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.stiva-deck-library-brand,
.stiva-deck-view-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(205, 27, 32, 0.12);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(23, 27, 34, 0.96), rgba(30, 36, 48, 0.96));
    color: #fff;
}

.stiva-deck-library-brand img,
.stiva-deck-view-brand img {
    display: block;
    width: 88px;
    height: 88px;
    object-fit: contain;
    flex: 0 0 auto;
}

.stiva-deck-builder-hero .stiva-deck-builder-brand {
    min-width: 0;
    max-width: 100%;
}

@media (max-width: 767px) {
    .stiva-deck-builder-hero {
        padding: 18px 20px;
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 14px;
    }

    .stiva-deck-builder-brand img {
        width: 84px;
        height: 84px;
    }
    .stiva-deck-builder-hero .stiva-deck-builder-brand img { width: 184px; height: auto; }
    .stiva-builder-hero-copy { text-align: start; gap: 3px; }
    .stiva-builder-hero-copy strong { font-size: 13px; }
    .stiva-builder-hero-copy span { font-size: 11px; }
}

.stiva-deck-library-brand span,
.stiva-deck-view-brand span {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ef777b;
}

.stiva-deck-library-brand p,
.stiva-deck-view-brand strong {
    margin: 4px 0 0;
    color: #e9edf3;
    font-weight: 700;
}

/* Hide legacy/old mobile bottom navigation tabs globally while preserving the new 5-tab bar */
@media (max-width: 768px) {
    .mobile-tab-bar,
    .tab-bar-bottom,
    .stiva-mobile-nav,
    .stiva-mobile-tab,
    .stiva-global-mobile-nav,
    .stiva-bottom-nav,
    [class*="mobile-tab"]:not(.stiva-mobile-bottom-tabs),
    [class*="bottom-nav"]:not(.stiva-mobile-bottom-tabs) {
        display: none !important;
    }
}

/* Stiva mobile card browser — Pro TCG Duelist Edition */
@media (max-width: 768px) {
    .stiva-mobile-add-cards-view {
        position: fixed;
        inset: 0;
        z-index: 100060 !important;
        padding: env(safe-area-inset-top, 0) 0 0;
        background: #f5f2ef;
    }
    .stiva-mobile-add-cards-sheet {
        box-sizing: border-box;
        height: 100%;
        min-height: 0;
        padding: 0;
        gap: 0;
        border-radius: 0;
        background: #f5f2ef;
        box-shadow: none;
        backdrop-filter: none;
        display: flex;
        flex-direction: column;
    }
    .stiva-mobile-add-cards-header {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        background: #ffffff;
        border-bottom: 1px solid #e6ddd6;
        box-shadow: 0 2px 10px rgba(20, 18, 17, 0.04);
    }
    .stiva-mobile-add-cards-header h2 {
        margin: 0;
        font-family: 'Bebas Neue', Impact, sans-serif;
        font-size: 24px;
        line-height: 1.05;
        letter-spacing: 0.5px;
        color: #18181b;
    }
    .stiva-mobile-add-cards-copy p {
        margin: 0;
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .12em;
        color: #dc1212;
    }
    .stiva-mobile-back {
        box-shadow: 0 2px 6px rgba(20, 18, 17, 0.06);
        padding: 8px 14px;
        min-height: 40px;
        font-size: 13px;
        font-weight: 700;
        border: 1px solid #e4dad2;
        background: #ffffff;
        color: #18181b;
    }
    .stiva-mobile-add-cards-body {
        display: block;
        flex: 1 1 auto;
        min-height: 0;
        padding: 0 14px 20px;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-mode-toggle {
        margin: 12px 0 10px;
        padding: 4px;
        gap: 4px;
        border: 1px solid #e4dad2;
        border-radius: 12px;
        background: #ebe3dc;
        position: static;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-mode-toggle .stiva-mode-btn {
        min-height: 42px;
        padding: 8px;
        border-radius: 9px;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0;
        text-transform: none;
        transform: none;
        color: #574c45;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-mode-toggle .stiva-mode-btn.active {
        color: #fff;
        background: #dc1212;
        box-shadow: 0 3px 10px rgba(220, 18, 18, 0.25);
    }
    .stiva-mobile-add-cards-view .stiva-mobile-panel-stack {
        display: block;
        overflow: visible;
        padding: 0;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-search-shell {
        padding: 0;
        gap: 10px;
        border: 0;
        background: transparent;
        border-radius: 0;
        box-shadow: none;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-search-bar {
        position: relative;
        display: flex;
        align-items: center;
        margin: 0;
        border: 1.5px solid #d6c8be;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 2px 8px rgba(20, 18, 17, 0.04);
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-search-bar:focus-within {
        border-color: #dc1212;
        box-shadow: 0 0 0 3px rgba(220, 18, 18, 0.12);
    }
    .stiva-mobile-add-cards-view .stiva-mobile-search-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #8c7a6b;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
    }
    .stiva-mobile-add-cards-view input.stiva-search-input {
        width: 100% !important;
        height: 48px !important;
        min-height: 48px !important;
        padding: 0 14px 0 42px !important;
        background: transparent !important;
        color: #18181b !important;
        -webkit-text-fill-color: #18181b !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        border: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
    }
    .stiva-mobile-add-cards-view input.stiva-search-input::placeholder {
        color: #8c7e75 !important;
        -webkit-text-fill-color: #8c7e75 !important;
        opacity: 1 !important;
    }

    /* Frame-Color Coded Quick Type Chips */
    .stiva-mobile-browse-types {
        display: flex;
        gap: 7px;
        overflow-x: auto;
        padding: 2px 2px 4px;
        scrollbar-width: none;
    }
    .stiva-mobile-browse-types::-webkit-scrollbar {
        display: none;
    }
    .stiva-mobile-type-chip {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 36px;
        margin: 0;
        padding: 6px 13px;
        border: 1px solid #dfd3c9;
        border-radius: 999px;
        background: #ffffff;
        color: #3f3630;
        font-size: 12.5px;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: 0.01em;
        text-transform: none;
        box-shadow: 0 1px 3px rgba(20, 18, 17, 0.04);
        transition: all 0.18s ease;
    }
    .stiva-mobile-type-chip .stiva-chip-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #dc1212;
        flex-shrink: 0;
    }
    .stiva-chip-frame--effect .stiva-chip-dot { background: #d97706; }
    .stiva-chip-frame--normal .stiva-chip-dot { background: #ca8a04; }
    .stiva-chip-frame--spell .stiva-chip-dot { background: #0d9488; }
    .stiva-chip-frame--trap .stiva-chip-dot { background: #be185d; }
    .stiva-chip-frame--fusion .stiva-chip-dot { background: #7e22ce; }
    .stiva-chip-frame--synchro .stiva-chip-dot { background: #64748b; }
    .stiva-chip-frame--xyz .stiva-chip-dot { background: #18181b; }
    .stiva-chip-frame--link .stiva-chip-dot { background: #1d4ed8; }

    .stiva-mobile-type-chip[aria-pressed="true"] {
        background: #18181b;
        border-color: #18181b;
        color: #ffffff;
        box-shadow: 0 4px 10px rgba(24, 24, 27, 0.18);
    }

    /* Filter Accordion */
    .stiva-mobile-add-cards-view details.stiva-mobile-filter-panel {
        display: block;
        padding: 0;
        background: #ffffff;
        border: 1px solid #e4dad2;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(20, 18, 17, 0.03);
    }
    .stiva-mobile-filter-panel summary {
        cursor: pointer;
        padding: 10px 14px;
        min-height: 42px;
        box-sizing: border-box;
        color: #27221f;
        font-size: 13.5px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: space-between;
        list-style: none;
    }
    .stiva-mobile-filter-panel summary::-webkit-details-marker {
        display: none;
    }
    .stiva-filter-summary-title {
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }
    .stiva-filter-summary-title svg {
        color: #dc1212;
    }
    .stiva-filter-summary-meta {
        font-size: 11.5px;
        font-weight: 600;
        color: #7c6f66;
        background: #f6f0ec;
        padding: 3px 9px;
        border-radius: 999px;
    }
    .stiva-mobile-filter-panel[open] .stiva-mobile-filter-grid {
        padding: 8px 12px 4px;
        gap: 10px;
        border-top: 1px solid #f0e8e2;
    }
    .stiva-mobile-add-cards-view select.stiva-filter-select {
        min-width: 0 !important;
        height: 40px !important;
        padding: 6px 8px !important;
        background: #faf7f4 !important;
        border: 1px solid #ded0c6 !important;
        border-radius: 8px !important;
        color: #27221f !important;
        font-size: 13px !important;
        box-shadow: none !important;
    }
    .stiva-mobile-add-cards-view select.stiva-filter-select option { color: #27221f !important; background: #fff !important; }
    .stiva-mobile-add-cards-view .stiva-mobile-filter-field span { color: #6c5c52; font-size: 11.5px; font-weight: 700; text-transform: none; letter-spacing: 0; }
    .stiva-mobile-add-cards-view .stiva-mobile-filter-clear-btn { margin: 10px 12px 12px; width: calc(100% - 24px); min-height: 40px; background: #fff5f5; border: 1px solid rgba(220, 18, 18, 0.25); border-radius: 8px; color: #dc1212; font-size: 13px; font-weight: 700; }

    /* Results Header */
    .stiva-mobile-add-cards-view .stiva-mobile-results-shell {
        margin-top: 14px;
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-results-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 0 2px 10px;
        background: transparent;
        color: #27221f;
        border: 0;
        box-shadow: none;
        position: static;
    }
    .stiva-mobile-results-title-group {
        display: inline-flex;
        align-items: center;
        gap: 8px;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-results-header p {
        color: #18181b;
        font-size: 15px;
        font-weight: 800;
        letter-spacing: -0.01em;
        text-transform: none;
        margin: 0;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-results-header strong {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #dc1212;
        background: #fee2e2;
        border: 1px solid rgba(220, 18, 18, 0.2);
        border-radius: 999px;
        padding: 2px 9px;
        font-size: 12px;
        font-weight: 800;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-results-hint {
        font-size: 11px;
        font-weight: 600;
        color: #786c63;
        white-space: nowrap;
        max-width: none;
        text-align: right;
    }

    /* Card Grid & Authentic TCG Card Tiles */
    .stiva-mobile-add-cards-view .stiva-mobile-results-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        overflow: visible;
        padding-bottom: 16px;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        min-width: 0;
        padding: 8px;
        background: #ffffff;
        border: 1.5px solid #e6ddd6;
        border-top: 3.5px solid #d97706;
        border-radius: 14px;
        box-shadow: 0 4px 12px rgba(24, 24, 27, 0.05);
        gap: 8px;
        transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card.stiva-card-frame--spell { border-top-color: #0d9488; }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card.stiva-card-frame--trap { border-top-color: #be185d; }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card.stiva-card-frame--fusion { border-top-color: #7e22ce; }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card.stiva-card-frame--synchro { border-top-color: #94a3b8; }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card.stiva-card-frame--xyz { border-top-color: #18181b; }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card.stiva-card-frame--link { border-top-color: #1d4ed8; }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card.stiva-card-frame--ritual { border-top-color: #3b82f6; }
    .stiva-mobile-add-cards-view .stiva-mobile-result-card.stiva-card-frame--normal { border-top-color: #ca8a04; }

    .stiva-mobile-add-cards-view .stiva-mobile-result-card.is-in-deck {
        border-color: #dc1212;
        box-shadow: 0 6px 16px rgba(220, 18, 18, 0.14);
        background: linear-gradient(180deg, #ffffff 0%, #fff8f8 100%);
    }

    .stiva-mobile-add-cards-view .stiva-mobile-result-media {
        position: relative;
        aspect-ratio: 421 / 614;
        border-radius: 9px;
        background: #141417;
        overflow: hidden;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-result-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }
    .stiva-mobile-pts-badge {
        position: absolute;
        top: 6px;
        right: 6px;
        z-index: 3;
        background: rgba(15, 23, 42, 0.88);
        color: #38bdf8;
        font-size: 10.5px;
        font-weight: 800;
        padding: 2px 7px;
        border-radius: 999px;
        backdrop-filter: blur(4px);
        border: 1px solid rgba(56, 189, 248, 0.3);
    }

    .stiva-mobile-add-cards-view .stiva-mobile-card-copy {
        display: flex;
        flex-direction: column;
        gap: 6px;
        flex: 1;
        justify-content: space-between;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-result-name {
        font-size: 13px;
        font-weight: 800;
        line-height: 1.25;
        color: #18181b;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .stiva-mobile-card-meta-row {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
    }
    .stiva-mobile-frame-tag {
        font-size: 10px;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        padding: 2px 6px;
        border-radius: 4px;
        background: #fef3c7;
        color: #92400e;
    }
    .stiva-tag--spell { background: #ccfbf1; color: #115e59; }
    .stiva-tag--trap { background: #fce7f3; color: #9d174d; }
    .stiva-tag--fusion { background: #f3e8ff; color: #6b21a8; }
    .stiva-tag--synchro { background: #f1f5f9; color: #334155; }
    .stiva-tag--xyz { background: #18181b; color: #f4f4f5; }
    .stiva-tag--link { background: #dbeafe; color: #1e40af; }
    .stiva-tag--ritual { background: #e0f2fe; color: #075985; }

    .stiva-mobile-lvl-tag {
        font-size: 10px;
        font-weight: 800;
        color: #b45309;
        background: #fffbeb;
        padding: 1px 5px;
        border-radius: 4px;
    }
    .stiva-mobile-atk-tag {
        font-size: 10px;
        font-weight: 700;
        color: #52525b;
        margin-left: auto;
        font-variant-numeric: tabular-nums;
    }

    /* Native 0-3 Copy Stepper Bar */
    .stiva-mobile-card-stepper {
        display: grid;
        grid-template-columns: 34px 1fr 34px;
        align-items: center;
        background: #f6f2ef;
        border: 1px solid #e5dbd3;
        border-radius: 9px;
        padding: 2px;
        margin-top: 2px;
    }
    .stiva-mobile-step-btn {
        position: static !important;
        width: 32px !important;
        height: 30px !important;
        min-width: 32px !important;
        min-height: 30px !important;
        padding: 0 !important;
        margin: 0 !important;
        border: 0 !important;
        border-radius: 7px !important;
        background: #ffffff !important;
        color: #18181b !important;
        font-size: 16px !important;
        font-weight: 800 !important;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
        cursor: pointer;
    }
    .stiva-mobile-step-btn.stiva-mobile-step-plus {
        background: #dc1212 !important;
        color: #ffffff !important;
        box-shadow: 0 2px 5px rgba(220, 18, 18, 0.25) !important;
    }
    .stiva-mobile-step-btn:disabled {
        opacity: 0.35 !important;
        box-shadow: none !important;
        cursor: default;
    }
    .stiva-mobile-step-qty {
        text-align: center;
        font-size: 11.5px;
        font-weight: 800;
        color: #27221f;
        font-variant-numeric: tabular-nums;
    }

    /* Bottom Docked Deck Tray Bar */
    .stiva-mobile-review-bar {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
        background: #141417;
        color: #ffffff;
        border-top: 2px solid #dc1212;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.22);
    }
    .stiva-mobile-review-stats {
        display: flex;
        flex-direction: column;
        gap: 5px;
        min-width: 0;
    }
    .stiva-mobile-review-bar strong.stiva-mobile-review-total {
        font-size: 13.5px;
        font-weight: 800;
        color: #ffffff;
    }
    .stiva-mobile-review-pills {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    .stiva-review-pill {
        font-size: 10.5px;
        font-weight: 800;
        padding: 2px 7px;
        border-radius: 5px;
        letter-spacing: 0.02em;
    }
    .stiva-review-pill--main { background: rgba(217, 119, 6, 0.22); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.3); }
    .stiva-review-pill--extra { background: rgba(168, 85, 247, 0.22); color: #d8b4fe; border: 1px solid rgba(216, 180, 254, 0.3); }
    .stiva-review-pill--side { background: rgba(34, 197, 94, 0.22); color: #86efac; border: 1px solid rgba(134, 239, 172, 0.3); }
    .stiva-review-pill--pts { background: rgba(14, 165, 233, 0.22); color: #7dd3fc; border: 1px solid rgba(125, 211, 252, 0.3); }

    #stiva-mobile-review-deck {
        min-height: 44px;
        margin: 0;
        padding: 10px 18px;
        border: 0;
        border-radius: 10px;
        background: #dc1212;
        color: #fff;
        font-size: 14px;
        font-weight: 800;
        line-height: 1.2;
        text-transform: none;
        letter-spacing: 0.01em;
        white-space: nowrap;
        box-shadow: 0 4px 12px rgba(220, 18, 18, 0.35);
    }
    .stiva-mobile-add-cards-view button:focus-visible,
    .stiva-mobile-add-cards-view summary:focus-visible { outline: 2px solid #c1121f; outline-offset: 3px; }
    .stiva-mobile-add-cards-view .stiva-mobile-import-shell {
        padding: 0;
        gap: 12px;
        background: transparent;
        border: 0;
        border-radius: 0;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-import-toggle {
        margin: 0;
        background: #eee5df;
        border: 1px solid #e7dbd3;
        border-radius: 12px;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-import-toggle .stiva-mode-subbtn {
        min-height: 44px;
        padding: 8px 4px;
        color: #6c5c52;
        background: transparent;
        border-radius: 8px;
        font-size: 13px;
        letter-spacing: 0;
        text-transform: none;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-import-toggle .stiva-mode-subbtn.active {
        color: #a20f1a;
        background: #fff;
        box-shadow: 0 2px 5px #4331260c;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-import-card {
        gap: 12px;
        padding: 18px 16px;
        border: 1px solid #e5d9d0;
        border-radius: 16px;
        box-shadow: 0 3px 8px #43312608;
    }
    .stiva-mobile-import-heading h3 { margin: 0 0 6px; color: #37302d; font-size: 19px; line-height: 1.35; }
    .stiva-mobile-import-heading p,
    .stiva-mobile-import-note { margin: 0; color: #76685f; font-size: 13px; line-height: 1.55; }
    .stiva-mobile-import-note { padding-top: 12px; border-top: 1px solid #eee5df; }
    .stiva-mobile-add-cards-view .stiva-import-label { margin: 0; color: #51483f; font-size: 13px; line-height: 1.4; }
    .stiva-mobile-add-cards-view .stiva-mobile-import-textarea,
    .stiva-mobile-add-cards-view #stiva-import-ydke {
        box-sizing: border-box;
        width: 100%;
        margin: 0;
        min-height: 140px;
        padding: 12px 14px;
        border: 1.5px solid #ded0c6;
        border-radius: 10px;
        background: #ffffff;
        color: #18181b;
        -webkit-text-fill-color: #18181b;
        font: 15px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-import-textarea::placeholder,
    .stiva-mobile-add-cards-view #stiva-import-ydke::placeholder,
    .stiva-import-textarea::placeholder {
        color: #a89f99 !important;
        -webkit-text-fill-color: #a89f99 !important;
        opacity: 1 !important;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
        font-size: 14px !important;
        font-weight: 400 !important;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-import-file {
        box-sizing: border-box;
        width: 100%;
        min-width: 0;
        min-height: 80px;
        margin: 0;
        padding: 18px 12px;
        background: #faf7f4;
        border: 1px dashed #c7afa0;
        border-radius: 12px;
        color: #6c5c52;
        font-size: 13px;
    }
    .stiva-mobile-import-file::file-selector-button {
        min-height: 44px;
        margin-right: 8px;
        padding: 8px 10px;
        border: 1px solid #ded0c6;
        border-radius: 8px;
        background: #fff;
        color: #a20f1a;
        font-weight: 600;
    }
    .stiva-mobile-add-cards-view .stiva-mobile-primary-btn,
    .stiva-mobile-add-cards-view #stiva-import-ydke-btn {
        box-sizing: border-box;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 12px 16px;
        border: 0;
        border-radius: 10px;
        background: #c1121f;
        color: #fff;
        font-size: 14px;
        line-height: 1.4;
        letter-spacing: 0;
        text-transform: none;
        box-shadow: none;
    }
    .stiva-mobile-add-cards-view .stiva-ydke-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
    .stiva-mobile-add-cards-view #stiva-import-ydke-action { min-height: 44px; background: #faf7f4; border-color: #ded0c6; font-size: 16px; }
    .stiva-mobile-add-cards-view textarea:focus-visible { outline: 2px solid #c1121f; outline-offset: 2px; }
}

/* Stiva deck pages: warm white surfaces, consistent actions, phone-first layout. */
.stiva-deck-section-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0; }
.stiva-deck-section-nav a { display: flex; justify-content: center; align-items: center; gap: 8px; flex: 1; min-height: 44px; padding: 8px; border: 1px solid #e5d9d0; border-radius: 8px; background: #fff; color: #594e48; font-size: 12px; text-decoration: none; white-space: nowrap; }
.stiva-deck-section-nav strong { color: #c1121f; }
.stiva-public-deck-section { scroll-margin-top: 100px; }
.stiva-card-preview { display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: transparent; cursor: zoom-in; }
.stiva-card-preview-dialog { padding: 12px; border: 0; border-radius: 12px; background: #fff; max-width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.stiva-card-preview-dialog::backdrop { background: rgba(35, 25, 25, .8); }
.stiva-card-preview-dialog img { display: block; width: 100%; max-height: calc(100dvh - 100px); object-fit: contain; }
.stiva-card-preview-dialog button { display: block; margin-inline-start: auto; min-width: 44px; min-height: 44px; border: 0; background: #fff; color: #c1121f; font-size: 28px; cursor: pointer; }
.stiva-language-switch { display: flex; justify-content: flex-end; gap: 4px; padding: 10px 16px; background: #faf7f4; }
.stiva-language-switch button { min-height: 44px; padding: 8px 14px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #594e48; font-size: 14px; cursor: pointer; }
.stiva-language-switch button[aria-pressed="true"] { background: #fff; color: #c1121f; border-color: #e5d9d0; font-weight: 700; }
.stiva-share-notice { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 10020; padding: 12px 20px; background: #37302d; color: #fff; border-radius: 10px; max-width: calc(100vw - 32px); }
.stiva-public-deck-page { background: #f6f0ed; color: #37302d; padding: 16px 12px 32px; }
.stiva-public-deck-shell { max-width: 1120px; }
.stiva-public-deck-page .stiva-deck-view-brand { margin-bottom: 16px; }
.stiva-public-deck-page .stiva-deck-view-brand strong,
.stiva-public-deck-page .stiva-deck-view-brand span { color: #594e48; }
.stiva-public-deck-hero { gap: 12px; margin-bottom: 16px; }
.stiva-public-deck-hero-copy,
.stiva-public-deck-meta-top,
.stiva-public-deck-stats,
.stiva-public-deck-section,
.stiva-public-deck-empty { background: #fff; border: 1px solid #e5d9d0; border-radius: 14px; box-shadow: none; padding: 16px; }
.stiva-public-deck-back { color: #a10e19; min-height: 44px; margin-bottom: 8px; }
.stiva-public-deck-back:hover { color: #c1121f; }
.stiva-public-deck-kicker { background: #fbe9eb; color: #a10e19; border-radius: 6px; font-size: 11px; letter-spacing: .04em; }
.stiva-public-deck-title { color: #37302d; font-size: clamp(24px, 5vw, 40px); line-height: 1.2; overflow-wrap: anywhere; }
.stiva-public-deck-meta { color: #76685f; font-size: 12px; gap: 8px 14px; }
.stiva-public-deck-tag { background: #faf0f1; color: #a10e19; border-radius: 7px; }
.stiva-public-deck-description { color: #594e48; font-size: 14px; overflow-wrap: anywhere; }
.stiva-public-deck-feature h2 { color: #37302d; font-size: 16px; }
.stiva-public-deck-youtube,
.stiva-public-deck-youtube:hover { color: #a10e19; min-height: 44px; }
.stiva-public-deck-meta-top { grid-template-columns: minmax(0, 1fr); }
.stiva-public-deck-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stiva-public-deck-actions .stiva-btn { box-sizing: border-box; display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; line-height: 1.3; box-shadow: none; }
.stiva-public-deck-actions > .stiva-btn-primary { grid-column: 1 / -1; background: #c1121f; color: #fff; border: 1px solid #c1121f; }
.stiva-public-deck-actions .stiva-btn-secondary { color: #37302d; border: 1px solid #ded0c6; background: #fff; }
.stiva-public-deck-actions .stiva-export-menu { min-width: 0; }
.stiva-public-deck-actions .stiva-export-options button { justify-content: flex-start; border: 0; text-align: start; }
.stiva-public-deck-stats { gap: 12px; }
.stiva-public-deck-stats-title { color: #76685f; font-size: 11px; letter-spacing: .04em; }
.stiva-public-deck-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stiva-public-deck-stat,
.stiva-public-deck-stats-grid.is-primary .stiva-public-deck-stat { background: #faf7f4; min-height: 64px; padding: 10px 6px; border-radius: 8px; gap: 8px; }
.stiva-public-deck-stat-label { color: #76685f; font-size: 10px; letter-spacing: 0; text-transform: none; }
.stiva-public-deck-stat strong { color: #37302d; font-size: 22px; }
.stiva-public-deck-price { background: #fbe9eb; border: 0; border-radius: 8px; padding: 12px; }
.stiva-public-deck-price-label { color: #a10e19; font-size: 11px; letter-spacing: 0; }
.stiva-public-deck-price strong { color: #a10e19; font-size: 20px; text-align: end; }
.stiva-public-deck-section-header h2 { color: #37302d; font-size: 18px; }
.stiva-public-deck-section-header span { background: #fbe9eb; color: #a10e19; height: 32px; min-width: 32px; }
.stiva-public-deck-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stiva-public-deck-card { background: #faf7f4; border: 1px solid #e5d9d0; border-radius: 7px; }
.stiva-public-deck-card-media { background: #eee6df; }
.stiva-public-deck-card-media img { object-fit: contain; }
.stiva-public-deck-card-qty { background: #c1121f; color: #fff; top: 4px; right: 4px; height: 26px; min-width: 26px; padding: 0 5px; font-size: 12px; border-radius: 6px; box-shadow: none; pointer-events: none; }
.stiva-public-deck-card-body { padding: 8px 6px; }
.stiva-public-deck-card-body h3 { color: #37302d; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.stiva-public-deck-section-empty { background: #faf7f4; color: #76685f; font-size: 14px; }
.stiva-public-deck-page button:focus-visible,
.stiva-public-deck-page a:focus-visible,
.stiva-language-switch button:focus-visible { outline: 2px solid #c1121f; outline-offset: 3px; }
#stiva-my-decks .stiva-deck-card-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#stiva-my-decks .stiva-deck-card-actions .stiva-btn { box-sizing: border-box; display: flex; align-items: center; justify-content: center; grid-column: auto; width: 100%; height: 48px; min-width: 0; min-height: 48px; margin: 0; padding: 8px; font-size: 14px; line-height: 1.2; border-radius: 8px; box-shadow: none; }
@media (min-width: 600px) {
    .stiva-public-deck-page { padding: 24px 20px 40px; }
    .stiva-public-deck-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
    .stiva-public-deck-meta-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stiva-public-deck-card-body h3 { font-size: 13px; }
    .stiva-public-deck-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stiva-public-deck-actions > .stiva-btn-primary { grid-column: auto; }
}
@media (min-width: 1000px) {
    .stiva-public-deck-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    .stiva-public-deck-hero-copy { padding: 24px; }
}

.stiva-public-deck-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 8px; }
.stiva-public-deck-actions:has(.stiva-public-deck-edit) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stiva-public-deck-actions > .stiva-btn,
.stiva-public-deck-actions > .stiva-export-menu > summary { height: 48px; min-height: 48px; margin: 0; padding: 6px; font-size: 12px; line-height: 1.2; }
.stiva-public-deck-actions > .stiva-btn-primary { grid-column: auto; }
.stiva-public-deck-actions .stiva-export-menu { position: relative; }
.stiva-public-deck-actions .stiva-export-options { position: absolute; z-index: 30; min-width: 190px; inset-inline-end: 0; }
.stiva-deck-visibility-panel { margin-top: 18px; padding: 14px; border: 1px solid #e5dcd5; border-radius: 10px; background: #faf8f6; }
.stiva-deck-visibility { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; min-height: 44px; font-size: 14px; color: #594e48; cursor: pointer; }
.stiva-deck-visibility > span { display: flex; flex-direction: column; gap: 4px; }
.stiva-deck-visibility strong { color: #37302d; font-size: 14px; font-weight: 600; }
.stiva-deck-visibility-state { color: #a10e19; font-size: 12px; }
#stiva-visibility-help { margin: 10px 0 0; color: #76685f; font-size: 12px; line-height: 1.6; max-width: 52ch; }
.stiva-deck-visibility-input { appearance: none; position: relative; width: 44px; height: 26px; min-width: 44px; margin: 0; border: 0; border-radius: 20px; background: #d8dce2; cursor: pointer; }
.stiva-deck-visibility-input::before { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; transition: transform .15s; }
.stiva-deck-visibility-input:checked { background: #c1121f; }
.stiva-deck-visibility-input:checked::before { transform: translateX(18px); }
.stiva-deck-visibility-input:focus-visible { outline: 2px solid #c1121f; outline-offset: 3px; }
.stiva-deck-visibility-input:disabled { opacity: .6; }
.stiva-deck-visibility-status { color: #76685f; font-size: 13px; margin: 4px 0 0; }
.stiva-deck-visibility-status:empty { display: none; }
.stiva-deck-section-nav a { min-width: 0; white-space: normal; font-size: 11px; gap: 5px; text-align: center; }
#stiva-my-decks { padding: 0; background: transparent; border-radius: 0; color: #37302d; }
#stiva-my-decks .stiva-my-decks-header { gap: 12px; align-items: flex-start; }
#stiva-my-decks .stiva-my-decks-header h2 { color: #37302d; font-size: 24px; margin: 0 0 6px; }
#stiva-my-decks .stiva-my-decks-header p { color: #76685f; font-size: 14px; margin: 0; }
#stiva-my-decks .stiva-my-decks-summary { color: #76685f; }
#stiva-my-decks .stiva-my-decks-summary span { color: #c1121f; }
#stiva-my-decks .stiva-my-decks-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 8px; }
#stiva-my-decks .stiva-my-decks-search,
#stiva-my-decks .stiva-my-decks-sort { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; background: #fff; border: 1px solid #ded0c6; color: #37302d; font-size: 16px; padding: 10px 12px; }
#stiva-my-decks .stiva-my-decks-search::placeholder { color: #76685f; }
#stiva-my-decks .stiva-my-decks-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
#stiva-my-decks .stiva-deck-card { background: #fff; border: 1px solid #e5d9d0; color: #37302d; border-radius: 12px; box-shadow: none; }
#stiva-my-decks .stiva-deck-card:hover { transform: none; box-shadow: none; }
#stiva-my-decks .stiva-deck-cover { height: 140px; background: #eee6df; }
#stiva-my-decks .stiva-deck-cover img { object-fit: contain; }
#stiva-my-decks .stiva-deck-cover::after { display: none; }
#stiva-my-decks .stiva-deck-cover-placeholder { background: #eee6df; }
#stiva-my-decks .stiva-deck-card-body { padding: 18px; gap: 12px; }
#stiva-my-decks .stiva-deck-title { color: #37302d !important; font-size: 18px; text-shadow: none; }
#stiva-my-decks .stiva-deck-card-id,
#stiva-my-decks .stiva-deck-card-meta { color: #76685f; letter-spacing: 0; display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
#stiva-my-decks .stiva-deck-card-badge { color: #a10e19; background: #fbe9eb; white-space: nowrap; font-size: 11px; }
#stiva-my-decks .stiva-deck-card-actions .stiva-btn-secondary { background: #fff; color: #37302d; border: 1px solid #ded0c6; }
#stiva-my-decks .stiva-deck-card-actions .stiva-btn-primary { background: #c1121f; color: #fff; border: 1px solid #c1121f; }
#stiva-my-decks .stiva-empty-state-premium,
#stiva-my-decks .stiva-empty-search { padding: 24px 16px; background: #fff; border: 1px solid #e5d9d0; border-radius: 12px; color: #37302d; box-shadow: none; }
#stiva-my-decks .stiva-empty-state-premium h3,
#stiva-my-decks .stiva-empty-search h3 { color: #37302d; }
#stiva-my-decks .stiva-pagination .stiva-btn { min-height: 44px; padding: 8px 12px; background: #fff; color: #37302d; border: 1px solid #ded0c6; }
#stiva-my-decks button:focus-visible,
#stiva-my-decks input:focus-visible,
#stiva-my-decks select:focus-visible { outline: 2px solid #c1121f; outline-offset: 3px; }
@media (min-width: 700px) {
    #stiva-my-decks .stiva-my-decks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #stiva-my-decks .stiva-my-decks-toolbar { grid-template-columns: minmax(0, 1fr) 180px; }
    .stiva-public-deck-actions > .stiva-btn,
    .stiva-public-deck-actions > .stiva-export-menu > summary { font-size: 14px; }
}

#stiva-my-decks .stiva-my-decks-header { margin: 4px 0 24px; align-items: center; }
.stiva-library-eyebrow { display: block; margin-bottom: 8px; color: #a10e19; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
#stiva-my-decks .stiva-my-decks-header h2 { font-size: 28px; letter-spacing: -.03em; }
#stiva-my-decks .stiva-my-decks-header p { font-size: 12px; line-height: 1.6; }
.stiva-library-create { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px 12px; background: #c1121f; color: #fff !important; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.stiva-library-create span { font-size: 20px; }
.stiva-library-results { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 12px; color: #76685f; font-size: 12px; }
.stiva-library-results strong { font-weight: 500; font-variant-numeric: tabular-nums; }
#stiva-my-decks .stiva-deck-card { border-radius: 14px; box-shadow: 0 3px 14px rgba(55,48,45,.04); }
.stiva-library-preview { position: relative; height: 162px; overflow: hidden; background: #f2ece7; border-bottom: 1px solid #e5d9d0; }
.stiva-library-preview-cards { height: 100%; display: flex; justify-content: center; align-items: flex-end; gap: 12px; padding: 26px 0 0; box-sizing: border-box; }
.stiva-library-preview-cards img { width: 86px; height: 125px; object-fit: contain; flex-shrink: 0; border-radius: 3px; box-shadow: 0 8px 14px rgba(55,48,45,.18); transform: translateY(10px); }
.stiva-library-preview-cards img:first-child:not(:last-child) { transform: translateY(22px) rotate(-9deg); }
.stiva-library-preview-cards img:last-child:not(:first-child) { transform: translateY(22px) rotate(9deg); }
.stiva-library-preview-empty { align-self: center; color: #b9aaa0; letter-spacing: .2em; font-weight: 700; font-size: 24px; }
.stiva-library-visibility { position: absolute; top: 12px; inset-inline-start: 12px; z-index: 1; padding: 5px 9px; border: 1px solid #ded0c6; border-radius: 6px; background: #fff; color: #76685f; font-size: 10px; font-weight: 600; }
.stiva-library-visibility.is-public { color: #a10e19; border-color: #ebc9cd; }
#stiva-my-decks .stiva-deck-card-header { align-items: center; gap: 10px; }
#stiva-my-decks .stiva-deck-card-header > div { min-width: 0; }
#stiva-my-decks .stiva-deck-title { font-size: 18px; line-height: 1.4; letter-spacing: -.02em; }
#stiva-my-decks .stiva-deck-card-badge { padding: 5px 8px; border-radius: 6px; letter-spacing: 0; font-size: 10px; }
.stiva-library-composition { display: flex; gap: 16px; padding: 10px 0 14px; border-bottom: 1px solid #eee7e2; color: #76685f; font-size: 12px; }
.stiva-library-composition span { display: inline-flex; gap: 6px; }
.stiva-library-composition strong { color: #37302d; font-weight: 600; }
#stiva-my-decks .stiva-deck-card-actions { margin: 0; gap: 8px; }
#stiva-my-decks .stiva-deck-card-actions .stiva-btn { height: 46px; min-height: 46px; font-size: 13px; font-weight: 600; transition: background .15s; }
#stiva-my-decks .stiva-deck-card-actions .stiva-btn:hover { transform: none; box-shadow: none; }
#stiva-my-decks .stiva-deck-card-actions .stiva-btn-secondary:hover { background: #faf7f4; }
#stiva-my-decks .stiva-my-decks-sort { padding-inline: 8px; font-size: 13px; }
@media (max-width: 360px) {
    #stiva-my-decks .stiva-my-decks-header { align-items: flex-start; flex-direction: column; }
    .stiva-library-preview-cards { gap: 6px; }
    .stiva-library-preview-cards img { width: 76px; }
}
.stiva-builder-help { box-sizing: border-box; max-width: 760px; margin: 24px auto; padding: 0 16px; border: 1px solid #e5dcd5; border-radius: 12px; background: #faf8f6; color: #302b28; font: 14px/1.7 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.stiva-builder-help summary { display: flex; align-items: center; gap: 12px; padding: 16px 0; cursor: pointer; list-style: none; font-weight: 650; }
.stiva-builder-help summary::-webkit-details-marker { display: none; }
.stiva-builder-help summary small { display: block; margin-top: 2px; color: #776c65; font-size: 12px; font-weight: 400; }
.stiva-builder-help-icon { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; background: #fbecee; color: #c1121f; font-size: 18px; }
.stiva-builder-help-chevron { margin-inline-start: auto; color: #c1121f; transition: transform .15s; }
.stiva-builder-help[open] .stiva-builder-help-chevron { transform: rotate(180deg); }
.stiva-builder-help-body { padding: 4px 0 16px; border-top: 1px solid #e5dcd5; }
.stiva-builder-help .stiva-builder-help-body p { margin: 12px 0 0; color: #776c65; font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.stiva-builder-help .stiva-builder-help-body strong { color: #302b28; }
.stiva-builder-help summary:focus-visible { outline: 2px solid #c1121f; outline-offset: 4px; border-radius: 6px; }
@media (max-width: 600px) { .stiva-builder-help { margin: 16px 12px 24px; } }
.stiva-builder-guide { box-sizing: border-box; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 24px; border: 1px solid #e5dcd5; border-radius: 16px; background: #fff; color: #302b28; overflow-y: auto; overscroll-behavior: contain; font: 14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.stiva-builder-guide::backdrop { background: rgba(25, 20, 20, .65); }
.stiva-guide-language { display: inline-flex; gap: 4px; padding: 4px; margin: 12px 0 4px; border: 1px solid #e5dcd5; border-radius: 10px; background: #faf8f6; direction: ltr; }
.stiva-builder-guide .stiva-guide-language button { min-height: 44px; min-width: 88px; padding: 8px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #776c65; font: 600 13px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-transform: none; letter-spacing: 0; }
.stiva-builder-guide .stiva-guide-language button[aria-pressed="true"] { border-color: #edb8be; background: #fff; color: #c1121f; box-shadow: 0 1px 3px #302b2810; }
.stiva-builder-guide[dir="rtl"] { text-align: right; }
.stiva-guide-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #c1121f; font-size: 10px; font-weight: 700; letter-spacing: .07em; }
.stiva-builder-guide .stiva-guide-close { width: 44px; height: 44px; padding: 0; border: 1px solid #e5dcd5; border-radius: 8px; background: #faf8f6; color: #302b28; font-size: 26px; }
.stiva-builder-guide h2 { margin: 12px 0 20px; color: #302b28; font: 650 24px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; letter-spacing: -.02em; text-transform: none; }
.stiva-builder-guide ol { margin: 0; padding-inline-start: 24px; }
.stiva-builder-guide li { padding-inline-start: 6px; margin: 0 0 18px; }
.stiva-builder-guide li::marker { color: #c1121f; font-weight: 700; }
.stiva-builder-guide strong { color: #302b28; }
.stiva-builder-guide p { margin: 5px 0 0; color: #776c65; font-size: 13px; line-height: 1.65; }
.stiva-guide-style-status { padding: 14px; margin: 16px 0; border: 1px solid #e5dcd5; border-inline-start: 3px solid #c1121f; border-radius: 8px; background: #faf8f6; }
.stiva-guide-remember { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 12px 0; cursor: pointer; font-size: 13px; }
.stiva-guide-remember input { width: 20px; height: 20px; flex-shrink: 0; accent-color: #c1121f; }
.stiva-builder-guide .stiva-guide-start { width: 100%; min-height: 48px; border: 0; border-radius: 9px; background: #c1121f; color: #fff; font: 650 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-transform: none; letter-spacing: 0; }
.stiva-deck-builder-hero .stiva-builder-guide-trigger { min-height: 44px; padding: 8px 12px; border: 1px solid #62575b; border-radius: 8px; background: transparent; color: #fff; font: 600 12px/1.3 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-transform: none; letter-spacing: 0; }
body.stiva-guide-open { overflow: hidden; }
body.stiva-guide-open .stiva-mobile-fab { display: none !important; }
.stiva-builder-guide button:focus-visible, .stiva-builder-guide input:focus-visible { outline: 2px solid #c1121f; outline-offset: 3px; }
@media (max-width: 600px) { .stiva-builder-guide { padding: 18px; } }
.stiva-style-dialog { box-sizing: border-box; width: min(600px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 20px; border: 1px solid #e5dcd5; border-radius: 16px; background: #fff; color: #302b28; overflow-y: auto; overscroll-behavior: contain; font: 14px/1.6 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.stiva-style-dialog::backdrop { background: #191414aa; }
.stiva-style-dialog h2 { margin: 4px 0 12px; color: #302b28; font: 650 21px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-transform: none; }
.stiva-style-dialog p { color: #776c65; font-size: 13px; line-height: 1.6; }
.stiva-style-dialog .stiva-style-close { display: block; margin-inline-start: auto; width: 44px; height: 44px; padding: 0; border: 1px solid #e5dcd5; border-radius: 8px; background: #faf8f6; color: #302b28; font-size: 26px; }
.stiva-style-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.stiva-style-options button { display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; padding: 12px 8px; border: 2px solid #e5dcd5; border-radius: 12px; background: #faf8f6; color: #302b28; font: 14px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; text-transform: none; letter-spacing: 0; cursor: pointer; }
.stiva-style-options button[aria-pressed="true"] { border-color: #c1121f; background: #fbecee; }
.stiva-style-options img { display: block; width: 100%; max-width: 165px; aspect-ratio: 59 / 86; object-fit: contain; }
.stiva-style-options strong { color: #302b28; font-size: 13px; }
.stiva-style-options .stiva-style-select-label { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; padding: 6px; margin-top: auto; border-radius: 7px; background: #c1121f; color: #fff; font-size: 11px; font-weight: 650; }
.stiva-style-filter-hint { display: block; color: #776c65; font-size: 11px; line-height: 1.5; font-weight: 400; letter-spacing: 0; text-transform: none; margin-top: 6px; }
.stiva-style-options span { color: #776c65; font-size: 11px; }
.stiva-style-dialog button:focus-visible { outline: 2px solid #c1121f; outline-offset: 3px; }
body.stiva-style-open { overflow: hidden; }
body.stiva-style-open .stiva-mobile-fab { display: none !important; }
@media (max-width: 400px) { .stiva-style-dialog { padding: 14px; } .stiva-style-options { gap: 8px; } }
/* Guest save: a compact decision, not a disabled settings form. */
.stiva-guest-save-modal .stiva-modal-content{max-width:480px!important;width:100%!important;max-height:calc(100dvh - 32px)!important;border-radius:20px!important;padding:0!important}
.stiva-guest-save-modal .stiva-modal-header{display:flex;align-items:flex-start;gap:16px;padding:22px!important;margin:0!important}
.stiva-guest-save-modal .stiva-modal-title{font-family:inherit!important;text-transform:none!important;letter-spacing:0!important;font-size:23px!important;line-height:1.3!important;margin:0!important}
.stiva-guest-save-close{flex-shrink:0;min-width:44px;min-height:44px;border:1px solid #e1e4e8!important;border-radius:10px!important;color:#242a33!important;background:#fff!important;padding:0!important;font-size:26px!important;line-height:1!important}
.stiva-guest-save-modal .stiva-modal-body{padding:0 22px!important;overflow:auto;min-height:0;margin:0!important}
.stiva-guest-save-modal .stiva-modal-body p{font-size:15px;line-height:1.65;margin:0 0 18px;color:#4c5563}
.stiva-guest-save-modal .stiva-modal-body label{display:block;font-size:14px;font-weight:700;margin-bottom:8px}
.stiva-guest-save-modal .stiva-guest-name-input{box-sizing:border-box;width:100%;min-height:48px;border:1px solid #cbd1d9!important;border-radius:10px!important;background:#fff!important;color:#20252d!important;padding:12px!important;font-size:16px!important;margin:0 0 16px!important;caret-color:#c81020!important}
.stiva-guest-save-modal .stiva-modal-body .stiva-guest-save-local{font-size:13px;border-top:1px solid #eceef1;padding-top:12px;color:#68717e}
.stiva-guest-save-modal .stiva-modal-footer{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;padding:18px 22px 22px!important}
.stiva-guest-save-modal .stiva-modal-footer .stiva-btn{width:100%;min-height:48px;white-space:normal;text-align:center;border-radius:10px!important;font-size:15px!important;margin:0!important}
.stiva-guest-save-continue{background:transparent!important;border:0!important;color:#59616d!important;min-height:44px;padding:8px!important;text-decoration:underline;font-size:14px!important}
.stiva-guest-save-modal :focus-visible{outline:2px solid #c81020;outline-offset:3px}
#stiva-guest-deck-name,#stiva-guest-deck-name:focus{color:#20252d!important;-webkit-text-fill-color:#20252d!important;opacity:1!important}
#stiva-guest-deck-name:-webkit-autofill,#stiva-guest-deck-name:-webkit-autofill:focus{color:#20252d!important;-webkit-text-fill-color:#20252d!important;-webkit-box-shadow:0 0 0 1000px #fff inset!important}
#stiva-guest-deck-name::placeholder{color:#68717e!important;-webkit-text-fill-color:#68717e!important;opacity:1!important}
/* Persistent single-choice card previews in the builder banner — Pro Duelist Edition */
.stiva-deck-builder-hero.has-style-choices {
    display: grid !important;
    grid-template-columns: minmax(190px, 1fr) minmax(140px, 0.9fr) minmax(320px, 410px) !important;
    gap: 24px !important;
    align-items: center !important;
    height: auto !important;
    padding: 22px 26px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-inline-start: 5px solid #dc1212 !important;
    background: radial-gradient(circle at top right, rgba(220, 18, 18, 0.16), transparent 55%), linear-gradient(145deg, #1b191b 0%, #111012 100%) !important;
    box-shadow: 0 14px 32px rgba(17, 16, 18, 0.22) !important;
}
.stiva-builder-hero-tools {
    min-width: 0;
    display: grid;
    gap: 14px;
}
.stiva-banner-style-choices {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: 0;
}
.stiva-banner-style-choices legend {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 0 !important;
}
.stiva-banner-style-choices .stiva-legend-title {
    font-family: 'Bebas Neue', Impact, sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #ffffff !important;
    line-height: 1.1;
}
.stiva-banner-style-choices .stiva-legend-badge {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fca5a5;
    background: rgba(220, 18, 18, 0.22);
    border: 1px solid rgba(220, 18, 18, 0.45);
    padding: 3px 9px;
    border-radius: 999px;
}
.stiva-banner-style-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.stiva-banner-style-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 10px 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    cursor: pointer;
    min-width: 0;
    transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
}
.stiva-banner-style-option:hover {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.07);
    transform: translateY(-2px);
}
.stiva-banner-style-option.is-selected.stiva-style-opt--konami {
    border-color: #dc1212;
    background: linear-gradient(180deg, rgba(220, 18, 18, 0.26) 0%, rgba(45, 14, 18, 0.85) 100%);
    box-shadow: 0 8px 22px rgba(220, 18, 18, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.stiva-banner-style-option.is-selected.stiva-style-opt--anime {
    border-color: #f59e0b;
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.24) 0%, rgba(45, 31, 12, 0.85) 100%);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.stiva-style-active-pill {
    position: absolute;
    top: 7px;
    right: 7px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 999px;
    background: #dc1212;
    color: #fff;
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.18s ease;
}
.stiva-style-opt--anime .stiva-style-active-pill {
    background: #d97706;
}
.stiva-banner-style-option.is-selected .stiva-style-active-pill {
    opacity: 1;
    transform: scale(1);
}
.stiva-style-card-frame {
    position: relative;
    padding: 3px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.35);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
    transition: transform 0.22s ease;
}
.stiva-banner-style-option.is-selected .stiva-style-card-frame {
    transform: scale(1.04);
}
.stiva-banner-style-option img {
    width: 78px !important;
    height: 114px !important;
    object-fit: contain !important;
    border-radius: 4px;
    display: block;
}
.stiva-style-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
    text-align: center;
}
.stiva-style-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
}
.stiva-style-sub {
    display: block;
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.68);
}
.stiva-banner-style-option input {
    appearance: auto !important;
    position: static !important;
    width: 15px !important;
    height: 15px !important;
    margin: 0 !important;
    accent-color: #dc1212;
    opacity: 1 !important;
    flex-shrink: 0;
}
.stiva-banner-style-option:focus-within {
    outline: 2px solid #fff;
    outline-offset: 2px;
}
.stiva-builder-hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.stiva-builder-hero-actions .stiva-banner-browse,
.stiva-builder-hero-actions .stiva-builder-guide-trigger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    box-sizing: border-box;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 11px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
}
.stiva-builder-hero-actions .stiva-banner-browse {
    background: rgba(220, 18, 18, 0.16) !important;
    border-color: rgba(220, 18, 18, 0.45) !important;
}
.stiva-builder-hero-actions .stiva-banner-browse:hover,
.stiva-builder-hero-actions .stiva-builder-guide-trigger:hover {
    background: #dc1212 !important;
    border-color: #dc1212 !important;
    transform: translateY(-1px);
}
.stiva-builder-hero-actions svg {
    flex-shrink: 0;
    opacity: 0.9;
}
@media(max-width: 1000px) {
    .stiva-deck-builder-hero.has-style-choices {
        grid-template-columns: minmax(160px, 1fr) minmax(280px, 360px) !important;
    }
    .stiva-deck-builder-hero.has-style-choices > .stiva-builder-hero-copy {
        display: none !important;
    }
}
@media(max-width: 767px) {
    .stiva-deck-builder-hero.has-style-choices {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 16px !important;
        padding: 18px 16px !important;
    }
    .stiva-deck-builder-hero .stiva-deck-builder-brand {
        justify-content: space-between !important;
        width: 100%;
        padding-bottom: 12px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }
    .stiva-deck-builder-hero .stiva-deck-builder-brand > img {
        width: 185px !important;
        height: auto !important;
    }
    .stiva-builder-banner-flags {
        margin-top: 0 !important;
        background: rgba(255, 255, 255, 0.07);
        padding: 6px 10px;
        border-radius: 999px;
        border: 1px solid rgba(255, 255, 255, 0.12);
    }
    .stiva-builder-hero-tools {
        width: 100%;
    }
    .stiva-banner-style-option img {
        width: 82px !important;
        height: 118px !important;
    }
    .stiva-mobile-secondary-actions {
        grid-template-columns: 1fr !important;
    }
}
.stiva-builder-banner-flags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    line-height: 1;
}
.stiva-deck-builder-hero .stiva-deck-builder-brand .stiva-builder-banner-flags img {
    display: block;
    width: 22px !important;
    height: 16px !important;
    max-width: none !important;
    object-fit: contain;
    border-radius: 2px;
    filter: none !important;
}
.stiva-deck-library .stiva-library-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:20px;margin:20px 0;background:#f8f8fa;border:1px solid #e1e3e8;border-radius:14px}
.stiva-library-filters label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:600;color:#303744;min-width:0}
.stiva-deck-library .stiva-library-filters input,.stiva-deck-library .stiva-library-filters select{width:100%;min-width:0;min-height:44px;margin:0;padding:10px 12px;background:#fff;color:#20242c;border:1px solid #cfd3da;border-radius:8px;box-sizing:border-box;font-size:16px}
.stiva-library-filter-actions{display:flex;align-items:center;gap:14px;align-self:end;min-height:44px}.stiva-library-filter-actions a{color:#b51222}.stiva-library-count{color:#555e6a;font-size:14px}.stiva-library-pagination{display:flex;flex-direction:column;align-items:center;gap:12px;margin:28px 0}.stiva-library-more[aria-busy=true]{opacity:.6;pointer-events:none}.stiva-library-more[hidden]{display:none!important}.stiva-library-load-status{font-size:13px;color:#555e6a}
@media(max-width:600px){.stiva-deck-library .stiva-library-filters{grid-template-columns:1fr 1fr;padding:14px;gap:12px}.stiva-library-filters label:first-child,.stiva-library-filter-actions{grid-column:1/-1}.stiva-library-pagination .stiva-btn{width:100%;max-width:320px;text-align:center}}

/* Public deck pages: five cards per row in every section and at every breakpoint. */
.stiva-public-deck-page .stiva-public-deck-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
.stiva-public-deck-page .stiva-public-deck-card-body{display:none}
@media(max-width:599px){
    .stiva-public-deck-page .stiva-public-deck-grid{gap:5px}
    .stiva-public-deck-page .stiva-public-deck-card-qty{top:2px;right:2px;min-width:18px;height:18px;padding:0 3px;font-size:10px;border-radius:4px}
    .stiva-public-deck-page .stiva-public-deck-card-body{padding:5px 3px}
    .stiva-public-deck-page .stiva-public-deck-card-body h3{font-size:10px;line-height:1.35}
}

/* Ensure ACTIVE pill always renders above the card preview image on mobile & desktop */
.stiva-banner-style-option .stiva-style-active-pill {
    z-index: 10 !important;
}

.stiva-banner-style-option .stiva-style-card-frame {
    position: relative;
    z-index: 1;
}

/* Guarantee Card Back modal footer (Cancel + Add to Cart) is always pinned and visible */
.stiva-back-card-modal .stiva-back-card-dialog {
    display: flex !important;
    flex-direction: column !important;
    max-height: 86vh !important;
    overflow: hidden !important;
}

.stiva-back-card-modal .stiva-back-card-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
}

.stiva-back-card-modal .stiva-back-card-footer {
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    padding-top: 14px !important;
    margin-top: 8px !important;
}
