body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: #fafafa;
  color: #222;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 8px 16px 24px;
}

.tagline {
  color: #666;
}

/* Navigation bar across the whole window: the site's name and the links to its pages on
   the left, signing in (or the person's name) on the far right. It stays at the top while
   scrolling. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 24px;
  background: #fff;
  border-bottom: 1px solid #ddd;
}

.site-nav .brand {
  flex-shrink: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.25rem;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.02em;
  color: #222;
  text-decoration: none;
}

.site-nav nav {
  display: flex;
  flex: 1;
  gap: 20px;
}

.site-nav nav .account-link {
  margin-left: auto;
}

/* The search box sits on the All Stations page, above the list. */
.site-search {
  position: relative;
  max-width: 460px;
  margin: 0 0 20px;
}

.site-search svg {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: #888;
  pointer-events: none;
}

.site-search input {
  width: 100%;
  padding: 9px 14px 9px 38px;
  border: 1px solid #ddd;
  border-radius: 999px;
  background: #f3f3f3;
  font: inherit;
  font-size: 0.95rem;
  color: inherit;
  box-sizing: border-box;
}

.site-search input:focus {
  outline: none;
  border-color: #c62828;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}

.search-results {
  position: absolute;
  z-index: 4;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(420px, 70vh);
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.search-results[hidden] {
  display: none;
}

.search-results [role="option"] {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.search-results [role="option"][aria-selected="true"] {
  background: #f3f3f3;
}

.search-results img {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid #eee;
  border-radius: 6px;
  background: #fff;
  object-fit: contain;
}

.search-results [role="option"] > span {
  min-width: 0;
}

.result-name,
.result-detail {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.result-name {
  font-weight: 600;
}

.result-detail {
  font-size: 0.85rem;
  color: #666;
}

.search-empty {
  padding: 10px 8px;
  color: #666;
}

/* The station picked from search flashes so it's easy to spot. */
.station.found {
  animation: found 1.6s ease-out;
}

@keyframes found {
  0%,
  30% {
    box-shadow: 0 0 0 3px #c62828;
  }
}

@media (prefers-reduced-motion: reduce) {
  .station.found {
    animation: none;
  }
}

/* On narrower screens the links go on their own row under the name, and slide sideways
   if they don't all fit. */
@media (max-width: 760px) {
  .site-nav {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 16px 0;
  }

  .site-nav .brand {
    font-size: 1.05rem;
  }

  .site-nav nav {
    width: 100%;
    padding-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .site-nav nav a {
    font-size: 0.9rem;
    white-space: nowrap;
  }

  .site-search input {
    text-overflow: ellipsis;
  }
}

.site-nav nav a {
  font-weight: 600;
  color: #666;
  text-decoration: none;
}

.site-nav nav a:hover,
.site-nav nav a[aria-current="page"] {
  color: #c62828;
}

/* Each station is a row: its card, with its schedule and lists right beside it. */
.station-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  margin-top: 16px;
}

.station-row > .station {
  margin-top: 0;
}

.station-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.station-side > section {
  margin-top: 0;
}

/* A minimized station has nothing beside it, so its card takes the full width. */
.station-row:not(:has(.station-side > section:not([hidden]))) {
  grid-template-columns: minmax(0, 1fr);
}

.station-side:not(:has(> section:not([hidden]))) {
  display: none;
}

/* On phones, the schedule and lists go under the card. */
@media (max-width: 760px) {
  .station-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.schedule-panel {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.schedule-panel h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.schedule-panel .label {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #666;
}

.schedule-panel .label.on-now {
  color: #c62828;
}

/* Live dot, only while a show is on now. */
.schedule-panel .label.on-now::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #e53935;
  vertical-align: 1px;
  animation: live-pulse 1.6s ease-in-out infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0.6);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(229, 57, 53, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(229, 57, 53, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .schedule-panel .label.on-now::before {
    animation: none;
  }
}

.show-row {
  padding: 6px 0;
}

.show-row .when {
  display: block;
  font-size: 0.8rem;
  color: #666;
}

.show-row .title {
  margin-right: 6px;
  color: inherit;
  font-weight: 600;
}

.current .show-row .title {
  font-size: 1.05rem;
}

.show-logo {
  display: block;
  height: 44px;
  max-width: 100%;
  margin-top: 4px;
  border-radius: 4px;
}

.current .show-logo {
  height: 64px;
}

.upcoming .show-row {
  border-top: 1px solid #eee;
}

.toggle {
  width: 100%;
  margin: 8px 0;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Colors come from each station's showTypes, to match its own schedule. */
.type-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: #888;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.show-types[hidden] {
  display: none;
}

.schedule-panel .muted {
  margin: 0;
  color: #666;
  font-size: 0.9rem;
}

.show-types {
  list-style: none;
  margin: 12px 0 0;
  padding: 10px 0 0;
  border-top: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.show-types p {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: #444;
}

.full-schedule {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
}

.events-panel {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.events-panel h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.events-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.events-panel li {
  border-top: 1px solid #eee;
}

.events-panel li:first-child {
  border-top: none;
}

.events-panel li a {
  display: block;
  padding: 8px 0;
  color: inherit;
  text-decoration: none;
}

.events-panel li a:hover .title {
  text-decoration: underline;
}

.events-panel .when {
  display: block;
  font-size: 0.8rem;
  color: #666;
}

.events-panel .muted {
  padding: 8px 0;
  color: #666;
  font-size: 0.9rem;
}

.full-calendar {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.9rem;
}

.station {
  position: relative;
  padding: 16px;
  margin-top: 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.station-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 40px;
}

.station-logo {
  height: 44px;
  width: auto;
  max-width: 96px;
  object-fit: contain;
  flex-shrink: 0;
}

.station h2 {
  margin: 0;
  font-size: 1.2rem;
}

.minimize {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.minimize:hover {
  background: #eee;
}

.description {
  margin: 12px 0 0;
  padding-left: 10px;
  border-left: 3px solid #ddd;
  font-size: 0.9rem;
}

.description p {
  margin: 0;
}

.description a {
  font-size: 0.8rem;
  color: #666;
}

.school,
.show {
  margin: 2px 0;
  color: #666;
  font-size: 0.9rem;
}

/* Now-playing player: big cover with the song and artist underneath, like Spotify. */
.player {
  max-width: 340px;
  margin: 20px auto 0;
}

.cover {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.song {
  margin: 14px 0 2px;
}

.song .track {
  display: block;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
}

.song .artist {
  display: block;
  margin-top: 2px;
  color: #666;
}

.links a {
  margin-right: 12px;
  font-size: 0.9rem;
}

/* Donate button and the station's socials, under the player. */
.support {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}

.support[hidden] {
  display: none;
}

.donate {
  padding: 8px 16px;
  border-radius: 999px;
  background: #222;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.donate:hover {
  background: #000;
}

.socials {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.socials .icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.socials a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 999px;
  color: inherit;
  font-size: 0.8rem;
  text-decoration: none;
}

.socials a:hover {
  background: #f2f2f2;
}

/* Minimized: one compact row with the logo, name, "song — artist" and LIVE. */
.station.minimized {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 48px 10px 10px;
}

.station.minimized .station-header {
  padding-right: 0;
  flex: 0 1 auto;
  min-width: 0;
}

.station.minimized .station-logo {
  height: 32px;
}

/* The name and school sit side by side; a long school name is cut short first. */
.station.minimized .station-header > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}

.station.minimized h2 {
  font-size: 1rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.station.minimized .school {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.85rem;
}

.station.minimized .description,
.station.minimized .cover,
.station.minimized .show,
.station.minimized .links,
.station.minimized .support {
  display: none;
}

.station.minimized .player {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  max-width: none;
  margin: 0;
}

.station.minimized .song {
  margin: 0;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 0.9rem;
}

.station.minimized .song .track,
.station.minimized .song .artist {
  display: inline;
  margin: 0;
  font-size: inherit;
}

.station.minimized .song .artist:not(:empty)::before {
  content: " — ";
}

/* The show on now stands in for a song only on a minimized card. */
.station:not(.minimized) .song.only-show {
  display: none;
}

.station.minimized .song .on-now {
  color: #666;
}

.station.minimized .live {
  margin-top: 0;
  margin-left: auto;
  padding: 4px 12px;
  font-size: 0.85rem;
}

.station.minimized .minimize {
  top: 50%;
  transform: translateY(-50%);
}

.live {
  margin-top: 8px;
  padding: 8px 16px;
  border: 1px solid #ccc;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
}

.live .icon {
  display: inline-block;
  width: 1.2em;
}

.live.playing {
  background: #c62828;
  border-color: #c62828;
  color: #fff;
}

/* Headline text in Inter Black Italic; small text stays regular Inter so it's easy to read.
   Kept last so it wins over the per-element rules above. */
h1,
h2,
.schedule-panel .label,
.live {
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 900;
  font-style: italic;
}

h1 {
  letter-spacing: -0.02em;
}

.schedule-panel .source-note {
  margin-bottom: 8px;
  font-size: 0.8rem;
}

.cover.is-logo {
  object-fit: contain;
  padding: 12%;
  box-sizing: border-box;
  background: #fff;
}

/* "Recently played": a station's logged songs, newest first. */
.played-panel {
  margin-top: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

.played-panel h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.played-panel ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.played-panel li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
}

.played-panel li:first-child {
  border-top: none;
}

.played-panel img {
  grid-row: span 3;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.played-panel .when {
  font-size: 0.75rem;
  color: #666;
}

.played-panel .track {
  font-weight: 600;
}

.played-panel .artist {
  color: #666;
}

.played-panel .muted {
  display: block;
  color: #666;
}

.played-panel img.is-logo {
  object-fit: contain;
  background: #fff;
  border: 1px solid #eee;
}

/* The song that's on right now gets the same pulsing red dot as "On now". */
.played-panel .playing-now .track::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  background: #e53935;
  vertical-align: 1px;
  animation: live-pulse 1.6s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
  .played-panel .playing-now .track::before {
    animation: none;
  }
}

/* Player bar: fixed along the bottom once a station has been played. */
body.has-player {
  padding-bottom: 96px;
}

.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px max(16px, calc((100% - 980px) / 2));
  background: #fff;
  border-top: 1px solid #ddd;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

.player-bar[hidden] {
  display: none;
}

.bar-art {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 6px;
  object-fit: cover;
  background: #eee;
}

.bar-art.is-logo {
  object-fit: contain;
  background: #fff;
  border: 1px solid #eee;
}

/* The cover and song are one button that opens the full player. */
.bar-open {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.bar-info {
  flex: 1;
  min-width: 0;
}

.bar-info > span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.bar-station {
  font-size: 0.8rem;
  color: #666;
}

.bar-track {
  font-weight: 600;
}

.bar-artist {
  color: #666;
}

.bar-track:not(:empty) + .bar-artist:not(:empty)::before {
  content: "— ";
}

.player-bar .bar-toggle {
  margin-top: 0;
  flex-shrink: 0;
}

.bar-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  color: #444;
}

.bar-volume svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.bar-volume input {
  width: 110px;
  accent-color: #c62828;
}

.bar-expand {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #444;
  cursor: pointer;
}

.bar-expand:hover {
  background: #f0f0f0;
}

.bar-expand svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* On phones, the volume slider gets narrower so the song still fits. */
@media (max-width: 560px) {
  .player-bar,
  .bar-open {
    gap: 10px;
  }

  .bar-art {
    width: 44px;
    height: 44px;
  }

  .bar-volume input {
    width: 70px;
  }
}

/* While a stream connects, its buttons turn gray and say "Loading…" with a small spinner;
   they go red once sound starts. */
.live.playing.loading {
  background: #888;
  border-color: #888;
  color: #fff;
}

.live.loading .icon {
  width: 0.9em;
  height: 0.9em;
  margin-right: 2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  vertical-align: -1px;
  box-sizing: border-box;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live.loading .icon {
    animation: none;
  }
}

/* Full player: fills the screen over everything, dark, with the cover blurred behind it.
   Station across the top, big cover on the left and the song beside it, Live along the bottom. */
body.full-open {
  overflow: hidden;
}

.full-player {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px max(24px, calc((100% - 1100px) / 2)) 28px;
  overflow: hidden;
  background: #1b1b1b;
  color: #fff;
  animation: full-in 0.25s ease-out;
}

.full-player[hidden] {
  display: none;
}

@keyframes full-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

.full-backdrop {
  position: absolute;
  inset: -60px;
  z-index: -1;
  background: #1b1b1b center / cover no-repeat;
  filter: blur(50px) brightness(0.45) saturate(1.3);
}

.full-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.full-logo {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
  box-sizing: border-box;
}

.full-station {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 1.2rem;
  font-weight: 900;
  font-style: italic;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.full-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.full-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

.full-close svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.full-main {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  gap: 48px;
}

.full-art {
  width: min(52vw, calc(100vh - 260px), 560px);
  aspect-ratio: 1;
  flex-shrink: 0;
  border-radius: 12px;
  object-fit: cover;
  background: #333;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.full-art.is-logo {
  padding: 8%;
  background: #fff;
  object-fit: contain;
  box-sizing: border-box;
}

.full-info {
  flex: 1;
  min-width: 0;
}

.full-info p {
  margin: 0;
  overflow-wrap: anywhere;
}

.full-track {
  font-family: "Inter", system-ui, sans-serif;
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 900;
  font-style: italic;
  line-height: 1.1;
}

.full-artist {
  margin-top: 10px !important;
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  color: rgba(255, 255, 255, 0.85);
}

.full-album,
.full-show {
  margin-top: 6px !important;
  color: rgba(255, 255, 255, 0.6);
}

.full-album:empty,
.full-show:empty {
  display: none;
}

/* Where a music app has its progress bar, radio just says it's live. */
.full-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.full-live {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 900;
  font-style: italic;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.full-live .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
}

.full-player.on-air .full-live .dot {
  background: #e53935;
  animation: live-pulse 1.6s ease-in-out infinite;
}

.full-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}

.full-player .full-toggle {
  margin-top: 0;
  padding: 12px 28px;
  font-size: 1.1rem;
  color: #1b1b1b;
}

.full-player .full-toggle.playing {
  color: #fff;
}

.full-volume {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.85);
}

.full-volume svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.full-volume input {
  width: 160px;
  accent-color: #e53935;
}

/* On phones the cover sits on top with the song under it. */
@media (max-width: 760px) {
  .full-player {
    gap: 18px;
    padding: 16px 20px 24px;
  }

  .full-main {
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    text-align: center;
  }

  .full-art {
    width: min(100%, calc(100vh - 380px), 420px);
  }

  .full-info {
    flex: 0 0 auto;
    width: 100%;
  }

  .full-volume input {
    width: 110px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .full-player,
  .full-player.on-air .full-live .dot {
    animation: none;
  }
}

/* Sign in, sign up and profile: one centered card. */
.account-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 380px;
  margin: 48px auto;
  padding: 28px;
  border: 1px solid #ddd;
  border-radius: 16px;
  background: #fff;
}

.account-form[hidden] {
  display: none;
}

.account-form h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
}

.account-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9rem;
}

.account-form input {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #f3f3f3;
  font: inherit;
  font-weight: 400;
  color: inherit;
}

.account-form input:focus {
  outline: none;
  border-color: #c62828;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.15);
}

.account-form .hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: #666;
}

.account-form button {
  padding: 11px;
  border: none;
  border-radius: 999px;
  background: #c62828;
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.account-form button:hover {
  background: #a51f1f;
}

.account-form button:disabled {
  background: #999;
  cursor: default;
}

.form-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecea;
  color: #a51f1f;
  font-size: 0.9rem;
}

.form-error[hidden] {
  display: none;
}

.form-switch {
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  color: #666;
}

.form-switch a {
  color: #c62828;
  font-weight: 600;
}

.profile-card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  margin: 0;
}

.profile-card dt {
  font-weight: 600;
  color: #666;
}

.profile-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 480px) {
  .account-form {
    margin: 24px auto;
    padding: 20px;
  }
}

.account-form p {
  margin: 0;
  line-height: 1.5;
}

.account-form a.hint,
.form-error .link-button,
.account-form .link-button {
  color: #c62828;
  font-weight: 600;
}

.forgot-link {
  align-self: flex-end;
  margin-top: -8px;
}

/* A button that looks like a link (for "Send a new confirmation link"). */
.account-form .link-button {
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.account-form .link-button:hover {
  background: none;
  color: #a51f1f;
}

.account-form .link-button:disabled {
  background: none;
  color: #999;
}

/* Delete account: tucked away under the profile, opened on purpose. */
.delete-account {
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.delete-account summary {
  color: #666;
  font-size: 0.9rem;
  cursor: pointer;
}

.delete-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.account-form button.sign-out {
  background: #fff;
  border: 1px solid #ddd;
  color: #222;
}

.account-form button.sign-out:hover {
  background: #f3f3f3;
}

.account-form button.danger {
  background: #fff;
  border: 1px solid #c62828;
  color: #c62828;
}

.account-form button.danger:hover {
  background: #fdecea;
}

/* "Email me a sign-in link instead": a second, quieter button under Sign in. */
.alt-signin {
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 999px;
  text-align: center;
  color: #222;
  font-weight: 600;
  text-decoration: none;
}

.alt-signin:hover {
  border-color: #c62828;
  color: #c62828;
}
