/* Login gate: a quiet "또는" divider, then provider buttons as wide as the code-login row above. */
.social-login { margin-top: 22px; }
.social-divider { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: #8a8fa8; font-size: 13px; font-weight: 700; }
.social-divider::before, .social-divider::after { content: ''; flex: 1; height: 1px; background: #ddd6c4; }
:is(#studentAuthBox, #teacherAuthBox) .social-login .social-buttons:has(.social-brand) { max-width: none; gap: 10px; }
:is(#studentAuthBox, #teacherAuthBox) .social-login .social-brand { min-height: 46px; }
:is(#studentAuthBox, #teacherAuthBox) .social-login .social-note { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; text-align: center; }
:is(#studentAuthBox, #teacherAuthBox) .social-login .social-status:empty { min-height: 0; margin: 0; }
:is(#studentAuthBox, #teacherAuthBox) .social-login .social-buttons:has(.social-brand) { flex-direction: row; }
:is(#studentAuthBox, #teacherAuthBox) .social-login .social-brand { flex: 1; width: auto; }
.social-login[hidden], .social-login [hidden], .social-modal [hidden], #socialAccountBtn[hidden] { display: none !important; }
/* 등록한 주소가 아닌 곳(PR 미리보기, workers.dev)에서는 단추 대신 이 안내만 보입니다. */
.social-login .social-elsewhere { margin: 0; text-align: center; font-size: 13px; line-height: 1.6; }
.social-heading { margin: 0 0 .5rem; font-weight: 800; }
.social-note { margin: .5rem 0 1rem; color: var(--muted, #56635b); font-size: .875rem; line-height: 1.65; }
.social-buttons { display: flex; flex-wrap: wrap; gap: .5rem; }
.social-status { min-height: 1.5em; margin: .75rem 0 .25rem; line-height: 1.65; font-size: .9rem; }
.social-status[data-tone="error"] { color: #a12c20; }

/* Provider buttons use each provider's own colours and logo, outside the app's sketch theme. */
.social-buttons:has(.social-brand) { flex-direction: column; align-items: stretch; max-width: 360px; }
body .social-brand { display: flex; align-items: center; justify-content: center; gap: 10px; box-sizing: border-box; width: 100%; min-height: 44px; margin: 0; padding: 0 16px; border: 1px solid transparent; border-radius: 6px; box-shadow: none; transform: none; font: 600 15px/1.2 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; letter-spacing: 0; text-decoration: none; cursor: pointer; transition: filter .15s; }
body .social-brand:not(:disabled):hover { filter: brightness(.96); }
body .social-brand:disabled { cursor: not-allowed; opacity: .45; }
body .social-brand:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }
.social-brand__logo { display: inline-flex; flex: none; width: 18px; height: 18px; }
.social-brand__logo svg { display: block; width: 100%; height: 100%; }
body .social-brand--naver { background: #03c75a; color: #fff; }
body .social-brand--naver .social-brand__logo { width: 14px; height: 14px; }
body .social-brand--kakao { background: #fee500; color: rgba(0, 0, 0, .85); border-radius: 12px; }
body .social-brand--google { background: #fff; color: #1f1f1f; border-color: #747775; border-radius: 4px; font-weight: 500; }

/* Header button: stands out next to the green install button, same hand-drawn outline as its neighbours. */
body.curriculum-app .app-utilities .social-account-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 13px;
  font: inherit; font-size: calc(13px * var(--reading-scale, 1)); font-weight: 800; color: #fff;
  background: #6a58d6; border: 2px solid #3a3f62; border-radius: 15px 225px 15px 255px / 255px 15px 225px 15px; cursor: pointer;
}
body.curriculum-app .app-utilities .social-account-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.curriculum-app .app-utilities .social-account-btn:hover { background: #5847c4; box-shadow: 2px 3px 0 #3a3f62; }
body.curriculum-app .app-utilities .social-account-btn:focus-visible { outline: 3px dashed #7d6bc7; outline-offset: 3px; }

/* 간편 로그인 관리 창: a plain dialog that does not use the app's .btn or .modal-panel styles. */
#socialAccountModal .social-panel {
  box-sizing: border-box; width: min(440px, 100%); max-height: calc(100dvh - 2rem); overflow-y: auto;
  color: #1f2a44; background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  animation: social-pop .22s cubic-bezier(.2, .75, .25, 1) both;
}
@keyframes social-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #socialAccountModal .social-panel { animation: none; } }
#socialAccountModal .social-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 4px; }
#socialAccountModal .social-head strong { display: block; font-size: 19px; font-weight: 800; line-height: 1.3; }
#socialAccountModal .social-lead { margin: 4px 0 0; color: #5b6478; font-size: 14px; line-height: 1.5; }
#socialAccountModal .social-close { display: grid; place-items: center; flex: none; width: 36px; height: 36px; margin: -6px -8px 0 0; padding: 0; color: #5b6478; background: transparent; border: 0; border-radius: 50%; cursor: pointer; }
#socialAccountModal .social-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
#socialAccountModal .social-close:hover { color: #1f2a44; background: #f1f3f7; }
#socialAccountModal .social-body { padding: 4px 22px 22px; }
#socialAccountModal .social-section-title { margin: 18px 0 8px; color: #8a93a6; font-size: 12.5px; font-weight: 700; letter-spacing: .02em; }
#socialAccountModal .social-links { display: grid; gap: 8px; }
#socialAccountModal .social-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px 11px 14px; background: #f8f9fb; border: 1px solid #e6e9ef; border-radius: 12px; }
#socialAccountModal .social-link__badge { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; }
#socialAccountModal .social-link__badge svg { width: 16px; height: 16px; }
#socialAccountModal .social-link__badge.social-brand--naver svg { width: 13px; height: 13px; }
#socialAccountModal .social-link__badge.social-brand--google { border: 1px solid #dadce0; }
#socialAccountModal .social-link__badge.social-brand--other { background: #e6e9ef; }
#socialAccountModal .social-link__text { display: grid; flex: 1; min-width: 0; gap: 1px; }
#socialAccountModal .social-link__text strong { font-size: 15px; font-weight: 700; }
#socialAccountModal .social-link__text span { color: #6b7385; font-size: 12.5px; }
#socialAccountModal .social-empty { margin: 0; padding: 14px; color: #8a93a6; font-size: 14px; text-align: center; border: 1px dashed #dde1e8; border-radius: 12px; }
#socialAccountModal .social-reauth { margin: 0 0 10px; padding: 10px 12px; color: #44506a; font-size: 13px; line-height: 1.6; text-align: center; background: #f3f6fb; border-radius: 10px; }
#socialAccountModal .social-link-buttons { flex-direction: column; align-items: center; max-width: none; gap: 8px; }
#socialAccountModal .social-link-buttons .social-brand { width: min(100%, 320px); }
#socialAccountModal .social-plain {
  display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 34px; padding: 0 14px;
  font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1; color: #3b4256; background: #fff; border: 1px solid #d5d9e2; border-radius: 8px; box-shadow: none; cursor: pointer;
}
#socialAccountModal .social-plain:not(:disabled):hover { background: #f4f6f9; border-color: #c3c9d5; }
#socialAccountModal .social-plain:disabled { cursor: not-allowed; opacity: .5; }
#socialAccountModal .social-plain--danger { color: #fff; background: #d93025; border-color: #d93025; }
#socialAccountModal .social-plain--danger:not(:disabled):hover { background: #b3261e; border-color: #b3261e; }
#socialAccountModal :is(.social-plain, .social-close):focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; }
#socialAccountModal .social-confirmation { margin-top: 14px; padding: 14px 16px; color: #5a2a24; background: #fff5f4; border: 1px solid #f3c2bd; border-radius: 12px; }
#socialAccountModal .social-confirmation strong { font-size: 15px; }
#socialAccountModal .social-confirmation p { margin: 6px 0 12px; font-size: 13.5px; line-height: 1.6; }
#socialAccountModal .social-confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
#socialAccountModal .social-status { margin: 12px 0 0; color: #5b6478; font-size: 13.5px; text-align: center; }
#socialAccountModal .social-status:empty { min-height: 0; margin: 0; }
#socialAccountModal .social-status[data-tone="error"] { color: #b3261e; }
#socialAccountModal [data-social-cancel] { margin: 8px auto 0; display: flex; }

@media (max-width: 520px) {
  .social-login .social-buttons { flex-direction: column; }
  /* Side by side would wrap each label onto two lines on a phone. */
  :is(#studentAuthBox, #teacherAuthBox) .social-login .social-buttons:has(.social-brand) { flex-direction: column; }
  :is(#studentAuthBox, #teacherAuthBox) .social-login .social-brand { flex: none; width: 100%; }
  .social-buttons:has(.social-brand) { max-width: none; }
  #socialAccountModal .social-head { padding: 18px 18px 4px; }
  #socialAccountModal .social-body { padding: 4px 18px 18px; }
}
