/* First-run account screen stays independent of score and player layouts. */
.account-screen { display: none; }
html[data-account-gate] body { overflow: hidden !important; }
html[data-account-gate] .app-header,
html[data-account-gate] .app-shell,
html[data-account-gate] .mobile-tabbar { display: none !important; }
html[data-account-gate] .account-screen {
  display: flex; position: fixed; top: 0; right: 0; bottom: 0; left: 0;
  z-index: 1000; overflow-y: auto; background: var(--bg); color: var(--text);
  padding: 24px; padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
}
.account-screen *, .account-profile * { letter-spacing: 0; }
.account-screen [hidden], .account-profile [hidden] { display: none !important; }
.account-content { width: 100%; max-width: 390px; margin: auto; }
.account-wordmark { display: flex; align-items: center; margin-bottom: 48px; font-size: 15px; font-weight: 700; }
.account-wordmark svg { width: 27px; height: 27px; margin-right: 10px; stroke: var(--accent); fill: none; stroke-width: 2; stroke-linecap: round; }
.account-heading { margin-bottom: 30px; }
.account-heading h1 { font-size: 32px; line-height: 1.15; font-weight: 750; outline: none; }
.account-heading p { font-size: 15px; line-height: 1.6; color: var(--muted); margin: 10px 0 0; }
.account-action {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 54px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--panel-strong);
  color: var(--text); padding: 12px 16px; font-size: 14px; font-weight: 600; margin: 0 0 12px;
}
.account-action svg { flex: 0 0 21px; width: 21px; height: 21px; margin-right: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.account-action .account-brand-google { stroke: none; }
.account-action .account-brand-apple { stroke: none; fill: currentColor; }
.account-action span { display: block; }
.account-action small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 2px; }
.account-action small:empty { display: none; }
.account-action[aria-disabled="true"] { opacity: .68; }
.account-action:focus-visible, .account-text-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.account-primary { background: var(--accent); border-color: var(--accent); color: #171008; }
.account-divider { display: flex; align-items: center; color: var(--muted); font-size: 12px; margin: 22px 0; }
.account-divider::before, .account-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.account-divider span { padding: 0 15px; }
.account-guest { background: transparent; border-color: transparent; margin-top: 14px; }
.account-guest svg { color: var(--accent); }
.account-switch { text-align: center; font-size: 13px; color: var(--muted); margin: 19px 0 0; line-height: 1.8; }
.account-text-button { padding: 3px 4px; border: 0; background: none; color: var(--accent); font-size: inherit; font-weight: 600; }
.account-back { display: inline-flex; align-items: center; margin: -15px 0 20px; }
.account-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; margin-right: 5px; }
.account-field { display: block; margin-bottom: 18px; font-size: 13px; font-weight: 550; }
.account-field > span { display: block; margin-bottom: 8px; }
.account-field input { width: 100%; min-height: 50px; background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; font-size: 16px; }
.account-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.account-password { position: relative; }
.account-password input { padding-right: 50px; }
.account-password button { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 45px; border: 0; background: none; color: var(--muted); }
.account-password svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.account-password-hint { font-size: 12px; margin: -9px 0 22px; color: var(--muted); }
.account-status { font-size: 13px; line-height: 1.6; color: var(--muted); text-align: center; margin: 0; }
.account-status:not(:empty) { margin: 15px 0; }
.account-status.is-error { color: #f48272; }
html[data-theme="light"] .account-status.is-error { color: #ad2e23; }
.account-footer { text-align: center; color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 30px; }
.account-footer p { margin: 0; }
.account-privacy { background: var(--bg); position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 2; overflow: auto; padding: 36px 26px; }
.account-privacy > div { max-width: 390px; margin: 0 auto; }
.account-privacy h2 { font-size: 24px; margin: 28px 0; }
.account-privacy p { font-size: 14px; line-height: 1.7; }
.account-profile { margin: 8px 0 28px; }
.account-avatar { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.account-profile h3 { font-size: 21px; margin-bottom: 8px; overflow-wrap: anywhere; }
.account-profile p { color: var(--muted); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.account-profile-status { font-size: 12px !important; color: var(--accent) !important; }
.account-profile .account-action { margin-top: 20px; }
@media (max-height: 760px) {
  .account-wordmark { margin-bottom: 28px; }
  .account-heading { margin-bottom: 23px; }
  .account-heading h1 { font-size: 29px; }
  .account-divider { margin: 16px 0; }
  .account-footer { margin-top: 22px; }
}
@media (prefers-reduced-motion: reduce) { .account-screen * { animation: none !important; transition: none !important; } }
