/* T-106 (TD-164): the optional account, a small button in the top film bar's left end (game/accountpanel.js). Only on the map
   cards and in the lobby: never in a battle, the start shot or the movie (light rule TD-149). */
#account { --h: max(24px, min(34px, calc(var(--bar) * .74))); position: fixed; z-index: 10; left: 22px;
  top: max(2px, calc((var(--bar) - var(--h)) / 2)); display: none; font-family: var(--font-ui); }
body.lobby #account:not([hidden]), body.maps #account:not([hidden]) { display: block; }
body.intro #account, body.startshot #account, body.filmon #account { display: none !important; }

#accountBtn { max-width: calc(100vw - 92px); min-height: 0; height: var(--h); padding: 0 12px; font-size: clamp(12px, 1vw, 15px); }
#accountBtn span { overflow: hidden; text-overflow: ellipsis; line-height: 1.35; }
#accountShort { display: none; }

#accountSheet { position: absolute; left: 0; top: calc(100% + 6px); display: none; flex-direction: column;
  align-items: flex-start; gap: 9px;
  width: min(340px, calc(100vw - 44px)); max-height: calc(100vh - var(--h) - 24px); overflow-y: auto; box-sizing: border-box;
  background: var(--ink-2); font: 500 14px/1.4 var(--font-ui); }
#account.open.signed #accountSheet { display: flex; }
#accountSheet p { margin: 0; overflow-wrap: anywhere; }
#accountState, #accountHint { color: var(--text-dim); }
#accountRow, #accountSure { flex-wrap: wrap; gap: 8px; }
#accountRow { display: flex; }
#accountSure { display: none; }
#accountSheet .ui-btn { min-height: 34px; padding: 0 12px; font-size: 13.5px; white-space: normal; }
#account.confirm #accountRow { display: none; }
#account.confirm #accountSure { display: flex; }
#accountAgain { display: none; }
#account.again #accountAgain { display: inline-flex; }

@media (max-width: 900px) {
  body.soundoff #accountBtn { max-width: max(84px, calc(100vw - 238px)); }
  #accountLong { display: none; }
  #accountShort { display: inline; }
}
