/* ═══════════════════════════════════════════════════════════════════════════
   Max Chroma Store — Chroma Conductor hub/webstore layer
   Dark, precise, instrument-maker aesthetic. Green is equity, growth, go.
   Mono for prices/versions, sans for everything else.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --st-bg: #0b0e10;
    --st-surface: #12161a;
    --st-surface-2: #171d22;
    --st-hover: #1d242b;
    --st-border: #232b32;
    --st-border-bright: #313b44;

    --st-green: #3ddc84;
    --st-green-bright: #52f39a;
    --st-green-dim: #23945a;
    --st-green-glow: rgba(61, 220, 132, 0.22);

    --st-amber: #e8b04b;
    --st-cyan: #4bd0e8;

    --st-text: #e9eef1;
    --st-text-dim: #9aa6ae;
    --st-text-faint: #5e6a72;

    --st-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', Consolas, 'Courier New', monospace;
}

/* ─── Viewport mode wiring (extends hub-shell.css mode system) ───────────── */

#store-container {
    display: none;
    position: absolute;
    inset: 0;
    flex-direction: column;
    background:
        radial-gradient(1200px 500px at 70% -10%, rgba(61, 220, 132, 0.05), transparent 60%),
        var(--st-bg);
    color: var(--st-text);
    overflow: hidden;
}

#hub-viewport.mode-store #store-container { display: flex; }
#hub-viewport.mode-store #composer-container { display: none; }
#hub-viewport.mode-store #applet-container { display: none; }

/* ─── Sidebar hub nav ─────────────────────────────────────────────────────── */

.hub-nav {
    padding: 10px 12px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hub-nav-title {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--cc-text-muted, #6b6580);
    padding: 2px 6px 6px;
}

.hub-nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--cc-text-secondary, #9b96b0);
    font-family: inherit;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.hub-nav-btn:hover {
    background: var(--st-hover);
    color: var(--st-text);
}

.hub-nav-btn.active {
    background: rgba(61, 220, 132, 0.1);
    border-color: rgba(61, 220, 132, 0.35);
    color: var(--st-green);
}

.hub-nav-btn .hub-nav-glyph {
    width: 16px;
    text-align: center;
    opacity: 0.9;
}

/* ─── Top bar ─────────────────────────────────────────────────────────────── */

#store-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--st-border);
    background: rgba(11, 14, 16, 0.9);
    backdrop-filter: blur(12px);
    z-index: 5;
}

.store-brand {
    display: flex;
    align-items: baseline;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.store-brand-max {
    font-weight: 700;
    letter-spacing: 2.5px;
    font-size: 13px;
    color: var(--st-text);
}

.store-brand-sub {
    font-family: var(--st-mono);
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--st-green);
    border: 1px solid var(--st-green-dim);
    border-radius: 3px;
    padding: 1px 5px;
}

#store-search {
    flex: 1;
    max-width: 340px;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 6px;
    color: var(--st-text);
    font-family: inherit;
    font-size: 12.5px;
    padding: 7px 12px;
    outline: none;
    transition: border-color 0.15s;
}

#store-search:focus { border-color: var(--st-green-dim); }
#store-search::placeholder { color: var(--st-text-faint); }

#topbar-equity { margin-left: auto; cursor: pointer; }
#topbar-equity .equity-gauge-mini { min-width: 150px; }

.topbar-signin,
.topbar-user {
    background: var(--st-surface-2);
    border: 1px solid var(--st-border-bright);
    border-radius: 6px;
    color: var(--st-text);
    font-family: inherit;
    font-size: 12.5px;
    padding: 7px 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-signin:hover, .topbar-user:hover { border-color: var(--st-green-dim); }
.topbar-signin { border-color: var(--st-green-dim); color: var(--st-green); }

/* ─── Scrolling view ──────────────────────────────────────────────────────── */

#store-view {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px 64px;
    scrollbar-width: thin;
    scrollbar-color: var(--st-border-bright) transparent;
}

#store-view::-webkit-scrollbar { width: 10px; }
#store-view::-webkit-scrollbar-thumb { background: var(--st-border-bright); border-radius: 5px; }
#store-view::-webkit-scrollbar-track { background: transparent; }

.store-loading,
.store-empty {
    color: var(--st-text-faint);
    padding: 60px 0;
    text-align: center;
    font-size: 13px;
}

.store-muted { color: var(--st-text-dim); }
.mono { font-family: var(--st-mono); font-size: 12px; }

.store-localnote {
    font-family: var(--st-mono);
    font-size: 11px;
    color: var(--st-amber);
    border: 1px dashed rgba(232, 176, 75, 0.4);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 20px;
}

/* ─── Hero ────────────────────────────────────────────────────────────────── */

.store-hero { max-width: 720px; margin-bottom: 32px; }

.store-hero-eyebrow {
    font-family: var(--st-mono);
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--st-green);
    margin-bottom: 10px;
}

.store-hero h1 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.store-hero-sub {
    color: var(--st-text-dim);
    font-size: 14px;
    line-height: 1.65;
    max-width: 560px;
}

.store-section-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--st-text-faint);
    margin: 36px 0 14px;
}

.store-page-header { max-width: 720px; margin-bottom: 24px; }
.store-page-header h1 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.store-page-header p { color: var(--st-text-dim); font-size: 13.5px; line-height: 1.6; }

/* ─── Equity gauge ────────────────────────────────────────────────────────── */

.equity-gauge { display: flex; flex-direction: column; gap: 5px; }
.equity-gauge-mini { gap: 3px; }

.equity-gauge-track {
    position: relative;
    height: 10px;
    border-radius: 5px;
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    overflow: hidden;
}

.equity-gauge-full .equity-gauge-track { height: 16px; border-radius: 8px; }
.equity-gauge-mini .equity-gauge-track { height: 7px; }

.equity-gauge-fill {
    position: absolute;
    inset: 0 auto 0 0;
    background: linear-gradient(90deg, var(--st-green-dim), var(--st-green) 70%, var(--st-green-bright));
    border-radius: inherit;
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 0 12px var(--st-green-glow);
}

.equity-gauge-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
    transform: translateX(-100%);
    pointer-events: none;
}

.equity-gauge.unlocked .equity-gauge-shine {
    animation: gauge-shine 2.8s ease-in-out infinite;
}

@keyframes gauge-shine {
    0% { transform: translateX(-100%); }
    55%, 100% { transform: translateX(100%); }
}

.equity-gauge-readout {
    display: flex;
    justify-content: space-between;
    font-family: var(--st-mono);
    font-size: 12px;
    color: var(--st-text-dim);
}

.equity-gauge-mini .equity-gauge-readout { font-size: 10.5px; }
.equity-gauge-amount { color: var(--st-green); font-weight: 600; }

.equity-gauge-owner {
    font-family: var(--st-mono);
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--st-green-bright);
    text-shadow: 0 0 14px var(--st-green-glow);
}

.equity-gauge-full .equity-gauge-owner { font-size: 13px; }

/* ─── Equity strip ────────────────────────────────────────────────────────── */

.equity-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    background: linear-gradient(120deg, rgba(61, 220, 132, 0.07), rgba(61, 220, 132, 0.02) 60%), var(--st-surface);
    border: 1px solid rgba(61, 220, 132, 0.25);
    border-radius: 10px;
    padding: 20px 24px;
    margin: 8px 0 8px;
}

.equity-strip.unlocked { border-color: var(--st-green); box-shadow: 0 0 30px var(--st-green-glow); }

.equity-strip-text h3 { font-size: 15px; margin-bottom: 5px; }
.equity-strip-text p { color: var(--st-text-dim); font-size: 12.5px; line-height: 1.55; max-width: 460px; }

.equity-strip-gauge {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 280px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.btn-primary,
.btn-secondary,
.btn-unlock-all {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 7px;
    padding: 10px 18px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--st-green);
    border: 1px solid var(--st-green);
    color: #06130c;
}

.btn-primary:hover { background: var(--st-green-bright); box-shadow: 0 0 18px var(--st-green-glow); }
.btn-primary:disabled { background: var(--st-surface-2); border-color: var(--st-border); color: var(--st-text-faint); cursor: default; box-shadow: none; }

.btn-secondary {
    background: transparent;
    border: 1px solid var(--st-border-bright);
    color: var(--st-text);
}

.btn-secondary:hover { border-color: var(--st-green-dim); color: var(--st-green); }

.btn-unlock-all {
    background: transparent;
    border: 1px solid var(--st-green);
    color: var(--st-green);
    font-family: var(--st-mono);
    letter-spacing: 0.5px;
}

.btn-unlock-all:hover { background: rgba(61, 220, 132, 0.12); box-shadow: 0 0 18px var(--st-green-glow); }

.btn-link {
    background: none;
    border: none;
    color: var(--st-green);
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ─── Filters ─────────────────────────────────────────────────────────────── */

.store-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-bottom: 18px;
}

.filter-group { display: flex; flex-wrap: wrap; gap: 6px; }

.filter-chip {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 999px;
    color: var(--st-text-dim);
    font-family: inherit;
    font-size: 11.5px;
    padding: 5px 12px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.filter-chip:hover { border-color: var(--st-border-bright); color: var(--st-text); }
.filter-chip.active { border-color: var(--st-green-dim); color: var(--st-green); background: rgba(61, 220, 132, 0.08); }

/* ─── Product grid + cards ────────────────────────────────────────────────── */

.product-grid,
.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 14px;
}

.featured-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.product-card {
    display: flex;
    flex-direction: column;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.product-card:hover {
    border-color: var(--st-border-bright);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.product-card.featured { border-color: rgba(61, 220, 132, 0.28); }
.product-card.featured:hover { border-color: var(--st-green-dim); box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 0 22px var(--st-green-glow); }

.product-thumb {
    height: 96px;
    background: var(--st-surface-2);
    border-bottom: 1px solid var(--st-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card.featured .product-thumb { height: 120px; }

.product-thumb-img { width: 100%; height: 100%; object-fit: cover; }

.product-thumb-glyph {
    font-size: 34px;
    color: hsl(var(--glyph-hue, 145), 65%, 62%);
    text-shadow: 0 0 26px hsla(var(--glyph-hue, 145), 80%, 55%, 0.45);
    user-select: none;
}

.product-thumb-glyph.large { font-size: 46px; }

.product-card-body {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 13px 15px 14px;
    flex: 1;
}

.product-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.product-name { font-size: 13.5px; font-weight: 600; }
.product-desc { color: var(--st-text-dim); font-size: 12px; line-height: 1.5; flex: 1; }

.product-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 3px;
}

.price-paid { font-family: var(--st-mono); font-weight: 700; font-size: 14px; color: var(--st-text); }
.price-paid.big { font-size: 26px; }
.price-free { font-family: var(--st-mono); font-weight: 600; font-size: 12.5px; color: var(--st-cyan); }
.price-pwyw { font-family: var(--st-mono); font-size: 11.5px; color: var(--st-amber); }

.equity-tick { font-family: var(--st-mono); font-size: 10.5px; color: var(--st-green); }
.owned-tick { font-family: var(--st-mono); font-size: 11px; color: var(--st-green); font-weight: 600; }

.badge {
    font-family: var(--st-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 3px;
    padding: 2px 6px;
    white-space: nowrap;
}

.badge-beta { color: var(--st-cyan); border: 1px solid rgba(75, 208, 232, 0.5); }
.badge-soon { color: var(--st-amber); border: 1px solid rgba(232, 176, 75, 0.5); }
.badge-update { color: #06130c; background: var(--st-green); }

/* ─── Detail overlay ──────────────────────────────────────────────────────── */

#store-detail {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 8, 0.72);
    backdrop-filter: blur(6px);
    z-index: 20;
    overflow-y: auto;
    padding: 40px 24px;
}

.detail-panel {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    background: var(--st-surface);
    border: 1px solid var(--st-border-bright);
    border-radius: 14px;
    padding: 32px 36px 40px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: detail-in 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes detail-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.detail-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: 1px solid var(--st-border);
    border-radius: 6px;
    color: var(--st-text-dim);
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.detail-close:hover { color: var(--st-text); border-color: var(--st-border-bright); }

.detail-header { display: flex; gap: 20px; align-items: center; margin-bottom: 20px; }

.detail-thumb {
    width: 84px;
    height: 84px;
    flex: none;
    border-radius: 12px;
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.detail-title h1 { font-size: 22px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.detail-meta { color: var(--st-text-faint); margin-top: 5px; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

.tag {
    font-family: var(--st-mono);
    font-size: 10px;
    color: var(--st-text-faint);
    border: 1px solid var(--st-border);
    border-radius: 3px;
    padding: 1px 6px;
}

.beta-callout {
    background: rgba(75, 208, 232, 0.07);
    border: 1px solid rgba(75, 208, 232, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 12.5px;
    line-height: 1.6;
    color: var(--st-text-dim);
    margin-bottom: 18px;
}

.detail-buy {
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-buy.owned { border-color: rgba(61, 220, 132, 0.35); }

.buy-price { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.buy-suggested { color: var(--st-text-faint); font-size: 11px; }
.buy-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.buy-note { color: var(--st-text-faint); font-size: 11.5px; line-height: 1.5; }

.pwyw-row { align-items: stretch; }

.pwyw-field {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--st-bg);
    border: 1px solid var(--st-border-bright);
    border-radius: 7px;
    padding: 0 10px;
    color: var(--st-green);
    font-weight: 700;
}

.pwyw-input {
    width: 80px;
    background: transparent;
    border: none;
    outline: none;
    color: var(--st-text);
    font-family: var(--st-mono);
    font-size: 15px;
    padding: 10px 2px;
}

.buy-unlock-row { display: flex; align-items: center; gap: 12px; }
.buy-or { color: var(--st-text-faint); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

.detail-body, .detail-changelog {
    color: var(--st-text-dim);
    font-size: 13.5px;
    line-height: 1.7;
}

.detail-body h2, .detail-changelog h3 { color: var(--st-text); font-size: 17px; margin: 18px 0 10px; }
.detail-body h3, .detail-body h4, .detail-changelog h4 { color: var(--st-text); font-size: 14px; margin: 16px 0 8px; }
.detail-body p, .detail-changelog p { margin-bottom: 10px; }
.detail-body ul, .detail-changelog ul { margin: 8px 0 12px 20px; }
.detail-body li, .detail-changelog li { margin-bottom: 4px; }
.detail-body strong { color: var(--st-text); }
.detail-body code, .detail-changelog code { font-family: var(--st-mono); font-size: 12px; background: var(--st-bg); border: 1px solid var(--st-border); border-radius: 3px; padding: 1px 5px; }
.detail-body a { color: var(--st-green); }

.detail-changelog {
    margin-top: 28px;
    border-top: 1px solid var(--st-border);
    padding-top: 18px;
}

/* ─── My Tools ────────────────────────────────────────────────────────────── */

.store-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    color: var(--st-text-dim);
    font-size: 12.5px;
}

.tool-list { display: flex; flex-direction: column; gap: 10px; }

.tool-row {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 12px 16px;
    transition: border-color 0.15s;
}

.tool-row:hover { border-color: var(--st-border-bright); }

.tool-row-thumb {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 8px;
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tool-row-thumb .product-thumb-glyph { font-size: 24px; }

.tool-row-info { flex: 1; min-width: 0; }
.tool-row-name { font-size: 13.5px; font-weight: 600; display: flex; gap: 8px; align-items: center; }

.tool-row-version {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.tool-row-version code {
    font-family: var(--st-mono);
    font-size: 11px;
    color: var(--st-text-faint);
}

.tool-current { font-family: var(--st-mono); font-size: 10px; color: var(--st-green-dim); }
.tool-row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.store-empty-state {
    text-align: center;
    padding: 70px 0;
    color: var(--st-text-dim);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.store-empty-glyph { font-size: 42px; color: var(--st-text-faint); }

/* ─── Account ─────────────────────────────────────────────────────────────── */

.account-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.account-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 14px;
}

.account-grid .account-card { margin-bottom: 0; }

.account-card h3 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--st-text-faint);
    margin-bottom: 14px;
}

.account-name { font-size: 16px; font-weight: 600; }
.account-email { color: var(--st-text-dim); margin-top: 3px; }
.account-meta { color: var(--st-text-faint); font-size: 11.5px; margin-top: 6px; }
.account-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

.equity-card .equity-explain { color: var(--st-text-dim); font-size: 12.5px; line-height: 1.55; margin-bottom: 14px; }
.account-unlock { margin-top: 14px; }

.account-owner-banner {
    font-family: var(--st-mono);
    font-size: 12px;
    letter-spacing: 0.5px;
    color: var(--st-green-bright);
    border: 1px solid var(--st-green);
    border-radius: 8px;
    padding: 12px 14px;
    box-shadow: 0 0 22px var(--st-green-glow);
}

.account-signin-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 10px;
    padding: 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.account-fineprint { color: var(--st-text-faint); font-size: 11px; margin-top: 6px; }

.history-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.history-table th {
    text-align: left;
    font-family: var(--st-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--st-text-faint);
    padding: 6px 10px;
    border-bottom: 1px solid var(--st-border);
}
.history-table td { padding: 9px 10px; border-bottom: 1px solid var(--st-border); }
.history-table tr:last-child td { border-bottom: none; }
.equity-cell { color: var(--st-green); }

/* ─── Ko-fi ───────────────────────────────────────────────────────────────── */

.kofi-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--st-surface);
    border: 1px dashed var(--st-border-bright);
    border-radius: 10px;
    padding: 18px 22px;
    margin-top: 32px;
}

.kofi-text h3 { font-size: 13px; margin-bottom: 6px; }
.kofi-text p { color: var(--st-text-dim); font-size: 12px; line-height: 1.6; max-width: 560px; }
.kofi-text strong { color: var(--st-text); }

.kofi-btn {
    flex: none;
    background: transparent;
    border: 1px solid var(--st-border-bright);
    border-radius: 7px;
    color: var(--st-text);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 18px;
    text-decoration: none;
    transition: border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.kofi-btn:hover { border-color: #ff5e5b; color: #ff8a88; }

/* ─── Connectivity chip (the offline/online line) ─────────────────────────── */

.net-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--st-surface);
    border: 1px solid var(--st-border);
    border-radius: 999px;
    color: var(--st-text-dim);
    font-family: var(--st-mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 5px 11px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.net-chip:hover { border-color: var(--st-border-bright); color: var(--st-text); }
.net-chip .net-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.net-chip.online { color: var(--st-green); border-color: rgba(61, 220, 132, 0.3); }
.net-chip.offline { color: var(--st-amber); border-color: rgba(232, 176, 75, 0.4); }
.net-chip.dropped { color: var(--st-text-faint); cursor: default; }

/* ─── Quiet nav badge — the entire notification surface ───────────────────── */

.nav-badge {
    margin-left: auto;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 9px;
    background: rgba(61, 220, 132, 0.15);
    border: 1px solid rgba(61, 220, 132, 0.45);
    color: var(--st-green);
    font-family: var(--st-mono);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ─── Digest ──────────────────────────────────────────────────────────────── */

.digest-card {
    background: var(--st-surface);
    border: 1px solid var(--st-border-bright);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 22px;
}

.digest-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.digest-head h3 { font-size: 14.5px; margin-bottom: 4px; }
.digest-head .store-muted { font-size: 11.5px; line-height: 1.5; }
.digest-head .btn-secondary { flex: none; padding: 7px 13px; font-size: 11.5px; }

.digest-group { margin-top: 14px; border-top: 1px solid var(--st-border); }

.digest-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--st-border);
}

.digest-row:last-child { border-bottom: none; }
.digest-name { flex: 1; font-size: 12.5px; font-weight: 600; min-width: 0; }
.digest-ver { color: var(--st-text-faint); font-size: 11px; white-space: nowrap; }
.digest-row .btn-secondary { padding: 6px 12px; font-size: 11.5px; }

.digest-skip {
    background: none;
    border: none;
    color: var(--st-text-faint);
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 6px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.digest-skip:hover { color: var(--st-text-dim); }

/* ─── App update notice (Conductor itself) ────────────────────────────────── */

.app-update-notice {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--st-surface);
    border: 1px solid rgba(75, 208, 232, 0.35);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.app-update-tag {
    flex: none;
    font-family: var(--st-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--st-cyan);
    border: 1px solid rgba(75, 208, 232, 0.45);
    border-radius: 3px;
    padding: 2px 6px;
}

.app-update-body { flex: 1; min-width: 0; }
.app-update-title { font-size: 13px; font-weight: 600; }
.app-update-cur { color: var(--st-text-faint); font-weight: 400; }
.app-update-notes { color: var(--st-text-dim); font-size: 12px; line-height: 1.5; margin-top: 4px; }
.app-update-how { color: var(--st-text-faint); font-size: 11px; margin-top: 5px; }

.offline-portal-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    background: var(--st-surface);
    border: 1px dashed rgba(232, 176, 75, 0.45);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
    color: var(--st-text-dim);
    font-size: 12.5px;
    line-height: 1.55;
}

.offline-portal-note strong { color: var(--st-text); }

/* ─── Preferences ─────────────────────────────────────────────────────────── */

.pref-block { margin-bottom: 20px; }
.pref-block:last-of-type { margin-bottom: 8px; }

.pref-label {
    font-family: var(--st-mono);
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--st-text-faint);
    margin-bottom: 8px;
}

.pref-row { display: flex; align-items: center; gap: 14px; }
.pref-state { font-size: 13px; font-weight: 600; }
.pref-state.on { color: var(--st-green); }
.pref-state.off { color: var(--st-amber); }
.pref-note { color: var(--st-text-faint); font-size: 11.5px; line-height: 1.55; margin-top: 9px; }

.pref-modes { display: flex; gap: 8px; flex-wrap: wrap; }

.pref-mode {
    flex: 1;
    min-width: 170px;
    text-align: left;
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    border-radius: 8px;
    padding: 11px 13px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: inherit;
}

.pref-mode:hover { border-color: var(--st-border-bright); }
.pref-mode.active { border-color: var(--st-green-dim); background: rgba(61, 220, 132, 0.07); }
.pref-mode-label { font-size: 12.5px; font-weight: 600; color: var(--st-text); }
.pref-mode.active .pref-mode-label { color: var(--st-green); }
.pref-mode-desc { font-size: 11px; color: var(--st-text-dim); line-height: 1.45; }

/* ─── Live session banner ─────────────────────────────────────────────────── */

.live-banner {
    background: linear-gradient(120deg, rgba(255, 94, 91, 0.1), rgba(255, 94, 91, 0.02) 60%), var(--st-surface);
    border: 1px solid rgba(255, 94, 91, 0.4);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 22px;
}

.live-banner-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.live-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #ff5e5b;
    box-shadow: 0 0 0 0 rgba(255, 94, 91, 0.7);
    animation: live-pulse 1.8s infinite;
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 94, 91, 0.6); }
    70% { box-shadow: 0 0 0 10px rgba(255, 94, 91, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 94, 91, 0); }
}

.live-label {
    font-family: var(--st-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #ff8a88;
}

.live-title { font-size: 14px; font-weight: 600; }
.live-watch { margin-left: auto; padding: 7px 14px; font-size: 12px; }
.live-note { color: var(--st-text-dim); font-size: 12.5px; line-height: 1.55; margin-top: 8px; }

.live-embed {
    margin-top: 14px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--st-border);
    background: #000;
}

.live-embed iframe { width: 100%; height: 100%; border: none; display: block; }

/* ─── Admin draft bar ─────────────────────────────────────────────────────── */

.draft-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--st-surface);
    border: 1px dashed var(--st-amber);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 18px;
}

.draft-bar-label {
    font-family: var(--st-mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--st-amber);
    border: 1px solid rgba(232, 176, 75, 0.5);
    border-radius: 3px;
    padding: 2px 6px;
}

.draft-bar-text { flex: 1; font-size: 12px; color: var(--st-text-dim); }
.draft-bar .btn-secondary { padding: 6px 12px; font-size: 11.5px; }

.badge-draft { color: var(--st-amber); border: 1px solid rgba(232, 176, 75, 0.6); background: rgba(232, 176, 75, 0.1); }

.video-save-btn {
    margin-top: 9px;
    background: transparent;
    border: 1px solid var(--st-border-bright);
    border-radius: 5px;
    color: var(--st-text-dim);
    font-family: inherit;
    font-size: 11px;
    padding: 4px 10px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.video-save-btn:hover { border-color: var(--st-green-dim); color: var(--st-green); }

/* ─── Version chips & release history (only ever adding to) ───────────────── */

.version-label { font-size: 10.5px; color: var(--st-text-faint); text-transform: uppercase; letter-spacing: 0.8px; }

.version-chip {
    font-family: var(--st-mono);
    font-size: 10.5px;
    border-radius: 3px;
    padding: 1px 6px;
    border: 1px solid var(--st-border-bright);
    color: var(--st-text-dim);
}

.version-chip.held { border-color: rgba(61, 220, 132, 0.4); color: var(--st-green); }

.tool-row-note { color: var(--st-text-faint); font-size: 11px; margin-top: 5px; }

.detail-releases, .detail-videos {
    margin-top: 28px;
    border-top: 1px solid var(--st-border);
    padding-top: 18px;
}

.detail-releases h3, .detail-videos h3 {
    color: var(--st-text);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.detail-releases > .store-muted, .detail-videos > .store-muted { font-size: 12px; margin-bottom: 14px; line-height: 1.55; }

.release-list { display: flex; flex-direction: column; gap: 8px; }

.release-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 14px;
    align-items: center;
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    border-radius: 8px;
    padding: 12px 14px;
}

.release-main { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.release-ver { font-size: 13px; color: var(--st-text); font-weight: 600; }

.release-tag {
    font-family: var(--st-mono);
    font-size: 9.5px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 1px solid var(--st-border-bright);
    border-radius: 3px;
    padding: 1px 6px;
    color: var(--st-text-faint);
}

.release-tag.current { border-color: var(--st-green-dim); color: var(--st-green); }
.release-tag.held { border-color: rgba(75, 208, 232, 0.45); color: var(--st-cyan); }
.release-date { color: var(--st-text-faint); font-size: 11px; }

.release-notes {
    grid-column: 1 / -1;
    color: var(--st-text-dim);
    font-size: 12px;
    line-height: 1.55;
}

.release-notes p { margin: 0; }
.release-btn { padding: 7px 14px; font-size: 12px; }

/* ─── Videos ──────────────────────────────────────────────────────────────── */

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.video-card {
    background: var(--st-surface-2);
    border: 1px solid var(--st-border);
    border-radius: 9px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.15s;
}

.video-card:hover { border-color: var(--st-green-dim); transform: translateY(-2px); }
.video-card.locked { cursor: default; opacity: 0.6; }
.video-card.locked:hover { border-color: var(--st-border); transform: none; }

.video-card-thumb {
    position: relative;
    height: 112px;
    background: linear-gradient(135deg, #14191e, #0d1114);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--st-border);
}

.video-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-play-glyph { font-size: 26px; color: var(--st-green); text-shadow: 0 0 20px var(--st-green-glow); }

.video-duration {
    position: absolute;
    right: 7px;
    bottom: 7px;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 3px;
    padding: 1px 5px;
    font-size: 10px;
    color: var(--st-text);
}

.video-card-body { padding: 11px 13px 13px; }
.video-card-title { font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
.video-card-desc { color: var(--st-text-dim); font-size: 11.5px; line-height: 1.5; }
.video-card-ver { color: var(--st-text-faint); font-size: 10.5px; margin-top: 6px; }

.video-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(4, 6, 7, 0.86);
    backdrop-filter: blur(8px);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.video-modal {
    position: relative;
    width: 100%;
    max-width: 900px;
    background: var(--st-surface);
    border: 1px solid var(--st-border-bright);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--st-border-bright);
    border-radius: 6px;
    color: var(--st-text);
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.video-modal-stage {
    background: #000;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-stage video { width: 100%; height: 100%; }
.video-loading { color: var(--st-text-faint); font-size: 13px; }

.video-modal-meta { padding: 16px 20px 18px; }
.video-modal-meta h3 { font-size: 15px; margin-bottom: 5px; }
.video-modal-meta p { color: var(--st-text-dim); font-size: 12.5px; line-height: 1.55; }
.video-modal-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.video-modal-note { color: var(--st-text-faint); font-size: 11px; }

/* ─── Timeline (the online window) ────────────────────────────────────────── */

.timeline-waiting {
    background: var(--st-surface);
    border: 1px solid rgba(61, 220, 132, 0.3);
    border-radius: 10px;
    padding: 16px 18px;
    margin-bottom: 22px;
}

.timeline-waiting h3 { font-size: 13.5px; margin-bottom: 5px; }
.timeline-waiting > .store-muted { font-size: 11.5px; margin-bottom: 12px; }

.timeline-waiting-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border-top: 1px solid var(--st-border);
}

.timeline-waiting-name { flex: 1; font-size: 12.5px; font-weight: 600; }

.timeline-list { display: flex; flex-direction: column; gap: 2px; }

.timeline-entry {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--st-border);
}

.timeline-glyph {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: var(--st-surface-2);
    border: 1px solid var(--st-border-bright);
    color: var(--st-text-dim);
}

.timeline-glyph.timeline-release { color: var(--st-green); border-color: var(--st-green-dim); }
.timeline-glyph.timeline-video { color: var(--st-cyan); border-color: rgba(75, 208, 232, 0.45); }
.timeline-glyph.timeline-product { color: var(--st-amber); border-color: rgba(232, 176, 75, 0.45); }

.timeline-body { flex: 1; min-width: 0; }
.timeline-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 5px; }
.timeline-title { font-size: 13.5px; font-weight: 600; }
.timeline-date { color: var(--st-text-faint); margin-left: auto; font-size: 11px; }
.timeline-text { color: var(--st-text-dim); font-size: 12.5px; line-height: 1.6; }
.timeline-text p { margin-bottom: 6px; }
.timeline-text strong { color: var(--st-text); }
.timeline-refresh { margin-top: 22px; }

/* ─── Setup / connection panel ────────────────────────────────────────────── */

.setup-card .setup-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--st-border);
}

.setup-card .setup-row:last-of-type { border-bottom: none; }

.setup-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.setup-dot.ok { background: var(--st-green); box-shadow: 0 0 8px var(--st-green-glow); }
.setup-dot.off { background: var(--st-text-faint); }

.setup-label { font-size: 12.5px; min-width: 150px; }
.setup-detail { color: var(--st-text-faint); font-size: 11px; text-align: right; margin-left: auto; }

.kofi-actions { display: flex; gap: 8px; flex: none; }

/* ─── Auth modal ──────────────────────────────────────────────────────────── */

.auth-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 8, 0.75);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-modal {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--st-surface);
    border: 1px solid var(--st-border-bright);
    border-radius: 14px;
    padding: 30px 30px 24px;
    color: var(--st-text);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    animation: detail-in 0.2s cubic-bezier(0.22, 1, 0.36, 1);
    font-size: 13px;
}

.auth-modal h2 { font-size: 17px; margin-bottom: 8px; }
.auth-modal-reason { color: var(--st-text-dim); font-size: 12px; line-height: 1.5; margin-bottom: 14px; }

.auth-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    color: var(--st-text-faint);
    cursor: pointer;
    font-size: 13px;
}

.auth-google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--st-text);
    border: none;
    border-radius: 7px;
    color: #111;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 11px;
    cursor: pointer;
    margin-top: 10px;
}

.auth-google-btn:hover { background: #fff; }
.auth-google-mark { font-weight: 800; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--st-text-faint);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 16px 0 12px;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--st-border);
}

.auth-email-form { display: flex; flex-direction: column; gap: 9px; }

.auth-email-form input {
    background: var(--st-bg);
    border: 1px solid var(--st-border-bright);
    border-radius: 7px;
    color: var(--st-text);
    font-family: inherit;
    font-size: 13px;
    padding: 10px 12px;
    outline: none;
}

.auth-email-form input:focus { border-color: var(--st-green-dim); }

.auth-error { color: #ff7a76; font-size: 11.5px; }

.auth-email-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }

.auth-submit {
    background: var(--st-green);
    border: none;
    border-radius: 7px;
    color: #06130c;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 20px;
    cursor: pointer;
}

.auth-toggle {
    background: none;
    border: none;
    color: var(--st-text-faint);
    font-family: inherit;
    font-size: 11.5px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-toggle:hover { color: var(--st-text-dim); }
.auth-modal-fineprint { color: var(--st-text-faint); font-size: 10.5px; line-height: 1.5; margin-top: 16px; }

/* ─── Toasts ──────────────────────────────────────────────────────────────── */

#store-toasts {
    position: fixed;
    right: 20px;
    bottom: 56px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.store-toast {
    background: var(--st-surface-2);
    border: 1px solid var(--st-border-bright);
    border-left: 3px solid var(--st-text-faint);
    border-radius: 8px;
    color: var(--st-text);
    font-size: 12.5px;
    line-height: 1.5;
    padding: 11px 16px;
    max-width: 360px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s, transform 0.25s;
}

.store-toast.visible { opacity: 1; transform: none; }
.store-toast-success { border-left-color: var(--st-green); }
.store-toast-error { border-left-color: #ff5e5b; }

/* ─── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    #store-view { padding: 20px 16px 56px; }
    .store-hero h1 { font-size: 23px; }
    .equity-strip { flex-direction: column; align-items: stretch; }
    .equity-strip-gauge { min-width: 0; }
    #store-search { max-width: none; }
    #topbar-equity { display: none !important; }
    .detail-panel { padding: 24px 20px 32px; }
    .tool-row { flex-wrap: wrap; }
    .kofi-card { flex-direction: column; align-items: flex-start; }
}
