:root {
  --ink: #151515;
  --paper: #fbfaf7;
  --muted: #696762;
  --line: #ddd6c8;
  --gold: #c69128;
  --green: #157c63;
  --red: #b33b32;
  --blue: #2c5d93;
  --panel: #ffffff;
  --shadow: 0 14px 34px rgba(20, 18, 14, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 247, 0.93);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.eyebrow {
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.contact,
button {
  min-height: 42px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  white-space: nowrap;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 54px;
}

.control-strip,
.player-panel,
.license-strip,
.catalog-head {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.control-strip {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.search-wrap {
  display: grid;
  gap: 8px;
}

label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  padding: 0 16px;
  outline: none;
}

input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(198, 145, 40, 0.18);
}

.stats {
  min-width: 210px;
  min-height: 52px;
  display: grid;
  align-content: center;
  padding: 8px 14px;
  border-left: 4px solid var(--green);
  background: #fff;
  box-shadow: var(--shadow);
}

.stats strong {
  font-size: 1.35rem;
}

.stats span,
.catalog-head p,
.card p,
.license-strip p {
  color: var(--muted);
  font-size: 0.92rem;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.filters button {
  min-height: 38px;
  padding: 0 13px;
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.filters button.active {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

.player-panel {
  grid-template-columns: minmax(0, 1fr) minmax(240px, 420px);
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

audio {
  width: 100%;
}

.license-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.license-strip article,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.license-strip article {
  padding: 16px;
}

.license-strip span,
.tag {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.license-strip strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 1.55rem;
}

.catalog-head {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 380px);
  align-items: end;
  padding-top: 16px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 14px;
}

.card {
  min-height: 232px;
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 15px;
  box-shadow: 0 8px 20px rgba(20, 18, 14, 0.06);
}

.card h3 {
  min-height: 52px;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  max-width: 100%;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: auto;
}

.actions a,
.actions button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.actions button.primary {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.actions button:disabled {
  color: #9b9790;
  cursor: not-allowed;
}

@media (max-width: 760px) {
  .topbar,
  .control-strip,
  .player-panel,
  .license-strip,
  .catalog-head {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .contact {
    width: 100%;
  }

  .stats {
    min-width: 0;
  }

  .license-strip {
    gap: 10px;
  }
}
