:root {
  color-scheme: light;
  --ink: #1f2933;
  --muted: #73808c;
  --line: #d8dee4;
  --surface: #ffffff;
  --soft: #eef2f4;
  --nav: #22313f;
  --nav-strong: #17232e;
  --accent: #c84343;
  --accent-strong: #9f2f2f;
  --accent-soft: #fae8e8;
  --warn: #b7791f;
  --selected: #f7dddd;
  --hover: #fbf5f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  overflow: hidden;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(390px, 540px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 18px 22px;
  background: var(--nav);
  border-bottom: 4px solid var(--accent);
  color: #f7faf8;
}

.brandBlock {
  display: grid;
  grid-template-columns: 137px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.logoLink {
  display: block;
  width: 137px;
  height: auto;
}

.siteLogo {
  display: block;
  width: 137px;
  height: auto;
  object-fit: contain;
}

h1 {
  margin: 0 0 5px;
  font-size: 22px;
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: 0;
}

.homeLink {
  color: inherit;
  text-decoration: none;
}

.homeLink:hover {
  color: #ffffff;
  text-decoration: underline;
}

p {
  margin: 0;
}

#stats {
  color: #b8c5cf;
  font-size: 12px;
  line-height: 1.45;
}

.statsLine {
  display: block;
}

.statsLink {
  height: auto;
  padding: 0 0 1px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 0;
  background: transparent;
  color: #dce6ee;
  font: inherit;
  cursor: pointer;
}

.statsLink:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.controls {
  display: grid;
  grid-template-columns: minmax(220px, 520px) auto;
  gap: 10px;
  align-items: start;
  justify-content: space-between;
}

.searchStack {
  display: grid;
  gap: 5px;
  justify-self: start;
  width: min(520px, 100%);
}

.checkboxRow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.headerActions {
  display: grid;
  gap: 6px;
  justify-self: end;
  justify-items: end;
}

.headerAddButtons {
  display: flex;
  gap: 6px;
}

.headerAddButtons .addButton {
  width: auto;
  min-width: 68px;
}

.userControls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  color: #dce6ee;
  font-size: 12px;
  font-weight: 760;
}

.sessionUser {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sessionLoginLink {
  color: #ffffff;
  font-weight: 760;
  text-decoration: none;
}

.sessionLoginLink:hover {
  text-decoration: underline;
}

.accountMenuWrap {
  position: relative;
}

.accountMenuButton {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border-color: rgba(255, 255, 255, 0.34);
  background: transparent;
  color: #ffffff;
}

.accountMenuButton:hover,
.accountMenuButton[aria-expanded="true"] {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.hamburgerIcon {
  display: grid;
  gap: 3px;
  width: 14px;
}

.hamburgerIcon span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: #ffffff;
}

.accountMenu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 12;
  display: grid;
  min-width: 132px;
  padding: 6px;
  border: 1px solid #cbd4dc;
  border-radius: 5px;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.accountMenu[hidden] {
  display: none;
}

.accountMenu a,
.accountMenu button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.accountMenu a[hidden],
.accountMenu button[hidden] {
  display: none;
}

.accountMenu a:hover,
.accountMenu button:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.addButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  font: inherit;
  text-decoration: none;
}

.addButton[hidden] {
  display: none;
}

.mobileAddLink {
  color: #dce6ee;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.mobileAddLink:hover {
  color: #ffffff;
  text-decoration: underline;
}

.mobileAddButton:hover {
  text-decoration: none;
}

input,
select,
button {
  height: 36px;
  border: 1px solid #cbd4dc;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

input {
  min-width: 0;
  padding: 0 11px;
}

.searchFieldWrap {
  position: relative;
  display: grid;
}

.searchFieldWrap input {
  width: 100%;
  padding-right: 42px;
}

.searchFieldWrap input::-webkit-search-cancel-button {
  appearance: none;
}

.clearSearchButton {
  position: absolute;
  top: 50%;
  right: 5px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #64717d;
  font-size: 12px;
  font-weight: 800;
  transform: translateY(-50%);
}

.clearSearchButton:hover:not(:disabled) {
  background: #eef2f4;
  color: var(--accent-strong);
}

.clearSearchButton:disabled {
  opacity: 0.28;
  cursor: default;
}

select {
  padding: 0 9px;
}

.checkboxControl {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: auto;
  color: #d7e0e7;
  font-size: 12px;
  white-space: nowrap;
}

.checkboxControl[hidden] {
  display: none;
}

.checkboxControl input {
  width: 15px;
  height: 15px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

button {
  padding: 0 11px;
  cursor: pointer;
}

.addButton,
.primaryButton {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.dangerButton {
  border-color: #d92d20;
  background: #d92d20;
  color: #ffffff;
  font-weight: 760;
}

.dangerButton:hover {
  border-color: #b42318;
  background: #b42318;
  color: #ffffff;
}

.addButton:hover,
.primaryButton:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #ffffff;
}

button:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 16px;
  min-height: 0;
  overflow: hidden;
}

.results {
  min-width: 0;
  min-height: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}

.results {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  position: relative;
  overflow: hidden;
}

.catalogWaitOverlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: rgb(15 23 42 / 22%);
  backdrop-filter: blur(1px);
}

.catalogWaitOverlay[hidden] {
  display: none;
}

.catalogWaitOverlay .lookupRecord {
  transform: scale(3);
}

.tableShell {
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 9px 11px;
  border-bottom: 1px solid #e7ebef;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f7f9fa;
  color: #64717d;
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: 0;
}

.columnResizeHandle {
  position: absolute;
  top: 0;
  right: -3px;
  bottom: 0;
  z-index: 2;
  width: 7px;
  cursor: col-resize;
  touch-action: none;
}

.columnResizeHandle::after {
  content: "";
  position: absolute;
  top: 20%;
  right: 3px;
  bottom: 20%;
  width: 1px;
  background: transparent;
}

th:hover .columnResizeHandle::after,
body.resizingColumns .columnResizeHandle::after {
  background: #aab4bd;
}

body.resizingColumns {
  cursor: col-resize;
  user-select: none;
}

.sortHeader {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.sortHeader:hover,
.sortHeader.active {
  color: var(--accent-strong);
}

.sortIndicator {
  display: inline-block;
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  color: #aab4bd;
}

.sortIndicator.asc {
  border-bottom: 6px solid currentColor;
}

.sortIndicator.desc {
  border-top: 6px solid currentColor;
}

.sortHeader.active .sortIndicator {
  color: var(--accent-strong);
}

.sortHeader:hover .sortIndicator {
  color: var(--accent-strong);
}

.col-catalog_number {
  width: 92px;
  white-space: nowrap;
}

.col-cover {
  width: 78px;
}

.col-format {
  width: 120px;
}

.col-genres {
  width: 240px;
}

.col-date_added {
  width: 116px;
  white-space: nowrap;
}

.col-music_service {
  width: 178px;
}

.col-album_artist {
  width: auto;
}

.col-album_artist .albumLink,
.compactArtist {
  display: block;
}

.col-album_artist .albumLink {
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
}

.compactArtist {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.3;
}

.coverThumb {
  display: block;
  width: 57px;
  height: 57px;
  border-radius: 3px;
  object-fit: cover;
  background: #eef2f5;
  box-shadow: inset 0 0 0 1px #d8e0e7;
}

.coverPlaceholder {
  position: relative;
}

.coverPlaceholder::before,
.coverPlaceholder::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 2px solid #c8d2dc;
}

.coverPlaceholder::after {
  inset: auto 9px 9px;
  height: 10px;
  border-top: 0;
  transform: skewY(-20deg);
  transform-origin: left bottom;
}

.coverHoverPreview {
  position: fixed;
  z-index: 900;
  width: 220px;
  height: 220px;
  padding: 8px;
  border: 1px solid rgba(38, 48, 59, 0.22);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.24);
  pointer-events: none;
}

.coverHoverPreview[hidden] {
  display: none;
}

.coverHoverPreview img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
  object-fit: contain;
  background: #eef2f5;
}

tr {
  cursor: pointer;
}

tbody tr.selected {
  background: var(--selected);
}

tbody tr:hover {
  background: var(--hover);
}

tbody tr.selected:hover {
  background: #f1cccc;
}

.artistLink {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.artistLink:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.albumLink {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.albumLink:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.artistLink.inline {
  color: var(--accent-strong);
  font-size: 13px;
}

.artistLink.trackArtistLink {
  font-size: inherit;
  font-weight: 700;
}

.variousTrackSong {
  font-weight: 700;
}

.artistLink.trackArtistLink.variousTrackArtist {
  font-weight: 400;
}

.trackSeparator {
  color: var(--muted);
}

.labelLink {
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: left;
  cursor: pointer;
}

.labelLink:hover {
  color: inherit;
  text-decoration: underline;
}

.subtle,
.metaLine {
  color: var(--muted);
  font-size: 12px;
}

.radioId {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
}

.badge.missing {
  background: #fff6e6;
  color: var(--warn);
}

.catalogServiceList {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  font-size: 11px;
  font-weight: 760;
}

.catalogServiceStatus {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--accent-soft);
}

.catalogServiceStatus.isVerified {
  color: #166534;
}

.catalogServiceStatus.isUnverified {
  color: #713f12;
}

.formatMismatch {
  color: #b42318;
  font-weight: 800;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.pager button {
  min-width: 84px;
}

.pageSizeControl {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: auto;
  color: var(--muted);
  font-weight: 700;
}

.pageSizeControl select {
  height: 30px;
  padding: 3px 26px 3px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.pageButtons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pager .pageButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
}

.pager .pageButton:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.pager .pageButton.active {
  background: var(--nav);
  color: #ffffff;
  border-color: var(--nav);
}

.pageEllipsis {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 2px;
  color: var(--muted);
}

.detail {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 28px 64px 48px;
  background: #f3ecdf;
}

.detailOverlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #f3ecdf;
}

.detailOverlay[hidden] {
  display: none;
}

.detailClose {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 1001;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
}

.detail h2 {
  margin: 0 0 5px;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0;
}

.albumHeroInfo h2 {
  margin-bottom: 8px;
  font-size: 34px;
  line-height: 1.08;
}

.albumArtistLine {
  font-size: 20px;
  line-height: 1.35;
}

.detailActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.detail h3 {
  margin: 22px 0 9px;
  padding-top: 11px;
  border-top: 1px solid #e7ebef;
  font-size: 11px;
  color: #64717d;
  text-transform: uppercase;
  letter-spacing: 0;
}

.detail h4 {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0;
}

.detail dl {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 108px minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
  font-size: 13px;
}

.detail dt {
  color: var(--muted);
}

.detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.detail a {
  color: var(--accent-strong);
  font-weight: 650;
}

.lightboxTrigger {
  display: block;
  width: 100%;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
}

.lightboxTrigger:hover {
  color: inherit;
}

.albumHero {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  margin-bottom: 22px;
}

.albumHero.noCover {
  grid-template-columns: minmax(0, 1fr);
}

.albumHeroInfo {
  min-width: 0;
  padding-top: 2px;
}

.coverImageButton {
  width: 240px;
  height: 240px;
}

.coverImage {
  display: block;
  width: 240px;
  height: 240px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f7f9fa;
}

.chips,
.miniChips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.detailTagNavigation > p {
  margin-top: 14px;
  color: #64717d;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.detailTagNavigation .chips {
  margin-top: 7px;
}

.chipGroup,
.tagCloudItem {
  display: inline-flex;
  align-items: stretch;
  gap: 2px;
}

.chips button,
.miniChips button,
.tagCloud button {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-height: 22px;
  padding: 3px 7px;
  border: 0;
  border-radius: 4px;
  background: #8b1e1e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.chips button:hover {
  background: #6f1818;
  color: #ffffff;
}

.chips .chipDelete,
.tagCloud .chipDelete {
  min-width: 22px;
  padding: 3px 6px;
  background: #f4f0ee;
  color: #8b4a3f;
  font-weight: 750;
}

.chips .chipDeleteGlobal {
  min-width: 0;
  text-transform: uppercase;
  font-size: 9px;
  letter-spacing: 0;
}

.chips .chipDelete:hover,
.tagCloud .chipDelete:hover {
  background: #ead5cf;
  color: #7b2d22;
}

.miniChips button:hover {
  background: #6f1818;
  color: #ffffff;
}

.tagCloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.tagCloud button {
  min-height: 24px;
}

.tagCloudItem button:first-child {
  font-size: inherit;
}

.tagCloud button span {
  color: var(--muted);
  font-weight: 650;
  margin-right: 4px;
}

.tagCloudItem.tagLevel1 {
  font-size: 11px;
}

.tagCloudItem.tagLevel2 {
  font-size: 12px;
}

.tagCloudItem.tagLevel3 {
  font-size: 13px;
}

.tagCloudItem.tagLevel4,
.tagCloudItem.tagLevel5 {
  font-size: 14px;
}

.miniChips {
  margin-top: 8px;
}

.miniChips button {
  background: #8b1e1e;
  color: #ffffff;
  font-weight: 600;
}

.tableFilterLink {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  text-align: left;
}

.tableGenreTags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 4px;
}

.tableGenreTags button {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-height: 0;
  padding: 3px 7px;
  border: 0;
  border-radius: 4px;
  background: #8b1e1e;
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.tableFilterLink:hover {
  color: var(--accent-strong);
  text-decoration: underline;
}

.tableGenreTags button:hover {
  background: #6f1818;
  color: #ffffff;
  text-decoration: underline;
}

.providers {
  display: grid;
  gap: 9px;
}

.provider {
  padding: 10px;
  border: 1px solid #e3e8ed;
  border-radius: 4px;
  background: #fbfcfd;
}

.providerHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.providerHead span {
  font-size: 11px;
  font-weight: 700;
}

.providerStatus {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.serviceVerificationStatus {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid;
  border-radius: 4px;
}

.serviceVerificationStatus.isVerified {
  border-color: #166534;
  background: #15803d;
  color: #ffffff;
}

.serviceVerificationStatus.isUnverified {
  border-color: #ca8a04;
  background: #fef3c7;
  color: #854d0e;
}

.providerHead .ok {
  color: var(--accent-strong);
}

.providerHead .muted {
  color: var(--muted);
}

.providerDescription {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.serviceUrlForm {
  display: grid;
  gap: 5px;
  margin-top: 9px;
}

.serviceUrlForm .formMessage.isError {
  padding: 8px 10px;
  border: 1px solid #c85c52;
  border-radius: 4px;
  background: #fff1ef;
  color: #861d16;
  font-weight: 700;
}

.serviceUrlField {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.serviceUrlRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.serviceUrlRow input {
  width: 100%;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
}

.serviceUrlRow button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.serviceUrlRow button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #ffffff;
}

.serviceUrlActions {
  display: inline-flex;
  gap: 6px;
}

.serviceVerifyButton,
.serviceVerifiedBadge {
  height: 36px;
  padding: 0 11px;
  border-radius: 4px;
  font-size: inherit;
  font-weight: 760;
  text-transform: none;
}

.serviceUrlRow .serviceVerifyButton {
  border-color: #ca8a04;
  background: #facc15;
  color: #422006;
}

.serviceUrlRow .serviceVerifyButton:hover {
  border-color: #a16207;
  background: #eab308;
  color: #422006;
}

.serviceVerifiedBadge {
  display: inline-flex;
  align-items: center;
  border: 1px solid #166534;
  background: #15803d;
  color: #ffffff;
}

.serviceVerifyLightbox {
  position: fixed;
  inset: 0;
  z-index: 10020;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #eef2f4;
}

.serviceVerifyLightbox[hidden] {
  display: none;
}

.serviceVerifyToolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 10px 14px;
  border-bottom: 1px solid #cbd4dc;
  background: #fff;
  box-shadow: 0 2px 10px rgb(16 24 40 / 12%);
}

.serviceVerifyToolbar strong {
  margin-right: auto;
}

.serviceVerifyToolbar button {
  min-height: 38px;
}

.serviceVerifyReviewPrompt {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 32px;
  text-align: center;
}

.serviceVerifyReviewPrompt h2 {
  margin: 0;
  font-size: 24px;
}

.serviceVerifyReviewPrompt p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
}

.serviceVerifyReviewUrl {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
}

.serviceVerifyOpen {
  overflow: hidden;
}

@media (max-width: 620px) {
  .serviceVerifyToolbar {
    flex-wrap: wrap;
  }

  .serviceVerifyToolbar strong {
    flex: 1 0 100%;
  }
}

.serviceUrlRow .dangerButton {
  border-color: #d92d20;
  background: #d92d20;
}

.serviceUrlRow .dangerButton:hover {
  border-color: #b42318;
  background: #b42318;
}

.serviceUrlLabel {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.externalMusicLink {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.externalMusicLink.iconOnly {
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  text-decoration: none;
}

.externalLinkIcon {
  display: inline-block;
  font-size: 0.78em;
  font-weight: 800;
  line-height: 1;
}

.confirmationDialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 20px 50px rgb(16 24 40 / 28%);
}

.confirmationDialog::backdrop {
  background: rgb(16 24 40 / 55%);
}

.musicServiceLookupOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  background: rgb(16 24 40 / 58%);
  backdrop-filter: blur(2px);
}

.musicServiceLookupOverlay[hidden] {
  display: none;
}

.musicServiceLookupCard {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(440px, calc(100vw - 40px));
  padding: 26px 30px;
  border: 1px solid rgb(255 255 255 / 55%);
  border-radius: 14px;
  background: rgb(255 255 255 / 94%);
  color: var(--ink);
  box-shadow: 0 24px 70px rgb(0 0 0 / 38%);
  text-align: center;
}

.confirmationDialog form {
  padding: 22px;
}

.confirmationDialog h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.confirmationDialog p {
  margin: 0 0 18px;
  line-height: 1.45;
}

.confirmationDialog .formField {
  margin-bottom: 14px;
}

.confirmationDialog .formMessage:empty {
  display: none;
}

.confirmationActions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.confirmationActions button {
  flex: 1 1 0;
  height: auto;
  min-height: 44px;
  padding: 7px 11px;
  line-height: 1.2;
  text-align: center;
}

.tracks {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tracks li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid #edf0f3;
}

.trackNumber,
.trackTime {
  color: var(--muted);
  font-size: 12px;
}

.trackTitle {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.explicitBadge {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--accent-strong);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.previewButton {
  position: relative;
  width: 18px;
  height: 18px;
  min-width: 18px;
  padding: 0;
  border: 1px solid #d7b4b4;
  border-radius: 50%;
  background: #fff8f8;
  flex: 0 0 auto;
  transform: translateY(3px);
}

.previewButton::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 6px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid var(--accent-strong);
}

.previewButton.playing::before {
  top: 4px;
  left: 5px;
  width: 3px;
  height: 8px;
  border: 0;
  background: var(--accent-strong);
  box-shadow: 5px 0 0 var(--accent-strong);
}

.previewButton.loading::before {
  top: 4px;
  left: 4px;
  width: 8px;
  height: 8px;
  border: 2px solid #d7b4b4;
  border-top-color: var(--accent-strong);
  border-radius: 50%;
  animation: previewSpin 0.8s linear infinite;
}

.previewButton.unavailable {
  border-color: #d0d5dd;
  background: #f3f4f6;
  cursor: default;
}

.previewButton.unavailable::before,
.previewButton.unavailable::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 8px;
  width: 2px;
  height: 8px;
  border: 0;
  background: #8a94a2;
}

.previewButton.unavailable::before {
  transform: rotate(45deg);
}

.previewButton.unavailable::after {
  transform: rotate(-45deg);
}

.previewMessage {
  color: var(--muted);
  font-size: 11px;
}

@keyframes previewSpin {
  to {
    transform: rotate(360deg);
  }
}

.artistProfile {
  display: flow-root;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #e7ebef;
}

.artistImage {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f7f9fa;
}

.artistImageButton {
  float: left;
  width: 280px;
  max-width: 100%;
  height: auto;
  margin: 0 20px 12px 0;
}

.artistProfile h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.artistProfile p {
  color: #4f5b66;
  font-size: 13px;
  line-height: 1.45;
}

.textLink {
  display: inline;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.textLink:hover {
  color: var(--accent);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px;
  background: rgba(17, 24, 39, 0.86);
  overflow: hidden;
  cursor: pointer;
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  width: min(100%, calc(100vw - 88px));
  height: min(100%, calc(100vh - 88px));
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.38);
  pointer-events: none;
}

.lightboxClose {
  position: absolute;
  z-index: 2001;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: rgba(17, 24, 39, 0.88);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  color: #ffffff;
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.lightboxClose:hover {
  border-color: #ffffff;
  background: #ffffff;
  color: #17232e;
}

.lightboxClose:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.lightboxClose:active {
  transform: scale(0.94);
}

.lightboxOpen {
  overflow: hidden;
}

@media (max-width: 660px) {
  .lightbox {
    padding: 64px 16px 24px;
  }

  .lightbox img {
    width: min(100%, calc(100vw - 32px));
    height: min(100%, calc(100vh - 88px));
  }
}

.formMessage {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.formMessage:empty {
  display: none;
}

.addAlbumForm {
  display: grid;
  gap: 12px;
}

.addAlbumForm h2 {
  margin-bottom: 2px;
}

.formGrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
}

.editAttributes {
  display: grid;
  gap: 10px;
}

.editAttributes h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.editIdentityLine {
  margin: -3px 0 2px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
}

.editIdentityLine span {
  padding: 0 5px;
  color: var(--muted);
  font-weight: 400;
}

.formField {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.formField.wide {
  grid-column: 1 / -1;
}

.formField input,
.formField select,
.formField textarea {
  width: 100%;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
}

.formField.isInvalid {
  color: var(--accent-strong);
}

.editTagEditor,
.editServiceLinks {
  display: grid;
  gap: 9px;
  padding: 12px 0;
  border-top: 1px solid #ded5c8;
  border-bottom: 1px solid #ded5c8;
}

.addV2TagEditor {
  grid-column: 1 / -1;
}

.editTagEditor h3,
.editServiceLinks h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.editServiceGrid {
  display: grid;
  gap: 9px;
}

.manualLookups {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fa;
}

.manualLookups h3 {
  margin: 0;
}

.manualLookupTopRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.manualLookupInputRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.manualLookupInputRow button,
.manualArtistAlbumLookup button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 760;
}

.manualArtistAlbumLookup {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.manualArtistAlbumLookup > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
}

.manualArtistAlbumLookup input {
  width: 100%;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
}

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

.editTagChip {
  display: inline-flex;
  align-items: stretch;
  min-height: 26px;
  border-radius: 4px;
  overflow: hidden;
  background: #fbebeb;
  color: #8f3434;
  font-size: 12px;
  font-weight: 650;
}

.editTagChip > span {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
}

.editTagChip button {
  width: 26px;
  min-height: 26px;
  padding: 0;
  border: 0;
  border-left: 1px solid #eccaca;
  border-radius: 0;
  background: #f5dddd;
  color: #8f3434;
  font-weight: 750;
}

.editTagAddRow {
  display: grid;
  grid-template-columns: minmax(180px, 420px) auto;
  gap: 8px;
  justify-content: start;
}

.editTagAddRow input {
  width: 100%;
}

.formField.isInvalid input,
.formField.isInvalid select,
.formField.isInvalid textarea,
input.isInvalid,
select.isInvalid,
textarea.isInvalid {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 2px rgba(200, 67, 67, 0.16);
}

.checkboxField {
  align-content: start;
}

.checkboxField input {
  width: 18px;
  height: 18px;
  margin: 7px 0 0;
  accent-color: var(--accent);
}

.formField textarea {
  min-height: 78px;
  padding: 9px 11px;
  border: 1px solid #cbd4dc;
  border-radius: 4px;
  resize: vertical;
  font: inherit;
}

.serviceLookupRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.serviceLookupRow button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  font-weight: 760;
}

.serviceLookupRow button:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #ffffff;
}

.coverPreview {
  display: block;
}

.editCoverRow {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7f9fa;
}

.editCoverPreview {
  display: grid;
  place-items: center;
  width: 160px;
  height: 160px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.editCoverUpload {
  align-content: center;
}

.editCoverControls {
  display: grid;
  justify-items: start;
  gap: 10px;
}

[data-mobile-artwork] {
  border-width: 2px;
  font-weight: 800;
}

.deleteCoverButton {
  height: 34px;
}

.editCoverUpload small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.4;
  text-transform: none;
}

.coverPreview .coverImageButton,
.coverPreview .coverImage {
  width: 160px;
  height: 160px;
}

.coverPreview[hidden] {
  display: none;
}

.artistEditPanel {
  display: grid;
  gap: 12px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid #ded5c8;
}

.artistEditPanel h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.artistEditLayout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.artistEditImage {
  display: grid;
  place-items: center;
  width: 180px;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f7f9fa;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.artistEditImage img {
  display: block;
  width: 180px;
  height: 180px;
  border-radius: 4px;
  object-fit: cover;
}

.artistEditFields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.artistEditFields textarea {
  min-height: 150px;
  font-weight: 400;
}

.trackEditor {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.trackEditorHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.trackEditorHead h3 {
  margin: 0;
}

.trackEditorActions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.trackRows {
  display: grid;
  gap: 8px;
}

.trackEditRow {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 108px 32px;
  gap: 8px;
  align-items: end;
}

.trackEditRow .trackArtistField {
  display: none;
}

.trackEditor.showTrackArtists .trackEditRow {
  grid-template-columns: 70px minmax(0, 1fr) minmax(0, 1fr) 108px 32px;
}

.trackEditor.showTrackArtists .trackEditRow .trackArtistField {
  display: grid;
}

.trackEditRow label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  text-transform: uppercase;
}

.trackEditRow input[type="text"] {
  width: 100%;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
}

.trackEditRow .explicitCheck {
  justify-items: start;
}

.trackEditRow input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 4px 0 0;
  accent-color: var(--accent);
}

.iconButton {
  width: 32px;
  height: 32px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
}

.formActions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.editTopActions {
  justify-content: flex-end;
  margin: -4px 0 4px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.emptyState {
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 980px) {
  body {
    overflow: auto;
    display: block;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .controls {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
  }

  .layout {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .detail {
    display: flex;
    flex-direction: column;
    padding: 24px 52px 40px 20px;
  }

  .detailActions { order: 0; }
  .albumHero { order: 1; }
  .detailTracksSection { order: 2; }
  .detailCatalogSection { order: 3; }
  .detailServicesSection { order: 4; }
  .artistProfile { order: 5; }

  .detailTagNavigation {
    margin-top: 16px;
    padding: 12px;
    border-left: 4px solid var(--accent);
    border-radius: 4px;
    background: #fff8f0;
  }

  .detailTagNavigation > p,
  .detailTagNavigation .chips {
    margin-top: 0;
  }

  .detailTagNavigation .chips {
    margin-top: 8px;
  }

  .detailTagNavigation .chips button {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #ddbebe;
    font-size: 13px;
  }

  .detailTracksSection {
    margin: 0 0 6px;
    padding: 0 14px 12px;
    border: 1px solid #ddd2c3;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.58);
  }

  .detailTracksSection h3 {
    margin-top: 14px;
    padding-top: 0;
    border-top: 0;
    color: var(--accent-strong);
    font-size: 12px;
  }

  .tracks li {
    min-height: 48px;
    align-items: center;
    padding: 8px 0;
  }

  .previewButton {
    width: 32px;
    height: 32px;
    min-width: 32px;
    transform: none;
  }

  .previewButton::before {
    top: 8px;
    left: 11px;
    border-top-width: 7px;
    border-bottom-width: 7px;
    border-left-width: 10px;
  }

  .previewButton.playing::before {
    top: 8px;
    left: 9px;
    width: 4px;
    height: 14px;
    box-shadow: 8px 0 0 var(--accent-strong);
  }

  .previewButton.loading::before {
    top: 7px;
    left: 7px;
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 660px) {
  .topbar,
  .layout {
    padding-left: 12px;
    padding-right: 12px;
  }

  .brandBlock {
    grid-template-columns: 137px minmax(0, 1fr);
    gap: 12px;
  }

  .logoLink,
  .siteLogo {
    width: 137px;
    height: auto;
  }

  .controls {
    grid-template-columns: 1fr;
  }

  .tableShell {
    overflow-x: hidden;
  }

  th,
  td {
    padding: 8px 7px;
  }

  .col-catalog_number {
    width: 68px;
  }

  .col-cover {
    width: 62px;
  }

  .coverThumb {
    width: 48px;
    height: 48px;
  }

  .col-album_artist .albumLink {
    font-size: 13px;
  }

  .albumHero {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .albumHeroInfo h2 {
    font-size: 26px;
    line-height: 1.12;
  }

  .albumArtistLine {
    font-size: 16px;
  }

  .detail dl {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .coverImageButton,
  .coverImage {
    width: 200px;
    height: 200px;
  }

  .artistImageButton {
    float: none;
    width: min(280px, 100%);
    height: auto;
    margin: 0 0 14px;
  }

  .artistImage {
    width: 100%;
    height: auto;
  }

  .formGrid {
    grid-template-columns: 1fr;
  }

  .manualLookupTopRow,
  .manualArtistAlbumLookup > div {
    grid-template-columns: 1fr;
  }

  .editCoverRow {
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
  }

  .editCoverPreview,
  .editCoverPreview .coverImageButton,
  .editCoverPreview .coverImage {
    width: 120px;
    height: 120px;
  }

  .artistEditLayout {
    grid-template-columns: 1fr;
  }

  .trackEditRow {
    grid-template-columns: 64px minmax(0, 1fr) 32px;
  }

  .trackEditor.showTrackArtists .trackEditRow {
    grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr) 32px;
  }

  .trackEditRow .explicitCheck {
    grid-column: 1 / -1;
  }

  .col-format,
  .col-music_service {
    width: 118px;
  }
}
