/* 梵音佛曲 (youtube/templates/foqu_home.html): a quiet page of cards on warm
   paper - the cover large, the name in the site's serif, two plain buttons -
   and a bar at the foot of the window that appears once something is playing. */

.foqu {
  --fq-ink: #342e27;
  --fq-muted: #6a6155;
  --fq-red: #7a2a1f;
  --fq-gold: #a77b35;
  --fq-line: #e7dcc8;
  --fq-paper: #fffdf8;
  --fq-wash: #f6efe2;
  color: var(--fq-ink);
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  margin: 0 auto;
  max-width: 1120px;
  padding: 28px 16px 120px;
}

.foqu :is(a, button):focus-visible {
  outline: 3px solid #33758b;
  outline-offset: 3px;
}

/* -- head: one line - name and a sentence on the left, count and 全部连播 on the right -- */
.foqu-head {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.foqu-title {
  color: var(--fq-red);
  font-size: clamp(24px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: 0.1em;
  line-height: 1.3;
  margin: 0 0 2px;
}

.foqu-lead {
  color: var(--fq-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.foqu-head__row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.foqu-count {
  color: var(--fq-muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

/* -- buttons -- */
.foqu-btn {
  align-items: center;
  background: var(--fq-paper);
  border: 1px solid var(--fq-line);
  border-radius: 999px;
  color: var(--fq-red);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 15px;
  gap: 6px;
  line-height: 1;
  min-height: 40px;
  padding: 0 16px;
  text-decoration: none;
  transition:
    background-color 0.18s,
    border-color 0.18s,
    color 0.18s;
}

.foqu-btn:hover {
  background: #fbf3e6;
  border-color: #d9c6a3;
}

.foqu-btn--solid {
  background: var(--fq-red);
  border-color: var(--fq-red);
  color: #fffaf2;
}

.foqu-btn--solid:hover {
  background: #66221a;
  border-color: #66221a;
}

.foqu-btn--quiet {
  color: var(--fq-muted);
}

.foqu-btn.is-playing {
  background: var(--fq-red);
  border-color: var(--fq-red);
  color: #fffaf2;
}

/* -- category jump: sticks under the site navbar (h-14), scrolls sideways on a phone -- */
.foqu-jump {
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--fq-line);
  margin: 0 -16px 24px;
  padding: 10px 16px;
  position: sticky;
  top: 56px;
  z-index: 20;
}

/* The site bar has folded into its knob (navbar.js): leave the knob its corner. */
html.nav-folded .foqu-jump {
  padding-right: 64px;
}

.foqu-jump__list {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  overflow-x: auto;
  padding: 0;
  scrollbar-width: none;
}

.foqu-jump__list::-webkit-scrollbar {
  display: none;
}

.foqu-jump__link {
  align-items: center;
  border: 1px solid var(--fq-line);
  border-radius: 999px;
  color: var(--fq-ink);
  display: inline-flex;
  font-size: 15px;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  text-decoration: none;
  transition:
    background-color 0.18s,
    border-color 0.18s,
    color 0.18s;
  white-space: nowrap;
}

.foqu-jump__link:hover {
  background: #fbf3e6;
  border-color: #d9c6a3;
}

.foqu-jump__link.is-here {
  background: var(--fq-red);
  border-color: var(--fq-red);
  color: #fffaf2;
}

.foqu-jump__n {
  color: var(--fq-gold);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.foqu-jump__link.is-here .foqu-jump__n {
  color: #f1d9b5;
}

/* -- sections -- */
.foqu-section {
  scroll-margin-top: 64px;
}

.foqu-section + .foqu-section {
  margin-top: 40px;
}

.foqu-section__title {
  align-items: center;
  color: var(--fq-red);
  display: flex;
  font-size: 22px;
  font-weight: 600;
  gap: 14px;
  letter-spacing: 0.12em;
  margin: 0 0 16px;
}

.foqu-section__title::after {
  background: linear-gradient(90deg, var(--fq-line), transparent);
  content: "";
  flex: 1;
  height: 1px;
}

/* -- cards -- */
.foqu-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
}

.foqu-card {
  background: var(--fq-paper);
  border: 1px solid var(--fq-line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(52, 46, 39, 0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}

.foqu-card:hover {
  border-color: #dccbaa;
  box-shadow: 0 8px 24px rgba(52, 46, 39, 0.08);
}

.foqu-card.is-now {
  border-color: var(--fq-gold);
  box-shadow: 0 0 0 2px rgba(167, 123, 53, 0.25);
}

.foqu-media {
  aspect-ratio: 16 / 9;
  background: #2a2420;
  position: relative;
}

.foqu-media iframe {
  border: 0;
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.foqu-cover {
  display: block;
  inset: 0;
  overflow: hidden;
  position: absolute;
}

.foqu-cover img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  width: 100%;
}

.foqu-cover:hover img {
  transform: scale(1.03);
}

.foqu-cover::after {
  background: linear-gradient(180deg, transparent 55%, rgba(20, 14, 10, 0.45));
  content: "";
  inset: 0;
  position: absolute;
}

.foqu-cover__play {
  align-items: center;
  background: rgba(255, 250, 242, 0.92);
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  color: var(--fq-red);
  display: flex;
  height: 56px;
  justify-content: center;
  left: 50%;
  padding-left: 3px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  transition:
    transform 0.2s,
    opacity 0.2s;
  width: 56px;
  z-index: 1;
}

.foqu-cover:hover .foqu-cover__play {
  transform: translate(-50%, -50%) scale(1.06);
}

/* With a mouse the button waits for the pointer, so a row of covers reads as
   pictures rather than as a row of buttons. A touch screen has no hover to
   wait for, and a keyboard reader gets it on focus. */
@media (hover: hover) and (pointer: fine) {
  .foqu-cover__play {
    opacity: 0;
  }

  .foqu-card:hover .foqu-cover__play,
  .foqu-cover:focus-visible .foqu-cover__play {
    opacity: 1;
  }
}

.foqu-cover__len {
  bottom: 10px;
  color: #fffaf2;
  font-family: -apple-system, "Helvetica Neue", sans-serif;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  position: absolute;
  right: 12px;
  z-index: 1;
}

.foqu-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 18px 16px;
}

.foqu-name {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0 0 4px;
}

.foqu-by,
.foqu-note {
  color: var(--fq-muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

.foqu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
}

.foqu-from {
  color: #8a8073;
  font-size: 13px;
  margin: 12px 0 0;
}

.foqu-empty {
  color: var(--fq-muted);
  text-align: center;
}

/* -- the bar -- */
.foqu-bar {
  bottom: 0;
  left: 0;
  padding: 0 12px 12px;
  pointer-events: none;
  position: fixed;
  right: 0;
  z-index: 30;
}

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

.foqu-bar__inner {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(255, 252, 246, 0.96);
  border: 1px solid #e2d4bb;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(52, 46, 39, 0.16);
  color: #342e27;
  display: flex;
  flex-wrap: wrap;
  font-family: "Songti SC", "Noto Serif CJK SC", serif;
  gap: 8px 16px;
  margin: 0 auto;
  max-width: 920px;
  padding: 10px 14px;
  pointer-events: auto;
}

.foqu-bar__now {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  min-width: 0;
}

.foqu-bar__label {
  color: #a77b35;
  font-size: 12px;
  letter-spacing: 0.16em;
}

.foqu-bar__title {
  font-size: 16px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.foqu-bar__controls {
  align-items: center;
  display: flex;
  flex: 3 1 360px;
  gap: 6px;
  min-width: 0;
}

.foqu-bar__audio {
  flex: 1;
  min-width: 0;
}

.foqu-bar__audio audio {
  display: block;
  height: 40px;
  width: 100%;
}

.foqu-icon {
  align-items: center;
  background: none;
  border: 0;
  border-radius: 50%;
  color: #7a2a1f;
  cursor: pointer;
  display: inline-flex;
  flex: none;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.foqu-icon:hover {
  background: #f6efe2;
}

.foqu-icon:disabled {
  color: #c9bfae;
  cursor: default;
}

.foqu-bar__error {
  color: #8f2b1f;
  flex-basis: 100%;
  font-size: 14px;
  margin: 0;
}

@media (max-width: 560px) {
  .foqu {
    padding-top: 16px;
  }

  .foqu-grid {
    gap: 16px;
  }

  .foqu-bar {
    padding: 0 8px 8px;
  }

  .foqu-bar__inner {
    padding: 8px 10px;
  }

  .foqu-icon {
    height: 40px;
    width: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .foqu-cover img,
  .foqu-cover__play,
  .foqu-card,
  .foqu-btn,
  .foqu-jump__link {
    transition: none;
  }
}

/* `hidden` loses to the display rules above. */
.foqu-cover[hidden],
.foqu-btn[hidden] {
  display: none;
}
