.launch-dialog {
  box-sizing: border-box;
  position: fixed;
  width: min(440px, calc(100vw - 24px));
  max-height: calc(var(--launch-viewport-height, 100dvh) - 24px);
  padding: 20px;
  margin: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  scroll-padding-block: 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface) 94%, var(--surface-selected));
  color: var(--text-primary);
  box-shadow: var(--elevation-card);
  backdrop-filter: blur(18px);
  font-size: 14px;
  line-height: 1.4;
  animation: launch-enter 0.18s ease-out;
}
.launch-dialog::backdrop {
  background: var(--overlay);
  backdrop-filter: blur(3px);
}
.launch-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 28px;
}
.launch-heading img {
  flex: none;
}
.launch-dialog h2 {
  font-size: 1.375rem;
  line-height: 1.15;
  margin: 0;
}
.launch-dialog #launch-title:focus {
  outline: none;
}
.launch-dialog p {
  margin: 8px 0 12px;
}
.launch-dialog .launch-close {
  position: absolute;
  right: 12px;
  top: 10px;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-size: 28px;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.launch-dialog label,
.launch-dialog legend {
  font-weight: 700;
}
.launch-dialog input[type="email"] {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  padding: 10px 12px;
  margin: 6px 0 0;
  border: 1px solid var(--control-outline);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-primary);
  font: inherit;
  font-size: 16px;
}
.launch-dialog fieldset {
  border: 0;
  padding: 0;
  margin: 10px 0 0;
  min-width: 0;
}
.launch-options {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.launch-options label {
  flex: 1;
  min-width: max-content;
  position: relative;
  cursor: pointer;
}
.launch-options input {
  position: absolute;
  opacity: 0;
}
.launch-options span {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  min-height: 44px;
  text-align: center;
  border: 1px solid var(--control-outline);
  padding: 8px;
  border-radius: 10px;
  font-size: 13px;
}
.launch-options input:checked + span {
  background: var(--surface-selected);
  border-color: var(--accent);
}
.launch-options input:focus-visible + span {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
.launch-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0 0;
  font-size: 13px;
}
.launch-consent input {
  flex: none;
  margin-top: 3px;
  width: 20px;
  height: 20px;
  accent-color: var(--accent);
}
.launch-consent span {
  font-weight: 500;
}
.launch-field-error {
  display: block;
  font-size: 13px;
  color: var(--error-foreground);
  margin-top: 3px;
}
.launch-field-error:empty {
  display: none;
}
.launch-submit {
  width: 100%;
  margin-top: 12px;
  min-height: 44px;
  padding: 10px 16px;
}
.launch-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 16px;
  margin-top: 8px;
}
.launch-privacy,
.launch-offer-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  text-align: center;
  font-size: 13px;
}
#launch-result .launch-note {
  margin: 8px 0 0;
}
.launch-offer-link {
  font-weight: 700;
}
.launch-note {
  font-size: 13px;
  color: var(--text-secondary);
}
#launch-error {
  color: var(--error-foreground);
  font-size: 13px;
  margin: 8px 0;
}
#launch-error:empty {
  display: none;
}
.launch-honey {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
#launch-challenge {
  margin-top: 12px;
}
.launch-modal-open {
  overflow: hidden;
}
.launch-dialog [hidden] {
  display: none !important;
}
.launch-dialog :focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
@keyframes launch-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .launch-dialog {
    animation: none;
  }
}
@media (max-height: 600px) {
  .launch-dialog {
    padding: 16px;
  }
}
.launch-dialog .launch-date {
  font-size: 13px;
  color: var(--text-secondary);
  margin: -4px 0 12px;
}
.launch-dialog[open] {
  opacity: 1;
}

/* Launch CTAs keep readable text when the shared button hover changes the surface. */
:root {
  --launch-cta-hover-text: var(--accent);
}
:root[data-theme="dark"] {
  --launch-cta-hover-text: var(--text-primary);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --launch-cta-hover-text: var(--text-primary);
  }
}
.button.primary.launch-submit:not(:disabled):is(:hover, :active) {
  background: var(--surface);
  color: var(--launch-cta-hover-text);
  border-color: var(--accent);
}
