/* Base shell so pages stay readable even if Tailwind runtime is slow (e.g. file://) */
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Inter, system-ui, sans-serif;
    background: #fafafa;
    color: #52525b;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

html.dark body {
    background: #09090b;
    color: #d4d4d8;
}

.mkt-nav {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mkt-nav .max-w-7xl,
.auth-shell {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.auth-panel {
    box-sizing: border-box;
}

.auth-panel {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.sl-toast {
    position: fixed;
    left: 50%;
    bottom: 5.5rem;
    transform: translateX(-50%) translateY(12px);
    background: #18181b;
    color: #fafafa;
    padding: 0.75rem 1.1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 80;
    max-width: calc(100vw - 2rem);
    text-align: center;
}

html.light .sl-toast {
    background: #18181b;
    color: #fafafa;
}

.sl-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.sl-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: none;
    border-top: 1px solid rgba(24, 24, 27, 0.08);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
}

html.dark .sl-bottom-nav {
    border-top-color: rgba(255, 255, 255, 0.08);
    background: rgba(9, 9, 11, 0.92);
}

@media (max-width: 767px) {
    .sl-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 0.15rem;
    }

    body.has-bottom-nav {
        padding-bottom: calc(4.25rem + env(safe-area-inset-bottom));
    }
}

.sl-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    padding: 0.45rem 0.2rem;
    border-radius: 0.75rem;
    font-size: 0.65rem;
    color: #71717a;
    text-decoration: none;
}

.sl-bottom-nav a.active,
.sl-bottom-nav a:hover {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

html.dark .sl-bottom-nav a.active,
html.dark .sl-bottom-nav a:hover {
    color: #a5b4fc;
    background: rgba(99, 102, 241, 0.12);
}

.sl-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sl-reveal {
    opacity: 1;
    transform: none;
}

.sl-reveal.is-pending {
    opacity: 0;
    transform: translateY(12px);
}

.sl-reveal.in,
.sl-reveal.is-pending.in {
    opacity: 1;
    transform: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.site-footer {
    margin-top: auto;
    padding: 2.5rem 1rem;
    border-top: 1px solid rgba(24, 24, 27, 0.08);
    text-align: center;
    font-size: 0.75rem;
    color: #71717a;
}

html.dark .site-footer {
    border-top-color: rgba(255, 255, 255, 0.08);
}

.site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem 1.1rem;
    margin-bottom: 0.75rem;
}

.site-footer-links a {
    color: inherit;
    text-decoration: none;
}

.site-footer-links a:hover {
    color: #3f3f46;
}

html.dark .site-footer-links a:hover {
    color: #d4d4d8;
}

.sl-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(24, 24, 27, 0.1);
    font-size: 0.75rem;
    cursor: pointer;
    background: transparent;
    color: inherit;
}

html.dark .sl-chip {
    border-color: rgba(255, 255, 255, 0.1);
}

.sl-chip.active {
    background: #18181b;
    color: #fff;
    border-color: #18181b;
}

html.dark .sl-chip.active {
    background: #fafafa;
    color: #18181b;
    border-color: #fafafa;
}
