/* ==========================================================================
   Manchester Sikh Society — Editorial Poster Theme
   Palette from brand poster: Navy #23354e · Gold #db8629 · Cream #dbbc9e
   Type: Cormorant Garamond (display serif) · Inter (sans)
   ========================================================================== */

:root {
  /* Brand */
  --navy: #23354e;
  --navy-deep: #1b2a42;
  --navy-ink: #141f31;
  --gold: #db8629;
  --gold-bright: #eda04b;
  --cream: #dbbc9e;
  --cream-light: #efdfc9;

  /* Surfaces & text */
  --paper: #faf6ef;
  --card: #fffdf8;
  --ink: #26313f;
  --body-text: #4c5563;
  --muted: #8a8f98;

  /* Lines */
  --line: rgba(35, 53, 78, 0.14);
  --line-strong: rgba(35, 53, 78, 0.32);
  --line-cream: rgba(219, 188, 158, 0.25);
  --line-gold: rgba(219, 134, 41, 0.45);

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --maxw: 1080px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--body-text);
  background-color: var(--paper);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--gold); color: #fff; }

a { color: var(--gold); text-decoration: none; transition: color 0.25s var(--ease); }
a:hover { color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

img { max-width: 100%; }

.hidden { display: none !important; }

section[id] { scroll-margin-top: 140px; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* Small-caps label used everywhere — the poster's letterspaced voice */
.eyebrow,
.hero-eyebrow,
.count,
.cat,
.go,
.tab,
.tag,
.pin-flag,
.date {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 500;
}

/* ------------------------------- Header --------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 239, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 16px; color: inherit; }
.brand img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: block;
}
.brand-text { display: flex; flex-direction: column; justify-content: center; line-height: 1; }
.brand-name {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--navy);
  text-transform: uppercase;
}
.brand-sub {
  font-size: 0.62rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 6px;
  font-weight: 600;
}

.header-nav { display: flex; gap: 32px; align-items: center; }
.header-nav a {
  position: relative;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--navy);
  font-weight: 500;
  padding: 6px 0;
}
.header-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.header-nav a:hover { color: var(--gold); }
.header-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* -------------------------------- Hero ----------------------------------
   Full navy, echoing the committee poster: letterspaced eyebrow, giant
   cream serif, gold year rules flanking, khanda watermark behind. */
.hero {
  position: relative;
  background: var(--navy);
  color: var(--cream);
  padding: 130px 0 110px;
  text-align: center;
  overflow: hidden;
}
.hero-khanda {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(30rem, 60vw, 46rem);
  line-height: 1;
  color: rgba(219, 188, 158, 0.045);
  pointer-events: none;
  user-select: none;
  transform: translateY(4%);
}
.hero-wrap { position: relative; }

/* Staggered entrance for the hero, poster reveal style */
@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.hero-ik,
.hero-eyebrow,
.hero-title-row,
.hero p.lead,
.hero-actions,
.hero-blessing {
  animation: heroRise 0.9s var(--ease) both;
}
.hero-eyebrow { animation-delay: 0.08s; }
.hero-title-row { animation-delay: 0.18s; }
.hero p.lead { animation-delay: 0.3s; }
.hero-actions { animation-delay: 0.4s; }
.hero-blessing { animation-delay: 0.52s; }
@media (prefers-reduced-motion: reduce) {
  .hero-ik, .hero-eyebrow, .hero-title-row, .hero p.lead, .hero-actions, .hero-blessing {
    animation: none;
  }
}

.hero-ik {
  display: block;
  font-family: "Noto Serif Gurmukhi", var(--serif);
  font-size: 2.3rem;
  line-height: 1;
  color: var(--gold-bright);
  margin-bottom: 26px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  font-size: 0.7rem;
  letter-spacing: 0.38em;
  color: var(--gold-bright);
  margin-bottom: 44px;
}
.hero-eyebrow::before,
.hero-eyebrow::after {
  content: "";
  width: 44px;
  height: 1px;
  background: var(--line-gold);
}

.hero-title-row { position: relative; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 6.8rem);
  line-height: 0.98;
  margin: 0 0 36px;
  color: var(--cream-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hero h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

/* Poster year marks: "2026 ——" and "—— 2027" flanking the title */
.hero-flank {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.78rem;
  letter-spacing: 0.42em;
  color: var(--gold);
  font-weight: 500;
}
.hero-flank .rule { width: 72px; height: 1px; background: var(--line-gold); }
.hero-flank.left { left: 0; }
.hero-flank.right { right: 0; }

.hero p.lead {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: rgba(239, 223, 201, 0.75);
  margin: 0 auto 54px;
  max-width: 560px;
  font-weight: 300;
  line-height: 2;
  letter-spacing: 0.02em;
}

.hero-actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.hero-blessing {
  margin-top: 72px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: rgba(219, 188, 158, 0.55);
}

/* ------------------------------- Ticker ---------------------------------
   Slim gold strip — Seva · Simran · Sangat — quiet personality. */
.ticker {
  position: relative;
  background: var(--navy-ink);
  border-top: 1px solid rgba(219, 134, 41, 0.25);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  white-space: nowrap;
}
/* Fade the scrolling text out at the edges without washing out the bar */
.ticker::before,
.ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 90px;
  z-index: 1;
  pointer-events: none;
}
.ticker::before { left: 0; background: linear-gradient(to right, var(--navy-ink), transparent); }
.ticker::after { right: 0; background: linear-gradient(to left, var(--navy-ink), transparent); }
.ticker-track {
  display: inline-flex;
  padding: 13px 0;
  animation: ticker 46s linear infinite;
}
.ticker span {
  display: inline-flex;
  align-items: center;
  gap: 28px;
  padding-right: 28px;
  font-size: 0.66rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
}
.ticker .k { color: rgba(219, 188, 158, 0.45); font-size: 0.9rem; letter-spacing: 0; font-style: normal; }
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------ Buttons --------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 16px 36px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  text-decoration: none;
  background: transparent;
  border-radius: 0;
}
.btn-primary { background: var(--gold); color: var(--navy-ink); border-color: var(--gold); }
.btn-primary:hover { background: transparent; color: var(--gold); border-color: var(--gold); }
.btn-outline { border-color: rgba(219, 188, 158, 0.5); color: var(--cream-light); }
.btn-outline:hover { border-color: var(--cream-light); background: var(--cream-light); color: var(--navy-ink); }

/* On light surfaces (admin, modals) the same buttons flip to navy */
main .btn-primary, .modal .btn-primary, .auth-card .btn-primary, .panel .btn-primary {
  background: var(--navy); border-color: var(--navy); color: var(--cream-light);
}
main .btn-primary:hover, .modal .btn-primary:hover, .auth-card .btn-primary:hover, .panel .btn-primary:hover {
  background: transparent; color: var(--navy);
}
main .btn-outline, .modal .btn-outline, .panel .btn-outline {
  border-color: var(--line-strong); color: var(--navy);
}
main .btn-outline:hover, .modal .btn-outline:hover, .panel .btn-outline:hover {
  background: var(--navy); border-color: var(--navy); color: var(--cream-light);
}
.btn-danger { border-color: rgba(190, 84, 84, 0.5); color: #b45454; }
.btn-danger:hover { background: #b45454; border-color: #b45454; color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 0.62rem; }
.btn:disabled { opacity: 0.55; cursor: default; }

/* ----------------------------- Sections --------------------------------- */
main { padding-bottom: 140px; }
.section { padding-top: 110px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--navy);
}
.section-title { display: flex; align-items: baseline; gap: 22px; }
.section-no {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  white-space: nowrap;
}
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 500;
  margin: 0;
  color: var(--navy);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}
.section-head .count { font-size: 0.64rem; color: var(--muted); padding-bottom: 6px; }

/* ------------------------------ Updates ---------------------------------
   Editorial list: gold-ruled meta line, big serif headline, roomy body. */
.update-card {
  position: relative;
  padding: 64px 0;
  border-bottom: 1px solid var(--line);
}
.update-card:last-child { border-bottom: none; }

.update-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.update-meta::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.date { font-size: 0.66rem; color: var(--gold); }
.pin-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.6rem;
  color: var(--cream-light);
  background: var(--navy);
  padding: 6px 12px;
}

.update-card h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem);
  margin: 0 0 24px;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: 0.01em;
  max-width: 30ch;
  overflow-wrap: break-word;
}
.update-card .update-img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  margin: 6px 0 30px;
  display: block;
  border: 1px solid var(--line);
  box-shadow: 12px 12px 0 rgba(35, 53, 78, 0.05);
}
.update-card .body {
  color: var(--body-text);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-weight: 300;
  font-size: 1.02rem;
  line-height: 1.95;
  max-width: 68ch;
}
.update-card .body a {
  color: var(--navy);
  font-weight: 500;
  border-bottom: 1px solid var(--line-gold);
  padding-bottom: 1px;
}
.update-card .body a:hover { color: var(--gold); border-color: var(--gold); }

/* ------------------------------- Links ---------------------------------- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 40px;
}
.link-card {
  position: relative;
  border: 1px solid var(--line);
  padding: 44px 36px 40px;
  display: flex;
  flex-direction: column;
  background: var(--card);
  transition: background 0.35s var(--ease), transform 0.35s var(--ease);
  overflow: hidden;
}
.link-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.link-card:hover { background: var(--navy); transform: translateY(-4px); }
.link-card:hover::before { transform: scaleX(1); }
.link-card .cat { font-size: 0.6rem; color: var(--gold); margin-bottom: 20px; display: block; }
.link-card h3 {
  font-size: 1.55rem;
  font-family: var(--serif);
  margin: 0 0 12px;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.15;
  transition: color 0.35s var(--ease);
  overflow-wrap: break-word;
}
.link-card p {
  color: var(--body-text);
  font-size: 0.88rem;
  margin: 0 0 36px;
  flex: 1;
  font-weight: 300;
  line-height: 1.75;
  transition: color 0.35s var(--ease);
}
.link-card .go {
  font-size: 0.64rem;
  color: var(--navy);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: color 0.35s var(--ease), gap 0.3s var(--ease);
}
.link-card:hover h3 { color: var(--cream-light); }
.link-card:hover p { color: rgba(239, 223, 201, 0.65); }
.link-card:hover .go { color: var(--gold-bright); gap: 16px; }
.link-card .index {
  position: absolute;
  top: 30px;
  right: 30px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--line-strong);
  transition: color 0.35s var(--ease);
}
.link-card:hover .index { color: var(--gold); }

/* ------------------------- Ornamental divider --------------------------- */
.divider {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 110px 0 0;
  color: var(--gold);
  font-size: 1.1rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ----------------------------- Empty state ------------------------------ */
.empty {
  padding: 90px 0;
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.92rem;
}
.empty::before {
  content: "☬";
  display: block;
  font-size: 1.8rem;
  color: var(--line-strong);
  margin-bottom: 18px;
}
.empty strong {
  color: var(--navy);
  display: block;
  font-size: 1.5rem;
  font-family: var(--serif);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ------------------------------- Footer --------------------------------- */
.site-footer {
  background: var(--navy);
  color: rgba(239, 223, 201, 0.6);
  padding: 90px 0 46px;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.site-footer .crest { width: 76px; height: 76px; border-radius: 50%; }
.footer-gurmukhi {
  font-family: "Noto Serif Gurmukhi", var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  color: var(--cream);
  margin: 0;
  line-height: 1.7;
}
.footer-blessing {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  color: rgba(219, 188, 158, 0.6);
  margin: 0;
  line-height: 1.5;
  letter-spacing: 0.04em;
}
.footer-rule {
  width: 64px;
  height: 1px;
  background: var(--line-gold);
  border: 0;
  margin: 6px 0;
}
.footer-nav { display: flex; gap: 30px; }
.footer-nav a {
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: rgba(239, 223, 201, 0.6);
  font-weight: 500;
}
.footer-nav a:hover { color: var(--gold-bright); }
.footer-small {
  margin-top: 22px;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239, 223, 201, 0.32);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 18px;
}

/* --------------------------- Scroll reveal ------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------- Forms & Auth -------------------------------
   Login lives on the poster: full navy, cream serif, gold rules. */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: var(--navy);
}
.auth-khanda {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42rem;
  color: rgba(219, 188, 158, 0.04);
  pointer-events: none;
  user-select: none;
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: 56px 44px 48px;
  text-align: center;
  background: rgba(20, 31, 49, 0.55);
  border: 1px solid rgba(219, 188, 158, 0.16);
  backdrop-filter: blur(6px);
}
.auth-card .auth-crest { width: 84px; height: 84px; border-radius: 50%; margin-bottom: 26px; }
.auth-card h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 2.1rem;
  margin: 0 0 14px;
  color: var(--cream-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.1;
}
.auth-card .sub {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--gold);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  margin-bottom: 42px;
  font-weight: 500;
}
.auth-card .sub::before, .auth-card .sub::after {
  content: ""; width: 26px; height: 1px; background: var(--line-gold);
}
.auth-card .field label { color: rgba(239, 223, 201, 0.7); }
.auth-card .field input {
  background: rgba(250, 246, 239, 0.04);
  border-color: rgba(219, 188, 158, 0.22);
  color: var(--cream-light);
  caret-color: var(--gold);
}
.auth-card .field input:focus { border-color: var(--gold); }
.auth-card .btn-primary {
  background: var(--gold); border-color: var(--gold); color: var(--navy-ink);
}
.auth-card .btn-primary:hover { background: transparent; color: var(--gold); }
.auth-back {
  display: inline-block;
  margin-top: 28px;
  font-size: 0.62rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(239, 223, 201, 0.4);
}
.auth-back:hover { color: var(--gold-bright); }

@keyframes authShake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}
.auth-card.shake { animation: authShake 0.5s var(--ease); }
@media (prefers-reduced-motion: reduce) { .auth-card.shake { animation: none; } }

.field { text-align: left; margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 10px;
  font-weight: 600;
}
.field label .opt { text-transform: none; letter-spacing: 0.04em; color: var(--muted); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem; /* ≥16px stops iOS Safari auto-zooming the page on focus */
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field input:focus, .field textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(219, 134, 41, 0.12);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
.field input[type="file"] {
  border-style: dashed;
  background: transparent;
  font-size: 0.8rem;
  color: var(--body-text);
  cursor: pointer;
}
.field input[type="file"]::file-selector-button {
  font-family: var(--sans);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--line-strong);
  padding: 8px 14px;
  margin-right: 14px;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.field input[type="file"]::file-selector-button:hover { background: var(--navy); color: var(--cream-light); }

.check-row { display: flex; align-items: center; gap: 12px; }
.check-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0; accent-color: var(--gold); }
.check-row label { margin: 0; letter-spacing: 0.14em; }

/* Show/hide password toggle */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-toggle {
  position: absolute;
  right: 4px;
  top: 0;
  height: 100%;
  width: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.pw-toggle:hover { color: var(--navy); }
.pw-toggle svg { display: block; }
.auth-card .pw-toggle { color: rgba(239, 223, 201, 0.55); }
.auth-card .pw-toggle:hover { color: var(--gold-bright); }

.form-actions { margin-top: 36px; display: flex; gap: 14px; flex-wrap: wrap; }

.alert { padding: 14px 16px; font-size: 0.85rem; margin-bottom: 24px; text-align: left; border: 1px solid; }
.alert-error { border-color: rgba(217, 108, 108, 0.5); color: #e08e8e; background: rgba(217, 108, 108, 0.08); }

/* ------------------------------ Admin ------------------------------------ */
.admin-body { background: var(--paper); }
.admin-bar { background: var(--navy); }
.admin-bar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 11px;
  padding-bottom: 11px;
}
.admin-bar .tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: var(--gold-bright);
  font-weight: 600;
}
.admin-bar .tag::before { content: "☬"; font-size: 0.85rem; color: var(--cream); letter-spacing: 0; }
.admin-bar .live { font-size: 0.62rem; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(239, 223, 201, 0.5); }

.admin-grid { display: grid; grid-template-columns: 1fr; gap: 36px; margin-top: 44px; }
.panel { border: 1px solid var(--line); padding: 44px 38px; background: var(--card); }
.panel h2 {
  font-family: var(--serif);
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 8px;
  letter-spacing: 0.03em;
}
.panel .panel-sub { color: var(--muted); font-size: 0.88rem; margin: 0 0 34px; font-weight: 300; }

.tabs { display: flex; gap: 30px; border-bottom: 1px solid var(--line); padding-top: 44px; }
.tab {
  padding: 0 2px 16px;
  cursor: pointer;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 0.7rem;
  transition: color 0.25s var(--ease);
}
.tab:hover { color: var(--navy); }
.tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.tab-count {
  display: inline-block;
  margin-left: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.85rem;
  letter-spacing: 0;
  color: var(--gold);
  text-transform: none;
}

.admin-empty {
  padding: 34px 0 14px;
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  font-size: 0.88rem;
}
.admin-empty::before {
  content: "☬";
  display: block;
  font-size: 1.4rem;
  color: var(--line-strong);
  margin-bottom: 12px;
}

/* Selected-image preview under the file inputs */
.file-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--card);
}
.file-preview img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex: none;
}
.file-preview .fp-name {
  flex: 1;
  min-width: 0;
  font-size: 0.78rem;
  color: var(--body-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-preview .fp-clear {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 600;
  color: #b45454;
  padding: 6px 8px;
}
.file-preview .fp-clear:hover { text-decoration: underline; }

.item-row {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.item-row:last-child { border-bottom: none; }
.item-thumb {
  width: 72px; height: 72px; object-fit: cover;
  border: 1px solid var(--line); flex: none;
}
.item-row .item-main { flex: 1; min-width: 0; }
.item-row .item-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.2;
  overflow-wrap: break-word;
}
.badge-pin {
  font-size: 0.54rem;
  letter-spacing: 0.2em;
  background: var(--gold);
  color: var(--navy-ink);
  padding: 4px 9px;
  margin-left: 12px;
  vertical-align: 3px;
  font-family: var(--sans);
  font-weight: 700;
}
.item-row .item-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 7px;
  font-weight: 300;
  overflow-wrap: anywhere;
}
.item-row .item-meta a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.item-row .item-meta .cat-label { color: var(--gold); font-weight: 500; }
.item-row .item-actions { display: flex; gap: 10px; }
.list-empty { color: var(--muted); font-weight: 300; font-size: 0.9rem; }

@media (min-width: 940px) { .admin-grid { grid-template-columns: 1fr 1.2fr; align-items: start; } }

/* ------------------------------ Modal / Toast --------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(20, 31, 49, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(5px);
}
.modal {
  width: 100%;
  max-width: 580px;
  background: var(--paper);
  border-top: 3px solid var(--gold);
  padding: 44px;
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
}
.modal h3 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  color: var(--navy);
  margin: 0 0 28px;
  letter-spacing: 0.02em;
}
.modal .img-preview { max-height: 84px; border: 1px solid var(--line); display: block; }
.modal .help { font-size: 0.74rem; color: var(--muted); margin-top: 8px; font-weight: 300; }

/* Styled replacement for the browser confirm() dialog */
.modal.confirm { max-width: 440px; text-align: center; border-top-color: #b45454; }
.modal.confirm h3 { margin-bottom: 14px; }
.modal.confirm p { color: var(--body-text); font-weight: 300; font-size: 0.92rem; margin: 0 0 32px; line-height: 1.7; }
.modal.confirm .form-actions { justify-content: center; margin-top: 0; }

.toast {
  position: fixed;
  max-width: calc(100vw - 32px);
  width: max-content;
  text-align: center;
  bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--navy);
  color: var(--cream-light);
  padding: 15px 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  z-index: 200;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-weight: 500;
  border-left: 3px solid var(--gold);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast::before { content: "✓"; margin-right: 12px; color: var(--gold-bright); font-weight: 700; }
.toast.error { background: #a34444; border-left-color: #d96c6c; color: #fff; }
.toast.error::before { content: "!"; color: #fff; }

/* ------------------------------ Mobile ---------------------------------- */
@media (max-width: 1120px) {
  .hero-flank { display: none; }
}
@media (max-width: 768px) {
  .wrap { padding: 0 20px; }
  .brand img { width: 72px; height: 72px; }
  .brand-name { font-size: 1.05rem; }
  .brand-sub { letter-spacing: 0.3em; }
  .header-nav { gap: 20px; }

  .hero { padding: 90px 0 80px; }
  .hero-eyebrow { letter-spacing: 0.28em; }
  .hero-blessing { margin-top: 54px; }
  .hero-actions { flex-direction: column; align-items: stretch; max-width: 320px; margin: 0 auto; }

  .section { padding-top: 80px; }
  .section-title { gap: 14px; }
  .update-card { padding: 46px 0; }
  .update-card .body { font-size: 0.95rem; }

  .links-grid { gap: 20px; margin-top: 28px; }
  .link-card { padding: 36px 28px 32px; }

  .site-footer { padding: 70px 0 40px; }

  .panel { padding: 32px 22px; }
  .admin-grid { gap: 26px; margin-top: 32px; }
  .item-row { flex-wrap: wrap; }
  .item-row .item-actions { width: 100%; }
  .item-row .item-actions .btn { flex: 1; }
  .modal { padding: 32px 24px; }
  .modal .form-actions .btn { flex: 1; min-width: 130px; }
  .auth-card { padding: 46px 28px 40px; }

  /* Comfortable touch targets (≥44px) for the small controls */
  .btn-sm { padding: 15px 18px; font-size: 0.66rem; }
  .tab { padding-bottom: 18px; }
  .file-preview .fp-clear { padding: 12px 10px; }
  .header-nav a { padding: 12px 0; }
}

/* Very narrow phones: the crest alone carries the brand */
@media (max-width: 480px) {
  .brand-text { display: none; }
  .header-nav { gap: 14px; }
  .header-nav a { font-size: 0.66rem; letter-spacing: 0.16em; }
}
