/* The home screen is a portal into the evening; the rest of the app stays readable and calm. */
.eldritch-home {
    --eldritch-ink: #0c0717;
    --eldritch-deep: #180c2c;
    --eldritch-violet: #864ee8;
    --eldritch-aqua: #69f4d2;
    --eldritch-rose: #f05eaa;
    --eldritch-paper: #f5edff;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 7rem);
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: clamp(1rem, 3vw, 2.25rem) !important;
    color: var(--eldritch-paper);
    border: 1px solid rgba(139, 84, 236, .5);
    border-radius: 28px;
    background:
        radial-gradient(circle at 94% 8%, rgba(105, 244, 210, .16), transparent 21rem),
        radial-gradient(circle at 0% 100%, rgba(240, 94, 170, .2), transparent 27rem),
        linear-gradient(145deg, #0b0713 0%, #1c0e36 48%, #090c22 100%);
    box-shadow: 0 30px 70px rgba(15, 4, 31, .34), inset 0 0 0 1px rgba(255, 255, 255, .035);
}

.eldritch-home::before,
.eldritch-home::after {
    position: absolute;
    z-index: 0;
    color: rgba(105, 244, 210, .06);
    font-family: Georgia, serif;
    font-size: clamp(5rem, 15vw, 12rem);
    line-height: 1;
    pointer-events: none;
    content: "☾";
}

.eldritch-home::before {
    top: -1rem;
    right: 1rem;
    transform: rotate(-14deg);
}

.eldritch-home::after {
    bottom: -1.5rem;
    left: 1rem;
    color: rgba(240, 94, 170, .055);
    content: "✦";
}

.eldritch-home > * {
    position: relative;
    z-index: 1;
}

.eldritch-loading {
    min-height: 56vh;
    color: var(--eldritch-paper);
}

.eldritch-hero {
    position: relative;
    overflow: hidden;
    min-height: 19rem;
    margin-bottom: 1.5rem;
    padding: clamp(1.5rem, 5vw, 3.75rem);
    border: 1px solid rgba(105, 244, 210, .25);
    border-radius: 22px;
    background:
        linear-gradient(105deg, rgba(8, 6, 18, .92) 0%, rgba(23, 8, 48, .78) 58%, rgba(16, 20, 56, .61) 100%),
        radial-gradient(circle at 75% 45%, rgba(105, 244, 210, .35), transparent 11rem);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 18px 40px rgba(0, 0, 0, .26);
}

.eldritch-orb {
    position: absolute;
    top: 50%;
    right: 8%;
    width: clamp(8rem, 22vw, 16rem);
    aspect-ratio: 1;
    border: 1px solid rgba(236, 255, 249, .74);
    border-radius: 50%;
    background:
        radial-gradient(circle at 36% 29%, #f2ffdf 0 3%, #b7ffe7 12%, #69f4d2 28%, #9366ef 51%, #321854 72%, rgba(12, 7, 23, 0) 73%);
    box-shadow: 0 0 35px rgba(105, 244, 210, .42), 0 0 115px rgba(134, 78, 232, .48), inset -18px -14px 34px rgba(8, 3, 20, .68);
    transform: translateY(-50%);
}

.eldritch-orb::before,
.eldritch-orb::after {
    position: absolute;
    inset: -12%;
    border: 1px solid rgba(240, 94, 170, .3);
    border-radius: 48% 52% 43% 57%;
    content: "";
    transform: rotate(28deg);
}

.eldritch-orb::after {
    inset: -22%;
    border-color: rgba(105, 244, 210, .2);
    transform: rotate(-21deg);
}

.eldritch-hero-content {
    position: relative;
    z-index: 1;
    max-width: min(45rem, 68%);
}

.eldritch-kicker.mud-chip {
    width: fit-content;
    color: var(--eldritch-aqua) !important;
    border-color: rgba(105, 244, 210, .52) !important;
    background: rgba(105, 244, 210, .07) !important;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.eldritch-title {
    color: var(--eldritch-paper) !important;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700 !important;
    letter-spacing: .02em;
    text-shadow: 0 3px 23px rgba(134, 78, 232, .8);
}

.eldritch-lead {
    color: var(--eldritch-aqua) !important;
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
}

.eldritch-copy {
    max-width: 38rem;
    color: rgba(245, 237, 255, .78) !important;
}

.eldritch-primary-action.mud-button-filled {
    color: #160826 !important;
    background: linear-gradient(135deg, #77fbd8, #a67bff 52%, #f077b8) !important;
    box-shadow: 0 9px 24px rgba(105, 244, 210, .22), inset 0 1px 0 rgba(255, 255, 255, .45);
    font-weight: 800;
}

.eldritch-secondary-action.mud-button-outlined {
    color: var(--eldritch-paper) !important;
    border-color: rgba(245, 237, 255, .48) !important;
    background: rgba(8, 4, 21, .18);
}

.eldritch-grid .eldritch-card {
    overflow: hidden;
    color: var(--eldritch-paper);
    border: 1px solid rgba(166, 123, 255, .28);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(33, 16, 60, .92), rgba(11, 10, 31, .94)) !important;
    box-shadow: 0 16px 32px rgba(0, 0, 0, .19), inset 0 1px 0 rgba(255, 255, 255, .05);
}

.eldritch-grid .eldritch-card .mud-card-header {
    border-bottom: 1px solid rgba(105, 244, 210, .16);
    background: linear-gradient(90deg, rgba(105, 244, 210, .09), transparent 68%);
}

.eldritch-grid .mud-typography {
    color: inherit;
}

.eldritch-grid .mud-typography-caption,
.eldritch-grid .mud-typography-body2 {
    color: rgba(245, 237, 255, .7);
}

.eldritch-evening-row,
.eldritch-empty-state {
    color: var(--eldritch-paper);
    border-color: rgba(105, 244, 210, .25) !important;
    background: rgba(5, 6, 22, .36) !important;
}

.eldritch-evening-row {
    transition: transform .16s ease, border-color .16s ease;
}

.eldritch-evening-row:hover {
    border-color: rgba(105, 244, 210, .55) !important;
    transform: translateX(3px);
}

.eldritch-empty-state {
    display: grid;
    gap: .5rem;
    place-items: center;
    text-align: center;
}

.eldritch-count-chip.mud-chip {
    color: #19092c !important;
    border: 1px solid rgba(255, 255, 255, .58);
    background: linear-gradient(135deg, #72f4d5, #c18cff) !important;
    font-weight: 800;
}

.eldritch-stat-card {
    background:
        radial-gradient(circle at 85% 20%, rgba(240, 94, 170, .25), transparent 9rem),
        linear-gradient(145deg, rgba(75, 26, 93, .94), rgba(15, 11, 40, .96)) !important;
}

.eldritch-stat-number {
    color: var(--eldritch-aqua) !important;
    font-family: Georgia, "Times New Roman", serif;
    text-shadow: 0 0 20px rgba(105, 244, 210, .36);
}

.eldritch-ritual-card {
    background:
        linear-gradient(145deg, rgba(12, 30, 56, .95), rgba(19, 12, 42, .96)) !important;
}

.eldritch-quiet-card {
    border-color: rgba(240, 94, 170, .24) !important;
    background: linear-gradient(145deg, rgba(55, 16, 47, .88), rgba(20, 9, 35, .96)) !important;
}

@media (max-width: 700px) {
    .eldritch-home {
        margin: .5rem;
        padding: 1rem !important;
        border-radius: 20px;
    }

    .eldritch-hero {
        min-height: 0;
        padding: 1.4rem;
    }

    .eldritch-hero-content {
        max-width: 100%;
    }

    .eldritch-orb {
        top: 20%;
        right: -2rem;
        width: 9rem;
        opacity: .62;
    }
}

@media (prefers-reduced-motion: reduce) {
    .eldritch-evening-row {
        transition: none;
    }
}
