:root {
  color-scheme: light;
  --bg: #f7f8f6;
  --ink: #20231f;
  --muted: #697067;
  --line: #d8ddd4;
  --panel: #ffffff;
  --accent: #256b5a;
  --accent-2: #8f3f52;
  --warn: #b55e00;
  --selected: #e6f1ec;
  --shadow: 0 20px 52px rgba(35, 42, 36, 0.13);
  --glass-shadow: 0 28px 68px rgba(35, 42, 36, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86), inset 0 -1px 0 rgba(255, 255, 255, 0.26);
  --field: #ffffff;
  --soft: #eef5f1;
  --header: #eef1ed;
  --glass-panel: rgba(255, 255, 255, 0.62);
  --glass-field: rgba(255, 255, 255, 0.50);
  --glass-soft: rgba(238, 245, 241, 0.58);
  --radius-control: 10px;
  --radius-panel: 24px;
  --radius-sheet: 32px;
  --radius-list: 10px;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

* {
  min-width: 0;
}

.playlist-mode-view {
  display: none;
  padding: 24px;
  overflow: auto;
}

.playlist-mode-view.is-active {
  display: block;
}

.playlist-mode-header,
.playlist-mode-grid,
.playlist-inline-form,
.playlist-actions,
.playlist-transport,
.monitor-status-row,
.playlist-integrity-panel {
  display: flex;
}

.playlist-mode-header {
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.playlist-mode-header h2,
.playlist-card h3 {
  margin: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.playlist-integrity-panel {
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
}

.playlist-mode-grid {
  align-items: start;
  flex-wrap: wrap;
  gap: 16px;
}

.playlist-card {
  box-sizing: border-box;
  flex: 1 1 310px;
  min-width: min(100%, 300px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 10px 26px rgba(35, 42, 36, 0.07);
}

.playlist-card label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.82rem;
}

.playlist-card select,
.playlist-card input {
  width: 100%;
}

.playlist-inline-form,
.playlist-actions,
.playlist-transport {
  gap: 8px;
  margin-top: 10px;
}

.playlist-inline-form input {
  flex: 1;
  min-width: 0;
}

.playlist-session-state {
  margin: 16px 0 0;
  padding: 10px;
  border-radius: 10px;
  background: var(--soft);
  font-weight: 700;
}

.playlist-player-card progress {
  width: 100%;
  margin: 20px 0 6px;
  accent-color: var(--accent);
}

.playlist-player-card time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.playlist-transport button {
  flex: 1;
}

.playlist-track-list {
  max-height: 280px;
  margin: 18px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.playlist-track-list li {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
}

.playlist-track-list li.is-current {
  border-radius: 8px;
  background: var(--selected);
}

.playlist-track-list small {
  color: var(--muted);
}

.monitor-status-row {
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.playlist-summary-card {
  flex-basis: 100%;
}

.playlist-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.playlist-summary-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border-radius: 10px;
  background: var(--soft);
}

.playlist-summary-grid small {
  color: var(--muted);
}

.playlist-summary-grid strong {
  font-variant-numeric: tabular-nums;
}

.integrity-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.integrity-badge.is-ok,
.integrity-badge.is-valid {
  background: #dff3e8;
  color: #17633e;
}

.integrity-badge.is-warning,
.integrity-badge.is-missing {
  background: #fff0ce;
  color: #855400;
}

.integrity-badge.is-invalid {
  background: #fde2e0;
  color: #9f2822;
}

.access-lock-button {
  white-space: nowrap;
}

.access-dialog {
  width: min(460px, calc(100vw - 28px));
}

:root[data-account-dialog-mode="signed-in"] .access-dialog {
  width: min(720px, calc(100vw - 32px));
}

.access-dialog h2 {
  margin: 0 0 8px;
}

.access-dialog #accessDialogExplanation[hidden] {
  display: none;
}

.access-pin-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.access-pin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.access-pin-form input {
  width: 100%;
  box-sizing: border-box;
  font-size: 1.3rem;
  letter-spacing: 0.18em;
  text-align: center;
}

.access-role-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.account-login-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0 8px;
  padding: 14px 16px;
  border: 1px solid rgba(132, 162, 172, 0.26);
  border-radius: 16px;
  background: rgba(11, 31, 43, 0.30);
}

.account-login-panel[hidden] {
  display: none;
}

.account-login-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.account-login-head strong {
  font-size: 0.9rem;
  font-weight: 760;
}

.account-login-head span {
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.account-login-head span.is-connected {
  color: rgba(150, 219, 188, 0.86);
}

#accountLogoutBtn {
  justify-self: end;
  min-height: 34px;
  padding: 6px 14px;
  font-size: 0.86rem;
}

.account-login-form {
  display: grid;
  gap: 9px;
}

.account-login-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.account-login-form input {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
}

.account-login-form menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 2px 0 0;
  padding: 0;
}

:root[data-account-locked="true"] body > *:not(#accessDialog) {
  visibility: hidden;
  pointer-events: none;
}

:root[data-account-locked="true"] .access-dialog {
  width: min(760px, calc(100vw - 42px));
  max-width: 760px;
  padding: 42px 44px;
  border-color: rgba(111, 151, 157, 0.28);
  border-radius: 32px;
  background:
    radial-gradient(circle at 16% 4%, rgba(82, 132, 124, 0.18), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(45, 78, 92, 0.18), transparent 38%),
    linear-gradient(180deg, #0c2530 0%, #09202b 48%, #071923 100%) !important;
  box-shadow:
    0 36px 90px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(187, 217, 221, 0.07);
  text-align: left;
}

:root[data-account-locked="true"] .access-dialog::backdrop {
  background:
    radial-gradient(circle at 50% 18%, rgba(48, 103, 96, 0.23), transparent 34%),
    linear-gradient(180deg, #071923 0%, #0b2530 56%, #071720 100%);
  backdrop-filter: blur(0);
}

:root[data-account-locked="true"] .access-dialog .eyebrow {
  color: rgba(174, 196, 197, 0.72);
  margin-bottom: 4px;
  letter-spacing: 0.24em;
}

:root[data-account-locked="true"] .access-dialog h2 {
  max-width: 620px;
  margin: 0;
  color: rgba(221, 229, 228, 0.88);
  font-size: clamp(4.2rem, 8vw, 6.8rem);
  font-weight: 680;
  letter-spacing: -0.075em;
  line-height: 0.88;
}

:root[data-account-locked="true"] .access-dialog #accessDialogExplanation {
  max-width: 560px;
  margin: 18px 0 30px;
  color: rgba(197, 212, 216, 0.74);
  font-size: 1.02rem;
}

:root[data-account-locked="true"] .account-login-panel {
  margin-top: 0;
  padding: 22px;
  border-color: rgba(134, 164, 174, 0.24);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(14, 45, 54, 0.84), rgba(9, 32, 42, 0.76));
}

:root[data-account-locked="true"] .account-login-head strong {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

:root[data-account-locked="true"] .account-login-head span {
  color: rgba(178, 198, 204, 0.66);
  font-size: 0.78rem;
}

:root[data-account-locked="true"] .account-login-form {
  gap: 14px;
}

:root[data-account-locked="true"] .account-login-form input {
  min-height: 48px;
  border-radius: 10px;
  background: rgba(94, 115, 126, 0.32);
  font-size: 1rem;
}

:root[data-account-locked="true"] .account-login-form label {
  gap: 7px;
  color: rgba(197, 212, 216, 0.70);
}

:root[data-account-locked="true"] .account-login-form menu {
  margin-top: 2px;
}

:root[data-account-locked="true"] .access-message {
  margin-top: 22px;
}

.access-role-panel[hidden] {
  display: none;
}

.access-role-panel > button {
  display: grid;
  gap: 4px;
  padding: 14px;
  text-align: left;
}

.access-role-panel > button span {
  color: var(--muted);
  font-size: 0.8rem;
}

.access-role-panel > button.is-selected {
  border-color: var(--accent);
  background: var(--selected);
}

.access-dialog {
  width: min(620px, calc(100vw - 40px));
  padding: 28px 30px 24px;
}

.access-dialog .eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
  letter-spacing: -0.01em;
  text-transform: none;
}

.access-dialog h2 {
  margin: 0 0 18px;
  font-size: 1.55rem;
  letter-spacing: -0.025em;
}

.account-profile-summary {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  padding: 16px 0 12px;
  border-top: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
}

.account-profile-role {
  display: grid;
  gap: 4px;
}

.account-profile-role span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-profile-role strong {
  color: var(--muted);
  font-size: 1.55rem;
  font-weight: 760;
  letter-spacing: -0.025em;
}

.account-profile-role small {
  color: var(--muted);
  font-size: 0.82rem;
}

.account-profile-facts {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 42%, transparent);
}

.account-profile-facts div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 30%, transparent);
}

.account-profile-facts dt {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.account-profile-facts dd {
  margin: 0;
  color: var(--text);
}

.account-profile-facts dd span {
  color: color-mix(in srgb, var(--muted) 70%, transparent);
}

.account-profile-edit {
  justify-self: start;
}

.profile-choice-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
}

.account-only-row {
  margin-top: 10px;
}

.profile-choice-row > button:first-child {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  text-align: left;
}

.profile-choice-row > button:first-child span {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-choice-row.is-selected > button:first-child {
  border-color: var(--accent);
  background: var(--selected);
}

.profile-edit-button {
  align-self: stretch;
  padding-inline: 12px;
  color: #7895b2;
  font-size: 0.78rem;
}

.access-role-panel #accessLockNowBtn {
  display: block;
  margin-top: 8px;
  text-align: center;
}

.access-message {
  min-height: 1.3em;
  margin: 12px 0 0;
  color: var(--accent);
  font-weight: 700;
}

.access-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.access-dialog-footer button {
  min-height: 36px;
  padding: 7px 18px;
}

.access-dialog-footer button[hidden] {
  display: none;
}

.admin-invite-panel {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.admin-invite-panel[hidden] {
  display: none;
}

.admin-invite-panel textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

.account-invite-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 18px 0 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 58%, transparent);
}

.account-invite-panel[hidden] {
  display: none;
}

.account-invite-head {
  display: grid;
  gap: 3px;
}

.account-invite-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.account-invite-form {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(120px, 0.7fr);
  gap: 10px 12px;
  align-items: end;
}

.account-invite-form .account-invite-email {
  grid-column: 1 / -1;
}

.account-invite-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

.account-invite-form input,
.account-invite-form select,
.account-invite-panel textarea,
.invite-link-output input {
  width: 100%;
  box-sizing: border-box;
}

.account-invite-form input,
.account-invite-form select {
  min-height: 40px;
}

.account-invite-form button {
  grid-column: 1 / -1;
  justify-self: end;
  min-width: 0;
  min-height: 36px;
  padding: 7px 16px;
}

.account-invite-panel textarea {
  min-height: 64px;
  resize: vertical;
}

.invite-link-output {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.invite-link-output input {
  min-width: 0;
  min-height: 38px;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--input-bg, var(--soft)) 88%, transparent);
  color: color-mix(in srgb, var(--text) 88%, var(--muted));
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: none;
}

.invite-link-output input:focus {
  outline: none;
  box-shadow: none;
}

.invite-copy-button {
  display: grid;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  place-items: center;
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 10px;
  color: color-mix(in srgb, var(--text) 78%, var(--muted));
  font-size: 1.05rem;
}

.invite-copy-button:hover {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--selected) 75%, transparent);
  color: var(--text);
}

.account-demo-invite {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid color-mix(in srgb, var(--line) 42%, transparent);
}

.account-demo-invite > div {
  display: grid;
  gap: 4px;
}

.account-demo-invite strong {
  color: var(--text);
  font-size: 0.98rem;
}

.account-demo-invite span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

:root[data-account-dialog-mode="demo-gate"] .access-dialog {
  width: min(720px, calc(100vw - 32px));
  padding: 34px 36px 30px;
}

:root[data-account-dialog-mode="demo-gate"] .access-dialog h2 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 5vw, 3.55rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

:root[data-account-dialog-mode="demo-gate"] .access-dialog #accessDialogExplanation {
  max-width: 560px;
  margin-bottom: 24px;
  font-size: 1rem;
  line-height: 1.45;
}

.demo-gate-panel {
  display: grid;
  gap: 20px;
}

.demo-fake-login,
.demo-contact-preview {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  border-radius: 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 82%, transparent), color-mix(in srgb, var(--soft) 74%, transparent));
}

.demo-fake-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
}

.demo-fake-head strong {
  color: var(--text);
  font-size: 1.02rem;
}

.demo-fake-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.demo-fake-login label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.demo-fake-login input {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--input-bg, var(--soft)) 92%, transparent);
  color: color-mix(in srgb, var(--text) 80%, var(--muted));
  box-shadow: none;
}

.demo-fake-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 2px;
}

.demo-fake-actions button {
  min-height: 36px;
  padding: 7px 16px;
  opacity: 0.52;
}

.demo-contact-preview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.demo-contact-preview label {
  display: grid;
  gap: 5px;
  min-height: 58px;
  align-content: center;
  padding: 12px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 30%, transparent);
}

.demo-contact-preview label {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-contact-preview input {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: color-mix(in srgb, var(--input-bg, var(--soft)) 92%, transparent);
  color: color-mix(in srgb, var(--text) 84%, var(--muted));
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}

.demo-guest-primary {
  justify-self: end;
  min-height: 42px;
  padding: 9px 22px;
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--selected) 82%, var(--accent) 8%);
  color: var(--text);
  font-weight: 760;
}

.demo-mode-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 999;
  transform: translateX(-50%);
  max-width: min(720px, calc(100vw - 28px));
  padding: 9px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line));
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 92%, transparent), color-mix(in srgb, var(--soft) 86%, transparent));
  color: var(--accent);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  font-size: 0.82rem;
  font-weight: 760;
  pointer-events: none;
}

.is-demo-locked {
  opacity: 0.46 !important;
  cursor: not-allowed !important;
}

.profile-archive-grid {
  display: grid;
  gap: 12px;
}

.profile-archive-card > div {
  display: grid;
  gap: 6px;
}

.profile-archive-card h3,
.profile-archive-card p {
  margin: 0;
}

.venue-setup-dialog {
  width: min(820px, calc(100vw - 28px));
  max-height: min(88vh, 900px);
  overflow: auto;
}

.venue-setup-dialog h2 {
  margin: 0 0 8px;
}

.venue-setup-dialog .form-grid {
  margin-top: 18px;
}

.venue-organizer-fields {
  margin: 22px 0 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.venue-organizer-fields legend {
  padding: 0 8px;
  color: var(--accent);
  font-weight: 800;
}

dialog.profile-onboarding-dialog {
  width: min(1040px, calc(100vw - 48px));
  max-height: min(92vh, 960px);
  min-height: 640px;
  box-sizing: border-box;
  padding: 52px 58px;
  overflow: auto;
  border-color: rgba(111, 143, 174, 0.35);
  border-radius: 38px;
  background:
    radial-gradient(circle at 50% -20%, rgba(103, 137, 171, 0.13), transparent 48%),
    var(--panel);
}

.profile-onboarding-dialog::backdrop {
  background: rgba(12, 18, 24, 0.68);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

#profileTypeStep {
  display: flex;
  min-height: 530px;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

#profileTypeStep[hidden] {
  display: none;
}

.onboarding-welcome-brand p {
  margin: 0 0 2px;
  color: #718da9;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.onboarding-welcome-brand h1 {
  margin: 0;
  color: #7895b2;
  font-size: clamp(3.8rem, 8vw, 6.4rem);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

#profileTypeStep > h2 {
  margin: 34px 0 8px;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 600;
}

.onboarding-welcome-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.profile-type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 18px;
  margin-top: 38px;
}

.profile-type-grid button {
  display: grid;
  min-height: 0;
  aspect-ratio: 1;
  place-items: center;
  padding: 24px;
  border: 1px solid rgba(112, 145, 177, 0.42);
  border-radius: 22px;
  background: rgba(106, 139, 171, 0.065);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.profile-type-grid button:hover,
.profile-type-grid button:focus-visible {
  border-color: rgba(126, 163, 198, 0.82);
  background: rgba(106, 139, 171, 0.13);
  transform: translateY(-2px);
}

.profile-type-grid strong {
  color: #7895b2;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.onboarding-profile-form > h2 {
  margin-top: 14px;
}

.onboarding-profile-form .form-grid {
  margin-top: 18px;
}

.onboarding-profile-form > label {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

dialog.profile-onboarding-dialog.is-form-step {
  width: min(720px, calc(100vw - 32px));
  min-height: 0;
  max-height: calc(100dvh - 40px);
  margin-top: 20px;
  padding: 28px 32px;
  border-radius: 26px;
}

dialog.profile-onboarding-dialog.is-form-step[data-form-type="admin"] {
  width: min(560px, calc(100vw - 32px));
}

.profile-onboarding-dialog.is-form-step .onboarding-profile-form > h2 {
  margin: 8px 0 4px;
  font-size: 1.45rem;
}

.profile-onboarding-dialog.is-form-step .onboarding-profile-form .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
  margin-top: 12px;
}

.profile-onboarding-dialog.is-form-step .onboarding-profile-form label {
  gap: 3px;
  font-size: 0.76rem;
}

.profile-onboarding-dialog.is-form-step .onboarding-profile-form input,
.profile-onboarding-dialog.is-form-step .onboarding-profile-form select,
.profile-onboarding-dialog.is-form-step .onboarding-profile-form textarea {
  min-height: 34px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  outline: 0;
  background: rgba(72, 94, 114, 0.16);
  box-shadow: none;
  font-size: 0.88rem;
}

.profile-onboarding-dialog.is-form-step .onboarding-profile-form input:focus,
.profile-onboarding-dialog.is-form-step .onboarding-profile-form select:focus,
.profile-onboarding-dialog.is-form-step .onboarding-profile-form textarea:focus {
  outline: 0;
  background: rgba(82, 111, 138, 0.24);
  box-shadow: inset 0 0 0 1px rgba(120, 149, 178, 0.24);
}

.profile-onboarding-dialog.is-form-step .venue-organizer-fields {
  margin-top: 18px;
  padding: 16px 0 0;
  border: 0;
  border-top: 1px solid rgba(120, 149, 178, 0.28);
  border-radius: 0;
  background: transparent;
}

.profile-form-section-title {
  margin: 14px 0 2px;
  color: #7895b2;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.venue-organizer-fields .profile-form-section-title {
  margin-top: 0;
}

.profile-onboarding-dialog.is-form-step menu {
  margin: 14px 0 0;
}

.profile-onboarding-dialog.is-form-step menu button {
  min-height: 36px;
  padding: 7px 12px;
}

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

@media (max-width: 700px) {
  dialog.profile-onboarding-dialog {
    width: calc(100vw - 20px);
    min-height: 0;
    padding: 36px 24px;
    border-radius: 28px;
  }

  dialog.profile-onboarding-dialog.is-form-step {
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    margin-top: 8px;
    padding: 22px 18px;
    border-radius: 22px;
  }

  #profileTypeStep {
    min-height: 0;
  }

  .profile-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 28px;
  }

  .profile-type-grid button {
    min-height: 0;
    padding: 8px;
    border-radius: 16px;
  }

  .profile-type-grid strong {
    font-size: clamp(0.82rem, 4vw, 1.25rem);
  }
}

@media (max-width: 520px) {
  dialog.profile-onboarding-dialog.is-form-step .onboarding-profile-form .form-grid {
    grid-template-columns: 1fr;
  }
}

:root[data-access-role="cafe"] .topbar > div:first-child {
  display: none;
}

:root[data-access-role="cafe"] .topbar {
  justify-content: flex-end;
}

@media (max-width: 720px) {
  .access-lock-button {
    width: 100%;
  }
}

.venue-backup-item {
  align-items: center;
}

.venue-backup-item > div:first-child {
  display: grid;
  gap: 5px;
}

.cafe-player-shell {
  width: min(1080px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.cafe-player-header {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.cafe-player-header h2,
.cafe-now-playing h3,
.cafe-queue-heading h3 {
  margin: 0;
}

.cafe-mode-title {
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.cafe-venue-name {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.cafe-operation-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.cafe-operation-status .audio-dot {
  position: static;
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #889089;
}

.cafe-operation-status .audio-dot.is-active {
  background: #3aa864;
  box-shadow: 0 0 0 4px rgba(58, 168, 100, 0.12);
}

.cafe-player-menu {
  position: relative;
}

.cafe-player-menu summary {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  list-style: none;
}

.cafe-player-menu summary::-webkit-details-marker {
  display: none;
}

.cafe-player-menu > div {
  position: absolute;
  z-index: 5;
  top: 44px;
  right: 0;
  display: grid;
  width: 210px;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.cafe-player-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(260px, 1.1fr);
  min-height: 540px;
}

.cafe-now-playing {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  text-align: center;
  background: linear-gradient(145deg, var(--soft), var(--panel));
}

.cafe-artwork {
  display: grid;
  width: min(240px, 70vw);
  aspect-ratio: 1;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, var(--accent), #173c34);
  box-shadow: 0 24px 48px rgba(24, 69, 57, 0.24);
  color: white;
  font-size: 6rem;
}

.cafe-now-playing h3 {
  max-width: 420px;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.cafe-now-playing progress {
  width: 100%;
  margin: 28px 0 8px;
  accent-color: var(--accent);
}

.cafe-now-playing time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cafe-now-playing .playlist-transport {
  align-items: center;
  margin-top: 24px;
}

.cafe-now-playing .playlist-transport button {
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  font-size: 1.15rem;
}

.cafe-now-playing .playlist-transport .cafe-primary-play {
  width: 62px;
  height: 62px;
  border-color: var(--accent);
  background: var(--accent);
  color: white;
  font-size: 1.45rem;
}

.cafe-player-message {
  min-height: 1.4em;
  margin: 20px 0 0;
}

.cafe-queue-panel {
  padding: 28px;
  border-left: 1px solid var(--line);
}

.cafe-playlist-picker {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.cafe-playlist-picker select {
  width: 100%;
  font-size: 1rem;
  text-transform: none;
}

.cafe-queue-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.cafe-queue-heading span {
  color: var(--muted);
  font-size: 0.76rem;
}

.cafe-queue-panel .playlist-track-list {
  max-height: 390px;
}

.cafe-monitor-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  font-size: 0.82rem;
}

.cafe-monitor-banner.is-connected {
  color: #27794c;
}

.cafe-monitor-banner.is-warning {
  background: #fff6df;
  color: #855400;
}

.venue-admin-shell {
  display: grid;
  gap: 16px;
}

.venue-admin-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.venue-admin-nav button {
  flex: 0 0 auto;
}

.venue-admin-nav button.is-active {
  border-color: var(--accent);
  background: var(--selected);
}

.venue-admin-panel {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.venue-admin-panel h3 {
  margin-top: 0;
}

.venue-settings-grid,
.venue-monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

@media (max-width: 800px) {
  .cafe-now-playing {
    padding: 26px 22px;
  }

  .cafe-artwork {
    width: min(200px, 100%);
  }

  .cafe-queue-panel {
    padding: 22px 18px;
  }

  .cafe-player-header {
    grid-template-columns: 1fr auto;
  }

  .cafe-operation-status {
    grid-column: 1;
    grid-row: 2;
  }

  .cafe-player-menu {
    grid-column: 2;
    grid-row: 1 / 3;
  }
}

@media (max-width: 540px) {
  .cafe-player-layout {
    grid-template-columns: 1fr;
  }

  .cafe-queue-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .playlist-mode-header,
  .playlist-integrity-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .playlist-mode-view {
    padding: 14px;
  }
}

/* Live mode follows the light theme instead of retaining the dark stage palette. */
:root[data-theme="light"] .live-panel {
  background: linear-gradient(180deg, #e9ebea, #dde1df);
  border-color: #c8cdca;
  box-shadow: 0 18px 42px rgba(35, 55, 43, 0.12);
}

:root[data-theme="light"] .live-toolbar button {
  border-color: #cbd1cd;
  background: linear-gradient(180deg, #ffffff, #eef1ef);
  box-shadow: 0 5px 14px rgba(38, 62, 47, 0.08);
}

:root[data-theme="light"] .live-toolbar button:hover,
:root[data-theme="light"] .live-toolbar button:focus-visible {
  border-color: #9eb9ad;
  background: #edf6f1;
}

:root[data-theme="light"] .live-toolbar button span {
  background: #e3f2eb;
}

:root[data-theme="light"] .live-toolbar {
  border-color: #d7ddd9;
  background: linear-gradient(180deg, rgba(250, 252, 251, 0.92), rgba(235, 240, 237, 0.88));
}

:root[data-theme="light"] #endConcertBtn {
  border-color: #e5b7b4;
  background: #fff5f4;
  color: #a52d27;
}

:root[data-theme="light"] .live-tracker-shell .concert-event-line {
  color: #65736b;
}

:root[data-theme="light"] .live-control-column .concert-event-name {
  color: rgba(42, 54, 50, 0.82);
}

:root[data-theme="light"] .live-control-column .concert-event-details {
  color: rgba(53, 65, 61, 0.68);
}

:root[data-theme="light"] .live-progress-tracker {
  border-color: #9aa9a3;
  background:
    linear-gradient(180deg, #bec9c3 0%, #dfe7e2 48%, #bac6c0 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    inset 0 -1px 0 rgba(72, 88, 82, 0.20),
    0 12px 28px rgba(45, 61, 54, 0.11);
}

:root[data-theme="light"] .live-progress-tracker:not(.is-duration-caution):not(.is-over-target-duration):not(.is-playback-mode):not(.is-plain-pause) .live-progress-ring {
  --ring-color: #35e878 !important;
}

:root[data-theme="light"] .live-progress-ring {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 6px 16px rgba(37, 65, 49, 0.14);
}

:root[data-theme="light"] .live-progress-tracker:not(.is-duration-caution):not(.is-over-target-duration):not(.is-playback-mode):not(.is-plain-pause) .live-progress-ring::before {
  filter: blur(8px);
  opacity: 0.86;
}

:root[data-theme="light"] .live-progress-ring::after {
  border-color: #9aa9a3;
  background: #b3c0ba;
}

:root[data-theme="light"] .live-progress-tracker.is-plain-pause .live-progress-ring {
  border-color: rgba(91, 109, 116, 0.20);
  background:
    conic-gradient(
      from -90deg,
      rgba(91, 109, 116, 0.18) 1turn,
      rgba(91, 109, 116, 0.18) 0
    );
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), 0 6px 14px rgba(37, 65, 49, 0.10);
}

:root[data-theme="light"] .live-progress-tracker.is-plain-pause .live-progress-ring span,
:root[data-theme="light"] .live-progress-tracker.is-plain-pause .live-progress-status.is-paused,
:root[data-theme="light"] .live-progress-tracker.is-plain-pause .live-progress-status.is-paused strong {
  color: rgba(128, 98, 39, 0.76);
  text-shadow: none;
}

:root[data-theme="light"] .live-progress-tracker.is-plain-pause .live-current-set-button,
:root[data-theme="light"] .live-progress-tracker.is-plain-pause .live-current-set-button span,
:root[data-theme="light"] .live-progress-tracker.is-plain-pause .live-current-set-button em {
  color: rgba(46, 59, 55, 0.72);
}

:root[data-theme="light"] .live-progress-meta {
  border-left-color: #d7e0da;
}

:root[data-theme="light"] .live-progress-meta .live-stat {
  background: transparent;
  box-shadow: none;
}

:root[data-theme="light"] .live-progress-meta .live-stat i b {
  background: #dce9e2;
  color: #1f3329;
}

:root[data-theme="light"] .live-progress-meta .live-played-count,
:root[data-theme="light"] .live-progress-meta .live-played-count i {
  color: #4f8f6f;
}

:root[data-theme="light"] .live-progress-ring span,
:root[data-theme="light"] .live-set-duration > strong {
  color: #f2f6f4;
}

:root[data-theme="light"] .live-concert-duration > strong,
:root[data-theme="light"] .live-progress-meta .live-concert-duration > strong {
  color: rgba(46, 59, 55, 0.72);
}

:root[data-theme="light"] .live-progress-piece > strong {
  color: rgba(31, 43, 39, 0.82);
}

:root[data-theme="light"] .live-progress-ring small,
:root[data-theme="light"] .live-progress-meta small,
:root[data-theme="light"] .live-current-set-button,
:root[data-theme="light"] .live-current-set-button span,
:root[data-theme="light"] .live-current-set-button em {
  color: rgba(46, 59, 55, 0.72);
}

:root[data-theme="light"] .live-progress-tracker.is-duration-caution {
  border-color: #9aa9a3;
  background:
    linear-gradient(180deg, #bec9c3 0%, #dfe7e2 48%, #bac6c0 100%);
}

:root[data-theme="light"] .live-progress-tracker.is-over-target-duration {
  border-color: #9aa9a3;
  background:
    linear-gradient(180deg, #bec9c3 0%, #dfe7e2 48%, #bac6c0 100%);
}

:root[data-theme="light"] .live-progress-tracker.is-over-target-duration .live-progress-ring span {
  color: #fff6df;
}

:root[data-theme="light"] .live-duration-alert {
  background: transparent;
}

:root[data-theme="light"] .live-duration-alert.is-caution {
  color: #344f78;
  background: rgba(91, 124, 173, 0.1);
}

:root[data-theme="light"] .live-duration-alert.is-over {
  color: #8b430a;
  background: rgba(226, 112, 24, 0.1);
}

:root[data-theme="light"] .live-duration-alert.is-critical {
  color: #8f1f19;
  background: rgba(220, 55, 45, 0.1);
}

:root[data-theme="light"] .live-quick-panel,
:root[data-theme="light"] .unknown-work-options,
:root[data-theme="light"] .audio-recorder-status {
  border-color: #d7e0da;
  background: #f3f7f4;
}

:root[data-theme="light"] .unknown-work-options button {
  background: #ffffff;
}

:root[data-theme="light"] .pause-playback-panel {
  border-color: #dfbd68;
  background:
    radial-gradient(circle at 7% 50%, rgba(222, 170, 42, 0.14), transparent 25%),
    linear-gradient(135deg, #fffaf0, #f4ead1);
  box-shadow: 0 9px 22px rgba(96, 71, 18, 0.12);
}

:root[data-theme="light"] .pause-playback-panel strong {
  color: #493712;
}

:root[data-theme="light"] .pause-player-progress-row time {
  color: #746641;
}

:root[data-theme="light"] .pause-playback-actions button:not(.continue-concert-button) {
  background: #fff8e8;
  color: #76540b;
}

:root[data-theme="light"] .pause-playback-actions .continue-concert-button {
  background: #e7f5df;
  color: #306f27;
}

:root[data-theme="light"] .live-progress-tracker.is-playback-mode {
  border-color: #dfbd68;
  background:
    radial-gradient(circle at 14% 50%, rgba(222, 170, 42, 0.14), transparent 36%),
    linear-gradient(180deg, #fffaf0, #f4ead1);
}

:root[data-theme="light"] .live-tap-confirmation {
  border-color: #4dab45;
  background: rgba(239, 252, 235, 0.98);
  color: #213d1e;
  box-shadow: 0 0 28px rgba(61, 153, 51, 0.24);
}

:root[data-theme="light"] .live-tap-confirmation span {
  color: #3b9d34;
}

:root[data-theme="light"] .live-column {
  border-color: #cbd1cd;
  background: rgba(244, 246, 245, 0.9);
}

:root[data-theme="light"] .live-collections-header {
  border-color: #cbd1cd;
  background: rgba(244, 246, 245, 0.9);
}

:root[data-theme="light"] .live-collapsed-collection-context,
:root[data-theme="light"] .live-collection-list button,
:root[data-theme="light"] .live-work-row > button:first-child,
:root[data-theme="light"] .pdf-icon-button,
:root[data-theme="light"] .live-audio-button {
  border-color: #d9e1dc;
  background: #ffffff;
}

:root[data-theme="light"] .live-collection-list button:hover,
:root[data-theme="light"] .live-work-row > button:first-child:hover,
:root[data-theme="light"] .live-work-row > button:first-child:focus-visible,
:root[data-theme="light"] .pdf-icon-button:hover,
:root[data-theme="light"] .live-audio-button:hover,
:root[data-theme="light"] .live-audio-button:focus-visible {
  border-color: #9fbdae;
  background: #edf6f1;
}

:root[data-theme="light"] .live-collection-list button:not(.is-active) {
  border-color: transparent;
  background: transparent;
}

:root[data-theme="light"] .live-collection-list button.is-active {
  border-color: rgba(37, 107, 90, 0.28);
  background: var(--selected);
}

:root[data-theme="light"] .live-work-row.is-current > button:first-child {
  border-color: rgba(79, 143, 111, 0.42);
  background: linear-gradient(90deg, rgba(143, 217, 173, 0.22), rgba(143, 217, 173, 0.08));
}

:root[data-theme="light"] .live-browser.is-pause-playlist .live-work-row > button:first-child {
  border-color: transparent;
  background: transparent;
}

:root[data-theme="light"] .live-browser.is-pause-playlist .live-work-row.is-current > button:first-child {
  border-color: transparent;
  background: rgba(206, 163, 55, 0.14);
}

:root[data-theme="light"] .live-panel.is-pause-player-open .split {
  border-color: #d8b65f;
  background: linear-gradient(180deg, #f4ead1, #ece5d5);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #141f2a;
  --ink: #eef2ed;
  --muted: #a8b5c0;
  --line: rgba(126, 157, 181, 0.34);
  --panel: #152330;
  --accent: #7ac7a7;
  --accent-2: #d0a466;
  --warn: #e0a24d;
  --selected: rgba(122, 199, 167, 0.22);
  --shadow: 0 20px 52px rgba(0, 0, 0, 0.42);
  --glass-shadow: 0 28px 68px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  --field: #13212d;
  --soft: rgba(122, 199, 167, 0.14);
  --header: rgba(144, 171, 194, 0.15);
  --glass-panel: rgba(20, 31, 42, 0.72);
  --glass-field: rgba(15, 26, 36, 0.66);
  --glass-soft: rgba(42, 66, 84, 0.28);
  --radius-control: 10px;
  --radius-panel: 24px;
  --radius-sheet: 32px;
  --radius-list: 10px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -8%, rgba(122, 199, 167, 0.18), transparent 34%),
    radial-gradient(circle at 86% 4%, rgba(143, 63, 82, 0.10), transparent 28%),
    linear-gradient(180deg, var(--bg), var(--bg));
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 14% -12%, rgba(77, 139, 178, 0.20), transparent 34%),
    radial-gradient(circle at 84% 4%, rgba(122, 199, 167, 0.08), transparent 30%),
    radial-gradient(circle at 50% 96%, rgba(27, 80, 93, 0.14), transparent 38%),
    linear-gradient(180deg, #152330, #0f1a24);
}

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

button,
.file-button {
  position: relative;
  isolation: isolate;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--glass-field);
  color: var(--ink);
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  overflow: hidden;
}

button::before,
.file-button::before {
  display: none;
}

button:hover,
.file-button:hover {
  border-color: var(--line);
  background: var(--soft);
  color: var(--ink);
  box-shadow: none;
}

.icon-button {
  width: 34px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

#addCollectionBtn,
#newWorkBtn {
  min-height: 36px;
  border-radius: 10px;
  border-color: var(--line);
  background: var(--glass-field);
  font-weight: 750;
}

#addCollectionBtn {
  width: 36px;
  min-width: 36px;
  padding: 0;
}

#newWorkBtn {
  padding: 0 11px;
}

.file-button input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background: rgba(7, 18, 26, 0.46);
  color: var(--ink);
  padding: 9px 10px;
  box-shadow: none;
}

textarea {
  resize: vertical;
}

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

h1 {
  font-size: 22px;
  margin-bottom: 2px;
}

h2 {
  font-size: 17px;
  margin-bottom: 12px;
}

h3 {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 10px;
}

.topbar h1 {
  font-size: 18px;
  line-height: 1;
}

:root[data-theme="dark"] .topbar {
  background: #152330;
}

.topbar p,
.muted {
  color: var(--muted);
  margin-bottom: 0;
}

.topbar p {
  display: none;
}

.tabs {
  display: flex;
  flex: 1;
  width: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  padding: 4px;
  gap: 4px;
  background: var(--panel);
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.tab {
  position: relative;
  border: 0;
  border-radius: 11px;
  flex: 1 1 0;
  min-width: 96px;
  min-height: 28px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

#themeToggleBtn {
  flex: 0 0 auto;
  min-width: 56px;
}

.tab::before {
  display: none;
}

.tab.is-active {
  border-radius: 13px;
  background:
    radial-gradient(120% 180% at 50% 50%, var(--selected) 0%, rgba(122, 199, 167, 0.18) 56%, rgba(122, 199, 167, 0.07) 100%);
  color: var(--ink);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.055),
    inset 0 0 18px rgba(255, 255, 255, 0.025);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 12px;
  pointer-events: none;
  background:
    linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, 0.035) 48%, rgba(255, 255, 255, 0.065) 69%, transparent 100%),
    radial-gradient(ellipse at 62% 18%, rgba(255, 255, 255, 0.08), transparent 42%);
  opacity: 0.36;
}

main {
  min-height: 0;
}

.view {
  display: none;
  padding: 18px;
}

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

#libraryView.is-active {
  display: grid;
  grid-template-columns: clamp(240px, 26vw, 300px) minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  min-height: calc(100vh - 98px);
  align-items: stretch;
}

#concertView.is-active {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 54px);
  min-height: 0;
  overflow: hidden;
}

#concertGrid {
  flex: 1;
  min-height: 0;
}

.live-panel {
  height: 100%;
  min-height: 0;
  position: relative;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-panel,
.work-area,
.event-form,
.live-panel,
#archiveView,
.gema-layout,
.gema-view .event-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.event-form,
.gema-view .event-form {
  background: rgba(255, 255, 255, 0.055);
}

.sidebar-panel,
.work-area,
.event-form,
.live-panel,
#archiveView,
.gema-layout,
.gema-view .event-form {
  padding: 14px;
}

.sidebar-panel {
  min-width: 0;
  overflow: hidden;
}

.live-panel {
  background: linear-gradient(180deg, rgba(16, 31, 43, 0.98), rgba(11, 23, 33, 0.98));
  border-color: rgba(122, 158, 183, 0.28);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  text-shadow: none;
  padding: 8px;
}

.live-panel .panel-header {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 6px;
  padding: 0;
  background: transparent;
}

.live-panel .panel-header h2 {
  display: none;
}

.live-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  justify-content: stretch;
  align-self: stretch;
  gap: 4px;
  height: 100%;
  padding: 4px;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  overflow: visible;
}

.live-toolbar button {
  flex: none;
  min-height: 0;
  padding: 7px 9px;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.live-toolbar button span {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: rgba(122, 199, 167, 0.12);
}

#liveSearchToggleBtn span {
  font-size: 21px;
}

.live-overview-row {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: stretch;
  gap: 8px;
  min-height: 154px;
  margin: 3px 0 6px;
}

.live-control-column {
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
  height: 154px;
}

.live-control-column .concert-event-line {
  position: static;
  width: 100%;
  max-width: none;
  min-height: 18px;
  margin: 0 0 6px;
  padding: 0 3px;
  transform: none;
  text-align: right;
}

.live-control-column .live-toolbar {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

.live-tracker-shell {
  position: relative;
  min-width: 0;
  min-height: 154px;
  height: 154px;
}

.live-tracker-shell .concert-event-line {
  position: absolute;
  z-index: 2;
  top: 7px;
  right: 10px;
  left: auto;
  max-width: 52%;
  margin: 0;
  transform: none;
  color: rgba(208, 222, 232, 0.68);
  font-size: 10px;
  letter-spacing: 0.02em;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-tracker-shell .live-progress-tracker.is-large .live-progress-status {
  top: 10px !important;
  right: 12px !important;
  left: auto !important;
}

.live-toolbar button:hover,
.live-toolbar button:focus-visible {
  border-color: rgba(122, 158, 183, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.055));
  color: var(--ink);
}

.live-toolbar button.is-active {
  border-color: rgba(122, 199, 167, 0.58);
  background: rgba(122, 199, 167, 0.15);
}

#endConcertBtn {
  border-color: rgba(122, 158, 183, 0.22);
  color: #ff6f6f;
}

#endConcertBtn span {
  color: #ff4c4c;
}

#endConcertBtn:hover,
#endConcertBtn:focus-visible {
  border-color: rgba(122, 199, 167, 0.40);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.055));
  color: #ff8a8a;
}

#libraryView .work-area {
  align-self: stretch;
  height: 100%;
}

.library-menu-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.library-search {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 180px;
  max-width: 280px;
  flex: 1 1 220px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(122, 158, 183, 0.20);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted);
}

.library-search span {
  color: rgba(167, 185, 199, 0.82);
  font-size: 21px;
  line-height: 1;
}

.library-search input[type="search"] {
  min-height: 24px;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  font-size: 12px;
}

.library-search input[type="search"]:focus {
  outline: none;
  box-shadow: none;
}

#libraryView .sidebar {
  align-self: start;
  max-height: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

#libraryView .collection-list {
  align-content: start;
}

#libraryView .work-area {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 8px;
}

#libraryView .table-wrap {
  flex: 1 1 auto;
  min-height: 0;
}

.gema-view .event-form {
  position: relative;
  z-index: 3;
  width: min(1120px, 100%);
  margin: 0 0 12px;
  padding: 16px;
}

.gema-event-form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}

.gema-event-form-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  font-weight: 820;
  letter-spacing: -0.01em;
}

.gema-event-form-header .dialog-close-button {
  position: static;
  flex: 0 0 auto;
}

.gema-view .form-grid {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 7px 8px;
}

.gema-view label {
  gap: 3px;
  font-size: 11px;
}

.gema-view label input,
.gema-view label select {
  min-height: 31px;
  padding: 5px 7px;
  font-size: 13px;
}

.panel-header,
.toolbar,
.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.panel-header h2 {
  margin-bottom: 0;
}

#libraryView .sidebar-panel .panel-header h2 {
  font-size: 15px;
  letter-spacing: 0.03em;
}

.concert-heading {
  min-width: 0;
}

.concert-event-line {
  display: grid;
  gap: 1px;
  margin-top: 3px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  box-shadow: none;
}

.concert-event-name {
  overflow: hidden;
  color: rgba(196, 214, 226, 0.84);
  font-size: 12px;
  font-weight: 790;
  letter-spacing: 0.015em;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.concert-event-details {
  overflow: hidden;
  color: rgba(167, 185, 199, 0.74);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.025em;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}

.concert-event-line::before {
  display: none;
}

.concert-event-line:hover {
  color: var(--muted);
  background: var(--soft);
  border-color: transparent;
  box-shadow: none;
}

.toolbar {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.toolbar input[type="search"] {
  max-width: none;
  flex: 1 1 360px;
}

.library-actions-menu {
  position: relative;
  flex: 0 0 auto;
}

.library-actions-menu summary {
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(167, 185, 199, 0.74);
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  list-style: none;
  font-size: 12px;
  font-weight: 650;
}

.library-actions-menu summary::-webkit-details-marker {
  display: none;
}

.library-actions-menu summary:not([data-help])::after {
  content: none;
  color: var(--muted);
  font-size: 12px;
}

.library-actions-menu[open] summary,
.library-actions-menu summary:hover {
  border-color: rgba(122, 158, 183, 0.20);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(210, 224, 232, 0.88);
}

.library-actions-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 18;
  width: 220px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-list);
  background: var(--panel);
  box-shadow: var(--glass-shadow);
  display: grid;
  gap: 5px;
}

.library-actions-panel button,
.library-actions-panel .file-button {
  position: relative;
  width: 100%;
  justify-content: flex-start;
  min-height: 30px;
  border-color: transparent;
  background: transparent;
  font-size: 12px;
  color: rgba(210, 224, 232, 0.82);
  font-weight: 650;
}

.library-actions-panel .file-button input[type="file"] {
  display: none !important;
}

.menu-section-label {
  display: block;
  margin: 7px 6px 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
}

.menu-section-label:first-child {
  margin-top: 2px;
}

[data-help] {
  position: relative;
}

[data-help]::after {
  content: none !important;
}

.help-tooltip {
  position: fixed;
  z-index: 1000;
  width: min(300px, 52vw);
  min-height: 34px;
  padding: 10px 12px;
  border: 1px solid rgba(122, 199, 167, 0.28);
  border-radius: 12px;
  background: rgba(12, 25, 35, 0.98);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
  color: rgba(229, 239, 244, 0.96);
  font-size: 12px;
  font-weight: 620;
  letter-spacing: 0.005em;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(2px) scale(0.98);
  transition: opacity 120ms ease, transform 120ms ease;
}

.help-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.library-search[data-help]::after {
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  transform: translateY(0) translateX(0);
}

.library-search[data-help]:hover::after,
.library-search[data-help]:focus-within::after {
  transform: translateY(0) translateX(0);
}

.library-actions-panel button:hover,
.library-actions-panel .file-button:hover {
  border-color: transparent;
  background: var(--soft);
}

.library-actions-panel .danger-action-button {
  color: #ff8f8f;
  border-top: 1px solid var(--line);
  margin-top: 3px;
  padding-top: 8px;
}

.library-actions-panel .danger-action-button:hover {
  background: rgba(255, 92, 92, 0.12);
  color: #ffb0b0;
}

.duplicate-works-dialog {
  width: min(760px, calc(100vw - 24px));
}

.duplicate-works-summary {
  margin: -4px 0 4px;
  color: var(--muted);
  font-size: 13px;
}

.duplicate-works-list {
  display: grid;
  gap: 10px;
  max-height: min(58vh, 520px);
  overflow: auto;
  padding-right: 4px;
}

.duplicate-empty {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-list);
  color: var(--muted);
  background: var(--field);
}

.duplicate-group {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: var(--radius-list);
  background: rgba(255, 255, 255, 0.035);
}

.duplicate-group h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.duplicate-group p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 12px;
}

.duplicate-work-row {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 7px 9px;
  border: 1px solid rgba(122, 158, 183, 0.16);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
}

.duplicate-work-row.is-keep {
  border-color: rgba(143, 217, 173, 0.28);
  background: rgba(122, 199, 167, 0.10);
}

.duplicate-work-row strong,
.duplicate-work-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.duplicate-work-row strong {
  color: var(--ink);
  font-size: 13px;
}

.duplicate-work-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.duplicate-work-row em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  text-transform: uppercase;
}

.library-export-dialog {
  width: min(520px, calc(100vw - 24px));
}

.library-export-dialog label,
.library-export-format {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.library-export-dialog select {
  min-height: 40px;
  border: 1px solid rgba(122, 158, 183, 0.26);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.20);
  color: var(--ink);
}

.library-export-format {
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(122, 158, 183, 0.20);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
}

.library-export-format legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.library-export-format label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 13px;
}

.library-export-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.collection-share-dialog,
.collection-import-dialog {
  width: min(620px, calc(100vw - 24px));
}

.collection-share-dialog label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.collection-share-dialog select {
  min-height: 40px;
  border: 1px solid rgba(122, 158, 183, 0.26);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.20);
  color: var(--ink);
}

.collection-share-result {
  display: grid;
  gap: 9px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
}

.collection-share-result input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--ink);
}

.collection-import-preview {
  max-height: min(48vh, 420px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.collection-import-preview ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 4px 0;
  list-style: none;
}

.collection-import-preview li {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}

.collection-import-preview li:last-child {
  border-bottom: 0;
}

.collection-import-preview strong {
  color: var(--ink);
  font-size: 14px;
}

.collection-import-preview small {
  color: var(--muted);
  font-size: 12px;
}

.backup-stack {
  display: flex;
  gap: 5px;
  align-items: center;
}

.backup-stack button,
.backup-stack .file-button {
  min-height: 30px;
  font-size: 13px;
}

.compact {
  margin-top: 8px;
  margin-bottom: 0;
}

.collection-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 1px;
}

.collection-list button {
  width: 100%;
  min-width: 0;
  justify-content: space-between;
  min-height: 34px;
  gap: 8px;
  border-color: transparent;
  border-radius: var(--radius-list);
  background: transparent;
  box-shadow: none;
}

.collection-label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 8px;
}

.collection-label span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.collection-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.collection-badge {
  width: 28px;
  min-width: 28px;
  height: 24px;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(122, 199, 167, 0.18), rgba(122, 199, 167, 0.08));
  color: var(--ink);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  line-height: 1;
}

.collection-list button.is-active .collection-badge,
.live-collection-list button.is-active .collection-badge {
  border-color: rgba(122, 199, 167, 0.42);
  background:
    linear-gradient(180deg, rgba(122, 199, 167, 0.34), rgba(122, 199, 167, 0.14));
  color: var(--ink);
}

.collection-list button::before {
  display: none;
}

.collection-list button.is-active {
  background: var(--selected);
  border-color: transparent;
  box-shadow: none;
}

.collection-list button.is-fixed-root-collection {
  min-height: 34px;
  margin-bottom: 7px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(122, 158, 183, 0.18);
  border-radius: var(--radius-list);
}

.collection-list button.is-fixed-root-collection .collection-label span:last-child {
  font-size: 15px;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: none;
}

.collection-list button.is-fixed-root-collection .collection-count {
  font-size: inherit;
  font-weight: inherit;
}

.collection-list button.is-dragging {
  opacity: 0.58;
}

.collection-list button.is-drag-over {
  border-color: rgba(122, 199, 167, 0.48);
  background: rgba(122, 199, 167, 0.16);
}

.collection-list button.is-raw-import-collection {
  border-color: rgba(202, 168, 100, 0.42);
  background: rgba(202, 168, 100, 0.08);
}

.collection-list button.is-setlists-root {
  border-color: rgba(122, 158, 183, 0.24);
}

.auto-list-section {
  margin-top: 0;
}

.auto-list-section h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.auto-list {
  margin-top: 0;
}

.auto-list-chevron {
  width: 24px;
  min-width: 24px;
  color: rgba(167, 185, 199, 0.72);
  font-size: 30px;
  line-height: 1;
  text-align: center;
}

.auto-list .auto-import-item button {
  min-height: 28px;
  padding-left: 22px;
  color: rgba(204, 218, 227, 0.72);
}

.auto-list .auto-import-item .collection-label span:last-child {
  font-size: 12px;
  font-weight: 640;
}

.auto-import-empty {
  padding: 7px 10px 7px 22px;
  color: rgba(167, 185, 199, 0.58);
  font-size: 12px;
}

.collection-label small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.selection-bar {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-list);
  padding: 8px 34px 8px 8px;
  margin-bottom: 12px;
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.selection-close-button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  min-height: 24px;
  padding: 0;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.selection-close-button:hover {
  border-color: transparent;
  background: var(--soft);
  color: var(--ink);
}

.selection-bar select {
  width: 164px;
  min-height: 30px;
  padding: 4px 8px;
}

.selection-bar button {
  min-height: 30px;
  padding: 0 9px;
  border-color: var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  box-shadow: none;
}

.selection-bar button::before {
  display: none;
}

.selection-bar button:hover {
  border-color: var(--line);
  background: var(--soft);
  box-shadow: none;
}

.work-context-menu {
  position: fixed;
  z-index: 2200;
  width: min(238px, calc(100vw - 20px));
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid rgba(122, 158, 183, 0.24);
  border-radius: 10px;
  background: rgba(8, 19, 29, 0.98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
}

.work-context-menu[hidden] {
  display: none;
}

.work-context-menu button {
  width: 100%;
  min-height: 28px;
  justify-content: flex-start;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 640;
  box-shadow: none;
}

.work-context-menu button:hover,
.work-context-menu button:focus-visible {
  background: rgba(122, 199, 167, 0.12);
}

.work-context-menu button:disabled {
  cursor: default;
  opacity: 0.42;
}

.work-context-submenu {
  position: relative;
}

.work-context-submenu-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between !important;
  gap: 12px;
}

.work-context-submenu-trigger span {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.work-context-submenu-panel {
  position: absolute;
  top: -6px;
  left: calc(100% + 6px);
  z-index: 1;
  min-width: 210px;
  max-height: min(48vh, 360px);
  display: none;
  gap: 2px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid rgba(122, 158, 183, 0.24);
  border-radius: 10px;
  background: rgba(8, 19, 29, 0.98);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.38);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.work-context-menu.opens-left .work-context-submenu-panel {
  right: calc(100% + 6px);
  left: auto;
}

.work-context-submenu-panel::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.work-context-submenu:hover .work-context-submenu-panel,
.work-context-submenu:focus-within .work-context-submenu-panel {
  display: grid;
}

.work-context-empty {
  display: block;
  padding: 6px 9px;
  color: var(--muted);
  font-size: 12px;
}

#selectionCount {
  min-width: 96px;
  max-width: 126px;
  font-size: 13px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-list);
  background: var(--glass-field);
  padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.library-meta-bar {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.1;
  margin: 0 0 14px;
}

.library-meta-search {
  flex: 1 1 auto;
  max-width: none;
  min-height: 32px;
  margin-left: 0;
  padding-inline: 12px;
  background: rgba(255, 255, 255, 0.065);
}

.library-meta-search input[type="search"] {
  font-size: 14px;
}

.library-active-title {
  margin: 0 4px 2px;
  color: rgba(190, 205, 216, 0.88);
  font-size: 12.5px;
  font-weight: 760;
  letter-spacing: 0.025em;
  line-height: 1.2;
}

.library-meta-main,
.library-meta-stats {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.library-meta-main span,
.library-meta-stats span {
  white-space: nowrap;
}

.library-meta-title {
  max-width: min(34vw, 360px);
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 780;
  text-overflow: ellipsis;
}

.library-meta-stats span {
  padding: 3px 7px;
  border: 1px solid rgba(122, 158, 183, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  font-variant-numeric: tabular-nums;
}

.library-meta-stats .is-attention {
  color: #f3c979;
  border-color: rgba(243, 201, 121, 0.34);
  background: rgba(243, 201, 121, 0.08);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 7px 12px;
  text-align: left;
  vertical-align: middle;
}

#libraryView .data-table td {
  height: 31px;
  padding: 2px 8px;
  overflow: hidden;
  font-size: 12px;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #edf1ec;
  z-index: 1;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
}

:root[data-theme="dark"] .data-table th {
  background: #223341;
}

.data-table th:not(:has(.table-head-tool)) {
  padding: 7px 12px;
}

.table-head-tool {
  width: 100%;
  min-height: 34px;
  justify-content: flex-start;
  padding: 0 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#libraryView .table-head-tool {
  min-height: 28px;
  padding: 0 8px;
  font-size: 10px;
}

#libraryView .data-table th:not(:has(.table-head-tool)) {
  padding: 5px 8px;
  font-size: 10px;
}

.table-head-tool:hover,
.table-head-tool:focus-visible,
.table-head-tool.is-active {
  background: rgba(122, 199, 167, 0.12);
  color: var(--ink);
}

.table-head-tool.is-quiet-head,
.table-head-tool.is-quiet-head:hover,
.table-head-tool.is-quiet-head:focus-visible,
.table-head-tool.is-quiet-head.is-active {
  background: transparent;
  color: var(--muted);
}

.table-head-tool::before {
  display: none;
}

.sort-indicator {
  min-width: 12px;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
}

.import-target-label {
  display: grid;
  gap: 5px;
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.data-table tr {
  cursor: pointer;
}

.data-table tr.is-selected {
  background: rgba(122, 199, 167, 0.24);
  outline: 1px solid rgba(122, 199, 167, 0.34);
  outline-offset: -1px;
}

#libraryView .data-table {
  table-layout: fixed;
}

#libraryView .data-table th,
#libraryView .data-table td {
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-bottom-color: rgba(122, 158, 183, 0.11);
}

#libraryView .data-table tbody tr:not(.is-selected),
#libraryView .data-table tbody tr:not(.is-selected):hover {
  background: transparent !important;
  box-shadow: none !important;
  outline: 0;
}

#libraryView .data-table .title-column,
#libraryView .data-table td:nth-child(1) {
  width: 34%;
}

#libraryView .data-table .asset-column,
#libraryView .data-table td:nth-child(2),
#libraryView .data-table td:nth-child(3) {
  width: 48px;
}

#libraryView .data-table .duration-column,
#libraryView .data-table td:nth-child(4) {
  width: 58px;
}

#libraryView .data-table .collections-column,
#libraryView .data-table td:nth-child(5) {
  width: 110px;
}

#libraryView .data-table .composer-column,
#libraryView .data-table td:nth-child(6) {
  width: 22%;
}

#libraryView .data-table .work-number-column,
#libraryView .data-table td:nth-child(7) {
  width: 86px;
}

#libraryView .data-table td:nth-child(6) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#libraryView .data-table td:first-child {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.1;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#libraryView .data-table td:first-child small {
  display: none;
}

#libraryView .data-table .duration-cell {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#libraryView .data-table .work-number-cell {
  color: rgba(167, 185, 199, 0.78);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#libraryView .data-table td.composer-cell {
  cursor: zoom-in;
}

#libraryView .data-table td.composer-cell.is-expanded {
  white-space: normal;
  overflow: visible;
  background: var(--field);
  color: var(--ink);
  position: relative;
  z-index: 2;
  cursor: zoom-out;
}

#libraryView .data-table .inline-work-text {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

#libraryView .data-table .inline-work-edit-input {
  width: 100%;
  min-width: 72px;
  min-height: 24px;
  padding: 2px 7px;
  border: 1px solid rgba(135, 201, 174, 0.72);
  border-radius: 7px;
  background: rgba(7, 18, 26, 0.92);
  color: var(--ink);
  font: inherit;
  font-weight: inherit;
  box-shadow: 0 0 0 2px rgba(135, 201, 174, 0.12);
}

#libraryView .data-table .inline-work-edit-input:focus {
  outline: none;
}

.table-input {
  width: 100%;
  min-width: 96px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-field);
  color: var(--ink);
  font: inherit;
}

.table-input.is-duration {
  min-width: 72px;
}

.table-input.is-title {
  min-width: 180px;
}

.table-input.is-composer {
  min-width: 150px;
}

.table-input:focus {
  border-color: var(--accent);
  outline: 2px solid rgba(62, 106, 78, 0.16);
}

.table-input.is-invalid {
  border-color: #b42318;
  background: #fff3f1;
}

#gemaPreview .table-input {
  min-height: 28px;
  padding: 2px 0;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#gemaPreview .table-input:hover {
  color: var(--accent);
}

#gemaPreview .table-input:focus {
  padding: 2px 6px;
  border-color: var(--accent);
  border-radius: 14px;
  background: var(--glass-field);
  outline: 2px solid rgba(62, 106, 78, 0.16);
}

#gemaPreview .table-input.is-invalid {
  padding: 2px 6px;
  border-color: #b42318;
  border-radius: 14px;
  background: #fff3f1;
}

.tag-list {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-content: flex-start;
  row-gap: 2px;
  max-height: 24px;
  overflow: hidden;
}

.collection-text-list {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: rgba(167, 185, 199, 0.66);
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0.015em;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#libraryView .collection-list .collection-label {
  min-width: 0;
}

#libraryView .collection-list .collection-label > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collection-mini-logo {
  width: 26px;
  min-width: 26px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(122, 158, 183, 0.28);
  border-radius: 6px;
  background: rgba(122, 199, 167, 0.12);
  color: var(--ink);
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

#libraryView .data-table td:nth-child(2),
#libraryView .data-table td:nth-child(3) {
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}

#libraryView .live-pdf-button,
#libraryView .live-audio-button {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  border-radius: 9px;
  vertical-align: middle;
}

#libraryView .pdf-icon-button {
  font-size: 8px;
}

#libraryView .live-audio-button {
  font-size: 22px;
}

.tag {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 1.15;
  color: var(--muted);
  background: var(--field);
}

.concert-grid {
  display: block;
}

.concert-grid.is-live-active {
  display: block;
}

.concert-grid.is-live-active .event-form {
  display: none;
}

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

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

label input,
label textarea {
  color: var(--ink);
  font-size: 15px;
}

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

.segmented {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--glass-field);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.segmented button {
  flex: 1 1 auto;
  border: 0;
  border-radius: 0;
}

.segmented.live-toolbar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(0, 1fr);
  flex-wrap: nowrap;
  padding: 4px;
  border-radius: 13px;
  overflow: visible;
}

.segmented.live-toolbar button {
  flex: none;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: 8px;
}

.concert-status {
  min-width: 0;
  min-height: 140px;
  margin: 0;
  padding: 0;
  color: var(--ink);
}

.concert-status > .live-progress-tracker {
  box-sizing: border-box;
  height: 100%;
  min-height: 140px;
  padding: 9px;
}

.live-overview-row .live-progress-tracker.is-large .live-progress-ring {
  width: 96px;
  height: 96px;
  transform: none;
}

.live-overview-row .live-progress-tracker.is-large {
  grid-template-columns: minmax(0, 1.86fr) minmax(200px, 0.58fr);
}

@media (orientation: landscape) and (min-width: 900px) {
  .live-overview-row .live-progress-tracker.is-large .live-progress-ring {
    width: 136px !important;
    height: 136px !important;
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-ring span {
    margin-top: -12px;
    font-size: clamp(34px, 3.1vw, 45px) !important;
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-ring small {
    margin-top: 38px;
    font-size: clamp(11px, 0.9vw, 13px);
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-main {
    gap: 14px;
  }
}

.live-overview-row .live-progress-tracker.is-large .live-progress-main {
  padding-top: 0;
}

.live-overview-row .live-progress-tracker.is-large .live-progress-meta {
  padding-left: 12px;
}

.live-overview-row .live-progress-tracker.is-large .live-progress-piece > strong {
  font-size: clamp(19px, 2.2vw, 27px);
}

.live-progress-tracker {
  --progress: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.86fr) minmax(200px, 0.58fr);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 9px;
  border: 1px solid rgba(122, 158, 183, 0.24);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(17, 37, 51, 0.94), rgba(8, 19, 29, 0.98));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.27);
  position: relative;
}

.live-progress-status,
.live-progress-main,
.live-progress-meta {
  min-width: 0;
}

.live-progress-status {
  position: absolute;
  left: 9px;
  top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.live-progress-main {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding-top: 14px;
}

.live-progress-main.is-pause-only {
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 100%;
  padding: 0;
}

.live-pause-hero {
  color: #efbd48;
  font-size: clamp(34px, 5vw, 62px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
}

.live-pause-hero-line {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.live-pause-running-light {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #ffd43b;
  box-shadow: 0 0 8px rgba(255, 212, 59, 0.95), 0 0 18px rgba(255, 193, 7, 0.68);
}

.live-pause-hero-time {
  color: #f6d778;
  font-size: clamp(27px, 3.8vw, 46px);
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.live-progress-ring {
  width: clamp(58px, 6vw, 78px);
  height: clamp(58px, 6vw, 78px);
  border-radius: 50%;
  flex: 0 0 auto;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
  background:
    conic-gradient(
      from -90deg,
      var(--ring-color) calc(var(--progress) * 1turn),
      rgba(32, 201, 195, 0.16) 0
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 0 10px rgba(255, 255, 255, 0.08),
    0 8px 20px rgba(0, 0, 0, 0.24);
}

.live-progress-ring::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background:
    conic-gradient(
      from -90deg,
      var(--ring-color) calc(var(--progress) * 1turn),
      transparent 0
    );
  filter: blur(7px);
  opacity: 0.62;
  -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%, #000 72%, transparent 74%);
  mask: radial-gradient(circle, transparent 58%, #000 60%, #000 72%, transparent 74%);
  pointer-events: none;
  z-index: 0;
}

.live-progress-ring::after {
  content: "";
  position: absolute;
  inset: clamp(4px, 0.55vw, 6px);
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: inherit;
  background: #101f2b;
  z-index: 1;
}

.live-progress-ring span,
.live-progress-ring small,
.live-progress-ring em {
  position: relative;
  z-index: 2;
  grid-area: 1 / 1;
}

.live-progress-ring span {
  align-self: center;
  margin-top: -5px;
  color: var(--ink);
  font-size: clamp(13px, 1.35vw, 18px);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.live-progress-ring small {
  align-self: center;
  margin-top: clamp(15px, 1.6vw, 22px);
  color: var(--muted);
  font-size: 8px;
}

.live-progress-ring em {
  align-self: center;
  display: none;
  color: var(--muted);
  font-size: clamp(13px, 1.35vw, 17px);
  font-style: normal;
  font-variant-numeric: tabular-nums;
}

.live-progress-tracker.is-over-target-duration .live-progress-ring {
  border-color: rgba(242, 184, 75, 0.72);
  background:
    conic-gradient(from -90deg, #f2b84b 1turn, rgba(242, 184, 75, 0.18) 0);
  box-shadow:
    0 0 0 1px rgba(242, 184, 75, 0.20) inset,
    0 0 20px rgba(242, 184, 75, 0.34),
    0 8px 22px rgba(0, 0, 0, 0.26);
  animation: none;
}

.live-progress-tracker.is-duration-caution {
  border-color: rgba(122, 158, 183, 0.26);
  background: var(--panel);
}

.live-progress-tracker.is-duration-caution .live-progress-ring {
  box-shadow: none;
}

.live-progress-tracker.is-over-target-duration {
  position: relative;
  overflow: hidden;
  border-color: rgba(122, 158, 183, 0.26);
  background: var(--panel);
}

.live-progress-tracker.is-over-target-duration::after {
  content: none;
}

.live-progress-tracker.is-over-target-duration > * {
  position: relative;
  z-index: 1;
}

.live-progress-tracker.is-over-target-duration .live-progress-ring::before {
  opacity: 0;
  filter: none;
}

.live-progress-tracker.is-over-target-duration .live-progress-ring span {
  color: #fff6df;
}

.live-progress-tracker.is-critical-overrun {
  border-color: #ff3b30;
  animation: criticalOverrunPulse 1.15s ease-in-out infinite;
}

.live-progress-tracker.is-critical-overrun .live-progress-ring {
  box-shadow: 0 0 0 5px rgba(255, 45, 32, 0.24), 0 0 34px rgba(255, 45, 32, 0.62);
}

.live-duration-alert {
  position: absolute;
  z-index: 4;
  right: 12px;
  bottom: 7px;
  left: 12px;
  min-height: 30px;
  padding: 4px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: clamp(19px, 2vw, 27px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: 0.01em;
  text-align: center;
  pointer-events: none;
}

.live-duration-alert.is-caution {
  color: #aec3e2;
  background: rgba(80, 111, 156, 0.12);
}

.live-duration-alert.is-over {
  color: #ffc078;
  background: rgba(255, 138, 36, 0.12);
}

.live-duration-alert.is-critical {
  color: #fff2ef;
  background: rgba(255, 53, 43, 0.14);
  box-shadow: none;
  text-shadow: 0 1px 10px rgba(255, 53, 43, 0.5);
}

.live-duration-inline {
  width: fit-content;
  max-width: 100%;
  margin-top: 6px;
  color: #b9dcff;
  font-size: clamp(11px, 1.05vw, 14px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: none;
}

.live-duration-inline.is-complete {
  color: #c7e5ff;
  text-shadow: none;
}

.live-duration-inline.is-flashing {
  animation: durationTextFlash 0.3s ease-in-out 3;
}

.live-duration-notice {
  position: relative;
  overflow: hidden;
  margin: 7px 0 10px;
  min-height: clamp(24px, 2.5vw, 34px);
  padding: 2px 4px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(171, 188, 245, 0.92);
  font-size: clamp(15px, 1.55vw, 21px);
  font-weight: 840;
  letter-spacing: 0.075em;
  line-height: 1.08;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  text-shadow:
    0 0 7px rgba(126, 188, 231, 0.22),
    0 0 14px rgba(126, 188, 231, 0.12);
  box-shadow: none;
}

.live-duration-notice span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-progress-tracker.is-fullscreen-warning-flash::before {
  content: none;
}

@keyframes durationTextFlash {
  0%, 100% { opacity: 1; filter: brightness(1); }
  50% { opacity: 0.18; filter: brightness(1.8); }
}

@keyframes fullScreenWarningShimmer {
  0%, 100% { background: rgba(255, 255, 255, 0); }
  38% { background: rgba(255, 255, 255, 0.72); }
}

@keyframes liveGoldRingBreath {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(242, 184, 75, 0.18) inset,
      0 0 18px rgba(242, 184, 75, 0.30),
      0 0 42px rgba(242, 184, 75, 0.16),
      0 8px 22px rgba(0, 0, 0, 0.26);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 216, 128, 0.30) inset,
      0 0 26px rgba(255, 202, 88, 0.46),
      0 0 86px rgba(242, 184, 75, 0.26),
      0 8px 22px rgba(0, 0, 0, 0.26);
  }
}

@keyframes liveTimerSunRays {
  0%, 100% {
    opacity: 0.16;
    transform: scale(0.88) rotate(0deg);
  }
  45% {
    opacity: 0.34;
    transform: scale(1.04) rotate(4deg);
  }
  70% {
    opacity: 0.22;
    transform: scale(0.96) rotate(2deg);
  }
}

.live-progress-tracker.is-hit-target-duration .live-progress-ring {
  animation: none;
}

.live-progress-ring[role="button"] {
  cursor: pointer;
}

.live-progress-ring[role="button"]:focus-visible {
  outline: 2px solid rgba(143, 217, 173, 0.62);
  outline-offset: 5px;
}

.live-progress-tracker.is-haptic-bump {
  animation: liveHapticBump 180ms cubic-bezier(0.2, 0.72, 0.26, 1) 1;
}

@keyframes liveHapticBump {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: brightness(1);
  }
  34% {
    transform: translate3d(1px, 0, 0) scale(1.002);
    filter: brightness(1.035);
  }
  68% {
    transform: translate3d(-0.75px, 0, 0) scale(0.999);
    filter: brightness(1.012);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    filter: brightness(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-progress-tracker.is-haptic-bump,
  .live-work-row.is-confirmed > button:first-child {
    animation: none;
  }
}

.live-progress-piece {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--ink);
}

.live-progress-piece > span {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-progress-piece-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-bottom: 5px;
}

.live-progress-piece-heading > span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.live-progress-piece-heading .live-progress-status {
  position: static !important;
  order: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  min-height: 0;
  width: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #65c86d;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-14px);
}

.live-progress-piece-heading > span {
  order: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-overview-row .live-progress-tracker.is-large .live-progress-piece-heading .live-progress-status {
  position: static !important;
  inset: auto !important;
  flex: 0 0 auto;
}

.live-progress-piece-heading .live-progress-status .status-light {
  display: block;
  width: 10px;
  height: 10px;
}

.live-progress-piece-heading .live-progress-status:not(.is-paused):not(.is-ended):not(.is-idle) .status-light {
  background: #39ff14;
  box-shadow: 0 0 7px rgba(57, 255, 20, 0.95), 0 0 16px rgba(57, 255, 20, 0.65);
}

.live-progress-piece-heading .live-progress-status.is-idle {
  color: #8798a6;
}

.live-progress-piece-heading .live-progress-status.is-idle .status-light {
  background: #43515c;
  box-shadow: inset 0 0 0 2px #71808b;
}

.live-overview-row .live-progress-tracker.is-large .live-progress-piece-heading .live-progress-status strong {
  color: inherit;
  font-size: 14px !important;
  line-height: 1 !important;
  letter-spacing: 0.03em;
}

.live-overview-row .live-progress-status .live-pause-duration {
  margin-left: 6px;
  color: #f1c84b;
  font-size: 27px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.live-progress-piece-heading .live-progress-status.is-paused {
  border-color: transparent;
  background: transparent;
  color: rgba(206, 172, 96, 0.82);
}

.live-progress-tracker.is-plain-pause .live-progress-main {
  align-items: center;
  gap: clamp(22px, 3.2vw, 42px);
  padding-top: 0;
}

.live-progress-tracker.is-plain-pause .live-progress-piece {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(58px, 6vw, 78px);
  padding-left: clamp(8px, 1.6vw, 22px);
}

.live-progress-tracker.is-plain-pause .live-progress-piece-heading {
  margin: 0;
}

.live-progress-tracker.is-plain-pause .live-progress-piece-heading .live-progress-status.is-paused {
  position: static;
  display: inline-flex;
  align-items: center;
  transform: none;
}

.live-progress-tracker.is-plain-pause .live-progress-ring span {
  color: rgba(206, 172, 96, 0.86);
  text-shadow: none;
}

.live-progress-tracker.is-plain-pause .live-progress-ring {
  border-color: rgba(122, 158, 183, 0.22);
  background:
    conic-gradient(
      from -90deg,
      rgba(206, 172, 96, 0.74) 1turn,
      rgba(206, 172, 96, 0.74) 0
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

.live-progress-tracker.is-plain-pause .live-progress-ring::before {
  opacity: 0;
  filter: none;
}

.live-progress-tracker.is-plain-pause .live-progress-status.is-paused {
  color: rgba(206, 172, 96, 0.86);
}

.live-progress-tracker.is-plain-pause .live-progress-status.is-paused .status-light {
  display: none;
}

.live-progress-tracker.is-plain-pause .live-progress-status.is-paused strong {
  color: rgba(206, 172, 96, 0.86);
  font-size: clamp(66px, 9vw, 124px) !important;
  letter-spacing: 0.04em;
  line-height: 0.84;
}

.live-progress-tracker.is-plain-pause .live-current-set-button {
  margin-top: 8px;
  color: var(--muted);
}

.live-progress-piece-heading .live-progress-status.is-paused:has(.live-pause-duration) {
  display: grid;
  grid-template-columns: 9px auto;
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 0;
  transform: translateY(-10px);
}

.live-progress-piece-heading .live-progress-status.is-paused:has(.live-pause-duration) .status-light {
  grid-column: 1;
  grid-row: 1;
}

.live-progress-piece-heading .live-progress-status.is-paused:has(.live-pause-duration) strong {
  grid-column: 2;
  grid-row: 1;
}

.live-overview-row .live-progress-piece-heading .live-progress-status.is-paused .live-pause-duration {
  grid-column: 2;
  grid-row: 2;
  margin: 2px 0 0;
  font-size: 23px;
  line-height: 1;
}

.live-progress-piece-heading .live-progress-status.is-ended {
  border-color: transparent;
  background: transparent;
  color: #b8c0b8;
}

.live-progress-piece > strong {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  max-height: 2.4em;
  font-size: clamp(17px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.live-progress-piece small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.live-recording-meta strong {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.live-recording-meta strong > span,
.live-recording-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #9aa29a;
  box-shadow: 0 0 0 3px rgba(154, 162, 154, 0.14);
  flex: 0 0 auto;
}

.live-recording-meta.is-recording strong {
  color: #ff8d86;
}

.live-recording-meta.is-recording strong > span,
.live-recording-meta.is-recording .live-recording-dot {
  background: #ef4e45;
  box-shadow:
    0 0 0 3px rgba(239, 78, 69, 0.16),
    0 0 11px rgba(239, 78, 69, 0.82),
    0 0 22px rgba(239, 78, 69, 0.34);
}

.live-recording-meta.is-error strong {
  color: #e2b84f;
}

.live-recording-meta.is-error strong > span {
  background: #d9a622;
}

.live-recording-meta.is-idle strong > span,
.live-recording-meta.is-idle .live-recording-dot {
  background: #3f4a52;
  box-shadow: 0 0 0 2px rgba(143, 155, 163, 0.06);
}

.live-recording-meta.is-paused strong > span,
.live-recording-meta.is-paused .live-recording-dot,
.live-recording-meta.is-error .live-recording-dot {
  background: #d9b84f;
  box-shadow:
    0 0 0 3px rgba(217, 184, 79, 0.15),
    0 0 10px rgba(217, 184, 79, 0.55);
}

.live-progress-meta {
  grid-column: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(68px, auto);
  grid-template-rows: minmax(42px, auto) minmax(78px, 1fr);
  gap: 0;
  justify-items: stretch;
  align-self: stretch;
  padding-left: 8px;
  border-left: 1px solid rgba(122, 158, 183, 0.25);
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  white-space: normal;
  overflow: hidden;
}

.live-progress-tracker.is-large .live-progress-meta {
  align-self: stretch;
  align-content: stretch;
}

.live-meta-card {
  display: grid;
  align-content: start;
  gap: 3px;
  width: 100%;
  min-width: 0;
  padding: 7px 6px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  text-align: left;
}

.live-concert-duration.live-meta-card {
  border: 0;
}

.live-recording-time-group.live-meta-card {
  border: 0;
  justify-items: end;
  text-align: right;
  padding-right: 0;
}

.live-set-duration.live-meta-card {
  border: 0;
}

.live-meta-card small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: none;
}

.live-meta-card > strong,
.live-recording-time-group .live-recording-meta strong {
  color: var(--muted);
  font-size: clamp(15px, 1.5vw, 20px);
  font-weight: 820;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.live-concert-duration > strong {
  color: #d7e5ec;
  font-size: clamp(17px, 1.75vw, 23px);
}

.live-recording-time-group .live-recording-meta.is-recording strong {
  color: #e15b52;
}

.live-recording-time-group .live-recording-meta.is-idle strong {
  color: #5c6972;
}

.live-recording-time-group .live-recording-meta.is-paused strong,
.live-recording-time-group .live-recording-meta.is-error strong {
  color: #d9b84f;
}

.live-progress-meta .live-meta-card strong {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.live-progress-meta .live-stat i {
  position: relative;
  min-width: 22px;
  color: var(--accent);
  font-size: 18px;
  font-style: normal;
  text-align: center;
}

.live-progress-meta .live-stat i b {
  position: absolute;
  right: -2px;
  bottom: -3px;
  min-width: 12px;
  padding: 0 2px;
  border-radius: 5px;
  background: #101f2b;
  color: var(--ink);
  font-size: 8px;
  line-height: 12px;
}

.live-set-duration {
  grid-column: 1;
  grid-row: 2;
}

.live-history-button.live-meta-card {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-items: end;
  align-self: center;
  align-content: center;
  min-height: 100%;
  color: inherit;
  cursor: pointer;
}

.live-set-duration > strong {
  color: #d7e4ee;
  font-size: clamp(18px, 1.9vw, 26px) !important;
  line-height: 1;
}

.live-current-set-button {
  display: inline-grid;
  align-items: start;
  gap: 1px;
  width: max-content;
  max-width: 100%;
  margin-top: 5px;
  padding: 1px 0 2px;
  border: 0;
  background: transparent;
  color: rgba(159, 178, 195, 0.72);
  font: inherit;
  font-size: clamp(11px, 1.02vw, 14px);
  font-weight: 760;
  letter-spacing: 0.075em;
  line-height: 1.18;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.live-current-set-button span {
  color: inherit;
  font-size: 1em;
  font-weight: inherit;
  line-height: 1.18;
}

.live-current-set-button em {
  color: inherit;
  font-size: clamp(13px, 1.08vw, 15px);
  font-style: normal;
  font-weight: 760;
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: lowercase;
}

.live-current-set-button:hover,
.live-current-set-button:focus-visible {
  color: #bfd2df;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.live-set-history {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  color: var(--muted);
  font-size: clamp(10px, 0.95vw, 13px);
  font-weight: 750;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.live-set-history span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.live-set-history b {
  color: #d7e4ee;
  font-size: 0.98em;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.live-set-history em {
  color: #aab8c4;
  font-style: normal;
  font-weight: 780;
  white-space: nowrap;
}

.live-progress-meta .live-played-count {
  justify-content: flex-end;
  color: #8fd9ad;
  font-size: clamp(60px, 7.5vw, 94px) !important;
  line-height: 0.9;
  text-align: right;
  text-shadow: 0 0 12px rgba(155, 232, 120, 0.24);
}

.set-history-list {
  display: grid;
  gap: 0;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.set-history-list li {
  display: grid;
  grid-template-columns: 13px minmax(64px, 0.8fr) minmax(70px, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 10px 3px;
  border-bottom: 1px solid rgba(122, 158, 183, 0.18);
  background: transparent;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.set-history-list li:last-child {
  border-bottom: 0;
}

.set-history-list li.is-current {
  background: transparent;
}

.set-history-current-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.set-history-list li.is-current .set-history-current-dot {
  background: #39ff14;
  box-shadow: 0 0 7px rgba(57, 255, 20, 0.9), 0 0 14px rgba(57, 255, 20, 0.42);
}

.set-history-list strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.06em;
}

.set-history-list .set-history-duration {
  color: #c8d8e5;
  font-size: 17px;
  font-weight: 850;
}

.set-history-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  white-space: nowrap;
}

.live-progress-meta .live-played-count i {
  color: #7fcf9d;
  font-size: 0.38em;
}

.live-played-count em {
  color: var(--muted);
  font-size: 14px;
  font-style: normal;
}

.live-recording-meta.is-paused strong,
.audio-dot.is-paused {
  color: #ffd45c;
}

.audio-dot.is-paused {
  background: #ffd45c;
}

.live-overview-row .live-progress-tracker.is-large .live-progress-ring {
  width: 124px !important;
  height: 124px !important;
}

.live-overview-row .live-progress-tracker.is-large .live-progress-ring span {
  margin-top: -11px;
  font-size: clamp(31px, 3.45vw, 43px) !important;
  font-weight: 900;
}

.live-overview-row .live-progress-tracker.is-large .live-progress-ring small {
  margin-top: 34px;
  font-size: clamp(11px, 1.08vw, 14px);
  font-weight: 780;
  letter-spacing: 0.02em;
}

@media (orientation: landscape) and (min-width: 900px) {
  .live-overview-row .live-progress-tracker.is-large .live-progress-ring {
    width: 146px !important;
    height: 146px !important;
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-ring span {
    margin-top: -12px;
    font-size: clamp(33px, 2.75vw, 41px) !important;
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-ring small {
    margin-top: 39px;
    font-size: clamp(11px, 0.9vw, 13px);
  }
}

@keyframes criticalOverrunPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 45, 32, 0.08), 0 16px 36px rgba(0, 0, 0, 0.3); }
  50% { box-shadow: 0 0 0 7px rgba(255, 45, 32, 0.22), 0 0 30px rgba(255, 45, 32, 0.32); }
}

.live-overview-row .live-progress-tracker.is-large {
  grid-template-columns: minmax(0, 1.86fr) minmax(200px, 0.58fr);
}

.live-progress-meta span {
  display: grid;
  gap: 4px;
}

.live-progress-meta button:hover,
.live-progress-meta button:focus-visible {
  background: transparent;
  color: var(--accent);
}

.live-progress-meta small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.live-progress-meta strong {
  color: var(--ink);
  font-size: clamp(12px, 1.25vw, 16px);
  font-weight: 800;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.live-progress-meta .live-concert-duration > strong {
  color: #d7e5ec;
  font-size: clamp(17px, 1.75vw, 23px);
  line-height: 1.08;
}

@keyframes liveProgressHit {
  0% {
    box-shadow: 0 0 0 0 rgba(52, 120, 246, 0.0), 0 8px 20px rgba(0, 0, 0, 0.24);
    transform: scale(1);
  }
  24% {
    box-shadow: 0 0 0 10px rgba(238, 248, 255, 0.18), 0 0 26px rgba(238, 248, 255, 0.18), 0 8px 22px rgba(0, 0, 0, 0.24);
    transform: scale(1.045);
  }
  54% {
    box-shadow: 0 0 0 5px rgba(238, 248, 255, 0.10), 0 0 18px rgba(238, 248, 255, 0.12), 0 8px 22px rgba(0, 0, 0, 0.24);
    transform: scale(1.018);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(238, 248, 255, 0.0), 0 8px 20px rgba(0, 0, 0, 0.24);
    transform: scale(1);
  }
}

.live-progress-tracker.is-medium {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 9px 10px;
}

.live-progress-tracker.is-medium .live-progress-status {
  grid-column: 1 / -1;
}

.live-progress-tracker.is-medium .live-progress-ring {
  width: 40px;
  height: 40px;
}

.live-progress-tracker.is-compact {
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
}

.live-progress-tracker.is-compact .live-progress-status {
  grid-column: 1 / -1;
}

.live-progress-tracker.is-compact .live-progress-ring {
  width: 30px;
  height: 30px;
}

.live-progress-tracker.is-compact .live-progress-ring::after {
  inset: 4px;
}

.live-progress-tracker.is-compact .live-progress-meta {
  display: none;
}

.live-quick-panel {
  position: absolute;
  z-index: 35;
  top: 158px;
  right: 8px;
  width: min(360px, calc(34% - 8px));
  max-width: calc(100% - 16px);
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: 14px;
  background: rgba(5, 14, 22, 0.82);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.live-quick-panel input {
  min-height: 34px;
  padding: 7px 10px;
}

#liveSearchToggleBtn.is-active,
#unknownWorkMenuBtn.is-active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--selected);
}

.unknown-work-options {
  position: absolute;
  z-index: 36;
  top: 158px;
  right: 8px;
  width: min(360px, calc(34% - 8px));
  max-width: calc(100% - 16px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: 14px;
  background: rgba(5, 14, 22, 0.84);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.unknown-template-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
}

.unknown-work-options input {
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
}

.unknown-work-options button {
  min-height: 30px;
  border-color: rgba(122, 199, 167, 0.30);
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

#addUnknownWorkBtn {
  min-height: 34px;
  padding-inline: 12px;
  border-color: rgba(143, 217, 173, 0.55);
  background: rgba(143, 217, 173, 0.18);
  color: #d7f3df;
  font-weight: 900;
}

:root[data-theme="dark"] .unknown-work-options button {
  color: var(--accent);
  background: rgba(255, 255, 255, 0.06);
}

.live-action-dialog {
  width: min(560px, calc(100vw - 34px));
  max-height: min(74vh, 680px);
  padding: 0;
  border-color: rgba(122, 158, 183, 0.32);
  background: rgba(8, 22, 33, 0.985);
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.live-action-dialog::backdrop {
  background: rgba(2, 8, 13, 0.52);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.live-action-dialog form {
  display: grid;
  gap: 12px;
  padding: 20px;
}

.live-action-dialog h2 {
  margin: 0 32px 2px 0;
  color: #a8d8c4;
  font-size: 13px;
  font-weight: 880;
  letter-spacing: 0.14em;
}

.live-action-dialog input {
  min-height: 42px;
  border: 1px solid rgba(122, 158, 183, 0.26);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.075);
  color: var(--ink);
  font-size: 16px;
}

.live-search-results {
  display: grid;
  gap: 6px;
  max-height: min(48vh, 420px);
  overflow: auto;
  padding-right: 2px;
}

.live-search-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  text-align: left;
}

.live-search-result strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #b9f0c7;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.live-search-result small {
  grid-column: 1;
  color: var(--muted);
  font-size: 12px;
}

.live-search-result em {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  color: #8aa0ad;
  font-size: 11px;
  font-style: normal;
  font-weight: 760;
}

.live-search-result:hover,
.live-search-result:focus-visible {
  border-color: rgba(143, 217, 173, 0.48);
  background: rgba(143, 217, 173, 0.12);
  outline: none;
}

.live-search-empty {
  margin: 0;
  padding: 14px 4px 6px;
  color: var(--muted);
  font-size: 14px;
}

.unknown-primary-log {
  width: fit-content;
  min-height: 44px;
  padding: 0 18px;
  border-color: rgba(122, 158, 183, 0.30);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.075);
  color: #cfe9dc;
  font-size: 14px;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.055),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22);
}

.unknown-title-field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.unknown-title-field input {
  min-height: 44px;
  border-color: rgba(122, 158, 183, 0.20);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--ink);
  font-size: 15px;
  font-weight: 430;
  letter-spacing: 0.01em;
}

.unknown-title-field input::placeholder {
  color: rgba(167, 185, 199, 0.52);
  font-weight: 360;
}

.unknown-template-heading {
  margin: 4px 0 -4px;
  color: rgba(167, 185, 199, 0.66);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.unknown-work-dialog .unknown-template-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.unknown-work-dialog .unknown-template-list button {
  min-height: 44px;
  border-color: rgba(122, 158, 183, 0.24);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.055);
  color: #b8d8c8;
  font-size: 12px;
  font-weight: 840;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.unknown-work-dialog .unknown-template-list button:hover,
.unknown-work-dialog .unknown-template-list button:focus-visible {
  border-color: rgba(143, 217, 173, 0.46);
  background: rgba(143, 217, 173, 0.12);
  outline: none;
}

.timer-settings-dialog label,
.setlist-import-dialog label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timer-settings-dialog input,
.timer-settings-dialog select,
.setlist-import-dialog textarea {
  min-height: 42px;
  border: 1px solid rgba(122, 158, 183, 0.26);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--ink);
  font-size: 15px;
}

.timer-settings-dialog .toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(122, 158, 183, 0.20);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.timer-settings-dialog .toggle-row input {
  min-height: 0;
  width: 22px;
  height: 22px;
}

.concert-prep-dialog {
  width: min(620px, calc(100vw - 24px));
}

.concert-prep-dialog form {
  gap: 14px;
}

.concert-prep-intro {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.concert-prep-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.concert-prep-steps span {
  min-width: 0;
  padding: 5px 4px;
  border: 1px solid rgba(122, 158, 183, 0.18);
  border-radius: 999px;
  color: rgba(167, 185, 199, 0.55);
  background: rgba(255, 255, 255, 0.035);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.concert-prep-steps span.is-active {
  border-color: rgba(143, 217, 173, 0.44);
  color: var(--ink);
  background: rgba(122, 199, 167, 0.15);
}

.concert-prep-steps span.is-done {
  color: #8fd9ad;
  border-color: rgba(143, 217, 173, 0.26);
}

.concert-prep-summary {
  display: grid;
  gap: 7px;
}

.concert-prep-card {
  display: grid;
  gap: 5px;
  min-height: 108px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(122, 158, 183, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.025)),
    rgba(0, 0, 0, 0.14);
}

.concert-prep-card strong {
  color: var(--ink);
  font-size: clamp(20px, 3vw, 30px);
  line-height: 1.1;
}

.concert-prep-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.concert-prep-status {
  display: grid;
  grid-template-columns: 20px 120px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(122, 158, 183, 0.20);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
}

.concert-prep-status span {
  color: rgba(177, 196, 206, 0.58);
  font-size: 14px;
}

.concert-prep-status.is-ok span {
  color: #8fd9ad;
  text-shadow: 0 0 12px rgba(82, 238, 84, 0.35);
}

.concert-prep-status strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.concert-prep-status small {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.concert-prep-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.concert-prep-actions button {
  min-height: 42px;
  border-radius: 13px;
}

.concert-prep-actions .primary-action {
  min-height: 48px;
  border-color: rgba(143, 217, 173, 0.40);
  background: rgba(122, 199, 167, 0.16);
  color: var(--ink);
}

.setlist-import-dialog textarea {
  min-height: 170px;
  padding: 12px;
  resize: vertical;
  line-height: 1.45;
}

.setlist-import-summary {
  margin: -4px 0 0;
  color: #a8d8c4;
  font-size: 12px;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.setlist-import-preview {
  display: grid;
  gap: 5px;
  max-height: min(32vh, 260px);
  overflow: auto;
}

.setlist-import-preview-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 9px;
  border: 1px solid rgba(122, 158, 183, 0.20);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
  cursor: grab;
  text-align: left;
}

.setlist-import-preview-row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.setlist-import-preview-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #b9f0c7;
  font-size: 13px;
}

.unknown-primary-log:hover,
.unknown-primary-log:focus-visible {
  border-color: rgba(143, 217, 173, 0.42);
  background: rgba(143, 217, 173, 0.11);
  outline: none;
}

.rec-indicator {
  margin-left: 8px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  color: #b42318;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
}

.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.14);
}

.audio-recorder-status {
  margin: -4px 0 12px;
  padding: 7px 10px;
  border: 1px solid rgba(122, 158, 183, 0.20);
  border-radius: 14px;
  background: rgba(5, 14, 22, 0.24);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.pause-playback-panel {
  display: grid;
  grid-template-columns: 64px minmax(210px, 1.2fr) minmax(180px, 0.8fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 190, 72, 0.62);
  border-radius: 14px;
  background:
    radial-gradient(circle at 7% 50%, rgba(242, 192, 67, 0.19), transparent 23%),
    linear-gradient(135deg, rgba(52, 43, 23, 0.98), rgba(24, 28, 34, 0.98));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.live-panel.is-pause-player-open .pause-playback-panel {
  grid-template-columns: 64px minmax(210px, 1fr) auto;
  margin-bottom: 0;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  box-shadow: none;
}

.live-panel.is-pause-player-open .pause-player-playlist {
  display: none !important;
}

.live-panel.is-pause-player-open .pause-playback-actions {
  grid-column: 3;
}

.live-panel.is-pause-player-open .split {
  padding: 8px;
  border: 1px solid rgba(239, 190, 72, 0.62);
  border-top: 0;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, rgba(37, 32, 22, 0.96), rgba(17, 23, 29, 0.98));
}

.pause-playback-panel div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.pause-playback-panel small {
  color: #e7bd58;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.pause-playback-panel strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #fff5d6;
  font-size: 17px;
}

.pause-playback-panel button {
  flex: 0 0 auto;
  min-height: 28px;
  font-size: 11px;
}

.pause-player-artwork {
  width: 58px;
  height: 58px;
  display: grid !important;
  place-items: center;
  border: 1px solid rgba(255, 211, 102, 0.72);
  border-radius: 13px;
  background: linear-gradient(145deg, #dca62f, #765619);
  color: #fff8e3;
  font-size: 30px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), 0 7px 16px rgba(0, 0, 0, 0.26);
}

.pause-player-main {
  gap: 5px !important;
}

.pause-player-progress-row {
  display: grid !important;
  grid-template-columns: 38px minmax(100px, 1fr) 38px;
  align-items: center;
  gap: 7px !important;
}

.pause-player-progress-row time {
  color: #d9d3c2;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.pause-player-progress-row input[type="range"] {
  width: 100%;
  min-height: 20px;
  accent-color: #efbd48;
}

.pause-player-playlist {
  gap: 4px !important;
}

.pause-playback-panel select {
  min-width: 0;
  width: 100%;
}

.pause-playback-actions {
  display: flex !important;
  grid-auto-flow: column;
  gap: 5px !important;
}

.pause-playback-actions button:not(.continue-concert-button) {
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  border-color: rgba(239, 190, 72, 0.42);
  background: rgba(239, 190, 72, 0.09);
  color: #ffe5a0;
  font-size: 17px;
}

.pause-playback-actions .continue-concert-button {
  min-height: 38px;
  padding: 0 12px;
  border-color: rgba(122, 216, 80, 0.7);
  background: rgba(122, 216, 80, 0.16);
  color: #baf49d;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.live-progress-tracker.is-playback-mode {
  border-color: rgba(239, 190, 72, 0.62);
  background:
    radial-gradient(circle at 14% 50%, rgba(239, 190, 72, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(49, 39, 20, 0.98), rgba(18, 22, 29, 0.99));
}

.live-progress-tracker.is-playback-mode .live-progress-piece-heading > span {
  color: #e7bd58;
}

.live-overview-row .live-progress-tracker.is-playback-mode .live-progress-status {
  top: 8px !important;
  right: auto !important;
  left: 136px !important;
  color: #ffd45c;
}

.live-overview-row .live-progress-tracker.is-playback-mode .live-progress-status strong {
  color: #ffd45c;
  font-size: 30px !important;
  font-weight: 900;
}

.setlist li.is-playback-entry,
.played-history-list li.is-pause-music-entry {
  border-color: rgba(239, 190, 72, 0.58);
  background: rgba(239, 190, 72, 0.13);
}

.live-tap-confirmation {
  position: fixed;
  z-index: 10000;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(520px, calc(100vw - 40px));
  padding: 12px 18px;
  border: 2px solid #72ed67;
  border-radius: 14px;
  background: rgba(8, 31, 22, 0.96);
  color: #efffed;
  box-shadow: 0 0 34px rgba(57, 255, 20, 0.42);
  pointer-events: none;
}

.live-tap-confirmation span {
  color: #72ed67;
  font-size: 28px;
  font-weight: 900;
}

.live-tap-confirmation strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 19px;
}

.live-tap-confirmation.is-setlist-import-confirmation {
  display: grid;
  gap: 3px;
  align-items: start;
  border-color: rgba(202, 168, 100, 0.58);
  background: rgba(18, 32, 35, 0.97);
  color: var(--ink);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.38), 0 0 26px rgba(202, 168, 100, 0.16);
}

.live-tap-confirmation.is-setlist-import-confirmation strong {
  color: #caa864;
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-tap-confirmation.is-setlist-import-confirmation small {
  color: var(--muted);
  font-size: 12px;
}

.live-tap-confirmation[hidden] {
  display: none;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--ink);
}

.checkbox-label input {
  width: auto;
}

.concert-notes-box,
.archive-notes-box {
  margin: -3px 0 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--glass-soft);
  color: var(--muted);
}

.concert-notes-box strong,
.archive-notes-box strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 12px;
}

.concert-notes-box p,
.archive-notes-box p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.archive-notes-box {
  margin: 7px 0 3px;
}

.audio-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #9aa29a;
  box-shadow: 0 0 0 3px rgba(154, 162, 154, 0.13);
  flex: 0 0 auto;
}

.audio-dot.is-recording {
  background: #b42318;
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.17);
}

.audio-dot.is-error {
  background: #d9a622;
  box-shadow: 0 0 0 3px rgba(217, 166, 34, 0.18);
}

.status-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #28a05f;
  box-shadow: 0 0 0 3px rgba(40, 160, 95, 0.16);
  flex: 0 0 auto;
}

.status-light.is-paused {
  background: #d9a622;
  box-shadow: 0 0 0 3px rgba(217, 166, 34, 0.2);
}

.status-light.is-ended,
.status-light.is-idle {
  background: #9aa29a;
  box-shadow: 0 0 0 3px rgba(154, 162, 154, 0.16);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  flex: 1;
  min-height: 0;
}

.split > div {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.section-heading-row h3 {
  margin-bottom: 0;
}

.section-heading-row button {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-list,
.setlist {
  display: grid;
  align-content: start;
  gap: 6px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 0;
  border-radius: 16px;
  background: rgba(5, 14, 22, 0.20);
  padding: 8px;
}

.live-panel .live-list {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 8px 0 0;
}

.is-pause-playlist-heading {
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid rgba(239, 190, 72, 0.48);
  border-radius: 999px;
  background: rgba(239, 190, 72, 0.12);
  color: #d4a52f;
  font-size: 12px;
  letter-spacing: 0.035em;
}

.live-history-source {
  display: none !important;
}

.live-list:empty,
.setlist:empty {
  min-height: 80px;
}

#archiveView {
  min-height: calc(100vh - 134px);
}

#archiveView.is-active {
  display: flex;
  flex-direction: column;
}

.archive-list {
  display: grid;
  align-content: start;
  gap: 7px;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding-bottom: 8px;
}

.archive-mode-switch {
  display: flex;
  gap: 4px;
  width: fit-content;
  margin: 0 0 10px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-field);
}

.archive-mode-switch button {
  min-height: 30px;
  padding: 0 12px;
  border-color: transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}

.archive-mode-switch button:hover {
  border-color: transparent;
  background: var(--soft);
  color: var(--ink);
}

.archive-mode-switch button.is-active {
  background: var(--selected);
  color: var(--ink);
}

.saved-place-picker {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--glass-field);
}

.performance-venue-item .archive-event-summary strong {
  color: var(--accent-strong);
}

.archive-section-title {
  margin: 8px 2px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.live-browser {
  display: grid;
  grid-template-columns: minmax(230px, var(--live-collection-width, 230px)) 4px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  column-gap: 4px;
  row-gap: 0;
  min-height: 0;
  overflow: hidden;
  flex: 1;
}

@media (min-width: 1180px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .live-browser {
    grid-template-columns: minmax(230px, var(--live-collection-width, 230px)) 4px minmax(420px, 1fr);
    column-gap: 5px;
  }
}

.live-browser > .live-collections-header {
  grid-column: 1;
  grid-row: 1;
}

.live-collections-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px 6px;
  border: 1px solid rgba(122, 158, 183, 0.16);
  border-bottom: 0;
  border-radius: 16px 16px 0 0;
  background: rgba(5, 14, 22, 0.27);
}

.live-collections-header h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-collections-header .live-column-toggle {
  display: none !important;
}

.live-browser > .live-collections-header + .live-column {
  grid-column: 1;
  grid-row: 2;
  align-self: stretch;
  height: auto;
  overflow: hidden;
  margin-top: -1px;
  border-top: 0;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.live-browser > .live-column:last-child {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.live-column {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(122, 158, 183, 0.16);
  border-radius: 16px;
  background: rgba(5, 14, 22, 0.27);
  padding: 8px;
}

.live-column h3 {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-collapsed-collection-context {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 8px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid rgba(122, 158, 183, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--ink);
}

.live-collapsed-collection-context strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 760;
}

.live-collapsed-collection-context small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.live-column-toggle {
  width: 42px;
  min-width: 42px;
  min-height: 34px;
  margin-bottom: 0;
  padding: 0;
  border-color: rgba(122, 158, 183, 0.22);
  border-radius: var(--radius-list);
  background: var(--glass-field);
  color: var(--ink);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  justify-content: center;
  justify-self: start;
  z-index: 1;
}

.live-column-toggle:hover {
  border-color: rgba(122, 158, 183, 0.32);
  background: rgba(255, 255, 255, 0.07);
  color: var(--ink);
}

.live-browser.is-collapsed {
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  row-gap: 10px;
}

.live-browser.is-collapsed .live-collections-header + .live-column,
.live-browser.is-collapsed .live-column-resizer {
  display: none;
}

.live-browser.is-collapsed > .live-collections-header {
  grid-column: 1;
  grid-row: 1;
}

.live-browser.is-collapsed > .live-column:last-child {
  grid-column: 1;
  grid-row: 2;
}

.live-column-resizer {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 4px;
  min-height: 100%;
  border-radius: 999px;
  cursor: col-resize;
  touch-action: none;
  background: transparent;
  align-self: stretch;
}

.live-column-resizer:hover,
.live-column-resizer.is-dragging {
  background: rgba(122, 199, 167, 0.24);
}

.live-collection-list {
  display: grid;
  align-content: start;
  gap: 6px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding: 0;
  scrollbar-width: none;
}

.live-list,
.live-collection-list,
.live-column {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.live-list::-webkit-scrollbar,
.live-collection-list::-webkit-scrollbar,
.live-column::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.live-collection-list button {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  justify-content: space-between;
  gap: 5px;
  font-size: 14px;
  text-align: left;
  box-sizing: border-box;
  border-color: rgba(122, 158, 183, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
}

.live-collection-list button:not(.is-active) {
  border-color: transparent;
  background: transparent;
}

.live-collection-list button:not(.is-active):hover,
.live-collection-list button:not(.is-active):focus-visible {
  border-color: transparent;
  background: rgba(122, 199, 167, 0.08);
}

.live-collection-list button:focus,
.live-collection-list button:focus-visible {
  outline: none;
}

.live-collection-list button::before {
  display: none;
}

.live-collection-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.live-collection-list button span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.18;
}

.live-collection-list button small {
  color: var(--muted);
  font-size: 12px;
}

.live-collection-list button.is-active {
  background: var(--selected);
  border-color: transparent;
  outline: none;
  box-shadow: none;
}

.live-collection-list button.is-active small {
  color: var(--accent);
}

.live-list button {
  width: 100%;
  justify-content: flex-start;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.live-list > button {
  width: auto;
  margin: 2px 4px;
  border-color: transparent;
  border-radius: var(--radius-list);
  background: transparent;
}

.live-list > button,
.live-work-row {
  border-bottom: 0;
}

.live-work-row.is-current {
  border-radius: 12px;
}

.live-list > button:hover {
  border-color: transparent;
  background: var(--soft);
}

.live-work-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 52px;
  column-gap: 8px;
  row-gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.live-work-column-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 0;
  min-height: 30px;
  margin-bottom: 8px;
  padding: 0 8px 0 2px;
}

.live-work-column-header h3 {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-asset-folder-button {
  display: none !important;
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: 1px solid rgba(122, 158, 183, 0.24);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.20);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.30);
  display: grid;
  place-items: center;
  justify-self: stretch;
}

#liveAssignPdfBtn,
#liveAssignPdfBtn .live-asset-folder-icon {
  width: 52px;
}

#liveAssignAudioBtn,
#liveAssignAudioBtn .live-asset-folder-icon {
  width: 52px;
}

.live-asset-folder-button:hover,
.live-asset-folder-button:focus-visible {
  border-color: rgba(126, 196, 190, 0.42);
  background: rgba(0, 0, 0, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(126, 196, 190, 0.10);
}

.live-asset-folder-icon {
  position: relative;
  width: 52px;
  height: 44px;
  display: inline-grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #a8d8d4;
}

.live-asset-folder-icon::before {
  display: none;
}

.live-asset-folder-icon i {
  align-self: end;
  color: #a8d8d4;
  font-size: 19px;
  font-style: normal;
  font-weight: 850;
  line-height: 0.9;
}

.live-asset-folder-icon b {
  align-self: start;
  color: rgba(198, 216, 228, 0.78);
  font-size: 8px;
  font-weight: 860;
  line-height: 1;
  letter-spacing: 0.02em;
}

.live-work-row:hover,
.live-work-row:focus-within {
  background: transparent;
}

.live-work-row > button:first-child {
  min-width: 0;
  min-height: 52px;
  padding: 7px 9px;
  border: 1px solid rgba(122, 158, 183, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 760;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.live-work-row > button:first-child:focus:not(:focus-visible) {
  outline: none;
}

.live-work-row.is-confirmed > button:first-child {
  border-color: rgba(122, 158, 183, 0.18);
  background: rgba(255, 255, 255, 0.055);
  box-shadow: none;
  animation: liveWorkHapticPulse 340ms cubic-bezier(0.19, 0.78, 0.24, 1) 1;
  transform-origin: center;
}

.live-work-row.is-confirmed > button:first-child strong {
  animation: liveWorkNameFlash 0.95s ease-out;
}

.live-progress-piece > strong.is-entering-live-block {
  animation: liveTitleSettle 0.95s ease-out;
}

@keyframes liveWorkNameFlash {
  0% { color: var(--ink); text-shadow: none; }
  28% { color: #8fd9ad; text-shadow: 0 0 12px rgba(155, 232, 120, 0.24); }
  100% { color: var(--ink); text-shadow: none; }
}

@keyframes liveTitleSettle {
  0% { opacity: 0.25; transform: translateY(6px); }
  35% { opacity: 1; color: #8fd9ad; text-shadow: 0 0 12px rgba(155, 232, 120, 0.24); }
  100% { opacity: 1; transform: translateY(0); color: var(--ink); text-shadow: none; }
}

@keyframes liveWorkHapticPulse {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  26% {
    transform: translate3d(1.5px, 0, 0) scale(1.012);
  }
  54% {
    transform: translate3d(-1px, 0, 0) scale(1.006);
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
}

.live-work-row.is-current > button:first-child {
  border-color: rgba(143, 217, 173, 0.54);
  background:
    linear-gradient(90deg, rgba(143, 217, 173, 0.18), rgba(143, 217, 173, 0.075));
}

.live-browser.is-pause-playlist .live-work-column-header,
.live-browser.is-pause-playlist .live-work-row {
  grid-template-columns: minmax(0, 1fr);
}

.live-browser.is-pause-playlist .live-pdf-button,
.live-browser.is-pause-playlist .live-audio-button {
  display: none;
}

.live-browser.is-pause-playlist .live-work-row > button:first-child {
  min-height: 42px;
  padding: 7px 8px;
  border-color: transparent;
  border-radius: 7px;
  background: transparent;
}

.live-browser.is-pause-playlist .pause-track-row-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.live-browser.is-pause-playlist .live-work-row > button:first-child:hover,
.live-browser.is-pause-playlist .live-work-row > button:first-child:focus-visible {
  border-color: transparent;
  background: rgba(239, 190, 72, 0.08);
}

.live-browser.is-pause-playlist .live-work-row.is-current > button:first-child {
  border-color: transparent;
  background: rgba(239, 190, 72, 0.13);
}

.live-browser.is-pause-playlist .live-work-row.is-current > button:first-child::after {
  display: none;
}

.live-work-row.is-current > button:first-child::after {
  content: "";
  width: 10px;
  height: 10px;
  margin-left: 2px;
  border-radius: 50%;
  background: #39ff14;
  box-shadow: 0 0 7px rgba(57, 255, 20, 0.92), 0 0 16px rgba(57, 255, 20, 0.54);
  flex: 0 0 auto;
}

.live-work-row > button:first-child span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.18;
  text-align: left;
}

.live-work-row > button:first-child strong {
  font-size: 14px;
  line-height: 1.12;
}

.live-work-row > button:first-child small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.12;
}

.live-work-row.is-raw-import > button:first-child small {
  color: #caa864;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.live-work-row.is-planned-entry > button:first-child {
  border-color: rgba(143, 217, 173, 0.34);
}

.live-work-row > button:first-child span:last-child {
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.live-work-row.is-current .live-work-action-icon {
  display: none;
}

.live-work-row > button:first-child:hover,
.live-work-row > button:first-child:focus-visible {
  border-color: rgba(122, 199, 167, 0.38);
  background: rgba(255, 255, 255, 0.095);
}

.live-work-row > button:first-child::before {
  display: none;
}

.live-pdf-button {
  width: 40px;
}

.live-pdf-button:disabled,
.live-audio-button:disabled {
  cursor: default;
}

.pdf-icon-button,
.live-audio-button {
  box-sizing: border-box;
  width: 46px;
  min-width: 46px;
  min-height: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: rgba(122, 158, 183, 0.18);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(154, 168, 178, 0.72);
  box-shadow: none;
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.02em;
  text-align: center;
}

.pdf-icon-button.has-asset,
.live-audio-button.has-asset {
  border-color: rgba(105, 169, 171, 0.34);
  background: rgba(89, 142, 154, 0.13);
  color: #a8d8d4;
}

.pdf-icon-button.is-missing-asset,
.live-audio-button.is-missing-asset {
  border-color: rgba(122, 139, 151, 0.24);
  background: rgba(0, 0, 0, 0.16);
  color: rgba(137, 151, 161, 0.62);
}

.pdf-icon-button.has-asset:hover,
.pdf-icon-button.has-asset:focus-visible,
.live-audio-button.has-asset:hover,
.live-audio-button.has-asset:focus-visible {
  border-color: rgba(126, 196, 190, 0.50);
  background: rgba(89, 142, 154, 0.19);
  color: #c1e5e1;
  box-shadow: none;
}

.pdf-icon-button.is-missing-asset:hover,
.pdf-icon-button.is-missing-asset:focus-visible,
.live-audio-button.is-missing-asset:hover,
.live-audio-button.is-missing-asset:focus-visible {
  border-color: rgba(122, 139, 151, 0.36);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(170, 185, 195, 0.76);
  box-shadow: none;
}

.pdf-icon-button::before {
  display: none;
}

.pdf-symbol {
  width: 100%;
  min-width: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  font-size: 10px;
  line-height: 1;
  text-align: center;
  font-weight: 820;
  line-height: 1;
  background: transparent;
}

.live-audio-button span {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  line-height: 1;
  transform: translateY(-1px);
}

.pdf-folder-symbol {
  position: relative;
  width: 34px;
  height: 27px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
}

.pdf-folder-symbol > span {
  position: absolute;
  right: 1px;
  bottom: 1px;
  left: 1px;
  height: 20px;
  border: 1px solid rgba(122, 199, 167, 0.62);
  border-radius: 4px;
  background: rgba(122, 199, 167, 0.12);
}

.pdf-folder-symbol > span::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 2px;
  width: 13px;
  height: 6px;
  border: 1px solid rgba(122, 199, 167, 0.62);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: rgba(122, 199, 167, 0.12);
}

.pdf-folder-symbol b {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  color: var(--accent);
  font-size: 9px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.setlist {
  list-style: none;
  padding-left: 0;
  overflow-x: hidden;
}

.live-panel .setlist {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.setlist li,
.archive-item {
  border: 1px solid var(--line);
  background: var(--glass-field);
  padding: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.setlist li {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto 28px;
  align-items: start;
  gap: 6px;
  border: 1px solid rgba(122, 158, 183, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  box-shadow: none;
  padding: 9px;
}

.setlist li.is-current {
  border-color: rgba(122, 216, 80, 0.78);
  background:
    linear-gradient(90deg, rgba(122, 216, 80, 0.20), rgba(122, 216, 80, 0.055));
  padding: 14px 10px;
}

.setlist li.is-current strong,
.setlist li.is-current .setlist-title-edit-button {
  font-size: 17px;
  font-weight: 800;
}

.setlist li.is-completed:not(.is-current) {
  opacity: 0.82;
}

.setlist-check {
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
  justify-self: center;
}

.setlist li:last-child {
  border-bottom: 1px solid rgba(122, 158, 183, 0.14);
}

.setlist li.is-unknown-entry,
.archive-item.has-export-critical-issues {
  border-color: rgba(180, 35, 24, 0.45);
  background: #fff0ee;
}

.setlist li.is-raw-import-entry,
.archive-item.has-raw-imports {
  border-color: rgba(202, 168, 100, 0.48);
  background: rgba(202, 168, 100, 0.11);
}

:root[data-theme="dark"] .setlist li.is-unknown-entry,
:root[data-theme="dark"] .archive-item.has-export-critical-issues {
  background: #351f1d;
  border-color: #7d3a34;
}

:root[data-theme="dark"] .setlist li.is-raw-import-entry,
:root[data-theme="dark"] .archive-item.has-raw-imports {
  background: rgba(84, 62, 26, 0.38);
  border-color: rgba(202, 168, 100, 0.50);
}

.setlist li.is-playback-entry {
  border-color: rgba(239, 190, 72, 0.58);
  background: rgba(239, 190, 72, 0.13);
}

.pause-music-label {
  display: inline-flex;
  width: fit-content;
  margin-top: 2px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(239, 190, 72, 0.16);
  color: #d4a52f;
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.raw-import-label,
.work-status-badge,
.archive-raw-import-warning span,
.work-raw-import-notice span {
  display: inline-flex;
  width: fit-content;
  margin: 3px 5px 0 0;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(202, 168, 100, 0.17);
  color: #caa864;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-status-badge.is-open,
.archive-raw-import-warning span + span,
.work-raw-import-notice span + span {
  background: rgba(122, 158, 183, 0.15);
  color: var(--muted);
}

.raw-import-review-button {
  display: inline-flex;
  margin-left: 8px;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgba(202, 168, 100, 0.34);
  border-radius: 999px;
  background: rgba(202, 168, 100, 0.09);
  color: #caa864;
  font-size: 11px;
  font-weight: 760;
}

#acceptRawImportWorkBtn {
  border-color: rgba(202, 168, 100, 0.44);
  background: rgba(202, 168, 100, 0.12);
  color: #caa864;
}

.work-raw-import-notice {
  margin: -4px 0 12px;
  padding: 9px 10px;
  border: 1px solid rgba(202, 168, 100, 0.34);
  border-radius: 12px;
  background: rgba(202, 168, 100, 0.10);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.archive-raw-import-warning {
  color: #caa864;
}

.setlist-number {
  width: 26px;
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  background: transparent;
}

.setlist li strong,
.setlist-title-edit-button,
.archive-item strong {
  display: block;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  line-height: 1.2;
}

.setlist-title-edit-button {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  justify-content: flex-start;
  text-align: left;
  box-shadow: none !important;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.setlist-title-edit-button:hover,
.setlist-title-edit-button:focus {
  color: var(--ink);
  background: var(--soft) !important;
  box-shadow: none;
  outline: none;
}

.setlist-title-edit-button::before {
  display: none;
}

.setlist-title-input {
  width: 100%;
  min-height: 28px;
  padding: 3px 7px;
  font-size: 14px;
  font-weight: 700;
}

.setlist-number.is-pause {
  border-color: transparent;
  background: transparent;
}

.setlist small,
.archive-item small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.archive-event-summary {
  cursor: pointer;
  border-radius: 18px;
  padding: 4px 6px;
  margin: -4px -6px;
}

.archive-event-summary:hover,
.archive-event-summary:focus {
  background: transparent;
  outline: none;
}

.duration-button {
  min-height: 24px;
  margin-top: 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.duration-button::before {
  display: none;
}

.duration-button:hover {
  color: var(--ink);
  background: var(--soft);
}

.unknown-complete-button {
  min-height: 28px;
  padding: 0 8px;
  border-color: rgba(180, 35, 24, 0.35);
  color: #8f221b;
  font-size: 12px;
}

.archive-unknown-warning {
  color: #b42318;
  font-weight: 600;
}

:root[data-theme="dark"] .unknown-complete-button,
:root[data-theme="dark"] .archive-unknown-warning {
  color: #ffb1a8;
}

.duration-input {
  width: 72px;
  min-height: 28px;
  margin-top: 3px;
  padding: 3px 6px;
  color: var(--ink);
}

.duration-input.is-invalid {
  border-color: #b42318;
  background: #fff3f1;
}

.entry-delete-button {
  grid-column: -2 / -1;
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-color: transparent;
  color: #9f2b24;
  font-size: 20px;
  line-height: 1;
}

.entry-delete-button:hover {
  border-color: #d8b2ad;
  background: #fff3f1;
}

.archive-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-radius: 20px;
  transition: background 140ms ease, border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
  overflow: hidden;
}

.archive-item:hover,
.archive-item:focus-within {
  border-color: rgba(122, 199, 167, 0.38);
  background: var(--soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 10px 26px rgba(0, 0, 0, 0.10);
}

.archive-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  align-self: stretch;
  border-radius: 16px;
}

.archive-warning {
  color: #caa864;
  font-weight: 650;
}

.archive-draft-label {
  color: var(--muted);
  font-weight: 600;
}

.archive-draft-reason {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.archive-draft-label.is-discarded {
  color: #9a4f18;
  font-weight: 800;
}

.archive-recording {
  color: var(--accent);
  font-weight: 600;
}

.danger-action {
  color: #9f2b24;
}

#endConcertDialog {
  width: min(620px, calc(100vw - 24px));
}

#endConcertDialog form {
  display: grid;
  gap: 18px;
  padding: 24px;
}

#endConcertDialog h2 {
  margin: 0;
  font-size: clamp(20px, 3vw, 28px);
}

#endConcertDialog menu {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

#endConcertDialog button {
  min-height: 48px;
  padding: 10px 14px;
  white-space: normal;
  line-height: 1.15;
}

@media (min-width: 620px) {
  #endConcertDialog menu {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.location-proof-dialog {
  width: min(480px, calc(100vw - 28px));
}

.settings-access-button {
  width: 44px;
  min-width: 44px;
  min-height: 34px;
  padding-inline: 0;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(190, 205, 216, 0.78) !important;
  font-size: 34px;
  line-height: 1;
}

.settings-access-button:hover,
.settings-access-button:focus-visible {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: rgba(210, 224, 232, 0.88) !important;
}

.app-settings-dialog {
  width: min(760px, calc(100vw - 28px));
  overflow: visible;
}

.app-settings-dialog form {
  display: grid;
  gap: 16px;
  overflow: visible;
}

.app-settings-dialog h2 {
  margin: 0 38px 0 0;
}

.settings-category-list {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 34px;
  padding: 0;
  border-bottom: 1px solid rgba(122, 158, 183, 0.14);
}

.settings-category-list button {
  min-height: 30px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.015em;
  text-align: left;
  box-shadow: none;
}

.settings-category-list button:hover,
.settings-category-list button:focus-visible,
.settings-category-list button.is-active {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.settings-category-list button.is-active {
  font-weight: 760;
}

.settings-section {
  display: grid;
  gap: 12px;
  padding-top: 6px;
  overflow: visible;
}

.settings-section h3 {
  margin: 0;
  color: rgba(196, 214, 226, 0.86);
  font-size: 13px;
  font-weight: 790;
  letter-spacing: 0.05em;
}

.settings-back-button {
  justify-self: start;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

.settings-back-button:hover,
.settings-back-button:focus-visible {
  background: transparent;
  color: var(--ink);
}

.app-settings-dialog .checkbox-label {
  align-items: center;
  flex-direction: row;
  gap: 9px;
  min-height: 38px;
  padding: 8px 0;
}

.app-settings-dialog .checkbox-label input {
  width: auto;
  min-width: 16px;
}

.app-settings-dialog select {
  -webkit-appearance: none;
  appearance: none;
  min-height: 38px;
  border-radius: 12px;
  padding-right: 34px !important;
  border: 1px solid rgba(122, 158, 183, 0.16) !important;
  background:
    linear-gradient(45deg, transparent 50%, rgba(196, 214, 226, 0.72) 50%) calc(100% - 18px) 52% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(196, 214, 226, 0.72) 50%, transparent 50%) calc(100% - 13px) 52% / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.075) !important;
  color: rgba(210, 224, 232, 0.88) !important;
  box-shadow: none !important;
}

.app-settings-dialog select:focus {
  border-color: rgba(122, 158, 183, 0.26) !important;
  background:
    linear-gradient(45deg, transparent 50%, rgba(122, 199, 167, 0.88) 50%) calc(100% - 18px) 52% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(122, 199, 167, 0.88) 50%, transparent 50%) calc(100% - 13px) 52% / 6px 6px no-repeat,
    rgba(255, 255, 255, 0.105) !important;
  outline: 2px solid rgba(122, 199, 167, 0.16) !important;
}

.app-settings-dialog select option {
  background: #12212e;
  color: rgba(232, 241, 246, 0.94);
}

.settings-dropdown {
  position: relative;
  width: 100%;
}

.settings-dropdown > button {
  width: 100%;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(122, 158, 183, 0.16);
  border-radius: var(--radius-list);
  background: rgba(255, 255, 255, 0.075);
  color: rgba(210, 224, 232, 0.88);
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

.settings-dropdown > button::after {
  content: "⌄";
  color: var(--muted);
  font-size: 13px;
}

.settings-dropdown.is-open > button,
.settings-dropdown > button:focus-visible {
  border-color: rgba(122, 158, 183, 0.26);
  background: rgba(255, 255, 255, 0.105);
}

.settings-dropdown-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 30;
  width: max(100%, 240px);
  min-width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-list);
  background: var(--panel);
  box-shadow: var(--glass-shadow);
  display: none;
  gap: 5px;
}

.settings-dropdown.is-open .settings-dropdown-panel {
  display: grid;
}

.settings-dropdown-panel button {
  width: 100%;
  justify-content: flex-start;
  min-height: 30px;
  padding: 0 9px;
  border-color: transparent;
  background: transparent;
  color: rgba(210, 224, 232, 0.82);
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
}

.settings-dropdown-panel button:hover,
.settings-dropdown-panel button:focus-visible,
.settings-dropdown-panel button.is-selected {
  border-color: rgba(122, 158, 183, 0.20);
  background: rgba(255, 255, 255, 0.055);
  color: rgba(232, 241, 246, 0.94);
}

:root[data-theme="dark"] .archive-warning {
  color: #ff8a7a;
}

.archive-audio-dialog {
  width: min(720px, calc(100vw - 28px));
}

.archive-audio-dialog form {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--panel) 88%, var(--soft)), color-mix(in srgb, var(--panel) 78%, var(--soft)));
}

.archive-audio-dialog h2 {
  margin-bottom: 0;
}

.archive-audio-event-info {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.archive-audio-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

.archive-audio-marker-list {
  display: grid;
  gap: 2px;
  max-height: 38vh;
  overflow: auto;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, var(--soft) 82%, transparent);
}

.archive-audio-marker {
  min-height: 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 34px;
  align-items: center;
  gap: 10px;
  text-align: left;
  width: 100%;
  padding: 3px 2px 3px 8px;
  border-radius: 10px;
}

.archive-audio-marker:hover,
.archive-audio-marker:focus-within {
  background: color-mix(in srgb, var(--glass-soft) 70%, transparent);
}

.archive-audio-marker-play {
  min-height: 26px;
  width: 30px;
  padding: 0;
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  text-align: center;
}

.archive-audio-marker strong {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-audio-marker time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.archive-audio-marker-text {
  min-width: 0;
}

.archive-audio-marker-text label {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.archive-audio-marker-text label span {
  color: var(--muted);
  font-size: 12px;
}

.archive-audio-marker-text input {
  min-height: 28px;
  width: 100%;
  padding: 3px 8px;
  border-radius: 9px;
  font-size: 13px;
}

.compact-event-dialog .form-grid {
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 7px 8px;
}

.compact-event-dialog label {
  gap: 3px;
  font-size: 11px;
}

.compact-event-dialog label input,
.compact-event-dialog label select,
.compact-event-dialog label textarea {
  min-height: 31px;
  padding: 5px 7px;
  font-size: 13px;
}

.compact-event-dialog label textarea {
  min-height: 64px;
}

.download-area {
  margin: 10px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--soft);
}

.export-actions {
  margin-bottom: 18px;
}

.download-link {
  color: var(--accent);
  font-weight: 700;
}

.compact-dialog {
  width: min(460px, calc(100vw - 28px));
  line-height: 1.45;
}

.compact-dialog form {
  position: relative;
}

.dialog-corner-close {
  position: absolute;
  top: 4px;
  right: 4px;
}

.played-history-list {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.played-history-list li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto 20px;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 6px 0;
  border: 0;
  border-bottom: 1px solid rgba(122, 158, 183, 0.14);
  border-radius: 0;
  background: transparent;
}

.played-history-list li:last-child {
  border-bottom: 0;
}

.played-history-list span {
  color: var(--accent);
  font-weight: 800;
}

.played-history-number {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.played-history-title-edit {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  text-align: left;
}

.played-history-title-edit:hover,
.played-history-title-edit:focus-visible {
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

.played-history-title-input {
  min-width: 0;
  width: 100%;
  padding: 5px 7px;
}

.played-history-delete {
  width: 20px;
  min-width: 20px;
  min-height: 20px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: rgba(255, 111, 111, 0.82);
  background: transparent;
  font-size: 17px;
  line-height: 1;
  box-shadow: none;
}

.played-history-delete:hover,
.played-history-delete:focus-visible {
  border-color: transparent;
  color: #ff8a8a;
  background: transparent;
  box-shadow: none;
}

.played-history-list strong {
  min-width: 0;
  font-size: 13px;
  font-weight: 760;
  overflow-wrap: anywhere;
}

.played-history-list small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.export-filename-label {
  display: block;
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.export-filename-input {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
}

.dialog-warning {
  margin-top: 12px;
  padding: 10px;
  border: 1px solid #e2a39c;
  border-radius: var(--radius-panel);
  background: #fff3f1;
  color: #7a1c16;
}

:root[data-theme="dark"] .dialog-warning {
  border-color: #7d3a34;
  background: #351f1d;
  color: #ffb1a8;
}

.dialog-warning p {
  margin: 6px 0 10px;
  line-height: 1.5;
}

.dialog-warning small {
  display: inline-block;
  margin: 0 5px 5px 0;
  padding: 2px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
}

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

.gema-readonly-panel {
  margin: 8px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--glass-field);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(1.28);
}

.event-summary-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.event-summary-list div {
  padding: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.event-summary-list div:hover,
.event-summary-list div:focus {
  background: var(--glass-soft);
  outline: none;
}

.event-summary-list span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 0;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  background: var(--glass-soft);
}

.event-summary-list strong {
  display: block;
  padding: 7px 8px;
  font-size: 15px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.event-summary-list strong.is-empty {
  color: #b42318;
  font-weight: 500;
}

.gema-readonly-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.standalone-close-button {
  position: static;
  flex: 0 0 auto;
}

.gema-event-compact-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(170px, 0.8fr);
  gap: 10px 18px;
  align-items: start;
}

.gema-event-main h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.05;
}

.gema-event-main p {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}

.gema-event-main small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.gema-event-facts {
  display: grid;
  gap: 5px;
  justify-items: start;
  color: var(--muted);
  font-size: 12px;
}

.gema-event-facts strong {
  color: var(--ink);
}

.gema-event-status {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: baseline;
  padding-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.gema-event-status strong {
  font-size: 12px;
  font-weight: 760;
}

.gema-event-status.is-complete strong {
  color: var(--accent);
}

.gema-event-status.is-incomplete strong,
.gema-event-status.is-incomplete span {
  color: #caa864;
}

.gema-event-notes-link {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  box-shadow: none;
}

.gema-event-notes-link:hover,
.gema-event-notes-link:focus-visible {
  color: var(--accent);
  background: transparent;
}

.gema-view > .panel-header {
  align-items: start;
}

.gema-view > select[hidden] {
  display: none !important;
}

.gema-view .gema-readonly-panel {
  margin: 10px 0 14px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.gema-view .event-summary-list {
  display: block;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

.gema-view .event-summary-list div {
  padding: 0;
  border: 0;
  background: transparent;
}

.gema-view .event-summary-list div:hover,
.gema-view .event-summary-list div:focus {
  background: transparent;
}

.gema-view .event-summary-list span,
.gema-view .event-summary-list strong {
  display: initial;
  padding: 0;
  border: 0;
  background: transparent;
}

.gema-verification-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(122, 158, 183, 0.16);
  cursor: default;
}

.gema-verification-summary div {
  display: grid;
  gap: 3px;
  min-width: 0;
  cursor: default;
}

.gema-verification-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gema-verification-summary strong {
  color: rgba(196, 214, 226, 0.82);
  font-size: 12px;
  font-weight: 720;
}

.gema-verification-summary strong.is-confirmed {
  color: rgba(122, 199, 167, 0.92);
}

.gema-verification-summary strong.is-missing {
  color: rgba(217, 184, 79, 0.92);
}

.gema-location-save-btn {
  flex: 0 0 auto;
  min-height: 32px;
  padding-inline: 12px;
}

.gema-view .gema-event-compact-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 16px 0 12px;
  border-top: 1px solid color-mix(in srgb, var(--line) 56%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.gema-view .gema-event-main h3 {
  margin: 0;
  max-width: 860px;
  font-size: clamp(26px, 3vw, 44px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.96;
}

.gema-view .gema-event-main p {
  margin: 6px 0 0;
  color: color-mix(in srgb, var(--ink) 84%, var(--muted));
  font-size: clamp(18px, 1.7vw, 25px);
  font-weight: 650;
}

.gema-view .gema-event-main small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.gema-view .gema-event-date-line {
  display: block;
  margin-top: 9px;
  color: color-mix(in srgb, var(--ink) 88%, var(--accent));
  font-size: clamp(18px, 1.75vw, 24px);
  font-weight: 780;
  letter-spacing: -0.015em;
}

.gema-view .gema-event-time-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.gema-view .gema-event-time-line {
  display: block;
  margin-top: 0;
  margin-left: 0;
  color: color-mix(in srgb, var(--muted) 86%, var(--ink));
  font-size: 13px;
  font-weight: 560;
}

.gema-view .gema-event-facts {
  display: grid;
  justify-items: start;
  gap: 3px;
  min-width: 0;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  color: var(--muted);
}

.gema-view .gema-event-facts span {
  font-size: inherit;
  line-height: 1.22;
}

.gema-view .gema-event-facts strong {
  font-weight: 780;
}

.gema-view .gema-event-status {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 0;
  font-size: 12px;
}

.gema-view .gema-event-status strong {
  font-weight: 780;
}

.gema-view .gema-event-status.is-complete strong {
  color: var(--accent);
}

.gema-view .gema-event-status.is-incomplete strong,
.gema-view .gema-event-status.is-incomplete span {
  color: #caa864;
}

.gema-view .gema-event-notes-link {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.gema-view .gema-event-notes-preview {
  max-width: 760px;
  margin: -2px 0 0;
  color: #b46a5b;
  font-size: 13px;
  line-height: 1.35;
  cursor: pointer;
}

.gema-view .gema-readonly-actions {
  margin-top: 9px;
}

.gema-view #editGemaEventBtn {
  min-width: 0;
}

.gema-view #exportGemaBtn {
  border-color: rgba(202, 168, 100, 0.56);
  background: linear-gradient(180deg, rgba(202, 168, 100, 0.26), rgba(202, 168, 100, 0.13));
  color: var(--ink);
}

.gema-view #exportGemaBtn:hover,
.gema-view #exportGemaBtn:focus-visible {
  border-color: rgba(202, 168, 100, 0.72);
  background: linear-gradient(180deg, rgba(202, 168, 100, 0.34), rgba(202, 168, 100, 0.17));
}

#gemaPreview tr[draggable="true"] {
  cursor: grab;
}

#gemaPreview tr[draggable="true"]:active {
  cursor: grabbing;
}

#gemaPreview .table-input[readonly] {
  cursor: default;
}

#gemaPreview .table-input.is-editing {
  cursor: text;
}

.gema-setlist-context-menu {
  min-width: 230px;
}

.gema-setlist-work-dialog {
  width: min(420px, calc(100vw - 28px));
}

.gema-event-notes-dialog {
  width: min(520px, calc(100vw - 28px));
}

.gema-event-notes-dialog textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.45;
}

.event-summary div {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass-field);
  padding: 8px;
}

.event-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 2px;
}

.event-summary strong {
  display: block;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.gema-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.import-panel,
.import-dialog {
  margin-bottom: 12px;
}

.import-dialog {
  width: min(560px, calc(100vw - 28px));
}

.import-dialog textarea {
  min-height: 160px;
  font-size: 13px;
  line-height: 1.45;
}

.import-dialog .toolbar {
  gap: 6px;
}

.import-dialog button,
.import-dialog .file-button {
  font-size: 13px;
}

dialog {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100dvh - 8vh);
  margin: 4vh auto auto;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sheet);
  background: var(--panel);
  box-shadow: var(--glass-shadow);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

dialog::backdrop {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

.compact-dialog,
.wide-dialog,
.profile-onboarding-dialog,
.venue-setup-dialog,
.access-dialog,
.import-dialog,
.archive-audio-dialog {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background-color: rgba(8, 22, 33, 0.985);
}

.dialog-auto-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
}

#workDialog {
  width: min(640px, calc(100vw - 22px));
}

#workDialog .dialog-grid {
  grid-template-columns: 1fr;
  gap: 0;
}

#workDialog .work-field-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
}

#workDialog label {
  gap: 6px;
  font-size: 11px;
}

#workDialog label input,
#workDialog label textarea {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 13px;
}

#workDialog textarea {
  min-height: 48px;
}

#workDialog .work-info-summary {
  display: block;
  margin: 0 0 14px;
}

#workDialog .work-info-title {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 860;
  line-height: 1.12;
}

#workDialog .work-info-line {
  display: block;
  margin: 0 0 6px;
  color: rgba(167, 185, 199, 0.88);
  font-size: 15px;
  font-weight: 780;
  line-height: 1.25;
}

#workDialog .work-info-notes {
  display: block;
  margin: 2px 0 0;
  color: rgba(167, 185, 199, 0.82);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

#workDialog.is-info-mode .work-info-list {
  display: none;
}

#workDialog.is-editing .work-info-summary {
  display: none;
}

#workDialog .work-info-stats {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(122, 158, 183, 0.12);
}

#workDialog .work-info-stats h3 {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

#workDialog .work-info-stats div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#workDialog .work-info-stats span {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

#workDialog .work-info-stats strong,
#workDialog .work-info-stats small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workDialog .work-info-stats strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

#workDialog .work-info-stats small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

#workDialog.is-editing .work-info-list {
  border-top: 0;
  gap: 12px;
}

#workDialog.is-editing .work-info-list label {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-height: 0;
  padding: 0;
  border-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

#workDialog.is-editing .work-field-stack {
  gap: 12px;
}

#workDialog .work-dialog-collections-summary {
  margin: 14px 0 0;
  padding: 12px 0 0;
  border: 0;
  border-top: 1px solid rgba(122, 158, 183, 0.12);
  border-radius: 0;
  background: transparent;
}

#workDialog .work-dialog-collections-summary h3 {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

#workDialog .work-dialog-collections-summary p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

#workDialog .backing-track-section {
  margin: 8px 0;
}

#workDialog .backing-track-section h3 {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
}

#workDialog .backing-track-fieldset {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--glass-field);
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(260px, 1fr);
  align-items: center;
  gap: 10px;
}

#workDialog .compact-notes-field textarea {
  min-height: 46px;
  resize: vertical;
}

#workDialog .compact-file-field input[type="file"] {
  min-height: 30px;
  padding: 4px 7px;
  font-size: 12px;
}

#workDialog .file-reference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding-bottom: 1px;
}

#workDialog .file-reference-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workDialog .file-reference-row button {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

#concertFinishActions {
  display: none !important;
}

#workDialog menu {
  margin-top: 8px;
}

.wide-dialog {
  width: min(980px, calc(100vw - 28px));
}

.pdf-viewer-dialog {
  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  overflow: hidden;
}

.pdf-viewer-shell {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  grid-template-areas:
    "bar"
    "track"
    "stage";
  gap: 0;
  padding: 0;
  background: #101820;
}

.backing-track-fieldset {
  margin-top: 10px;
}

.file-reference-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
}

.backing-track-panel {
  grid-area: track;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--field);
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.media-label,
.pdf-section-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.backing-track-panel strong {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.backing-track-controls {
  display: flex;
  gap: 6px;
}

.backing-track-controls button,
.live-audio-button {
  font-size: 11px;
}

.pdf-section-label {
  grid-area: label;
  padding: 0 2px;
}

.pdf-viewer-bar {
  grid-area: bar;
  position: relative;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 2px 6px 2px 8px;
  border: 0;
  border-bottom: 1px solid rgba(122, 158, 183, 0.18);
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(7, 19, 29, 0.98), rgba(5, 14, 23, 0.99)),
    var(--panel);
}

.pdf-live-tracker {
  grid-column: 1;
  min-width: 0;
  position: relative;
}

.pdf-live-tracker .live-progress-tracker {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px;
  min-height: 72px;
  padding: 3px 5px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pdf-live-tracker .live-progress-piece-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}

.pdf-live-tracker .live-progress-piece-heading .live-progress-status {
  display: none !important;
}

.pdf-live-tracker .live-progress-piece-heading .live-progress-status strong {
  font-size: 11px !important;
}

.pdf-live-tracker .live-progress-piece-heading .status-light {
  width: 9px;
  height: 9px;
}

.pdf-live-tracker .live-progress-main {
  grid-column: 1;
  gap: 8px;
  padding-top: 0;
}

.pdf-live-tracker .live-progress-ring {
  width: 40px;
  height: 40px;
}

.pdf-live-tracker .live-progress-ring::after {
  inset: 4px;
}

.pdf-live-tracker .live-progress-ring span {
  display: none;
}

.pdf-live-tracker .live-progress-ring small,
.pdf-live-tracker .live-progress-ring em,
.pdf-live-tracker .live-progress-piece > span,
.pdf-live-tracker .live-progress-piece small {
  display: none;
}

.pdf-live-tracker .live-progress-piece > strong {
  font-size: 12px;
  line-height: 1.1;
}

.pdf-live-tracker .live-progress-meta {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-content: stretch;
  gap: 6px;
  margin-top: 2px;
  padding: 5px 0 0;
  border-top: 1px solid rgba(122, 158, 183, 0.18);
  border-left: 0;
}

.pdf-live-tracker .live-progress-meta small {
  display: block;
  margin-bottom: 2px;
  font-size: 8px;
  letter-spacing: 0.04em;
}

.pdf-live-tracker .live-progress-meta strong {
  display: flex;
  align-items: center;
  min-width: 0;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdf-live-tracker .live-progress-meta > span,
.pdf-live-tracker .live-progress-meta > button {
  min-width: 0;
}

.pdf-viewer-bar h2 {
  display: none;
}

.pdf-title-group {
  grid-column: 1;
  min-width: 0;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) .pdf-title-group {
  display: none;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 42px;
  padding: 4px 6px 5px 4px;
  overflow: visible;
}

.pdf-viewer-status {
  margin-top: 2px;
  color: var(--accent);
  font-size: 12px;
  min-height: 15px;
}

.pdf-stage {
  grid-area: stage;
  position: relative;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  background: #101820;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
}

.pdf-stage::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.pdf-stage.is-zoomed {
  overflow: auto;
  cursor: grab;
}

.pdf-duration-notice {
  position: absolute;
  z-index: 7;
  top: 54px;
  left: 150px;
  width: min(520px, calc(100vw - 190px));
  min-height: 34px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  pointer-events: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(92, 86, 166, 0.88);
  font-size: clamp(17px, 1.8vw, 24px);
  font-weight: 860;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  text-shadow:
    0 1px 0 rgba(255, 255, 255, 0.48),
    0 0 10px rgba(92, 86, 166, 0.20);
  box-shadow: none;
  animation: pdfDurationNoticePulse 2.4s ease-in-out infinite;
}

.pdf-duration-notice[hidden] {
  display: none !important;
}

.pdf-duration-notice span {
  display: block;
  padding: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@keyframes pdfDurationNoticePulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

.pdf-viewer-shell iframe,
.pdf-viewer-shell canvas {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-sizing: border-box;
}

.pdf-viewer-shell iframe {
  overflow: hidden;
  display: block;
  background: #101820;
}

.pdf-viewer-dialog.is-library-pdf .pdf-viewer-shell {
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "stage";
}

.pdf-viewer-dialog.is-library-pdf .pdf-viewer-bar {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: block;
}

.pdf-viewer-dialog.is-library-pdf .pdf-title-group,
.pdf-viewer-dialog.is-library-pdf #pdfLiveTracker,
.pdf-viewer-dialog.is-library-pdf #pdfCollectionToggleBtn,
.pdf-viewer-dialog.is-library-pdf #pdfCollectionControl,
.pdf-viewer-dialog.is-library-pdf #pdfAddToSetlistBtn {
  display: none !important;
}

.pdf-viewer-dialog.is-library-pdf .pdf-viewer-bar > .dialog-actions {
  display: block;
}

.pdf-viewer-shell canvas {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  transform-origin: 0 0;
}

.pdf-page-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 24%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(37, 107, 90, 0.34);
  font-size: clamp(42px, 8vw, 84px);
  opacity: 0.18;
}

.pdf-page-zone:hover {
  background: rgba(37, 107, 90, 0.06);
  opacity: 0.45;
}

.pdf-page-zone:disabled {
  opacity: 0;
  cursor: default;
}

.pdf-page-zone.is-prev {
  left: 0;
  justify-content: flex-start;
  padding-left: 14px;
}

.pdf-page-zone.is-next {
  right: 0;
  justify-content: flex-end;
  padding-right: 14px;
}

.pdf-page-indicator {
  position: absolute;
  right: 12px;
  bottom: 10px;
  min-width: 28px;
  padding: 4px 7px;
  border-radius: 999px;
  background: rgba(20, 24, 21, 0.58);
  color: #fff;
  font-size: 12px;
  text-align: center;
  pointer-events: none;
}

.pdf-zoom-toggle {
  position: absolute;
  z-index: 3;
  left: 12px;
  bottom: 10px;
  min-width: 54px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(20, 24, 21, 0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  box-shadow: none;
}

.pdf-zoom-toggle:hover,
.pdf-zoom-toggle:focus-visible {
  background: rgba(37, 107, 90, 0.82);
}

.pdf-render-mode {
  position: absolute;
  z-index: 3;
  left: 76px;
  bottom: 10px;
  min-height: 28px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(20, 24, 21, 0.58);
  color: rgba(255, 255, 255, 0.72);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  pointer-events: none;
}

.dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.pdf-viewer-bar > .dialog-actions {
  grid-column: 2;
  align-self: center;
  flex-wrap: nowrap;
  margin-left: 0;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) > .dialog-actions {
  width: auto;
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 12px;
  padding-right: 4px;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) > .dialog-actions > form {
  grid-column: 2;
  justify-self: end;
}

.pdf-viewer-bar #pdfAddToSetlistBtn {
  white-space: nowrap;
}

.pdf-live-tracker .pdf-progress-summary {
  display: grid;
  grid-template-columns: 128px minmax(104px, 0.42fr) max-content;
  grid-template-rows: auto;
  align-items: center;
  gap: 3px;
  min-height: 22px;
  padding: 0;
  overflow: visible;
}

.pdf-live-tracker .pdf-progress-summary .live-progress-ring {
  width: 124px !important;
  height: 124px !important;
  margin: 0 0 -90px;
  transform: translate(5px, 0);
  z-index: 4;
  border: 1px solid rgba(128, 178, 205, 0.42);
  background:
    radial-gradient(circle at 48% 42%, rgba(22, 58, 78, 0.96), rgba(7, 20, 31, 0.99) 68%),
    rgba(22, 58, 78, 1);
  box-shadow:
    0 0 0 2px rgba(3, 12, 18, 0.86),
    0 0 7px rgba(83, 231, 110, 0.18),
    0 0 13px rgba(83, 231, 110, 0.13),
    0 12px 28px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(214, 241, 255, 0.08),
    inset 0 0 18px rgba(5, 14, 22, 0.52);
}

.pdf-live-tracker .pdf-progress-summary .live-progress-ring::before {
  inset: -3px;
  background:
    conic-gradient(
      from -90deg,
      var(--ring-color) calc(var(--progress) * 1turn),
      transparent 0
    );
  filter: blur(3px);
  opacity: 0.86;
  -webkit-mask: radial-gradient(circle, transparent 57%, #000 62%, #000 67%, transparent 71%);
  mask: radial-gradient(circle, transparent 57%, #000 62%, #000 67%, transparent 71%);
  z-index: 0;
}

.pdf-live-tracker .pdf-progress-summary .live-progress-ring::after {
  inset: 10px;
  border: 0.5px solid rgba(128, 178, 205, 0.24);
  background:
    radial-gradient(circle at 48% 40%, rgba(25, 55, 72, 0.96), rgba(8, 22, 33, 0.98) 70%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.36),
    inset 0 0 20px rgba(0, 0, 0, 0.42);
}

.pdf-live-tracker .pdf-progress-summary.is-over-target-duration .live-progress-ring,
.pdf-live-tracker .pdf-progress-summary.is-duration-caution .live-progress-ring {
  background:
    radial-gradient(circle at 48% 42%, rgba(34, 42, 86, 0.98), rgba(10, 14, 39, 0.99) 70%),
    rgba(34, 42, 86, 1);
  box-shadow:
    0 0 0 2px rgba(3, 7, 20, 0.86),
    0 0 5px rgba(71, 64, 143, 0.14),
    0 0 10px rgba(71, 64, 143, 0.10),
    0 12px 28px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(214, 221, 255, 0.08),
    inset 0 0 18px rgba(5, 8, 22, 0.52);
}

.pdf-live-tracker.is-overtime-pulse-now .pdf-progress-summary.is-over-target-duration .live-progress-ring,
.pdf-live-tracker.is-overtime-pulse-now .pdf-progress-summary.is-duration-caution .live-progress-ring {
  animation: pdfTimerOvertimePulseBurst 1.8s ease-in-out 1;
}

@keyframes pdfTimerOvertimePulseBurst {
  0%, 24%, 48%, 72%, 100% {
    background:
      radial-gradient(circle at 48% 42%, rgba(34, 42, 86, 0.98), rgba(10, 14, 39, 0.99) 70%),
      rgba(34, 42, 86, 1);
    box-shadow:
      0 0 0 2px rgba(3, 7, 20, 0.86),
      0 0 5px rgba(71, 64, 143, 0.14),
      0 0 10px rgba(71, 64, 143, 0.10),
      0 12px 28px rgba(0, 0, 0, 0.36),
      inset 0 0 0 1px rgba(214, 221, 255, 0.08),
      inset 0 0 18px rgba(5, 8, 22, 0.52);
  }
  12%, 36%, 60% {
    background:
      radial-gradient(circle at 48% 42%, rgba(219, 222, 255, 0.98), rgba(75, 68, 154, 0.99) 56%, rgba(16, 13, 54, 0.99) 74%),
      rgba(75, 68, 154, 1);
    box-shadow:
      0 0 0 2px rgba(16, 13, 54, 0.90),
      0 0 12px rgba(208, 212, 255, 0.42),
      0 0 24px rgba(102, 88, 199, 0.30),
      0 12px 28px rgba(0, 0, 0, 0.36),
      inset 0 0 0 1px rgba(239, 241, 255, 0.18),
      inset 0 0 22px rgba(208, 212, 255, 0.20);
  }
}

.pdf-live-tracker .pdf-progress-summary .live-progress-ring span {
  display: block !important;
  align-self: center;
  margin-top: -8px;
  color: var(--ink);
  font-size: clamp(30px, 3.1vw, 44px);
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.34);
}

.pdf-live-tracker .pdf-progress-summary .live-progress-ring small {
  display: block !important;
  align-self: center;
  margin-top: 38px;
  color: rgba(167, 185, 199, 0.68);
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
}

.pdf-progress-played {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8fd9ad;
  box-shadow: none;
}

.pdf-progress-played small {
  color: rgba(167, 185, 199, 0.70);
  font-size: 9px;
  font-weight: 840;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  writing-mode: horizontal-tb;
  transform: none;
}

.pdf-progress-played strong {
  color: #8fd9ad;
  font-size: clamp(40px, 4.6vw, 62px);
  font-weight: 900;
  line-height: 0.92;
  text-shadow: 0 0 12px rgba(143, 217, 173, 0.18);
}

.pdf-progress-info {
  min-width: 0;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding-left: 3px;
  border-left: 1px solid rgba(122, 158, 183, 0.22);
  color: var(--ink);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.pdf-progress-info span {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pdf-progress-info small {
  color: rgba(167, 185, 199, 0.70);
  font-size: 10px;
  font-weight: 840;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pdf-progress-info strong {
  overflow: hidden;
  color: #c6d8e4;
  font-size: clamp(14px, 1.25vw, 18px);
  font-weight: 880;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-collection-control {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  min-height: 30px;
  padding: 3px 4px 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-list);
  background: var(--glass-field);
}

.pdf-collection-control span {
  white-space: nowrap;
}

#pdfCollectionToggleBtn.is-active {
  border-color: var(--line);
  color: var(--ink);
  background: var(--selected);
}

#pdfAddToCollectionBtn {
  min-height: 28px;
  padding: 0 7px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

#pdfAddToCollectionBtn::before {
  display: none;
}

#pdfAddToCollectionBtn:hover {
  border-color: transparent;
  background: var(--soft);
  box-shadow: none;
}

.pdf-collection-control select {
  width: 132px;
  min-height: 28px;
  padding: 3px 7px;
}

.mini-close-button,
.dialog-close-button {
  width: 32px;
  min-height: 32px;
  padding: 0;
  border-color: var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.mini-close-button:hover,
.dialog-close-button:hover {
  border-color: var(--line);
  background: var(--soft);
  color: var(--ink);
}

#pdfAddToSetlistBtn {
  position: static;
  left: auto;
  transform: none;
  min-height: 38px;
  min-width: 260px;
  max-width: min(430px, 42vw);
  padding: 7px 14px;
  font-size: 14px;
  z-index: 2;
  text-transform: none;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) #pdfAddToSetlistBtn {
  grid-column: 1;
  justify-self: center;
  transform: translateX(-16px);
  border: 1.5px solid rgba(126, 196, 190, 0.42);
  border-radius: var(--radius-list);
  background:
    linear-gradient(180deg, rgba(20, 46, 58, 0.92), rgba(9, 25, 36, 0.92)),
    rgba(255, 255, 255, 0.055);
  color: var(--ink);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.38),
    0 8px 18px rgba(0, 0, 0, 0.20);
  font-weight: 760;
  letter-spacing: 0;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) #pdfAddToSetlistBtn > span {
  display: grid;
  min-width: 0;
  text-align: left;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) #pdfAddToSetlistBtn strong {
  min-width: 0;
  overflow: hidden;
  color: var(--accent);
  font-size: 14px;
  font-weight: 820;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) #pdfAddToSetlistBtn small {
  min-width: 0;
  overflow: hidden;
  color: rgba(167, 185, 199, 0.70);
  font-size: 9px;
  font-weight: 820;
  letter-spacing: 0.075em;
  line-height: 1.05;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) #pdfAddToSetlistBtn.is-current {
  border-color: rgba(143, 217, 173, 0.72);
  background:
    linear-gradient(90deg, rgba(143, 217, 173, 0.24), rgba(20, 46, 58, 0.88)),
    rgba(9, 25, 36, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    inset 0 -1px 0 rgba(0, 0, 0, 0.36),
    0 8px 18px rgba(0, 0, 0, 0.20),
    0 0 14px rgba(143, 217, 173, 0.16);
}

.pdf-viewer-bar:has(.pdf-live-tracker:not([hidden])) #pdfAddToSetlistBtn.is-current::after {
  content: "";
  width: 10px;
  height: 10px;
  margin-left: 2px;
  border-radius: 50%;
  background: #39ff14;
  box-shadow: 0 0 7px rgba(57, 255, 20, 0.92), 0 0 16px rgba(57, 255, 20, 0.54);
  flex: 0 0 auto;
}

dialog::backdrop {
  background: rgba(20, 24, 21, 0.32);
}

fieldset {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--glass-field);
  margin: 12px 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

fieldset label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

fieldset input {
  width: auto;
}

.dialog-options {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.dialog-options button {
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
}

.dialog-options button.is-active {
  border-color: var(--line);
  background: var(--selected);
  box-shadow: none;
}

.dialog-options button small {
  color: var(--muted);
  white-space: normal;
}

menu {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0;
  margin: 12px 0 0;
}

#deleteWorkBtn {
  color: #9f2b24;
}

@media (max-width: 860px) {
  .pause-playback-panel {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .live-panel.is-pause-player-open .pause-playback-panel {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .pause-player-playlist {
    grid-column: 2;
  }

  .pause-playback-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .live-panel.is-pause-player-open .pause-playback-actions {
    grid-column: 1 / -1;
  }

  .topbar {
    align-items: center;
    flex-direction: row;
    padding: 5px 8px;
    gap: 8px;
  }

  .tabs {
    width: 100%;
  }

  .tab {
    flex: 1;
    min-width: 0;
    padding-inline: 6px;
  }

  #workDialog,
  #eventSetupDialog {
    max-height: calc(100dvh - 18px);
    margin-top: 9px;
  }

  #eventSetupDialog {
    width: calc(100vw - 18px);
  }

  .concert-grid,
  .gema-layout {
    grid-template-columns: 1fr;
  }

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

  #workDialog .dialog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

  .event-summary-list {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .view {
    padding: 6px;
  }

  #archiveView {
    min-height: calc(100vh - 156px);
  }

  #concertView.is-active,
  #concertGrid,
  .live-panel {
    height: calc(100vh - 50px);
    min-height: 0;
  }

  #concertGrid,
  .live-panel {
    height: 100%;
  }

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

  .live-browser {
    grid-template-columns: minmax(230px, var(--live-collection-width, 230px)) 4px minmax(0, 1fr);
    column-gap: 4px;
    row-gap: 8px;
  }

  .live-work-row {
    grid-template-columns: minmax(0, 1fr) 52px 52px;
    column-gap: 8px;
    row-gap: 0;
  }

  .live-progress-tracker.is-large {
    grid-template-columns: minmax(0, 1.76fr) minmax(200px, 0.62fr);
    gap: 7px;
  }

  .live-progress-tracker.is-large .live-progress-status {
    left: 9px;
    top: 6px;
  }

  .live-progress-tracker.is-large .live-progress-main {
    grid-column: 1;
    gap: 7px;
  }

  .live-progress-tracker.is-large .live-progress-ring {
    width: 82px;
    height: 82px;
  }

  .live-progress-tracker.is-large .live-progress-ring span {
    font-size: 22px;
  }

  .live-progress-tracker.is-large .live-progress-piece > strong {
    font-size: 17px;
  }

  .live-progress-tracker.is-large .live-progress-meta {
    grid-column: 2;
    grid-template-columns: minmax(0, 1fr) minmax(76px, auto);
    grid-template-rows: minmax(44px, auto) minmax(72px, 1fr);
    justify-content: stretch;
    justify-items: stretch;
    gap: 0;
    padding-left: 8px;
    border-left: 1px solid rgba(122, 158, 183, 0.22);
  }

  .live-pdf-button {
    width: 52px;
  }

  .live-audio-button {
    padding: 0;
  }

  .setlist li,
  .archive-item {
    padding: 7px;
  }

  .setlist li {
    grid-template-columns: 24px minmax(0, 1fr) 26px;
  }

  .setlist li > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 2px;
  }

  .setlist .duration-button {
    margin-top: 0;
    white-space: nowrap;
    justify-self: start;
  }

  .setlist .unknown-complete-button {
    grid-column: 2 / -1;
    justify-self: start;
    margin-top: 3px;
  }

  .setlist-number {
    width: 24px;
    min-height: 24px;
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  #concertView.is-active,
  #concertGrid,
  .live-panel {
    height: auto;
    min-height: calc(100dvh - 54px);
  }

  .live-overview-row {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
    margin: 2px 0 6px;
  }

  .live-tracker-shell {
    min-height: 116px;
  }

  .concert-status {
    min-height: 116px;
  }

  .live-progress-tracker.is-large {
    min-height: 116px;
    padding: 7px;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .live-progress-tracker.is-large .live-progress-main {
    grid-column: 1;
    gap: 8px;
    padding-top: 0;
  }

  .live-progress-tracker.is-large .live-progress-ring {
    width: 70px;
    height: 70px;
  }

  .live-progress-tracker.is-large .live-progress-ring span {
    font-size: 20px;
  }

  .live-progress-tracker.is-large .live-progress-ring small {
    font-size: 10px;
  }

  .live-progress-tracker.is-large .live-progress-piece > strong {
    font-size: 16px;
  }

  .live-progress-tracker.is-large .live-progress-meta {
    grid-column: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    align-items: center;
    justify-content: start;
    justify-items: start;
    gap: 8px;
    padding: 3px 0 0 78px;
    border-left: 0;
    border-top: 1px solid rgba(122, 158, 183, 0.14);
  }

  .live-progress-tracker.is-large .live-progress-meta .live-meta-card {
    min-height: 26px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .live-progress-tracker.is-large .live-progress-meta small {
    font-size: 8px;
    letter-spacing: 0.055em;
  }

  .live-progress-tracker.is-large .live-progress-meta strong,
  .live-progress-tracker.is-large .live-recording-meta strong {
    font-size: 12px;
  }

  .live-progress-tracker.is-large .live-played-count {
    font-size: 18px !important;
  }

  .live-control-column {
    min-width: 0;
  }

  .live-toolbar {
    min-height: 72px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  .live-toolbar button {
    min-height: 34px;
    padding: 5px 6px;
    font-size: 12px;
  }

  .live-browser {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .live-browser > .live-collections-header,
  .live-browser > .live-collections-header + .live-column,
  .live-browser > .live-column:last-child {
    grid-column: 1;
  }

  .live-collections-header {
    min-height: 40px;
    padding: 6px 8px;
    border-radius: 14px;
  }

  .live-collections-header h3 {
    font-size: 11px;
  }

  .live-collections-header .live-column-toggle {
    width: auto;
    min-width: 108px;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
  }

  .live-column-resizer {
    display: none;
  }

  .live-browser > .live-collections-header + .live-column {
    position: absolute;
    z-index: 20;
    top: 44px;
    right: 0;
    left: 0;
    max-height: min(54dvh, 360px);
    overflow: hidden;
    border: 1px solid rgba(122, 158, 183, 0.24);
    border-radius: 16px;
    background: rgba(8, 22, 33, 0.98);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
  }

  .live-browser.is-collapsed .live-collections-header + .live-column {
    display: none;
  }

  .live-browser.is-collapsed > .live-collections-header {
    grid-column: 1;
  }

  .live-browser.is-collapsed > .live-column:last-child {
    grid-column: 1;
  }

  .live-collapsed-collection-context {
    min-height: 36px;
    margin-bottom: 6px;
    border-radius: 14px;
  }

  .live-collection-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    max-height: min(52dvh, 340px);
    padding: 6px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .live-collection-list button {
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
  }

  .live-work-column-header {
    grid-template-columns: minmax(0, 1fr);
    min-height: 28px;
    margin-bottom: 6px;
    padding: 0 2px;
  }

  .live-work-column-header h3 {
    font-size: 11px;
  }

  .live-work-row {
    grid-template-columns: minmax(0, 1fr);
    margin-bottom: 5px;
    width: 100%;
  }

  .live-work-row > button:first-child {
    width: 100%;
    min-height: 48px;
    padding: 8px 10px;
  }

  .live-work-row > button:first-child strong {
    font-size: 14px;
  }

  .live-pdf-button,
  .live-audio-button,
  .live-asset-folder-button,
  #liveAssignPdfBtn,
  #liveAssignAudioBtn {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .live-overview-row {
    grid-template-columns: 1fr;
  }

  .live-quick-panel,
  .unknown-work-options {
    top: 258px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }

  .live-toolbar {
    min-height: 96px;
  }

  #workDialog .dialog-grid {
    grid-template-columns: 1fr;
  }

  #workDialog .backing-track-fieldset {
    grid-template-columns: 1fr;
  }

  #workDialog .file-reference-row {
    grid-template-columns: 1fr;
  }

  #libraryView.is-active,
  .split,
  .live-browser {
    grid-template-columns: 1fr;
  }

  .live-column-resizer {
    display: none;
  }

  .sidebar {
    order: 2;
  }

  .live-collection-list {
    display: flex;
    max-height: none;
    overflow-x: auto;
  }

  .live-collection-list button {
    width: auto;
    min-width: 92px;
  }

  .live-progress-tracker.is-large {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .live-progress-tracker.is-large .live-progress-main {
    grid-column: 1;
  }

  .live-progress-tracker.is-large .live-progress-status {
    position: static;
  }

  .live-progress-tracker.is-large .live-progress-main {
    padding-top: 0;
  }

  .live-progress-tracker.is-large .live-progress-meta {
    grid-template-columns: repeat(2, minmax(0, auto));
    justify-content: start;
    justify-items: start;
    gap: 10px;
  }

  .compact-event-dialog .form-grid {
    grid-template-columns: 1fr;
  }

  .gema-view .form-grid {
    grid-template-columns: 1fr;
  }

  .event-summary-list {
    grid-template-columns: 1fr;
  }

  .live-browser > .live-collections-header + .live-column {
    position: absolute;
    top: 44px;
    right: 0;
    left: 0;
  }

  .live-collection-list {
    display: grid;
    grid-template-columns: 1fr;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

@media (orientation: landscape) and (max-height: 900px) and (min-width: 900px) {
  .live-overview-row {
    grid-template-columns: minmax(0, 1.85fr) minmax(300px, 0.95fr);
    align-items: stretch;
    gap: 8px;
    min-height: 154px;
  }

  .live-tracker-shell,
  .live-control-column {
    height: 154px;
    min-height: 154px;
  }

  .live-overview-row .concert-status > .live-progress-tracker {
    min-height: 154px;
    height: 100%;
    padding: 10px;
  }

  .live-overview-row .live-progress-tracker.is-large {
    grid-template-columns: minmax(0, 1.62fr) minmax(178px, 0.62fr);
    gap: 7px;
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-ring {
    width: 118px !important;
    height: 118px !important;
    transform: none;
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-ring span {
    font-size: clamp(28px, 2.8vw, 38px) !important;
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-ring small {
    margin-top: 32px;
  }

  .live-overview-row .live-progress-tracker.is-large .live-progress-piece > strong {
    font-size: clamp(18px, 2vw, 25px);
  }

  .live-progress-meta .live-played-count {
    font-size: clamp(48px, 6vw, 76px) !important;
  }
}

@media (max-width: 600px) {
  .topbar {
    gap: 5px;
    padding: 7px 7px;
    overflow: hidden;
  }

  .topbar h1 {
    flex: 0 0 auto;
    font-size: 17px;
    letter-spacing: -0.04em;
  }

  .topbar > div:first-child {
    flex: 0 0 74px;
    min-width: 74px;
    position: relative;
    z-index: 2;
  }

  .tabs {
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(100% - 79px);
    justify-content: flex-end;
    gap: 3px;
    padding: 3px;
    border-radius: 14px;
  }

  #themeToggleBtn {
    min-width: 48px;
    padding-inline: 7px;
  }

  .tabs .tab {
    display: none;
  }

  .tabs .tab.is-active {
    display: inline-flex;
    flex: 0 1 88px;
    min-width: 72px;
    justify-content: center;
    white-space: nowrap;
    padding-inline: 7px;
  }

  .access-lock-button {
    flex: 0 0 58px;
    width: 58px;
    min-width: 58px;
    max-width: 58px;
    padding-inline: 6px;
    overflow: hidden;
    text-indent: -999px;
    position: relative;
  }

  .access-lock-button::after {
    content: "👤";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-indent: 0;
    font-size: 18px;
  }

  #concertView.is-active {
    padding: 6px;
  }

  #concertView .live-overview-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    min-height: 0;
    margin: 0 0 8px;
  }

  #concertView .live-control-column {
    display: flex;
    flex-direction: column;
    height: auto;
    min-width: 0;
  }

  #concertView .live-control-column .concert-event-line {
    display: none;
  }

  #concertView .live-tracker-shell,
  #concertView .concert-status {
    min-height: 0;
  }

  #concertView .live-progress-tracker.is-large {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(92px, 0.72fr);
    grid-template-rows: auto;
    align-items: stretch;
    min-height: 126px;
    padding: 8px;
    gap: 7px;
    overflow: hidden;
  }

  #concertView .live-progress-tracker.is-large .live-progress-status {
    display: inline-flex;
    position: static !important;
    inset: auto !important;
    gap: 5px;
    margin-bottom: 4px;
    padding: 0;
    color: var(--accent);
    font-size: 11px;
    line-height: 1;
  }

  #concertView .live-progress-tracker.is-large .live-progress-status .status-light {
    width: 10px;
    height: 10px;
  }

  #concertView .live-progress-tracker.is-large .live-progress-main {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
  }

  #concertView .live-progress-tracker.is-large .live-progress-ring {
    width: 104px;
    height: 104px;
    transform: none !important;
  }

  #concertView .live-progress-tracker.is-large .live-progress-ring span {
    font-size: 28px;
  }

  #concertView .live-progress-tracker.is-large .live-progress-ring small {
    margin-top: 30px;
    font-size: 10.5px;
    letter-spacing: 0.035em;
  }

  #concertView .live-progress-tracker.is-large .live-progress-piece {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    display: grid;
    align-content: center;
    grid-template-rows: 18px auto auto;
    gap: 2px;
    overflow: hidden;
    position: relative;
  }

  #concertView .live-progress-tracker.is-large .live-progress-piece-heading {
    display: flex;
    justify-content: flex-end;
    align-self: start;
    margin: 0;
    overflow: visible;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 4;
  }

  #concertView .live-progress-tracker.is-large .live-progress-piece-heading .live-progress-status {
    position: static !important;
    inset: auto !important;
    transform: none !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--accent);
    line-height: 1;
    opacity: 0.92;
  }

  #concertView .live-progress-tracker.is-large .live-progress-piece-heading .live-progress-status .status-light {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 999px;
  }

  #concertView .live-progress-tracker.is-large .live-progress-piece-heading .live-progress-status:not(.is-paused):not(.is-ended):not(.is-idle) .status-light {
    background: #37ff24;
    box-shadow: 0 0 7px rgba(55, 255, 36, 0.95), 0 0 16px rgba(55, 255, 36, 0.55);
  }

  #concertView .live-progress-tracker.is-large .live-progress-piece-heading .live-progress-status strong {
    display: inline-block !important;
    color: inherit;
    font-size: 11px !important;
    line-height: 1 !important;
    letter-spacing: 0.06em;
  }

  #concertView .live-progress-tracker.is-large .live-progress-piece > strong {
    grid-row: 2;
    display: block;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    font-size: 16px;
    line-height: 1.12;
    text-overflow: initial;
    white-space: normal;
    max-width: 100%;
    color: var(--text);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #concertView .live-progress-tracker.is-large .live-progress-piece > strong > span {
    display: inline;
    min-width: 0;
    padding-right: 0;
    animation: none;
  }

  #concertView .live-progress-tracker.is-large .live-current-set-button {
    grid-row: 3;
    margin-top: 0;
    font-size: 10px;
  }

  #concertView .live-progress-tracker.is-large .live-current-set-button em {
    font-size: 12px;
  }

  #concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: center;
    align-items: flex-start;
    grid-template-rows: auto auto;
    padding-left: clamp(10px, 2.2vw, 32px);
  }

  #concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece-heading {
    position: static;
    justify-content: flex-start;
    align-self: center;
    width: 100%;
  }

  #concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece-heading .live-progress-status strong {
    font-size: clamp(66px, 9.2vw, 126px) !important;
    letter-spacing: 0.04em;
    line-height: 0.84 !important;
  }

  #concertView .live-progress-tracker.is-large.is-plain-pause .live-current-set-button {
    grid-row: auto;
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
  }

  #concertView .live-progress-tracker.is-large.is-plain-pause .live-current-set-button em {
    font-size: 15px;
  }

  #concertView .live-progress-tracker.is-large .live-progress-meta {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, minmax(0, auto));
    align-content: start;
    justify-content: stretch;
    gap: 4px;
    width: 100%;
    min-width: 0;
    padding: 0 0 0 7px;
    border-top: 0;
    border-left: 1px solid rgba(122, 158, 183, 0.18);
    overflow: visible;
  }

  #concertView .live-progress-tracker.is-large .live-meta-card,
  #concertView .live-progress-tracker.is-large .live-history-button.live-meta-card,
  #concertView .live-progress-tracker.is-large .live-recording-time-group.live-meta-card {
    display: grid;
    grid-column: auto;
    grid-row: auto;
    align-self: center;
    align-content: center;
    justify-items: start;
    width: auto;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: left;
  }

  #concertView .live-progress-tracker.is-large .live-recording-time-group.live-meta-card {
    justify-items: end;
    text-align: right;
    order: -1;
  }

  #concertView .live-progress-tracker.is-large .live-history-button.live-meta-card {
    justify-items: start;
    text-align: left;
  }

  #concertView .live-progress-tracker.is-large .live-meta-card small {
    margin: 0;
    font-size: 8px;
    line-height: 1;
    letter-spacing: 0.045em;
  }

  #concertView .live-progress-tracker.is-large .live-meta-card > strong,
  #concertView .live-progress-tracker.is-large .live-recording-time-group .live-recording-meta strong {
    font-size: 11px;
    line-height: 1.05;
  }

  #concertView .live-progress-tracker.is-large .live-recording-dot {
    width: 9px;
    height: 9px;
  }

  #concertView .live-progress-tracker.is-large .live-played-count {
    font-size: 61px !important;
    line-height: 0.9;
  }

  #concertView .segmented.live-toolbar,
  #concertView .live-toolbar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
    height: auto;
    gap: 7px;
    padding: 8px;
  }

  #concertView .live-toolbar button {
    min-width: 0;
    min-height: 48px;
    padding: 8px 10px;
    font-size: 15px;
    justify-content: center;
  }

  #concertView #recordingPauseBtn {
    display: none;
  }

  .live-action-dialog,
  #eventSetupDialog.compact-event-dialog {
    width: min(420px, calc(100vw - 24px));
    max-height: calc(100dvh - 28px);
    border: 1px solid rgba(139, 196, 218, 0.46);
    border-top: 2px solid rgba(125, 224, 190, 0.58);
    background:
      linear-gradient(180deg, rgba(18, 43, 59, 0.985), rgba(8, 24, 36, 0.985));
    box-shadow:
      0 22px 54px rgba(0, 0, 0, 0.56),
      0 0 0 1px rgba(255, 255, 255, 0.045) inset,
      0 0 34px rgba(93, 199, 183, 0.10);
  }

  .live-action-dialog::backdrop,
  #eventSetupDialog.compact-event-dialog::backdrop {
    background: rgba(1, 8, 14, 0.66);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }

  .live-action-dialog form,
  #eventSetupDialog.compact-event-dialog form {
    padding: 16px;
  }

  #eventSetupDialog.compact-event-dialog h2 {
    margin-right: 34px;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  #eventSetupDialog.compact-event-dialog .form-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  #eventSetupDialog.compact-event-dialog label {
    display: none;
  }

  #eventSetupDialog.compact-event-dialog label:has([name="name"]),
  #eventSetupDialog.compact-event-dialog label:has([name="venue"]),
  #eventSetupDialog.compact-event-dialog label:has([name="date"]),
  #eventSetupDialog.compact-event-dialog label:has([name="startTime"]),
  #eventSetupDialog.compact-event-dialog label:has([name="instruments"]) {
    display: grid;
  }

  #eventSetupDialog.compact-event-dialog label input,
  #eventSetupDialog.compact-event-dialog label select,
  #eventSetupDialog.compact-event-dialog label textarea {
    min-height: 40px;
    border-color: rgba(122, 158, 183, 0.28);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--ink);
    font-size: 15px;
  }

  #eventSetupDialog.compact-event-dialog #setupLoadEventDataBtn {
    display: none;
  }

  #eventSetupDialog.compact-event-dialog menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
  }

  #eventSetupDialog.compact-event-dialog menu button {
    min-height: 42px;
  }

  #concertView .live-browser {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  #concertView .live-collections-header {
    display: none;
  }

  #concertView .live-browser > .live-collections-header + .live-column {
    top: 54px;
  }

  #concertView .live-collapsed-collection-context {
    display: flex;
    cursor: pointer;
  }

  #concertView .live-browser:not(.is-collapsed) > .live-collections-header + .live-column {
    border: 1px solid rgba(139, 196, 218, 0.42);
    border-top: 2px solid rgba(125, 224, 190, 0.58);
    background:
      linear-gradient(180deg, rgba(20, 45, 61, 0.98), rgba(10, 27, 40, 0.98));
    box-shadow:
      0 16px 36px rgba(0, 0, 0, 0.44),
      0 0 0 1px rgba(255, 255, 255, 0.035) inset,
      0 0 28px rgba(93, 199, 183, 0.08);
  }

  #concertView .live-column:last-child,
  #concertView .live-list,
  #concertView .live-work-row,
  #concertView .live-work-row > button:first-child {
    width: 100%;
    max-width: none;
  }

  #concertView .live-work-column-header {
    padding: 0 2px;
    margin-bottom: 5px;
  }

  #concertView .live-work-column-header h3 {
    font-size: 10px;
  }

  #concertView .live-work-row {
    grid-template-columns: minmax(0, 1fr);
    margin: 0 0 6px;
  }

  #concertView .live-work-row > button:first-child {
    min-height: 48px;
    padding: 8px 10px;
  }

  #concertView .live-work-row > button:first-child strong {
    font-size: 13px;
  }

  #concertView .live-work-row > button:first-child small {
    font-size: 10px;
  }

  #concertView .live-duration-notice {
    min-height: 16px;
    margin: 5px 0 6px;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: rgba(171, 188, 245, 0.92);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.075em;
    text-align: center;
    text-transform: uppercase;
  }

  #concertView .live-pdf-button,
  #concertView .live-audio-button,
  #concertView .live-asset-folder-button {
    display: none !important;
  }
}

.live-work-row .live-pdf-button,
.live-work-row .live-audio-button {
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  border-radius: 12px !important;
}

.live-work-row .live-audio-button span {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px !important;
  line-height: 1;
  transform: translateY(-1px);
}

.archive-place-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--glass-field);
}

.archive-place-tools button {
  min-height: 34px;
}

.admin-backlog-item {
  gap: 14px;
}

.admin-backlog-setlist {
  display: grid;
  gap: 6px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.admin-backlog-setlist li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 10px;
  border: 1px solid rgba(134, 180, 170, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
}

.admin-backlog-setlist small {
  color: var(--muted);
}

.admin-pianist-tools {
  align-items: center;
}

.admin-pianist-tools span {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-pianist-backoffice {
  display: grid;
  gap: 12px;
}

.admin-pianist-invites {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-pianist-invites h3,
.admin-pianist-card h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.admin-pianist-invites div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-pianist-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid rgba(134, 180, 170, 0.22);
  border-radius: 999px;
  color: var(--text);
  background: rgba(134, 180, 170, 0.08);
  font-size: 0.82rem;
}

.admin-concert-conflicts {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(199, 168, 87, 0.26);
  border-radius: 18px;
  background: rgba(199, 168, 87, 0.055);
}

.admin-concert-conflicts-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-concert-conflicts-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
}

.admin-concert-conflicts-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.admin-concert-conflicts-head > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  border-radius: 999px;
  color: #d0b36a;
  background: rgba(199, 168, 87, 0.12);
  font-weight: 850;
}

.admin-concert-conflict {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(199, 168, 87, 0.18);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-concert-conflict-title strong {
  display: block;
  color: var(--text);
  font-size: 1rem;
}

.admin-concert-conflict-title small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.admin-concert-conflict-versions {
  display: grid;
  gap: 6px;
}

.admin-concert-conflict-versions div {
  display: grid;
  gap: 2px;
  padding: 7px 0;
  border-top: 1px solid rgba(134, 180, 170, 0.12);
}

.admin-concert-conflict-versions span {
  color: var(--text);
  font-weight: 720;
}

.admin-concert-conflict-versions small {
  color: var(--muted);
  font-size: 0.8rem;
}

.admin-concert-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.admin-concert-conflict-actions button {
  min-height: 32px;
  padding-inline: 12px;
}

.admin-pianist-card {
  gap: 14px;
  padding: 16px;
}

.admin-pianist-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-pianist-card-head strong {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
  letter-spacing: 0.01em;
}

.admin-pianist-card-head small {
  display: block;
  margin-top: 4px;
}

.admin-pianist-status {
  flex: 0 0 auto;
  padding: 5px 10px;
  border: 1px solid rgba(199, 168, 87, 0.28);
  border-radius: 999px;
  color: #d0b36a;
  background: rgba(199, 168, 87, 0.08);
  font-size: 0.78rem;
  font-weight: 760;
}

.admin-pianist-status.is-active {
  border-color: rgba(111, 220, 177, 0.34);
  color: var(--accent);
  background: rgba(111, 220, 177, 0.08);
}

.admin-pianist-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
}

.admin-pianist-facts {
  display: grid;
  gap: 7px;
  margin: 0;
}

.admin-pianist-facts div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
}

.admin-pianist-facts dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.admin-pianist-facts dd {
  margin: 0;
  color: var(--text);
  min-width: 0;
}

.admin-pianist-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-pianist-stats span {
  display: grid;
  gap: 4px;
  min-height: 56px;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-pianist-stats strong {
  color: var(--text);
  font-size: 1rem;
}

.admin-pianist-stats small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-pianist-concerts {
  padding-top: 12px;
  border-top: 1px solid rgba(134, 180, 170, 0.18);
}

.admin-pianist-concerts ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.admin-pianist-concerts li {
  display: grid;
  grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(134, 180, 170, 0.12);
}

.admin-pianist-concerts li:last-child {
  border-bottom: 0;
}

.admin-pianist-concerts span {
  color: var(--text);
  font-weight: 720;
}

.admin-pianist-concerts small {
  color: var(--muted);
}

@media (max-width: 880px) {
  .admin-pianist-grid,
  .admin-pianist-concerts li {
    grid-template-columns: 1fr;
  }
  .admin-pianist-tools span {
    margin-left: 0;
    width: 100%;
  }
}

/* High-contrast light mode for outdoor/iPad use */
:root[data-theme="light"] {
  --bg: #eef2f3;
  --ink: #151b1f;
  --muted: #516168;
  --line: #a8b7bd;
  --panel: #f7faf9;
  --field: #eef4f5;
  --soft: #dfe8ea;
  --header: #e4ecef;
  --selected: #d2eadf;
  --glass-panel: rgba(247, 250, 249, 0.96);
  --glass-field: rgba(239, 246, 247, 0.98);
  --glass-soft: rgba(223, 232, 234, 0.96);
  --glass-shadow: 0 22px 48px rgba(45, 61, 68, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

:root[data-theme="light"] body {
  background:
    radial-gradient(circle at 20% 10%, rgba(210, 224, 229, 0.58), transparent 34%),
    linear-gradient(180deg, #f4f7f8, #e9eff1);
  color: var(--ink);
}

:root[data-theme="light"] dialog,
:root[data-theme="light"] .compact-dialog,
:root[data-theme="light"] .wide-dialog,
:root[data-theme="light"] .profile-onboarding-dialog,
:root[data-theme="light"] .venue-setup-dialog,
:root[data-theme="light"] .access-dialog,
:root[data-theme="light"] .import-dialog,
:root[data-theme="light"] .archive-audio-dialog,
:root[data-theme="light"] .live-action-dialog {
  border-color: #98aab1 !important;
  background: #f7faf9 !important;
  color: #151b1f !important;
  box-shadow: 0 26px 64px rgba(45, 61, 68, 0.22) !important;
}

:root[data-theme="light"] .account-login-panel {
  border-color: rgba(108, 131, 139, 0.24);
  background: rgba(229, 237, 237, 0.58);
}

:root[data-theme="light"][data-account-locked="true"] .access-dialog {
  border-color: rgba(111, 151, 157, 0.28) !important;
  background:
    radial-gradient(circle at 16% 4%, rgba(82, 132, 124, 0.18), transparent 34%),
    radial-gradient(circle at 82% 18%, rgba(45, 78, 92, 0.18), transparent 38%),
    linear-gradient(180deg, #0c2530 0%, #09202b 48%, #071923 100%) !important;
  color: rgba(221, 229, 228, 0.88) !important;
}

:root[data-theme="light"][data-account-locked="true"] .access-dialog h2 {
  color: rgba(221, 229, 228, 0.88) !important;
}

:root[data-theme="light"][data-account-locked="true"] .access-dialog .eyebrow {
  color: rgba(174, 196, 197, 0.72) !important;
}

:root[data-theme="light"][data-account-locked="true"] .account-login-panel {
  border-color: rgba(134, 164, 174, 0.24) !important;
  background:
    linear-gradient(180deg, rgba(14, 45, 54, 0.84), rgba(9, 32, 42, 0.76)) !important;
}

:root[data-theme="light"] .account-login-head span.is-connected {
  color: #31715f;
}

:root[data-theme="light"] .event-form,
:root[data-theme="light"] .gema-view .event-form {
  background: #fbfdfc !important;
}

:root[data-theme="light"] dialog::backdrop,
:root[data-theme="light"] .live-action-dialog::backdrop,
:root[data-theme="light"] #eventSetupDialog.compact-event-dialog::backdrop {
  background: rgba(232, 240, 243, 0.72) !important;
}

:root[data-theme="light"] .work-context-menu {
  border-color: #98aab1 !important;
  background: #f7faf9 !important;
  color: #151b1f !important;
  box-shadow: 0 18px 42px rgba(45, 61, 68, 0.20) !important;
}

:root[data-theme="light"] .work-context-submenu-panel {
  border-color: #98aab1 !important;
  background: #f7faf9 !important;
  box-shadow: 0 18px 42px rgba(45, 61, 68, 0.20) !important;
}

:root[data-theme="light"] .work-context-menu button {
  border-color: transparent !important;
  background: transparent !important;
  color: #151b1f !important;
}

:root[data-theme="light"] .work-context-menu button:hover,
:root[data-theme="light"] .work-context-menu button:focus-visible {
  border-color: transparent !important;
  background: #e7f1f0 !important;
}

:root[data-theme="light"] dialog h2,
:root[data-theme="light"] dialog h3,
:root[data-theme="light"] dialog label,
:root[data-theme="light"] .compact-dialog h2,
:root[data-theme="light"] .wide-dialog h2 {
  color: #151b1f !important;
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] .table-input,
:root[data-theme="light"] label input,
:root[data-theme="light"] label select,
:root[data-theme="light"] label textarea,
:root[data-theme="light"] #workDialog label input,
:root[data-theme="light"] #workDialog label textarea,
:root[data-theme="light"] #eventSetupDialog.compact-event-dialog label input,
:root[data-theme="light"] #eventSetupDialog.compact-event-dialog label select,
:root[data-theme="light"] #eventSetupDialog.compact-event-dialog label textarea,
:root[data-theme="light"] .timer-settings-dialog input,
:root[data-theme="light"] .timer-settings-dialog select,
:root[data-theme="light"] .setlist-import-dialog textarea {
  border-color: transparent !important;
  background: rgba(36, 52, 54, 0.12) !important;
  color: #151b1f !important;
  box-shadow: none !important;
}

dialog input,
dialog select,
dialog textarea,
.compact-dialog input,
.compact-dialog select,
.compact-dialog textarea,
.gema-view .event-form input,
.gema-view .event-form select,
.gema-view .event-form textarea {
  border-color: transparent !important;
  background: rgba(255, 255, 255, 0.085) !important;
  box-shadow: none !important;
}

:root[data-theme="light"] dialog input,
:root[data-theme="light"] dialog select,
:root[data-theme="light"] dialog textarea,
:root[data-theme="light"] .compact-dialog input,
:root[data-theme="light"] .compact-dialog select,
:root[data-theme="light"] .compact-dialog textarea,
:root[data-theme="light"] .gema-view .event-form input,
:root[data-theme="light"] .gema-view .event-form select,
:root[data-theme="light"] .gema-view .event-form textarea {
  border-color: transparent !important;
  background: rgba(36, 52, 54, 0.12) !important;
  box-shadow: none !important;
}

dialog input:focus,
dialog select:focus,
dialog textarea:focus,
.compact-dialog input:focus,
.compact-dialog select:focus,
.compact-dialog textarea:focus,
.gema-view .event-form input:focus,
.gema-view .event-form select:focus,
.gema-view .event-form textarea:focus {
  border-color: transparent !important;
  background: rgba(255, 255, 255, 0.12) !important;
  box-shadow: none !important;
  outline: 2px solid rgba(122, 199, 167, 0.18) !important;
}

:root[data-theme="light"] dialog input:focus,
:root[data-theme="light"] dialog select:focus,
:root[data-theme="light"] dialog textarea:focus,
:root[data-theme="light"] .compact-dialog input:focus,
:root[data-theme="light"] .compact-dialog select:focus,
:root[data-theme="light"] .compact-dialog textarea:focus,
:root[data-theme="light"] .gema-view .event-form input:focus,
:root[data-theme="light"] .gema-view .event-form select:focus,
:root[data-theme="light"] .gema-view .event-form textarea:focus {
  border-color: transparent !important;
  background: rgba(36, 52, 54, 0.18) !important;
  box-shadow: none !important;
  outline: 2px solid rgba(47, 122, 97, 0.16) !important;
}

:root[data-theme="light"] #workDialog.is-info-mode .work-info-list input,
:root[data-theme="light"] #workDialog.is-info-mode .work-info-list textarea {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #151b1f !important;
}

:root[data-theme="light"] #gemaPreview .table-input {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="light"] #gemaPreview .table-input:focus,
:root[data-theme="light"] #gemaPreview .table-input.is-editing {
  border-color: #98aab1 !important;
  background: #edf4f5 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85) !important;
}

:root[data-theme="light"] #workDialog.is-info-mode .work-info-field-work-number input,
:root[data-theme="light"] #workDialog.is-info-mode .work-info-field-version input,
:root[data-theme="light"] #workDialog.is-info-mode .work-info-field-composer-first input,
:root[data-theme="light"] #workDialog.is-info-mode .work-info-field-composer-last input,
:root[data-theme="light"] #workDialog.is-info-mode .work-info-field-duration input,
:root[data-theme="light"] #workDialog.is-info-mode .work-info-field-notes textarea {
  color: rgba(42, 55, 61, 0.74) !important;
}

:root[data-theme="light"] #workDialog .work-info-title {
  color: #151b1f;
}

:root[data-theme="light"] #workDialog .work-info-line,
:root[data-theme="light"] #workDialog .work-info-notes {
  color: rgba(42, 55, 61, 0.76);
}

:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus,
:root[data-theme="light"] .table-input:focus {
  border-color: transparent !important;
  outline: 2px solid rgba(47, 122, 97, 0.16) !important;
  background: rgba(36, 52, 54, 0.18) !important;
  box-shadow: none !important;
}

:root[data-theme="light"] button,
:root[data-theme="light"] .file-button,
:root[data-theme="light"] menu button,
:root[data-theme="light"] .toolbar button,
:root[data-theme="light"] .library-actions-panel button,
:root[data-theme="light"] .library-actions-panel .file-button {
  border-color: #98aab1;
}

:root[data-theme="light"] .panel,
:root[data-theme="light"] .sidebar-panel,
:root[data-theme="light"] .work-area,
:root[data-theme="light"] .table-wrap,
:root[data-theme="light"] .collection-list,
:root[data-theme="light"] .archive-list,
:root[data-theme="light"] .library-menu-bar,
:root[data-theme="light"] .library-actions-panel,
:root[data-theme="light"] .selection-bar,
:root[data-theme="light"] .library-meta-bar,
:root[data-theme="light"] .archive-place-tools {
  border-color: #a8b7bd !important;
  background: rgba(247, 250, 249, 0.88) !important;
}

:root[data-theme="light"] .library-actions-menu summary:hover,
:root[data-theme="light"] .library-actions-menu[open] summary {
  border-color: rgba(74, 91, 99, 0.18);
  background: #e9f0f1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  color: rgba(21, 27, 31, 0.82);
}

:root[data-theme="light"] .library-actions-menu summary {
  color: rgba(42, 55, 61, 0.66);
}

:root[data-theme="light"] .library-actions-panel {
  border-color: #98aab1 !important;
  background: #edf4f5 !important;
  box-shadow: 0 18px 42px rgba(45, 61, 68, 0.18) !important;
}

:root[data-theme="light"] .library-actions-panel button,
:root[data-theme="light"] .library-actions-panel .file-button {
  border-color: transparent;
  color: rgba(21, 27, 31, 0.78);
  font-weight: 650;
}

:root[data-theme="light"] .library-actions-panel button:hover,
:root[data-theme="light"] .library-actions-panel .file-button:hover {
  border-color: #92a7af;
  background: #e7f1f0;
}

:root[data-theme="light"] .library-export-format,
:root[data-theme="light"] .collection-share-dialog select,
:root[data-theme="light"] .backup-stack {
  border-color: #98aab1 !important;
  background: #edf4f5 !important;
}

:root[data-theme="light"] .library-export-format label,
:root[data-theme="light"] .collection-share-dialog label {
  color: #151b1f !important;
}

:root[data-theme="light"] .library-meta-bar {
  color: rgba(66, 82, 90, 0.72);
}

:root[data-theme="light"] .library-meta-title {
  color: #151b1f;
}

:root[data-theme="light"] .library-meta-stats span {
  border-color: rgba(74, 91, 99, 0.20);
  background: rgba(255, 255, 255, 0.66);
}

:root[data-theme="light"] .library-search {
  border-color: rgba(91, 109, 116, 0.22);
  background: rgba(222, 229, 228, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .library-search span {
  color: rgba(38, 52, 58, 0.78);
}

:root[data-theme="light"] .library-search input[type="search"] {
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  color: rgba(22, 31, 35, 0.88);
}

:root[data-theme="light"] .library-search input[type="search"]:focus {
  border-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .library-search input[type="search"]::placeholder {
  color: rgba(38, 52, 58, 0.62);
}

:root[data-theme="light"] .library-active-title {
  color: rgba(31, 42, 47, 0.84);
}

:root[data-theme="light"] [data-help]::after {
  border-color: rgba(74, 91, 99, 0.24);
  background: rgba(247, 250, 249, 0.98);
  box-shadow: 0 18px 42px rgba(45, 61, 68, 0.16);
  color: #151b1f;
}

:root[data-theme="light"] .help-tooltip {
  border-color: rgba(74, 91, 99, 0.24);
  background: rgba(247, 250, 249, 0.98);
  box-shadow: 0 18px 42px rgba(45, 61, 68, 0.16);
  color: #151b1f;
}

:root[data-theme="light"] .data-table th,
:root[data-theme="light"] .data-table td,
:root[data-theme="light"] #libraryView .data-table td {
  border-bottom-color: rgba(72, 92, 104, 0.15) !important;
}

:root[data-theme="light"] .live-work-row > button:first-child,
:root[data-theme="light"] .setlist li,
:root[data-theme="light"] .archive-item,
:root[data-theme="light"] .collection-list button,
:root[data-theme="light"] .live-collection-list button {
  border-color: #a8b7bd !important;
  background: #edf4f5 !important;
  box-shadow: 0 2px 7px rgba(45, 61, 68, 0.06) !important;
}

:root[data-theme="light"] #libraryView .data-table tbody tr:not(.is-selected),
:root[data-theme="light"] #libraryView .data-table tbody tr:not(.is-selected):hover {
  background: transparent !important;
  box-shadow: none !important;
  outline: 0 !important;
}

:root[data-theme="light"] .live-work-row > button:first-child:hover,
:root[data-theme="light"] .setlist li:hover,
:root[data-theme="light"] .collection-list button:hover,
:root[data-theme="light"] .archive-item:hover {
  border-color: #6f918b !important;
  background: #e7f1f0 !important;
}

:root[data-theme="light"] .data-table tr.is-selected,
:root[data-theme="light"] .live-work-row.is-current > button:first-child,
:root[data-theme="light"] .setlist li.is-current,
:root[data-theme="light"] .collection-list button.is-active,
:root[data-theme="light"] .archive-mode-switch button.is-active {
  border-color: #2f7a61 !important;
  background: linear-gradient(90deg, rgba(157, 220, 184, 0.56), rgba(218, 240, 228, 0.92)) !important;
  box-shadow: 0 0 0 1px rgba(47, 122, 97, 0.18), 0 8px 18px rgba(47, 122, 97, 0.14) !important;
}

:root[data-theme="light"] #archiveView {
  background: #e8eef0;
}

:root[data-theme="light"] .archive-list {
  border-color: #a8b7bd !important;
  background: #e8eef0 !important;
}

:root[data-theme="light"] .archive-item {
  border-color: #a2b2b8 !important;
  background: #f3f7f7 !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .archive-item:hover,
:root[data-theme="light"] .archive-item:focus-within {
  border-color: #829a9d !important;
  background: #f7faf9 !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .collection-list {
  background: transparent !important;
}

:root[data-theme="light"] .collection-list button {
  border-color: transparent !important;
  color: #151b1f !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .live-collection-list button:not(.is-active) {
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .live-collection-list button:not(.is-active):hover,
:root[data-theme="light"] .live-collection-list button:not(.is-active):focus-visible {
  border-color: #6f918b !important;
  background: #e7f1f0 !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .live-collection-list button.is-active {
  border-color: #2f7a61 !important;
  background: linear-gradient(90deg, rgba(157, 220, 184, 0.56), rgba(218, 240, 228, 0.92)) !important;
  box-shadow: 0 0 0 1px rgba(47, 122, 97, 0.18), 0 8px 18px rgba(47, 122, 97, 0.14) !important;
}

:root[data-theme="light"] .collection-list .collection-count {
  color: #516168 !important;
  font-weight: 720;
}

:root[data-theme="light"] .collection-list .collection-badge {
  border-color: #98aab1;
  background: #e7f1f0;
  color: #163f33;
}

:root[data-theme="light"] .collection-list button.is-active .collection-badge {
  border-color: #2f7a61;
  background: #cfe8dc;
  color: #102f27;
}

:root[data-theme="light"] .pdf-icon-button,
:root[data-theme="light"] .live-audio-button,
:root[data-theme="light"] #libraryView .live-pdf-button,
:root[data-theme="light"] #libraryView .live-audio-button {
  border-color: #aebbc0 !important;
  background: #e6eef0 !important;
  color: #6a777d !important;
}

:root[data-theme="light"] .pdf-icon-button.has-asset,
:root[data-theme="light"] .live-audio-button.has-asset,
:root[data-theme="light"] #libraryView .live-pdf-button.has-asset,
:root[data-theme="light"] #libraryView .live-audio-button.has-asset {
  border-color: #2f7a61 !important;
  background: #d8efe4 !important;
  color: #163f33 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 0 0 1px rgba(47, 122, 97, 0.10) !important;
}

:root[data-theme="light"] .pdf-icon-button.is-missing-asset,
:root[data-theme="light"] .live-audio-button.is-missing-asset,
:root[data-theme="light"] #libraryView .live-pdf-button.is-missing-asset,
:root[data-theme="light"] #libraryView .live-audio-button.is-missing-asset {
  border-color: #bdc7cb !important;
  background: #e3ebed !important;
  color: #728087 !important;
  opacity: 0.72;
}

:root[data-theme="light"] #libraryView .data-table .work-number-cell,
:root[data-theme="light"] #libraryView .collection-text-list {
  color: #5d6b70 !important;
}

:root[data-theme="light"] #libraryView .data-table .work-number-cell {
  font-weight: 780;
}

:root[data-theme="light"] #libraryView .collection-text-list {
  font-weight: 650;
}

:root[data-theme="light"] .admin-backlog-setlist li {
  border-color: rgba(74, 91, 99, 0.22);
  background: rgba(247, 250, 249, 0.86);
}

:root[data-theme="light"] .admin-pianist-invites,
:root[data-theme="light"] .admin-pianist-stats span {
  border-color: rgba(74, 91, 99, 0.12);
  background: rgba(229, 237, 239, 0.72);
}

:root[data-theme="light"] .admin-pianist-chip {
  border-color: rgba(60, 119, 101, 0.18);
  background: rgba(210, 234, 223, 0.5);
}

:root[data-theme="light"] .admin-concert-conflicts {
  border-color: rgba(138, 107, 32, 0.2);
  background: rgba(211, 190, 122, 0.12);
}

:root[data-theme="light"] .admin-concert-conflicts-head > span {
  color: #7b611f;
  background: rgba(199, 168, 87, 0.16);
}

:root[data-theme="light"] .admin-concert-conflict {
  border-color: rgba(138, 107, 32, 0.14);
  background: rgba(247, 250, 249, 0.7);
}

:root[data-theme="light"] .admin-concert-conflict-versions div {
  border-top-color: rgba(74, 91, 99, 0.12);
}

:root[data-theme="light"] .admin-pianist-status {
  color: #8a6b20;
  background: rgba(199, 168, 87, 0.12);
}

:root[data-theme="light"] .admin-pianist-status.is-active {
  color: #2e735e;
  background: rgba(72, 144, 118, 0.12);
}

:root[data-theme="light"] .admin-pianist-concerts {
  border-top-color: rgba(74, 91, 99, 0.15);
}

:root[data-theme="light"] .admin-pianist-concerts li {
  border-bottom-color: rgba(74, 91, 99, 0.12);
}
.missing-work-data-dialog {
  width: min(720px, calc(100vw - 28px));
}

.missing-work-data-list {
  display: grid;
  gap: 6px;
  max-height: min(52vh, 520px);
  margin: 12px 0;
  overflow: auto;
}

.missing-work-data-row {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
}

.missing-work-data-row small {
  color: var(--muted);
}

.missing-work-data-row.is-export-critical {
  border-color: rgba(180, 35, 24, 0.38);
}

.missing-work-data-row.is-optional-only {
  border-color: var(--line);
  background: var(--panel);
}

.missing-critical-label {
  color: #b42318 !important;
  font-weight: 650;
}

:root[data-theme="dark"] .missing-critical-label {
  color: #ff9f92 !important;
}

.library-actions-panel .media-folder-button {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background: color-mix(in srgb, var(--accent) 13%, var(--panel));
}

.library-advanced-import {
  grid-column: 1 / -1;
}

.library-advanced-import > summary {
  padding: 7px 9px;
  color: var(--muted);
  font-size: 0.76rem;
  cursor: pointer;
}

.library-advanced-import > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding-top: 5px;
}

.gema-email-import-dialog {
  width: min(720px, calc(100vw - 28px));
}

.gema-email-import-dialog textarea {
  width: 100%;
  min-height: 180px;
  margin: 10px 0;
}

.gema-email-import-result {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 88%, var(--accent) 12%);
}

.gema-email-extracted {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.gema-email-extracted span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.gema-email-extracted b {
  overflow: hidden;
  text-overflow: ellipsis;
}

:root[data-theme="light"] .library-search input[type="search"],
:root[data-theme="light"] .library-search input[type="search"]:focus,
:root[data-theme="light"] .library-search input[type="search"]:focus-visible {
  border-color: transparent !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

:root[data-theme="light"] .gema-verification-summary {
  border-top-color: rgba(91, 109, 116, 0.18);
}

:root[data-theme="light"] .gema-verification-summary span {
  color: rgba(42, 55, 61, 0.58);
}

:root[data-theme="light"] .gema-verification-summary strong {
  color: rgba(42, 55, 61, 0.78);
}

:root[data-theme="light"] .gema-verification-summary strong.is-confirmed {
  color: rgba(46, 111, 82, 0.90);
}

:root[data-theme="light"] .gema-verification-summary strong.is-missing {
  color: rgba(138, 103, 31, 0.88);
}

:root[data-theme="light"] .settings-section h3 {
  color: rgba(31, 42, 47, 0.78);
}

:root[data-theme="light"] .settings-category-list button,
:root[data-theme="light"] .settings-back-button {
  color: rgba(42, 55, 61, 0.62);
}

:root[data-theme="light"] .settings-category-list button:hover,
:root[data-theme="light"] .settings-category-list button:focus-visible,
:root[data-theme="light"] .settings-category-list button.is-active {
  color: rgba(21, 27, 31, 0.86);
}

:root[data-theme="light"] .settings-category-list {
  border-bottom-color: rgba(91, 109, 116, 0.16);
}

:root[data-theme="light"] .settings-access-button {
  color: rgba(42, 55, 61, 0.58) !important;
}

:root[data-theme="light"] .settings-access-button:hover,
:root[data-theme="light"] .settings-access-button:focus-visible {
  color: rgba(21, 27, 31, 0.76) !important;
}

:root[data-theme="light"] .app-settings-dialog select {
  border-color: rgba(91, 109, 116, 0.18) !important;
  background:
    linear-gradient(45deg, transparent 50%, rgba(42, 55, 61, 0.70) 50%) calc(100% - 18px) 52% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(42, 55, 61, 0.70) 50%, transparent 50%) calc(100% - 13px) 52% / 6px 6px no-repeat,
    rgba(36, 52, 54, 0.10) !important;
  color: rgba(21, 27, 31, 0.88) !important;
}

:root[data-theme="light"] .app-settings-dialog select:focus {
  border-color: rgba(47, 122, 97, 0.26) !important;
  background:
    linear-gradient(45deg, transparent 50%, rgba(47, 122, 97, 0.86) 50%) calc(100% - 18px) 52% / 6px 6px no-repeat,
    linear-gradient(135deg, rgba(47, 122, 97, 0.86) 50%, transparent 50%) calc(100% - 13px) 52% / 6px 6px no-repeat,
    rgba(36, 52, 54, 0.18) !important;
}

:root[data-theme="light"] .app-settings-dialog select option {
  background: #edf4f5;
  color: #151b1f;
}

:root[data-theme="light"] .settings-dropdown > button {
  border-color: rgba(91, 109, 116, 0.18);
  background: rgba(36, 52, 54, 0.10);
  color: rgba(21, 27, 31, 0.88);
}

:root[data-theme="light"] .settings-dropdown.is-open > button,
:root[data-theme="light"] .settings-dropdown > button:focus-visible {
  border-color: rgba(47, 122, 97, 0.24);
  background: rgba(36, 52, 54, 0.16);
}

:root[data-theme="light"] .settings-dropdown-panel {
  border-color: #98aab1;
  background: #edf4f5;
  box-shadow: 0 18px 42px rgba(45, 61, 68, 0.18);
}

:root[data-theme="light"] .settings-dropdown-panel button {
  color: rgba(21, 27, 31, 0.78);
}

:root[data-theme="light"] .settings-dropdown-panel button:hover,
:root[data-theme="light"] .settings-dropdown-panel button:focus-visible,
:root[data-theme="light"] .settings-dropdown-panel button.is-selected {
  border-color: rgba(74, 91, 99, 0.18);
  background: #e7f1f0;
  color: rgba(21, 27, 31, 0.88);
}

/* Final override: plain pause state in the large LiveLog timer block. */
#concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-main {
  gap: clamp(16px, 2.4vw, 30px) !important;
  padding-left: 7px !important;
  padding-block: 5px !important;
  overflow: visible !important;
}

#concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: flex-start !important;
  min-width: 0 !important;
  max-width: clamp(220px, 31vw, 360px) !important;
  padding-left: clamp(8px, 1.4vw, 18px) !important;
  overflow: hidden !important;
}

#concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece-heading {
  position: static !important;
  inset: auto !important;
  align-self: stretch !important;
  justify-content: flex-start !important;
  margin: 0 !important;
}

#concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece-heading .live-progress-status {
  position: static !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  opacity: 1 !important;
}

#concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece-heading .live-progress-status .status-light {
  display: none !important;
}

#concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece-heading .live-progress-status strong {
  display: block !important;
  color: rgba(206, 172, 96, 0.88) !important;
  font-size: clamp(40px, 5.4vw, 72px) !important;
  font-weight: 920 !important;
  line-height: 0.9 !important;
  letter-spacing: 0.035em !important;
}

:root[data-theme="light"] #concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-piece-heading .live-progress-status strong {
  color: rgba(128, 98, 39, 0.80) !important;
}

#concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-ring {
  flex: 0 0 auto !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 0 0 1px rgba(206, 172, 96, 0.18),
    0 0 18px rgba(206, 172, 96, 0.26),
    0 8px 18px rgba(0, 0, 0, 0.16) !important;
}

#concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-ring span {
  margin-top: 0 !important;
  transform: translateY(1px);
}

:root[data-theme="light"] #concertView .live-progress-tracker.is-large.is-plain-pause .live-progress-ring {
  background:
    conic-gradient(
      from -90deg,
      rgba(172, 132, 50, 0.70) 1turn,
      rgba(172, 132, 50, 0.70) 0
    ) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    0 0 0 1px rgba(155, 119, 46, 0.18),
    0 0 16px rgba(155, 119, 46, 0.22),
    0 6px 14px rgba(37, 65, 49, 0.10) !important;
}
