
/* Drawer menu polish */
.quick-card {
  position: relative;
}
.drawer-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(171,117,137,.14);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(62,47,53,.72);
  background: rgba(255,255,255,.76);
  box-shadow: 0 10px 24px rgba(78,44,56,.08);
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}
.drawer-menu {
  padding-top: 56px;
}
.drawer-account {
  margin: -2px 8px 0;
  color: rgba(62,47,53,.52);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}
body.dark .drawer-close {
  color: rgba(255,246,248,.78);
  background: rgba(48,34,43,.84);
  border-color: rgba(232,177,196,.14);
}
body.dark .drawer-account {
  color: rgba(255,246,248,.52);
}

/* Compact auth forms */
#panel-login,
#panel-register {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 20px 22px;
  border-radius: 20px;
}
#panel-login h3,
#panel-register h3 {
  margin-bottom: 6px;
}
#panel-login .sub,
#panel-register .sub {
  margin-bottom: 16px;
}
#panel-login .grid,
#panel-register .grid {
  gap: 12px;
}
#panel-login .field,
#panel-register .field,
.auth-card .field {
  gap: 5px;
  margin-bottom: 9px;
}
#panel-login input,
#panel-register input,
.auth-card input {
  padding: 10px 12px;
  min-height: 42px;
  border-radius: 12px;
}
#panel-login .captcha-row,
#panel-register .captcha-row,
.auth-card .captcha-row {
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) 118px;
}
#panel-login .captcha-img,
#panel-register .captcha-img,
.auth-card .captcha-img {
  height: 42px;
}
#panel-login .btn.primary,
#panel-register .btn.primary,
.auth-card .btn.primary {
  min-height: 42px;
  padding: 9px 18px;
}
#panel-login .form-hint,
#panel-register .form-hint,
.auth-card .form-hint {
  min-height: 14px;
  margin: -3px 0 8px;
}
#panel-login .auth-switch,
#panel-register .auth-switch {
  margin-top: 10px;
}
.auth-card {
  max-width: 380px;
  padding: 20px 22px 18px;
}
.auth-card h3 {
  font-size: 25px;
  margin-bottom: 8px;
}
.auth-tabs {
  margin: 10px auto 14px;
  padding: 4px;
  width: min(210px, 100%);
}
.auth-tab-btn {
  min-height: 36px;
  padding: 7px 12px;
}
.agreement-line.compact {
  margin-top: 8px;
}
.agreement-line.compact {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  text-align: left;
}
.agreement-line.compact input {
  width: 24px;
  height: 24px;
  margin: 0;
  align-self: center;
}
.agreement-line.compact span {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 3px;
  min-width: 0;
}
.agreement-line.compact em {
  font-style: normal;
  color: rgba(62,47,53,.45);
}
.agreement-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: #8f526b;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}
.info-card {
  max-height: min(620px, calc(100dvh - 80px));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.agreement-content {
  color: rgba(62,47,53,.72);
  font-size: 14px;
  line-height: 1.75;
}
.agreement-content p {
  margin: 0 0 12px;
}

/* Register modal vertical compression */
.auth-card {
  padding: 16px 20px 15px;
}
.auth-card h3 {
  margin-bottom: 5px;
}
.auth-card .field {
  gap: 4px;
  margin-bottom: 7px;
}
.auth-card input {
  min-height: 39px;
  padding: 8px 11px;
}
.auth-card .form-hint {
  min-height: 0;
  margin: -6px 0 3px;
  line-height: 1.25;
}
.auth-card .form-hint:empty {
  display: none;
}
.auth-card .captcha-row {
  gap: 8px;
}
.auth-card .captcha-img {
  height: 39px;
}
.auth-card .btn.primary {
  min-height: 40px;
  padding: 8px 16px;
}
.auth-card .agreement-line.compact {
  margin-top: 7px;
}
@media (max-width: 560px) {
  .auth-card {
    width: min(88vw, 380px);
    padding: 15px 18px 14px;
  }
  .auth-tabs {
    margin: 7px auto 10px;
  }
  .auth-tab-btn {
    min-height: 34px;
  }
}

/* WeChat login choice */
.wechat-login-choice-modal {
  padding: 20px;
}
.wechat-login-choice-card {
  width: min(88vw, 390px);
  padding: 30px 28px 28px;
  border-radius: 24px;
  overflow: hidden;
}
.wechat-login-choice-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 72px;
  background: linear-gradient(180deg, rgba(201,120,152,.12), rgba(255,255,255,0));
  pointer-events: none;
}
.wechat-login-choice-card .modal-close {
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(62,47,53,.42);
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(171,117,137,.12);
  font-size: 26px;
  font-weight: 700;
}
.wechat-login-choice-card .modal-fixed-head {
  position: relative;
  padding: 2px 40px 18px 0;
}
.wechat-login-choice-card .modal-fixed-head h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.18;
  letter-spacing: 0;
}
.wechat-login-choice-actions {
  position: relative;
  display: grid;
  gap: 14px;
}
.wechat-login-choice-btn {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(171,117,137,.18);
  border-radius: 18px;
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  color: #523944;
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 28px rgba(78,44,56,.07);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.wechat-login-choice-btn.primary {
  color: #fff;
  border-color: rgba(117,67,86,.2);
  background: linear-gradient(135deg, #8f526b 0%, #bb7890 100%);
  box-shadow: 0 16px 36px rgba(143,82,107,.2);
}
.wechat-login-choice-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(143,82,107,.28);
  box-shadow: 0 16px 34px rgba(78,44,56,.1);
}
.wechat-login-choice-btn.loading,
.wechat-login-choice-btn:disabled {
  opacity: .72;
  cursor: wait;
  transform: none;
}
.wechat-login-choice-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #8f526b;
  background: rgba(143,82,107,.09);
  font-size: 16px;
  font-weight: 900;
}
.wechat-login-choice-btn.primary .wechat-login-choice-icon {
  color: #8f526b;
  background: rgba(255,255,255,.92);
}
.wechat-login-choice-text {
  min-width: 0;
  font-size: 17px;
  line-height: 1.2;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.dark .wechat-login-choice-card::before {
  background: linear-gradient(180deg, rgba(232,177,196,.13), rgba(38,27,34,0));
}
body.dark .wechat-login-choice-card .modal-close {
  color: rgba(255,246,248,.58);
  background: rgba(48,34,43,.76);
  border-color: rgba(232,177,196,.14);
}
body.dark .wechat-login-choice-btn {
  color: rgba(255,246,248,.9);
  background: rgba(48,34,43,.82);
  border-color: rgba(232,177,196,.14);
}
body.dark .wechat-login-choice-btn.primary {
  color: #fff;
  background: linear-gradient(135deg, #8f526b 0%, #bb7890 100%);
}
body.dark .wechat-login-choice-icon {
  color: #ffd6e3;
  background: rgba(232,177,196,.12);
}
body.dark .wechat-login-choice-btn.primary .wechat-login-choice-icon {
  color: #8f526b;
  background: rgba(255,255,255,.9);
}
@media (max-width: 560px) {
  .wechat-login-choice-card {
    width: min(90vw, 380px);
    padding: 28px 24px 24px;
    border-radius: 23px;
  }
  .wechat-login-choice-card .modal-fixed-head h3 {
    font-size: 25px;
  }
  .wechat-login-choice-btn {
    min-height: 56px;
    border-radius: 17px;
  }
}

/* WeChat invite prompt */
.wechat-invite-modal {
  padding: 20px;
}
.wechat-invite-card {
  width: min(88vw, 390px);
  padding: 24px 24px 20px;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255,255,255,.98);
  backdrop-filter: none;
}
.wechat-invite-card .modal-close {
  top: 16px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: rgba(62,47,53,.42);
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(171,117,137,.12);
  font-size: 26px;
  font-weight: 700;
}
.wechat-invite-card .modal-fixed-head {
  position: relative;
  padding: 2px 34px 12px 0;
  text-align: center;
}
.wechat-invite-card .modal-fixed-head h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
}
.wechat-invite-card .modal-fixed-head .sub {
  margin: 8px 0 0;
  color: rgba(62,47,53,.58);
  font-size: 14px;
  line-height: 1.7;
}
.wechat-invite-field {
  gap: 4px;
  margin-bottom: 0;
}
.wechat-invite-field input {
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 16px;
}
.wechat-invite-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.wechat-invite-actions .btn {
  min-height: 48px;
  border-radius: 18px;
}
.wechat-invite-actions .btn.primary {
  background: #17151a;
  border-color: #17151a;
  color: #fff;
}
body.dark .wechat-invite-card .modal-close {
  color: rgba(255,246,248,.58);
  background: rgba(48,34,43,.76);
  border-color: rgba(232,177,196,.14);
}
body.dark .wechat-invite-card .modal-fixed-head .sub {
  color: rgba(255,246,248,.62);
}
body.dark .wechat-invite-field input {
  background: rgba(48,34,43,.84);
}
body.dark .wechat-invite-actions .btn.primary {
  background: #0f0d12;
  border-color: #0f0d12;
}
@media (max-width: 560px) {
  .wechat-invite-card {
    width: min(90vw, 380px);
    padding: 22px 20px 18px;
    border-radius: 23px;
  }
  .wechat-invite-card .modal-fixed-head h3 {
    font-size: 24px;
  }
  .wechat-invite-field input,
  .wechat-invite-actions .btn {
    min-height: 46px;
    border-radius: 16px;
  }
}
