/* ── PICKER VIEW ── */
#picker-view {
  padding-bottom: 120px; /* space for sticky gen bar */
  position: relative;
  z-index: 5;
}

.picker-header {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 1.25rem 1.5rem;
}
.picker-header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0.4rem;
}

.picker-controls {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ── PAGE MASTHEAD (scrolls away) ── */
.page-masthead {
  position: relative;
  z-index: 5;
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(200, 255, 0, 0.08);
}

/* ── NAV WITH CONTROLS (sticky) ── */
nav.nav-with-controls {
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.75rem 1.25rem;
}

.sel-count {
  padding-left: 1.25rem;
}

/* ── OUTPUT VIEW ── */
#output-view {
  position: relative;
  z-index: 5;
}

.output-header {
  max-width: 560px;
  margin: 0 auto;
  padding: 3rem 1.25rem 1.5rem;
}
.output-header h1 {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 0;
}

.output-actions {
  padding: 0 0 0.75rem;
}

.output-footer-actions {
  padding: 0.75rem 0 0;
}

/* ── SCHEDULER WRAP (shared output container) ── */
.scheduler-wrap {
  max-width: none;
  margin: 0;
  padding: 0 0 5rem;
  position: relative;
  z-index: 5;
}

/* ── INPUTS ── */
.field-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(154, 123, 191, 0.25);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  padding: 0.7rem 1rem;
  outline: none;
  transition: border-color 0.15s;
  border-radius: 0;
  -webkit-appearance: none;
}
.field-input::placeholder { color: var(--muted); }
.field-input:focus { border-color: var(--acid); }

/* ── DAY / GENRE DROPDOWNS ── */
.day-filter-select {
  width: 100%;
  background: var(--surface);
  border: 1px solid rgba(154, 123, 191, 0.25);
  color: var(--text);
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  padding: 0.7rem 2.5rem 0.7rem 1rem;
  outline: none;
  cursor: pointer;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239a7bbf'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.day-filter-select:focus { border-color: var(--acid); }
.day-filter-select option { background: var(--surface); color: var(--text); }

.select-row {
  display: flex;
  gap: 0.6rem;
}
.select-row .day-filter-select {
  flex: 1;
}

/* ── FESTIVAL LABEL ── */
.festival-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--acid);
  text-align: center;
  padding: 0.75rem 1.25rem 0.4rem;
}

/* ── ARTIST LIST ── */
.sel-count {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.75rem 0 0.4rem;
}

.artist-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid rgba(200, 255, 0, 0.06);
}

.artist-row {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.3rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(200, 255, 0, 0.05);
  border-right: 1px solid rgba(200, 255, 0, 0.05);
  cursor: pointer;
  min-height: 72px;
  min-width: 0;
  overflow: hidden;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.artist-row:nth-child(2n) { border-right: none; }
.artist-row:hover { background: rgba(200,255,0,0.03); }
.artist-row.selected { background: rgba(197, 255, 0, 0.08); border-bottom-color: rgba(200,255,0,0.12); }
.artist-row.selected .artist-name { color: var(--acid); }

.artist-name {
  font-family: 'Syne', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
  transition: color 0.15s;
}

.artist-meta {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tag-row { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 0.25rem; }

.tag {
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acid);
  border: 1px solid rgba(200, 255, 0, 0.2);
  padding: 0.1rem 0.4rem;
}

/* ── STICKY GENERATE BAR ── */
.gen-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--mid);
  border-top: 1px solid rgba(200, 255, 0, 0.12);
  backdrop-filter: blur(8px);
}

.gen-bar-filter {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(154, 123, 191, 0.3);
  padding: 0.5rem 0.85rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.gen-bar-filter:disabled { opacity: 0.35; cursor: not-allowed; }
@media (hover: hover) {
  .gen-bar-filter:not(:disabled):hover { border-color: var(--acid); color: var(--acid); }
}
.gen-bar-filter.active { background: rgba(197, 255, 0, 0.12); border-color: var(--acid); color: var(--acid); }

.gen-bar-btn {
  background: var(--acid);
  color: var(--deep);
  border: none;
  padding: 0.7rem 1.5rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.gen-bar-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.gen-bar-btn:active:not(:disabled) { opacity: 0.85; }

/* ── NAME MODAL ── */
.name-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 0, 16, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.name-modal-overlay.visible {
  opacity: 1;
}
.name-modal-overlay.hidden {
  display: none;
}

.name-modal {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid rgba(200, 255, 0, 0.12);
  border-bottom: none;
  padding: 2rem 1.5rem 2.5rem;
  transform: translateY(24px);
  transition: transform 0.22s ease;
}
.name-modal-overlay.visible .name-modal {
  transform: translateY(0);
}

.name-modal-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--acid);
  margin-bottom: 0.6rem;
}

.name-modal-heading {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 1.25rem;
}
.name-modal-heading em { font-style: normal; color: var(--acid); }

.name-modal-input {
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.name-modal-confirm {
  width: 100%;
  margin-top: 0.25rem;
}

.name-modal-cancel {
  display: block;
  width: 100%;
  margin-top: 0.6rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.5rem;
  text-align: center;
  transition: color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.name-modal-cancel:hover { color: var(--text); }

/* ── BUTTONS ── */
.sched-btn-primary {
  display: block;
  width: 100%;
  padding: 0.85rem;
  background: var(--acid);
  color: var(--deep);
  border: none;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.sched-btn-primary:disabled { opacity: 0.3; cursor: not-allowed; }
.sched-btn-primary:active:not(:disabled) { opacity: 0.85; }

.sched-btn-secondary {
  display: block;
  width: 100%;
  padding: 0.75rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(154, 123, 191, 0.3);
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  margin-top: 0.75rem;
  -webkit-tap-highlight-color: transparent;
}
.sched-btn-secondary:hover { border-color: var(--acid); color: var(--acid); }
.sched-btn-secondary:active { opacity: 0.8; }


/* ── SPINNER ── */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(10,0,16,0.3);
  border-top-color: var(--deep);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── ERROR ── */
.error-msg {
  padding: 0.75rem 1rem;
  background: rgba(255, 60, 172, 0.08);
  border: 1px solid rgba(255, 60, 172, 0.3);
  color: #ff9dd8;
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
}

/* ── SCHEDULE OUTPUT ── */
.day-block { border-bottom: 1px solid rgba(200, 255, 0, 0.06); }
.day-block:last-child { border-bottom: none; }

.day-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acid);
  padding: 1rem 1.25rem 0.4rem;
}

.stage-block { padding: 0.6rem 0.75rem 0.85rem 0.5rem; }

.stage-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: start;
  row-gap: 0.5rem;
}

.time-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0.5rem 0.35rem 0 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  border-right: 1px solid rgba(200, 255, 0, 0.08);
  align-self: stretch;
}

.slot-row {
  padding-left: 0.5rem;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stage-name {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sdot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.sdot-main { background: #C8FF00; }
.sdot-bolt { background: #ff3cac; }
.sdot-tba  { background: #7b2fff; }

.slot-card {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid rgba(200, 255, 0, 0.06);
  margin-bottom: 0.5rem;
  transition: border-color 0.15s;
}
.slot-card:last-child { margin-bottom: 0; }
.slot-card:hover { border-color: rgba(200, 255, 0, 0.15); }

.slot-time {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  color: var(--acid);
  border: 1px solid rgba(200, 255, 0, 0.25);
  padding: 0.25rem 0.5rem;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 48px;
  text-align: center;
  margin-top: 2px;
}

.slot-av {
  width: 32px;
  height: 32px;
  object-fit: cover;
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  border-radius: 0;
}

.slot-info { width: 100%; min-width: 0; }

.slot-name {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.slot-country {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.slot-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-top: 8px; }

.slot-tag {
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--acid);
  border: 1px solid rgba(200, 255, 0, 0.2);
  padding: 0.1rem 0.4rem;
}

.slot-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  flex-shrink: 0;
  padding-top: 2px;
  transition: color 0.15s;
}
.slot-link:hover { color: var(--acid); }

.empty-schedule {
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── IMPORT MODAL ── */
.import-error {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  color: #e74c3c;
  min-height: 1rem;
  margin-bottom: 0.5rem;
}

/* ── LOCK MODALS ── */
.lock-info-msg {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.lock-confirm-yes {
  width: 100%;
  background: #c0392b;
  border-color: #c0392b;
}
.lock-confirm-yes:hover { background: #a93226; border-color: #a93226; }

/* ── PERSON LEGEND ── */
#person-legend {
  padding: 0.5rem 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ── SHARE LINK FALLBACK ── */
.share-link-fallback {
  font-family: 'DM Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  background: rgba(200, 255, 0, 0.07);
  border: 1px solid rgba(200, 255, 0, 0.2);
  padding: 0.6rem 1rem;
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.share-link-fallback span { color: var(--muted); text-transform: uppercase; font-size: 0.55rem; }
.share-link-fallback a { color: var(--acid); word-break: break-all; text-decoration: none; }
.share-link-fallback a:hover { text-decoration: underline; }

.hidden { display: none; }

@media (max-width: 480px) {
  .picker-header { padding-top: 2rem; }
  .gen-bar { padding: 0.75rem 1.25rem; }
}