.hy-auth-box {
  padding: 24px;
  border: 1px solid rgba(180, 210, 230, .7);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(238,250,255,.92));
  box-shadow: 0 12px 34px rgba(79, 161, 216, .12);
}

.hy-auth-provider-list {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.hy-auth-provider {
  width: 100%;
  min-height: 54px;
  padding: 12px 16px;
  border: 1px solid rgba(77, 180, 244, .35);
  border-radius: 16px;
  background: #fff;
  color: #526073;
  text-align: left;
  cursor: pointer;
}

.hy-auth-provider span {
  display: block;
  font-weight: 800;
}

.hy-auth-provider small {
  color: #94a3b8;
}

.hy-auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4db4f4, #64d8c7);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.hy-auth-link {
  color: #2878d7;
  font-weight: 700;
}

.hy-auth-dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 14px;
}

.hy-auth-dl dt {
  font-weight: 700;
  color: #526073;
}

.hy-auth-dl dd {
  margin: 0;
}

.hy-auth-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(77, 180, 244, .12);
  font-size: .92rem;
}

.hy-auth-status a {
  font-weight: 700;
  color: #2878d7;
}


.hy-auth-email-login {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid rgba(77, 180, 244, .25);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
}

.hy-auth-form {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.hy-auth-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
  color: #526073;
}

.hy-auth-form input[type="email"],
.hy-auth-form input[type="text"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid rgba(82, 96, 115, .25);
  border-radius: 12px;
  background: #fff;
}

.hy-auth-secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(82, 96, 115, .28);
  border-radius: 999px;
  background: #fff;
  color: #526073;
  font-weight: 700;
  cursor: pointer;
}

.hy-auth-inline-form {
  margin-top: 12px;
}

.hy-auth-front-notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.hy-auth-front-notice--success {
  background: #d1e7dd;
  color: #0f5132;
}

.hy-auth-front-notice--error {
  background: #f8d7da;
  color: #842029;
}


.hy-auth-logout-box {
  margin: 20px 0 0;
  padding: 18px;
  border: 1px solid rgba(82, 96, 115, .18);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
}

.hy-auth-logout-box h3 {
  margin-top: 0;
}

.hy-auth-logout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hy-auth-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(82, 96, 115, .28);
  border-radius: 999px;
  background: #fff;
  color: #526073;
  font-weight: 700;
  text-decoration: none;
}

.hy-auth-test-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff3cd;
  color: #664d03;
}


.hy-auth-check {
  display: flex !important;
  grid-template-columns: none !important;
  flex-direction: row;
  gap: 8px !important;
  align-items: center;
  font-weight: 700;
}

.hy-auth-check input[type="checkbox"] {
  width: auto;
  min-height: auto;
}


.hy-auth-oauth-form {
  margin: 0;
}

.hy-auth-connections {
  margin: 20px 0 0;
  padding: 18px;
  border: 1px solid rgba(82, 96, 115, .18);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
}

.hy-auth-connections h3 {
  margin-top: 0;
}

.hy-auth-connection-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.hy-auth-connection-item {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid rgba(82, 96, 115, .16);
  border-radius: 14px;
  background: #fff;
}

.hy-auth-connection-item small {
  display: block;
  color: #6b7280;
}

.hy-auth-connection-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #d1e7dd;
  color: #0f5132;
  font-weight: 700;
}

.hy-auth-connection-disabled {
  color: #6b7280;
  font-weight: 700;
}

.hy-auth-text-button {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: #526073;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
}


.hy-auth-guide-note {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef6ff;
  color: #1f4e79;
  font-weight: 700;
  line-height: 1.6;
}

.hy-auth-guide-note a {
  color: inherit;
  text-decoration: underline;
}




.hy-auth-external-register {
  margin-top: 18px;
}

.hy-auth-oauth-check {
  margin: 8px 0;
  font-size: 13px;
}

.hy-auth-small-note {
  margin-top: 10px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.6;
}


.hy-auth-email-choice {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(82, 96, 115, .16);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
}

.hy-auth-register-consent {
  margin: 12px 0;
}

.hy-auth-oauth-register-form .hy-auth-register-consent {
  padding: 12px;
  border: 1px solid rgba(82, 96, 115, .12);
  border-radius: 12px;
  background: rgba(255,255,255,.75);
}


.hy-auth-register-method-form {
  margin: 0;
}

.hy-auth-register-consent {
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid rgba(82, 96, 115, .14);
  border-radius: 14px;
  background: rgba(255,255,255,.78);
}

.hy-auth-register-method-list .hy-auth-provider {
  text-align: left;
}

.hy-auth-provider--email {
  background: rgba(255,255,255,.95);
}


.hy-auth-connections-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.hy-auth-connections-head h3 {
  margin-bottom: 6px;
}

.hy-auth-connections-head p {
  margin: 0;
  color: #526073;
  line-height: 1.7;
}

.hy-auth-login-method-count {
  min-width: 74px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(82, 210, 190, .16);
  text-align: center;
  font-weight: 800;
}

.hy-auth-login-method-count span {
  display: block;
  font-size: 24px;
  line-height: 1;
}

.hy-auth-login-method-count small {
  color: #526073;
}

.hy-auth-connection-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.hy-auth-connection-note {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: #6b7280;
  font-size: 13px;
  font-weight: 700;
}

.hy-auth-secondary-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(82, 96, 115, .22);
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  font-weight: 800;
  cursor: pointer;
}

.hy-auth-secondary-button:hover {
  opacity: .88;
}

@media (max-width: 640px) {
  .hy-auth-connections-head,
  .hy-auth-connection-item {
    display: block;
  }

  .hy-auth-login-method-count {
    margin-top: 12px;
    width: 74px;
  }

  .hy-auth-connection-action {
    justify-content: flex-start;
    margin-top: 10px;
  }
}


.hy-auth-login-flow .hy-auth-provider--email {
  background: rgba(255,255,255,.95);
}


/* v1.5.2: ログアウト周辺ボタンの高さを揃えます。 */
.hy-auth-logout-actions,
.hy-auth-logout-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hy-auth-logout-actions .hy-auth-button,
.hy-auth-logout-actions .hy-auth-secondary-button,
.hy-auth-logout-actions button,
.hy-auth-logout-actions a,
.hy-auth-logout-buttons .hy-auth-button,
.hy-auth-logout-buttons .hy-auth-secondary-button,
.hy-auth-logout-buttons button,
.hy-auth-logout-buttons a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
}


/* v1.5.5: ログアウトのボタン/リンク高さをさらに揃えます。 */
.hy-auth-logout-actions .hy-auth-secondary-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid rgba(82, 96, 115, .22);
  border-radius: 999px;
  background: #fff;
  line-height: 1.2;
  font-weight: 800;
  text-decoration: none;
}


/* v1.5.7: ヘッダー右上用アカウントメニュー / v1.7.9: メニュー整理 */
.hy-auth-header-account {
  position: relative;
  display: inline-flex;
  align-items: center;
  z-index: 30;
}

.hy-auth-header-account::after {
  content: "";
  position: absolute;
  left: -10px;
  right: -10px;
  top: 100%;
  height: 18px;
}

.hy-auth-header-account__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #4db6ee, #58d2bd);
  color: #fff;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.hy-auth-header-account__menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 172px;
  padding: 8px;
  border: 1px solid rgba(82, 96, 115, .16);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
}

.hy-auth-header-account:hover .hy-auth-header-account__menu,
.hy-auth-header-account:focus-within .hy-auth-header-account__menu {
  display: block;
}

.hy-auth-header-account__menu a,
.hy-auth-header-account__menu button {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #0f172a;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  text-align: left;
}

.hy-auth-header-account__menu a:hover,
.hy-auth-header-account__menu button:hover {
  background: rgba(77, 182, 238, .12);
}


/* v1.5.8: 外部ログイン選択肢のカーソル表示を整理します。 */
.hy-auth-login-method,
.hy-auth-register-method,
.hy-auth-provider-card,
.hy-auth-provider-button,
.hy-auth-oauth-provider,
.hy-auth-oauth-button,
.hy-auth-method-card,
.hy-auth-method-button,
.hy-auth-login-options a,
.hy-auth-register-options a,
.hy-auth-login-options button,
.hy-auth-register-options button {
  cursor: pointer;
}

.hy-auth-login-method[aria-disabled="true"],
.hy-auth-register-method[aria-disabled="true"],
.hy-auth-provider-card[aria-disabled="true"],
.hy-auth-provider-button[aria-disabled="true"],
.hy-auth-oauth-provider[aria-disabled="true"],
.hy-auth-oauth-button[aria-disabled="true"],
.hy-auth-method-card[aria-disabled="true"],
.hy-auth-method-button[aria-disabled="true"],
.hy-auth-login-method.is-disabled,
.hy-auth-register-method.is-disabled,
.hy-auth-provider-card.is-disabled,
.hy-auth-provider-button.is-disabled,
.hy-auth-oauth-provider.is-disabled,
.hy-auth-oauth-button.is-disabled,
.hy-auth-method-card.is-disabled,
.hy-auth-method-button.is-disabled {
  cursor: default;
}

.hy-auth-login-method:disabled,
.hy-auth-register-method:disabled,
.hy-auth-provider-card:disabled,
.hy-auth-provider-button:disabled,
.hy-auth-oauth-provider:disabled,
.hy-auth-oauth-button:disabled,
.hy-auth-method-card:disabled,
.hy-auth-method-button:disabled {
  cursor: default;
}

.hy-auth-login-method[href],
.hy-auth-register-method[href],
.hy-auth-provider-card[href],
.hy-auth-provider-button[href],
.hy-auth-oauth-provider[href],
.hy-auth-oauth-button[href],
.hy-auth-method-card[href],
.hy-auth-method-button[href] {
  cursor: pointer;
}


/* v1.6.1: 有効なログイン項目と準備中項目のカーソルを明確に分けます。 */
.hy-auth-provider,
.hy-auth-provider:not(:disabled),
.hy-auth-oauth-form .hy-auth-provider,
a.hy-auth-provider,
button.hy-auth-provider:not(:disabled) {
  cursor: pointer;
}

.hy-auth-provider:disabled,
button.hy-auth-provider:disabled,
.hy-auth-provider[disabled],
.hy-auth-provider[aria-disabled="true"] {
  cursor: default !important;
}


/* v1.6.2: 退会導線 */
.hy-auth-withdraw-box {
  margin: 20px 0 0;
  padding: 18px;
  border: 1px solid rgba(132, 32, 41, .24);
  border-radius: 16px;
  background: rgba(255, 255, 255, .82);
}

.hy-auth-withdraw-box h3 {
  margin-top: 0;
  color: #842029;
}

.hy-auth-withdraw-box p {
  color: #526073;
  line-height: 1.8;
}

.hy-auth-withdraw-details {
  margin-top: 12px;
}

.hy-auth-withdraw-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(132, 32, 41, .28);
  border-radius: 999px;
  background: #fff;
  color: #842029;
  font-weight: 700;
  cursor: pointer;
}

.hy-auth-withdraw-form {
  margin-top: 16px;
}

.hy-auth-danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(132, 32, 41, .42);
  border-radius: 999px;
  background: #842029;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}


/* v1.6.3: 退会タイミング選択 */
.hy-auth-withdraw-mode {
  display: grid;
  gap: 8px;
  margin: 10px 0;
  padding: 12px;
  border: 1px solid rgba(82, 96, 115, .18);
  border-radius: 12px;
}

.hy-auth-withdraw-mode legend {
  padding: 0 6px;
  font-weight: 700;
  color: #526073;
}


/* v1.7.1: ログイン連携内のメール登録フォーム */
.hy-auth-email-link-details {
  display: inline-block;
}

.hy-auth-email-link-details summary {
  list-style: none;
  cursor: pointer;
}

.hy-auth-email-link-details summary::-webkit-details-marker {
  display: none;
}

.hy-auth-email-link-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.hy-auth-email-link-form input[type="email"],
.hy-auth-email-link-form input[type="text"] {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(82, 96, 115, .28);
  border-radius: 10px;
}

/* v1.8.0: ログイン連携画面の表示文言とボタン幅を整えます。 */
.hy-auth-login-method-count small {
  display: block;
  margin-top: 4px;
  color: #0f5132;
  font-weight: 800;
  line-height: 1.2;
}

.hy-auth-connection-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  align-items: center;
}

.hy-auth-connection-action {
  width: 184px;
  justify-content: center;
}

.hy-auth-connection-action .hy-auth-secondary-button,
.hy-auth-connection-action .hy-auth-connection-badge,
.hy-auth-connection-action .hy-auth-connection-disabled,
.hy-auth-connection-action .hy-auth-text-button,
.hy-auth-connection-action .hy-auth-email-link-details > summary {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  justify-content: center;
  text-align: center;
  margin-left: 0;
}

.hy-auth-connection-action .hy-auth-email-link-details {
  width: 100%;
}

.hy-auth-connection-action .hy-auth-inline-form {
  width: 100%;
}

.hy-auth-connection-action .hy-auth-inline-form .hy-auth-text-button {
  width: auto;
  min-width: 72px;
}

@media (max-width: 640px) {
  .hy-auth-connection-item {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hy-auth-login-method-count {
    width: 90px;
  }

  .hy-auth-connection-action {
    width: 100%;
    max-width: 210px;
    justify-content: flex-start;
  }
}


.hy-auth-session-box {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid rgba(120, 170, 210, 0.35);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
}

.hy-auth-session-box h3 {
    margin-top: 0;
}
