:root {
  color-scheme: light;
  --ink: #262626;
  --muted: #77736d;
  --paper: #f7f7f4;
  --panel: #ffffff;
  --charcoal: #4b4c50;
  --green: #4f8f81;
  --green-dark: #346a60;
  --gold: #f0c43d;
  --rose: #e9b4c2;
  --mint: #c8ddd4;
  --peach: #ead5bd;
  --line: #dedbd4;
  --shadow: 0 18px 36px rgba(41, 39, 34, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--paper);
  background-image:
    linear-gradient(rgba(209, 206, 198, 0.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(209, 206, 198, 0.28) 1px, transparent 1px);
  background-size: 54px 54px;
  color: var(--ink);
}

a {
  color: inherit;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 76vh;
  padding: 28px clamp(18px, 6vw, 78px);
  color: var(--ink);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.98) 0 46%, rgba(242, 239, 234, 0.78) 46% 100%),
    #f8f8f5;
}

.hero-video,
.hero-gif,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #f8f8f5;
  filter: saturate(0.7) contrast(0.92);
  opacity: 0.16;
}

.hero-gif {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-gif {
  background-position: center;
  background-size: cover;
}

.hero-overlay {
  background:
    radial-gradient(circle at 72% 34%, rgba(240, 196, 61, 0.16), transparent 28%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.62));
}

.hero-video-controls {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(12px, 3vw, 34px);
  pointer-events: none;
}

.hero-video-controls button {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(38, 38, 38, 0.18);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}

.hero-video-controls button:hover {
  background: #fff;
}

.topbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  min-width: 112px;
  min-height: 38px;
  padding: 0 12px;
  place-items: center;
  border: 2px solid rgba(38, 38, 38, 0.22);
  border-radius: 4px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.74);
}

.hero-content {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(360px, 1.12fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(76vh - 96px);
  margin-top: 20px;
}

.fade-up {
  animation: fadeUp 0.75s ease both;
}

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

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

.eyebrow {
  margin: 0 0 10px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 18px;
  max-width: 780px;
  font-size: 5rem;
  line-height: 0.98;
}

.hero p:not(.eyebrow) {
  max-width: 600px;
  margin: 0;
  color: #5f5c57;
  font-size: 18px;
  line-height: 1.6;
}

.birthday-pill {
  display: inline-flex;
  margin-top: 22px;
  padding: 12px 16px;
  border: 1px solid rgba(38, 38, 38, 0.14);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(41, 39, 34, 0.08);
  font-weight: 800;
}

.hero-collage {
  position: relative;
  min-height: 520px;
}

.collage-tile {
  position: absolute;
  margin: 0;
  overflow: hidden;
  border: 12px solid #fff;
  background: #fff;
  box-shadow: 0 24px 46px rgba(41, 39, 34, 0.16);
}

.collage-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collage-tile-1 {
  left: 3%;
  top: 8%;
  width: 43%;
  aspect-ratio: 1 / 1;
  clip-path: polygon(50% 0, 94% 23%, 94% 77%, 50% 100%, 6% 77%, 6% 23%);
}

.collage-tile-2 {
  right: 1%;
  top: 2%;
  width: 51%;
  aspect-ratio: 16 / 10;
  border-color: #f6f0e9;
}

.collage-tile-3 {
  left: 17%;
  bottom: 5%;
  width: 45%;
  aspect-ratio: 16 / 11;
  transform: rotate(-3deg);
}

.collage-tile-4 {
  right: 9%;
  bottom: 1%;
  width: 34%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border-color: #e5eee9;
}

main {
  padding-top: 58px;
  padding-bottom: 52px;
}

.section-heading {
  margin-bottom: 22px;
}

.section-heading h2 {
  margin: 0;
  font-size: 2.8rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.love-note,
.featured-memory,
.guestbook-section {
  margin-bottom: 58px;
}

.love-note {
  max-width: 920px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background:
    linear-gradient(90deg, rgba(240, 196, 61, 0.14), transparent 30%),
    #fff;
  box-shadow: var(--shadow);
}

.love-note h2 {
  margin: 0 0 12px;
  font-size: 2.8rem;
  line-height: 1.08;
}

.love-note p:last-child {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.post-card,
.empty-state,
.owner-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.post-card {
  transform: translateY(0);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 44px rgba(41, 39, 34, 0.14);
}

.memory-frame {
  padding: 12px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(135deg, #f0c43d, #d5d1c8 38%, #4f8f81 100%) border-box;
  border: 1px solid transparent;
}

.media-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.post-card img,
.featured-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #f2f0eb;
  border-radius: 2px;
}

.post-card video,
.featured-card video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #262626;
  border-radius: 2px;
}

.post-card:nth-child(4n + 1) img {
  clip-path: ellipse(46% 40% at 50% 47%);
}

.post-card:nth-child(4n + 2) img {
  clip-path: polygon(50% 0, 96% 26%, 88% 86%, 50% 100%, 12% 86%, 4% 26%);
}

.post-card:nth-child(4n + 3) img {
  border-radius: 50%;
}

.post-body {
  padding: 18px;
}

.featured-card .post-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.badge {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 10px;
  padding: 7px 10px;
  border-radius: 3px;
  background: var(--mint);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.post-body h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.post-body p {
  margin: 0 0 12px;
  color: var(--muted);
  line-height: 1.55;
}

.age-line {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 800;
}

.post-body small {
  color: var(--ink);
  font-weight: 700;
}

.empty-state {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(260px, 0.7fr);
  gap: 28px;
  align-items: center;
  padding: 28px;
  overflow: hidden;
}

.empty-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.template-frame {
  display: block;
  overflow: hidden;
  min-height: 112px;
  border: 8px solid #fff;
  background: #fff;
  box-shadow: 0 10px 24px rgba(41, 39, 34, 0.12);
}

.template-frame img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 112px;
  object-fit: cover;
}

.template-frame-1 {
  clip-path: polygon(50% 0, 95% 24%, 95% 76%, 50% 100%, 5% 76%, 5% 24%);
}

.template-frame-2 {
  background: #f7f3ed;
}

.template-frame-3 {
  border-radius: 50%;
}

.template-frame-4 {
  grid-column: span 2;
}

.template-frame-5 {
  clip-path: ellipse(46% 42% at 50% 50%);
}

.guestbook-section {
  margin-top: 58px;
}

.contact-panel {
  max-width: 620px;
  padding: 34px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.contact-panel label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-weight: 800;
}

.contact-panel input,
.contact-panel textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.contact-panel button {
  width: 100%;
  margin-top: 20px;
  border: 0;
  border-radius: 3px;
  padding: 14px 18px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.contact-panel button:hover {
  background: var(--green-dark);
}

.whatsapp-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 4px;
  background: #1fa855;
  color: #fff;
  box-shadow: 0 12px 30px rgba(20, 87, 51, 0.28);
  font-weight: 800;
  text-decoration: none;
}

.whatsapp-button:hover {
  background: #168542;
}

.blessing-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.blessing-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(41, 39, 34, 0.08);
}

.blessing-card strong {
  color: var(--green-dark);
}

.blessing-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 24, 24, 0.86);
}

.lightbox[hidden] {
  display: none;
}

.lightbox-content {
  width: min(100%, 980px);
}

.lightbox-content img,
.lightbox-content video {
  display: block;
  width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  background: #111;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-size: 22px;
  font-weight: 800;
  cursor: pointer;
}

.empty-state h3 {
  margin: 0 0 8px;
}

.empty-state p,
.muted {
  color: var(--muted);
}

.owner-page {
  min-height: 100vh;
  padding: 22px;
  background: #f7f8fb;
}

.owner-shell {
  width: min(100%, 1240px);
  margin: 0 auto;
  padding: 18px 0 50px;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}

.admin-hero {
  grid-column: 1 / -1;
  max-width: 920px;
  justify-self: center;
  padding: 34px 20px 20px;
  text-align: center;
}

.admin-hero h1 {
  margin: 0;
  color: #111827;
  font-size: 3.8rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.02;
}

.admin-hero p:not(.eyebrow) {
  max-width: 700px;
  margin: 18px auto 0;
  color: #5f6572;
  font-size: 18px;
  line-height: 1.6;
}

.admin-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.admin-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid #d8dce5;
  border-radius: 999px;
  background: #fff;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
}

.admin-actions a:first-child {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.owner-panel {
  width: 100%;
  padding: 30px;
  position: relative;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.06);
}

.owner-panel > * {
  position: relative;
}

.admin-dashboard > .owner-panel,
.admin-dashboard > form.owner-panel,
.admin-dashboard > section.owner-panel {
  grid-column: span 4;
}

.admin-dashboard > form.owner-panel:first-of-type {
  grid-column: span 8;
}

.admin-dashboard > section.owner-panel:first-of-type {
  grid-column: span 4;
}

.admin-dashboard > section.owner-panel:nth-of-type(5),
.admin-dashboard > section.owner-panel:nth-of-type(6),
.admin-dashboard > section.owner-panel:nth-of-type(7) {
  grid-column: span 6;
}

.owner-panel h1 {
  margin: 0 0 8px;
  color: #111827;
  font-size: 2rem;
}

.owner-panel h2 {
  margin: 0 0 14px;
  color: #111827;
  font-size: 1.25rem;
  font-weight: 800;
}

.owner-panel label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-weight: 800;
}

.owner-panel input,
.owner-panel textarea,
.owner-panel select {
  width: 100%;
  border: 1px solid #d7dce5;
  border-radius: 6px;
  padding: 13px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.owner-panel button {
  width: 100%;
  margin-top: 20px;
  border: 0;
  border-radius: 6px;
  padding: 14px 18px;
  background: #4f46e5;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.owner-panel button:hover {
  background: #3730a3;
}

.owner-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.owner-top a,
.back-link,
.download-button {
  color: #4f46e5;
  font-weight: 800;
}

.back-link {
  display: inline-block;
  margin-top: 18px;
}

.download-button {
  display: inline-flex;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #eef2ff;
  text-decoration: none;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.stat-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8f8f5;
}

.stat-box strong,
.stat-box span {
  display: block;
}

.stat-box strong {
  color: var(--green-dark);
  font-size: 32px;
  line-height: 1;
}

.stat-box span {
  margin-top: 7px;
  color: var(--muted);
  font-weight: 800;
}

.error {
  padding: 12px 14px;
  border-radius: 6px;
  background: #ffe8e8;
  color: #9e1c1c;
  font-weight: 700;
}

.success {
  padding: 12px 14px;
  border-radius: 6px;
  background: #e7f6ee;
  color: #12623f;
  font-weight: 700;
}

.manage-panel {
  margin-top: 0;
}

.manage-panel h2 {
  margin: 0 0 16px;
}

.manage-list {
  display: grid;
  gap: 12px;
}

.manage-item {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.manage-item img {
  width: 86px;
  height: 70px;
  border-radius: 6px;
  object-fit: cover;
  background: #111;
}

.manage-item video {
  width: 86px;
  height: 70px;
  border-radius: 6px;
  object-fit: contain;
  background: #111;
}

.manage-item h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.manage-item form {
  margin: 0;
}

.owner-panel .delete-button {
  width: auto;
  margin: 0;
  padding: 9px 12px;
  background: #b42318;
  font-size: 14px;
}

.owner-panel .delete-button:hover {
  background: #8f1d14;
}

.contact-list {
  display: grid;
  gap: 12px;
}

.contact-item {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.contact-item strong,
.contact-item span {
  display: block;
}

.contact-item span {
  margin-top: 5px;
  color: var(--green);
  font-weight: 800;
}

.contact-item p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.contact-item form {
  margin-top: 12px;
}

.contact-item form + form {
  margin-top: 8px;
}

@media (max-width: 640px) {
  .hero {
    min-height: auto;
    padding: 20px 18px;
  }

  .brand {
    gap: 8px;
    font-size: 14px;
  }

  .brand-mark {
    min-width: 96px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    min-height: 0;
    margin-top: 56px;
  }

  .hero h1 {
    font-size: 3.25rem;
  }

  .hero p:not(.eyebrow) {
    font-size: 16px;
  }

  .hero-video-controls {
    align-items: flex-end;
    padding-bottom: 22px;
  }

  .hero-video-controls button {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  main {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .hero-collage {
    min-height: 360px;
  }

  .collage-tile {
    border-width: 8px;
  }

  .collage-tile-1 {
    left: 0;
    top: 12%;
    width: 48%;
  }

  .collage-tile-2 {
    right: 0;
    top: 0;
    width: 57%;
  }

  .collage-tile-3 {
    left: 10%;
    bottom: 6%;
    width: 52%;
  }

  .collage-tile-4 {
    right: 2%;
    bottom: 0;
    width: 40%;
  }

  .section-heading h2 {
    font-size: 2.25rem;
  }

  .love-note,
  .contact-panel,
  .owner-panel {
    padding: 22px;
  }

  .love-note h2 {
    font-size: 2rem;
  }

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

  .empty-state {
    grid-template-columns: 1fr;
  }

  .empty-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .owner-top {
    display: block;
  }

  .admin-dashboard {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .admin-hero {
    padding: 22px 0 8px;
  }

  .admin-hero h1 {
    font-size: 2.35rem;
  }

  .admin-hero p:not(.eyebrow) {
    font-size: 16px;
  }

  .admin-dashboard > .owner-panel,
  .admin-dashboard > form.owner-panel,
  .admin-dashboard > section.owner-panel,
  .admin-dashboard > form.owner-panel:first-of-type,
  .admin-dashboard > section.owner-panel:first-of-type,
  .admin-dashboard > section.owner-panel:nth-of-type(5),
  .admin-dashboard > section.owner-panel:nth-of-type(6),
  .admin-dashboard > section.owner-panel:nth-of-type(7) {
    grid-column: 1;
  }

  .featured-card {
    grid-template-columns: 1fr;
  }

  .whatsapp-button {
    right: 12px;
    bottom: 12px;
    min-height: 44px;
    padding: 0 14px;
  }
}
