.composer-type-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 20px 56px;
}

.composer-type-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.composer-type-title {
  margin: 0;
  color: #1f2937;
  font-size: 1.45rem !important;
  font-weight: 800;
  line-height: 1.35;
}

.composer-type-heading {
  min-width: 0;
}

.composer-type-sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  transform: translateY(6px);
  color: #4b5563;
  font-size: 0.95rem;
  font-weight: 700;
}

.composer-type-sort select {
  min-width: 128px;
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  font: inherit;
}

.composer-type-subcategories {
  margin: 0 0 24px;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.composer-type-subcategories-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  color: #374151;
  background: transparent;
  border: 0;
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

.composer-type-subcategories-icon {
  flex-shrink: 0;
  color: #6b7280;
  font-weight: 800;
}

.composer-type-subcategories-body {
  display: none;
  padding: 0 0 12px;
}

.composer-type-subcategories-body.is-open {
  display: block;
}

.composer-type-subcategory-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 0;
  color: #4f46e5;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

.composer-type-subcategory-link:hover {
  color: #312e81;
}

.composer-type-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.composer-type-item {
  margin: 0;
}

.composer-type-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 18px;
  padding: 16px 18px;
  color: #1f2937;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.composer-type-card:hover {
  border-color: #7c6ee6;
  box-shadow: 0 12px 28px rgba(63, 81, 181, 0.12);
  transform: translateY(-1px);
}

.composer-type-piece-title {
  grid-column: 1;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.45;
}

.composer-type-meta {
  grid-column: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: #6b7280;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}

.composer-type-scores {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 360px;
}

.composer-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 30px;
  padding: 7px 9px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-variant-numeric: tabular-nums;
}

.composer-type-badge span {
  font-size: 0.72rem;
  opacity: 0.78;
}

.composer-type-total {
  color: #5d458f;
  background: linear-gradient(180deg, #eadcfb 0%, #d9c2f3 100%);
}

.composer-type-tech {
  color: #944534;
  background: linear-gradient(180deg, #f6ddd6 0%, #ecc5ba 100%);
}

.composer-type-expr {
  color: #3f6288;
  background: linear-gradient(180deg, #dce9f8 0%, #c6daf0 100%);
}

.composer-type-empty-score {
  color: #64748b;
  background: #f1f5f9;
}

.composer-type-video-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: -1;
  width: 30px;
  height: 30px;
  color: #e11d48;
}

.composer-type-video-indicator svg {
  display: block;
  width: 17px;
  height: 17px;
}

.composer-type-empty {
  padding: 64px 20px;
  color: #6b7280;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.composer-type-empty h1 {
  margin: 0 0 10px;
  color: #1f2937;
  font-size: 1.5rem;
}

.composer-type-empty p {
  margin: 0;
}

@media (max-width: 760px) {
  .composer-type-page {
    padding: 20px 14px 44px;
  }

  .composer-type-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .composer-type-title {
    font-size: 1.24rem !important;
  }

  .composer-type-sort {
    transform: none;
  }

  .composer-type-card {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .composer-type-piece-title,
  .composer-type-meta,
  .composer-type-scores {
    grid-column: 1;
  }

  .composer-type-scores {
    grid-row: auto;
    justify-content: flex-start;
    max-width: none;
  }

  .composer-type-video-indicator {
    order: 0;
  }
}
