:root {
  --bg: #34373c;
  --bg-deep: #142196;
  --panel: #34373c;
  --panel-ink: #ffffff;
  --panel-line: rgba(255, 255, 255, 0.18);
  --ink: #fff7e8;
  --muted: rgba(255, 247, 232, 0.76);
  --line: rgba(255, 247, 232, 0.28);
  --tile: rgba(255, 247, 232, 0.09);
  --accent: #ffd23f;
  --accent-ink: #14206b;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #34373c;
    --bg-deep: #0a1050;
    --panel: #34373c;
    --panel-ink: #ffffff;
    --panel-line: rgba(255, 255, 255, 0.18);
  }
}

:root[data-theme="dark"] {
  --bg: #34373c;
  --bg-deep: #0a1050;
  --panel: #34373c;
  --panel-ink: #ffffff;
  --panel-line: rgba(255, 255, 255, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
}

main {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.first {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.intro {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 36px 20px 24px;
  text-align: center;
  color: #fefaf1;
}

.intro h1 {
  margin: 0;
  font-size: clamp(2.6rem, 11vw, 5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.intro p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.8;
}

.arrow {
  margin-top: 6px;
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(6px);
  }
}

.hero {
  display: block;
  flex-shrink: 0;
  align-self: center;
  width: auto;
  max-width: 100%;
  height: min(72vh, 71.65vw);
  height: min(72svh, 71.65vw);
  object-fit: contain;
  background: var(--bg);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 40px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 56px 20px 72px;
}

.timer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.unit {
  padding: 18px 4px 14px;
  text-align: center;
  background: var(--tile);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(5, 10, 60, 0.28);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.unit b {
  display: block;
  font-size: clamp(2rem, 9.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.unit span {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.unit:last-child {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
}

.unit:last-child span {
  color: var(--accent-ink);
  opacity: 0.75;
}

.started {
  display: none;
  padding: 22px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--accent-ink);
  background: var(--accent);
  border-radius: 18px;
}

.details,
.schedule {
  overflow: hidden;
  color: var(--panel-ink);
  background: var(--panel);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(5, 10, 60, 0.38);
}


dl {
  display: grid;
  margin: 0;
  padding: 0 24px;
}

dl > div {
  padding: 18px 0;
  border-top: 1px solid var(--panel-line);
}

dl > div:first-child {
  border-top: 0;
}

dt {
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.65;
}

dd {
  margin: 4px 0 0;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.schedule h2 {
  margin: 0;
  padding: 22px 24px 8px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.schedule ul {
  margin: 0;
  padding: 0 24px 6px;
  list-style: none;
}

.schedule li {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 14px;
  padding: 14px 0;
  line-height: 1.35;
  border-top: 1px solid var(--panel-line);
}

.schedule li:first-child {
  border-top: 0;
}

.schedule li small {
  display: block;
  margin-top: 4px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.7;
}

.schedule .time {
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.rsvp {
  display: grid;
  gap: 18px;
  padding: 24px;
  color: var(--panel-ink);
  background: var(--panel);
  border-radius: 20px;
  box-shadow: 0 18px 40px rgba(5, 10, 60, 0.38);
}

.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.rsvp label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  opacity: 0.85;
}

.rsvp input {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 1.05rem;
  color: var(--panel-ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid var(--panel-line);
  border-radius: 12px;
}

.ask {
  margin: 6px 0 0;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choices button {
  padding: 14px 20px;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 14px;
  cursor: pointer;
}

.choices .yes {
  color: var(--accent-ink);
  background: var(--accent);
  border: 2px solid var(--accent);
}

.choices .no {
  color: var(--panel-ink);
  background: transparent;
  border: 2px solid var(--panel-ink);
}

.choices button:disabled,
.rsvp input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.msg {
  margin: 0;
  min-height: 1.4em;
  font-weight: 500;
}

.msg.error {
  color: #ff8a80;
}

.msg.done {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--accent);
}

.rsvp :is(input, button):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 420px) {
  .content {
    padding: 40px 16px 56px;
  }

  .timer {
    gap: 8px;
  }

  .unit {
    border-radius: 14px;
  }

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

  .schedule li {
    grid-template-columns: 6.4rem 1fr;
    gap: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arrow {
    animation: none;
  }
}
