/* ==========================================================================
   Cennex — waitlist dialog (signup -> optional questions -> stay tuned)
   ========================================================================== */
.wl-dialog {
  width: min(580px, calc(100% - 24px));
  max-width: none;
  max-height: min(92svh, 900px);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  background: var(--ink-850);
  color: var(--mist-100);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, .85);
  overflow: hidden;
}
.wl-dialog[open] { display: flex; flex-direction: column; animation: dlg-in .32s var(--ease-out); }
.wl-dialog::backdrop { background: rgba(5, 5, 10, .74); animation: fade-in .25s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.wl-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 44px; height: 44px; border-radius: 10px;
  display: grid; place-items: center;
  color: var(--mist-300);
  transition: background-color .15s, color .15s;
}
.wl-close svg { width: 20px; height: 20px; }
.wl-close:hover { background: rgba(255, 255, 255, .08); color: var(--white); }

.wl-scroll { overflow-y: auto; overscroll-behavior: contain; padding: 30px 28px 26px; }
.wl-step { display: grid; gap: 18px; }
.wl-step[hidden] { display: none; }
.wl-step.is-entering { animation: step-in .35s var(--ease-out); }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

.wl-title { padding-right: 44px; font-family: var(--font-display); font-stretch: 112%; font-weight: 800; font-size: clamp(1.7rem, 1.4rem + 1.2vw, 2.15rem); letter-spacing: -.025em; line-height: 1.04; color: var(--white); }
.wl-intro { color: var(--mist-300); font-size: 1rem; line-height: 1.5; margin-top: -6px; }
.wl-form { display: grid; gap: 16px; }
.wl-row { display: grid; grid-template-columns: 1.35fr 1fr; gap: 12px; }
@media (max-width: 520px) { .wl-row { grid-template-columns: 1fr; } }
.wl-submit { width: 100%; }
.wl-notice { font-size: .875rem; line-height: 1.5; color: var(--mist-300); margin-bottom: -4px; }
.wl-fine { font-size: .8125rem; color: var(--mist-500); line-height: 1.5; text-align: center; }
.wl-fine a { color: var(--mist-300); }

/* success banner */
.wl-saved {
  display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center;
  margin-right: 44px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(114, 205, 161, .1);
  border: 1px solid rgba(114, 205, 161, .32);
}
.wl-saved .tick { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; background: var(--mint-400); color: var(--ink-950); }
.wl-saved .tick svg { width: 22px; height: 22px; }
.wl-saved h2 { font-family: var(--font-display); font-stretch: 112%; font-size: 1.3rem; font-weight: 800; letter-spacing: -.015em; color: var(--white); line-height: 1.15; }
.wl-saved p { font-size: .9375rem; color: var(--mist-300); margin-top: 2px; line-height: 1.45; }
.wl-saved p b { color: var(--mist-100); font-weight: 600; word-break: break-all; }

.wl-optional-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 4px; }
.wl-optional-head h3 { font-family: var(--font-display); font-stretch: 112%; font-size: 1.15rem; font-weight: 800; color: var(--white); letter-spacing: -.01em; }
.wl-badge { font-size: .8125rem; font-weight: 550; color: var(--mist-500); white-space: nowrap; }
.wl-q { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; min-width: 0; }
.wl-q legend, .wl-q .q-title { font-weight: 650; font-size: 1rem; color: var(--white); padding: 0; margin-bottom: 2px; }
.wl-q .q-help { font-size: .8125rem; color: var(--mist-500); margin-top: -8px; }

/* role chips (checkboxes) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 42px; padding: 0 14px;
  border-radius: 9px;
  border: 1.5px solid var(--ink-700);
  background: var(--ink-900);
  font-size: .9375rem; font-weight: 550; color: var(--mist-100);
  transition: background-color .14s, border-color .14s, color .14s;
  user-select: none;
}
.chip span::before { content: ''; width: 0; height: 12px; border: solid currentColor; border-width: 0; transition: width .14s; }
.chip:hover span { border-color: var(--ink-600); }
.chip input:checked + span { background: var(--mint-400); border-color: var(--mint-400); color: var(--ink-950); }
.chip input:checked + span::before { width: 6px; height: 11px; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -2px); margin-right: 1px; }
.chip input:focus-visible + span { outline: 3px solid var(--mint-300); outline-offset: 2px; }

/* game / community picker (combobox) */
.gp { position: relative; display: grid; gap: 10px; }
.gp-box { position: relative; display: flex; gap: 8px; }
.gp-input-wrap { position: relative; flex: 1; min-width: 0; }
.gp-input-wrap svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--mist-500); pointer-events: none; }
.gp-input { padding-left: 42px !important; }
.gp-add { flex-shrink: 0; min-height: 52px; padding: 0 18px; border-radius: 10px; border: 1.5px solid var(--ink-600); color: var(--white); font-weight: 650; font-size: .9375rem; background: var(--ink-800); }
.gp-add:hover:not([disabled]) { border-color: var(--mint-400); color: var(--mint-200); }
.gp-add[disabled] { opacity: .45; cursor: not-allowed; }
.gp-list {
  position: absolute; z-index: 5; left: 0; right: 0; top: calc(52px + 6px);
  max-height: 268px; overflow-y: auto; overscroll-behavior: contain;
  list-style: none; margin: 0; padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--ink-600);
  background: var(--ink-800);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .75);
}
.gp-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: .9375rem; color: var(--mist-100);
}
.gp-opt small { font-size: .75rem; color: var(--mist-500); white-space: nowrap; }
.gp-opt mark { background: none; color: var(--mint-300); font-weight: 700; }
.gp-opt[aria-selected='true'], .gp-opt:hover { background: rgba(114, 205, 161, .12); }
.gp-opt.is-custom { color: var(--white); font-weight: 600; border-top: 1px solid var(--ink-700); margin-top: 4px; padding-top: 13px; }
.gp-opt.is-custom:first-child { border-top: 0; margin-top: 0; padding-top: 11px; }
.gp-opt.is-custom small { color: var(--mint-300); }
.gp-opt.is-picked { opacity: .5; }
.gp-hint { font-size: .8125rem; color: var(--mist-500); }
.gp-hint kbd { font-family: var(--font-body); font-size: .75rem; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--ink-600); color: var(--mist-300); }
.gp-selected { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.gp-tag {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 36px; padding: 0 4px 0 12px;
  border-radius: 8px;
  background: rgba(114, 205, 161, .14);
  border: 1px solid rgba(114, 205, 161, .4);
  color: var(--mint-200);
  font-size: .875rem; font-weight: 600;
}
.gp-tag button { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; color: var(--mint-200); }
.gp-tag button svg { width: 14px; height: 14px; }
.gp-tag button:hover { background: rgba(114, 205, 161, .2); color: var(--white); }
.gp-tag.is-flag { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); color: var(--mist-100); }
.gp-tag.is-flag button { color: var(--mist-100); }
.gp-quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gp-quick .chip span { min-height: 36px; font-size: .875rem; }

.wl-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 4px; }
.wl-actions .btn-primary { flex: 1 1 auto; }
.wl-skip { min-height: 50px; padding: 0 20px; border-radius: 10px; font-weight: 650; color: var(--mist-300); border: 1.5px solid var(--ink-700); }
.wl-skip:hover { color: var(--white); border-color: var(--ink-600); }

/* stay tuned */
.wl-discord {
  position: relative;
  padding: 24px;
  border-radius: 14px;
  background: var(--discord);
  color: #fff;
  overflow: hidden;
}
.wl-discord .d-logo { width: 46px; height: 46px; margin-bottom: 16px; }
.wl-discord h3 { font-family: var(--font-display); font-stretch: 112%; font-size: 1.55rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.08; }
.wl-discord p { margin-top: 10px; font-size: .9875rem; line-height: 1.55; color: rgba(255, 255, 255, .9); max-width: 46ch; }
.wl-discord ul { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .9375rem; }
.wl-discord li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; align-items: start; }
.wl-discord li svg { width: 18px; height: 18px; margin-top: 2px; }
.wl-discord .btn { margin-top: 20px; background: #fff; color: #2B2F8F; box-shadow: inset 0 -2px 0 rgba(43, 47, 143, .18); }
.wl-discord .btn:hover { background: #EEF0FF; }
.wl-follow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wl-follow a {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; padding: 0 16px;
  border-radius: 12px;
  border: 1.5px solid var(--ink-700);
  background: var(--ink-900);
  text-decoration: none; color: var(--white); font-weight: 650; font-size: .9375rem;
  transition: border-color .15s;
}
.wl-follow a:hover { border-color: var(--ink-600); background: var(--ink-800); }
.wl-follow a svg { width: 22px; height: 22px; }
.wl-follow a span small { display: block; font-weight: 450; font-size: .8125rem; color: var(--mist-500); }
.wl-done { width: 100%; }
.wl-again { justify-self: center; color: var(--mist-500); font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.wl-again:hover { color: var(--mist-100); }

/* Phones: a bottom sheet that keeps the keyboard and the form in view. */
@media (max-width: 600px) {
  .wl-dialog {
    width: 100%;
    max-height: 94svh;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
  }
  .wl-dialog[open] { animation: sheet-in .34s var(--ease-out); }
  .wl-close { top: 10px; right: 10px; }
  .wl-scroll { padding: 24px 20px calc(22px + env(safe-area-inset-bottom)); }
  .wl-follow { grid-template-columns: 1fr; }
  .wl-discord { padding: 20px; }
}
@keyframes sheet-in { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Organizations form uses the same controls inline on the page. */
.org-form { display: grid; gap: 16px; }
.counter { font-size: .75rem; color: var(--mist-500); text-align: right; margin-top: -4px; }
