:root {
  color-scheme: light;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background: #f7f8f5;
  color: #171b19;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: #f7f8f5;
}

button {
  font: inherit;
}

.invite-page {
  min-height: 100svh;
  display: grid;
  grid-template-rows: minmax(300px, 48svh) auto;
}

.product-visual {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background: #dfe3de;
}

.product-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 17, 15, 0.28), transparent 34%, rgba(12, 17, 15, 0.08));
  pointer-events: none;
}

.product-visual > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 40%;
}

.brand-lockup {
  position: absolute;
  z-index: 1;
  top: max(24px, env(safe-area-inset-top));
  left: 24px;
  width: 72px;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(20, 28, 24, 0.16);
}

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

.invite-content {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 30px 24px max(28px, env(safe-area-inset-bottom));
}

.eyebrow {
  margin: 0 0 10px;
  color: #24745a;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  max-width: 12em;
  font-size: clamp(30px, 8vw, 42px);
  line-height: 1.14;
  letter-spacing: 0;
}

.description {
  margin: 16px 0 0;
  color: #59615d;
  font-size: 16px;
  line-height: 1.7;
}

.invite-code {
  min-height: 52px;
  margin-top: 22px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #d8ddd9;
  border-radius: 8px;
  background: #fff;
  color: #6b726e;
  font-size: 14px;
}

.invite-code strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #171b19;
  font-size: 16px;
}

.primary-action {
  width: 100%;
  min-height: 54px;
  margin-top: 26px;
  border: 0;
  border-radius: 8px;
  background: #176b50;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms ease, opacity 160ms ease;
  -webkit-tap-highlight-color: transparent;
}

.primary-action:active:not(:disabled) {
  transform: scale(0.99);
  background: #105b43;
}

.primary-action:focus-visible {
  outline: 3px solid rgba(23, 107, 80, 0.24);
  outline-offset: 3px;
}

.primary-action:disabled {
  cursor: wait;
  opacity: 0.58;
}

.status {
  margin: 12px 0 0;
  text-align: center;
  color: #7a817d;
  font-size: 13px;
  line-height: 1.5;
}

.status:empty {
  display: none;
}

.noscript-message {
  position: fixed;
  inset: auto 16px 16px;
  padding: 12px;
  border-radius: 8px;
  background: #171b19;
  color: #fff;
  text-align: center;
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: center;
    padding: 32px;
  }

  .invite-page {
    width: min(100%, 980px);
    min-height: min(720px, calc(100svh - 64px));
    grid-template-columns: minmax(360px, 1.05fr) minmax(360px, 0.95fr);
    grid-template-rows: 1fr;
    overflow: hidden;
    border: 1px solid #dce0dc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(24, 35, 29, 0.12);
  }

  .product-visual {
    min-height: 100%;
  }

  .invite-content {
    align-self: center;
    padding: 56px 50px;
  }

  h1 {
    font-size: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .primary-action {
    transition: none;
  }
}
