:root {
    --cream: #fff8dc;
    --gold: #e8c76b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'EB Garamond', 'Georgia', serif;
    color: var(--cream);
    background: url('background.jpg') center / cover fixed no-repeat;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(10, 6, 20, 0.55) 0%, rgba(6, 4, 14, 0.85) 100%);
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px 80px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ---------- Mute toggle ---------- */

.mute-toggle {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 30;
    width: 44px;
    height: 44px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    line-height: 1;
    background: rgba(20, 14, 30, 0.7);
    color: var(--cream);
    border: 1px solid var(--gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s ease, background 0.2s ease;
}

.mute-toggle:hover,
.mute-toggle:focus-visible {
    background: rgba(40, 28, 55, 0.85);
    transform: scale(1.08);
}

.mute-toggle.is-muted {
    color: rgba(255, 248, 220, 0.6);
}

/* ---------- Sparkle field ---------- */

.sparkle-field {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.sparkle-field .sparkle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--cream);
    box-shadow: 0 0 6px 1px var(--cream);
    opacity: 0;
    animation: twinkle 3.5s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0; transform: scale(0.4); }
    50% { opacity: 1; transform: scale(1.4); }
}

/* ---------- Header ---------- */

header h1 {
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-size: 5.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.1;
    text-shadow: 2px 2px 10px #000, 0 0 30px rgba(232, 199, 107, 0.35);
    letter-spacing: 1px;
}

header h2 {
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-size: 3.6rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 8px #000;
}

header h1,
header h2 {
    cursor: default;
}

.title-word {
    white-space: nowrap;
}

.drop-cap {
    font-size: 1.5em;
    font-weight: 900;
    line-height: 0.7;
    vertical-align: -0.1em;
}

/* Whimsical surprise: hovering the title kicks up a puff of star-dust,
   like a hidden spell catching the light. */

.dust-mote {
    position: fixed;
    left: 0;
    top: 0;
    color: var(--gold);
    text-shadow: 0 0 6px var(--gold);
    pointer-events: none;
    z-index: 20;
    animation: dust-burst 0.9s ease-out forwards;
}

@keyframes dust-burst {
    0% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) scale(0.15) rotate(200deg); opacity: 0; }
}

.flourish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin: 2px auto;
    max-width: 420px;
    color: var(--gold);
}

.flourish span {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.flourish i {
    font-style: normal;
    font-size: 1.1rem;
}

/* ---------- Ornament card ----------
   A bordered card with a delicate gold scroll flourish tucked into each
   corner (one drawing, mirrored into the other three). */

.ornament-card {
    position: relative;
    border: 1px solid rgba(232, 199, 107, 0.55);
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
}

.corner-ornament {
    position: absolute;
    width: 26px;
    height: 26px;
    top: 6px;
    left: 6px;
    pointer-events: none;
}

.corner-ornament--tr {
    left: auto;
    right: 6px;
    transform: scaleX(-1);
}

.corner-ornament--bl {
    top: auto;
    bottom: 6px;
    transform: scaleY(-1);
}

.corner-ornament--br {
    top: auto;
    left: auto;
    bottom: 6px;
    right: 6px;
    transform: scale(-1, -1);
}

.hint-plaque .corner-ornament {
    width: 18px;
    height: 18px;
}

/* ---------- Tagline ---------- */

.tagline {
    margin: 40px auto 0;
    max-width: 680px;
}

.tagline-text {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.6;
    background-color: rgba(40, 30, 55, 0.85);
    padding: 32px 40px;
    backdrop-filter: blur(2px);
}

.tagline-lead {
    display: block;
    font-size: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 10px;
}

.tagline-text strong {
    color: var(--gold);
}

/* ---------- Episodes ---------- */

.episodes {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 60px;
}

.episode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 400px;
    max-width: 100%;
}

.ep-label {
    margin: 0;
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
}

.ep-title {
    margin: 0 0 4px;
    font-size: 1.6rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ep-frame {
    position: relative;
    display: block;
    cursor: pointer;
    border-radius: 14px;
    outline: 8px solid #000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease, outline-color 0.3s ease;
}

.ep-frame:hover,
.ep-frame:focus-visible {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.7), 0 0 24px rgba(232, 199, 107, 0.5);
    outline-color: #1a1a1a;
}

.ep-frame img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ep-sparkle {
    position: absolute;
    color: var(--cream);
    text-shadow: 0 0 8px var(--gold);
    opacity: 0;
    pointer-events: none;
    animation: twinkle 2.4s ease-in-out infinite;
}

.ep-sparkle--a {
    top: -14px;
    left: -10px;
    font-size: 1.8rem;
    animation-delay: 0.3s;
}

.ep-sparkle--b {
    top: 20px;
    left: -22px;
    font-size: 1rem;
    animation-delay: 1.1s;
}

.hint-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hint-column .ep-label,
.hint-column .ep-title {
    visibility: hidden;
}

.hint-plaque {
    width: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 18px;
    background-color: rgba(40, 30, 55, 0.65);
    backdrop-filter: blur(2px);
    color: var(--cream);
    text-align: center;
    box-sizing: border-box;
}

.hint-icon {
    display: block;
    font-size: 1.3rem;
    color: var(--gold);
    text-shadow: 0 0 8px var(--gold);
    margin-bottom: 8px;
}

.hint-plaque p {
    margin: 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.6;
}

/* ---------- Synopsis & Season guide ---------- */

.section-heading {
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--cream);
    text-shadow: 2px 2px 8px #000;
    margin: 0 0 24px;
}

.synopsis,
.season {
    margin: 70px auto 0;
    max-width: 780px;
    text-align: center;
}

.synopsis-card,
.episode-guide-card {
    background-color: rgba(40, 30, 55, 0.85);
    padding: 34px 42px;
    text-align: left;
    backdrop-filter: blur(2px);
}

.synopsis-card p {
    margin: 0 0 16px;
    font-size: 1.15rem;
    line-height: 1.7;
}

.synopsis-card p:last-child {
    margin-bottom: 0;
}

.synopsis-card em {
    color: var(--gold);
    font-style: italic;
}

.episode-entry {
    padding: 18px 0;
    border-bottom: 1px solid rgba(232, 199, 107, 0.25);
}

.episode-entry:first-child {
    padding-top: 0;
}

.episode-entry:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.episode-entry h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    font-family: 'Cinzel Decorative', 'Georgia', serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.ep-number {
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    margin-right: 6px;
}

.ep-available {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold);
    border: 1px solid rgba(232, 199, 107, 0.5);
    border-radius: 999px;
    padding: 2px 10px;
    vertical-align: middle;
}

.episode-entry p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 248, 220, 0.9);
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    header h1 {
        font-size: 2.6rem;
    }

    header h2 {
        font-size: 1.7rem;
    }

    .tagline-text {
        font-size: 1.15rem;
        padding: 26px 24px;
    }

    .tagline-lead {
        font-size: 1.3rem;
    }

    .episodes {
        flex-direction: column;
    }

    .hint-column {
        order: 3;
    }

    .hint-column .ep-label,
    .hint-column .ep-title {
        display: none;
    }

    .hint-plaque {
        width: 220px;
    }

    .ep-frame {
        outline-width: 4px;
    }

    .section-heading {
        font-size: 1.7rem;
    }

    .synopsis-card,
    .episode-guide-card {
        padding: 22px 22px;
    }

    .synopsis-card p {
        font-size: 1rem;
    }

    .ep-available {
        display: block;
        margin-left: 0;
        margin-top: 6px;
        width: fit-content;
    }
}
