:root {
  /* Palette lifted from the iOS app (RetroColors, light mode). */
  --page: #fbfaf9;
  --paper: #ffffff;
  --elevated: #fefefd;
  --ink: #0a0a09;
  --muted: #5e5c54;
  --tertiary: #737066;
  --line: rgba(10, 10, 9, 0.1);
  --line-strong: rgba(10, 10, 9, 0.16);
  --control: #ece9e0;
  --orange: #ff4505; /* accent */
  --orange-dark: #db2e03; /* player accent / pressed */
  --soft-orange: #ffbc85;
  --gold: #c99929;
  --error: #c71f1a;
  --shadow-sm: 0 2px 10px rgba(20, 14, 8, 0.06);
  --shadow: 0 14px 40px rgba(30, 18, 8, 0.12);
  --shadow-lg: 0 24px 60px rgba(30, 18, 8, 0.16);
  --r-card: 20px;
  --r-control: 14px;
  --font-sans: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --max: 900px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  padding-bottom: 128px; /* room for the floating player bar */
  background:
    radial-gradient(135% 440px at 50% -70px, rgba(255, 69, 5, 0.14), rgba(255, 69, 5, 0) 72%),
    var(--page);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}

button {
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

.fc-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 4px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.fc-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: fc-spin 0.8s linear infinite;
}
@keyframes fc-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Header */
.fc-header {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100% - 28px, var(--max));
  margin: 14px auto 0;
  padding: 10px 16px;
  border-radius: var(--r-card);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow-sm);
}
.fc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: inherit;
  text-decoration: none;
}
.fc-brand img {
  border-radius: 9px;
}
.fc-badge {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 69, 5, 0.12);
  color: var(--orange-dark);
  font-size: 12px;
  font-weight: 800;
}
.fc-ghost {
  margin-left: auto;
  padding: 9px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
}
.fc-ghost:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

/* Views */
.fc-view {
  width: min(100% - 28px, var(--max));
  margin: 28px auto;
}
/* :not([hidden]) so a display value never overrides the hidden attribute (views stacked otherwise). */
.fc-centered:not([hidden]) {
  display: flex;
  justify-content: center;
}

/* Auth / consent / error card */
.fc-card {
  width: min(100%, 430px);
  margin-top: 26px;
  padding: 32px 28px;
  border-radius: 26px;
  background: var(--paper);
  box-shadow: var(--shadow);
  text-align: center;
}
.fc-card h1 {
  margin: 0 0 8px;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
}
.fc-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
}
.fc-emoji {
  width: 66px;
  height: 66px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 69, 5, 0.1);
  font-size: 30px;
}

.fc-field {
  display: block;
  margin-bottom: 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.fc-field input {
  width: 100%;
  margin-top: 6px;
  padding: 13px 15px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-control);
  background: var(--elevated);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
}
.fc-field input:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 69, 5, 0.16);
}

.fc-primary {
  width: 100%;
  padding: 15px 18px;
  border: none;
  border-radius: var(--r-control);
  background: var(--orange);
  color: #fff;
  font-family: inherit;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 8px 20px rgba(255, 69, 5, 0.28);
  transition: background 0.15s ease, transform 0.1s ease;
}
.fc-primary:hover {
  background: var(--orange-dark);
}
.fc-primary:active {
  transform: scale(0.98);
}
.fc-primary:disabled {
  opacity: 0.5;
  box-shadow: none;
  cursor: default;
}

.fc-apple {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border: none;
  border-radius: var(--r-control);
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
}
.fc-apple:hover {
  background: #000;
}

.fc-or {
  position: relative;
  margin: 18px 0;
  color: var(--tertiary);
  font-size: 13px;
  font-weight: 700;
}
.fc-or::before,
.fc-or::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1.5px;
  background: var(--line);
}
.fc-or::before { left: 0; }
.fc-or::after { right: 0; }

.fc-error {
  margin: 0 0 14px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(199, 31, 26, 0.1);
  color: var(--error);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.fc-fineprint {
  margin: 18px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--tertiary);
}

/* Section titles — big and bold, like the app */
.fc-section-title {
  margin: 22px 0 14px;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.fc-count {
  margin-left: 8px;
  font-size: 18px;
  font-weight: 700;
  color: var(--tertiary);
}

/* Playing Next — the hero carousel (big cards, like the app Home) */
.fc-queue-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.fc-queue-card {
  position: relative;
  flex: 0 0 auto;
  width: 210px;
  height: 300px;
  padding: 0;
  border: none;
  border-radius: 22px;
  overflow: hidden;
  background-color: var(--control);
  background-size: cover;
  background-position: center;
  scroll-snap-align: start;
  box-shadow: var(--shadow);
  color: #fff;
  transition: transform 0.14s ease;
}
.fc-queue-card:hover {
  transform: translateY(-3px);
}
.fc-queue-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 6, 4, 0.04) 0%, rgba(8, 6, 4, 0.12) 45%, rgba(8, 6, 4, 0.8) 100%);
}
.fc-queue-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.fc-queue-podcast {
  font-size: 12px;
  font-weight: 700;
  opacity: 0.85;
}
.fc-queue-title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.fc-queue-play {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(6px);
}
.fc-queue-play-icon {
  font-size: 11px;
}
.fc-queue-progress {
  flex: 1;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.32);
  position: relative;
}
.fc-queue-progress > span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: #fff;
  border-radius: 3px;
}
.fc-queue-dur {
  font-size: 12px;
  font-weight: 800;
}

/* Playlists — circular chips, like the app */
.fc-playlist-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 12px;
}
.fc-playlist-chip {
  flex: 0 0 auto;
  width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  border: none;
  background: transparent;
  text-align: center;
}
.fc-playlist-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease;
}
.fc-playlist-chip:hover .fc-playlist-icon {
  transform: translateY(-2px);
}
.fc-playlist-name {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
}
.fc-playlist-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

/* Subscriptions grid */
.fc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
  gap: 16px;
}
.fc-podcast-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: none;
  border-radius: var(--r-card);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.fc-podcast-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.fc-podcast-card .fc-art {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 16px;
  font-size: 36px;
  overflow: hidden;
}
.fc-podcast-card-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
}
.fc-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Lists (episodes) */
.fc-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.fc-item {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.fc-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.fc-item.is-active {
  box-shadow: 0 0 0 2px var(--orange), var(--shadow-sm);
}
.fc-art {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  overflow: hidden;
}
.fc-item-text {
  min-width: 0;
  flex: 1;
}
.fc-item-title {
  display: block;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-item-meta {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

/* Podcast detail */
.fc-back {
  margin-bottom: 16px;
  padding: 9px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-weight: 700;
}
.fc-back:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}
.fc-podcast-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.fc-art-lg {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  font-size: 32px;
  overflow: hidden;
}
.fc-podcast-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.12;
}

/* Player bar — light floating pill, like the app's mini-player */
.fc-playerbar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  width: min(100% - 24px, 760px);
  padding: 12px 16px;
  border-radius: 22px;
  background: rgba(254, 254, 253, 0.9);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
}
.fc-np {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 190px;
}
.fc-np .fc-art {
  width: 46px;
  height: 46px;
  font-size: 19px;
}
.fc-np-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.fc-np-text strong {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fc-muted {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.fc-transport {
  display: flex;
  align-items: center;
  gap: 8px;
}
.fc-icon {
  min-width: 46px;
  padding: 8px 6px;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px;
  background: transparent;
  color: var(--orange-dark);
  font-weight: 800;
  font-size: 13px;
}
.fc-icon:hover {
  border-color: var(--orange);
  background: rgba(255, 69, 5, 0.08);
}
.fc-play {
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 50%;
  background: var(--orange-dark);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(219, 46, 3, 0.34);
}
.fc-play:hover {
  background: var(--orange);
}
.fc-play:active {
  transform: scale(0.96);
}

.fc-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 2 1 260px;
}
.fc-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--muted);
  min-width: 42px;
  text-align: center;
}
#seek {
  flex: 1;
  accent-color: var(--orange);
  height: 5px;
}
.fc-speed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.fc-speed select {
  padding: 7px 9px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--elevated);
  color: var(--ink);
  font-family: inherit;
  font-weight: 700;
}

@media (max-width: 720px) {
  .fc-playerbar {
    flex-wrap: wrap;
    gap: 10px 16px;
    border-radius: 20px;
  }
  .fc-np { order: 1; flex-basis: 58%; }
  .fc-transport { order: 2; margin-left: auto; }
  .fc-progress { order: 3; flex-basis: 100%; }
  .fc-speed { order: 4; }
}

@media (max-width: 480px) {
  .fc-badge { display: none; }
  .fc-header { gap: 10px; padding: 10px 13px; }
  .fc-view { margin: 20px auto; }
  .fc-card { padding: 26px 20px; }
  .fc-grid { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 13px; }
  .fc-section-title { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fc-spinner { animation: none; }
  .fc-podcast-card,
  .fc-item,
  .fc-primary,
  .fc-play,
  .fc-queue-card,
  .fc-playlist-icon { transition: none; }
}
