/* Welcome surface for the prelaunch login route only. */
html.auth-page-active body.login-welcome { --welcome-wine: #702a2b; background: #f6f2e9; color: #302b27; min-width: 0; }
.login-welcome ::selection { background: #ead2c3; color: #452021; }
html.auth-page-active .login-welcome #app { min-height: 0; background: transparent; }
html.auth-page-active .login-welcome main { min-height: 0; padding: 0; background: transparent; }
.login-welcome .welcome-header { max-width: 1320px; margin: auto; padding: 30px 54px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
html.auth-page-active .login-welcome .auth-brand { margin: 0; justify-content: flex-start; gap: 14px; }
html.auth-page-active .login-welcome .auth-brand-mark { width: 56px; height: 48px; flex-basis: 56px; border-radius: 0; box-shadow: none; }
html.auth-page-active .login-welcome .auth-brand-copy strong { font-size: 21px; }
html.auth-page-active .login-welcome .auth-brand-copy small { font-size: 12px; color: #726860; }
.welcome-header-note { font-size: 13px; color: #756960; }
html.auth-page-active .login-welcome #authPanel:not(.hidden) { display: grid; grid-template-columns: 1.16fr 1fr; gap: 0; width: min(100% - 108px, 1212px); margin: 12px auto 0; min-height: min(690px, calc(100svh - 204px)); }
.welcome-story { padding: 34px 54px 34px 12px; align-self: center; min-width: 0; }
.welcome-story h1 { margin: 0 0 22px; font-size: clamp(36px, 3.7vw, 52px); line-height: 1.4; font-weight: 650; letter-spacing: -.03em; text-wrap: balance; }
.welcome-story h1 em { font-style: normal; color: var(--welcome-wine); }
.welcome-description { margin: 0; font-size: 16px; line-height: 1.95; color: #76675b; }
.welcome-books { margin: 28px 0 26px; }
.welcome-books-row { display: flex; align-items: flex-end; justify-content: flex-start; gap: 8px; height: clamp(170px, 20vw, 260px); }
.welcome-books-row img { width: 31%; height: 91%; object-fit: contain; filter: drop-shadow(3px 12px 9px #4f332619); }
.welcome-books-row img:nth-child(2) { height: 100%; }
.welcome-books figcaption { margin-top: 14px; color: #756960; font-size: 12px; }
.welcome-path { border-top: 1px solid #d9cec0; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: #604b40; }
.welcome-path svg { width: 20px; height: 20px; flex: 0 0 20px; stroke: #9b7a68; stroke-width: 1.4; fill: none; }
.welcome-login { padding: 58px 44px 38px; border-left: 1px solid #e1d8cb; background: #fffcf6; display: flex; flex-direction: column; justify-content: center; }
html.auth-page-active .login-welcome .auth-card { padding: 0; margin: 0 auto; max-width: 360px; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
html.auth-page-active .login-welcome .auth-card > h2 { font-size: 29px; font-weight: 650; margin-bottom: 12px; }
html.auth-page-active .login-welcome .auth-card > .welcome-form-intro { color: #76675b; margin-bottom: 38px; font-size: 14px; }
html.auth-page-active .login-welcome .auth-fields { gap: 13px; }
html.auth-page-active .login-welcome .auth-card label { gap: 10px; font-size: 14px; font-weight: 550; color: #4f433a; }
html.auth-page-active .login-welcome .auth-card input { min-height: 54px; border-radius: 8px; border-color: #cec1b2; background: #fffefa; font-size: 16px; caret-color: var(--welcome-wine); }
html.auth-page-active .login-welcome .auth-card input::placeholder { color: #80756b; }
html.auth-page-active .login-welcome .auth-card input:focus { outline: 2px solid var(--welcome-wine); outline-offset: 3px; border-color: var(--welcome-wine); }
.welcome-password-label { display: flex; justify-content: space-between; align-items: center; margin: 5px 0 -13px; min-height: 44px; }
.login-welcome #togglePassword { background: transparent; color: var(--welcome-wine); font-size: 12px; font-weight: 500; padding: 6px 0 6px 12px; min-height: 44px; box-shadow: none; border-radius: 4px; }
.login-welcome #togglePassword:hover { text-decoration: underline; text-underline-offset: 4px; }
.login-welcome button:focus-visible, .login-welcome a:focus-visible { outline: 2px solid var(--welcome-wine); outline-offset: 4px; }
html.auth-page-active .login-welcome .auth-actions { margin-top: 28px; }
html.auth-page-active .login-welcome #loginBtn { min-height: 54px; background: var(--welcome-wine); font-size: 16px; display: flex; justify-content: center; align-items: center; gap: 18px; transition: background .18s ease; }
html.auth-page-active .login-welcome #loginBtn:hover { background: #572022; }
html.auth-page-active .login-welcome #loginBtn:active { background: #44181a; }
html.auth-page-active .login-welcome #loginBtn:disabled { opacity: .65; }
html.auth-page-active .login-welcome #loginFeedback { margin: 14px 0 0; color: #a12222; font-size: 14px; }
html.auth-page-active .login-welcome #loginFeedback:empty { display: none; }
html.auth-page-active .login-welcome .auth-card > .welcome-access-note { margin: 27px 0 0; padding-top: 22px; border-top: 1px solid #e8dfd3; color: #756960; font-size: 12px; line-height: 1.9; }
.welcome-login-footer { max-width: 360px; width: 100%; margin: 40px auto 0; font-size: 12px; color: #756960; }
.welcome-footer { max-width: 1320px; margin: auto; padding: 26px 54px; display: flex; justify-content: space-between; color: #756960; font-size: 12px; }
@media (min-width: 850px) and (max-height: 760px) {
  .login-welcome .welcome-header { padding-top: 22px; padding-bottom: 16px; }
  .welcome-story { padding-top: 18px; padding-bottom: 18px; }
  .welcome-story h1 { font-size: 40px; margin-bottom: 14px; }
  .welcome-books-row { height: 185px; }
  .welcome-books { margin-top: 20px; margin-bottom: 18px; }
  .welcome-login { padding-top: 32px; padding-bottom: 28px; }
  .welcome-login-footer { margin-top: 28px; }
}
@media (max-width: 849px) {
  .login-welcome .welcome-header { padding: 24px 28px; }
  .welcome-header-note { display: none; }
  html.auth-page-active .login-welcome #authPanel:not(.hidden) { width: min(100% - 56px, 560px); grid-template-columns: 1fr; margin-top: 0; }
  .welcome-story { padding: 18px 0 28px; }
  .welcome-story h1 { font-size: 36px; line-height: 1.35; margin-bottom: 14px; }
  .welcome-description { font-size: 14px; line-height: 1.8; }
  .welcome-books, .welcome-path { display: none; }
  .welcome-login { padding: 30px; border-left: 0; border-top: 1px solid #e1d8cb; }
  html.auth-page-active .login-welcome .auth-card { max-width: none; }
  html.auth-page-active .login-welcome .auth-card > h2 { font-size: 25px; }
  html.auth-page-active .login-welcome .auth-card > .welcome-form-intro { margin-bottom: 24px; }
  .welcome-login-footer { margin: 24px 0 0; }
  .welcome-footer { padding: 24px 28px; }
}
@media (max-width: 420px) {
  .login-welcome .welcome-header { padding: 22px 22px 12px; }
  html.auth-page-active .login-welcome #authPanel:not(.hidden) { width: calc(100% - 44px); }
  .welcome-story h1 { font-size: 32px; }
  .welcome-login { padding: 26px 20px; }
  .welcome-footer { padding: 24px 22px; }
}

/* Explicit account entry points remain available while registration is closed. */
.welcome-header-actions, .welcome-entry-nav { display: flex; align-items: center; gap: 26px; }
.welcome-entry-nav { gap: 8px; flex-shrink: 0; }
.welcome-entry-nav a, .welcome-entry-nav button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 10px 18px; font-size: 14px; font-weight: 600; border-radius: 7px; text-decoration: none; box-shadow: none; }
.welcome-entry-nav a { color: var(--welcome-wine); background: transparent; }
.welcome-entry-nav a:hover { background: #eadfd2; }
.welcome-entry-nav button { background: var(--welcome-wine); color: #fff; }
.welcome-entry-nav button:hover { background: #572022; }
.welcome-register-entry { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 10px; color: #756960; font-size: 13px; }
.welcome-register-entry button { min-height: 44px; background: transparent; box-shadow: none; color: var(--welcome-wine); font-size: 14px; padding: 8px; }
.welcome-register-entry button:hover { text-decoration: underline; text-underline-offset: 4px; }
.welcome-registration-notice { width: 100%; max-width: 360px; margin: 0 auto 28px; padding: 20px; background: #f3e7dc; border-radius: 10px; color: #563a30; }
.welcome-registration-notice[hidden] { display: none; }
.welcome-registration-notice h2 { font-size: 20px; margin: 0 0 10px; }
.welcome-registration-notice p { font-size: 14px; line-height: 1.8; margin: 0 0 10px; }
.welcome-registration-notice a { display: inline-flex; align-items: center; min-height: 44px; color: var(--welcome-wine); font-size: 14px; font-weight: 600; text-underline-offset: 4px; }
.welcome-registration-notice:focus { outline: 2px solid var(--welcome-wine); outline-offset: 3px; }
@media (max-width: 1100px) { .welcome-header-actions .welcome-header-note { display: none; } }
@media (max-width: 849px) { .welcome-registration-notice { max-width: none; } }
@media (max-width: 420px) {
  .login-welcome .welcome-header { gap: 8px; }
  html.auth-page-active .login-welcome .auth-brand { gap: 8px; }
  html.auth-page-active .login-welcome .auth-brand-mark { width: 38px; flex-basis: 38px; height: 38px; }
  html.auth-page-active .login-welcome .auth-brand-copy strong { font-size: 17px; }
  html.auth-page-active .login-welcome .auth-brand-copy small { font-size: 10px; }
  .welcome-entry-nav { gap: 2px; }
  .welcome-entry-nav a, .welcome-entry-nav button { padding: 10px; font-size: 13px; }
}

.login-welcome .welcome-entry-nav { width: auto; min-width: max-content; }
.login-welcome .welcome-entry-nav a, .login-welcome .welcome-entry-nav button { width: auto; min-width: 60px; flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 420px) { .login-welcome .welcome-entry-nav a, .login-welcome .welcome-entry-nav button { min-width: 46px; } }

/* Both login methods share the same card and phone field. */
.login-welcome .welcome-login-modes { display:flex; gap:4px; padding:4px; margin:24px 0 20px; background:#eeece5; border-radius:12px; }
.login-welcome .welcome-login-modes button { flex:1; min-height:44px; padding:9px 6px; border:0; border-radius:9px; background:transparent; color:#6c706b; font-size:14px; cursor:pointer; }
.login-welcome .welcome-login-modes button[aria-pressed="true"] { background:#fffdf8; color:#244e46; box-shadow:0 1px 5px #143a2410; font-weight:600; }
.login-welcome .welcome-code-row { display:flex; gap:10px; margin-top:8px; }
.login-welcome .welcome-code-row input { flex:1; min-width:0; width:0; }
.login-welcome .welcome-code-row button { flex:0 0 112px; min-height:48px; padding:8px; border:1px solid #bccdc4; border-radius:10px; color:#244e46; background:#f0f4ed; font-size:14px; cursor:pointer; }
.login-welcome .welcome-code-row button:disabled { color:#6f786f; cursor:default; opacity:.7; }
.login-welcome .welcome-code-hint { margin:10px 0 0; color:#6d756f; font-size:12px; line-height:1.7; }
.login-welcome [hidden] { display:none !important; }
.login-welcome #passwordFields input { margin-top:8px; }
.login-welcome button:focus-visible { outline:3px solid #698e74; outline-offset:3px; }
