:root {
  --navy: #071a2b;
  --navy-2: #0b263d;
  --cream: #f4e4c1;
  --paper: #fff8e9;
  --orange: #e9783d;
  --orange-2: #f1a15f;
  --blue: #6f9fa6;
  --ink: #102333;
  --muted: #6d7680;
  --line: rgba(7, 26, 43, 0.14);
  --shadow: 0 24px 70px rgba(7, 26, 43, 0.16);
  --radius-lg: 26px;
  --radius-md: 17px;
  --radius-sm: 11px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, rgba(233, 120, 61, 0.12), transparent 32rem),
    linear-gradient(180deg, #fbf4e5 0%, #f7edd8 100%);
  color: var(--ink);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.grain {
  position: fixed;
  inset: 0;
  opacity: 0.07;
  pointer-events: none;
  z-index: 99;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.34'/%3E%3C/svg%3E");
}

.topbar {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  border: 0;
  background: transparent;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Oswald", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: var(--cream);
  background: var(--navy);
}

.text-button, .text-link {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
}

.text-button:hover, .text-link:hover { text-decoration: underline; }

.view { min-height: calc(100vh - 78px); }
.hidden { display: none !important; }

.landing-shell, .event-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

.landing-shell { padding: 54px 0 80px; }

.eyebrow {
  font-family: "Oswald", sans-serif;
  color: var(--orange);
  font-weight: 700;
  letter-spacing: .14em;
  font-size: .78rem;
}

.landing-copy { max-width: 880px; }

.landing-copy h1,
.event-heading h1 {
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  line-height: .98;
  letter-spacing: -0.025em;
  color: var(--navy);
  margin: 12px 0 18px;
}

.landing-copy h1 {
  font-size: clamp(3.2rem, 8vw, 6.9rem);
}

.landing-copy h1 span { color: var(--orange); }

.lede {
  max-width: 760px;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.22rem);
  line-height: 1.65;
  color: #4d5962;
}

.landing-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: 1.35fr .9fr;
  gap: 22px;
}

.panel {
  position: relative;
  padding: 30px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.35);
}

.create-panel {
  background: var(--navy);
  color: var(--paper);
}

.join-panel {
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(12px);
}

.panel-number {
  position: absolute;
  top: 25px;
  right: 28px;
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
  opacity: .22;
}

.panel h2 {
  margin: 0 0 7px;
  font-family: "Oswald", sans-serif;
  font-size: 2rem;
}

.panel p {
  margin: 0 0 24px;
  line-height: 1.55;
  opacity: .75;
}

.stack { display: grid; gap: 17px; }

label, legend {
  font-size: .84rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.optional { font-weight: 500; opacity: .55; }

input, select {
  width: 100%;
  margin-top: 8px;
  border: 1px solid rgba(7,26,43,.14);
  border-radius: var(--radius-sm);
  padding: 13px 14px;
  color: var(--ink);
  background: rgba(255,255,255,.92);
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}

.create-panel input {
  color: var(--paper);
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.17);
}

.create-panel input::placeholder { color: rgba(255,255,255,.42); }
.create-panel input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .8; }

input:focus, select:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(233,120,61,.16);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
}

.primary-button,
.secondary-button,
.ghost-button {
  min-height: 48px;
  border-radius: 12px;
  border: 0;
  padding: 0 18px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.primary-button {
  background: var(--orange);
  color: white;
}

.primary-button:hover { background: #d96731; }

.secondary-button {
  background: var(--cream);
  color: var(--navy);
}

.join-panel .secondary-button {
  background: var(--navy);
  color: var(--cream);
}

.ghost-button {
  background: rgba(255,255,255,.66);
  color: var(--navy);
  border: 1px solid var(--line);
}

.compact {
  min-height: 43px;
  padding: 0 15px;
  justify-content: center;
}

.tiny-note {
  margin-top: 22px;
  font-size: .78rem;
  line-height: 1.5;
  color: var(--muted);
}

.code-input {
  font-family: "Oswald", sans-serif;
  font-size: 1.5rem;
  letter-spacing: .15em;
  text-transform: uppercase;
}

/* EVENT */
.event-shell { padding: 35px 0 70px; }

.event-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 34px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--navy);
  box-shadow: var(--shadow);
}

.event-art-wrap {
  position: relative;
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  background: #f2dfb9;
  box-shadow: 0 18px 40px rgba(0,0,0,.24);
}

.event-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-art-edit {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;

  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;

  background: rgba(8, 25, 43, 0.88);
  color: #fff;

  font: inherit;
  font-weight: 700;
  cursor: pointer;

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  z-index: 2;
}

.event-art-edit:hover {
  background: rgba(8, 25, 43, 0.96);
}

.event-art-edit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.event-heading h1 {
  color: var(--paper);
  font-size: clamp(2.7rem, 6vw, 5rem);
  margin-bottom: 12px;
}

.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: rgba(255,255,255,.68);
  min-height: 24px;
}

.event-actions {
  margin-top: 25px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.event-hero .ghost-button {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.15);
  color: var(--paper);
}

.event-code-row {
  margin-top: 19px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.48);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.event-code {
  border: 1px dashed rgba(255,255,255,.3);
  background: transparent;
  color: var(--cream);
  border-radius: 8px;
  padding: 7px 10px;
  font-family: "Oswald", sans-serif;
  letter-spacing: .14em;
}

.queue-toolbar {
  padding: 38px 4px 18px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.queue-toolbar h2 {
  margin: 5px 0 0;
  color: var(--navy);
  font-family: "Oswald", sans-serif;
  font-size: 2.05rem;
}

.toolbar-controls { display: flex; gap: 9px; }
.toolbar-controls select { width: auto; min-width: 145px; margin: 0; background: rgba(255,255,255,.7); }

.queue-list {
  display: grid;
  gap: 11px;
}

.song-card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 15px;
  align-items: center;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(7,26,43,.08);
  box-shadow: 0 10px 24px rgba(7,26,43,.055);
}

.rank {
  width: 34px;
  text-align: center;
  color: rgba(7,26,43,.35);
  font-family: "Oswald", sans-serif;
  font-size: 1.15rem;
}

.song-main { min-width: 0; }
.song-title {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vibe-pill {
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(111,159,166,.13);
  color: #315b64;
  font-size: .76rem;
  font-weight: 800;
  white-space: nowrap;
}

.vote-button {
  min-width: 62px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  border-radius: 11px;
  padding: 9px 10px;
  font-weight: 800;
}

.vote-button.voted {
  background: var(--orange);
  border-color: var(--orange);
  color: white;
}

.song-menu {
  border: 0;
  background: transparent;
  color: #9a6a5b;
  font-size: 1.2rem;
  padding: 8px;
}

.empty-state {
  text-align: center;
  padding: 70px 20px;
  border: 1px dashed rgba(7,26,43,.18);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.35);
}

.empty-icon { font-size: 2.5rem; }
.empty-state h3 { margin: 11px 0 5px; font-size: 1.35rem; }
.empty-state p { margin: 0 0 20px; color: var(--muted); }

.event-footer {
  padding: 32px 4px 0;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

/* MODALS */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4,14,24,.72);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(540px, 100%);
  position: relative;
  background: var(--paper);
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,.34);
}

.small-modal { width: min(430px, 100%); }

.modal-card h2 {
  margin: 6px 0 4px;
  font-family: "Oswald", sans-serif;
  color: var(--navy);
  font-size: 2.2rem;
}

.modal-subtitle {
  color: var(--muted);
  margin: 0 0 22px;
  line-height: 1.5;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 17px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(7,26,43,.06);
  color: var(--navy);
  font-size: 1.4rem;
}

.vibe-picker {
  border: 0;
  padding: 0;
  margin: 0;
}

.vibe-picker legend { margin-bottom: 9px; }

.vibe-picker > label {
  display: inline-block;
  margin: 0 5px 7px 0;
}

.vibe-picker input { position: absolute; opacity: 0; pointer-events: none; }
.vibe-picker span {
  display: inline-block;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 11px;
  background: white;
  font-size: .8rem;
}

.vibe-picker input:checked + span {
  border-color: var(--orange);
  background: rgba(233,120,61,.11);
  color: #a44621;
}

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--navy);
  color: white;
  padding: 11px 16px;
  border-radius: 999px;
  box-shadow: 0 14px 35px rgba(0,0,0,.22);
  font-weight: 700;
  font-size: .86rem;
}

/* RESPONSIVE */
@media (max-width: 800px) {
  .landing-shell { padding-top: 34px; }
  .landing-grid { grid-template-columns: 1fr; }
  .event-hero { grid-template-columns: 145px 1fr; gap: 22px; }
  .event-actions { gap: 7px; }
  .queue-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-controls { width: 100%; }
  .toolbar-controls select { flex: 1; min-width: 0; }
}

@media (max-width: 590px) {
  .topbar { height: 67px; }
  .view { min-height: calc(100vh - 67px); }
  .landing-shell, .event-shell, .topbar { width: min(100% - 22px, 1160px); }
  .landing-copy h1 { font-size: clamp(3.05rem, 16vw, 4.6rem); }
  .panel { padding: 23px; }
  .field-row { grid-template-columns: 1fr; }
  .event-shell { padding-top: 18px; }
  .event-hero {
    grid-template-columns: 94px 1fr;
    align-items: start;
    padding: 17px;
    border-radius: 20px;
  }
  .event-heading h1 { font-size: 2.55rem; }
  .event-meta { font-size: .8rem; }
  .event-actions {
    grid-column: 1 / -1;
  }
  .event-actions .compact { flex: 1 1 46%; }
  .event-code-row { grid-column: 1 / -1; }
  .song-card {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
  }
  .rank { display: none; }
  .vibe-pill { grid-column: 1; width: max-content; }
  .vote-button { grid-column: 2; grid-row: 1 / span 2; }
  .song-menu { grid-column: 2; }
  .event-footer { flex-direction: column; align-items: flex-start; }
  .modal-card { padding: 24px 19px 20px; }
}


/* ---------- v1.1 MUSIC SEARCH ---------- */
.song-modal-card {
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 32px));
  overflow-y: auto;
}

.search-label {
  display: block;
}

.music-search-wrap {
  position: relative;
  margin-top: 8px;
}

.music-search-wrap input {
  margin: 0;
  padding-left: 43px;
  padding-right: 42px;
  min-height: 52px;
  font-size: 1rem;
}

.music-search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--muted);
  z-index: 2;
}

.search-spinner {
  position: absolute;
  right: 16px;
  top: 50%;
  width: 17px;
  height: 17px;
  margin-top: -8.5px;
  border: 2px solid rgba(7,26,43,.16);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.search-hint {
  min-height: 22px;
  margin: 10px 2px 7px;
  color: var(--muted);
  font-size: .8rem;
}

.music-results {
  display: grid;
  gap: 8px;
  max-height: 390px;
  overflow-y: auto;
  padding-right: 3px;
}

.music-result {
  width: 100%;
  display: grid;
  grid-template-columns: 58px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(7,26,43,.09);
  border-radius: 14px;
  padding: 9px;
  text-align: left;
  background: rgba(255,255,255,.78);
  color: var(--ink);
}

.music-result:hover,
.music-result:focus-visible {
  border-color: rgba(233,120,61,.6);
  background: white;
  outline: none;
  box-shadow: 0 8px 22px rgba(7,26,43,.08);
}

.music-result-art {
  width: 58px;
  height: 58px;
  border-radius: 9px;
  object-fit: cover;
  background: rgba(7,26,43,.06);
}

.music-result-copy {
  min-width: 0;
}

.music-result-title {
  color: var(--navy);
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-result-meta,
.music-result-album {
  margin-top: 2px;
  color: var(--muted);
  font-size: .78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-result-add {
  font-size: 1.25rem;
  color: var(--orange);
  padding: 0 7px;
}

.manual-link,
.back-search-button {
  border: 0;
  background: transparent;
  color: var(--navy);
  font-weight: 800;
}

.manual-link {
  width: 100%;
  padding: 16px 6px 0;
  text-align: center;
  font-size: .82rem;
  text-decoration: underline;
}

.back-search-button {
  padding: 0;
  margin-bottom: 18px;
}

.selected-track {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 18px;
  align-items: center;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 18px;
  background: white;
  border: 1px solid rgba(7,26,43,.08);
}

.selected-track-art {
  width: 112px;
  height: 112px;
  object-fit: cover;
  border-radius: 14px;
  background: rgba(7,26,43,.06);
}

.selected-track-copy { min-width: 0; }

.selected-track-title {
  font-family: "Oswald", sans-serif;
  font-size: 1.55rem;
  line-height: 1.08;
  color: var(--navy);
}

.selected-track-artist {
  margin-top: 7px;
  font-weight: 800;
}

.selected-track-album {
  margin-top: 4px;
  color: var(--muted);
  font-size: .84rem;
}

.song-card {
  grid-template-columns: auto 48px 1fr auto auto;
}

.queue-artwork {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(7,26,43,.06);
}

.queue-artwork-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(7,26,43,.05);
  color: rgba(7,26,43,.35);
}

@media (max-width: 590px) {
  .music-results { max-height: 46vh; }
  .selected-track {
    grid-template-columns: 84px 1fr;
    padding: 12px;
  }
  .selected-track-art {
    width: 84px;
    height: 84px;
  }
  .song-card {
    grid-template-columns: 44px 1fr auto;
  }
  .queue-artwork, .queue-artwork-placeholder {
    width: 44px;
    height: 44px;
  }
  .song-card .rank { display: none; }
  .song-card .song-main { grid-column: 2; }
  .song-card .vibe-pill { grid-column: 2; width: max-content; }
  .song-card .vote-button { grid-column: 3; grid-row: 1 / span 2; }
  .song-card .song-menu { grid-column: 3; }
}


/* ---------- v1.2 DUPLICATES + DJ CONTROLS ---------- */

.request-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(111,159,166,.15);
  color: #b8d7db;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .03em;
  text-transform: none;
}

.request-status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: #77c792;
}

.request-status-pill.closed {
  color: #ffc7b2;
  background: rgba(233,120,61,.13);
}

.request-status-pill.closed::before {
  background: var(--orange);
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.duplicate-track-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  align-items: center;
  margin: 18px 0 22px;
  padding: 13px;
  border: 1px solid rgba(7,26,43,.09);
  border-radius: 16px;
  background: white;
}

.duplicate-art {
  width: 78px;
  height: 78px;
  border-radius: 11px;
  object-fit: cover;
}

.duplicate-title {
  color: var(--navy);
  font-weight: 800;
  font-size: 1.05rem;
}

.duplicate-artist {
  margin-top: 3px;
  color: var(--muted);
  font-size: .88rem;
}

.duplicate-votes {
  margin-top: 8px;
  color: var(--orange);
  font-weight: 800;
  font-size: .8rem;
}

.duplicate-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.dj-modal-card {
  width: min(590px, 100%);
}

.dj-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 22px 0;
}

.dj-stat {
  padding: 16px;
  border-radius: 16px;
  background: white;
  border: 1px solid rgba(7,26,43,.08);
}

.dj-stat span {
  display: block;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
}

.dj-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--navy);
  font-family: "Oswald", sans-serif;
  font-size: 1.8rem;
}

.dj-control-row,
.dj-danger-zone {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 17px 0;
  border-top: 1px solid rgba(7,26,43,.1);
}

.dj-control-row h3,
.dj-danger-zone h3 {
  margin: 0 0 3px;
  color: var(--navy);
  font-size: 1rem;
}

.dj-control-row p,
.dj-danger-zone p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
  line-height: 1.45;
}

.dj-danger-zone {
  margin-top: 2px;
}

.danger-button {
  min-height: 43px;
  border: 0;
  border-radius: 12px;
  padding: 0 15px;
  background: #a83f32;
  color: white;
  font-weight: 800;
}

.danger-button:hover {
  background: #8d3228;
}

.dj-delete {
  color: #a83f32;
}

.owner-badge {
  display: inline-block;
  margin-left: 7px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(233,120,61,.1);
  color: #b9552a;
  font-size: .67rem;
  font-weight: 800;
  vertical-align: 1px;
}

@media (max-width: 590px) {
  .duplicate-actions {
    grid-template-columns: 1fr;
  }

  .dj-control-row,
  .dj-danger-zone {
    grid-template-columns: 1fr;
  }

  .dj-control-row button,
  .dj-danger-zone button {
    width: 100%;
  }
}


/* ---------- v1.3 INVITES + CREW ---------- */

.crew-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: #dce7e7;
  font-size: .72rem;
  font-weight: 800;
}

.crew-pill:hover {
  background: rgba(255,255,255,.11);
}

.share-modal-card {
  width: min(720px, 100%);
}

.share-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: center;
  margin-top: 20px;
}

.qr-card {
  padding: 15px;
  border-radius: 20px;
  background: white;
  border: 1px solid rgba(7,26,43,.08);
  box-shadow: 0 12px 28px rgba(7,26,43,.08);
}

.qr-code {
  width: 100%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.qr-code img,
.qr-code canvas {
  width: 100% !important;
  height: 100% !important;
}

.share-event-name {
  color: var(--navy);
  font-family: "Oswald", sans-serif;
  font-size: 1.55rem;
  line-height: 1.05;
  margin-bottom: 17px;
}

.share-code-block,
.share-link-block {
  margin-top: 13px;
}

.share-code-block > span,
.share-link-block > span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.share-code-button {
  border: 1px dashed rgba(7,26,43,.24);
  border-radius: 10px;
  background: white;
  color: var(--navy);
  padding: 8px 11px;
  font-family: "Oswald", sans-serif;
  font-size: 1.15rem;
  letter-spacing: .15em;
}

.share-link-preview {
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(7,26,43,.05);
  color: var(--muted);
  font-size: .76rem;
  line-height: 1.35;
  word-break: break-all;
}

.local-warning {
  margin-top: 13px;
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(233,120,61,.12);
  color: #9a4724;
  font-size: .75rem;
  line-height: 1.4;
  font-weight: 700;
}

.share-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.crew-list {
  display: grid;
  gap: 8px;
  max-height: 390px;
  overflow-y: auto;
}

.crew-member {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 10px;
  border-radius: 13px;
  background: white;
  border: 1px solid rgba(7,26,43,.08);
}

.crew-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--cream);
  font-family: "Oswald", sans-serif;
  font-weight: 700;
  font-size: 1.03rem;
}

.crew-name {
  color: var(--navy);
  font-weight: 800;
}

.crew-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: .74rem;
}

.crew-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 800;
}

.crew-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b4babd;
}

.crew-status.active {
  color: #3b7950;
}

.crew-status.active::before {
  background: #70c68e;
}

.crew-dj-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(233,120,61,.12);
  color: #b9552a;
  font-size: .62rem;
  font-weight: 800;
}

.dj-crew-section {
  padding: 17px 0;
  border-top: 1px solid rgba(7,26,43,.1);
}

.dj-section-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.dj-section-heading h3 {
  margin: 0 0 3px;
  color: var(--navy);
  font-size: 1rem;
}

.dj-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: .8rem;
}

.dj-section-heading strong {
  font-family: "Oswald", sans-serif;
  color: var(--navy);
  font-size: 1.6rem;
}

.compact-crew-list {
  max-height: 205px;
}

.compact-crew-list .crew-member {
  padding: 8px;
}

.compact-crew-list .crew-avatar {
  width: 32px;
  height: 32px;
  font-size: .9rem;
}

@media (max-width: 640px) {
  .share-layout {
    grid-template-columns: 1fr;
  }

  .qr-card {
    width: min(250px, 80%);
    justify-self: center;
  }

  .share-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- v1.4 MOBILE POLISH ---------- */

@media (max-width: 590px) {
    /* Give the event page a little breathing room */
    .event-shell {
        width: calc(100% - 20px);
        padding-top: 12px;
    }

    /* Hero becomes a true single-column mobile card */
    .event-hero {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 16px;
        overflow: hidden;
    }

    /* Artwork gets a useful mobile size instead of staying tiny */
    .event-art-wrap {
        width: 100%;
        max-width: 180px;
        margin: 0 auto 18px;
    }

    /* Heading owns its full row */
    .event-heading {
        min-width: 0;
        width: 100%;
    }

        .event-heading h1 {
            font-size: clamp(2.35rem, 12vw, 3.25rem);
            line-height: 1;
            overflow-wrap: anywhere;
        }

    .event-meta {
        width: 100%;
        gap: 7px 14px;
        font-size: .8rem;
    }

    /* Action buttons stay inside the hero */
    .event-actions {
        width: 100%;
        margin-top: 20px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

        .event-actions .compact {
            width: 100%;
            min-width: 0;
            padding-left: 10px;
            padding-right: 10px;
        }

            /* If there are 3 buttons, last button gets a full row */
            .event-actions .compact:last-child:nth-child(odd) {
                grid-column: 1 / -1;
            }

    /* Code / request status / crew area */
    .event-code-row {
        width: 100%;
        margin-top: 15px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .event-code {
        flex: 0 0 auto;
    }

    .request-status-pill,
    .crew-pill {
        flex: 0 0 auto;
        max-width: 100%;
    }

    /* Queue header */
    .queue-toolbar {
        padding-top: 28px;
    }

    /* Song cards need room for long song/artist names */
    .song-card {
        min-width: 0;
    }

    .song-main {
        min-width: 0;
    }

    /* Modals fit small phones better */
    .modal-backdrop {
        padding: 10px;
    }

    .modal-card {
        max-height: calc(100dvh - 20px);
        overflow-y: auto;
    }

    .song-modal-card {
        max-height: calc(100dvh - 20px);
    }

    .music-results {
        max-height: 42dvh;
    }
}


/* Extra-small phones */
@media (max-width: 390px) {
    .event-actions {
        grid-template-columns: 1fr;
    }

        .event-actions .compact {
            grid-column: 1;
        }

    .event-heading h1 {
        font-size: 2.25rem;
    }

    .event-code-row {
        font-size: .7rem;
    }

    .crew-pill,
    .request-status-pill {
        font-size: .67rem;
        padding-left: 8px;
        padding-right: 8px;
    }

    .music-result {
        grid-template-columns: 48px 1fr auto;
        gap: 9px;
    }

    .music-result-art {
        width: 48px;
        height: 48px;
    }
}

/* ---------- ACCOUNT UI ---------- */

.account-summary {
  display: grid;
  gap: 3px;
  padding: 15px;
  margin: 18px 0;
  border: 1px solid rgba(7, 26, 43, .08);
  border-radius: 14px;
  background: white;
}

.account-summary strong {
  color: var(--navy);
  font-size: 1.05rem;
}

.account-summary span {
  color: var(--muted);
  font-size: .84rem;
  overflow-wrap: anywhere;
}

.account-summary small {
  margin-top: 5px;
  color: #3b7950;
  font-weight: 700;
}

.account-actions {
  margin-top: 12px;
}

.export-modal-card {
  max-width: 620px;
}

.export-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 6px 16px;
  align-items: start;

  padding: 18px;
  margin-top: 16px;

  border: 1px solid rgba(7, 26, 43, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.export-step-number {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  grid-row: 1 / 3;

  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);

  font-weight: 800;
}

.export-step-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.export-step-copy strong {
  color: var(--navy);
  font-size: 1rem;
}

.export-step-copy span {
  color: var(--muted);
  line-height: 1.45;
}

.export-step .primary-button,
.export-step .secondary-button {
  grid-column: 2;
  justify-self: start;
  margin-top: 10px;
}

.export-link {
  text-decoration: none;
  text-align: center;
}