.guide-gate-open {
  overflow: hidden;
}

.guide-gate-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 18, 24, 0.72);
  backdrop-filter: blur(10px);
}

.guide-gate-backdrop[hidden] {
  display: none !important;
}

.guide-gate-dialog {
  position: relative;
  width: min(100%, 520px);
  max-height: min(100vh - 48px, 720px);
  overflow: auto;
  padding: 30px;
  border: 1px solid rgba(23, 49, 60, 0.1);
  border-radius: 28px;
  background: #f9f5ed;
  box-shadow: 0 28px 80px rgba(7, 17, 24, 0.28);
  color: #17313c;
}

.guide-gate-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 49, 60, 0.08);
  color: #17313c;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease;
}

.guide-gate-close:hover {
  background: rgba(23, 49, 60, 0.14);
  transform: translateY(-1px);
}

.guide-gate-close:active {
  transform: translateY(0);
}

.guide-gate-kicker {
  margin: 0 0 12px;
  color: rgba(23, 49, 60, 0.76);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.guide-gate-title {
  margin: 0;
  color: #10242d;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.guide-gate-copy {
  margin: 14px 0 0;
  color: rgba(16, 36, 45, 0.78);
  font-size: 1rem;
  line-height: 1.66;
}

.guide-gate-form {
  margin-top: 24px;
}

.guide-gate-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.guide-gate-field label {
  color: rgba(16, 36, 45, 0.82);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.guide-gate-field input {
  width: 100%;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(23, 49, 60, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #10242d;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.guide-gate-field input::placeholder {
  color: rgba(16, 36, 45, 0.42);
}

.guide-gate-field input:focus {
  outline: none;
  border-color: rgba(23, 49, 60, 0.42);
  box-shadow: 0 0 0 4px rgba(183, 141, 90, 0.16);
  background: #ffffff;
}

.guide-gate-meta {
  margin: 14px 0 0;
  color: rgba(16, 36, 45, 0.64);
  font-size: 0.86rem;
  line-height: 1.55;
}

.guide-gate-error {
  min-height: 1.4em;
  margin: 0 0 6px;
  color: #a43131;
  font-size: 0.88rem;
  line-height: 1.45;
}

.guide-gate-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.guide-gate-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: #17313c;
  color: #f9f5ed;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.guide-gate-submit:hover {
  background: #10242d;
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(16, 36, 45, 0.24);
}

.guide-gate-submit:active {
  transform: translateY(0);
}

.guide-gate-submit[disabled] {
  opacity: 0.72;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.guide-gate-dismiss {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(16, 36, 45, 0.84);
  cursor: pointer;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

.guide-gate-dismiss:hover {
  color: #10242d;
}

.guide-gate-close:focus-visible,
.guide-gate-submit:focus-visible,
.guide-gate-dismiss:focus-visible,
.guide-gate-field input:focus-visible {
  outline: 2px solid rgba(183, 141, 90, 0.94);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .guide-gate-backdrop {
    padding: 16px;
    align-items: end;
  }

  .guide-gate-dialog {
    width: 100%;
    max-height: min(100vh - 24px, 760px);
    padding: 24px 20px 22px;
    border-radius: 24px 24px 18px 18px;
  }

  .guide-gate-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-gate-submit,
  .guide-gate-dismiss {
    width: 100%;
    justify-content: center;
  }
}
