@font-face {
  font-family: "Source Serif 4";
  src: url("/static/fonts/source-serif-4.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Serif 4";
  src: url("/static/fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-3.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/source-sans-3-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --red: #e01020;
  --go: #1f8a4c;
  --navy: #1e3f6b;
  --mid: #2a507c;
  --chrome: #c8ccd0;
  --ivory: #f7f4ee;
  --header: #f2f2f0;
  --white: #ffffff;
  --ink: #1a2332;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: "Source Sans 3", "Helvetica Neue", sans-serif;
}

h1, h2 {
  font-family: "Source Serif 4", Georgia, serif;
  color: var(--navy);
  font-weight: 400;
}

a { color: var(--navy); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--header);
  color: var(--navy);
  text-align: center;
  padding: 0.85rem 1rem 0.7rem;
  border-bottom: 4px solid var(--navy);
}

.logo-link { display: inline-block; }

.logo {
  display: block;
  margin: 0 auto;
  max-height: 220px;
  width: auto;
  height: auto;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  align-items: center;
  margin-top: 0.65rem;
  font-size: 0.9rem;
}

.header-nav a { color: var(--navy); }
.who { color: var(--mid); }

.zoom-controls {
  display: inline-flex;
  gap: 4px;
}

.zoom-btn {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  cursor: pointer;
}

.zoom-btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem 6rem;
}

.card {
  background: var(--white);
  padding: 2rem;
  max-width: 28rem;
  margin: 2rem auto;
  border: 1px solid var(--chrome);
  border-top: 4px solid var(--navy);
}

.stack { display: flex; flex-direction: column; gap: 0.6rem; }
.stack.quiet { margin-top: 1rem; }
.inline { display: inline; }

label { color: var(--mid); font-size: 0.9rem; }

input[type="email"],
input[type="password"],
input[type="text"],
input[id="code"] {
  border: 1px solid var(--navy);
  padding: 0.6rem 0.7rem;
  font: inherit;
  background: var(--white);
}

.btn-primary,
.btn-go {
  background: var(--red);
  color: var(--white);
  border: 0;
  padding: 0.7rem 1.1rem;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.btn-go {
  background: var(--go);
}

.btn-primary:disabled,
.btn-primary.is-busy {
  background: #8a9096;
  color: #f4f4f4;
  cursor: wait;
  pointer-events: none;
}

.btn-link {
  background: none;
  border: 0;
  color: var(--navy);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.notice {
  background: var(--ivory);
  border-left: 3px solid var(--navy);
  padding: 0.6rem 0.8rem;
}

.view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  justify-content: center;
  margin: 0.7rem 0 0;
}

.view-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--navy);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.view-link.is-active {
  border-bottom-color: var(--red);
  color: var(--red);
}

.album-meta {
  color: var(--mid);
  letter-spacing: 0.04em;
}

.card.admin-wide { max-width: 960px; }

.card.admin-wide #fav-filter {
  width: 100%;
  max-width: 24rem;
  margin: 0.4rem 0 1rem;
}

.fav-group {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 4px solid var(--navy);
}

.fav-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fav-card {
  width: 140px;
  margin: 0;
  font-size: 0.75rem;
  color: var(--mid);
}

.fav-card img {
  width: 140px;
  height: 100px;
  object-fit: cover;
  display: block;
  background: var(--ivory);
}

.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

.tile {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  background: var(--white);
  border: 2px solid transparent;
  overflow: hidden;
}

.tile.selected { border-color: var(--red); }

.tile.video::after {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 10px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 14px;
  border-color: transparent transparent transparent var(--white);
  filter: drop-shadow(0 1px 2px rgba(26, 35, 50, 0.55));
  pointer-events: none;
}

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

.tile .tools {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
}

.heart {
  border: 0;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  padding: 0.25rem 0.45rem;
}

.heart.on { color: var(--red); }

.check {
  width: 1.1rem;
  height: 1.1rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(30, 63, 107, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 40;
  cursor: pointer;
}

.lightbox[hidden] { display: none; }

.lightbox-stage {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 96vw;
}

.lightbox-stage img,
.lightbox-stage video {
  max-height: 78vh;
  max-width: 80vw;
  background: var(--white);
  cursor: default;
}

.lightbox-bar {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  cursor: default;
}

.icon-btn {
  background: var(--white);
  color: var(--navy);
  border: 0;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
}

.select-bar {
  position: sticky;
  bottom: 0;
  z-index: 25;
  background: var(--header);
  border-top: 4px solid var(--navy);
  padding: 0.8rem 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}

.select-bar[hidden] { display: none; }

.guest-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.guest-table th,
.guest-table td {
  text-align: left;
  border-bottom: 1px solid var(--chrome);
  padding: 0.45rem 0.3rem;
}

.guest-table th {
  color: var(--navy);
  border-bottom: 2px solid var(--navy);
}

@media (max-width: 700px) {
  .logo { max-height: 160px; }
  .lightbox-stage { flex-direction: column; }
}
