/* Account-only design system. No global game, canvas, notification, or profile overrides. */
.mfs-account {
  --a-bg:#f5f2fa; --a-surface:#ffffff; --a-ink:#271b37; --a-muted:#6b607a;
  --a-purple:#6837b3; --a-purple-hover:#54258f; --a-lilac:#f1eafc; --a-border:#ded4e9;
  --a-input:#ffffff; --a-success:#246d4c; --a-success-bg:#eef8f2;
  --a-error:#9e2443; --a-error-bg:#fff0f3; --a-shadow:0 16px 46px rgba(51,26,86,.07);
  color:var(--a-ink); background:var(--a-bg); margin:0; min-height:100vh; min-height:100dvh;
  font:16px/1.55 "Segoe UI",Arial,sans-serif; display:flex; flex-direction:column; color-scheme:light;
}
.mfs-account.theme-dark {
  --a-bg:#191621; --a-surface:#241f30; --a-ink:#f1eaf8; --a-muted:#beb2cf;
  --a-purple:#ba93fa; --a-purple-hover:#d1b2ff; --a-lilac:#342543; --a-border:#4a3e5b;
  --a-input:#1b1725; --a-success:#91d4b0; --a-success-bg:#20372b;
  --a-error:#ffb0c1; --a-error-bg:#3c232d; --a-shadow:0 16px 46px rgba(0,0,0,.2); color-scheme:dark;
}
.mfs-account *, .mfs-account *::before, .mfs-account *::after { box-sizing:border-box; }
.mfs-account a { color:var(--a-purple); text-underline-offset:3px; }
.mfs-account a:hover { text-decoration:underline; }
.mfs-account button, .mfs-account input { font:inherit; }
.mfs-account button, .mfs-account a, .mfs-account input, .mfs-account summary { -webkit-tap-highlight-color:transparent; }
.mfs-account :focus-visible { outline:3px solid #ac7eeb; outline-offset:3px; }
.mfs-account [hidden] { display:none !important; }
.mfs-skip { position:absolute; left:16px; top:-100px; padding:12px; background:var(--a-surface); z-index:50; }
.mfs-skip:focus { top:10px; }
.mfs-account-header { border-bottom:1px solid var(--a-border); background:var(--a-surface); }
.mfs-account-header-inner { max-width:1160px; margin:auto; min-height:88px; padding:20px 28px; display:flex; justify-content:space-between; align-items:center; gap:24px; }
.mfs-account-nav { display:flex; gap:18px; align-items:center; font-size:14px; font-weight:600; }
.mfs-account-nav a { text-decoration:none; }
.mfs-account-nav form { margin:0; }
.mfs-account-main { flex:1; width:100%; padding:42px 24px 36px; }
.auth-wrap { width:100%; max-width:480px; margin:auto; }
.auth-wrap.wide { max-width:580px; }
.account-wrap { width:100%; max-width:900px; margin:auto; }
.auth-back { display:inline-flex; gap:8px; align-items:center; text-decoration:none; font-size:14px; font-weight:600; margin:0 0 18px; min-height:32px; }
.auth-card { background:var(--a-surface); border:1px solid var(--a-border); border-radius:20px; box-shadow:var(--a-shadow); overflow:hidden; }
.auth-card-body { padding:32px; }
.auth-card-head { padding:30px 32px 0; }
.auth-eyebrow { font-size:11px; line-height:1.4; font-weight:750; letter-spacing:1.8px; color:var(--a-purple); text-transform:uppercase; margin:0 0 10px; }
.auth-title { margin:0 0 10px; font-size:30px; line-height:1.2; font-weight:750; letter-spacing:-.8px; }
.auth-subtitle { color:var(--a-muted); margin:0; font-size:15px; }
.auth-card h2 { font-size:19px; line-height:1.35; margin:0 0 10px; letter-spacing:-.25px; }
.auth-card h3 { font-size:16px; margin:0 0 8px; }
.auth-card p { overflow-wrap:anywhere; }
.auth-form { display:grid; gap:18px; margin:0; }
.auth-field { min-width:0; }
.auth-label-row { display:flex; justify-content:space-between; gap:12px; align-items:baseline; margin-bottom:7px; }
.auth-field label, .auth-label { display:block; font-size:14px; font-weight:650; margin:0 0 7px; }
.auth-label-row label { margin:0; }
.auth-label-row a { font-size:12px; font-weight:600; }
.auth-input { display:block; width:100%; height:48px; border:1px solid var(--a-border); border-radius:10px; padding:11px 13px; background:var(--a-input); color:var(--a-ink); outline-offset:2px; }
.auth-input::placeholder { color:var(--a-muted); opacity:.8; }
.auth-input:hover:not(:disabled) { border-color:var(--a-purple); }
.auth-input:focus { border-color:var(--a-purple); box-shadow:0 0 0 3px color-mix(in srgb,var(--a-purple) 14%,transparent); }
.auth-input:disabled { background:var(--a-bg); opacity:1; color:var(--a-muted); cursor:not-allowed; }
.auth-input.input-validation-error { border-color:var(--a-error); }
.auth-password { position:relative; }
.auth-password .auth-input { padding-right:70px; }
.auth-password-toggle { position:absolute; right:5px; top:5px; height:38px; min-width:54px; padding:0 10px; color:var(--a-purple); background:transparent; border:0; border-radius:7px; font-size:12px !important; font-weight:700 !important; cursor:pointer; }
.auth-password-toggle:hover { background:var(--a-lilac); }
.auth-field-error { color:var(--a-error); display:block; font-size:13px; margin-top:6px; }
.field-validation-valid { display:none; }
.auth-helper { font-size:13px; color:var(--a-muted); margin:7px 0 0; }
.auth-button { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:46px; border:1px solid transparent; border-radius:10px; padding:11px 18px; font-weight:650 !important; font-size:14px !important; line-height:1.5; text-decoration:none !important; cursor:pointer; background:var(--a-purple); color:#fff !important; transition:background .12s; text-align:center; }
.auth-button:hover { background:var(--a-purple-hover); }
.theme-dark .auth-button { color:#211332 !important; }
.auth-button.full { width:100%; }
.auth-button.secondary { color:var(--a-purple) !important; background:var(--a-surface); border-color:var(--a-border); }
.auth-button.secondary:hover { background:var(--a-lilac); }
.auth-button.quiet { background:transparent; border-color:transparent; color:var(--a-purple) !important; }
.auth-button.danger { background:#a3324b; color:white !important; }
.auth-button:disabled { background:var(--a-lilac); color:var(--a-muted) !important; cursor:not-allowed; border-color:var(--a-border); }
.auth-button.secondary:disabled { background:var(--a-bg); }
.auth-google { display:flex; gap:12px; align-items:center; justify-content:center; width:100%; min-height:46px; padding:10px 16px; border-radius:10px; border:1px solid #747775; color:#1f1f1f; background:white; font:500 14px/1.5 Arial,sans-serif; cursor:pointer; }
.auth-google:hover { background:#f7f8f8; box-shadow:0 1px 2px #ddd; }
.auth-google img,.google-mark { width:20px; height:20px; flex:none; }
.auth-divider { display:flex; align-items:center; gap:12px; color:var(--a-muted); font-size:12px; margin:18px 0; }
.auth-divider::before, .auth-divider::after { content:""; flex:1; height:1px; background:var(--a-border); }
.auth-code-section { border-top:1px solid var(--a-border); margin-top:26px; padding-top:24px; }
.auth-step-label { display:flex; gap:10px; align-items:center; margin:0 0 10px; }
.auth-step-number { display:inline-flex; align-items:center; justify-content:center; width:25px; height:25px; border-radius:50%; font-size:12px; font-weight:750; background:var(--a-lilac); color:var(--a-purple); flex:none; }
.auth-step-label h2 { margin:0; }
.auth-code-input { font:600 26px/1.2 Consolas,"Courier New",monospace !important; text-align:center; letter-spacing:.36em; padding-left:.7em; height:56px; }
.auth-code-input::placeholder { letter-spacing:.28em; color:var(--a-muted); opacity:.6; }
.auth-code-section fieldset { margin:0; border:0; padding:0; min-width:0; }
.auth-code-section fieldset:disabled .auth-helper { opacity:.9; }
.auth-mini-links { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; margin-top:14px; }
.auth-mini-links form { margin:0; }
.auth-text-button { font-size:13px !important; padding:6px 0; background:none; border:0; color:var(--a-purple); cursor:pointer; text-decoration:underline; text-underline-offset:3px; min-height:36px; }
.auth-text-button:disabled { color:var(--a-muted); cursor:not-allowed; text-decoration:none; }
.auth-notice,.auth-errors { padding:13px 15px; border:1px solid var(--a-border); border-radius:10px; margin:0 0 20px; background:var(--a-lilac); font-size:14px; overflow-wrap:anywhere; }
.auth-notice.success { color:var(--a-success); background:var(--a-success-bg); border-color:color-mix(in srgb,var(--a-success) 25%,var(--a-border)); }
.auth-errors { background:var(--a-error-bg); color:var(--a-error); border-color:color-mix(in srgb,var(--a-error) 25%,var(--a-border)); }
.auth-errors ul { margin:0; padding-left:18px; }
.auth-errors.validation-summary-valid { display:none; }
.auth-notice p:last-child { margin-bottom:0; }
.auth-note { padding:16px; background:var(--a-bg); border:1px solid var(--a-border); border-radius:12px; font-size:13px; color:var(--a-muted); margin:20px 0; }
.auth-note p { margin:0 0 8px; }
.auth-note p:last-child { margin-bottom:0; }
.auth-confirmed { display:flex; align-items:center; gap:10px; background:var(--a-success-bg); border:1px solid color-mix(in srgb,var(--a-success) 25%,var(--a-border)); color:var(--a-success); padding:14px; border-radius:10px; font-size:14px; margin-bottom:4px; }
.auth-card-foot { margin:24px 0 0; text-align:center; font-size:13px; color:var(--a-muted); }
.auth-foot-links { display:flex; justify-content:center; flex-wrap:wrap; gap:8px 18px; margin:18px 0 0; font-size:13px; }
.auth-foot-links a { min-height:32px; display:inline-flex; align-items:center; }
.auth-status-icon { display:inline-flex; width:54px; height:54px; align-items:center; justify-content:center; color:var(--a-purple); background:var(--a-lilac); border-radius:16px; font-size:27px; font-weight:700; margin-bottom:22px; }
.auth-status-icon.success { background:var(--a-success-bg); color:var(--a-success); }
.account-heading { margin:0 0 24px; }
.account-heading .auth-subtitle { max-width:650px; }
.account-overview { display:flex; align-items:center; gap:16px; padding:22px 26px; border:1px solid var(--a-border); border-radius:16px; background:var(--a-surface); margin-bottom:24px; }
.account-overview img { width:50px; height:50px; }
.account-overview h2 { margin:0 0 3px; font-size:20px; overflow-wrap:anywhere; }
.account-overview p { margin:0; color:var(--a-muted); font-size:14px; overflow-wrap:anywhere; }
.account-badge { display:inline-flex; gap:6px; align-items:center; border-radius:999px; font-size:11px; line-height:1.4; font-weight:700; padding:5px 9px; background:var(--a-lilac); color:var(--a-purple); white-space:nowrap; }
.account-badge.good { background:var(--a-success-bg); color:var(--a-success); }
.account-overview .account-badge { margin-left:auto; }
.account-section { margin-bottom:24px; }
.account-section-title { margin:0 0 12px; font-size:16px; font-weight:750; }
.account-rows { background:var(--a-surface); border:1px solid var(--a-border); border-radius:16px; overflow:hidden; box-shadow:var(--a-shadow); }
.account-row { display:grid; grid-template-columns:42px minmax(0,1fr) auto; gap:16px; align-items:center; padding:22px 24px; }
.account-row + .account-row { border-top:1px solid var(--a-border); }
.account-row-icon { width:40px; height:40px; background:var(--a-lilac); color:var(--a-purple); display:flex; align-items:center; justify-content:center; border-radius:12px; font-size:19px; }
.account-row-icon img { width:22px; height:22px; }
.account-row h3 { margin:0 0 4px; font-size:15px; }
.account-row p { margin:0; color:var(--a-muted); font-size:13px; overflow-wrap:anywhere; }
.account-row .auth-button { max-width:220px; }
.account-settings-rows .account-row { grid-template-columns:minmax(0,1fr) auto; }
.account-small { color:var(--a-muted); font-size:13px; margin:16px 0 0; }
.account-steps { display:flex; align-items:flex-start; gap:12px; list-style:none; padding:0; margin:20px 0 24px; }
.account-steps li { flex:1; color:var(--a-muted); font-size:11px; border-top:3px solid var(--a-border); padding-top:8px; }
.account-steps li.active { border-color:var(--a-purple); color:var(--a-purple); font-weight:700; }
.account-email-summary { border:1px solid var(--a-border); background:var(--a-bg); border-radius:12px; padding:16px; margin:18px 0 24px; }
.account-email-summary p { margin:0; font-size:14px; }
.account-email-summary .label { font-size:12px; color:var(--a-muted); margin-bottom:4px; }
.account-email-summary strong { overflow-wrap:anywhere; }
.account-disconnect { border-top:1px solid var(--a-border); margin-top:28px; padding-top:22px; }
.account-disconnect summary { cursor:pointer; color:var(--a-error); font-size:14px; font-weight:650; min-height:40px; }
.account-disconnect[open] summary { margin-bottom:12px; }
.account-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:22px; align-items:center; }
.account-actions form { margin:0; }
.mfs-account-footer { font-size:12px; color:var(--a-muted); padding:4px 20px 24px; text-align:center; }
.auth-visually-hidden { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
@media (max-width:680px) {
  .mfs-account-header-inner { padding:16px 20px; min-height:72px; gap:16px; }
  .mfs-account-header .mfs-brand img { width:196px; }
  .mfs-account-nav { gap:12px; font-size:12px; }
  .mfs-account-nav .desktop-only { display:none; }
  .mfs-account-main { padding:26px 16px 28px; }
  .auth-card-head { padding:25px 22px 0; }
  .auth-card-body { padding:25px 22px; }
  .auth-title { font-size:27px; }
  .account-overview { padding:18px; gap:12px; flex-wrap:wrap; }
  .account-overview .account-badge { margin-left:62px; }
  .account-row { grid-template-columns:36px minmax(0,1fr); padding:19px 18px; gap:12px; }
  .account-row > .auth-button,.account-row > form { grid-column:2; justify-self:start; }
  .account-row-icon { width:36px; height:36px; }
  .account-row .auth-button { max-width:none; }
  .account-settings-rows .account-row { grid-template-columns:minmax(0,1fr); }
  .account-settings-rows .account-row > .auth-button { grid-column:1; }
  .account-steps { gap:8px; }
}
@media (max-width:380px) {
  .mfs-account-header .mfs-brand img { width:174px; }
  .mfs-account-header-inner { padding:14px 16px; }
  .auth-card-head { padding:22px 18px 0; }
  .auth-card-body { padding:22px 18px; }
  .auth-mini-links { align-items:flex-start; flex-direction:column; gap:3px; }
}
@media (prefers-reduced-motion:reduce) { .mfs-account * { transition:none !important; scroll-behavior:auto !important; } }
