/* ===== Base ===== */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", sans-serif;
}

/* ===== Animation ===== */
.fade-in {
  animation: fadeIn 0.4s ease-out both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Video list ===== */
#videoList div {
  border-radius: 8px;
}

#videoList a:hover {
  text-decoration: underline;
}

#videoList .playing {
  background-color: #fffbe6;
  border-left: 4px solid #facc15;
}

.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
  line-height: 1.4;
  white-space: nowrap;
}

.meta-label {
  font-weight: 600;
  margin-right: 2px;
  color: #374151;
}

.meta-value {
  margin-right: 16px;
}

.video-item-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  min-width: 0;
}

.video-title {
  flex: 3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  font-weight: 600;
  color: #1e40af;
}

.video-artist {
  flex: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #374151;
}

.video-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 1rem;
  font-size: 0.875rem;
  color: #4b5563;
  overflow: hidden;
  white-space: nowrap;
}

.video-meta > span:first-child {
  flex: 0 0 auto;
}

.video-meta-waku {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 400;
  color: #6b7280;
}

/* ===== Header and sticky filter area ===== */
header {
  position: static;
  background-color: white;
}

.site-info-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 9999px;
  background: transparent;
  cursor: pointer;
}

.site-info-icon-button:hover,
.site-info-icon-button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.4);
  outline-offset: 3px;
}

.site-info-icon-button img {
  display: block;
  object-fit: contain;
}

.site-info-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
}

.site-info-modal.hidden {
  display: none;
}

.site-info-modal__panel {
  position: relative;
  width: min(92vw, 640px);
  max-height: min(86vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.24);
}

.site-info-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9999px;
  background: rgba(243, 244, 246, 0.94);
  color: #374151;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.site-info-modal__close:hover,
.site-info-modal__close:focus-visible {
  background: #e5e7eb;
  color: #1d4ed8;
  outline: none;
}

.site-info-modal__body {
  overflow-y: auto;
  padding: 26px 26px 20px;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.75;
}

.site-info-modal__body h2 {
  margin: 0 40px 14px 0;
  color: #1f2937;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
}

.site-info-modal__body h3 {
  margin: 22px 0 8px;
  color: #1f3f7a;
  font-size: 1rem;
  font-weight: 700;
}

.site-info-modal__body p {
  margin: 0 0 10px;
}

.site-info-modal__lead {
  color: #1f2937;
  font-size: 0.95rem;
  font-weight: 600;
}

.site-info-search-tips {
  display: grid;
  gap: 8px;
  margin: 10px 0 16px;
}

.site-info-search-tips div {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.9fr) 1fr;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
}

.site-info-search-tips dt,
.site-info-search-tips dd {
  margin: 0;
}

.site-info-search-tips code {
  display: inline-block;
  border-radius: 999px;
  background: #1f3f7a;
  color: #ffffff;
  padding: 0.18rem 0.56rem;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.site-info-search-tips dd {
  color: #4b5563;
  font-size: 0.84rem;
}

.site-info-manual-play {
  margin: 8px 0 14px;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.site-info-manual-play p {
  margin-bottom: 8px;
}

.site-info-manual-play__note {
  color: #6b7280;
  font-size: 0.84rem;
}

.site-info-manual-play__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 2px;
  padding: 0.45rem 0.9rem;
  border: 1px solid #93c5fd;
  border-radius: 999px;
  background: #ffffff;
  color: #1f3f7a;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.site-info-manual-play__button:hover,
.site-info-manual-play__button:focus-visible {
  background: #eff6ff;
  outline: none;
}

.site-info-manual-play__button[aria-pressed="true"] {
  border-color: #1f3f7a;
  background: #1f3f7a;
  color: #ffffff;
}

@media (max-width: 520px) {
  .site-info-modal__body {
    padding: 24px 18px 18px;
  }

  .site-info-search-tips div {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .site-info-manual-play {
    padding: 11px 12px;
  }

  .site-info-manual-play__button {
    width: 100%;
  }
}

.site-info-modal__footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px 16px;
  border-top: 1px solid #e5e7eb;
  background: #f8fafc;
}

.site-info-modal__button {
  border: 0;
  border-radius: 9999px;
  background: #2563eb;
  color: #ffffff;
  padding: 0.55rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.site-info-modal__button:hover,
.site-info-modal__button:focus-visible {
  background: #1d4ed8;
  outline: none;
}

body.site-info-modal-open {
  overflow: hidden;
}

section {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: white;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* ===== Desktop filter panel ===== */
#desktopFilterPanel {
  max-height: min(58vh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body.player-visible #desktopFilterPanel {
  max-height: min(36vh, 380px);
}

#desktopFilterPanel .modal-collab-scroll {
  max-height: 96px;
}

#desktopSortButtons button,
#desktopFormatTags button,
#desktopRoleTags button,
#desktopCollabLiverTags button,
#desktopCollabUnitTags button,
#filterModal [data-sort] {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 500;
  padding: 0.25rem 0.75rem;
}

.exclusion-style-active {
  border-color: #fda4af !important;
  background: #fff1f2 !important;
  color: #be123c !important;
  box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.08) !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
}

/* ===== Tag buttons ===== */
.tag-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 9999px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tag-xs {
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.tag-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1rem;
}

.tag-desktop {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
}

.tag-modal-sort {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.tag-active-chip {
  flex-shrink: 0;
  color: #374151;
  background: #f9fafb;
  border-color: #d1d5db;
}

.tag-active-chip:hover {
  background: #f3f4f6;
}

.tag-sort {
  color: #1d4ed8;
  background: #dbeafe;
}

.tag-sort-active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

.tag-style {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fdba74;
}

.tag-style-active {
  color: #fff;
  background: #ea580c;
  border-color: #ea580c;
}

.tag-platform {
  color: #7e22ce;
  background: #faf5ff;
  border-color: #d8b4fe;
}

.tag-sm.tag-platform {
  background: #f3e8ff;
  border-color: transparent;
}

.tag-platform-active {
  color: #fff;
  background: #9333ea;
  border-color: #9333ea;
}

.tag-time {
  color: #15803d;
  background: #dcfce7;
}

.tag-time-active {
  color: #fff;
  background: #16a34a;
  border-color: #16a34a;
}

.tag-format {
  color: #be185d;
  background: #fdf2f8;
  border-color: #f9a8d4;
}

.tag-sm.tag-format {
  background: #fce7f3;
  border-color: transparent;
}

.tag-desktop.tag-format {
  background: #fdf2f8;
  border-color: #fbcfe8;
}

.tag-format-active {
  color: #fff;
  background: #db2777;
  border-color: #db2777;
}

.tag-format-3d {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.tag-format-3d-active {
  color: #fff;
  background: #0284c7;
  border-color: #0284c7;
}

.tag-role-filter {
  color: #b45309;
  background: #fef3c7;
}

.tag-role-filter-active {
  color: #fff;
  background: #d97706;
  border-color: #d97706;
}

.tag-desktop.tag-role-filter {
  color: #854d0e;
  background: #fefce8;
  border-color: #fef08a;
}

.tag-desktop.tag-role-filter.tag-role-filter-active {
  color: #fff;
  background: #ca8a04;
  border-color: #ca8a04;
}

.tag-collab-liver {
  color: #374151;
  background: #fff;
  border-color: #d1d5db;
}

.tag-sm.tag-collab-liver {
  background: #f3f4f6;
  border-color: transparent;
}

.tag-desktop.tag-collab-liver {
  background: #fff;
  border-color: #e5e7eb;
}

.tag-collab-liver-active {
  color: #fff;
  background: #4b5563;
  border-color: #6b7280;
}

.tag-sm.tag-collab-liver.tag-collab-liver-active {
  background: #374151;
  border-color: #374151;
}

.tag-collab-unit {
  color: #374151;
  background: #fff;
  border-color: #d1d5db;
}

.tag-sm.tag-collab-unit {
  background: #f3f4f6;
  border-color: transparent;
}

.tag-desktop.tag-collab-unit {
  background: #fff;
  border-color: #e5e7eb;
}

.tag-collab-unit-active {
  color: #fff;
  background: #4b5563;
  border-color: #6b7280;
}

.tag-sm.tag-collab-unit.tag-collab-unit-active {
  background: #374151;
  border-color: #374151;
}

.tag-style-solo {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fdba74;
}

.tag-style-solo.tag-style-active {
  color: #fff;
  background: #ea580c;
  border-color: #ea580c;
}

.tag-style-collab {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fdba74;
}

.tag-style-collab.tag-style-active {
  color: #fff;
  background: #ea580c;
  border-color: #ea580c;
}

.tag-style-ayakaki {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fdba74;
}

.tag-style-ayakaki.tag-style-active {
  color: #fff;
  background: #ea580c;
  border-color: #ea580c;
}

.tag-style-default {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fdba74;
}

.tag-style-default.tag-style-active {
  color: #fff;
  background: #ea580c;
  border-color: #ea580c;
}

.tag-role {
  color: #374151;
  background: #fff;
  border-color: #d1d5db;
}

.tag-role-active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

.tag-role-vocal {
  color: #1f2937;
  background: #f3f4f6;
  border-color: #d1d5db;
}

.tag-role-vocal.tag-role-active {
  color: #fff;
  background: #374151;
  border-color: #374151;
}

.tag-role-dance {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.tag-role-dance.tag-role-active {
  color: #fff;
  background: #f43f5e;
  border-color: #f43f5e;
}

.tag-role-piano {
  color: #c2410c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.tag-role-piano.tag-role-active {
  color: #fff;
  background: #fb923c;
  border-color: #fb923c;
}

.tag-role-euphonium {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.tag-role-euphonium.tag-role-active {
  color: #fff;
  background: #fbbf24;
  border-color: #fbbf24;
}

.tag-role-movie {
  color: #4d7c0f;
  background: #f7fee7;
  border-color: #d9f99d;
}

.tag-role-movie.tag-role-active {
  color: #fff;
  background: #84cc16;
  border-color: #84cc16;
}

.tag-role-chorus {
  color: #0369a1;
  background: #f0f9ff;
  border-color: #bae6fd;
}

.tag-role-chorus.tag-role-active {
  color: #fff;
  background: #0ea5e9;
  border-color: #0ea5e9;
}

.tag-role-illustration {
  color: #0e7490;
  background: #ecfeff;
  border-color: #a5f3fc;
}

.tag-role-illustration.tag-role-active {
  color: #fff;
  background: #06b6d4;
  border-color: #06b6d4;
}

.tag-button:hover {
  filter: brightness(0.98);
}

.tag-style:hover,
.tag-time:hover,
.tag-platform:hover,
.tag-format:hover,
.tag-format-3d:hover,
.tag-role-filter:hover,
.tag-collab-liver:hover,
.tag-collab-unit:hover,
.tag-role:hover {
  filter: none;
}

.tag-style:hover { background: #ffedd5; }
.tag-time:hover { background: #bbf7d0; }
.tag-platform:hover { background: #f3e8ff; }
.tag-format:hover { background: #fce7f3; }
.tag-format-3d:hover { background: #e0f2fe; }
.tag-role-filter:hover { background: #fde68a; }
.tag-collab-liver:hover { background: #f3f4f6; }
.tag-collab-unit:hover { background: #f3f4f6; }
.tag-role:hover { background: #f3f4f6; }

.tag-style-active:hover,
.tag-time-active:hover,
.tag-platform-active:hover,
.tag-format-active:hover,
.tag-format-3d-active:hover,
.tag-role-filter-active:hover,
.tag-collab-liver-active:hover,
.tag-collab-unit-active:hover,
.tag-role-active:hover {
  filter: brightness(0.96);
}

.tag-sort.tag-sort-active:hover,
.tag-style.tag-style-active:hover { background: #ea580c; }
.tag-platform.tag-platform-active:hover { background: #9333ea; }
.tag-time.tag-time-active:hover { background: #16a34a; }
.tag-format.tag-format-active:hover { background: #db2777; }
.tag-format-3d.tag-format-3d-active:hover { background: #0284c7; }
.tag-role-filter.tag-role-filter-active:hover { background: #d97706; }
.tag-desktop.tag-role-filter.tag-role-filter-active:hover { background: #ca8a04; }
.tag-collab-liver.tag-collab-liver-active:hover { background: #4b5563; }
.tag-sm.tag-collab-liver.tag-collab-liver-active:hover { background: #374151; }
.tag-collab-unit.tag-collab-unit-active:hover { background: #4b5563; }
.tag-sm.tag-collab-unit.tag-collab-unit-active:hover { background: #374151; }
.tag-role.tag-role-active:hover { background: #2563eb; }
.tag-role-vocal.tag-role-active:hover { background: #374151; }
.tag-role-dance.tag-role-active:hover { background: #f43f5e; }
.tag-role-piano.tag-role-active:hover { background: #fb923c; }
.tag-role-euphonium.tag-role-active:hover { background: #fbbf24; }
.tag-role-movie.tag-role-active:hover { background: #84cc16; }
.tag-role-chorus.tag-role-active:hover { background: #0ea5e9; }
.tag-role-illustration.tag-role-active:hover { background: #06b6d4; }

@media (max-height: 820px) {
  #desktopFilterPanel {
    max-height: 48vh;
  }

  body.player-visible #desktopFilterPanel {
    max-height: 32vh;
  }
}

/* ===== Active filter chips ===== */
#activeTagChips {
  position: sticky;
  top: 0;
  z-index: 18;
  margin-bottom: 12px;
  pointer-events: none;
}

#activeTagChipsInner {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.375rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;

  border: 1px solid rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);

  pointer-events: auto;
}

#activeTagChipsInner .exclusion-style-chip {
  border: 1px solid #fda4af !important;
  background: #fff1f2 !important;
  color: #be123c !important;
  font-size: 0.75rem !important;
  line-height: 1rem !important;
}

#activeTagChipsInner::-webkit-scrollbar {
  display: none;
}

@media (min-width: 640px) {
  body.desktop-filter-open #activeTagChips {
    display: none !important;
    top: 0 !important;
  }
}

/* ===== Fixed player ===== */
#fixedPlayer {
  display: none;
  bottom: 0;
}

#fixedPlayer .controls-wrapper {
  padding-bottom: 8px;
}

#nowPlayingWrapper {
  background-color: #e0f2fe;
  box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.08);
  height: auto;
  padding: 3px 12px;
}

#nowPlayingWrapper.hidden {
  display: none;
}

#playerResizeHandle {
  position: absolute;
  top: -10px;
  left: 0;
  width: 100%;
  height: 12px;
  cursor: ns-resize;
  z-index: 5;
  background: transparent;
  touch-action: none;
}

#playerResizeHandle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 4px;
  transform: translateX(-50%);
  width: 56px;
  height: 4px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.25);
}

/* ===== Player controls ===== */
.player-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 3px 10px;
}

@media (min-width: 769px) {
  #nowPlayingWrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 4px 14px;
  }

  #nowPlaying {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0 !important;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
  }

  #nowPlayingTitle {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-controls {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 5px;
    padding: 0;
  }

  .player-control-button {
    min-height: 34px;
    padding: 7px 9px;
    white-space: nowrap;
  }

  .player-control-label {
    white-space: nowrap;
  }
}

.player-control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid rgba(107, 114, 128, 0.24);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  color: #374151;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.07);
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease, transform 0.1s ease;
}

.player-control-button:hover {
  background: #ffffff;
  border-color: rgba(37, 99, 235, 0.35);
}

.player-control-button:active {
  transform: scale(0.98);
}

.player-control-button[data-state="off"] {
  opacity: 0.48;
  background: rgba(255, 255, 255, 0.58);
}

.player-control-button[data-state="all"],
.player-control-button[data-state="one"],
.player-control-button[data-state="on"] {
  opacity: 1;
  border-color: rgba(22, 163, 74, 0.42);
  background: #dcfce7;
}

.player-control-button[data-state="one"] {
  border-color: rgba(37, 99, 235, 0.42);
  background: #dbeafe;
}

.player-control-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.player-control-icon img {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.player-control-button[data-state="off"] .player-control-icon img {
  opacity: 0.54;
}

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

@media (max-width: 768px) {
  #fixedPlayer > div {
    padding-bottom: calc(1rem + 8px + env(safe-area-inset-bottom, 0px));
  }

  #playerFrameWrapper:has(#youtubePlayer:not(.hidden)),
  #playerFrameWrapper:has(#youtubePlayer:not(.hidden)) #youtubePlayer,
  #playerFrameWrapper:has(#youtubePlayer:not(.hidden)) #youtubePlayer iframe {
    overscroll-behavior: contain;
    touch-action: none;
  }

  #nowPlayingWrapper {
    padding-top: 3px;
    padding-bottom: 4px;
  }
}

@media (max-width: 480px) {
  .player-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(38px, 1fr));
    gap: 4px;
    padding: 3px 8px;
  }

  .player-control-button {
    min-width: 0;
    width: 100%;
    min-height: 40px;
    padding: 7px 6px;
  }
}

/* ===== Player end countdown ===== */
.end-countdown-controls,
.full-version-prompt-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: min(68vw, 360px);
}

.end-countdown-controls.hidden,
.full-version-prompt-controls.hidden {
  display: none;
}

.end-countdown-next,
.end-countdown-keep,
.full-version-prompt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(148, 163, 184, 0.55);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.92);
  color: #374151;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.end-countdown-next {
  gap: 4px;
  min-height: 28px;
  padding: 0 10px;
}

.end-countdown-keep {
  min-height: 28px;
  padding: 0 9px;
}

.full-version-prompt-button {
  min-height: 28px;
  padding: 0 12px;
}

.end-countdown-next:hover,
.end-countdown-keep:hover,
.full-version-prompt-button:hover {
  background: #ffffff;
  color: #2563eb;
}

.end-countdown-time {
  display: inline-block;
  min-width: 2.25em;
  color: #dc2626;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

@media (max-width: 480px) {
  .end-countdown-controls,
  .full-version-prompt-controls {
    gap: 4px;
    max-width: calc(100vw - 96px);
  }

  .end-countdown-next {
    flex-direction: column;
    gap: 1px;
    min-height: 30px;
    padding: 2px 8px;
  }

  .end-countdown-label {
    font-size: 10px;
  }

  .end-countdown-time {
    font-size: 13px;
  }

  .end-countdown-keep,
  .full-version-prompt-button {
    min-height: 30px;
    padding: 0 8px;
  }
}

.auto-play-notice {
  font-size: 12px;
  color: #6b7280;
  text-align: center;
  margin-top: -4px;
  margin-bottom: 4px;
}

.manual-play-test-notice {
  position: fixed;
  right: 1rem;
  bottom: 5.75rem;
  z-index: 60;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(31, 63, 122, 0.94);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  pointer-events: none;
}

/* ===== TikTok player embed ===== */
#tiktokPlayer {
  align-items: flex-start;
  justify-content: center;
  padding: 8px 0;
}

#tiktokPlayer .tiktok-embed,
#tiktokPlayer iframe {
  width: min(100%, 360px) !important;
  max-width: 360px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (max-width: 480px) {
  #tiktokPlayer .tiktok-embed,
  #tiktokPlayer iframe {
    width: min(100%, 340px) !important;
    max-width: 340px !important;
  }
}

/* ===== Filter modal sections ===== */
.modal-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.modal-section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.modal-subsection-title {
  margin-top: 8px;
  margin-bottom: 4px;
  color: #9ca3af;
  font-size: 11px;
  font-weight: 700;
}

.modal-collab-scroll {
  max-height: 116px;
  overflow-y: auto;
  padding: 4px 4px 4px 0;
}
