/* Embedded account panels. Changes to the shell apply only on auth routes. */
.activity-app.is-authpage > .app-header,
.activity-app.is-authpage > .mobile-nav {
  display: none;
}
.activity-app.is-authpage > .activity-main {
  padding: 0;
}
.activity-app.is-authpage .my-page {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
}
.auth-page,
.auth-page * {
  box-sizing: border-box;
}
.auth-page {
  --auth-blue: #2858ed;
  --auth-ink: #203d68;
  --auth-muted: #7588a6;
  position: relative;
  isolation: isolate;
  min-width: 0;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(ellipse 390px 280px at 75% 100px, #e2ebffb0, transparent 80%),
    radial-gradient(ellipse 290px 280px at -5% 315px, #edf3ff, transparent 80%),
    linear-gradient(180deg, #f9fbff, #f4f7fd 66%, #fff);
  color: #203d68;
  font-family: 'Microsoft YaHei', 'PingFang SC', 'Segoe UI', sans-serif;
  -webkit-text-size-adjust: 100%;
  box-shadow: 0 0 50px #20355a0b;
}
.auth-page :is(h1, p) {
  margin: 0;
}
.auth-page a {
  color: inherit;
  text-decoration: none;
}
.auth-page button,
.auth-page input {
  font: inherit;
}
.auth-page button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.auth-page button:disabled {
  cursor: default;
}
.auth-page button,
.auth-page a,
.auth-page input {
  outline-offset: 4px;
}
.auth-page :focus-visible {
  outline: 2px solid #7298f4;
}
.auth-page svg {
  display: block;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.auth-page[hidden],
.auth-page [hidden] {
  display: none !important;
}
.auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 72px;
  padding: 14px 21px 6px;
}
.auth-header .auth-back {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-left: -7px;
  border-radius: 12px;
  color: #35547f;
}
.auth-back svg {
  width: 23px;
  height: 23px;
}
.auth-header .auth-back:hover {
  background: #eaf0fc;
}
.auth-header .auth-about {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 44px;
  font-size: 12px;
  line-height: 1.7;
  color: #5c78a4;
}
.auth-about svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.6;
}
.auth-main {
  position: relative;
  padding: 5px 24px max(27px, env(safe-area-inset-bottom));
}
.auth-brand {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  text-align: center;
  min-width: 0;
  padding: 15px 0 25px;
}
.auth-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: 60px;
  height: 60px;
  border-radius: 17px;
  box-shadow: 0 8px 20px #2858ed15;
}
.auth-brand .auth-brand-name {
  position: relative;
  margin-top: 12px;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.2px;
  color: #1c3a6a;
}
.auth-brand-name > span {
  margin-left: 5px;
  font-family: 'Segoe UI', sans-serif;
  font-weight: 650;
  letter-spacing: -0.3px;
}
.auth-brand .auth-brand-subtitle {
  position: relative;
  max-width: 100%;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.85;
  color: #7186a8;
}
.auth-network {
  position: absolute;
  top: 12px;
  left: 50%;
  width: 258px;
  height: 100px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: -1;
  opacity: 0.75;
}
.auth-network::before,
.auth-network::after {
  content: '';
  position: absolute;
  left: 20px;
  top: 40px;
  width: 104px;
  height: 1px;
  background: linear-gradient(90deg, #d2dff8, transparent);
  transform: rotate(17deg);
  transform-origin: left center;
}
.auth-network::after {
  left: auto;
  right: 15px;
  top: 25px;
  transform: rotate(-17deg);
  transform-origin: right center;
}
.auth-network > span {
  position: absolute;
  left: 16px;
  top: 36px;
  width: 7px;
  height: 7px;
  border: 1px solid #c7d9fa;
  border-radius: 50%;
  background: #f9fbff;
  box-shadow: 0 0 0 5px #e8f0ff70;
}
.auth-network > span:nth-child(2) {
  left: auto;
  right: 12px;
  top: 21px;
  width: 6px;
  height: 6px;
}
.auth-network > span:nth-child(3) {
  left: auto;
  right: 40px;
  top: 77px;
  width: 4px;
  height: 4px;
  background: #c8dafa;
  border: 0;
  box-shadow: none;
}
.auth-card {
  position: relative;
  min-width: 0;
  padding: 25px 22px 13px;
  border: 1px solid #e0e8f8;
  border-radius: 21px;
  background: #ffffffed;
  box-shadow: 0 9px 30px #2f53820a;
}
.auth-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.auth-card-heading h1 {
  min-width: 0;
  color: var(--auth-ink);
  font-size: 23px;
  line-height: 1.5;
  font-weight: 650;
  letter-spacing: -0.3px;
}
.auth-demo-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 3px 7px;
  border: 1px solid #e0e9fa;
  border-radius: 6px;
  background: #f3f7ff;
  color: #6884b0;
  font-size: 10px;
  line-height: 1.7;
  white-space: nowrap;
}
.auth-demo-badge::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #86a3dc;
}
.auth-card .auth-card-description {
  margin-top: 5px;
  margin-bottom: 23px;
  color: #7d8fa9;
  font-size: 12px;
  line-height: 1.8;
}
.auth-label {
  display: block;
  margin: 19px 1px 9px;
  color: #3d587d;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 500;
}
.auth-card form > .auth-label:first-child {
  margin-top: 0;
}
.auth-field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 54px;
  border: 1px solid #dfe7f6;
  border-radius: 11px;
  background: #f7faff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.auth-field:focus-within {
  border-color: #8eacf0;
  box-shadow: 0 0 0 3px #edf3ff;
}
.auth-field:has(input[aria-invalid='true']) {
  border-color: #d894a1;
  box-shadow: 0 0 0 3px #fff2f5;
}
.auth-field .auth-field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #8ea3c4;
  stroke-width: 1.6;
  pointer-events: none;
}
.auth-field input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 13px 14px 13px 41px;
  border: 0;
  outline: 0;
  border-radius: 10px;
  background: transparent;
  color: #2d4c77;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  caret-color: var(--auth-blue);
}
.auth-field input::placeholder {
  color: #8c9db7;
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  font-size: 13px;
  opacity: 1;
}
.auth-field input:focus-visible {
  outline: none;
}
.auth-password-field input {
  padding-right: 47px;
}
.auth-field .auth-password-toggle {
  display: grid;
  place-items: center;
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 12px;
  border-radius: 9px;
  background: transparent;
  color: #7891b5;
}
.auth-password-toggle svg {
  width: 19px;
  height: 19px;
  stroke-width: 1.6;
}
.auth-field .auth-password-toggle:hover,
.auth-field .auth-password-toggle[aria-pressed='true'] {
  background: #eaf1ff;
  color: #4e76b4;
}
.auth-card .auth-field-hint {
  margin: 7px 1px 0;
  font-size: 10px;
  line-height: 1.8;
  color: #8797af;
}
.auth-error {
  min-height: 34px;
  padding: 8px 1px 6px;
  color: #ba526b;
  font-size: 11px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.auth-page .auth-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  min-height: 52px;
  padding: 12px 15px;
  border-radius: 11px;
  background: var(--auth-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  box-shadow: 0 5px 13px #2858ed1c;
}
.auth-page .auth-submit:hover {
  background: #214bd3;
}
.auth-page .auth-submit:disabled {
  background: #b6c7ed;
  color: #f8faff;
  box-shadow: none;
}
.auth-submit[aria-busy='true']::before {
  content: '';
  width: 15px;
  height: 15px;
  border: 2px solid #ffffff5c;
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.75s linear infinite;
}
.auth-card .auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 3px;
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.8;
  color: #8596b0;
  text-align: center;
}
.auth-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  color: #416cbd;
  font-size: 12px;
  font-weight: 500;
}
.auth-switch svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.6;
}
.auth-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-height: 44px;
  margin: 16px 1px 0;
  padding-top: 6px;
  color: #7184a2;
  font-size: 11px;
  line-height: 1.9;
  cursor: pointer;
}
.auth-agreement input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--auth-blue);
  cursor: pointer;
}
.auth-agreement span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.auth-demo-entry {
  margin-top: 22px;
}
.auth-demo-entry > span {
  display: flex;
  align-items: center;
  gap: 13px;
  justify-content: center;
  color: #8e9eb7;
  font-size: 10px;
  line-height: 1.8;
}
.auth-demo-entry > span::before,
.auth-demo-entry > span::after {
  content: '';
  height: 1px;
  max-width: 71px;
  flex: 1;
  background: #dfe7f5;
}
.auth-page .auth-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 48px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid #dce6f8;
  border-radius: 11px;
  background: #ffffffb3;
  color: #5d7cae;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.8;
}
.auth-secondary svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.5;
}
.auth-page .auth-secondary:hover {
  border-color: #b9cef4;
  background: #f8fbff;
}
.auth-page .auth-secondary:disabled {
  opacity: 0.6;
}
.auth-main > .auth-footnote {
  margin: 18px 3px 0;
  text-align: center;
  color: #8d9db5;
  font-size: 10px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 360px) {
  .auth-header {
    min-height: 70px;
    padding-left: 18px;
    padding-right: 18px;
  }
  .auth-main {
    padding-left: 17px;
    padding-right: 17px;
    padding-top: 0;
  }
  .auth-brand {
    padding-top: 9px;
    padding-bottom: 23px;
  }
  .auth-logo {
    width: 55px;
    height: 55px;
    border-radius: 16px;
  }
  .auth-brand .auth-brand-name {
    font-size: 25px;
    margin-top: 10px;
  }
  .auth-brand .auth-brand-subtitle {
    font-size: 11px;
    margin-top: 7px;
  }
  .auth-network {
    width: 238px;
  }
  .auth-card {
    padding: 22px 17px 12px;
    border-radius: 18px;
  }
  .auth-card-heading h1 {
    font-size: 21px;
  }
  .auth-card .auth-card-description {
    font-size: 11px;
    margin-bottom: 21px;
  }
  .auth-demo-badge {
    font-size: 9px;
    padding: 3px 6px;
  }
  .auth-label {
    font-size: 12px;
  }
  .auth-field input {
    padding-left: 38px;
  }
  .auth-field .auth-field-icon {
    left: 12px;
    width: 17px;
    height: 17px;
  }
  .auth-field input::placeholder {
    font-size: 12px;
  }
  .auth-password-field input {
    padding-right: 45px;
  }
  .auth-field .auth-password-toggle {
    right: 2px;
  }
  .auth-agreement {
    font-size: 10px;
    gap: 7px;
  }
  .auth-page .auth-submit {
    font-size: 15px;
  }
  .auth-demo-entry {
    margin-top: 20px;
  }
  .auth-main > .auth-footnote {
    font-size: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page * {
    transition: none !important;
    animation: none !important;
  }
}

/* New account entry points only; public and authenticated pages retain their layout. */
.app-header .activity-login-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  flex-shrink: 0;
  min-height: 44px;
  padding: 8px 4px 8px 12px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  color: #5278bb;
  white-space: nowrap;
}
.app-header.is-subpage .activity-login-entry {
  display: none;
}
.my-page .my-auth-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  min-width: 0;
}
.my-page .my-auth-actions > .my-secondary {
  margin: 0;
}
.my-page .my-experience-entry {
  min-height: 44px;
  margin-top: 10px;
  padding: 8px 12px;
  background: transparent;
  color: #8198bc;
  font-size: 12px;
  line-height: 1.8;
}
.my-page .my-experience-entry:hover {
  color: #557bc0;
}
@media (max-width: 360px) {
  .app-header .activity-login-entry {
    font-size: 11px;
    padding-left: 6px;
  }
  .my-page .my-auth-actions {
    gap: 8px;
  }
  .my-page .my-auth-actions > a {
    font-size: 14px;
  }
}

/* Identity selection inside the existing auth forms only. */
.auth-page .auth-identity-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  min-width: 0;
  margin: 0 0 20px;
  padding: 4px;
  border: 1px solid #e3eaf8;
  border-radius: 11px;
  background: #edf3fd;
}
.auth-page .auth-identity-tabs > button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 9px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #7d92b3;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
  text-align: center;
  overflow-wrap: anywhere;
}
.auth-page .auth-identity-tabs > button:hover:not(:disabled) {
  color: #557dbb;
  background: #f6f9ff;
}
.auth-page .auth-identity-tabs > button[aria-pressed='true'] {
  border-color: #e2eafa;
  background: #fff;
  color: #426db6;
  box-shadow: 0 2px 7px #3159950a;
}
.auth-page .auth-identity-tabs > button:disabled {
  cursor: default;
  opacity: 0.65;
}
.auth-page .auth-identity-group {
  min-width: 0;
}
.auth-page .auth-identity-group > .auth-label:first-child {
  margin-top: 0;
}
.auth-page .auth-identity-group[hidden] {
  display: none !important;
}
@media (max-width: 360px) {
  .auth-page .auth-identity-tabs {
    margin-bottom: 18px;
  }
  .auth-page .auth-identity-tabs > button {
    font-size: 11px;
    padding-left: 4px;
    padding-right: 4px;
  }
}

.auth-page .auth-identity-hint {
  margin: -12px 0 20px;
  padding: 10px 12px;
  border: 1px solid #e1eafb;
  border-radius: 9px;
  background: #f3f7ff;
  color: #758caa;
  font-size: 11px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

/* Optional invitation attached to the email registration flow. */
.auth-page .auth-invitation-group {
  min-width: 0;
}
.auth-page .auth-label .auth-optional {
  margin-left: 4px;
  color: #91a0b8;
  font-size: 11px;
  font-weight: 400;
  line-height: inherit;
}
.auth-page .auth-invitation-group .auth-field-hint {
  font-size: 11px;
}

/* Email verification stays inside the established blue and white auth form. */
.auth-page .auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, 40%);
  align-items: stretch;
  gap: 8px;
}
.auth-page .auth-send-code {
  min-width: 0;
  padding: 10px 8px;
  border: 1px solid #d9e5fc;
  border-radius: 11px;
  background: #edf3ff;
  color: #315dee;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.auth-page .auth-send-code:disabled {
  background: #f3f6fb;
  color: #8a9bb6;
  cursor: default;
}
.auth-page .auth-code-demo {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed #cddcfa;
  border-radius: 10px;
  background: #f5f8ff;
  color: #7186a8;
  font-size: 11px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.auth-page .auth-code-demo[hidden] {
  display: none;
}
.auth-page .auth-code-demo p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  margin: 0;
}
.auth-page .auth-code-demo code {
  direction: ltr;
  unicode-bidi: isolate;
  color: #315dee;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 2px;
}

/* Keep login content centered while responsive previews resize across narrow breakpoints. */
.auth-page[data-my-panel='login'] .auth-main {
  --auth-inline-inset: max(
    clamp(17px, 5.5vw, 24px),
    env(safe-area-inset-left, 0px),
    env(safe-area-inset-right, 0px)
  );
  inline-size: 100%;
  max-inline-size: 100%;
  margin-inline: auto;
  padding-inline: var(--auth-inline-inset);
}
.auth-page[data-my-panel='login'] :is(.auth-brand, .auth-card, .auth-demo-entry) {
  inline-size: 100%;
  min-inline-size: 0;
  margin-inline: auto;
}
@media (min-width: 481px), (hover: hover) and (pointer: fine) {
  html:has(.activity-app.is-authpage) {
    scrollbar-gutter: stable both-edges;
  }
}
