:root {
  color-scheme: light;
  --bg: #eef4fa;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --ink: #14263a;
  --muted: #66788b;
  --line: #d7e1ec;
  --brand: #174f8a;
  --brand-2: #2d73b9;
  --brand-soft: #e1eefb;
  --accent: #d5a74c;
  --danger: #9e3535;
  --shadow: 0 14px 40px rgba(22, 67, 111, 0.09);
  --radius: 20px;
  --radius-small: 13px;
  --header-height: 94px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(71, 139, 205, 0.14), transparent 28rem),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
audio {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible,
[role="option"]:focus-visible {
  outline: 3px solid rgba(45, 115, 185, 0.34);
  outline-offset: 2px;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  transform: translateY(-160%);
  background: var(--brand);
  color: white;
  padding: 10px 14px;
  border-radius: 10px;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  min-height: var(--header-height);
  padding: 18px clamp(18px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: white;
  background:
    linear-gradient(115deg, rgba(255,255,255,0.08), transparent 40%),
    var(--brand);
  box-shadow: 0 5px 20px rgba(14, 61, 106, 0.2);
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-image {
  width: clamp(112px, 10vw, 128px);
  height: clamp(47px, 4.2vw, 54px);
  object-fit: cover;
  object-position: right center;
  flex: 0 1 auto;
  display: block;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}

.brand-title {
  min-width: 0;
}

.brand-heading {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.45rem, 2.6vw, 2.2rem);
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 0;
  font-size: 1.05rem;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--brand-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-header .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.copyright-link {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: background 160ms ease, transform 160ms ease;
}

.copyright-link:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.copyright-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.app-shell {
  width: min(2200px, 100%);
  height: calc(100vh - var(--header-height) - 48px);
  min-height: 620px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns:
    minmax(260px, 0.7fr)
    minmax(350px, 0.95fr)
    minmax(480px, 1.35fr)
    minmax(340px, 0.95fr);
  grid-template-areas: "discover list detail lyrics";
  gap: 20px;
  overflow: hidden;
}

.discover-panel {
  grid-area: discover;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.filter-card,
.list-card,
.detail-panel,
.content-card,
.player-card {
  background: var(--surface);
  border: 1px solid rgba(23, 79, 138, 0.1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filter-card {
  min-height: 100%;
  padding: 18px;
}

.section-heading,
.list-heading,
.player-heading,
.content-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.section-heading {
  margin-bottom: 15px;
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--brand-2);
  font-size: 0.84rem;
  font-weight: 700;
}

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

.search-field {
  position: relative;
  display: block;
  margin-bottom: 14px;
}

.search-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--surface-soft);
  color: var(--ink);
}

.search-field input::placeholder {
  color: #899591;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 1.3rem;
  pointer-events: none;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.filter-section {
  margin-top: 17px;
}

.filter-section-title {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 0.77rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.filter-settings {
  padding: 12px;
  border: 1px solid #dce8f3;
  border-radius: 13px;
  background: #f6faff;
}

.filter-grid label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.filter-grid select,
.filter-settings select {
  width: 100%;
  height: 42px;
  padding: 0 32px 0 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
}

.original-switch {
  min-height: 48px;
  padding: 8px 11px 8px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #dce8f3;
  border-radius: 13px;
  background: #f6faff;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 750;
}

.original-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-track {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  border-radius: 999px;
  background: #b9c5ce;
  transition: background 160ms ease;
}

.switch-track span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 45, 70, 0.25);
  transition: transform 160ms ease;
}

.original-switch input:checked + .switch-track {
  background: var(--brand-2);
}

.original-switch input:checked + .switch-track span {
  transform: translateX(18px);
}

.original-switch input:focus-visible + .switch-track {
  outline: 3px solid rgba(45, 115, 185, 0.28);
  outline-offset: 2px;
}

.quick-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-filter {
  min-height: 38px;
  padding: 7px 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #dce8f3;
  border-radius: 11px;
  background: #f6faff;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.quick-filter:hover {
  border-color: #a9c8e6;
  background: var(--surface-soft);
}

.quick-filter.is-active,
.quick-filter[aria-pressed="true"] {
  border-color: #9fc4e7;
  background: var(--brand-soft);
  color: var(--brand);
}

.quick-count {
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #edf2f7;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.quick-filter.is-active .quick-count,
.quick-filter[aria-pressed="true"] .quick-count {
  background: rgba(255, 255, 255, 0.72);
  color: var(--brand);
}

.list-card {
  grid-area: list;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.list-heading {
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--line);
}

.list-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.view-button {
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.view-button:hover {
  background: #e7f0f8;
  color: var(--brand);
}

.view-button.is-active,
.view-button[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 2px 6px rgba(23, 79, 138, 0.2);
}

.view-button:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 2px;
}

.count-badge,
.badge,
.subtle-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.76rem;
  font-weight: 800;
}

.song-list {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.song-list[data-view="grid"] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  grid-auto-rows: minmax(238px, max-content);
  align-content: start;
  gap: 12px;
  padding: 14px;
}

.song-list[data-view="grid"] .song-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 9px 6px;
  min-height: 238px;
  min-width: 0;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(31, 65, 96, 0.07);
}

.song-list[data-view="grid"] .song-item[aria-selected="true"] {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 2px var(--brand-soft);
}

.song-list[data-view="grid"] .thumbnail-wrap {
  grid-column: 1 / -1;
  width: 100%;
}

.song-list[data-view="grid"] .song-thumbnail,
.song-list[data-view="grid"] .thumbnail-fallback {
  width: 100%;
  height: auto;
  min-height: 125px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 11px;
}

.song-list[data-view="grid"] .song-item-text {
  min-width: 0;
}

.song-list[data-view="grid"] .song-item-title {
  margin-bottom: 4px;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.song-list[data-view="grid"] .song-item-meta {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-list[data-view="grid"] .song-item-side {
  display: flex;
  align-items: center;
  gap: 1px;
}

.song-list[data-view="grid"] .song-favorite {
  padding: 0.1rem;
}

.song-item {
  width: 100%;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #edf1ef;
  background: transparent;
  color: inherit;
  text-align: left;
}

.song-item:hover {
  background: #f2f7fc;
}

.song-item[aria-selected="true"] {
  background: var(--brand-soft);
  box-shadow: inset 4px 0 0 var(--brand-2);
}

.song-thumbnail,
.thumbnail-fallback {
  width: 58px;
  height: 58px;
  border-radius: 13px;
}

.song-thumbnail {
  display: block;
  object-fit: cover;
  background: var(--surface-soft);
}

.thumbnail-fallback {
  display: none;
  place-items: center;
  background: var(--brand);
  color: white;
  font-size: 1.35rem;
}

.song-item-title {
  display: block;
  margin-bottom: 5px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

.song-item-year {
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.empty-state {
  min-height: 200px;
  padding: 30px;
  display: grid;
  place-content: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
}

.detail-panel {
  grid-area: detail;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(16px, 2vw, 26px);
}

.detail-placeholder {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
  text-align: center;
}

.loader {
  width: 38px;
  height: 38px;
  border: 4px solid var(--brand-soft);
  border-top-color: var(--brand-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.detail-hero {
  display: grid;
  grid-template-columns: minmax(185px, 240px) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(18px, 2vw, 28px);
  margin-bottom: 22px;
}

.cover-column {
  min-width: 0;
}

.cover-wrap {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  aspect-ratio: 10 / 16;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #091521;
  box-shadow: 0 18px 35px rgba(18, 62, 108, 0.16);
}

.cover-jump-button {
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.cover-jump-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(18, 62, 108, 0.22);
}

.cover-jump-button:focus-visible {
  outline: 4px solid rgba(36, 112, 184, 0.35);
  outline-offset: 4px;
}

.cover-jump-button:disabled {
  cursor: default;
  transform: none;
}

.cover-wrap img,
.cover-wrap video,
.cover-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover-wrap img,
.cover-wrap video {
  display: block;
  object-fit: cover;
  object-position: center;
}

.cover-wrap video {
  z-index: 1;
  background: #091521;
}

.cover-wrap video[hidden] {
  display: none;
}

.cover-fallback {
  z-index: 2;
  display: none;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,.18), transparent 34%),
    var(--brand);
  color: #ffe3a7;
  font-size: clamp(4rem, 10vw, 7rem);
}

.detail-topline {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0 0 4px;
}

.badge-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin: 0;
}

.badge {
  min-height: 24px;
  padding: 3px 7px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--brand);
  font-size: 0.7rem;
  white-space: nowrap;
}

.badge-original {
  min-width: 24px;
  padding-inline: 6px;
  text-align: center;
  background: #fff3d5;
  border-color: #ecd092;
  color: #795913;
}

.favorite-detail-button {
  width: 24px;
  height: 30px;
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center start;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 1.3rem;
  line-height: 1;
}

.favorite-detail-button:hover,
.favorite-detail-button:focus-visible {
  background: var(--brand-soft);
  outline: none;
}

.favorite-detail-button.is-favorite {
  color: #d04a67;
}

.detail-intro h2 {
  margin: 0 0 11px;
  font-size: clamp(1.5rem, 2.35vw, 2.65rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
}

.detail-intro {
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
}

.detail-intro-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.detail-intro-heading h2 {
  flex: 1 1 260px;
  min-width: 0;
  margin-bottom: 11px;
}

.description {
  max-width: 72ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

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

.metadata-grid div {
  grid-column: span 6;
  padding: 7px 11px;
  border-radius: 13px;
  background: var(--surface-soft);
}

.metadata-grid .metadata-language {
  grid-column: span 4;
}

.metadata-grid .metadata-duration {
  grid-column: span 3;
}

.metadata-grid .metadata-created {
  grid-column: span 5;
}

.metadata-grid .metadata-style {
  grid-column: 1 / 9;
}

.metadata-grid .metadata-suno-action {
  grid-column: 9 / 13;
  display: flex;
  min-width: 0;
  padding: 0;
  background: transparent;
}

.metadata-suno-action dd {
  display: flex;
  width: 100%;
  margin: 0;
}

.button.style-suno-link {
  width: 100%;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  gap: 0;
  padding: 6px;
  font-size: 0.78rem;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
}

.style-suno-link span {
  display: block;
}

dt {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.style-text {
  display: -webkit-box;
  width: 100%;
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 400;
  line-height: 1.3;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.style-text[aria-expanded="true"] {
  display: block;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.style-text:hover,
.style-text:focus-visible {
  color: var(--primary);
}

.style-text:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(23, 79, 138, 0.35);
  outline-offset: 3px;
}

.player-card {
  position: sticky;
  z-index: 5;
  top: -16px;
  margin-bottom: 24px;
  padding: 15px 18px;
  border-color: rgba(23, 79, 138, 0.14);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.player-heading {
  margin-bottom: 10px;
}

.player-actions {
  display: flex;
  gap: 8px;
}

.player-heading-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 14px;
}

.autoplay-next-mount {
  display: flex;
  align-items: center;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--brand);
  font-weight: 900;
}

.icon-button:hover {
  background: var(--brand-soft);
}

.random-die-button {
  width: 46px;
  height: 46px;
  font-size: 24px;
  line-height: 1;
}

.keyboard-shortcuts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.keyboard-shortcuts kbd {
  min-width: 24px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--brand);
  font: inherit;
  font-weight: 800;
  text-align: center;
}

audio {
  width: 100%;
  display: block;
}

.queue-card {
  margin-bottom: 22px;
  padding: 15px 18px;
  border: 1px solid rgba(23, 79, 138, 0.14);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.queue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.queue-heading h3 {
  margin: 2px 0 0;
  color: var(--brand-dark);
  font-size: 1.05rem;
}

.queue-count {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 0.76rem;
  font-weight: 800;
}

.queue-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.queue-list {
  max-height: 168px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-gutter: stable;
}

.queue-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.queue-position {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

.queue-song {
  min-width: 0;
  display: grid;
  gap: 2px;
  padding: 3px 6px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: transparent;
  text-align: left;
}

.queue-song:hover,
.queue-song:focus-visible {
  background: #d8ecff;
}

.queue-song strong,
.queue-song span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-song strong {
  font-size: 0.84rem;
}

.queue-song span {
  color: var(--muted);
  font-size: 0.72rem;
}

.queue-actions {
  display: flex;
  gap: 4px;
}

.queue-action {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #b9d8f4;
  border-radius: 50%;
  color: var(--brand);
  background: #d8ecff;
  font-size: 0.68rem;
  font-weight: 900;
}

.queue-action:hover:not(:disabled) {
  background: #c3e0fa;
}

.queue-action:disabled {
  opacity: 0.32;
}

.queue-remove {
  font-size: 1rem;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 20px;
}

.queue-card + .detail-columns {
  margin-top: -12px;
}

.lyrics-panel {
  grid-area: lyrics;
  min-width: 0;
  min-height: 0;
}

.lyrics-panel .lyrics-card {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(20px, 2vw, 30px);
}

.lyrics-panel .lyrics-content {
  font-size: calc(clamp(1.02rem, 1.15vw, 1.18rem) * var(--lyrics-font-scale, 1));
}

.lyrics-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lyrics-size-controls {
  display: inline-flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #ffffff;
}

.lyrics-size-button {
  min-width: 34px;
  min-height: 34px;
  padding: 5px 7px;
  border: 0;
  border-right: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 750;
  cursor: pointer;
}

.lyrics-size-button:last-child {
  border-right: 0;
}

.lyrics-size-button:hover:not(:disabled) {
  background: var(--surface-soft);
}

.lyrics-size-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(31, 125, 204, 0.25);
  outline-offset: -3px;
}

.lyrics-size-button:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.45;
}

.lyrics-size-reset {
  font-size: 0.9rem;
}

.lyrics-heading-actions .subtle-status:empty {
  display: none;
}

.print-lyrics-button {
  min-height: 36px;
  padding: 7px 12px;
}

.content-card {
  padding: 20px;
  box-shadow: none;
}

.content-heading {
  margin-bottom: 18px;
}

.lyrics-content {
  min-height: 260px;
  color: #263733;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  font-size: calc(clamp(1.02rem, 1.5vw, 1.16rem) * var(--lyrics-font-scale, 1));
  line-height: 1.8;
  white-space: pre-wrap;
}

.lyrics-message {
  padding: 20px;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted);
  font-family: inherit;
  line-height: 1.6;
}

.print-preview-dialog {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 24px 70px rgb(15 23 42 / 35%);
}

.print-preview-dialog::backdrop {
  background: rgb(15 23 42 / 58%);
}

.print-preview-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 32px);
}

.print-preview-toolbar,
.print-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  background: var(--surface-soft);
}

.print-preview-toolbar h2 {
  margin: 0;
}

.print-preview-actions p {
  margin: 0;
  color: var(--muted);
  font-size: .88rem;
}

.print-preview-action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.print-document {
  overflow-y: auto;
  padding: clamp(24px, 5vw, 56px);
  background: #fff;
}

.print-song-title {
  width: 100%;
  padding: 0 0 8px;
  border: 0;
  border-bottom: 1px solid #d6ddd9;
  border-radius: 0;
  color: #17211e;
  font: 700 clamp(1.7rem, 4vw, 2.5rem)/1.2 ui-serif, Georgia, serif;
}

.print-song-meta {
  margin: 10px 0 28px;
  color: #586762;
  font-size: .92rem;
}

.print-lyrics-label {
  display: block;
  margin-bottom: 8px;
  color: #586762;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.print-lyrics-editor {
  display: block;
  width: 100%;
  min-height: 52vh;
  padding: 16px;
  border: 1px solid #cbd6d1;
  border-radius: 10px;
  color: #17211e;
  background: #fff;
  font: 1.05rem/1.65 ui-serif, Georgia, "Times New Roman", serif;
  white-space: pre-wrap;
}

@media print {
  @page {
    margin: 18mm;
  }

  body > :not(.print-preview-dialog) {
    display: none !important;
  }

  .print-preview-dialog {
    position: static;
    display: block;
    width: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .print-preview-sheet,
  .print-document {
    display: block;
    max-height: none;
    overflow: visible;
    padding: 0;
  }

  .print-preview-toolbar,
  .print-preview-actions,
  .print-lyrics-label {
    display: none !important;
  }

  .print-song-title {
    border: 0;
    font-size: 22pt;
  }

  .print-song-meta {
    margin: 3mm 0 9mm;
    font-size: 10pt;
  }

  .print-lyrics-editor {
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    font-size: 11pt;
    line-height: 1.5;
    white-space: pre-wrap;
  }
}

@media (max-width: 700px) {
  .print-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .print-preview-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.detail-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

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

.metadata-list div {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.action-list {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.action-list .button {
  min-width: 0;
  padding: 9px 8px;
  font-size: 0.82rem;
  line-height: 1.2;
  text-align: center;
  white-space: normal;
}

.action-card {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.button {
  min-height: 42px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 800;
}

.button-primary {
  background: var(--brand);
  color: white;
}

.button-primary:hover {
  background: #103f72;
}

.button-secondary {
  background: var(--brand-soft);
  color: var(--brand);
}

.button-secondary:hover {
  background: #d2e5f8;
}

.button-ghost {
  border-color: var(--line);
  background: transparent;
  color: var(--brand);
}

.site-header .button-secondary {
  background: rgba(255, 255, 255, 0.13);
  color: white;
  border-color: rgba(255, 255, 255, 0.16);
}

.copy-feedback {
  min-height: 20px;
  margin: 9px 0 0;
  color: var(--brand-2);
  font-size: 0.8rem;
}

.copy-feedback:empty {
  display: none;
}

.error-box {
  min-height: 420px;
  color: var(--danger);
}

.site-footer {
  min-height: 48px;
  padding: 0 clamp(18px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.pre-cover-footer {
  margin-top: 8px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem 1rem;
}

.legal-links a {
  color: inherit;
  font-weight: 700;
  text-underline-offset: 3px;
}

.legal-links a:hover {
  color: var(--brand);
}

/* Der kompakte Player gehört ausschließlich zur mobilen Ansicht. */
.mobile-player {
  display: none;
}

.cover-showcase {
  margin: 20px clamp(18px, 3vw, 42px) 24px;
  padding: clamp(18px, 2.5vw, 30px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(18, 62, 108, 0.1);
}

.cover-showcase:focus {
  outline: none;
}

.cover-showcase-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.cover-showcase-heading h2 {
  margin: 3px 0 0;
  color: var(--brand);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

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

.cover-tool-button {
  min-width: 42px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid #acd0f2;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.cover-tool-button:hover,
.cover-tool-button:focus-visible {
  border-color: var(--brand-2);
  background: #d2e5f8;
  outline: none;
}

.cover-tool-button-wide {
  min-width: 118px;
}

.large-cover-viewport {
  display: grid;
  place-items: center;
  overflow: visible;
  padding: clamp(16px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background:
    linear-gradient(45deg, #edf4fb 25%, transparent 25%),
    linear-gradient(-45deg, #edf4fb 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf4fb 75%),
    linear-gradient(-45deg, transparent 75%, #edf4fb 75%),
    #f8fbff;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-size: 24px 24px;
}

.large-cover-viewport.is-cover-zoomed {
  overflow: auto;
}

.large-cover-viewport img {
  width: min(100%, 680px);
  height: auto;
  display: block;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(14, 43, 92, 0.2);
  transform-origin: center;
  transition: transform 160ms ease;
}

.large-cover-fallback {
  margin: 0;
  padding: 24px;
  border-radius: 14px;
  background: white;
  color: var(--muted);
  text-align: center;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 1580px) {
  .app-shell {
    grid-template-columns: minmax(300px, 0.8fr) minmax(440px, 1.2fr);
    grid-template-areas:
      "discover list"
      "detail detail"
      "lyrics lyrics";
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .discover-panel {
    min-height: 560px;
    overflow: visible;
  }

  .list-card {
    height: 640px;
  }

  .detail-panel {
    overflow: visible;
  }

  .lyrics-panel .lyrics-card {
    height: auto;
    max-height: none;
  }
}

@media (max-width: 900px) {
  :root {
    --header-height: auto;
  }

  .app-shell {
    height: auto;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-areas:
      "discover"
      "list"
      "detail"
      "lyrics";
    overflow: visible;
  }

  .discover-panel {
    min-height: 0;
  }

  .list-card {
    height: 520px;
  }

  .detail-panel {
    overflow: visible;
  }

  .player-card {
    top: 8px;
  }
}

@media (max-width: 720px) {
  body {
    padding-bottom: 92px;
  }

  .mobile-player {
    position: fixed;
    z-index: 1000;
    left: 8px;
    right: 8px;
    bottom: 8px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    color: #fff;
    background: rgba(14, 43, 92, .97);
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .35);
    backdrop-filter: blur(12px);
  }

  .mobile-progress-track {
    position: absolute;
    inset: 0 10px auto;
    height: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, .22);
    border-radius: 999px;
    cursor: pointer;
  }

  .mobile-progress-bar {
    display: block;
    width: 0;
    height: 100%;
    background: #70b7ff;
  }

  .mobile-player-info {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0;
    color: inherit;
    text-align: left;
    background: transparent;
    border: 0;
  }

  .mobile-player-info img {
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 11px;
  }

  .mobile-player-text {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .mobile-player-text strong,
  .mobile-player-text span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-player-text span {
    color: #cfe4ff;
    font-size: .78rem;
  }

  .mobile-player-controls {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .mobile-control-button,
  .mobile-play-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    padding: 0;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
  }

  .mobile-play-button {
    background: #fff;
    color: #164f9c;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    width: 100%;
    gap: 11px;
  }

  .brand-image {
    width: 114px;
    height: 48px;
  }

  .brand-title h1 {
    font-size: clamp(1.18rem, 5.8vw, 1.7rem);
  }

  .brand-heading {
    gap: 7px;
  }

  .copyright-link {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    font-size: 1.12rem;
  }

  .header-actions {
    width: 100%;
    display: flex;
    justify-content: flex-end;
  }

  #statisticsButton,
  #maintenanceButton,
  #authorEditorButton {
    display: none;
  }

  .header-actions #installAppButton {
    width: auto;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: .88rem;
  }

  .app-shell {
    padding: 12px;
  }

  .filter-grid,
  .metadata-grid,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .metadata-grid > div {
    grid-column: 1 / -1;
  }

  .list-card {
    height: 460px;
  }

  .detail-panel {
    padding: 16px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-sidebar {
    grid-template-columns: 1fr;
  }

  .cover-wrap {
    width: min(100%, 300px);
    margin: 0 auto;
  }

  .detail-intro-heading {
    align-items: stretch;
  }

  .detail-intro {
    min-height: 0;
  }

  .button.style-suno-link {
    width: 100%;
    min-height: 42px;
  }

  .detail-intro h2 {
    font-size: clamp(2rem, 12vw, 3.4rem);
  }

  .lyrics-panel,
  .lyrics-panel .lyrics-card,
  .lyrics-panel .lyrics-content {
    max-height: none;
    overflow: visible;
    overscroll-behavior: auto;
    touch-action: pan-y;
  }

  .site-footer {
    padding: 14px 18px;
    align-items: flex-start;
    flex-direction: column;
  }
}

.maintenance-dialog {
  width: min(980px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  background: #f4f8fc;
  box-shadow: 0 24px 70px rgba(15, 44, 77, 0.28);
}

.maintenance-dialog::backdrop {
  background: rgba(9, 30, 52, 0.58);
}

.maintenance-sheet {
  padding: 1.35rem;
}

.maintenance-toolbar,
.maintenance-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.maintenance-toolbar {
  justify-content: space-between;
}

.maintenance-toolbar h2 {
  margin: 0;
}

.maintenance-intro {
  margin: .65rem 0 1rem;
  color: var(--muted);
  font-size: .88rem;
}

.maintenance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.maintenance-summary-item {
  padding: .8rem 1rem;
  border: 1px solid #d9e5ef;
  border-radius: 14px;
  background: #fff;
}

.maintenance-summary-item strong,
.maintenance-summary-item span {
  display: block;
}

.maintenance-summary-item strong {
  color: #174f8a;
  font-size: 1.45rem;
}

.maintenance-summary-item span {
  margin-top: .1rem;
  color: var(--muted);
  font-size: .82rem;
}

.maintenance-actions {
  margin: 1rem 0;
}

.maintenance-actions progress {
  flex: 1;
  min-width: 100px;
  height: 10px;
}

.maintenance-progress-text {
  color: var(--muted);
  font-size: .82rem;
}

.maintenance-results {
  padding: 1rem;
  border: 1px solid #d9e5ef;
  border-radius: 14px;
  background: #fff;
}

.maintenance-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.maintenance-filter {
  padding: .45rem .75rem;
  border: 1px solid #b9cee0;
  border-radius: 999px;
  color: #174f8a;
  background: #edf6fd;
  cursor: pointer;
}

.maintenance-filter.is-active {
  border-color: #174f8a;
  color: #fff;
  background: #174f8a;
}

.maintenance-result-heading {
  margin: .85rem 0 .65rem;
  font-weight: 700;
}

.maintenance-result-list {
  display: grid;
  gap: .45rem;
  max-height: 340px;
  overflow: auto;
}

.maintenance-result-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  padding: .6rem .7rem;
  border-radius: 9px;
  background: #f4f8fc;
}

.maintenance-type {
  padding: .2rem .4rem;
  border-radius: 999px;
  color: #fff;
  background: #174f8a;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
}

.maintenance-type-cover {
  background: #8a5b17;
}

.maintenance-type-liedtext {
  background: #6f428e;
}

.maintenance-result-description {
  min-width: 0;
}

.maintenance-result-description strong,
.maintenance-result-description span {
  display: block;
}

.maintenance-result-description span {
  margin-top: .12rem;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .78rem;
}

@media (max-width: 720px) {
  .maintenance-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .maintenance-sheet {
    padding: .9rem;
  }

  .maintenance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maintenance-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.file-check-results {
  max-height: 280px;
  overflow: auto;
  padding: .75rem;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  font-size: .82rem;
}

.file-check-results ul {
  margin: .55rem 0 0;
  padding-left: 1.2rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.statistics-dialog {
  width: min(1100px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  background: #f4f8fc;
  box-shadow: 0 24px 70px rgba(15, 44, 77, 0.28);
}

.author-editor-dialog {
  width: min(1040px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(12, 35, 60, 0.28);
}

.author-editor-dialog::backdrop {
  background: rgba(10, 29, 49, 0.68);
  backdrop-filter: blur(3px);
}

.author-editor-sheet {
  display: grid;
  gap: 20px;
  padding: 26px;
  background: #f7fafd;
}

.author-editor-toolbar,
.author-download-bar,
.author-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.author-editor-toolbar h2,
.author-song-picker h3,
.author-form-card h3 {
  margin: 0;
}

.author-editor-intro {
  margin: -8px 0 0;
  color: var(--muted);
}

.author-editor-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
  gap: 20px;
  min-height: 420px;
}

.author-song-picker,
.author-form-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.author-song-picker {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
}

.author-search {
  margin: 0;
}

.author-result-count,
.author-song-id,
.author-editor-feedback {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.author-keyboard-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.author-song-list {
  min-height: 260px;
  max-height: 380px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.author-song-option {
  position: relative;
  display: grid;
  width: 100%;
  gap: 4px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.author-song-option:last-child {
  border-bottom: 0;
}

.author-song-option:hover,
.author-song-option.is-selected {
  background: #edf5fd;
}

.author-song-option.is-selected {
  box-shadow: inset 4px 0 0 var(--brand-2);
}

.author-song-option.is-changed::after {
  content: "geändert";
  justify-self: start;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8f7ee;
  color: #17683a;
  font-size: 0.72rem;
  font-weight: 700;
}

.author-song-option span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.author-form-card {
  align-content: start;
  display: grid;
  gap: 16px;
}

.author-field {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.author-field input,
.author-field textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
  resize: vertical;
}

.author-field input:focus,
.author-field textarea:focus {
  border-color: var(--brand-2);
  outline: 3px solid rgba(27, 104, 171, 0.15);
}

.author-editor-feedback {
  min-height: 1.4em;
  color: #17683a;
  font-weight: 700;
}

.author-download-bar {
  padding: 16px 18px;
  border: 1px solid #c9ddf0;
  border-radius: 16px;
  background: #eaf3fb;
}

.author-download-bar > div {
  display: grid;
  gap: 3px;
}

.author-download-bar span {
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 760px) {
  .author-editor-sheet {
    padding: 18px;
  }

  .author-editor-layout {
    grid-template-columns: 1fr;
  }

  .author-song-list {
    max-height: 240px;
  }

  .author-editor-toolbar,
  .author-download-bar,
  .author-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .author-editor-toolbar .button,
  .author-download-bar .button,
  .author-form-actions .button {
    width: 100%;
  }
}

.statistics-dialog::backdrop {
  background: rgba(9, 30, 52, 0.58);
}

.statistics-sheet {
  padding: 1.35rem;
}

.statistics-toolbar,
.statistics-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.statistics-toolbar {
  margin-bottom: 1rem;
}

.statistics-toolbar h2,
.statistics-card h3 {
  margin: 0;
}

.statistics-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: .9rem;
}

.statistics-summary-item,
.statistics-card {
  border: 1px solid #d9e5ef;
  border-radius: 14px;
  background: #fff;
}

.statistics-summary-item {
  padding: .8rem 1rem;
}

.statistics-summary-item strong,
.statistics-summary-item span {
  display: block;
}

.statistics-summary-item strong {
  color: #174f8a;
  font-size: 1.45rem;
}

.statistics-summary-item span {
  margin-top: .1rem;
  color: var(--muted);
  font-size: .82rem;
}

.statistics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}

.statistics-card {
  min-width: 0;
  padding: 1rem;
}

.statistics-card h3 {
  font-size: 1rem;
}

.statistics-bars {
  display: grid;
  gap: .58rem;
  max-height: 260px;
  margin-top: .85rem;
  padding-right: .25rem;
  overflow: auto;
}

.statistics-row {
  display: grid;
  grid-template-columns: minmax(110px, 1.1fr) minmax(100px, 2fr) auto;
  align-items: center;
  gap: .55rem;
  font-size: .82rem;
}

.statistics-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.statistics-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8f0f7;
}

.statistics-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
  background: linear-gradient(90deg, #1b6fba, #52a1df);
}

.statistics-value {
  min-width: 1.7rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.statistics-empty,
.statistics-note {
  color: var(--muted);
  font-size: .82rem;
}

.statistics-note {
  margin: .75rem 0 0;
}

@media (max-width: 720px) {
  .statistics-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .statistics-sheet {
    padding: .9rem;
  }

  .statistics-summary,
  .statistics-grid {
    grid-template-columns: 1fr;
  }

  .statistics-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .statistics-row {
    grid-template-columns: minmax(90px, 1fr) minmax(80px, 1.4fr) auto;
  }
}

/* Copyright-Seite */
.copyright-page {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(45, 115, 185, 0.14), transparent 38%),
    var(--surface-soft);
}

.copyright-header {
  min-height: 76px;
  padding: 15px clamp(18px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 5px 20px rgba(14, 61, 106, 0.2);
}

.copyright-back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-weight: 750;
  text-decoration: none;
}

.copyright-back-link:hover {
  text-decoration: underline;
}

.copyright-back-link:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 5px;
  border-radius: 4px;
}

.copyright-heading-symbol {
  font-size: 2rem;
  font-weight: 800;
}

.copyright-main {
  width: min(1020px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px) 18px;
}

.copyright-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(320px, 1.15fr);
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.copyright-portrait {
  width: 100%;
  height: 100%;
  min-height: 520px;
  display: block;
  object-fit: cover;
  object-position: center top;
}

.copyright-copy {
  padding: clamp(28px, 5vw, 58px);
  align-self: center;
}

.copyright-copy h1 {
  margin-bottom: 28px;
  color: var(--brand);
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 850;
}

.copyright-copy p {
  margin-bottom: 1.15em;
  font-size: 1.04rem;
  line-height: 1.72;
}

.copyright-copy .copyright-reserved {
  margin-top: 30px;
  margin-bottom: 0;
  color: var(--brand);
  font-weight: 800;
}

/* Impressum und Datenschutz */
.legal-page {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(45, 115, 185, 0.14), transparent 38%),
    var(--surface-soft);
}

.legal-main {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 5vw, 60px) 18px;
}

.legal-card {
  padding: clamp(26px, 5vw, 58px);
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--shadow);
}

.legal-card h1 {
  margin: 0 0 1.4rem;
  color: var(--brand);
  font-size: clamp(2rem, 5vw, 3rem);
}

.legal-card h2 {
  margin: 2rem 0 .65rem;
  color: var(--brand);
  font-size: 1.25rem;
}

.legal-card p,
.legal-card li,
.legal-address {
  font-size: 1rem;
  line-height: 1.7;
}

.legal-card ul {
  padding-left: 1.3rem;
}

.legal-address {
  margin: 0;
  font-style: normal;
}

.legal-card a {
  overflow-wrap: anywhere;
}

.legal-note {
  padding: .9rem 1rem;
  border-left: 4px solid var(--brand-2);
  background: var(--surface-soft);
}

.legal-page-footer {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 0 18px 32px;
  color: var(--muted);
  font-size: .86rem;
}

@media (max-width: 720px) {
  .copyright-card {
    grid-template-columns: 1fr;
  }

  .copyright-portrait {
    height: auto;
    min-height: 0;
    aspect-ratio: 4 / 5;
  }

  .copyright-copy {
    padding: 28px 22px 34px;
  }
}
