:root {
  --cream: #faf7f2;
  --warm: #f5ede0;
  --gold: #c9a96e;
  --gold-light: #e8d5b0;
  --dark: #2c2416;
  --muted: #7a6a54;
  --shadow-soft: 0 20px 50px rgba(44, 36, 22, 0.08);
}

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

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--cream);
  color: var(--dark);
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

nav {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(250, 247, 242, 0.93);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gold-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 48px;
}

.nav-brand {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 300;
  font-style: italic;
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--gold);
}

.admin-btn {
  background: none;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 8px 20px;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}

.admin-btn:hover {
  background: var(--gold);
  color: white;
}

#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201, 169, 110, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(232, 196, 184, 0.15) 0%, transparent 50%),
    var(--cream);
}

.hero-orn {
  position: absolute;
  font-size: 18rem;
  color: var(--gold-light);
  opacity: 0.18;
  pointer-events: none;
  font-family: 'Cormorant Garamond', serif;
}

.hero-orn.l {
  left: -3rem;
  top: 50%;
  transform: translateY(-50%);
}

.hero-orn.r {
  right: -3rem;
  bottom: 10%;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 20px;
}

.hero-date {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  animation: fadeUp 1s ease both;
}

.hero-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.5rem, 9vw, 7rem);
  font-weight: 300;
  line-height: 1;
  color: var(--dark);
  animation: fadeUp 1s ease 0.2s both;
}

.hero-amp {
  font-style: italic;
  color: var(--gold);
  display: block;
  font-size: 0.7em;
}

.hero-sub {
  margin-top: 28px;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  animation: fadeUp 1s ease 0.4s both;
}

.hero-divider {
  width: 80px;
  height: 1px;
  background: var(--gold);
  margin: 28px auto;
  animation: fadeUp 1s ease 0.6s both;
}

.hero-place {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--muted);
  animation: fadeUp 1s ease 0.8s both;
}

.countdown {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  animation: fadeUp 1s ease 1s both;
}

.cd-item {
  text-align: center;
}

.cd-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
  color: var(--dark);
}

.cd-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.cd-sep {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  color: var(--gold-light);
  align-self: center;
  margin-top: -10px;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  padding: 100px 48px;
}

.s-label {
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
  display: block;
}

.s-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  margin-bottom: 24px;
}

.s-body {
  font-size: 0.85rem;
  line-height: 1.9;
  color: var(--muted);
  max-width: 520px;
}

.gold-line {
  width: 50px;
  height: 2px;
  background: var(--gold);
  margin-bottom: 32px;
}

#storia {
  background: var(--warm);
}

.story-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.tl {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.tl-item {
  display: flex;
  gap: 24px;
}

.tl-dot {
  width: 12px;
  height: 12px;
  min-width: 12px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  margin-top: 4px;
}

.tl-year {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
}

.tl-text {
  font-size: 0.82rem;
  line-height: 1.8;
  color: var(--muted);
  margin-top: 4px;
}

#gallery {
  background: linear-gradient(180deg, var(--cream) 0%, #f8f1e7 100%);
}

.gallery-wrap {
  max-width: 1320px;
  margin: 0 auto;
}

.gallery-head {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 54px;
  align-items: end;
  margin-bottom: 42px;
}

.gallery-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) 260px;
  gap: 24px;
  align-items: start;
}

.gallery-stage {
  position: relative;
  min-height: 680px;
  border: 1px solid rgba(201, 169, 110, 0.35);
  background: #efe4d3;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.gallery-stage::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 180px;
  background: linear-gradient(to top, rgba(27, 18, 11, 0.3), transparent);
  pointer-events: none;
  z-index: 1;
}

.gallery-stage-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.65s ease, transform 0.9s ease;
  transform: scale(1.035);
  pointer-events: none;
}

.gallery-stage-item.active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.gallery-stage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-stage-hit {
  position: absolute;
  inset: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  z-index: 2;
}

.gallery-stage-caption {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 28px;
  padding: 22px 24px;
  background: rgba(44, 36, 22, 0.56);
  color: var(--cream);
  backdrop-filter: blur(8px);
  z-index: 3;
}

.gallery-stage-caption strong {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.gallery-stage-caption span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 300;
  line-height: 1.08;
}

.gallery-dots {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 20px;
}

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(122, 106, 84, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-dot.active,
.gallery-dot:hover {
  background: var(--gold);
  transform: scale(1.15);
}

.gallery-strip {
  display: grid;
  gap: 14px;
}

.gallery-rail-card {
  position: relative;
  border: 1px solid rgba(201, 169, 110, 0.32);
  background: rgba(255, 252, 248, 0.68);
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
}

.gallery-rail-card:hover,
.gallery-rail-card.active {
  transform: translateX(-4px);
  border-color: rgba(201, 169, 110, 0.58);
  box-shadow: 0 14px 30px rgba(44, 36, 22, 0.08);
}

.gallery-rail-image {
  height: 108px;
  overflow: hidden;
}

.gallery-rail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-rail-body {
  padding: 12px 13px 13px;
}

.gallery-rail-index {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.gallery-rail-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.12rem;
  font-weight: 300;
  line-height: 1.1;
  color: var(--dark);
}

.gallery-rail-copy {
  margin-top: 8px;
  font-size: 0.7rem;
  line-height: 1.55;
  color: var(--muted);
}

.gallery-empty-note {
  margin-top: 18px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(19, 13, 10, 0.82);
  backdrop-filter: blur(10px);
  padding: 36px;
}

.gallery-lightbox.open {
  display: flex;
}

.gallery-lightbox-inner {
  position: relative;
  width: min(1180px, 100%);
  max-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.gallery-lightbox-close {
  position: absolute;
  top: 0;
  right: 0;
  transform: translateY(-110%);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.gallery-lightbox-frame {
  position: relative;
  background: #1b140d;
  border: 1px solid rgba(232, 213, 176, 0.25);
  overflow: hidden;
}

.gallery-lightbox-frame img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  background: #1b140d;
}

.gallery-lightbox-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  color: var(--cream);
}

.gallery-lightbox-copy strong {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 10px;
}

.gallery-lightbox-copy span {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  line-height: 1.1;
  margin-bottom: 8px;
}

.gallery-lightbox-copy p {
  font-size: 0.86rem;
  line-height: 1.8;
  color: rgba(250, 247, 242, 0.8);
}

.gallery-lightbox-actions {
  display: flex;
  gap: 12px;
}

.gallery-lightbox-nav {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(232, 213, 176, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
}

#programma {
  background: var(--cream);
}

.prog-wrap {
  max-width: 800px;
  margin: 0 auto;
}

.prog-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 48px;
}

.prog-card {
  border: 1px solid var(--gold-light);
  padding: 36px 28px;
  transition: box-shadow 0.3s;
}

.prog-card:hover {
  box-shadow: 0 8px 40px rgba(201, 169, 110, 0.15);
}

.prog-time {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
}

.prog-title {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark);
  margin: 12px 0 8px;
}

.prog-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
}

#rsvp {
  background: var(--dark);
}

#rsvp .s-title {
  color: var(--cream);
}

#rsvp .s-body {
  color: var(--gold-light);
}

#rsvp .gold-line {
  background: var(--gold);
}

.rsvp-wrap {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.fg {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fg label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.fg input,
.fg select,
.fg textarea {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 169, 110, 0.3);
  color: var(--cream);
  padding: 14px 16px;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.3s;
  width: 100%;
}

.fg input:focus,
.fg select:focus,
.fg textarea:focus {
  border-color: var(--gold);
}

.fg textarea {
  resize: vertical;
  min-height: 86px;
}

.fg select option {
  background: var(--dark);
}

.rsvp-search-wrap {
  position: relative;
  margin-top: 40px;
  text-align: left;
}

.rsvp-search-inp {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(201, 169, 110, 0.3);
  color: var(--cream);
  padding: 16px 20px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.3s;
}

.rsvp-search-inp:focus {
  border-color: var(--gold);
}

.rsvp-search-inp::placeholder {
  color: rgba(201, 169, 110, 0.5);
}

.rsvp-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1a1208;
  border: 1px solid rgba(201, 169, 110, 0.4);
  border-top: none;
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.rsvp-autocomplete.open {
  display: block;
}

.rsvp-ac-item {
  padding: 14px 20px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--cream);
  border-bottom: 1px solid rgba(201, 169, 110, 0.1);
  transition: background 0.15s;
}

.rsvp-ac-item:hover,
.rsvp-ac-item.active {
  background: rgba(201, 169, 110, 0.15);
}

.rsvp-ac-empty {
  padding: 14px 20px;
  font-size: 0.82rem;
  color: rgba(201, 169, 110, 0.5);
  font-style: italic;
}

.rsvp-card {
  display: none;
  margin-top: 32px;
  border: 1px solid rgba(201, 169, 110, 0.3);
  padding: 32px;
  text-align: left;
  animation: fadeUp 0.4s ease both;
}

.rsvp-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--cream);
  margin-bottom: 4px;
}

.rsvp-card-sub {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}

.rsvp-already {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.rsvp-already.conf {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.rsvp-already.decl {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.rsvp-already.pend {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.rsvp-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.rsvp-btn {
  padding: 16px;
  border: 1px solid;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  background: none;
}

.rsvp-btn.yes {
  border-color: rgba(74, 222, 128, 0.4);
  color: #4ade80;
}

.rsvp-btn.yes:hover,
.rsvp-btn.yes.sel {
  background: rgba(74, 222, 128, 0.15);
  border-color: #4ade80;
}

.rsvp-btn.no {
  border-color: rgba(248, 113, 113, 0.4);
  color: #f87171;
}

.rsvp-btn.no:hover,
.rsvp-btn.no.sel {
  background: rgba(248, 113, 113, 0.15);
  border-color: #f87171;
}

.rsvp-diet-row {
  margin-bottom: 16px;
}

.rsvp-submit {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  border: none;
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.3s;
  margin-top: 4px;
}

.rsvp-submit:hover {
  opacity: 0.85;
}

.rsvp-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.rsvp-success {
  display: none;
  text-align: center;
  padding: 48px 20px;
  color: var(--gold);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-style: italic;
}

.rsvp-not-found {
  display: none;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  font-size: 0.8rem;
  text-align: center;
}

#location {
  background: var(--warm);
}

.loc-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.loc-detail {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.loc-icon {
  font-size: 1.2rem;
  margin-top: 2px;
}

.loc-text h4 {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 4px;
}

.loc-text p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.7;
}

.map-ph {
  background: var(--gold-light);
  height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}

footer {
  background: var(--dark);
  color: var(--muted);
  text-align: center;
  padding: 40px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.footer-names {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 12px;
}

#admin-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #1a1a2e;
  overflow-y: auto;
}

.admin-nav {
  background: #16213e;
  padding: 0 32px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #0f3460;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}

.admin-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--gold);
  padding: 20px 32px 20px 0;
  border-right: 1px solid #0f3460;
  margin-right: 24px;
}

.admin-tab {
  background: none;
  border: none;
  color: #8892a4;
  padding: 22px 20px;
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.admin-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.admin-tab:hover {
  color: var(--gold-light);
}

.admin-close {
  margin-left: auto;
  background: none;
  border: 1px solid #0f3460;
  color: #8892a4;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.admin-close:hover {
  background: #0f3460;
  color: white;
}

.admin-body {
  padding: 40px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: #16213e;
  border: 1px solid #0f3460;
  padding: 24px 28px;
}

.stat-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  font-weight: 300;
  line-height: 1;
  color: var(--gold);
}

.stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8892a4;
  margin-top: 6px;
}

.stat-card.sc .stat-num {
  color: #4ade80;
}

.stat-card.sd .stat-num {
  color: #f87171;
}

.stat-card.sp .stat-num {
  color: #fbbf24;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.panel-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  color: #e2e8f0;
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.tbtn {
  padding: 10px 22px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1px solid;
  transition: all 0.2s;
}

.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: white;
}

.btn-gold:hover {
  opacity: 0.85;
}

.btn-outline {
  background: none;
  border-color: #0f3460;
  color: #8892a4;
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-red {
  background: #7f1d1d;
  border-color: #7f1d1d;
  color: #fca5a5;
}

.btn-red:hover {
  background: #6b1d1d;
}

.search-inp {
  background: #16213e;
  border: 1px solid #0f3460;
  color: #e2e8f0;
  padding: 10px 16px;
  font-size: 0.8rem;
  outline: none;
  width: 260px;
  transition: border-color 0.2s;
}

.search-inp:focus {
  border-color: var(--gold);
}

.filter-sel {
  background: #16213e;
  border: 1px solid #0f3460;
  color: #8892a4;
  padding: 10px 16px;
  font-size: 0.75rem;
  outline: none;
  cursor: pointer;
}

.tbl-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: #0f3460;
  color: #8892a4;
  padding: 14px 16px;
  text-align: left;
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 400;
}

tbody tr {
  border-bottom: 1px solid #0f3460;
  transition: background 0.15s;
}

tbody tr:hover {
  background: rgba(15, 52, 96, 0.3);
}

tbody td {
  padding: 14px 16px;
  font-size: 0.82rem;
  color: #cbd5e1;
}

.badge {
  display: inline-block;
  padding: 3px 12px;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 50px;
}

.bc {
  background: rgba(74, 222, 128, 0.1);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.bd {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.bp {
  background: rgba(251, 191, 36, 0.1);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.br {
  background: rgba(129, 140, 248, 0.1);
  color: #818cf8;
  border: 1px solid rgba(129, 140, 248, 0.3);
}

.tbl-actions {
  display: flex;
  gap: 6px;
}

.tbl-btn {
  background: none;
  border: 1px solid #0f3460;
  color: #8892a4;
  padding: 5px 12px;
  font-size: 0.65rem;
  cursor: pointer;
  transition: all 0.2s;
}

.tbl-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.tbl-btn.del:hover {
  border-color: #f87171;
  color: #f87171;
}

.import-drop {
  border: 2px dashed #0f3460;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 28px;
}

.import-drop:hover,
.import-drop.drag-over {
  border-color: var(--gold);
  background: rgba(201, 169, 110, 0.05);
}

.import-drop-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.import-drop-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: #e2e8f0;
}

.import-drop-sub {
  font-size: 0.75rem;
  color: #8892a4;
  margin-top: 8px;
}

.import-preview {
  display: none;
}

.import-map {
  background: #16213e;
  border: 1px solid #0f3460;
  padding: 24px;
  margin-bottom: 24px;
}

.import-map h4 {
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8892a4;
  margin-bottom: 16px;
}

.map-row {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 12px;
}

.map-row label {
  color: #8892a4;
  font-size: 0.78rem;
  min-width: 140px;
}

.map-row select {
  background: #1a1a2e;
  border: 1px solid #0f3460;
  color: #e2e8f0;
  padding: 8px 14px;
  font-size: 0.78rem;
  outline: none;
  flex: 1;
}

.modal-bg {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-bg.open {
  display: flex;
}

.modal {
  background: #16213e;
  border: 1px solid #0f3460;
  width: 540px;
  max-width: 95vw;
  padding: 40px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  color: #e2e8f0;
  margin-bottom: 24px;
}

.modal .fg {
  margin-bottom: 14px;
}

.modal .fg label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 6px;
}

.modal .fg input,
.modal .fg select {
  width: 100%;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  color: #e2e8f0;
  padding: 12px 14px;
  font-size: 0.82rem;
  outline: none;
}

.modal .fg input:focus,
.modal .fg select:focus {
  border-color: var(--gold);
}

.modal .fg select option {
  background: #1a1a2e;
}

.modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.s-card {
  background: #16213e;
  border: 1px solid #0f3460;
  padding: 28px;
}

.s-card h4 {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}

.s-card .fg {
  margin-bottom: 14px;
}

.s-card .fg label {
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8892a4;
  display: block;
  margin-bottom: 6px;
}

.s-card .fg input {
  width: 100%;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  color: #e2e8f0;
  padding: 10px 14px;
  font-size: 0.82rem;
  outline: none;
}

.s-card .fg input:focus {
  border-color: var(--gold);
}

.photo-admin-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.photo-form {
  background: #16213e;
  border: 1px solid #0f3460;
  padding: 28px;
}

.photo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.photo-card {
  background: #16213e;
  border: 1px solid #0f3460;
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.photo-card-body {
  padding: 16px;
}

.photo-card-body strong {
  display: block;
  font-size: 0.82rem;
  color: #e2e8f0;
  margin-bottom: 6px;
}

.photo-card-body p {
  font-size: 0.74rem;
  line-height: 1.7;
  color: #8892a4;
  min-height: 38px;
}

.photo-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.photo-help {
  font-size: 0.72rem;
  line-height: 1.8;
  color: #8892a4;
  margin-top: 10px;
}

.photo-status {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid #0f3460;
  background: #10192e;
  font-size: 0.72rem;
  line-height: 1.7;
  color: #8892a4;
}

.photo-empty {
  background: #16213e;
  border: 1px dashed #0f3460;
  padding: 40px;
  text-align: center;
  color: #8892a4;
  font-size: 0.78rem;
}

.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-btn {
  background: #16213e;
  border: 1px solid #0f3460;
  color: #8892a4;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: all 0.2s;
}

.page-btn:hover,
.page-btn.active {
  border-color: var(--gold);
  color: var(--gold);
}

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  background: #16213e;
  border: 1px solid var(--gold);
  color: #e2e8f0;
  padding: 16px 24px;
  font-size: 0.8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  max-width: 300px;
}

.toast.show {
  opacity: 1;
}

#login-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #1a1a2e;
  align-items: center;
  justify-content: center;
}

#login-screen.open {
  display: flex;
}

.login-box {
  width: 400px;
  padding: 56px 48px;
  background: #16213e;
  border: 1px solid #0f3460;
  text-align: center;
}

.login-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-style: italic;
  color: var(--gold);
  margin-bottom: 8px;
}

.login-sub {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8892a4;
  margin-bottom: 36px;
}

.login-box .lfg {
  text-align: left;
  margin-bottom: 16px;
}

.login-box .lfg label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 6px;
}

.login-box .lfg input {
  width: 100%;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  color: #e2e8f0;
  padding: 12px 14px;
  font-size: 0.82rem;
  outline: none;
}

.login-box .lfg input:focus {
  border-color: var(--gold);
}

.login-error {
  color: #f87171;
  font-size: 0.75rem;
  margin-bottom: 12px;
  display: none;
}

.login-btn {
  width: 100%;
  padding: 16px;
  background: var(--gold);
  border: none;
  color: white;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.3s;
}

.login-btn:hover {
  opacity: 0.85;
}

/* ── Contents panel ───────────────────────────── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.contents-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.contents-sync-bar {
  background: #0f2040;
  border: 1px solid #0f3460;
  padding: 10px 18px;
  font-size: 0.72rem;
  color: #8892a4;
  letter-spacing: 0.08em;
  margin-bottom: 24px;
  border-radius: 2px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contents-sync-bar.synced {
  border-color: #22c55e44;
  color: #4ade80;
}

.contents-sync-bar.saving {
  border-color: var(--gold);
  color: var(--gold-light);
}

.contents-sync-bar.error {
  border-color: #f8717144;
  color: #f87171;
}

.contents-subnav {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #0f3460;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.ctab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8892a4;
  padding: 14px 22px;
  cursor: pointer;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: all 0.2s;
  white-space: nowrap;
}

.ctab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.ctab:hover {
  color: var(--gold-light);
}

.cpanel {
  display: none;
}

.cpanel.active {
  display: block;
}

.content-section-intro {
  background: #0f2040;
  border-left: 3px solid var(--gold);
  padding: 14px 20px;
  font-size: 0.78rem;
  color: #8892a4;
  line-height: 1.7;
  margin-bottom: 28px;
}

.content-section-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background: #16213e;
  border: 1px solid #0f3460;
  padding: 24px;
  margin-bottom: 24px;
}

.content-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.content-single-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.content-item-card {
  display: flex;
  gap: 16px;
  background: #16213e;
  border: 1px solid #0f3460;
  padding: 22px 20px;
  transition: border-color 0.2s;
}

.content-item-card:focus-within {
  border-color: rgba(201, 169, 110, 0.5);
}

.content-item-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-style: italic;
  color: var(--gold);
  opacity: 0.5;
  min-width: 36px;
  padding-top: 2px;
  text-align: center;
}

.content-item-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* s-card textarea via existing .fg selector */
.s-card .fg textarea {
  width: 100%;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  color: #e2e8f0;
  padding: 10px 14px;
  font-size: 0.82rem;
  outline: none;
  resize: vertical;
  font-family: inherit;
}

.s-card .fg textarea:focus {
  border-color: var(--gold);
}

/* History */
.history-empty {
  color: #8892a4;
  font-size: 0.8rem;
  padding: 32px 0;
  text-align: center;
}

.history-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #0f3460;
  transition: background 0.2s;
}

.history-item:last-child {
  border-bottom: none;
}

.history-item:hover {
  background: #16213e;
}

.history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 4px;
  flex-shrink: 0;
}

.history-dot.remote {
  background: #4ade80;
}

.history-item-body {
  flex: 1;
}

.history-item-date {
  font-size: 0.78rem;
  color: #e2e8f0;
  margin-bottom: 3px;
}

.history-item-meta {
  font-size: 0.68rem;
  color: #8892a4;
  letter-spacing: 0.06em;
}

.history-wrap {
  background: #16213e;
  border: 1px solid #0f3460;
}

/* ── Media queries ─────────────────────────────── */
@media (max-width: 960px) {
  .gallery-head,
  .photo-admin-grid,
  .gallery-shell,
  .story-grid,
  .loc-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .content-items-grid,
  .content-section-header {
    grid-template-columns: 1fr;
  }

  .gallery-stage {
    min-height: 480px;
  }

  .gallery-strip {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 16px 20px;
  }

  .nav-links {
    display: none;
  }

  section {
    padding: 70px 20px;
  }

  .prog-grid,
  .photo-list {
    grid-template-columns: 1fr;
  }

  .gallery-stage {
    min-height: 360px;
  }

  .gallery-strip {
    grid-template-columns: 1fr;
  }

  .gallery-lightbox {
    padding: 20px;
  }

  .gallery-lightbox-meta {
    flex-direction: column;
  }

  .gallery-lightbox-close {
    top: 12px;
    right: 12px;
    transform: none;
  }

  .countdown {
    gap: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-body {
    padding: 24px 16px;
  }

  .contents-header-actions {
    width: 100%;
  }

  .contents-header-actions .tbtn {
    flex: 1;
    text-align: center;
  }

  .content-item-card {
    flex-direction: column;
    gap: 8px;
  }

  .content-item-number {
    font-size: 1.1rem;
    min-width: auto;
  }

  .ctab {
    padding: 12px 14px;
    font-size: 0.65rem;
  }

  .content-item-fields[style*="grid-template-columns"] {
    display: flex !important;
    flex-direction: column;
  }
}
