:root {
  --albums-ink: #0e121b;
  --albums-muted: #5e6573;
  --albums-border: #e2e6ee;
  --albums-surface: rgba(255, 255, 255, 0.94);
  --albums-surface-solid: #fff;
  --albums-soft: #f5f6fb;
  --albums-accent: #405cf5;
  --albums-accent-dark: #263ebd;
  --albums-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; }

.albums-page {
  width: 100%;
  margin: 0 auto;
  padding: 28px clamp(16px, 3vw, 48px) 48px;
}

.albums-intro {
  width: min(1280px, 100%);
  margin: 0 auto 20px;
  text-align: center;
}

.albums-intro h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 0 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.albums-hint {
  margin: 5px auto 18px;
  color: var(--albums-muted);
}

.albums-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 6px auto 12px;
}

.albums-toolbar input[type='search'] {
  flex: 1 1 280px;
  width: 100%;
  max-width: 380px;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--albums-border);
  border-radius: 12px;
  background: var(--albums-surface-solid);
  color: var(--albums-ink);
  font: inherit;
  font-size: 0.9rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.albums-toolbar > select {
  flex: 0 1 175px;
  min-width: 155px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--albums-border);
  border-radius: 12px;
  background: var(--albums-surface-solid);
  color: var(--albums-ink);
  font: inherit;
  font-size: 0.84rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.albums-control-button,
.albums-round-button {
  min-height: 42px;
  border: 1px solid var(--albums-border);
  background: var(--albums-surface);
  color: var(--albums-ink);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
  transition: transform 0.08s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.albums-control-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.albums-control-button:hover,
.albums-round-button:hover {
  transform: translateY(-1px);
  border-color: rgba(64, 92, 245, 0.4);
  background: #f4f6ff;
  box-shadow: 0 5px 13px rgba(15, 23, 42, 0.08);
}

.albums-control-button[aria-expanded='true'],
.albums-control-button.has-active-filters {
  border-color: var(--albums-accent);
  background: #eef1ff;
  color: var(--albums-accent-dark);
}

.albums-control-button:focus-visible,
.albums-round-button:focus-visible,
.albums-view-button:focus-visible,
.albums-results-row button:focus-visible,
.albums-explorer button:focus-visible {
  outline: 2px solid var(--albums-accent);
  outline-offset: 2px;
}

.albums-filter-count {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--albums-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.albums-chevron {
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}

.albums-control-button[aria-expanded='true'] .albums-chevron { transform: rotate(180deg); }

.albums-round-button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1rem;
}

.albums-round-button[aria-pressed='true'] {
  border-color: var(--albums-accent);
  background: var(--albums-accent);
  color: #fff;
}

.albums-filters-panel {
  width: min(1180px, calc(100% - 20px));
  margin: -3px auto 16px;
  padding: 12px;
  border: 1px solid var(--albums-border);
  border-radius: 14px;
  background: var(--albums-surface);
  box-shadow: 0 9px 22px rgba(15, 23, 42, 0.07);
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}

.albums-filters-panel[hidden] { display: none; }

.albums-filter-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.albums-filter-field > span {
  color: var(--albums-muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.albums-filter-field select {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--albums-border);
  border-radius: 10px;
  background: var(--albums-surface-solid);
  color: var(--albums-ink);
  font: inherit;
  font-size: 0.82rem;
}

.albums-surprise { position: relative; }

.albums-surprise-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  left: 50%;
  width: min(310px, 88vw);
  padding: 7px;
  transform: translateX(-50%);
  border: 1px solid var(--albums-border);
  border-radius: 14px;
  background: var(--albums-surface-solid);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
  text-align: left;
}

.albums-surprise-menu[hidden] { display: none; }

.albums-surprise-menu button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--albums-ink);
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  text-align: left;
  cursor: pointer;
}

.albums-surprise-menu button:hover { background: var(--albums-soft); }
.albums-surprise-menu strong { display: block; font-size: 0.84rem; }
.albums-surprise-menu small { display: block; margin-top: 2px; color: var(--albums-muted); font-size: 0.72rem; line-height: 1.3; }

.albums-surprise-toast {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: min(340px, 90vw);
  transform: translateX(-50%);
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(18, 22, 31, 0.96);
  color: #fff;
  font-size: 0.78rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.albums-surprise-toast[hidden] { display: none; }

.albums-view-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0 auto 10px;
  padding: 3px;
  border: 1px solid var(--albums-border);
  border-radius: 999px;
  background: var(--albums-surface);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.albums-view-button {
  min-height: 36px;
  padding: 7px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--albums-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.albums-view-button[aria-pressed='true'] {
  background: var(--albums-accent);
  color: #fff;
  box-shadow: 0 5px 12px rgba(64, 92, 245, 0.23);
}

.albums-results-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 31px;
  margin: 0 auto 14px;
  color: var(--albums-muted);
  font-size: 0.82rem;
}

.albums-results-row p { margin: 0; }

.albums-results-row button {
  padding: 6px 9px;
  border: 1px solid var(--albums-border);
  border-radius: 999px;
  background: var(--albums-surface);
  color: var(--albums-accent-dark);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.albums-info-panel {
  width: min(920px, 100%);
  margin: 0 auto 22px;
  padding: 16px 18px;
  border: 1px solid var(--albums-border);
  border-radius: 14px;
  background: var(--albums-surface);
  color: var(--albums-muted);
  box-shadow: var(--albums-shadow);
  text-align: left;
  font-size: 0.92rem;
  line-height: 1.5;
}

.albums-info-panel[hidden] { display: none; }
.albums-info-panel h2 { margin: 0.7rem 0 0.25rem; color: var(--albums-ink); font-size: 1rem; }
.albums-info-panel h2:first-child { margin-top: 0; }
.albums-info-panel p { margin: 0.25rem 0; }

.albums-empty {
  margin: 22px auto;
  padding: 26px 16px;
  color: var(--albums-muted);
  text-align: center;
}

.albums-grid {
  display: grid;
  width: min(1800px, 100%);
  margin: 0 auto;
  gap: 18px;
  align-items: start;
}

.album-card {
  position: relative;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.album-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--albums-border);
  border-radius: 12px;
  background: #f0f2f7;
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.12);
}

.album-title {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.27;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.album-title > span:first-of-type {
  margin-left: 0.2em;
  color: var(--albums-muted);
  font-size: 0.78em;
}

.album-card-meta { display: none; }

.album-note-bubble {
  position: absolute;
  z-index: 50;
  left: 50%;
  top: -10px;
  width: max-content;
  max-width: min(620px, 90vw);
  padding: 10px 12px;
  transform: translate(calc(-50% + var(--shift, 0px)), -100%);
  border-radius: 10px;
  background: rgba(20, 23, 31, 0.97);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: left;
  word-break: break-word;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.album-note-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: rgba(20, 23, 31, 0.97);
}

.album-card:hover .album-note-bubble,
.album-card:focus-within .album-note-bubble,
.album-card.show-note .album-note-bubble {
  opacity: 1;
  visibility: visible;
}

.album-card:focus-visible {
  outline: 2px solid var(--albums-accent);
  outline-offset: 4px;
  border-radius: 12px;
}

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

.albums-grid[data-album-view='quilt'] {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.albums-grid[data-album-view='list'] {
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  grid-auto-rows: 158px;
  gap: 15px;
}

.albums-grid[data-album-view='list'] .album-card {
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: 132px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  gap: 7px 14px;
  align-items: start;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(226, 230, 238, 0.96);
  border-radius: 14px;
  background: var(--albums-surface);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.albums-grid[data-album-view='list'] .album-card:hover {
  transform: translateY(-2px);
  border-color: rgba(64, 92, 245, 0.3);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.11);
}

.albums-grid[data-album-view='list'] .album-cover {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 132px;
  height: 132px;
  border-radius: 9px;
}

.albums-grid[data-album-view='list'] .album-title {
  grid-column: 2;
  grid-row: 1;
  min-height: 2.45em;
  margin-top: 1px;
  font-size: 0.98rem;
}

.albums-grid[data-album-view='list'] .album-card-meta {
  display: flex;
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
  color: var(--albums-muted);
  font-size: 0.79rem;
  line-height: 1.3;
}

.albums-grid[data-album-view='list'] .album-card-meta span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.albums-grid[data-album-view='list'] .album-note-bubble { display: none; }

.albums-explorer {
  width: min(1760px, 100%);
  margin: 0 auto;
}

.albums-explorer[hidden],
.albums-explorer-view[hidden] { display: none; }

.albums-explorer-view {
  padding: clamp(15px, 2vw, 24px);
  border: 1px solid var(--albums-border);
  border-radius: 18px;
  background: var(--albums-surface);
  box-shadow: var(--albums-shadow);
}

.albums-explorer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  text-align: left;
}

.albums-explorer-heading h2 { margin: 1px 0 5px; color: var(--albums-ink); font-size: clamp(1.25rem, 2vw, 1.7rem); }
.albums-explorer-heading p { max-width: 74ch; margin: 0; color: var(--albums-muted); line-height: 1.45; }
.albums-eyebrow { color: var(--albums-accent-dark) !important; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; }

.albums-explorer-close {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: 1px solid var(--albums-border);
  border-radius: 999px;
  background: var(--albums-surface-solid);
  color: var(--albums-ink);
  font-size: 1.2rem;
  cursor: pointer;
}

.albums-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.albums-metric {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--albums-border);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.74);
  text-align: left;
}

.albums-metric span { display: block; }
.albums-metric-label { color: var(--albums-muted); font-size: 0.71rem; font-weight: 700; }
.albums-metric-value { display: block; margin: 4px 0 2px; overflow: hidden; color: var(--albums-ink); font-size: 1.02rem; text-overflow: ellipsis; white-space: nowrap; }
.albums-metric-note { color: var(--albums-muted); font-size: 0.7rem; line-height: 1.3; }

.albums-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.7fr);
  gap: 16px;
  align-items: stretch;
}

.albums-map-stage {
  position: relative;
  min-height: 450px;
  overflow: hidden;
  border: 1px solid var(--albums-border);
  border-radius: 16px;
  background: rgba(235, 241, 252, 0.7);
}

.albums-map-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  padding: 24px;
  color: var(--albums-muted);
  text-align: center;
}

.albums-map-status strong { color: var(--albums-ink); }
.albums-map-svg { display: block; width: 100%; height: auto; }
.albums-map-ocean { fill: rgba(231, 237, 247, 0.7); stroke: var(--albums-border); }

.albums-map-country {
  fill: rgba(160, 170, 190, 0.22);
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 0.6;
  transition: fill 0.14s ease, opacity 0.14s ease, stroke 0.14s ease;
}

.albums-map-country[data-level='1'] { fill: rgba(64, 92, 245, 0.24); }
.albums-map-country[data-level='2'] { fill: rgba(64, 92, 245, 0.38); }
.albums-map-country[data-level='3'] { fill: rgba(64, 92, 245, 0.53); }
.albums-map-country[data-level='4'] { fill: rgba(64, 92, 245, 0.7); }
.albums-map-country[data-level='5'] { fill: rgba(64, 92, 245, 0.9); }
.albums-map-country[data-has-albums='true'] { cursor: pointer; }
.albums-map-country[data-has-albums='true']:hover,
.albums-map-country[data-has-albums='true']:focus { stroke: var(--albums-ink); stroke-width: 1.2; }
.albums-map-country[data-selected='true'] { fill: #1f37c7; stroke: #fff; stroke-width: 1.5; }

.albums-map-tooltip {
  position: absolute;
  z-index: 20;
  min-width: 130px;
  max-width: 210px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(15, 18, 28, 0.96);
  color: #fff;
  pointer-events: none;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
  font-size: 0.76rem;
}

.albums-map-tooltip strong,
.albums-map-tooltip span { display: block; }
.albums-map-tooltip span { margin-top: 2px; opacity: 0.82; }

.albums-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 10px;
  color: var(--albums-muted);
  font-size: 0.7rem;
}

.albums-map-legend { display: inline-flex; align-items: center; gap: 4px; }
.albums-map-legend i { width: 16px; height: 8px; border-radius: 999px; background: rgba(64, 92, 245, 0.24); }
.albums-map-legend i:nth-of-type(2) { background: rgba(64, 92, 245, 0.38); }
.albums-map-legend i:nth-of-type(3) { background: rgba(64, 92, 245, 0.53); }
.albums-map-legend i:nth-of-type(4) { background: rgba(64, 92, 245, 0.7); }
.albums-map-legend i:nth-of-type(5) { background: rgba(64, 92, 245, 0.9); }

.albums-country-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--albums-border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  text-align: left;
}

.albums-country-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.albums-country-panel h3 { margin: 0; color: var(--albums-ink); font-size: 1rem; }
.albums-country-panel p { margin: 3px 0 0; color: var(--albums-muted); font-size: 0.74rem; line-height: 1.35; }
.albums-country-clear { border: 0; background: transparent; color: var(--albums-accent-dark); font: inherit; font-size: 0.72rem; font-weight: 700; cursor: pointer; }

.albums-country-ranking { display: grid; gap: 5px; }

.albums-country-rank {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--albums-ink);
  text-align: left;
  cursor: pointer;
}

.albums-country-rank:hover,
.albums-country-rank[aria-pressed='true'] { background: var(--albums-soft); }
.albums-country-rank-name { overflow: hidden; font-size: 0.76rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.albums-country-rank-count { color: var(--albums-muted); font-size: 0.72rem; }
.albums-country-track { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(125, 135, 155, 0.15); }
.albums-country-track i { display: block; height: 100%; border-radius: inherit; background: var(--albums-accent); }

.albums-country-albums {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 12px;
}

.albums-country-album { color: inherit; text-decoration: none; }
.albums-country-album img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 7px; }
.albums-country-album span { display: -webkit-box; margin-top: 4px; overflow: hidden; font-size: 0.65rem; line-height: 1.2; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

.albums-note { margin: 11px 0 0; color: var(--albums-muted); font-size: 0.72rem; line-height: 1.4; text-align: left; }
