:root {
  --ink-navy: #16233d;
  --ink-navy-light: #2c3f61;
  --cardstock: #e8ded2;
  --paper: #f7f4ec;
  --foil-gold: #b6924f;
  --foil-gold-dark: #8f7239;
  --stamp-red: #8b1e1e;
  --text-main: #221d15;
  --text-muted: #5b5646;
  --border-soft: #cabf9f;
  --radius-sm: 3px;
  --radius-md: 6px;
  --font-display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  --card-shadow: 3px 3px 0 rgba(22, 35, 61, 0.18);
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--cardstock);
}

a {
  color: var(--ink-navy);
}

a:hover {
  color: var(--foil-gold-dark);
}

:focus-visible {
  outline: 3px solid var(--foil-gold);
  outline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  color: var(--ink-navy);
  line-height: 1.05;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.9rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.7rem);
  font-weight: 700;
  text-transform: uppercase;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
}

/* ---------- Header / footer ---------- */

.site-header {
  padding: 1rem 1.25rem;
  background: var(--ink-navy);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  border-bottom: 4px solid var(--foil-gold);
}

.site-title {
  color: var(--paper);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.25rem);
  letter-spacing: 0.01em;
  text-transform: uppercase;
  line-height: 1.15;
}

.site-title:hover {
  color: var(--paper);
}

.admin-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.admin-nav a {
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
}

.admin-nav a:hover {
  color: var(--foil-gold);
}

.logout-form {
  display: inline;
}

.logout-form button {
  background: none;
  border: 1px solid var(--paper);
  color: var(--paper);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  font: inherit;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.logout-form button:hover {
  background: var(--foil-gold);
  border-color: var(--foil-gold);
  color: var(--ink-navy);
}

.fb-login-btn {
  display: inline-block;
  background: #1877f2;
  color: #fff;
  text-decoration: none;
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
}

.fb-login-btn:hover {
  color: #fff;
  background: #145fc4;
}

.site-footer {
  margin-top: 2.5rem;
  padding: 1.25rem;
  background: var(--ink-navy);
  color: var(--cardstock);
  text-align: center;
  font-size: 0.85rem;
}

.site-footer p {
  margin: 0;
}

/* ---------- Layout ---------- */

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 1rem;
}

main > p:first-child a {
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Show / date lists ---------- */

.show-list,
.date-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.show-card,
.date-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.1rem;
  background: var(--paper);
  box-shadow: var(--card-shadow);
}

.show-card h2 a {
  color: var(--ink-navy);
  text-decoration: none;
}

.show-card h2 a:hover {
  color: var(--foil-gold-dark);
}

.next-date {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  background: var(--ink-navy);
  color: var(--paper);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  margin-bottom: 0.75rem;
}

.next-date-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--foil-gold);
}

.next-date-value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.no-date-note {
  color: var(--text-muted);
  font-style: italic;
  margin: 0.5rem 0 0;
}

.venue,
.address {
  margin: 0.25rem 0;
  color: var(--text-muted);
}

.date-card .time {
  display: block;
  color: var(--text-muted);
  margin-top: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.block-range {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink-navy);
  margin-bottom: 0.5rem;
}

.date-block-day {
  padding-top: 0.75rem;
  margin-top: 0.75rem;
  border-top: 1px dashed var(--border-soft);
}

.date-block-day:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.date-block-day-label {
  margin: 0 0 0.25rem;
}

/* ---------- Homepage show grid ---------- */

.home-show-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}

.home-show-card {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  background: var(--paper);
  box-shadow: var(--card-shadow);
}

.home-show-card h2 a {
  color: var(--ink-navy);
  text-decoration: none;
}

.home-show-card h2 a:hover {
  color: var(--foil-gold-dark);
}

.perk-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin: 0.35rem 0 0;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--foil-gold-dark);
}

.perk-list li::before {
  content: "✓ ";
}

.signer-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.signer-strip-photo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: var(--cardstock);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

.signer-strip--tba {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.75rem;
}

@media (max-width: 640px) {
  .home-show-grid {
    grid-template-columns: 1fr;
  }
}

.info-box {
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  box-shadow: var(--card-shadow);
}

.info-box h2 {
  margin-top: 0;
}

.info-box p {
  white-space: pre-line;
  margin: 0;
}

/* ---------- Signing appearance cards ---------- */

.appearance-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  margin-top: 0.9rem;
}

.appearance-card {
  width: 240px;
  border: 1px solid var(--ink-navy);
  border-radius: var(--radius-md);
  background: var(--paper);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}

.appearance-photo-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--cardstock);
}

.appearance-photo {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
}

.watermark-ribbon {
  position: absolute;
  top: 42%;
  left: -25%;
  width: 150%;
  transform: rotate(-30deg);
  text-align: center;
  text-transform: uppercase;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: clamp(0.95rem, 2vw + 0.4rem, 1.3rem);
  color: var(--paper);
  padding: 0.4rem 0;
  border-top: 2px solid rgba(247, 244, 236, 0.55);
  border-bottom: 2px solid rgba(247, 244, 236, 0.55);
  pointer-events: none;
}

.watermark-canceled {
  background: var(--stamp-red);
}

.watermark-postponed {
  background: var(--ink-navy);
}

.appearance-body {
  padding: 0.75rem;
}

.appearance-name-block {
  margin: -0.75rem -0.75rem 0.6rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink-navy);
}

.appearance-headline {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--foil-gold);
  margin: 0 0 0.15rem;
}

.appearance-name {
  margin: 0;
  color: var(--paper);
  font-size: 1.2rem;
}

.postponed-date {
  color: var(--stamp-red);
  font-weight: 700;
  margin: 0.4rem 0 0.2rem;
}

.appearance-time {
  color: var(--text-muted);
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.price-note {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--stamp-red);
  margin: 0.5rem 0 0;
}

.price-list {
  list-style: none;
  margin: 0.6rem 0;
  padding: 0;
  font-size: 0.9rem;
}

.price-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--border-soft);
  padding: 0.25rem 0;
  gap: 0.5rem;
}

.price-amount {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--foil-gold);
  color: var(--ink-navy);
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.signer-notes {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* ---------- Admin lists ---------- */

.hidden-row {
  opacity: 0.55;
}

.visibility-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.1rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--cardstock);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.row-actions {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0.9rem;
  align-items: center;
}

.inline-form {
  display: inline;
}

.row-actions a {
  font-weight: 600;
  text-decoration: none;
}

.row-actions button {
  background: none;
  border: 1px solid var(--ink-navy);
  color: var(--ink-navy);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.7rem;
  font: inherit;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.row-actions button:hover {
  background: var(--ink-navy);
  color: var(--paper);
}

/* ---------- Admin forms ---------- */

.form-errors {
  color: var(--stamp-red);
  margin: 0.5rem 0 1rem;
  padding-left: 1.2rem;
}

.removal-warning {
  max-width: 480px;
  background: var(--paper);
  border: 1px solid var(--foil-gold);
  border-left: 4px solid var(--foil-gold);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.1rem;
  margin: 0.5rem 0 1rem;
}

.removal-warning ul {
  margin: 0.4rem 0;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 480px;
  background: var(--paper);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-navy);
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  font: inherit;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-main);
  width: 100%;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  border-color: var(--foil-gold-dark);
}

.admin-form button[type="submit"] {
  align-self: flex-start;
  padding: 0.6rem 1.4rem;
  background: var(--ink-navy);
  color: var(--paper);
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.admin-form button[type="submit"]:hover {
  background: var(--foil-gold-dark);
}

.invite-form {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  max-width: none;
}

.invite-form label {
  flex: 1 1 240px;
}

.price-fieldset {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.price-fieldset legend {
  font-weight: 700;
  color: var(--ink-navy);
  padding: 0 0.4rem;
}

.price-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  align-items: center;
}

.price-row input[type="text"] {
  flex: 2;
}

.price-row input[type="number"] {
  flex: 1;
}

.price-row button,
#add-price-row {
  background: none;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.7rem;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.price-row button:hover,
#add-price-row:hover {
  border-color: var(--stamp-red);
  color: var(--stamp-red);
}

#add-price-row {
  margin-top: 0.25rem;
}

#add-price-row:hover {
  border-color: var(--ink-navy);
  color: var(--ink-navy);
}

.date-range-picker {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.date-range-picker label {
  flex: 1 1 180px;
}

.date-range-fieldset {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
}

.date-range-fieldset legend {
  font-weight: 700;
  color: var(--ink-navy);
  padding: 0 0.4rem;
}

.date-range-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

.date-range-day {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.6rem;
}

.date-range-day-label {
  flex: 1 1 100px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--ink-navy);
}

.date-range-day label {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink-navy);
}

.field-hint {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.current-photo-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: -0.4rem 0 0;
}

.current-photo-thumb {
  max-width: 120px;
  max-height: 120px;
  object-fit: contain;
  vertical-align: middle;
  margin-left: 0.5rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
}

/* ---------- Small screens ---------- */

@media (max-width: 520px) {
  .site-header {
    padding: 0.85rem 1rem;
  }

  main {
    padding: 1.25rem 1rem 1rem;
  }

  .price-row {
    flex-wrap: wrap;
  }

  .price-row input[type="text"],
  .price-row input[type="number"] {
    flex: 1 1 100%;
  }

  .price-row button {
    flex: 0 0 auto;
    margin-left: auto;
  }

  .date-range-day {
    flex-wrap: wrap;
  }

  .date-range-day-label {
    flex: 1 1 100%;
  }

  .invite-form {
    flex-direction: column;
    align-items: stretch;
  }

  .appearance-card {
    width: 100%;
    max-width: 320px;
  }
}
