:root {
  --midnight: #0b1630;
  --navy: #13244a;
  --navy-2: #1b3263;
  --gold: #c9a45c;
  --gold-light: #e2c78f;
  --ivory: #faf6ee;
  --ivory-2: #f2ead9;
  --ink: #1d2333;
  --muted: #5b6275;
  --white: #ffffff;
  --danger: #8f2d2d;
  --ok: #1f6b4a;
  --line: #e6dcc6;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow: 0 14px 40px rgba(11, 22, 48, 0.1);
  --radius: 16px;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--ivory);
  line-height: 1.55;
  font-size: 1.0625rem;
}
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }
a { color: inherit; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
  margin: 0 0 0.45rem;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--midnight);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, opacity 0.2s;
}
.btn:hover, .btn:focus-visible {
  background: var(--gold-light);
  border-color: var(--gold-light);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--gold); }
.btn-outline:hover, .btn-outline:focus-visible { background: var(--gold); color: var(--midnight); }
.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--navy);
  letter-spacing: 0.04em;
  padding: 0.5rem 0.7rem;
}
.btn-ghost:hover, .btn-ghost:focus-visible { background: var(--ivory-2); border-color: transparent; }
.btn-tiny { font-size: 0.72rem; padding: 0.4rem 0.7rem; }
.btn-danger { background: transparent; color: var(--danger); border-color: #e3c1c1; }
.btn-danger:hover, .btn-danger:focus-visible { background: #f8ecec; border-color: #e3c1c1; color: var(--danger); }
.btn-block { width: 100%; }

.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 0.9rem; }
label, .label { font-weight: 700; font-size: 0.88rem; color: var(--navy); }
label .opt, .opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="password"], input[type="search"], input[type="date"], textarea {
  font-size: 1rem;
  color: var(--ink);
  padding: 0.8rem 0.9rem;
  border: 1px solid #cfc6b3;
  border-radius: 10px;
  background: var(--white);
  width: 100%;
}
input:focus, textarea:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
  border-color: var(--gold);
}
textarea { min-height: 88px; resize: vertical; }
.search-wrap { position: relative; }
.search-wrap input { padding-left: 2.6rem; }
.search-wrap .icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

.banner {
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}
.banner-warn { background: #f8ecec; color: var(--danger); border: 1px solid #e3c1c1; }
.banner-ok { background: #e8f4ee; color: var(--ok); border: 1px solid #c6e0d2; }
.banner-info { background: var(--ivory-2); color: var(--navy); border: 1px solid var(--line); }
.hidden { display: none !important; }

/* Brand header */
.topbar {
  background: var(--midnight);
  color: var(--ivory);
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.brand img, .brand svg { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 8px; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.1; }
.brand-name span { color: var(--gold); }
.brand-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  font-weight: 700;
  margin-top: 0.15rem;
}

/* Landing */
.landing { min-height: 100vh; display: flex; flex-direction: column; }
.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
  background:
    radial-gradient(120% 80% at 100% 0%, var(--navy-2), transparent 55%),
    var(--midnight);
  color: var(--ivory);
}
.landing-hero h1 {
  font-size: clamp(2.6rem, 12vw, 4.4rem);
  color: var(--ivory);
  margin: 0 0 0.25em;
}
.landing-hero .tagline {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 4vw, 1.7rem);
  color: var(--gold-light);
  margin-bottom: 1.4rem;
}
.landing-card {
  background: var(--ivory);
  color: var(--ink);
  border-radius: 18px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  max-width: 440px;
}
.landing-card h2 { color: var(--navy); font-size: 1.7rem; }
.landing footer, .site-foot {
  background: var(--midnight);
  color: #b9b6ae;
  text-align: center;
  padding: 1.1rem;
  font-size: 0.85rem;
}
.dj-entry { margin-top: 1.2rem; font-size: 0.92rem; color: #d9d6cf; }
.dj-entry a { color: var(--gold-light); font-weight: 700; text-decoration: none; }

/* Guest */
.guest-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--ivory); }
.guest-main { flex: 1; width: min(560px, 100%); margin: 0 auto; padding: 1.25rem 1.1rem 2.5rem; }
.couple {
  text-align: center;
  margin: 0.4rem 0 1.3rem;
}
.couple h1 {
  font-size: clamp(2.2rem, 10vw, 3.2rem);
  color: var(--navy);
  margin: 0;
}
.couple .when { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }

.results, .queue { display: grid; gap: 0.65rem; margin: 0.8rem 0 1.4rem; }
.song-row, .queue-card, .request-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.6rem;
  box-shadow: 0 6px 18px rgba(11, 22, 48, 0.04);
  text-align: left;
  width: 100%;
  color: inherit;
  cursor: pointer;
}
.song-row:hover, .song-row:focus-visible { border-color: var(--gold); }
.cover {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--navy);
}
.song-meta { min-width: 0; }
.song-title {
  font-weight: 700;
  color: var(--navy);
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}
.song-artist { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.88rem; }
.badge {
  display: inline-block;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  margin-top: 0.25rem;
}
.badge-explicit { background: var(--midnight); color: var(--gold-light); }
.badge-clean { background: var(--ivory-2); color: var(--navy); border: 1px solid var(--line); }
.badge-sample { background: var(--gold); color: var(--midnight); }

.vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  border: 0;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 10px;
}
.vote:hover, .vote:focus-visible { background: var(--ivory-2); }
.vote.on { color: #8a6a2a; }
.vote .count { font-weight: 700; font-size: 0.95rem; line-height: 1; }
.vote svg { width: 22px; height: 22px; }

.compose-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}
.compose-song {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.85rem;
  align-items: center;
  margin-bottom: 1rem;
}
.compose-song .cover { width: 72px; height: 72px; }
.manual-link {
  display: inline-block;
  margin: 0.2rem 0 0.8rem;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  border-bottom: 1px solid var(--gold);
  padding-bottom: 0.05rem;
}

.confirm {
  text-align: center;
  padding: 1.5rem 0.4rem 0.5rem;
}
.confirm-mark {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--gold);
  color: var(--midnight);
  display: grid;
  place-items: center;
}
.confirm-mark svg { width: 36px; height: 36px; }
.confirm h2 { font-size: 2.3rem; color: var(--navy); }
.confirm .lead { color: var(--muted); margin-bottom: 1.3rem; }
.confirm .picked {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.9rem;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem;
  margin-bottom: 1.3rem;
}
.shout-echo { font-style: italic; color: var(--navy); margin-top: 0.35rem; }

.section-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  color: var(--navy);
  margin: 1.3rem 0 0.2rem;
}
.empty { color: var(--muted); font-size: 0.95rem; }

/* DJ */
.dj-page { min-height: 100vh; background: var(--ivory-2); }
.dj-shell { display: grid; min-height: 100vh; }
.dj-side {
  background: var(--midnight);
  color: var(--ivory);
  padding: 1.1rem;
}
.dj-side .brand { margin-bottom: 1.2rem; }
.event-list { display: grid; gap: 0.45rem; margin: 0.8rem 0 1.2rem; }
.event-link {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid rgba(201, 164, 92, 0.25);
  color: #e7e2d6;
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
}
.event-link:hover, .event-link:focus-visible, .event-link.on {
  border-color: var(--gold);
  background: rgba(201, 164, 92, 0.1);
  color: var(--ivory);
}
.event-link b { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 600; color: var(--gold-light); }
.event-link small { color: #b9b6ae; }
.dj-main { padding: 1.1rem; }
.dj-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.dj-title h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); color: var(--navy); margin: 0; }
.tabs {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}
.tab.on { background: var(--midnight); color: var(--gold-light); }
.panel { display: none; }
.panel.on { display: block; }

.dj-request {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 8px 20px rgba(11, 22, 48, 0.05);
}
.dj-request-top {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.8rem;
  align-items: start;
}
.dj-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.votes-pill {
  text-align: center;
  min-width: 52px;
  background: var(--ivory-2);
  border-radius: 10px;
  padding: 0.35rem 0.4rem;
  color: var(--navy);
}
.votes-pill b { display: block; font-size: 1.15rem; line-height: 1; }
.votes-pill span { font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; }
.shoutout {
  margin: 0.7rem 0 0;
  background: var(--ivory);
  border-left: 3px solid var(--gold);
  padding: 0.55rem 0.75rem;
  border-radius: 0 10px 10px 0;
  color: var(--navy);
  font-style: italic;
}
.shoutout .from { display: block; font-style: normal; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 0.15rem; }
.status-chip {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--ivory-2);
  color: var(--navy);
}
.status-played { background: #e8f4ee; color: var(--ok); }
.status-skipped { background: #f8ecec; color: var(--danger); }
.status-not_now { background: #efe8d6; color: #6a5420; }

.list-editor { display: grid; gap: 0.6rem; margin-top: 0.6rem; }
.list-item {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
}
.list-item p { margin: 0; }
.form-row { display: grid; gap: 0.6rem; }
.login-box {
  width: min(420px, 100% - 2rem);
  margin: 3rem auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.6rem 1.3rem;
  box-shadow: var(--shadow);
}
.login-box h1 { color: var(--navy); }
.toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  color: var(--navy);
}
.toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); }

.meta-line { color: var(--muted); font-size: 0.88rem; margin: 0.15rem 0 0; }

/* Printable table card */
.card-tools {
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem 1rem 0;
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}
.sheet {
  padding: 1.5rem 1rem 3rem;
  display: flex;
  justify-content: center;
}
.table-card {
  width: 5in;
  min-height: 7in;
  background: var(--ivory);
  color: var(--ink);
  border: 10px solid var(--midnight);
  box-shadow: var(--shadow);
  padding: 0.55in 0.4in 0.45in;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.table-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid var(--gold);
  pointer-events: none;
}
.logo-slot {
  width: auto;
  min-width: 1.35in;
  height: auto;
  border: none;
  background: transparent;
  display: grid;
  place-items: center;
  margin-bottom: 0.28in;
  overflow: hidden;
}
.logo-slot .wordmark {
  font-family: var(--serif);
  font-size: 1.85rem;
  color: var(--navy);
  margin: 0;
  line-height: 1.05;
}
.logo-slot .wordmark span { color: #8a6a2a; }
.logo-slot.has-image {
  width: 1.35in;
  height: 1.15in;
  border: 2px solid var(--gold);
  border-radius: 12px;
  background: rgba(201, 164, 92, 0.08);
}
.logo-slot img { width: 100%; height: 100%; object-fit: contain; background: var(--midnight); }
.logo-slot .hint {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 0.3rem;
}
.table-card .hosts {
  font-family: var(--serif);
  font-size: 2.15rem;
  color: var(--navy);
  margin: 0 0 0.15em;
  line-height: 1.1;
}
.table-card .prompt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.2rem;
  color: #5b6275;
  margin: 0 0 0.22in;
}
.table-card .when-line {
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 0.22in;
}
.qr-frame {
  width: 2.3in;
  height: 2.3in;
  padding: 0.12in;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 0.28in;
}
.qr-frame img, .qr-frame svg { width: 100%; height: 100%; }
.table-card .code-line {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.3in;
}
.table-card .code-line b {
  display: block;
  font-family: var(--sans);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--navy);
  margin-top: 0.15rem;
}
.table-card .card-brand {
  margin-top: auto;
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--navy);
}
.table-card .card-brand span { color: #8a6a2a; }

@media (min-width: 900px) {
  .dj-shell { grid-template-columns: 280px 1fr; }
  .dj-side { min-height: 100vh; }
  .dj-main { padding: 1.5rem 1.8rem 3rem; }
  .form-row.two { grid-template-columns: 1fr 1fr; }
  .landing-hero { padding: 4rem 8vw; }
}

@media print {
  .no-print { display: none !important; }
  body { background: white; }
  .sheet { padding: 0; }
  .table-card { box-shadow: none; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
