.connectionPage {
  display: block !important;
  position: static !important;
  margin: 6vh auto !important;
  max-width: 760px;
  padding: 28px;
  min-height: 70vh;
}
.connectionPage h1 {
  font-family: Georgia, serif;
  font-size: clamp(28px, 6vw, 42px);
}
.connectionPage form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}
.connectionPage label {
  display: grid;
  gap: 8px;
}
.connectionPage input,
.connectionPage select,
.connectionPage button {
  padding: 12px;
  border: 1px solid #bba48b;
  border-radius: 8px;
  min-width: 0;
}
.connectionPage .consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.connectionPage button {
  cursor: pointer;
}
.connectionPage button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.connectionPage a:focus-visible,
.connectionPage button:focus-visible,
.connectionPage input:focus-visible {
  outline: 3px solid #ad7b4d;
  outline-offset: 3px;
}

/* Scoped controls: keep the public site/editor button rules out of this page. */
.connectionPage #connectionBody {
  margin-top: 20px;
}
.connectionPage #connectionBody > p {
  margin: 12px 0;
}
.connectionPage #connectionBody button,
.connectionPage #connectionBody a.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 20px;
  border: 1px solid #6d5947;
  border-radius: 12px;
  background: #292225;
  color: #f8f3ec;
  font: 600 14px/1.4 Arial, sans-serif;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.connectionPage #connectionBody button:hover:not(:disabled) {
  background: #382d2e;
  border-color: #c7a47d;
}
.connectionPage #connectionBody a.primary-button,
.connectionPage #connectionBody form button[type="submit"],
.connectionPage #connectionConsent > button,
.connectionPage #connectionLogin > button {
  background: #c7a47d;
  border-color: #c7a47d;
  color: #21191a !important;
  box-shadow: 0 4px 16px #00000020;
}
.connectionPage #connectionBody a.primary-button:hover,
.connectionPage #connectionBody form button[type="submit"]:hover:not(:disabled),
.connectionPage #connectionConsent > button:hover:not(:disabled),
.connectionPage #connectionLogin > button:hover:not(:disabled) {
  background: #dcbd99;
  border-color: #dcbd99;
  color: #21191a !important;
}
.connectionPage #connectionBody button[data-grant],
.connectionPage #connectionBody section > button:not([id]) {
  margin: 14px 0 4px;
  border-color: #78534e;
  background: #302123;
  color: #f0b9ad;
}
.connectionPage #connectionBody button[data-grant]:hover:not(:disabled),
.connectionPage #connectionBody section > button:not([id]):hover:not(:disabled) {
  background: #462a2c;
  border-color: #b58175;
}
.connectionPage #connectionBody > section {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid #493b3f;
  border-radius: 16px;
  background: #211c20;
}
.connectionPage #connectionBody > section h2 {
  margin: 0 0 12px;
  font-size: 22px;
}
.connectionPage #connectionBody > section p {
  line-height: 1.6;
}
.connectionPage #connectionBody button:disabled {
  opacity: .55;
  cursor: default;
  box-shadow: none;
}
.connectionPage #connectionBody input:not([type="checkbox"]),
.connectionPage #connectionBody select {
  background: #191719;
  color: #f8f3ec;
  border-color: #5d4c4e;
  font: inherit;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  .connectionPage { padding: 20px; margin: 20px auto !important; }
  .connectionPage #connectionBody button,
  .connectionPage #connectionBody a.primary-button { width: 100%; box-sizing: border-box; }
  .connectionPage #connectionBody > section { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .connectionPage #connectionBody button,
  .connectionPage #connectionBody a.primary-button { transition: none; }
}
