:root {
  --duck-green: #1f4d3a;
  --duck-gold: #d9a441;
  --duck-cream: #fbf6ec;
  --duck-ink: #262019;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Georgia", "Iowan Old Style", serif;
  background: var(--duck-cream);
  color: var(--duck-ink);
}

.hero {
  position: relative;
  color: white;
  background: var(--duck-green);
  overflow: hidden;
}

.hero-photo {
  display: block;
  width: 100%;
  height: 46vh;
  min-height: 220px;
  max-height: 420px;
  object-fit: cover;
  object-position: 50% 30%;
}

.hero-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px clamp(16px, 5vw, 40px) 22px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0));
}

.hero-text h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  letter-spacing: 0.5px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.tagline {
  margin: 4px 0 0;
  font-size: 1.1rem;
  color: var(--duck-gold);
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  position: absolute;
  top: max(14px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
  display: flex;
  gap: 8px;
}

.admin-link,
.booking-link {
  position: relative;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.9rem;
  padding: 10px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(2px);
  cursor: pointer;
  touch-action: manipulation;
}

.admin-link:hover, .admin-link:active,
.booking-link:hover, .booking-link:active {
  background: var(--duck-gold);
  border-color: var(--duck-gold);
}

.admin-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: #b3261e;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--duck-green);
}

.admin-badge[hidden] {
  display: none;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.calendar-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 24px;
}

.calendar-nav button {
  border: 2px solid var(--duck-green);
  background: white;
  color: var(--duck-green);
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.calendar-nav button:hover,
.calendar-nav button:active {
  background: var(--duck-green);
  color: white;
}

.months {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 700px) {
  .months {
    grid-template-columns: 1fr;
  }
  .hero-photo {
    height: 34vh;
    min-height: 180px;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-end;
  }
  .admin-link,
  .booking-link {
    padding: 8px 14px;
    font-size: 0.8rem;
  }
}

.month {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.month h2 {
  text-align: center;
  margin: 0 0 12px;
  color: var(--duck-green);
  font-size: 1.2rem;
}

.weekday-row, .day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.weekday-row {
  margin-bottom: 4px;
}

.weekday-row span {
  text-align: center;
  font-size: 0.7rem;
  color: #8a8072;
  text-transform: uppercase;
}

.day-cell {
  aspect-ratio: 1;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.95rem;
  position: relative;
  background: transparent;
  border: none;
  color: var(--duck-ink);
  font-family: inherit;
  cursor: default;
  touch-action: manipulation;
}

.day-cell.empty {
  visibility: hidden;
}

.day-cell.has-event {
  background: #fff3d9;
  cursor: pointer;
  font-weight: bold;
}

.day-cell.has-event:hover,
.day-cell.has-event:active {
  background: var(--duck-gold);
  color: white;
}

.day-cell.is-today {
  outline: 2px solid var(--duck-green);
}

.event-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--duck-green);
  margin-top: 2px;
}

.day-cell.has-event:hover .event-dot {
  background: white;
}

.event-camera {
  font-size: 0.7rem;
  line-height: 1;
  margin-top: 2px;
}

footer {
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
  color: #8a8072;
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 28px;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #8a8072;
  touch-action: manipulation;
}

.modal h2 {
  margin-top: 0;
  color: var(--duck-green);
}

.modal form label {
  display: block;
  font-size: 0.85rem;
  margin: 12px 0 4px;
}

.modal form input,
.modal form textarea {
  width: 100%;
  padding: 12px;
  min-height: 44px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}

.modal form button {
  border: none;
  background: var(--duck-green);
  color: white;
  padding: 10px 18px;
  min-height: 44px;
  border-radius: 999px;
  font-size: 0.95rem;
  cursor: pointer;
  margin-top: 16px;
  touch-action: manipulation;
}

.modal form button:hover {
  opacity: 0.9;
}

.error-text {
  color: #b3261e;
  font-size: 0.85rem;
}

.event-card {
  border-top: 1px solid #eee;
  padding: 14px 0;
}

.event-card:first-of-type {
  border-top: none;
}

.event-card h3 {
  margin: 0 0 6px;
  color: var(--duck-ink);
}

.event-time {
  font-weight: bold;
  color: var(--duck-green);
  margin: 0 0 4px;
}

.event-audience {
  display: inline-block;
  background: var(--duck-gold);
  color: white;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.event-description {
  margin: 0;
  line-height: 1.4;
}

.event-photos-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 8px;
  color: var(--duck-green);
  font-weight: bold;
  text-decoration: none;
  touch-action: manipulation;
}

.event-photos-link:hover,
.event-photos-link:active {
  text-decoration: underline;
}
