/* CSS Variables for Core Design System */
:root {
  --bg-color: #030712;
  --surface-color: rgba(255, 255, 255, 0.04);
  --surface-hover: rgba(255, 255, 255, 0.07);
  --text-primary: #f9fafb;
  --text-secondary: #9ca3af;
  --spotify-green: #1DB954;
  --youtube-red: #FF0000;
  --overlay-strong: rgba(0, 0, 0, 0.7);
  --overlay-soft: rgba(0, 0, 0, 0.5);
  --glass-bg: rgba(5, 8, 22, 0.55);
  --glass-border: 1px solid rgba(255, 255, 255, 0.1);
  --glass-border-hover: 1px solid rgba(255, 255, 255, 0.22);
  --glass-blur: blur(20px);

  /* Hololive Accents */
  --holo-blue: rgba(56, 189, 248, 0.85);
  --holo-blue-rgb: 56, 189, 248;
  --holo-purple: rgba(168, 85, 247, 0.85);

  /* Spacing */
  --spacing-2xs: 0.25rem;
  --spacing-xs: 0.4rem;
  --spacing-sm: 0.6rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Radius */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.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;
}

:is(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--holo-blue);
  outline-offset: 3px;
}

html, body {
  width: 100%;
}

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 70% 50% at 15% 10%, rgba(56, 189, 248, 0.13) 0%, transparent 60%),
    radial-gradient(ellipse 60% 55% at 85% 80%, rgba(168, 85, 247, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 55% 45%, rgba(99, 102, 241, 0.07) 0%, transparent 55%),
    linear-gradient(160deg, #030917 0%, #050c1c 50%, #08071a 100%);
  background-attachment: fixed;
}

#main-heading {
  margin: 0.6rem 0 0.6rem 0 !important;
}

.blur-glass {
  background: rgba(5, 8, 22, 0.55);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.3), 0 1px 0 rgba(255,255,255,0.06) inset;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0.8rem 0;
}

.header-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.header-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
}

.header-top-row .search-container {
  max-width: 520px;
}

.header-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  flex-wrap: wrap;
  padding-top: 0.2rem;
  border-top: none;
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.top-filters .filter-label {
  min-width: auto;
}

.top-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0;
}

.home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.4rem 0 0.8rem;
}

.filter-controls-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* ============================================================
   UI Cleanup Overrides (Tighter, Clearer Layout)
   ============================================================ */
.header {
  padding: 0.55rem 0;
}

.header-content {
  gap: 0.7rem;
}

.header-top-row .search-container {
  max-width: 420px;
}

.header-nav {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 3px;
  border-radius: 12px;
  gap: 2px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin: 0 1rem;
}

.header-nav-btn {
  padding: 0.4rem 0.9rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border-radius: 9px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.header-user-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  margin-left: 0.5rem;
}

.header-user-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.header-user-btn.active {
  background: rgba(56, 189, 248, 0.1);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.header-nav-btn.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.header-nav-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.header-bottom-row {
  gap: 0.75rem;
}

.filter-group.main-filter {
  flex: 1;
  min-width: 220px;
}

.filter-controls {
  flex: 0 0 auto;
  margin-left: auto;
  gap: 0.6rem;
}

.talent-filter {
  min-width: 200px;
  max-width: 240px;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
}

.filter-label {
  font-size: 0.78rem;
  min-width: 56px;
}

.platform-toggle {
  display: flex !important;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 3px;
  width: auto;
  gap: 2px;
}

.p-toggle-btn {
  width: auto;
  min-width: 32px;
  height: 32px;
  padding: 0 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.help-btn {
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.clear-filters-btn {
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
  font-size: 0.82rem;
}

.save-filter-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  gap: 0.4rem;
}

.save-filter-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
}

.save-filter-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.5);
}

/* Saved Filters Grid */
.saved-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.saved-filter-card {
  background: var(--surface-color);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: var(--transition);
  position: relative;
}

.saved-filter-card:hover {
  background: var(--surface-hover);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.saved-filter-info {
  flex: 1;
}

.saved-filter-name {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #fff;
}

.saved-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: var(--text-secondary);
}

.saved-filter-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.btn-apply-filter {
  flex: 1;
  background: rgba(56, 189, 248, 0.2);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-apply-filter:hover {
  background: rgba(56, 189, 248, 0.3);
}

.btn-delete-saved-filter {
  background: rgba(255, 107, 107, 0.1);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.2);
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-delete-saved-filter:hover {
  background: rgba(255, 107, 107, 0.2);
}

#main-heading {
  margin: 0.45rem 0 0.55rem 0 !important;
  font-size: 1.1rem;
}

.home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.35rem 0 1.2rem;
  flex-wrap: wrap;
}

.main-controls {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Ensure moved buttons look consistent */
.main-controls .help-btn,
.main-controls .save-filter-btn,
.main-controls .clear-filters-btn {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.home-tabs {
  padding: 0.25rem;
}

.home-tab {
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}

.top-filters {
  margin-left: auto;
  gap: 0.6rem;
}

.top-filters .filter-group {
  gap: 0.4rem;
}

.sort-filter,
.year-filter {
  height: 32px;
  padding: 0.35rem 0.7rem;
  font-size: 0.85rem;
  border-radius: 10px;
}

.section-header {
  margin-top: 2rem;
  margin-bottom: 0.9rem;
  padding-left: 0.9rem;
  border-left-width: 4px;
}

.special-section,
.category-section {
  margin-bottom: 3.2rem;
  padding-top: 0.5rem;
}

.main-content {
  margin: 1.4rem auto 3rem;
}

.category-grid {
  gap: 0.85rem;
  margin-top: 0.3rem;
}

.category-card {
  height: 96px;
  border-radius: 12px;
}

.cat-thumbs-grid {
  height: 100%;
}

.cat-info {
  padding: 0.45rem 0.7rem;
  gap: 0.6rem;
}

.cat-icon {
  font-size: 1.25rem;
}

.cat-name {
  font-size: 0.88rem;
}

.cat-desc {
  display: none;
}

.cat-count {
  font-size: 0.66rem;
  padding: 0.15rem 0.45rem;
}

.grid-container {
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.4rem;
  margin-top: 1.4rem;
}

.horizontal-scroll .playlist-card {
  min-width: 440px;
  max-width: 520px;
}

.card-path {
  font-size: 0.75rem;
  margin-bottom: 0.35rem;
  opacity: 0.7;
}

@media (max-width: 900px) {
  .home-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .top-filters {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (min-width: 1400px) {
  .category-grid {
    grid-template-columns: repeat(5, 1fr) !important;
  }
}

@media (min-width: 1100px) and (max-width: 1399px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media (min-width: 800px) and (max-width: 1099px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 799px) {
  .category-grid {
    grid-template-columns: 1fr !important;
  }
}

.home-tabs {
  display: flex;
  width: 100%;
  max-width: 400px;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  margin-bottom: 0;
}

.home-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 0.55rem 1rem;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
  text-align: center;
}

.home-tab.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.home-tab-panel.hidden {
  display: none;
}

.logo {
  font-size: 1.8rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  transition: var(--transition);
  flex-shrink: 0;
}

.logo:hover {
  filter: drop-shadow(0 0 8px var(--holo-blue));
}

.logo .subtitle {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  padding-left: 0.8rem;
  margin-left: 0.2rem;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 800px;
}

.search-icon {
  position: absolute;
  left: 1.2rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: var(--transition);
  z-index: 2;
}

.search-container input {
  width: 100%;
  padding: 1rem 3rem 1rem 3rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
  outline: none;
}

.search-clear-btn {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.search-clear-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.search-clear-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.search-container input:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

.search-container:focus-within .search-icon {
  color: rgba(56, 189, 248, 1);
}

/* ============================================================
   Search Suggestions Dropdown
   ============================================================ */
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(10, 15, 30, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.search-suggestions.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.suggestion-header {
  padding: 0.6rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.highlighted {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.18), rgba(168, 85, 247, 0.14));
}

.suggestion-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-text i {
  color: var(--text-secondary);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: var(--transition);
}

.suggestion-item:hover .suggestion-text i,
.suggestion-item.highlighted .suggestion-text i {
  color: #7dd3fc;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6));
}

.history-item .suggestion-text i {
  color: rgba(168, 85, 247, 0.7);
}

.suggestion-text mark {
  background: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  border-radius: 2px;
  padding: 0 2px;
  font-weight: 700;
}

.suggestion-delete {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.3rem;
  border-radius: 4px;
  transition: var(--transition);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.suggestion-delete:hover {
  color: #ff6b6b;
  background: rgba(255, 107, 107, 0.15);
}

/* Scrollbar for suggestions */
.search-suggestions::-webkit-scrollbar {
  width: 4px;
}

.search-suggestions::-webkit-scrollbar-track {
  background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

/* Search Options & Talent Filter */
.search-options {
  display: flex;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

.search-container {
  flex-grow: 1;
}

.talent-filter {
  padding: 0.7rem 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  border-radius: var(--radius-pill);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: var(--transition);
  min-width: 220px;
  max-width: 280px;
}

.talent-filter:hover,
.talent-filter:focus {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(56, 189, 248, 0.5);
}

.talent-filter option {
  background-color: var(--bg-color);
  color: var(--text-primary);
}

/* Platform Preference Setting */
.platform-setting {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.platform-toggle {
  display: flex;
  width: auto;
  min-width: 160px;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.p-toggle-btn {
  flex: 1;
  height: 32px;
  padding: 0 0.8rem;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition);
  z-index: 1;
}

.p-toggle-btn i {
  font-size: 1rem;
  line-height: 1;
}

.ytm-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  fill: currentColor; /* SVGのpathの色を文字色と同期 */
}

.p-toggle-btn .ytm-icon {
  width: 1rem; /* font-sizeと合わせる */
  height: 1rem;
  margin-top: -2px; /* 位置の微調整 */
}

.play-button .ytm-icon {
  width: 14px;
  height: 14px;
}

/* Filter Action Buttons (Base/Desktop) */
.mobile-action-icons {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-left: 0.5rem;
}

.save-filter-btn, .clear-filters-btn {
  height: 40px;
  padding: 0 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.save-filter-btn:hover, .clear-filters-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.help-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.help-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.p-toggle-btn.active {
  background: #fff;
  color: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.p-toggle-btn.yt.active {
  background: var(--youtube-red);
  color: #fff;
}

.p-toggle-btn.sp.active {
  background: var(--spotify-green);
  color: #fff;
}

/* Special Sections (History, Favorites, All) */
.special-section {
  margin-bottom: 6rem;
  animation: fadeIn 0.5s ease;
  padding-top: 1rem;
}

.category-section {
  margin-bottom: 6rem;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4rem;
  margin-bottom: 1.5rem;
  border-left: 6px solid var(--holo-blue);
  padding-left: 1.2rem;
}

.section-header:first-child {
  margin-top: 1rem;
}

.section-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.horizontal-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0.5rem 0.5rem 1.5rem 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
  scroll-snap-type: x mandatory;
}

.horizontal-scroll .empty-placeholder {
  min-width: 100%;
}

.horizontal-scroll .card {
  min-width: 420px;
  max-width: 520px;
  scroll-snap-align: start;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Unified Card Design */
.card {
  position: relative;
  background: var(--surface-color);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: row;
  gap: var(--spacing-md);
  height: 100%;
  min-width: 260px;
  /* Standard card width */
  max-width: 100%;
}

.card:hover {
  background: var(--surface-hover);
  transform: translateY(-8px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.horizontal-scroll .card {
  min-width: 420px;
  max-width: 520px;
  scroll-snap-align: start;
}

/* Precise Button Positioning */
.btn-fav {
  position: absolute !important;
  top: 12px !important;
  left: 12px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 30;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--overlay-soft);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-fav:hover {
  transform: scale(1.1);
  background: var(--overlay-strong);
}

.btn-fav.active {
  color: #ff4757;
  background: #fff;
}

.btn-copy-subtle {
  position: absolute !important;
  bottom: 12px !important;
  right: 12px !important;
  top: auto !important;
  left: auto !important;
  z-index: 30;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy-subtle:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  transform: scale(1.1);
}

.btn-copy-subtle.success {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.btn-share-fav {
  background: var(--holo-blue);
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
  margin-left: auto;
}

.btn-share-fav:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.shared-list {
  background: rgba(var(--holo-blue-rgb), 0.05);
  border: 2px solid var(--holo-blue);
  padding: 1.5rem;
  border-radius: 1.5rem;
  margin-top: 1rem;
  margin-bottom: 3rem;
}

.close-shared-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.close-shared-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.toggle-filters-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.toggle-filters-btn.active {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.4);
}

/* Advanced Filters Container (Collapsible) */
.advanced-filters {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
}

.advanced-filters.open {
  max-height: 500px;
  opacity: 1;
}

.advanced-filters-content {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.9rem;
  color: var(--text-secondary);
  min-width: 80px;
  font-weight: 600;
}

/* Sort Dropdown */
.sort-filter {
  padding: 0.5rem 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: var(--glass-border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  appearance: none;
  transition: var(--transition);
}

.sort-filter:hover,
.sort-filter:focus {
  background-color: rgba(255, 255, 255, 0.1);
}

.sort-filter option,
.talent-filter option,
.talent-filter optgroup {
  background-color: var(--bg-color);
  color: var(--text-primary);
}

.talent-filter optgroup {
  font-weight: 800;
  color: var(--holo-blue);
  font-style: normal;
  padding: 0.5rem 0;
}

/* Tags Filter */
.tags-container {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.tag-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.tag-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.tag-btn.active {
  background: linear-gradient(135deg, var(--holo-blue), var(--holo-purple));
  color: #fff;
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

/* Mood Buttons */
.mood-container {
  display: flex;
  gap: 1rem;
}

.mood-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-size: 0.92rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
}

.mood-btn[data-mood="hype"]:hover {
  background: rgba(255, 0, 0, 0.15);
  border-color: rgba(255, 0, 0, 0.4);
  transform: translateY(-2px);
  color: #ff6b6b;
}

.mood-btn[data-mood="chill"]:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
  color: #7dd3fc;
}

/* Main Content & Grid */
.main-content {
  max-width: 1600px;
  margin: 2rem auto 4rem;
  padding: 0 1.5rem;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1.5rem;
}

/* Card Styling */
.card {
  background: var(--surface-color);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  background: var(--surface-hover);
}

/* Neon Glow Accents */
.card.spotify:hover {
  border-color: rgba(29, 185, 84, 0.5);
  box-shadow: 0 15px 35px rgba(29, 185, 84, 0.2);
}

.card.youtube:hover {
  border-color: rgba(255, 0, 0, 0.5);
  box-shadow: 0 15px 35px rgba(255, 0, 0, 0.2);
}

.card.both-platforms:hover {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: -10px 15px 35px rgba(29, 185, 84, 0.2),
    10px 15px 35px rgba(255, 0, 0, 0.2);
}

.card-thumbnail {
  width: 120px;
  height: 120px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  aspect-ratio: 1 / 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 18px rgba(0, 0, 0, 0.45);
  transition: var(--transition);
}

.card-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0,
      rgba(255, 255, 255, 0.08) 20%,
      rgba(255, 255, 255, 0.15) 60%,
      rgba(255, 255, 255, 0));
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  opacity: 0.95;
}

.card:hover .card-image {
  transform: scale(1.05);
  opacity: 1;
}

.card:hover .card-thumbnail {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 14px 30px rgba(0, 0, 0, 0.6);
  transform: scale(1.03);
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: var(--spacing-md);
  min-width: 200px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.play-buttons-container {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  max-width: 260px;
}

.btn-play-primary {
  min-width: 120px;
  padding: 0.75rem 1.2rem;
}

.play-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: var(--radius-pill);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition);
  opacity: 1;
  transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.play-button.primary {
  width: 100%;
  font-size: 0.95rem;
}

.play-button.secondary {
  font-size: 0.78rem;
  opacity: 0.85;
  padding: 0.45rem 0.6rem;
  justify-content: center;
}

.play-button.secondary .btn-label {
  display: none;
}

.play-button i {
  font-size: 1.2rem;
}

.btn-youtube {
  background-color: var(--youtube-red);
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-youtube:hover {
  background-color: #ff1a1a;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

.btn-spotify {
  background-color: var(--spotify-green);
  box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
}

.btn-spotify:hover {
  background-color: #1ed760;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4);
}

.playlist-card .btn-youtube:hover {
  box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4), 0 0 15px rgba(255, 31, 31, 0.5);
}

.playlist-card .btn-spotify:hover {
  box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4), 0 0 15px rgba(29, 185, 84, 0.5);
}

.card:hover .play-button:nth-child(2) {
  transition-delay: 0.05s;
}

/* ============================================================
   公式リンクボタン専用スタイル
============================================================ */

/* 通常時の公式ボタン：背景は水色（#27C7FF）、文字とアイコンは白（#ffffff） */
.play-button.btn-official-link {
  background-color: #2A5C98 !important;
  box-shadow: 0 4px 15px rgba(39, 199, 255, 0.3) !important;
  color: #ffffff !important;
}

/* 公式ボタンの中にあるアイコン（SVGやFontAwesome）の色も白に統一 */
.play-button.btn-official-link svg,
.play-button.btn-official-link i {
  color: #ffffff !important;
}

/* ホバー（マウスを乗せた）した時の挙動 */
.play-button.btn-official-link:hover {
  background-color: #27C7FF !important; /* ホバー時は少しだけ濃い水色にする */
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(39, 199, 255, 0.4), 0 0 15px rgba(39, 199, 255, 0.5) !important;
  color: #ffffff !important;
}

/* 縦積みの際に公式ボタンだけアニメーションのズレ（遅延）が起きるのを防ぐ */
.card:hover .play-button.btn-official-link {
  transition-delay: 0s !important;
}

/* Card Content */
.card-content {
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-title {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  letter-spacing: -0.2px;
}

.card-desc {
  display: none !important;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.card-tag {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  appearance: none;
}

.card-tag:hover {
  color: var(--text-primary);
}

.empty-placeholder {
  width: 100%;
  padding: 2rem;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-lg);
  text-align: center;
  color: var(--text-secondary);
}

.grid-container .empty-placeholder {
  grid-column: 1 / -1;
}

.horizontal-scroll .empty-placeholder {
  min-height: 152px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.empty-cta {
  margin-top: 0.8rem;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.empty-cta:hover {
  background: rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
}

.spotify .card-tag:hover {
  color: var(--spotify-green);
  border-color: rgba(29, 185, 84, 0.3);
}

.youtube .card-tag:hover {
  color: var(--youtube-red);
  border-color: rgba(255, 0, 0, 0.3);
}

.both-platforms .card-tag:hover {
  color: #fff;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.1);
}

/* ============================================================
   Breadcrumb Navigation
   ============================================================ */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  /* Allow wrapping instead of squishing */
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.breadcrumb-home {
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-weight: 600;
}

.breadcrumb-home:hover {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
}

.breadcrumb-separator,
.breadcrumb-sep {
  color: rgba(255, 255, 255, 0.2);
  font-size: 1.2rem;
  user-select: none;
  margin: 0 0.2rem;
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 700;
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  white-space: nowrap;
  /* Prevent text inside links from wrapping vertically */
}

.breadcrumb-link:hover {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.1);
}

#breadcrumbContent {
  display: contents;
}

/* ============================================================
   Category Cards
   ============================================================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 0.4rem;
}

@media (max-width: 768px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

.category-card {
  position: relative;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  height: 110px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.07) inset;
}

/* Path info in search results */
.card-path {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.card-path i {
  font-size: 0.75rem;
}

.card-path-icon {
  line-height: 1;
}

.card-talent {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  margin-bottom: 0.15rem;
  color: rgba(125, 211, 252, 0.9);
  font-size: 0.76rem;
  font-weight: 700;
}

.card-talent i {
  flex: none;
  font-size: 0.68rem;
}

.card-talent span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-card .card-content {
  gap: 0.25rem;
}

.playlist-group {
  grid-column: 1 / -1;
}

.playlist-group + .playlist-group {
  margin-top: 1rem;
}

.playlist-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.playlist-group-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.playlist-group-count {
  flex: none;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.playlist-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.4rem;
}

.grouped-card .card-path {
  display: none;
}

@media (max-width: 768px) {
  .playlist-group-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Filter toolbar: group by task instead of presenting one undifferentiated row. */
.home-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.1rem;
}

.top-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(120px, 0.65fr);
  align-items: end;
  gap: 0.75rem;
  flex: 1;
}

.toolbar-field,
.toolbar-platform-group {
  display: grid;
  gap: 0.4rem;
  min-width: 0;
}

.toolbar-field-label {
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.toolbar-field .compact-select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 2.2rem 0 0.85rem;
  border-radius: 11px;
  background-color: rgba(255, 255, 255, 0.055);
  font-size: 0.82rem;
}

.platform-setting {
  display: flex;
  align-items: flex-end;
  gap: 0.8rem;
  flex: 0 0 auto;
}

.toolbar-platform-group .platform-toggle {
  min-width: 176px;
  height: 42px;
  border-radius: 11px;
}

.toolbar-platform-group .p-toggle-btn { height: 34px; border-radius: 8px; }

.mobile-action-icons {
  display: flex;
  gap: 0.5rem;
  margin: 0;
}

.home-toolbar .action-icon-btn {
  width: auto;
  height: 42px;
  min-width: 42px;
  padding: 0 0.8rem;
  gap: 0.45rem;
  border-radius: 11px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.74rem;
  white-space: nowrap;
}

.home-toolbar .action-icon-btn:hover { color: #fff; }

@media (max-width: 1180px) {
  .home-toolbar { align-items: stretch; flex-direction: column; }
  .platform-setting { justify-content: space-between; }
}

@media (max-width: 700px) {
  .home-toolbar { padding: 0.85rem; }
  .top-filters { grid-template-columns: 1fr 1fr; width: 100%; }
  .toolbar-field-talent { grid-column: 1 / -1; }
  .platform-setting { align-items: stretch; flex-direction: column; }
  .toolbar-platform-group { width: 100%; }
  .toolbar-platform-group .platform-toggle { width: 100%; }
  .mobile-action-icons { display: grid; grid-template-columns: 1fr 1fr; }
  .home-toolbar .action-icon-btn { justify-content: center; width: 100%; }
}

.card-path span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Folder Tab */
.category-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--cat-accent, rgba(255, 255, 255, 0.22));
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45),
    0 0 30px color-mix(in srgb, var(--cat-accent, transparent) 35%, transparent),
    0 1px 0 rgba(255,255,255,0.12) inset;
}

.cat-thumbs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  position: absolute;
  inset: 0;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.cat-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
  transition: var(--transition);
  filter: grayscale(30%);
}

.category-card:hover .cat-thumb {
  opacity: 0.7;
  filter: grayscale(0%);
}

.cat-thumbs-overlay {
  position: absolute;
  inset: 0;
  background: var(--cat-gradient, linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8)));
  pointer-events: none;
}

.show-all-grid {
  grid-template-columns: repeat(3, 1fr) !important;
}

.cat-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  position: relative;
  z-index: 1;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  height: 100%;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

.cat-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px var(--cat-accent, transparent));
}

.cat-text {
  flex: 1;
  min-width: 0;
}

.cat-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.cat-desc {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.cat-count {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.5rem;
  border-radius: 99px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-controls {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex: 1;
}

.filter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-filters-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  padding: 0.7rem 1.1rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
}

.clear-filters-btn {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  padding: 0.7rem 1.2rem;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  white-space: nowrap;
}

.clear-filters-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
  transform: translateY(-2px);
}

.clear-filters-btn i {
  font-size: 0.9rem;
}

#mainLogo {
  cursor: pointer;
  transition: var(--transition);
}

#mainLogo:hover {
  opacity: 0.8;
  transform: scale(0.98);
}

/* ============================================================
   Empty State & "Did You Mean" UI
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.did-you-mean {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.did-you-mean span {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.dym-btn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.dym-btn:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.reset-filters-btn {
  margin-top: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.reset-filters-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
}

.hidden {
  display: none !important;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  background: rgba(5, 8, 22, 0.7);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 -4px 32px rgba(0,0,0,0.35), 0 1px 0 rgba(255,255,255,0.05) inset;
  padding: 3rem 0 0;
  margin-top: 2rem;
}

.footer-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 900;
  background: linear-gradient(90deg, #fff, var(--holo-blue));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4,
.footer-share h4 {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-links ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: #7dd3fc;
  transform: translateX(4px);
}

.footer-links a .fa-x-twitter {
  color: var(--text-primary);
}

.footer-links a:hover .fa-x-twitter {
  color: #7dd3fc;
}

.footer-share-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-search-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  color: var(--text-secondary);
}

.footer-search-box input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  font-family: inherit;
}

/* ============================================================
   Compact circular play buttons & improved card layout
   - Makes platform play buttons circular icon-only
   - Shrinks action area to avoid wasting horizontal space
   - Expands text/content area for longer titles
   ============================================================ */

/* Card content should be flexible and allow ellipsis when needed */
.card-content {
  flex: 1; /* occupy remaining horizontal space */
  min-width: 0; /* allow truncation/ellipsis to work */
}

/* Make the actions area compact and not a fixed wide column */
.card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  min-width: auto;
  width: auto;
  flex-shrink: 0;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

/* Play buttons container: vertical stack with small gap; shrinks to content width */
.play-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: auto;
  max-width: none;
}

/* Circular icon-only play button */
.play-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-weight: 700;
  font-size: 0; /* hide text fallback */
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.12s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

/* Ensure icon inside button is visible and sized */
.play-button i,
.play-button svg {
  font-size: 16px;
  width: 16px;
  height: 16px;
  color: #fff;
}

/* Hide textual label inside play buttons (if present in DOM) */
.playlist-card .play-button .btn-label { display: none !important; }

/* Slight scale on hover for interactive feedback */
.play-button:hover {
  transform: scale(1.05);
}

/* Reduce the previous large primary button footprint */
.btn-play-primary {
  min-width: 0 !important;
  padding: 0 !important;
}

/* Circular playback controls with a touch-friendly target. */
.playlist-card .card-actions {
  min-width: auto !important;
  width: auto !important;
}
.playlist-card .play-buttons-container {
  width: auto !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: center !important;
}
.playlist-card .play-button {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0 !important;
  line-height: 1 !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.16) !important;
  overflow: hidden !important;
}
.playlist-card .play-button i,
.playlist-card .play-button svg {
  font-size: 16px !important;
  width: 16px !important;
  height: 16px !important;
}

/* When multiple platform buttons are shown horizontally (small screens), allow them to flow */
@media (max-width: 520px) {
  .play-buttons-container { flex-direction: row; gap: 8px; }
}

/* Ensure long titles get more horizontal room and truncate gracefully */
.playlist-card .card-title {
  -webkit-line-clamp: 2;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.share-btn:hover {
  transform: translateY(-2px);
}

.share-x:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.share-line:hover {
  background: rgba(6, 199, 85, 0.15);
  border-color: rgba(6, 199, 85, 0.4);
  color: #06c755;
}

.share-copy:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #7dd3fc;
}

.share-copy.copied {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding: 1.2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
}

.footer-bottom p {
  color: rgba(156, 163, 175, 0.6);
  font-size: 0.8rem;
}

/* Grid System - Standardized */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 1.8rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem;
  }
}

/* ============================================================
   Mobile Optimizations
   ============================================================ */
@media (max-width: 1023px) {
  .header {
    position: sticky;
    top: 0;
    padding: 0.6rem 0;
  }

  .header-content {
    gap: 0.8rem;
    padding: 0 1rem;
  }

  .header-top-row {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
  }

  .logo {
    font-size: 1.4rem;
    flex: 0 0 auto;
    order: 1; /* Left */
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .logo .subtitle {
    display: none;
  }

  .logo i {
    font-size: 1.2rem;
  }

  .header-user-btn {
    order: 2; /* Right */
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .search-container {
    display: flex !important;
    order: 3 !important; /* Forces below items with lower order */
    width: 100% !important;
    flex: 0 0 100% !important; /* Fix for some flex containers */
    max-width: none !important;
    margin-top: 0.6rem;
  }

  .header-bottom-row {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .home-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .platform-setting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
    order: -1;
    margin-bottom: 0.2rem;
  }

  .platform-setting .filter-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    white-space: nowrap;
  }

  .mobile-action-icons {
    display: flex;
    gap: 0.4rem;
  }

  .action-icon-btn {
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
  }

  .action-icon-btn:active {
    background: rgba(56, 189, 248, 0.15);
    color: #fff;
    transform: scale(0.92);
  }

  .top-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    width: 100%;
  }

  .talent-filter {
    grid-column: span 2;
    width: 100% !important;
    margin-right: 0 !important;
    height: 44px;
    padding: 0 0.8rem;
    font-size: 0.85rem;
  }

  .sort-filter,
  .year-filter {
    width: 100% !important;
    height: 44px;
    font-size: 0.78rem;
  }

  .header-nav {
    margin: 0;
    order: 3;
    width: 100%;
    margin-top: 0.5rem;
  }

  .header-nav-btn {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0;
  }

  .platform-setting {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 0 0 auto;
  }

  .platform-toggle {
    width: auto;
    min-width: 160px;
    height: auto;
  }

  .p-toggle-btn {
    font-size: 0.8rem;
    gap: 0.4rem;
    padding: 0 0.8rem;
    width: auto !important;
    flex: 1;
  }

  .search-container input {
    padding: 0.8rem 2.5rem;
    font-size: 1rem;
    height: 42px;
  }

  .search-icon {
    left: 0.9rem;
    font-size: 1rem;
  }

  .tags-container {
    column-gap: 0.5rem;
    row-gap: 0.5rem;
  }

  .tag-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .mood-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
    flex: 1;
    justify-content: center;
  }

  .mobile-search-bar {
    display: flex;
  }

  /* Category cards mobile */
  .category-card {
    border-radius: 12px;
    height: 110px;
  }

  .cat-thumbs-grid {
    grid-template-columns: repeat(2, 1fr);
    height: 100%;
  }

  .cat-thumb:nth-child(n+3) {
    display: none;
  }

  .cat-info {
    padding: 0.65rem 0.9rem;
    gap: 0.8rem;
  }

  .cat-icon {
    font-size: 1.4rem;
  }

  .cat-name {
    font-size: 1rem;
  }

  .cat-desc {
    font-size: 0.75rem;
  }

  .card {
    flex-direction: column;
  }

  .card-thumbnail {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .card-actions {
    padding: 0 1rem 1rem 1rem;
  }

  .play-buttons-container {
    flex-direction: row;
    gap: 0.5rem;
  }

  .play-button {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 6px;
  }

  .play-button i,
  .platform-logo-svg-inline {
    width: 1rem;
    height: 1rem;
  }

  /* Footer mobile */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-links ul {
    align-items: center;
  }

  .footer-share-buttons {
    align-items: center;
  }

  .share-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Suggestions on mobile */
  .search-suggestions {
    max-height: 250px;
  }

  /* Responsive category grid - Mobile root */
  .category-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.2rem;
  }

  /* Bottom sheet for advanced filters */
  .advanced-filters {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 70vh;
    background: rgba(10, 15, 30, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 120;
    padding: 1rem 1rem 1.5rem;
  }

  .advanced-filters::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 48px;
    height: 5px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
  }

  .advanced-filters.open {
    transform: translateY(0);
    max-height: 70vh;
    opacity: 1;
  }

  .advanced-filters-content {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1199px) {
  .category-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* Small mobile: 1 column */
@media (max-width: 600px) {
  .category-grid {
    grid-template-columns: repeat(1, 1fr) !important;
  }
}

/* Ensure 3 columns on large desktop */
@media (min-width: 1200px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.6rem;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.member-chip {
  font-size: 0.78rem;
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.detail-member-chip {
  cursor: pointer;
  transition: var(--transition);
}

.detail-member-chip:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   Detail Modal (詳細モーダル全体とレイアウトの最適化)
============================================================ */
.detail-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.detail-modal.hidden {
  display: none;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.detail-modal-content,
.detail-modal .modal-content {
  position: relative;
  z-index: 1;
  width: 92vw;        /* 横幅を少し広く */
  max-width: 640px;   /* 最大横幅を640pxに拡張してゆったり配置 */
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-sizing: border-box;
}

.detail-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  z-index: 10;
}

.detail-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* 2列グリッドを廃止し、縦長の流れる1列レイアウトへ */
.detail-layout {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
}

/* 画像を左に置かず、上部の背景演出として溶かし込む */
.detail-hero {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 260px; /* 背景の広がりを少し縦長に */
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  filter: blur(16px);
  pointer-events: none;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 30%, transparent 100%);
}

/* コンテンツ表示エリア (上下左右の余白を広げて少し縦長な印象に) */
.detail-info {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;                  /* 要素間の隙間を広げて縦長に */
  padding: 2.4rem 2rem 2.2rem 2rem; /* 内側余白をゆったり拡大 */
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
}

.detail-path {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.detail-path:hover {
  color: #7dd3fc;
}

.detail-path-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.detail-path-sep {
  opacity: 0.5;
}

.detail-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.4;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
}

.detail-meta {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.detail-meta.is-empty {
  cursor: default;
}

/* ============================================================
   詳細モーダル：出演者（メンバーチップ）領域
============================================================ */
.detail-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px; /* チップ同士の縦横の隙間 */
  width: 100%;
  box-sizing: border-box;
  margin: 0.4rem 0;
  
  /* 最大高さを140pxまで拡張。多人数でもスクロールせずゆったり収まります */
  max-height: 140px;      
  overflow-y: auto;      
  padding: 8px 10px;  
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.detail-members.is-empty {
  padding: 0;
  background: transparent;
}

.detail-members .member-chip {
  margin: 0 !important;
  flex-shrink: 0;
}

/* スクロールバー */
.detail-members::-webkit-scrollbar {
  width: 4px;
}
.detail-members::-webkit-scrollbar-track {
  background: transparent;
}
.detail-members::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
}

/* ============================================================
   詳細モーダル：アクション（ボタン・埋め込み）領域
============================================================ */
.detail-actions {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.8rem;
}

.detail-actions-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 10px; /* ボタン同士の縦の間隔 */
  box-sizing: border-box;
}

.detail-actions-inner .play-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 48px; /* 押しやすいように高さを少しアップ */
  padding: 0;
  margin: 0;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.2s, transform 0.1s;
}

.detail-actions-inner .play-button svg,
.detail-actions-inner .play-button i {
  flex-shrink: 0;
}

.detail-actions-inner .play-button .btn-label {
  margin-left: 8px;
}

.modal-spotify-embed {
  width: 100%;
  margin-top: 14px;
  box-sizing: border-box;
}

.modal-spotify-embed iframe {
  width: 100%;
  border: none;
  display: block;
  border-radius: 12px;
}

.detail-empty {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

.modal-open {
  overflow: hidden;
}

/* ============================================================
   Playlist detail page
============================================================ */
.playlist-detail-page {
  width: min(1180px, 100%);
  margin: 0 auto 4rem;
}

.playlist-page-back {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.25rem 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.playlist-page-back:hover { color: var(--holo-blue); }

.playlist-page-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 390px) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(19, 30, 48, 0.9), rgba(7, 12, 22, 0.82));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.playlist-page-art-wrap { position: relative; }
.playlist-page-art-wrap::after {
  content: '';
  position: absolute;
  inset: 12% -8% -8% 12%;
  z-index: 0;
  border-radius: 28px;
  background: rgba(56, 189, 248, 0.22);
  filter: blur(35px);
}

.playlist-page-art {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
}

.playlist-page-art-empty {
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--holo-blue);
  font-size: 4rem;
}

.playlist-page-intro { min-width: 0; }
.playlist-page-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.9rem;
  color: #7dd3fc;
  font-size: 0.83rem;
  font-weight: 800;
}

.playlist-page-kicker button,
.playlist-page-facts button,
.playlist-page-summary dd button,
.playlist-page-tags button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.playlist-page-kicker button {
  padding: 0;
  color: #7dd3fc;
  font-weight: 800;
}

.playlist-page-kicker button:hover,
.playlist-page-kicker button:focus-visible { text-decoration: underline; }

.playlist-page-intro h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.playlist-page-description {
  max-width: 60ch;
  margin: 1.15rem 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.8;
}

.playlist-page-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.4rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}
.playlist-page-facts span,
.playlist-page-facts button { display: inline-flex; align-items: center; gap: 0.45rem; }
.playlist-page-facts button:hover { color: #7dd3fc; }

.playlist-page-primary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.detail-mobile-preference { display: none; }

.playlist-page-play {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 50px;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, filter 0.18s ease;
}
.playlist-page-play span { flex: 1; }
.playlist-page-play:hover { transform: translateY(-2px); filter: brightness(1.1); }
.playlist-page-play.btn-youtube { background: var(--youtube-red); }
.playlist-page-play.btn-spotify { background: var(--spotify-green); }

.playlist-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.85fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.playlist-page-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background: rgba(12, 20, 34, 0.68);
}

.playlist-page-section-head { margin-bottom: 1.15rem; }
.playlist-page-section-head .eyebrow {
  margin: 0 0 0.25rem;
  color: #7dd3fc;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}
.playlist-page-section-head h2 { margin: 0; color: #fff; font-size: 1.15rem; }

.playlist-page-members { display: flex; flex-wrap: wrap; gap: 0.65rem; }
.playlist-page-members .member-chip { margin: 0 !important; }
.playlist-page-members .member-chip i { margin-left: 0.35rem; font-size: 0.65rem; opacity: 0.6; }
.playlist-page-summary dl { margin: 0; }
.playlist-page-summary dl > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.playlist-page-summary dt { color: var(--text-secondary); font-size: 0.82rem; }
.playlist-page-summary dd { margin: 0; color: #fff; font-size: 0.9rem; font-weight: 700; }
.playlist-page-summary dd button { display: flex; width: 100%; align-items: center; justify-content: space-between; text-align: left; }
.playlist-page-summary dd button:hover { color: #7dd3fc; }
.playlist-page-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
.playlist-page-tags button { padding: 0.35rem 0.6rem; border-radius: 999px; background: rgba(56, 189, 248, 0.1); color: #7dd3fc; font-size: 0.76rem; }
.playlist-page-tags button:hover { background: rgba(56, 189, 248, 0.2); }
.playlist-page-embed { grid-column: 1 / -1; }
.playlist-page-embed iframe { display: block; border: 0; border-radius: 14px; }
.spotify-embed-limit { margin: 0.85rem 0 0; color: var(--text-primary); font-size: 0.95rem; font-weight: 700; }
.spotify-embed-delay { margin: 0.3rem 0 0; color: var(--text-secondary); font-size: 0.75rem; }

.playlist-page-related { margin-top: 2.5rem; }
.playlist-page-related .section-header h2 { font-size: 1.2rem; }

.playlist-mobile-player { display: none; }

@media (max-width: 800px) {
  .playlist-page-hero { grid-template-columns: 1fr; gap: 1.5rem; border-radius: 20px; }
  .playlist-page-art-wrap { width: min(42%, 180px); margin: 0; }
  .playlist-page-grid { grid-template-columns: 1fr; }
  .playlist-page-embed { grid-column: auto; }
}

@media (max-width: 520px) {
  .playlist-detail-page { margin-bottom: 7.5rem; }
  .playlist-page-primary-actions { grid-template-columns: 1fr; }
  .playlist-page-play { min-height: 54px; }
}

@media (max-width: 768px) {
  .detail-mobile-preference {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .detail-mobile-platform {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 144px;
    min-width: 0;
    padding: 3px;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 10px;
  }

  .detail-mobile-platform .p-toggle-btn {
    width: auto;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 0 0.4rem;
    gap: 0.3rem;
    border-radius: 7px;
    font-size: 0.68rem;
  }

  .detail-mobile-platform .p-toggle-btn i { font-size: 0.78rem; }

  .playlist-mobile-player {
    position: fixed;
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 1900;
    display: block;
  }

  .playlist-mobile-player button {
    border: 0;
    color: #fff;
    font: inherit;
    cursor: pointer;
  }

  .playlist-mobile-play {
    display: flex;
    width: 58px;
    height: 58px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 3px solid rgba(255, 255, 255, 0.92) !important;
    border-radius: 50%;
    background: var(--youtube-red);
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(0, 0, 0, 0.15);
    font-weight: 900 !important;
  }

  .playlist-mobile-play > i { font-size: 1.45rem; }
  .playlist-mobile-play.is-spotify { background: var(--spotify-green); }
  .playlist-mobile-play.is-youtube { background: var(--youtube-red); }
  .playlist-mobile-play span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
}

@media (max-width: 640px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    aspect-ratio: 16 / 9;
  }
}

/* Help Modal */
.help-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.help-modal.hidden {
  display: none;
}

.help-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.help-modal-content {
  position: relative;
  z-index: 1;
  width: min(560px, 90vw);
  background: rgba(8, 12, 20, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  padding: 1.4rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.help-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

.help-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.8rem;
}

.help-section {
  margin-top: 0.8rem;
}

.help-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.help-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.member-chip.more {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
}

/* ============================================================
   Card UI Refresh (Apple/Spotify-like hierarchy)
   ============================================================ */
.card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 4px 18px rgba(0,0,0,0.22), 0 1px 0 rgba(255,255,255,0.06) inset;
  overflow: visible;
}

.card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.065);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.38), 0 1px 0 rgba(255,255,255,0.10) inset;
}

.card.spotify:hover,
.card.youtube:hover,
.card.both-platforms:hover {
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.card-thumbnail {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.04);
}

.card-thumbnail::after {
  display: none;
}

.card:hover .card-thumbnail {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.32);
}

.card:hover .card-image {
  transform: scale(1.02);
}

.btn-fav {
  top: 8px !important;
  right: 8px !important;
  left: auto !important;
  width: 34px;
  height: 34px;
  background: rgba(3, 7, 18, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-fav:hover {
  transform: scale(1.05);
}

.btn-fav.active {
  color: #fb7185;
  background: rgba(244, 63, 94, 0.18);
  border-color: rgba(244, 63, 94, 0.35);
}

.card-content {
  padding: 0;
  gap: 0.45rem;
  min-width: 0;
}

.card-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.card-meta {
  margin-bottom: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.meta-item {
  color: var(--text-secondary);
}

.member-chips {
  margin-bottom: 0;
  gap: 0.35rem;
}

.member-chip {
  padding: 0.18rem 0.5rem;
  font-size: 0.76rem;
  color: rgba(249, 250, 251, 0.9);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.card-tags {
  margin-top: 0.2rem;
  gap: 0.4rem;
}

.card-tag {
  padding: 0.18rem 0.5rem;
  font-size: 0.73rem;
  background: rgba(255, 255, 255, 0.05);
}

.card-actions {
  min-width: auto;
  padding: 0;
  border-left: none;
  align-self: center;
}

.play-buttons-container {
  width: auto;
  max-width: none;
}

.play-button.primary {
  width: auto;
  min-width: 86px;
  padding: 0.62rem 0.9rem;
  font-size: 0.86rem;
}

.play-button.secondary {
  display: none;
}

.btn-copy-subtle {
  width: 30px;
  height: 30px;
  right: 8px !important;
  bottom: 8px !important;
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
  .card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 1rem;
  }

  .card-thumbnail {
    width: 88px;
    height: 88px;
  }

  .card-actions {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .play-button.primary {
    min-width: 78px;
    padding: 0.55rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* ============================================================
   Playlist Card Refresh (Immersive)
   ============================================================ */
.playlist-card {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 0;
  height: 152px;
  padding: 0;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  z-index: 1;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.06) inset;
}

.playlist-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--card-bg);
  background-size: cover;
  background-position: center;
  filter: blur(20px) brightness(0.4);
  transform: scale(1.1);
  z-index: -1;
}

.playlist-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.45) 40%,
      rgba(0, 0, 0, 0.7) 100%);
  z-index: -1;
}

.playlist-card:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55), 0 0 30px rgba(56,189,248,0.12), 0 1px 0 rgba(255,255,255,0.10) inset;
}

.playlist-card .card-thumbnail-wrapper {
  width: 140px;
  height: 100%;
  min-height: 100%;
  flex: 0 0 140px;
  align-self: stretch;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0;
  box-shadow: none;
  background: rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.playlist-card .card-thumbnail-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.6));
  pointer-events: none;
}

.playlist-card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.playlist-card .card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.9rem 1.2rem 0.9rem 1.5rem;
  min-width: 0;
  text-align: left;
  position: relative;
  z-index: 2;
  align-self: center;
}

.playlist-card .card-title {
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.45;
  margin: 0 0 0.35rem 0;
  min-height: 2.8em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.8);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.playlist-card .card-meta {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.4rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.7);
}

.playlist-card .member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.playlist-card .card-actions {
  align-self: center;
  padding: 0 0.9rem 0 0.6rem;
  border: none;
  background: transparent;
  display: flex;
  justify-content: flex-end;
}

.playlist-card .play-buttons-container {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 110px;
  align-items: stretch;
}

.playlist-card .play-button {
  width: 100%;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  transition: transform 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.playlist-card .play-button i {
  font-size: 1.05rem;
}

.playlist-card .play-button .btn-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.playlist-card .play-button:hover {
  transform: scale(1.1);
}

.playlist-card .btn-fav {
  top: 8px !important;
  left: 8px !important;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #333 !important;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.playlist-card .btn-copy-subtle {
  right: auto !important;
  bottom: 8px !important;
  left: 8px !important;
  /* On thumbnail */
  background: rgba(0, 0, 0, 0.4) !important;
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  z-index: 5;
}

@media (max-width: 900px) {
  .playlist-card {
    grid-template-columns: 110px minmax(0, 1fr);
    height: auto;
    min-height: 132px;
  }

  .playlist-card .card-thumbnail-wrapper,
  .playlist-card .card-thumbnail {
    width: 110px;
    min-height: 120px;
    grid-row: 1 / 3;
  }

  .playlist-card .card-content {
    padding: 0.75rem 0.8rem 0.2rem 1.2rem;
  }

  .playlist-card .card-actions {
    grid-column: 2;
    justify-content: flex-start;
    padding: 0.2rem 0.8rem 0.7rem 1.2rem;
  }

  .playlist-card .play-buttons-container {
    flex-direction: row;
    width: auto;
    gap: 0.4rem;
  }

  .playlist-card .play-button {
    height: 32px;
  }
}

@media (max-width: 768px) {
  .playlist-card {
    grid-template-columns: 100px minmax(0, 1fr);
    height: auto;
    min-height: 124px;
  }

  .playlist-card .card-thumbnail-wrapper {
    width: 100px;
    flex-basis: 100px;
    grid-row: 1 / 3;
    min-height: 110px;
  }

  .playlist-card .card-content {
    padding: 0.75rem 0.9rem 0.2rem 1.2rem;
  }

  .playlist-card .card-title {
    font-size: 1rem;
  }

  .playlist-card .card-actions {
    grid-column: 2;
    justify-content: flex-start;
    padding: 0.1rem 0.9rem 0.75rem 1.2rem;
  }

  .playlist-card .play-button {
    height: 32px;
    font-size: 0.78rem;
    padding: 0.3rem 0.6rem;
  }

  .playlist-card .play-buttons-container {
    flex-direction: row;
    width: auto;
    gap: 0.4rem;
  }
}

.horizontal-scroll .playlist-card {
  min-width: 500px;
  max-width: 560px;
}

/* ============================================================
   Mobile UX Mastery - Bottom Nav & FAB
   ============================================================ */
.mobile-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(5, 8, 22, 0.65);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4), 0 1px 0 rgba(255,255,255,0.06) inset;
  display: none;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  padding: 0 0.5rem;
}

.mobile-bottom-nav .nav-item {
  flex: 1;
  min-width: 0;
  padding: 8px 4px;
}

.mobile-bottom-nav .nav-item span {
  font-size: 0.62rem;
  white-space: nowrap;
}

.mobile-search-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 74px;
  height: 56px;
  display: none;
  align-items: center;
  gap: 0.7rem;
  padding: 0 1rem;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1200;
  color: var(--text-secondary);
}

.mobile-search-bar input {
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
  width: 100%;
  font-family: inherit;
}

@media (max-width: 1023px) {
  .mobile-bottom-nav {
    display: flex;
  }

  body {
    padding-bottom: 150px;
  }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.2s ease;
  border-radius: 12px;
}

.nav-item i {
  font-size: 1.2rem;
}

.nav-item span {
  font-size: 0.7rem;
  font-weight: 600;
}

.nav-item.active {
  color: #7dd3fc;
}

.nav-item:active {
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.05);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  gap: 1rem;
}

.section-clear-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.section-clear-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.year-filter {
  background: rgba(10, 15, 30, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  appearance: none;
  color-scheme: dark;
}

.year-filter option {
  background: var(--bg-color);
  color: var(--text-primary);
}

.home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.4rem 0 0.8rem;
}

.help-balloon-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* ============================================================
   Tooltip Guided Tour
   ============================================================ */
.tour-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
}

.tour-overlay:not(.hidden) {
  pointer-events: auto;
}

/* Cutout highlight box — casts shadow over the rest of the page */
.tour-highlight-box {
  position: fixed;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(0, 0, 0, 0.72),
    0 0 0 2px rgba(56, 189, 248, 0.7),
    0 0 20px rgba(56, 189, 248, 0.4);
  z-index: 10001;
  pointer-events: none;
  transition: top 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              left 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              width 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              height 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.25s;
  opacity: 0;
}

.tour-overlay:not(.hidden) .tour-highlight-box {
  opacity: 1;
}

/* Floating tooltip balloon — animated, positioned near element */
.tour-tooltip {
  position: fixed;
  background: rgba(3, 9, 24, 0.9);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 30px rgba(56, 189, 248, 0.12);
  border-radius: 16px;
  width: 280px;
  max-width: calc(100vw - 2rem);
  z-index: 10003;
  padding: 1.2rem 1.4rem;
  transition:
    top 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    left 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
    opacity 0.25s;
}

.tour-tooltip h3 {
  font-size: 1rem;
  font-weight: 800;
  color: #7dd3fc;
  letter-spacing: 0.02em;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.tour-tooltip p {
  font-size: 0.88rem;
  color: rgba(249, 250, 251, 0.85);
  line-height: 1.55;
  margin: 0;
}

.tour-tooltip p strong {
  color: #fff;
  font-weight: 700;
}

/* Hint balloon on first visit */
.tutorial-hint {
  position: absolute;
  bottom: calc(100% + 15px);
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.95), rgba(168, 85, 247, 0.95));
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(56, 189, 248, 0.4);
  z-index: 100;
  animation: hintBounce 2s ease-in-out infinite;
}

.tutorial-hint::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: rgba(168, 85, 247, 0.95) transparent transparent transparent;
}

@keyframes hintBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* Fixed bottom navigation bar */
.tour-controls-fixed {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(3, 9, 24, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 99px;
  padding: 0.55rem 0.8rem 0.55rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 10005;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  min-width: 300px;
}

.tour-ctrl-left {
  flex: 0 0 auto;
}

.tour-ctrl-center {
  flex: 1;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.tour-ctrl-right {
  flex: 0 0 auto;
}

.tour-step-counter {
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(56, 189, 248, 0.9);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.tour-btn {
  padding: 0.45rem 1.1rem;
  border-radius: 99px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  min-width: 76px;
  text-align: center;
  font-family: inherit;
}

.tour-alt {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(249, 250, 251, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tour-alt:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.tour-primary {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(168, 85, 247, 0.2));
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.15);
}

.tour-primary:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(168, 85, 247, 0.3));
  color: #fff;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.tour-close-btn {
  background: none;
  border: none;
  color: rgba(156, 163, 175, 0.7);
  cursor: pointer;
  font-size: 1rem;
  transition: color 0.2s, transform 0.2s;
  line-height: 1;
  padding: 0.2rem;
  display: flex;
  align-items: center;
}

.tour-close-btn:hover {
  color: #fff;
  transform: rotate(90deg);
}

/* ============================================================
   GLASS UNIFICATION LAYER
   全要素を一貫したグラスモーフィズムに統一するオーバーライド
   ============================================================ */

/* --- Playlist Card: Immersiveスタイルを廃止しガラスに統一 --- */
.playlist-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 1px 0 rgba(255,255,255,0.07) inset;
}

/* 「ぼかし画像背景」疑似要素を無効化 */
.playlist-card::before,
.playlist-card::after {
  display: none;
}

.playlist-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45), 0 1px 0 rgba(255,255,255,0.10) inset;
  transform: translateY(-4px);
}

/* playlist-card内テキスト（背景画像依存のtext-shadowを除去） */
.playlist-card .card-title {
  color: var(--text-primary);
  text-shadow: none;
}

.playlist-card .card-meta {
  color: var(--text-secondary);
  text-shadow: none;
}

/* サムネイル右のグラデーションを除去 */
.playlist-card .card-thumbnail-wrapper::after {
  display: none;
}

/* ファボボタンをガラスカード統一スタイルに */
.playlist-card .btn-fav {
  background: rgba(3, 7, 18, 0.65) !important;
  color: rgba(255,255,255,0.8) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: none;
}

.playlist-card .btn-fav.active {
  color: #fb7185 !important;
  background: rgba(244, 63, 94, 0.18) !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
}

/* --- カテゴリカード: すべての高さを統一 --- */
.cat-thumbs-grid {
  height: 100% !important;
}

/* --- ボタン類: ガラスに統一 --- */
.help-btn,
.save-filter-btn,
.clear-filters-btn,
.section-clear-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--text-secondary);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 10px;
  font-family: inherit;
  transition: var(--transition);
}

.help-btn:hover,
.save-filter-btn:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
}

.clear-filters-btn:hover {
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* --- 入力フォーム・セレクト: ガラスに統一 --- */
.search-container input,
.talent-filter,
.sort-filter,
.year-filter {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  transition: var(--transition);
}

.search-container input:focus,
.talent-filter:focus,
.sort-filter:focus,
.year-filter:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
  outline: none;
}

/* --- ホームタブ: ガラスに統一 --- */
.home-tabs {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.home-tab.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* --- プラットフォームトグル: ガラスに統一 --- */
.platform-toggle {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- セクションヘッダー: 統一されたアクセント --- */
.section-header {
  border-left: 3px solid rgba(56, 189, 248, 0.7);
  padding-left: 0.9rem;
  margin-top: 2rem;
  margin-bottom: 0.9rem;
}

/* --- Saved Filter Card: ガラスに統一 --- */
.saved-filter-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.2);
}

.saved-filter-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(56, 189, 248, 0.3);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  transform: translateY(-3px);
}

/* --- Detail Modal / Help Modal: 統一ガラス --- */
.detail-modal-content,
.help-modal-content {
  background: rgba(5, 8, 22, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 1px 0 rgba(255,255,255,0.06) inset;
}

/* --- フッター検索: ガラスに統一 --- */
.footer-search-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* --- シェアボタン: ガラスに統一 --- */
.share-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* --- モバイル検索バー: ガラスに統一 --- */
.mobile-search-bar {
  background: rgba(5, 8, 22, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* --- 水平スクロール: スクロールバーを透明に --- */
.horizontal-scroll {
  scrollbar-color: rgba(255,255,255,0.08) transparent;
}

/* --- Tag/Member chips: ガラスに統一 --- */
.card-tag,
.member-chip {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.member-chip {
  color: rgba(249, 250, 251, 0.85);
}

/* --- カードホバー時のプラットフォーム色はガラスでも保持 --- */
.card.spotify:hover {
  border-color: rgba(29, 185, 84, 0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 20px rgba(29,185,84,0.12);
}

.card.youtube:hover {
  border-color: rgba(255, 0, 0, 0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 20px rgba(255,0,0,0.12);
}

.card.both-platforms:hover {
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 20px rgba(168,85,247,0.12);
}

.playlist-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4), 0 0 20px rgba(56,189,248,0.12), 0 1px 0 rgba(255,255,255,0.10) inset;
}

/* ==============================================================
   NEW MODERN LAYOUT SYSTEM (2-COLUMN PC)
   ============================================================== */

/* Layout Container */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

@media (min-width: 1024px) {
  .app-layout {
    flex-direction: row;
    align-items: flex-start;
  }
}

/* Header Adjustments */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-top-row {
  max-width: 100% !important;
  padding: 0 1.5rem;
}

/* Sidebar (Hidden on mobile, Fixed on PC) */
.sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex;
    flex-direction: column;
    width: 260px;
    background: rgba(5, 8, 22, 0.85);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 2rem 1.5rem;
    position: sticky;
    top: 76px;
    height: calc(100vh - 76px);
    z-index: 900;
    flex-shrink: 0;
  }

  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 3rem;
  }

  .sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    outline: none;
  }

  .sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    transform: translateX(4px);
  }

  .sidebar-nav-item.active {
    background: rgba(56, 189, 248, 0.12);
    color: #38bdf8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .sidebar-nav-item i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
  }

  .sidebar-platform {
    margin-bottom: 3rem;
    padding: 0 0.5rem;
  }

  .sidebar-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 700;
    opacity: 0.6;
  }

  .sidebar-platform-toggle {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
  }

  .sidebar-platform-toggle .p-toggle-btn {
    width: 100%;
    padding: 1rem;
    font-size: 0.9rem;
    border-radius: 0;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: transparent;
    color: var(--text-secondary);
  }

  .sidebar-platform-toggle .p-toggle-btn.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
  }

  .sidebar-platform-toggle .p-toggle-btn.yt.active { color: #fff; background: var(--youtube-red); }
  .sidebar-platform-toggle .p-toggle-btn.sp.active { color: #fff; background: var(--spotify-green); }

  .sidebar-tools {
    margin-top: auto;
  }

  .sidebar-tool-btn {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
  }

  .sidebar-tool-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
  }
}

/* Main Content Area */
.main-content {
  flex: 1;
  padding: 1.5rem 1rem 6rem;
  min-width: 0;
  max-width: 100%; /* Ensure it never expands beyond viewport */
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  .main-content {
    padding: 2.5rem 3.5rem;
    min-height: calc(100vh - 76px); 
  }
}

/* Compact Toolbar for PC */
@media (min-width: 1024px) {
    .home-toolbar {
        background: rgba(255, 255, 255, 0.02);
        padding: 0.8rem 1.2rem;
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, 0.05);
        margin-bottom: 2rem;
    }
}

/* ==============================================================
   CAROUSEL SYSTEM (PREMIUM DESIGN)
   ============================================================== */

.carousel-wrapper {
  position: relative;
  margin: 1.5rem 0 3rem;
  padding: 0 0.5rem;
}

.carousel-track-container {
  overflow: hidden;
  border-radius: 20px;
  padding: 10px 0;
}

.carousel-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.carousel-track > .playlist-card {
  flex: 0 0 320px;
  width: 320px;
  margin: 0;
  grid-template-columns: 110px minmax(0, 1fr) !important;
  height: auto;
  min-height: 132px;
}

@media (max-width: 768px) {
  .carousel-track > .playlist-card {
    flex: 0 0 85vw;
    width: 85vw;
    scroll-snap-align: center;
  }
  .carousel-track-container {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .carousel-track-container::-webkit-scrollbar { display: none; }
  .carousel-arrow { display: none; }
}

.carousel-track > .playlist-card .card-thumbnail-wrapper,
.carousel-track > .playlist-card .card-thumbnail {
  width: 110px !important;
  min-height: 120px;
  grid-row: 1 / 3;
}

.carousel-track > .playlist-card .card-content {
  padding: 0.75rem 0.8rem 0.2rem 1.2rem;
}

.carousel-track > .playlist-card .card-actions {
  grid-column: 2;
  justify-content: flex-start;
  padding: 0.2rem 0.8rem 0.7rem 1.2rem;
}

.carousel-track > .playlist-card .play-buttons-container {
  flex-direction: row;
  width: auto;
  gap: 0.4rem;
}


.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  backdrop-filter: blur(12px);
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.carousel-arrow:hover {
  background: #38bdf8;
  border-color: #38bdf8;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

.carousel-prev { left: -12px; }
.carousel-next { right: -12px; }

/* Section Headers Decoration */
.section-header h3 {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.35rem;
  color: #fff;
  font-weight: 800;
}

.section-header i {
  color: #38bdf8;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
}

/* Spotify埋め込みの読み込み中インジケーター */
.embed-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  z-index: 1;
  pointer-events: none;
  /* ほんのりアニメーションさせる場合 */
  animation: pulse-loading 1.5s infinite ease-in-out;
}

@keyframes pulse-loading {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.playlist-card .card-detail-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.playlist-card .btn-fav,
.playlist-card .card-actions,
.playlist-card .btn-copy-subtle {
  z-index: 3;
}

.playlist-card .card-thumbnail-wrapper,
.playlist-card .card-content { pointer-events: none; }

.playlist-card:has(.card-detail-link:focus-visible) {
  outline: 3px solid rgba(56, 189, 248, 0.85);
  outline-offset: 3px;
}

/* ============================================================
   Home first view and section hierarchy
============================================================ */
.home-hero {
  position: relative;
  display: grid;
  min-height: 380px;
  grid-template-columns: minmax(0, 1.4fr) minmax(180px, 0.6fr);
  align-items: center;
  gap: var(--spacing-xl);
  margin: 0 auto var(--spacing-xl);
  padding: clamp(1.5rem, 3vw, 3rem);
  overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 30px;
  background:
    radial-gradient(circle at 85% 20%, rgba(56, 189, 248, 0.2), transparent 38%),
    radial-gradient(circle at 10% 90%, rgba(168, 85, 247, 0.16), transparent 40%),
    linear-gradient(135deg, rgba(10, 20, 38, 0.96), rgba(4, 9, 22, 0.92));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.32);
}

.home-hero-copy { position: relative; z-index: 2; }
.home-hero-eyebrow,
.section-eyebrow {
  margin: 0 0 0.7rem;
  color: #7dd3fc;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.home-hero-eyebrow i { margin-right: 0.35rem; }
.home-hero h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.9rem, 3.1vw, 3.4rem);
  line-height: 1.3;
  letter-spacing: -0.045em;
}
.home-hero h2 span {
  background: linear-gradient(100deg, #7dd3fc, #c4b5fd 65%, #f9a8d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero-lead {
  max-width: 39rem;
  margin: 1.4rem 0 1.8rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  line-height: 1.85;
}

.home-hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.home-hero-actions button {
  min-height: 52px;
  padding: 0.75rem 1.15rem;
  border-radius: 13px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}
.home-hero-actions button:hover { transform: translateY(-2px); }
.home-hero-all { border: 1px solid rgba(255, 255, 255, 0.15); background: rgba(255, 255, 255, 0.05); color: #fff; }
.home-hero-all:hover { background: rgba(255, 255, 255, 0.1); }

.home-hero-search-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  width: min(100%, 620px);
  min-height: 58px;
  margin-bottom: 0.85rem;
  padding: 5px 5px 5px 1.05rem;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}
.home-hero-search-form:focus-within { border-color: rgba(125, 211, 252, 0.75); box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.11), 0 18px 45px rgba(0, 0, 0, 0.3); }
.home-hero-search-form > i { color: #7dd3fc; }
.home-hero-search-form input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 1rem;
}
.home-hero-search-form input::placeholder { color: rgba(255, 255, 255, 0.46); }
.home-hero-search-form button {
  align-self: stretch;
  padding: 0 1.15rem;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  cursor: pointer;
}

.home-hero-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.4rem;
  color: var(--text-secondary);
  font-size: 0.76rem;
}
.home-hero-status strong { color: #fff; font-size: 1rem; }
.home-hero-status-divider { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.14); }
.home-hero-platform {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  width: 156px;
  height: auto;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
}
.home-hero-platform .p-toggle-btn {
  min-width: 0;
  min-height: 44px;
  padding: 0.25rem 0.45rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.52);
  font-size: 0.68rem;
  font-weight: 800;
  box-shadow: none;
}
.home-hero-platform .p-toggle-btn.yt.active {
  background: var(--youtube-red);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 0, 51, 0.24);
}
.home-hero-platform .p-toggle-btn.sp.active {
  background: var(--spotify-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(29, 185, 84, 0.22);
}

.home-hero-visual { position: relative; min-height: 240px; }
.home-hero-cover {
  position: absolute;
  display: block;
  width: min(72%, 310px);
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  box-shadow: 0 25px 65px rgba(0, 0, 0, 0.5);
}
.home-hero-cover.cover-1 { z-index: 3; top: 10%; left: 18%; transform: rotate(2deg); }
.home-hero-cover.cover-2 { z-index: 2; top: 1%; left: 0; transform: rotate(-9deg) scale(0.86); opacity: 0.68; }
.home-hero-cover.cover-3 { z-index: 1; top: 17%; right: -2%; transform: rotate(11deg) scale(0.82); opacity: 0.48; }

#homeBrowseSection > section:not(.home-hero) { margin-bottom: 4rem; }
#homeBrowseSection .section-header { margin-bottom: 1.25rem; }
#homeBrowseSection .section-header h3 { margin: 0; font-size: clamp(1.15rem, 2vw, 1.45rem); }
#homeBrowseSection .section-header h3 i {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-right: 0.45rem;
  place-items: center;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  font-size: 0.85rem;
}
#featuredSection .section-eyebrow { color: #fbbf24; }
#featuredSection .section-header h3 i { background: rgba(251, 191, 36, 0.12); color: #fbbf24; }
#homePinnedSection .section-eyebrow { color: #fbbf24; }
.home-pinned-section {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid rgba(251, 191, 36, 0.24);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(56, 189, 248, 0.045));
}
.home-pinned-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.home-pinned-heading h3 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
}
.home-pinned-heading h3 i { margin-right: 0.45rem; color: #fbbf24; }
.home-pinned-heading > div > p:last-child {
  margin: 0.45rem 0 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
}
.home-pinned-update {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
}
.home-pinned-grid { display: grid; }
.home-pinned-card {
  grid-template-columns: 152px minmax(0, 1fr) auto;
  border-color: rgba(251, 191, 36, 0.3);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.32), 0 0 26px rgba(251, 191, 36, 0.06);
}
.home-pinned-card .card-thumbnail-wrapper {
  width: 152px;
  flex-basis: 152px;
  background: rgba(4, 9, 22, 0.72);
}
.home-pinned-card .card-image {
  object-fit: contain;
}
#allPlaylistsSection .section-eyebrow { color: #c4b5fd; }
#allPlaylistsSection .section-header h3 i { background: rgba(168, 85, 247, 0.13); color: #c4b5fd; }

@media (max-width: 900px) {
  .home-hero { min-height: auto; grid-template-columns: 1fr; }
  .home-hero-visual { display: none; }
  .home-hero-cover { width: min(58%, 260px); }
  .home-hero-cover.cover-1 { left: 24%; }
}

@media (max-width: 600px) {
  .home-hero {
    gap: 1.25rem;
    margin: 0 -0.35rem 2.75rem;
    padding: 1.25rem 1.1rem 1.5rem;
    border-radius: 20px;
  }
  .home-hero-visual { min-height: 225px; }
  .home-hero-cover { width: min(57%, 205px); border-radius: 16px; }
  .home-hero h2 { font-size: clamp(1.65rem, 7.5vw, 2.4rem); }
  .home-hero-lead { margin: 1rem 0 1.25rem; font-size: 0.88rem; }
  .home-hero-actions { display: grid; grid-template-columns: 1fr; }
  .home-hero-actions button { width: 100%; }
  .home-hero-status { justify-content: flex-start; gap: var(--spacing-sm); }
  .home-hero-status-divider { display: none; }
  .home-hero-search-form { gap: var(--spacing-xs); padding-left: 0.65rem; }
  .home-hero-search-form input { font-size: 1rem; }
  .home-hero-search-form button { padding-inline: 0.75rem; }
  .home-pinned-heading { align-items: flex-start; flex-direction: column; }
  .home-pinned-update { margin-top: -0.35rem; }
  .home-pinned-card { grid-template-columns: 118px minmax(0, 1fr) auto; }
  .home-pinned-card .card-thumbnail-wrapper {
    width: 118px;
    flex-basis: 118px;
  }
  #homeBrowseSection > section:not(.home-hero) { margin-bottom: 3rem; }
}

/* Keep only the space required by the fixed mobile controls. */
@media (max-width: 1023px) {
  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .main-content {
    padding-bottom: 1.25rem;
  }
}

@media (max-width: 768px) {
  body.playlist-detail-active {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .playlist-detail-page {
    margin-bottom: 1rem;
  }
}

/* ============================================================
   Footer refresh
   ============================================================ */
.site-footer {
  position: relative;
  overflow: hidden;
  margin-top: 3.5rem;
  padding-top: 2.25rem;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(145deg, rgba(10, 16, 36, 0.9), rgba(5, 8, 22, 0.76));
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 8%;
  width: 320px;
  height: 180px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.12), transparent 70%);
  pointer-events: none;
}

.footer-content {
  position: relative;
  max-width: 1200px;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.footer-primary,
.footer-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: end;
  gap: clamp(2rem, 6vw, 5rem);
}

.footer-primary {
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-secondary { align-items: start; }

.footer-logo {
  display: inline-block;
  text-decoration: none;
}

.footer-desc { max-width: 620px; }

.footer-section h4,
.footer-search label {
  display: block;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.footer-links ul {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
}

.footer-external-icon {
  font-size: 0.62rem;
  opacity: 0.45;
}

.footer-share-buttons { flex-direction: row; }

.footer-search-box {
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.footer-search-box:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.footer-search-box input::placeholder { color: rgba(156, 163, 175, 0.72); }
.footer-search-box input::-webkit-search-cancel-button { filter: invert(1); opacity: 0.55; }

.footer-search-hint {
  padding-left: 0.65rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(156, 163, 175, 0.65);
  font-size: 0.72rem;
}

.footer-bottom {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
}

.footer-disclaimer { text-align: right; }

@media (max-width: 768px) {
  .site-footer {
    margin-top: 2.5rem;
    border-radius: 20px 20px 0 0;
  }

  .footer-content { padding: 0 1.25rem; text-align: left; }
  .footer-primary,
  .footer-secondary { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-links ul { align-items: flex-start; }
  .footer-share-buttons { align-items: stretch; }
  .footer-search-hint { display: none; }
  .share-btn { width: auto; max-width: none; flex: 1; justify-content: center; padding-inline: 0.65rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; padding: 1rem 1.25rem; }
  .footer-disclaimer { text-align: left; }
}

/* Final toolbar layout — kept last to replace legacy toolbar rules. */
.list-tools { margin-bottom: var(--spacing-lg); }
.list-tools-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  min-height: 52px;
  padding: var(--spacing-sm) var(--spacing-md);
  border: var(--glass-border);
  border-radius: var(--radius-md);
  background: var(--surface-color);
  cursor: pointer;
  list-style: none;
}
.list-tools-summary::-webkit-details-marker { display: none; }
#resultCount { font-size: 1rem; font-weight: 800; }
.list-tools-label { display: flex; align-items: center; gap: var(--spacing-sm); color: var(--text-secondary); font-size: 0.8rem; }
.list-tools-label.has-filters { color: var(--holo-blue); }
.list-tools[open] .fa-chevron-down { transform: rotate(180deg); }
.result-overview { min-width: 0; }
.active-filter-summary { display: block; color: var(--text-secondary); font-size: 0.8rem; overflow-wrap: anywhere; }
.active-filter-summary:empty { display: none; }
.home-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.1rem;
}
.top-filters {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(120px, 0.65fr);
  align-items: end;
  gap: 0.75rem;
  flex: 1;
  width: auto;
}
.toolbar-field,
.platform-setting > .toolbar-platform-group { display: grid; gap: 0.4rem; min-width: 0; }
.toolbar-field-label { color: var(--text-secondary); font-size: 0.75rem; font-weight: 800; letter-spacing: 0.04em; }
.toolbar-field .compact-select { width: 100%; min-width: 0; height: 44px; padding: 0 2.2rem 0 0.85rem; border-radius: 11px; font-size: 1rem; }
.platform-setting { display: flex; align-items: flex-end; justify-content: flex-start; gap: 0.8rem; width: auto; margin: 0; order: initial; }
.toolbar-platform-group .platform-toggle { width: 176px; min-width: 176px; height: 52px; border-radius: 11px; }
.toolbar-platform-group .p-toggle-btn { height: 44px; border-radius: 8px; }
.mobile-action-icons { display: flex; gap: 0.5rem; margin: 0; }
.home-toolbar .action-icon-btn { display: inline-flex; width: auto; height: 44px; min-width: 44px; padding: 0 0.8rem; gap: 0.45rem; border-radius: 11px; color: var(--text-secondary); font-size: 0.8rem; white-space: nowrap; }

@media (max-width: 1180px) {
  .home-toolbar { align-items: stretch; flex-direction: column; }
  .platform-setting { justify-content: space-between; }
}

@media (max-width: 700px) {
  .home-toolbar { padding: 0.85rem; }
  .top-filters { grid-template-columns: 1fr 1fr; width: 100%; }
  .toolbar-field-talent { grid-column: 1 / -1; }
  .platform-setting { align-items: stretch; flex-direction: column; order: initial; }
  .platform-setting > .toolbar-platform-group { width: 100%; }
  .toolbar-platform-group .platform-toggle { width: 100%; min-width: 0; }
  .mobile-action-icons { display: grid; grid-template-columns: 1fr 1fr; }
  .home-toolbar .action-icon-btn { justify-content: center; width: 100%; }
}
