/* Shared authentication, using the site's existing palette and typography. */
.site-footer { justify-content: flex-end; text-align: right; }
.header-actions form { margin: 0; }
.site-header .header-login { background: var(--surface); color: var(--ink); border-color: var(--line); white-space: nowrap; }
.site-header .header-login:hover { background: var(--surface-alt); }
.site-header .theme-toggle--icon { width: 44px; height: 44px; padding: 0; flex: 0 0 44px; gap: 0; }
.login-main { grid-template-columns: minmax(0,1fr) minmax(320px,420px); gap: clamp(48px,8vw,120px); padding: 48px 0; }
.login-art { position: relative; }
.login-eyebrow { color: var(--action); font-size: 14px !important; font-weight: 600; margin-bottom: 20px !important; }
.login-art h1 { font-size: clamp(36px,3.6vw,52px); line-height: 1.22; letter-spacing: -.055em; }
.login-art > p:not(.login-eyebrow) { font-size: 16px; color: var(--muted); line-height: 1.8; }
.auth-mascot { position: relative; overflow: hidden; width: 300px; aspect-ratio: 960 / 819; }
.auth-mascot img { display: block; width: 200%; max-width: none; height: 100%; margin: 0; object-fit: fill; }
.auth-mascot--login { margin: 16px 0 0 24px; }
.auth-mascot--support { width: 104px; margin: 0 auto 12px; }
.auth-mascot--support img { transform: translateX(-50%); }
.login-card { padding: 36px; border-radius: 20px; background: var(--surface); box-shadow: 0 24px 80px #0000000c; }
html[data-theme="dark"] .login-card { background: #12171eed; box-shadow: 0 24px 80px #00000030; }
.login-symbol { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 24px; }
html[data-theme="dark"] .login-symbol .ui-icon { filter: invert(1); }
.login-card h2 { font-size: 28px; letter-spacing: -.04em; }
.login-card .muted { line-height: 1.7; margin-bottom: 28px; }
.login-card form label { margin-top: 20px; font-weight: 500; }
.login-card input:not([type=hidden]) { height: 52px; padding-inline: 14px; background: var(--bg); border-radius: 10px; transition: border-color .18s; }
.login-card input::placeholder { color: var(--muted); opacity: .7; }
.login-card input:focus { border-color: var(--action); }
.password-field { position: relative; }
.password-field #password { padding-right: 72px; }
.password-toggle { position: absolute; inset: 4px 4px 4px auto; width: 60px; border: 0; background: transparent; border-radius: 6px; color: var(--muted); font-size: 12px; }
.password-toggle:hover { color: var(--ink); background: var(--surface-alt); }
.login-card .primary-button { justify-content: space-between; border-radius: 10px; min-height: 52px; margin-top: 28px; }
.forgot-link { margin-top: 16px; text-align: center; }
.forgot-link button { border: 0; padding: 4px 8px; background: transparent; font: inherit; color: var(--muted); }
.forgot-link button:hover { color: var(--action); }
.login-help { margin-top: 8px; text-align: center; font-size: 12px; }
.contact-dialog { width: min(520px,calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow-y: auto; border: 1px solid var(--line); border-radius: 24px; background: var(--surface); color: var(--ink); box-shadow: 0 32px 100px #0005; }
.contact-dialog[open] { animation: contact-in .2s ease-out; }
.contact-dialog::backdrop { background: #050b16a6; backdrop-filter: blur(8px); }
.contact-content { padding: 28px 32px 24px; position: relative; text-align: center; }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; }
.dialog-close:hover { background: var(--surface-alt); color: var(--ink); }
.contact-dialog h2 { font-size: 23px; letter-spacing: -.04em; margin: 0 0 12px; line-height: 1.4; }
#contact-description { font-size: 14px; line-height: 1.8; color: var(--muted); margin-bottom: 24px; word-break: keep-all; }
.contact-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.qr-frame { background: #fff; border-radius: 14px; padding: 10px; width: 164px; height: 164px; margin: 0 auto 12px; }
.qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.contact-qr strong { font-size: 13px; font-weight: 600; }
.contact-qr p { margin: 8px auto 0; max-width: 160px; font-size: 12px; line-height: 1.65; color: var(--muted); word-break: keep-all; }
.contact-email { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.contact-email > span { color: var(--muted); font-size: 12px; }
.contact-email > a { font-size: 16px; font-weight: 600; color: var(--action); min-height: 44px; display: flex; align-items: center; }
.contact-email .btn { font-size: 12px; padding-inline: 12px; border-radius: 8px; }
.copy-status { min-height: 36px; font-size: 12px; color: var(--muted); margin: 0; }
.contact-done { width: 100%; margin-top: 24px; border-radius: 10px; min-height: 48px; }
@keyframes contact-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width:760px) {
  .home-shell > .site-header { flex-wrap: wrap; gap: 0; padding: 12px 0; }
  .home-shell .header-actions { gap: 8px; }
  .home-shell .home-shortcut { display: none; }
  .header-login { min-height: 44px; font-size: 13px; padding-inline: 14px; }
  .login-main { grid-template-columns: 1fr; gap: 28px; padding: 32px 0 40px; max-width: 440px; margin: auto; }
  .login-art { padding-right: 88px; min-height: 108px; }
  .login-eyebrow { margin-bottom: 12px !important; font-size: 12px !important; }
  .login-art h1 { font-size: 30px; margin-bottom: 0; }
  .login-art > p:not(.login-eyebrow) { display: none; }
  .auth-mascot--login { position: absolute; right: -8px; bottom: 0; width: 112px; margin: 0; }
  .login-art .auth-mascot img { display: block; }
  .login-card { padding: 28px 24px; border-radius: 16px; }
  .login-symbol { margin-bottom: 20px; }
  .login-card h2 { font-size: 25px; }
  .login-shell > .site-header { gap: 8px; }
  .login-shell .header-actions { gap: 4px; }
  .login-shell .header-actions .text-link { gap: 6px; font-size: 12px; }
  .login-shell .header-actions .theme-toggle { padding-inline: 10px; }
}
@media (max-width:480px) {
  .contact-content { padding: 24px 20px 20px; }
  .contact-dialog h2 { font-size: 21px; }
  .contact-methods { gap: 16px; }
  .qr-frame { width: 136px; height: 136px; padding: 8px; }
  .contact-email > a { font-size: 14px; }
  .contact-email .btn { padding-inline: 8px; font-size: 11px; }
}
@media (max-width:360px) {
  .home-shell .site-header { gap: 12px; }
  .home-shell .header-actions { width: 100%; justify-content: flex-end; }
  .login-shell .wordmark { font-size: 14px; }
  .login-shell .header-actions .text-link span { display: none; }
  .login-shell .header-actions .text-link { justify-content: center; width: 44px; }
  .contact-methods { grid-template-columns: 1fr; }
  .copy-status { min-height: 0; }
}
@media (prefers-reduced-motion:reduce) { .contact-dialog[open] { animation: none; } }
