@import url('https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@200;400;700&display=swap');

:root {
  --bg: #fafafa;
  --ink: #0d1b2a;
  --muted: #4a5a72;
  --brand: #0057b7;
  --accent: #ffc72c;
  --card: #ffffff;
  --stroke: rgba(0, 87, 183, 0.3);
  --shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #303030;
    --ink: #f7f7f7;
    --muted: #c6c9cf;
    --brand: #ffc72c;
    --accent: #0057b7;
    --card: #3a3a3a;
    --stroke: rgba(255, 199, 44, 0.35);
    --shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
  }
}

:root[data-theme="light"] {
  --bg: #fafafa;
  --ink: #0d1b2a;
  --muted: #4a5a72;
  --brand: #0057b7;
  --accent: #ffc72c;
  --card: #ffffff;
  --stroke: rgba(0, 87, 183, 0.3);
  --shadow: 0 18px 35px rgba(0, 0, 0, 0.08);
}

:root[data-theme="dark"] {
  --bg: #303030;
  --ink: #f7f7f7;
  --muted: #c6c9cf;
  --brand: #ffc72c;
  --accent: #0057b7;
  --card: #3a3a3a;
  --stroke: rgba(255, 199, 44, 0.35);
  --shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

input,
select,
textarea {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  user-select: auto;
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.2em 1.2em;
  padding-right: 2rem;
}

body {
  margin: 0;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: var(--brand);
  background: var(--bg);
  background-image: linear-gradient(0deg, rgba(0, 87, 183, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 87, 183, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  min-height: 100vh;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

h1, h2, h3 {
  margin: 0 0 0.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--brand);
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  padding: 1.25rem;
  max-width: 1040px;
  margin: 0 auto;
}

@media not all and (display-mode: standalone) {
  .page {
    padding-top: calc(4rem + 1.25rem);
  }
}

@media (display-mode: standalone) {
  .page {
    padding-top: calc(0.3125rem + env(safe-area-inset-top));
    padding-bottom: calc(4rem + 1.25rem + env(safe-area-inset-bottom));
    padding-left: max(1.25rem, env(safe-area-inset-left));
    padding-right: max(1.25rem, env(safe-area-inset-right));
  }
}

.topbar {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(0.4rem, 1.5vw, 1.2rem);
  align-items: center;
  justify-content: space-between;
  padding: clamp(0.6rem, 1.5vw, 0.8rem) clamp(0.8rem, 3vw, 3rem);
  border-bottom: 2px solid var(--stroke);
  background: var(--card);
  z-index: 10;
}

@media not all and (display-mode: standalone) {
  .topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
}

@media (display-mode: standalone) {
  .topbar {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    border-bottom: none;
    border-top: 2px solid var(--stroke);
    padding: 0.5rem clamp(0.8rem, 3vw, 3rem);
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
    padding-left: max(clamp(0.8rem, 3vw, 3rem), env(safe-area-inset-left));
    padding-right: max(clamp(0.8rem, 3vw, 3rem), env(safe-area-inset-right));
    justify-content: space-between;
  }
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: clamp(0.3rem, 1vw, 0.6rem);
  flex-shrink: 0;
}

@media (display-mode: standalone) {
  .brand-name {
    display: none;
  }
}

.brand-link {
  display: flex;
  align-items: center;
  gap: clamp(0.3rem, 1vw, 0.6rem);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  letter-spacing: -0.03em;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
}

.brand-logo {
  width: clamp(1.5rem, 3vw, 2rem);
  height: clamp(1.5rem, 3vw, 2rem);
  flex-shrink: 0;
}

.brand-name {
  display: inline;
}



.nav {
  display: flex;
  gap: clamp(0.35rem, 1vw, 1rem);
  flex-wrap: nowrap;
  align-items: center;
  flex-shrink: 0;
}

@media (display-mode: standalone) {
  .nav {
    gap: 0.5rem;
  }
  
  .topbar:has(.nav-btn) .nav {
    width: auto;
    justify-content: flex-end;
  }
}

.nav-link {
  padding: 0.2rem 0.02rem;
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 1rem;
  transition: 0.2s ease;
  white-space: nowrap;
}

.nav-link.is-active,
.nav-link:hover {
  border-color: var(--brand);
}

.nav-btn {
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--card);
  color: var(--brand);
  border: 2px solid var(--brand);
  transition: box-shadow 0.2s ease, background 0.2s ease;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}

.nav-btn i {
  font-size: 1.2rem;
  line-height: 1;
}

.nav-btn:hover,
.nav-btn.is-active {
  background: var(--brand);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 87, 183, 0.15);
}

.controls {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.control {
  display: flex;
  flex-direction: column;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.select {
  margin-top: 0.35rem;
  padding: 0.7rem;
  border-radius: 4px;
  border: 2px solid var(--brand);
  background: var(--card);
  color: var(--brand);
  font-family: inherit;
  cursor: pointer;
  line-height: 1.4;
  min-height: 2.8rem;
  font-size: 1rem;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.2em 1.2em;
  padding-right: 2.5rem;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  display: block;
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: end;
  background: var(--card);
  padding: 2.2rem;
  border: 2px solid var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.6rem);
  line-height: 0.95;
}

.hero-subtitle {
  color: var(--muted);
  margin: 0;
  max-width: 32rem;
}

.hero-badge {
  font-size: 0.9rem;
  font-weight: 700;
  padding: 0.55rem 1rem;
  border-radius: 4px;
  background: var(--brand);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  animation: pulse 2.4s ease-in-out infinite;
}

.filters {
  margin-bottom: 1.5rem;
}

.filters-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.filters-form select,
.filters-form .select,
.filters-form .btn {
  min-height: 2.8rem;
  height: 2.8rem;
  border-radius: 4px;
}

.filters-form select,
.filters-form .select {
  margin-top: 0;
}

.filters-form .field {
  margin: 0;
}

.filters-cta {
  display: flex;
  justify-content: stretch;
  align-items: stretch;
}

.filters-cta .btn {
  width: 100%;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  padding: 0.7rem;
  border-radius: 4px;
  border: 2px solid var(--brand);
  background: var(--card);
  color: var(--brand);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
  min-height: 2.8rem;
  display: block;
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.field select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 1.2em 1.2em;
  padding-right: 2.5rem;
  cursor: pointer;
}

.field input[type="color"] {
  min-height: 2.8rem;
  height: 2.8rem;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: 4px;
}

.field textarea {
  min-height: 8rem;
  resize: vertical;
  padding: 0.7rem;
  line-height: 1.6;
}

.number-stepper {
  position: relative;
  display: flex;
  align-items: stretch;
  --stepper-height: 2.8rem;
  --stepper-gap: 0.25rem;
  --stepper-box: calc(var(--stepper-height) - (var(--stepper-gap) * 2));
}

.number-stepper input {
  width: 100%;
  height: var(--stepper-height);
  padding: 0.7rem;
  padding-right: calc((var(--stepper-box) * 2) + (var(--stepper-gap) * 3) + 0.4rem);
  border-radius: 4px;
  border: 2px solid var(--brand);
  background: var(--card);
  color: var(--brand);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
  box-sizing: border-box;
}

.stepper-controls {
  position: absolute;
  top: var(--stepper-gap);
  right: var(--stepper-gap);
  bottom: var(--stepper-gap);
  display: flex;
  gap: var(--stepper-gap);
}

.stepper-btn {
  width: var(--stepper-box);
  height: var(--stepper-box);
  border: 2px solid var(--brand);
  background: transparent;
  color: var(--brand);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.stepper-btn:hover {
  background: var(--brand);
  color: var(--accent);
}

.number-stepper input[type="number"]::-webkit-outer-spin-button,
.number-stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.number-stepper input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.password-toggle {
  position: relative;
  display: flex;
  align-items: stretch;
  --toggle-height: 2.8rem;
  --toggle-gap: 0.25rem;
  --toggle-box: calc(var(--toggle-height) - (var(--toggle-gap) * 2));
}

.password-toggle input {
  width: 100%;
  height: var(--toggle-height);
  padding: 0.7rem;
  padding-right: calc(var(--toggle-box) + (var(--toggle-gap) * 2) + 0.4rem);
  border-radius: 4px;
  border: 2px solid var(--brand);
  background: var(--card);
  color: var(--brand);
  font-size: 1rem;
  font-family: inherit;
  line-height: 1.4;
  box-sizing: border-box;
}

.password-toggle input::-ms-reveal,
.password-toggle input::-ms-clear {
  display: none;
}

.toggle-controls {
  position: absolute;
  top: var(--toggle-gap);
  right: var(--toggle-gap);
  bottom: var(--toggle-gap);
  display: flex;
  gap: var(--toggle-gap);
}

.toggle-btn {
  width: var(--toggle-box);
  height: var(--toggle-box);
  border: 2px solid var(--brand);
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}

.toggle-btn:hover {
  background: var(--brand);
  color: var(--accent);
}

.input-lowercase {
  text-transform: lowercase;
}

.field input[type="date"],
.field input[type="time"],
.field input[type="datetime-local"],
.field input[type="month"],
.field input[type="week"],
.field input[type="email"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="password"],
.field input[type="text"],
.field input[type="number"],
.field input[type="search"],
.field input[type="file"] {
  width: 100%;
  height: auto;
  padding: 0.7rem;
  min-height: 2.8rem;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--accent);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.2rem;
  border-radius: 4px;
  border: 2px solid var(--brand);
  font-weight: 700;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 1rem;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  min-height: 2.8rem;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: transparent;
  text-decoration: none;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  white-space: nowrap;
  vertical-align: middle;
  line-height: 1.4;
}

.btn i {
  font-size: 1rem;
  line-height: 1;
  width: 1em;
  height: 1em;
}

.btn-control {
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  min-width: 2.8rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-control i {
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-toggle {
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background: var(--brand);
  color: var(--accent);
  box-shadow: 0 10px 18px rgba(0, 87, 183, 0.2);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.scroll-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(0, 87, 183, 0.25);
}

.scroll-toggle i {
  font-size: 1.2rem;
  line-height: 1;
}

.btn-icon {
  display: inline-flex;
  width: 1rem;
  height: 1rem;
  align-items: center;
  justify-content: center;
}

.btn-icon i {
  font-size: 1rem;
  line-height: 1;
}

.btn-icon-only {
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  min-height: 2.8rem;
  flex-shrink: 0;
}

.btn-icon-only i {
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scroll-toggle[data-state="playing"] [data-icon="play"],
#scroll-toggle[data-state="paused"] [data-icon="pause"] {
  display: none;
}

.btn-primary {
  background: var(--brand);
  color: var(--accent);
  box-shadow: 0 10px 18px rgba(0, 87, 183, 0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-danger {
  background: #ff4d4d;
  border-color: #ff4d4d;
  color: #ffffff;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.btn-ghost {
  background: transparent;
  color: var(--brand);
}

.gig-list {
  display: grid;
  gap: 1rem;
}

.gig-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.4rem;
  background: var(--card);
  border-radius: 8px;
  border: 2px solid var(--brand);
  box-shadow: var(--shadow);
  animation: slide-up 0.6s ease;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
}

.section-header h1 {
  margin: 0;
}

.section-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

.song-list {
  display: grid;
  gap: 1rem;
}

.song-card {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  background: var(--card);
  border-radius: 8px;
  border: 2px solid var(--brand);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}

.song-card.is-dragging,
.song-card[data-dragging="true"] {
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
  opacity: 0.92;
}

.song-card__title {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  display: block;
  max-width: 100%;
}

.song-card__info {
  margin: 0.3rem 0 0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-card__title[data-scrollable="true"],
.song-card__info[data-scrollable="true"] {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  max-width: none;
  width: max-content;
}

.song-card__title[data-scrollable="true"]:hover,
.song-card__info[data-scrollable="true"]:hover {
  animation-play-state: paused;
}

.swipe-actions {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 0.8rem;
  background: #ff4d4d;
  transform: translateX(100%);
  transition: transform 0.2s ease;
}

.song-card.is-swiped .swipe-actions {
  transform: translateX(0);
}

.song-card.is-swiping .swipe-actions {
  transform: translateX(0);
}

.song-card.is-swiped {
  transform: translateX(-90px);
}

.song-card__main {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.gig-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.gig-card__date {
  font-weight: 700;
}

.gig-card__actions {
  display: flex;
  gap: 0.6rem;
}

.gig-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.gig-detail__meta {
  color: var(--muted);
}

.setlist {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--brand);
}

.setlist__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.7rem;
}

.setlist__item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.9rem;
  border-radius: 6px;
  background: rgba(0, 87, 183, 0.08);
  color: var(--brand);
}

.setlist__item.is-encore {
  background: rgba(255, 199, 44, 0.3);
}

.setlist__index {
  font-weight: 700;
  color: var(--brand);
}

.setlist__tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
}

.scroll-view {
  background: var(--card);
  border-radius: 8px;
  border: 2px solid var(--brand);
  height: calc(100vh - 4rem - 2.5rem);
  display: flex;
  flex-direction: column;
}

@media (display-mode: standalone) {
  .scroll-view {
    height: calc(100vh - 4rem - 1.5625rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}

@media (max-width: 640px) {
  .scroll-view {
    height: calc(100svh - 4rem - 2.5rem);
  }
}

@media (max-width: 640px) and (display-mode: standalone) {
  .scroll-view {
    height: calc(100svh - 4rem - 1.5625rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
}

.scroll-view__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0px;
  padding-bottom: 0.5rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  padding-top: 0.5rem;
  box-shadow: var(--shadow);
  min-width: 0;
}

.scroll-view__header > div:first-child {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.scroll-view__text-container {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.scroll-view__controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}

.scroll-control {
  position: relative;
  width: 2.8rem;
  height: 2.8rem;
  border: 2px solid var(--brand);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  color: var(--brand);
  padding: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.scroll-control:hover {
  background: var(--brand);
  color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 87, 183, 0.15);
}

#text-align-toggle[data-align="center"] [data-align-icon="left"],
#text-align-toggle[data-align="left"] [data-align-icon="center"] {
  display: none;
}

#columns-toggle[data-columns="1"] [data-columns-icon="2"],
#columns-toggle[data-columns="2"] [data-columns-icon="1"] {
  display: none;
}

#text-align-toggle:hover,
#columns-toggle:hover {
  background: var(--card);
  color: var(--brand);
  box-shadow: none;
}

.scroll-control__icon {
  width: 1.2rem;
  height: 1.2rem;
  display: grid;
  place-items: center;
}

.scroll-control i {
  font-size: 1.2rem;
  line-height: 1;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  padding: 1.5rem;
  z-index: 50;
}

.modal.is-open {
  display: flex;
}

.modal__content {
  width: min(190px, 90%);
  background: var(--card);
  border: 2px solid var(--brand);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.2rem 1.4rem;
  display: grid;
  gap: 1.2rem;
  justify-items: center;
  text-align: center;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.modal__header h2 {
  margin: 0;
  font-size: 1.1rem;
  flex: 1;
}

.modal__header [data-modal-close] {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--brand);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.modal__header svg {
  width: 1.5rem;
  height: 1.5rem;
}

.modal__header i {
  font-size: 1.5rem;
  line-height: 1;
}


.modal__body {
  display: grid;
  place-items: center;
  padding: 0.5rem 0;
  width: 100%;
}

.modal__slider-wrap {
  position: relative;
  width: 150px;
  height: 320px;
  display: grid;
  place-items: center;
  overflow: visible;
}

.modal__slider {
  position: absolute;
  width: 320px;
  height: 2.6rem;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-90deg);
  transform-origin: center;
  background: transparent;
  cursor: pointer;
  padding: 0;
  border: none;
  font-family: inherit;
}

/* Firefox - slider vertical nativo */
@supports (-moz-appearance: slider-vertical) {
  .modal__slider {
    width: 2.6rem;
    height: 320px;
    transform: translate(-50%, -50%);
    -moz-appearance: slider-vertical;
    appearance: slider-vertical;
  }
}

/* Safari/Chrome/Edge - slider horizontal rotado */
@supports (-webkit-appearance: none) and (not (-moz-appearance: slider-vertical)) {
  .modal__slider {
    width: 320px;
    height: 2.6rem;
    transform: translate(-50%, -50%) rotate(-90deg);
  }
}

.modal__slider::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--stroke);
  border-radius: 999px;
}

.modal__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 32px;
  height: 32px;
  margin-top: -13px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--brand);
  cursor: pointer;
  box-sizing: border-box;
}

.modal__slider::-moz-range-track {
  height: 6px;
  background: var(--stroke);
  border-radius: 999px;
  border: none;
}

.modal__slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--brand);
  cursor: pointer;
  box-sizing: border-box;
}

.modal__slider::-moz-range-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--brand);
  cursor: pointer;
  box-sizing: border-box;
}

.modal__footer {
  display: grid;
  place-items: center;
  width: 100%;
}

.modal__value {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-align: center;
  width: 100%;
}

.modal--confirm .modal__content {
  width: min(360px, 90%);
  padding: 1.4rem 1.6rem;
}

#version-history-modal .modal__content {
  width: min(500px, 90vw);
  justify-items: start;
  text-align: left;
}

.modal--confirm .modal__body {
  padding: 0.6rem 0;
}

.modal--confirm .modal__text {
  max-width: 22rem;
}

.scroll-view__list {
  margin-top: 0px;
  overflow: auto;
  padding: 1.5rem;
  flex: 1;
  min-height: 0;
}

.scroll-song {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.6rem 0.4rem;
  border-bottom: 1px dashed var(--stroke);
  font-size: 1rem;
}

.scroll-song.is-encore {
  color: var(--brand);
}

.lyrics {
  line-height: 1.7;
  color: var(--brand);
  user-select: auto;
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
}

.lyrics[data-columns="2"] {
  column-count: 2;
  column-gap: 2rem;
  column-rule: 1px solid var(--stroke);
}

@media (max-width: 768px) {
  .lyrics[data-columns="2"] {
    column-count: 1;
  }
}

.favorites {
  margin-top: 2rem;
}

.favorites-grid {
  display: grid;
  gap: 1rem;
}

.footer {
  text-align: center;
  padding: 0rem 1rem 3rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
}

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

.back-link {
  display: inline-flex;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.admin-body {
  background: var(--bg);
  color: var(--brand);
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  border-bottom: 2px solid var(--brand);
  background: var(--card);
}

.admin-nav a {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.25rem;
}

.admin-nav a:hover {
  border-color: var(--brand);
}

.admin-nav {
  display: flex;
  gap: 1rem;
}

.admin-page {
  padding: 1.5rem 2rem 3rem;
}

.admin-section {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 8px;
  border: 2px solid var(--brand);
}

.admin-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.admin-card {
  display: grid;
  place-items: center;
  border: 2px solid var(--brand);
  border-radius: 8px;
  padding: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--card);
  box-shadow: var(--shadow);
}

.auth {
  display: grid;
  place-items: center;
  min-height: 70vh;
  margin-bottom: -50px;
}

.auth-card {
  display: grid;
  gap: 1.2rem;
  border: 2px solid var(--brand);
  border-radius: 8px;
  padding: 2rem;
  background: var(--card);
  box-shadow: var(--shadow);
  width: min(420px, 100%);
}

.auth-header {
  display: flex;
  justify-content: center;
  margin: 0px;
  padding: 0px;
}

.auth-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.auth-card h1 {
  font-size: 1.8rem;
  margin: 0;
}

.auth-card .form-card {
  margin-top: 0;
}

.auth-switch {
  margin-bottom: 0;
  margin-top: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.setlist-builder {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.setlist-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.setlist-pool {
  display: grid;
  gap: 0.5rem;
}

.setlist-pill {
  border: 2px solid var(--brand);
  border-radius: 6px;
  padding: 0.8rem;
  background: var(--card);
  color: var(--brand);
  text-align: left;
  cursor: pointer;
  font-weight: inherit;
  font-size: inherit;
  font-family: inherit;
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin: 0;
}

.setlist-pill__content {
  min-width: 0;
  overflow: hidden;
  display: block;
}

.setlist-pill:hover {
  box-shadow: 0 4px 12px rgba(0, 87, 183, 0.15);
  transform: translateY(-1px);
}

.setlist-pill:active {
  transform: translateY(0);
}

.setlist-pill__title {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  display: block;
  max-width: 100%;
}

.setlist-pill__title[data-scrollable="true"] {
  overflow: hidden;
  text-overflow: clip;
  max-width: none;
  width: max-content;
  display: block;
}

.setlist-pill__title[data-scrollable="true"]:hover {
  animation-play-state: paused;
}

.setlist-current {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.setlist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border: 2px solid var(--brand);
  border-radius: 6px;
  padding: 0.8rem;
  background: var(--card);
  min-width: 0;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.setlist-item:hover {
  box-shadow: 0 4px 12px rgba(0, 87, 183, 0.12);
}

.setlist-item__content {
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

.setlist-item__title {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  display: block;
  max-width: 100%;
}

.setlist-item__title[data-scrollable="true"] {
  overflow: hidden;
  text-overflow: clip;
  max-width: none;
  width: max-content;
}

.setlist-item.is-dragging,
.setlist-item[data-dragging="true"] {
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.2);
  opacity: 0.92;
}

.setlist-remove {
  border: none;
  background: transparent;
  color: #ff4d4d;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  font-family: inherit;
  font-size: inherit;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.drag-hint {
  color: var(--muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.setlist-order.is-reordering .drag-hint {
  opacity: 1;
}

.song-list.is-reordering .swipe-actions {
  display: none;
}

.modal__actions {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  width: 100%;
}

.modal__text {
  margin: 0;
}

.admin-section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.admin-table th,
.admin-table td {
  padding: 0.6rem;
  border-bottom: 1px solid var(--stroke);
  text-align: left;
}

.admin-login {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem;
}

.form-card {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.version-info {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.version-item {
  display: grid;
  gap: 0.5rem;
}

.version-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.version-value {
  margin: 0;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--brand);
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.version-history {
  display: grid;
  gap: 1rem;
}

.version-entry {
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--stroke);
  border-radius: 4px;
}

.version-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.version-entry-title {
  margin: 0;
  font-weight: 700;
  color: var(--brand);
  font-size: 1rem;
  font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.version-entry-date {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.version-entry-changes {
  margin: 0;
  padding-left: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.4;
}

.version-entry-changes li {
  margin-bottom: 0.4rem;
}

.version-entry-changes li:last-child {
  margin-bottom: 0;
}

.error {
  color: #ff4d4d;
}

.msg-ok {
  background: var(--brand);
  color: var(--accent);
  border-radius: 6px;
  padding: 0.7rem 0.9rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@keyframes slide-up {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  .controls {
    flex-wrap: wrap;
  }

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

  .gig-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .gig-detail__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .scroll-view__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .scroll-view__text-container {
    width: 100%;
  }

  .scroll-view__controls {
    width: 100%;
    justify-content: center;
  }
}

/* Elementos seleccionables de contenido */
.gig-card,
.gig-card__meta,
.gig-card__date,
.scroll-view__artist,
.scroll-view__meta,
.scroll-view__info {
  user-select: auto;
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
}

.scroll-view__artist {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin: 0;
}

.scroll-view__meta {
  margin: 0.3rem 0 0;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.scroll-view__artist[data-scrollable="true"],
.scroll-view__meta[data-scrollable="true"] {
  overflow: hidden;
  text-overflow: clip;
  max-width: none;
  width: max-content;
}

.scroll-view__artist[data-scrollable="true"]:hover,
.scroll-view__meta[data-scrollable="true"]:hover {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  16.66% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}
