/* Account entry points stay visible at phone widths, including after sign-in. */
.profile-menu-label{display:none}
#profileButton:focus-visible,#topbarSignIn:focus-visible{outline:3px solid #ffd5a0;outline-offset:4px}
@media(max-width:560px){
  .topbar{flex-wrap:wrap;gap:10px;margin-bottom:20px}
  .topbar>.search{flex:1 1 100%;min-height:44px;box-sizing:border-box}
  .topbar .search input{font-size:16px}
  .topbar .topbar-account{width:100%;min-width:0;justify-content:space-between;gap:12px}
  .topbar-account #topbarSignIn{min-height:48px;display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;box-sizing:border-box;font-size:15px;border-radius:10px}
  .topbar-account #topbarSignIn[hidden]{display:none}
  .topbar-account #profileButton{display:grid;grid-template-columns:36px minmax(0,1fr);column-gap:10px;row-gap:2px;align-items:center;min-height:52px;min-width:0;max-width:220px;margin-left:auto;padding:8px 12px;border:1px solid #75634d;border-radius:10px;background:#22251e;color:#f3ead9;text-align:left;font:inherit}
  #profileButton .profile-menu-label{display:block;grid-column:2;grid-row:1;font-size:15px;font-weight:750;line-height:1.3}
  #profileButton #profileStatus{display:block;grid-column:2;grid-row:2;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;color:#c1cbb5;line-height:1.4}
  #profileButton #profileAvatar{grid-column:1;grid-row:1 / span 2;width:34px;height:34px;font-size:12px}
  #profileButton #profileAvatar span{display:block}
  #profileDialog{max-height:92dvh;overflow:auto}
  #profileDialog .onboarding-close{width:44px;height:44px;flex-shrink:0}
  #profileDialog input:not([type=checkbox]):not([type=radio]):not([type=file]),#profileDialog select{font-size:16px;min-height:48px;box-sizing:border-box}
  #profileDialog .profile-sync-actions a{min-height:46px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;font-size:15px}
  #profileDialog .profile-sync-actions a[hidden]{display:none}
  #profileDialog .profile-submit{min-height:50px;font-size:16px}
}

/* Wrapped account controls must contribute to the header's document height. */
.topbar{height:auto;min-height:54px}
@media(max-width:560px){
  .topbar{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:12px;
    height:auto;
    min-height:0;
    margin-bottom:16px;
  }
  .topbar .brand-mobile{min-height:44px;justify-self:start}
  .topbar .topbar-account{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    width:100%;
    margin-left:0;
  }
  .topbar-account:has(#topbarSignIn[hidden]){grid-template-columns:minmax(0,1fr)}
  .topbar-account #topbarSignIn,.topbar-account #profileButton{
    width:100%;
    max-width:none;
    min-height:56px;
    box-sizing:border-box;
    margin:0;
  }
  #profileButton #profileStatus{max-width:none}
  .topbar + .season-bar,.season-bar{
    margin-top:0;
    gap:12px;
    min-width:0;
  }
  .season-bar .season-state{min-width:0;line-height:1.4}
  .season-state > i{flex-shrink:0}
  .season-state > span{overflow-wrap:anywhere}
  .season-bar > button{flex-shrink:0}
}
