@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Navy and red, from the Coast logo. */
:root {
  color-scheme: light;
  --bg: #fff;
  --surface: #eef3f8;
  --text: #18222e;
  --muted: #4d5966;
  --line: #d8dfe7;
  --field: #5b6878;
  --brand: #14466b;
  --brand-deep: #0d3150;
  --on-brand: #fff;
  --on-brand-soft: #dbe6f0;
  --accent: #c4362c;
  --accent-hover: #a42a22;
  --link: #14466b;
  --link-hover: #a42a22;
  --focus: #0d3150;
  --font: "Atkinson Hyperlegible Next", Verdana, sans-serif;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
}

h1,
h2,
p,
ol,
ul,
dl,
dd {
  margin: 0;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.band :focus-visible,
.player-bar :focus-visible,
.player-view :focus-visible {
  outline-color: #fff;
}

/* Headings get focus when a page opens, but don't need a ring for it. */
[tabindex="-1"]:focus {
  outline: none;
}

.skip-link {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: #fff;
  color: var(--brand-deep);
  font-weight: 700;
}

.skip-link:focus {
  top: 1rem;
}

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

[hidden] {
  display: none !important;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.band {
  background: var(--brand);
  color: var(--on-brand);
}

.band a {
  color: var(--on-brand);
}

/* Top bar */

.utility {
  background: var(--brand-deep);
  font-size: 0.95rem;
}

.utility-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.4rem;
}

.utility-contact {
  color: var(--on-brand-soft);
}

.utility-contact a {
  font-weight: 700;
}

/* Masthead: the logo and the menu */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 1rem;
}

.logo {
  display: block;
  padding-block: 0.25rem;
}

.logo img {
  display: block;
  width: auto;
  height: 3.4rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0;
  list-style: none;
}

.nav a {
  display: block;
  padding-block: 0.6rem;
  border-bottom: 3px solid transparent;
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover {
  border-bottom-color: rgb(255 255 255 / 0.6);
}

.nav [aria-current="page"] {
  border-bottom-color: #fff;
}

.menu-button {
  min-height: 2.75rem;
  padding: 0.35rem 1rem;
  border: 2px solid rgb(255 255 255 / 0.7);
  border-radius: 999px;
  background: transparent;
  color: var(--on-brand);
  font: 700 1rem var(--font);
  cursor: pointer;
}

.menu-button[aria-expanded="true"] {
  background: #fff;
  color: var(--brand-deep);
}

@media (min-width: 48rem) {
  .menu-button {
    display: none !important;
  }
}

/* On phones the menu folds away behind the Menu button. */
@media (max-width: 47.99rem) {
  .utility-contact {
    display: none;
  }

  .logo img {
    height: 2.75rem;
  }

  .has-js .main-nav:not(.is-open) {
    display: none;
  }

  .main-nav {
    width: 100%;
  }

  .nav {
    display: grid;
    gap: 0;
  }

  .nav a {
    padding-block: 0.75rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.2);
  }

  .nav [aria-current="page"] {
    border-bottom-color: rgb(255 255 255 / 0.2);
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 0.3em;
  }
}

/* Jim's announcement, across the top of every page */

.announcement {
  background: var(--accent);
  color: #fff;
}

.announcement-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
  padding-block: 0.75rem;
  font-weight: 700;
}

.announcement a {
  color: #fff;
}

.announcement :focus-visible {
  outline-color: #fff;
}

/* Home: Jim, what's playing now, and what's next */

.hero-band {
  border-top: 1px solid rgb(255 255 255 / 0.15);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

@media (min-width: 48rem) {
  .hero {
    grid-template-columns: 15rem 1fr;
    align-items: center;
    gap: 2rem 3rem;
    padding-top: 2rem;
    padding-bottom: 3rem;
  }

  .hero-side {
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 66rem) {
  .hero {
    grid-template-columns: 16rem 1fr 17rem;
  }

  .hero-side {
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

.presenter {
  position: relative;
  justify-self: center;
  width: min(100%, 13rem);
  padding-bottom: 1.75rem;
}

@media (min-width: 48rem) {
  .presenter {
    width: min(100%, 16rem);
  }
}

/* Photos fill a fixed frame, so any photo Jim chooses fits the layout. */
.presenter-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 5px solid #fff;
  border-radius: 8px;
}

.player-controls {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.listen-button {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 3.5rem;
  padding: 0.4rem 1.5rem 0.4rem 0.45rem;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 800 1.25rem/1 var(--font);
  white-space: nowrap;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.3);
  cursor: pointer;
}

.listen-button:hover {
  background: var(--accent-hover);
}

.listen-icon {
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 50%;
  background: #fff;
}

.listen-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--accent);
}

.pause-icon,
.is-playing .play-icon {
  display: none;
}

.is-playing .pause-icon {
  display: block;
}

.on-air-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.15rem 0.75rem;
  border: 2px solid #fff;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 800;
}

.on-air-tag::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: #fff;
}

.hero h1 {
  max-width: 24ch;
  margin-top: 0.9rem;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  line-height: 1.15;
  text-wrap: balance;
}

.art {
  flex: none;
  border-radius: 6px;
  background: var(--brand-deep);
  object-fit: cover;
}

/* If the song name won't fit beside the cover, it moves underneath. */
.now {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.25rem;
  margin-top: 1.5rem;
}

.now > div {
  flex: 1 1 10rem;
}

.now-art {
  width: 6.5rem;
  height: 6.5rem;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.3);
}

@media (min-width: 48rem) {
  .now-art {
    width: 8.5rem;
    height: 8.5rem;
  }
}

.now-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--on-brand-soft);
  font-size: 1rem;
  font-weight: 700;
}

/* Little level bars that move while the station is playing. */
.bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 0.95rem;
}

.bars span {
  width: 3px;
  height: 35%;
  border-radius: 1px;
  background: currentColor;
}

@media (prefers-reduced-motion: no-preference) {
  .is-playing .bars span {
    animation: level 0.8s ease-in-out infinite alternate;
  }

  .bars span:nth-child(2) {
    animation-delay: -0.3s;
  }

  .bars span:nth-child(3) {
    animation-delay: -0.55s;
  }

  .bars span:nth-child(4) {
    animation-delay: -0.15s;
  }
}

@keyframes level {
  from {
    height: 20%;
  }

  to {
    height: 100%;
  }
}

.now-song {
  margin-top: 0.15rem;
  font-size: clamp(1.4rem, 2.6vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
}

.now-artist {
  margin-top: 0.15rem;
  font-size: 1.15rem;
}

.on-air audio {
  display: block;
  width: 100%;
  margin-top: 1rem;
}

.volume {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  font-weight: 700;
}

.volume input {
  width: 9rem;
  accent-color: #fff;
}

.player-status {
  margin-top: 0.4rem;
  color: var(--on-brand-soft);
  font-size: 1rem;
}

.hero-side {
  display: grid;
  gap: 1rem;
}

.side-panel {
  padding: 1.1rem 1.25rem;
  border-radius: 8px;
  background: var(--brand-deep);
}

.side-label {
  color: var(--on-brand-soft);
  font-size: 0.95rem;
  font-weight: 700;
}

.up-next {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.6rem;
}

.up-next .art {
  width: 4rem;
  height: 4rem;
}

.next-song {
  font-weight: 700;
  line-height: 1.35;
}

.side-text {
  margin-top: 0.3rem;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
}

.side-text + p {
  margin-top: 0.4rem;
}

/* Page content */

.block {
  padding-top: 3rem;
}

.narrow {
  max-width: 50rem;
}

.page h1:not(#hero-title) {
  margin-bottom: 1rem;
  color: var(--link);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
}

.block h2 {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.narrow h1 + section {
  margin-top: 2rem;
}

.narrow section + section {
  margin-top: 3rem;
}

.lead {
  font-size: 1.3rem;
  line-height: 1.5;
}

.lead + p {
  margin-top: 1rem;
}

.sign-off {
  font-weight: 800;
}

/* Just played: a list on phones, a row of covers on bigger screens. */

.played {
  display: grid;
  gap: 0.25rem;
  padding: 0;
  list-style: none;
}

.played li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
}

.played .art {
  width: 4rem;
  height: 4rem;
}

.played-song {
  display: block;
  font-weight: 800;
  line-height: 1.3;
}

.played-artist {
  display: block;
  color: var(--muted);
}

.played-empty {
  color: var(--muted);
}

@media (min-width: 48rem) {
  .played {
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
  }

  .played li {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0;
    border: 0;
  }

  .played .art {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
  }

  .played .played-empty {
    grid-column: 1 / -1;
  }
}

.welcome {
  padding-top: 4rem;
}

.welcome .lead {
  max-width: 40rem;
}

.welcome .sign-off {
  margin-top: 1rem;
}

/* Station news, written in the editor */

.news-item {
  max-width: 40rem;
  padding: 1.25rem 1.5rem;
  border-left: 5px solid var(--brand);
  background: var(--surface);
}

.news-item h3 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.3;
}

.news-date {
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 1rem;
}

/* Shows */

.live-show {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-left: 5px solid var(--accent);
  background: var(--surface);
  font-size: 1.2rem;
  font-weight: 800;
}

.schedule {
  width: 100%;
  margin-top: 1.5rem;
  border-collapse: collapse;
}

.schedule th,
.schedule td {
  padding: 0.8rem 0.75rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.schedule thead th {
  color: var(--muted);
  font-size: 1rem;
}

/* About Jim */

.about {
  display: grid;
  gap: 2rem;
  align-items: start;
}

@media (min-width: 48rem) {
  .about {
    grid-template-columns: 1fr 18rem;
    gap: 3rem;
  }
}

.about-text {
  max-width: 40rem;
}

.about-text p + p {
  margin-top: 1rem;
}

.about-photo {
  width: 100%;
  max-width: 14rem;
  height: auto;
  aspect-ratio: 420 / 500;
  object-fit: cover;
  border-radius: 8px;
}

@media (min-width: 48rem) {
  .about-photo {
    max-width: 18rem;
  }
}

.support {
  padding-top: 4rem;
}

/* Buttons */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.5rem 1.4rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: 800 1.125rem var(--font);
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #fff;
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.button-plain {
  border-color: var(--link);
  background: transparent;
  color: var(--link);
}

.button-plain:hover {
  border-color: var(--link);
  background: var(--link);
  color: var(--bg);
}

/* Requests and feedback forms */

.requests {
  display: grid;
  gap: 2rem;
}

@media (min-width: 52rem) {
  .requests {
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
  }
}

.form {
  display: grid;
  gap: 1.1rem;
  justify-items: start;
}

.narrow .form {
  margin-top: 1.5rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  width: 100%;
}

.field label {
  font-weight: 700;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

input:not([type]),
select,
textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--field);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

textarea {
  resize: vertical;
}

.bot-field {
  display: none;
}

/* Help */

.ways {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 40rem) {
  .ways {
    grid-template-columns: 1fr 1fr;
  }
}

.ways div {
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}

.ways dt {
  font-weight: 800;
}

.faq {
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0.25rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  flex: none;
  color: var(--link);
  font-size: 1.5rem;
  line-height: 1;
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  padding: 0 0.25rem 1.25rem;
}

/* Footer */

.footer {
  margin-top: 4rem;
  padding-block: 2.5rem;
  font-size: 1rem;
}

.footer-inner > * + * {
  margin-top: 0.75rem;
}

.footer-logo {
  display: block;
  width: auto;
  height: 3rem;
}

.footer p {
  color: var(--on-brand-soft);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  padding: 0;
  list-style: none;
  font-weight: 700;
}

.footer-links a {
  display: inline-block;
  padding-block: 0.4rem;
}

.footer-small {
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.25);
  font-size: 0.95rem;
}

/* Thin volume sliders that fill up to the volume, like Spotify's. */

input.slim {
  -webkit-appearance: none;
  appearance: none;
  height: 1.5rem;
  background: transparent;
  cursor: pointer;
}

input.slim::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #fff var(--fill, 80%), rgb(255 255 255 / 0.3) var(--fill, 80%));
}

input.slim::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(to right, #fff var(--fill, 80%), rgb(255 255 255 / 0.3) var(--fill, 80%));
}

input.slim::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

input.slim::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

/* When the song changes, the old one slides up and out and the new one
   rises into place. */

@media (prefers-reduced-motion: no-preference) {
  .is-leaving {
    animation: slide-out 0.28s ease-in forwards;
  }

  .is-entering {
    animation: slide-in 0.34s ease-out;
  }
}

@keyframes slide-out {
  to {
    opacity: 0;
    transform: translateY(-0.6rem);
  }
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
}

/* Jim live, or the 24-hour playlist */

.on-air-tag.is-live {
  border-color: #ff6b5e;
  background: var(--accent);
}

@media (prefers-reduced-motion: no-preference) {
  .on-air-tag.is-live::before {
    animation: pulse 1.6s ease-in-out infinite;
  }
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.schedule .is-today {
  background: var(--surface);
}

.schedule .is-today th::after {
  content: " (today)";
  color: var(--muted);
  font-weight: 400;
}

.schedule .is-live th::after {
  content: " (live now)";
  color: var(--accent);
  font-weight: 800;
}

/* The player bar: on every page, and on the home page once the main
   Listen button scrolls away. Laid out like Spotify's on bigger screens. */

.player-bar:not([hidden]) {
  position: fixed;
  inset: auto 0 0;
  z-index: 10;
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--brand-deep);
  color: #fff;
  box-shadow: 0 -4px 18px rgb(0 0 0 / 0.25);
  visibility: hidden;
  transform: translateY(110%);
  transition: transform 0.25s ease, visibility 0.25s;
}

.player-bar.is-shown {
  visibility: visible;
  transform: none;
}

body:has(.player-bar.is-shown) {
  padding-bottom: 5rem;
}

.player-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-block: 0.6rem;
}

/* The song in the bar is a button that opens the full player. */
.bar-open {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bar-open:hover .bar-song {
  text-decoration: underline;
}

.player-bar .art {
  width: 3.25rem;
  height: 3.25rem;
}

.bar-text {
  min-width: 0;
  line-height: 1.3;
}

.bar-song,
.bar-artist {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-song {
  font-weight: 800;
}

.bar-artist {
  color: #d3e0ec;
  font-size: 0.95rem;
}

.bar-controls {
  position: relative;
  display: flex;
  align-items: center;
}

.round-play {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--brand-deep);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.round-play:hover {
  transform: scale(1.06);
}

.round-play:active {
  transform: scale(0.95);
}

.round-play svg {
  width: 1.45rem;
  height: 1.45rem;
  fill: currentColor;
}

.round-play-large {
  width: 4.5rem;
  height: 4.5rem;
}

.round-play-large svg {
  width: 2.1rem;
  height: 2.1rem;
}

.live-pill,
.live-line-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 800;
}

.live-pill::before,
.live-line-label::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #ff6b5e;
}

.live-pill {
  display: none;
}

.bar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* No room for volume in the bar on phones: it's in the full player. */
.bar-volume {
  display: none !important;
  align-items: center;
  gap: 0.25rem;
}

.mute-button,
.bar-expand {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.mute-button:hover,
.bar-expand:hover {
  background: rgb(255 255 255 / 0.12);
}

.mute-button svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}

.speaker-off,
.is-muted .speaker-on {
  display: none;
}

.is-muted .speaker-off {
  display: block;
}

.bar-expand svg,
.close-player svg {
  width: 1.3rem;
  height: 1.3rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Bigger screens: song on the left, play in the middle, volume on the right. */
@media (min-width: 48rem) {
  .player-bar-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 1rem;
  }

  .bar-open {
    justify-self: start;
    max-width: 100%;
  }

  .live-pill {
    position: absolute;
    left: calc(100% + 0.75rem);
    display: inline-flex;
    white-space: nowrap;
  }

  .bar-right {
    gap: 0.75rem;
  }

  .bar-volume:not([hidden]) {
    display: flex !important;
  }

  .bar-volume .slim {
    width: 7.5rem;
  }
}

/* The full-screen player */

.player-view {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--brand-deep);
  color: #fff;
}

.player-view[open] {
  display: flex;
}

.player-view::backdrop {
  background: var(--brand-deep);
}

.player-view-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: min(100%, 30rem);
  margin: auto;
  padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  text-align: center;
}

.player-view-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.close-player {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.35rem 1rem 0.35rem 0.75rem;
  border: 2px solid rgb(255 255 255 / 0.7);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: 700 1rem var(--font);
  cursor: pointer;
}

.close-player:hover {
  background: #fff;
  color: var(--brand-deep);
}

.full-now {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

.full-art {
  width: min(100%, 22rem, 40vh);
  height: auto;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.4);
}

.full-song {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
}

.full-artist {
  margin-top: 0.3rem;
  color: #dbe6f0;
  font-size: 1.15rem;
}

/* Live radio has nothing to rewind, so the line stays full, marked Live. */
.live-line {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
}

.live-line-track {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #fff;
}

.full-volume {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
}

.full-volume .slim {
  flex: 1;
}

.volume-note,
.full-next {
  color: #dbe6f0;
}

.full-next span {
  color: #fff;
  font-weight: 700;
}

@media (prefers-reduced-motion: no-preference) {
  .player-view[open] .player-view-inner {
    animation: rise 0.3s ease-out;
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-bar:not([hidden]) {
    transition: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(2rem);
  }
}

/* Text size and dark mode */

:root[data-size="large"] {
  font-size: 115%;
}

:root[data-size="largest"] {
  font-size: 130%;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1620;
    --surface: #16212d;
    --text: #e7edf3;
    --muted: #a8b5c2;
    --line: #2b3948;
    --field: #7d8b9a;
    --brand: #123a5a;
    --brand-deep: #0a2236;
    --link: #8fc3ee;
    --link-hover: #ffb3ab;
    --focus: #8fc3ee;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1620;
  --surface: #16212d;
  --text: #e7edf3;
  --muted: #a8b5c2;
  --line: #2b3948;
  --field: #7d8b9a;
  --brand: #123a5a;
  --brand-deep: #0a2236;
  --link: #8fc3ee;
  --link-hover: #ffb3ab;
  --focus: #8fc3ee;
}

.reading-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.text-size {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.tool-label {
  margin-right: 0.3rem;
  color: var(--on-brand-soft);
}

.text-size button,
.dark-toggle {
  min-width: 2.5rem;
  min-height: 2.25rem;
  padding: 0.1rem 0.6rem;
  border: 1px solid rgb(255 255 255 / 0.55);
  border-radius: 6px;
  background: transparent;
  color: var(--on-brand);
  font: 700 0.95rem/1 var(--font);
  cursor: pointer;
}

.text-size [data-size="large"] {
  font-size: 1.1rem;
}

.text-size [data-size="largest"] {
  font-size: 1.25rem;
}

.text-size button:hover,
.dark-toggle:hover {
  border-color: #fff;
}

.text-size [aria-pressed="true"],
.dark-toggle[aria-pressed="true"] {
  border-color: #fff;
  background: #fff;
  color: var(--brand-deep);
}

@media (max-width: 47.99rem) {
  .reading-tools {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 22rem) {
  .tool-label {
    display: none;
  }
}

/* Messages after sending a form */

.form-status:empty {
  display: none;
}

.form-status {
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--brand);
  background: var(--surface);
  font-weight: 700;
}

.form-status.is-error {
  border-color: var(--accent);
}

/* Colour themes Jim can choose in the editor. Navy is the default above.
   The red stays the same in every theme because it comes from the logo. */

:root[data-colours="sea"] {
  --brand: #0e5a63;
  --brand-deep: #093f46;
  --link: #0e5a63;
  --focus: #093f46;
}

:root[data-colours="heather"] {
  --brand: #4f3a6b;
  --brand-deep: #372750;
  --link: #4f3a6b;
  --focus: #372750;
}

:root[data-colours="charcoal"] {
  --brand: #343b43;
  --brand-deep: #22272d;
  --link: #343b43;
  --focus: #22272d;
}

@media (prefers-color-scheme: dark) {
  :root[data-colours]:not([data-theme="light"]) {
    --link: #8fc3ee;
    --focus: #8fc3ee;
  }

  :root[data-colours="sea"]:not([data-theme="light"]) {
    --brand: #0b434a;
    --brand-deep: #072b30;
  }

  :root[data-colours="heather"]:not([data-theme="light"]) {
    --brand: #3a2b50;
    --brand-deep: #251b35;
  }

  :root[data-colours="charcoal"]:not([data-theme="light"]) {
    --brand: #272c32;
    --brand-deep: #181b1f;
  }
}

:root[data-colours][data-theme="dark"] {
  --link: #8fc3ee;
  --focus: #8fc3ee;
}

:root[data-colours="sea"][data-theme="dark"] {
  --brand: #0b434a;
  --brand-deep: #072b30;
}

:root[data-colours="heather"][data-theme="dark"] {
  --brand: #3a2b50;
  --brand-deep: #251b35;
}

:root[data-colours="charcoal"][data-theme="dark"] {
  --brand: #272c32;
  --brand-deep: #181b1f;
}

/* Inside the editor's preview, everything Jim can change has a dashed
   outline, and turns solid when he points at it. */

.is-preview [data-edit],
.is-preview [data-edit-photo],
.is-preview [data-announcement],
.is-preview [data-section="news"],
.is-preview .schedule {
  outline: 2px dashed #f0a020;
  outline-offset: 4px;
  cursor: pointer;
}

.is-preview [data-edit]:hover,
.is-preview [data-edit-photo]:hover,
.is-preview [data-announcement]:hover,
.is-preview [data-section="news"]:hover,
.is-preview .schedule:hover {
  outline-style: solid;
}
