/**
 * 「曲を探す」固定ページだけで読み込まれるスタイル。
 * 他のページに影響させないため .sfl-page 配下に限定。
 */
.sfl-page {
  --sfl-ink: #25313d;
  --sfl-muted: #647381;
  --sfl-title: #173a5c;
  --sfl-title-hover: #126696;
  --sfl-accent: #315b55;
  --sfl-border: #e4e9e7;
  --sfl-paper: #ffffff;
  --sfl-soft: #f5f8f6;
  color: var(--sfl-ink);
  padding: 40px 20px 96px;
  background: var(--sfl-paper);
}

.sfl-page *,
.sfl-page *::before,
.sfl-page *::after { box-sizing: border-box; }
.sfl-page [hidden] { display: none !important; }
.sfl-container { width: 100%; max-width: 1160px; margin: 0 auto; }

.sfl-page__head { margin: 0 0 34px; }
.sfl-page__eyebrow {
  margin: 0 0 8px;
  color: var(--sfl-accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .18em;
}
.sfl-page__title {
  font-size: clamp(27px, 3.2vw, 37px);
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: .02em;
  margin: 0 0 14px;
}
.sfl-page__intro { margin: 0; color: var(--sfl-muted); font-size: 14px; line-height: 1.8; }
.sfl-admin-notice {
  border-left: 4px solid #ad7d27;
  padding: 12px 16px;
  background: #fff8ea;
  margin: 0 0 20px;
}

.sfl-layout {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 38px;
  align-items: start;
}

.sfl-filter-panel {
  position: sticky;
  top: 24px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
}
.sfl-filter-panel__inner {
  border: 1px solid var(--sfl-border);
  background: var(--sfl-paper);
  border-radius: 14px;
  padding: 24px 21px;
}
.sfl-filter-panel__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.sfl-filter-panel__title { font-size: 17px; font-weight: 750; margin: 0; line-height: 1.5; }
.sfl-filter-panel__close { display: none; }
.sfl-filter-section { border: 0; margin: 0 0 25px; padding: 0; min-width: 0; }
.sfl-filter-section__title { display: block; padding: 0; margin: 0 0 10px; font-size: 13px; font-weight: 750; color: var(--sfl-ink); }
.sfl-keyword {
  display: block;
  width: 100%;
  padding: 12px 13px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--sfl-ink);
  background: #fff;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  box-shadow: none;
}
.sfl-keyword:focus,
.sfl-sort:focus,
.sfl-page button:focus-visible,
.sfl-song__title a:focus-visible { outline: 2px solid #5f9f91; outline-offset: 3px; }
.sfl-filter-hint { margin: 7px 0 0; font-size: 11px; color: var(--sfl-muted); line-height: 1.5; }
.sfl-checkbox-list { display: flex; flex-direction: column; gap: 10px; }
.sfl-checkbox { display: flex; align-items: center; gap: 9px; min-height: 26px; cursor: pointer; line-height: 1.5; font-size: 13px; }
.sfl-checkbox input { appearance: auto; accent-color: var(--sfl-accent); width: 16px; height: 16px; margin: 0; flex: 0 0 16px; cursor: pointer; }
.sfl-stars { letter-spacing: .04em; }
.sfl-filter-panel__footer { display: flex; flex-direction: column; gap: 10px; }
.sfl-filter-reset,
.sfl-filter-apply,
.sfl-open-filters,
.sfl-empty__reset { cursor: pointer; border-radius: 8px; font-weight: 700; font-size: 13px; line-height: 1.5; }
.sfl-filter-reset { background: #fff; color: var(--sfl-accent); border: 1px solid #b8ccc6; padding: 10px; }
.sfl-filter-reset:hover { background: var(--sfl-soft); }
.sfl-filter-apply { display: none; }
.sfl-mobile-toolbar { display: none; }

.sfl-results { min-width: 0; }
.sfl-results__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 54px;
  margin-bottom: 8px;
}
.sfl-results__count { margin: 0; font-size: 13px; color: var(--sfl-muted); white-space: nowrap; }
.sfl-results__count strong { color: var(--sfl-ink); font-size: 21px; font-weight: 750; padding-right: 3px; }
.sfl-sort-label { display: flex; align-items: center; gap: 10px; color: var(--sfl-muted); font-size: 12px; white-space: nowrap; }
.sfl-sort {
  min-width: 166px;
  margin: 0;
  background: #fff;
  color: var(--sfl-ink);
  border: 1px solid #d5ddda;
  border-radius: 8px;
  font-size: 13px;
  padding: 9px 30px 9px 12px;
  cursor: pointer;
}
/* 楽曲行全体がリンク：唯一の曲名リンクをCSSで行全域に拡張する。 */
.sfl-song-list { border-top: 1px solid var(--sfl-border); }
.sfl-song {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 12px;
  border-bottom: 1px solid var(--sfl-border);
  cursor: pointer;
  transition: background-color .15s ease;
}
.sfl-song:hover,
.sfl-song:focus-within { background: #f4f8fb; }
.sfl-song:focus-within { outline: 2px solid #4b8caf; outline-offset: -2px; }
.sfl-song__content { min-width: 0; }
.sfl-song__title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-bottom: 9px; }
.sfl-song__title {
  margin: 0;
  padding: 0;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
  letter-spacing: .01em;
}
.sfl-song__title a {
  color: var(--sfl-title);
  font-weight: inherit;
  text-decoration: none;
  border: 0;
}
/* ::after が行を覆うため、メタ情報・右端矢印を押しても曲の詳細へ遷移する。 */
.sfl-song__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.sfl-song:hover .sfl-song__title a,
.sfl-song__title a:hover { color: var(--sfl-title-hover); text-decoration: underline; text-underline-offset: 4px; }
.sfl-song__title a:focus-visible { outline: 0; }
.sfl-accompaniment-label {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 5px;
  color: #694c31;
  background: #f7f1e8;
  border: 1px solid #e8dbc9;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.sfl-song__meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 13px; font-size: 12px; line-height: 1.6; color: var(--sfl-muted); }
.sfl-song__genre { color: var(--sfl-accent); }

/* 難易度を5段階の控えめな色付きバッジで表示 */
.sfl-song__difficulty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 25px;
  padding: 2px 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .025em;
  white-space: nowrap;
  line-height: 1.55;
}
.sfl-song__difficulty--1 { color: #597321; background: #f1f9e2; border-color: #d8e8b4; } /* 黄緑 */
.sfl-song__difficulty--2 { color: #216b43; background: #e5f5e9; border-color: #bbe2c5; } /* 緑 */
.sfl-song__difficulty--3 { color: #82630f; background: #fff7d8; border-color: #efdd9f; } /* 黄色 */
.sfl-song__difficulty--4 { color: #a45217; background: #fff0df; border-color: #f0d2ae; } /* オレンジ */
.sfl-song__difficulty--5 { color: #a52c37; background: #fee8ea; border-color: #f1c0c5; } /* 赤 */

/* 小さな再生マークではなく、円形の再生アイコンを持つ動画バッジ */
.sfl-song__video {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 25px;
  padding: 2px 9px 2px 6px;
  border-radius: 999px;
  border: 1px solid #cbe0f0;
  background: #edf5fb;
  color: #28658f;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.55;
  white-space: nowrap;
}
.sfl-song__video svg {
  width: 18px;
  height: 18px;
  display: block;
  flex: 0 0 18px;
}
.sfl-song__chevron {
  flex: 0 0 auto;
  color: #8296a4;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  transition: transform .15s ease, color .15s ease;
}
.sfl-song:hover .sfl-song__chevron { color: var(--sfl-title-hover); transform: translateX(2px); }

.sfl-empty { text-align: center; padding: 65px 12px; color: var(--sfl-muted); font-size: 13px; }
.sfl-empty p { margin: 0 0 9px; }
.sfl-empty__title { font-weight: 750; font-size: 18px; color: var(--sfl-ink); }
.sfl-empty__reset { margin-top: 17px; padding: 10px 22px; background: var(--sfl-soft); color: var(--sfl-accent); border: 1px solid #cbdcd6; }
.sfl-noscript { padding: 14px 0; font-size: 13px; color: var(--sfl-muted); }
.sfl-filter-overlay { display: none; }

@media (max-width: 850px) {
  .sfl-page { padding: 25px 16px 70px; }
  .sfl-page__head { margin-bottom: 22px; }
  .sfl-page__intro { font-size: 13px; }
  .sfl-layout { display: block; }
  .sfl-mobile-toolbar { display: flex; justify-content: flex-end; margin: 0 0 10px; }
  .sfl-open-filters { border: 1px solid #bfcfc8; color: var(--sfl-accent); background: #fff; padding: 9px 13px; }
  .sfl-open-filters span { padding-right: 4px; }
  .sfl-filter-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    z-index: 99991;
    width: min(90vw, 390px);
    max-height: none;
    overflow: hidden;
    background: #fff;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s ease;
    box-shadow: -10px 0 40px rgba(12, 33, 27, .14);
  }
  .sfl-filter-panel.is-open { transform: translateX(0); visibility: visible; }
  .sfl-filter-panel__inner { display: flex; flex-direction: column; height: 100%; padding: 0; border: none; border-radius: 0; }
  .sfl-filter-panel__header { flex: 0 0 auto; padding: 21px 22px 17px; margin: 0; border-bottom: 1px solid var(--sfl-border); }
  .sfl-filter-panel__close { display: inline-flex; justify-content: center; align-items: center; border: 0; background: transparent; color: var(--sfl-ink); font-size: 28px; width: 35px; height: 35px; padding: 0; cursor: pointer; }
  .sfl-filter-panel__body { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding: 24px 22px 8px; }
  .sfl-filter-panel__footer { flex: 0 0 auto; flex-direction: row; padding: 15px 18px; background: #fff; border-top: 1px solid var(--sfl-border); }
  .sfl-filter-panel__footer button { flex: 1; }
  .sfl-filter-apply { display: block; background: var(--sfl-accent); color: #fff; border: 1px solid var(--sfl-accent); padding: 10px 12px; }
  .sfl-filter-overlay:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 99990; background: rgba(17, 30, 27, .48); }
  html.sfl-scroll-locked { overflow: hidden; }
  .sfl-song { padding: 17px 8px; }
  .sfl-song__title { font-size: 17px; }
  .sfl-song__meta { gap: 5px 11px; }
}

@media (max-width: 480px) {
  .sfl-results__toolbar { flex-wrap: wrap; align-items: center; }
  .sfl-sort-label { gap: 6px; }
  .sfl-sort { min-width: 145px; padding: 8px 24px 8px 8px; font-size: 12px; }
  .sfl-page__title { font-size: 27px; }
  .sfl-song__chevron { font-size: 22px; }
  .sfl-song__title { font-size: 16.5px; }
  .sfl-song__difficulty { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .sfl-page *, .sfl-page *::before, .sfl-page *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}