/* SubGradedCards edition of the completed Illustrated Analytics shell.
   Structure, breakpoints, menus, and filter behavior follow BasketballWebApp. */
:root,
[data-theme="dark"] {
    --isl-page-max: min(100%, 5200px);
    --isl-page-padding-x: clamp(14px, 2vw, 72px);
    --isl-chrome-inset: clamp(18px, 2.5vw, 64px);
    --isl-bg-page: #071126;
    --isl-bg-nav: rgba(5, 12, 29, .94);
    --isl-bg-nav-mobile: rgba(5, 12, 29, .985);
    --isl-bg-drawer: rgba(4, 10, 24, .985);
    --isl-surface-1: #091326;
    --isl-surface-2: #0d182b;
    --isl-surface-3: #13213a;
    --isl-surface-4: rgba(255, 255, 255, .045);
    --isl-surface-5: rgba(255, 255, 255, .028);
    --isl-border-1: rgba(224, 232, 240, .08);
    --isl-border-2: rgba(224, 232, 240, .15);
    --isl-border-3: rgba(224, 232, 240, .24);
    --isl-text-primary: #f6f8fb;
    --isl-text-secondary: #d3dae4;
    --isl-text-muted: #8f9cb0;
    --isl-text-dim: #65728a;
    --isl-text-disabled: #4d5870;
    --isl-accent: #c9d0d7;
    --isl-accent-em: #f4f7fa;
    --isl-accent-dim: rgba(201, 208, 215, .58);
    --isl-accent-bg: rgba(201, 208, 215, .10);
    --isl-accent-bg-em: rgba(201, 208, 215, .18);
    --isl-accent-bg-hover: rgba(201, 208, 215, .16);
    --isl-accent-border: rgba(201, 208, 215, .30);
    --isl-accent-border-em: rgba(231, 237, 242, .52);
    --isl-accent-glow: rgba(210, 221, 231, .30);
    --isl-status-danger: #ff5e68;
    --isl-status-danger-em: #ff8d94;
    --isl-status-danger-dim: rgba(255, 94, 104, .13);
    --isl-gradient-title: linear-gradient(135deg, #ffffff 0%, #dce3e9 24%, #9faab5 52%, #edf2f5 78%, #ffffff 100%);
    --isl-gradient-accent: linear-gradient(150deg, #f5f7f8 0%, #aeb8c1 48%, #5e6975 100%);
    /* Text colour that belongs on --isl-gradient-accent. The gradient is brushed
       nickel here and navy in light theme, so anything sitting on it must read this
       token instead of hardcoding a dark ink. */
    --isl-on-accent: #071126;
    --isl-gloss-highlight: rgba(255, 255, 255, .18);
    --isl-shadow-card: 0 20px 60px rgba(0, 0, 0, .55);
    --isl-shadow-card-sm: 0 8px 30px rgba(0, 0, 0, .38);
    --isl-shadow-menu: 0 22px 56px rgba(0, 0, 0, .76), 0 0 26px rgba(193, 207, 220, .10);
    --isl-shadow-btn: 0 14px 32px rgba(0, 0, 0, .44), 0 0 22px rgba(204, 216, 226, .15);
    --isl-radius-sm: 8px;
    --isl-radius-md: 12px;
    --isl-radius-lg: 16px;
    --sgc-back-hi: #ffffff;
    --sgc-back-mid: #aeb8c1;
    --sgc-back-low: #596673;
    --sgc-back-shadow: rgba(0, 0, 0, .58);
    color-scheme: dark;
}

[data-theme="light"] {
    --isl-bg-page: #c8ccd0;
    --isl-bg-nav: rgba(244, 245, 247, .94);
    --isl-bg-nav-mobile: rgba(244, 245, 247, .99);
    --isl-bg-drawer: rgba(239, 241, 244, .99);
    --isl-surface-1: #f8f9fa;
    --isl-surface-2: #eceff2;
    --isl-surface-3: #dce1e6;
    --isl-surface-4: rgba(5, 20, 45, .075);
    --isl-surface-5: rgba(5, 20, 45, .045);
    --isl-border-1: rgba(8, 29, 59, .22);
    --isl-border-2: rgba(8, 29, 59, .36);
    --isl-border-3: rgba(8, 29, 59, .54);
    --isl-text-primary: #07152c;
    --isl-text-secondary: #1b2d49;
    --isl-text-muted: #3f526d;
    --isl-text-dim: #4c5f79;
    --isl-text-disabled: #5f6f84;
    --isl-accent: #102b53;
    --isl-accent-em: #071d40;
    --isl-accent-dim: rgba(16, 43, 83, .56);
    --isl-accent-bg: rgba(16, 43, 83, .09);
    --isl-accent-bg-em: rgba(16, 43, 83, .15);
    --isl-accent-bg-hover: rgba(16, 43, 83, .13);
    --isl-accent-border: rgba(16, 43, 83, .28);
    --isl-accent-border-em: rgba(16, 43, 83, .48);
    --isl-accent-glow: rgba(8, 31, 66, .22);
    --isl-status-danger: #b22f3a;
    --isl-status-danger-em: #8d1721;
    --isl-status-danger-dim: rgba(178, 47, 58, .10);
    --isl-gradient-title: linear-gradient(135deg, #071832 0%, #173a68 35%, #071d40 72%, #294c78 100%);
    --isl-gradient-accent: linear-gradient(150deg, #294a77 0%, #102b53 48%, #06152f 100%);
    /* Accent gradient is navy in light theme, so its label must be brushed-nickel
       light — a dark ink here is the "navy button, black text" bug. */
    --isl-on-accent: #eef3f8;
    --isl-gloss-highlight: rgba(255, 255, 255, .76);
    --isl-shadow-card: 0 18px 44px rgba(10, 28, 54, .16);
    --isl-shadow-card-sm: 0 8px 24px rgba(10, 28, 54, .13);
    --isl-shadow-menu: 0 18px 44px rgba(10, 28, 54, .22);
    --isl-shadow-btn: 0 12px 28px rgba(8, 29, 59, .25), 0 0 18px rgba(16, 43, 83, .10);
    --sgc-back-hi: #345882;
    --sgc-back-mid: #102f59;
    --sgc-back-low: #06162f;
    --sgc-back-shadow: rgba(7, 25, 52, .45);
    color-scheme: light;
}

@media (pointer: coarse) {
    input[type="search"], input[type="number"], select { font-size: 16px !important; }
}

.store-body {
    overflow-x: hidden;
    /* Real wallpapers: brushed nickel (light) / navy beadboard (dark) via --store-wallpaper. */
    background-color: var(--paper, var(--isl-bg-page)) !important;
    background-image: var(--store-wallpaper) !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
    color: var(--isl-text-primary);
}
@supports (-webkit-touch-callout: none) {
    .store-body {
        background-attachment: scroll;
    }
}
body.illustrated-menu-open,
body.inventory-filter-open { overflow: hidden; }

/* Chrome paints autofilled fields with its own pale background, which overrode our
   input styling on whichever fields it happened to fill. Background-color can't be
   overridden directly, so flood the field with an inset shadow and force the text
   colour. The long transition keeps it from flashing back on focus. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
select:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px var(--photo-well, var(--isl-surface-1)) inset !important;
    box-shadow: 0 0 0 1000px var(--photo-well, var(--isl-surface-1)) inset !important;
    -webkit-text-fill-color: var(--ink, var(--isl-text-primary)) !important;
    caret-color: var(--ink, var(--isl-text-primary));
    transition: background-color 9999s ease-in-out 0s;
}

/* Global navigation: same composition as Illustrated Stats. */
.isl-nav {
    position: sticky;
    top: 0;
    z-index: 250000;
    height: calc(62px + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    box-sizing: border-box;
    background: var(--isl-bg-nav);
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-bottom: 1px solid var(--isl-accent-border);
    box-shadow: var(--isl-shadow-card-sm);
}
.isl-nav-inner {
    width: 100%;
    max-width: var(--isl-page-max);
    height: 62px;
    margin: 0 auto;
    padding: 0 var(--isl-page-padding-x);
    display: flex;
    align-items: center;
    box-sizing: border-box;
}
.isl-brand-cluster { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-right: 26px; }
.isl-brand { display: flex; align-items: center; text-decoration: none; letter-spacing: 1px; text-transform: uppercase; }
.isl-brand .b-primary, .isl-brand .b-secondary { font-size: 1.12rem; font-weight: 1000; }
.isl-brand .b-primary { color: var(--isl-accent-em); }
.isl-brand .b-secondary { margin-left: 5px; color: var(--isl-text-primary); }
[data-theme="light"] .isl-brand .b-primary { color: #102f5c; }
[data-theme="light"] .isl-brand .b-secondary { color: #66717f; }
.isl-family-mark,
.isl-nav-x-icon {
    width: 28px; height: 28px; display: inline-grid; place-items: center;
    color: var(--isl-text-dim); background: var(--isl-surface-4);
    border: 1px solid var(--isl-border-2); border-radius: 50%; text-decoration: none;
    font-size: .78rem; font-weight: 900; transition: .16s ease;
}
.isl-family-mark:hover,
.isl-nav-x-icon:hover { color: var(--isl-accent-em); background: var(--isl-border-2); border-color: var(--isl-border-3); }
.isl-nav-x-icon svg { width: 13px; height: 13px; fill: var(--isl-text-muted); display: block; }
.isl-nav-x-icon:hover svg { fill: var(--isl-text-secondary); }
.isl-links { display: flex; align-items: center; gap: 4px; flex: 1; }
.isl-link {
    position: relative; padding: 7px 12px; border-radius: 8px;
    color: var(--isl-text-dim); text-decoration: none; font-size: .82rem;
    font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
}
.isl-link::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px;
    background: var(--isl-accent); border-radius: 2px; transform: scaleX(0); transition: transform .2s;
}
.isl-link:hover, .isl-link.active-link { color: var(--isl-text-primary); background: var(--isl-accent-bg); }
.isl-link:hover::after, .isl-link.active-link::after { transform: scaleX(1); }
.isl-link.isl-donate-link {
    color: var(--isl-accent-em);
    background: linear-gradient(135deg, var(--isl-accent-bg-em), var(--isl-surface-4));
    border: 1px solid var(--isl-accent-border);
    animation: sgcDonateIn .8s cubic-bezier(.18,.89,.32,1.28) both;
}
.isl-link.isl-donate-link::after { transform: scaleX(0); }
.isl-link.isl-donate-link:hover {
    color: var(--isl-text-primary);
    background: var(--isl-accent-bg-hover);
    border-color: var(--isl-accent-border-em);
    box-shadow: var(--isl-shadow-card-sm);
}
@keyframes sgcDonateIn {
    0% { opacity: 0; transform: translateY(-28px) scale(.72) rotate(-8deg); filter: blur(4px); }
    55% { opacity: 1; transform: translateY(4px) scale(1.08) rotate(2deg); filter: blur(0); }
    100% { opacity: 1; transform: none; filter: blur(0); }
}
.isl-actions, .isl-nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.isl-nav-right { display: none; }

.isl-signin-btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; padding: 8px 20px; border-radius: 999px;
    color: var(--isl-accent-em); border: 2px solid var(--isl-accent);
    font-size: .8rem; font-weight: 900; letter-spacing: .07em;
    text-transform: uppercase; text-decoration: none; transition: .2s ease;
}
.isl-guest-menu-btn { display: none; }
.isl-signin-btn:hover {
    color: var(--isl-bg-page); background: var(--isl-accent-em);
    box-shadow: var(--isl-shadow-btn); transform: translateY(-1px);
}

.isl-theme-switch {
    display: inline-flex; align-items: center; gap: 0; min-width: 52px; min-height: 34px; padding: 0 6px;
    border: 1px solid var(--isl-border-2); border-radius: 999px; cursor: pointer;
    background: var(--isl-surface-4); color: var(--isl-text-secondary);
    font: inherit; font-size: .73rem; font-weight: 900; text-transform: uppercase;
}
.isl-theme-switch .theme-switch-track {
    position: relative; width: 44px; height: 24px; border-radius: 999px;
    background: linear-gradient(180deg, #071020, #17233a); border: 1px solid var(--isl-border-3);
    box-shadow: inset 0 1px 2px rgba(0,0,0,.34);
}
.isl-theme-switch .theme-icon {
    position: absolute; top: 1px; left: 1px; width: 20px; height: 20px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(180deg, #ffd56a 0%, #f59e0b 100%);
    border: 1px solid rgba(255,213,106,.78);
    color: #7a3400;
    box-shadow: 0 2px 7px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.32), inset 0 -1px 0 rgba(110,48,0,.34);
    transition: transform .18s;
}
.isl-theme-switch .theme-icon :is(i, svg) { width: 13px; height: 13px; display: grid; place-items: center; font-size: 12px; line-height: 1; fill: currentColor; }
.isl-theme-switch.is-light .theme-icon {
    transform: translateX(20px);
    color: #18212f;
    background: linear-gradient(180deg, #ffffff, #e8eefb);
    border-color: rgba(203,213,225,.96);
    box-shadow: 0 2px 8px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.92);
}

/* Basketball app burger construction, recolored only. */
.isl-hamburger,
.isl-menu-btn {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    width: 50px; height: 46px; gap: 5px; padding: 0; border-radius: 9px; cursor: pointer;
    background:
        radial-gradient(circle at 32% 18%, rgba(255,255,255,.70), rgba(255,255,255,.16) 26%, transparent 46%),
        linear-gradient(150deg, #f3f5f6 0%, #aeb8c1 46%, #5e6975 100%);
    border: 1px solid rgba(239, 244, 247, .58);
    box-shadow: var(--isl-shadow-btn), inset 0 1px 0 rgba(255,255,255,.66), inset 0 -7px 14px rgba(24,35,48,.31);
    transition: transform .16s, filter .16s, box-shadow .16s;
    -webkit-tap-highlight-color: transparent;
}
[data-theme="light"] .isl-hamburger,
[data-theme="light"] .isl-menu-btn {
    background:
        radial-gradient(circle at 32% 18%, rgba(255,255,255,.48), rgba(255,255,255,.08) 27%, transparent 47%),
        linear-gradient(150deg, #31527f 0%, #102c55 48%, #05142e 100%);
    border-color: rgba(52, 80, 119, .65);
    box-shadow: var(--isl-shadow-btn), inset 0 1px 0 rgba(255,255,255,.27), inset 0 -7px 14px rgba(0,0,0,.32);
}
/* The global burger keeps the Illustrated Stats charcoal finish in both themes. */
.isl-hamburger,
[data-theme="light"] .isl-hamburger {
    background:
        radial-gradient(circle at 32% 18%, rgba(255,255,255,.34), rgba(255,255,255,.08) 28%, transparent 48%),
        linear-gradient(150deg, rgba(90,96,110,.98) 0%, rgba(49,53,63,.98) 54%, rgba(24,26,33,.99) 100%);
    border-color: rgba(255,255,255,.18);
    box-shadow:
        0 12px 28px rgba(0,0,0,.48),
        inset 0 1px 0 rgba(255,255,255,.22),
        inset 0 -6px 12px rgba(0,0,0,.28);
}
.isl-hamburger:hover, .isl-menu-btn:hover { filter: brightness(1.09); transform: translateY(-1px); }
.isl-hamburger:active, .isl-menu-btn:active { filter: brightness(.94); transform: translateY(1px) scale(.96); }
.isl-hamburger span, .isl-menu-bar {
    display: block; width: 22px; height: 3px; border-radius: 999px;
    background: rgba(7, 24, 50, .86); box-shadow: 0 1px 0 rgba(255,255,255,.36);
    transition: transform .28s cubic-bezier(.25,.8,.25,1), opacity .2s;
    transform-origin: center;
}
[data-theme="light"] .isl-hamburger span,
[data-theme="light"] .isl-menu-bar { background: rgba(245, 248, 252, .90); box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.isl-hamburger span,
[data-theme="light"] .isl-hamburger span {
    background: rgba(245,247,252,.82);
    box-shadow: 0 1px 0 rgba(0,0,0,.32);
}
.isl-hamburger.open span:nth-child(1), .isl-menu-btn.open .isl-menu-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.isl-hamburger.open span:nth-child(2), .isl-menu-btn.open .isl-menu-bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.isl-hamburger.open span:nth-child(3), .isl-menu-btn.open .isl-menu-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.isl-global-dropdown,
.isl-menu-dropdown {
    display: none; position: fixed; z-index: 250100; min-width: min(82vw, 230px);
    max-width: min(90vw, 330px); max-height: min(72dvh, calc(100dvh - 20px));
    overflow-y: auto; padding: 10px; gap: 6px; border-radius: 12px;
    background: radial-gradient(circle at 16% 0%, var(--isl-accent-bg), transparent 36%), rgba(7,15,31,.985);
    border: 1px solid var(--isl-accent-border); box-shadow: var(--isl-shadow-menu);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
[data-theme="light"] .isl-global-dropdown,
[data-theme="light"] .isl-menu-dropdown {
    background: radial-gradient(circle at 16% 0%, rgba(15,42,82,.08), transparent 36%), rgba(248,249,251,.99);
}
.isl-global-dropdown.open, .isl-menu-dropdown.open { display: grid; animation: islMenuIn .16s ease; }
@keyframes islMenuIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: none; } }
.isl-menu-section {
    display: block; padding: 7px 6px 4px; color: var(--isl-accent-em);
    font-size: .61rem; font-weight: 1000; letter-spacing: 1.8px; line-height: 1; text-transform: uppercase;
}
.isl-menu-divider { height: 1px; margin: 5px 2px; background: var(--isl-border-1); }
.isl-menu-item {
    display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 40px;
    box-sizing: border-box; padding: 10px 12px; margin: 0; border-radius: 8px;
    border: 1px solid var(--isl-border-1); background: var(--isl-surface-5);
    color: var(--isl-text-secondary); font: inherit; font-size: .82rem; font-weight: 850;
    text-align: left; text-decoration: none; cursor: pointer;
}
.isl-menu-item:hover { color: var(--isl-text-primary); background: var(--isl-accent-bg-hover); border-color: var(--isl-accent-border); transform: translateY(-1px); }
.isl-menu-item.primary { color: var(--isl-accent-em); background: var(--isl-accent-bg); border-color: var(--isl-accent-border); }
.isl-menu-form { margin: 0; }

/* Shared Illustrated Analytics footer, recolored from orange to silver/navy. */
.isl-footer {
    flex: 0 0 auto;
    margin-top: 60px;
    border-top: 1px solid var(--isl-accent-border);
    background: linear-gradient(180deg, transparent, var(--isl-accent-bg));
}
.isl-footer-inner {
    width: 100%;
    max-width: var(--isl-page-max);
    margin: 0 auto;
    padding: 22px var(--isl-page-padding-x);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.isl-footer-copy { color: var(--isl-text-muted); font-size: .74rem; letter-spacing: .2px; }
.isl-footer-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.isl-footer-link {
    color: var(--isl-text-muted); font-size: .75rem; font-weight: 700;
    letter-spacing: .3px; text-decoration: none; transition: color .15s;
}
.isl-footer-link:hover { color: var(--isl-accent-em); }
.isl-footer-link-donate {
    padding: 4px 12px; color: var(--isl-accent-em);
    border: 1px solid var(--isl-accent-border); border-radius: 999px;
}
.isl-footer-link-donate:hover {
    color: var(--isl-text-primary); background: var(--isl-accent-bg-em); border-color: var(--isl-accent);
}
.isl-footer-x-icon {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 4px 0; color: var(--isl-text-muted); text-decoration: none;
}
.isl-footer-x-icon svg { width: 11px; height: 11px; fill: currentColor; display: block; }
.isl-footer-x-icon:hover { color: var(--isl-accent-em); }

/* Basketball account button and account menu, recolored only for SubGraded Cards. */
.isl-cart-link {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; color: var(--isl-text-secondary); text-decoration: none;
    border: 1px solid transparent; border-radius: 999px; transition: .16s ease;
}
.isl-cart-link:hover { color: var(--isl-text-primary); background: var(--isl-accent-bg); border-color: var(--isl-accent-border); }
.isl-cart-link svg { width: 19px; height: 19px; fill: currentColor; }
.isl-cart-link span {
    position: absolute; top: -2px; right: -3px; display: grid; place-items: center;
    min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
    color: var(--isl-bg-page); background: var(--isl-accent-em); border: 2px solid var(--isl-bg-nav);
    font-size: .62rem; font-weight: 1000; line-height: 1;
}
.isl-acct-btn {
    width: 52px; height: 42px; display: inline-flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 5px; padding: 0; border-radius: 8px;
    cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
    background:
        radial-gradient(circle at 40% 18%, rgba(255,255,255,.34), transparent 60%),
        linear-gradient(160deg, rgba(90,96,110,.98) 0%, rgba(49,53,63,.98) 60%, rgba(24,26,33,.99) 100%);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 12px 28px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.22), inset 0 -6px 12px rgba(0,0,0,.28);
    transition: background .18s, transform .15s, box-shadow .18s;
}
.isl-acct-btn:hover { transform: translateY(-1px); filter: brightness(1.09); }
.isl-acct-btn span {
    display: block; width: 23px; height: 3px; border-radius: 3px;
    background: rgba(245,247,252,.82); box-shadow: 0 1px 0 rgba(0,0,0,.32);
    transition: transform .28s cubic-bezier(.25,.8,.25,1), opacity .2s; transform-origin: center;
}
.isl-acct-btn.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.isl-acct-btn.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.isl-acct-btn.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
.isl-global-dropdown.isl-acct-menu {
    min-width: 200px; max-width: min(90vw, 260px); padding: 0; gap: 0;
    overflow: hidden auto; border-radius: 14px;
    background: var(--isl-surface-1); border: 1px solid var(--isl-accent-border);
    box-shadow: var(--isl-shadow-menu);
}
.isl-global-dropdown.isl-acct-menu.open { display: block; }
.isl-acct-summary {
    padding: 13px 16px 12px;
    background: linear-gradient(135deg, var(--isl-accent-bg-em), rgba(210,218,229,.08));
    border-bottom: 1px solid var(--isl-border-1);
}
.isl-acct-summary-label {
    color: #d9c57e; font-size: .62rem; font-weight: 1000;
    letter-spacing: .13em; line-height: 1; text-transform: uppercase;
}
[data-theme="light"] .isl-acct-summary-label { color: #6d5b1c; }
.isl-acct-summary-name {
    margin-top: 5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis;
    color: var(--isl-text-primary); font-size: .9rem; font-weight: 1000; letter-spacing: .02em; white-space: nowrap;
}
.isl-acct-item {
    display: flex; align-items: center; justify-content: flex-start; gap: 10px;
    width: 100%; min-height: 43px; margin: 0; padding: 12px 16px;
    color: var(--isl-text-secondary); background: transparent; border: 0; border-radius: 0;
    font: inherit; font-size: .84rem; font-weight: 750; letter-spacing: .02em;
    text-align: left; text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.isl-acct-item:hover { color: var(--isl-text-primary); background: var(--isl-accent-bg-em); transform: none; }
.isl-acct-item > :is(i, svg), .isl-acct-item > .menu-theme-icon {
    width: 16px; height: 16px; flex: 0 0 16px; fill: var(--isl-accent-em); color: var(--isl-accent-em);
    display: inline-grid; place-items: center;
}
.isl-acct-item .theme-label { display: inline; }
.isl-acct-divider { height: 1px; margin: 3px 0; background: var(--isl-border-1); }
.isl-acct-item.danger > :is(i, svg) { fill: var(--isl-status-danger); color: var(--isl-status-danger); }
.isl-acct-item.danger:hover { color: var(--isl-status-danger-em); background: var(--isl-status-danger-dim); }

.isl-acct-item .menu-theme-icon { position: static; display: inline-grid; place-items: center; transform: none !important; background: none; border: 0; box-shadow: none; }
.isl-acct-item .menu-theme-icon i { width:16px; height:16px; display:grid; place-items:center; font-size:16px; line-height:1; color:var(--isl-accent-em); }

@media (max-width: 767px) {
    .isl-links { display: none !important; }
    .isl-actions { display: flex !important; margin-left: auto; gap: 4px; }
    .isl-nav-right { display: none !important; }
    .isl-cart-link { width: 36px; height: 38px; }
    .isl-theme-switch { min-width: 48px; padding: 0 4px; }
    .isl-acct-btn { width: 46px; height: 42px; }
    .isl-guest-menu-btn { display: inline-flex; }
    .isl-global-dropdown.isl-acct-menu {
        top: calc(62px + env(safe-area-inset-top, 0px) + 8px) !important;
        right: 8px !important; bottom: auto !important; left: auto !important; width: min(260px, calc(100vw - 16px));
        min-width: 0; max-height: calc(100dvh - 82px); border-radius: 14px;
    }
}

@media (max-width: 420px) {
    .isl-nav-inner { padding-inline: 10px; }
    .isl-brand-cluster { min-width: 0; margin-right: 6px; gap: 0; }
    .isl-brand .b-primary, .isl-brand .b-secondary { font-size: .86rem; }
    .isl-family-mark, .isl-brand-cluster > .isl-nav-x-icon { display: none; }
    .isl-actions { min-width: 0; gap: 3px; }
    .isl-cart-link { width: 32px; }
    .isl-theme-switch { min-width: 42px; padding-inline: 2px; }
    .isl-theme-switch .theme-switch-track { width: 38px; }
    .isl-signin-btn {
        min-height: 36px;
        padding: 7px 10px;
        font-size: .68rem;
        letter-spacing: .03em;
    }
    .isl-signin-btn { display: none; }
}

/* Page topbar copied from the Players Dashboard shared partial. */
.isl-topbar {
    display: grid; grid-template-columns: 132px minmax(0,1fr) 132px; align-items: center;
    gap: 10px; width: 100%; padding: 16px var(--isl-chrome-inset) 10px; box-sizing: border-box;
}
.isl-title-cell { grid-column: 2; min-width: 0; text-align: center; }
/* Inside centered page shells the chrome inset would push the arrow and burger
   in from the content column; keep them flush with the column edges instead. */
.addcard-shell .isl-topbar,
.inventory-workspace .isl-topbar,
.photo-operations .isl-topbar,
.dealer-catalog-shell .isl-topbar,
.staff-shell .isl-topbar,
.intake-shell .isl-topbar,
.shop .isl-topbar,
.carddetail .isl-topbar,
.cart-shell .isl-topbar,
.checkout-shell .isl-topbar,
.info-shell .isl-topbar {
    padding-left: 0;
    padding-right: 0;
}
.isl-back-btn {
    grid-column: 1; justify-self: start; display: flex; align-items: center; justify-content: flex-start;
    width: 60px; height: 46px; padding: 0; border: 0; background: none; text-decoration: none;
    transition: transform .12s, filter .12s; overflow: visible;
}
.isl-back-btn:hover { filter: brightness(1.12); }
.isl-back-btn:active { transform: translateY(2px) scale(.95); filter: brightness(.88); }
.isl-back-svg { width: 54px; height: 42px; display: block; overflow: visible; }
@keyframes sgcTitleGlow {
    0%,100% { filter: drop-shadow(0 0 8px rgba(204,216,226,.46)) drop-shadow(0 2px 6px rgba(35,54,78,.42)); }
    50% { filter: drop-shadow(0 0 22px rgba(229,237,243,.82)) drop-shadow(0 0 40px rgba(89,113,140,.42)); }
}
.isl-page-title {
    display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    margin: 0; text-align: center; font-size: clamp(1.4rem,5vw,2rem); font-weight: 1000;
    line-height: 1.1; text-transform: uppercase; letter-spacing: 3px;
    background: var(--isl-gradient-title); background-size: 250% 250%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    animation: sgcTitleGlow 2.8s ease-in-out infinite;
}
[data-theme="light"] .isl-page-title { animation: none; filter: drop-shadow(0 2px 7px rgba(8,29,59,.18)); }
.isl-menu-wrap { grid-column: 3; justify-self: end; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

/* Canonical Illustrated Analytics filter pill. */
.isl-filter-row { position: sticky; top: 62px; z-index: 200; padding: 8px 0 4px; margin-bottom: 22px; text-align: center; }
.isl-filter-shell {
    display: inline-flex; flex-direction: row; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 10px; max-width: 100%; padding: 14px 18px; box-sizing: border-box;
    text-align: left; background: radial-gradient(circle at 18% 0%, var(--isl-accent-bg), transparent 34%), rgba(5,11,24,.78);
    border: 1px solid var(--isl-accent-border); border-radius: 22px; box-shadow: var(--isl-shadow-card-sm);
}
[data-theme="light"] .isl-filter-shell { background: rgba(238,240,243,.92); }
.isl-filter-primary, .isl-filter-pane, .isl-filter-bar { display: contents; }
.isl-dd { position: relative; flex-shrink: 0; }
.isl-dd-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 36px; padding: 8px 34px 8px 12px; border-radius: 999px;
    color: var(--isl-text-muted); background: var(--isl-surface-1); border: 1px solid var(--isl-border-2);
    font: inherit; font-size: .74rem; font-weight: 800; white-space: nowrap; cursor: pointer;
}
.isl-dd-btn:hover { color: var(--isl-text-primary); border-color: var(--isl-accent-border); }
.isl-dd-btn.is-primary, .isl-dd-btn.has-filter { color: var(--isl-accent-em); background: var(--isl-accent-bg); border-color: var(--isl-accent-border); }
.isl-dd-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: .55rem; opacity: .65; transition: transform .18s; }
.isl-dd-btn.open .isl-dd-arrow { transform: translateY(-50%) rotate(180deg); }
.isl-dd-panel {
    display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 300;
    min-width: 230px; max-width: min(88vw, 330px); max-height: 296px; overflow: auto;
    padding: 8px; border: 1px solid var(--isl-border-2); border-radius: 16px;
    background: var(--isl-surface-2); box-shadow: var(--isl-shadow-menu);
    scrollbar-gutter: stable;
}
.isl-dd-panel.open { display: block; animation: islMenuIn .16s ease; }
.isl-dd-search { position: sticky; top: -8px; z-index: 2; padding: 8px; margin: -8px -8px 4px; background: var(--isl-surface-2); border-bottom: 1px solid var(--isl-border-1); }
.isl-dd-search input {
    width: 100%; min-height: 40px; box-sizing: border-box; padding: 8px 10px;
    color: var(--isl-text-primary); background: var(--isl-surface-1);
    border: 1px solid var(--isl-border-2); border-radius: 10px; font: inherit;
}
.isl-dd-options { --isl-option-height: 43px; max-height: calc(var(--isl-option-height) * 6); overflow-y: auto; overscroll-behavior: contain; }
.isl-dd-item {
    display: grid; grid-template-columns: 17px minmax(0,1fr) auto; align-items: center; gap: 10px;
    min-height: var(--isl-option-height); padding: 9px 10px; border-radius: 8px; cursor: pointer;
    color: var(--isl-text-primary); font-size: .86rem; font-weight: 800;
}
.isl-dd-item:hover { background: var(--isl-surface-4); }
.isl-dd-item[hidden] { display: none !important; }
.isl-dd-item input { width: 16px; height: 16px; margin: 0; accent-color: var(--isl-accent); }
.isl-dd-item small { color: var(--isl-text-dim); font-variant-numeric: tabular-nums; }
.isl-dd-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 5px; }
.isl-dd-range label { color: var(--isl-text-muted); font-size: .7rem; font-weight: 800; }
.isl-dd-range input, .isl-dd-range select {
    width: 100%; min-height: 40px; margin-top: 5px; box-sizing: border-box; padding: 8px;
    color: var(--isl-text-primary); background: var(--isl-surface-1); border: 1px solid var(--isl-border-2); border-radius: 9px;
}
.isl-filter-apply, .isl-filter-reset, .isl-filter-toggle {
    display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
    min-height: 36px; padding: 8px 15px; border-radius: 999px;
    font: inherit; font-size: .74rem; font-weight: 850; white-space: nowrap; cursor: pointer;
}
.isl-filter-apply { color: var(--isl-text-primary); background: var(--isl-surface-1); border: 1px solid var(--isl-border-2); }
.isl-filter-reset { color: var(--isl-text-dim); background: transparent; border: 1px solid var(--isl-border-1); text-decoration: none; }
.isl-filter-toggle { display: none; color: var(--isl-accent-em); background: var(--isl-accent-bg); border: 1px solid var(--isl-accent-border); text-transform: uppercase; letter-spacing: .8px; }
.isl-filter-badge { min-width: 22px; padding: 2px 8px; border-radius: 12px; background: var(--isl-accent-bg-em); text-align: center; }
.isl-filter-badge:empty { display: none; }
.inventory-native-fields { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Inventory becomes a calm Illustrated Analytics data surface. */
.inventory-workspace { width: min(1700px, 100%); margin: 0 auto; padding: 0 var(--isl-page-padding-x) 80px; color: var(--isl-text-primary); }
/* The brushed boards are the page canvas. Full-page glass/navy rectangles obscure
   that identity, so only deliberate cards, pills, tables and modals receive a surface. */
.store-main {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    overflow: visible;
}
.inventory-search { display: block; min-width: 170px; }
.inventory-search input {
    width: 100%; min-height: 36px; box-sizing: border-box; padding: 8px 12px;
    color: var(--isl-text-primary); background: var(--isl-surface-1);
    border: 1px solid var(--isl-border-2); border-radius: 999px; font: inherit; font-size: .78rem;
}
.inventory-overview {
    display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px;
    margin: 0 0 18px;
}
.inventory-overview > div {
    --metric-accent-from: #19d2ff;
    --metric-accent-to: #5ce1e6;
    position: relative; overflow: hidden; min-height: 82px; padding: 15px 18px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    background: rgba(9,18,35,.88); border: 1px solid var(--isl-border-1); border-radius: 18px; box-shadow: var(--isl-shadow-card-sm);
}
[data-theme="light"] .inventory-overview > div { background: rgba(248,249,250,.91); }
.inventory-overview > div::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 3px;
    background: linear-gradient(90deg, var(--metric-accent-from), var(--metric-accent-to));
}
.inventory-overview > div::after {
    content: ""; position: absolute; width: 90px; height: 48px; top: -30px; left: 50%;
    transform: translateX(-50%); border-radius: 50%;
    background: var(--metric-accent-from); filter: blur(28px); opacity: .13; pointer-events: none;
}
.inventory-overview span {
    display: block; color: var(--metric-accent-from);
    font-size: clamp(.6rem,.55rem + .15vw,.72rem); font-weight: 900;
    letter-spacing: 1.1px; text-transform: uppercase;
}
.inventory-overview strong {
    display: block; margin-top: 7px; color: var(--metric-accent-from);
    font-size: clamp(1.25rem,1rem + .7vw,1.85rem); font-weight: 1000;
    line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; text-align: center;
}
.inventory-overview .metric-blue { --metric-accent-from: #19d2ff; --metric-accent-to: #5ce1e6; }
.inventory-overview .metric-green { --metric-accent-from: #31d267; --metric-accent-to: #80f4a0; }
.inventory-overview .metric-yellow { --metric-accent-from: #ffd54a; --metric-accent-to: #ffeb99; }
.inventory-overview .metric-pink { --metric-accent-from: #ff6b9f; --metric-accent-to: #ffb3c6; }
[data-theme="light"] .inventory-overview .metric-blue { --metric-accent-from: #05799f; --metric-accent-to: #0da5b8; }
[data-theme="light"] .inventory-overview .metric-green { --metric-accent-from: #187842; --metric-accent-to: #20a75b; }
[data-theme="light"] .inventory-overview .metric-yellow { --metric-accent-from: #a85b00; --metric-accent-to: #d28a00; }
[data-theme="light"] .inventory-overview .metric-pink { --metric-accent-from: #b3235d; --metric-accent-to: #db4777; }
.inventory-table-wrap { overflow: auto; max-height: min(68dvh, 920px); border: 1px solid var(--isl-border-1); border-radius: 18px; background: rgba(7,14,28,.90); box-shadow: var(--isl-shadow-card); }
[data-theme="light"] .inventory-table-wrap { background: rgba(249,250,251,.94); }
.inventory-table { width: 100%; min-width: 900px; border-collapse: collapse; table-layout: fixed; }
.inventory-table th { position: sticky; top: 0; z-index: 3; padding: 12px 14px; background: var(--isl-surface-2); border-bottom: 1px solid var(--isl-border-2); }
.inventory-table th button { width: 100%; padding: 0; color: var(--isl-text-dim); background: none; border: 0; text-align: left; font: inherit; font-size: .63rem; font-weight: 1000; letter-spacing: .9px; text-transform: uppercase; cursor: pointer; }
.inventory-table td { padding: 13px 14px; color: var(--isl-text-secondary); border-bottom: 1px solid var(--isl-border-1); font-size: .84rem; }
.inventory-table tbody tr { cursor: pointer; transition: background .1s; }
.inventory-table tbody tr:hover, .inventory-table tbody tr:focus { background: var(--isl-surface-4); outline: none; }
.inventory-table th:nth-child(1) { width: 13%; } .inventory-table th:nth-child(2), .inventory-table th:nth-child(3) { width: 10%; }
.inventory-table th:nth-child(4) { width: 10%; } .inventory-table th:nth-child(5) { width: 15%; } .inventory-table th:nth-child(6) { width: 10%; } .inventory-table th:nth-child(7) { width: 32%; }
.inventory-player-cell a { color: var(--isl-text-primary); font-weight: 900; text-underline-offset: 3px; }
.inventory-player-cell small { display: block; margin-top: 4px; color: var(--isl-text-dim); }
.inventory-status-dot, .inventory-work-dot { display: inline-block; width: 9px; height: 9px; margin-right: 6px; border-radius: 50%; background: #76849b; }
.status-ready, .status-listed { background: #45b981; } .status-reserved { background: #d5a541; } .status-sold { background: #7b8799; } .status-draft { background: #6a9bd2; }
.inventory-work-dot { margin-left: 6px; background: #e26a72; }
.inventory-money { font-variant-numeric: tabular-nums; } .inventory-money.is-missing { color: #ed7c82; font-weight: 900; }
.inventory-table-section {
    display: block; margin: 0 0 20px; border: 1px solid var(--isl-border-2);
    border-radius: 18px; background: rgba(7,14,28,.76); box-shadow: var(--isl-shadow-card);
}
[data-theme="light"] .inventory-table-section { background: rgba(247,248,250,.91); }
.inventory-table-section > summary {
    display: grid; grid-template-columns: minmax(180px,.8fr) minmax(0,2fr) 30px;
    align-items: center; gap: 16px; min-height: 78px; padding: 12px 18px;
    box-sizing: border-box; cursor: pointer; list-style: none; user-select: none;
}
.inventory-table-section > summary::-webkit-details-marker { display: none; }
.inventory-table-section[open] > summary { border-bottom: 1px solid var(--isl-border-2); }
.inventory-section-heading strong {
    display: block; color: var(--isl-text-primary); font-size: 1rem; font-weight: 1000;
    letter-spacing: .8px; text-transform: uppercase;
}
.inventory-section-heading small { display: block; margin-top: 3px; color: var(--isl-text-dim); font-size: .68rem; }
.inventory-section-stats { display: flex; justify-content: flex-end; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.inventory-section-stats > span {
    flex: 0 0 auto; min-width: 88px; padding: 8px 10px; border-radius: 12px;
    background: var(--isl-surface-4); border: 1px solid var(--isl-border-1); text-align: center;
}
.inventory-section-stats b { display: block; color: var(--isl-text-primary); font-size: .92rem; font-variant-numeric: tabular-nums; }
.inventory-section-stats small {
    display: block; margin-top: 2px; color: var(--isl-text-dim); font-size: .55rem;
    font-weight: 900; letter-spacing: .65px; text-transform: uppercase; white-space: nowrap;
}
.inventory-section-chevron { color: var(--isl-accent-em); font-size: .72rem; text-align: center; transition: transform .18s; }
.inventory-table-section[open] .inventory-section-chevron { transform: rotate(180deg); }
.inventory-table-section .inventory-table-wrap { border: 0; border-radius: 0 0 17px 17px; box-shadow: none; }
.card-facts-table { min-width: 760px; }
.card-facts-table th:nth-child(1) { width: 14%; }
.card-facts-table th:nth-child(2) { width: 31%; }
.card-facts-table th:nth-child(3) { width: 11%; }
.card-facts-table th:nth-child(4) { width: 20%; }
.card-facts-table th:nth-child(5) { width: 14%; }
.card-facts-table th:nth-child(6) { width: 10%; }
.owner-inventory-table { min-width: 980px; }
.owner-inventory-table th:nth-child(1) { width: 25%; }
.owner-inventory-table th:nth-child(2) { width: 11%; }
.owner-inventory-table th:nth-child(3) { width: 19%; }
.owner-inventory-table th:nth-child(4),
.owner-inventory-table th:nth-child(5) { width: 11%; }
.owner-inventory-table th:nth-child(6),
.owner-inventory-table th:nth-child(7) { width: 11.5%; }
.owner-inventory-table td:first-child small { display: block; margin-top: 3px; color: var(--isl-text-dim); }
.inventory-category,
.inventory-grade {
    display: inline-flex; align-items: center; justify-content: center; min-width: 58px;
    padding: 5px 9px; border-radius: 999px; color: var(--isl-accent-em);
    background: var(--isl-accent-bg); border: 1px solid var(--isl-accent-border);
    font-size: .7rem; font-weight: 950;
}
.inventory-grade { min-width: 38px; font-size: .82rem; }
.multiple-player-trigger {
    position: relative; display: inline-flex; align-items: center; gap: 5px; padding: 0;
    color: var(--isl-text-primary); background: none; border: 0; cursor: pointer;
    font: inherit; font-weight: 900; text-decoration: underline; text-underline-offset: 3px;
}
.multiple-player-trigger::after { content: "ⓘ"; color: var(--isl-text-dim); font-size: .72rem; text-decoration: none; }
.multiple-player-trigger.compact { font-size: .84rem; }
.multiple-player-card {
    position: fixed; z-index: 400000; display: none; min-width: 190px; max-width: min(290px,calc(100vw - 24px));
    padding: 12px; border-radius: 12px; color: var(--isl-text-secondary);
    background: radial-gradient(circle at 20% 0%,var(--isl-accent-bg),transparent 40%),var(--isl-surface-2);
    border: 1px solid var(--isl-accent-border); box-shadow: var(--isl-shadow-menu);
    text-align: left; text-decoration: none; pointer-events: none;
}
.multiple-player-card.open { display: grid; gap: 6px; animation: islMenuIn .14s ease; }
.multiple-player-card strong {
    color: var(--isl-accent-em); font-size: .61rem; font-weight: 1000;
    letter-spacing: 1px; text-transform: uppercase;
}
.multiple-player-card > span { color: var(--isl-text-primary); font-size: .82rem; font-weight: 800; }
.owner-readiness,
.owner-completion { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: .68rem; font-weight: 900; }
.owner-readiness.is-ready,
.owner-completion.complete { color: #9fe3c3; background: rgba(69,185,129,.12); border: 1px solid rgba(69,185,129,.30); }
.owner-readiness.needs-work,
.owner-completion.missing { color: #ff9da3; background: rgba(226,106,114,.11); border: 1px solid rgba(226,106,114,.30); }
/* Neutral: nothing to complete, e.g. a slab that carries no subgrades at all. */
.owner-completion.na { color: var(--isl-text-muted); background: var(--isl-surface-1); border: 1px solid var(--isl-border-2); }

/* Two-tier inventory filtering: card facets first, private owner controls second. */
.inventory-filter-system { display: block; margin: 0 0 22px; }
.inventory-filter-system .isl-filter-row { margin-bottom: 10px; }
.inventory-primary-pill,
.owner-filter-pill {
    display: inline-flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
}
.inventory-primary-pill .isl-dd-btn { min-width: 108px; }
.inventory-primary-pill [data-cascade-facet="player"] .isl-dd-btn { min-width: 126px; }
.owner-filter-control { display: flex; justify-content: center; margin: 2px 0 8px; }
.owner-filter-toggle {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 36px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
    color: var(--isl-text-muted); background: var(--isl-surface-1);
    border: 1px solid var(--isl-border-2); box-shadow: var(--isl-shadow-card-sm);
    font: inherit; font-size: .7rem; font-weight: 950; letter-spacing: .8px; text-transform: uppercase;
}
.owner-filter-toggle:hover,
.owner-filter-toggle.open { color: var(--isl-accent-em); background: var(--isl-accent-bg); border-color: var(--isl-accent-border); }
.owner-filter-chevron { font-size: .55rem; transition: transform .18s; }
.owner-filter-toggle.open .owner-filter-chevron { transform: rotate(180deg); }
.owner-filter-row {
    position: relative;
    top: auto;
    z-index: 190;
    display: none;
    padding-top: 0;
    animation: islMenuIn .16s ease;
}
.owner-filter-row.open { display: block; }
.owner-table-section { display: none; }
.owner-table-section.owner-mode-visible { display: block; }
.owner-filter-pill {
    background: radial-gradient(circle at 82% 0%, var(--isl-accent-bg), transparent 34%), rgba(5,11,24,.68);
    border-style: dashed;
}
[data-theme="light"] .owner-filter-pill { background: rgba(231,234,238,.94); }
.owner-filter-pill .inventory-search { min-width: 210px; }

@media (max-width: 767px) {
    .isl-links { display: none; }
    .isl-actions { display: flex; margin-left: auto; gap: 4px; }
    .isl-nav-right { display: none; }
    .isl-brand-cluster { margin-right: 0; }
    .isl-brand .b-primary, .isl-brand .b-secondary { font-size: .94rem; }
    .isl-family-mark, .isl-nav-x-icon { width: 25px; height: 25px; }
    .isl-theme-switch .theme-label { display: none; }
    .isl-global-dropdown {
        inset: calc(62px + env(safe-area-inset-top,0px)) 0 0;
        max-width: none; max-height: none; border: 0; border-radius: 0;
        padding: 24px 18px max(34px,env(safe-area-inset-bottom,0px));
        background: var(--isl-bg-drawer);
    }
    .isl-global-dropdown .isl-menu-item { min-height: 54px; justify-content: center; border-radius: 14px; font-size: 1rem; }
    .isl-topbar { grid-template-columns: 64px minmax(0,1fr) 64px; gap: 6px; padding: 13px 10px 8px; }
    .isl-page-title { font-size: clamp(1.22rem,8.5vw,1.72rem); letter-spacing: 1.5px; }
    .isl-menu-btn { width: 48px; height: 44px; }
    .isl-filter-row { position: static; padding: 0; }
    .isl-filter-shell { display: block; width: 100%; padding: 12px; border-radius: 18px; }
    .isl-filter-primary, .isl-filter-bar { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
    .isl-filter-primary { margin-bottom: 10px; }
    .isl-filter-primary .isl-dd, .isl-dd-btn, .isl-filter-apply, .isl-filter-reset, .isl-filter-toggle { width: 100%; }
    .isl-filter-pane { display: none; flex-direction: column; gap: 10px; width: 100%; }
    .isl-filter-pane.open { display: flex; }
    .isl-filter-toggle { display: flex; }
    .isl-dd-panel {
        position: fixed; left: 12px; right: 12px; top: auto; bottom: max(12px,env(safe-area-inset-bottom,0px));
        min-width: 0; max-width: none; max-height: min(64vh,calc(100dvh - 96px)); z-index: 260000;
    }
    .isl-filter-primary .isl-dd-panel { position: absolute; top: calc(100% + 8px); bottom: auto; left: 0; right: auto; min-width: 100%; max-height: min(60vh,340px); }
    .isl-dd-options { max-height: calc(var(--isl-option-height) * 6); }
    .inventory-workspace { padding-inline: 10px; }
    .inventory-overview { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .inventory-overview > div { min-height: 68px; padding: 12px; border-radius: 14px; }
    .inventory-overview strong { font-size: 1.45rem; }
    .inventory-table-wrap { max-height: none; border-radius: 14px; }
    .inventory-table-section { border-radius: 14px; }
    .inventory-table-section > summary {
        grid-template-columns: minmax(145px,.7fr) minmax(0,1.4fr) 24px;
        gap: 8px; min-height: 88px; padding: 10px;
    }
    .inventory-section-heading strong { font-size: .82rem; }
    .inventory-section-heading small { font-size: .58rem; }
    .inventory-section-stats { justify-content: flex-start; }
    .inventory-section-stats > span { min-width: 76px; padding: 7px 8px; }
    .inventory-section-stats b { font-size: .82rem; }
    .inventory-filter-system .isl-filter-row {
        overflow-x: auto; overflow-y: visible; margin-inline: -10px; padding: 2px 10px 7px;
        scrollbar-width: thin; scroll-snap-type: x proximity;
    }
    .inventory-filter-system .isl-filter-shell {
        display: inline-flex; flex-flow: row nowrap; width: max-content; min-width: 100%;
        padding: 10px; border-radius: 999px;
    }
    .inventory-filter-system .isl-dd,
    .inventory-filter-system .isl-dd-btn,
    .inventory-filter-system .isl-filter-apply,
    .inventory-filter-system .isl-filter-reset { width: auto; scroll-snap-align: start; }
    .inventory-filter-system .isl-dd-btn { min-width: 102px; }
    .inventory-filter-system .isl-dd-panel,
    .inventory-filter-system .isl-filter-primary .isl-dd-panel {
        position: fixed; left: 10px; right: 10px; top: auto;
        bottom: max(10px,env(safe-area-inset-bottom,0px));
        min-width: 0; max-width: none; max-height: min(68vh,430px);
    }
    .owner-filter-control { margin-top: 5px; }
    .owner-filter-toggle { width: min(92%,320px); }
    .owner-filter-row { margin-bottom: 14px; }
    .owner-filter-pill .inventory-search { min-width: 210px; }
    .isl-footer-inner {
        flex-direction: column; align-items: center; gap: 12px;
        padding: 20px 14px max(22px,env(safe-area-inset-bottom,0px));
    }
    .isl-footer-nav { width: 100%; justify-content: center; flex-wrap: wrap; gap: 10px 14px; }
    .isl-footer-link { font-size: .72rem; letter-spacing: 0; }
    .isl-footer-link-donate { padding: 4px 11px; }
    .isl-footer-copy {
        order: 3; width: 100%; text-align: center;
        font-size: .68rem; line-height: 1.45;
    }
}

@media (max-width: 1199px) and (orientation: landscape) and (hover: none) and (pointer: coarse) {
    .isl-links { display: none !important; }
    .isl-actions { display: flex !important; margin-left: auto; gap: 4px; }
    .isl-nav-right { display: none !important; }
    .isl-filter-row { position: sticky; top: 62px; z-index: 380; padding: 8px 70px 6px 10px; }
    .isl-filter-shell { display: flex; flex-flow: row nowrap; width: 100%; padding: 10px 12px; }
    .isl-filter-primary, .isl-filter-bar { display: flex; flex-flow: row nowrap; align-items: center; gap: 8px; }
    .isl-filter-pane { display: contents; }
    .isl-filter-pane:not(.open) > .isl-dd, .isl-filter-pane:not(.open) > .isl-filter-reset { display: none !important; }
    .isl-filter-toggle { display: inline-flex; width: auto; }
    .isl-filter-pane.open {
        position: fixed; top: 62px; right: 0; bottom: 0; z-index: 260000;
        display: flex; flex-direction: column; gap: 10px; width: min(380px,82vw);
        padding: 14px; overflow-y: auto; background: var(--isl-surface-2);
        border-left: 1px solid var(--isl-accent-border); box-shadow: -22px 0 42px rgba(0,0,0,.38);
    }
    .isl-filter-pane.open > * { width: 100%; }
    .isl-filter-pane.open .isl-dd-panel { position: static; width: 100%; max-width: none; box-shadow: none; margin-top: 8px; }
    .inventory-primary-pill,
    .owner-filter-pill { display: inline-flex; flex-flow: row nowrap; }
    .owner-filter-row { position: relative; top: auto; right: auto; bottom: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .isl-page-title, .isl-global-dropdown.open, .isl-menu-dropdown.open { animation: none; }
    .isl-hamburger, .isl-menu-btn, .isl-hamburger span, .isl-menu-bar { transition: none; }
}

/* Light-theme contrast audit: shared across every SubGradedCards screen. */
[data-theme="light"] {
    --muted: #3f4f66;
    --rule: #69788c;
    --rule-dark: #253b5c;
    --store-muted: #3f526d;
    --store-line: #263f65;
    --dealer-muted: #465a74;
    --dealer-line: #324d73;
}
[data-theme="light"] .isl-brand .b-secondary { color: #3d4b60; }
[data-theme="light"] .isl-nav-x-icon,
[data-theme="light"] .isl-family-mark { color: #203959; border-color: rgba(8,29,59,.42); }
[data-theme="light"] .isl-nav-x-icon svg,
[data-theme="light"] .isl-footer-x-icon svg { fill: #203959; }
[data-theme="light"] .isl-link { color: #43536b; }
[data-theme="light"] .isl-link:hover,
[data-theme="light"] .isl-link.active-link { color: #07152c; }
[data-theme="light"] .isl-theme-switch { border-color: rgba(8,29,59,.48); }
[data-theme="light"] :where(input,select,textarea) { border-color: rgba(8,29,59,.43); }
[data-theme="light"] :where(input,select,textarea)::placeholder { color: #5b6a7e; opacity: 1; }

/* All primary card surfaces receive the same one-pixel navy keyline. */
[data-theme="light"] :where(
    .sg-home-quick,.sg-home-promise-grid article,.sg-home-card,.sg-home-review,
    .sg-member-card,.sg-profile-details,.sg-activity-card,.sg-account-summary article,
    .login-card,.registration-card,.epm-card,.epm-action,.epm-note,.epm-muted-card,
    .inventory-overview>div,.isl-filter-shell,.inventory-table-wrap,.inventory-table-section,.owner-filter-pill,
    .oc2-filter-shell,.oc2-user-card,.oc2-owner-intro,.oc2-owner-slot,.oc2-audit,
    .sg-account-card,.store-order-history article,.report-metric-grid>div,
    .intake-summary div,.intake-actions>*,.history,.import-result,
    .about-pillar,.operations-event-row,.wide-data-gate,
    .marketplace-feature-empty,.marketplace-deals-heading,.marketplace-deal-card,
    .store-product-card,.store-purchase-panel,.store-order-summary,.store-checkout-form,.store-confirmation
) { border-color: #263f65 !important; }

/* Homepage hard-coded dark-theme colors need explicit light equivalents. */
[data-theme="light"] .sg-home-kicker { color: #34577f; }
[data-theme="light"] .sg-home-window-bar { color: #40536d; border-bottom-color: rgba(8,29,59,.28); }
[data-theme="light"] .sg-home-window-bar i { background: #385578; }
[data-theme="light"] .sg-home-quick-header small,
[data-theme="light"] .sg-home-quick>p,
[data-theme="light"] .sg-home-quick-links small,
[data-theme="light"] .sg-home-promise-grid p,
[data-theme="light"] .sg-home-section-heading>span,
[data-theme="light"] .sg-home-card p,
[data-theme="light"] .sg-home-compact-empty>p,
[data-theme="light"] .sg-home-review footer span { color: #40536d; }
[data-theme="light"] .sg-home-quick-header>span { color: #17365f; border-color: #415d80; }
[data-theme="light"] .sg-home-quick-links a { border-color: rgba(8,29,59,.28); background: rgba(8,29,59,.035); }
[data-theme="light"] .sg-home-promise-grid article>span { color: #173a67; border-color: #36577e; background: rgba(19,52,91,.055); }
[data-theme="light"] .sg-home-review-stars { color: #294d78; }
[data-theme="light"] .sg-home-compact-empty { border-left-color: #173a67; background: rgba(247,249,250,.93); }
[data-theme="light"] .sg-home-fresh { background: rgba(255,255,255,.16); border-color: rgba(8,29,59,.22); }

/* Account, inventory, and owner-console symbols remain legible on silver. */
[data-theme="light"] :where(.sg-activity-card>header svg,.sg-member-location svg,.epm-action-icon,.epm-section-icon,.inventory-section-chevron,.multiple-player-trigger::after) { color: #173a67; fill: #173a67; }
[data-theme="light"] .sg-dashboard-notice { color: #14542d; background: rgba(31,128,62,.12); border-color: #267440; }
[data-theme="light"] .login-alert-success,
[data-theme="light"] .epm-notice.success { color: #14542d; border-color: #267440; background: rgba(31,128,62,.1); }
[data-theme="light"] .login-alert-error,
[data-theme="light"] .login-card .text-danger,
[data-theme="light"] .registration-field .field-validation-error,
[data-theme="light"] .registration-consent-error.field-validation-error,
[data-theme="light"] .registration-alert,
[data-theme="light"] .epm-notice.danger { color: #8d1721 !important; border-color: #a82d38; background: rgba(178,47,58,.09); }
[data-theme="light"] .registration-card .sg-password-meter-head strong,
[data-theme="light"] .registration-card .sg-password-rules span { color: #43536a; }
[data-theme="light"] .registration-card .sg-password-rules i { background: #52637a; }
[data-theme="light"] .oc2-state.active { color: #14542d; border-color: #267440; background: rgba(31,128,62,.1); }
[data-theme="light"] .oc2-state.inactive { color: #8d1721; border-color: #a82d38; }
[data-theme="light"] .oc2-role.member { color: #103d70; background: rgba(30,91,155,.12); }
[data-theme="light"] .oc2-self-pill { color: #14542d; border-color: #267440; }
[data-theme="light"] .inventory-table th button,
[data-theme="light"] .inventory-table td,
[data-theme="light"] .inventory-player-cell small,
[data-theme="light"] .inventory-section-heading small { color: #344a67; }

/* Legacy operational pages now sit on the shared brushed board, not flat gray. */
[data-theme="light"] .catalog-manager-page { background-color: transparent; }
[data-theme="light"] :where(.dealer-kpi,.dealer-card-row,.dealer-form-section,.intake-summary div,.intake-actions>*,.history,.import-result,.store-order-history article,.report-metric-grid>div) {
    color: #10213b; background: rgba(249,250,251,.97);
}
[data-theme="light"] :where(.dealer-catalog-hero p,.dealer-editor-header p,.dealer-card-meta,.dealer-field small,.report-metric-grid span,.report-metric-grid small,.store-order-history span,.store-order-history p) { color: #40536d; }
[data-theme="light"] .wide-data-gate svg { color: #173a67; fill: #173a67; }
/* Footer readability: the wallpaper runs behind it, so give the bar its own opaque
   surface and darken the type rather than relying on the background staying pale. */
[data-theme="light"] .isl-footer {
    background: linear-gradient(180deg, rgba(238,240,243,.72), rgba(232,235,239,.96));
    border-top: 1px solid rgba(23, 45, 80, .18);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
[data-theme="light"] .isl-footer-copy { color: #45566d; }
[data-theme="light"] .isl-footer-link,
[data-theme="light"] .isl-footer-x-icon { color: #22364f; font-weight: 800; }
[data-theme="light"] .isl-footer-link:hover,
[data-theme="light"] .isl-footer-x-icon:hover { color: #0d1f3a; }
[data-theme="light"] .isl-footer-link-donate {
    color: #14294a; border-color: rgba(23, 45, 80, .38); background: rgba(255,255,255,.6);
}
[data-theme="light"] .isl-footer-link-donate:hover { color: #0d1f3a; background: #fff; border-color: #14294a; }
