:root {
  --yellow: #ffd51f;
  --yellow-deep: #f2b913;
  --pink: #ec1670;
  --pink-dark: #c80e5b;
  --ink: #171717;
  --paper: #fffdf8;
  --blue: #dff5ff;
  --shadow: 0 16px 45px rgba(31, 25, 11, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 213, 31, .23), transparent 32rem),
    radial-gradient(circle at 90% 35%, rgba(236, 22, 112, .09), transparent 26rem),
    linear-gradient(180deg, #fffdf6 0%, #fff 45%, #fff8d9 100%);
  font-family: ui-rounded, "Avenir Next", Avenir, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
}

a { color: inherit; }
.page-shell { width: min(1160px, calc(100% - 28px)); margin: 0 auto; }

.site-header {
  padding: 18px 0 10px;
  text-align: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 900;
  font-size: clamp(1rem, 2vw, 1.22rem);
  letter-spacing: .02em;
}
.brand-badge {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 5px 0 var(--yellow-deep);
  font-size: 22px;
}

.hero-card {
  background: white;
  border-radius: 26px;
  padding: 10px;
  box-shadow: var(--shadow);
  border: 2px solid rgba(255, 213, 31, .55);
}
.hero-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 19px;
}

.cta-section {
  text-align: center;
  padding: 28px 0 12px;
}
.cta-section h1,
.cta-section h2 {
  margin: 0 0 8px;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  line-height: 1.05;
}
.cta-section p {
  margin: 0 auto 20px;
  max-width: 720px;
  color: #554c45;
  font-size: clamp(1rem, 2vw, 1.12rem);
}
.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 820px;
  margin: 0 auto;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 68px;
  padding: 16px 22px;
  border-radius: 18px;
  text-decoration: none;
  font-weight: 900;
  font-size: clamp(1rem, 2.1vw, 1.18rem);
  border: 2px solid var(--ink);
  box-shadow: 0 7px 0 rgba(20,20,20,.16);
  transition: transform .16s ease, box-shadow .16s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 9px 0 rgba(20,20,20,.18); }
.btn:active { transform: translateY(2px); box-shadow: 0 3px 0 rgba(20,20,20,.18); }
.btn-facebook { background: #fff; }
.btn-upload { background: linear-gradient(135deg, #ffec68, var(--yellow)); }
.btn .icon { font-size: 1.45em; }

.mini-card {
  margin: 24px auto 0;
  max-width: 820px;
  border-radius: 18px;
  padding: 18px 20px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.08);
  text-align: left;
}
.mini-card strong { color: var(--pink-dark); }

.site-footer {
  padding: 30px 0 34px;
  text-align: center;
  color: #6a625b;
  font-size: .92rem;
}
.site-footer a { font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* Upload page */
.upload-wrap {
  width: min(820px, calc(100% - 28px));
  margin: 0 auto;
  padding-bottom: 36px;
}
.back-link {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin: 8px 0 18px;
  font-weight: 800;
  text-decoration: none;
}
.upload-card {
  background: #fff;
  border: 3px solid var(--yellow);
  border-radius: 28px;
  padding: clamp(20px, 4vw, 38px);
  box-shadow: var(--shadow);
}
.upload-card h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: .98;
}
.upload-card .lead { color: #5a514b; font-size: 1.08rem; }
.duck-strip {
  margin: 22px 0;
  padding: 14px 18px;
  border-radius: 16px;
  background: linear-gradient(90deg, #fff3a3, #ffe45f);
  font-weight: 900;
  text-align: center;
}
form { display: grid; gap: 16px; margin-top: 18px; }
.field { display: grid; gap: 7px; }
label { font-weight: 850; }
input, textarea {
  width: 100%;
  font: inherit;
  border: 2px solid #d9d1ca;
  border-radius: 14px;
  padding: 13px 14px;
  background: #fff;
  outline: none;
}
input:focus, textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 4px rgba(236,22,112,.1); }
textarea { min-height: 120px; resize: vertical; }
.file-box {
  padding: 18px;
  border: 2px dashed var(--pink);
  border-radius: 16px;
  background: #fff7fb;
}
.file-help { margin: 7px 0 0; color: #766a63; font-size: .9rem; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; }
.checkline input { width: 20px; height: 20px; margin-top: 1px; flex: 0 0 auto; }
.submit-btn {
  cursor: pointer;
  border: 2px solid var(--ink);
  border-radius: 16px;
  min-height: 60px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 950;
  font-size: 1.12rem;
  background: var(--yellow);
  box-shadow: 0 6px 0 rgba(20,20,20,.16);
}
.submit-btn:hover { filter: brightness(1.02); }
.hidden { position: absolute !important; left: -9999px !important; }
.error { color: #a8003f; font-weight: 800; min-height: 1.3em; }

.thanks-card {
  text-align: center;
  background: #fff;
  border: 3px solid var(--yellow);
  border-radius: 28px;
  padding: 44px 24px;
  box-shadow: var(--shadow);
}
.thanks-card .emoji { font-size: 4rem; }
.thanks-card h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin: 6px 0 8px; }

@media (max-width: 680px) {
  .page-shell { width: min(100% - 18px, 1160px); }
  .site-header { padding-top: 12px; }
  .hero-card { border-radius: 18px; padding: 6px; }
  .hero-card img { border-radius: 13px; }
  .cta-section { padding-top: 22px; }
  .button-row { grid-template-columns: 1fr; }
  .btn { min-height: 62px; }
  .mini-card { text-align: center; }
}

/* Basin upload status */
.submit-btn:disabled {
  opacity: .72;
  cursor: wait;
}
.basin-message {
  margin-top: 22px;
  padding: 28px 22px;
  border-radius: 20px;
  text-align: center;
}
.basin-message h2 {
  margin: 4px 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
}
.basin-message p {
  margin: 0 auto 18px;
  max-width: 620px;
  color: #5a514b;
}
.basin-success {
  background: #fff8c9;
  border: 2px solid var(--yellow-deep);
}
.basin-fail {
  background: #fff1f6;
  border: 2px solid var(--pink);
}
.basin-emoji { font-size: 3rem; }
.basin-buttons { margin-top: 18px; }

/* Cloudflare-native upload, gallery and approval queue */
.btn-gallery { background: #fff0f7; }
.button-row:has(.btn-gallery) { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1050px; }
.review-note {
  margin: -6px 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #eef9ff;
  border: 1px solid #bfe9fa;
  color: #3d5360;
}
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.image-preview-wrap { margin-top: 12px; }
.image-preview { display: block; width: min(100%, 360px); max-height: 360px; object-fit: cover; border-radius: 14px; border: 2px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.upload-progress { min-height: 1.3em; text-align: center; color: #6a625b; font-weight: 700; }
.upload-message { margin-top: 22px; padding: 28px 22px; border-radius: 20px; text-align: center; }
.upload-message h2 { margin: 4px 0 8px; font-size: clamp(1.7rem, 4vw, 2.4rem); }
.upload-message p { margin: 0 auto 18px; max-width: 620px; color: #5a514b; }
.upload-success { background: #fff8c9; border: 2px solid var(--yellow-deep); }
.upload-fail { background: #fff1f6; border: 2px solid var(--pink); }

.gallery-wrap, .admin-wrap { width: min(1160px, calc(100% - 28px)); margin: 0 auto; padding-bottom: 40px; }
.gallery-head { text-align: center; background: #fff; border: 3px solid var(--yellow); border-radius: 26px; padding: 28px 22px; box-shadow: var(--shadow); }
.gallery-head h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 3.5rem); }
.gallery-head p { color: #5a514b; margin: 0 auto 18px; max-width: 700px; }
.gallery-upload-btn { display: inline-flex; min-height: 54px; }
.gallery-status { text-align: center; font-weight: 800; margin: 24px 0 16px; color: #665c55; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.gallery-card { overflow: hidden; background: #fff; border: 2px solid rgba(255,213,31,.65); border-radius: 22px; box-shadow: 0 12px 32px rgba(31,25,11,.12); }
.gallery-image-link { display: block; background: #f6f2ea; aspect-ratio: 1 / 1; }
.gallery-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-copy { padding: 17px 18px 20px; }
.gallery-copy h2 { margin: 0 0 7px; font-size: 1.35rem; }
.gallery-copy p { margin: 6px 0; }
.gallery-place { font-weight: 800; }
.gallery-date { color: #766a63; font-size: .92rem; }
.gallery-story { color: #4f4742; line-height: 1.45; white-space: pre-wrap; }

.admin-login { max-width: 720px; margin: 0 auto 20px; background: #fff; border: 3px solid var(--yellow); border-radius: 24px; padding: 26px; box-shadow: var(--shadow); }
.admin-login h1 { margin: 0 0 8px; }
.admin-login-row { display: flex; gap: 10px; margin: 14px 0 4px; }
.admin-login-row input { flex: 1; }
.admin-toolbar { display: flex; gap: 10px; align-items: center; margin: 18px 0; padding: 12px 14px; background: #fff; border-radius: 16px; border: 1px solid rgba(0,0,0,.08); }
.admin-toolbar strong { margin-right: auto; }
.admin-grid { display: grid; gap: 20px; }
.admin-card { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; background: #fff; border: 2px solid rgba(255,213,31,.65); border-radius: 22px; overflow: hidden; box-shadow: 0 12px 32px rgba(31,25,11,.12); }
.admin-card > img { width: 100%; height: 100%; min-height: 320px; object-fit: cover; background: #f7f2e7; }
.admin-card-copy { padding: 22px; }
.admin-card-copy h2 { margin-top: 0; }
.admin-card-copy p { margin: 7px 0; }
.admin-uploaded { color: #6a625b; font-size: .9rem; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.small-action { appearance: none; border: 2px solid var(--ink); border-radius: 12px; padding: 10px 14px; font: inherit; font-weight: 850; cursor: pointer; background: #fff; }
.approve-action { background: var(--yellow); }
.reject-action { background: #fff1f6; border-color: var(--pink-dark); color: #8d1043; }
.empty-queue { text-align: center; background: #fff; border-radius: 18px; padding: 34px; font-weight: 850; }

@media (max-width: 800px) {
  .button-row:has(.btn-gallery) { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .admin-card { grid-template-columns: 1fr; }
  .admin-card > img { min-height: 0; aspect-ratio: 4 / 3; }
}
@media (max-width: 540px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .admin-login-row { flex-direction: column; }
}
