/* Family accounts: sign in, menu additions, profile sheet, leaderboard, admin page, cropper. */

/* Avatars: a picture, or colored initials until an admin adds one. */
.acct-av { flex: none; position: relative; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; background: var(--accent); }
.acct-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.acct-av.s { width: 30px; height: 30px; font-size: 11.5px; }
.acct-av.l { width: 64px; height: 64px; font-size: 22px; }
.acct-av.xl { width: 96px; height: 96px; font-size: 32px; }
.acct-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: #2DB264; border: 2px solid var(--surface); }

.acct-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.acct-hint { margin: 0; font-size: 13px; color: var(--muted); }
.acct-hint.center { text-align: center; }
.acct-link { align-self: center; background: none; border: 0; padding: 6px 4px; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.acct-pill { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.acct-pill.ok { background: #D7EEDF; color: #1B5C38; }

/* ----- Sign in ----- */
.acct-signin { gap: 22px; }
.acct-signcard { width: 100%; text-align: left; }
.acct-signcard h2 { font-size: 1.35rem; }
.acct-field { position: relative; display: flex; flex-direction: column; gap: 6px; }
.acct-go { min-height: 48px; font-size: 16px; }
.acct-go:disabled { opacity: 0.6; }
.mm-input.bad { border-color: #D9534F; box-shadow: 0 0 0 1px #D9534F; }
.acct-picked { display: flex; align-items: center; gap: 10px; min-height: 48px; padding-top: 8px; padding-bottom: 8px; }
.acct-picked .acct-optname { flex: 1; min-width: 0; font-weight: 500; }
.acct-picked .acct-link { padding: 4px; }
.acct-opts { list-style: none; margin: 0; padding: 4px; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin-top: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14); }
.acct-opts li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; cursor: pointer; }
.acct-opts li[aria-selected="true"], .acct-opts li:active { background: var(--miss); }
.acct-opts li.none { color: var(--muted); cursor: default; }
.acct-optname { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.acct-opts .he, .acct-picked .he { color: var(--muted); font-size: 15px; }

/* ----- Menu additions ----- */
.acct-top { width: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: -14px; }
.acct-top .acct-pill { margin-right: auto; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 12px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px; }
.acct-chip:empty { visibility: hidden; }
.acct-list { width: 100%; display: flex; flex-direction: column; padding: 0; text-align: left; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font: inherit; }
.acct-boardbox { cursor: pointer; }
.acct-li { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 50px; padding: 9px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: inherit; font: inherit; text-align: left; }
.acct-li:first-child { border-top: 0; }
.acct-li.acct-me { background: color-mix(in srgb, var(--accent) 11%, var(--surface)); }
.acct-bbhead { justify-content: space-between; min-height: 40px; }
.acct-seeall { color: var(--accent); font-weight: 700; font-size: 14px; }
.acct-quiet { color: var(--muted); font-size: 14px; }
.acct-rank { flex: none; width: 22px; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--muted); }
.acct-rank.gold { color: #B8860B; }
.acct-nm { flex: 1; min-width: 0; font-weight: 500; overflow-wrap: anywhere; }
.acct-nm small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); }
.acct-score { flex: none; min-width: 44px; text-align: right; font-family: var(--font-display); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.acct-score small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 11.5px; color: var(--muted); }
.acct-score.muted { color: var(--muted); }
.acct-minis { flex: none; display: flex; gap: 3px; }
.acct-minis i { width: 9px; height: 9px; border-radius: 2px; background: var(--miss); }
.acct-minis i.h { background: var(--hit); }
.acct-admincard { min-height: 0; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 16px 18px; text-align: left; }
.acct-admincard svg { color: var(--accent); flex: none; }
.acct-grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acct-admincard .ct { font-size: 1.3rem; }
.acct-admincard .cs { color: var(--muted); opacity: 1; }
.choice.locked.early { border-style: solid; border-color: var(--accent); color: var(--ink); }
.choice.locked.early .lk-side { color: var(--accent); }
.choice.locked.early .lk-main { opacity: 1; }

/* ----- Profile sheet ----- */
.acct-sheetwrap { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(8, 12, 18, 0.45); }
.acct-sheet { width: 100%; max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; padding: 10px 18px calc(22px + env(safe-area-inset-bottom, 0px)); background: var(--surface); color: var(--ink); border-radius: 22px 22px 0 0; text-align: left; animation: acctUp 0.22s ease both; }
@keyframes acctUp { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.acct-grab { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin-bottom: 4px; }
.acct-sheettop { display: flex; align-items: center; gap: 14px; }
.acct-sheettop h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.015em; }
.acct-sheetsub { font-size: 14px; color: var(--muted); }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.acct-stat { padding: 10px 6px; text-align: center; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
.acct-stat b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.35rem; line-height: 1.15; }
.acct-stat span { font-size: 12px; color: var(--muted); }
.acct-mrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 12px 4px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font: inherit; font-weight: 500; text-align: left; }
.acct-mrow.danger { color: #C0392B; }

/* ----- Leaderboard and admin pages ----- */
.acct-body { display: flex; flex-direction: column; gap: 14px; }
.acct-seg { display: flex; padding: 3px; background: var(--miss); border-radius: 10px; }
.acct-seg button { flex: 1; min-height: 40px; padding: 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-weight: 700; font-size: 14px; }
.acct-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.acct-seg.small { background: none; padding: 0; gap: 6px; }
.acct-seg.small button { min-height: 36px; border: 1px solid var(--line); }
.acct-seg.small button.on { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.acct-sechead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.acct-green { color: #1E8A4C; font-weight: 700; font-size: 14px; }
.acct-when { flex: none; font-size: 13px; color: var(--muted); }
.acct-when.on { color: #1E8A4C; font-weight: 700; }
.acct-more { justify-content: center; color: var(--accent); font-weight: 700; font-size: 14px; cursor: pointer; }
.acct-add { padding: 8px 12px; color: var(--accent); border-color: var(--accent); font-weight: 700; }
.acct-rowbtn { cursor: pointer; }
.acct-chev { color: var(--muted); font-size: 20px; }

/* edit person */
.acct-editbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.acct-editbar b { font-size: 16px; }
.acct-savebtn { padding: 10px 18px; min-height: 42px; }
.acct-savebtn:disabled { opacity: 0.6; }
.acct-picrow { display: flex; align-items: center; gap: 16px; }
.acct-piccol { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.acct-piccol .acct-link { align-self: flex-start; padding: 2px 0; font-size: 13px; color: #C0392B; }
.acct-form { display: flex; flex-direction: column; gap: 12px; }
.acct-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.acct-form select.mm-input { -webkit-appearance: none; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.acct-pwbox { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.acct-pwbox .acct-label { width: 100%; }
.acct-pw { font-weight: 700; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; }
.acct-pwbox .acct-link { padding: 0; font-size: 13px; }
.acct-toggle { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-weight: 500; }
.acct-toggle small { width: 100%; }
.acct-toggle input { -webkit-appearance: none; appearance: none; position: relative; width: 46px; height: 28px; margin: 0; border-radius: 14px; background: var(--miss); cursor: pointer; transition: background 0.15s; }
.acct-toggle input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.acct-toggle input:checked { background: var(--accent); }
.acct-toggle input:checked::after { transform: translateX(18px); }
.acct-toggle input:disabled { opacity: 0.55; cursor: default; }
.acct-danger { margin-top: 8px; padding: 12px; border: 1px solid #E6B3AD; border-radius: 10px; background: none; color: #C0392B; font: inherit; font-weight: 700; }

/* picture cropper */
.acct-cropwrap { position: fixed; inset: 0; z-index: 75; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(8, 12, 18, 0.6); }
.acct-cropcard { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 18px; background: var(--surface); color: var(--ink); border-radius: 18px; }
.acct-cropstage { position: relative; width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; touch-action: none; cursor: grab; background: #222; }
.acct-cropstage canvas { display: block; }
.acct-cropmask { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, transparent 49.5%, rgba(0, 0, 0, 0.55) 50%); }
.acct-cropmask::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); }
.acct-zoom { width: 100%; accent-color: var(--accent); }

/* Skoblodle leaderboard on the Skoblodle page, under Practice */
.acct-skboard { width: 100%; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.acct-skboard > .acct-label { margin: 0; }

/* The name chip is now the first thing on the menu, so it doesn't need the big top gap. */
#hub.home { padding-top: 4px; }

/* Menu card settings (admins): gear in place of the lock, and the settings sheet */
.acct-gear { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid currentColor; cursor: pointer; }
.acct-gear:active { transform: scale(0.94); }
.choice.locked.famhidden { border-style: dashed; border-color: var(--line); }
.choice.locked.famhidden .lk-main { opacity: 0.55; }
.choice.locked.famhidden .lk-side { color: #C99A22; }
.acct-sheettitle { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.015em; }
.acct-status { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 14px; }
.acct-sw { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.acct-sw b { display: block; font-weight: 700; }
.acct-sw small { display: block; font-size: 13px; color: var(--muted); }
.acct-sw input { flex: none; -webkit-appearance: none; appearance: none; position: relative; width: 46px; height: 28px; margin: 0; border-radius: 14px; background: var(--miss); cursor: pointer; transition: background 0.15s; }
.acct-sw input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.acct-sw input:checked { background: var(--accent); }
.acct-sw input:checked::after { transform: translateX(18px); }
.acct-daterow { display: flex; gap: 8px; }
.acct-daterow .mm-input { flex: 1; min-width: 0; }
.acct-dim { opacity: 0.5; }

/* Bottom sheets: can scroll if taller than the screen, and swipe down to close (accounts.js) */
.acct-sheet { max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; }
.acct-grab { padding: 0; box-sizing: content-box; }

/* Admin People list: swipe a row right for a quick picture button */
.acct-swipe { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.acct-swipe:first-child { border-top: 0; }
.acct-swipe > .acct-li { border-top: 0; position: relative; z-index: 1; background: var(--surface); touch-action: pan-y; }
.acct-swact { position: absolute; left: 0; top: 0; bottom: 0; width: 88px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; padding: 0; background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.acct-croptitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.acct-toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 60; display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: 14px; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }
.acct-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Admin: a person's profile sheet */
.acct-ptop { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.acct-ptop .acct-av { margin-bottom: 4px; }
.acct-ptop h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -0.015em; line-height: 1.15; }
.acct-phe { color: var(--muted); font-size: 15px; }
.acct-pon { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--hit, #2C8355); }
.acct-pon i { width: 8px; height: 8px; border-radius: 50%; background: #2DB264; }
.acct-poff { font-size: 13px; color: var(--muted); }
.acct-stats.four { grid-template-columns: repeat(4, 1fr); gap: 6px; }
.acct-stats.four .acct-stat { padding: 8px 4px; }
.acct-stats.four .acct-stat b { font-size: 1.2rem; }
.acct-stats.four .acct-stat span { font-size: 11px; line-height: 1.2; display: block; }
.acct-ptoday { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.acct-soon { margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-size: 11px; letter-spacing: 0; text-transform: none; font-weight: 700; }
.acct-pempty { padding: 12px; text-align: center; font-size: 14px; color: var(--muted); background: var(--bg); border: 1px dashed var(--line); border-radius: 12px; }
.acct-pinfo { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.acct-pir { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; }
.acct-pir:first-child { border-top: 0; }
.acct-pir span { color: var(--muted); }
.acct-pir b { font-weight: 500; text-align: right; }
.acct-pedit { min-height: 48px; padding: 12px 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
