:root {
    --theme-bg: #f5f7f4;
    --theme-surface: #ffffff;
    --theme-text: #17312b;
    --theme-muted: #5d6f68;
    --theme-accent: #2f7d67;
    --theme-border: #d9e2dc;
    --theme-shadow: 0 20px 45px rgba(23, 49, 43, 0.08);
    --theme-shell: 72rem;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--theme-text);
    background: linear-gradient(180deg, #eef3ef 0%, var(--theme-bg) 100%);
}

a {
    color: inherit;
}

.site-shell {
    width: min(calc(100% - 2rem), var(--theme-shell));
    margin: 0 auto;
}

.site-header,
.site-footer {
    background: var(--theme-surface);
    border-bottom: 1px solid var(--theme-border);
}

.site-footer {
    border-top: 1px solid var(--theme-border);
    border-bottom: 0;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header__inner,
.site-footer .site-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
}

.site-main {
    flex: 1;
    padding: 3rem 0;
}

.site-brand,
.page-kind {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--theme-accent);
}

.site-brand {
    font-weight: 700;
    text-decoration: none;
}

.custom-logo-link,
.custom-logo {
    display: block;
}

.custom-logo {
    max-height: 3rem;
    width: auto;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav__toggle {
    display: none;
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    padding: 0 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--theme-text);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
    background: rgba(47, 125, 103, 0.08);
    color: var(--theme-accent);
}

.site-nav__item--has-children {
    position: relative;
}

.site-nav__submenu-toggle {
    min-height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 0.6rem 0.8rem;
}

.site-nav__submenu-toggle:hover,
.site-nav__submenu-toggle:focus-visible {
    background: rgba(47, 125, 103, 0.08);
    color: var(--theme-accent);
}

.site-nav__submenu {
    display: none;
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.25rem);
    right: 0;
    min-width: 13rem;
    margin: 0;
    padding: 0.4rem;
    list-style: none;
    background: #fff;
    border: 1px solid var(--theme-border);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(20, 48, 56, 0.14);
}

.site-nav__item--submenu-open .site-nav__submenu {
    display: block;
}

.site-nav__submenu-link {
    width: 100%;
}

.site-footer .site-shell {
    justify-content: center;
}

.content-card {
    padding: 2rem;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 1.25rem;
    box-shadow: var(--theme-shadow);
}

.entry-title {
    margin-top: 0;
    margin-bottom: 1rem;
}

.entry-content {
    color: var(--theme-muted);
    line-height: 1.7;
}

.playlist-overview {
    margin-top: 1.5rem;
}

.playlist-overview__list {
    display: grid;
    gap: 0.75rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.playlist-overview__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    background: #f5f8f6;
    border: 1px solid var(--theme-border);
    border-radius: 1rem;
}

.playlist-overview__details h2,
.playlist-overview__details p {
    margin: 0;
}

.playlist-overview__details h2 {
    color: var(--theme-text);
    font-size: 1.15rem;
}

.playlist-overview__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.playlist-overview__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.625rem 1rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid var(--theme-border);
    border-radius: 999px;
}

.playlist-overview__delete {
    min-height: 44px;
    padding: 0.65rem 0.9rem;
    border: 1px solid #b95045;
    border-radius: 0.65rem;
    background: #fff;
    color: #9f362d;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.playlist-overview__delete:hover {
    background: #fff1ef;
}

.playlist-overview__delete:focus-visible {
    outline: 3px solid #1e5a4b;
    outline-offset: 2px;
}

.playlist-overview__play {
    color: #ffffff;
    background: #1e5a4b;
    border-color: #1e5a4b;
}

.playlist-overview__edit {
    color: var(--theme-text);
    background: var(--theme-surface);
}

.playlist-overview__actions a:focus-visible {
    outline: 3px solid var(--theme-accent);
    outline-offset: 3px;
}

@media (max-width: 700px) {
    .site-header {
        position: relative;
    }

    .site-header__inner {
        min-height: 4.25rem;
    }

    .site-nav__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-height: 44px;
        padding: 0;
        border: 1px solid var(--theme-border);
        border-radius: 0.75rem;
        background: #f5f8f6;
        color: var(--theme-text);
        cursor: pointer;
    }

    .site-nav__toggle:focus-visible,
    .site-nav__link:focus-visible {
        outline: 3px solid var(--theme-accent);
        outline-offset: 3px;
    }

    .site-nav__toggle-icon,
    .site-nav__toggle-icon::before,
    .site-nav__toggle-icon::after {
        display: block;
        width: 1.25rem;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
        content: '';
    }

    .site-nav__toggle-icon {
        position: relative;
    }

    .site-nav__toggle-icon::before,
    .site-nav__toggle-icon::after {
        position: absolute;
        left: 0;
    }

    .site-nav__toggle-icon::before {
        top: -0.38rem;
    }

    .site-nav__toggle-icon::after {
        top: 0.38rem;
    }

    .site-nav {
        display: none;
        position: absolute;
        z-index: 10;
        top: 100%;
        right: 0;
        left: 0;
        padding: 0.75rem 1rem 1rem;
        border-top: 1px solid var(--theme-border);
        border-bottom: 1px solid var(--theme-border);
        background: var(--theme-surface);
        box-shadow: var(--theme-shadow);
    }

    .site-nav.site-nav--open {
        display: block;
    }

    .site-nav__list {
        align-items: stretch;
        flex-direction: column;
        gap: 0.25rem;
    }

    .site-nav__link {
        width: 100%;
        min-height: 44px;
        padding: 0.65rem 0.9rem;
        border-radius: 0.75rem;
        background: #f5f8f6;
    }

    .site-nav__submenu-toggle {
        width: 100%;
        min-height: 44px;
        text-align: left;
    }

    .site-nav__submenu {
        position: static;
        min-width: 0;
        margin: 0.25rem 0 0.25rem 0.8rem;
        padding: 0.25rem;
        border-left: 3px solid var(--theme-accent);
        box-shadow: none;
    }

    .site-footer .site-shell {
        min-height: auto;
        padding: 0.5rem 0;
    }

    .site-footer .custom-logo {
        max-height: 2rem;
    }

    .content-card {
        padding: 1.5rem;
    }

    .playlist-overview__item {
        align-items: stretch;
        flex-direction: column;
    }

    .playlist-overview__actions a {
        flex: 1 1 100%;
    }
}
