/* styles.css — one stylesheet for the whole site.
   Colors below are the EXACT palette extracted from the current gvresorthomes.com theme.
   Change a color in ONE place (these variables) and it updates everywhere. */
:root {
  /* --- Palette from the live site --- */
  --gold:        #D59531;  /* primary brand color (buttons, accents)            rgb(213,149,49) */
  --gold-bright: #F8AE3B;  /* button hover                                      rgb(248,174,59) */
  --gold-mid:    #C4892B;  /* secondary accent                                  rgb(196,137,43) */
  --bronze:      #9E6C1E;  /* accent text / focus labels on white              rgb(158,108,30) */
  --bronze-dark: #5F4110;  /* dark accent — used for links (AAA on white)       rgb(95,65,16)   */
  --brown-deep:  #432C08;  /* deepest accent                                    rgb(67,44,8)    */
  --ink:         #161616;  /* main text & dark sections                         rgb(22,22,22)   */
  --ink-2:       #1B1B1B;  /*                                                   rgb(27,27,27)   */
  --charcoal:    #303030;  /*                                                   rgb(48,48,48)   */
  --gray-text:   #595959;  /* secondary text (7:1 on white)                     rgb(89,89,89)   */
  --gray-2:      #5E5E5E;  /*                                                   rgb(94,94,94)   */
  --line:        #BFBFBF;  /* input borders                                     */
  --line-soft:   #DBDBDB;  /* dividers                                          rgb(219,219,219)*/
  --gray-bg:     #E2E2E2;  /*                                                   rgb(226,226,226)*/
  --near-black:  #161413;  /* hero overlay                                      rgb(22,20,19)   */
  --white:       #FFFFFF;
  /* Light section tint = the brand gold at 8% over white (a shade of the palette, not a new color). */
  --tint: color-mix(in srgb, var(--gold) 8%, white);

  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 22, 22, .06), 0 6px 20px rgba(22, 22, 22, .07);
  --font-body: 'Open Sans', Arial, sans-serif;
  --font-head: 'Playfair Display', Georgia, serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; }               /* 18px base; grows to 19px on large screens */
@media (min-width: 1100px) { html { font-size: 118.75%; } }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--white); line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; color: var(--ink); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }
a { color: var(--bronze-dark); text-underline-offset: 3px; }
a:hover { color: var(--brown-deep); }
p { margin: 0 0 1em; }
code { word-break: break-all; font-size: .85em; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 1.5rem 0; }

/* Big, obvious keyboard focus ring everywhere */
:focus-visible { outline: 3px solid var(--bronze-dark); outline-offset: 3px; border-radius: 6px; }

.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; } .narrow-sm { max-width: 520px; }
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-tint { background: var(--tint); }
.section-title { margin-top: 1.5rem; } .section-title:first-child { margin-top: 0; }
.muted { color: var(--gray-text); } .small { font-size: .88rem; } .center { text-align: center; }
.plain { list-style: none; padding: 0; margin: 0; }
.stack > * + * { margin-top: 1rem; }
.lead { font-size: 1.15rem; max-width: 46rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--bronze-dark); margin-bottom: .5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: .5rem; background: var(--ink); color: var(--white); padding: .75rem 1rem; z-index: 100; border-radius: 8px; }
.skip-link:focus { left: .5rem; }
.two-col { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* ---------- Buttons (min 48px tall = easy to tap) ---------- */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 48px; padding: .65rem 1.3rem;
  border-radius: 999px; border: 2px solid transparent; font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--gold); color: var(--ink); }          /* #161616 on #D59531 = 7.7:1 */
.btn-primary:hover { background: var(--gold-bright); color: var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--charcoal); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--gray-bg); color: var(--ink); }
.btn-danger { background: var(--white); color: #8a1c1c; border-color: #8a1c1c; }  /* error red: not in the palette, needed for clarity */
.btn-small { min-height: 44px; padding: .45rem 1rem; font-size: .9rem; }
.btn-large { min-height: 56px; padding: .85rem 1.7rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1rem; }
.inline { display: inline; }
.text-link { font-weight: 600; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line-soft); }
.site-header .container { width: min(1360px, 100% - 2.5rem); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 76px; flex-wrap: wrap; }
.brand { white-space: nowrap; display: flex; align-items: center; gap: .6rem; font: 700 1.15rem var(--font-head); color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--gold); color: var(--ink); font-size: .95rem; }
.desktop-nav { display: none; }
.desktop-nav ul, .nav-toggle ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.desktop-nav a, .nav-toggle nav a { display: block; padding: .6rem .65rem; white-space: nowrap; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.desktop-nav a:hover, .nav-toggle nav a:hover { background: var(--tint); }
[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }
.account { display: flex; gap: .5rem; align-items: center; }
/* Mobile menu uses <details>, so it works without any JavaScript.
   Phone layout: row 1 = name, row 2 = [Menu] ........ [Members Login] */
.nav-toggle { order: 2; }
.account { order: 3; margin-left: auto; }
.nav-toggle summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; min-height: 48px; padding: .4rem 1.1rem; border: 2px solid var(--charcoal); border-radius: 999px; font-weight: 600; }
.nav-toggle summary::-webkit-details-marker { display: none; }
.nav-toggle summary::before { content: '☰'; margin-right: .5rem; }
.nav-toggle[open] summary::before { content: '✕'; }
.nav-toggle[open] nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-bottom: 1px solid var(--line-soft); box-shadow: var(--shadow); padding: .5rem 1.25rem 1rem; }
.nav-toggle ul { flex-direction: column; }
.nav-toggle nav a { font-size: 1.1rem; padding: .85rem; }
@media (max-width: 640px) { .brand { flex: 1 1 100%; } .header-inner { padding-bottom: .6rem; } }
@media (max-width: 1319px) { .header-inner { padding-top: .6rem; } .account .btn-ghost:not(button) { display: none; } }
@media (min-width: 1320px) { .header-inner { flex-wrap: nowrap; } .nav-toggle { display: none; } .desktop-nav { display: block; } .brand { margin-right: 0; } .desktop-nav { margin-left: auto; } }

.flash { background: var(--tint); border-left: 5px solid var(--gold); padding: .9rem 1.1rem; border-radius: 10px; margin: 1rem 0; }
.error { background: #fdecec; border-left: 5px solid #8a1c1c; color: #5c1010; padding: .9rem 1.1rem; border-radius: 10px; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--white); overflow: hidden; background: var(--charcoal); }
/* The text block sits in the normal centered .container with its original padding (height comes from the text,
   exactly as before); the photos fill whatever box that makes. */
/* Welcome Home photos (Admin > Gallery): stacked, cropped to fill without stretching, darkened so white text stays readable. */
.hero-slides { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center;
  opacity: 0; transition: opacity 1.6s ease-in-out; }
.hero-slide.is-active { opacity: 1; }
.hero-slide.focal-top { object-position: center top; } .hero-slide.focal-bottom { object-position: center bottom; }
.hero-slides::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(22, 20, 19, .82) 0%, rgba(22, 20, 19, .6) 55%, rgba(22, 20, 19, .3) 100%); }
.hero-inner { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }
.hero-inner { padding: clamp(4rem, 12vw, 8.5rem) 0; }
.hero h1 { color: var(--white); max-width: 15ch; }
.hero .eyebrow { color: var(--gold-bright); }
.hero .lead { color: var(--white); }

.page-head { background: var(--tint); padding: clamp(2.5rem, 6vw, 4rem) 0 2rem; border-bottom: 1px solid var(--line-soft); }

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.quick-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.link-card { display: flex; flex-direction: column; gap: .3rem; height: 100%; color: var(--ink); text-decoration: none; transition: transform .15s, box-shadow .15s; }
.link-card:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(22, 22, 22, .12); color: var(--ink); }
.link-card strong { font: 700 1.2rem var(--font-head); }
.link-card span:last-child { color: var(--gray-text); }
.icon { font-size: 1.8rem; }
.notice h3, .event h3 { margin-bottom: .3rem; }
.date { color: var(--bronze-dark); font-weight: 700; font-size: .9rem; margin-bottom: .2rem; }
.empty-state { text-align: center; padding: 2.5rem 1.5rem; }
.callout { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 2rem; border-left: 6px solid var(--gold); }
.person { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; }
.person.compact { padding: .75rem 1rem; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--gold); font-weight: 700; flex: none; }

/* ---------- Gallery & listings ---------- */
.gallery { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--gray-bg); }
.listing-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.listing { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.listing img, .img-placeholder { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; background: var(--gray-bg); }
.img-placeholder { display: grid; place-items: center; color: var(--gray-text); font-weight: 600; }
.listing-body { padding: 1.5rem; }
.listing h2 { font-size: 1.35rem; margin-top: .6rem; }
.price { font-size: 1.2rem; font-weight: 700; }
.badge { display: inline-block; padding: .2rem .75rem; border-radius: 999px; font-size: .82rem; font-weight: 700; background: var(--gold); color: var(--ink); }
.badge-rented { background: var(--gray-bg); color: var(--ink); }
.badge-coming-soon { background: var(--white); border: 2px solid var(--gold); }

/* ---------- Forms ---------- */
.form { display: grid; gap: .4rem; }
.form label { font-weight: 600; margin-top: .6rem; }
.form button { margin-top: 1.1rem; }
.hint, .req { font-weight: 400; color: var(--gray-text); font-size: .88rem; }
input, select, textarea { font: inherit; color: var(--ink); width: 100%; min-height: 50px; padding: .6rem .85rem; border: 2px solid var(--line); border-radius: 10px; background: var(--white); }
input:focus, select:focus, textarea:focus { border-color: var(--bronze-dark); outline: 3px solid color-mix(in srgb, var(--gold) 45%, white); outline-offset: 0; }
input[type="file"] { padding: .7rem; }
input[type="checkbox"], input[type="radio"] { width: 1.4rem; height: 1.4rem; min-height: 0; padding: 0; flex: 0 0 auto; accent-color: var(--bronze-dark); }
.form .checkbox { justify-content: flex-start; text-align: left; }
.auth-card h1 { font-size: 2rem; }
.newsletter { display: flex; gap: .5rem; flex-wrap: wrap; }
.newsletter input { flex: 1 1 200px; }

/* ---------- Members library ---------- */
.members-head .lead { margin-bottom: .5rem; }
.library { display: grid; gap: 2rem; }
@media (min-width: 900px) { .library { grid-template-columns: 250px 1fr; } }
.small-head { font: 700 .85rem var(--font-body); text-transform: uppercase; letter-spacing: .1em; color: var(--gray-text); }
.cats a { display: flex; justify-content: space-between; padding: .7rem .9rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.cats a:hover { background: var(--tint); }
.cats a[aria-current] { background: var(--gold); }
.count { font-weight: 400; color: var(--charcoal); }
@media (max-width: 899px) { .cats ul { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .5rem; } .cats a { white-space: nowrap; border: 1px solid var(--line-soft); } }
.toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.search { display: flex; gap: .5rem; flex: 1 1 320px; }
.view-toggle { display: flex; gap: .4rem; }
.doc-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.doc-card h3 { font-size: 1.1rem; } .doc-card h3 a { color: var(--ink); text-decoration: none; } .doc-card h3 a:hover { text-decoration: underline; }
.doc-cat { color: var(--bronze-dark); font-weight: 700; font-size: .85rem; margin: .8rem 0 .2rem; }
.filetype { display: inline-block; background: var(--ink); color: var(--white); border-radius: 6px; font: 700 .7rem var(--font-body); padding: .15rem .4rem; letter-spacing: .05em; }
.filetype.big { font-size: .85rem; padding: .4rem .6rem; background: var(--gold); color: var(--ink); }
.doc-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 1.5rem; }
.doc-table th, .doc-table td { text-align: left; padding: .9rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.doc-table th { background: var(--tint); font-size: .9rem; }
.doc-table select { width: auto; min-height: 44px; }
@media (max-width: 700px) { .doc-table thead { display: none; } .doc-table tr { display: block; border-bottom: 1px solid var(--line-soft); padding: .5rem 0; } .doc-table td { display: block; border: 0; padding: .3rem 1rem; } }

/* ---------- Admin ---------- */
.upload-form { max-width: 640px; }
.admin-doc-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.admin-doc-form input { flex: 2 1 260px; } .admin-doc-form select { flex: 1 1 200px; width: auto; }
.admin-doc .inline button { margin-top: .6rem; }
.admin-doc p { margin: .5rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--line-soft); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.site-footer a { color: var(--gold-bright); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.footer-brand { font: 700 1.3rem var(--font-head); color: var(--white); }
.footer-head { font-weight: 700; color: var(--white); }
.site-footer li { margin-bottom: .4rem; }
.copyright { border-top: 1px solid var(--charcoal); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- PHP version additions: roster, admin tabs, owner/renter choice ---------- */
.admin-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.roster-form { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); column-gap: 1rem; align-items: end; }
.roster-form .actions { margin-top: 0; }
.roster-toolbar { margin-top: 2rem; }
.search select.auto { width: auto; }
.sort { color: var(--ink); text-decoration: none; display: inline-block; padding: .3rem 0; }
.sort:hover { text-decoration: underline; }
.badge-owner { background: var(--gold); }
.badge-renter { background: var(--gray-bg); }
.nowrap { white-space: nowrap; }
.choice { border: 2px solid var(--line-soft); border-radius: 10px; padding: .8rem 1rem; margin: .8rem 0 0; }
.choice legend { font-weight: 600; padding: 0 .3rem; }
.form .radio { display: inline-flex; align-items: center; gap: .5rem; margin-right: 1.5rem; font-weight: 600; min-height: 44px; }
.radio input { width: 24px; min-height: 24px; height: 24px; }
/* Unit number(s) box in the Member accounts table */
.units-input { width: 9rem; min-height: 40px; }

/* ---------- Events: month calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.cal-title { margin: 0; text-align: center; flex: 1 1 auto; }
.cal-today { margin: .6rem 0 1rem; }
.legend { display: inline-flex; flex-wrap: wrap; gap: .4rem; }
.calendar { width: 100%; border-collapse: collapse; table-layout: fixed; background: var(--white); }
.calendar th { padding: .5rem .2rem; font-size: .85rem; text-align: center; }
.calendar th abbr { text-decoration: none; }
.calendar td { vertical-align: top; border: 1px solid #d9d2c5; height: 6.5rem; padding: .3rem; overflow: hidden; }
.calendar td.cal-blank { background: #f6f3ee; }
.calendar td.cal-today-cell { outline: 3px solid var(--bronze-dark); outline-offset: -3px; }
.cal-num { font-weight: 700; display: block; margin-bottom: .2rem; }
.cal-items { display: grid; gap: .2rem; margin: 0; }
.chip { display: inline-block; border-radius: 6px; padding: .1rem .35rem; font-size: .78rem; line-height: 1.25; overflow-wrap: anywhere; }
.chip-event { background: var(--ink); color: var(--white); }
.chip-event a { color: inherit; text-decoration: none; } .chip-event a:hover, .chip-event a:focus { text-decoration: underline; }
.chip-federal { background: #8b1e2d; color: #fff; font-weight: 700; }
.chip-holiday { background: #fbeccd; color: #5a3d00; border: 1px dashed #b88a2e; font-style: italic; }
.cal-time { font-weight: 700; }
.cal-below { margin-top: 2rem; }
.holiday-row { padding: .3rem 0; border-bottom: 1px dashed #d9d2c5; }
.holiday-row.is-federal { font-weight: 700; color: #8b1e2d; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }   /* honeypot: hidden from people */
/* Phones: compact grid with small dots-sized text; the list below has full details. */
@media (max-width: 640px) {
  .calendar td { height: 3.6rem; padding: .15rem; }
  .calendar th { font-size: .72rem; }
  .chip { font-size: .62rem; padding: 0 .2rem; }
  .cal-items li:nth-child(n+3) { display: none; }
}
/* Printing the normal Events page (Ctrl+P): just the calendar, no menu, footer or forms.
   For a tidier one-page version use the "Print this month" button (/events/print). */
@media print {
  .site-header, .site-footer, .skip-link, .cal-head .btn, .cal-today, form, #suggest, .cal-below, .page-head .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .calendar td { height: auto; min-height: 4rem; }
  .chip { background: none !important; color: #000 !important; border: 0 !important; padding: 0; }
  .chip-federal { font-weight: 700; } .chip-holiday { font-style: italic; }
}
/* Unread contact messages */
.count-badge { display: inline-block; min-width: 1.4em; padding: 0 .4em; border-radius: 999px; background: #8b1e2d; color: #fff; font-size: .75rem; font-weight: 700; line-height: 1.5; text-align: center; }
.messages-table tr.is-unread td { font-weight: 700; }

/* ---------- Listings ---------- */
.badge-type { background: var(--ink); color: var(--white); }
.badge-available { background: #d9efd9; color: #13421a; }
.badge-pending { background: #fff1c7; color: #5a3d00; }
.badge-sold, .badge-rented { background: #8b1e2d; color: #fff; }
.listing h2 a { color: inherit; text-decoration: none; } .listing h2 a:hover, .listing h2 a:focus { text-decoration: underline; }
.listing-photo-link { display: block; }
.facts { color: var(--gray-text); font-weight: 600; }
.facts-list { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: 1.05rem; margin-bottom: 1rem; }
.listing-hero img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: .5rem; margin-top: .6rem; }
.thumbs img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.thumbs a:focus img, .listing-hero:focus img { outline: 3px solid var(--bronze-dark); outline-offset: 2px; }
/* Lightbox: hidden until its #photo-N is in the address bar (:target) — no JavaScript needed. */
.lightbox { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .92); align-items: center; justify-content: center; padding: 3rem 3.5rem; }
.lightbox:target { display: flex; }
.lightbox figure { margin: 0; max-width: 100%; max-height: 100%; text-align: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 8rem); width: auto; height: auto; margin: 0 auto; border-radius: 6px; }
.lightbox figcaption { color: #fff; margin-top: .6rem; }
.lb-close, .lb-prev, .lb-next { position: absolute; color: #fff; text-decoration: none; font-size: 2.4rem; line-height: 1; display: grid; place-items: center; min-width: 48px; min-height: 48px; }
.lb-close { top: .5rem; right: .75rem; }
.lb-prev { left: .25rem; top: 50%; transform: translateY(-50%); } .lb-next { right: .25rem; top: 50%; transform: translateY(-50%); }
.lb-close:focus, .lb-prev:focus, .lb-next:focus { outline: 3px solid #fff; }
@media (max-width: 640px) { .lightbox { padding: 3.5rem .5rem; } .lb-prev, .lb-next { top: auto; bottom: .5rem; transform: none; } }
/* Listing forms + photo manager */
.form-grid { display: grid; gap: 0 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.form-grid-3 { display: grid; gap: 0 .6rem; grid-template-columns: repeat(3, 1fr); }
.form-grid label, .form-grid-3 label { display: block; }
.fieldset { border: 1px solid #d9d2c5; border-radius: var(--radius); padding: .4rem 1rem 1rem; margin-top: 1rem; }
.fieldset legend { font-weight: 700; padding: 0 .3rem; }
.checkbox { display: flex; gap: .5rem; align-items: center; font-weight: 600; min-height: 44px; }
.photo-admin { display: grid; gap: 1rem; margin-top: 1rem; }
.photo-admin-item { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; align-items: start; border-top: 1px solid #e6e0d6; padding-top: 1rem; }
.photo-admin-item img { width: 160px; height: 120px; object-fit: cover; border-radius: 6px; }
.alt-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: end; margin: .4rem 0; } .alt-form label { width: 100%; font-size: .85rem; font-weight: 600; } .alt-form input { flex: 1 1 180px; }
@media (max-width: 520px) { .photo-admin-item { grid-template-columns: 1fr; } }
.admin-listings img { width: 90px; height: 60px; object-fit: cover; border-radius: 4px; }
.admin-listings tr.review-expired td { background: #fbeeee; } .admin-listings tr.review-pending-review td { background: #fff8e1; }

/* ---------- Gallery (home + admin) ---------- */
.g-caption { font-size: .9rem; margin: .35rem 0 0; color: var(--gray-text); }
.share-photos { margin-top: 2rem; }
.g-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.g-tile { border: 1px solid #e0d9cc; border-radius: var(--radius); padding: .6rem; background: var(--white); }
.g-tile.is-hidden img { opacity: .45; }
.g-check { display: block; position: relative; cursor: pointer; }
.g-check input { position: absolute; top: .5rem; left: .5rem; width: 1.6rem; height: 1.6rem; z-index: 1; }
.g-check img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.g-check input:checked + span + img { outline: 4px solid var(--bronze-dark); outline-offset: -4px; }
.g-flags { margin: .4rem 0; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.g-edit summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.bulk-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1.5rem 0; position: sticky; top: 0; z-index: 5; }
.bulk-bar select { width: auto; }

/* Home page only: slow, gentle orange <-> gold background pulse (14s loop).
   Only background-color animates (no layout properties), so it's light on older computers.
   Pale tints keep text readable; respects "reduce motion". */
body.page-home { background-color: #FFF1E0; animation: home-pulse 14s ease-in-out infinite alternate; }
@keyframes home-pulse {
  from { background-color: #FFEBD6; }  /* soft orange */
  to   { background-color: #FFF4D1; }  /* soft gold   */
}
@media (prefers-reduced-motion: reduce) { body.page-home { animation: none; } }
/* "Open item for the HOA" notes (moved here from inline style= attributes, which the site's security policy blocks). */
.open-item-flag { border: 2px dashed #b45309; background: #fff7ed; color: #7c2d12; padding: .5rem .75rem; border-radius: 6px; font-size: .9rem; }
/* Notices */
.notice .date .badge { margin-left: .35rem; vertical-align: middle; }
.badge-members { background: var(--ink); color: var(--white); }
.badge-pin { background: #fff1c7; color: #5a3d00; }
.notice.is-pinned { border-left: 5px solid var(--gold); }
.admin-notices tr.is-expired td { background: #f3f1ee; color: var(--gray-text); }
