:root {
  --blue: #0758a6;
  --blue-dark: #063f79;
  --green-dark: #3f6549;
  --red: #e3262e;
  --white: #ffffff;
  --shadow: 0 22px 55px rgba(0, 66, 120, 0.28);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--blue-dark);
  font-family: Arial, Helvetica, sans-serif;
  background: #58bce8 url("background.svg") center/cover fixed no-repeat;
  overflow-x: hidden;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.page {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  place-items: center;
  padding: clamp(18px, 4vw, 36px) 14px 10px;
}

.invite-card {
  width: min(100%, 470px);
  padding: 10px 10px 12px;
  border: 8px solid rgba(255,255,255,.92);
  border-radius: 28px;
  background: rgba(255,255,255,.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.video-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 608 / 1080;
  max-width: 390px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 16px;
  background: #dcdcdc center/cover no-repeat;
  box-shadow: 0 8px 20px rgba(0,0,0,.18);
  isolation: isolate;
}

.video-shell video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: transparent;
}

.actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  width: min(100%, 310px);
  margin: 3px auto 1px;
}

.action {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--blue);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.action img {
  display: block;
  width: 88px;
  height: 88px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  margin: 11px auto;
  filter: drop-shadow(0 8px 8px rgba(0,0,0,.22));
  transition: transform .18s ease, filter .18s ease;
}

.action:hover img,
.action:focus-visible img {
  transform: translateY(-4px) scale(1.045);
  filter: drop-shadow(0 12px 10px rgba(0,0,0,.28));
}

.action:focus-visible {
  outline: 3px solid rgba(7,88,166,.32);
  outline-offset: 7px;
  border-radius: 14px;
}

.action-label {
  display: block;
  margin-top: 3px;
  color: var(--blue);
  font-size: 11px;
  line-height: 1.08;
  font-weight: 900;
  text-transform: uppercase;
}

.event-meta {
  margin: 8px 0 0;
  color: var(--green-dark);
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 800;
}

.page-footer {
  margin-top: 8px;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0,0,0,.35);
}

.confirm-dialog {
  width: min(calc(100% - 28px), 450px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  color: var(--blue-dark);
  background: #f8fcff;
  box-shadow: 0 22px 70px rgba(0,0,0,.36);
}
.confirm-dialog::backdrop {
  background: rgba(2, 35, 67, .62);
  backdrop-filter: blur(3px);
}
.dialog-inner { position: relative; padding: 26px 24px 22px; }
.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #426680;
  background: #e7f3fb;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}
.dialog-title {
  margin: 2px 36px 5px;
  color: var(--blue-dark);
  text-align: center;
  font-size: 23px;
}
.dialog-deadline {
  margin: 0 0 16px;
  color: #5e7890;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}
.confirm-form label {
  display: block;
  margin: 12px 0 5px;
  color: var(--blue-dark);
  font-size: 14px;
  font-weight: 900;
}
.confirm-form input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #9fc8e6;
  border-radius: 12px;
  outline: 0;
  color: #173d5d;
  background: #fff;
  font-size: 16px;
}
.confirm-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(7,88,166,.13);
}
.submit-button {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(#f33a40, var(--red));
  box-shadow: 0 8px 14px rgba(191,24,32,.24);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}
.submit-button:hover { filter: brightness(1.04); }
.form-note {
  margin: 10px 0 0;
  color: #58758d;
  text-align: center;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 640px) {
  body { background-attachment: scroll; }
  .page { align-content: start; padding: 12px 9px 10px; }
  .invite-card {
    width: 100%;
    padding: 8px 8px 10px;
    border-width: 5px;
    border-radius: 22px;
  }
  .video-shell { aspect-ratio: 608 / 1080; max-width: none; max-height: none; }
  .actions { width: min(100%, 280px); gap: 10px; margin: 2px auto 0; }
  .action img { width: 80px; height: 80px; object-fit: contain; }
  .action-label { font-size: 10px; margin-top: 2px; }
  .event-meta { margin-top: 8px; font-size: 14px; }
  .page-footer { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
