#login.popup {
  bottom: 0;
  height: 100vh;
  left: 0;
  margin: 0;
  max-height: 100vh;
  overflow: hidden;
  overscroll-behavior: contain;
  position: fixed;
  right: 0;
  top: 0;
  transform: none;
  width: 100vw;
  touch-action: pan-y;
}

#login .popup-box.full-prop {
  bottom: 0;
  height: 100vh;
  margin-bottom: 0;
  margin-top: 0;
  max-height: 100vh;
  overflow: hidden;
  left: auto;
  margin-left: 0;
  position: fixed;
  right: 0;
  top: 0;
  transform: translate3d(100%, 0, 0);
  -webkit-transform: translate3d(100%, 0, 0);
  will-change: transform;
}

#login.show .popup-box.full-prop {
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

#login .login {
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
  height: auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 0 20px;
  touch-action: pan-y;
}

@supports (height: 100dvh) {
  #login.popup,
  #login .popup-box.full-prop {
    height: 100dvh;
    max-height: 100dvh;
  }
}
#login .popup-title {
  border-bottom: 0;
  padding-top: 40px;
}

#login .login-otp-panel {
  border-bottom: 0;
  margin-top: 8px;
  margin-bottom: 18px;
  padding: 10px 0 8px;
}

#login .login-otp-input-row {
  align-items: center;
  border-bottom: 1px solid #aaa;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) max-content;
  min-height: 44px;
  width: 100%;
}

#login .login-otp-panel #login-otp-picker {
  border: 0;
  box-sizing: border-box;
  height: 43px;
  letter-spacing: 4px;
  min-width: 0;
  opacity: 1;
  padding: 0;
}

#login .login-otp-panel #login-otp-picker::placeholder {
  color: #aaa;
  opacity: 1;
  -webkit-text-fill-color: #aaa;
}

#login .login-otp-panel #login-otp-picker::-webkit-input-placeholder {
  color: #aaa;
  -webkit-text-fill-color: #aaa;
}

#login .login-otp-panel #login-otp-picker::-moz-placeholder {
  color: #aaa;
  opacity: 1;
}

#login .login-otp-panel #login-otp-picker:-ms-input-placeholder {
  color: #aaa;
}

#login .login-otp-panel .login-otp-time {
  align-items: center;
  color: #e5021e;
  display: flex;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  font-weight: bold;
  justify-content: flex-end;
  min-width: 48px;
  position: static;
  transform: none;
}

#login .login-otp-detail {
  align-items: center;
  color: #777;
  display: flex;
  font-size: 12px;
  flex-wrap: wrap;
  gap: 4px 8px;
  line-height: 1.5;
  margin-top: 8px;
}

#login .login-otp-detail button {
  background: transparent;
  border: 0;
  color: #222;
  cursor: pointer;
  margin: 0;
  padding: 0;
  text-decoration: underline;
}

#login .login-otp-detail button:disabled {
  color: #aaa;
  cursor: default;
}

#login .login-otp-error {
  color: #e5021e;
  font-size: 12px;
  margin-top: 6px;
}

#login .login-otp-use-sms {
  background: transparent;
  border: 0;
  color: #222;
  cursor: pointer;
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 8px;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  width: 100%;
}

#login .login-turnstile-slot {
  align-items: center;
  border-bottom: 0;
  display: flex;
  justify-content: center;
  margin: 10px 0;
  min-height: 65px;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

#login #turnstile-widget-login {
  box-sizing: border-box;
  max-width: 100%;
  width: 100%;
}

#login #turnstile-widget-login iframe {
  max-width: 100%;
}


/* 眼睛顯示隱藏和顯示密碼 */
#preview-password {
  vertical-align: middle;
}


/* 其他信息 */
#login .other-info {
  display: flex;
  justify-content: space-between;
  margin-top: 35px;
  margin-bottom: 45px;
  color: #222222;
}


/* 按鈕 */
#login .buttons {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}
#login .buttons > div {
  border: 1px solid #222222;
  width: 100%;
  text-align: center;
  font-size: 16px;
  line-height: 45px;
  cursor: pointer;
  letter-spacing: 2px;
  text-indent: -1px;
  margin-bottom: 15px;
}

@media (max-width: 480px) {
  #login .popup-box.full-prop {
    left: 0;
    margin-left: 0;
    padding: 0;
    right: 0;
    width: 100%;
  }

  #login .popup-content.login {
    padding: 44px 20px calc(24px + env(safe-area-inset-bottom));
  }

  #login .login-otp-input-row {
    gap: 8px;
  }

  #login .login-otp-panel #login-otp-picker {
    font-size: 15px;
  }

  #login .login-otp-detail,
  #login .login-otp-use-sms {
    font-size: 11px;
  }

  #login .buttons > div {
    border: 1px solid #222222;
    width: 100%;
    text-align: center;
    font-size: 16px;
    line-height: 45px;
    cursor: pointer;
    letter-spacing: 2px;
    text-indent: -1px;
    margin-bottom: 15px;
    margin-top: 10px;
  }
}

#login .buttons > div:last-of-type {
  margin-bottom: 0;
}
#login .buttons > div.primary {
  background-color: #222;
  color: white;
}


#login .buttons a {
  display: block;
  width: 100%;
  height: 100%;
}


/* 其他登錄渠道 */
#login .other-channel {
  margin-top: 30px;
}
#login .other-channel ul {
  margin-top: 15px;
}
#login .other-channel ul li {
  display: block;
  vertical-align: middle;
  font-size: 0;
  margin-top: 10px;
}

/*#login .other-channel ul li:last-of-type {*/
/*  margin-right: 0;*/
/*}*/

#login .other-channel ul li .otherlogin.facebook {
  cursor: pointer;
  background: #4285f4;
  width: 100%;
  height: 47px;
  border-radius: 2px;
  text-align: left;
  vertical-align: middle;
}
#login .other-channel ul li .otherlogin.facebook .other-content > .other-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  margin-top: 10px;
}

#login .other-channel ul li .otherlogin.facebook .other-content .other-icon img {
  width: 23px;
  height: 23px;
  cursor: pointer;
}

#login .other-channel ul li .otherlogin.facebook .other-content > .other-name {
  color: #ffffff;
  font-size: 16px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  left: 50%;
  width: 100%;
  margin-left: -79px;
  margin-top: 12px;
}

#login .other-channel ul li .otherlogin.google {
  cursor: pointer;
  background: #ffffff;
  width: 100%;
  height: 47px;
  border-radius: 2px;
  text-align: left;
  vertical-align: middle;
  border: 1px solid;
}
#login .other-channel ul li .otherlogin.google .other-content > .other-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  margin-top: 10px;
}

#login .other-channel ul li .otherlogin.google .other-content > .other-icon > img {
  width: 23px;
  height: 23px;
  cursor: pointer;
}

#login .other-channel ul li .otherlogin.google .other-content > .other-name {
  color: #000000;
  font-size: 16px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  left: 50%;
  width: 120px;
  margin-left: -79px;
  margin-top: 12px;
  text-align: center;
}


#login .other-channel ul li .otherlogin.line {
  cursor: pointer;
  background: #00C300;
  width: 100%;
  height: 47px;
  border-radius: 2px;
  text-align: left;
  vertical-align: middle;
}
#login .other-channel ul li .otherlogin.line .other-content > .other-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  margin-top: 10px;
}

#login .other-channel ul li .otherlogin.line .other-content > .other-icon > img {
  width: 23px;
  height: 23px;
  cursor: pointer;
}

#login .other-channel ul li .otherlogin.line .other-content > .other-name {
  color: #ffffff;
  font-size: 16px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  left: 50%;
  width: 120px;
  margin-left: -79px;
  margin-top: 12px;
  text-align: center;
}

#login .other-channel ul li .otherlogin.facebook .other-content{
  position: relative;
  width: 100%;
  height: 50px;
}
#login .other-channel ul li .otherlogin.google .other-content{
  position: relative;
  width: 100%;
  height: 50px;
}
#login .other-channel ul li .otherlogin.line .other-content{
  position: relative;
  width: 100%;
  height: 50px;
}


#login .other-channel ul li .otherlogin.instagram {
  cursor: pointer;
  background: #f23548;
  width: 100%;
  height: 47px;
  border-radius: 2px;
  text-align: left;
  vertical-align: middle;
}
#login .other-channel ul li .otherlogin.instagram .other-content > .other-icon {
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
  margin-top: 10px;
}

#login .other-channel ul li .otherlogin.instagram .other-content > .other-icon > img {
  width: 23px;
  height: 23px;
  cursor: pointer;
}

#login .other-channel ul li .otherlogin.instagram .other-content > .other-name {
  color: #ffffff;
  font-size: 16px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  left: 50%;
  width: 120px;
  margin-left: -79px;
  margin-top: 12px;
}

#login .login-box-bg {
  background: linear-gradient(
    to bottom,
    white 260px,
    #F6F7F8 50px
  );
}

@media (max-height: 600px) and (min-height: 536px){
  #login .info {
    margin-top: 15px;
  }

  #login .other-info {
    margin: 20px 0;
  }

  #login .other-channel {
    margin: 15px 0;
  }
  #login .popup-title {
    border-bottom: 0;
    padding-top: 20px;
  }
}

@media (min-height: 536px) {
  #login .login {
    overflow-x: hidden;
    padding-bottom: 10px;
  }
  #login .other-info {
    margin: 20px 0;
  }
}

/* Responsive login layout: keep every dynamic login step in normal document flow. */
#login .login-box-bg {
  background: #f6f7f8;
}

#login #loginform {
  display: grid;
  gap: 24px;
  min-height: min-content;
  padding: 30px 0 24px;
}

#login .login-section {
  display: grid;
  gap: 16px;
  margin: 0;
  min-width: 0;
}

#login .login-section-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

#login .other-channel {
  background: #fff;
  margin: -30px -20px 0;
  padding: 30px 20px 26px;
}

#login .login-social-list {
  display: grid;
  gap: 10px;
}

#login .login-social-item {
  min-width: 0;
}

#login .login-social-item .otherlogin {
  border-radius: 2px;
  box-sizing: border-box;
  cursor: pointer;
  height: 47px;
  width: 100%;
}

#login .login-social-item .otherlogin.line {
  background: #00c300;
  color: #fff;
}

#login .login-social-item .otherlogin.google {
  background: #fff;
  border: 1px solid #222;
  color: #222;
}

#login .login-social-item .otherlogin.facebook {
  background: #4285f4;
  color: #fff;
}

#login .login-social-item .otherlogin.instagram {
  background: #f23548;
  color: #fff;
}

#login .login-social-item .other-content {
  align-items: center;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px;
  height: 100%;
  padding: 0 8px;
  width: 100%;
}

#login .login-social-item .other-icon {
  align-items: center;
  display: flex;
  grid-column: 1;
  justify-content: center;
  margin: 0;
}

#login .login-social-item .other-icon img {
  cursor: pointer;
  height: 23px;
  width: 23px;
}

#login .login-social-item .other-name {
  color: inherit;
  font-size: 16px;
  grid-column: 2;
  left: auto;
  margin: 0;
  position: static;
  text-align: center;
  width: auto;
}

#login .account-login-section {
  min-width: 0;
}

#login .info {
  display: grid;
  gap: 16px;
  margin: 0;
  min-width: 0;
}

#login .login-field {
  border-bottom: 1px solid #d1cdcd;
  box-sizing: border-box;
  min-height: 44px;
  padding: 7px 0;
  position: relative;
}

#login .login-field-message {
  border-bottom: 0;
  min-height: 0;
  padding: 0;
}

#login .login-field > input {
  background: transparent;
  box-sizing: border-box;
  font-size: 16px;
  height: 30px;
  opacity: .65;
  padding-right: 96px;
  width: 100%;
}

#login .login-field > .right {
  align-items: center;
  display: flex;
  font-size: 16px;
  height: 100%;
  position: absolute;
  right: 0;
  top: 0;
}

#login .login-field > .right img {
  cursor: pointer;
  width: 75px;
}

#login .login-field > .right .error {
  color: #e5021e;
  display: none;
}

#login .login-otp-panel {
  margin: 0;
  min-width: 0;
  padding: 0;
}

#login .login-turnstile-slot {
  margin: 0;
}

#login .turnstile-error {
  color: #e5021e;
  margin-top: -8px;
}

#login .buttons,
#login .other-info {
  margin: 0;
}

#login .other-info {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: env(safe-area-inset-bottom);
}

@media (max-width: 480px) {
  #login #loginform {
    gap: 20px;
    padding: 24px 0 20px;
  }

  #login .other-channel {
    margin: -24px -20px 0;
    padding: 24px 20px 22px;
  }

  #login .login-section {
    gap: 14px;
  }

  #login .info {
    gap: 13px;
  }

  #login .login-field > input {
    font-size: 16px;
  }

  #login .buttons > div {
    margin-top: 0;
  }
}

@media (max-width: 340px) {
  #login .popup-content.login {
    padding-left: 14px;
    padding-right: 14px;
  }

  #login .other-channel {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  #login .other-info {
    align-items: flex-start;
    flex-direction: column;
  }
}
