.app-brand img {
  display: block;
  width: 390px !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
}

/* Keep the account action readable when the desktop header is viewed on a
   phone in landscape orientation or on a narrow tablet. */
.app-nav a {
  white-space: nowrap;
}

.app-nav .logout-btn {
  flex: 0 0 auto;
  min-width: 78px;
  text-align: center;
  white-space: nowrap;
}

@media (min-width: 761px) and (max-width: 1050px) {
  .app-header__inner {
    width: calc(100% - 28px) !important;
    gap: 14px !important;
  }

  .app-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .app-brand img {
    width: min(360px, 40vw) !important;
  }

  .app-nav {
    flex: 0 0 auto;
    gap: 2px !important;
  }

  .app-nav a {
    padding: 10px 8px !important;
    font-size: 13px !important;
  }

  .app-nav .logout-btn {
    min-width: 76px;
    margin-left: 3px;
    padding-right: 10px !important;
    padding-left: 10px !important;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding-bottom: 0 !important;
  }

  .app-header__inner {
    width: 100% !important;
    min-height: 0 !important;
    padding: 16px 14px 14px;
    display: flex !important;
    flex-direction: column;
    align-items: stretch !important;
    gap: 14px !important;
  }

  .app-brand {
    width: 100%;
    display: flex !important;
    justify-content: center;
    overflow: hidden;
  }

  .app-brand img {
    width: min(100%, 330px) !important;
    max-width: 330px !important;
  }

  .app-nav {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    min-height: 58px !important;
    margin: 0 !important;
    padding: 6px !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px !important;
    background: rgba(255,255,255,.96) !important;
    border: 1px solid rgba(90,70,56,.18) !important;
    border-radius: 15px !important;
    box-shadow: 0 14px 36px rgba(35,23,15,.18) !important;
  }

  .app-nav a {
    min-width: 0;
    padding: 11px 2px !important;
    color: #2c2926 !important;
    font-size: 12px !important;
    text-align: center;
    white-space: nowrap;
  }

  .app-nav .logout-btn {
    display: none !important;
  }

  .app-titlebar {
    display: none;
  }

  .app-footer {
    padding: 26px 16px 24px !important;
  }
}
