* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Brand palette (from johnsonartscenter.org) */
  --brand-red: #ea4524;
  --brand-red-dark: #cf3a1c;
  --brand-teal: #00a9ac;
  --brand-teal-dark: #018587;
  --brand-yellow: #f9a51a;
  --brand-blue: #a9dde5;

  --bg: #fffdf9;
  --surface: #ffffff;
  --surface-2: #faf6ef;
  --border: #e8e2d6;
  --ink: #242021;
  --text: #242021;
  --text-muted: #5f5a54;
  --link: #cf3a1c;

  --font-head: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Pontano Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Shape of the photo frame on every card. The cropper locks its crop box to
     this ratio, so ASPECT in /js/image-cropper.js must match. */
  --card-photo-ratio: 8 / 5;

  --max-width: 1080px;
  --nav-height: 76px;
  --shadow: 0 6px 20px rgba(40, 30, 20, 0.08);
  --shadow-sm: 0 2px 8px rgba(40, 30, 20, 0.06);
}

html {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  min-height: 100vh;
  color: var(--ink);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

a {
  color: var(--link);
}

a:hover {
  text-decoration: underline;
}

/* ---------- Header / navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--brand-teal);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.site-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
}

.site-logo:hover {
  text-decoration: none;
  opacity: 0.95;
}

.site-logo img {
  display: block;
  height: 54px;
  width: auto;
  background: #fff;
  padding: 6px 10px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.15rem;
  list-style: none;
}

.site-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  color: var(--brand-yellow);
  text-decoration: none;
}

.site-nav .nav-admin a {
  color: var(--brand-yellow);
}

/* ---------- Layout ---------- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

.page-title {
  font-size: 2.6rem;
  margin-bottom: 1rem;
  color: var(--brand-red);
}

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 65ch;
}

/* ---------- Home hero + section cards ---------- */
.hero {
  text-align: center;
  padding: 2.5rem 0 1rem;
}

.hero-logo {
  max-width: 560px;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.hero-tagline {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--ink);
  margin-top: 1.5rem;
  max-width: 34ch;
  margin-left: auto;
  margin-right: auto;
}

.home-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
}

.home-card {
  border-radius: 16px;
  padding: 2rem 1.9rem;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  color: #fff;
}

.home-card h2 {
  color: #fff;
  font-size: 1.7rem;
  margin-bottom: 0.6rem;
}

.home-card p {
  flex: 1;
  margin-bottom: 1.5rem;
  color: rgba(255, 255, 255, 0.95);
}

.home-card--red { background: var(--brand-red); }
.home-card--teal { background: var(--brand-teal); }
.home-card--yellow { background: var(--brand-yellow); color: var(--ink); }
.home-card--yellow h2 { color: var(--ink); }
.home-card--yellow p { color: rgba(36, 32, 33, 0.85); }
.home-card--blue { background: var(--brand-blue); color: var(--ink); }
.home-card--blue h2 { color: var(--ink); }
.home-card--blue p { color: rgba(36, 32, 33, 0.8); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: 8px;
  background: #171412;
  border: 1px solid #171412;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-link {
  color: var(--link);
  align-self: center;
  background: none;
  border: none;
  font-weight: 600;
}

/* ---------- Generic cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.card-image {
  width: 100%;
  aspect-ratio: var(--card-photo-ratio);
  object-fit: cover;
  display: block;
  background: var(--surface-2);
}

.card-body {
  padding: 1.35rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  color: var(--brand-red);
}

.card-body p {
  font-size: 0.97rem;
  color: var(--text-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.card-date {
  flex: 0 0 auto;
  font-weight: 700;
  color: var(--brand-teal-dark);
  margin-bottom: 0.5rem;
}

/* ---------- Notices ---------- */
.notice {
  background: #eaf7ee;
  border: 1px solid #b7e4c4;
  color: #1c6b38;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.error-msg {
  color: #c0392b;
  margin-bottom: 1rem;
}

/* ---------- Rooms ---------- */
.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.room {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* The photo column runs the full height of the card, flush with its edges;
   .room's overflow:hidden gives it the card's rounded corners. min-height
   keeps the photo a decent size on rooms with only a line or two of text. */
.room-main {
  display: flex;
  align-items: stretch;
  min-height: 260px;
}

/* align-self:stretch (not height:100%) is what fills the column: the card has
   no fixed height for a percentage to resolve against. */
.room-image {
  width: 300px;
  flex: 0 0 300px;
  align-self: stretch;
  object-fit: cover;
  background: var(--surface-2);
}

.room-gallery {
  position: relative;
  width: 300px;
  flex: 0 0 300px;
  align-self: stretch;
  overflow: hidden;
  background: var(--surface-2);
}

.room-gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.room-gallery-track::-webkit-scrollbar {
  display: none;
}

.room-gallery-track .room-image {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  scroll-snap-align: start;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  font-size: 1.3rem;
  line-height: 1;
  color: #171412;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background 0.2s ease;
}

.room-gallery:hover .gallery-nav,
.gallery-nav:focus-visible {
  opacity: 1;
}

.gallery-nav:hover {
  background: #fff;
}

.gallery-prev {
  left: 0.4rem;
}

.gallery-next {
  right: 0.4rem;
}

.gallery-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.45rem;
  display: flex;
  justify-content: center;
  gap: 0.3rem;
}

.gallery-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.gallery-dot.active {
  background: #fff;
  transform: scale(1.25);
}

/* Touch devices have no hover, so keep the arrows visible there. */
@media (hover: none) {
  .gallery-nav {
    opacity: 1;
  }
}

.room-info {
  flex: 1;
  min-width: 0;
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
}

.room-info h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--brand-red);
}

.room-info p {
  font-size: 0.97rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.room-desc {
  margin-bottom: 0.75rem;
}

.room-air {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.room-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.85rem;
}

.rent-toggle,
.details-toggle {
  cursor: pointer;
}

.btn-outline {
  background: #fff;
  border-color: #171412;
  color: #171412;
}

.btn-outline:hover {
  background: #171412;
  border-color: #171412;
  color: #fff;
}

/* Same animatable grid-rows expand the availability panel uses. */
.room-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.room-details.open {
  grid-template-rows: 1fr;
}

.room-details-inner {
  overflow: hidden;
  min-height: 0;
}

.room-details.open .room-details-inner {
  border-top: 1px solid var(--border);
}

.room-details-body {
  padding: 1.1rem 1.35rem;
}

.room-details-body p {
  color: var(--text-muted);
  margin-bottom: 0.7rem;
  white-space: pre-line;
}

.room-details-body p:last-child {
  margin-bottom: 0;
}

/* Smooth expand using animatable grid rows */
.room-calendar {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
}

.room-calendar.open {
  grid-template-rows: 1fr;
}

.room-calendar-inner {
  overflow: hidden;
  min-height: 0;
}

.room-calendar.open .room-calendar-inner {
  border-top: 1px solid var(--border);
}

.rc-calendar {
  padding: 1.25rem;
}

.calendar-hint {
  padding: 0.85rem 1.25rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.rc-request {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.85rem 1.25rem 0;
  padding: 0.75rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.rc-request[hidden] {
  display: none;
}

.rc-request-text {
  font-weight: 700;
  font-size: 0.95rem;
}

.rc-request-btn {
  cursor: pointer;
}

/* Stacked, there is no card height left to fill, so the photo falls back to
   the standard card frame. */
@media (max-width: 620px) {
  .room-main {
    flex-direction: column;
    min-height: 0;
  }
  .room-image,
  .room-gallery {
    width: 100%;
    flex-basis: auto;
    height: auto;
    aspect-ratio: var(--card-photo-ratio);
  }
}

/* ---------- Reserve form ---------- */
.reserve-summary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.25rem;
}

.reserve-summary p {
  margin-bottom: 0.3rem;
}

.reserve-total {
  margin-top: 0.5rem;
  font-size: 1.15rem;
}

.reserve-total-detail {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.btn-pay {
  background: var(--brand-red);
  border-color: var(--brand-red);
  font-size: 1.05rem;
  padding: 0.75rem 1.5rem;
}

.btn-pay:hover {
  background: var(--brand-red-dark);
  border-color: var(--brand-red-dark);
}

.reserve-form {
  margin-top: 1.5rem;
  max-width: 560px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-weight: 700;
  font-size: 0.95rem;
}

.form-row input,
.form-row textarea,
.form-row select {
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
}

.form-row[hidden] {
  display: none;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #a49d92;
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
  outline: 2px solid var(--brand-teal);
  outline-offset: 1px;
  border-color: var(--brand-teal);
}

.form-fineprint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

/* ---------- About / donors ---------- */
.about-section {
  margin-bottom: 2rem;
}

.about-section h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
  color: var(--brand-red);
}

.about-section p {
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.about-photos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.about-photos img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.placeholder-block {
  background: var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* ---------- Community calendar ---------- */
#calendar {
  margin-top: 1rem;
  background: var(--surface);
  border-radius: 12px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* FullCalendar theming for the light brand look */
.fc {
  --fc-border-color: #e8e2d6;
  --fc-button-bg-color: var(--brand-teal);
  --fc-button-border-color: var(--brand-teal);
  --fc-button-text-color: #fff;
  --fc-button-hover-bg-color: var(--brand-teal-dark);
  --fc-button-hover-border-color: var(--brand-teal-dark);
  --fc-button-active-bg-color: var(--brand-teal-dark);
  --fc-today-bg-color: rgba(249, 165, 26, 0.12);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: #faf6ef;
  color: var(--ink);
}

.fc .fc-toolbar-title {
  color: var(--ink);
  font-family: var(--font-head);
}

.fc-theme-standard td,
.fc-theme-standard th {
  border-color: var(--fc-border-color);
}

.fc-col-header-cell {
  color: var(--text-muted);
}

.fc .slot-booked {
  background: var(--brand-red);
  border-color: var(--brand-red-dark);
  color: #fff;
  font-size: 0.75rem;
}

.fc .slot-event {
  background: var(--brand-teal);
  border-color: var(--brand-teal-dark);
  color: #fff;
  font-size: 0.75rem;
}

.fc .slot-class {
  background: var(--brand-yellow);
  border-color: #d98c0a;
  color: var(--ink);
  font-size: 0.75rem;
}

.fc a.fc-event:hover {
  text-decoration: none;
  filter: brightness(0.94);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  list-style: none;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.calendar-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.legend-swatch {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 3px;
  display: inline-block;
}

.legend-event {
  background: var(--brand-teal);
  border: 1px solid var(--brand-teal-dark);
}

.legend-class {
  background: var(--brand-yellow);
  border: 1px solid #d98c0a;
}

/* ---------- Event / class detail pages ---------- */
.detail-back {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.detail-kind {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-teal-dark);
  margin-bottom: 0.35rem;
}

.detail-image {
  width: 100%;
  max-width: 640px;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.detail-meta {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.1rem 1.35rem;
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.detail-meta-row + .detail-meta-row {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}

.detail-meta dt {
  flex: 0 0 5rem;
  font-weight: 700;
  color: var(--text-muted);
}

.detail-meta dd {
  flex: 1;
  min-width: 12rem;
}

.detail-muted {
  color: var(--text-muted);
}

.detail-body {
  max-width: 65ch;
  margin-bottom: 1.75rem;
}

.detail-body p {
  margin-bottom: 1rem;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.card-title-link {
  color: inherit;
  text-decoration: none;
}

.card-title-link:hover {
  text-decoration: underline;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

/* ---------- Admin ---------- */
.admin-panel {
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow-sm);
}

.admin-panel p {
  margin-bottom: 1rem;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.admin-tab {
  font: inherit;
  font-family: var(--font-body);
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  border: 2px solid transparent;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
  padding: 0.6rem 1.15rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: -2px;
}

.admin-tab:hover {
  color: var(--ink);
  background: var(--surface-2);
}

.admin-tab.active {
  color: var(--brand-red);
  background: var(--surface);
  border-color: var(--border);
  border-bottom-color: var(--brand-red);
}

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

.admin-section {
  margin-top: 2rem;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-form-wrap {
  margin-top: 1rem;
  padding: 1.25rem 1.35rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

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

.form-heading {
  margin-bottom: 0.5rem;
  color: var(--brand-red);
}

.admin-section h2 {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.count-badge {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0 0.4rem;
  margin-left: 0.4rem;
  border-radius: 999px;
  background: var(--brand-red);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

/* Counts that are informational rather than something needing attention. */
.count-badge-neutral {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.admin-collapse {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.admin-collapse-head {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  list-style: none;
}

.admin-collapse-head::-webkit-details-marker {
  display: none;
}

.admin-collapse-head::before {
  content: '';
  width: 0;
  height: 0;
  margin-right: 0.65rem;
  border-left: 7px solid var(--text-muted);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  transition: transform 0.2s ease;
}

.admin-collapse[open] .admin-collapse-head::before {
  transform: rotate(90deg);
}

.admin-collapse-head:hover .admin-collapse-title {
  color: var(--brand-red);
}

.admin-collapse-head:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: -2px;
  border-radius: 12px;
}

.admin-collapse-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
}

.admin-collapse-body {
  padding: 0 1.1rem 1.1rem;
}

.admin-collapse-body .admin-hint {
  margin-top: 0;
}

.admin-hint {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.admin-table {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.admin-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.admin-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-meta {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-row-actions form {
  margin: 0;
}

/* A reservation plus its expandable request form, as one card. */
.admin-record {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.admin-record .admin-row {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.request-form-summary {
  padding: 0.55rem 1.1rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--link);
  cursor: pointer;
  list-style: none;
}

.request-form-summary::-webkit-details-marker {
  display: none;
}

.request-form-summary::before {
  content: '\25B8';
  margin-right: 0.4rem;
}

.request-form[open] .request-form-summary::before {
  content: '\25BE';
}

.request-form-summary:hover {
  background: var(--surface-2);
}

.request-form-body {
  padding: 0 1.1rem 1rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.request-form-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.8rem 1.25rem;
  padding-top: 0.9rem;
}

.request-field-wide {
  grid-column: 1 / -1;
}

.request-field dt {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.request-field dd {
  font-size: 0.95rem;
  word-break: break-word;
}

.request-notes {
  white-space: pre-line;
}

.image-field input[type='file'] {
  font: inherit;
  font-size: 0.92rem;
  padding: 0.5rem;
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 8px;
  cursor: pointer;
}

.image-field input[type='file']::file-selector-button {
  font: inherit;
  font-weight: 700;
  margin-right: 0.75rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid #171412;
  border-radius: 6px;
  background: #171412;
  color: #fff;
  cursor: pointer;
}

.image-field .form-fineprint {
  margin: 0.15rem 0 0.35rem;
}

.image-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.6rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.image-preview img {
  width: 160px;
  aspect-ratio: var(--card-photo-ratio);
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
}

.image-preview-info {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.image-remove {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 400;
}

.form-heading-sub {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.photo-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.5rem;
}

.photo-card img {
  width: 100%;
  aspect-ratio: var(--card-photo-ratio);
  object-fit: cover;
  border-radius: 6px;
  background: var(--surface-2);
}

.photo-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.btn-small {
  padding: 0.3rem 0.65rem;
  font-size: 0.82rem;
}

/* ---------- Photos queued for upload ---------- */
.staged-files {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.staged-files li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-2);
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.staged-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staged-note {
  border: none;
  background: none;
  padding-left: 0;
}

/* ---------- Click-to-enlarge photos ---------- */
img[data-zoom] {
  cursor: zoom-in;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1rem;
  background: rgba(20, 16, 14, 0.9);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
  max-height: 100%;
}

.lightbox-image {
  max-width: min(1100px, 92vw);
  /* Leaves room for the caption below the photo. */
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  background: #171412;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.lightbox-caption {
  color: #f6f1e8;
  font-size: 0.95rem;
  text-align: center;
}

.lightbox-counter {
  color: #c9c0b4;
  margin-left: 0.35rem;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  padding: 0 0 3px;
  font-size: 1.6rem;
}

.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  padding: 0 0 4px;
  font-size: 2rem;
}

/* display:flex above would otherwise beat the hidden attribute. */
.lightbox-nav[hidden] {
  display: none;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

@media (max-width: 620px) {
  .lightbox-nav {
    width: 38px;
    height: 38px;
    font-size: 1.6rem;
  }
  .lightbox-prev {
    left: 0.4rem;
  }
  .lightbox-next {
    right: 0.4rem;
  }
}

/* ---------- Image cropper dialog ---------- */
.cropper-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(23, 20, 18, 0.6);
}

.cropper-backdrop[hidden] {
  display: none;
}

body.cropper-open {
  overflow: hidden;
}

.cropper-dialog {
  width: min(760px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  padding: 1.25rem 1.35rem 1.35rem;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.3);
}

.cropper-dialog-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.cropper-dialog-head h2 {
  font-size: 1.4rem;
}

.cropper-hint {
  margin: 0.35rem 0 0.85rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.cropper-stage {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

/* Cropper.js needs a block image it can size freely. */
.cropper-stage img {
  display: block;
  max-width: 100%;
  max-height: 58vh;
}

.cropper-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.cropper-spacer {
  flex: 1 1 auto;
}

@media (max-width: 600px) {
  .cropper-spacer {
    display: none;
  }
  .cropper-actions .btn {
    flex: 1 1 auto;
  }
}

.admin-row-with-thumb {
  flex-direction: row;
  align-items: center;
  gap: 0.9rem;
}

.admin-row-with-thumb > div {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-thumb {
  width: 84px;
  aspect-ratio: var(--card-photo-ratio);
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.btn-approve {
  background: #1c8a4a;
  border-color: #1c8a4a;
}

.btn-approve:hover {
  background: #156b39;
  border-color: #156b39;
}

.btn-reject {
  background: #fff;
  border-color: var(--brand-red);
  color: var(--brand-red);
}

.btn-reject:hover {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}

.status-pill {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.status-paid {
  background: #eaf7ee;
  border-color: #b7e4c4;
  color: #1c6b38;
}

.status-authorized {
  background: #fdf1d8;
  border-color: #f4dca0;
  color: #8a5a12;
}

.status-rejected,
.status-cancelled {
  background: #fdecea;
  border-color: #f5c2ba;
  color: #b23120;
}

.status-pending {
  background: #eef0f3;
  border-color: #dfe3e8;
  color: #555c66;
}

.event-form {
  max-width: 640px;
  margin-top: 1rem;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 520px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
  }
}

.form-row-inline {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-row-inline label {
  font-weight: 400;
}

.rooms-fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.rooms-fieldset legend {
  padding: 0 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.room-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.95rem;
}

.status-line {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--brand-teal);
  color: #fff;
  margin-top: 3rem;
}

.site-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
  font-size: 0.9rem;
}

.site-footer a {
  color: #fff;
}

code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--brand-red-dark);
}
