/* M10: the avatar's account sheet and /p/:id/me. Tokens only, from portal.css (--t-* timing, --ease, glass keys). */
.acct [hidden], .acct[hidden] { display: none !important; }

/* The avatar is a button now: same round look, a bigger tap area, a calm hover. */
a.app-avatar { position: relative; text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--t-change) var(--ease), box-shadow var(--t-release) var(--ease), transform var(--t-release) var(--ease); }
a.app-avatar::after { content: ""; position: absolute; inset: -6px; }
a.app-avatar[aria-expanded="true"] { background: var(--paper); box-shadow: 0 0 0 2px var(--script); }
a.app-avatar:active { transform: scale(0.96); transition-duration: var(--t-press); }
a.app-avatar:focus-visible { outline: 3px solid var(--script); outline-offset: 3px; }
@media (hover: hover) { a.app-avatar:hover { box-shadow: 0 0 0 2px rgba(106, 85, 70, 0.4); } }

/* Dim + sheet. Phone: slides up from the bottom. */
.acct-dim { position: absolute; inset: 0; z-index: 50; background: rgba(33, 31, 32, 0.45); opacity: 0; transition: opacity var(--t-change) var(--ease); }
.acct.is-open .acct-dim { opacity: 1; }
.acct-sheet {
  position: absolute; z-index: 60; left: 0; right: 0; bottom: 0; max-height: 92%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--cream); border-radius: 26px 26px 0 0; padding: 8px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 30px -12px rgba(33, 31, 32, 0.45); transform: translateY(100%);
  transition: transform var(--t-appear) var(--ease);
}
.acct.is-open .acct-sheet { transform: none; }
.acct-sheet:focus { outline: none; }
.acct-top { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; padding: 14px 0 10px; background: var(--cream); }
.acct-title { margin: 0; font: 36px/1.1 var(--f-script); color: var(--script); -webkit-text-stroke: 0.3px currentColor; }
.acct-x { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; cursor: pointer; color: var(--charcoal);
  border: 1px solid rgba(33, 31, 32, 0.16); background: rgba(255, 248, 241, 0.6); box-shadow: var(--glass-edge), var(--lift-clear);
  transition: transform var(--t-release) var(--ease), box-shadow var(--t-release) var(--ease); }
.acct-x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.acct-x:active { transform: scale(0.96); box-shadow: var(--press-clear); transition-duration: var(--t-press); }
.acct-x:focus-visible, .acct-row:focus-visible, .acct-all:focus-visible { outline: 3px solid var(--script); outline-offset: 2px; }

/* Wider screens: a panel under the avatar, fading and settling down a little. */
@media (min-width: 700px) {
  .acct-dim { background: rgba(33, 31, 32, 0.12); }
  .acct-sheet { left: auto; right: 12px; bottom: auto; top: 64px; width: min(380px, calc(100% - 24px)); max-height: calc(100% - 80px);
    border-radius: 22px; padding-bottom: 22px; opacity: 0; transform: translateY(-10px);
    box-shadow: 0 2px 4px rgba(33, 31, 32, 0.10), 0 24px 44px -16px rgba(33, 31, 32, 0.45);
    transition: transform var(--t-appear) var(--ease), opacity var(--t-change) var(--ease); }
  .acct.is-open .acct-sheet { opacity: 1; transform: none; }
}

/* Content: one idea per row, big type, generous spacing. */
.acct-content { display: grid; gap: 28px; }
.acct-who { display: grid; gap: 2px; }
.acct-hello { font: 700 20px/1.2 var(--f-body); color: var(--charcoal); overflow-wrap: anywhere; }
.acct-proj { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.acct-group { display: grid; gap: 6px; }
.acct-h { margin: 0 0 4px 2px; font: 600 13px/1.3 var(--f-body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.acct-list { list-style: none; margin: 0; padding: 0; display: grid; }
.acct-list > li, .acct-list > .acct-setting { border-bottom: 1px solid rgba(185, 168, 155, 0.4); }
.acct-list > li:last-child, .acct-list > .acct-setting:last-child { border-bottom: 0; }
.acct-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 10px 2px; box-sizing: border-box;
  text-decoration: none; color: var(--charcoal); font: 500 18px/1.25 var(--f-body); text-align: left; background: none; border: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: background-color var(--t-change) var(--ease), color var(--t-change) var(--ease); }
.acct-static { cursor: default; }
@media (hover: hover) { a.acct-row:hover, button.acct-row:hover { background: rgba(234, 229, 221, 0.55); } }
a.acct-row:active, button.acct-row:active { background: rgba(234, 229, 221, 0.8); transition-duration: var(--t-press); }
.acct-ico { flex: none; width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; background: var(--linen); color: var(--script); }
.acct-ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.acct-go { flex: none; font-size: 24px; line-height: 1; color: var(--script); }
.acct-count { flex: none; font: 600 14px/1 var(--f-body); color: var(--script); background: var(--linen); padding: 7px 11px; border-radius: 999px; }
.acct-count.is-due { color: var(--alert); background: rgba(179, 38, 30, 0.10); }
.acct-count.is-ok { color: var(--ok); background: rgba(31, 122, 74, 0.12); }

.acct-sub { display: grid; gap: 14px; padding: 2px 2px 18px 56px; }
.acct-note { margin: 0; font-size: 15px; line-height: 1.45; color: var(--muted); }
.acct-devices { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.acct-devices li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.acct-devices strong { display: block; font-size: 17px; font-weight: 600; }
.acct-when { display: block; font-size: 14px; color: var(--muted); }
.acct-small { min-height: 44px; padding: 0 16px; font-size: 15px; }
.acct-key { justify-self: start; min-height: 52px; display: inline-flex; align-items: center; padding: 0 22px; text-decoration: none; }
.acct-setting form, form.acct-setting { margin: 0; }

.acct-leave { gap: 14px; padding-top: 4px; }
.acct-leave form { margin: 0; }
.acct-out { width: 100%; min-height: 56px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 18px; }
.acct-out .acct-ico { width: 24px; height: 24px; background: none; color: inherit; }
.acct-out .acct-ico svg { width: 22px; height: 22px; }
.acct-all { align-self: center; justify-self: center; min-height: 48px; display: inline-flex; align-items: center; padding: 0 12px; color: var(--script);
  font: 600 16px var(--f-body); text-decoration: underline; text-underline-offset: 3px; }

/* The /p/:id/me page uses the same content, without the sheet's own title bar. */
.acct-page .acct-content { gap: 36px; }
.acct-page .acct-who { display: none; }

/* Confirmation line on /me (the shared .app-flash is the header's hidden flash, so this has its own look). */
.acct-flash { margin: 0 0 16px; padding: 14px 18px; border-radius: 16px; font-size: 18px; line-height: 1.35; color: var(--charcoal);
  background: rgba(255, 248, 241, 0.7); border: 1px solid rgba(33, 31, 32, 0.12); box-shadow: var(--glass-edge), var(--lift-clear); }
