body[data-page^="chart-"] .layout-shell,
body[data-page="rating-reference"] .layout-shell,
body[data-page="class-courses"] .layout-shell,
body[data-page="unlock-challenges"] .layout-shell,
body[data-page="note-designers"] .layout-shell {
  max-width: 1280px;
  margin-top: 0;
}

body[data-page^="chart-"] .main-content,
body[data-page="rating-reference"] .main-content,
body[data-page="class-courses"] .main-content,
body[data-page="unlock-challenges"] .main-content,
body[data-page="note-designers"] .main-content {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 2px;
  padding-bottom: 28px;
}

.list-hero {
  margin: 0 0 8px;
}

.list-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 8px;
}

.list-hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.list-hero .subpage-back-link,
.list-hero .page-updated-at {
  position: static;
  margin: 0;
}

.list-hero .subpage-title {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 1.35rem;
  line-height: 1.2;
}

.list-scope-note,
.list-help {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.list-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(150px, 220px));
  gap: 10px;
  align-items: end;
}

.list-field {
  display: grid;
  gap: 5px;
}

.list-field-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.list-input,
.list-select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  border: 2px solid var(--brand-light);
  border-radius: 12px;
  background: #fff;
  color: var(--text-main);
  padding: 9px 11px;
  font: inherit;
}

.list-input:focus,
.list-select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.12);
}

.list-count {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.list-table-wrap {
  overflow-x: auto;
  border: 2px solid #f8d4e6;
  border-radius: 18px;
  background: #fffdfd;
}

.list-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.list-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  border-bottom: 2px solid #f5cade;
  background: #fff6fb;
  color: var(--accent);
  text-align: left;
  white-space: nowrap;
}

.list-table tbody td {
  padding: 11px 12px;
  border-bottom: 1px solid #f8dfea;
  vertical-align: middle;
  font-size: 0.92rem;
}

.list-table tbody tr:last-child td {
  border-bottom: 0;
}

.list-table tbody tr:nth-child(even) {
  background: rgba(252, 242, 248, 0.55);
}

.list-sort {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.list-title {
  font-weight: 700;
  word-break: break-word;
}

.list-sub {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.list-number {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.difficulty-pill,
.class-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff0f7;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.difficulty-pill[data-difficulty="BASIC"] { background: #e7f6e9; color: #31824f; }
.difficulty-pill[data-difficulty="ADVANCED"] { background: #fff3c9; color: #9a7000; }
.difficulty-pill[data-difficulty="EXPERT"] { background: #ffe1e7; color: #bd4057; }
.difficulty-pill[data-difficulty="MASTER"] { background: #eee4ff; color: #6e49ad; }
.difficulty-pill[data-difficulty="ULTIMA"] { background: #e5e5e5; color: #343434; }

.list-empty {
  margin: 0;
  padding: 28px 18px;
  color: var(--text-muted);
  text-align: center;
}

.list-load-more {
  display: block;
  width: min(320px, calc(100% - 24px));
  margin: 12px auto;
  padding: 10px 14px;
  border: 2px solid var(--brand-light);
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.list-load-more:hover,
.list-load-more:focus-visible {
  border-color: var(--brand);
  outline: none;
}

.list-cards {
  display: grid;
  gap: 8px;
}

.notes-mobile-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 0 2px 2px;
}

.notes-mobile-list-head-side {
  display: grid;
  grid-template-columns: 84px 64px;
  gap: 6px;
  align-items: center;
  justify-content: end;
}

.notes-mobile-sort-button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.notes-mobile-sort-button.is-active {
  color: var(--accent);
}

.notes-mobile-sort-button--side {
  width: 100%;
  text-align: center;
}

.list-card {
  border: 2px solid #f8d4e6;
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
}

.list-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: start;
}

.list-card-title {
  margin: 0;
  color: var(--text-main);
  font-size: 0.96rem;
  line-height: 1.35;
}

.list-card-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin-top: 8px;
  font-size: 0.8rem;
}

.list-card-meta dt {
  color: var(--text-muted);
  font-weight: 700;
}

.list-card-meta dd {
  margin: 2px 0 0;
  color: var(--text-main);
  word-break: break-word;
}

.designer-toggle {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.designer-detail {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f6ddea;
}

.designer-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid #f8e5ee;
  font-size: 0.82rem;
}

.designer-sheet:first-child {
  padding-top: 0;
  border-top: 0;
}

.rating-lead {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

@media (max-width: 850px) {
  body[data-page^="chart-"] .page-affiliate-note,
  body[data-page="rating-reference"] .page-affiliate-note,
  body[data-page="class-courses"] .page-affiliate-note,
  body[data-page="unlock-challenges"] .page-affiliate-note,
  body[data-page="note-designers"] .page-affiliate-note {
    display: block;
  }

  body[data-page^="chart-"] .main-content,
  body[data-page="rating-reference"] .main-content,
  body[data-page="class-courses"] .main-content,
  body[data-page="unlock-challenges"] .main-content,
  body[data-page="note-designers"] .main-content {
    padding: 6px 8px 8px;
  }

  .list-controls,
  .rating-lead {
    grid-template-columns: 1fr;
  }

  .list-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }
}

@media (max-width: 520px) {
  .panel { padding: 8px 6px; margin-bottom: 4px; }
  .list-hero { margin-top: -4px; padding: 0 4px; }
  .list-hero-top { margin-bottom: 6px; }
  .list-card { padding: 8px 10px; }
  .list-card-meta { grid-template-columns: 1fr 1fr; }
  .designer-sheet { grid-template-columns: minmax(0, 1fr) auto; }
  .designer-sheet .list-number { grid-column: 2; }
}
