/* Not No — palette taken from the camp logo */
[hidden] { display: none !important; }
:root {
  --night: #131515;     /* logo field */
  --night-2: #1c1f1f;   /* raised surfaces */
  --sand: #b09a80;      /* logo gold */
  --sand-hi: #d6c3a6;   /* hover / highlights */
  --dust: #ece5d8;      /* body text on night */
  --dim: #9a958c;       /* secondary text */
  --rule: #33302b;
  --good: #8fb38a;
  --warn: #d98c6a;

  --display: "Marcellus", "Cinzel", Georgia, serif;
  --body: "Jost", "Futura", system-ui, sans-serif;

  --s1: .5rem; --s2: 1rem; --s3: 1.5rem; --s4: 2.5rem; --s5: 4rem; --s6: 6.5rem;
  --wrap: 68rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--night); color: var(--dust); font: 400 1.0625rem/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--sand-hi); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px solid var(--sand-hi); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; color: var(--sand-hi); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 var(--s2); max-width: 36em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 0; background: var(--sand); color: var(--night); padding: var(--s1) var(--s2); z-index: 20; }
.skip:focus { left: var(--s2); }
.muted { color: var(--dim); }

/* header */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--night) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding-top: .8rem; padding-bottom: .8rem; }
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--sand-hi); font: 1.35rem/1 var(--display); letter-spacing: .06em; }
.brand img { width: 38px; height: 38px; }
.site-nav { display: flex; gap: var(--s3); align-items: center; font-size: .98rem; }
.site-nav a { color: var(--dust); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--sand-hi); }

/* buttons + forms */
.btn { display: inline-flex; align-items: center; gap: .5em; font: 500 1rem/1 var(--body); letter-spacing: .02em; padding: .9em 1.5em; border-radius: 99px; border: 1.5px solid var(--sand); background: var(--sand); color: var(--night); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--sand-hi); border-color: var(--sand-hi); color: var(--night); }
.btn-line { background: transparent; color: var(--sand-hi); }
.btn-line:hover { background: var(--sand); color: var(--night); }
.btn-small { padding: .55em 1em; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: progress; }
label { display: grid; gap: .35rem; font-size: .92rem; color: var(--dim); }
input, textarea, select { font: 400 1rem var(--body); color: var(--dust); background: var(--night); border: 1px solid var(--rule); border-radius: 8px; padding: .65em .8em; width: 100%; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--sand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sand) 25%, transparent); }

/* footer */
.site-footer { border-top: 1px solid var(--rule); padding: var(--s4) 0; color: var(--dim); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); justify-content: space-between; align-items: baseline; }
.site-footer p { margin: 0; }

/* ---------- public home ---------- */
.hero { position: relative; min-height: min(92vh, 52rem); display: grid; place-items: center; text-align: center; padding: var(--s5) var(--gutter); overflow: hidden; }
.hero::before { /* the logo's starburst, scaled to the whole sky */
  content: ""; position: absolute; inset: -40%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 50%, color-mix(in srgb, var(--sand) 16%, transparent) 0deg .35deg, transparent .35deg 7.5deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, #000 0 8%, transparent 46%); mask: radial-gradient(circle at 50% 50%, #000 0 8%, transparent 46%);
}
.hero-inner { position: relative; display: grid; justify-items: center; gap: var(--s3); }
.hero-logo { width: clamp(15rem, 34vw, 23rem); filter: drop-shadow(0 0 60px rgba(176,154,128,.18)); }
.hero p { font-size: 1.2rem; color: var(--dust); margin: 0 auto; }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: center; }
@media (prefers-reduced-motion: no-preference) {
  .hero-logo { animation: moonrise 1.4s cubic-bezier(.2,.7,.2,1) both; }
  .hero::before { animation: glow 2.4s ease-out both; }
  @keyframes moonrise { from { opacity: 0; transform: translateY(18px) scale(.97); } }
  @keyframes glow { from { opacity: 0; } }
}

.band { padding: var(--s6) 0; border-top: 1px solid var(--rule); }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--s5); align-items: start; }
.about-grid .lede { font-size: 1.3rem; line-height: 1.5; color: var(--dust); }

/* events */
.events-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: var(--s2); margin-bottom: var(--s4); }
.day { display: grid; grid-template-columns: 11rem 1fr; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--rule); }
.day h3 { font-size: 1.5rem; }
.event { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s2); padding: .2rem 0 var(--s3); }
.event:last-child { padding-bottom: 0; }
.event time { color: var(--sand); font-weight: 500; }
.event h4 { margin: 0 0 .2rem; font: 500 1.15rem/1.3 var(--body); color: var(--dust); }
.event p { margin: 0; color: var(--dim); }
.event .where { font-size: .9rem; color: var(--sand); margin-top: .3rem; }
.empty { border: 1px dashed var(--rule); border-radius: 14px; padding: var(--s4); text-align: center; color: var(--dim); }
.empty p { margin: 0 auto; }

/* photos */
.photos { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--s2); }
.photos figure { margin: 0; border-radius: 14px; overflow: hidden; background: var(--night-2); aspect-ratio: 4/5; }
.photos figure:nth-child(1) { grid-column: span 3; aspect-ratio: auto; grid-row: span 2; }
.photos figure:nth-child(n+2) { grid-column: span 3; aspect-ratio: 16/10; }
.photos img { width: 100%; height: 100%; object-fit: cover; }
.photos .ph { display: grid; place-items: center; color: var(--dim); font-size: .9rem; border: 1px dashed var(--rule); height: 100%; min-height: 12rem; }

.heart { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s3); }

/* ---------- app pages (members + admin) ---------- */
.app-main { padding: var(--s5) 0 var(--s6); }
.login { max-width: 24rem; margin: 6vh auto; text-align: center; display: grid; gap: var(--s3); justify-items: center; }
.login img { width: 8rem; }
.login form { display: grid; gap: var(--s2); width: 100%; text-align: left; }
.login .btn { justify-self: stretch; justify-content: center; }
.error { color: var(--warn); font-size: .95rem; margin: 0; min-height: 1.4em; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s2); margin-bottom: var(--s4); }
.page-head p { margin: .4rem 0 0; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--rule); margin-bottom: var(--s4); }
.tabs button { font: 500 1rem var(--body); background: none; border: 0; color: var(--dim); padding: .8em 1.1em; border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--sand-hi); border-bottom-color: var(--sand); }

/* meal plan */
.meal-days { display: grid; gap: var(--s3); }
.meal-day { background: var(--night-2); border: 1px solid var(--rule); border-radius: 16px; padding: var(--s3); }
.meal-day h3 { margin-bottom: var(--s2); }
.meals { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.meal .slot { color: var(--sand); font-size: .9rem; font-weight: 500; }
.meal .menu { font-size: 1.05rem; color: var(--dust); margin: .15rem 0; }
.meal .crew, .meal .notes { font-size: .9rem; color: var(--dim); margin: 0; }
.callout { border-left: 2px solid var(--sand); padding: .2rem 0 .2rem var(--s2); margin-bottom: var(--s4); color: var(--dust); }

/* budget + editors */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s2); margin-bottom: var(--s4); }
.stat { background: var(--night-2); border: 1px solid var(--rule); border-radius: 14px; padding: var(--s2) var(--s3); }
.stat .k { font-size: .9rem; color: var(--dim); }
.stat .v { font: 1.9rem/1.2 var(--display); color: var(--sand-hi); }
.stat .v.neg { color: var(--warn); }
.bar { height: 8px; background: var(--rule); border-radius: 99px; overflow: hidden; margin: -.5rem 0 var(--s4); }
.bar span { display: block; height: 100%; background: var(--sand); border-radius: 99px; }
.bar span.over { background: var(--warn); }
.table-wrap { overflow-x: auto; }
table.edit { width: 100%; border-collapse: collapse; font-size: .95rem; }
table.edit th { text-align: left; font-weight: 500; color: var(--dim); padding: .5rem .4rem; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.edit td { padding: .3rem .4rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.edit td.num input { text-align: right; }
table.edit input, table.edit textarea, table.edit select { padding: .45em .55em; font-size: .95rem; }
table.edit textarea { min-height: 2.4rem; resize: vertical; }
table.edit tfoot td { font-weight: 500; color: var(--sand-hi); padding: .7rem .4rem; text-align: right; }
.row-del { background: none; border: 0; color: var(--dim); font-size: 1.2rem; cursor: pointer; padding: .3rem .5rem; line-height: 1; }
.row-del:hover { color: var(--warn); }
.editor-actions { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: center; margin-top: var(--s3); }
.save-state { color: var(--dim); font-size: .92rem; }
.section-gap { margin-top: var(--s5); }
.cat-totals { display: flex; flex-wrap: wrap; gap: .5rem; margin: var(--s2) 0 var(--s4); }
.cat-totals span { background: var(--night-2); border: 1px solid var(--rule); border-radius: 99px; padding: .3em .8em; font-size: .88rem; color: var(--dim); }
.cat-totals b { color: var(--dust); font-weight: 500; }
.day-editor { background: var(--night-2); border: 1px solid var(--rule); border-radius: 16px; padding: var(--s3); margin-bottom: var(--s3); }
.day-editor .day-top { display: flex; gap: var(--s2); align-items: end; margin-bottom: var(--s2); }
.day-editor .day-top label { flex: 1; }

/* responsive */
@media (max-width: 800px) {
  .site-nav { gap: var(--s2); font-size: .92rem; }
  .site-nav .hide-sm { display: none; }
  .about-grid, .day { grid-template-columns: 1fr; gap: var(--s2); }
  .event { grid-template-columns: 1fr; gap: .1rem; }
  .photos figure:nth-child(n) { grid-column: span 6; grid-row: auto; aspect-ratio: 4/3; }
  .meals { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .band { padding: var(--s5) 0; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.brand, .site-nav a, .site-nav .btn { white-space: nowrap; }
@media (max-width: 420px) { .brand { font-size: 1.15rem; } .brand img { width: 32px; height: 32px; } .site-nav { gap: .9rem; } }

/* ---------- camp photos ---------- */
.up-controls { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: end; }
.up-controls label.sr-label { width: 11rem; }
.up-controls #pick { cursor: pointer; }
.uploads { display: grid; gap: .4rem; margin-bottom: var(--s3); }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) 8rem 9rem; gap: var(--s2); align-items: center; font-size: .9rem; color: var(--dim); background: var(--night-2); border-radius: 8px; padding: .5rem .8rem; }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dust); }
.up-bar { height: 5px; background: var(--rule); border-radius: 99px; overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--sand); transition: width .2s; }
.up-row.ok .up-state { color: var(--good); }
.up-row.bad .up-state { color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--s3); }
.chips button { font: 500 .92rem var(--body); color: var(--dim); background: none; border: 1px solid var(--rule); border-radius: 99px; padding: .45em 1em; cursor: pointer; }
.chips button[aria-pressed="true"] { color: var(--night); background: var(--sand); border-color: var(--sand); }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); gap: .5rem; }
.ptile { position: relative; aspect-ratio: 1; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--night-2); cursor: zoom-in; }
.ptile img { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.ptile:hover img { opacity: .85; }
.pfallback { display: grid; place-items: center; height: 100%; color: var(--dim); font-size: .85rem; }
.play { position: absolute; right: .5rem; bottom: .4rem; color: #fff; font-size: .9rem; text-shadow: 0 1px 4px #000; }
#app.dropping { outline: 2px dashed var(--sand); outline-offset: 12px; border-radius: 12px; }
#viewer { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10,11,11,.97); color: var(--dust); }
#viewer::backdrop { background: rgba(0,0,0,.8); }
.v-top { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: .8rem var(--gutter); z-index: 2; }
.v-meta { margin: 0; color: var(--dim); font-size: .92rem; }
.v-actions { display: flex; gap: .6rem; align-items: center; }
.v-x { background: none; border: 0; color: var(--dust); font-size: 2rem; line-height: 1; cursor: pointer; padding: 0 .3rem; }
.v-stage { position: absolute; inset: 4rem 0 1rem; display: grid; place-items: center; text-align: center; }
.v-stage img, .v-stage video { max-width: calc(100vw - 2rem); max-height: calc(100vh - 6rem); object-fit: contain; border-radius: 4px; }
.v-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.4); color: var(--dust); border: 0; width: 3rem; height: 3rem; border-radius: 99px; font-size: 2rem; line-height: 1; cursor: pointer; z-index: 2; }
.v-prev { left: 1rem; } .v-next { right: 1rem; }
@media (max-width: 800px) {
  .up-controls { width: 100%; } .up-controls label.sr-label { flex: 1; width: auto; } .up-controls #pick { width: 100%; justify-content: center; }
  .up-row { grid-template-columns: minmax(0,1fr) 5rem; } .up-state { grid-column: 1 / -1; }
  .pgrid { grid-template-columns: repeat(3, 1fr); gap: 3px; } .ptile { border-radius: 2px; }
  .v-nav { display: none; } .v-meta { display: none; }
}
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
#pick { position: relative; }
#pick:focus-within { outline: 2px solid var(--sand-hi); outline-offset: 3px; }
@media (max-width: 480px) { .site-header .brand-name { display: none; } .site-nav { gap: 1rem; } }
