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

body {
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #2b2b2b;
  background: #f3efe9;
  position: relative;
}

.bg-layer {
  position: fixed;
  inset: 0;
  background: url('assets/background.jpg') top center / cover no-repeat;
  z-index: -1;
  opacity: 0.5;
}

.page-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px;
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 32px;
  align-items: start;
}

.poster-col {
  position: sticky;
  top: 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.poster-card {
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
  transition: transform .2s ease, opacity .2s ease;
}

.poster-card img { width: 100%; display: block; }

.rsvp-btn {
  background: linear-gradient(135deg, #b5566b, #8f4a5c);
  color: #fff;
  border: none;
  padding: 16px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}

.link-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 16px;
  text-decoration: none;
  color: #2b2b2b;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.link-pill .arrow { margin-left: auto; }

.details-col { display: flex; flex-direction: column; gap: 20px; }

.card {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
}
.card h1 { font-size: 1.6rem; margin-bottom: 16px; }
.card hr { border: none; border-top: 1px solid #eee; margin: 18px 0; }

.row { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 6px; }
.icon {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  background: #e7edd8;
  border-radius: 10px;
  font-size: 1rem;
  flex-shrink: 0;
}
.bold { font-weight: 700; }
.section-label { letter-spacing: .05em; font-size: .85rem; }

.add-cal-btn {
  margin: 14px 0 0 48px;
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 600;
}

.map-embed { margin-top: 14px; border-radius: 14px; overflow: hidden; }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-overlay.active { display: flex; }
.modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 28px;
  max-width: 420px;
  width: 100%;
}
.modal-box form { display: flex; flex-direction: column; gap: 18px; margin-top: 16px; }
.modal-box input, .modal-box textarea, .modal-box button {
  padding: 12px; border-radius: 10px; border: 1px solid #ddd; font-size: 1rem;
}
.attend-options { display: flex; gap: 28px; justify-content: space-between }

.modal-box button[type="submit"] {
  background: #b5566b; color: #fff; border: none; font-weight: 700; cursor: pointer;
}
.secondary { background: #f4f4f4; cursor: pointer; }
.hidden { display: none; }
.no-code-msg {
  color: #777;
  font-size: .9rem;
  text-align: center;
  padding: 12px;
}
.rsvp-status {
  margin-bottom: 14px;
}
.status-icon {
  background: #f0f0f0;
  font-size: 1.1rem;
}

.rsvp-btn.responded {
  background: linear-gradient(135deg, #6b8e6b, #4a6b4a);
  padding-top: 12px;
  padding-bottom: 12px;
}

.rsvp-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0px;
}

.btn-main-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-status-icon {
  font-size: 1.2rem;
}

.btn-status-text {
  font-size: 1.05rem;
  font-weight: 700;
}

.btn-edit-hint {
  font-size: .75rem;
  font-weight: 400;
  opacity: 0.85;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.photo-item {
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.photo-item img:hover {
  transform: scale(1.05);
}

@media (max-width: 480px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}


/* Mobile */
@media (max-width: 768px) {
  .page-wrap {
    grid-template-columns: 1fr;
    padding: 0;
    gap: 12px;
  }
  .poster-col {
    position: relative;
    top: 0;
    padding: 16px;
  }
  .poster-card {
    transform-origin: top center;
  }
  .details-col { padding: 0 16px 40px; }
  .card { border-radius: 24px 24px 0 0; }
}
