/* ============================================
   sora.quest - Quest Board Design System
   ============================================ */

/* CSS Custom Properties */
:root {
    --quest-gold: #C9952B;
    --twilight-indigo: #1E2A4A;
    --parchment-cream: #F5E6C8;
    --dragon-ember: #B8432F;
    --forest-sage: #4A6741;
    --royal-amethyst: #6B4C8A;
    --charcoal-ink: #2A2520;
    --mist-silver: #D4D0C8;
    --night-sky: #0E1628;
    --gold-dark: #A07A22;
    --bronze: #8B6914;
    --silver: #9CA3AF;
    --platinum: #E5E7EB;

    --font-display: 'Cinzel Decorative', serif;
    --font-body: 'Crimson Text', serif;
    --font-ui: 'Philosopher', sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--night-sky);
    color: var(--charcoal-ink);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ============================================
   Starfield Background
   ============================================ */
#starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.7), transparent),
        radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 40% 10%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 70% 20%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 85% 55%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 15% 70%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 30% 85%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1.5px 1.5px at 50% 65%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 65% 80%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 80% 40%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 92% 75%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 5% 50%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 45% 90%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 75% 5%, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 95% 15%, rgba(255,255,255,0.4), transparent),
        radial-gradient(1.5px 1.5px at 20% 55%, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 60% 30%, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 35% 95%, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 88% 88%, rgba(255,255,255,0.4), transparent);
    background-size: 200px 200px;
    animation: drift 120s linear infinite;
}

@keyframes drift {
    from { background-position: 0 0; }
    to { background-position: 100px 50px; }
}

/* ============================================
   Compass Rose Navigation
   ============================================ */
#compass-nav {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#compass-rose {
    width: 100px;
    height: 100px;
    cursor: pointer;
    transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}

#compass-rose:hover {
    transform: scale(1.08);
}

.compass-label {
    font-family: var(--font-ui);
    font-size: 8px;
    font-weight: 700;
    fill: var(--quest-gold);
    letter-spacing: 0.08em;
}

#compass-labels {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-top: 8px;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

#compass-nav:hover #compass-labels,
#compass-nav.active #compass-labels {
    opacity: 1;
    transform: translateY(0);
}

.compass-link {
    font-family: var(--font-ui);
    font-size: clamp(0.65rem, 1.2vw, 0.8rem);
    color: var(--quest-gold);
    text-decoration: none;
    letter-spacing: 0.08em;
    padding: 2px 10px;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

.compass-link:hover {
    color: var(--parchment-cream);
}

/* Mobile compass toggle */
#compass-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    width: 52px;
    height: 52px;
    border: 1.5px solid var(--quest-gold);
    border-radius: 50%;
    background: rgba(14, 22, 40, 0.9);
    cursor: pointer;
    padding: 6px;
}

#compass-toggle svg {
    width: 100%;
    height: 100%;
}

/* ============================================
   Section: Hero
   ============================================ */
.section-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.sky-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--night-sky) 0%, var(--twilight-indigo) 60%, #2A3A5C 100%);
    z-index: -1;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
}

.legendary-quest-card {
    position: relative;
    max-width: 680px;
    width: 90%;
    background: linear-gradient(145deg, var(--parchment-cream) 0%, #EDE0CC 50%, #DDD2BC 100%);
    border-radius: 8px;
    padding: 60px 48px 48px;
    box-shadow:
        0 4px 24px rgba(20, 15, 10, 0.35),
        0 0 0 1px rgba(201, 149, 43, 0.15),
        inset 0 0 60px rgba(201, 149, 43, 0.05);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.5s ease, transform 1.5s ease;
    /* Parchment texture */
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(160, 122, 34, 0.02) 2px, rgba(160, 122, 34, 0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(42, 37, 32, 0.015) 3px, rgba(42, 37, 32, 0.015) 6px);
}

.legendary-quest-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.legendary-quest-card.pinned {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) scale(0.55);
    max-width: 400px;
    padding: 20px 32px 16px;
    z-index: 90;
    box-shadow: 0 8px 32px rgba(20, 15, 10, 0.5);
}

.legendary-quest-card.pinned .hero-tagline,
.legendary-quest-card.pinned .gilded-rule,
.legendary-quest-card.pinned .card-seal {
    display: none;
}

.legendary-quest-card.pinned .hero-title {
    font-size: 1.4rem;
}

.card-seal {
    position: absolute;
    top: -16px;
    left: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    box-shadow:
        0 3px 8px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(0,0,0,0.3);
    z-index: 2;
}

.card-seal svg,
.seal-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    color: var(--quest-gold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.1;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(160, 122, 34, 0.2);
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--charcoal-ink);
    font-style: italic;
    font-weight: 400;
    margin-bottom: 24px;
    opacity: 0.85;
}

.gilded-rule {
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--quest-gold), transparent);
    margin: 0 auto;
    opacity: 0.6;
}

.torn-edge-bottom {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 16px;
    background: linear-gradient(145deg, var(--parchment-cream), #DDD2BC);
    clip-path: polygon(0% 0%, 3% 60%, 7% 20%, 12% 70%, 18% 30%, 22% 80%, 28% 10%, 33% 60%, 38% 25%, 44% 75%, 49% 15%, 55% 65%, 60% 35%, 66% 80%, 72% 20%, 77% 70%, 83% 10%, 88% 55%, 93% 30%, 97% 70%, 100% 0%, 100% 100%, 0% 100%);
}

/* ============================================
   Section: Explore (Quest Board)
   ============================================ */
.section-explore {
    position: relative;
    z-index: 2;
    padding: 80px 0 60px;
}

.torn-edge-top {
    position: absolute;
    top: -2px;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(180deg, var(--night-sky), var(--twilight-indigo));
    clip-path: polygon(0% 100%, 4% 30%, 9% 80%, 14% 20%, 20% 70%, 25% 35%, 31% 90%, 36% 15%, 42% 65%, 47% 25%, 53% 85%, 58% 40%, 64% 75%, 69% 10%, 75% 60%, 80% 30%, 86% 80%, 91% 20%, 96% 70%, 100% 100%);
    z-index: 3;
}

.board-surface {
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px;
    background:
        repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(160, 122, 34, 0.03) 3px, rgba(160, 122, 34, 0.03) 6px),
        repeating-linear-gradient(90deg, transparent, transparent 4px, rgba(42, 37, 32, 0.02) 4px, rgba(42, 37, 32, 0.02) 8px),
        linear-gradient(180deg, var(--parchment-cream) 0%, #E8DCCB 50%, var(--parchment-cream) 100%);
    border-left: 12px solid;
    border-right: 12px solid;
    border-image: linear-gradient(180deg, #4A3A2A, #3A2A1A, #4A3A2A) 1;
    box-shadow:
        inset 0 0 40px rgba(42, 37, 32, 0.1),
        -8px 0 20px rgba(0,0,0,0.3),
        8px 0 20px rgba(0,0,0,0.3);
}

/* Tier Headers */
.tier-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    padding: 0 12px;
}

.tier-header-light .tier-title {
    color: var(--quest-gold);
}

.tier-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.3rem, 3.5vw, 2rem);
    color: var(--charcoal-ink);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tier-rule {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--quest-gold), transparent);
}

.tier-rule.left {
    background: linear-gradient(90deg, transparent, var(--quest-gold));
}

.tier-rule.right {
    background: linear-gradient(90deg, var(--quest-gold), transparent);
}

/* Quest Tiers */
.quest-tier {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 12px;
}

/* Quest Cards */
.quest-card {
    flex: 1 1 300px;
    max-width: 380px;
    background: linear-gradient(145deg, var(--parchment-cream), #EDE0CC);
    border-radius: 8px;
    padding: 24px 20px;
    transform: rotate(var(--rotation, 0deg));
    box-shadow: 0 4px 24px rgba(20, 15, 10, 0.35);
    margin: -6px;
    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s ease;
    opacity: 0;
    position: relative;
    /* Gilded edge */
    border: 1px solid rgba(201, 149, 43, 0.2);
    /* Parchment grain */
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(160, 122, 34, 0.015) 2px, rgba(160, 122, 34, 0.015) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(42, 37, 32, 0.01) 3px, rgba(42, 37, 32, 0.01) 6px),
        linear-gradient(145deg, var(--parchment-cream), #EDE0CC);
}

.quest-card::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(201, 149, 43, 0.12);
    border-radius: 6px;
    pointer-events: none;
}

.quest-card.visible {
    opacity: 1;
}

.quest-card:hover {
    transform: rotate(var(--rotation, 0deg)) translateY(-8px);
    box-shadow:
        0 12px 40px rgba(20, 15, 10, 0.45),
        0 0 0 2px rgba(201, 149, 43, 0.3);
    z-index: 5;
}

.card-inner {
    display: flex;
    gap: 16px;
}

.card-left {
    flex: 0 0 25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.card-right {
    flex: 0 0 75%;
}

.card-seal.seal-bronze,
.card-seal.seal-silver,
.card-seal.seal-gold-rank,
.card-seal.seal-platinum {
    position: relative;
    top: auto;
    left: auto;
    width: 40px;
    height: 40px;
}

.seal-icon-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.25),
        inset 0 2px 4px rgba(0,0,0,0.3);
}

.seal-icon-lg {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow:
        0 3px 10px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(0,0,0,0.3);
}

.rank-label {
    font-family: var(--font-ui);
    font-size: clamp(0.65rem, 1.2vw, 0.75rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal-ink);
    opacity: 0.6;
}

.quest-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--charcoal-ink);
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.quest-desc {
    font-family: var(--font-body);
    font-size: clamp(0.9rem, 1.8vw, 1rem);
    color: var(--charcoal-ink);
    line-height: 1.6;
    margin-bottom: 12px;
    opacity: 0.85;
}

.quest-meta {
    font-family: var(--font-ui);
    font-size: clamp(0.7rem, 1.3vw, 0.8rem);
    letter-spacing: 0.06em;
    color: var(--gold-dark);
    font-weight: 700;
}

/* Torn Dividers */
.torn-divider {
    width: 100%;
    height: 24px;
    background: var(--night-sky);
    clip-path: polygon(
        0% 30%, 4% 80%, 8% 20%, 13% 70%, 17% 40%, 22% 90%, 26% 15%, 31% 65%,
        35% 30%, 40% 85%, 44% 25%, 49% 75%, 53% 35%, 58% 80%, 62% 20%, 67% 70%,
        71% 40%, 76% 85%, 80% 15%, 85% 65%, 89% 30%, 94% 75%, 98% 45%, 100% 70%,
        100% 100%, 0% 100%
    );
    margin: 24px 0 32px;
    opacity: 0.15;
}

/* ============================================
   Section: Stories
   ============================================ */
.section-stories {
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

.stories-sky {
    background: linear-gradient(180deg, var(--twilight-indigo), var(--night-sky) 80%);
    padding: 60px 24px;
    max-width: 1080px;
    margin: 0 auto;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    padding: 0 12px;
}

.story-card {
    opacity: 0;
    transform: translateY(40px);
}

.story-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gilded-frame {
    position: relative;
    padding: 32px 24px;
    border: 1px solid rgba(201, 149, 43, 0.3);
    outline: 1px solid rgba(201, 149, 43, 0.15);
    outline-offset: 6px;
    background: rgba(14, 22, 40, 0.6);
    border-radius: 4px;
}

.frame-corner {
    position: absolute;
    width: 16px;
    height: 16px;
}

.frame-corner.top-left {
    top: -3px;
    left: -3px;
    border-top: 2px solid var(--quest-gold);
    border-left: 2px solid var(--quest-gold);
}

.frame-corner.top-right {
    top: -3px;
    right: -3px;
    border-top: 2px solid var(--quest-gold);
    border-right: 2px solid var(--quest-gold);
}

.frame-corner.bottom-left {
    bottom: -3px;
    left: -3px;
    border-bottom: 2px solid var(--quest-gold);
    border-left: 2px solid var(--quest-gold);
}

.frame-corner.bottom-right {
    bottom: -3px;
    right: -3px;
    border-bottom: 2px solid var(--quest-gold);
    border-right: 2px solid var(--quest-gold);
}

.story-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    color: var(--quest-gold);
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

.story-excerpt {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.8vw, 1.1rem);
    color: var(--mist-silver);
    line-height: 1.7;
    font-style: italic;
}

/* ============================================
   Section: World (Legendary Quest)
   ============================================ */
.section-world {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
}

.legendary-backdrop {
    position: relative;
    width: 100%;
    max-width: 800px;
}

.legendary-card-final {
    position: relative;
    background: rgba(14, 22, 40, 0.8);
    border: 1px solid rgba(201, 149, 43, 0.3);
    border-radius: 8px;
    padding: 56px 48px;
    text-align: center;
    opacity: 0;
    transform: translateY(40px);
}

.legendary-card-final.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.gilded-border-animated {
    position: absolute;
    inset: -8px;
    border: 1px solid rgba(201, 149, 43, 0.15);
    outline: 1px solid rgba(201, 149, 43, 0.08);
    outline-offset: 6px;
    border-radius: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.2s ease 0.3s;
}

.legendary-card-final.visible .gilded-border-animated {
    opacity: 1;
}

.gilded-border-animated .frame-corner {
    width: 24px;
    height: 24px;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.legendary-card-final.visible .gilded-border-animated .frame-corner {
    opacity: 1;
}

.legendary-card-final.visible .gilded-border-animated .frame-corner.top-left {
    transition-delay: 0.5s;
}
.legendary-card-final.visible .gilded-border-animated .frame-corner.top-right {
    transition-delay: 0.7s;
}
.legendary-card-final.visible .gilded-border-animated .frame-corner.bottom-right {
    transition-delay: 0.9s;
}
.legendary-card-final.visible .gilded-border-animated .frame-corner.bottom-left {
    transition-delay: 1.1s;
}

.legendary-card-final .card-seal {
    position: relative;
    top: auto;
    left: auto;
    width: 56px;
    height: 56px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.seal-platinum {
    box-shadow:
        0 3px 10px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(0,0,0,0.3),
        0 0 20px rgba(229, 231, 235, 0.15);
}

.legendary-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(1.8rem, 5vw, 3rem);
    color: var(--quest-gold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(201, 149, 43, 0.3);
}

.legendary-card-final .gilded-rule {
    margin-bottom: 24px;
}

.legendary-desc {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--mist-silver);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 16px;
}

.legendary-desc.secondary {
    font-weight: 600;
    color: var(--quest-gold);
    font-style: italic;
    font-size: clamp(1.1rem, 2.2vw, 1.25rem);
}

/* ============================================
   Footer: Campfire
   ============================================ */
.section-footer {
    position: relative;
    z-index: 2;
    padding: 80px 20px 40px;
    text-align: center;
    overflow: hidden;
}

.campfire-glow {
    position: absolute;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse at center bottom, rgba(184, 67, 47, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    position: relative;
    z-index: 2;
}

.footer-compass {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    cursor: pointer;
    transition: transform 0.4s ease;
}

.footer-compass:hover {
    transform: translateY(-4px);
}

.footer-compass svg {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.compass-label-sm {
    font-family: var(--font-ui);
    font-size: 7px;
    font-weight: 700;
    fill: var(--quest-gold);
    letter-spacing: 0.08em;
}

.return-label {
    font-family: var(--font-ui);
    font-size: clamp(0.75rem, 1.5vw, 0.9rem);
    color: var(--quest-gold);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.7;
}

.footer-text {
    font-family: var(--font-ui);
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    color: var(--quest-gold);
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    opacity: 0.8;
}

.footer-sub {
    font-family: var(--font-body);
    font-size: clamp(0.8rem, 1.4vw, 0.95rem);
    color: var(--mist-silver);
    font-style: italic;
    opacity: 0.5;
}

/* ============================================
   Map Lines SVG Overlay
   ============================================ */
#map-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

#map-lines line {
    stroke: var(--quest-gold);
    stroke-width: 1;
    stroke-dasharray: 4 6;
    opacity: 0;
    transition: opacity 0.8s ease;
}

#map-lines line.visible {
    opacity: 0.25;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    #compass-nav {
        display: none;
    }

    #compass-toggle {
        display: block;
    }

    .quest-tier {
        flex-direction: column;
        align-items: center;
    }

    .quest-card {
        max-width: 100%;
        flex: 1 1 100%;
        transform: rotate(0deg) !important;
        margin: 8px 0;
    }

    .quest-card:hover {
        transform: translateY(-4px) !important;
    }

    .card-inner {
        flex-direction: column;
    }

    .card-left {
        flex: none;
        flex-direction: row;
        gap: 12px;
    }

    .card-right {
        flex: none;
    }

    .legendary-quest-card {
        padding: 48px 24px 36px;
    }

    .legendary-quest-card.pinned {
        transform: translateX(-50%) scale(0.45);
        max-width: 300px;
        padding: 12px 20px 10px;
    }

    .legendary-card-final {
        padding: 40px 24px;
    }

    .stories-grid {
        grid-template-columns: 1fr;
    }

    .board-surface {
        border-left-width: 6px;
        border-right-width: 6px;
        padding: 24px 12px;
    }

    .tier-title {
        font-size: clamp(1rem, 4vw, 1.3rem);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: clamp(2rem, 10vw, 3rem);
    }

    .legendary-title {
        font-size: clamp(1.4rem, 6vw, 2rem);
    }
}

/* ============================================
   Animation Utility Classes
   ============================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
