/* Phone header, tidied: top line = avatar, Sign out and the theme icon; second line = the tabs, equal width and no sideways
   scrolling; the study tools are in the Menu panel (menu.css). Loaded last. */
@media (max-width:640px){
  .top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px}
  .top-actions{display:contents}
  .top .brand{order:1}
  #auth{order:2;margin-left:auto;min-width:0;max-width:62vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:6px 12px;font-size:.84rem}
  #theme{order:3;flex:0 0 auto;padding:6px 10px}
  /* a long name is shortened so the light/dark button stays on the top row; "Sign out" always shows in full */
  #auth{display:inline-flex;align-items:center;max-width:calc(100% - 190px)}
  #auth .au-n{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #auth .au-s{flex:0 0 auto;white-space:pre}
  .top::after{content:"";order:4;flex:1 0 100%;height:0}
  .top-actions .tab{order:6;flex:1 1 0;min-width:0;padding:8px 4px;font-size:.84rem;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .top>*:not(.brand):not(.top-actions){order:7}
  .top>.cb-strip.cb-strip{order:5;padding:2px 2px 4px}
  .top-actions .tab .db-badge{margin-left:3px}
}

/* header avatar (all sizes): the real logo emblem, not a zoomed-in crop of the mascot photo; classes with their own photo keep it */
.brand .logo-face:not(.cb-photo){background:#fff url("/icon-v3-96.webp") center/88% no-repeat;border-color:#ffc23a}
