:root {
  --ink: #121820;
  --muted: #647084;
  --paper: #eef2f6;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --line: #d8e0ea;
  --line-strong: #a7b3c2;
  --accent: #0d7c72;
  --accent-hover: #07554f;
  --accent-soft: #e4f4f1;
  --accent-ink: #063f3a;
  --gold: #d69b2d;
  --gold-soft: #fff3d8;
  --warning: #b42318;
  --warning-hover: #7a1b14;
  --warning-soft: #fff1f0;
  --focus: #f5b84b;
  --shadow: 0 18px 45px rgba(18, 24, 32, 0.10);
  --shadow-soft: 0 8px 22px rgba(18, 24, 32, 0.08);
  --print-scale: 1;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(13, 124, 114, 0.13), transparent 28rem),
    radial-gradient(circle at 90% 0%, rgba(214, 155, 45, 0.12), transparent 24rem),
    linear-gradient(180deg, #f8fafc 0%, var(--paper) 48%, #e8edf4 100%);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(16px, 4vw, 44px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 38%),
    linear-gradient(135deg, #0c141d 0%, #121820 48%, #073f3b 100%);
  color: #ffffff;
  border-bottom: 4px solid var(--gold);
  box-shadow: 0 14px 40px rgba(7, 20, 29, 0.22);
}

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

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

.brand-text h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.app-logo {
  width: clamp(280px, 31vw, 520px);
  max-height: 142px;
  object-fit: contain;
  filter: drop-shadow(0 16px 34px rgba(0, 170, 255, 0.22));
}

.app-header h1 {
  margin: 2px 0 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: #b9c4cf;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.tab,
.repeater-head button,
.move-actions button,
.effect-row button,
.library-actions button,
.library-params button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.primary-button {
  padding: 0 18px;
  border-color: var(--accent);
  background: linear-gradient(180deg, #118a7e 0%, var(--accent) 100%);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(13, 124, 114, 0.22);
}

.secondary-button,
.danger-button,
.repeater-head button {
  padding: 0 14px;
}

.danger-button {
  border-color: #ffc9c4;
  background: var(--warning-soft);
  color: var(--warning);
}

.icon-button {
  width: 48px;
}

.primary-button:hover,
.tab.is-active,
.show-card.is-selected {
  border-color: var(--accent);
  background: linear-gradient(180deg, #118a7e 0%, var(--accent) 100%);
  color: #ffffff;
}

.tab.is-active {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.32), 0 10px 20px rgba(13, 124, 114, 0.20);
}

.primary-button:hover,
.secondary-button:hover,
.icon-button:hover,
.repeater-head button:hover,
.library-actions button:hover,
.move-actions button:hover {
  border-color: var(--accent);
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(7, 85, 79, 0.24);
}

.danger-button:hover {
  border-color: var(--warning-hover);
  background: var(--warning-hover);
  color: #ffffff;
}

.workspace {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px clamp(14px, 3vw, 32px) 42px;
}

.auth-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  display: grid;
  gap: 14px;
  width: min(100%, 560px);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-logo {
  width: min(100%, 540px);
  justify-self: center;
  margin: -8px 0 2px;
  filter: drop-shadow(0 18px 42px rgba(0, 170, 255, 0.24));
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 0.95;
}

.auth-hint {
  margin: -4px 0 8px;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--warning);
  font-weight: 900;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(0, 168, 255, 0.46);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: #f8fbff;
  font-weight: 900;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  margin-bottom: 18px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.80);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.tab {
  min-height: 46px;
  padding: 0 8px;
  background: transparent;
  border-color: transparent;
  white-space: nowrap;
}

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

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}

.song-heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.05;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.counter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.band-home {
  display: grid;
  gap: 16px;
}

.band-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

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

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

.manual-search input {
  min-height: 44px;
  background:
    linear-gradient(180deg, #ffffff, #f8fafc);
}

.band-search {
  max-width: 520px;
}

.inline-search {
  margin: 12px 0;
}

.library-search-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin: 12px 0;
}

.library-search-actions .inline-search {
  margin: 0;
}

.library-search-actions button {
  min-height: 44px;
}

.band-card {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at top right, rgba(13, 124, 114, 0.13), transparent 14rem);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.band-card:hover {
  transform: translateY(-2px);
  border-color: rgba(13, 124, 114, 0.48);
  box-shadow: 0 24px 54px rgba(18, 24, 32, 0.14);
}

.band-logo-preview {
  display: grid;
  place-items: center;
  width: 78px;
  aspect-ratio: 1;
  border: 2px solid rgba(13, 124, 114, 0.54);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-soft), var(--gold-soft));
  color: var(--accent-ink);
  font-size: 24px;
  font-weight: 900;
  overflow: hidden;
}

.band-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.band-card strong,
.band-card span,
.band-card small {
  display: block;
}

.band-card strong {
  font-size: 24px;
  line-height: 1.05;
}

.band-card span {
  margin-top: 8px;
  color: var(--accent-ink);
  font-weight: 900;
}

.band-card small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 900;
}

.band-actions {
  display: flex;
  grid-column: 1 / -1;
  gap: 8px;
  justify-content: space-between;
}

.band-repeater {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.band-social-row,
.band-member-row {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.band-social-row {
  grid-template-columns: minmax(120px, 220px) 1fr 44px;
}

.band-member-row {
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) 44px;
}

.band-social-row button,
.band-member-row button {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--warning);
  font-weight: 900;
}

.band-social-row button:hover,
.band-member-row button:hover {
  border-color: var(--warning-hover);
  background: var(--warning-hover);
  color: #ffffff;
}

.band-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
  box-shadow: var(--shadow);
}

.band-context h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.show-layout,
.setlist-layout,
.print-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
  align-items: start;
}

.show-layout {
  grid-template-columns: 330px minmax(0, 1fr);
}

.setlist-layout,
.print-layout {
  grid-template-columns: 330px minmax(0, 1fr);
}

.list-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  height: min(700px, calc(100vh - 130px));
  min-height: 420px;
}

.list-shell .show-list {
  height: auto;
  max-height: none;
  min-height: 0;
}

.agenda-list {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  gap: 10px;
  height: min(720px, calc(100vh - 210px));
  min-height: 420px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 252, 0.94));
  box-shadow: var(--shadow);
}

.agenda-heading-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.agenda-heading-actions label {
  min-width: 180px;
}

.agenda-heading-actions label:first-child {
  min-width: min(320px, 46vw);
}

.agenda-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 96px;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 98px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.agenda-item:hover,
.agenda-item.is-selected {
  border-color: var(--accent-hover);
  background: var(--accent-soft);
}

.agenda-date {
  display: grid;
  place-items: center;
  min-height: 72px;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
}

.agenda-date b {
  font-size: 24px;
  line-height: 1;
}

.agenda-date small {
  color: #dcefed;
  font-weight: 900;
}

.agenda-main {
  min-width: 0;
}

.agenda-main strong,
.agenda-main small,
.agenda-main em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agenda-main strong {
  font-size: 22px;
  line-height: 1.05;
}

.agenda-main small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 900;
}

.agenda-main em {
  margin-top: 8px;
  color: var(--ink);
  font-style: normal;
  font-weight: 800;
}

.agenda-badge {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 900;
}

.agenda-badge.is-rehearsal {
  background: #101820;
}

.setlist-builder {
  min-width: 0;
}

.setlist-time-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) 170px 170px minmax(0, 1.4fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.time-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.time-summary span {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #39475a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.time-summary strong {
  color: #101820;
  font-size: 22px;
  line-height: 1;
}

.setlist-columns {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(560px, 1.28fr);
  gap: 14px;
  align-items: start;
}

.catalog-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

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

.mini-heading h3 {
  margin: 0;
  font-size: 18px;
}

.mini-heading p {
  margin: 3px 0 0;
  color: #4c5b70;
  font-size: 13px;
  font-weight: 900;
}

.show-form,
.editor-form,
.repeater,
.library-card {
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.show-form,
.editor-form {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.show-form {
  grid-template-columns: minmax(0, 1fr) 190px;
}

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

.field-with-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: end;
}

.field-with-action label {
  min-width: 0;
}

.field-with-action button {
  min-height: 46px;
  white-space: nowrap;
}

.inline-band-editor {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.inline-band-editor > div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.editor-form {
  grid-template-columns: 120px repeat(3, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 12px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
  text-transform: none;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

textarea {
  min-height: 126px;
  padding: 12px;
  line-height: 1.4;
  resize: vertical;
}

.span-2 {
  grid-column: span 2;
}

.loud-input {
  font-size: 24px;
}

.show-list {
  display: grid;
  align-content: start;
  gap: 10px;
  height: min(640px, calc(100vh - 130px));
  max-height: 640px;
  min-height: 420px;
  overflow: auto;
  padding: 10px 6px 10px 10px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 252, 0.94));
  box-shadow: var(--shadow);
}

.registry-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 760px;
  overflow: auto;
  padding: 10px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.show-card,
.registry-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.04);
}

.registry-item {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
}

.registry-item:has(.registry-number) {
  grid-template-columns: 42px minmax(0, 1fr);
}

.show-card:hover,
.registry-item:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.show-card:hover span,
.show-card:hover small,
.show-card.is-selected span,
.show-card.is-selected small,
.registry-item:hover small,
.registry-item.is-selected small {
  color: #dcefed;
}

.show-card.is-selected,
.registry-item.is-selected {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
}

.show-card strong,
.registry-item strong {
  display: block;
  font-size: 18px;
  line-height: 1.12;
}

.registry-item strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.show-card span {
  color: var(--accent-ink);
  font-weight: 900;
}

.show-card small {
  color: var(--muted);
  font-weight: 800;
}

.registry-item small {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.registry-number {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
  font-weight: 900;
}

.registry-item:hover .registry-number,
.registry-item.is-selected .registry-number {
  background: #ffffff;
  color: var(--accent-ink);
}

.song-admin-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.song-sidebar {
  position: sticky;
  top: 92px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 12px;
  height: min(640px, calc(100vh - 130px));
  max-height: 640px;
  min-height: 420px;
  padding: 14px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 252, 0.94));
  box-shadow: var(--shadow);
}

.song-band-filter {
  position: static;
  min-width: 0;
}

.song-list-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.song-list-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.song-list-item:hover,
.song-list-item.is-selected {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
}

.song-list-number {
  display: grid;
  place-items: center;
  width: 46px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.song-list-item:hover .song-list-number,
.song-list-item.is-selected .song-list-number {
  background: #ffffff;
  color: var(--accent-ink);
}

.song-list-main {
  min-width: 0;
}

.song-list-main strong,
.song-list-main small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-list-main strong {
  font-size: 18px;
  line-height: 1.05;
}

.song-list-main small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.song-list-item:hover small,
.song-list-item.is-selected small {
  color: #dcefed;
}

.song-detail {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.song-profile-card {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at top right, rgba(13, 124, 114, 0.12), transparent 18rem);
  box-shadow: var(--shadow);
}

.song-profile-number {
  display: grid;
  place-items: center;
  width: 82px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
}

.song-profile-main span {
  color: var(--muted);
  font-weight: 900;
}

.song-profile-main h3 {
  margin: 6px 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.92;
}

.song-profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.song-profile-tags strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-soft);
  font-size: 13px;
}

.song-profile-main p {
  margin: 12px 0 0;
  padding: 10px;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: var(--gold-soft);
  color: #513a00;
  font-weight: 900;
}

.song-profile-effects {
  display: grid;
  grid-column: 2 / -1;
  gap: 8px;
}

.song-profile-effects span {
  display: block;
  padding: 9px 11px;
  border-left: 5px solid var(--accent);
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-weight: 900;
}

.song-profile-effects b {
  margin-right: 8px;
  color: var(--ink);
}

.song-profile-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.song-edit-panel {
  display: grid;
  gap: 14px;
}

.song-editor-form {
  grid-template-columns: 110px minmax(190px, 0.8fr) minmax(260px, 1.4fr);
}

.setlist-grid {
  display: grid;
  gap: 8px;
  max-height: 680px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 2px 12px 2px 0;
  scrollbar-gutter: stable;
}

.song-pool {
  display: grid;
  gap: 8px;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.pool-song {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #b8c5d4;
  border-radius: 8px;
  background: #ffffff;
  color: #101820;
}

.pool-song:hover {
  border-color: var(--accent-hover);
  background: #f4fbfa;
  box-shadow: 0 8px 22px rgba(8, 76, 69, 0.18);
}

.pool-song strong,
.pool-song span,
.pool-song small {
  display: block;
}

.pool-song strong {
  font-size: 15px;
  line-height: 1.12;
}

.pool-song span {
  margin-top: 3px;
  color: #4c5b70;
  font-size: 13px;
  font-weight: 900;
}

.pool-song small {
  margin-top: 4px;
  color: #063f3a;
  font-weight: 900;
}

.pool-song button {
  min-height: 38px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
}

.pool-song button:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

.entry-select {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.entry-select select {
  min-height: 34px;
  border-radius: 7px;
}

.pool-song button:disabled,
.pool-song.is-added button {
  cursor: default;
  border-color: #8d9bad;
  background: #dfe5ec;
  color: #263445;
}

.pool-song.is-added {
  border-color: #c1ccd9;
  background: #f2f5f8;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.song-card {
  display: grid;
  grid-template-columns: 58px minmax(150px, 0.82fr) minmax(230px, 1.18fr) 58px;
  align-items: stretch;
  gap: 8px;
  padding: 8px;
  border: 1px solid #aebccd;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.song-card:hover {
  border-color: var(--accent-hover);
  background: #fbfefd;
  box-shadow: 0 14px 34px rgba(15, 118, 110, 0.18);
}

.song-card.dragging {
  opacity: 0.55;
}

.song-number {
  display: grid;
  place-items: center;
  min-height: 70px;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
  font-size: 30px;
  font-weight: 900;
}

.song-main {
  min-width: 0;
}

.song-main h3 {
  margin: 0;
  color: #101820;
  font-size: clamp(18px, 2.05vw, 26px);
  line-height: 0.98;
}

.song-main p {
  margin: 5px 0 8px;
  color: #4c5b70;
  font-weight: 900;
}

.song-meta {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.song-meta span,
.song-meta strong {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid #b8c5d4;
  border-radius: 999px;
  background: #ffffff;
  color: #101820;
  font-size: 13px;
  font-weight: 900;
}

.song-meta strong {
  border-color: #e29a94;
  background: var(--warning-soft);
  color: #8d1c13;
}

.entry-badge {
  border-color: var(--gold) !important;
  background: var(--gold-soft) !important;
  color: #513a00 !important;
}

.entry-callout {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin: 0 0 8px;
  padding: 0 10px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: var(--gold-soft);
  color: #513a00;
  font-size: 13px;
  font-weight: 900;
}

.total-time {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 14px;
  white-space: nowrap;
}

.intro-note {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  background: var(--gold-soft);
  color: #513a00;
  font-size: 13px;
  font-weight: 900;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-transform: none;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.pedal-lines {
  display: grid;
  align-content: center;
  gap: 6px;
  min-width: 0;
}

.pedal-lines span {
  display: block;
  padding: 7px 9px;
  border-left: 5px solid var(--accent);
  border-radius: 6px;
  background: #d8efeb;
  color: #06342f;
  font-size: 14px;
  font-weight: 800;
}

.pedal-lines b {
  color: #101820;
}

.move-actions {
  display: grid;
  gap: 5px;
}

.move-actions button {
  width: 100%;
  min-height: 32px;
  padding: 0 6px;
  font-size: 11px;
  color: #101820;
}

.move-actions [data-remove-song]:hover {
  border-color: var(--warning-hover);
  background: var(--warning-hover);
  color: #ffffff;
}

.repeater,
.library-list {
  margin-top: 14px;
}

.repeater {
  padding: 18px;
}

.repeater-head,
.library-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.repeater-head {
  margin-bottom: 12px;
}

.repeater-head h3 {
  margin: 0;
  font-size: 20px;
}

.effect-row {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr 44px;
  gap: 8px;
  margin-top: 8px;
}

.effect-row [data-effect-config] {
  color: var(--ink);
  font-weight: 900;
}

.effect-row button,
.library-params button,
.library-actions [data-remove-config] {
  color: var(--warning);
}

.effect-row button:hover,
.library-params button:hover,
.library-actions [data-remove-config]:hover {
  border-color: var(--warning-hover);
  background: var(--warning-hover);
  color: #ffffff;
}

.library-config-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
}

.library-list,
.library-detail-slot {
  height: min(640px, calc(100vh - 170px));
  max-height: 640px;
  min-height: 420px;
  padding: 10px 6px 10px 10px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 252, 0.94));
  box-shadow: var(--shadow);
}

.library-list {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
}

.library-detail-slot {
  overflow-y: auto;
  overflow-x: hidden;
}

.library-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.category-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: end;
}

.category-form button {
  width: 100%;
}

.category-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.filter-control {
  min-width: 0;
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #ffffff;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
}

.category-chip:hover,
.category-chip.is-active {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
}

.library-card,
.library-card-proxy {
  padding: 16px;
}

.library-card,
.library-card-proxy {
  display: grid;
  gap: 14px;
}

.library-card:not(.is-open),
.library-card-proxy {
  padding: 10px;
}

.library-card-proxy {
  border: 1px solid var(--accent-hover);
  border-radius: 8px;
  background: var(--accent-soft);
  box-shadow: var(--shadow);
}

.library-card.is-open {
  align-self: start;
  padding: 10px;
}

.library-card:not(.is-open) .library-card-head,
.library-card:not(.is-open) .library-params,
.library-card:not(.is-open) .library-actions,
.library-card:not(.is-open) .library-readonly {
  display: none;
}

.library-detail-slot .library-card > .library-summary {
  display: none;
}

.library-card.is-open:not(.is-editing) .library-card-head,
.library-card.is-open:not(.is-editing) .library-params,
.library-card.is-open:not(.is-editing) .library-actions {
  display: none;
}

.library-card.is-editing .library-readonly {
  display: none;
}

.library-card.is-open.is-editing .library-card-head,
.library-card.is-open.is-editing .library-params,
.library-card.is-open.is-editing .library-actions {
  display: grid;
}

.library-card:not(.is-open).is-editing .library-card-head,
.library-card:not(.is-open).is-editing .library-params,
.library-card:not(.is-open).is-editing .library-actions {
  display: none;
}

.library-readonly {
  display: grid;
  gap: 16px;
}

.readonly-hero {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

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

.readonly-media {
  display: grid;
  place-items: center;
  width: 150px;
  aspect-ratio: 1.15;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  overflow: hidden;
}

.readonly-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.readonly-media.is-empty {
  background: linear-gradient(135deg, #101820, #0d7c72);
}

.readonly-hero span {
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.readonly-hero h4 {
  margin: 4px 0 6px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
}

.readonly-hero p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

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

.readonly-section-title {
  display: flex;
  align-items: center;
  min-height: 24px;
  margin-top: 4px;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.readonly-param-grid span {
  display: grid;
  grid-template-columns: minmax(110px, 0.65fr) minmax(0, 1fr);
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  color: var(--ink);
  font-weight: 900;
}

.readonly-param-grid b {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: #101820;
  color: #ffffff;
  text-transform: uppercase;
}

.readonly-param-grid i {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 12px;
  font-style: normal;
  overflow-wrap: anywhere;
}

.library-summary {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  width: 100%;
  min-height: 96px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.library-summary:hover {
  background: var(--panel-soft);
  color: var(--ink);
}

.summary-media {
  display: grid;
  place-items: center;
  width: 72px;
  aspect-ratio: 1;
  justify-self: start;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  overflow: hidden;
}

.summary-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.summary-media.is-empty {
  background: linear-gradient(135deg, #101820, #0d7c72);
}

.library-summary strong,
.library-summary small {
  display: block;
  min-width: 0;
}

.library-summary strong {
  font-size: 18px;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.library-summary small {
  margin-top: 6px;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.library-summary em {
  grid-column: 2;
  color: var(--accent-ink);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.library-card.is-open .library-summary {
  grid-template-columns: 78px minmax(0, 1fr) auto;
}

.library-card.is-open .library-summary em {
  grid-column: auto;
}

.library-card-head {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 10px;
  margin-bottom: 12px;
}

.library-params {
  display: grid;
  gap: 8px;
}

.library-params div {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(90px, 1fr) 38px;
  gap: 6px;
}

.library-params input:first-child {
  background: #101820;
  border-color: #101820;
  color: #ffffff;
  text-transform: uppercase;
}

.library-actions {
  margin-top: 12px;
}

.library-actions button {
  padding: 0 12px;
}

.library-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.library-mode-tabs button {
  min-height: 48px;
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}

.library-mode-tabs button:hover,
.library-mode-tabs button.is-active {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: #ffffff;
}

.library-view {
  display: none;
}

.library-view.is-active {
  display: grid;
  gap: 14px;
}

.compact-heading {
  margin-top: 0;
}

.compact-heading h3 {
  margin: 0;
  font-size: 22px;
}

.library-editor,
.nested-editor {
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.library-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.nested-editor {
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 252, 0.96));
}

.inline-editor {
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.studio-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.soft-note {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.photo-rows,
.amp-config-rows,
.amp-param-rows {
  display: grid;
  gap: 8px;
}

.photo-row,
.amp-param-row,
.amp-config-head {
  display: grid;
  gap: 8px;
}

.photo-row {
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.65fr) 44px;
}

.photo-row:has(.featured-photo-check) {
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.65fr) minmax(150px, auto) 44px;
}

.photo-file-status {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.featured-photo-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.featured-photo-check input {
  width: 18px;
  min-height: 18px;
}

.amp-param-row {
  grid-template-columns: minmax(120px, 0.7fr) minmax(120px, 1fr) 44px;
}

.amp-config-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.amp-config-head {
  grid-template-columns: minmax(0, 1fr) 44px;
}

.photo-row button,
.amp-param-row button,
.amp-config-head button {
  color: var(--warning);
}

.photo-row button:hover,
.amp-param-row button:hover,
.amp-config-head button:hover {
  border-color: var(--warning-hover);
  background: var(--warning-hover);
  color: #ffffff;
}

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

.amp-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-size: 14px;
  text-transform: none;
}

.amp-choice:hover {
  border-color: var(--accent-hover);
  box-shadow: 0 8px 22px rgba(8, 76, 69, 0.14);
}

.amp-choice input {
  width: 18px;
  min-height: 18px;
}

.entity-list,
.entity-detail-slot {
  display: grid;
  align-content: start;
  gap: 14px;
  height: min(640px, calc(100vh - 170px));
  max-height: 640px;
  min-height: 420px;
  overflow: auto;
  padding: 10px 6px 10px 10px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 252, 0.94));
  box-shadow: var(--shadow);
}

#libraryAmps .entity-list,
#libraryAmps .entity-detail-slot {
  height: min(780px, calc(100vh - 118px));
  max-height: 780px;
  min-height: 560px;
}

.entity-list {
  display: grid;
  align-content: start;
  gap: 10px;
}

.entity-detail-card {
  display: grid;
  gap: 14px;
}

.entity-card {
  display: grid;
  grid-column: 1;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 16px;
  padding: 10px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at top left, rgba(13, 124, 114, 0.13), transparent 16rem);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.entity-list-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 94px;
  padding: 10px;
  border: 1px solid rgba(167, 179, 194, 0.72);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.entity-list-item:hover,
.entity-list-item.is-selected {
  border-color: var(--accent-hover);
  background: var(--accent-soft);
}

.entity-list-media {
  display: grid;
  place-items: center;
  width: 76px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
  font-weight: 900;
  overflow: hidden;
}

.entity-list-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-list-media.is-empty {
  background: linear-gradient(135deg, #101820, #0d7c72);
}

.entity-list-item strong,
.entity-list-item small {
  display: block;
}

.entity-list-item strong {
  font-size: 18px;
  line-height: 1.05;
}

.entity-list-item small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 900;
}

.entity-card.is-open {
  grid-column: 2;
  grid-row: 1 / span 80;
  grid-template-columns: 150px minmax(0, 1fr);
  align-self: start;
  padding: 16px;
}

.entity-card:hover {
  border-color: rgba(13, 124, 114, 0.5);
  box-shadow: 0 22px 48px rgba(18, 24, 32, 0.13);
}

.entity-media {
  display: grid;
  place-items: center;
  min-height: 76px;
  border-radius: 8px;
  background: #101820;
  color: #ffffff;
  font-size: 34px;
  font-weight: 900;
  overflow: hidden;
}

.entity-card.is-open .entity-media {
  min-height: 150px;
}

.entity-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.entity-media.is-empty {
  background:
    linear-gradient(135deg, #101820, #0d7c72);
}

.entity-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.entity-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

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

.entity-actions button {
  min-height: 40px;
}

.entity-details {
  display: none;
  gap: 12px;
  padding-top: 4px;
}

.entity-card.is-open .entity-details {
  display: grid;
}

.detail-note {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 800;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.photo-strip img {
  width: 100%;
  aspect-ratio: 1.35;
  border-radius: 8px;
  object-fit: cover;
}

.entity-title h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1;
}

.entity-card.is-open .entity-title h3 {
  font-size: clamp(24px, 3vw, 34px);
}

.entity-title p {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.entity-card:not(.is-open) .entity-actions {
  justify-content: flex-start;
}

.entity-card:not(.is-open) .entity-actions .danger-button {
  display: none;
}

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

.amp-settings section {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.amp-settings strong {
  color: var(--accent-ink);
  font-size: 15px;
  text-transform: uppercase;
}

.amp-settings div,
.linked-amps,
.studio-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.amp-settings span,
.linked-amps span,
.studio-facts span,
.studio-facts strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.amp-settings b {
  margin-right: 4px;
  color: var(--muted);
  text-transform: uppercase;
}

.linked-amps span,
.linked-amps button {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.linked-amps button {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

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

.studio-facts .stars {
  background: #fff3c4;
  color: #7a4d00;
  letter-spacing: 1px;
}

.compact-empty {
  min-height: 70px;
  grid-column: 1 / -1;
}

.print-heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.print-page-counter {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border: 2px solid #101820;
  border-radius: 8px;
  background: #ffffff;
  color: #101820;
  font-weight: 900;
}

.print-sheet {
  display: grid;
  width: min(100%, 210mm);
  min-height: 297mm;
  gap: 10mm;
  padding: 8mm;
  border: 4px solid #000000;
  background: #ffffff;
  color: #000000;
  transform-origin: top left;
}

#printSongs {
  display: grid;
  gap: 8mm;
}

.print-show {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4mm 6mm;
  padding: 5mm;
  border: 5px solid #000000;
  background: #ffffff;
  color: #000000;
}

.print-show p {
  margin: 0;
  color: #000000;
  font-weight: 900;
  text-transform: uppercase;
}

.print-show h1 {
  margin: 0;
  color: #000000;
  font-size: calc(52px * var(--print-scale));
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.print-show > strong {
  display: grid;
  place-items: center;
  padding: 3mm 5mm;
  background: #000000;
  color: #ffffff;
  font-size: calc(32px * var(--print-scale));
  font-weight: 900;
  white-space: nowrap;
}

.print-show #printShowNotes {
  grid-column: 1 / -1;
  padding-top: 4mm;
  border-top: 3px solid #000000;
  color: #000000;
  font-size: calc(22px * var(--print-scale));
  line-height: 1.25;
  text-transform: none;
}

.print-song {
  display: grid;
  grid-template-columns: calc(26mm * var(--print-scale)) 1fr;
  gap: 5mm;
  min-height: 118mm;
  padding: 5mm;
  border: 5px solid #000000;
  background: #ffffff;
  color: #000000;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-number {
  display: grid;
  place-items: center;
  background: #000000;
  color: #ffffff;
  font-size: calc(62px * var(--print-scale));
  font-weight: 900;
  line-height: 1;
}

.print-band {
  margin: 0 0 1mm;
  color: #000000;
  font-size: calc(24px * var(--print-scale));
  font-weight: 900;
  text-transform: uppercase;
}

.print-body h2 {
  margin: 0;
  color: #000000;
  font-size: calc(60px * var(--print-scale));
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
}

.print-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2mm;
  margin: 4mm 0;
}

.print-meta strong {
  padding: 2.5mm 3mm;
  border: 3px solid #000000;
  color: #000000;
  font-size: calc(24px * var(--print-scale));
  font-weight: 900;
  line-height: 1.1;
}

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

th,
td {
  box-sizing: border-box;
  border: 4px solid #000000;
  padding: 3mm 3.5mm;
  text-align: left;
  color: #000000;
  font-size: calc(28px * var(--print-scale));
  line-height: 1.1;
  overflow-wrap: anywhere;
  word-break: normal;
}

th {
  width: 35%;
  background: #000000;
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  font-weight: 900;
  text-transform: uppercase;
}

#printSongs .print-song:nth-child(2n) {
  break-after: page;
  page-break-after: always;
}

@media (max-width: 980px) {
  .show-layout,
  .setlist-layout,
  .song-admin-layout,
  .print-layout,
  .agenda-item,
  .setlist-time-panel,
  .time-summary,
  .setlist-columns,
  .library-toolbar,
  .band-grid,
  .library-config-layout,
  .library-list,
  .entity-list,
  .amp-choice-list,
  .amp-settings {
    grid-template-columns: 1fr;
  }

  .library-card.is-open,
  .entity-card.is-open {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 760px) {
  .app-header,
  .section-heading,
  .band-context,
  .repeater-head,
  .library-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-lockup {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .app-logo {
    width: min(100%, 320px);
    max-height: 92px;
  }

  .tabs {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .song-card {
    grid-template-columns: 62px 1fr;
  }

  .move-actions,
  .pedal-lines {
    grid-column: 2 / -1;
  }

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

  .show-form,
  .band-form,
  .editor-form,
  .song-editor-form,
  .inline-editor,
  .studio-grid,
  .category-form,
  .library-card-head,
  .print-show,
  .print-meta,
  .entity-card {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .effect-row,
  .band-social-row,
  .band-member-row,
  .library-params div,
  .library-summary,
  .photo-row,
  .amp-param-row,
  .amp-config-head {
    grid-template-columns: 1fr;
  }

  .effect-row button,
  .band-social-row button,
  .band-member-row button,
  .library-params button,
  .photo-row button,
  .amp-param-row button,
  .amp-config-head button {
    width: 100%;
  }

  .library-mode-tabs {
    grid-template-columns: 1fr;
  }

  .entity-title {
    flex-direction: column;
  }

  .song-profile-card {
    grid-template-columns: 1fr;
  }

  .song-profile-effects {
    grid-column: auto;
  }

  .summary-media {
    width: 100%;
    max-height: 180px;
  }

  .song-sidebar {
    position: static;
    height: auto;
    max-height: none;
    min-height: auto;
  }

  .show-list {
    height: auto;
    max-height: none;
    min-height: auto;
  }

  .agenda-list {
    height: auto;
    min-height: auto;
  }

  .library-list,
  .library-detail-slot,
  .entity-detail-slot,
  .entity-list {
    height: auto;
    max-height: none;
    min-height: auto;
  }

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

@media screen {
  :root {
    --ink: #f8fbff;
    --muted: #a8bac7;
    --paper: #07090d;
    --panel: #10141c;
    --panel-soft: #171d27;
    --line: #2d3847;
    --line-strong: #466176;
    --accent: #00a8ff;
    --accent-hover: #20c8ff;
    --accent-soft: #071f31;
    --accent-ink: #bcecff;
    --gold: #ff9f2f;
    --gold-soft: #2c1a0a;
    --warning: #ff5a72;
    --warning-hover: #ff334f;
    --warning-soft: #2f0c15;
    --focus: #ffb547;
    --shadow: 0 24px 68px rgba(0, 0, 0, 0.58);
    --shadow-soft: 0 14px 34px rgba(0, 0, 0, 0.40);
    color-scheme: dark;
  }

  body {
    background:
      radial-gradient(circle at 14% -8%, rgba(255, 159, 47, 0.17), transparent 28rem),
      radial-gradient(circle at 88% 8%, rgba(0, 168, 255, 0.22), transparent 32rem),
      radial-gradient(circle at 52% 18%, rgba(255, 45, 124, 0.10), transparent 26rem),
      linear-gradient(135deg, #07090d 0%, #111722 48%, #06080c 100%);
    background-attachment: fixed;
    background-color: #07080a;
    background-repeat: no-repeat;
    color: var(--ink);
  }

  .app-header {
    background:
      linear-gradient(135deg, rgba(255, 159, 47, 0.12), transparent 28%),
      linear-gradient(120deg, rgba(0, 168, 255, 0.16), transparent 52%),
      linear-gradient(135deg, #05070a 0%, #101722 48%, #08111b 100%);
    border-bottom-color: var(--accent);
    box-shadow: 0 18px 58px rgba(0, 0, 0, 0.62);
  }

  .primary-button {
    border-color: #41cfff;
    background: linear-gradient(180deg, #08b9ff 0%, #0078d6 100%);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(0, 168, 255, 0.28);
  }

  .primary-button:hover,
  .tab.is-active,
  .show-card.is-selected {
    border-color: var(--gold);
    background: linear-gradient(180deg, #19c9ff 0%, #006ec7 100%);
    color: #ffffff;
  }

  .secondary-button,
  .icon-button,
  .tab,
  .repeater-head button,
  .move-actions button,
  .effect-row button,
  .library-actions button,
  .library-params button {
    background: #121923;
    color: #f8fbff;
    border-color: #35485b;
  }

  .danger-button {
    border-color: #7e2638;
    background: #2f0c15;
    color: #ffbdc8;
  }

  .tabs,
  .band-context,
  .band-form,
  .band-repeater,
  .show-form,
  .editor-form,
  .repeater,
  .library-card,
  .catalog-panel,
  .setlist-time-panel,
  .library-toolbar,
  .show-list,
  .registry-list,
  .agenda-list,
  .song-sidebar,
  .library-list,
  .library-detail-slot,
  .entity-list,
  .entity-detail-slot {
    background:
      linear-gradient(180deg, rgba(18, 24, 34, 0.96), rgba(9, 13, 19, 0.96));
    border-color: #2d3847;
    box-shadow: var(--shadow-soft);
  }

  .band-card,
  .agenda-item,
  .registry-item,
  .show-card,
  .pool-song,
  .song-card,
  .song-profile-card,
  .readonly-hero,
  .library-summary,
  .library-card-proxy,
  .entity-list-item,
  .entity-card,
  .amp-choice,
  .amp-config-row,
  .photo-file-status,
  .photo-row button,
  .amp-param-row button,
  .amp-config-head button,
  .category-chip,
  .checkbox-field,
  input,
  select,
  textarea {
    background: #111823;
    color: #f8fbff;
    border-color: #2f4153;
  }

  .inline-band-editor {
    background: #121923;
    border-color: #35485b;
  }

  input,
  select,
  textarea {
    background: #070b11;
    color: #f8fbff;
  }

  .effect-row [data-effect-config] {
    color: #bcecff;
  }

  input:hover,
  select:hover,
  textarea:hover,
  .pool-song:hover,
  .song-card:hover,
  .entity-list-item:hover,
  .entity-list-item.is-selected,
  .registry-item:hover,
  .registry-item.is-selected,
  .show-card:hover,
  .show-card.is-selected,
  .song-list-item:hover,
  .song-list-item.is-selected {
    border-color: var(--gold);
    background: #092337;
    color: #f8fbff;
  }

  .song-list-item {
    background: #11151d;
    border-color: #444957;
    color: #f8fbff;
  }

  .song-list-item strong {
    color: #f8fbff;
  }

  .song-list-item small {
    color: #a8bac7;
  }

  .song-list-number {
    background: #05070b;
    color: #ffffff;
    border: 1px solid #4b5261;
  }

  .song-list-item.is-selected {
    background: #092337;
    border-color: #20c8ff;
  }

  .library-mode-tabs {
    background: #101722;
    border-color: #304458;
  }

  .library-mode-tabs button {
    background: #070b11;
    color: #f8fbff;
    border-color: #263747;
  }

  .library-mode-tabs button:hover,
  .library-mode-tabs button.is-active {
    background: linear-gradient(180deg, #11bfff, #0078d6);
    color: #ffffff;
    border-color: #ff9f2f;
  }

  .band-logo-preview,
  .song-number,
  .song-profile-number,
  .registry-number,
  .agenda-date,
  .entity-list-media,
  .readonly-media,
  .summary-media,
  .print-number {
    background: linear-gradient(135deg, #05070a, #0a2440 55%, #008fe6);
    color: #ffffff;
    border-color: #2b607e;
  }

  .song-list-item:hover .song-list-number,
  .song-list-item.is-selected .song-list-number {
    background: linear-gradient(135deg, #05070a, #0a2440 55%, #008fe6);
    color: #ffffff;
    border: 1px solid #20c8ff;
  }

  .summary-media.is-empty,
  .entity-list-media.is-empty,
  .readonly-media.is-empty {
    background: linear-gradient(135deg, #05070a, #0a2440 52%, #ff2d7c);
  }

  .counter,
  .agenda-badge,
  .total-time,
  .category-chip.is-active,
  .category-chip:hover {
    background: #0078d6;
    color: #ffffff;
    border-color: #20c8ff;
  }

  .song-meta span,
  .song-profile-tags strong,
  .studio-facts span,
  .studio-facts strong,
  .linked-amps span,
  .linked-amps button,
  .time-summary span,
  .pool-song.is-added,
  .pool-song button:disabled,
  .pool-song.is-added button,
  .pedal-lines span,
  .song-profile-effects span,
  .readonly-param-grid span,
  .library-readonly,
  .intro-note,
  .detail-note {
    background: #121923;
    color: #f8fbff;
    border-color: #304458;
  }

  .setlist-time-panel,
  .catalog-panel,
  .library-toolbar {
    background: linear-gradient(180deg, #121923, #090d14);
    border-color: #304458;
  }

  .library-editor,
  .nested-editor {
    background: linear-gradient(180deg, #121923, #090d14);
    border-color: #304458;
    color: #f8fbff;
  }

  .library-editor .compact-heading h3,
  .library-editor .compact-heading p,
  .nested-editor h3,
  .nested-editor label,
  .amp-config-row label,
  .photo-row label {
    color: #f8fbff;
  }

  .library-editor .compact-heading p,
  .nested-editor .soft-note {
    color: #a8bac7;
  }

  .nested-editor {
    box-shadow: inset 0 1px 0 rgba(255, 247, 235, 0.04), var(--shadow-soft);
  }

  .photo-file-status,
  .featured-photo-check,
  .amp-config-row {
    background: #111823;
    border-color: #2f4153;
    color: #f8fbff;
  }

  .amp-param-row input:first-child,
  .amp-config-head input {
    color: #f8fbff;
  }

  .library-toolbar {
    align-items: stretch;
  }

  .category-form,
  .filter-control {
    padding: 12px;
    border: 1px solid #2d3847;
    border-radius: 8px;
    background: #090d14;
  }

  .time-summary strong {
    color: #f8fbff;
  }

  .pool-song span,
  .pool-song small,
  .mini-heading p,
  .catalog-panel p {
    color: #a8bac7;
  }

  .pool-song strong,
  .catalog-panel h3,
  .setlist-time-panel label,
  .library-toolbar label {
    color: #f8fbff;
  }

  .entry-select {
    color: #a8bac7;
  }

  .entry-badge {
    background: #071f31 !important;
    color: #bcecff !important;
    border-color: #20c8ff !important;
  }

  .entry-callout {
    background: #071f31;
    color: #bcecff;
    border-color: #20c8ff;
  }

  .empty-state {
    background: #090d14;
    color: #bcecff;
    border-color: #304458;
  }

  .category-form,
  .filter-control,
  .manual-search {
    color: #a8bac7;
  }

  .song-meta strong {
    border-color: #7e2638;
    background: #2f0c15;
    color: #ffbdc8;
  }

  .pedal-lines span,
  .song-profile-effects span {
    border-left-color: var(--gold);
  }

  .readonly-param-grid b {
    background: #05070a;
    color: #ffb547;
  }

  .readonly-param-grid i {
    color: #f8fbff;
  }

  .print-sheet,
  .print-sheet *,
  .print-show,
  .print-song {
    color: #000000;
  }

  .print-sheet {
    background: #ffffff;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 4mm;
  }

  body {
    background: #ffffff;
  }

  .app-header,
  .tabs,
  .panel:not(#print),
  .no-print {
    display: none !important;
  }

  .workspace {
    width: 100%;
    padding: 0;
  }

  #print {
    display: block !important;
  }

  .print-sheet {
    width: 100%;
    min-height: auto;
    border: 0;
    padding: 0;
    gap: 0;
  }

  #printSongs {
    display: block;
  }

  .print-show {
    grid-template-columns: 1fr auto;
    gap: 2mm 4mm;
    margin-bottom: 4mm;
    padding: 3mm;
    border-width: 4px;
  }

  .print-show h1 {
    font-size: 34px;
  }

  .print-show > strong {
    padding: 2mm 3mm;
    font-size: 22px;
  }

  .print-show #printShowNotes {
    padding-top: 2mm;
    border-top-width: 3px;
    font-size: 16px;
    line-height: 1.15;
  }

  .print-song {
    grid-template-columns: 22mm 1fr;
    gap: 4mm;
    height: 116mm;
    min-height: 0;
    margin-bottom: 4mm;
    padding: 4mm;
    border-width: 4px;
    overflow: hidden;
  }

  .print-number {
    background: #ffffff;
    color: #000000;
    border: 4px solid #000000;
    font-size: 46px;
  }

  .print-band {
    font-size: 18px;
  }

  .print-body h2 {
    font-size: 42px;
    line-height: 0.95;
  }

  .print-meta {
    gap: 1.5mm;
    margin: 2.5mm 0;
  }

  .print-meta strong {
    padding: 1.8mm 2mm;
    border-width: 3px;
    font-size: 18px;
  }

  th,
  td {
    border-width: 3px;
    padding: 2mm 2.2mm;
    font-size: 21px;
    line-height: 1.05;
    overflow: hidden;
    overflow-wrap: anywhere;
  }

  th {
    width: 42%;
    background: #ffffff;
    color: #000000;
  }

  td {
    width: 58%;
  }

  #printSongs .print-song:nth-child(2n) {
    break-after: page;
    page-break-after: always;
  }

  #printSongs .print-song:last-child {
    break-after: auto;
    page-break-after: auto;
  }
}
