:root {
    color-scheme: light;
    font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
    color: #293c33;
    background: #a3b9ad;
}

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

body {
    display: grid;
    min-height: 100vh;
    margin: 0;
    padding: clamp(0.75rem, 4vw, 2rem);
    place-items: center;
}

.radio {
    width: min(100%, 46rem);
    padding: clamp(1rem, 5vw, 2rem);
    border: 1px solid #677e70;
    border-radius: 20px;
    background: #becfc5;
    box-shadow: 0 18px 45px #293c332b;
}

.radio-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 1rem;
    margin-bottom: 1rem;
}

h1 {
    margin: 0;
    font: 600 clamp(1.35rem, 5vw, 2rem)/1.1 "Cinzel", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}

.station {
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.station::before {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.4rem;
    border: 1px solid #754600;
    border-radius: 50%;
    background: #ffb000;
    content: "";
}

.now-playing {
    padding: 1rem;
    border-radius: 12px;
    color: #f5f8f6;
    background: #293c33;
    box-shadow: inset 3px 4px 10px #10281870;
    overflow-wrap: anywhere;
}

.now-playing h2 {
    margin: 0 0 0.35rem;
    color: #ffcf69;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.now-playing p { margin: 0.3rem 0 0; }
#composition { font-size: 1.2rem; font-weight: 700; }
#creator, #transformation { font-size: 0.9rem; }

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

button, .control-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 44px;
    padding: 0.5rem 0.85rem;
    border: 1px solid #677e70;
    border-radius: 10px;
    color: #293c33;
    background: #fff4e9;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.controls > * { padding-inline: 0.7rem; }

.control-link { text-decoration: none; }
.control-link:hover { text-decoration: underline; }

#play { min-width: 5.25rem; border-color: #754600; background: #ffb000; }
button:disabled { opacity: 0.6; cursor: default; }
:focus-visible { outline: 2px solid #293c33; outline-offset: 3px; }

#status {
    min-height: 1.3em;
    margin: 0.65rem 0;
    font-size: 0.875rem;
}

.share-options {
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    border: 1px solid #677e70;
    border-radius: 12px;
}

.share-options p { margin: 0.5rem 0 0.75rem; }
.share-options label { font-weight: 700; }

.share-options textarea {
    display: block;
    width: 100%;
    margin: 0.35rem 0 0.65rem;
    padding: 0.5rem;
    resize: vertical;
    color: inherit;
    background: #f5f8f6;
    border: 1px solid #677e70;
    border-radius: 6px;
}

.station-news {
    box-sizing: content-box;
    height: 3.9rem;
    padding: 0.55rem 0.75rem;
    overflow: auto;
    border: 1px solid #677e70;
    border-radius: 10px;
    background: #e1e9e3;
    font-size: 0.875rem;
    line-height: 1.3rem;
    overflow-wrap: anywhere;
}

.station-news h2 { margin: 0; font-size: inherit; }
.station-news p { margin: 0; white-space: pre-wrap; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.is-embedded,
.is-embedded body {
    background: transparent;
}

.is-embedded body {
    display: block;
    min-height: 0;
    padding: 0;
    font-size: calc(1rem - 2pt);
}

.is-embedded .radio {
    width: 100%;
    padding: 0;
    border-radius: 10px;
    box-shadow: none;
}

.is-embedded .radio-header,
.is-embedded #now-heading,
.is-embedded #play-label,
.is-embedded #mute,
.is-embedded #reconnect {
    display: none;
}

.is-embedded .player-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem;
}

.is-embedded .now-playing {
    padding: 0.4rem 0.55rem;
    border-radius: 6px;
}

.is-embedded .now-playing p {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.is-embedded #composition { font-size: calc(0.95rem - 2pt); }
.is-embedded #creator,
.is-embedded #transformation { font-size: calc(0.75rem - 2pt); }

.is-embedded #play,
.is-embedded #expand-player {
    position: relative;
    width: 22px;
    min-width: 22px;
    height: 22px;
    min-height: 22px;
    padding: 0;
    border-radius: 5px;
}

.is-embedded #play::after,
.is-embedded #expand-player::after {
    position: absolute;
    inset: -11px -8px;
    content: "";
}

.is-embedded #play::before {
    width: 9px;
    height: 11px;
    background: currentColor;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    content: "";
}

.is-embedded #play.pause-icon::before {
    width: 9px;
    background: linear-gradient(to right, currentColor 0 38%, transparent 38% 62%, currentColor 62%);
    clip-path: none;
}

.is-embedded #expand-player::before {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    content: "";
}

.is-embedded #expand-player[aria-expanded="true"]::before {
    transform: translateY(2px) rotate(225deg);
}

.is-embedded #player-details { padding: 0 0.5rem 0.5rem; }
.is-embedded .controls { margin-top: 0; }

.is-embedded .controls,
.is-embedded #status,
.is-embedded .station-news {
    font-size: calc(0.875rem - 2pt);
}

.is-embedded .station-news {
    --news-line-height: calc(1.3rem - 2pt);
    height: calc(3 * var(--news-line-height));
    line-height: var(--news-line-height);
}

.is-embedded .share-options textarea { font-size: calc(0.8125rem - 2pt); }

[hidden] { display: none; }
