:root {
    --lyutils-void: #0d1424;
    --lyutils-card-border: rgba(42, 138, 170, 0.4);
    --lyutils-card-fill-top: rgba(30, 50, 76, 0.9);
    --lyutils-card-fill-bottom: rgba(16, 28, 46, 0.94);
    --lyutils-ice: #8adcf4;
    --lyutils-cyan: #5ec8ea;
    --lyutils-logo: #6ba8ff;
    --lyutils-logo-hover: #93c0ff;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scrollbar-gutter: stable;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--lyutils-void);
    color: #e8e8e8;
}

/* iOS Safari auto-links long numbers as phone numbers */
a[x-apple-data-detectors],
a[href^="tel:"] {
    color: inherit !important;
    text-decoration: none !important;
}

body:not(.lyutils-capture):not(.lyutils-welcome)::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--lyutils-void);
    background-image:
        radial-gradient(ellipse 80% 42% at 50% -8%, rgba(42, 138, 170, 0.18), transparent 62%),
        radial-gradient(ellipse 36% 28% at 108% 92%, rgba(42, 138, 170, 0.12), transparent 58%),
        radial-gradient(ellipse 32% 24% at -8% 78%, rgba(42, 138, 170, 0.08), transparent 55%),
        url("../images/home-void.d5cdde1fa924.svg");
    background-size: auto, auto, auto, 42rem 42rem;
    background-position: center, center, center, 0 0;
    background-repeat: no-repeat, no-repeat, no-repeat, repeat;
}

.lyutils-mark {
    display: block;
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(107, 168, 255, 0.35);
}

.page-content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.page-content--upper {
    align-items: flex-start;
    justify-content: center;
    padding-top: 3.25rem;
    padding-bottom: 2rem;
}

@media (max-width: 640px) {
    .page-content {
        padding: 1rem 0.75rem;
    }

    .page-content--upper {
        padding-top: 1rem;
        padding-bottom: 1.25rem;
    }
}

.site-footer {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1.25rem;
    width: 100%;
    padding: 0.75rem 1.5rem;
    overflow: visible;
    background: rgba(0, 0, 0, 0.25);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.site-footer::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.site-footer > * {
    position: relative;
    z-index: 1;
}

.site-footer__disclaimer {
    color: #8a8a9a;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
    margin: 0;
    min-width: 0;
    justify-self: center;
}

.site-footer__disclaimer:only-child {
    grid-column: 1 / -1;
}

.site-footer__social {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    justify-self: start;
}

.site-footer__discord-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.site-footer__discord {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #a5b4fc;
    font: inherit;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s, background 0.2s;
}

.site-footer__discord:hover,
.site-footer__discord-menu--open .site-footer__discord {
    color: #c7d2fe;
    background: rgba(255, 255, 255, 0.08);
}

.site-footer__discord-dropdown {
    position: absolute;
    bottom: calc(100% + 0.4rem);
    left: 0;
    min-width: 15.5rem;
    max-width: min(18.5rem, calc(100vw - 2rem));
    padding: 0.375rem;
    background: rgba(26, 26, 46, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    z-index: 80;
}

.site-footer__discord-menu--open .site-footer__discord-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.site-footer__discord-item {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    color: #e8e8e8;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    transition: background 0.15s;
}

.site-footer__discord-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.site-footer__donate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    color: #f87171;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    justify-self: end;
    transition: color 0.2s;
}

.site-footer__donate:hover {
    color: #fca5a5;
}

.site-footer__donate:hover .donate-icon--footer {
    animation: donate-icon-wiggle 0.55s ease;
}

@media (min-width: 960px) {
    .site-footer__disclaimer {
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .site-footer {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: center;
        gap: 0.45rem 0.75rem;
        padding:
            0.65rem
            max(0.75rem, env(safe-area-inset-right, 0px))
            max(0.65rem, env(safe-area-inset-bottom, 0px))
            max(0.75rem, env(safe-area-inset-left, 0px));
    }

    .site-footer__disclaimer {
        order: 1;
        grid-column: 1 / -1;
        text-align: center;
        font-size: 0.7rem;
        line-height: 1.35;
        white-space: normal;
    }

    .site-footer__social {
        order: 2;
        justify-self: start;
        gap: 0.65rem;
    }

    .site-footer__donate {
        order: 2;
        justify-self: end;
        font-size: 0.72rem;
    }
}

.donate-icon {
    display: block;
    flex-shrink: 0;
    color: currentColor;
}

.donate-icon--footer {
    width: 1.35rem;
    height: 1.35rem;
}

.discord-icon {
    display: block;
    flex-shrink: 0;
    color: currentColor;
}

.discord-icon--footer {
    width: 1.1rem;
    height: 1.1rem;
}

@keyframes donate-icon-wiggle {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-10deg) translateY(-1px); }
    55% { transform: rotate(8deg) translateY(-2px); }
    75% { transform: rotate(-4deg) translateY(0); }
}

.site-footer p {
    color: #8a8a9a;
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

.card,
.content-card {
    padding: 3rem 2.5rem;
    background: linear-gradient(
        180deg,
        var(--lyutils-card-fill-top) 0%,
        var(--lyutils-card-fill-bottom) 100%
    );
    border: 1px solid var(--lyutils-card-border);
    border-radius: 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.card {
    text-align: center;
    width: 90%;
}

.content-card {
    text-align: left;
    width: 100%;
    max-width: none;
    padding: 2rem 1.75rem;
}

/* Guide chapter tiles — in base.css so they render even if guide.css is missing/stale. */
.guide-chapter-card {
    width: 100%;
    max-width: none;
    text-align: left;
    padding: 2rem 1.75rem;
    background: linear-gradient(
        180deg,
        var(--lyutils-card-fill-top) 0%,
        var(--lyutils-card-fill-bottom) 100%
    );
    border: 1px solid var(--lyutils-card-border);
    border-radius: 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.guide-chapter-card > .guide-chapter__title {
    text-align: center;
}
