:root {
  --cream: #fff8ee;
  --paper: #fffdf8;
  --rose: #b75d69;
  --rose-dark: #803843;
  --sage: #65795b;
  --sage-light: #dfe8d6;
  --barn: #7f3f2a;
  --ink: #332820;
  --muted: #76675d;
  --gold: #c79f53;
  --shadow: 0 22px 50px rgba(79, 46, 31, 0.14);
  --radius: 24px;
  font-family: Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 10%, rgba(183, 93, 105, 0.18), transparent 24rem),
    radial-gradient(circle at 90% 5%, rgba(101, 121, 91, 0.18), transparent 22rem),
    linear-gradient(135deg, #fff6e6 0%, #f6ead9 50%, #e9dcc7 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(45deg, rgba(127, 63, 42, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(127, 63, 42, 0.04) 25%, transparent 25%);
  background-size: 34px 34px;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--rose-dark);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: center;
  padding: 34px;
  margin-bottom: 24px;
  border: 1px solid rgba(127, 63, 42, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
}

.hero::after,
.card::before {
  position: absolute;
  width: 220px;
  height: 220px;
  content: "";
  background:
    radial-gradient(circle at 50% 20%, rgba(183, 93, 105, 0.24) 0 12%, transparent 13%),
    radial-gradient(circle at 25% 50%, rgba(183, 93, 105, 0.20) 0 11%, transparent 12%),
    radial-gradient(circle at 75% 54%, rgba(183, 93, 105, 0.18) 0 10%, transparent 11%),
    radial-gradient(circle at 50% 72%, rgba(101, 121, 91, 0.22) 0 13%, transparent 14%);
  opacity: 0.8;
}

.hero::after {
  right: -68px;
  bottom: -92px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--sage);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  max-width: 760px;
  color: var(--barn);
  font-size: clamp(2.6rem, 7vw, 5.8rem);
}

h2 {
  color: var(--rose-dark);
  font-size: clamp(1.65rem, 4vw, 2.7rem);
}

h3 {
  color: var(--barn);
  font-size: 1.35rem;
}

.subtitle {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-art,
.photo-panel,
.slide-panel {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 24px;
  border: 2px dashed rgba(127, 63, 42, 0.26);
  border-radius: 22px;
  color: var(--sage);
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.48), rgba(255, 255, 255, 0.48)),
    repeating-linear-gradient(45deg, rgba(199, 159, 83, 0.18) 0 10px, transparent 10px 20px);
}

.image-frame {
  gap: 12px;
  padding: 12px;
}

.image-frame img {
  display: block;
  width: 100%;
  min-height: 190px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(127, 63, 42, 0.16);
}

.image-frame .fine-print {
  margin: 0 8px 4px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}

.stack {
  display: grid;
  gap: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(127, 63, 42, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
}

.card::before {
  top: -120px;
  right: -118px;
  transform: rotate(20deg);
}

.form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--barn);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid rgba(127, 63, 42, 0.24);
  border-radius: 14px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fffefb;
}

.field textarea {
  min-height: 78px;
  resize: vertical;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 999px;
  color: #fff;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, var(--rose), var(--rose-dark));
  box-shadow: 0 12px 22px rgba(128, 56, 67, 0.22);
}

.button.secondary {
  color: var(--rose-dark);
  background: var(--sage-light);
  box-shadow: none;
}

.button.small {
  min-height: 38px;
  padding: 9px 13px;
  font-size: 0.9rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.status {
  min-height: 1.4em;
  color: var(--rose-dark);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(51, 40, 32, 0.58);
  backdrop-filter: blur(4px);
}

.modal-card {
  width: min(560px, 100%);
  padding: 28px;
  border: 1px solid rgba(127, 63, 42, 0.2);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.live-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-radius: 18px;
  color: var(--barn);
  background: #f3ead9;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--sage);
}

.bingo-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.bingo-cell {
  position: relative;
  overflow: hidden;
  min-height: 116px;
  padding: 10px;
  border: 1px solid rgba(127, 63, 42, 0.18);
  border-radius: 18px;
  color: var(--ink);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 246, 230, 0.88)),
    radial-gradient(circle at 20% 20%, rgba(183, 93, 105, 0.16), transparent 40%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.55);
}

.bingo-cell.marked {
  color: #fff;
  background: linear-gradient(135deg, var(--sage), #354a35);
}

.bingo-cell span {
  position: relative;
  z-index: 1;
  display: block;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(0.74rem, 1.5vw, 0.95rem);
  line-height: 1.35;
}

.bingo-cell .cell-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
}

.bingo-cell.marked .cell-photo {
  opacity: 0.18;
}

.leaderboard {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.leaderboard li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: #f8efdf;
}

.rank {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--gold);
}

.fine-print {
  color: var(--muted);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
}

.photo-actions {
  margin: 14px 0 4px;
}

.gallery-wheel {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 118px;
  gap: 10px;
  min-height: 124px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  padding: 8px 0 14px;
  scroll-snap-type: inline mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery-wheel img {
  width: 118px;
  height: 118px;
  border: 4px solid #fff;
  border-radius: 50%;
  object-fit: cover;
  scroll-snap-align: center;
  box-shadow: 0 10px 20px rgba(79, 46, 31, 0.18);
  animation: gallery-drift 18s linear infinite;
}

@keyframes gallery-drift {
  0% {
    transform: translateX(0) rotate(0deg);
  }
  50% {
    transform: translateX(-18px) rotate(6deg);
  }
  100% {
    transform: translateX(0) rotate(0deg);
  }
}

.admin-card-list {
  display: grid;
  gap: 16px;
}

.admin-card-editor {
  padding: 18px;
  border: 1px solid rgba(127, 63, 42, 0.16);
  border-radius: 22px;
  background: #fff9ef;
}

.admin-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.space-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.space-grid textarea {
  min-height: 96px;
  padding: 9px;
  border: 1px solid rgba(127, 63, 42, 0.22);
  border-radius: 12px;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.82rem;
  resize: vertical;
}

.live-dot {
  color: var(--sage);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-weight: 800;
}

.moderation-list,
.photo-moderation-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.moderation-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8efdf;
}

.moderation-row strong,
.moderation-row span {
  display: block;
  font-family: "Trebuchet MS", Arial, sans-serif;
}

.moderation-row span {
  color: var(--muted);
  font-size: 0.82rem;
}

.photo-moderation-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: #f8efdf;
}

.photo-moderation-row img {
  width: 76px;
  height: 76px;
  border-radius: 12px;
  object-fit: cover;
}

@media (max-width: 920px) {
  .hero,
  .grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    min-height: 160px;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .hero,
  .card {
    padding: 18px;
  }

  .bingo-board,
  .space-grid {
    gap: 5px;
  }

  .bingo-cell {
    min-height: 92px;
    padding: 7px;
    border-radius: 12px;
  }

  .space-grid textarea {
    min-height: 82px;
    font-size: 0.72rem;
  }
}
