.raffle-dialog {
  width: min(780px, 100%);
  color: #f4f0e8;
}

.raffle-dialog-form {
  min-height: 0;
  padding: clamp(34px, 5vw, 54px);
}

.raffle-form-heading {
  margin-bottom: 24px;
}

.raffle-form-heading p {
  color: #f4f0e8;
  font-size: clamp(16px, 2.8vw, 25px);
  letter-spacing: 0.045em;
  line-height: 1.18;
  white-space: nowrap;
}

.raffle-form-heading small {
  max-width: 560px;
  color: rgba(244, 240, 232, 0.82);
  font-size: 11px;
  letter-spacing: 0.075em;
  line-height: 1.6;
}

.raffle-qualification-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 28px;
  background: rgba(237, 233, 223, 0.12);
  border: 1px solid rgba(237, 233, 223, 0.12);
}

.raffle-qualification-steps span {
  min-width: 0;
  padding: 10px 12px;
  color: rgba(244, 240, 232, 0.78);
  background: #0d0b0b;
  font-family: var(--font-geist-mono), monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.raffle-qualification-steps b {
  color: var(--accent);
  margin-right: 6px;
}

.raffle-dialog-form > .raffle-x-label {
  margin-top: 22px;
}

.raffle-dialog-header {
  color: rgba(244, 240, 232, 0.82);
  font-size: 11px;
}

.raffle-dialog-form > label,
.raffle-dialog-form > .raffle-x-label {
  color: rgba(244, 240, 232, 0.82);
  font-size: 12px;
}

.raffle-dialog-form > input {
  color: #f4f0e8;
  font-size: 16px;
}

.raffle-dialog-form > input::placeholder {
  color: rgba(244, 240, 232, 0.62);
}

.raffle-dialog-form > #raffle-x-username {
  padding-left: 46px;
  background-image: linear-gradient(90deg, rgba(194, 241, 0, 0.12), transparent 44px);
}

.raffle-x-input-wrap {
  position: relative;
}

.raffle-x-input-wrap::before {
  content: "@";
  position: absolute;
  z-index: 1;
  left: 18px;
  top: 50%;
  color: var(--accent);
  font-family: var(--font-geist-mono), monospace;
  font-size: 16px;
  font-weight: 760;
  transform: translateY(-50%);
  pointer-events: none;
}

.raffle-x-input-wrap > input {
  width: 100%;
  height: 68px;
  color: #f4f0e8;
  font-family: var(--font-geist-mono), monospace;
  letter-spacing: 0.04em;
  background: linear-gradient(90deg, rgba(194, 241, 0, 0.1), transparent 46px), rgba(237, 233, 223, 0.055);
  border: 0;
  border-bottom: 1px solid rgba(237, 233, 223, 0.42);
  border-radius: 0;
  outline: 0;
  padding: 0 20px 0 46px;
  font-size: 16px;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}

.raffle-x-input-wrap > input::placeholder {
  color: rgba(244, 240, 232, 0.62);
}

.raffle-x-input-wrap > input:focus {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 rgba(var(--accent-rgb), 0.9);
  background: linear-gradient(90deg, rgba(194, 241, 0, 0.14), transparent 46px), rgba(237, 233, 223, 0.075);
}

.raffle-x-input-wrap > input[aria-invalid="true"] {
  border-color: var(--danger);
}

.raffle-x-requirements {
  border: 0;
  margin: 26px 0 0;
  padding: 0;
}

.raffle-x-requirements legend {
  color: rgba(244, 240, 232, 0.78);
  font-family: var(--font-geist-mono), monospace;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 11px;
}

.raffle-x-action {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 68px;
  padding: 12px 14px;
  color: var(--paper);
  background: rgba(237, 233, 223, 0.045);
  border: 1px solid rgba(237, 233, 223, 0.13);
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}

.raffle-x-action + .raffle-x-action {
  margin-top: 8px;
}

.raffle-x-action:hover,
.raffle-x-action:focus-within {
  border-color: rgba(194, 241, 0, 0.72);
  background: rgba(194, 241, 0, 0.065);
}

.raffle-x-action.is-field-invalid {
  border-color: rgba(255, 94, 87, 0.84);
}

.raffle-x-action input {
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1px solid rgba(237, 233, 223, 0.48);
  background: #090808;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.raffle-x-action input::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  opacity: 0;
  transform: translateY(-1px) rotate(-45deg) scale(0.5);
  transition: opacity 0.15s, transform 0.15s;
}

.raffle-x-action input:checked {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.24);
}

.raffle-x-action input:checked::after {
  opacity: 1;
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

.raffle-x-action input:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.raffle-x-action-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.raffle-x-action-copy strong {
  font-family: var(--font-geist-mono), monospace;
  color: #f4f0e8;
  font-size: 13px;
  font-weight: 730;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.raffle-x-action-copy small {
  color: rgba(244, 240, 232, 0.8);
  font-size: 12px;
  line-height: 1.55;
}

.raffle-x-action-link {
  min-height: 40px;
  padding: 0 10px;
  color: var(--accent);
  border: 1px solid rgba(194, 241, 0, 0.34);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-geist-mono), monospace;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.raffle-x-action-link:hover,
.raffle-x-action-link:focus-visible {
  color: var(--ink);
  background: var(--accent);
  outline: 0;
}

.raffle-submit {
  margin-top: 22px;
  font-size: 13px;
}

.raffle-submit:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.raffle-dialog-status.is-joined,
.raffle-dialog-status.is-already-joined {
  color: var(--accent);
}

.raffle-dialog-status.is-joined > span,
.raffle-dialog-status.is-already-joined > span {
  background: var(--accent);
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.62);
}

.raffle-dialog-status.is-error > span {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(var(--danger-rgb), 0.6);
}

.raffle-dialog-status {
  color: rgba(244, 240, 232, 0.82);
  font-size: 12px;
  line-height: 1.55;
}

.raffle-dialog-status.is-idle {
  display: none;
}

.raffle-dialog-note {
  color: rgba(244, 240, 232, 0.78);
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .raffle-dialog-form {
    padding: 32px;
  }
}

@media (max-width: 580px) {
  .raffle-dialog-form {
    padding: 26px 20px 24px;
  }

  .raffle-qualification-steps {
    margin-bottom: 24px;
  }

  .raffle-qualification-steps span {
    padding: 9px 7px;
    font-size: 9px;
  }

  .raffle-qualification-steps b {
    display: block;
    margin: 0 0 2px;
  }

  .raffle-dialog-form > input,
  .raffle-x-input-wrap > input,
  .raffle-submit {
    min-height: 58px;
    height: 58px;
  }

  .raffle-x-action {
    grid-template-columns: 22px minmax(0, 1fr);
    min-height: 72px;
    padding: 12px;
  }

  .raffle-x-action-link {
    grid-column: 2;
    justify-self: start;
    min-height: 44px;
  }

  .raffle-form-heading small {
    font-size: 10.5px;
  }

  .raffle-form-heading p {
    font-size: clamp(13.5px, 4.2vw, 17px);
    letter-spacing: 0.025em;
  }

  .raffle-dialog-status {
    font-size: 12px;
  }

  .raffle-dialog-note {
    font-size: 11px;
  }

  .raffle-dialog-status {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .raffle-x-action,
  .raffle-x-action input::after {
    transition: none;
  }
}
