/* Account entrance — paper surfaces, rose accents and the original IP artwork. */
.authPage {
  --auth-paper: var(--bg); --auth-card: var(--panel); --auth-field: var(--input-bg); --auth-line: var(--line);
  position: relative; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: center;
  min-height: 100dvh; height: 100dvh; overflow-y: auto; background: var(--auth-paper); isolation: isolate;
}
[data-theme="light"] .authPage {
  --auth-paper: #fbf8f6; --auth-card: #fffefd; --auth-field: #fcfaf9; --auth-line: #eae3e4; --text: #30272e; --dim: #897e85;
}
[data-theme="light"][data-palette="sakura"] .authPage { --accent: #b45172; --accent2: #a54263; --accent-soft: #f7e9ee; --accent-line: #e5bccb; }
.authPage *, .authPage *::before, .authPage *::after { box-sizing: border-box; }
.authArt { position: absolute; inset: 0 48.08% 0 0; overflow: hidden; background: var(--accent-soft); z-index: -1; }
.authArt > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 55% center; }
.authArt > div { position: absolute; inset: 0; background: linear-gradient(180deg, #fff6ee66, transparent 24%, transparent 75%, #513a4326); }
.authBrand { position: absolute; top: 30px; left: 36px; display: inline-flex; gap: 11px; align-items: center; text-decoration: none; color: #332934; z-index: 1; }
.authBrand strong { font: 700 26px "Noto Serif SC", "Songti SC", SimSun, serif; letter-spacing: 1px; text-shadow: 0 1px 12px #fff8ee90; }
.authBrand .brandSeal { display: block; position: relative; width: 42px; height: 42px; overflow: hidden; flex-shrink: 0; border: 2px solid #fffdf9e6; border-radius: 50%; background: #fff8f5; box-shadow: 0 2px 12px #6e40551a; }
.authBrand .brandSeal img { position: absolute; width: 62px; height: auto; max-width: none; top: -2px; left: -11px; }
.authPanel { grid-column: 2; position: relative; width: min(calc(100% - 64px), 454px); margin: 48px auto; padding: 30px 36px 32px; background: var(--auth-card); border: 1px solid var(--auth-line); border-radius: 26px; box-shadow: 0 12px 48px #3f233207; }
.authPanel h1 { margin: 27px 0 32px; color: var(--text); font: 600 32px/1.4 "Noto Serif SC", "Songti SC", SimSun, serif; letter-spacing: 1px; }
.authTabs { display: flex; gap: 30px; min-height: 46px; border-bottom: 1px solid var(--auth-line); }
.authTabs button { position: relative; min-width: 52px; padding: 10px 2px 14px; background: transparent; color: var(--dim); border: 0; border-radius: 0; font-size: 16px; cursor: pointer; transition: color .16s; }
.authTabs button.active { color: var(--accent); font-weight: 600; }
.authTabs button.active::after { content: ''; position: absolute; height: 2px; left: 0; right: 0; bottom: -1px; border-radius: 2px; background: var(--accent); }
.authTabs button:hover:not(:disabled) { color: var(--accent); }
.authField { display: block; margin: 0 0 22px; color: var(--text); font-size: 14px; line-height: 1.5; }
.authField > label { display: inline-block; }
.authField input { display: block; width: 100%; min-width: 0; min-height: 50px; margin-top: 9px; border: 1px solid var(--auth-line); border-radius: 12px; background: var(--auth-field); color: var(--text); padding: 12px 14px; font-family: inherit; font-size: 16px; line-height: 1.5; transition: border-color .16s, box-shadow .16s; }
.authField input:hover:not(:disabled) { border-color: var(--accent-line); }
.authField input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.authField input::placeholder { color: var(--dim); font-size: 13px; opacity: .85; }
.authField input:disabled { opacity: .65; cursor: wait; }
.authOptional { font-size: 12px; color: var(--dim); margin-left: 8px; }
.authPassword { position: relative; }
.authPassword input { padding-right: 48px; }
.authPassword button { position: absolute; right: 3px; top: 3px; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; background: transparent; border: 0; border-radius: 9px; cursor: pointer; color: var(--dim); }
.authPassword button:hover { color: var(--accent); background: var(--accent-soft); }
.authPassword .uiIcon { width: 20px; height: 20px; }
.authFeedback { min-height: 25px; margin-top: -12px; margin-bottom: 7px; }
.authError { margin: 0; color: var(--danger); font-size: 13px; line-height: 25px; overflow-wrap: anywhere; }
.authError:focus { outline: none; }
.authSubmit { display: flex; justify-content: center; align-items: center; gap: 18px; width: 100%; min-height: 50px; padding: 12px 20px; margin-top: 0; border: 1px solid transparent; border-radius: 28px; color: var(--on-accent); background: var(--accent); font-family: inherit; font-size: 16px; font-weight: 600; line-height: 1.5; cursor: pointer; box-shadow: 0 4px 14px #8b3e5b0b; transition: background .16s, box-shadow .16s, transform .16s; }
.authSubmit .uiIcon { width: 20px; height: 20px; }
.authSubmit:hover:not(:disabled) { background: var(--accent2); box-shadow: 0 5px 16px #8b3e5b1c; }
.authSubmit:active:not(:disabled) { transform: translateY(1px); }
.authPage button:disabled { cursor: wait; }
.authSubmit:disabled { opacity: .68; }
.authPage button:focus-visible, .authBrand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.authStatus { color: var(--dim); line-height: 1.8; margin: 0 0 24px; }
.authTelegram { display: block; min-height: 44px; margin: 14px auto 0; padding: 8px 12px; background: transparent; color: var(--accent); border: 0; border-radius: 10px; cursor: pointer; font: inherit; font-size: 14px; }
.authTelegram:hover:not(:disabled) { background: var(--accent-soft); }
.authConnecting .authPanel h1 { margin-top: 8px; margin-bottom: 20px; }
[data-theme="dark"] .authArt > img { filter: brightness(.64) saturate(.82); }
[data-theme="dark"] .authArt > div { background: linear-gradient(180deg, #19151d30, transparent 32%, #19151d30); }
[data-theme="dark"] .authBrand { color: #fff5f6; }
[data-theme="dark"] .authBrand strong { text-shadow: 0 2px 14px #22172080; }
[data-theme="dark"] .authPanel { box-shadow: 0 14px 44px #00000014; }
@media (min-width: 1500px) {
  .authPanel { width: 474px; padding: 34px 42px 36px; }
  .authBrand { top: 40px; left: 48px; }
}
@media (max-width: 960px) and (min-width: 721px) {
  .authPage { grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); }
  .authArt { right: 52.63%; }
  .authPanel { width: calc(100% - 36px); padding: 24px; }
  .authBrand { left: 24px; top: 24px; gap: 9px; }
  .authBrand strong { font-size: 23px; }
}
@media (max-width: 720px) {
  .authPage { display: block; padding: 254px 18px max(30px, env(safe-area-inset-bottom)); }
  .authArt { inset: 0 0 auto; height: 352px; }
  .authArt > img { object-position: 56% 44%; }
  .authArt > div { background: linear-gradient(180deg, #fff6ee45, transparent 40%, transparent 64%, var(--auth-paper)); }
  .authBrand { top: 24px; left: 24px; gap: 10px; }
  .authBrand strong { font-size: 25px; }
  .authBrand .brandSeal { width: 40px; height: 40px; }
  .authBrand .brandSeal img { width: 60px; left: -11px; }
  .authPanel { width: min(100%, 420px); margin: 0 auto; padding: 20px 24px 24px; border-radius: 24px; }
  .authPanel h1 { font-size: 29px; margin: 24px 0 28px; }
  .authTabs { gap: 28px; }
  .authField { margin-bottom: 20px; }
  .authField input { min-height: 49px; }
  .authFeedback { margin-top: -10px; }
  [data-theme="dark"] .authArt > div { background: linear-gradient(180deg, #21172426, transparent 40%, transparent 58%, var(--auth-paper)); }
}
@media (max-width: 360px) {
  .authPage { padding-left: 14px; padding-right: 14px; padding-top: 224px; }
  .authArt { height: 314px; }
  .authPanel { padding-left: 20px; padding-right: 20px; }
  .authPanel h1 { font-size: 27px; }
  .authBrand { left: 20px; }
  .authBrand strong { font-size: 23px; }
}
@media (max-height: 700px) and (max-width: 720px) {
  .authPage { padding-top: 188px; }
  .authArt { height: 284px; }
  .authPanel h1 { margin: 20px 0 24px; }
}
@media (prefers-reduced-motion: reduce) { .authPage button, .authField input { transition: none; } }
