.discord-guide {
  --line: #37343b;
  --muted: #c0bcc5;
  --accent: #ff8996;
  width: min(1020px, calc(100% - 64px));
  margin-inline: auto;
  padding: clamp(22px, 4vw, 50px) 0 clamp(60px, 10vw, 115px);
  line-height: 1.55;
}
.discord-guide [hidden] {
  display: none !important;
}
.discord-guide a {
  text-underline-offset: 0.21em;
}
.connect-head > a,
.connect-step p a,
.connect-stage .step-actions > a:not(.q-button),
.connect-foot a,
#build-warning a,
.connect-link {
  color: #efbac4;
}
.connect-head > a {
  display: inline-block;
  margin-bottom: 22px;
}
.connect-head .q-eyebrow {
  margin: 0;
}
.shop .connect-head h1 {
  margin: 0.3rem 0 0.6rem;
  font: 700 clamp(2.6rem, 6vw, 4.8rem) / 1.02 var(--display);
  letter-spacing: -0.065em;
}
.connect-head h1 span {
  color: var(--accent);
}
.connect-head > p:not(.q-eyebrow) {
  max-width: 60ch;
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}
.connect-build {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.connect-build .bot-emblem {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
}
.connect-build .bot-emblem svg {
  width: 25px;
  height: 25px;
}
.connect-build div {
  min-width: 0;
}
.connect-build strong,
.connect-build small {
  display: block;
  overflow-wrap: anywhere;
}
.connect-build small {
  font-size: 0.88rem;
  color: var(--muted);
}
.connect-layout {
  border-top: 1px solid var(--line);
  margin-top: clamp(22px, 3.3vw, 39px);
  padding-top: clamp(22px, 3.3vw, 38px);
  display: grid;
  grid-template-columns: minmax(155px, 215px) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 75px);
}
.connect-rail ol {
  padding: 0;
  list-style: none;
  margin: 0;
}
.connect-rail li {
  position: relative;
}
.connect-rail li + li::before {
  content: "";
  position: absolute;
  width: 1px;
  height: 16px;
  left: 13px;
  top: -8px;
  background: var(--line);
}
.connect-rail a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 45px;
  text-decoration: none;
  color: #b6b0bb;
  font-weight: 550;
}
.connect-rail a span {
  z-index: 1;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #57525b;
  border-radius: 50%;
  background: #141316;
  font: 550 0.82rem/1 var(--display);
}
.connect-rail [aria-current] {
  color: #fff;
}
.connect-rail [aria-current] span {
  background: #51242b;
  border-color: var(--accent);
}
.connect-rail .passed span {
  color: #e8bdc3;
  border-color: #81545b;
}
.connect-rail > p,
.connect-small,
.connect-foot {
  color: #b8b2bf;
  font-size: 0.91rem;
}
.connect-rail > p {
  max-width: 18ch;
  margin: 1rem 0 0;
}
.connect-stage {
  min-width: 0;
  max-width: 700px;
}
.connect-step {
  scroll-margin-top: 6rem;
  padding-bottom: 1rem;
  overflow-wrap: anywhere;
}
.connect-step + .connect-step:not([hidden]) {
  scroll-margin-top: 6rem;
}
.connect-step > .step-number {
  color: var(--accent);
  margin: 0 0 0.45rem;
  font-weight: 650;
  font-size: 0.89rem;
}
.shop .connect-step h2 {
  scroll-margin-top: 6.3rem;
  margin: 0 0 0.8rem;
  color: #fff;
  font: 650 clamp(1.85rem, 3.4vw, 2.65rem) / 1.12 var(--display);
  letter-spacing: -0.045em;
}
.connect-step h2:focus {
  outline: 0;
}
.connect-step p {
  max-width: 68ch;
  margin: 0.55rem 0 1rem;
  color: #cac6cf;
}
.connect-step p strong {
  color: #f7f4f8;
  font-weight: 650;
}
.portal-action,
.discord-guide button,
.discord-guide input,
.discord-guide select {
  font-family: var(--display);
  font-size: 1rem;
}
.portal-action {
  display: inline-flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
  padding: 0.57rem 0.94rem;
  min-height: 44px;
  border: 1px solid #69636d;
  border-radius: 6px;
  background: #211f24;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.portal-action:hover {
  background: #2d2931;
  border-color: #ada3af;
}
.connect-step .portal-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: center;
  margin: 1.1rem 0;
  padding: 0.72rem 0.9rem;
  border-left: 2px solid #a75360;
  background: #1a171c;
  color: #f2eff3;
  font-size: 0.95rem;
}
.portal-trail > span {
  color: #c6adb4;
  margin-right: 0.2rem;
}
.portal-trail i {
  color: #c6959e;
  font-style: normal;
}
.discord-guide label {
  display: block;
  font-weight: 650;
  margin-bottom: 0.35rem;
}
.discord-guide input,
.discord-guide select {
  width: 100%;
  max-width: 33rem;
  min-width: 0;
  min-height: 46px;
  padding: 0.55rem 0.78rem;
  color: #f7f5f7;
  background: #18171c;
  border: 1px solid #726d77;
  border-radius: 5px;
  color-scheme: dark;
}
.discord-guide input::placeholder {
  color: #a4a0ab;
}
.discord-guide [aria-invalid="true"] {
  border-color: #ff8797;
}
.discord-guide :focus-visible {
  outline: 2px solid #ff9ca9;
  outline-offset: 3px;
}
.credential-row {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  max-width: 40rem;
}
.credential-row input {
  flex: 1;
}
.credential-row button {
  flex-shrink: 0;
}
.connect-step .connect-small {
  font-size: 0.9rem;
  color: #bdb8c3;
  margin-top: 0.48rem;
}
.step-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 1.1rem;
  margin-top: 1.35rem;
}
.step-actions .q-button {
  min-height: 44px;
}
.connect-link {
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
  padding: 0.5rem 0;
  min-height: 44px;
}
.discord-guide button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}
.connect-step .connect-status {
  color: #ecc9cf;
  margin: 0.65rem 0;
}
.connect-step .connect-status.problem,
#build-warning {
  color: #ffa5b0;
}
.connect-status:empty {
  display: none;
}
.connect-step details {
  margin: 1rem 0;
}
.connect-step summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.55rem 0;
}
.connect-step summary::marker {
  color: var(--accent);
}
#channel-tools {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
#channel-tools h3 {
  margin: 0;
  font-size: 1.2rem;
}
#guild-controls {
  margin: 0.9rem 0;
}
#guild-controls select {
  display: block;
  margin-bottom: 0.5rem;
}
.connect-summary {
  margin: 1.3rem 0;
}
.connect-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.58rem 0;
}
.connect-summary dt {
  color: var(--muted);
}
.connect-summary dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
}
.connect-foot {
  margin-top: 0.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.discord-guide:not(.interactive) .step-actions button,
.discord-guide:not(.interactive) .credential-row button {
  display: none;
}
@media (prefers-reduced-motion: no-preference) {
  .discord-guide.interactive .connect-step:not([hidden]) {
    animation: connect-step-in 0.18s ease-out;
  }
  @keyframes connect-step-in {
    from {
      transform: translateY(3px);
    }
    to {
      transform: translateY(0);
    }
  }
}
@media (max-width: 720px) {
  .discord-guide {
    width: calc(100% - 32px);
  }
  .connect-layout {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 12px;
  }
  .connect-rail > p,
  .connect-rail li + li::before {
    display: none;
  }
  .connect-rail ol {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.24rem;
  }
  .connect-rail a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.3rem;
    text-align: center;
    font-size: 0.78rem;
    line-height: 1.3;
  }
  .connect-step .portal-trail {
    gap: 0.2rem 0.45rem;
  }
  .credential-row {
    flex-wrap: wrap;
  }
  .credential-row input {
    flex: 1 1 200px;
  }
}
@media (max-width: 420px) {
  .credential-row {
    flex-direction: column;
    align-items: stretch;
  }
  .credential-row input {
    flex: 0 1 auto;
  }
  .connect-summary > div {
    flex-wrap: wrap;
    gap: 0.12rem 0.7rem;
  }
}

.portal-map figure {
  margin: 0.25rem 0 0.8rem;
  overflow: hidden;
  max-width: 31rem;
  border: 1px solid #48444e;
  border-radius: 7px;
  background: #252429;
}
.portal-map figcaption {
  background: #18171c;
  padding: 0.55rem 0.85rem;
  font-size: 0.83rem;
  color: #d3cdd8;
}
.map-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}
.map-nav,
.map-field {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem;
  min-width: 0;
}
.map-nav {
  background: #202025;
  color: #c9c5cc;
  font-size: 0.8rem;
}
.map-nav > * {
  padding: 0.2rem 0.35rem;
}
.map-nav strong {
  color: white;
  border-left: 2px solid #ff8996;
  background: #343137;
}
.map-field small {
  color: #c3bcc9;
}
.map-field i {
  display: inline-block;
  font-style: normal;
  font-size: 0.8rem;
  color: #ede9ff;
  background: #43405c;
  border-radius: 4px;
  padding: 0.15rem 0.4rem;
}
