/* 사주언니: 로그인·가입·계정 안내 공통 화면 */
body.login-portal-page {
  background: #f5f1eb;
  color: #35282d;
}

#app.auth-portal-shell {
  --auth-wine: #58343e;
  --auth-ink: #35282d;
  --auth-muted: #6d6265;
  --auth-line: #dfd6ce;
  --auth-paper: #fff;
  --auth-canvas: #f5f1eb;
  --auth-space: 8px;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--auth-canvas);
  color: var(--auth-ink);
  box-shadow: none;
}

#app.auth-portal-shell #content.auth-portal-content {
  display: block;
  width: 100%;
  max-width: none;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#app.auth-portal-shell .auth-entry {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1088px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 32px 24px 24px;
  gap: 0;
  border: 0;
  border-radius: 0;
  color: var(--auth-ink);
  background: transparent;
  box-shadow: none;
  text-align: left;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

#app.auth-portal-shell .auth-entry,
#app.auth-portal-shell .auth-entry * { box-sizing: border-box; }

#app.auth-portal-shell .auth-entry [hidden] { display: none !important; }

#app.auth-portal-shell .auth-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  min-height: 48px;
  margin-bottom: 40px;
  gap: 16px;
}

#app.auth-portal-shell .auth-entry-top > a:first-child,
#app.auth-portal-shell .auth-entry-top .auth-entry-brand,
#app.auth-portal-shell .auth-entry-top .login-portal-brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  max-width: 100%;
  color: var(--auth-wine);
  text-decoration: none;
}

#app.auth-portal-shell .auth-entry-top > a:first-child img,
#app.auth-portal-shell .auth-entry-brand img,
#app.auth-portal-shell .auth-entry-top .login-portal-brand img {
  display: block;
  width: 144px;
  max-width: 100%;
  height: 42px;
  object-fit: contain;
}

#app.auth-portal-shell .auth-entry-top > a:last-child:not(:first-child),
#app.auth-portal-shell .auth-entry-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 0 4px 12px;
  border: 0;
  border-radius: 4px;
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
}

#app.auth-portal-shell .auth-entry-home svg { width: 16px; height: 16px; flex: none; }

#app.auth-portal-shell .auth-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  align-items: start;
  width: 100%;
  min-width: 0;
  gap: 56px;
}

#app.auth-portal-shell .auth-entry-story {
  display: flex;
  flex-direction: column;
  position: relative;
  min-width: 0;
  min-height: 488px;
  padding: 36px 32px 24px;
  border: 1px solid #e3d8ce;
  border-radius: 100px 12px 12px 12px;
  background: #eee5dc;
  color: var(--auth-ink);
}

#app.auth-portal-shell .auth-entry-eyebrow {
  margin: 0 0 16px;
  color: var(--auth-wine);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.6;
}

#app.auth-portal-shell .auth-entry-story h2 {
  max-width: 340px;
  margin: 0;
  color: var(--auth-wine);
  font-size: clamp(28px, 2.7vw, 34px);
  font-weight: 750;
  line-height: 1.45;
  letter-spacing: -.045em;
}

#app.auth-portal-shell .auth-entry-story-copy {
  max-width: 340px;
  margin: 16px 0 0;
  color: #65555a;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: -.025em;
}

#app.auth-portal-shell :is(.auth-entry-art, .auth-entry-story-art) {
  display: block;
  flex: none;
  width: 100%;
  max-width: 320px;
  height: auto;
  max-height: 232px;
  margin: auto auto 0;
  padding-top: 24px;
  object-fit: contain;
}

#app.auth-portal-shell .auth-entry-main {
  width: 100%;
  max-width: 460px;
  min-width: 0;
  margin: 0;
  padding: 32px;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background: var(--auth-paper);
  color: var(--auth-ink);
  box-shadow: none;
}

#app.auth-portal-shell .auth-entry :is(.auth-entry-title, .auth-title, .login-portal-heading) {
  display: block;
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip-path: none;
  border: 0;
  color: var(--auth-ink);
  font-size: 27px;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: -.045em;
  white-space: normal;
  text-align: left;
}

#app.auth-portal-shell .auth-entry :is(.auth-entry-description, .login-portal-intro) {
  max-width: none;
  margin: 12px 0 24px;
  color: var(--auth-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: -.02em;
  text-align: left;
}

#app.auth-portal-shell .auth-entry :is(.auth-entry-card, .auth-card) {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--auth-ink);
  box-shadow: none;
}

#app.auth-portal-shell .auth-entry .auth-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 16px;
  text-align: left;
}

#app.auth-portal-shell .auth-entry .auth-form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
  gap: 16px;
}

#app.auth-portal-shell .auth-entry .auth-form .field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  gap: 8px;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}

#app.auth-portal-shell .auth-entry .auth-form input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #d8cfc8;
  border-radius: 8px;
  background: #fff;
  color: var(--auth-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -.01em;
  box-shadow: none;
}

#app.auth-portal-shell .auth-entry .auth-form input::placeholder { color: #84787b; opacity: 0; }
#app.auth-portal-shell .auth-entry .auth-form input:disabled { background: #f6f2ed; color: #74676b; }
#app.auth-portal-shell .auth-entry .auth-password-field { display: flex; position: relative; width: 100%; min-width: 0; }
#app.auth-portal-shell .auth-entry .auth-password-field input { padding-right: 72px; }

#app.auth-portal-shell .auth-entry .auth-password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  min-width: 52px;
  min-height: 36px;
  padding: 4px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--auth-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
}

#app.auth-portal-shell .auth-entry .auth-password-toggle:hover { color: var(--auth-wine); background: #f5f1eb; }

#app.auth-portal-shell .auth-entry .fineprint {
  margin: 0;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: -.015em;
}

#app.auth-portal-shell .auth-entry .auth-field-hint {
  display: block;
  margin: 0;
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -.015em;
}

#app.auth-portal-shell .auth-entry .auth-entry-note {
  margin: 0;
  color: var(--auth-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: -.02em;
}

#app.auth-portal-shell .auth-entry .auth-entry-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 0;
  gap: 0 8px;
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
}

#app.auth-portal-shell .auth-entry .auth-entry-links .auth-link { color: var(--auth-wine); font-weight: 650; }

#app.auth-portal-shell .auth-entry :is(.btn, .login-portal-open) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 11px 16px;
  gap: 8px;
  border: 1px solid var(--auth-wine);
  border-radius: 8px;
  background: var(--auth-wine);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: -.02em;
  box-shadow: none;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}

#app.auth-portal-shell .auth-entry :is(.btn.primary, .login-portal-open):hover:not(:disabled) { background: #462630; border-color: #462630; }
#app.auth-portal-shell .auth-entry .btn.ghost { border-color: var(--auth-line); background: #fff; color: var(--auth-wine); }
#app.auth-portal-shell .auth-entry .btn.ghost:hover:not(:disabled) { background: #f7f3ee; border-color: #cbb9b4; }
#app.auth-portal-shell .auth-entry .btn.kakao { border-color: #fee500; background: #fee500; color: #191919; }
#app.auth-portal-shell .auth-entry .btn.kakao:hover:not(:disabled) { border-color: #f3da00; background: #f3da00; }
#app.auth-portal-shell .auth-entry .btn svg { width: 18px; height: 18px; flex: none; }
#app.auth-portal-shell .auth-entry .btn:disabled { opacity: .65; cursor: default; }

#app.auth-portal-shell .auth-entry :is(.err, .auth-success, .login-portal-notice),
#app.auth-portal-shell .auth-entry .auth-form > [role="status"] {
  margin: 0;
  padding: 12px;
  border: 1px solid #dfd4cd;
  border-radius: 8px;
  background: #f6f2ed;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.8;
  letter-spacing: -.015em;
  text-align: left;
  white-space: pre-line;
}

#app.auth-portal-shell .auth-entry .err { border-color: #e7bfc1; background: #fff4f3; color: #87333b; }
#app.auth-portal-shell .auth-entry .auth-success { border-color: #cbd7cb; background: #f2f6f1; color: #315a3b; }
#app.auth-portal-shell .auth-entry :is(.err, .auth-success, .login-portal-notice):empty { display: none; }
#app.auth-portal-shell .auth-entry .auth-resend { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--auth-line); }
#app.auth-portal-shell .auth-entry .auth-resend h2 { margin: 0; color: var(--auth-ink); font-size: 17px; font-weight: 700; line-height: 1.6; }
#app.auth-portal-shell .auth-entry .auth-card > p:not([class]) { margin: 0; color: var(--auth-muted); font-size: 15px; line-height: 1.8; }

#app.auth-portal-shell .login-portal-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  gap: 0;
}

#app.auth-portal-shell .login-portal-social {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  width: 100%;
  max-width: 296px;
  min-width: 0;
  margin: 0 auto;
  gap: 8px;
}

#app.auth-portal-shell .login-portal-social-item { display: flex; flex-direction: column; align-items: center; min-width: 0; gap: 4px; }

#app.auth-portal-shell .login-portal-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  min-height: 48px;
  margin: 0 0 4px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  background: #fee500;
  color: #191919;
  box-shadow: none;
  cursor: pointer;
}

#app.auth-portal-shell .login-portal-provider :is(svg, img) { display: block; width: 24px; height: 24px; object-fit: contain; }
#app.auth-portal-shell .login-portal-provider[data-provider="naver"] { background: #03c75a; color: #fff; }
#app.auth-portal-shell .login-portal-provider[data-provider="google"] { background: #fff; border-color: #dedbd7; color: #4285f4; }
#app.auth-portal-shell .login-portal-provider[data-provider="apple"] { background: #171717; color: #fff; }
#app.auth-portal-shell .login-portal-provider:disabled { opacity: .7; cursor: default; }
#app.auth-portal-shell .login-portal-provider-name { color: var(--auth-ink); font-size: 13px; font-weight: 600; line-height: 1.5; }
#app.auth-portal-shell .login-portal-provider-status { min-height: 18px; color: #796d70; font-size: 12px; font-weight: 400; line-height: 1.5; }
#app.auth-portal-shell .login-portal-social-label { margin: 0 0 16px; color: var(--auth-muted); font-size: 14px; line-height: 1.6; text-align: center; }

#app.auth-portal-shell :is(.login-portal-divider, .auth-or) {
  display: flex;
  align-items: center;
  width: 100%;
  margin: 24px 0;
  gap: 16px;
  color: #817378;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

#app.auth-portal-shell :is(.login-portal-divider, .auth-or)::before,
#app.auth-portal-shell :is(.login-portal-divider, .auth-or)::after { content: ""; height: 1px; flex: 1; background: #e6ded7; }
#app.auth-portal-shell .auth-entry-card > .auth-or { margin: 8px 0 0; }
#app.auth-portal-shell .login-portal-fields { width: 100%; min-width: 0; text-align: left; }

#app.auth-portal-shell .auth-entry :is(.auth-link, .login-portal-back) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--auth-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

#app.auth-portal-shell .auth-entry :is(.auth-link, .login-portal-back, .auth-entry-home):hover { color: var(--auth-wine); text-decoration: underline; text-underline-offset: 4px; }
#app.auth-portal-shell .login-portal-back { align-self: center; margin-top: -8px; }
#app.auth-portal-shell .login-portal-signup { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; margin: 16px 0 0; gap: 0 8px; color: var(--auth-muted); font-size: 14px; line-height: 1.7; }
#app.auth-portal-shell .login-portal-signup .auth-link { color: var(--auth-wine); font-weight: 700; }
#app.auth-portal-shell .login-portal-support { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 16px; min-width: 0; margin: 0; }
#app.auth-portal-shell .auth-entry-card > .auth-link { align-self: center; }

#app.auth-portal-shell :is(.auth-entry-copyright, .login-portal-copyright) {
  margin: 28px 0 0;
  padding: 0;
  color: #786b6f;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .01em;
  text-align: center;
}

#app.auth-portal-shell .auth-entry > .auth-entry-copyright { margin-top: auto; padding-top: 32px; }
#app.auth-portal-shell .auth-entry-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: auto 0 0;
  padding-top: 24px;
  gap: 0 20px;
}
#app.auth-portal-shell .auth-entry-legal a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 4px 0;
  border-radius: 4px;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.6;
  text-decoration: none;
}
#app.auth-portal-shell .auth-entry-legal a:hover { color: var(--auth-wine); text-decoration: underline; text-underline-offset: 4px; }
#app.auth-portal-shell .auth-entry-legal + .auth-entry-copyright { margin-top: 4px; padding-top: 0; }
#app.auth-portal-shell .auth-entry :is(a, button, input):focus-visible { outline: 2px solid #835361; outline-offset: 3px; }
#app.auth-portal-shell .auth-entry input:focus-visible { border-color: #835361; outline-offset: 2px; }
#app.auth-portal-shell .auth-entry .err:focus { outline: 2px solid #87333b; outline-offset: 2px; }

/* 계정 동의·연령 확인도 같은 입력 패널 안에서 이어집니다. */
#app.auth-portal-shell .auth-entry :is(.account-screen, .member-login-screen) {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 20px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--auth-ink);
  box-shadow: none;
  text-align: left;
}

#app.auth-portal-shell .auth-entry :is(.account-screen, .member-login-screen) > .auth-brand { display: none; }
#app.auth-portal-shell .auth-entry .account-screen > :where(.account-card, .card.soft):not(.account-state) {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--auth-ink);
  box-shadow: none;
}

#app.auth-portal-shell .auth-entry .account-screen h2 {
  margin: 0;
  color: var(--auth-ink);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -.025em;
}

#app.auth-portal-shell .auth-entry .account-screen p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: -.015em;
}

#app.auth-portal-shell .auth-entry .account-screen .err { color: #87333b; }
#app.auth-portal-shell .auth-entry .account-screen .account-state {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  padding: 16px;
  gap: 8px;
  border: 1px solid #e5dcd4;
  border-radius: 8px;
  background: #f8f5f0;
  color: var(--auth-ink);
}

#app.auth-portal-shell .auth-entry .account-screen .account-state h2 { font-size: 17px; }
#app.auth-portal-shell .auth-entry .account-screen .account-loading {
  display: flex;
  flex-direction: row;
  align-items: center;
  min-height: 64px;
  gap: 12px;
}

#app.auth-portal-shell .auth-entry .account-loading::before {
  content: "";
  display: block;
  flex: none;
  width: 18px;
  height: 18px;
  border: 2px solid #dfd3ce;
  border-top-color: var(--auth-wine);
  border-radius: 50%;
  animation: account-loading-spin 850ms linear infinite;
}

@keyframes account-loading-spin { to { transform: rotate(360deg); } }

#app.auth-portal-shell .auth-entry .account-form {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  gap: 12px;
  text-align: left;
}

#app.auth-portal-shell .auth-entry .account-policy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-width: 0;
  margin: 0;
  padding: 16px 0;
  gap: 8px 12px;
  border: 0;
  border-bottom: 1px solid #e8e0d9;
  text-align: left;
}

#app.auth-portal-shell .auth-entry .account-policy-title {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: baseline;
  min-width: 0;
  gap: 4px 8px;
}

#app.auth-portal-shell .auth-entry .account-policy-title strong {
  color: var(--auth-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.6;
  letter-spacing: -.02em;
}

#app.auth-portal-shell .auth-entry .account-policy-title .fineprint { font-size: 12px; line-height: 1.6; }
#app.auth-portal-shell .auth-entry .account-policy-badge {
  display: inline-flex;
  align-items: center;
  flex: none;
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--auth-wine);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

#app.auth-portal-shell .auth-entry .account-policy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: -5px 0 0;
  padding: 6px 0 6px 8px;
  border-radius: 4px;
  color: var(--auth-wine);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  text-decoration: underline;
  text-underline-offset: 4px;
  white-space: nowrap;
}

#app.auth-portal-shell .auth-entry .account-policy-link:hover { color: #42232d; }
#app.auth-portal-shell .auth-entry .account-policy-link svg { display: block; flex: none; width: 16px; height: 16px; }
#app.auth-portal-shell .auth-entry .account-check {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px 0;
  gap: 10px;
  color: var(--auth-ink);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -.015em;
  text-align: left;
  cursor: pointer;
}

#app.auth-portal-shell .auth-entry .account-policy-row > .account-check { grid-column: 1 / -1; padding-bottom: 0; }
#app.auth-portal-shell .auth-entry .account-check input:is([type="checkbox"], [type="radio"]) {
  display: block;
  flex: none;
  appearance: auto;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 2px 0 0;
  padding: 0;
  border-radius: 4px;
  accent-color: var(--auth-wine);
  cursor: pointer;
}

#app.auth-portal-shell .auth-entry .account-check input:disabled { cursor: default; }
#app.auth-portal-shell .auth-entry .account-form > .account-check:has(input[type="radio"]) {
  padding: 12px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #fff;
}

#app.auth-portal-shell .auth-entry .account-form > .account-check:has(input[type="radio"]:checked) {
  border-color: #936c77;
  background: #faf5f3;
}

#app.auth-portal-shell .auth-entry .account-consent-list {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid #dfd6ce;
  border-radius: 10px;
  background: #faf8f4;
}

#app.auth-portal-shell .auth-entry .account-consent-list > .account-policy-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 72px;
  padding: 11px 12px;
  gap: 0 8px;
  border-bottom: 1px solid #e6ddd5;
}

#app.auth-portal-shell .auth-entry .account-consent-list > .account-policy-row:first-child { border-radius: 9px 9px 0 0; }
#app.auth-portal-shell .auth-entry .account-consent-list > .account-policy-row:last-child { border-bottom: 0; border-radius: 0 0 9px 9px; }
#app.auth-portal-shell .auth-entry .account-consent-list > .account-policy-row:only-child { border-radius: 9px; }
#app.auth-portal-shell .auth-entry .account-consent-list > .account-policy-row:has(input:checked) { background: #f2e7df; }
#app.auth-portal-shell .auth-entry .account-consent-list > .account-policy-row > .account-policy-check {
  grid-column: auto;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 0;
  gap: 10px;
}

#app.auth-portal-shell .auth-entry .account-policy-check > input[type="checkbox"] { margin-top: 0; }
#app.auth-portal-shell .auth-entry .account-policy-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  min-width: 0;
  gap: 2px 6px;
  color: var(--auth-ink);
}

#app.auth-portal-shell .auth-entry .account-policy-label strong {
  min-width: 0;
  color: var(--auth-ink);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.6;
  letter-spacing: -.025em;
}

#app.auth-portal-shell .auth-entry .account-consent-list .account-policy-link {
  align-self: stretch;
  min-height: 44px;
  margin: 0;
  padding: 4px 0 4px 4px;
  gap: 2px;
  font-size: 13px;
  text-decoration: none;
}

#app.auth-portal-shell .auth-entry .account-consent-list .account-policy-link:hover { text-decoration: underline; }
#app.auth-portal-shell .auth-entry .account-policy-row.is-guardian {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-height: 0;
  padding: 4px 0 0;
  gap: 8px;
  border: 0;
  background: transparent;
}

#app.auth-portal-shell .auth-entry .account-policy-copy { min-width: 0; }
#app.auth-portal-shell .auth-entry .account-policy-row.is-guardian .account-policy-title strong { font-size: 14px; }
#app.auth-portal-shell .auth-entry .account-policy-row.is-guardian .account-policy-badge { display: none; }
#app.auth-portal-shell .auth-entry .account-policy-row.is-guardian .account-policy-description {
  margin: 4px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.75;
}

#app.auth-portal-shell .auth-entry .account-policy-row.is-guardian .account-policy-link {
  min-height: 40px;
  margin: -6px 0 0;
  padding: 4px 0 4px 4px;
  gap: 2px;
  text-decoration: none;
}

#app.auth-portal-shell .auth-entry .account-consent-form { gap: 12px; }
#app.auth-portal-shell .auth-entry .account-consent-form > .btn.primary { min-height: 48px; margin-top: 4px; }

#app.auth-portal-shell .auth-entry .account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  margin: 0;
  padding-top: 20px;
  gap: 10px;
  border-top: 1px solid var(--auth-line);
}

#app.auth-portal-shell .auth-entry .account-actions > .btn {
  grid-column: 1 / -1;
  min-height: 44px;
  padding: 9px 12px;
  font-size: 14px;
}

#app.auth-portal-shell .auth-entry .account-actions > :is(.account-logout, .account-withdraw) { grid-column: auto; }
#app.auth-portal-shell .auth-entry .account-actions > .account-withdraw { color: var(--auth-muted); }
#app.auth-portal-shell .auth-entry .account-screen > .account-card[aria-label="고객 문의"] {
  padding-top: 20px;
  gap: 8px;
  border-top: 1px solid var(--auth-line);
}

#app.auth-portal-shell .auth-entry .account-screen > .account-card[aria-label="고객 문의"] h2 { font-size: 16px; }
#app.auth-portal-shell .auth-entry .account-support-link {
  justify-content: flex-start;
  min-height: 44px;
  padding: 9px 12px;
  font-size: 14px;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: normal;
}

#app.auth-portal-shell .auth-entry .member-login-screen .login-signup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  gap: 0 8px;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.7;
}

#app.auth-portal-shell .auth-entry .member-login-screen .login-support-links {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 0 8px;
}

#app.auth-portal-shell .auth-entry .member-login-screen .login-link-divider { color: #c9bdb6; }
#app.auth-portal-shell .auth-entry .member-login-screen .member-session-notice:empty { display: none; }
#app.auth-portal-shell .auth-entry .member-login-screen .member-session-notice {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#app.auth-portal-shell .auth-entry .member-login-screen .auth-after-post {
  display: flex;
  flex-direction: column;
  margin: 0;
  gap: 12px;
}

#app.auth-portal-shell .auth-entry .member-login-screen .auth-after-post p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.85;
}

/* 탈퇴 확인 창은 계정 화면에서만 열리는 기존 창에 적용합니다. */
body.login-portal-page > dialog.account-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 24px;
  border: 1px solid #dfd6ce;
  border-radius: 12px;
  background: #fff;
  color: #35282d;
  box-shadow: 0 16px 48px rgb(53 40 45 / .14);
  overflow-y: auto;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body.login-portal-page > dialog.account-dialog::backdrop { background: rgb(43 31 36 / .48); }
body.login-portal-page > dialog.account-dialog form { display: flex; flex-direction: column; margin: 0; gap: 16px; }
body.login-portal-page > dialog.account-dialog h2 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.5; }
body.login-portal-page > dialog.account-dialog p { margin: 0; color: #6d6265; font-size: 14px; line-height: 1.85; }
body.login-portal-page > dialog.account-dialog label { display: flex; flex-direction: column; gap: 8px; font-size: 14px; line-height: 1.6; }
body.login-portal-page > dialog.account-dialog input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 11px 12px;
  border: 1px solid #d8cfc8;
  border-radius: 8px;
  background: #fff;
  color: #35282d;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
}

body.login-portal-page > dialog.account-dialog .err {
  padding: 12px;
  border: 1px solid #e7bfc1;
  border-radius: 8px;
  background: #fff4f3;
  color: #87333b;
  white-space: pre-line;
}

body.login-portal-page > dialog.account-dialog .account-dialog-actions { display: flex; gap: 10px; }
body.login-portal-page > dialog.account-dialog .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #58343e;
  border-radius: 8px;
  background: #58343e;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.6;
  cursor: pointer;
}

body.login-portal-page > dialog.account-dialog .btn.ghost { border-color: #dfd6ce; background: #fff; color: #58343e; }
body.login-portal-page > dialog.account-dialog .btn:disabled { opacity: .65; cursor: default; }
body.login-portal-page > dialog.account-dialog :is(button, input):focus-visible { outline: 2px solid #835361; outline-offset: 3px; }

@media (max-width: 940px) {
  #app.auth-portal-shell .auth-entry-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 430px); gap: 32px; }
  #app.auth-portal-shell .auth-entry-story { padding: 32px 24px 24px; border-top-left-radius: 80px; }
  #app.auth-portal-shell .auth-entry-story h2 { font-size: 28px; }
  #app.auth-portal-shell .auth-entry-main { padding: 28px; }
}

@media (max-width: 720px) {
  #app.auth-portal-shell .auth-entry .auth-form .auth-field-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  #app.auth-portal-shell .auth-entry .auth-form input::placeholder { opacity: 1; }
  #app.auth-portal-shell .auth-entry { max-width: 508px; padding: 16px 16px max(24px, env(safe-area-inset-bottom)); }
  #app.auth-portal-shell .auth-entry-top { min-height: 44px; margin-bottom: 24px; }
  #app.auth-portal-shell .auth-entry-top > a:first-child img,
  #app.auth-portal-shell .auth-entry-brand img,
  #app.auth-portal-shell .auth-entry-top .login-portal-brand img { width: 132px; height: 40px; }
  #app.auth-portal-shell .auth-entry-grid { display: block; }
  #app.auth-portal-shell .auth-entry-story { display: none; }
  #app.auth-portal-shell .auth-entry-main { width: 100%; max-width: none; padding: 24px 20px; border-radius: 12px; }
  #app.auth-portal-shell .auth-entry :is(.auth-entry-title, .auth-title, .login-portal-heading) { font-size: 25px; }
  #app.auth-portal-shell .auth-entry :is(.auth-entry-description, .login-portal-intro) { margin-top: 10px; }
  #app.auth-portal-shell .auth-entry > .auth-entry-copyright { padding-top: 24px; }
}

@media (max-width: 360px) {
  #app.auth-portal-shell .auth-entry-main { padding: 24px 16px; }
  #app.auth-portal-shell .auth-entry .auth-form-pair { grid-template-columns: minmax(0, 1fr); }
  #app.auth-portal-shell .login-portal-social { gap: 4px; }
  #app.auth-portal-shell .login-portal-support { gap: 0 12px; }
  #app.auth-portal-shell .login-portal-provider-status { font-size: 12px; }
  #app.auth-portal-shell .auth-entry .account-consent-list > .account-policy-row { padding-right: 10px; padding-left: 10px; gap: 0 6px; }
  #app.auth-portal-shell .auth-entry .account-consent-list > .account-policy-row > .account-policy-check { gap: 8px; }
  #app.auth-portal-shell .auth-entry .account-policy-label strong { font-size: 14px; }
}

@media (min-width: 721px) and (max-height: 760px) {
  #app.auth-portal-shell .auth-entry { padding-top: 16px; padding-bottom: 16px; }
  #app.auth-portal-shell .auth-entry-top { margin-bottom: 16px; }
  #app.auth-portal-shell .auth-entry-story { min-height: 448px; }
  #app.auth-portal-shell .auth-entry > .auth-entry-copyright { padding-top: 24px; }
  #app.auth-portal-shell .auth-entry-legal { padding-top: 16px; }
  #app.auth-portal-shell .auth-entry-legal + .auth-entry-copyright { padding-top: 0; }
  #app.auth-portal-shell[data-page="login"] .auth-entry-main { padding: 24px; }
  #app.auth-portal-shell[data-page="login"] :is(.auth-entry-description, .login-portal-intro) { margin-top: 10px; margin-bottom: 16px; }
  #app.auth-portal-shell[data-page="login"] .login-portal-divider { margin: 16px 0; }
  #app.auth-portal-shell[data-page="login"] .login-portal-signup { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  #app.auth-portal-shell .auth-entry * { transition: none !important; scroll-behavior: auto; }
  #app.auth-portal-shell .auth-entry .account-loading::before { animation: none; }
}

/* 계정 동의 문서는 현재 화면 위에서 읽습니다. */
body > dialog.account-dialog.account-policy-dialog {
  width: min(720px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  border: 1px solid #dfd6ce;
  border-radius: 14px;
  background: #fff;
  color: #35282d;
  box-shadow: 0 20px 64px rgb(53 40 45 / .18);
  overflow: visible;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body > dialog.account-dialog.account-policy-dialog[open] { display: flex; flex-direction: column; }
body > dialog.account-dialog.account-policy-dialog:not([open]) { display: none; }
body > dialog.account-dialog.account-policy-dialog,
body > dialog.account-dialog.account-policy-dialog * { box-sizing: border-box; }
body > dialog.account-dialog.account-policy-dialog [hidden] { display: none !important; }
body > dialog.account-dialog.account-policy-dialog::backdrop { background: rgb(43 31 36 / .48); }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  min-width: 0;
  margin: 0;
  padding: 16px 24px;
  gap: 16px;
  border-bottom: 1px solid #e7ded7;
}

body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-header h2 {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #35282d;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -.025em;
}

body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  gap: 6px;
  border: 1px solid #dfd6ce;
  border-radius: 8px;
  background: #fff;
  color: #58343e;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  cursor: pointer;
}

body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-close:hover { background: #f5f1eb; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-close svg { display: block; flex: none; width: 18px; height: 18px; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 24px;
  background: #fff;
  color: #35282d;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 24px;
  scrollbar-gutter: stable;
}

body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-content {
  min-width: 0;
  margin: 0;
  padding: 0;
  color: #35282d;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: -.01em;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-content p { margin: 0 0 16px; color: inherit; font-size: inherit; line-height: inherit; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-content :is(h1, h2, h3) { margin: 24px 0 12px; color: #58343e; font-size: 18px; font-weight: 700; line-height: 1.65; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-content :is(ul, ol) { margin: 0 0 16px; padding-left: 22px; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-content li { margin: 6px 0; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-content a { color: #58343e; text-decoration: underline; text-underline-offset: 4px; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-status {
  margin: 0;
  padding: 16px;
  border: 1px solid #e7ded7;
  border-radius: 8px;
  background: #f8f5f0;
  color: #6d6265;
  font-size: 15px;
  line-height: 1.85;
}

body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-body .err { margin: 0 0 12px; padding: 14px; border: 1px solid #e7bfc1; border-radius: 8px; background: #fff4f3; color: #87333b; font-size: 15px; line-height: 1.85; white-space: pre-line; }
body > dialog.account-dialog.account-policy-dialog .btn { display: inline-flex; align-items: center; justify-content: center; flex: none; width: auto; min-width: 100px; min-height: 44px; margin: 0; padding: 9px 16px; gap: 8px; border: 1px solid #58343e; border-radius: 8px; background: #58343e; color: #fff; font: inherit; font-size: 14px; font-weight: 650; line-height: 1.6; cursor: pointer; }
body > dialog.account-dialog.account-policy-dialog .btn.ghost { border-color: #dfd6ce; background: #fff; color: #58343e; }
body > dialog.account-dialog.account-policy-dialog .btn.ghost:hover { background: #f5f1eb; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-footer { display: flex; justify-content: flex-end; flex: none; margin: 0; padding: 16px 24px; gap: 10px; border-top: 1px solid #e7ded7; }
body > dialog.account-dialog.account-policy-dialog :is(a, button):focus-visible { outline: 2px solid #835361; outline-offset: 3px; }
body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-body:focus-visible { outline: 2px solid #835361; outline-offset: -4px; }

@media (max-width: 720px) {
  body > dialog.account-dialog.account-policy-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); border-radius: 12px; }
  body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-header { padding: 12px 16px; gap: 12px; }
  body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-header h2 { font-size: 19px; }
  body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-body { padding: 20px 16px; scroll-padding-block: 20px; scrollbar-gutter: auto; }
  body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-footer { padding: 12px 16px; }
  body > dialog.account-dialog.account-policy-dialog .account-policy-dialog-footer .btn { width: 100%; }
}

/* 계정 정보를 불러올 때는 짧은 자리 표시만 보여줍니다. */
#app[data-page="account"] .auth-entry .account-loading-placeholder {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 72px;
  margin: 0;
  padding: 16px 0;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#app[data-page="account"] .auth-entry .account-loading-placeholder > span {
  display: block;
  flex: none;
  width: 86%;
  height: 12px;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: #eee7e0;
}

#app[data-page="account"] .auth-entry .account-loading-placeholder > span:nth-child(2) { width: 64%; }
#app[data-page="account"] .auth-entry .account-loading-placeholder > span:nth-child(3) { width: 42%; }
