:root {
  color-scheme: light;
  --bg: #fff9dc;
  --paper: #ffffff;
  --ink: #09172c;
  --muted: #66748a;
  --line: #eadfba;
  --accent: #071b35;
  --accent-strong: #031226;
  --soft: #fff0b5;
  --danger: #a42d2d;
  --shadow: 0 18px 50px rgba(7, 27, 53, 0.12);
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden],
.mode-badge:empty,
#eventLinkText:empty {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 224, 128, 0.28), transparent 24rem),
    radial-gradient(circle at 88% 8%, rgba(255, 255, 255, 0.78), transparent 22rem),
    linear-gradient(180deg, #fffdf1 0%, var(--bg) 58%, #fffbe8 100%);
  color: var(--ink);
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(234, 223, 186, 0.95);
  background: rgba(255, 251, 232, 0.92);
  backdrop-filter: blur(14px);
}

.brand,
.topbar nav,
.actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.04em;
}

.topbar nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 750;
}

.topbar nav a:hover {
  color: var(--accent);
}

main {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.view {
  display: none;
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.view.active {
  display: block;
}

.hero.active {
  display: block;
}

.hero {
  min-height: calc(100vh - 76px);
  width: min(860px, 100%);
  margin: 0 auto;
}

.hero-copy h1,
.section-heading h2 {
  margin: 0;
  max-width: 790px;
  line-height: 1.02;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 6vw, 4.85rem);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 4rem);
}

.hero-copy p,
.section-heading p {
  max-width: 680px;
  color: #4f5c70;
  font-size: 1.08rem;
  line-height: 1.65;
}

.hero-copy > p {
  color: #3f4b5d;
  font-weight: 550;
}

.hero-subline {
  display: block;
  margin-top: 0.45rem;
}

.floral-title {
  display: inline-flex;
  align-items: center;
  gap: clamp(0.45rem, 1.5vw, 0.85rem);
  white-space: nowrap;
}

.daisy {
  color: #e5b722;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(0.9rem, 2vw, 1.25rem);
  line-height: 1;
  transform: translateY(-0.12em);
}

.couple-photo {
  margin: clamp(1.4rem, 4vw, 2.2rem) 0 0;
}

.couple-photo img {
  display: block;
  width: 100%;
  max-height: min(62vh, 720px);
  border: 1px solid rgba(234, 223, 186, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
  object-fit: cover;
  object-position: center;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.button {
  min-height: 2.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.75rem 1.05rem;
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.76);
}

.button.danger {
  border-color: rgba(164, 45, 45, 0.25);
  color: var(--danger);
}

.section-heading {
  margin-bottom: 2rem;
}

.upload-form,
.login-box,
.admin-panel {
  width: min(760px, 100%);
}

.upload-form,
.login-box {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--ink);
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.95rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font: inherit;
}

textarea {
  resize: vertical;
}

.file-drop {
  border: 1px dashed rgba(7, 27, 53, 0.3);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(238, 244, 251, 0.72);
  cursor: pointer;
}

.file-drop input {
  border: 0;
  padding: 0;
  background: transparent;
}

.file-drop span {
  font-size: 1.05rem;
}

.file-drop small {
  color: var(--muted);
  font-weight: 600;
}

.preview-grid,
.entry-media {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.preview-grid img,
.preview-grid video,
.entry-media img,
.entry-media video {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--accent-strong);
  font-weight: 750;
}

.status.error {
  color: var(--danger);
}

.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1rem;
}

.admin-toolbar span {
  margin-left: 0.75rem;
  color: var(--muted);
}

.entries {
  display: grid;
  gap: 1rem;
}

.entry {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.84);
}

.entry-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.entry-date {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.entry-message {
  color: #1f2a3a;
  line-height: 1.65;
  white-space: pre-wrap;
}

.delete-entry {
  border: 0;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    min-height: auto;
  }

  .floral-title {
    font-size: clamp(1.95rem, 9vw, 3.45rem);
    white-space: nowrap;
  }

  .couple-photo img {
    max-height: none;
    aspect-ratio: 4 / 5;
  }

  .actions,
  .admin-toolbar,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
    text-align: center;
  }
}
