/* Account (v1.1.x): the globe button on the home screen and the sign-in panel (js/account.js, docs/ACCOUNTS-V1.md).
   The panel borrows the look of the game's own Settings/Help panels: the --sw-* tokens of css/shell-fidelity.css
   (light and dark), the same card, back chevron, rounded buttons and the teal primary button of the home screen. */
.home-account{position:absolute;top:calc(max(0px,env(safe-area-inset-top)) + 12px);left:calc(max(0px,env(safe-area-inset-left)) + 12px);display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border-radius:50%;border:1px solid var(--sw-button-border,#c2d5e2);background:var(--sw-button,#ffffffd9);color:var(--sw-muted,#52718d);cursor:pointer;box-shadow:0 3px 8px #062e4720,inset 0 1px #ffffff55;transition:color .15s,border-color .15s,background .15s}
.home-account[hidden]{display:none}
.home-account.is-signed-in{color:#fff;border-color:#63e5d7;background:linear-gradient(165deg,#00bca5,#008a7f);box-shadow:0 3px 10px #00665e40,inset 0 1px #ffffff45}
.home-account:focus-visible{outline:2px solid var(--sw-accent,#00ac96);outline-offset:2px}
@media(min-width:700px){body[data-ui-context="shell"] #homeScreen .home-account{left:calc(50% - 230px + 18px);top:calc(50% - min(calc(calc(100 * var(--udvh)) - 48px),860px)/2 + 18px)}}

/* panel: same scrim and card as Settings and Help */
.account-panel{z-index:960;background:color-mix(in srgb,var(--sw-bg,#061923) 86%,transparent)}
.account-card{width:min(100%,420px);max-height:calc(calc(100 * var(--udvh)) - 36px - env(safe-area-inset-top) - env(safe-area-inset-bottom));padding:18px 16px;gap:12px;border:1px solid var(--sw-line,#88b9d333);border-radius:25px;color:var(--sw-text,#f2f7fc);background:var(--sw-decor,none) center top/cover no-repeat,var(--sw-bg,#0b2633);box-shadow:0 20px 70px var(--sw-shadow,#00000050)}
.account-card .ui-head{position:relative;min-height:36px;padding:0 0 4px;border:0;gap:8px;align-items:center}
.account-card .ui-head strong{font-size:18px;letter-spacing:-.02em;font-weight:750;flex:1;color:var(--sw-header,var(--sw-text))}
.account-card #accountClose{order:-1;width:36px;height:36px;min-height:36px;min-width:36px;padding:0;border:0;background:transparent;box-shadow:none;color:var(--sw-text,#f2f7fc);font-size:0}
.account-card #accountClose::before{content:'‹';font:32px/1 system-ui}

/* each view is a soft group, like the groups in Settings */
.account-view{display:grid;gap:10px;padding:14px;border:1px solid var(--sw-line,#88b9d333);border-radius:15px;background:var(--sw-surface-2,#173442d9);box-shadow:inset 0 1px #ffffff0d,0 2px 5px #001c3005}
.account-view[hidden]{display:none}
.account-intro{margin:0;font-size:14px;line-height:1.45;color:var(--sw-text,#f2f7fc)}
.account-label{font-size:12px;font-weight:650;color:var(--sw-muted,#b0c6d5)}
.account-card input[type=email],.account-card input[type=text]{width:100%;box-sizing:border-box;min-height:48px;padding:8px 14px;border-radius:14px;border:1px solid var(--sw-line,#88b9d366);background:var(--sw-control,#28495c);color:var(--sw-text,#f2f7fc);font:inherit;font-size:16px;box-shadow:inset 0 1px 3px #0001}
#accountCode{letter-spacing:.4em;text-align:center;font-weight:800;font-size:22px;text-indent:.4em}
.account-card input:focus-visible,.account-card button:focus-visible,.account-card summary:focus-visible{outline:2px solid var(--sw-accent,#00ac96);outline-offset:2px}
.account-card button{min-height:48px;padding:0 14px;border-radius:16px;border:1px solid var(--sw-button-border,#83acc47a);background:var(--sw-button,#294758f5);color:var(--sw-text,#f2f7fc);font:inherit;font-size:15px;font-weight:750;cursor:pointer;box-shadow:0 4px 8px #062e4718,inset 0 1px #ffffff40}
.account-card button.primary{border-color:#63e5d7;background:linear-gradient(165deg,#00bca5,#008a7f);color:#fff;box-shadow:0 5px 15px #00665e30,inset 0 1px #ffffff45}
.account-card button:disabled{opacity:.5;cursor:not-allowed}
.account-row{display:flex;gap:8px}.account-row button{flex:1;min-width:0;font-size:14px}
.account-consent{display:flex;gap:10px;align-items:flex-start;font-size:13px;line-height:1.4;color:var(--sw-text,#f2f7fc);cursor:pointer}
.account-consent input{width:22px;height:22px;flex:none;margin:1px 0 0;accent-color:var(--sw-accent,#00ac96)}
.account-privacy{font-size:12px;color:var(--sw-muted,#b0c6d5)}
.account-privacy summary{cursor:pointer;padding:4px 0;font-weight:650}
.account-privacy p{margin:6px 0 0;line-height:1.45}
.account-privacy-link,.net-data-more{color:var(--sw-accent,#009be8);text-decoration:underline;text-underline-offset:2px;font-weight:650}
.account-msg{margin:0;padding:10px 12px;border-radius:12px;font-size:13px;line-height:1.4;color:var(--sw-text,#f2f7fc);border:1px solid transparent}
.account-msg[data-kind=error]{background:color-mix(in srgb,#d6453d 16%,var(--sw-surface-2,#173442d9));border-color:#d6453d99}
.account-msg[data-kind=info]{background:color-mix(in srgb,#00a88f 16%,var(--sw-surface-2,#173442d9));border-color:#00a88f99}
.account-card button.account-danger{color:#c4352d;border-color:#d6453d99;background:transparent;box-shadow:none}
body[data-shell-resolved="dark"] .account-card button.account-danger{color:#ff9d90}
.account-card button.account-danger.armed{border-color:#d6453d;background:linear-gradient(165deg,#e0554c,#b3302a);color:#fff;box-shadow:0 4px 12px #b3302a40}

/* level packs (v1.2.0): the offer under the free-play summary and the list in the settings */
.free-offer{display:block;margin:6px auto 0;padding:6px 14px;border:1px solid var(--sw-line,#9994);border-radius:999px;background:transparent;color:inherit;font:inherit;font-size:13px;cursor:pointer}
.free-offer[hidden]{display:none}
#packsList .pack-row[data-state="locked"] small,#packsList .pack-row[data-state="login-required"] small,#packsList .pack-row[data-state="entitlement-required"] small{opacity:.85}
#packsList .pack-row[data-state="problem"] small,#packsList .pack-row[data-state="error"] small,#packsList .pack-row[data-state="revoked"] small{color:#c0392b}
.packs-note{margin:8px 0 0;font-size:12px;opacity:.75}

/* gameplay aids (v1.3.0): the quota meter in the game menu */
.aids-meter{display:block;width:100%;margin:2px 0 8px;padding:8px 12px;border:1px dashed var(--sw-line,#9996);border-radius:10px;background:transparent;color:inherit;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.aids-meter[hidden],#aidsRow[hidden]{display:none}

/* registration switch (docs/REGISTRATION-SWITCH-V1.md section 5): html.registration-off (js/registration.js), html.has-account (js/account.js).
   .needs-reg          text or part that is about the registration: hidden while it is off
   .when-off           shown only while it is off
   .when-off-noacc     shown only while it is off and this device holds no account
   .when-off-acc       shown only while it is off and this device holds an account (sign-out and delete stay possible) */
html.registration-off .needs-reg{display:none!important}
html:not(.registration-off) :is(.when-off,.when-off-noacc,.when-off-acc){display:none!important}
html.registration-off.has-account .when-off-noacc{display:none!important}
html.registration-off:not(.has-account) .when-off-acc{display:none!important}
