:root {
    --cobalt: #1a2fc2;
    --periwinkle: #d1dff7;
    --white: #f8f9fa;
    --tan: #c9a87c;
    --navy: #1a1a2e;
    --rust: #a63d2f;
    --sunlight: #f0c674;
    --sunset-glow: #f4a574;
    --surface: rgba(255, 255, 255, 0.72);
    --border: rgba(26, 47, 194, 0.12);
    --shadow: rgba(26, 26, 46, 0.06);
    --sky-top: #f8faff;
    --sky-mid: #c8d8f2;
    --sky-bottom: #96b0dc;
    --sky-glow: rgba(240, 198, 116, 0.55);
    --sky-glow-y: -8%;
    --sky-horizon: rgba(244, 180, 140, 0.32);
}

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

body {
    margin: 0;
    font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    font-size: 1rem;
    line-height: 1.65;
    color: var(--navy);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
    background-color: var(--sky-bottom);
    background-image:
        radial-gradient(ellipse 105% 62% at 50% var(--sky-glow-y), var(--sky-glow), transparent 60%),
        radial-gradient(ellipse 135% 48% at 50% 112%, var(--sky-horizon), transparent 48%),
        linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 36%, var(--sky-bottom) 100%);
    background-attachment: fixed;
}

.page {
    max-width: 560px;
    margin: 0 auto;
    padding-top: max(clamp(1.75rem, 5vw, 4rem), env(safe-area-inset-top, 0px));
    padding-right: max(1.25rem, env(safe-area-inset-right, 0px));
    padding-bottom: max(1.75rem, env(safe-area-inset-bottom, 0px));
    padding-left: max(1.25rem, env(safe-area-inset-left, 0px));
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 4vw, 1.5rem);
}

.hero {
    text-align: center;
}

.site-title {
    margin: 0 0 1rem;
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.875rem, 5vw, 2.375rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--rust);
}

.sunset-tracker {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    margin: 0;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--navy);
    background: var(--surface);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 2px 12px var(--shadow);
}

.sunset-line {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
}

.sunset-sub {
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(26, 26, 46, 0.62);
}

.sunset-sub[hidden] {
    display: none;
}

#sunset-time {
    font-weight: 600;
    color: var(--rust);
    font-variant-numeric: tabular-nums;
}

.sunset-weather {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding-left: 0.5rem;
    margin-left: 0.15rem;
    border-left: 1px solid var(--border);
    color: var(--navy);
}

.sunset-weather[hidden] {
    display: none;
}

.weather-icon {
    display: flex;
    color: var(--navy);
    opacity: 0.55;
    line-height: 0;
}

#weather-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.lyrics {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.lyric {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.875rem 1.125rem;
    background: var(--surface);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    box-shadow: 0 2px 12px var(--shadow);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.lyric:hover {
    border-color: rgba(26, 26, 46, 0.16);
    box-shadow: 0 4px 20px rgba(26, 26, 46, 0.08);
}

.lyric-title {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.015em;
    color: var(--navy);
    transition: color 0.15s;
}

.lyric:hover .lyric-title {
    color: var(--rust);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(166, 61, 47, 0.45);
}

.lyric-artist {
    font-size: 0.8125rem;
    color: rgba(26, 26, 46, 0.55);
}

.music {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.playlist iframe {
    display: block;
    width: 100%;
    height: 352px;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 2px 16px var(--shadow);
}

.solkat {
    margin: 0.5rem 0 0;
}

.solkat img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 4px 24px var(--shadow);
}

@media (max-width: 540px) {
    body {
        background-attachment: scroll;
    }

    .site-title {
        font-size: clamp(1.625rem, 8vw, 2rem);
        margin-bottom: 0.875rem;
    }

    .sunset-tracker {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .sunset-line {
        row-gap: 0.25rem;
    }

    .sunset-weather {
        flex-basis: 100%;
        justify-content: center;
        margin-left: 0;
        padding-left: 0;
        padding-top: 0.35rem;
        border-left: none;
        border-top: 1px solid var(--border);
    }

    .lyric {
        padding: 1rem 1.125rem;
        min-height: 3.25rem;
    }

    .lyric-title {
        font-size: 1.0625rem;
        line-height: 1.35;
    }

    .playlist iframe {
        height: 352px;
        border-radius: 0.875rem;
    }

    .solkat img {
        border-radius: 0.875rem;
    }
}

@media (max-width: 360px) {
    .sunset-line {
        font-size: 0.8125rem;
    }

    #weather-label {
        font-size: 0.8125rem;
    }
}
